Search Results

Search found 21343 results on 854 pages for 'pass by reference'.

Page 10/854 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • STL class for reference-counted pointers?

    - by hasen j
    This should be trivial but I can't seem to find it (unless no such class exists!) What's the STL class (or set of classes) for smart pointers? UPDATE Thanks for the responses, I must say I'm surprised there's no standard implementation. I ended up using this one: http://www.gamedev.net/reference/articles/article1060.asp

    Read the article

  • Python - how to check if weak reference is still available

    - by Alex
    Hi all, I am passing some weakrefs from Python into C++ class, but C++ destructors are actively trying to access the ref when the real object is already dead, obviously it crashes... Is there any Python C/API approach to find out if Python reference is still alive or any other known workaround for this ? Thanks

    Read the article

  • Perl: reference to subroutine in external .pm file

    - by Pmarcoen
    I'm having some trouble figuring out how to make a reference to a subroutine in an external .pm file. Right now, I'm doing this : External file package settingsGeneral; sub printScreen { print $_[0]; } Main use settingsGeneral; my $printScreen = settingsGeneral::printScreen; &$printScreen("test"); but this result into an error: Can't use string ("1") as a subroutine ref while "strict refs" in use

    Read the article

  • Return reference from class to this.

    - by Thomas
    Hi, I have the following member of class foo. foo &foo::bar() { return this; } But I am getting compiler errors. What stupid thing am I doing wrong? Compiler error (gcc): error: invalid initialization of non-const reference of type 'foo&' from a temporary of type 'foo* const'

    Read the article

  • C# - Does foreach() iterate by reference?

    - by sharkin
    Consider this: List<MyClass> obj_list = get_the_list(); foreach( MyClass obj in obj_list ) { obj.property = 42; } Is 'obj' a reference to the corresponding object within the list so that when I change the property the change will persist in the object instance once constructed somewhere?

    Read the article

  • Python - copy by reference

    - by qba
    Is there any possibility to copy variable by reference no matter if its int or class instance? My goal is to have two lists of the same objects and when one changes, change is visible in second. In other words i need pointers:/

    Read the article

  • In the Groove: PASS Board Year 1, Q3

    - by Denise McInerney
    It's nine months into my first year on the PASS Board and I feel like I've found my rhythm. I've accomplished one of the goals I set out for the year and have made progress on others. Here's a recap of the last few months. Anti-Harassment Policy & Process Completed In April I began work on a Code of Conduct for the PASS Summit. The Board had several good discussions and various PASS members provided feedback. You can read more about that in this blog post. Since the document was focused on issues of harassment we renamed it the "Anti-Harassment Policy " and it was approved by the Board in August. The next step was to refine the guideliness and process for enforcement of the AHP. A subcommittee worked on this and presented an update to the Board at the September meeting. You can read more about that in this post, and you can find the process document here. Global Growth Expanding PASS' reach and making the organization relevant to SQL Server communities around the world has been a focus of the Board's work in 2012. We took the Global Growth initiative out to the community for feedback, and everyone on the Board participated, via Twitter chats, Town Hall meetings, feedback forums and in-person discussions. This community participation helped shape and refine our plans. Implementing the vision for Global Growth goes across all portfolios. The Virtual Chapters are well-positioned to help the organization move forward in this area. One outcome of the Global Growth discussions with the community is the expansion of two of the VCs from country-specific to language-specific. Thanks to the leadership in Brazil & Mexico for taking the lead here. I look forward to continued success for the Portuguese- and Spanish-language Virtual Chapters. Together with the Global Chinese VC PASS is off to a good start in making the VC's truly global. Virtual Chapters The VCs continue to grow and expand. Volunteers recently rebooted the Azure and Virutalization VCs, and a new  Education VC will be launching soon. Every week VCs offer excellent free training on a variety of topics. It's the dedication of the VC leaders and volunteers that make all this possible and I thank them for it. Board meeting The Board had an in-person meeting in September in San Diego, CA.. As usual we covered a number of topics including governance changes to support Global Growth, the upcoming Summit, 2013 events and the (then) upcoming PASS election. Next Up Much of the last couple of months has been focused on preparing for the PASS Summit in Seattle Nov. 6-9. I'll be there all week;  feel free to stop me if you have a question or concern, or just to introduce yourself.  Here are some of the places you can find me: VC Leaders Meeting Tuesday 8:00 am the VC leaders will have a meeting. We'll review some of the year's highlights and talk about plans for the next year Welcome Reception The VCs will be at the Welcome Reception in the new VC Lounge. Come by, learn more about what the VCs have to offer and meet others who share your interests. Exceptional DBA Awards Party I'm looking forward to seeing PASS Women in Tech VC leader Meredith Ryan receive her award at this event sponsored by Red Gate Session Presentation I will be presenting a spotlight session entitled "Stop Bad Data in Its OLTP Tracks" on Wednesday at 3:00 p.m. Exhibitor Reception This reception Wednesday evening in the Expo Hall is a great opportunity to learn more about tools and solutions that can help you in your job. Women in Tech Luncheon This year marks the 10th WIT Luncheon at PASS. I'm honored to be on the panel with Stefanie Higgins, Kevin Kline, Kendra Little and Jen Stirrup. This event is on Thursday at 11:30. Community Appreciation Party Thursday evening don't miss this event thanking all of you for everthing you do for PASS and the community. This year we will be at the Experience Music Project and it promises to be a fun party. Board Q & A Friday  9:45-11:15  am the members of the Board will be available to answer your questions. If you have a question for us, or want to hear what other members are thinking about, come by room 401 Friday morning.

    Read the article

  • "undefined reference" error with namespace across multiple files

    - by user1330734
    I've looked at several related posts but no luck with this error. I receive this undefined reference error message below when my namespace exists across multiple files. If I compile only ConsoleTest.cpp with contents of Console.cpp dumped into it the source compiles. I would appreciate any feedback on this issue, thanks in advance. g++ Console.cpp ConsoleTest.cpp -o ConsoleTest.o -Wall /tmp/cc8KfSLh.o: In function `getValueTest()': ConsoleTest.cpp:(.text+0x132): undefined reference to `void Console::getValue<unsigned int>(unsigned int&)' collect2: ld returned 1 exit status Console.h #include <iostream> #include <sstream> #include <string> namespace Console { std::string getLine(); template <typename T> void getValue(T &value); } Console.cpp #include "Console.h" using namespace std; namespace Console { string getLine() { string str; while (true) { cin.clear(); if (cin.eof()) { break; // handle eof (Ctrl-D) gracefully } if (cin.good()) { char next = cin.get(); if (next == '\n') break; str += next; // add character to string } else { cin.clear(); // clear error state string badToken; cin >> badToken; cerr << "Bad input encountered: " << badToken << endl; } } return str; } template <typename T> void getValue(T &value) { string inputStr = Console::getLine(); istringstream strStream(inputStr); strStream >> value; } } ConsoleTest.cpp #include "Console.h" void getLineTest() { std::string str; std::cout << "getLinetest" << std::endl; while (str != "next") { str = Console::getLine(); std::cout << "<string>" << str << "</string>"<< std::endl; } } void getValueTest() { std::cout << "getValueTest" << std::endl; unsigned x = 0; while (x != 12345) { Console::getValue(x); std::cout << "x: " << x << std::endl; } } int main() { getLineTest(); getValueTest(); return 0; }

    Read the article

  • Passing arguments by value or by reference in objective C

    - by Rafael
    Hello, I'm kind of new with objective c and I'm trying to pass an argument by reference but is behaving like it were a value. Do you know why this doesn't work? This is the function: - (void) checkRedColorText:(UILabel *)labelToChange { NSComparisonResult startLaterThanEnd = [startDate compare:endDate]; if (startLaterThanEnd == NSOrderedDescending){ labelToChange.textColor = [UIColor redColor]; } else{ labelToChange.textColor = [UIColor blackColor]; } } And this the call: UILabel *startHourLabel; (this is properly initialized in other part of the code) [self checkRedColorText:startHourLabel]; Thanks for your help

    Read the article

  • R: Pass by reference

    - by Pierre
    Can you pass by reference with "R" ? for example, in the following code: setClass("MyClass", representation( name="character" )) instance1 <-new("MyClass",name="Hello1") instance2 <-new("MyClass",name="Hello2") array = c(instance1,instance2) instance1 array instance1@name="World!" instance1 array the output is > instance1 An object of class “MyClass” Slot "name": [1] "World!" > array [[1]] An object of class “MyClass” Slot "name": [1] "Hello1" [[2]] An object of class “MyClass” Slot "name": [1] "Hello2" but I wish it was > instance1 An object of class “MyClass” Slot "name": [1] "World!" > array [[1]] An object of class “MyClass” Slot "name": [1] "World!" [[2]] An object of class “MyClass” Slot "name": [1] "Hello2" is it possible ? Thanks Pierre

    Read the article

  • reference to specific hash key

    - by dave
    How do I create a reference to the value in a specific hash key. I tried the following but $$foo is empty. Any help is much appreciated. $hash->{1} = "one"; $hash->{2} = "two"; $hash->{3} = "three"; $foo = \${$hash->{1}}; $hash->{1} = "ONE"; #I want "MONEY: ONE"; print "MONEY: $$foo\n";

    Read the article

  • Exception while trying to reference LINQ namespace

    - by MarceloRamires
    While trying to use linq in a .NET 2.0 winforms project I got: Namespace or type specified in the Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases In both the lines that reference the following namespaces: System.Linq; System.Xml.Linq; How could I get these namespaces to work on .NET 2.0 without referencing an external DLL or anything ?

    Read the article

  • TMS320C64x Quick start reference for porgrammers

    - by osgx
    Hello Is thare any quickstart guide for programmers for writing DSP-accelerated appliations for TMS320C64x? I have a program with custom algorythm (not the fft, or usial filtering) and I want to accelerate it using multi-DSP coprocessor. So, how should I modify source to move computation from main CPU to DSPs? What limitations are there for DSP-running code? I have some experience with CUDA. In CUDA I should mark every function as being host, device, or entry point for device (kernel). There are also functions to start kernels and to upload/download data to/from GPU. There are also some limitations, for device code, described in CUDA Reference manual. I hope, there is an similar interface and a documentation for DSP.

    Read the article

  • pointer reference type

    - by Codenotguru
    I am trying to write a function that takes a pointer argument, modifies what the pointer points to, and then returns the destination of the pointer as a reference. I am gettin the following error: cannot convert int***' toint*' in return| Code: #include <iostream> using namespace std; int* increment(int** i) { i++; return &i;} int main() { int a=24; int *p=&a; int *p2; p2=increment(&p); cout<<p2; } Thanks for helping!

    Read the article

  • reference parent class function in AS 3.0

    - by vasion
    I am trying to run a function of the main class, but even with casting it does not work. I get this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at rpflash.communication::RPXMLReader/updateplaylist() at rpflash.communication::RPXMLReader/dataHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::XMLSocket/scanAndSendEvent() this is the main class code package{ import flash.display.MovieClip; import rpflash.communication.RPXMLReader; public class Main extends MovieClip{ var reader:RPXMLReader = new RPXMLReader(); public function Main(){ trace('Main actionscript loaded'); } public function test(){ trace('test worked');} } } and this is the function trying to call it: private function updateplaylist(){ //xml to string var xmls:String= xml.toXMLString(); trace('playlist updated debug point'); MovieClip(this.parent).test();} what am i doing wrong?

    Read the article

  • Add reference to .dll asp.net

    - by Andy
    Hi, I have a simple question about adding references to a .NET project. I'm adding reCAPTCHA to a website and i have downloaded the dll. After setting the reference to the dll i build and run the project and gets this error: [ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.] System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) +0 System.Reflection.Assembly.GetTypes() +96 StarSuite.Core.Settings.GetSingletonInstancesOfBaseType(Type baseType, String staticMethodName, Type returnType) +149 [ApplicationException: Unable to load types from 'Recaptcha, Version=1.0.5.0, Culture=neutral, PublicKeyToken=9afc4d65b28c38c2'. LoaderExceptions: [FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.] ] What am i missing, why do i get this error?

    Read the article

  • Model-Controller cyclic reference/design problem

    - by jasamer
    I have a CoreData entity X, and controllers for this entity, XController. Now there's another entity, XGroup, containing a collection of X entities, and a XGroupController. Now the problem is that XGroupController needs to interact with XController, and it would be nice to just pass XGroupController a XGroup to observe, and then get the XControllers from the X entities. So the question is: is it a good idea to store a (weak, to avoid retain cycles) reference to a controller in an entity? It just feels a bit "wrong". Is there another design pattern for this?

    Read the article

  • Silverlight 3-4 reference kind (e-)book.

    - by Bubba88
    Hello! I'm looking for a source of information about Microsoft Silverlight to begin practically efficient programming custom functionality applications. I want to pretend just for now that I don't need any ideologically correct refresher (SL tips, top patterns, VS tutorials :) and etc.). Basically, what I want is a reference kind e-book, where I could find any practically relevant info outlined in a minimalistic manner. If you do remember something fitting the above description, I ask you to give me a hint. Thank you very much!

    Read the article

  • Input system reference trouble

    - by Ockonal
    Hello, I'm using SFML for input system in my application. size_t WindowHandle; WindowHandle = ...; // Here I get the handler sf::Window InputWindow(WindowHandle); const sf::Input *InputHandle = &InputWindow.GetInput(); // [x] Error At the last lines I have to get reference for the input system. Here is declaration of GetInput from documentation: const Input & sf::Window::GetInput () const The problem is: >invalid conversion from ‘const sf::Input*’ to ‘sf::Input*’ What's wrong?

    Read the article

  • clang parser pass example

    - by anon
    Hi! Can anyone paste sample code for a clang extra preprocessor pass where it: takes every variable named "foo", and renames it "bar", thus making the following code legal: int main() { int foo; bar = 5; } ? Thanks! [Aside: what I'm trying to do is write my own macro system for clang. Doing the above will let me inject at the right level to do my rewrites.] Thanks!

    Read the article

  • safely encode and pass a string from a html link to PHP program

    - by bert
    What series of steps would be reqired to safely encode and pass a string from a html href using javascript to construct the link to a php program. in javascript set up URL // encodes a URI component. path = "mypgm.php?from=" + encodeURIComponent(myvar) ; in php: // get passed variables $myvar = isset($_GET['myvar']) ? ($_GET['myvar']) : ''; // decode - (make the string readable) $myvar = (rawurldecode($myvar)); // converts characters to HTML entities (reduce risk of attack) $myvar = htmlentities($myvar); // maybe custom sanitize program as well? // see [http://stackoverflow.com/questions/2668854/php-sanitizing-strings-to-make-them-url-and-filename-safe][1] $myvar = sanitize($myvar);

    Read the article

  • HTML character reference display problems.

    - by Bren
    Hey folks, I'm currently developing a site in Joomla, and one of the components I'm using makes use of a PHP file to administer the language. (english.php, spanish.php) The problem I'm having is that if I use the plain text version of eg. "á", it will show up in the browser tab title ok, but as a ? in the body of the page. But if I use a character reference (&#225;), the reverse happens! Any ideas? Thanks bren

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >