Search Results

Search found 13616 results on 545 pages for 'rights management'.

Page 169/545 | < Previous Page | 165 166 167 168 169 170 171 172 173 174 175 176  | Next Page >

  • Is there a more memory efficient way to search through a Core Data database?

    - by Kristian K
    I need to see if an object that I have obtained from a CSV file with a unique identifier exists in my Core Data Database, and this is the code I deemed suitable for this task: NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity; entity = [NSEntityDescription entityForName:@"ICD9" inManagedObjectContext:passedContext]; [fetchRequest setEntity:entity]; NSPredicate *pred = [NSPredicate predicateWithFormat:@"uniqueID like %@", uniqueIdentifier]; [fetchRequest setPredicate:pred]; NSError *err; NSArray* icd9s = [passedContext executeFetchRequest:fetchRequest error:&err]; [fetchRequest release]; if ([icd9s count] > 0) { for (int i = 0; i < [icd9s count]; i++) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init]; NSString *name = [[icd9s objectAtIndex:i] valueForKey:@"uniqueID"]; if ([name caseInsensitiveCompare:uniqueIdentifier] == NSOrderedSame && name != nil) { [pool release]; return [icd9s objectAtIndex:i]; } [pool release]; } } return nil; After more thorough testing it appears that this code is responsible for a huge amount of leaking in the app I'm writing (it crashes on a 3GS before making it 20 percent through the 1459 items). I feel like this isn't the most efficient way to do this, any suggestions for a more memory efficient way? Thanks in advance!

    Read the article

  • NSCFType keeps occurring, something is not being released?

    - by user1493543
    I'm attempting to delete files from the documents directory using a tableview/array combination. For some reason, my NSString pointing to the Documents directory path is being converted to a NSCFType (which after some research, I understand is happening because a variable is not being released). Because of this, the application crashes at the line NSString *lastPath = [documentsDirectory stringByAppendingPathComponent:temp]; claiming that NSCFType cannot recognize the method stringByAppendingPathComponent. I would appreciate if someone could help me out (I hope I have explained this clearly enough). - (void) tableView: (UITableView *) tableView commitEditingStyle: (UITableViewCellEditingStyle) editingStyle forRowAtIndexPath: (NSIndexPath *) indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { NSString *temp = [directoryContent objectAtIndex:indexPath.row]; NSLog(temp); NSString *lastPath = [documentsDirectory stringByAppendingPathComponent:temp]; [[NSFileManager defaultManager] removeItemAtPath:lastPath error:nil]; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); documentsDirectory = [paths objectAtIndex:0]; directoryContent = [[[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsDirectory error:nil] retain]; //tableview handling below }

    Read the article

  • C release dynamically allocated memory

    - by user1152463
    I have defined function, which returns multidimensional array. allocation for rows arr = (char **)malloc(size); allocation for columns (in loop) arr[i] = (char *)malloc(v); and returning type is char** Everything works fine, except freeing the memory. If I call free(arr[i]) and/or free(arr) on array returned by function, it crashes. Thanks for help EDIT:: allocating fuction pole = malloc(zaznamov); char ulica[52], t[52], datum[10]; float dan; int i = 0, v; *max = 0; while (!is_eof(f)) { get_record(t, ulica, &dan, datum, f); v = strlen(ulica) - 1; pole[i] = malloc(v); strcpy(pole[i], ulica); pole[i][v] = '\0'; if (v > *max) { *max = v; } i++; } return pole;` part of main where i am calling function pole = function(); releasing memory int i; for (i = 0; i < zaznamov; i++) { free(pole[i]); pole[i] = NULL; } free(pole); pole = NULL;

    Read the article

  • Simulate memory warnings from the code, possible?

    - by krasnyk
    I know i can simulate a memory warning on the simulator by selecting 'Simulate Memory Warning' from the drop down menu of the iPhone Simulator. I can even make a hot key for that. But this is not what I'd like to achieve. I'd like to do that from the code by simply, lets say doing it every 5 seconds. Is that possible?

    Read the article

  • CoreData leak when reading a property

    - by Kamchatka
    Hello, I have the following code in a loop iterating over the different document objects: NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; [document primitiveValueForKey:@"data"]; [data writeToFile:filename atomically:NO]; [document.managedObjectContext refreshObject:document mergeChanges:NO]; [pool release]; The "data" property is a large blob (a 1MB image). And as I monitor the memory with the Allocation Instrument memory usage is increasing. I cannot find where the leak is coming from and how to remove it. Thanks!

    Read the article

  • How to start an Open Source Software development

    - by harigm
    I have an idea to start a Open Source Software using Java and PHP, I am so sure that software will help many individuals in their daily routine. Can Any one suggest me how to start the process ? Do we need to register some where and submit our idea for an approval before we start development? Any license that we need to get? How to invite the people for the open source development community, if they are interested? If any people who contributes Do we need to get any agreement signed off? once the Open Source product is stabilized who will have the ownership?

    Read the article

  • Can a MAC address be used as a reliable part of a rights management (DRM) scheme?

    - by Jarrod Mosen
    We're currently writing some software that we want to protect. We thought that registering a user's MAC address in a database upon activation of the software seemed viable; we can profile and grab that with a Java applet, (is there a better way?) so getting it isn't too much of a problem. However, we want their computer to only run the application, and download application files/updates from the server when their MAC address has been verified with their one on-file. We understand that this means a lockdown to one computer, but special changes can be made on request. What would be the best way to verify their MAC address, to see if it exists in the database, and then serve them the files to run the application? (And to simply run it on subsequent requests, to prevent re-downloading.)

    Read the article

  • Persistence scheme & state data for low memory situations (iphone)

    - by Robin Jamieson
    What happens to state information held by a class's variable after coming back from a low memory situation? I know that views will get unloaded and then reloaded later but what about some ancillary classes & data held in them that's used by the controller that launched the view? Sample scenario in question: @interface MyCustomController: UIViewController { ServiceAuthenticator *authenticator; } -(id)initWithAuthenticator:(ServiceAuthenticator *)auth; // the user may press a button that will cause the authenticator // to post some data to the service. -(IBAction)doStuffButtonPressed:(id)sender; @end @interface ServiceAuthenticator { BOOL hasValidCredentials; // YES if user's credentials have been validated NSString *username; NSString *password; // password is not stored in plain text } -(id)initWithUserCredentials:(NSString *)username password:(NSString *)aPassword; -(void)postData:(NSString *)data; @end The app delegate creates the ServiceAuthenticator class with some user data (read from plist file) and the class logs the user with the remote service. inside MyAppDelegate's applicationDidFinishLaunching: - (void)applicationDidFinishLaunching:(UIApplication *)application { ServiceAuthenticator *auth = [[ServiceAuthenticator alloc] initWithUserCredentials:username password:userPassword]; MyCustomController *controller = [[MyCustomController alloc] initWithNibName:...]; controller.authenticator = auth; // Configure and show the window [window addSubview:..]; // make everything visible [window makeKeyAndVisible]; } Then whenever the user presses a certain button, 'MyCustomController's doStuffButtonPressed' is invoked. -(IBAction)doStuffButtonPressed:(id)sender { [authenticator postData:someDataFromSender]; } The authenticator in-turn checks to if the user is logged in (BOOL variable indicates login state) and if so, exchanges data with the remote service. The ServiceAuthenticator is the kind of class that validates the user's credentials only once and all subsequent calls to the object will be to postData. Once a low memory scenario occurs and the associated nib & MyCustomController will get unloaded -- when it's reloaded, what's the process for resetting up the 'ServiceAuthenticator' class & its former state? I'm periodically persisting all of the data in my actual model classes. Should I consider also persisting the state data in these utility style classes? Is that the pattern to follow?

    Read the article

  • What are the key steps a Developer needs to go through to become a good Project Manager?

    - by adpd
    I am a full-time Developer who aspires to be a great technical Project Manager. What are the key steps that you think I need to go through to achieve that aspiration? I am interested in professional qualifications (e.g. PRINCE2, etc.), training courses, personality traits, experiences, tips and techniques that would improve my chances of being the best I can be. I would be interested in hearing if anybody has done this, and whether they are happy with their change from development or if they wished they had stuck to a development (and the reasons behind this decision).

    Read the article

  • nsmutabledictionary is showing memory leak

    - by Narasimhaiah Kolli
    Why doing assigning nil to nsmutabledictioanry and allocating is crashing ans showing memory release at this point of place?? self.delegate.replenishAddedmaterials = nil; self.delegate.replenishAddedmaterials = [[NSMutableDictionary alloc] init]; MATERIAL_ITEM *materialItem = [[MATERIAL_ITEM alloc] init]; VENDOR_HEADER *vendor = [[VENDOR_HEADER alloc] init]; PURCHASING_ORG_HEADER *purOrg = [[PURCHASING_ORG_HEADER alloc] init]; [self.delegate.replenishAddedmaterials setObject:[NSMutableArray arrayWithObject:materialItem] forKey:materialItem]; [[self.delegate.replenishAddedmaterials objectForKey:materialItem] addObject:vendor]; [[self.delegate.replenishAddedmaterials objectForKey:materialItem] addObject:purOrg]; After executing allocation of nsmutabledictionary i am getting following message * -[MATERIAL_ITEM release]: message sent to deallocated instance 0x11e62810I have implemented my project in ARC

    Read the article

  • GIT vs. Perforce- Two VCS will enter... one will leave.

    - by Justin Bozonier
    So I'm in the process of getting GIT sold at work. First thing I need is to convince everyone that GIT is better at what they're already used to doing. We currently use Perforce. Anybody else go through a similar sale? Any good links/advice? One of the big wins is that we can worth with it disconnected from the network. Another win imo is the way adds/checkouts are handled. More points are welcome! Also we have about 10-20 devs total.

    Read the article

  • C# performance varying due to memory

    - by user1107474
    Hope this is a valid post here, its a combination of C# issues and hardware. I am benchmarking our server because we have found problems with the performance of our quant library (written in C#). I have simulated the same performance issues with some simple C# code- performing very heavy memory-usage. The code below is in a function which is spawned from a threadpool, up to a maximum of 32 threads (because our server has 4x CPUs x 8 cores each). This is all on .Net 3.5 The problem is that we are getting wildly differing performance. I run the below function 1000 times. The average time taken for the code to run could be, say, 3.5s, but the fastest will only be 1.2s and the slowest will be 7s- for the exact same function! I have graphed the memory usage against the timings and there doesnt appear to be any correlation with the GC kicking in. One thing I did notice is that when running in a single thread the timings are identical and there is no wild deviation. I have also tested CPU-bound algorithms and the timings are identical too. This has made us wonder if the memory bus just cannot cope. I was wondering could this be another .net or C# problem, or is it something related to our hardware? Would this be the same experience if I had used C++, or Java?? We are using 4x Intel x7550 with 32GB ram. Is there any way around this problem in general? Stopwatch watch = new Stopwatch(); watch.Start(); List<byte> list1 = new List<byte>(); List<byte> list2 = new List<byte>(); List<byte> list3 = new List<byte>(); int Size1 = 10000000; int Size2 = 2 * Size1; int Size3 = Size1; for (int i = 0; i < Size1; i++) { list1.Add(57); } for (int i = 0; i < Size2; i = i + 2) { list2.Add(56); } for (int i = 0; i < Size3; i++) { byte temp = list1.ElementAt(i); byte temp2 = list2.ElementAt(i); list3.Add(temp); list2[i] = temp; list1[i] = temp2; } watch.Stop(); (the code is just meant to stress out the memory) I would include the threadpool code, but we used a non-standard threadpool library. EDIT: I have reduced "size1" to 100000, which basically doesn't use much memory and I still get a lot of jitter. This suggests it's not the amount of memory being transferred, but the frequency of memory grabs?

    Read the article

  • Available memory for iPhone OS app

    - by hgpc
    Is there a function or constant defining the amount of available memory for an app in iPhone OS? I'm looking for a device-independent way (iPod touch, iPhone, iPad) to know how much memory the app has left.

    Read the article

  • In Scrum, should a team remove points from (defect) stories that don't result in a code change?

    - by CanIgtAW00tW00t
    My work uses a Scrum-like process to manage projects. I say Scrum-like, because we call it Scrum, but our project managers exclude aspects of Scrum that are inconvenient (most notably customer interaction). One of the stories in our current sprint was to correct a defect. After spending almost an entire day working on the issue, I determined the issue was the result of a permissions issue, so I didn't end up modifying any code. Our Scrum master / project manager decided that no code change equals zero points. I know that Scrum points are supposed to measure size / complexity and not time, but our Scrum master invests a lot of time in preparing graphs and statistical information from past sprints (average velocity, average points completed, etc.) I've always been of the opinion that for statistics to be meaningful in any way, the data must be as accurate as possible. All of our data is fuzzy to begin with, because, from time to time, we're encouraged by the Scrum master to "adjust" our size / complexity estimates, both increasing and decreasing them. I'd like to hear some other developers / Scrum team members thoughts on the merits of statistics based on past sprints, and also whether they think it's appropriate to "adjust" size / complexity estimates in the middle of a sprint, or the remove all points from a story all together for situations similar to what I've just described.

    Read the article

  • Develop multiple very similar projects at once

    - by Raveren
    I am developing a semi-complicated site that is available in several countries at once. Much effort has been put in to make the code bases as similar as possible to one another and ultimately only the config file and some representational data will differ between them. Each project has its own SVN repository which maps directly to a live test site. That part is handled by the IDE we use to work. Now I am in need to create a some sort of system to keep all these projects in sync. The best theoretical solution so far is to create a local hook script that would fire on committing and Merge the committed files from the project that is being committed to all other projects Optionally upload them to the live site, replacing previous files The first problem is that I don't know how I would do the merging - I guess it would be like applying a SVN patch or something. The second is if I do not want to upload the changes to the live server, how would I go about synching the live and local code bases (replace older files?). I am posting this question, not going through the potentially huge trouble of solving the aforementioned problems myself is that I believe this is a pretty common situation and someone would already have a solution and others may benefit from the answers in the future. Lastly, I'm on windows7, develop PHP and use tortoiseSVN.

    Read the article

  • Django - Static content display based on URL

    - by Steven Potter
    I'm working on a Django site with a basic three column design. Left column navigation, center column content and right column URL specific content blocks. My question is about the best method of controlling the URL specific content blocks in the right column. I am thinking of something along the lines of the Flatpages app that will make the content available to the template context if the URL matches a pre-determined pattern (perhaps regex?). Does anyone know if such an app already exists? If not, I am looking for some advice about the best way to implement it. Particularly in relation to the matching of patterns to the current URL. Is there any good way to re-use parts of the Django URL dispatcher for this use?

    Read the article

  • finding out memory allocation hotspots in java

    - by Zamir
    Our GC is working hard and we have some pauses that we want to decrease. We have some memory allocation issues that we want to solve before or while we are tweaking with the actual JVM GC args. I would like to know which objects are making the GC sweat: is there a way to know which objects are evacuated every time the GC is working? is there a way to know which objects are moved between areas every time the GC is working? Is there a way to know which objects are in Eden area? I am working extensively with Jprofiler and Memory Analyzer. I would like to get this information on a running application in my staging environment.

    Read the article

  • Overriding SetThreadExecutionState

    - by unixman83
    I am not sure if this belongs on serverfault or superuser. I would like to override SetThreadExecutionState(ES_DISPLAY_REQUIRED) to be a no-op. How is this accomplished? Is there some registry setting that can be altered instead of API hooking? Blocking ES_DISPLAY_REQUIRED will prevent apps from keeping the monitor powered on. I have an application (likely the antivirus) that is preventing some monitors from entering power-save and I think this function is the culprit.

    Read the article

  • Advise on starting a new job

    - by Sisiutl
    I hope this isn't too off-topic, but in a week I will start a new job at a manufacturing company managing the development of a new eCommerce site. The company scores about a 3 on the "Joel" test. I will inherit 3 programmers who developed the company web site and do general IT programming. I have the grey hair and credentials to have their initial respect but I'm an engineer, not a manager. I'm looking for practical advise - particularly for the first 90 days - on how to establish myself, keep the team together, and move forward.

    Read the article

  • How to optimize paging for large in memory database

    - by snakefoot
    I have an application where the entire database is implemented in memory using a stl-map for each table in the database. Each item in the stl-map is a complex object with references to other items in the other stl-maps. The application works with a large amount of data, so it uses more than 500 MByte RAM. Clients are able to contact the application and get a filtered version of the entire database. This is done by running through the entire database, and finding items relevant for the client. When the application have been running for an hour or so, then Windows 2003 SP2 starts to page out parts of the RAM for the application (Eventhough there is 16 GByte RAM on the machine). After the application have been partly paged out then a client logon takes a long time (10 mins) because it now generates a page fault for each pointer lookup in the stl-map. I can see it is possible to tell Windows to lock memory in RAM, but this is generally only recommended for device drivers, and only for "small" amounts of memory. I guess a poor mans solution could be to loop through the entire memory database, and thus tell Windows we are still interested in keeping the datamodel in RAM. I guess another poor mans solution could be to disable the pagefile completely on Windows. I guess the expensive solution would be a SQL database, and then rewrite the entire application to use a database layer. Then hopefully the database system will have implemented means to for fast access. Are there other more elegant solutions ?

    Read the article

  • Android - Memory leak when dynamically building UI with image resource backgrounds

    - by Rich
    I have an Activity that I swear is leaking memory. The app I'm working on does a lot with images, so I've had to be pretty stingy with memory when working directly with Bitmaps. I added an Activity, and now if you use this new Activity it basically puts me over the edge with mem usage and I end up throwing the "Bitmap exceeds VM budget" exception. If you never launch this Activity, everything is smooth as it was previously. I started reading about memory leaks, and I think that I have a similar situation to what is described in the article in the Android docs. I'm dynamically creating a bunch of image views and adding a BackgroundDrawable from the resources and adding an OnClickListener as well. I imagine I have to do some cleanup when the Activity hits onPause in its life cycle, but I'd like to know specifically what is the correct way. Here is the code that should demonstrate the objects I'm working with... LinearLayout templateContainer; . . . ImageView imgTemplatePreview = (ImageView) item.findViewById(R.id.imgTemplatePreview); . . . imgTemplatePreview.setBackgroundDrawable(getResources().getDrawable(previewId)); imgTemplatePreview.setOnClickListener(imgClick); templateContainer.addView(item);

    Read the article

  • Is it possible to optimize maven dependencies automatically?

    - by AlexR
    I am working on a big project that consists of about 40 sub-projects with very not optimized dependencies. There are declared dependencies that are not in use as well as used but undeclared dependencies. The second case is possible when dependency is added via other dependency. I want to remove redundant and add required dependencies. I ran mvn dependency:analyze and got a long list of warnings I have to fix now. I wonder whether there is maven plugin or any other utility that can update my pom.xml files automatically. I tried to do it manually but it takes a lot of time. It seems it will take a couple of days of copy/paste to complete the task. In worse case I can write such script myself but probably ready stuff exists? Here is how mvn dependency:analyze reports dependency warnings: [WARNING] Used undeclared dependencies found: [WARNING] org.apache.httpcomponents:httpcore:jar:4.1:compile [WARNING] Unused declared dependencies found: [WARNING] commons-lang:commons-lang:jar:2.4:compile [WARNING] org.json:json:jar:20090211:compile

    Read the article

  • iPhone OS Memory Warnings. What Do The Different Levels Mean?

    - by dugla
    Regarding the black art of managing memory on iPhone OS devices: what do the different levels of memory warning mean. Level 1? Level 2? Does the dial go to 11? Context: After an extensive memory stress testing period - including running my iPad app with the iPod music player app playing, I am inclined to ignore the random yet infrequent memory warnings I am receiving. My app never crashes. Ever. My app is leak free. And, well, the mems warnings just don't seem to matter. Thanks, Doug

    Read the article

< Previous Page | 165 166 167 168 169 170 171 172 173 174 175 176  | Next Page >