Search Results

Search found 100 results on 4 pages for 'olivier rochaix'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • PHP encoding with DOMDocument

    - by Olivier Lalonde
    <tag> ????? ? </tag> When I try to get the content of the following code using DOMDocument functions, it returns something like: ÐÐ»ÐµÐºÑ Ðœ I've tried setting DOMDocument encoding to different values (UTF-8, ISO-8859-1), using mb_convert_encoding, iconv and utf8_encode but without success. How can I get "????? ?" instead of "ÐÐ»ÐµÐºÑ Ðœ" ? EDIT: The input is coming from a page loaded with curl. When I output the page content to my browser, the characters are displayed correctly (so I doubt the input is the problem).

    Read the article

  • ExtJs: Tree: how download then select using AJAX calls ?

    - by Olivier Pons
    Hi, Here's my goal : - open a tree - download the root nodes - expand automatically one specific node using AJAX (and loop n times here) until i find a leaf then select the leaf Here's the function that works when I declare the Tree : listeners: { load: function(n) { console.log('load(n)'); n.eachChild( function(n) { if ((n.id=='lys/2007') || (n.id=='lys/2007/08') || (n.id=='lys/2007/08/29')) { n.expand(false,false); } }); } } But if I don't know how to make it more "generic" (almost exactly like the ExtJs documentation). But they don't jump automatically to a specific node (i.e. I want no user interaction). Any idea / advice how to do this? Don't hesitate to edit my post to make it proper English :)

    Read the article

  • Facebook dialogs keep popping up in Firefox

    - by Pierre Olivier Martel
    I have a facebook application running in a FBML canvas and I have a problem with dialogs (either extended permissions or stream publish dialogs). Once they popup, they keep popping up for every subsequent requests. I've tested it in Chrome and everything works fine. It seems that the URL is chained in Firefox, which gives cryptic long urls like : http://apps.facebook.com/webdweller-po/discover?_fb_q=1&_fb_qsub=apps.facebook.com#!/webdweller-dev/?_fb_q=1&_fb_qsub=apps.facebook.com Did anybody experienced such a bug?

    Read the article

  • Ruby as a scripting language for web server

    - by Olivier Lalonde
    Is it possible to use Ruby as a scripting language with a HTTP server ? I'd like to be able to simply put some Ruby files in a web directory and be able to execute them from my browser - just like I did with PHP. I have absolutely nothing against frameworks such as RoR, but I was told that I should first learn Ruby and only then move on with higher level frameworks. Of course, I could write some Ruby scripts and run them in the console, but I would prefer getting the input/output from my browser :) Is that possible at all ? Otherwise, how hard would it be for me to build a quick and simple web framework ?

    Read the article

  • Navigate from facebook tab to canvas page

    - by Pierre Olivier Martel
    My facebook application has a tab the user can install. On this tab, there is links that are suppose to link to application canvas (ex.: apps.facebook.com/my-app). It seems that when I'm on my user profile tab and click on a link, Facebook loads the page inside the tab. How do I force it to navigate out of the tab and into the canvas page?

    Read the article

  • git: programmatically know by how much the branch is ahead/behind a remote branch

    - by Olivier
    I would like to extract the information that is printed after a github status, which looks like: # On branch master # Your branch is ahead of 'origin/master' by 2 commits. Of course I can parse the output of git status but this is not recommended since this human readable output is liable to change. There are two problems: How to know the remote tracked branch? It is often origin/branch but need not be. How to get the numbers? How to know whether it is ahead/behind? By how many commits? And what about the diverged branch case?

    Read the article

  • Retrieving XML node from a path specified in an attribute value of another node

    - by Olivier PAYEN
    From this XML source : <?xml version="1.0" encoding="utf-8" ?> <ROOT> <STRUCT> <COL order="1" nodeName="FOO/BAR" colName="Foo Bar" /> <COL order="2" nodeName="FIZZ" colName="Fizz" /> </STRUCT> <DATASET> <DATA> <FIZZ>testFizz</FIZZ> <FOO> <BAR>testBar</BAR> <LIB>testLib</LIB> </FOO> </DATA> <DATA> <FIZZ>testFizz2</FIZZ> <FOO> <BAR>testBar2</BAR> <LIB>testLib2</LIB> </FOO> </DATA> </DATASET> </ROOT> I want to generate this HTML : <html> <head> <title>Test</title> </head> <body> <table border="1"> <tr> <td>Foo Bar</td> <td>Fizz</td> </tr> <tr> <td>testBar</td> <td>testFizz</td> </tr> <tr> <td>testBar2</td> <td>testFizz2</td> </tr> </table> </body> </html> Here is the XSLT I currently have : <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output method="html" indent="yes"/> <xsl:template match="/ROOT"> <html> <head> <title>Test</title> </head> <body> <table border="1"> <tr> <!--Generate the table header--> <xsl:apply-templates select="STRUCT/COL"> <xsl:sort data-type="number" select="@order"/> </xsl:apply-templates> </tr> <xsl:apply-templates select="DATASET/DATA" /> </table> </body> </html> </xsl:template> <xsl:template match="COL"> <!--Template for generating the table header--> <td> <xsl:value-of select="@colName"/> </td> </xsl:template> <xsl:template match="DATA"> <xsl:variable name="pos" select="position()" /> <tr> <xsl:for-each select="/ROOT/STRUCT/COL"> <xsl:sort data-type="number" select="@order"/> <xsl:variable name="elementName" select="@nodeName" /> <td> <xsl:value-of select="/ROOT/DATASET/DATA[$pos]/*[name() = $elementName]" /> </td> </xsl:for-each> </tr> </xsl:template> </xsl:stylesheet> It almost works, the problem I have is to retrieve the correct DATA node from the path specified in the "nodeName" attribute value of the STRUCT block.

    Read the article

  • Retrieving NSDate from NSString

    - by Olivier de Jonge
    I have an iPhone app. that is receiving data with IRFC 3339 timestamp format (e.g. @"2010-01-29T11:30:00.000+01:00"), as in GData. I want to convert the data to an NSDate NSDateFormatter *inputFormatter = [[[NSDateFormatter alloc] init] autorelease]; [inputFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS"]; [currentEntry setStartTime:[inputFormatter dateFromString: ][currentEntry startTimeString]]]; But I'm missing out how to convert the last part of the string @"2010-01-29T11:30:00.000+01:00": the time offset. Anyone knows what I have to add to this String to take the time offset in account too?

    Read the article

  • How do you assign a variable with the result of a if..else block?

    - by Pierre Olivier Martel
    I had an argument with a colleague about the best way to assign a variable in an if..else block. His orignal code was : @products = if params[:category] Category.find(params[:category]).products else Product.all end I rewrote it this way : if params[:category] @products = Category.find(params[:category]).products else @products = Product.all end This could also be rewritten with a one-liner using a ternery operator (? :) but let's pretend that product assignment was longer than a 100 character and couldn't fit in one line. Which of the two is clearer to you? The first solution takes a little less space but I thought that declaring a variable and assigning it three lines after can be more error prone. I also like to see my if and else aligned, makes it easier for my brain to parse it!

    Read the article

  • What is your most productive shortcut with Vim?

    - by Olivier Pons
    I've heard a lot about Vim, both pros and cons. It really seems you should be (as a developer) faster with Vim than with any other editor. I'm using Vim to do some basic stuff and I'm at best 10 times less productive with Vim. The only two things you should care about when you talk about speed (you may not care enough about them, but you should) are: Using alternatively left and right hands is the fastest way to use the keyboard. Never touching the mouse is the second way to be as fast as possible. It takes ages for you to move your hand, grab the mouse, move it, and bring it back to the keyboard (and you often have to look at the keyboard to be sure you returned your hand properly to the right place) Here are two examples demonstrating why I'm far less productive with Vim. Copy/Cut & paste. I do it all the time. With all the classical editors you press Shift with the left hand, and you move the cursor with your right hand to select text. Then Ctrl+C copies, you move the cursor and Ctrl+V pastes. With Vim it's horrible: yy to copy one line (you almost never want the whole line!) [number xx]yy to copy xx lines into the buffer. But you never know exactly if you've selected what you wanted. I often have to do [number xx]dd then u to undo! Another example? Search & replace. In PSPad: Ctrl+f then type what you want you search for, then press Enter. In Vim: /, then type what you want to search for, then if there are some special characters put \ before each special character, then press Enter. And everything with Vim is like that: it seems I don't know how to handle it the right way. NB : I've already read the Vim cheat sheet :) My question is: What is the way you use Vim that makes you more productive than with a classical editor?

    Read the article

  • Problem adding UIBarButtonItems to a ToolBar

    - by Olivier de Jonge
    I have a UINavigationController with a UITableViewController in it. I want to show a ToolBar on the bottom with UIBarButtonItem's. The ToolBar is showing up, but the buttons won't appear. Anyone knows why? - (void)viewDidLoad { [super viewDidLoad]; [[self navigationItem] setTitle:@"Selections List"]; [[self navigationItem] setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addProjectSearch:)] autorelease]]; [[self navigationItem] setLeftBarButtonItem:[self editButtonItem]]; [[super tableView] setDataSource: self]; [[super tableView] setDelegate: self]; //Toolbar UIBarButtonItem * logoutButton = [[[UIBarButtonItem alloc] initWithTitle:@"Log out" style:UIBarButtonItemStylePlain target:self action:@selector(logOut:)]autorelease]; NSMutableArray * arr = [NSMutableArray arrayWithObjects:logoutButton, nil]; [[self navigationController] setToolbarHidden: NO animated:YES]; [[self navigationController] setToolbarItems:arr animated:YES]; }

    Read the article

  • git rebase without changing commit timestamps

    - by Olivier
    Would it make sense to perform git rebase while preserving the commit timestamps? I believe a consequence would be that the new branch will not necessarily have commit dates chronologically. Is that theoretically possible at all? (e.g. using plumbing commands; just curious here) If it is theoretically possible, then is it possible in practice with rebase, not to change the timestamps? For example, assume I have the following tree: master <jun 2010> | : : : oldbranch <feb 1984> : / oldcommit <jan 1984> Now, if I rebase oldbranch on master, the date of the commit changes from feb 1984 to jun 2010. Is it possible to change that behaviour so that the commit timestamp is not changed? In the end I would thus obtain: oldbranch <feb 1984> / master <jun 2010> | : Would that make sense at all? Is it even allowed in git to have a history where an old commit has a more recent commit as a parent? Edit A crucial question of Von C helped me understand what is going on: when your rebase, the committer's timestamp changes, but not the author's timestamp, which suddenly all makes sense. So my question was actually not precise enough. The answer is that rebase actually doesn't change the author's timestamps (you don't need to do anything for that), which suits me perfectly.

    Read the article

  • [R] How to create a data.frame with a unknow number of columns ?

    - by Olivier
    Hello I would like to create, in a function, a boucle to create a data.frame with a variable number of columns. WIth something like : a = c("a","b") b = c(list(1,2,3), list(4,5,6)) data.frame(a,b) I would like to get a data-frame like : a 1 2 3 b 4 5 6 Instead of I obtain : a 1 2 3 4 5 6 b 1 2 3 4 5 6 Thank you ! PS : I also try with rbind, but it's doesn't work...

    Read the article

  • How to write backwards compatible HTML5 ?

    - by Olivier Lalonde
    I'd like to start using HTML5's basic features, but at the same time, keep my code backwards compatible with older browsers (graceful degradation). For instance, I'd like to use the cool CSS3 properties for making rounded corners. Is there any available tutorial for writing gracefully degradable HTML5 ? Additionally, what browsers should I support so that my app. is functional for at least 95% of visitors? What are the ways to test those browsers painlessly ?

    Read the article

  • Split string with zsh as in Python

    - by Olivier
    In python: s = '1::3' a = s.split(':') print a[0] # '1' good print a[1] # '' good print a[2] # '3' good How can I achieve the same effect with zsh? The following attempt fails: s="1::3" a=(${(s/:/)s}) echo $a[1] # 1 echo $a[2] # 3 ?? I want an empty string, as in Python

    Read the article

  • Web programming: Apache modules: mod_python vs mod_php

    - by Olivier Pons
    Hi! I've been using for more than 12 years PHP with Apache (a.k.a mod_php) for my web development work. I've recenlty discovered python and its real power (I still don't understand why this is not always the best product that becomes the most famous). I've just discovered mod_python for Apache. I've already googled but without success things like mod_python vs mod_php. I wanted to know the differences between the two mod_php and mod_python in terms of: speed productivity maintainance (I know `python is most productive and maintainable language in the world, but is it the same for Web programming with Apache) availability of features e.g, cookies and session handling, databases, protocols, etc.

    Read the article

  • How to activate Mac OS X application with a given process ID?

    - by Olivier
    I know the process id of an application in Mac OS X. How can I switch to it (using applescript, or python, or whatever)? By "switch", I mean, put in focus. The usual solution is to use the applescript code tell application "Foo" activate, but here the name is not useful because I have many instances of the same application running. I am however able to get the process id of the application. How can I switch to this application programmatically?

    Read the article

  • Is it possible to have WAMP run httpd.exe as user [myself] instead of local SYSTEM?

    - by Olivier H
    Hello! I run a django application over apache with mod_wsgi, using WAMP. A certain URL allows me to stream the content of image files, the paths of which are stored in database. The files can be located whether on local machine or under network drive (\my\network\folder). With the development server (manage.py runserver), I have no trouble at all reading and streaming the files. With WAMP, and with network drive files, I get a IOError : obviously because the httpd instance does not have read permission on said drive. In the task manager, I see that httpd.exe is run by SYSTEM. I would like to tell WAMP to run the server as [myself] as I have read and write permissions on the shared folder. (eventually, the production server should be run by a 'www-admin' user having the permissions) Mapping the network shared folder on a drive letter (Z: for instance) does not solve this at all. The User/Group directives in httpd.conf do not seem to have any kind of influence on Apache's behaviour. I've also regedited : I tried to duplicate the HKLM[...]\wampapache registry key under HK_CURRENT_USER\ and rename the original key, but then the new key does not seem to be found when I cmd this > httpd.exe -n wampapache -k start or when I run WAMP. I've run out of ideas :) Has anybody ever had the same issue?

    Read the article

  • Can't find the error in my javascript code

    - by Olivier
    This js program should display the first 100 prime numbers, but instead it crashes each and every time and I can't find the error! Could someone point me towards the best way to debug js code?! Thank you! // initialisation of the array p holding the first 100 prime numbers var p = []; // set the first prime number to 2 p.push(2); // find the first 100 prime numbers and place them in the array p var i = 3; while (p.length < 100) { var prime = true; loop: for (var item in p){ if (i%item === 0){ prime = false; break loop; } } if (prime) p.push(i); i = i + 2; } // display the first 100 prime numbers found var i=1; for (var item in p){ document.writeln(i,item); i++; }

    Read the article

  • Find most right and left point of a horizontal circle in 3d Vector environment

    - by Olivier de Jonge
    I'm drawing a 3D pie chart that is rendered with in 3D vectors, projected to 2D vectors and then drawn on a Graphics object. I want to calculate the most left and right point of the circle The method to create a vector, draw and project to a 2d vector are below. Anyone knows the answer? public class Vector3d { public var x:Number; public var y:Number; public var z:Number; //the angle that the 3D is viewed in tele or wide angle. public static var viewDist:Number = 700; function Vector3d(x:Number, y:Number, z:Number){ this.x = x; this.y = y; this.z = z; } public function project2DNew():Vector { var p:Number = getPerspective(); return new Vector(p * x, p * y); } public function getPerspective():Number{ return viewDist / (this.z + viewDist); } }

    Read the article

< Previous Page | 1 2 3 4  | Next Page >