Search Results

Search found 171 results on 7 pages for 'felix elnan'.

Page 5/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Yet another Python Windows CMD mklink problem ... can't get it to work!

    - by Felix Dombek
    OK I have just posted another question which outlined my program but the specific problem was different. Now, my program just stops working without any message whatsoever. I'd be grateful if someone could help me here. I want to create symlinks for each file in a directory structure, all in one large flat folder, and have the following code by now: # loop over directory structure: # for all items in current directory, # if item is directory, recurse into it; # else it's a file, then create a symlink for it def makelinks(folder, targetfolder, cmdprocess = None): if not cmdprocess: cmdprocess = subprocess.Popen("cmd", stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE) print(folder) for name in os.listdir(folder): fullname = os.path.join(folder, name) if os.path.isdir(fullname): makelinks(fullname, targetfolder, cmdprocess) else: makelink(fullname, targetfolder, cmdprocess) #for a given file, create one symlink in the target folder def makelink(fullname, targetfolder, cmdprocess): linkname = os.path.join(targetfolder, re.sub(r"[\/\\\:\*\?\"\<\>\|]", "-", fullname)) if not os.path.exists(linkname): try: os.remove(linkname) print("Invalid symlink removed:", linkname) except: pass if not os.path.exists(linkname): cmdprocess.stdin.write("mklink " + linkname + " " + fullname + "\r\n") So this is a top-down recursion where first the folder name is printed, then the subdirectories are processed. If I run this now over some folder, the whole thing just stops after 10 or so symbolic links. Here is the output: D:\Musik\neu D:\Musik\neu\# Electronic D:\Musik\neu\# Electronic\# tag & reencode D:\Musik\neu\# Electronic\# tag & reencode\ChillOutMix D:\Musik\neu\# Electronic\# tag & reencode\Unknown D&B D:\Musik\neu\# Electronic\# tag & reencode\Unknown D&B 2 The program still seems to run but no new output is generated. It created 9 symlinks for some files in the # tag & reencode and the first three files in the ChillOutMix folder. The cmd.exe Window is still open and empty, and shows in its title bar that it is currently processing the mklink command for the third file in ChillOutMix. I tried to insert a time.sleep(2) after each cmdprocess.stdin.write in case Python is just too fast for the cmd process, but it doesn't help. Does anyone know what the problem might be?

    Read the article

  • Serializing a part of object graph

    - by Felix
    Hi all, I have a problem regarding Java custom serialization. I have a graph of objects and want to configure where to stop when I serialize a root object from client to server. Let's make it a bit concrete, clear by giving a sample scenario. I have Classes of type Company Employee (abstract) Manager extends Employee Secretary extends Employee Analyst extends Employee Project Here are the relations: Company(1)---(n)Employee Manager(1)---(n)Project Analyst(1)---(n)Project Imagine, I'm on the client side and I want to create a new company, assign it 10 employees (new or some existing) and send this new company to the server. What I expect in this scenario is to serialize the company and all bounding employees to the server side, because I'll save the relations on the database. So far no problem, since the default Java serialization mechanism serializes the whole object graph, excluding the field which are static or transient. My goal is about the following scenario. Imagine, I loaded a company and its 1000 employees from the server to the client side. Now I only want to rename the company's name (or some other field, that directly belongs to the company) and update this record. This time, I want to send only the company object to the server side and not the whole list of employees (I just update the name, the employees are in this use case irrelevant). My aim also includes the configurability of saying, transfer the company AND the employees but not the Project-Relations, you must stop there. Do you know any possibility of achieving this in a generic way, without implementing the writeObject, readObject for every single Entity-Object? What would be your suggestions? I would really appreciate your answers. I'm open to any ideas and am ready to answer your questions in case something is not clear.

    Read the article

  • Can't get a LiveFolder to launch my activity like it should

    - by Felix
    I was able to create a ContentProvider for a LiveFolder, but I can't seem to be able to create my intents correctly, so it always gives "Application is not installed on your phone" errors when clicking on items inside the folder. My Activity is defined like so, in the manifest: <activity android:name=".MyActivity"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> Then, I create the intents I place in the LiveFolders.INTENT column like this: i = new Intent(); i.setAction(null); i.setClassName("my.package.here", ".MyActivity"); I don't get why this is not working. Maybe I'm making some stupid mistake, but please point me in the right direction.

    Read the article

  • Jqgrid search option hides the grid table

    - by Felix Guerrero
    The issue is when I click on search option (on pager) it shows the search window but the grid gets hide. I'm including the jqmodal.js file. But what I'm ignoring on the code below? css files: jqModal.css jquery-ui-1.8.custom.css ui.jqgrid.css ui.multiselect.css jquery.searchFilter.css js files: jquery.min.js grid.base.js grid.common.js grid.formedit.js grid.setcolumns.js ui.multiselect.js jquery.searchFilter.js jqModal.js The Javascript: $("#list").jqGrid({ url: 'foo_report.php?g=' + $('#fooselect').val() + '&report=1&searchString=null&searchField=null&searchOper=null', datatype: 'json', mtype: 'GET', colNames: ['foo1','foo2', 'foo3'], colModel: [ { name:'rows.foobar1', index: 'foobar1', search:true, jsonmap: 'foobar1', width: 150, align: 'left', sortable:true}, { name:'rows.foobar2', index: 'foobar2', jsonmap: 'foobar2', width: 150, align: 'left'}, { name:'rows.foobar3', index: 'foobar3', jsonmap: 'foobar3', width: 240, align: 'left', sortable: true}], pager: '#pager', rowNum: 8, autowidth: true, rowList: [8, 16], sortname: 'foobar1', sortorder: 'asc', viewrecords: true, search : { caption: "Search...", Find: "Find", Reset: "Reset", odata : ['equal', 'not equal', 'less'], groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" }], matchText: " match", rulesText: " rules" }, caption: 'Foobar Data', jsonReader : { root: "rows", repeatitems: false }, height: 350, width: 800 }); html: <table id="list"></table> <div id="pager"></div>

    Read the article

  • What is the best way to marshal a char array function argument?

    - by Seh Hui 'Felix' Leong
    Let say that given the following signature in LegacyLib.dll: int Login(SysInst *inst, char username[8], char password[6]); The simple way to marshal this function in C# would be: [DllImport("LegacyLib.dll", CharSet=CharSet.Ansi)] public static extern int Login(ref SysInst inst, string username, string password); The problem of doing it in a such a naive way is that the managed string we passed into the username or password parameter could be longer than the array bounds and this could potentially cause a buffer overrun in LegacyLib.dll. Is there a better way which overcomes this problem? i.e. is there any quick [MarshalAs(…)] magic that I could use to counter that?

    Read the article

  • Stable Scala 2.8 plugin

    - by Felix
    Does anyone know if there exists a stable version of the Scala plugin for eclipse, running with Scala 2.8 (any version of scala 2.8...RC or beta or whatever). I like the fact that it compiles 10 times faster than the netbeans plugin, but it is very unstable, and auto-imports doesnt work. Also, sometimes it cant find classes when I hit "run", then I have to clean it again. This is with some random nightly build of the 2.8 eclipse scala plugin. Is there a stable version? If so, can you link me to it? Thanks in advance :)

    Read the article

  • Facebook proxy email not arriving -- do I need permissions?

    - by Felix
    I'm building a website that allows user to connect using Facebook Connect. So far I'm able to log the user in and fetch data about them (name, email, pic, etc.). If I fetch the email (using Users.getInfo) I get a proxied email ([email protected]), which is absolutely great. Problem is, that email doesn't work. I've tried sending an email to it and I never received it. There are two reasons I see that could cause this: I don't have enough permissions. Ok, I can understand that, but if I don't have enough permissions then why are they returning an email at all? The email has to be somehow sent from the application itself (I've tried sending it from my Gmail account) -- but how would Facebook know that the email is coming from the application? So which is it? Or is it something else?

    Read the article

  • Find missing birth days in Apple Addressbook

    - by Felix Ogg
    I am trying to clean the holes out of my Mac address book. As a first step I want to ask all my friends for their birth day, to be able to congratulate them with cheesy Hallmark cards. I need a "group" in my address book, to mailmerge personalized messages from. This is the Applescript I came up with: tell application "Address Book" make new group with properties {name:"No Birthday"} set birthdayPeople to (get every person whose birth date is greater than date "Monday, January 1, 1900 12:00:00 AM") repeat with i from 1 to number of items in people set thePerson to item i of people if not (birthdayPeople contains thePerson) then add thePerson to group "No Birthday" end if end repeat save end tell It breaks, but from the error messages I cannot deduce what is wrong: Result: error "Can’t make «class azf4» id \"05F770BA-7492-436B-9B58-E24F494702F8:ABPerson\" of application \"Address Book\" into type vector." number -1700 from «class azf4» id "05F770BA-7492-436B-9B58-E24F494702F8:ABPerson" to vector (BTW: Did I mention this is my first AppleScript code, EVER? So, if this code can be simplified, or made more elegant, that is welcome too.)

    Read the article

  • Intent provided by Cursor is not fired correctly (LiveFolders)

    - by Felix
    In my desperation with trying to get LiveFolders working, I have tried the following in my LiveFolder ContentProvider: public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { MatrixCursor mc = new MatrixCursor(new String[] { LiveFolders._ID, LiveFolders.NAME, LiveFolders.INTENT } ); Intent i = null; for (int j=0; j < 5; j++) { i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com/")); mc.addRow(new Object[] { j, "hello", i} ); } return mc; } Which, in all normalness, should launch the Browser and display the Google homepage when clicking on an item in the LiveFolder. But it doesn't. It gives a Application is not installed on your phone error. No, I'm not defining a base intent for my LiveFolder. logcat says: I/ActivityManager( 74): Starting activity: Intent { act=android.intent.action.VIEW dat=Intent { act=android.intent.action.VIEW dat=http://www.google.com/ } flg=0x10000000 } It seems it embeds the Intent I give it in the data section of the actually fired Intent. Why is it doing this? I'm really starting to believe it's a platform bug.

    Read the article

  • iOS Facebook Access Token To Get User Wall Feed (status)

    - by Felix
    [DISCLAIMER : None of the access token or ID below here are real] I've done research for three solid days and no result on how to get user wall feed(post). I have used https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials and get the access token which is something like this access_token=454345994651138|bAMGfuW-ueNXGCahley7ga125HN and then https://graph.facebook.com/100005939123542/feed?access_token=454345994651138|bAMGfuW-ueNXGCahley7ga125HN It gives me general information such as user's likes, name, id, current city... but NOT user's wall posts. I've learned that there are three types of access token, which is App Token, User Token, and Page Token. In order to get user/feed by using graphAPI, I need to request to get User Token, but there's NO information in the lousy Facebook Doc! (Which frustrated me the most!) In order to generate the user access token, we need to set some permission, generate the access token, and GET the user's wall feed, which is in JSON format. My question is : How do I get the User Access Token in order to get user wall post in iOS Xcode?

    Read the article

  • Construct a Netflix Affiliate URL to a search result page?

    - by Felix
    I have a Netflix Affiliate account, but I don't want to direct users to the homepage for them to create an account, I want to direct them to a search result page. The reason for this is that on our site we have lots of titles but they can't be reliably linked to a single Netflix result programmatically, so we would prefer if we could direct users to a search page, and if the user signs up, get the revenue. Is this possible? I find the whole Netflix-Affiliate-but-Google-Affiliate scheme a bit daunting.

    Read the article

  • Cannot get xmlhttprequest.responseText from JQuery

    - by Felix Guerrero
    Hi. I got this function function verify_at_bd(){ var u = "foo"; var p = "bar"; return $.post('auth.php', { name: u, password: p, mobile: '' }, function(result){ return result; },'json'); } If I do a console.log(verify_at_bd()) I'm getting an xmlhttprequest but cannot access to responseText property. I'm using header("Content-Type: application/json") into my PHP. I'm using firefox 3.6 on OS X.

    Read the article

  • How to change the date/time in Python for all modules?

    - by Felix Schwarz
    When I write with business logic, my code often depends on the current time. For example the algorithm which looks at each unfinished order and checks if an invoice should be sent (which depends on the no of days since the job was ended). In these cases creating an invoice is not triggered by an explicit user action but by a background job. Now this creates a problem for me when it comes to testing: I can test invoice creation itself easily However it is hard to create an order in a test and check that the background job identifies the correct orders at the correct time. So far I found two solutions: In the test setup, calculate the job dates relative to the current date. Downside: The code becomes quite complicated as there are no explicit dates written anymore. Sometimes the business logic is pretty complex for edge cases so it becomes hard to debug due to all these relative dates. I have my own date/time accessor functions which I use throughout my code. In the test I just set a current date and all modules get this date. So I can simulate an order creation in February and check that the invoice is created in April easily. Downside: 3rd party modules do not use this mechanism so it's really hard to integrate+test these. The second approach was way more successful to me after all. Therefore I'm looking for a way to set the time Python's datetime+time modules return. Setting the date is usually enough, I don't need to set the current hour or second (even though this would be nice). Is there such a utility? Is there an (internal) Python API that I can use?

    Read the article

  • How do you remind your Scrum Product Owner about his promises/actions?

    - by Felix Ogg
    ** EDIT: Rephrased the question to re-focus ** Our Scrum team meets as seldomly as possible, but we meet with the product owner every chance we get. We track everyone's agreed action points (particularly theirs). We are 100% agile, but our product owner lives in traditional world, we remain off-site. We facilitate him in crossing over to our fast-paced world. There's not much wrong. The team and the PO are in good spirits. PO is present at every meeting and positively energized. Just imagine this person as a 70 year old, slow grandpa, who is forgetful, yet kind. In reality he isn't, but he is used to a working environment (public servants) that is much slooooower. Manyana-manyana etc. It is frustrating for my team to cooperate: PO lives in a non-prioritized environment, and everyone in it has learned the productivity-technique of NGTD (Not Getting Things Done). He WANTS to, it's just that he forgets or 'sinks' somewhere along the away. We have experimented with a text file, maintained by the Scrum master (low-tech), which he broadcasts by e-mail every day JIRA, our issue tracker. Turns out this is nice for programmers, but too steep for 'regular people' I Googled for Issue tracking webtools but came up empty handed: All tools are aimed at IT issue tracking, instead of meeting action point tracking/planning for mere mortals. I did find TODO-lists like RememberTheMilk, but they don't track comments, and - to be honest - I doubt we could get our product owner to use it (too complicated). We have three requirements: Register action points, assign to a team member and a deadline Offer anyone to 'comment' on progress of any action point Do not build our own tool from scratch We do not need: - impressive authorization models, - multi-project, - workflow, - crosslinking. Is there any trick/tool you use to assist your product owner 'fly' like the rest of the rest of the team? Communication before tools I agree with the general consensus that one should not try to apply technology to a communication problem, however in this case I am merely looking for a tool to save me time in setting up prioritized lists. I found www.thymer.com today, may be what I am looking for. The guys are cool. It is getting rather feature-bloated though.

    Read the article

  • Applying JQuery UI css to a textarea element

    - by Felix Guerrero
    Hi. I'm using JQuery UI for a web based development at the University. I got some forms that I put into a dialog, so I got elements like <label for="name">ID user</label><input type="text" name="iduser" size="15" id="iduser" class="text ui-widget-content ui-corner-all" maxlength=12 /> But I got some textarea elements like <label for="name">Description</label><textarea name="description" id="description" class="text ui-widget-content ui-corner-all" value=""></textarea> The issue: textarea is not taking the css as inputs does, I mean, I got corner rounder textarea as input texts but the font size and font family don't.

    Read the article

  • Read files from directory to create a ZIP hadoop

    - by Félix
    I'm looking for hadoop examples, something more complex than the wordcount example. What I want to do It's read the files in a directory in hadoop and get a zip, so I have thought to collect al the files in the map class and create the zip file in the reduce class. Can anyone give me a link to a tutorial or example than can help me to built it? I don't want anyone to do this for me, i'm asking for a link with better examples than the wordaccount. This is what I have, maybe it's useful for someone public class Testing { private static class MapClass extends MapReduceBase implements Mapper<LongWritable, Text, Text, BytesWritable> { // reuse objects to save overhead of object creation Logger log = Logger.getLogger("log_file"); public void map(LongWritable key, Text value, OutputCollector<Text, BytesWritable> output, Reporter reporter) throws IOException { String line = ((Text) value).toString(); log.info("Doing something ... " + line); BytesWritable b = new BytesWritable(); b.set(value.toString().getBytes() , 0, value.toString().getBytes() .length); output.collect(value, b); } } private static class ReduceClass extends MapReduceBase implements Reducer<Text, BytesWritable, Text, BytesWritable> { Logger log = Logger.getLogger("log_file"); ByteArrayOutputStream bout; ZipOutputStream out; @Override public void configure(JobConf job) { super.configure(job); log.setLevel(Level.INFO); bout = new ByteArrayOutputStream(); out = new ZipOutputStream(bout); } public void reduce(Text key, Iterator<BytesWritable> values, OutputCollector<Text, BytesWritable> output, Reporter reporter) throws IOException { while (values.hasNext()) { byte[] data = values.next().getBytes(); ZipEntry entry = new ZipEntry("entry"); out.putNextEntry(entry); out.write(data); out.closeEntry(); } BytesWritable b = new BytesWritable(); b.set(bout.toByteArray(), 0, bout.size()); output.collect(key, b); } @Override public void close() throws IOException { // TODO Auto-generated method stub super.close(); out.close(); } } /** * Runs the demo. */ public static void main(String[] args) throws IOException { int mapTasks = 20; int reduceTasks = 1; JobConf conf = new JobConf(Prue.class); conf.setJobName("testing"); conf.setNumMapTasks(mapTasks); conf.setNumReduceTasks(reduceTasks); MultipleInputs.addInputPath(conf, new Path("/messages"), TextInputFormat.class, MapClass.class); conf.setOutputKeyClass(Text.class); conf.setOutputValueClass(BytesWritable.class); FileOutputFormat.setOutputPath(conf, new Path("/czip")); conf.setMapperClass(MapClass.class); conf.setCombinerClass(ReduceClass.class); conf.setReducerClass(ReduceClass.class); // Delete the output directory if it exists already JobClient.runJob(conf); } }

    Read the article

  • Visual Studio confused by server code inside javascript

    - by Felix
    I ran into an annoying problem: the following code gives a warning in Visual Studio. <script type="text/javascript"> var x = <%: ViewData["param"] %>; </script> The warning is "Expected expression". Visual Studion gets confused, and all the javascript code after that is giving tons of warnings. Granted, it's all warnings, and it works perfectly fine in runtime - but it is very easy to miss real warnings among dozen of false positives. It was working the same way in VS2008, and it wasn't fixed in VS2010. Does anybody know if there is a workaround, or a patch?

    Read the article

  • Barplot in R, aggregation of sampled data

    - by Felix
    Hello, I want an stacked barplot, or at least two barplots (histogramms) of the data below. But I cant't figure out how. plot(online) is not the solution, I´m looking for. Please see below. online offline 1 sehrwichtig wichtig 2 wichtig unwichtig 3 sehrwichtig unwichtig 4 sehrwichtig sehrwichtig 5 sehrwichtig sehrwichtig 6 sehrwichtig unwichtig 7 sehrwichtig unwichtig 8 wichtig wichtig 9 wichtig unwichtig 10 sehrwichtig sehrwichtig 11 sehrwichtig wichtig 12 sehrwichtig unwichtig 13 wichtig sehrwichtig 14 sehrwichtig wichtig I know I need a step, where the data is aggregated to: online offline sehrwichtig 6 7 unwichtig 0 1 wichtig 3 5 But how?

    Read the article

  • PHP max_execution_time ignored (no safe mode, no shared host, just localhost/windows7/php 5.3.1 and

    - by Felix
    This problem drives me nuts, because the max_execution_time in the php.ini and in the htaccess and reported from php is definitely higher, than reportet in the warning message. <?php echo "Max execution time: ".ini_get("max_execution_time")."<br />"; while(true) { sleep(1); } ?> Output: Max execution time: 240 Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\timetest.php on line 5

    Read the article

  • casting between sibling classes, AS3

    - by felix-gasca
    I have two classes, derivedClassA and derivedClassB which both extend parentClass I'm declaring var o:parentClass and then, depending on what's going on, I want to cast o as either being of type derivedClassA or derivedClassB. Essentially, this: var o:parentClass ... if(shouldUseA) o = new derivedClassA(); else o = new derivedClassB(); o.doSomething(); But it's not working, I'm getting all sorts of errors. Isn't this how class inheritance works? I feel like I'm missing something really fundamental, but I can't figure out what. Am I supposed to be using interfaces instead? Is there another way of doing what I want?

    Read the article

  • Scala downwards or decreasing for loop?

    - by Felix
    In scala, you often use an iterator to do a for loop in an increasing order like: for(i <- 1 to 10){ code } How would you do it so it goes from 10 to 1? I guess 10 to 1 gives an empty iterator (like usual range mathematics)? I made a scala script which solves it by calling reverse on the iterator, but it's not nice in my opinion, is this the way to go: def nBeers(n:Int) = n match { case 0 => ("No more bottles of beer on the wall, no more bottles of beer."+ "\nGo to the store and buy some more, "+ "99 bottles of beer on the wall.\n") case _ => (n+" bottles of beer on the wall, "+n +" bottles of beer.\n"+"Take one down and pass it around, "+ (if((n-1)==0) "no more" else (n-1))+ " bottles of beer on the wall.\n") } for(b <- (0 to 99).reverse)println(nBeers(b)) ?? Any comments/suggestions?

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >