Search Results

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

Page 92/144 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • Using a WinForm as a Windows Installer Custom Action

    - by Serexx
    Hello - I am working on in installer project that needs to gather some info and act on it during the install (mainly online key retreival and registration). The Setup Project UserInterface templates seem inflexible and poorly documented so I am looking at opening a WinForm as a Custom Action. I know this is possible because I see reference to it in many places but this is my first Windows Installer experience and so far it is mired in googled contradictions, partial or outdated information and guesswork... erg.... Does anyone have (even a pointer to) a clear concise description of how one gets this done in a VS 2008 WinForm project... Many thanks for inputs

    Read the article

  • Objective c key path operators @avg,@max .....

    - by davide
    arr = [[NSMutableArray alloc]init]; [arr addObject:[NSNumber numberWithInt:4]]; [arr addObject:[NSNumber numberWithInt:45]]; [arr addObject:[NSNumber numberWithInt:23]]; [arr addObject:[NSNumber numberWithInt:12]]; NSLog(@"The avg = %@", [arr valueForKeyPath:@"@avg.intValue"]); This code works fine, but why? valueForKeyPath:@"@avg.intValue" is requesting (int) from each NSNumber, but we are outputting a %@ string in the log. If i try to output a decimal %d i get a number that possibly is a pointer to something. Can somebody explain why the integers become NSNumbers when i call the @avg operator?

    Read the article

  • addObjectsFromArray

    - by derek.lo
    I have a question about memory management when using the addObjectsFromArray method. Basically, I have 2 arrays defined in the appDelegate. I need these 2 arrays for the duration of my application's runtime. I therefore release them in my appDelegate's dealloc method. When I go to use these two arrays in a class, I want one array to store the values from the other, so that the other can have it's contents removed, but still stick around for use. Something like this: [appDelegate.arrayTwo addObjectsFromArray:appDelegate.arrayOne]; [appDelegate.arrayOne removeAllObjects]; I'm getting the compiler error: EXC_BAD_ACCESS because of a pointer issue? retaining issue? Any help would be greatly appreciated! Thanks

    Read the article

  • How can I tell NetBeans to use the latest available version of a JAR for a library?

    - by Freiheit
    I have a Netbeans project with a library defined which includes several JARs. These JARs are versioned like lib\blah\com.blah.wibble.jar_0.6.1.201004161543 . These are nightly builds from another project so that version changes often. I know I can point NetBeans at the specific JARs with the version name, but this means that every time I get a new version I have to update the NetBeans library. I can also strip the version name from the JARs, but this makes it hard to track down bugs. "What version of the blah JARs?" is usually the second thing we ask when we find a bug. Is it possible to tell Netbeans to use included com.blah.wibble.jar_[??????] where ???? is some sort of automatic pointer to use the latest available version?

    Read the article

  • How to modify TList<record> value?

    - by Astronavigator
    How to modify TList < record value ? type TTest = record a,b,c:Integer end; var List:TList<TTest>; A:TTest; P:Pointer; .... .... List[10] := A; <- OK List[10].a:=1; <- Here compiler error : Left side cannot be assined to P:=@List[10]; <- Error: Variable requied

    Read the article

  • Performance intensive string splitting and manipulation in java

    - by juhanic
    What is the most efficient way to split a string by a very simple separator? Some background: I am porting a function I wrote in C with a bunch of pointer arithmetic to java and it is incredibly slow(After some optimisation still 5* slower). Having profiled it, it turns out a lot of that overhead is in String.split The function in question takes a host name or ip address and makes it generic: 123.123.123.123-*.123.123.123 a.b.c.example.com-*.example.com This can be run over several million items on a regular basis, so performance is an issue.

    Read the article

  • How to do "See Also" to a book using doxygen

    - by Paul J. Lucas
    The Javadoc @see allows a simple string as an argument to refer to something like a book, e.g.: @see "The Java Programming Language." As far as I can tell, the Doxygen \see offers no equivalent. Is there any way to have a book reference generated in the documentation, e.g.: See Also The C++ Programming Language, Bjarne Stroustrup, Addison-Wesley, 2000, section 19.4.1: The Standard Allocator ? Clarification This question is about how to do a "See Also" as part of a comment, e.g.: /** * Allocates memory in an amazing way. * \param size The number of bytes to allocate. * \return Returns a pointer to the start of the allocated memory. * \see MyOtherClass::alloc() * \see "The C++ Programming Language," Bjarne Stroustrup, Addison-Wesley, 2000, * section 19.4.1: The Standard Allocator. */ void* my_alloc( size_t size ); Of course the above does not work in Doxygen. Note that if there are multiple \see tags, they should be merged into a single "See Also" section (like the way \see normally works.

    Read the article

  • Perl, treat string as binary byte array

    - by Mike
    In Perl, is it appropriate to use a string as a byte array containing 8-bit data? All the documentation I can find on this subject focuses on 7-bit strings. For instance, if I read some data from a binary file into $data my $data; open FILE, "<", $filepath; binmode FILE; read FILE $data 1024; and I want to get the first byte out, is substr($data,1,1) appropriate? (again, assuming it is 8-bit data) I come from a mostly C background, and I am used to passing a char pointer to a read() function. My problem might be that I don't understand what the underlying representation of a string is in Perl.

    Read the article

  • Copying a 14bit grayscale image (saved in long[]) to a pictureBox

    - by Itsik
    My camera gives me 14bit grayscale images, but the API's function returns a long* to the image data. (so i'm assuming 4 bytes for each pixel) My application is written in C++/CLI, and the pictureBox is of .NET type. I am currently using the BitmapData.LockBits() mechanism to gain pointer access to the image data, and using memcpy(bmpData.Scan0.ToPointer(), imageData, sizeof(long)*height*width) to copy the image data to the Bitmap. For now, the only PixelFormat that is working is 32bit RGB, and the image appears in shades of blue with contours. Trying to initialize the Bitmap as 16bppGrayscale isn't working. I would ideally want to cast the array from long to word and using a 16bit format (hoping the the 14bit data will be displayed properly) but I'm not sure if this works. Also, I don't want to iterate over the image data, so finding the min/max and then histogram stretching to [0..255] isnt an option for me (the display must be as efficient as possible) Thanks

    Read the article

  • Data-separation in a Symfony Multi-tenant app using Doctrine

    - by Prasad
    I am trying to implement a multi-tenant application, that is - data of all clients in a single database - each shared table has a tenant_id field to separate data I wish to achieve data separation by adding where('tenant_id = ', $user->getTenantID()) {pseudoc-code} to all SELECT queries I could not find any solution up-front, but here are possible approaches I am considering. 1) crude approach: customizing all fetchAll and fetchOne functions in every class (I will go mad!) 2) using listeners: possibly coding for the preDqlSelect event and adding the 'where' to all queries 3) override buildQuery(): could not find an example of this for front-end 4) implement contentformfilter: again need a pointer Would appreciate if someone could validate these & comment on efficieny, suitability. Also, if anyone has achieved multitenancy using another strategy, pl share. Thanks

    Read the article

  • How to dynamically replace a method implement in ObjC2?

    - by Abhi
    I am trying to learn how to write plugins using SIMBL. I got my plugin to load with the target application, and also know the method that I wish to override. However, I am not able to use class_getInstanceMethod correctly based on snippets on the Internet. Have things changed in OSX 10.6 and/or ObjC2? The following code from culater.net gives "Dereferencing pointer to incomplete type": BOOL DTRenameSelector(Class _class, SEL _oldSelector, SEL _newSelector) { Method method = nil; // First, look for the methods method = class_getInstanceMethod(_class, _oldSelector); if (method == nil) return NO; method->method_name = _newSelector; return YES; } Is there a complete example of how to override a method using SIMBL plugins? Thanks!

    Read the article

  • What's the purpose of having a separate "operator new[]" ?

    - by sharptooth
    Looks like operator new and operator new[] have exactly the same signature: void* operator new( size_t size ); void* operator new[]( size_t size ); and do exactly the same: either return a pointer to a big enough block of raw (not initialized in any way) memory or throw an exception. Also operator new is called internally when I create an object with new and operator new[] - when I create an array of objects with new[]. Still the above two special functions are called by C++ internally in exactly the same manner and I don't se how the two calls can have different meanings. What's the purpose of having two different functions with exactly the same signatures and exactly the same behavior?

    Read the article

  • Separating null byte separated UNICODE C string.

    - by Ramblingwood
    First off, this is NOT a duplicate of: http://stackoverflow.com/questions/1911053/turn-a-c-string-with-null-bytes-into-a-char-array , because the given answer doesn't work when the char *'s are Unicode. I think the problem is that because I am trying to use Unicode and thus wchar_t instead of char, the length of each character is different and thus, this doesn't work (it does in non-unicode): char *Buffer; // your null-separated strings char *Current; // Pointer to the current string // [...] for (Current = Buffer; *Current; Current += strlen(Current) + 1) printf("GetOpenFileName returned: %s\n", Current); Does anyone have a similar solution that works on Unicode strings? I have been banging my head on the this for over 4 hours now. C doesn't agree with me.

    Read the article

  • C# PropertyGrid drag drop

    - by gametheoryonline
    I'm trying to implement drag/drop support to a propertygrid in C# using VS2005 (.NET 2.0). The propertygrid can handle the dragenter etc. events, but there doesn't seem to be a way to get the griditem under the pointer during a drag event. The best I've been able to get so far is to use the selectedgriditem property to retrieve a custom propertydescriptor and set the value, but this requires a grid item to already be selected before starting the drag/drop operation. Has anyone had any luck with implementing this? Thanks :-)

    Read the article

  • BufferedImage Help

    - by Eddy Freeman
    I posted a question in sun java forums sometime ago and i am finding it hard to understand the first response i received from the replier though it seems he gave me the correct approach to my problem. The link to the question is: http://forums.sun.com/thread.jspa?threadID=5436562&tstart=0 Someone replied that i should use BufferedImage and make tiles. I don't really understand what the tiles mean in connection with the BufferedImage. I would like someone to explain to me what the tiles are and how they are created in the BufferedImage. I have searched the web for a while but couldn't find any link that can help me understanding the basics of the tiles and creating the tiles. Any pointer to a site is also appreciated. I need help in understanding the tiles in connection with the BufferedImage and also how they are created.

    Read the article

  • doubt in sizeof implementation

    - by aks
    Below is the program to find the size of a structure without using sizeof operator: struct MyStruct { int i; int j; }; int main() { struct MyStruct *p=0; int size = ((char*)(p+1))-((char*)p); printf("\nSIZE : [%d]\nSIZE : [%d]\n", size); return 0; } My doubt is: Why is typecasting to char * required? If I don't use the char* pointer, the output is 1 - WHY?

    Read the article

  • Jquery clickable block

    - by Clint
    HI, I have this code for extracting the href and adding it to a parent block... $(".new-dev").hover(function(){ $(this).css('cursor','pointer'); $('this').$('a').css('color','#696969'); },function(){ $('this').$('a').css('color','#000'); }); What I want to do is make the a within the block change color on rollover. Unsure of how to do this when using $(this). Any advice welcome. Thanks, C

    Read the article

  • got a question about Linked-List in java code.

    - by glacier89
    Linked-List: Mirror Consider the following private class for a node of a singly-linked list of integers: private class Node{ public int value; public Node next; } A wrapper-class, called, ListImpl, contains a pointer, called start to the first node of a linked list of Node. Write an instance-method for ListImpl with the signature: public void mirror(); That makes a reversed copy of the linked-list pointed to by start and appends that copy to the end of the list. So, for example the list: start 1 2 3 after a call to mirror, becomes: start 1 2 3 3 2 1 Note: in your answer you do not need to dene the rest of the class for ListImpl just the mirror method.

    Read the article

  • const read only local copies

    - by robUK
    Hello gcc 4.4.4 c89 I am just wondering is it worth passing a const into a function. i.e. void do_something(const char *dest, const int size) The size is a read-only so I don't want to change it. However, some developers never have this as const has it is a local copy that is being used. The pointer is const as you can change the value in the calling routine. I always have a const on read-only local copies, as it confirms to anyone reading my code that it is a read-only variable. And also, when coding I don't make the mistake of changing it without realizing. Many thanks for any suggestions,

    Read the article

  • generic async loading method for page web scripts?

    - by boomhauer
    The google analytics code went to an async load model some time back. I've noticed that a lot of the other scripts I use on many sites are causing slow load times - specifically the addthis script and the facebook like button. I'm noticing that the slow load times of these scripts is causing the google bot to calc my page loadtimes as being much slower than previously. I'd like to know if there is a standard/generic way of causing these scripts to load async as well, or perhaps a pointer to someone who has done the work for this already. Seems this would be a popular thing to do, but not much luck searching around.

    Read the article

  • Sending BLOBs in a JSON service,... how?

    - by Marten Sytema
    Hello I have a webservice (ie. servlet) implemented in Java. It gets some data from a MySQL table, with one column being of type BLOB (an image), and some other columns are just plain text. Normally I would store the file outside the database with a pointer to it in the database, but due to circumstance I now have to use this BLOB column... What is the proper way to send this? How to encode the image in a JSONObject, and how to parse (and RENDER!) it on the otherside ? I want to use JSONP, to avoid having to proxy it through the consumer's webserver. So that the consumer can just put in a tag pointing to the webservice, calling a callback. Any thoughts how to handle images in this situation? Also thoughts on performance etc. are interesting!

    Read the article

  • vector<string> or vector<char *>?

    - by Aaron
    Question: What is the difference between: vector<string> and vector<char *>? How would I pass a value of data type: string to a function, that specifically accepts: const char *? For instance: vector<string> args(argv, argv + argc); vector<string>::iterator i; void foo (const char *); //*i I understand using vector<char *>: I'll have to copy the data, as well as the pointer Edit: Thanks for input!

    Read the article

  • Returning a C++ reference in a const member functionasses

    - by Chris Kaminski
    A have a class hierarchy that looks somethign like this: class AbstractDataType { public: virtual int getInfo() = 0; }; class DataType: public AbstractDataType { public: virtual int getInfo() { }; } class Accessor { DataType data; public: const AbstractDataType& getData() const { return(data); } } Well, GCC 4.4 reports: In member function ‘const AbstractDataType& Accessor::getData() const’: error: invalid initialization of reference of type ‘const AbstractDataType&’ from expression of type ‘const DataType’ Where am I going wrong - is this a case where I MUST use a pointer?

    Read the article

  • Only compiles as an array of pointers, not array of arrays

    - by Dustin
    Suppose I define two arrays, each of which have 2 elements (for theoretical purposes): char const *arr1[] = { "i", "j" }; char const *arr2[] = { "m", "n" }; Is there a way to define a multidimensional array that contains these two arrays as elements? I was thinking of something like the following, but my compiler displays warnings about incompatible types: char const *combine[][2] = { arr1, arr2 }; The only way it would compile was to make the compiler treat the arrays as pointers: char const *const *combine[] = { arr1, arr2 }; Is that really the only way to do it or can I preserve the type somehow (in C++, the runtime type information would know it is an array) and treat combine as a multidimensional array? I realise it works because an array name is a const pointer, but I'm just wondering if there is a way to do what I'm asking in standard C/C++ rather than relying on compiler extensions. Perhaps I've gotten a bit too used to Python's lists where I could just throw anything in them...

    Read the article

  • Why is this basic equality test failing?

    - by Goose Bumper
    I have a pointer m to an object, and calling m->det() returns 14 (the return type is a double). Why would the following statement evaluate to false? cout << (m->det()==14) << endl; I just don't understand how this could be failing. Using cout << m->det() << endl; cout << (m->det()==14) << endl; gives me: 14 0

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >