Search Results

Search found 3286 results on 132 pages for 'piece'.

Page 39/132 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Ordered hash in JavaScript

    - by hekevintran
    JavaScript objects have no order stored for properties (according to the spec). Firefox seems preserve the order of definition of properties when using a for...in loop. Is this behaviour something that I can rely on? If not is there a piece of JavaScript code somewhere that implements an ordered hash type?

    Read the article

  • Javascript methods, classes and events

    - by Randy Gurment
    Hi, how should I document this piece of code: // Is this class? colors = { // Is this method? "red" : function() { // Do something... } // Still method? "black" : { // So what is this? "black-1" : function() { /* Do something */ } } } I am using YUI Doc. These tags are available @module @class @method @event @property

    Read the article

  • Help me choose between XML or SQL Lite on android

    - by Ngetha
    I have an android app that periodically, say once a week downloads content from a server in XML. The content is used by the app, different Acitivities use different parts of the content. My question is a design one, should I save the data in SQlite or just keep it as an XML file, which one would be faster to read? The app can only use one content piece at a time, which means subsequent XML content downloads replace the old one.

    Read the article

  • What event should I handle to execute code when WinForms application switches from Run mode to Desig

    - by dotnetuser
    I am running a Windows form application and I need to execute a piece of code when I switch to design mode. I have a handler for the OnEnterDesignMode debugger event and this gets hit if I am debugging the application and then switch to design mode. However, this does not get hit if I initially start without debugging and then switch to design mode. What event do I need to handle in order that certain code is executed when switching from Run mode to Design mode?

    Read the article

  • Check if a pointer points to allocated memory on the heap.

    - by Ugo
    Ok, I know this question seems to have been asked many times on stackoverflow. but please read Well the answer for any address is "No you can't" but the question here is to know if a pointer points to a piece of memory allocated with malloc/new. Actually I think it could be easily implemented overriding malloc/free and keeping track of allocated memory ranges. Do you know a memory management library providing this specific tool ?

    Read the article

  • Binding with custom text in WPF

    - by nihi_l_ist
    Can i write something like this in WPF(i know that this piece of code is wrong, but need to know if there is kind of this construct): <TextBlock Height="50" Text="Test: {Binding Path=MODULE_GUID}" /> Or always to add some text to binding value i must do something like this: <StackPanel Orientation="Horizontal"> <TextBlock Height="50" Text="Test: " /> <TextBlock Height="50" Text="{Binding Path=MODULE_GUID}" /> </StackPanel>

    Read the article

  • C++ operator[ ] on integer litteral

    - by gregseth
    I found this piece of code: char a = 1["ABC"]; A few quick test led me to the fact it was the same than writing: char a = "ABC"[1]; Which seems far more logical to me. So my questions: Why is this notation valid? Is there any reason to write something that way?

    Read the article

  • Does the for foreach construct in java create a hard or soft copy?

    - by Doug
    Say I have the following piece of java code ArrayList<Double> myList = new Double[100]; for (Double x : myList) x = randomDouble(); Does this actually modify myList or just the dummy variable? I realize I should just try this code segment out, but I think this is the sort of thing I should be able to google or search for on this site, and several queries so far have turned up nothing useful.

    Read the article

  • How to override the focus on page in greasmonkey

    - by nimo
    After the page has loaded a piece of javascript set focus on window and on a specific input field. I want to prevent this focus on the input field how can I do that with javascript in greasemonkey? Maybe this is not possible because greasemonkey don't execute the code until the entire page has loaded? Then let's say I can run my code at any time how can I prevent the focusing?

    Read the article

  • Licensing and commercial use

    - by Avoid Trouble
    I found a really cool piece of software under the AGPL license. I haven't heard of this before, so excuse the ignorance... But is it legal for me to simply bundle and use this product directly within my app (no modification) and resell for commercial use? Speaking of which, is there a simple table available that shows the implication of each open source license and whether or not it can be used by closed source, for-profit, $$$ type software?

    Read the article

  • PHP : apc_store doesn't work as intended

    - by Industrial
    Hi everyone, I have started to try APC to store some specific data on each webserver as an complement to memcached. However, the following code piece is giving me headaches: echo apc_store('key', 'value'); echo apc_store('key', 'newvalue'); echo apc_fetch('key'); Result: value Why is apc_store not working as properly?

    Read the article

  • How to copy a ram_base file to disk efficiently

    - by Hui Jin
    I want to copy a large a ram-based file (located at /dev/shm direcotry) to local disk, is there some way for an efficient copy instead of read char one by one or create another piece memory? I can use only C language here. Is there anyway that I can put the memory file directly to disk? Thanks!

    Read the article

  • How to access Hudson CI from a mobile device like the iPhone or iPad ?

    - by user323771
    Hi Everybody, I really like Hudson CI and I do think it is the most useful and effective piece of software ever made for the Agile Application Lifecycle :-) Anyway if the CI become unstable, the development is going to be really compromised, so keeping an eye on it is CRUCIAL ! Does anybody know about an effective solution for always monitoring it while you are "on the road" ? (maybe using your iPhone or iPod)

    Read the article

  • regex in python, can this be improved upon?

    - by tipu
    I have this piece of code that finds words that begin with @ or #, p = re.findall(r'@\w+|#\w+', str) Now what irks me about this is repeating \w+. I am sure there is a way to do something like p = re.findall(r'(@|#)\w+', str) That will produce the same result but it doesn't, it instead returns only # and @. How can that regex be changed so that I am not repeating the \w+? This code comes close, p = re.findall(r'((@|#)\w+)', str) But it returns [('@many', '@'), ('@this', '@'), ('#tweet', '#')] (notice the extra '@', '@', and '#'.

    Read the article

  • How to generate random html document

    - by karramba
    I'd like to generate completely random piece of html source, possibly from a grammar. I want to do this in python but I'm not sure how to proceed -- is there a library that takes a grammar and just randomly follows its rules, printing the path? Ideas?

    Read the article

  • JSF Data transfer between UI to Business Layers

    - by Ram
    Hi, We are using JSF in UI,Spring in Business Layer,Hibernate in Persistance layer.Now my question is how to pass data from my JSF1.1_01 UI to spring Business Layer.Can I directly used my Business object in my Backed Bean or through DTO should I transfer data between the layer? Can one explain me with clear explanation if possible with piece of code and that related websites?

    Read the article

  • Which browsers support html5 offline storage?

    - by Marcin
    Essentially, I wanted to run a piece of demo code from W3c Offline Webapps page. It looks like that: var db = window.openDatabase("notes", "", "The Example Notes App!", 1048576); Firefox 3.5, IE8 and Chrome do not seem to get it. Is there anybody out there that actually wrote support for that? Or is this wishful thinking about 'the standard of the future'?

    Read the article

  • SE friendly URLs appache code snippets

    - by Dan
    I want example.com/23-45 be transformed to example.com?id=23-45 Could you please post the code I should add to .htaccess file to make this work (Is this everything I should do to make this work - add a piece of code to .htaccess file ???) Thanks a lot!

    Read the article

  • avoid NullPointerException at the first cycle

    - by user1508419
    I have this piece of code: EventSnapshot snapshotEvent = new EventSnapshot(); EventSnapshot currentEvent = new EventSnapshot(); do { ... currentEvent.setContent(in_stats); ... if(!snapshotEvent.equals(currentEvent)) snapshotEvent.setContent(in_stats); } while(true); At the first cycle I get a NullPointerException because obviously the object snapshotEvent is empty. At the second cycle this doesn't happen.how can avoid this problem?

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >