Search Results

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

Page 98/604 | < Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >

  • How to use GD binding in Haskell?

    - by milosz
    I've installed the GD package (http://hackage.haskell.org/package/gd-3000.4.0) using cabal. When I try to compile the program which uses GD I receive an error: [mp262554@students:~/jpp/haskell]$ ghc gd.hs compilation IS NOT required gd.o: In function `sV8_info': (.text+0x1bf): undefined reference to `gdzm3000zi4zi0_GraphicsziGD_saveJpegFile_closure' gd.o: In function `sUY_info': (.text+0x3be): undefined reference to `gdzm3000zi4zi0_GraphicsziGD_drawLine_closure' gd.o: In function `sUI_info': (.text+0x51a): undefined reference to `gdzm3000zi4zi0_GraphicsziGD_newImage_closure' gd.o: In function `sUI_info': (.text+0x6a5): undefined reference to `__stginit_gdzm3000zi4zi0_GraphicsziGD_' gd.o: In function `sVc_srt': (.data+0x34): undefined reference to `gdzm3000zi4zi0_GraphicsziGD_drawLine_closure' gd.o: In function `sVc_srt': (.data+0x38): undefined reference to `gdzm3000zi4zi0_GraphicsziGD_saveJpegFile_closure' gd.o: In function `sUI_srt': (.data+0x4c): undefined reference to `gdzm3000zi4zi0_GraphicsziGD_newImage_closure' collect2: ld returned 1 exit status

    Read the article

  • Circular reference error when outputting LINQ to SQL entities with relationships as JSON in an ASP.N

    - by roosteronacid
    Here's a design-view screenshot of my dbml-file. The relationships are auto-generated by foreign keys on the tables. When I try to serialize a query-result into JSON I get a circular reference error..: public ActionResult Index() { return Json(new DataContext().Ingredients.Select(i => i)); } But if I create my own collection of "bare" Ingredient objects, everything works fine..: public ActionResult Index() { return Json(new Entities.Ingredient[] { new Entities.Ingredient(), new Entities.Ingredient(), new Entities.Ingredient() }); } ... Also; serialization works fine if I remove the relationships on my tables. How can I serialize objects with relationships, without having to turn to a 3rd-party library? I am perfectly fine with just serializing the "top-level" objects of a given collection.. That is; without the relationships being serialized as well.

    Read the article

  • C#: Object reference not set to an instance of an object.

    - by Vinzcent
    Hey, I get the following error: Object reference not set to an instance of an object This is my C Sharp code: DataTable tableAcces = dsAcces.Tables["dsPrinterAcces"]; DataTable tableMDF = dsAcces.Tables["dsPrinterMDF"]; DataRow newrow = null; foreach(DataRow dr in tableAcces.Rows) { newrow = tableMDF.NewRow(); newrow["PRINTER_ID"] = dr["PRINTER_ID"]; newrow["MERK"] = dr["MERK"]; newrow["MODEL"] = dr["MODEL"]; newrow["LOKAAL_ID"] = dr["LOKAAL_ID"]; tableMDF.Rows.Add(newrow); } daMDF.Update(dsMDF, "dsPrinterMDF"); lblSucces.Text = "Gelukt. De tabel printers is overgezet."; } In this line, he throws the error: newrow = tableMDF.NewRow(); Thanks a lot, Vincent

    Read the article

  • Compiling ASP.Net 2.0 Application under .Net Framework 3.5 and Compiler reference Problems/errors .

    - by Steve Johnson
    Hi all I am converting an ASP.Net 2.0 Project to compile for .Net Framework 3.5 and facing the following compiler error for assembly reference... InternalXmlHelper.vb(9,0): error BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. It appears that there are duplicate assembly references one from 2.0 and the other from 3.5 but i have double checked it and its not the issue.. I have also googled around...with no success.. I have sure that i am doing some tiny mistake in additiona or removal of references,,,Is there any special thing that needs to be checked or done when compiling asp.net 2.0 project under .Net Framework 3.5 ? Kindly help. Thanks Regards

    Read the article

  • Need to upload files to google docs from my application and store reference to the uploaded file...

    - by Ali
    Hi guys - I'm working on a basic google applications based system. Like I earlier defined I'm building a simple ordering system and to each order placed I attach a file or document. I would like to be able to set it such that whatever file I upload is uploaded into google docs and I somehow am able to maintain a reference to that file from my own application i.e these files are concerned with such and such order. My application is google application based hopefully and I'm building it to be such for later on deployment into the cloud. How do I start on this and what do I need to do? Are there already working widgets I can use and apply or would I need to create my own customised solution for this? I'm working in Php MySQL.

    Read the article

  • Unable to understand "A field initializer cannot reference the nonstatic field" Error?

    - by Subhen
    Hi, I am getting the error "A field initializer cannot reference the nonstatic field", While My code is as below: Object selectedItem = PageVariables.slectedItemData; MyClass selectedItems = (MyClass)selectedItem; But the same thing works if assign the value at the constructor or in a different method , like below: public partial class MusicPlayer : Page { Object selectedItem = PageVariables.slectedItemData; public MusicPlayer() { InitializeComponent(); MyClass selectedItems = (MyClass)selectedItem; } } I am just trying to understand what is the difference, Why it is looking for a static varaible declaration(in 1st case) while doesn't look for it while in a constructor or a different method!!!

    Read the article

  • How to get a handle/reference to the current controller object inside a rails functional test?

    - by Dave Paroulek
    I must be missing something very simple, but can't find the answer to this. I have a method named foo inside bar_controller. I simply want to call that method from inside a functional test. Here's my controller: class BarsController < ApplicationController def foo # does stuff end end Here's my functional test: class BarsControllerTest << ActionController::TestCase def "test foo" do # run foo foo # assert stuff end end When I run the test I get: NameError: undefined local variable or method `foo' for #<BarsControllerTest:0x102f2eab0> All the documentation on functional tests describe how to simulate a http get request to the bar_controller which then runs the method. But I'd just like to run the method without hitting it with an http get or post request. Is that possible? There must be a reference to the controller object inside the functional test, but I'm still learning ruby and rails so need some help.

    Read the article

  • How do I get a value of a reference type in an Expression?

    - by Jon Kruger
    I have this method: public void DoSomething<T>(Expression<Func<T, object>> method) { } If this method is called like this: DoSomething(c => c.SomeMethod(new TestObject())); ... how do I get the value of the parameter that was passed into SomeMethod()? If the parameter is a value type, this works: var methodCall = (MethodCallExpression)method.Body; var parameterValue = ((ConstantExpression)methodCall.Arguments[0]).Value; However, when I pass in a reference type, methodCall.Arguments[0] is a MemberExpression, and I can't seem to figure out how to write code to get the value out of it.

    Read the article

  • Operator precedence and struct definition in C

    - by Yktula
    struct struct0 { int a; }; struct struct1 { struct struct0 structure0; int b; } rho; &rho->structure0; /* Reference 1 */ (struct struct0 *)rho; /* Reference 2 */ (struct struct0)rho; /* Reference 3 */ From reference 1, does the compiler take the address of rho, and then access structure0, or vice-versa? What does the line at reference 2 do? Since structure0 is the first member of struct1, would reference 3 be equivalent to reference 1?

    Read the article

  • Adding an Object to Vector loses Reference using Java?

    - by thechiman
    I have a Vector that holds a number of objects. My code uses a loop to add objects to the Vector depending on certain conditions. My question is, when I add the object to the Vector, is the original object reference added to the vector or does the Vector make a new instance of the object and adds that? For example, in the following code: private Vector numbersToCalculate; StringBuffer temp = new StringBuffer(); while(currentBuffer.length() > i) { //Some other code numbersToCalculate.add(temp); temp.setLength(0); //resets the temp StringBuffer } What I'm doing is adding the "temp" StringBuffer to the numbersToCalculate Vector. Should I be creating a new StringBuffer within the loop and adding that or will this code work? Thanks for the help! Eric

    Read the article

  • How to reference a sql server with a slash (\) in its name?

    - by Bill Paetzke
    Givens: One SQL Server is named: DevServerA Another is named: DevServerB\2K5 Problem: From DevServerA, how can I write a query that references DevServerB\2K5? I tried a sample, dummy query (running it from DevServerA): SELECT TOP 1 * FROM DevServerB\2K5.master.sys.tables And I get the error: Msg 102, Level 15, State 1, Line 2 Incorrect syntax near '\.'. However, I know my syntax is almost correct, since the other way around works (running this query from DevServerB\2K5): SELECT TOP 1 * FROM DevServerA.master.sys.tables Please help me figure out how to reference DevServerB\2K5 from DevServerA. Thanks.

    Read the article

  • How to get reference to SqlConnection (or Connection string) in Castle ActiveRecord?

    - by VoimiX
    how can I get reference to current SqlConnection or Sqlconnection in config? I found http://svn.castleproject.org:8080/svn/castle/trunk/ActiveRecord/Castle.ActiveRecord.Tests/DifferentDatabaseScopeTestCase.cs and code private string GetSqlConnection() { IConfigurationSource config = GetConfigSource(); IConfiguration db2 = config.GetConfiguration(typeof(ActiveRecordBase)); string conn = string.Empty; foreach (IConfiguration child in db2.Children) { if (child.Name == "connection.connection_string") { conn = child.Value; } } return conn; } But I cant understand where I can find "GetConfigSource" implementation? Is this standart Castle helper function or not? I use these namespaces using Castle.ActiveRecord; using NHibernate.Criterion; using NHibernate; using Castle.Core.Configuration; using Castle.ActiveRecord.Framework;

    Read the article

  • What does Visual Studio 2008 do when I add an assembly reference?

    - by tk-421
    When I add a reference to an assembly (living in the GAC) to web.config in an ASP.NET project, what does Visual Studio do? [This is related to an earlier question pertaining to BusinessObjects: http://stackoverflow.com/questions/2379615/ ] When I add "CrystalDecisions.Enterprise" and "CrystalDecisions.Enterprise.Framework" to the assemblies element in web.config, VS thinks long and hard about it, locking me out for a couple of minutes while it scrutinizes the newcomers. What is it doing during this time? I Googled this but came up empty. I can make some educated guesses (IntelliSense integration, perhaps?) but would ideally like to find some documentation describing exactly what's going on. Ultimately I'm hoping to learn why these BO references are making VS take several minutes to open my projects (I struck out on the SAP forums).

    Read the article

  • Is it OK to reference 'this' when initializing a field?

    - by parxier
    Is it OK to reference this when initializing a field? public class MainClass { private SomeFieldClass field = new SomeFieldClass(this); public MainClass() {} } Or is it better to do that in constructor? public class MainClass { private SomeFieldClass field; public MainClass() { this.field = new SomeFieldClass(this); } } What is the best practice? I believe first option is better for unit testing and dependency injection. Are there any problems with it?

    Read the article

  • C#: How to distribute a folder as a reference?

    - by Thx4UrHelp
    Hi everyone, I am making a C# app and I am using GeckoFX to embed Firefox into my app. For anyone interested, I got it here: http://geckofx.org/. The problem is, I want to deploy GeckoFX with my app and I don't know how to do it. The line of code I use to initialize GeckoFX is this: Skybound.Gecko.Xpcom.Initialize("C:\\xulrunner"); This assumes that the xulrunner folder is at C:\xulrunner. So, my questions is this: how do I add the xulrunner folder as a reference in my app so it's copied relative to where my app is (or at least in a place where my app can find it)? Thanks so much everyone!

    Read the article

  • How to set a reference from one object to another?

    - by Tzur Gazit
    Hi, Imagine the obvious model of employees and departments, where each employee must refer to a single department, and each department may have none to many employees. For Employee I have a pointer to Department, and I set its value to the address of the object of the relevant Department. When I try to save the Employee I get an error: 2010-04-07 10:05:22.491 CoreData2[1112:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: Department)' I tried, just for testing, to make the reference from Employee to Department optional, but I get the same result. I'm having my first steps in CoreData so please be as clear and simple as you can. Thanks, Tzur.

    Read the article

  • How to reference another project in Eclipse with Google appengine project?

    - by virsir
    I am trying to extract some common classes out to be a common jar, and I want to reference it by the appengine project in Eclipse. It compiles well but could not run. The console just told that some classes from the common jar project could not be found. I know I can just export the project into a jar, but I may want to change it sometimes, so I prefer keep it dynamic. And I know maven may be an option but there is no official maven support for appengine, and I will not try to learn it. Then how can I make it work?

    Read the article

  • What is the easiest way to reference libraries in Qt projects?

    - by Jake Petroules
    I have two Qt4 Gui Application projects and one shared library project, all referenced under a .pro file with the "subdirs" template. So, it's like: exampleapp.pro app1.pro app2.pro sharedlib.pro Now, what I want to do is reference sharedlib from app1 and app2 so that every time I run app1.exe, I don't have to manually copy sharedlib.dll from its own folder to app1.exe's folder. I could set PATH environment variable in the projects window, but this isn't very portable. I've looked at putting the LIBS variable in the app1.pro file, but I'm not sure if that refers to statically linked libraries only - I've tried it with various syntaxes and it doesn't seem to work with shared libs.

    Read the article

  • Can I to remove the labels from the bibliography and keeping it in the reference?

    - by Tae
    I'm writing the bibliography of my report with thebibliography environment because I don't need a BibTeX database (or I don't have the time for learn how to customize or write a style). Well, using the optional argument [label] I can specify as I want the cite references are show, for example: \bibitem[PNUD1996]{PNUD1996} PNUD. Desarrollo Humano en Chile 1996. Santiago: PNUD, 1996. So, if I write: in \cite{PNUD1996}. it produces: in [PNUD1996]. But the label also appear in the bibliography: [PNUD1996] PNUD. Desarrollo Humano en Chile 1996. Santiago: PNUD, 1996. Can I to remove the label from the bibliography and keeping it in the reference? I mean, to get: in [PNUD1996]. and PNUD. Desarrollo Humano en Chile 1996. Santiago: PNUD, 1996. Thanks, and sorry for my English :(

    Read the article

  • How do I add a reference to a Web Application Project in an Associated Class Library?

    - by 5arx
    I'm working on an internet application that has been set up as a web SITE project (I know...) in Visual Studio. I need to add additional features/functionality so have added a class library to the project and referred to it in the main web site project. The issue now arises because I need to make use of core objects which live inside the App_Code directory in the web site project but this project doesn't appear to expose its DLL like web app/ code library projects do. Because of this I can't add a reference to the web site project in the class library to leverage the common site-wide code/objects. I can't move the stuff out of App_Code so I'm looking for a way to refer to the website project dll from the new class library. Can anyone suggest a workaround? All help v. gratefully received :-)

    Read the article

  • In MSSQL, how do I create a reference variable to a table?

    - by Jón Trausti
    Hello. I'm currently using sp_executesql to execute a T-SQL statement with a dynamic table name. However, it is really ugly to see something like: set sql = 'UPDATE '+Table_Name+' SET ... WHERE '+someVar+' = ... AND '+someVar2' = ...' sp_executesql sql What I would rather like to have is a TABLE variable of which is a reference to a table, so I could do for example: UPDATE TableRef SET ... WHERE ... Because when I have really long T-SQL statements it gets really hard to read due to the format of it within a string. Any suggestions would be helpful. Thanks!

    Read the article

  • How to get a reference to a method's caller object from within the method in Objective-C

    - by shakeelw
    Hi guys. I have a few text fields and text views on my application's view. The keyboard comes up when I click in anyone of them. I have a method that gets called when any one of these objects is tapped in. However, I would like the method to execute its code only if the a certain Text Field(s) or a certain Text View(s) is tapped in. I would therefore like to have something like this in the method body: { if(currentField != mySpecialField) {return;} //Rest of the method code... } Now, my question is, how do I get a reference to the currently tapped in field so that I can perform the if-check. Thanks guys. I'm a total noobee in Objective-C. :(

    Read the article

  • Keep a reference to an NSThread around and message its objects?

    - by RickiG
    Hi I am a bit uncertain on how to do this: I start a "worker-thread" that runs for the duration of my apps "life". [NSThread detachNewThreadSelector:@selector(updateModel) toTarget:self withObject:nil]; then - (void) updateModel { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; BackgroundUpdate *update = [[BackgroundUpdate alloc] initWithTimerInterval:5]; [[NSRunLoop currentRunLoop] run]; //keeps it going 'forever' [update release]; [pool release]; } Now the thread "wakes" up every 5 seconds(initWithTimerInterval) to see if there are any tasks it can do. All the tasks in the BackGroundUpdate Class are only time dependent for now. I would like to have a few that were "event dependent". e.g. I would like to call the Background Object from my main thread and tell it to "speedUp", "slowDown", "reset" or any method on the object. To do this I guess I need something like performSelectorOnThread but how to get a reference to the NSthread and the Background Object?

    Read the article

  • Silverlight 3 and System.ServiceProcess - Doesn't allow the reference to be added.

    - by Brad8118
    I'm trying to write a program that can stop and start services using SilverLight 3 and VS2010. I can't add the reference to the System.ServiceProcess dll. C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.ServiceProcess.dll 1st why? - It it just a security precaution? 2- Is there a work around? Does SilverLight have a different library that I can use to start and stop services. Also note that this is a desktop application and not a web app. It will be sitting on my desktop to toggle services on and off.

    Read the article

  • How to create an object reference to a xaml page from App.xaml.cs codebehind?

    - by John K.
    Hi all, I have a Silverlight 4 Business Project where I have enabled the ASP.NET Authentication/Authorization role information. I would like to pass the currently authenticated user's account information from the app.xaml.cs codebehind to a different XAML page, but I have no idea how that is done, or if it's even possible. My goal is to databind the IsEnabled property of various buttons of my target XAML page, based on whether the current user is in a particular admin related role or not. The Application_UserLoaded event handler of app.xaml.cs seems to be the safest event handler to initiate this task because it fires only after the user's account information is loaded from the server. I had previously attempted to retrieve the current user information directly from my target XAML page, but I was never getting the current user information because Application_UserLoaded hadn't finished loading the current user info yet. public partial class App : Application { private void Application_UserLoaded(LoadUserOperation operation) { // How do you create an object reference to a XAML page from your project solution // from this event handler? } } Thanks in advance for any assistance, John

    Read the article

< Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >