Search Results

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

Page 155/604 | < Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >

  • How Do I get the current instance from an AppDomain?

    - by Spanners
    Hi, I use the default appdomain (AD) which I use to create new appdomains (AD1) when required for running plugins in isolation. When creating the new domain I also wire up the AppDomainUnload event to allow me to call clean up code etc. The issue I seem to have is: 1) Create AD1 from AD 2) Run code in AD1 3) Call AD.Unload(AD1) The code switches to AD1 and calls the unloading event passing in a reference to the current AppDomain (AD1). At this point I'd like to get a reference to the current instance running in AD1 to call a shutdown method however there is no GetInstance on the AppDomain class. Any ideas how I can go about getting it?

    Read the article

  • What is my problem with ASP.NET pubslishing?

    - by Shankarooni
    I am done testing my site and I want to upload it to a site like this http://www.university.edu/mydepartment/myname the admin told me the server runs on .NET 3.5. So i used Linq ... now i tried to upload the site by two ways: when i just copy everything (with modification of web.config database settings) i get an error: CS0246: The type or namespace name 'DataClassesDataContext' could not be found (are you missing a using directive or an assembly reference?) Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 Note here it says version 2.0 did he just lie to me? or its my configuration mistake? anyway, i added the reference, nothing changes. I tried also publishing (Build, publish) with option to keep the pre-comiled site updatable, and I get one line saying: this is a makefile and should be deleted! what is going on?

    Read the article

  • Referenced Assembly won't load

    - by Pavel
    I've got a visual studio 2010 project which publishes an assembly called myAssembly.ddl. I then want to reference myAssembly.dll from an existing vs 2008 project. If I try to load the reference it comes up with an yellow exclamation mark next to it, suggesting that the assembly wasn't loaded. However, I'm not getting any error messages during that process. Obviously, if i try to import the namespace in my code it doesn't compile. Converting myAssembly.dll to a .net version 3.5 doesn help. Nor does copying the assembly to a different directory and referencing it from there. Any ideas?

    Read the article

  • Create a Sin wave line with Processing

    - by Nintari
    Hey everybody, first post here, and probably an easy one. I've got the code from Processing's reference site: float a = 0.0; float inc = TWO_PI/25.0; for(int i=0; i<100; i=i+4) { line(i, 50, i, 50+sin(a)*40.0); a = a + inc; } http://processing.org/reference/sin_.html However, what I need is a line that follows the curve of a Sin wave, not lines representing points along the curve and ending at the 0 axis. So basically I need to draw an "S" shape with a sin wave equation. Can someone run me through how to do this? Thank you in advance, -Askee

    Read the article

  • book with good examples for each implementation?

    - by ajsie
    i've read about design patterns and it seems that there are a lot of different design patterns to use. i wonder if there are some books that acts like a reference. "you want to build a framework, then consider this, this and this pattern". also giving some examples. then jumps to another implementation eg. search engine and gives some patterns and concrete examples to use. in this way you learn about the weakness and strength about each pattern and where they will fit, instead of just reading about every design pattern decoupled from each other. are there good "reference sheets" or other tutorials good for a beginner at this? thanks

    Read the article

  • How to Embed Image in Outlook Signature?

    - by BlackMael
    Is it possible to create an HTML email signature for Outlook 2003 or above that doesn't reference external images? That is, using those special "cid" reference but embed the image itself in the signature and not on the file system or network. This is for an web application that generates a "standard" email signature based on various input from a user. It has worked fine so far with a single "embedded" image. But a new feature is going to require the possible addition of multiple tiny images. Getting to user to save one email signature template and one image to the user's machine is about the limit of what I'd like to require of the user. But forcing the user to save multiple images seem to be pushing things a little to far in my opinion. So my problem is trying to embed the images into without having to inconvenience the user with multiple downloads first.

    Read the article

  • different small js files per page VS. 1x site-wide js file?

    - by Haroldo
    Different pages of my site have different js needs (plugins mainly), some need a lightbox, some dont, some need a carousel, some dont etc. With regards to pageloading speed should i option 1 - reference each js file when it is needed: so one page might have: <script type="text/javascript" src="js/carousel/scrollable.js"></script> <script type="text/javascript" src="js/jquery.easydrag.js"></script> <script type="text/javascript" src="js/colorbox/jquery.colorbox-min.js"></script> and another have: <script type="text/javascript" src="st_wd_assets/js/carousel/scrollable.js"></script> <script type="text/javascript" src="st_wd_assets/js/typewatch.js"></script> option 2 - combine and compress into one site_wide.js file: so each page would reference: <script type="text/javascript" src="js/site_wide.js"></script> there would be unused selectors/event listeners though, how bad is this? I would include any plugin notes/accreditations at the top of the site_wide.js file

    Read the article

  • nginx rule to capture header and append value as query string

    - by John Schulze
    I have an interesting problem I need to solve in nginx: one of the sites I'm building receives inbound traffic on port 80 (and only port 80) which may have a certain header set in the request. If this header is present I need to capture the value of it and append that as a querystring parameter before doing a temporary redirect (rewrite) to a different (secure) server, while passing the paramater and any other querystring params along. This should be very doable, but how!? Many thanks, JS

    Read the article

  • different explanation

    - by Delirium tremens
    The following code echoes 5, not 10: $global_obj = null; class my_class { var $value; function my_class() { global $global_obj; $global_obj = &$this; } } $a = new my_class; $a->my_value = 5; $global_obj->my_value = 10; echo $a->my_value; "Upon first examination, it would seem that the constructor of my_class stores a reference to itself inside the $global_obj variable. Therefore, one would expect that, when we later change the value of $global_obj-my_value to 10, the corresponding value in $a would change as well. Unfortunately, the new operator does not return a reference, but a copy of the newly created object." Please, give me a different explanation.

    Read the article

  • Strange error: cannot convert from 'int' to 'ios_base::openmode'

    - by Dylan Klomparens
    I am using g++ to compile some code. I wrote the following snippet: bool WriteAccess = true; string Name = "my_file.txt"; ofstream File; ios_base::open_mode Mode = std::ios_base::in | std::ios_base::binary; if(WriteAccess) Mode |= std::ios_base::out | std::ios_base::trunc; File.open(Name.data(), Mode); And I receive these errors... any idea why? Error 1: invalid conversion from ‘int’ to ‘std::_Ios_Openmode’ Error 2: initializing argument 2 of ‘std::basic_filebuf<_CharT, _Traits* std::basic_filebuf<_CharT, _Traits::open(const char*, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits]’ As far as I could tell from a Google search, g++ is actually breaking the C++ standard here. Which I find quite astonishing, since they generally conform very strictly to the standard. Is this the case? Or am I doing something wrong. My reference for the standard: http://www.cplusplus.com/reference/iostream/ofstream/open/

    Read the article

  • listing the functions of a web service

    - by Jankhana
    hi, I wanted to make an application that will take either the path of the dll or Webservice and list me all the functions present in that dll. I accomplished the listing of the function using this but I am not able to list the functions of the Webservices. Using Assembly.GetMembers() it's listing the Function Name with the Parameters Type and I am not able to get the Parameters Name. How shall i get that? While debugging I found that m_parameters is a nonpublic member and i'm not able to get the Parameter name. Is that possible??? And one more question is how shall i list the functions available in the web service without including the web reference or service reference in the windows application using C#.

    Read the article

  • [PRISM2] Added view does not appear on screen

    - by Jeaffrey Gilbert
    Why my "mainRegion.Activate(view);" doesn't display the view on screen? It only works if I remove the default view that registered (RegisterViewWithRegion) in ModuleInit.cs though I don't put .Activate() after I added a View. But a problem occurs if I move to other module, and get back to module which default view has been removed, I get blank page. Any clues? Thank you. *) I prefer not to remove default view, but only with Activate(view) can show the View I want as explained in my reference. reference: http://msdn.microsoft.com/en-us/library/dd458899.aspx

    Read the article

  • Get class of caller's method (via inspect) in Python; or: super(Class,self).method() replacement wit

    - by Slava Vishnyakov
    Is it possible to get reference to class B in this example? class A(object): pass class B(A): def test(self): test2() class C(B): pass import inspect def test2(): frame = inspect.currentframe().f_back cls = frame.[?something here?] # cls here should == B (class) c = C() c.test() Basically, C is child of B, B is child of A. Then we create c of type C. Then the call to c.test() actually calls B.test() (via inheritance), which calls to test2(). test2() can get the parent frame frame; code reference to method via frame.f_code; self via frame.f_locals['self']; but type(frame.f_locals['self']) is C (of course), but not B, where method is defined. Any way to get B?

    Read the article

  • Does .NET have a linker?

    - by Water Cooler v2
    From Jon Skeet's blog: What does the following comment mean? // The line below only works when linked rather than // referenced, as otherwise you need a cast. // The compiler treats it as if it both takes and // returns a dynamic value. string value = com.MakeMeDynamic(10); I understand what referencing an assembly is. You may reference it when compiling the program files either using the /ref: switch at the command line or you may add a statically reference to the assembly in Visual Studio. But how do you link to an assembly in .NET? Does he mean, load the assembly using Reflection (Assembly.LoadFile())? Or, the Win32 API LoadLibrary()? Or, does .NET have a linker that I have never heard of?

    Read the article

  • Include headers in header file?

    - by Mohit Deshpande
    I have several libraries made by myself (a geometry library, a linked list library, etc). I want to make a header file to include them all in one lib.h. Could I do something like this: #ifndef LIB_H_ #define LIB_H_ #include <stdio.h> #include <stdlib.h> #include <linkedlist.h> #include <geometry.h> .... #endif Then I could just reference this one library and actually reference multiple libraries. Is this possible? If not, is there a way around it?

    Read the article

  • Is there a memory leak here?

    - by TheLearner
    Please see my comments in code: -(id)initWithCoordinate:(CLLocationCoordinate2D)c title:(NSString *)t { [super init]; coordinate = c; NSDate *today = [NSDate date]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterLongStyle]; NSString* formattedDate = [NSString stringWithFormat:@"%@ %@", [dateFormatter stringFromDate:today], t]; [self setTitle:formattedDate]; //Why does the app crash when I try and release formattedDate? I have after all passed its reference to the title property? [dateFormatter release]; //I need to release the dateformatter because I have finished using it and I have not passed on a reference to it return self; }

    Read the article

  • Supporting multiple instances of a plugin DLL with global data

    - by Bruno De Fraine
    Context: I converted a legacy standalone engine into a plugin component for a composition tool. Technically, this means that I compiled the engine code base to a C DLL which I invoke from a .NET wrapper using P/Invoke; the wrapper implements an interface defined by the composition tool. This works quite well, but now I receive the request to load multiple instances of the engine, for different projects. Since the engine keeps the project data in a set of global variables, and since the DLL with the engine code base is loaded only once, loading multiple projects means that the project data is overwritten. I can see a number of solutions, but they all have some disadvantages: You can create multiple DLLs with the same code, which are seen as different DLLs by Windows, so their code is not shared. Probably this already works if you have multiple copies of the engine DLL with different names. However, the engine is invoked from the wrapper using DllImport attributes and I think the name of the engine DLL needs to be known when compiling the wrapper. Obviously, if I have to compile different versions of the wrapper for each project, this is quite cumbersome. The engine could run as a separate process. This means that the wrapper would launch a separate process for the engine when it loads a project, and it would use some form of IPC to communicate with this process. While this is a relatively clean solution, it requires some effort to get working, I don't now which IPC technology would be best to set-up this kind of construction. There may also be a significant overhead of the communication: the engine needs to frequently exchange arrays of floating-point numbers. The engine could be adapted to support multiple projects. This means that the global variables should be put into a project structure, and every reference to the globals should be converted to a corresponding reference that is relative to a particular project. There are about 20-30 global variables, but as you can imagine, these global variables are referenced from all over the code base, so this conversion would need to be done in some automatic manner. A related problem is that you should be able to reference the "current" project structure in all places, but passing this along as an extra argument in each and every function signature is also cumbersome. Does there exist a technique (in C) to consider the current call stack and find the nearest enclosing instance of a relevant data value there? Can the stackoverflow community give some advice on these (or other) solutions?

    Read the article

  • NSArrayController that is sorted and unique (no duplicates) for use in a pop-up in a core-data app

    - by Douglas Weaver
    I have core data app with an entity OBSERVATION that has as one of its attributes DEALNAME. I want to reference through Interface Builder or by making custom modifications to an NSArrayController a list of unique sorted dealnames so that I can use them in a pop-up. I have attempted to use @distinctUnionOfSets (and @distinctUnionOfArrays) but am unable to locate the proper key sequence. I can sort the ArrayController by providing a sort descriptor, but do not know how to eliminate duplicates. Are the @distinct... keys the right methodology? It would seem to provide the easiest way to optimize the use of IB. Is there a predicate form for removing duplicates? Or do I need to use my custom controller to extract an NSSet of the specific dealnames, put them back in an array and sort it and reference the custom array from IB? Any help would be appreciated. I am astounded that other have not tried to create a sorted-unique pop-up in tableviews.

    Read the article

  • Connecting Delphi to P/Invoke and .net

    - by lexdean
    The Delphi complier often uses a *.Dll when a special delivery of code info is required to the complier/editor:- example bourland.dll is the memory manager for the Delphi complier, as I remember. And their are many other *.dll's that Embarcoo keep secret that do other things. Is their anything you know that is public information on this subject .net's un managed code could be declared in a *.pas file as a decelerations but the only way to communicate it out is calling *.dll's like P/Invoke I have ilasm.exe and ildasm.exe and a decomplier into Delphi asm code now but still getting around to learn how to use them all yet. I do not have any reference material/editorials on P/invoke at all as I cannot find anything With that I will have a good concrete plan to make a good result I do not know what *.DLL's are in P/Invoke. Do you have any documentation. I do not have any reference material/editorials on ADO.net. The Dlls that are called and any referqance matrial I could use. Best regards, J Lex Dean.

    Read the article

  • C#/.NET Project - Am I setting things up correctly?

    - by JustLooking
    1st solution located: \Common\Controls\Controls.sln and its project: \Common\Controls\Common.Controls\Common.Controls.csproj Description: This is a library that contains this class: public abstract class OurUserControl : UserControl { // Variables and other getters/setters common to our UserControls } 2nd solution located: \AControl\AControl.sln and its project: \AControl\AControl\AControl.csproj Description: Of the many forms/classes, it will contain this class: using Common.Controls; namespace AControl { public partial class AControl : OurUserControl { // The implementation } } A note about adding references (not sure if this is relevant): When I add references (for projects I create), using the names above: 1. I add Common.Controls.csproj to AControl.sln 2. In AControl.sln I turn off the build of Common.Controls.csproj 3. I add the reference to Common.Controls (by project) to AControl.csproj. This is the (easiest) way I know how to get Debug versions to match Debug References, and Release versions to match Release References. Now, here is where the issue lies (the 3rd solution/project that actually utilizes the UserControl): 3rd solution located: \MainProj\MainProj.sln and its project: \MainProj\MainProj\MainProj.csproj Description: Here's a sample function in one of the classes: private void TestMethod<T>() where T : Common.Controls.OurUserControl, new() { T TheObject = new T(); TheObject.OneOfTheSetters = something; TheObject.AnotherOfTheSetters = something_else; // Do stuff with the object } We might call this function like so: private void AnotherMethod() { TestMethod<AControl.AControl>(); } This builds, runs, and works. No problem. The odd thing is after I close the project/solution and re-open it, I have red squigglies everywhere. I bring up my error list and I see tons of errors (anything that deals with AControl will be noted as an error). I'll see errors such as: The type 'AControl.AControl' cannot be used as type parameter 'T' in the generic type or method 'MainProj.MainClass.TestMethod()'. There is no implicit reference conversion from 'AControl.AControl' to 'Common.Controls.OurUserControl'. or inside the actual method (the properties located in the abstract class): 'AControl.AControl' does not contain a definition for 'OneOfTheSetters' and no extension method 'OneOfTheSetters' accepting a first argument of type 'AControl.AControl' could be found (are you missing a using directive or an assembly reference?) Meanwhile, I can still build and run the project (then the red squigglies go away until I re-open the project, or close/re-open the file). It seems to me that I might be setting up the projects incorrectly. Thoughts?

    Read the article

  • htaccess for subdomain help

    - by Patrick
    Usually I just use the online tools for url mod_rewrite rules but this just wouldn't work. Dynamic url: http://sub.domain.com/index.php?page=index&name=test Rewritten url: http://sub.domain.com/test OR http://sub.domain.com/test/ My htaccess: RewriteRule ^([^/]+)/?$ index.php?page=index&name=$1 [L] Instead of passing "test" for the variable name, I always get the value "index.php" Anyone gurus has have any idea?

    Read the article

  • Where is the help.py for Android's monkeyrunner

    - by Keyboardsurfer
    Hi, I just can't find the help.py file in order to create the API reference for the monkeyrunner. The command described at the Android references monkeyrunner <format> help.py <outfile> does not work when i call monkeyrunner html help.py /path/to/place/the/doc.html. It's quite obvious that the help.py file is not found and the monkeyrunner also tells me "Can't open specified script file". But a locate on my system doesn't bring me a help.py file that has anything to do with monkeyrunner or Android. So my question is: Where did they hide the help.py file for creating the API reference?

    Read the article

  • Global Import Aliasing in .NET

    - by Josh Stodola
    Using import aliasing in a single class, we can reference class library namespaces by assigning our own custom alias like this: Imports Db = Company.Lib.Data.Objects And then we are able to reference the classes inside of Company.Lib.Data.Objects by using the Db alias that we assigned. Is it possible to do this at the global level so that the alias is applied to the entire solution instead of the given file? Currently, we are working with web applications, so I was hoping we could add something to web.config, but I am also interested in whether or not this is possible with windows forms, console apps, and/or class libraries.

    Read the article

  • What garbage collection algorithms do all 5 major browsers use?

    - by Martin Wittemann
    I am currently rethinking the object dispose handling of the qooxdoo JavaScript framework. Have a look at the following diagram (A is currently in scope): Let's say we want to delete B. Generally, we cut all reference between all objects. This means we cut connection 1 to 5 in the example. Is this really necessary? As far as I have read hear 1, browsers use the mark-and-sweep algorithm. In that case, we just need to cut reference 1 (connection to the scope) and 5 (connection to the DOM) which could be much faster. But can I be sure that all browsers use the mark-and-sweep algorithm or something similar? 1 http://stackoverflow.com/questions/864516/what-is-javascript-garbage-collection

    Read the article

  • Hibernate object equality checking

    - by Sujee
    As far as I understand(correct me if I am wrong) Hibernate uses object reference to check the object equality. When Hibernate identifies that there are more than one objects attached to same DB record, it throws following exception. "a different object with the same identifier value was already associated with the session" My question is, does Hibernate use equal() method to check the object equality (The default equal method uses object reference)? If it is true, will overridden equal() method change the Hibernate behavior? Note: My question is not about the issues of implementing equal() or hashCode() methods in a Hibernate persisted object. Thank you.

    Read the article

< Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >