Search Results

Search found 6928 results on 278 pages for 'calling'.

Page 102/278 | < Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >

  • Is possible to initialize an object in javascript in this way?

    - by Kucebe
    I'd like to initialize an object in javascript calling directly a method that belongs to it: var obj = (function(){ return{ init: function(){ console.log("initialized!"); }, uninit: function(x){ console.log("uninitialized!"); } }; }).init(); //later obj.uninit(); obj.init(); This specific example doesn't work, is there something similar?

    Read the article

  • Play an AudioBufferSourceNode twice?

    - by alltom
    Should I be able to use the same AudioBufferSourceNode to play a sound multiple times? For some reason, calling noteGrainOn a second time doesn't play audio, even with an intervening noteOff. This code only plays the sound once: var node = audioContext.createBufferSource() node.buffer = audioBuffer node.connect(audioContext.destination) var now = audioContext.currentTime node.noteGrainOn(now, 0, 2) node.noteOff(now + 2) node.noteGrainOn(now + 3, 0, 2) node.noteOff(now + 5)

    Read the article

  • include link list depending on category

    - by user117701
    I want to display the linklist widget only on a certain category. The current way the sidebar is fetched is: if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1)) Which doesnt give me a say in the calling of the links widget. If i put an if clause there, then the rest of the widgets dont get loaded. So i either need to customize the links widget it self or find a way to call the links widget directly? And how do i check which category i'm on?

    Read the article

  • iPhone. Open application during call

    - by immuner
    Is there any way to do this? In other words, is it possible during a call to allow the user to open a certain application? (for example, to provide information based on the person who is calling). If not, will something like this be available on iOS 4?

    Read the article

  • How early can I call kalloc in an arm linux kernel?

    - by Isaac Sutherland
    I would like to dynamically allocate memory from the machine_init function in my arm linux kernel. Calling kalloc can result in a complete failure of the system to boot. My debugging tools are very limited so I can't give much more information regarding the failure. Simply put, is it legal to call kalloc from a machine_init function in arm linux, and, if not, is there an alternative?

    Read the article

  • mysql query results sorting

    - by user329094
    I am calling the results form a query to a list on my site based on if the item is "downtown_hosted". This works fine but I would now like to sort that list DESC, but can't seem to get the syntax correct. Below is what I have: $result_events = mysql_query("SELECT * FROM events WHERE downtown='downtown_hosted' ORDER BY date DESC LIMIT 5 ");

    Read the article

  • Ttrigger extra paramter

    - by fire
    According to the jQuery manual you can send extra parameters (as an array) when calling a trigger. I am using this at the moment: $('#page0').trigger('click', [true]); How would I pick up whether the paramter has come through or not when using this? $('ul.pages li a').click(function() { // Do stuff if true has been passed as an extra parameter });

    Read the article

  • Sequential coupling in code

    - by dotnetdev
    Hi, Is sequential coupling (http://en.wikipedia.org/wiki/Sequential_coupling) really a bad thing in code? Although it's an anti-pattern, the only risk I see is calling methods in the wrong order but documentation of an API/class library with this anti-pattern should take care of that. What other problems are there from code which is sequential? Also, this pattern could easily be fixed by using a facade it seems. Thanks

    Read the article

  • Android: how to obtain AssetManager without reference to Context?

    - by ab11
    I have a Class that needs to obtain a reference to it's application's AssetManager. This class does not extend any sort of android UI class, so it doesn't have a getContext() method, or anything similar. Is there some sort of static Context.getCurrentApplicationContext() type of method? To clarify: my class is intended to be used like a library, for other applications. It has no associated AndroidManifest.xml or control over the context which is calling it.

    Read the article

  • best scala idiom for find & return

    - by IttayD
    This is something I encounter frequently, but I don't know the elegant way of doing. I have a collection of Foo objects. Foo has a method bar() that may return null or a Bar object. I want to scan the collection, calling each object's bar() method and stop on the first one returning an actual reference and return that reference from the scan. Obviously: foos.find(_.bar != null).bar does the trick, but calls #bar twice.

    Read the article

  • Java overloading and overriding

    - by Padmanabh
    We always say that method overloading is static polymorphism and overriding is runtime polymorphism. What exactly do we mean by static here? Is the call to a method resolved on compiling the code? So whats the difference between normal method call and calling a final method? Which one is linked at compile time?

    Read the article

  • Loop through Javascript array, print with string.

    - by Adam
    I have a simple array like: var myArr=["one","two","three"]; an I have a counting loop, which increases the value of var "i" by one. What I want to do is print the next value from the array each time the loop runs, next to a text string, like so: alert('value number '+myArr[i]+); But for some reason I can't get this to work. The following code works, so I'm assuming I'm not calling the counter right: alert('value number '+myArr[0]+);

    Read the article

  • Finding ASP.NET MVC User Control

    - by Dave
    I'm creating a custom ActionResult class and I need it to be able to operate on a UserControl. All of the examples I've found so far pass in the full path like so: return MyResult("~/ControllerName/UserControlName.ascx", myModel); But I'd like it to operate the same way as calling View(), i.e. I just pass in the name and MVC determines the correct route: return MyResult("UserControlName", myModel); Is there a way I can find out the correct route to the control without specifying it manually?

    Read the article

  • What to prefer in the following case?

    - by GK
    say suppose I have class as : public class Age { private int age; public int getAge() { return this.age; } } In my Main class I am calling the getAge() method many times. So I wanted to know is it advisable to call so many times or call once and assign it to some variable and use that variable. Which is best and why?

    Read the article

  • How to implement a timer callback that executes in the same execution context

    - by Waldorf
    Some programming environments like C++ builder have timer components with a callback function which executes in the same execution contexts as where the timer object is created. I was wondering how to do something similar in plain c++ with threading. Or are there any other ways to have a callback which is periodically called to perform some task and runs in the same execution context as the calling thread?

    Read the article

  • upload 2 images at once in codeigniter

    - by sonill
    can anyone plz provide me a simple working code snippet of codeigniter for uploading 2 images at once (through 2 different input field ofcourse). I need 2 images to be uploaded at once, or one after another. and both of the images need to be in different location. I tried to make it myself by calling upload function twice but it returned last images with these extentions: *.jpg.jpg. can anyone help

    Read the article

  • How to reduce the Bandwidth Consumption in flex app,while its launching application ?

    - by Thirst for Excellence
    Recently i designed one Abode air Chat application, which gets the chat messages from admin-Application(we bApplication), band width consumption is too high while each client launching air application to pull the data from database to my-amf endpoint. in this am using blazeds,Jetty server,simple java classes(not servlets) calling with remote object, Please any one suggest me few techiniques to 1)reduce the bandwidh consumption while sending message to each client from admin 2)minimize the time to pull the data from database while client launching application. Regards, Thirst for Excellence

    Read the article

  • Which of the two exceptions was called?

    - by Rob
    If I have a routine that can throw an ArgumentException in two places, something like... if (Var1 == null) { throw new ArgumentException ("Var1 is null, this cannot be!"); } if (Val2 == null) { throw new ArgumentException ("Var2 is null, this cannot be either!"); } What’s the best way of determining in my calling procedure which of the two exceptions was thrown? Or Am I doing this in the wrong fashion?

    Read the article

  • How to make up a search box?

    - by dfjhdfjhdf
    How to make up a form that is going to be a search box and work only via Ajax? That is: 1) What to put as the form's action value? (action="what") 2) How to submit it so that nothing else happenes except for calling the JavaScript function?

    Read the article

< Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >