Search Results

Search found 13807 results on 553 pages for 'undefined reference'.

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

  • 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

  • Setting a variable to undefined

    - by AJ
    Hello, I'm a bit confused about Javascript undefined & null. Firstly what does if (!testvar) actually do? Does it test for undefined and null or just undefined? Secondly, once a variable is defined can I clear it back to undefined (therefore deleting the variable). Thirdly, can I pass undefined as a parameter? e.g: function test(var1, var2, var3) { } test("value1", undefined, "value2") Thanks, AJ

    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

  • Should I make OR operator to return const reference or just reference

    - by Yan Cheng CHEOK
    class error_code { public: error_code() : hi(0), lo(0) {} error_code(__int64 lo) : hi(0), lo(lo) {} error_code(__int64 hi, __int64 lo) : hi(hi), lo(lo) {} error_code& operator|=(const error_code &e) { this->hi |= e.hi; this->lo |= e.lo; return *this; } __int64 hi; __int64 lo; }; error_code operator|(const error_code& e0, const error_code& e1) { return error_code(e0.hi | e1.hi, e0.lo | e1.lo); } int main() { error_code e0(1); error_code e1(2); e0 |= e1; } I was wondering, whether I should make operator|= to return a const error_code& or error_code& ?

    Read the article

  • Profile:Object reference not set to an instance of an object

    - by sallalman83
    Hi, i just lunch my web site i used the asp.net routing technology on it, and its work fine in my localhost but when i moved the project to the hosting server(Godaddy.com) its just work fine when there is no virtual sub directories like this(havebreak.com) but when u click on this link (havebreak.com/Registration/) or any other links that contain a virtual sub-directories its give Object reference not set to an instance of an object error on the profile object if (!Profile.IsAnonymous) Line 18: mlvRegistratioin.ActiveViewIndex = 1; i check my IIS settings and found it using the "Integrated pipeline" as recommended (at least at my knowledge), i checked the httpModules and httpHandlers tags under the system.webServer (since my hosting plan use the IIS7) and under the normal tag and every thing is fine then i used the url-rewriting instead of URL-Routing and the same problem exist and i notice that the session also not working in the virtual sub-directories too and by the way the ASP.NET routing work fine with my site its just the profile and session objects that not workin any help will be appreciated

    Read the article

  • Flash CS, reference root from external class

    - by Lotus
    Hi, I made this class and I put it in the same package of Timeline.as (the Document Class): package { import flash.utils.Timer; import flash.events.TimerEvent; public class Counter2 extends Timer { public function Counter2(delay:Number, repeatCount:int=0) { super(delay, repeatCount); super.addEventListener(TimerEvent.TIMER, timerHandler); } public override function start():void { super.start(); } public override function stop():void { super.stop(); } public function timerHandler(evt:TimerEvent) { trace(evt.target.currentCount); } } } This class is instanciated in Timeline.as constructor. Is there any way to reference Timeline(root) from this class? And, if so, how? Thanks!

    Read the article

  • Passing Reference types by value in C#

    - by Ajit
    I want to pass a reference type by value to a method in C#. Is there a way to do it. In C++, I could always rely on the copy constructor to come into play if I wanted to pass by Value. Is there any way in C# except: 1. Explicitly creating a new object 2. Implementing IClonable and then calling Clone method. Here's a small example: Let's take a class A in C++ which implements a copy constructor. A method func1(Class a), I can call it by saying func1(objA) (Automatically creates a copy) Does anything similar exist in C#. By the way, I'm using Visual Studio 2005.

    Read the article

  • Store return value of function in reference C++

    - by Ruud v A
    Is it valid to store the return value of an object in a reference? class A { ... }; A myFunction() { A myObject; return A; } //myObject goes out of scope here void mySecondFunction() { A& mySecondObject = myFunction(); } Is it possible to do this in order to avoid copying myObject to mySecondObject? myObject is not needed anymore and should be exactly the same as mySecondObject so it would in theory be faster just to pass ownership of the object from one object to another. (This is also possible using boost shared pointer but that has the overhead of the shared pointer.) Thanks in advance.

    Read the article

  • Circular reference problem Singleton

    - by Ismail
    I'm trying to creating a Singleton class like below where MyRepository lies in separate DAL project. It's causing me a circular reference problem because GetMySingleTon() method returns MySingleTon class and needs its access. Same way I need MyRepository access in constructor of MySingleTon class. public class MySingleTon { static MySingleTon() { if (Instance == null) { MyRepository rep = new MyRepository(); Instance = rep.GetMySingleTon(); } } public static MySingleTon Instance { get; private set; } public string prop1 { get; set; } public string prop2 { get; set; } }

    Read the article

  • C++: Template functor cannot deduce reference type

    - by maciekp
    I've got a functor f, which takes a function func and a parameter t of the same type as func. I cannot pass g to f because of compilation error (no matching function for call to f(int&, void (&)(int&)) ). If g would take non-reference parameter g(int s), compilation finishes. Or if I manually specify template parameter f(i, g), compilation also finishes. template<typename T> void f(T t, void (*func)(T)) {} void g(int& s) {} int main(int, char*[]) { int i = 7; f(i, g); // compilation error here return 0; } How can I get deduction to work?

    Read the article

  • Javascript pass reference by value

    - by Carlos R. Batista
    Im having this weird reference issue when im trying to get a JSON file through query: var themeData; $.getJSON("json/sample.js", function(data) { themeData = data.theme; console.log(themeData.sample[0].description); }); console.log(themeData.sample[0].description); The first console.log works, the second doesnt. Im guessing because "data" already expired by the time the script gets there and themeData is just a mere pointer to "data". Is there a ways I can make sure themeData gets a duplicate of "data" and not just a pointer to it?

    Read the article

  • Extracting a reference from a c++ vector

    - by Archanimus
    Hello folks, I have a vector< vector< vector< int and I would like to extract from it a vector< vector< int to process it individually. The problem is that when I write : myMatrix = myCube[anIndex]; the matrix is copied but I only want a reference in order to save memory. Can you please help me out ? Thanks a lot!

    Read the article

  • Perl, `push` to array reference

    - by Mike
    Is it possible to push to an array reference in Perl? Googling has suggested I deference the array first, but this doesn't really work. It pushes to the deferenced array, not the referenced array. For example, my @a = (); my $a_ref = [@a]; push(@$a_ref,"hello"); print $a[0]; @a will not be updated and this code will fail because the array is still empty (I'm still learning Perl references, so this might be an incredibly simple question. Sorry if so)

    Read the article

  • Why operator= returns reference not const reference

    - by outmind
    The original question is related to overloading operator= and I like to share my findings as it was nontrivial for me to find them. I cannot imagine reasonable example to use (a=b) as lvalue. With the help of IRC and google I've found the next article: http://msdn.microsoft.com/en-us/magazine/cc301415.aspx it provides two examples. (a=b)=c f(T& ); f(a=b) but both a bit not good, as first violate associativity and I believe that it is bad practice. The second one give me the same feeling. Could you provide more good examples why it should be non constant?

    Read the article

  • C++ vector reference parameter

    - by Archanimus
    Hello folks, let's say we have a class class MyClass { vector<vector<int > > myMatrice; public : MyClass(vector<vector<int > > &); } MyClass::MyClass(vector<vector<int > > & m) { myMatrice = m; } During the instanciation of MyClass, I pass a big vector < vector < int and I find that the object is actually copied and not only the reference, so it takes the double of the memory ... Please, can anyone help me out with this problem, I'm stuck since too many time ... And thanks a lot!

    Read the article

  • Why is this Python class copying another class contents?

    - by fjfnaranjo
    Hello guys. I'm trying to understand an estrange behavior in Python. I have the next python code: class IntContainer: listOfInts = [] def __init__(self, initListOfInts): for i in initListOfInts: self.listOfInts.append(i) def printInts(self): print self.listOfInts if __name__ == "__main__": intsGroup1 = [1,2,3,4] intsGroup2 = [4,5,6,7] intsGroups = [intsGroup1,intsGroup2] intsContainers = [] for ig in intsGroups: newIntContainer = IntContainer(ig) intsContainers.append(newIntContainer) for ic in intsContainers: print ic.listOfInts I expect to get something like: [1, 2, 3, 4] [4, 5, 6, 7] But i get: [1, 2, 3, 4, 4, 5, 6, 7] [1, 2, 3, 4, 4, 5, 6, 7] I have check the next question: http://stackoverflow.com/questions/1876905/why-is-python-reusing-a-class-instance-inside-in-function And a lot of Python reference, but I can not understand what is happening. I think is related with the newIntContainer identifier reutilization, but I do not understand it deeply. Why Python appears to reused the last reference for the new object, even if I have added it to a permanent list? What can I do to resolve this behavior? Thanks ;)

    Read the article

  • C++ Reference of vector

    - by void
    Hello, class Refvect { public: vector<int> &refv; Refvect(int t, vector<int> &refv = vector<int>()) : refv(refv) { }; void operator()() { refv.clear(); } }; int main () { Refvect r(0); r(); } With Visual Studio 2010, this gives me an error : "vector iterators incompatible" at the execution, but I don't understand why (but I can insert elements in refv without any problem). The temporary object vector() lives as long as the reference, no?

    Read the article

  • Reference and Value confusion

    - by rgamber
    Hi I read this question on Stack overflow, and tried to do an example. I had the below code: public static void main(String[] args){ int i = 5; Integer I = new Integer(5); increasePrimitive(i); increaseObject(I); System.out.println(i); //Prints 5 - correct System.out.println(I); //Still prints 5 System.out.println(increaseObject2(I)); //Still prints 5 } public static void increasePrimitive(int n){ n++; } public static void increaseObject(Integer n){ n++; } public static int increaseObject2(Integer n){ return n++; } Does the increaseObject print 5 because the value of reference is changing inside that function? Am I right? I am confused why the increasedObject2 prints 5 and not 6. Can anyone please explain?

    Read the article

  • Regular Expressions Quick Reference

    - by Jan Goyvaerts
    The Regular-Expressions.info website has a new quick reference to regular expressions that lists all of the regex syntax in one single table along with a link to the tutorial section that explains the syntax. The quick reference is ordered by syntax whereas the full reference tables are ordered by feature. There are multiple entries for some of the syntax as different regex flavors may use the same syntax for different features. Use the quick reference if you’ve seen some syntax in somebody else’s regex and you have no idea what feature that syntax is for. Use the full reference tables if you already know the feature you want but forgot which syntax to use. Of course, an even quicker reference is to paste your regex into RegexBuddy, select the application you’re working with, and click on the part of the regex you don’t understand. RegexBuddy then selects the corresponding node in its regex tree which summarizes exactly what the syntax you clicked on does in your regex. If you need more information, press F1 or click the Explain Token button to open the relevant page in the regex tutorial in RegexBuddy’s help file.

    Read the article

  • SQL SERVER – Best Reference – Wait Type – Day 27 of 28

    - by pinaldave
    I have great learning experience to write my article series on Extended Event. This was truly learning experience where I have learned way more than I would have learned otherwise. Besides my blog series there was excellent quality reference available on internet which one can use to learn this subject further. Here is the list of resources (in no particular order): sys.dm_os_wait_stats (Book OnLine) – This is excellent beginning point and official documentations on the wait types description. SQL Server Best Practices Article by Tom Davidson – I think this document goes without saying the BEST reference available on this subject. Performance Tuning with Wait Statistics by Joe Sack – One of the best slide deck available on this subject. It covers many real world scenarios. Wait statistics, or please tell me where it hurts by Paul Randal – Notes from real world from SQL Server Skilled Master Paul Randal. The SQL Server Wait Type Repository… by Bob Ward – A thorough article on wait types and its resolution. A MUST read. Tracking Session and Statement Level Waits by by Jonathan Kehayias – A unique article on the subject where wait stats and extended events are together. Wait Stats Introductory References By Jimmy May – Excellent collection of the reference links. Great Resource On SQL Server Wait Types by Glenn Berry – A perfect DMV to find top wait stats. Performance Blog by Idera – In depth article on top of the wait statistics in community. I have listed all the reference I have found in no particular order. If I have missed any good reference, please leave a comment and I will add the reference in the list. Read all the post in the Wait Types and Queue series. Reference: Pinal Dave (http://blog.SQLAuthority.com) Tracking Session and Statement Level Waits Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQL Wait Stats, SQL Wait Types, T SQL, Technology

    Read the article

  • .NET Reference "Copy Local" True / Fasle Being Set Based on Contents of General Assembly

    - by D-Sect
    Hello All. First question for me here. We had a very interesting problem with a Win Forms project. It's been resolved. We know what happened, but we want to understand why it happened. This may help other people out in the future who have a similar problem. The WinForms project failed on 2 of our client's PCs. The error was an obscure kernel.dll error. The project ran fine on 3 other PCs. We found that a .DLL (log4net.dll - a very popular open-source logging library) was missing from our release folder. It was previously in our release folder. Why was it missing in this latest release? It was missing because I must have installed a program on my Dev box that used log4net.dll and it was added to the general assembly. When I checked the SLN's references for log4net.dll, they were changed to "copy local=FALSE". They must have changed automagicially because log4net.dll was present in my GAC. Here's where my question starts: Why did my reference for log4net.dll get changed from COPY LOCAL = TRUE to COPY LOCAL = FALSE? I suspect it's because it was added to my GAC by another program. How can we prevent this from happening again? As it stands now, if I install a piece of software that uses a common library and it adds it to my GAC, then my SLNs that REF that DLL will change from Copy Local TRUE to FALSE. Thank you so much. I hope this helps people out who have a piece of software that runs in some places, but not in others, when it used to run fine in ALL places.

    Read the article

  • Null Reference Exception In LINQ DataContext

    - by Frank
    I have a Null Reference Exception Caused by this code: var recentOrderers = (from p in db.CMS where p.ODR_DATE > DateTime.Today - new TimeSpan(60, 0, 0, 0) select p.SOLDNUM).Distinct(); result = (from p in db.CMS where p.ORDER_ST2 == "SH" && p.ODR_DATE > DateTime.Today - new TimeSpan(365, 0, 0, 0) && p.ODR_DATE < DateTime.Today - new TimeSpan(60, 0, 0, 0) && !(recentOrderers.Contains(p.SOLDNUM))/**/ select p.SOLDNUM).Distinct().Count(); result is of double type. When I comment out: !(recentOrderers.Contains(p.SOLDNUM)) The code runs fine. I have verified that recentOrderers is not null, and when I run: if(recentOrderes.Contains(0)) return; Execution follows this path and returns. Not sure what is going on, since I use similar code above it: var m = (from p in db.CMS where p.ORDER_ST2 == "SH" select p.SOLDNUM).Distinct(); double result = (from p in db.CUST join r in db.DEMGRAPH on p.CUSTNUM equals r.CUSTNUM where p.CTYPE3 == "cmh" && !(m.Contains(p.CUSTNUM)) && r.ColNEWMEMBERDAT.Value.Year > 1900 select p.CUSTNUM).Distinct().Count(); which also runs flawlessly. After noting the similarity, can anyone help? Thanks in advance. -Frank GTP, Inc.

    Read the article

  • VB.NET - Object reference not set to an instance of an object

    - by Daniel
    I need some help with my program. I get this error when I run my VB.NET program with a custom DayView control. ***** Exception Text ******* System.NullReferenceException: Object reference not set to an instance of an object. at SeaCow.Main.DayView1_ResolveAppointments(Object sender, ResolveAppointmentsEventArgs args) in C:\Users\Daniel\My Programs\Visual Basic\SeaCow\SeaCow\SeaCow\Main.vb:line 120 at Calendar.DayView.OnResolveAppointments(ResolveAppointmentsEventArgs args) at Calendar.DayView.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) According to the error code, the 'for each' loop below is causing the NullReferenceException error. At default, the 'appointments' list is assigned to nothing and I can't find where the ResolveAppointments function is being called at. Private Sub DayView1_ResolveAppointments(ByVal sender As Object, ByVal args As Calendar.ResolveAppointmentsEventArgs) Handles DayView1.ResolveAppointments Dim m_Apps As New List(Of Calendar.Appointment) For Each m_App As Calendar.Appointment In appointments If (m_App.StartDate >= args.StartDate) AndAlso (m_App.StartDate <= args.EndDate) Then m_Apps.Add(m_App) End If Next args.Appointments = m_Apps End Sub Anyone have any suggestions?

    Read the article

  • Interfaces with structs, by reference using Generics

    - by Fraga
    I can't pass by reference an interface with a struct in it, what am I doing wrong? Here is the example code: class Processor<T> where T : new() { public Processor() { Data = new T(); } public T Data; } class PeriodsProcessor : Processor<Periods> { public PeriodsProcessor() { DataBase DB = new DataBase(); Console.WriteLine(Data.Value); DB.ModifyData<Period>(Data); Console.WriteLine(Data.Value); Console.ReadLine(); } } public class Period { public string Name; } public interface IDataTable<T> { string Value { get; set; } T Filter { get; set; } } [Serializable] public struct Periods : IDataTable<Period> { public string Value { get; set; } public Period Filter { get; set; } } public class DataBase { public void ModifyData<T>(IDataTable<T> data) where T : new() { data.Value = "CHANGE"; } } class Program { static void Main(string[] args) { PeriodsProcessor PeriodsProcessor = new PeriodsProcessor(); } }

    Read the article

  • Help passing reference to class subroutine in Perl.

    - by stephenmm
    I am trying to pass a routine to another subroutine within a Perl module. But when I pass the sub reference the passed in ref no longer has the object data. Maybe its not possible to do it this way. The line I have a question about is the "unless" lines below: sub get_flag_end { my $self = shift; return ( -e "$self->{file}" ); } sub wait_for_end { my $self = shift; my $timeout = shift; my $poll_interval = shift; # Is it even possible to pass the oject subroutine and retain the objects data? #unless ( $self->timeout( $timeout, $poll_interval, $self->get_flag_end ) ) { # does not work unless ( $self->timeout( $timeout, $poll_interval, \&get_flag_end ) ) { # call happens but members are empty die "!!!ERROR!!! Timed out while waiting for wait_for_end: timeout=$timeout, poll_interval=$poll_interval \n"; } } sub timeout { my $self = shift; my $timeout = shift; my $poll_interval = shift; my $test_condition = shift; until ($test_condition->() || $timeout <= 0) { $timeout -= $poll_interval; sleep $poll_interval; } return $timeout > 0; # condition was met before timeout } I know that I could change the "get_flag_end" routine to take the value as an argument to the subroutine but what if there was a bunch of stuff done in "get_flag_end" and I needed more members from the object. I simplified the code a bit to make it a little easier to follow.

    Read the article

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