Search Results

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

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

  • reference symbols on the main timeline

    - by vasion
    this is one of those upsurdly basic questions for which google does not work. I have usually dispatched events from my classes and dealt with the user interface in the document class. But now i want to separate all the UI in a separate class, accessible by other classes. I have added it as a child to the main/document class, but how do i reference the main class without going through parent.parent shananigans? edit. one more thing i remembered. Some of my UI elements are not programatically added.

    Read the article

  • What is the difference between array parameters in C

    - by STeN
    Hi, what is the difference between following function declarations, which create and return the array in C/C++? Both methods create the array and fill it with proper values and returns true if everything passed. bool getArray(int* array); bool getArray(int* array[]); Thanks Best Regards, STeN

    Read the article

  • Return an Oracle Associative Array from a function

    - by Paul Johnson
    Does anybody know if it is possible to return an associative array as the result of an Oracle function, if so do you have any examples? I have an Oracle package which contains an associative array declaration as defined below: TYPE EVENTPARAM IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; This is then used in a stored procedure outside the package as follows: v_CompParams areva_interface.eventparam; The intention is to store an associative array of strings in the variable v_CompParams, returned from a Parse function in another package. The definition for which is as follows: PACKAGE STRING_MANIP IS TYPE a_array IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; FUNCTION Parse (v_string VARCHAR2, v_delim VARCHAR2) RETURN a_array; FUNCTION RowCount(colln IN a_array) RETURN NUMBER; END; The code which implements this is: v_CompParams := STRING_MANIP.PARSE(v_CompID,v_Delim); Unfortunately it doesn't work, I get the error 'PLS-00382: expression is of wrong type'. I foolishly assumed, that since a_array derives from the same source Oracle type as the variable v_CompParams, that there would be no problem casting between them. Any help much appreciated. Kind Regards Paul J.

    Read the article

  • Invoke Java via Batch File with Filepath Arguments

    - by EricIdyll
    Hi there, I'm having an issue getting files loaded into an app called GCS, by dragging them onto the executable. GCS can be invoked on Windows with a bat file, which goes like this: @echo off start javaw -Xmx256M -jar "GURPS Character Sheet.app/Contents/Resources/Java/GCS.jar" %* If I hard code a filepath in place of the batch argument wildcard (with quotes), it works. If I run the debugger with a filepath argument it works. If I echo %, it gives me the correct filename with quotes around it. If I add quotes around % it still breaks. I have a disconnect here between DOS and Java, and I'm at a loss. Does anyone recognize this problem? Thanks in advance.

    Read the article

  • Log4Net and GAC - How to reference Configuraition Files?

    - by Adam
    Hello all I am using log4net during my development, as as part of a project constraint, I now need to add it to the Global Assembly Cache. The logging definitions are in a file Log4Net.xml. That file is referenced in my assemblyinfo as: [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log4Net.xml", Watch = true)]. So long as the xml file was in the same directory as the log4net.dll, everything has been working fine. However now that I've added log4net to the GAC, it is no longer picking up the xml file. Does anyone know what I need to change in order to have it pick up the XML file again? Is hardcoding the patch in the assembly reference the only way? Many thanks

    Read the article

  • Object reference error even when object is not null

    - by Shrewd Demon
    hi, i have an application wherein i have incorporate a "Remember Me" feature for the login screen. I do this by creating a cookie when the user logs in for the first time, so next time when the user visits the site i get the cookie and load the user information. i have written the code for loading user information in a common class in the App_Code folder...and all my pages inherit from this class. code for loading the user info is as follows: public static void LoadUserDetails(string emailId) { UsersEnt currentUser = UsersBL.LoadUserInfo(emailId); if (currentUser != null) HttpContext.Current.Session["CurrentUser"] = currentUser; } Now the problem is i get an "Object reference" error when i try to store the currentUser object in the session variable (even though the currentUser object is not null). However the password property in the currentUser object is null. Am i getting the error because of this...or is there some other reason?? thank you

    Read the article

  • Why does ASP.NET web site reference assembly from GAC, when adding local reference?

    - by Konstantin
    When you use ASP.NET web site (instead of web application model) and add reference to an assembly from local folder, Visual Studio, it seems, understands that this local assembly is also in GAC and so does NOT copy this assembly to bin folder (as it does with non-GAC assemblies), but simply adds new record in web.config file. Why such a behaviour? Is it possible to force copy to bin folder (I need this since .dll is not on target environment)? I can add assembly to bin folder as file and it will work, but in this case bin folder contents will be in source control, which is not good.

    Read the article

  • Unique element ID to reference later

    - by Hanpan
    I'm trying to figure out a method of storing a unique reference to each tag on a particular page. I won't have any ability to edit the page content and I'll the generated UID to stay the same on every page refresh. Since browsers don't generate any kind of UID for elements, I was thinking that the only method to do this would be to execute a script which walks the DOM and creates a UID for each it comes across. I don't know how accurate this will be, especially considering I'll need to ensure it creates the same UID for the tag each time the script crawls the page. Can anyone think of any other, more accurate ways of mapping a page? Many thanks.

    Read the article

  • Flash Hates Me. Error #1009: Cannot access a property or method of a null object reference

    - by sol
    I simply create a movie clip, put it on the stage and give it an instance name of char. Here's my document class, simple as can be: public class Test extends MovieClip { public function Test() { char.x = 1315; char.y = 459; addEventListener(Event.ENTER_FRAME, mouseListen); } private function mouseListen(e:Event) { char.x = mouseX; char.y = mouseY; } } And I get this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.me::Test/::mouseListen() How in the world is it possible that it knows what "char" is in the constructor but not in the mouseListen function? What else could it be?

    Read the article

  • storing passed arguments in separate variables -shell scripting

    - by Nathan Pk
    In my script "script.sh" , I want to store 1st and 2nd argument to some variable and rest to another separate variable. What command I must use to implement this task? Number of arguments that is passed to a script is random) When I run the command in console ./script.sh abc def ghi jkl mn o p qrs xxx #It can have any number of arguments In this case, I want my script to store "abc" and "def" in one variable. "ghi jkl mn o p qrs xxx" should be stored in another variable.

    Read the article

  • LINQ Query using UDF that receives parameters from the query

    - by Ben Fidge
    I need help using a UDF in a LINQ which calculates a users position from a fixed point. int pointX = 567, int pointY = 534; // random points on a square grid var q = from n in _context.Users join m in _context.GetUserDistance(n.posY, n.posY, pointX, pointY, n.UserId) on n.UserId equals m.UserId select new User() { PosX = n.PosX, PosY = n.PosY, Distance = m.Distance, Name = n.Name, UserId = n.UserId }; The GetUserDistance is just a UDF that returns a single row in a TVP with that users distance from the points deisgnated in pointX and pointY variables, and the designer generates the following for it: [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.GetUserDistance", IsComposable=true)] public IQueryable<GetUserDistanceResult> GetUserDistance([global::System.Data.Linq.Mapping.ParameterAttribute(Name="X1", DbType="Int")] System.Nullable<int> x1, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="X2", DbType="Int")] System.Nullable<int> x2, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="Y1", DbType="Int")] System.Nullable<int> y1, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="Y2", DbType="Int")] System.Nullable<int> y2, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserId", DbType="Int")] System.Nullable<int> userId) { return this.CreateMethodCallQuery<GetUserDistanceResult>(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), x1, x2, y1, y2, userId); } when i try to compile i get The name 'n' does not exist in the current context

    Read the article

  • undefined reference

    - by rantravee
    Hi, I'm unfamiliar to working in c++ under linux so I have some issues, one of them is that after I write a class and try to instantiate an object of that class I get to following error : "undefined reference to Constructor_of_that_class" . This happens for every class that I write , and it happens no matter where I try to do the instantiating, even if the code compiles without any problems . What is going wrong here and what I have to do to get over this error ? Because the project that I'm working wasn't created by me I suspect that it has to do something with some settings but I don't know which.

    Read the article

  • git reference common directory/repo

    - by phillee
    Project layout: /project_a /shared /project_b /shared /shared project_a and project_b both need to contain the shared folder. With svn, we used svn:externalsand that worked fine, since svn can reference subdirs (with relative paths too). However, we moved to git and it seems to not support checking out subdirs. Our solution now is to put project_a, project_b and shared all in different git repos, and use git submodules in project_a and project_b. However this seems much more complicated than one monolithic svn repo with svn:externals. What's the correct way to handle common elements in git?

    Read the article

  • How can I easily pass all the variables from a template to a partial in Symfony with output escaping

    - by Failpunk
    It there an easy way to pass all the variables a template file has access to onto a partial when I have output escaping on? I tend to create a template file, then refactor things into a partial at some point and it would seem that there would be an easy way to just pass all the same variables from the template to the partial and be done with it. I have output escaping on and I can't just pass in $sf_data. It look like calling a partial from within another partial is very simple...just pass in the variable $vars.

    Read the article

  • CodedUI null reference exception even when object exists

    - by Roee
    Hi, I have created a coded ui test that checks something in my software. It worked fine, but now I keep getting null reference exception when I try to interact with the UITestControl. The starnge thing is, that the UITestControl's 'Exist' property returns true, which means that the control had been found. I've searched and found this topic: http://social.msdn.microsoft.com/Forums/en/vsautotest/thread/c2e6e5c3-2503-4506-9963-733fd84fbd25, But I have checked in my project, and the 'Copy Local' propert of these assemblies is set to false. I think that this execption first occurred after I have added an app.config file to my project. Maybe this might be the problem? If so, how can I fix this without deleting my app.config file? Thanks!

    Read the article

  • Reference platform specific System.Data.SQLite

    - by Dmitriy Nagirnyak
    I am using SQLite for the unit testing and might use it as a database for local development/staging. The System.Data.SQLite has basically 2 versions: x86 and x64. Correct one should be used for the specific platform. I have 64 bit Win7, other guys in the team might use 32-bit OSs. The server's platform is not known at this stage. If I use 32-bit version of the assembly on 64-bit platform I get BadImageFormatException: Could not load file or assembly 'System.Data.SQLite'. I believe similar will happen trying to use 64-bit assembly on 32-bit platform. So my question is what is the best way to reference the SQLite assembly so that it does not depend on the platform and people can just use it? It is ok to use 32-bit version of assembly on a 64-bit platform (Maybe there is a switch for that somewhere?).

    Read the article

  • referencing ints from other classes

    - by user357032
    if i wanted to reference an int from another class how would i go about doing that??? public class Zoom extends View { private Drawable image; public int zoomControler=20; public Zoom(Context context) { super(context); image=context.getResources().getDrawable(R.drawable.icon); setFocusable(true); } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); image.setBounds((getWidth()/2)-zoomControler, (getHeight()/2)-zoomControler, (getWidth()/2)+zoomControler, (getHeight()/2)+zoomControler); image.draw(canvas); } } class HelloOnTouchListener implements OnTouchListener{ @Override public boolean onTouch(View arg0, MotionEvent arg1) { return true; } } in this case i want to reference the zoomControler from the first class in the second helloontouchlistener class

    Read the article

  • "Reference required" error when referencing NServiceBus assembly from another project

    - by cwegrzyn
    We are trying to write an application that uses the NServiceBus library in a VB.NET environment. We've been stymied by errors similar to the following: Reference required to assembly 'NServiceBus, Version=2.0.0.1071, Culture=neutral, PublicKeyToken=9fc386479f8a226c' containing the implemented interface 'NServiceBus.IMessageHandler`1'. Add one to your project. Our project already includes references to NServiceBus.dll and NServiceBus.Core.dll from the same NServiceBus 2.0 RC2 distribution. Steps to reproduce: Create a new VB Class Library Project (.NET 3.5) Add NServiceBus.dll and NServiceBus.Core.dll as References. Put the following code in Class1.vb: Imports NServiceBus.Sagas.Impl Class Test Public Function Foo() As SagaMessageHandler Return Nothing End Function End Class You should now see the compiler error mentioned above. An identical project written in C# has no compile errors. Any ideas about how to solve this problem? (And, yes, my preferred solution is switching to C#, but no, that's not an acceptable one at the moment.)

    Read the article

  • How to reference THE UIWindow from sub UIViewControllers?

    - by maralbjo
    I am trying to add another subview programmatically based on some event (user taps a button, for instance). My problem is that I am having problems referencing the (one and only) instance of UIWindow. I reach it from my appDelegate, because the MainWindow.xib and the appDelegate have been wired up. But I cannot reach the UIWIndow from anywhere else (I cannot draw that connection in IB, can I?) What techniwue is preferred to get a reference to (the one and only) UIWindow? ...so that I in turn can use the following code from my various UIViewControllers: [myOneAndOnlyWindow addSubview:oneOfManyViews.view]; [myOneAndOnlyWindow makeKeyAndVisible];

    Read the article

  • Returns an associative array comprising a function's argument list in php

    - by diEcho
    Hello All, in php func_get_args — Returns an array comprising a function's argument list it returns numeric index array is there any function/way in php by which we get associative array i.e. key=value pair i m explaining with example: test.php <?php function foo() { include './fga.inc'; } $x=20; $y=30; foo($x, $y); ?> fga.inc <?php $args = func_get_args(); echo "<pre>"; print_r($args); echo "</pre>"; ?> which should returns array ( 'x'=> 20, 'y' => 30, )

    Read the article

  • MongoDB - how to join parent and child products by reference

    - by Jaro
    my mongo collection stores products. There are two product types: child and parent. Parent product holds array of its child as reference. Use case: use mydb; child1 = { _id: 1, name: "Child 1", is_child: true, is_parent: false, children : [] } child2 = { _id: 2, name: "Child 2", is_child: true, is_parent: false, children : [] } parent = { _id: 3, name: "Parent product", is_child: false, is_parent: true, children : [1, 2] } db.product.insert( [child1, child2, parent] ); And I'm looking for any query returning { _id: 3, name: "Parent product", is_child: false, is_parent: true, children: [ { _id: 1, name: "Child 1", is_child: true, is_parent: false, children : [] }, { _id: 2, name: "Child 2", is_child: true, is_parent: false, children : [] } ] } I'm newbie to mongodb, but I guess an usage of map-reduce could solve the problem. Can anyone advice? Thx

    Read the article

  • Google maps spatial reference system

    - by JavaRocky
    What is Google map's spatial reference system using when you enter a lat, long into the maps search bar? I've found hints that it might be WGS84 but after converting to that coordinate system, nothing shows up when i paste the coordinates into the google maps search box. I am converting from GDA MGA 56. Sample: Input MGA56 coords: 336301, 6253363 Expected WGS86 coords: -33.8473340793201, 151.230631835944 I get: 16834916.928327594 -4008321.1020318186 Spatial coord systems: EPSG:28356 for MGA56 EPSG:900913 for WGS86 (google maps) I am using geotools to do the transform: CoordinateReferenceSystem crsMga56 = CRS.parseWKT(mga56); CoordinateReferenceSystem crsGmaps = CRS.parseWKT(gmaps); Coordinate coordinate = new Coordinate(336301, 6253363); Point point = new GeometryFactory().createPoint(coordinate); MathTransform transform = CRS.findMathTransform(crsMga56, crsGmaps); Geometry geometry = JTS.transform(point, transform); I know the transform is not correct, as when i use an online tool it gives me the correct coords. http://www.environment.gov.au/cgi-bin/transform/mga2geo%5Fgda.pl?east=336301&north=6253363&zone=56

    Read the article

  • Returning a C++ reference in a const member functionasses

    - by Chris Kaminski
    A have a class hierarchy that looks somethign like this: class AbstractDataType { public: virtual int getInfo() = 0; }; class DataType: public AbstractDataType { public: virtual int getInfo() { }; } class Accessor { DataType data; public: const AbstractDataType& getData() const { return(data); } } Well, GCC 4.4 reports: In member function ‘const AbstractDataType& Accessor::getData() const’: error: invalid initialization of reference of type ‘const AbstractDataType&’ from expression of type ‘const DataType’ Where am I going wrong - is this a case where I MUST use a pointer?

    Read the article

  • SQL Server - Error when trying to reference a .mdf file

    - by Amokrane
    Hi, For a NUnit test I need to reference a .mdf file from a .config file. Unfortunately, I get the following error message: The FOR ATTACH option requires that at least the primary file be specified. An attempt to attach an auto-named database for file C:\....\*.mdf A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. I looked for this error on google but didn't find anything that helped me solve my problem. Any idea? Thank you

    Read the article

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