Search Results

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

Page 3/604 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Visual Studio Snippets: How to reference an assembly that is not in the GAC

    - by user334220
    Hi, I have a 3rd party non-signed assembly that I want to reference in several projects. So I created a snippet to add the reference and the relative imports I tried the following, and several variations with full paths, without file:// etc, to no avail. Any ideas? ... <Snippet> <References> <Reference> <Assembly>MyAssemly.dll</Assembly> <Url>file://C:\Program Files\MyProduct</Url> </Reference> </References> <Imports> <Import> ...

    Read the article

  • Passing a DefaultHttpClient between activites

    - by searchMaker
    Hi all, I am trying to maintain my session variables that I get back in a cookie from my website in my DefaultHttpClient by passing the client between activities. Simply put how can I pass this object between activities to maintain my session variables? Bundle.put... doesn't seem to support this object. If it does how does it work with DefaultHttpClient? Thanks in advance to anyone who can help.

    Read the article

  • Canonical pattern reference in Actors programming model.

    - by Bubba88
    Hello! Is there a source, which I could use to learn some of the most used and popular practices regarding Actor-/Agent-oriented programming. My primary concern is about parallelism and distribution limited to the mentioned scheme - Actors, message passing. Should I begin with Erlang documentation or maybe there is any kind of book that describes the most important building blocks when programming Actor-oriented? Thank you! (Most useful examples would be in Scala or F#)

    Read the article

  • what functions are called when passing value to function

    - by Tim
    In C++, if an object of a class is passed as a parameter into a function, the copy constructor of the class will be called. I was wondering if the object is of nonclass type, what function will be called? Similarly in C, what function is called when passing values or address of variables into a function? Thanks and regards!

    Read the article

  • Passing data between asp.net pages

    - by user204588
    Hello, I'm wondering the opinion of what is the best way to pass a lot of values between pages. I was thinking of either saving the values to a database, using context.Items[], or Session[]. I'm not sure about what is the best method. I'm passing probably around 40 variables.

    Read the article

  • Regular Expressions Reference Tables Updated

    - by Jan Goyvaerts
    The regular expressions reference on the Regular-Expressions.info website was completely overhauled with the big update of that site last month. In the past, the reference section consisted of two parts. One part was a summary of the regex features commonly found in Perl-style regex flavors with short descriptions and examples. This part of the reference ignored differences between regex flavors and omitted most features that don’t have wide support. The other part was a regular expression flavor comparison that listed many more regex features along with YES/no indicators for many regex flavors, but without any explanations of the features. When reworking the site, I wanted to make the reference section more detailed, with descriptions and examples of all the syntax supported by the flavors discussed on the site. Doing that resulted in a reference that lists many features that are only supported by a few regex flavors. For such a reference to be usable, it needs to indicate which flavors support each feature. My original design for the new reference table used two rows for each feature. The first row had 4 columns with a label, syntax, description, and example, similar to the old reference tables. The second row had 20 columns indicating which versions of which flavors support these features. While the double-row design allowed all the information to fit within the table without requiring horizontal scrolling, it made it more difficult to quickly scan the tables for the feature you’re looking for. To make the new reference tables easier to read, they now have only a single row for each feature. The first 4 columns are the same as before. The remaining two columns show which versions of two regular expression flavors support the feature. You can use the drop-down lists above the table to choose the flavors the table should indicate. The site uses cookies to allow the flavor choices to persist while you navigate the reference. The result of this latest update is that the new regex tables are now just as easy to read as the ten-year-old tables on the old site were, while still covering all the features big and small of all the flavors discussed on the site.

    Read the article

  • Which reference provides your definition of "elegant" or "beautiful" code?

    - by Donnied
    This question is phrased in a very specific way - it asks for references. There was a similar question posted which was closed because it was considered a duplicate to a good code question. The Programmers FAQ points out that answers should have references - or its just an unproductive sharing of (seemingly) baseless opinions. There is a difference between shortest code and most elegant code. This becomes clear in several seminal texts: Dijkstra, E. W. (1972). The humble programmer. Communications of the ACM, 15(10), 859–866. Kernighan, B. W., & Plauger, P. J. (1974). Programming style: Examples and counterexamples. ACM Comput. Surv., 6(4), 303–319. Knuth, D. E. (1984). Literate programming. The Computer Journal, 27(2), 97–111. doi:10.1093/comjnl/27.2.97 They all note the importance of clarity over brevity. Kernighan & Plauger (1974) provide descriptions of "good" code, but "good code" is certainly not synonymous with "elegant". Knuth (1984) describes the impo rtance of exposition and "excellence of style" to elegant programs. He cites Hoare - who describes that code should be self documenting. Dijkstra (1972) indicates that beautiful programs optimize efficiency but are not opaque. This sort of conversation is qulaitatively different than a random sharing of opinions. Therefore, the question - Which reference provides your definition of "elegant" or "beautiful" code? "Which *reference*" is not subjective - anything else will most likely shut the thread down, so please supply *references* not opinions.

    Read the article

  • C# out parameter value passing..

    - by Pandiya Chendur
    I am using contactsreader.dll to import my gmail contacts... One of my method has out parameter... I am doing this, Gmail gm = new Gmail(); DataTable dt = new DataTable(); string strerr; gm.GetContacts("[email protected]", "******", true, dt,strerr); // It gives invalid arguments error.. and my gmail class has, public void GetContacts(string strUserName, string strPassword,out bool boolIsOK, out DataTable dtContatct, out string strError); Am i passing the correct values for out parameters...

    Read the article

  • Ruby - Call method passing values of array as each parameter

    - by Markus Orreilly
    I'm currently stuck on this problem. I've hooked into the method_missing function in a class I've made. When a function is called that doesn't exist, I want to call another function I know exists, passing the args array as all of the parameters to the second function. Does anyone know a way to do this? For example, I'd like to do something like this: class Blah def valid_method(p1, p2, p3, opt=false) puts "p1: #{p1}, p2: #{p2}, p3: #{p3}, opt: #{opt.inspect}" end def method_missing(methodname, *args) if methodname.to_s =~ /_with_opt$/ real_method = methodname.to_s.gsub(/_with_opt$/, '') send(real_method, args) # <-- this is the problem end end end b = Blah.new b.valid_method(1,2,3) # output: p1: 1, p2: 2, p3: 3, opt: false b.valid_method_with_opt(2,3,4) # output: p1: 2, p2: 3, p3: 4, opt: true (Oh, and btw, the above example doesn't work for me)

    Read the article

  • $.(ajax) wrapper for Jquery - passing parameters to delegates

    - by gnomixa
    I use $.(ajax) function extensively in my app to call ASP.net web services. I would like to write a wrapper in order to centralize all the ajax calls. I found few simple solutions, but none address an issue of passing parameters to delegates, for example, if i have: $.ajax({ type: "POST", url: "http://localhost/TemplateWebService/TemplateWebService/Service.asmx/GetFoobar", data: jsonText, contentType: "application/json; charset=utf-8", dataType: "json", success: function(response) { var results = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d; OnSuccess(results, someOtherParam1, someOtherParam2); }, error: function(xhr, status, error) { OnError(); } }); The wrapper to this call would have to have the way to pass someOtherParam1, someOtherParam2 to the OnSuccess delegate...Aside from packing the variables into a generic array, I can't think of other solutions. How did you guys address this issue?

    Read the article

  • Passing expression as a parameter in Call by reference

    - by darkie15
    All, When we are passing an expression as a parameter, how does the evaluation occur? Here is a small example. This is just a pseudocode kind of example: f (x,y) { y = y+1; x = x+y; } main() { a = 2; b = 2; f(a+b, a) print a; } When accessing variable x in f, does it access the address of the temp variable which contains the result of a+b or will it access the individual addresses of a and b and then evaluate the value of a+b Please help. Regards, darkie15

    Read the article

  • PHP: passing GET between multiple pages

    - by aterimperator
    I'm building a set of pages where I have a number of GET variables and it is often valuable to keep passing it along to the next page. This leads to ugly code where I have to have "if this $_GET variable is set, dynamically add it to this hyperlink". This is, in many senses, not a problem; but I had the thought "there must be a better way to do this", I mean after all basically all I want is to take the '?' and everything after it and append it to the links on that page, it would seem this should be rather simple (or at least possible to do in a for loop). I tried google searching but couldn't find anything, so I figured I'd see if any of you happen to know. Why not use SESSION? Because these pages need to be capable of being bookmarked. Thank you.

    Read the article

  • Good reference for Cisco Resilient Ethernet Protocol

    - by Karthik
    I have been trying to understand Cisco's Resilient Ethernet Protocol, but am unable to find a proper source to read from. I checked the Cisco site and also their White Paper on REP. But none of them helped to understand REP clearly. Googling was also of not much help, as all I got was explanation about configuration instructions and not on the protocol itself. Can you guys point me to a good book or site, which explains Resilient Ethernet Protocol in detail? Thanks in advance.

    Read the article

  • return value (not a reference) from the function, bound to a const reference in the calling function

    - by brainydexter
    "If you return a value (not a reference) from the function, then bind it to a const reference in the calling function, its lifetime would be extended to the scope of the calling function." So: const BoundingBox Player::GetBoundingBox(void) { return BoundingBox( &GetBoundingSphere() ); } Returns a value of type const BoundingBox from function GetBoundingBox() Called function: (From within function Update() the following is called:) variant I: (Bind it to a const reference) const BoundingBox& l_Bbox = l_pPlayer->GetBoundingBox(); variant II: (Bind it to a const copy) const BoundingBox l_Bbox = l_pPlayer->GetBoundingBox(); Both work fine and I don't see the l_Bbox object going out of scope. (Though, I understand in variant one, the copy constructor is not called and thus is slightly better than variant II). Also, for comparison, I made the following changes. BoundingBox Player::GetBoundingBox(void) { return BoundingBox( &GetBoundingSphere() ); } with Variants: I BoundingBox& l_Bbox = l_pPlayer->GetBoundingBox(); and II: BoundingBox l_Bbox = l_pPlayer->GetBoundingBox(); The objet l_Bbox still does not out scope. So, I don't see how "bind it to a const reference in the calling function, its lifetime would be extended to the scope of the calling function", really extends the lifetime of the object to the scope of the calling function ? Am I missing something trivial here..please explain .. Thanks a lot

    Read the article

  • Failed at linking C++ [undefined reference boost::filesystem3 ... ]

    - by Pphax
    i'm having some troubles compiling my work, i'm using ubuntu with g++! i get a lot of these messages: undefined reference to `boost::filesystem3::directory_entry::m_get_status(boost::system::error_code*) const' undefined reference to `boost::filesystem3::path::extension() const' undefined reference to `boost::filesystem3::path::filename() const' undefined reference to `boost::filesystem3::path::filename() const' (etc...) I've searched and found maaany answers but none of those work for me. [...] -lboost_system (/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/libboost_system.so) -lboost_filesystem (/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/libboost_filesystem.so) [...] (when linking it shows those two libraries, i'm guessing the error is related to the second one. hax@lap:~$ locate libboost_filesystem.so /home/hax/boost_1_47_0/bin.v2/libs/filesystem/build/gcc-4.4.5/release/threading-multi/libboost_filesystem.so.1.47.0 /home/hax/boost_1_47_0/stage/lib/libboost_filesystem.so /home/hax/boost_1_47_0/stage/lib/libboost_filesystem.so.1.47.0 /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem.so.1.42.0 /usr/local/lib/libboost_filesystem.so /usr/local/lib/libboost_filesystem.so.1.47.0 this is the related line on my makefile: -L. -L../bncsutil/src/bncsutil/ -L../StormLib/stormlib/ -L../boost/lib/ -lbncsutil -lpthread -ldl -lz -lStorm -lmysqlclient_r -lboost_date_time -lboost_thread -lboost_system -lboost_filesystem -Wl -t I tried pointing with -L several different places where i saw filesystem.so was located but it didn't work! Can anyone see the problem in those lines? if you need me to put some extra data i'll do it, i'm not seeing the problem :( Thanks :)

    Read the article

  • C# - Calling ToString() on a Reference Type

    - by nfplee
    Given two object arrays I need to compare the differences between the two (when converted to a string). I've reduced the code to the following and the problem still exists: public void Compare(object[] array1, object[] array2) { for (var i = 0; i < array1.Length; i++) { var value1 = GetStringValue(array1[i]); var value2 = GetStringValue(array2[i]); } } public string GetStringValue(object value) { return value != null && value.ToString() != string.Empty ? value.ToString() : ""; } The code executes fine no matter what object arrays I throw at it. However if one of the items in the array is a reference type then somehow the reference is updated. This causes issues later. It appears that this happens when calling ToString() against the object reference. I have updated the GetStringValue method to the following (which makes sure the object is either a value type or string) and the problem goes away. public string GetStringValue(object value) { return value != null && (value.GetType().IsValueType || value is string) && value.ToString() != string.Empty ? value.ToString() : ""; } However this is just a temporary hack as I'd like to be able to override the ToString() method on my reference types and compare them as well. I'd appreciate it if someone could explain why this is happening and offer a potential solution. Thanks

    Read the article

  • C++ reference variable again!!!

    - by kumar_m_kiran
    Hi All, I think most would be surprised about the topic again, However I am referring to a book "C++ Common Knowledge: Essential Intermediate Programming" written by "Stephen C. Dewhurst". In the book, he quotes a particular sentence (in section under Item 5. References Are Aliases, Not Pointers), which is as below A reference is an alias for an object that already exists prior to the initialization of the reference. Once a reference is initialized to refer to a particular object, it cannot later be made to refer to a different object; a reference is bound to its initializer for its whole lifetime Can anyone please explain the context of "cannot later be made to refer to a different object" Below code works for me, #include <iostream> using namespace std; int main(int argc, char *argv[]) { int i = 100; int& ref = i; cout<<ref<<endl; int k = 2000; ref = k; cout<<ref<<endl; return 0; } Here I am referring the variable ref to both i and j variable. And the code works perfectly fine. Am I missing something? I have used SUSE10 64bit linux for testing my sample program. Thanks for your input in advance.

    Read the article

  • Passing Variable Length Arrays to a function

    - by David Bella
    I have a variable length array that I am trying to pass into a function. The function will shift the first value off and return it, and move the remaining values over to fill in the missing spot, putting, let's say, a -1 in the newly opened spot. I have no problem passing an array declared like so: int framelist[128]; shift(framelist); However, I would like to be able to use a VLA declared in this manner: int *framelist; framelist = malloc(size * sizeof(int)); shift(framelist); I can populate the arrays the same way outside the function call without issue, but as soon as I pass them into the shift function, the one declared in the first case works fine, but the one in the second case immediately gives a segmentation fault. Here is the code for the queue function, which doesn't do anything except try to grab the value from the first part of the array... int shift(int array[]) { int value = array[0]; return value; } Any ideas why it won't accept the VLA? I'm still new to C, so if I am doing something fundamentally wrong, let me know.

    Read the article

  • better way to pass by reference in Perl?

    - by JoelFan
    I am doing pass-by-reference like this: sub repl { local *line = \$_[0]; our $line; $line = "new value"; } sub doRepl { my $foo = "old value"; my ($replFunc) = @_; $replFunc->($foo); print $foo; # prints "new value"; } doRepl(\&repl); Is there a cleaner way of doing it? Prototypes don't work because I'm using a function reference (trust be that there's a good reason for using a function reference). I also don't want to use $_[0] everywhere in repl because it's ugly.

    Read the article

  • Visual Studio .dll Reference not found ?

    - by MarceloRamires
    I had never had this error before, and I didn't move any file, or exclude any reference. I'm getting this error (link). In the ajaxcontroltoolkit.dll.refresh file, I get a path to the DLL, but it is a path that was located in someone else's computer (who no longer is in charge of this). It might as well work if I just re-do the reference, but what is weird is that I've used this reference before, and had no problems. I don't know what triggered it.. Does anyone have any clue ? --[UPDATE]-- As expected, I've fixed it, but this question remains unanswered. Besides, the exact same problem with a coworker..

    Read the article

  • How to pass values between two Custom UITableViewCells in iphone

    - by Mithun
    I have two customized cells in an iphone UITableViewController and would like to capture the data in one cell into another..... I am currently unable to post images and pls assume the following points. There are two custom UITableViewcells 1) Notes Textfield in one customcell 2) Submit button in another text field. Now i want to pass data typed in the notes textfield to be available when I click the Submit button.... Is this possible? Please help....:(

    Read the article

  • Add Reference to a WCF Service Executable

    - by Sphynx
    I have 3 projects in my solution. 1 - client, 2 - server, 3 - WCF service library. Server executable exposes the service provided in the library. I need to add a reference to it, rather than to the library directly. When I open "Add Service Reference" and click "Discover", it only lists the library data, and doesn't list the executable server option. How do I reference a WCF executable service, so the client code would be generated automatically? I use VS 2010. Thanks for your help.

    Read the article

  • Reference non-GAC version of DLL in Visual Studio 2010

    - by Eric J.
    This is similar to Add Non-GAC reference to project but the solutions presented there don't seem to help. I have a WinForms UI Library (Krypton from ComponentFactory) installed in the GAC. There's a bug I want to track down in that library, so I added the source code to my solution, removed the old references from my WinForms project to Krypton DLLs, added them back as a project references, ensured Copy Local is set to true, double-checked that the path (on reference properties tab) points to my local project, and... ...the GAC version is still being used while debugging. I cannot set a breakpoint in the Krypton source, Debugger.Break() or other code changes to not execute, and when I start the Visual Studio 2010 debugger, I see a Loading from ... GAC_MISL message relating to the Krypton DLLs flash by in the VS 2010 status bar. The DLLs are not copied to the WinForm's Debug folder. How can I reference the "project" version of the files while debugging while leaving them registered in the GAC?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >