Search Results

Search found 3592 results on 144 pages for 'pointer'.

Page 66/144 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • Effects of changing a node in a binary tree

    - by eSKay
    Suppose I want to change the orange node in the following tree. So, the only other change I'll need to make is in the left pointer of the green node. The blue node will remain the same. Am I wrong somewhere? Because according to this article (that explains zippers), even the blue node needs to be changed. Similarly, in this picture (recolored) from the same article, why do we change the orange nodes at all (when we change x)?

    Read the article

  • Get PocketC File Handle Int?

    - by Nathan Campos
    I'm now taking a look at the PocketC powerful tool, but there is an fileopen function, that generates a integer called filehandle, that is used for most of the File I/O operations of PocketC, than I want to know how to discover the int filehandle from the function? Here is my example function that I'm using at my program: fileopen("\test.txt", 0, 0x00000000); Description of int filehandle: Integer used for file operations, used as a pointer to the fileopen instruction.

    Read the article

  • Iphone-exif 0.91 not working when I add it to my project, gives error ".objc_class_name_EXFJpeg", r

    - by user295944
    When I add libiphone-exif.a to snapandrun in objectiveflickr I get this error: ".objc_class_name_EXFJpeg", referenced from: literal-pointer@__OBJC@__cls_refs@EXFJpeg in SnapAndRunViewController.o ld: symbol(s) not found collect2: ld returned 1 exit status I do not know what this means, I follow the guide to add it, add all of the .h files and the libiphone-exif.a Is there something special I have to do?

    Read the article

  • Unable to run MR on cluster

    - by RAVITEJA SATYAVADA
    I have an Map reduce program that is running successfully in standalone(Ecllipse) mode but while trying to run the same MR by exporting the jar in cluster. It is showing null pointer exception like this, 13/06/26 05:46:22 ERROR mypackage.HHDriver: Error while configuring run method. java.lang.NullPointerException I double checked the run method parameters those are not null and it is running in standalone mode as well..

    Read the article

  • "either bof or eof is true or the current record has been deleted.." error on applyupdates that cont

    - by AhmetC
    Hello, I am getting this error while resolving delete operation from ClientDatset to TAdoDataset (which bound to access table). I am using Delphi 2010. My DatasetProvider between TClientDataset and TAdoDataset : object dspTarifeler: TDataSetProvider DataSet = DM.qryTarifeler ResolveToDataSet = True Options = [poPropogateChanges, poUseQuoteChar] end Error occurs in this function which is called by TDataSetResolver.EndUpdate(); procedure TCustomADODataSet.InternalGotoBookmark(Bookmark: Pointer); begin Recordset.Bookmark := POleVariant(Bookmark)^; end;

    Read the article

  • background image for input type="button"

    - by fusion
    i've been trying to change the background image of the input button through css, but it doesn't work. search.html: <input type="button" name="button" value="Search" onclick="showUser()" class="button"/> search.css: .button { background-image: url ('/image/btn.png') no-repeat; cursor:pointer; } what could be wrong? even inline-ing the css didn't seem to work.

    Read the article

  • Skinning AIR application window

    - by Mike
    Hi, I'm using mx:WindowedApplication, I'm wondering how I can skin the title bar and close/minimize button for the window. I can see application like Pandora One is using it and setting transparency. Any pointer to a doc? Thanks,

    Read the article

  • Use native HBitmap in C# while preserving alpha channel/transparency. Please check this code, it works on my computer...

    - by David
    Let's say I get a HBITMAP object/handle from a native Windows function. I can convert it to a managed bitmap using Bitmap.FromHbitmap(nativeHBitmap), but if the native image has transparency information (alpha channel), it is lost by this conversion. There are a few questions on Stack Overflow regarding this issue. Using information from the first answer of this question (How to draw ARGB bitmap using GDI+?), I wrote a piece of code that I've tried and it works. It basically gets the native HBitmap width, height and the pointer to the location of the pixel data using GetObject and the BITMAP structure, and then calls the managed Bitmap constructor: Bitmap managedBitmap = new Bitmap(bitmapStruct.bmWidth, bitmapStruct.bmHeight, bitmapStruct.bmWidth * 4, PixelFormat.Format32bppArgb, bitmapStruct.bmBits); As I understand (please correct me if I'm wrong), this does not copy the actual pixel data from the native HBitmap to the managed bitmap, it simply points the managed bitmap to the pixel data from the native HBitmap. And I don't draw the bitmap here on another Graphics (DC) or on another bitmap, to avoid unnecessary memory copying, especially for large bitmaps. I can simply assign this bitmap to a PictureBox control or the the Form BackgroundImage property. And it works, the bitmap is displayed correctly, using transparency. When I no longer use the bitmap, I make sure the BackgroundImage property is no longer pointing to the bitmap, and I dispose both the managed bitmap and the native HBitmap. The Question: Can you tell me if this reasoning and code seems correct. I hope I will not get some unexpected behaviors or errors. And I hope I'm freeing all the memory and objects correctly. private void Example() { IntPtr nativeHBitmap = IntPtr.Zero; /* Get the native HBitmap object from a Windows function here */ // Create the BITMAP structure and get info from our nativeHBitmap NativeMethods.BITMAP bitmapStruct = new NativeMethods.BITMAP(); NativeMethods.GetObjectBitmap(nativeHBitmap, Marshal.SizeOf(bitmapStruct), ref bitmapStruct); // Create the managed bitmap using the pointer to the pixel data of the native HBitmap Bitmap managedBitmap = new Bitmap( bitmapStruct.bmWidth, bitmapStruct.bmHeight, bitmapStruct.bmWidth * 4, PixelFormat.Format32bppArgb, bitmapStruct.bmBits); // Show the bitmap this.BackgroundImage = managedBitmap; /* Run the program, use the image */ MessageBox.Show("running..."); // When the image is no longer needed, dispose both the managed Bitmap object and the native HBitmap this.BackgroundImage = null; managedBitmap.Dispose(); NativeMethods.DeleteObject(nativeHBitmap); } internal static class NativeMethods { [StructLayout(LayoutKind.Sequential)] public struct BITMAP { public int bmType; public int bmWidth; public int bmHeight; public int bmWidthBytes; public ushort bmPlanes; public ushort bmBitsPixel; public IntPtr bmBits; } [DllImport("gdi32", CharSet = CharSet.Auto, EntryPoint = "GetObject")] public static extern int GetObjectBitmap(IntPtr hObject, int nCount, ref BITMAP lpObject); [DllImport("gdi32.dll")] internal static extern bool DeleteObject(IntPtr hObject); }

    Read the article

  • C++ scoping error

    - by Pat Murray
    I have the following code: #include "Student.h" #include "SortedList.h" using namespace std; int main() { // points to the sorted list object SortedList *list = new SortedList; //This is line 17 // array to hold 100 student objects Student create[100]; int num = 100000; // holds different ID numbers // fills an array with 100 students of various ID numbers for (Student &x : create) { x = new Student(num); num += 100; } // insert all students into the sorted list for (Student &x : create) list->insert(&x); delete list; return 0; } And I keep getting the compile time error: main.cpp: In function ‘int main()’: main.cpp:17: error: ‘SortedList’ was not declared in this scope main.cpp:17: error: ‘list’ was not declared in this scope main.cpp:17: error: expected type-specifier before ‘SortedList’ main.cpp:17: error: expected `;' before ‘SortedList’ main.cpp:20: error: ‘Student’ was not declared in this scope main.cpp:20: error: expected primary-expression before ‘]’ token main.cpp:20: error: expected `;' before ‘create’ main.cpp:25: error: expected `;' before ‘x’ main.cpp:31: error: expected primary-expression before ‘for’ main.cpp:31: error: expected `;' before ‘for’ main.cpp:31: error: expected primary-expression before ‘for’ main.cpp:31: error: expected `)' before ‘for’ main.cpp:31: error: expected `;' before ‘x’ main.cpp:34: error: type ‘<type error>’ argument given to ‘delete’, expected pointer main.cpp:35: error: expected primary-expression before ‘return’ main.cpp:35: error: expected `)' before ‘return’ My Student.cpp and SortedList.cpp files compile just fine. They both also include .h files. I just do not understand why I get an error on that line. It seems to be a small issue though. Any insight would be appreciated. UPDATE1: I originally had .h files included, but i changed it when trying to figure out the cause of the error. The error remains with the .h files included though. UPDATE2: SortedList.h #ifndef SORTEDLIST_H #define SORTEDLIST_H #include "Student.h" /* * SortedList class * * A SortedList is an ordered collection of Students. The Students are ordered * from lowest numbered student ID to highest numbered student ID. */ class SortedList { public: SortedList(); // Constructs an empty list. SortedList(const SortedList & l); // Constructs a copy of the given student object ~SortedList(); // Destructs the sorted list object const SortedList & operator=(const SortedList & l); // Defines the assignment operator between two sorted list objects bool insert(Student *s); // If a student with the same ID is not already in the list, inserts // the given student into the list in the appropriate place and returns // true. If there is already a student in the list with the same ID // then the list is not changed and false is returned. Student *find(int studentID); // Searches the list for a student with the given student ID. If the // student is found, it is returned; if it is not found, NULL is returned. Student *remove(int studentID); // Searches the list for a student with the given student ID. If the // student is found, the student is removed from the list and returned; // if no student is found with the given ID, NULL is returned. // Note that the Student is NOT deleted - it is returned - however, // the removed list node should be deleted. void print() const; // Prints out the list of students to standard output. The students are // printed in order of student ID (from smallest to largest), one per line private: // Since Listnodes will only be used within the SortedList class, // we make it private. struct Listnode { Student *student; Listnode *next; }; Listnode *head; // pointer to first node in the list static void freeList(Listnode *L); // Traverses throught the linked list and deallocates each node static Listnode *copyList(Listnode *L); // Returns a pointer to the first node within a particular list }; #endif #ifndef STUDENT_H #define STUDENT_H Student.h #ifndef STUDENT_H #define STUDENT_H /* * Student class * * A Student object contains a student ID, the number of credits, and an * overall GPA. */ class Student { public: Student(); // Constructs a default student with an ID of 0, 0 credits, and 0.0 GPA. Student(int ID); // Constructs a student with the given ID, 0 credits, and 0.0 GPA. Student(int ID, int cr, double grPtAv); // Constructs a student with the given ID, number of credits, and GPA.\ Student(const Student & s); // Constructs a copy of another student object ~Student(); // Destructs a student object const Student & operator=(const Student & rhs); // Defines the assignment operator between two student objects // Accessors int getID() const; // returns the student ID int getCredits() const; // returns the number of credits double getGPA() const; // returns the GPA // Other methods void update(char grade, int cr); // Updates the total credits and overall GPA to take into account the // additions of the given letter grade in a course with the given number // of credits. The update is done by first converting the letter grade // into a numeric value (A = 4.0, B = 3.0, etc.). The new GPA is // calculated using the formula: // // (oldGPA * old_total_credits) + (numeric_grade * cr) // newGPA = --------------------------------------------------- // old_total_credits + cr // // Finally, the total credits is updated (to old_total_credits + cr) void print() const; // Prints out the student to standard output in the format: // ID,credits,GPA // Note: the end-of-line is NOT printed after the student information private: int studentID; int credits; double GPA; }; #endif

    Read the article

  • C# Hide Resize Cursor

    - by Ozzy
    In my program, im using the WndProc override to stop my form being resized. Thing is, the cursor is still there when you move the pointer to the edge of the form. Is there anyway to hide this cursor?

    Read the article

  • Windows 7 SDK RC & Beta version

    - by Sarath
    Dear All, I've download Windows 7 SDK which was downloaded at the time of the beta release. Now I upgraded to RC and trying with some Direct2D samples. But I can't create the factory pointer using D2D1CreateFactory API. It's always returns NULL. Even the samples downloaded from MSDN is also not working well. There are some changes from Beta - RC Is this because of the version mismatch of SDK?

    Read the article

  • Difference between null==object and object==null

    - by priyank.mp
    Hi I would like to know diff between the above comparisons? I am getting null pointer exception when I check object.getItems() == null. But if I change it to null == object.getItems(), it workes fine. I did look into this http://stackoverflow.com/questions/2938476/what-is-the-difference-between-null-object-and-objectnull-closed But I didnt get satisfactory answer.

    Read the article

  • Member variable pointers to COM objects

    - by drelihan
    Hi Folks, Is there any problem with keeping member variable pointer refernces to COM objects and reussing the reference through out the class in C++. Is anybody aware of a reason why you would want to call .CreateInstance every time you wanted a to use the COM object i.e. you were getting a fresh instance each time. I cannot see any reason who you would want to do this, Thanks, (No is an acceptable answer!!!)

    Read the article

  • ASP.Net HttpHandler ProcessRequest() firing twice

    - by Doug
    Hi there, I have a strange issue where i have a a HttpHandler having its ProcessRequest() event firing twice. i have nothing else in the class except a pointer to a static method so i'm lost. I have done some googling to no avail even thought it appears a few people are having similar issues: Code: public bool IsReusable { get { return true; } } public void ProcessRequest(HttpContext context) { Common.Tracker.TrackPageView(context); }

    Read the article

  • How to declare NSString constants for passing to NSNotificationCenter

    - by synic
    I've got the following in my .h file: #ifndef _BALANCE_NOTIFICATION #define _BALANCE NOTIFICATION const NSString *BalanceUpdateNotification #endif and the following in my .m file: const NSString *BalanceUpdateNotification = @"BalanceUpdateNotification"; I'm using this with the following codes: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateBalance:) name:BalanceUpdateNotification object:nil]; and [[NSNotificatoinCenter defaultCenter] postNotificationName:BalanceUpdateNotificatoin object:self userInfo:nil]; Which works, but it gives me a warning: Passing argument 1 of 'postNotificationName:object:userInfo' discards qualifiers from pointer target type So, I can cast it to (NSString *), but I'm wondering what the proper way to do this is.

    Read the article

  • Changing code at runtime

    - by Pagis
    I have a pointer to a function (which i get from a vtable) and I want to edit the function by changing the assembler code (changing a few bytes) at runtime. I tried using memset and also tried assigning the new value directly (something like mPtr[0] = X, mPtr[1] = Y etc.) but I keep getting segmentation fault. How can I change the code? (I'm using C++)

    Read the article

  • Is "long" still useful in C?

    - by dan04
    It's not the largest integer type anymore now that there's "long long". It's not a fixed-width type: It's 32 bits on some platforms and 64 on others. It's not necessarily the same size as a pointer (for example, on 64-bit Windows) So, does "long" have any meaning anymore? Is there ever a reason to declare a long instead of a ptrdiff_t or int64_t?

    Read the article

  • How to attach to the jQuery Autocomplete plugin's mouse events?

    - by Tommy B
    My problem is this: I need to update some text in a div with the value of what the mouse pointer is hovering over in the autocomplete drop down list. Can it be done easily, or do I have to make fundamental changes to the Autocomplete plugin? I am using the jQuery Autocomplete plugin version 1.1 by Jörn Zaefferer. Any and all help will be greatly appreciated!

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >