Search Results

Search found 15081 results on 604 pages for 'passing by reference'.

Page 46/604 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Error in asp.net C#

    - by Ishan
    How to pass Editor1 as Parameter: In my aspx.cs i am giving a call to a function which is in .cs file for the same project, as follows: protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) { DropDown abs = new DropDown(); abs.dd(this.DropDownList2, this.DropDownList3); } .CS file code public void dd(DropDownList DropDownList2, DropDownList DropDownList3) { //My code which contains DropDownList2 DropDownList3 and Editor1 } The error that i am getting is: Error 1 The name 'Editor1' does not exist in the current context The way i have passed DropDownList2 and DropDownList3 i am not able to pass Editor1(It is an ajax control). How do i pass it?

    Read the article

  • Js Variable Reference Quickie

    - by Nikki
    Hoping someone can clear this up for me. Let's say I have 2 globals: var myarray=[1,3,5,7,9],hold; and then I do this: function setup() { alert (myarray[0]);//shows 1 hold=myarray; alert (hold);//appears to show 'hold' containing all the values of myarray. first number shown is 1 myarray[0]=2; alert (hold);//shows the values of myarray with the updated first entry. first numbe shown is 2 } Am I to take it that 'hold' is simply keeping a reference to myarray, rather than actually taking all the values of?

    Read the article

  • Is there any Android XML documentation?

    - by Eddified
    Is there any sort of xml reference? I found this which turned out to be invaluable for me http://groups.google.com/group/android-developers/msg/d334017d72909c79 but I can't figure out how I was supposed to know how to do that, had I not found that post. I know that the api reference has xml attributes listed for many of the classes... but what about xml tags? Where is it documented that I could build a shape using , , tags? I'd really like to know where I can find such documentation.

    Read the article

  • Drupal node reference

    - by Nikunj Kotecha
    I am using two content types - test_parent & test_child In test_child there are two fields, both of type datetime And in test_parent there are two fields, week_no & 7 node references I am using node_save to save a new node. After saving a node of parent type, and then saving the node of child type, i want to update the node it into the parent type. I have completed creation of both nodes from code, and also i am able to update nid in parent type from code. The problem is, the change in db is getting reflected in db but not on drupal node view. Even if i edit the node from drupal, it's showing -none- selected in node reference. Please help.

    Read the article

  • SSIS web service task producing "object reference" error

    - by gfrizzle
    Our care management system uses a web service to import data. I've successfully executed one of its methods using soapUI, and now I want to replicate this with an SSIS 2008 web service task, but I'm running into a problem. I've created the "HTTP Connection Manager" successfully, and specified the location of the "WSDLFile", but when I go to the Input tab and select the Service from the dropdown (there is only one), I get an "Object reference not set to an instance of an object" error, and and the Method dropdown is empty. Any idea what this is trying to tell me?

    Read the article

  • Passing an object as a parameter to a windows service

    - by user220723
    Is there some way to pass an object to a windows service? I know the method myServiceController.Star(string[] arg) but i need to pass a more complex object than a string array. Actually, i don't need the object to be passed as a parameter, what i really needs is that the service can use an object created in a windows forms application. I've tried using System.Web.Script.Serialization.JavaScriptSerializer.Serialize method to convert the object into a Json but i couldn't because the object contains a circular reference. I also tried using pointers, but i couldn't becouse it is a managed type object. Any idea what can i do?

    Read the article

  • How to reference an object in a lower fragment in android

    - by Silas Greenback
    I am trying to build a help screen that is going to go on a mediaplayer. The idea is to put a fragment with a transparent theme on top of the current view. (See How do I create a help overlay like you see in a few Android apps and ICS? for the basic idea). Now, I understand the steps in the mentioned link, but how do I connect the circles and arrows and paragraphs next to each one (explaining what each one was) to the lower object? Example, I have an object: R.id.music_button and I want there to be and arrow that points to music button. Trying to support as many devices as we do it will be very difficult to just draw a few pictures as part of the top layout and expect them to line up. Again, how do I reference an object on a fragment below the top level? Thanks

    Read the article

  • MYSQL, Subquery Reference in Union

    - by christian
    Is there any way to reference a subquery in a union? I am trying to do something like the following, and would like to avoid a temporary table, but the subquery will be drawn from a much larger dataset so it makes sense to only do it once.. SELECT * FROM (SELECT * FROM ads WHERE state='FL' AND city='Maitland' AND page='home' ORDER BY RAND()) AS sq WHERE spot = 'full-banner' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'leaderboard' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'rectangle1' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'rectangle2' LIMIT 1 .... etc,, It's a shame that DISTINCT can't be specified for a single column of a result set.

    Read the article

  • undefined reference to static member variable

    - by Max
    Hi. I have this class that has a static member. it is also a base class for several other classes in my program. Here's its header file: #ifndef YARL_OBJECT_HPP #define YARL_OBJECT_HPP namespace yarlObject { class YarlObject { // Member Variables private: static int nextID; // keeps track of the next ID number to be used int ID; // the identifier for a specific object // Member Functions public: YarlObject(): ID(++nextID) {} virtual ~YarlObject() {} int getID() const {return ID;} }; } #endif and here's its implementation file. #include "YarlObject.hpp" namespace yarlObject { int YarlObject::nextID = 0; } I'm using g++, and it returns three undefined reference to 'yarlObject::YarlObject::nextID linker errors. If I change the ++nextID phrase in the constructor to just nextID, then I only get one error, and if I change it to 1, then it links correctly. I imagine it's something simple, but what's going on?

    Read the article

  • ORACLE: Parameter reference in WHERE doesn't work

    - by Gainder
    Hello, I have created a simple static function in oracle 10g to get the reference of an object based on his pk. STATIC FUNCTION getRef(nome IN VARCHAR2) RETURN REF folder_typ IS fl_r REF folder_typ := null; BEGIN SELECT REF(fl) INTO fl_r FROM folder_tab fl WHERE fl.nome = nome; RETURN fl_r; END getRef; This gives me an error because it could't fetch a row. If insted of WHERE fl.nome = nome; I write WHERE fl.nome = 'folder1'; -- it works. I think im not using the parameter in the right way. How can I use it?

    Read the article

  • How to I reference a pointer from a different class

    - by Justagruvn
    Hey team of awesomeness!, (Iphone Objective-C question) First off, I despise singletons with a passion. Though I should probably be trying to use one, I just dont want to. I want to create a data class (that is instantiated only once by a view controller on loading), and then using a different class, message the crap out of that data instance until it is brimming with so much data, it smiles. So, how do i do that? I made a pointer to the instance of the data class when I instantiated it. I'm now over in a separate view controller, action occurs, and I want to update the initial data object. I think I need to reference that object by way of pointer, but I have no idea how to do that. yes I've set properties and getters and setters, which seem to work, but only in the initial view controller class. Peace Love applesauce.

    Read the article

  • Forced naming of parameters in python

    - by Mark Mayo
    In python you may have a function definition: def info(object, spacing=10, collapse=1) which could be called in any of the following ways: info(odbchelper) info(odbchelper, 12) info(odbchelper, collapse=0) info(spacing=15, object=odbchelper) thanks to python's allowing of any-order arguments, so long as they're named. The problem we're having is as some of our larger functions grow, people might be adding parameters between spacing and collapse, meaning that the wrong values may be going to parameters that aren't named. In addition sometimes it's not always clear as to what needs to go in. We're after a way to force people to name certain parameters - not just a coding standard, but ideally a flag or pydev plugin? so that in the above 4 examples, only the last would pass the check as all the parameters are named. Odds are we'll only turn it on for certain functions, but any suggestions as to how to implement this - or if it's even possible would be appreciated.

    Read the article

  • Database class is not correctly connecting to my database.

    - by blerh
    I'm just venturing into the world of OOP so forgive me if this is a n00bish question. This is what I have on index.php: $dbObj = new Database(); $rsObj = new RS($dbObj); This is the Database class: class Database { private $dbHost; private $dbUser; private $dbPasswd; private $dbName; private $sqlCount; function __construct() { $this->dbHost = 'localhost'; $this->dbUser = 'root'; $this->dbPasswd = ''; $this->dbName = 'whatever'; $this->sqlCount = 0; } function connect() { $this->link = mysql_connect($this->db_host, $this->db_user, $this->db_passwd); if(!$this->link) $this->error(mysql_error()); $this->selection = mysql_select_db($this->db_name, $this->link); if(!$this->selection) $this->error(mysql_error()); } } I've shortened it to just the connect() method to simplify things. This is the RS class: class RS { private $username; private $password; function __construct($dbObj) { // We need to get an account from the db $dbObj->connect(); } } As you can probably see, I need to access and use the database class in my RS class. But I get this error when I load the page: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\includes\database.class.php on line 22 The thing is I have NO idea where it got the idea that it needs to use ODBC as a user... I've read up on doing this stuff and from what I can gather I am doing it correctly. Could anyone lend me a hand? Thank you.

    Read the article

  • Python parsing error message functions

    - by user1716168
    The code below was created by me with the help of many SO veterans: The code takes an entered math expression and splits it into operators and operands for later use. I have created two functions, the parsing function that splits, and the error function. I am having problems with the error function because it won't display my error messages and I feel the function is being ignored when the code runs. An error should print if an expression such as this is entered: 3//3+4,etc. where there are two operators together, or there are more than two operators in the expression overall, but the error messages dont print. My code is below: def errors(): numExtrapolation,opExtrapolation=parse(expression) if (len(numExtrapolation) == 3) and (len(opExtrapolation) !=2): print("Bad1") if (len(numExtrapolation) ==2) and (len(opExtrapolation) !=1): print("Bad2") def parse(expression): operators= set("*/+-") opExtrapolate= [] numExtrapolate= [] buff=[] for i in expression: if i in operators: numExtrapolate.append(''.join(buff)) buff= [] opExtrapolate.append(i) opExtrapolation=opExtrapolate else: buff.append(i) numExtrapolate.append(''.join(buff)) numExtrapolation=numExtrapolate #just some debugging print statements print(numExtrapolation) print("z:", len(opExtrapolation)) return numExtrapolation, opExtrapolation errors() Any help would be appreciated. Please don't introduce new code that is any more advanced than the code already here. I am looking for a solution to my problem... not large new code segments. Thanks.

    Read the article

  • Parameter becoming zero somewhere

    - by Nick
    Hey guys, Something really weird is happening: when I call foo(100*1.0f), somewhere along the line that becomes 0. To verify I put a breakpoint on foo(), and it indeed is zero and it indeed gets called with 100*1.0f. The code is in Obj-C++. Here is the calling function in XCode's GDB frontend, as you can see, score*scoreMultiplier is 100. And here is the called function in XCode's GDB frontend, here _score is 0.

    Read the article

  • Method params match signature, but still getting error

    - by Jason
    I am in the midst of converting a VB library to C#. One of my methods has the following signature in VB: Private Shared Sub FillOrder(ByVal row As DataRowView, ByRef o As Order) In C# I converted it to: private static void FillOrder(DataRowView row, ref Order o) From my constructor inside my Order class, I am calling the FillOrder() method like so: DataView dv = //[get the data] if (dv.Count > 0) { FillOrder(dv[0], this); } In VB, this works: Dim dv As DataView = '[get data]' If dv.Count > 0 Then FillOrder(dv.Item(0), Me) End If However, in VS10 in the C# file I am getting a red squiggle under this call with the following error: The best overloaded method match for [the method] has some invalid arguments This was working code in VB. What am I doing wrong?

    Read the article

  • How to pass parameters for OPENDATASOURCE

    - by Rapunzo
    I can connect to a linked server with this: SELECT testNo, soruTuruId, soruNo, cevap , degerlendirenTcNo, degerlendirilenTcNo FROM OPENDATASOURCE('SQLOLEDB', 'Data Source=192.168.150.42;User ID=readerUser;Password=1').akreditasyon.dbo.tblPerfCevap But I have to pass the password as parameter. and I try like this: SET @connectionString = 'Data Source=192.168.150.42;User ID=readerUser;Password='+@pw SELECT testNo, soruTuruId, soruNo, cevap , degerlendirenTcNo, degerlendirilenTcNo FROM OPENDATASOURCE('SQLOLEDB', @connectionString ).akreditasyon.dbo.tblPerfCevap and SELECT testNo, soruTuruId, soruNo, cevap , degerlendirenTcNo, degerlendirilenTcNo FROM OPENDATASOURCE('SQLOLEDB', 'Data Source=192.168.150.42;User ID=readerUser;Password='+@pw ).akreditasyon.dbo.tblPerfCevap but didnt work:S does anyone have an idea?

    Read the article

  • Convert c++ argument to int

    - by happyCoding25
    Hello, I have a small c++ program that needs to get and argument and convert it to an int. Here is my code so far: #include <iostream> using namespace std; int main(int argc,int argvx[]) { int i=1; int answer = 23; int temp; // decode arguments if(argc < 2) { printf("You must provide at least one argument\n"); exit(0); } // Convert it to an int here }

    Read the article

  • How to copy an object by value, not by reference

    - by Blankman
    I want to make a copy of an object, then after some logic, re-assign the original object the value of the copy. example: User userCopy = //make a copy foreach(...) { user.Age = 1; user.ID = -1; UserDao.Update(user) user = userCopy; } I don't want a copy by reference, it has to be a copy by value. The above is just a sample, not how I really want to use it but I need to learn how to copy by value.

    Read the article

  • Reference table values in a war against magic numbers

    - by Alex N.
    This question bugged me for years now and can't seem to find good solution still. I working in PHP and Java but it sounds like this maybe language-agnostic :) Say we have a standard status reference table that holds status ids for some kind of entity. Further let's assume the table will have just 5 values, and will remain like this for a long time, maybe edited occasionally with addition of a new status. When you fetch a row and need to see what status it is you have 2 options(as I see it at least) - put it straight ID values(magic numbers that is) or use a named constant. Latter seem much cleaner, the question though is where those named constants should leave? In a model class? In a class that uses this particular constant? Somewhere else?

    Read the article

  • ASP.NET null reference exception

    - by nanek
    Please help me to figure out what is wrong with this code: I have ASP.NET page with one button visible. When user clicks it - it instances MyClass (its implementation is in AppCode directory) and turns invisible (button2 becomes visible). When I click button2 it raises "Object reference not set to an instance of an object" Exception. What seems to be the problem? { public MyClass noviTest; protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { noviTest = new MyClass(TextBox1.Text); Button1.Visible = false; Button2.Visible = true; } protected void Button2_Click(object sender, EventArgs e) { Label1.Text=noviTest.getID; //this is the critical line } } Thank You in advance, Regards

    Read the article

  • How do you reference another element in a xaml list

    - by Ball
    I'm using xaml as a datastore because It's quick and we haven't yet defined a file format. But I can only seem to create xaml that is a pure tree, even if it is acyclic. I know how to create a list of items in xaml, but How do I share objects in two lists? Below is an example of what I'm trying to say. <CreaturFile> <CreatureFile.Monsters> <Monster Name="Kobold" x:Name="Mepo"/> <Monster Name="Goblin"/> </CreatureFile.Monsters> <CreatureFile.Encounters> <Encounter> <Reference ElementName="Mepo"/> </Encounter> </CreatureFile.Encounters> </CreatureFile>

    Read the article

  • Is it guaranteed that new Integer(i) == i in Java?

    - by polygenelubricants
    Consider the following snippet: int i = 99999999; byte b = 99; short s = 9999; Integer ii = Integer.valueOf(9); // should be within cache System.out.println(new Integer(i) == i); // "true" System.out.println(new Integer(b) == b); // "true" System.out.println(new Integer(s) == s); // "true" System.out.println(new Integer(ii) == ii); // "false" It's obvious why the last line will ALWAYS prints "false": we're using == reference identity comparison, and a new object will NEVER be == to an already existing object. The question is about the first 3 lines: are those comparisons guaranteed to be on the primitive int, with the Integer auto-unboxed? Are there cases where the primitive would be auto-boxed instead, and reference identity comparisons are performed? (which would all then be false!)

    Read the article

  • Proper usage of Java Weak Reference in case of nested collections

    - by Tong Wang
    I need to define a weak reference Map, whose value is a Set. I use Google collections' MapMaker, like this: Map<Class<? extends Object>, Set<Foo>> map = new MapMaker().weakKeys().weakValues().makeMap(); So, for Set<Foo>, can I use a normal HashSet? Or, do I have to create a weak HashSet, like this: Collections.newSetFromMap(new WeakHashMap<Foo, Boolean>()); And why? Another question, the key of my map is Class objects, when will a Class object become weakly reachable? In other words, what is the lifetime of a Class object? Thanks.

    Read the article

  • Return Integer value from SSIS execute SQL Task

    - by Bokhari
    I am using SQL Server 2005 Business Intelligence Studio and struggling with returning an integer value from a very simple execute SQL Task. For a very simple test, I wrote the SQL Statement as: Select 35 As 'TotalRecords' Then, I specified ResultSet as ResultName = TotalRecords and VariableName = User::TotalRecords When I execute this, the statement is executed but the variable doesn't have the updated value. However, it has the default value that I specified while variable definition. The return of a date variable works, but integer variable isn't working. The type of User::TotalRecords specified is Int32 in a package scope. Thanks for any hints

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >