Search Results

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

Page 23/604 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Drupal - Grabbing and Looping NID of CCK Nodereference field

    - by GaxZE
    Hello, cant seem to work out how i grab multiple nids of a node reference field. $node-field_name[0]['nid'] picks up the node id of the cck node reference field. however when that cck node reference field has more than one value i get stuck! my php is abit sketchy atm so working with arrays and loops is being quite difficult! here is my code: field_industry as $item) { ? "

    Read the article

  • Change Casing in WCF Service Reference

    - by Eric J.
    I'm creating a service reference to a web service written in Java. The generated classes now follow the Java casing convention used in the web service, for example class names are camelCase rather than PascalCase. Is there a way to get the desired casing from the service reference? CLARIFICATION: With WSE based services, one could modify the generated Reference.cs to provide .NET standard casing and use XmlElementAttribute to map to the Java naming presented by the external web service, like this: [System.Xml.Serialization.XmlElementAttribute("resultType", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] [System.Runtime.Serialization.DataMember] public virtual MyResultType ResultType { ... } Not terribly maintenance-friendly without writing custom code to either generate the proxy code or modify it after it's been generated. What I'm after is one or more options to present a WCF generated client proxy to calling applications using the .NET casing conventions, achieving the same as I did previously with WSE. Hopefully with less manual effort.

    Read the article

  • Does GC guarantee that cleared References are enqueued to ReferenceQueue in topological order?

    - by Dimitris Andreou
    Say there are two objects, A and B, and there is a pointer A.x --> B, and we create, say, WeakReferences to both A and B, with an associated ReferenceQueue. Assume that both A and B become unreachable. Intuitively B cannot be considered unreachable before A is. In such a case, do we somehow get a guarantee that the respective references will be enqueued in the intuitive (topological when there are no cycles) order in the ReferenceQueue? I.e. ref(A) before ref(B). I don't know - what if the GC marked a bunch of objects as unreachable, and then enqueued them in no particular order? I was reviewing Finalizer.java of guava, seeing this snippet: private void cleanUp(Reference<?> reference) throws ShutDown { ... if (reference == frqReference) { /* * The client no longer has a reference to the * FinalizableReferenceQueue. We can stop. */ throw new ShutDown(); } frqReference is a PhantomReference to the used ReferenceQueue, so if this is GC'ed, no Finalizable{Weak, Soft, Phantom}References can be alive, since they reference the queue. So they have to be GC'ed before the queue itself can be GC'ed - but still, do we get the guarantee that these references will be enqueued to the ReferenceQueue at the order they get "garbage collected" (as if they get GC'ed one by one)? The code implies that there is some kind of guarantee, otherwise unprocessed references could theoretically remain in the queue. Thanks

    Read the article

  • TFS Build Server Cannot find Assembly Reference

    - by Steve Syfuhs
    I looked at this post http://stackoverflow.com/questions/547468/assembly-references-wont-resolve-properly-on-our-build-server but it didn't help the issue. I am (extremely) new to TFS, and just installed 2010 on a VM. I imported a project and got everything working-ish. I went to create a new build through team explorer, and set it up to build on each check-in. It build's locally just fine, but when it's built on check-in it dies on a 3rd party assembly reference. The reference is not in the GAC, but part of the local references. There is only one 3rd party dll, and the projects only reference each other in the solution. I have a feeling I'm missing some important step with regards to TFS and references. Any ideas? EDIT: This a test installation...there is nothing else installed on this box, with the exception of SQL and IIS.

    Read the article

  • Out of Memory on Update or Delete of Service Reference

    - by Kelly
    I have a Service Reference for a WCF project that has just over a hundred endpoints in my ServiceHost web.config. Every time I attempt to update or delete the Service Reference, it fails with an out of memory exception. I am running Vista Ultimate SP2 64-bit with 8GB RAM. I can work around it by going outside the project and deleting the Service References folder, then coming back in and re-adding the Reference. Is this the only workaround that you know of? Thanks!

    Read the article

  • HASH reference error with HTTP::Message::decodable

    - by scarba05
    Hi, I'm getting an "Can't use an undefined value as a HASH reference" error trying to call HTTP::Message::decodable() using Perl 5.10 / libwww installed on Debian Lenny OS using the aptitude package manager. I'm really stuck so would appreciate some help please. Here's the error: Can't use an undefined value as a HASH reference at (eval 2) line 1. at test.pl line 4 main::__ANON__('Can\'t use an undefined value as a HASH reference at enter code here`(eval 2)...') called at (eval 2) line 1 HTTP::Message::__ANON__() called at test.pl line 6 Here's the code: use strict; use HTTP::Request::Common; use Carp; $SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; print HTTP::Message::decodable();

    Read the article

  • Web service reference location?

    - by Damien Dennehy
    I have a Visual Studio 2008 solution that's currently consisting of three projects: A DataFactory project for Business Logic/Data Access. A Web project consisting of the actual user interface, pages, controls, etc. A Web.Core project consisting of utility classes, etc. The application requires consuming a web service. Normally I'd add the service reference to the Web project, but I'm not sure if this is best practice or not. The following options are open to me: Add the reference to the Web project. Add the reference to the Web.Core project, and create a wrapper method that Web will call to consume the web service. Add a new project called Web.Services, and copy step 2. This project is expected to increase in size so I'm open to any suggestions.

    Read the article

  • WCF Service Library Reference in a Web Form (asp.net)

    - by Abu Hamzah
    i am not sure if this is the correct way of doing but i read that you not suppose to have a WCF Service Library reference in your web form project rather you add endpoints to your web.config, is that true? here is what i have done: 1) create a WCF service library project 2) create a simple service called "MyService.svc" WebForm: 1) Create a web project 2) create a WCF Service and in it i have this code <%@ ServiceHost Language="C#" Service="WCFJQuery.ContactBLL.Implementation.ContactUs" Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" %> 3) right click on the web proejct and "Add Reference" and add teh MyService.dll reference from WCF service library project. is this something how you suppose to do?

    Read the article

  • Adding Service Reference to a WCF Service in Silverlight project defaulting to XmlSerialization for

    - by Shravan
    Hi, I am adding a WCF Service Reference in a Silverlight project, it is generating code with XmlSerialization attributes for DataMembers than SOAP Serialization. But, if the same WCF service reference is added in an ASP.Net project, is generating code with SOAP Serialization attribtues. Can anybody let me know what could be the cause for it, and how can I force reference to generate SOAP Serialization? XmlSerialization - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1")] SOAP Serialization - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] These are the attributes in the code generated for types, which I am looking into when saying it is using XmlSerialization/SOAP Serialization

    Read the article

  • Returning references while using shared_ptrs

    - by Goose Bumper
    Suppose I have a rather large class Matrix, and I've overloaded operator== to check for equality like so: bool operator==(Matrix &a, Matrix &b); Of course I'm passing the Matrix objects by reference because they are so large. Now i have a method Matrix::inverse() that returns a new Matrix object. Now I want to use the inverse directly in a comparison, like so: if (a.inverse()==b) { ... }` The problem is, this means the inverse method needs to return a reference to a Matrix object. Two questions: Since I'm just using that reference in this once comparison, is this a memory leak? What happens if the object-to-be-returned in the inverse() method belongs to a boost::shared_ptr? As soon as the method exits, the shared_ptr is destroyed and the object is no longer valid. Is there a way to return a reference to an object that belongs to a shared_ptr?

    Read the article

  • Reference to a pointer question

    - by Yogesh Arora
    Please refer to the code below. In this code i am storing the const char* returned by test.c_str() into a reference. My question is Will the data be correctly refering to the contents of test. I am thinking that ptr returned by test.c_str() will be a temporary and if i bound it to a reference that reference will not be valid. Is my thinking correct class RefPtrTest { std::string test; StoringClass storingClass; public: RefPtrTest(): test("hello"), storingClass(test.c_str()) { } } where StoringClass is class StoringClass { const char*& data; public: StoringClass (const char*& input): data(input) { } }

    Read the article

  • C++0x rvalue references and temporaries

    - by Doug
    (I asked a variation of this question on comp.std.c++ but didn't get an answer.) Why does the call to f(arg) in this code call the const ref overload of f? void f(const std::string &); //less efficient void f(std::string &&); //more efficient void g(const char * arg) { f(arg); } My intuition says that the f(string &&) overload should be chosen, because arg needs to be converted to a temporary no matter what, and the temporary matches the rvalue reference better than the lvalue reference. This is not what happens in GCC and MSVC. In at least G++ and MSVC, any lvalue does not bind to an rvalue reference argument, even if there is an intermediate temporary created. Indeed, if the const ref overload isn't present, the compilers diagnose an error. However, writing f(arg + 0) or f(std::string(arg)) does choose the rvalue reference overload as you would expect. From my reading of the C++0x standard, it seems like the implicit conversion of a const char * to a string should be considered when considering if f(string &&) is viable, just as when passing a const lvalue ref arguments. Section 13.3 (overload resolution) doesn't differentiate between rvalue refs and const references in too many places. Also, it seems that the rule that prevents lvalues from binding to rvalue references (13.3.3.1.4/3) shouldn't apply if there's an intermediate temporary - after all, it's perfectly safe to move from the temporary. Is this: Me misreading/misunderstand the standard, where the implemented behavior is the intended behavior, and there's some good reason why my example should behave the way it does? A mistake that the compiler vendors have somehow all made? Or a mistake based on common implementation strategies? Or a mistake in e.g. GCC (where this lvalue/rvalue reference binding rule was first implemented), that was copied by other vendors? A defect in the standard, or an unintended consequence, or something that should be clarified?

    Read the article

  • Creating reference movies for iPhone on the fly

    - by Mad Oxyn
    We are working on an online mobile video app. The videos we want to play on mobile phones are being generated by a server, as there can be dynamic content in the server (based on user input). Now for iPhone we would like to play the video in the best possible resolution based on the connection speed at the time of downloading the movie. This can be done using reference movies. However, because our videos are being generated on the fly, we need to generate this reference movie on the fly as well. Is there a way to generate reference movies on the fly on a Linux server using some command line tool, PHP or Java? Or on a DOS server maybe? Any help will be much appreciated.

    Read the article

  • Alternates to C++ Reference/Pointer Syntax

    - by Jon Purdy
    What languages other than C and C++ have explicit reference and pointer type qualifiers? People seem to be easily confused by the right-to-left reading order of types, where char*& is "a reference to a pointer to a character", or a "character-pointer reference"; do any languages with explicit references make use of a left-to-right reading order, such as &*char/ref ptr char? I'm working on a little language project, and legibility is one of my key concerns. It seems to me that this is one of those questions to which it's easy for a person but hard for a search engine to provide an answer. Thanks in advance!

    Read the article

  • Alternatives to C++ Reference/Pointer Syntax

    - by Jon Purdy
    What languages other than C and C++ have explicit reference and pointer type qualifiers? People seem to be easily confused by the right-to-left reading order of types, where char*& is "a reference to a pointer to a character", or a "character-pointer reference"; do any languages with explicit references make use of a left-to-right reading order, such as &*char/ref ptr char? I'm working on a little language project, and legibility is one of my key concerns. It seems to me that this is one of those questions to which it's easy for a person but hard for a search engine to provide an answer. Thanks in advance!

    Read the article

  • When are referenced Assemblies loaded?

    - by Daniel
    I wrote a program that makes a reference to Microsoft.Web.Administration.dll, which is not present on Windows Server 2003. The program checks for the os and does not reference the dll if the os is 2003. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == WindowsServer2008) //reference the Microsoft.Web.Administration.dll file.<br> When I tested this program on Windows Server 2003, an error occured telling me it couldn't locate the Microsoft.Web.Administration.dll. But when I separated the if-else block into 2 different methods as below, and the error did not occur. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == WindowsServer2008) //DoIt2008Style(); So I wanted to know about reference file loading time in more detail. could you point me to some resources?

    Read the article

  • Getting Reference to Calling Activity from AsyncTask (NOT as an inner class)

    - by stormin986
    Is it at all possible, from within an AsyncTask that is NOT an inner class of the calling Activity class, to get a reference to the instance of Activity that initiated execution of the AsyncTask? I am aware of this thread, however it doesn't exactly address how to reference the calling Activity. Some suggest passing a reference to the Activity as a parameter to the AsyncTask constructor, however, it's reported that doing so will always result in a NullPointerException. So, I'm at a loss. My AsyncTask provides robust functionality, and I don't want to have to duplicate it as an inner class in every Activity that wants to use it. There must be an elegant solution.

    Read the article

  • How to reference filtered ng-repeat items from a controller in AngularJS

    - by ParkerDigital
    I have some JSON data that is rendered out via the ng-repeat directive, and the results are then filtered via some checkboxes/drop-downs, and some custom filter functions in my controller. I now want to add a function to my controller that is triggered by an 'ng-change' on some of the checkboxes, that can reference the current list of items in my 'ng-repeat'. I realise I can reference these values from a custom filter, for example $scope.filterProvider = function(item), but this function is then called for each and every item in the ng-repeat, which isn't what I want - I want the function to just be called each time a checkbox is checked/unchecked, and I need that function to be able to reference the items in my ng-repeat...does that make sense to anyone?! And if so, does anyone know how I can do that? Thanks :-)

    Read the article

  • Haproxy not properly passing on X-Forwarded-For header

    - by JesseP
    I have backend web servers that receive requests by way of haproxy-nginx-fastcgi. The web app used to see multiple ip's coming through in the X-Forwarded-For header, chained together with commas (most original IP on the left). At some point in the recent past (just noticed, so not sure what caused it) something changed, and now I'm only seeing a single IP passed in the header to my web application. I've tried with haproxy 1.4.21 and 1.4.22 (recent upgrade) with the same behavior. Haproxy has the forwardfor header set: option forwardfor Nginx fastcgi_params config defines this header to be passed to the app: fastcgi_param HTTP_X_FORWARDED_FOR $http_x_forwarded_for; Anyone have any ideas on what might be going wrong here? EDIT: I just started logging the $http_x_forwarded_for variable in nginx logs, and nginx is only ever seeing a single IP, which shouldn't ever be the case, as we should always see our haproxy ip added in there, right? So, issue must either be in nginx handling of the variable coming in, or haproxy not building it properly. I'll keep digging... EDIT #2: I enabled request and response header logging in HAProxy, and it is not spitting anything out for X-Forwarded-For, which seems very odd: Oct 10 10:49:01 newark-lb1 haproxy[19989]: 66.87.95.74:47497 [10/Oct/2012:10:49:01.467] http service/newark2 0/0/0/16/40 301 574 - - ---- 4/4/3/0/0 0/0 {} {} "GET /2zi HTTP/1.1" O Here are the options i set for this in my frontend: mode http option httplog capture request header X-Forwarded-For len 25 capture response header X-Forwarded-For len 25 option httpclose option forwardfor EDIT #3: It really seems like haproxy is munging the header and just passing on a single one to the backend. This is fairly impacting to our production service, so if anyone has an ideas it would be greatly appreciated. I'm stumped... :(

    Read the article

  • How to reference other locations in making multi-boot live cd

    - by Nrew
    There is a tool in pen drive linux that allows you to boot directly with multiple iso files. And here is a sample in the menu.lst which allows you to choose which iso file you want to boot. title Fedora 13 find --set-root /Fedora-12-i686-L.iso map /ubuntu-10.04-desktop-i386.iso (0xff) map --hook root (0xff) kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/ubuntu-10.04-desktop-i386.iso splash initrd /casper/initrd.lz I'm just using it on my 8gb flash drive and the location of the iso file is in the flash drive itself. Is it possible to reference other locations. So that I could boot from it, without limitations. because the flash drive can only contain 8gb of data. Is it possible? Anyone here tried this before?

    Read the article

  • haproxy not passing X_FORWARD_FOR on HTTP POST

    - by Mark L
    Hello, I've setup HAProxy with the option forwardfor option so it'll pass on the user's IP to PHP via $_SERVER[ "HTTP_X_FORWARDED_FOR" ]. If the page request isn't a POST it's populated fine but if it is then it won't be populated. Any ideas where I've gone wrong? Thanks everyone! My whole HAProxy conf file for reference: global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 4096 #chroot /usr/share/haproxy user haproxy group haproxy daemon #debug #quiet defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 4096 contimeout 5000 clitimeout 50000 srvtimeout 50000 listen webfarm :80 mode http balance roundrobin option forwardfor server webA 192.168.240.4 weight 1 maxconn 2048 check server webB 192.168.240.3 weight 1 maxconn 2048 check listen smtp :25 mode tcp option tcplog balance roundrobin server smtp 192.168.240.4:25 check

    Read the article

  • Backup media manager, library or similar reference application

    - by Tarnschaf
    I'm looking for a backup media manager that will keep me up-to-date on where my backups are, how they're stored and what's stored on them. I want it to be able to do and keep track of the following: my used backup media (e.g. DVD1, DVD2) my backed-up assets in high-level (such as "family-photos from 2003", "laptop drivers") details of the assets ("Ninas Birthday 2003") where the backup media is currently stored when the media has been burned (to re-burn in case of media degeneration). It should be possible to navigate back and forth between media and assets. I also thought about marking assets as "deprecated". If all assets on a media are deprecated, the program should tell me so I don't have to keep it any more. Does anyone know of a program with this feature-set? Or will I have to start my own reference in something like Access?

    Read the article

  • Control cell reference increment when dragging a forumula in Libre Office Calc (3.5)

    - by Chuck
    Using Libre Office Calc (3.5) and have a question. When copying a formula that references cells into multiple empty cells the default is to increment each cell reference by one column or row, depending on the direction that the formula is being drug. A formula '= 1 + A1' drug horizontally changes to '= 1 + B1' when pulled one cell to right and '=1 + A2' when pulled one cell down. Is there a way to control increase the increment of the referenced cell? Is is possible to have a formula '= 1 + A1' that effectively changes to '= 1 + A3' when drug down one cell, '= 1 + A5' when drug down two cells, etc? If it matters, I am trying to take a constantly updating master list of data that is organized by dates (Wednesdays and Saturdays) and create separate spread sheets for each day of the week that can be updated by only pulling down the formula into the next cell. My attempts at using the 'lookup' function, 'offset' function, and creating a sort column in Libre Office Calc are thwarted by my inability to figure out how to get around the single step increment when pulling a formula down into the next cell. Thanks

    Read the article

  • How to reference a git repository?

    - by Anonymous
    What should the actual path to a git repository 'file' be? It's common practise when cloning from github to do something like: git clone https://[email protected]/repo.git And I'm used to that. If I init a repo on my local machine using git init, what is the 'git file' for me to reference? I'm trying tot setup Capifony with a Symfony2 project and need to set the repository path. Specifying the folder of the repository isn't working. Is there a .git file for each repository I should be referencing?

    Read the article

  • Excel Circular Reference

    - by Demetre
    Simple question. I'm working in Excel 2007, and I want to convert 1000 grams into 1 kilogram when I input 1000g into a particular cell. So I decided to create the if statement below. However there is a problem with this. It's stating that it is a Circular Reference, and leaves me with a 0 value. Is there a simple way to fix this issue in excel? Here is the if statement I have. =IF(C8 >= 1000,CONVERT(C8,"g","k"),C8) Tell what you guys think. Thanks in advance.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >