Search Results

Search found 12267 results on 491 pages for 'out of memory'.

Page 291/491 | < Previous Page | 287 288 289 290 291 292 293 294 295 296 297 298  | Next Page >

  • Fastest way to represent a collection of bits in PHP?

    - by Piskvor
    What is a good way to represent a collection of bits? I have a set of various on/off toggles (thousands of them) and need to store and retrieve their state. The naïve implementation would be an array of booleans, but I'm wondering if there's a better way (better in terms of access speed and/or memory requirements). I've found this BitArray implementation, but it's limited to 32 bits, which is not enough for this case.

    Read the article

  • Remove stateful EJB bean in client

    - by palto
    I'm currently learning EJB and as I understand when client gets a stateful session bean the server keeps it in memory(or passivates it) until the client removes the bean. Pretty simple, except nowhere I have seen any examples of how the client can actually remove the bean. How do you do that other than shutting down your client application? Or do I just have to implement a reset method in all my stateful beans if I want to start over?

    Read the article

  • IPHONE DEVELOPMENT PROFILE EXPIRED - I TRIED EVERYTHING AND YES, I READ THE DOCS

    - by theiphoneguy
    I really combed this site and others. I read and re-read the related links here and the Apple docs. I'm sorry, but either I am obviously missing something right under my nose, or this Apple profile/certificate stuff is a bit convoluted. Here it is: I have a product in the App Store. I have updated it several times and users like it. My development profile recently expired just when I was improving the app for its next release. I can run the app in the simulator. I can compile and put the distribution build on my iPhone just fine. I went to the Apple portal and renewed the development profile. I downloaded it and installed it in Xcode. I see it in the Organize window. I see it on my iPhone. I CANNOT put the debug build on my iPhone to debug or run with Instruments. The message is that either there is not a valid signed profile or it is untrusted. I subsequently tried to download and install the certificate to my Mac's keychain. Still no success. I checked the code signing section of Project settings and also for the target and the root. All appears to indicate that it is using the expected development profile for debug. Yes, I had deleted the old profile from my iPhone, from the Organizer. I cleaned the Xcode cache and all targets. I have done all of this several times and in varying sequences to try to cover every possibility. I am ready to do anything to be able to debug with Instruments in order to check for leaks or high memory usage. Even though the distribution compile runs fine on my iPhone and plays well with other running processes, I will not release anything without a leaks/memory test. Any ideas will be appreciated. If I missed something obvious, please forgive me - it was not due to just posting a question without searching for similar postings. Thanks!

    Read the article

  • javascript undefined compare

    - by nahum
    Ok here is my question in javascript you can declare a variable and be undefined you can apply variable == undefined, I know that but how you can compare a value that you dont know yet if it's in the cpu memory. I have a class which is create it when the user click on a button. before this the class is undefined there no exist in any where so how can I compare it? without using try{}catch(e){} is there a way????

    Read the article

  • Are there dtrace ustack() helpers on Mac OS X?

    - by raichoo
    Hi, I've been wondering if there is any chance to use dtrace ustack helpers on Mac OS X for python and other interpreted languages? I know that you can figure out what python and php on OpenSolaris are doing when giving the ustack some extra memory for a buffer. Is this somehow possible on Mac OS X? Regards raichoo

    Read the article

  • Python: HTTP Post a large file with streaming

    - by Daniel Von Fange
    I'm uploading potentially large files to a web server. Currently I'm doing this: import urllib2 f = open('somelargefile.zip','rb') request = urllib2.Request(url,f.read()) request.add_header("Content-Type", "application/zip") response = urllib2.urlopen(request) However, this reads the entire file's contents into memory before posting it. How can I have it stream the file to the server?

    Read the article

  • How do CUDA devices handle immediate operands?

    - by Jack Lloyd
    Compiling CUDA code with immediate (integer) operands, are they held in the instruction stream, or are they placed into memory? Specifically I'm thinking about 24 or 32 bit unsigned integer operands. I haven't been able to find information about this in any of the CUDA documentation I've examined so far. So references to any documents on specific uarch details like this would be perfect, as I don't currently have a good model for how CUDA works at this level.

    Read the article

  • Struct Array Initialization and String Literals

    - by Christian Ammer
    Is following array initialization correct? I guess it is, but i'm not really sure if i can use const char* or if i better should use std::string. Beside the first question, do the char pointers point to memory segments of same sizes? struct qinfo { const char* name; int nr; }; qinfo queues[] = { {"QALARM", 1}, {"QTESTLONGNAME", 2}, {"QTEST2", 3}, {"QIEC", 4} };

    Read the article

  • Several ifstream vs. ifstream + constant seeking

    - by SpyBot
    I'm writing an external merge sort. It works like that: read k chunks from big file, sort them in memory, perform k-way merge, done. So I need to sequentially read from different portions of the file during the k-way merge phase. What's the best way to do that: several ifstreams or one ifstream and seeking? Also, is there a library for easy async IO?

    Read the article

  • BUILD ERROR The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does not exist or no valid version could be found

    - by Surendra
    Searching repository for plugin with prefix: 'eclipse'. org.apache.maven.plugins: checking for updates from central NG] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection timed out: connect Repository 'central' will be blacklisted ] BUILD ERROR The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does not exist or no valid version could be found For more information, run Maven with the -e switch Total time: 22 seconds Finished at: Fri Aug 26 17:42:01 IST 2011 Final Memory: 3M/15M

    Read the article

  • C# - Sharing static data between multiple processes

    - by Murtaza Mandvi
    I have a WCF service (instantiated within a Console application on NetTCP), this service has static data (large volume) which gets instantiated on the load. I have multiple instances of this Console application running at once, and all of them are doing the same static data initialization , is there a way that I can have a single data source and share the data among processes so that each process does not have to consume large amount of memory?

    Read the article

  • Basic Custom String Class for C++

    - by wdow88
    Hey all, I'm working on building my own string class with very basic functionality. I am having difficulty understand what is going on with the basic class that I have define, and believe there is some sort of error dealing with the scope occurring. When I try to view the objects I created, all the fields are described as (obviously bad pointer). Also, if I make the data fields public or build an accessor method, the program crashes. For some reason the pointer for the object is 0xccccccccc which points to no where. How can a I fix this? Any help/comments are much appreciated. //This is a custom string class, so far the only functions are //constructing and appending #include<iostream> using namespace std; class MyString1 { public: MyString1() { //no arg constructor char *string; string = new char[0]; string[0] ='\0'; std::cout << string; size = 1; } //constructor receives pointer to character array MyString1(char* chars) { int index = 0; //Determine the length of the array while (chars[index] != NULL) index++; //Allocate dynamic memory on the heap char *string; string = new char[index+1]; //Copy the contents of the array pointed by chars into string, the char array of the object for (int ii = 0; ii < index; ii++) string[ii] = chars[ii]; string[index+1] = '\0'; size = index+1; } MyString1 append(MyString1 s) { //determine new size of the appended array and allocate memory int newsize = s.size + size; MyString1 MyString2; char *newstring; newstring = new char[newsize+1]; int index = 0; //load the first string into the array while (string[index] != NULL) { newstring[index] = string[index]; index++; } //load the second string while (s.string[index] != NULL) { newstring[index] = s.string[index]; index++; } //null terminate newstring[newsize+1] = '\0'; delete string; //generate the object for return MyString2.string=newstring; MyString2.size=newsize; return MyString2; } private: char *string; int size; }; int main() { MyString1 string1; MyString1 string2("Hello There"); MyString1 string3("Buddy"); string2.append(string3); return 0; }

    Read the article

  • What is the standard way to deploy memcached?

    - by Tom
    I have two IIS servers and two MySQL servers. On all servers I have some available memory (More than a GB). What is the standard way to deploy memcached? Should I add a new server especially for memcached, or should I use my existing servers? If so, which servers? Thanks in advance

    Read the article

  • Can a math intensive application cause a crash?

    - by philcolbourn
    I have been messing with hash functions and functions to generate primes etc. I had 3 lock-ups in a short period. This was odd since my macbook rarely locks-up and usually only when I run out of memory - which does not happen often. But in this case, I had three in a row and none since (but I also am not generating as much load as before).

    Read the article

  • Remove objects from UINavigationController

    - by Joshep Freeman
    I would like to know if there is a way to know which objects [UIViewControllers?] are stored inside [self navigationController] (I'm guessing they are stored there with pushViewController?), and if there is a way to remove such objects. Consider this scenario: 1.- Show "Presentation screen" (a logo) 2.- Wait 2 seconds 3.- Push "Data screen" (no need for "Presentation screen" anymore but it's stored in Memory) Thanks for your time.

    Read the article

  • Find if there is an element repeating itself n/k times

    - by gleb-pendler
    You have an array size n and a constant k (whatever) You can assume the the array is of int type (although it could be of any type) Describe an algorithm that finds if there is an element(s) that repeats itself at least n/k times... if there is return one. Do so in linear time (O(n)) The catch: do this algorithm (or even pseudo-code) using constant memory and running over the array only twice

    Read the article

  • rails include with options

    - by holden
    Is it possible to limit an AR :include to say only pull in one record... Item.find(:all, :include => [ :external_ratings, :photos => LIMIT 1 ]) I have a list of items and each item has between 5 and 15 photos. I want to load a photo id into memory, but i don't need all of them, I just want to preview the first one. Is there a way to do this?

    Read the article

  • how to init and malloc array to pointer on C

    - by DoronS
    Hi all, looks like a memory leak when i try to initializing an array of pointers, this my code: void initLabelTable(){ register int i; hashNode** hp; labelHashTable = (hashNode**) malloc(HASHSIZE*sizeof(hashNode*)); hp = labelHashTable; for(i=0; i<HASHSIZE; i++) { *(hp+i) = NULL; } } any idea?

    Read the article

< Previous Page | 287 288 289 290 291 292 293 294 295 296 297 298  | Next Page >