Search Results

Search found 414 results on 17 pages for 'olivier lance'.

Page 10/17 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • 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

  • DELETE from two tables with one OUTPUT clause?

    - by lance
    This deletes the document from the Document table and outputs information about the deleted document into the FinishedDocument table. DELETE FROM Document OUTPUT Deleted.DocumentId , Deleted.DocumentDescription INTO FinishedDocument WHERE DocumentId = @DocumentId I need to delete the document not just from the Document table, but also from the DocumentBackup table. Meanwhile, I need to maintain insertion into FinishedDocument. Is all of this possible with only one statement? If not, is a second DELETE (against DocumentBackup), with all of it wrapped in a transaction, the way to go?

    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

  • Facebook graph API post to user's wall

    - by Lance
    I'm using the FB graph api to post content to the user's wall. I orginally tried using this method: $wall_post = array(array('message' => 'predicted the', 'name' => 'predicted the'), array('message' => $winning_team, 'name' => $winning_team, 'link' => 'http://www.sportannica.com/teams.php?team='.$winning_team.'&amp;year=2012'), array('message' => 'to beat the', 'name' => 'to beat the',), array('message' => $losing_team, 'name' => $losing_team, 'link' => 'http://www.sportannica.com/teams.php?team='.$losing_team.'&amp;year=2012'), array('message' => 'on '.$game_date.'', 'name' => 'on '.$game_date.''), array('picture' => 'http://www.sportannica.com/img/team_icons/current_season_logos/large/'.$winning_team.'.png')); $res = $facebook->api('/me/feed/', 'post', '$wall_post'); But, much to my surprise, you can't post multiple links to a users wall. So, now I'm using the graph api to post content to a user's wall much like the way spotify does. So, now I've figured out that I need to create custom actions and objects with the open graph dashboard. So, I've created the "predict" action and gave it permission to edit the object "game." So, now I have the code: $facebook = new Facebook(array( 'appId' => 'appID', 'secret' => 'SECRET', 'cookie' => true )); $access_token = $facebook->getAccessToken(); $user = $facebook->getUser(); if($user != 0) { curl -F 'access_token='$.access_token.'' \ -F 'away_team=New York Yankees' \ -F 'home_team=New York Mets' \ -F 'match=http://samples.ogp.me/413385652011237' \ 'https://graph.facebook.com/me/predict-edit-add:predict' } I keep getting an error reading: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING Any ideas?

    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

  • JavaScript function pass-through?

    - by Lance May
    I'm not sure if this is doable, but I would like to be able to set a jQuery UI event as a function (directly), as opposed to continuing to wrap in additional function(event, ui) { ... } wrappers. Hopefully you can see what I'm going for from the example below. Here is what I would like: $("#auto").autocomplete({ source: "somepage.php", select: dropdownSelect, minLength: 0 }); Now I would think that the above would work, since I'm simply trying to say "continue firing this event, just over to that function". Unfortunately, that will not work, and I'm ending up with this: (and for some reason, a disconnect from all data) $("#auto").autocomplete({ source: "somepage.php", select: function(event, ui) { dropdownSelect(event, ui) }, minLength: 0 }); Thanks much in advance.

    Read the article

  • Quick example of multi-column results with jQueryUI's new Autocomplete?

    - by Lance May
    I just found out that the jQueryUI now has it's own built-in auto-complete combo box. Great news! Unfortunately, the next thing I found is that making it multi-column doesn't seem nearly that simple (at least via documentation). There is a post here where someone mentions that they've done it (and even gives code), but I'm having trouble understanding what some of their code is doing. I'm just curious if anyone has ran across this before and could post a quick and easy sample of making a multi-column result set. Thanks much in advance.

    Read the article

  • Transcoding audio and video

    - by Lance Fisher
    What is the best way to transcode audio and video to show on the web? I need to do it programmatically. I'd like to do something like YouTube or Google Video where users can upload whatever format they want, and I encode it to flv, mp3, and/or mp4. I could do it on our server, but I would rather use an EC2 instance or even a web service. We have a Windows 2008 server.

    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

  • 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

  • SRP & "axis of change"?

    - by lance
    I'm reading Bob Martin's principles of OOD, specifically the SRP text, and I understand the spirit of what it's saying pretty well, but I don't quite understand a particular phrasing, from page 2 of the link (page 150 of the book): I paraphrase: It is important to separate these two responsibilities into separate classes because each responsibility is an axis of change. What exactly is meant here by "axis of change"?

    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

  • 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

  • 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

  • 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 determine Windows Java installation location

    - by Lance May
    I'm trying to dynamically run a .jar from a C# assembly (using Process.Start(info)). Now, from a console application I am able to just run: ProcessStartInfo info = new ProcessStartInfo("java", "-jar somerandom.jar"); In an assembly, however, I keep getting a Win32Exception of "The system cannot find the file specified" and have to change the line to the full path of Java like so: ProcessStartInfo info = new ProcessStartInfo("C:\\Program Files\\Java\\jre6\\bin\\java.exe", "-jar somerandom.jar"); This obviously won't do. I need a way to dynamically (but declaratively) determine the installed location of Java. I started thinking of looking to the registry, but when I go there I noticed that there were specific keys for the versions and that they could not even be guaranteed to be numeric (e.g. "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6" and "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6.0_20"). What would be the most reliable "long-haul" solution to finding the most up-to-date java.exe path from a C# application? Thanks much in advance.

    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

  • How to have type hinting in PHP that specifies variable scope inside of a template? (specifically PhpStorm)

    - by Lance Rushing
    I'm looking for a doc comment that would define the scope/context of the current php template. (similar to @var) Example View Class: <?php class ExampleView { protected $pageTitle; public function __construct($title) { $this->pageTitle = $title; } public function render() { require_once 'template.php'; } } -- <?php // template.php /** @var $this ExampleView */ echo $this->pageTitle; PHPStorm gives an inspection error because the access on $pageTitle is protected. Is there a hint to give scope? Something like: <?php // template.php /** @scope ExampleView */ // <---???? /** @var $this ExampleView */ echo $this->pageTitle;

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >