Search Results

Search found 7418 results on 297 pages for 'argument passing'.

Page 112/297 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • Why doesn't HashTable.Contains() just simply return false if it is passed a null?

    - by Nate Pinchot
    I understand why passing a null to HashTable.Contains() doesn't work, but I don't understand what the point of it throwing an ArgumentNullException is - instead of just simply returning false? What is the benefit of throwing the exception (other than to make me do null checks before calling .Contains())? Caused By [System.ArgumentNullException] Key cannot be null. Parameter name: key at System.Collections.Hashtable.ContainsKey(Object key) at System.Collections.Hashtable.Contains(Object key)

    Read the article

  • this and super in java

    - by abson
    this and super are keywords isn't it, then how can we use them for passing arguments to constructors the same way as with a method?? In short how is it that these can show such distinct behaviours??

    Read the article

  • How to set dynamic value to "value" attribute of struts html:button tag ?

    - by Prat1
    I am using following button tag to display button by passing some runtime value to "value" attribute: <html:button styleClass="button50" value="<%=no_list %>" onclick="callOneFunction(this);" /> it is not throwing an jasper exception saying, setValue(String) cannot work with html:button. Please help me out ot resolve my problem, I want to pass some value at runtime to vale attribute. How to do it ? Thanks in advance.

    Read the article

  • Both OpenID and normal Login on the same View?

    - by PlayKid
    Hi there, Is there any site that show both OpenID and normal login on the same view? Most of the sites either have OpenID implementation or Normal Login implementation on different views. I tried to do that, but it seems my code is very dirty, passing a blank username and password if using OpenID, otherwise OpenID will be blank but passed the username and password. But then I lose the capability of verifying whether the user has entered the correct values, is there any best practice for me to do that? Thanks a lot

    Read the article

  • persistant message queues

    - by Will
    I have several services on different machines and a message-passing system suits my problem. Reliability - sent messages always delivered, even if one end goes down - is the key concern, although it should also be fast and reasonably bandwidth-efficient. So which message queue should I use?

    Read the article

  • In gzip libary, what's the difference between 'uncompress' and 'gzopen' ?

    - by Sol
    There are some functions to decompress in zlib library(zlib version 1.2.3) I want to decompress my source zip(.gz) file using 'uncompress' function. It is now working(error code -3) but gzopen is. It is still not working when I input payload pointer(passing gzip header) to 'uncompress' . So the question is "What's the valid arguments for uncompress function?" and If it needs different format, how can I make it? Google doesn't helpful this time :(

    Read the article

  • How to pass an integer to create new variable name?

    - by Joe
    I have 50 svg animations named animation0, animation1, animation2 etc. and I want to load them when the integer 0 to 49 is passed to this function: function loadAnimation(value){ var whichswiffy = "animation" + value; var stage = new swiffy.Stage(document.getElementById('swiffycontainer'), whichswiffy); stage.start(); } It doesn't work at the moment, maybe it's passing 'whichswiffy' rather than 'animation10'? Any ideas?

    Read the article

  • Rotate text in XSL-FO

    - by Shekar_XSL
    Hi, I am generating the xsl-fo document for my XML content and then passing this content to one of the third party DLL that will generate the PDF. I have a requirement to display a test in 45 degrees angle. How to achive this? Thanks

    Read the article

  • Should an object be fully complete before injected as a dependency?

    - by Hans
    This is an extension of this question: http://stackoverflow.com/questions/3027082/understanding-how-to-inject-object-dependencies. Since it is a bit different, I wanted to separate them, to make it, hopefully, easier to answer. Also, this is not a real system, just a simplified example that I thought we'd all be familiar with. TIA. : DB threads: thread_id, thread_name, etc posts: post_id, thread_id, post_name, post_contents, post_date, post_user_id, etc Overview Basically I'm looking at the most maintainable way to load $post_id and have it cascade and load the other things I want to know about and I'm trying to keep the controller skinny. BUT: I'm ending up with too many dependencies to inject I'm passing in initialized but empty objects I want to limit how many parameters I am passing around I could inject $post(-many) into $thread(one<-), but on that page I'm not looking at a thread, I'm looking at a post I could combine/inject them into a new object Detail If I am injecting an object into another, is it best to have it fully created first? I'm trying to limit how many parameters I have to pass in to a page, but I end up with a circle. // 1, empty object injected via constructor $thread = new Thread; $post = new Post($thread); // $thread is just an empty object $post->load($post_id); // I could now do something like $post->get('thread_id') to get everything I want in $post // 2, complete object injected via constructor $thread = new Thread; $thread->load($thread_id); // this page would have to have passed in a $thread_id, too $post = new Post($thread); // thread is a complete object, with the data I need, like thread name $post->load($post_id); // 3, inject $post into $thread, but this makes less sense to me, since I'm looking at a post page, not a thread page $post = new Post(); $post->load($post_id); $thread = new Thread($post); $thread->load(); // would load based on the $post->get('post_id') and combine. Now I have all the data I want, but it's non-intuitive to be heirarchially Thread->Post instead of Post-with-thread-info // Or, I could inject $post into $thread, but if I'm on a post page, // having an object with a top level of Thread instead of // Post-which-contains-thread-info, makes less sense to me. // to go with example 1 class post { public function __construct(&$thread) { $this->thread=$thread; } public function load($id) { // ... here I would load all the post data based on $id // now include the thread data $this->thread->load($this->get('thread_id')); return $this; } } // I don't want to do $thread = new Thread; $post = new Post; $post->load($post_id); $thread->load($post->get('post_id')); Or, I could create a new object and inject both $post and $thread into it, but then I have object with an increasing number of dependencies.

    Read the article

  • Call Single StrConn from Multiple Pages

    - by Daniel
    I have a ocnnection to SQL Server set up in my vba code. The format is: strConn = "ODBC;Driver=SQL;Server=SQL1;Database=DB1;Uid=1;Pwd=1" I have this in 4 sheets, but there will be times when I will want to change it to call from SQL2 or SQL3, and instead of changing the code on each sheet 4 times, I want to change it only once. Is there a way to set up that line to run by calling it from somewhere else or by passing in a string into the ""?

    Read the article

  • Android pass a 2d int array from one activity to another ERROR

    - by user2189001
    ACTIVITY 1: Bundle bundle = new Bundle(); bundle.putSerializable("CustomLevelData", LevelCreator.LCLevelData); Intent i = new Intent(LevelCreatorPopout.this, GameView.class); i.putExtras(bundle); startActivity(i); ACTIVITY 2: LevelData=(int[][]) extras.getSerializable("CustomLevelData"); ERROR: E/AndroidRuntime(16220): FATAL EXCEPTION: main E/AndroidRuntime(16220): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.powerpoint45.maze/com.powerpoint45.maze.GameView}: java.lang.ClassCastException: java.lang.Object[] cannot be cast to int[][] I have searched but found nothing on 2d INT array passing

    Read the article

  • is it possible in javascript to create shortcuts with sequence like 123,345 instead of combo?

    - by frankB
    I already used some script to implement the shortcuts in my web page but i was wondering if could be possible to associate some combination not syncronic like Ctrl+X but more like a sequence typing 1..2..3 or any other combination to execute a script... lets assume this example: you have a long list with numbers: you could type 3..5...6, so you can go to the item 356 passing trough the item 3 then 35 then 356 more or less like when you type while selecting a select box i hope it was clear, id not easy to explain...

    Read the article

  • why we can't initialize a servlet using constructor itself?

    - by Reddy
    Why do we have to override init() method in Servlets while we can do the initialization in the constructor and have web container call the constructor passing ServletConfig reference to servlet while calling constructor? Ofcourse container has to use reflection for this but container has to use reflection anyway to call a simple no-arg constructor

    Read the article

  • How to get password html helper to render password on failed validation

    - by Max Schmeling
    I have a form for creating a new account and it has a password field in it. I'm using view models to pass data to the controller action and back to the form view. When the user enters their details in, and clicks submit, if validation fails and it returns them to the same view passing back in the view model, it won't default the password to what they entered. How can I get it to do this? Or should I even try?

    Read the article

  • cakePHP, multiple hasOne in a single model

    - by jason
    say you have 3 models : user, hair_color, and eye_color user hasOne hair_color user also hasOne eye_color however var $hasOne = 'hair_color'; var $hasOne = 'eye_color'; obviously wont work. So how do you implement many hasOne relationships in a single model? I assume the answer is in the cookbook, Im going over that area now, I suspect it has something to do with passing an array to $hasOne, but no example of doing this.

    Read the article

  • Solve:Value was either too large or too small for an Int32.

    - by jithincool
    I am passing query string and the url is as follows- http://localhost:1086/Web/EditMobile.aspx?sno=2. But when i try to enter the url as follows,localhost:1086/Web/EditMobile.aspx?sno=2*3424324423432424* , i get the following error-Value was either too large or too small for an Int32. How do i handle this error. I must get an error report like " the value is not found in the table or database"

    Read the article

  • Does [Serializable] work for inherited classes?

    - by MattiasK
    I haven't worked much with remoting so excuse this rather rudimentary question, If I derive a class from an abstract class marked as [Serializable] (for passing the data across an appdomain), does the other side get the actual overriden implementation? ie does polymorphism work over remoting/Serializable? I need to create a clone on the other side rather than operating on the original so MarshalByRef is not an option...

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >