Daily Archives

Articles indexed Sunday May 2 2010

Page 7/69 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to save search, choose a recent search and then populate the form using jQuery and/or asp.net

    - by user187870
    I want to do something similar to what priceline does. It saves the recent searches in a dropdown menu. When you pick one from the recent search. The form will be populated accordingly. (See screen shot http://yfrog.com/5fscreenshot20100501at105p) This is what I am thinking. (1) Save the searches into an array in a cookie (2), when a recent search item is chosen, retrive the corresponding array element from the cookie and then populate the form. What do you think is the best way to implement this? I especially want to know how to save the form entries into the cookie and how to populate the form.

    Read the article

  • Android - Simulate Home click

    - by kape123
    I know calling finish() in activity will produce same result as if user clicked on Back button; is there a similar thing for Home button? (would like to automatically show Home screen after certain action) Thanks!

    Read the article

  • Tool to recursively search all files in a directory for a string [closed]

    - by routeNpingme
    Possible Duplicate: Tools to search for strings inside files without indexing Before I make one, any good tools out there for free/cheap that will recurse through all files in a directory and search for a text string in them? Need to find an instance of a string in any configuration files laying around. Kind of like a Windows Search "find files that contain..." on steroids? Oops - This is pretty much a duplicate question, sorry, didn't find the other one before

    Read the article

  • Get Members of Band

    - by user168083
    If I look at the Freebase page for the band '311', I see Chad Sexton listed. http://www.freebase.com/view/en/311 I am trying to query for the members of a band : { "name" : "311", "/music/artist/album" : [{"name":null, "id":null, "optional": true}], "type|=" : ["/music/artist","/music/musical_group"], "/award/award_winner/awards_won" : ["award":null, "optional" => true], "/award/award_nominated_work/award_nominations" : ["award":null, "optional" => true], "/music/artist/supporting_artists":[{}] } I thought supporting_artists would return the band member names, but the array is always empty. But if I query for all properties related to Chad Sexton, I don't see 311 mentioned. But he is listed as member on the Freebase web info page (which is correct). { "*": null, "name": "Chad Sexton", "type": "/music/artist" } How can I grab the band member names along with the band info?

    Read the article

  • R: how can I concatenate a list?

    - by John
    I'm trying to produce a single variable which is a concatenation of two chars e.g to go from "p30s4" "p28s4" to "p30s4 p28s4". I've tried cat and paste as shown below. Both return empty variables. What am I doing wrong? > blah = c("p30s4","p28s4") > blah [1] "p30s4" "p28s4" > foo = cat(blah) p30s4 p28s4 > foo NULL > foo = paste(cat(blah)) p30s4 p28s4 > foo character(0)

    Read the article

  • Can this rectangle to rectangle intersection code still work?

    - by Jeremy Rudd
    I was looking for a fast performing code to test if 2 rectangles are intersecting. A search on the internet came up with this one-liner (WOOT!), but I don't understand how to write it in Javascript, it seems to be written in an ancient form of C++. Can this thing still work? Can you make it work? struct { LONG left; LONG top; LONG right; LONG bottom; } RECT; bool IntersectRect(const RECT * r1, const RECT * r2) { return ! ( r2->left > r1->right || r2->right left || r2->top > r1->bottom || r2->bottom top ); }

    Read the article

  • What are the benefits of learning a new language, as a game developer?

    - by Keand64
    I'm an independant game developer/designer, and I'm wondering what specific benefits are there to learning a new programming language. I do my programming in C++ currently, and I want to know if there are any tangible benefits to learning a different language, as in, benefits to writing a game x in language y versus game w in language z? Basically, I understand that learning a new programming language will help me think about a problem in different ways, but what are some actual benefits to using one language over another in specific scenarios?

    Read the article

  • Listing time every second as a Bash script

    - by Caleb
    Hello all, first time here as I've finally started to learn programming. Anyway, I'm just trying to print the time in nanoseconds every second here, and I have this: #!/usr/bin/env bash while true; do date=(date +%N) ; echo $date ; sleep 1 ; done Now, that simply yields a string of date's, which isn't what I want. My learning has been rather messy, so I hope you'll excuse me for this if it's really simple. Also, I did manage to fine this, that worked on the prompt: while true ; do date +%N ; sleep 1 ; done But that obviously doesn't work as a script.

    Read the article

  • Screenshot from WPF application as SVG / vector graphic?

    - by stefan.at.wpf
    Hello, is it possible to create a screenshot of a WPF application as SVG / is there some WPF built-in function to get the XAML code for the current drawn window that then can be converted to SVG? I need some screenshots for documenting a WPF application and I'd like them to be zoomable like a WPF program is using e.g. Snoop or Vista Magnifyer. Thanks for any hint!

    Read the article

  • Hibernating and booting into another OS: will my filesystems be corrupted?

    - by Ryan Thompson
    Suppose I have Windows and Linux installed on the same computer. If I hibernate Windows, can I boot into Linux without corrupting the Windows filesystem when I resume Windows? What about the other way around? What if I hibernate one, boot into the other, and mount the hibernated filesystem read/write? Read-only? If this is unsafe, is there any way to detect the hibernated state of the other OS and prevent mounting its filesystem? Basically, how far can I push this before it breaks, and how dangerous is it near the edge? I think I know the answers to some of the above questions, but for other ones, I have no idea, and for obvious reasons I have not tested this on my own computer. If someone has tested these, please enlighten the rest of us. I'm not necessarily looking for a specific answer to every question; I'll accept any response that answers a reasonable portion. EDIT: Let me clarify that when I say "hibernate," I mean the process of writing the contents of RAM to the hard disk and completely powering down the computer. In this state, powering the computer back on brings you through the BIOS and bootloader again, and you could theoretically select another operating system on a multi-boot system. Anyway, on with the original question: RESULTS Ok, after everyone's assurances that this would work, I tested it for myself. I set up Ubuntu to remount all ntfs filesystems and external drives read-only before hibernating. There was no need for a similar Windows setup because Windows does not read Linux filesystems. Then, I tried alternately hibernating one operating system and resuming the other, back and forth a few times. I even tried mounting the Windows filesystem from Ubuntu read-write, and creating a few files. Windows didn't complain when I resumed. So, in conclusion, you can more or less freely hibernate in a dual-boot Windows/Linux scenario. Note that I did not test a dual Linux/Linux co-hibernation situation. If you have two or more Linux installs and you hibernate one of them, you might be able to corrupt the filesystem by mounting it from another.

    Read the article

  • Parallel For Loop - Problems when adding to a List - Possible .Net Bugs

    - by Kevin Crowell
    I am having some issues involving Parallel for loops and adding to a List. The problem is, the same code may generate different output at different times. I have set up some test code below. In this code, I create a List of 10,000 int values. 1/10th of the values will be 0, 1/10th of the values will be 1, all the way up to 1/10th of the values being 9. After setting up this List, I setup a Parallel for loop that iterates through the list. If the current number is 0, I add a value to a new List. After the Parallel for loop completes, I output the size of the list. The size should always be 1,000. Most of the time, the correct answer is given. However, I have seen 3 possible incorrect outcomes occur: The size of the list is less than 1,000 An IndexOutOfRangeException occurs @ doubleList.Add(0.0); An ArgumentException occurs @ doubleList.Add(0.0); The message for the ArgumentException given was: Destination array was not long enough. Check destIndex and length, and the array's lower bounds. What could be causing the errors? Is this a .Net bug? Is there something I can do to prevent this from happening? Please try the code for yourself. If you do not get an error, try it a few times. Please also note that you probably will not see any errors using a single-core machine. using System; using System.Collections.Generic; using System.Threading.Tasks; namespace ParallelTest { class Program { static void Main(string[] args) { List<int> intList = new List<int>(); List<double> doubleList = new List<double>(); for (int i = 0; i < 250; i++) { intList.Clear(); doubleList.Clear(); for (int j = 0; j < 10000; j++) { intList.Add(j % 10); } Parallel.For(0, intList.Count, j => { if (intList[j] == 0) { doubleList.Add(0.0); } }); if (doubleList.Count != 1000) { Console.WriteLine("On iteration " + i + ": List size = " + doubleList.Count); } } Console.WriteLine("\nPress any key to exit."); Console.ReadKey(); } } }

    Read the article

  • What's static function for in c?

    - by user198729
    I only see static methods by which we don't need to instantiate a class to call the method. What's the purpose of a static function? static GtkWidget * create_bbox (gint horizontal, char *title, gint spacing, gint layout) { ... }

    Read the article

  • What is the best way of doing this?

    - by NewSOuser
    Hey, I am wondering how exactly the below pagination systems are set up? In terms of the how the data is displayed, for instance, does BuySellAds load all results in from database and then paginate that data so filter can be done easier? or, do they call the database every time a new page is loaded and then grab the info and display it? I really would like to know how both BuySellAds and Nike make their pagination systems, since I have to make a similar system that has many filters and options to easily sort through the data from a database. I want to accomplish this with php and jquery if that's what I even need to use. Here is what I am talking about so you can experience it for yourself: BuySellAds store.nike.com Any info/suggestions would be great. Thanks for your input.

    Read the article

  • Microsoft Test Manager from Visual Studio 2010 Ultimate

    - by LeeHull
    Anyone know the OS requirements for this? The actual System Requirements mention Windows 7 but after spending the time installing and configuring and finally get it up and running, went to the Testing Center and I get this message. "The Test Management features are not supported on Windows Home Premium." I now have to upgrade my Windows but I want to be sure what version is required

    Read the article

  • Fast rectangle to rectangle intersection

    - by Jeremy Rudd
    What's a fast way to test if 2 rectangles are intersecting? A search on the internet came up with this one-liner (WOOT!), but I don't understand how to write it in Javascript, it seems to be written in an ancient form of C++. struct { LONG left; LONG top; LONG right; LONG bottom; } RECT; bool IntersectRect(const RECT * r1, const RECT * r2) { return ! ( r2->left > r1->right || r2->right left || r2->top > r1->bottom || r2->bottom top ); }

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >