Search Results

Search found 463 results on 19 pages for 'lance robinson'.

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

  • 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

  • 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

  • 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

  • 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

  • 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 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

  • Multiple arrangements/asserts per unit test?

    - by lance
    A group of us (.NET developers) are talking unit testing. Not any one framework (we've hit on MSpec, NUint, MSTest, RhinoMocks, TypeMock, etc) -- we're just talking generally. We see lots of syntax that forces a distinct unit test per scenario, but we don't see an avenue to re-using one unit test with various inputs or scenarios. Also, we don't see an avenue to multiple asserts in a given test without an early assert's failure threatening the testing of later asserts (in the same test). Is there anything like that happening in .NET unit testing (state- or behavior-based) today?

    Read the article

  • How to quantify your "slow" development machine?

    - by lance
    ( Please provide the question this one duplicates. I'm disappointed I couldn't find it. ) My development machine is "slow". I wait on it "a lot". I've been asked by decision makers who want to help to fairly and accurately measure that time. How do you quantify the amount of time you spend waiting on the computer (during compiles, waiting for apps to open every day, etc). Is there software which effectively reports on this sort of thing? Is there an OS metric (I/O something something, pagefile swapping frequency, etc, etc) that captures and communicates this particularly well? Some sort of benchmark you'd recommend me testing against?

    Read the article

  • Referencing the current jQuery object in a chain?

    - by Lance McNearney
    At DevDays in SF last year (before jQuery 1.4 was released), I thought they mentioned an upcoming feature in 1.4 that would allow you to reference the current jQuery object while in a chain. I've read through all of the 1.4 improvements and wasn't able to find it. Does anyone know how this can be done? Example Being able to access the current jQuery object would be helpful when working with methods that are in relation to the current object like .next(): // Current way var items = $(this).closest('tr'); items = items.add(items.next(':not([id])')); // Magical 1.4 way? Is there a "chain"-like object? var items = $(this).closest('tr') .add(chain.next(':not([id])'));

    Read the article

  • Output columns not in destination table?

    - by lance
    SUMMARY: I need to use an OUTPUT clause on an INSERT statement to return columns which don't exist on the table into which I'm inserting. If I can avoid it, I don't want to add columns to the table to which I'm inserting. DETAILS: My FinishedDocument table has only one column. This is the table into which I'm inserting. FinishedDocument -- DocumentID My Document table has two columns. This is the table from which I need to return data. Document -- DocumentID -- Description The following inserts one row into FinishedDocument. Its OUTPUT clause returns the DocumentID which was inserted. This works, but it doesn't give me the Description of the inserted document. INSERT INTO FinishedDocument OUTPUT INSERTED.DocumentID SELECT DocumentID FROM Document WHERE DocumentID = @DocumentID I need to return from the Document table both the DocumentID and the Description of the matching document from the INSERT. What syntax do I need to pull this off? I'm thinking it's possible only with the one INSERT statement, by tweaking the OUTPUT clause (in a way I clearly don't understand)? Is there a smarter way that doesn't resemble the path I'm going down here? EDIT: SQL Server 2005

    Read the article

  • Is it possible to use RedirectToAction() inside a custom AuthorizeAttribute class?

    - by Lance McNearney
    Using ASP.Net MVC 2, is there any way to use the RedirectToAction() method of the Controller class inside a class that is based on the AuthorizeAttribute class? public class CustomAttribute : AuthorizeAttribute { protected override bool AuthorizeCore(HttpContextBase context) { // Custom authentication goes here return false; } public override void OnAuthorization(AuthorizationContext context) { base.OnAuthorization(context); // This would be my ideal result context.Result = RedirectToAction("Action", "Controller"); } } I'm looking for a way to re-direct the user to a specific controller / action when they fail the authentication instead of returning them to the login page. Is it possible to have the re-direct URL generated for that controller / action and then use RedirectResult()? I'm trying to avoid the temptation to just hard-code the URL.

    Read the article

  • Haskell UI framework?

    - by Lance May
    Is there, by chance, and emerging Haskell UI framework for Windows? I recently took up looking over the language, and from what I see, it would be great little "one-off" applications (elaborate scripts). However, without a good UI framework I can't see it getting in under the smoke and mirrors of the more obvious contenders. I've read that there are many frameworks, but none are full-featured. I'm just wondering if this is something that's on the rise, or is it simply too difficult to get enough developers going in the same direction with one?

    Read the article

  • Open x64 'SOFTWARE' registry key in C#

    - by Lance May
    I am trying to read the 64-bit HKLM\SOFTWARE registry key from a 32-bit (C#) application. This, of course, keeps redirecting my view to HKLM\SOFTWARE\Wow6432Node. According to what I've found this is doable, but I can't seem to find a .NET example anywhere. I just need to read; not write. Anyone ran across this before?

    Read the article

  • Open x86 'SOFTWARE' registry key on an x64 machine in C#

    - by Lance May
    I am trying to read the 32-bit HKLM\SOFTWARE registry key from a 64-bit (C#) application. This, of course, keeps redirecting my view to HKLM\SOFTWARE\Wow6432Node. According to what I've found this is doable, but I can't seem to find a .NET example anywhere. I just need to read; not write. Anyone ran across this before?

    Read the article

  • file_get_contents not displaying any data

    - by Lance
    I'm doing $info = file_get_contents('http://USERNAME:[email protected]/v2/sales?client_key=CLIENT_KEY'); $info returns nothing. However, when I put the URL into my browser, JSON appears. I tried using cURL without any luck. $data = array('client_key' => 'CLIENT_KEY'); $link = "http://api.appfigures.com/v2/sales"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $link); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, count($data)); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($ch, CURLOPT_USERPWD, "username:password"); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $jsonData = curl_exec($ch); curl_close($ch); print_r($jsonData); Thanks

    Read the article

  • if there are multiple kernel module can drive the same device, what is the rule to choose from them?

    - by Dyno Fu
    both pcnet32 and vmxnet can drive the device. $ lspci -k ... 02:01.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10) Subsystem: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] Flags: bus master, medium devsel, latency 64, IRQ 19 I/O ports at 2000 [size=128] [virtual] Expansion ROM at dc400000 [disabled] [size=64K] Kernel driver in use: vmxnet Kernel modules: vmxnet, pcnet32 both kernel modules are loaded, $ lsmod | grep net pcnet32 32644 0 vmxnet 17696 0 mii 5212 1 pcnet32 as you see, kernel driver in use is vmxnet. is there any policy/algorithm in kernel how to choose from the candidates?

    Read the article

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