Search Results

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

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

  • Question about memory usage

    - by sudo rm -rf
    Hi there. I have the following method: +(NSMutableDictionary *)getTime:(float)lat :(float)lon { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init]; [dictionary setObject:hour forKey:@"hour"]; [dictionary setObject:minute forKey:@"minute"]; [dictionary setObject:ampm forKey:@"ampm"]; return dictionary; } A lot of the method is chopped off, so I think I need the pool for some other stuff in the method. Here's my question. I know that I need to release the following objects: [dictionary release]; [pool release]; However, I can't release the dictionary before I return it, but as soon as I return it the rest of the method isn't performed. What should I do?

    Read the article

  • Automating builds from subversion tags

    - by Ajaxx
    I'm trying to automate the build process for engineering group. As part of that automation, I'm trying to get to a point where the act of applying a specific tag that adheres to a pattern will kick off an automated process that will do the following: Check out source code Create a build script from a template Build the project I'm pretty certain I could do this with a post-hook in subversion, but I'm trying to figure out a way to do this with something other than a subversion hook. Would it make sense to monitor the tags directory in the subversion repository to kick off my workflow? Are there any decent tools that help with this (.NET would be great if possible). Am I better off just writing an engine to do this? My preferences: Existing product that does all or part of this If development work needs to occur, .NET is preferable Works with Windows (we've got a Linux based repo, but builds all occur on windows)

    Read the article

  • how reference copy is handled in Objective-C?

    - by Cathy
    Object graph [Instance A] tree / \ / \ / \ ↓ ↓ [Instance B] [Instance C] apple bug Question Instance A has to reference copies to Instance B and Instance C. If I retain or release Instance A, which has references to the other two instances, what happens to the various reference counts?

    Read the article

  • memory usage in iOS

    - by varun
    My app has a simple UI interface having simple buttons, date picker, picker view, table view, action sheet, toolbar, alert boxes etc. No images, no network access. Just plain simple UI. It accesses SQLite database a lot. ARC option is enabled. I have many questions to ask: In .h files, I am defining IBOutlets like @property(nonatomic, retain) IBOutlet UIButton *bt; Where do i need to do bt=nil? in didReceiveMemoryWarning or viewDidLoad Live Bytes in Instruments tool is 4-5MB. Is it enough or I need to reduce memory usage? If so, how can I do so? Please mention few important points. Also, what all need to be added to the following methods? applicationDidReceiveMemoryWarning UIApplicationDidReceiveMemoryWarningNotification

    Read the article

  • How can I avoid causing memory leaks in Firefox?

    - by mrdanimal
    It seems that there is a lot of information on memory leaks in IE and how web developers can avoid them, but I can't find much on avoiding leaks in FF. I've found lots of random tips on how end users can tweak their preferences, or tips for extension developers, but little on what I can do as a web developer to make sure my pages don't leak. Am I missing something? It seems lazy to just blame it on the user and say "you've got too many extensions". Or are the major patterns the same as in IE -- circular references and all that? Also, if anyone knows of any tools to troubleshoot leaks in FF, that would be great. I found this: https://addons.mozilla.org/en-US/firefox/addon/2490/ But it's apparently just for chrome and extension development.

    Read the article

  • Howt to tar.gz for JCore CMS

    - by Pathic
    I use JCore CMS, I create 1 template and compress folder with 7-zip to be tar.gz and I upload it then message appear, "Template couldn't be extracted! Error: Invalid template! Please make sure to upload a valid tar.gz template file." "There were problems uploading some of the templates you selected. The following templates couldn't be uploaded: blog.tar.gz." How can I create compressed file with format JCore CMS ? Thanks for advance. pathic myee.web.id

    Read the article

  • SaaS tool for *simple* requirements definition?

    - by Angela
    I've seen some complex, enterprise tools for requirements like Rymatech's FeaturePlan -- is there something that enables collaboration and best practices for putting Business-Readable, Domain-Specific (or natural language) requirements and acceptance criteria in place?

    Read the article

  • Changing pointer of self

    - by rob5408
    I have an object that I alloc/init like normal just to get a instance. Later in my application I want to load state from disk for that object. I figure I could unarchive my class (which conforms to NSCoding) and just swap where my instance points to. To this end I use this code... NSString* pathForDataFile = [self pathForDataFile]; if([[NSFileManager defaultManager] fileExistsAtPath:pathForDataFile] == YES) { NSLog(@"Save file exists"); NSData *data = [[NSMutableData alloc] initWithContentsOfFile:pathForDataFile]; NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; [data release]; Person *tempPerson = [unarchiver decodeObjectForKey:@"Person"]; [unarchiver finishDecoding]; [unarchiver release]; if (tempPerson) { [self release]; self = [tempPerson retain]; } } Now when I sprinkled some NSLogs throughout my application I noticed self.person: <Person: 0x3d01a10> (After I create the object with alloc/init) self: <Person: 0x3d01a10> (At the start of this method) tempPerson: <Person: 0x3b1b880> (When I create the tempPerson) self: <Person: 0x3b1b880> (after i point self to the location of the tempPerson) self.person: <Person: 0x3d01a10> (After the method back in the main program) What am I missing?

    Read the article

  • Use of malloc() and free() in C++

    - by Matt H
    Is there any reason to use malloc and free in C++ over their more modern counterparts? Occasionally I see this, and I can't see why some people do it. Are there any advantages/disadvantage, or is there no real difference, except that it's just better to use C++ constructs in C++?

    Read the article

  • How to format dates in Jahia 6 CMS?

    - by dpb
    I am helping a friend of mine put up a site for his business. I’ve read different posts and sites trying to find the ideal CMS tool, but people have different views of what is the best, so I finally just picked one of them at random. So I went for an evaluation of Jahia 6.0-CE. As you’ve probably guessed by now, I don’t have so much experience with CMS tools. I just want to setup the CMS, write the templates for the site and let my friend manage the content from there on. So I extracted the sources from SVN and went for a test drive. I managed to create some simple templates to get a hang of things but now I have an issue with a date format. In my definitions.cnd I declared the field like so: date myDateField (datetimepicker[format='dd.MM.yyyy']) This is formatted in the page and the selector also presents this in the dd.MM.yyyy format when inserting the content. But how about sites in other countries, countries that represent the date as MM.dd.yyyy for example? If I specify the format in the CND, hard coded, how can I change this later on so that it adapts based on the browser’s language? Do I extract the content from the repository and format it by hand in the JSP template based on a Locale, or is there a better way? Thank you.

    Read the article

  • How to release a string created inside a method in iphone?

    - by Warrior
    I have declared a local string inside the method.I am releasing the string inside the same method.I found my code crashing if release that object.If i dont release the string,code runs successfully.I have called that method in viewdidappear so that method is called while pushing and poping.Nothing gets printed in the console. Here is my code -(void)appendString{ NSString *locStr = [[NSString alloc] initWithString:@""]; for (int i=0;i<[result count]; i++) { locStr=[locStr stringByAppendingFormat:@"%@",[result objectAtIndex:i]]; } [str setString:locStr]; [locStr release]; } I am calling the "appendString" method from "viewDidAppear"."str" is a NSMutable string declared in .h class.How should i release the "locStr" .Please help me out

    Read the article

  • Instance of method leaking, iPhone

    - by Wolfert
    The following method shows up as leaking while performing a memory-leaks test with Instruments: - (NSDictionary*) initSigTrkLstWithNiv:(int)pm_SigTrkNiv SigTrkSig:(int)pm_SigTrkSig SigResIdt:(int)pm_SigResIdt SigResVal:(int)pm_SigResVal { NSArray *objectArray; NSArray *keyArray; if (self = [super init]) { self.SigTrkNiv = [NSNumber numberWithInt:pm_SigTrkNiv]; self.SigTrkSig = [NSNumber numberWithInt:pm_SigTrkSig]; self.SigResIdt = [NSNumber numberWithInt:pm_SigResIdt]; self.SigResVal = [NSNumber numberWithInt:pm_SigResVal]; objectArray = [NSArray arrayWithObjects:SigTrkNiv,SigTrkSig,SigResIdt,SigResVal, nil]; keyArray = [NSArray arrayWithObjects:@"SigTrkNiv", @"SigTrkSig", @"SigResIdt", @"SigResVal", nil]; self = [NSDictionary dictionaryWithObjects:objectArray forKeys:keyArray]; } return self; } code that invokes the instance: NSDictionary *lv_SigTrkLst = [[SigTrkLst alloc]initSigTrkLstWithNiv:[[tempDict objectForKey:@"SigTrkNiv"] intValue] SigTrkSig:[[tempDict objectForKey:@"SigTrkSig"] intValue] SigResIdt:[[tempDict objectForKey:@"SigResIdt"] intValue] SigResVal:[[tempDict objectForKey:@"SigResVal"] intValue]]; [[QBDataContainer sharedDataContainer].SigTrkLstArray addObject:lv_SigTrkLst]; [lv_SigTrkLst release]; Instruments informs that 'SigTrkLst' is leaking. Even though I have released the instance? (I know that adding it to the array increments the retainCount by 1 but releasing it twice removes it from the array?)

    Read the article

  • Should I allow my clients to open tickets/access trac?

    - by Mark
    I just installed trac for this project I'm working on, since it's turned out to be a bit bigger than I anticipated. I've added a bunch of tickets with my clients requests which come in the form of emails, phone calls, and meetings. I've also added some stuff I know needs to be done/fixed but they haven't specifically requested. Should I grant them access to trac so they can submit the tickets themselves so I don't have to keep translating (words into tickets) for them? They're very non-technical, so I'm not sure how well it would work; they might open tickets and not provide enough detail, or get confused by all the different fields. If your answer is "no", should I at least let them view the tickets, so they can see what I'm working on, what's been done, hasn't been done? So they can stop calling me to say "xxx doesn't work" when it's already a ticket? (Not that this would work, but I could at least respond "see ticket #42")

    Read the article

  • Qt releasing memory occopied by unneeded images

    - by Gerhman
    I have a QML Flickable with 3 QML image elements that cycle through 8 image files. My problem is for each new image it loads into memory it does not release the the unused image. This is causing memory usage to become double what is necessary at times. I would like to know if there is some function I can use to force it to unload all the unused images? If it makes a difference, this is mainly for Symbian.

    Read the article

  • Freeing a character pointer returns error

    - by Kraffs
    I'm trying to free a character pointer after having used it but it returns a strange error. The error says: "_CrtDbgREport: String too long or IO Error" The debugger itself returns no errors while compiling. The code currently looks like this: void RespondToUser(SOCKET client, SOCKET server) { char buffer[80]; char *temp = malloc(_scprintf("HTTP/1.1 200 OK\r\n%s\r\nServer: %s\r\nConnection: close\r\n\r\nHi!", buffer, SERVER_NAME)); sprintf(temp, "HTTP/1.1 200 OK\r\n%s\r\nServer: %s\r\nConnection: close\r\n\r\nHi!", buffer, SERVER_NAME); send(client, temp, strlen(temp), 0); closesocket(client); free(temp); ListenToUsers(server); } The problem only occurs when I try to free the temp pointer from the memory and not otherwise. What might be causing this?

    Read the article

  • MODx changing my image path

    - by Austin
    In the MODx WYSIWYG whenever I click the Image icon to insert an image, followed by browse image it generates the wrong path: /data/12/1/111/99/1111262/user/1169144/htdocs/images/image.jpg instead of assets/images/image.jpg I have checked my Resource URL and Resource Path and they both look correct. Has anyone ever experienced MODx rewriting your paths to the server vs what it should be? Thanks in advance.

    Read the article

  • Basic C question, concerning memory allocation and value assignment

    - by VHristov
    Hi there, I have recently started working on my master thesis in C that I haven't used in quite a long time. Being used to Java, I'm now facing all kinds of problems all the time. I hope someone can help me with the following one, since I've been struggling with it for the past two days. So I have a really basic model of a database: tables, tuples, attributes and I'm trying to load some data into this structure. Following are the definitions: typedef struct attribute { int type; char * name; void * value; } attribute; typedef struct tuple { int tuple_id; int attribute_count; attribute * attributes; } tuple; typedef struct table { char * name; int row_count; tuple * tuples; } table; Data is coming from a file with inserts (generated for the Wisconsin benchmark), which I'm parsing. I have only integer or string values. A sample row would look like: insert into table values (9205, 541, 1, 1, 5, 5, 5, 5, 0, 1, 9205, 10, 11, 'HHHHHHH', 'HHHHHHH', 'HHHHHHH'); I've "managed" to load and parse the data and also to assign it. However, the assignment bit is buggy, since all values point to the same memory location, i.e. all rows look identical after I've loaded the data. Here is what I do: char value[10]; // assuming no value is longer than 10 chars int i, j, k; table * data = (table*) malloc(sizeof(data)); data->name = "table"; data->row_count = number_of_lines; data->tuples = (tuple*) malloc(number_of_lines*sizeof(tuple)); tuple* current_tuple; for(i=0; i<number_of_lines; i++) { current_tuple = &data->tuples[i]; current_tuple->tuple_id = i; current_tuple->attribute_count = 16; // static in our system current_tuple->attributes = (attribute*) malloc(16*sizeof(attribute)); for(k = 0; k < 16; k++) { current_tuple->attributes[k].name = attribute_names[k]; // for int values: current_tuple->attributes[k].type = DB_ATT_TYPE_INT; // write data into value-field int v = atoi(value); current_tuple->attributes[k].value = &v; // for string values: current_tuple->attributes[k].type = DB_ATT_TYPE_STRING; current_tuple->attributes[k].value = value; } // ... } While I am perfectly aware, why this is not working, I can't figure out how to get it working. I've tried following things, none of which worked: memcpy(current_tuple->attributes[k].value, &v, sizeof(int)); This results in a bad access error. Same for the following code (since I'm not quite sure which one would be the correct usage): memcpy(current_tuple->attributes[k].value, &v, 1); Not even sure if memcpy is what I need here... Also I've tried allocating memory, by doing something like: current_tuple->attributes[k].value = (int *) malloc(sizeof(int)); only to get "malloc: * error for object 0x100108e98: incorrect checksum for freed object - object was probably modified after being freed." As far as I understand this error, memory has already been allocated for this object, but I don't see where this happened. Doesn't the malloc(sizeof(attribute)) only allocate the memory needed to store an integer and two pointers (i.e. not the memory those pointers point to)? Any help would be greatly appreciated! Regards, Vassil

    Read the article

  • How to get available memory C++/g++ ?

    - by Agito
    I want to allocate my buffers according to memory available. Such that, when I do processing and memory usage goes up, but still remains in available memory limits. Is there a way to get available memory (I don't know will virtual or physical memory status will make any difference ?). And method has to be platform Independent as its going to be used on Windows, OS X, Linux and AIX. (And if possible then I would also like to allocate some of available memory for my application, someone it doesn't change during the execution).

    Read the article

  • Shorter GUIDs than hashing a user id?

    - by Alex Mcp
    I'm wondering how Instapaper (bookmarklet that saves text) might generate URLs for their bookmarklet. Mine has a script src of something similar to www.instapaper.com/j/AnJHrfoDTRia The quality of these URLs is that they need to never collide, and not be really guessable (so other people can't save to your account). I know a simple approach might be to MD5 their email address (presumed to have been checked on signup for uniqueness), but then I'd end up with a super long string. This isn't a huge issue, but I'm wondering what techniques there are for shorter GUIDs that won't collide too often (this is obviously the tradeoff, but 12 characters above is pretty short in my opinion)

    Read the article

  • How to close and open access to SQL Server 2008 in Windows application?

    - by hgulyan
    Hi, I have a MS Access 97 application (but the question is general) working directly with SQL Server 2008 (without application server or anything). Numbers of users can be up to 1000. Windows Authentication is used. The question is: How to handle modes, so some users will be allowed to work in read-only mode some users won't have access to db for some time My versions: Using a table with a mode id for every group of users, that will work the same way. On Form Load application will query that table for mode id. Using trigger on the tables, that must work according to that mode. The trigger will query mode value and doesn't work if access is closed or it's in read-only mode I know these are not the best solutions, that's why I'm asking for your advice. There's one more point. If the mode is changed to "access-is-closed" for a group of users, that group must not be able to query to DB starting that moment. With first solution I wrote it won't work, because user can be in application at that moment and no form load event will work. How can I do this? Is there any optimal solution? Thank you. Any help would be appreciated.

    Read the article

  • sqlite eatingup memory on iPhone when doing insert

    - by kviksilver
    I am having problem with inserting data to sqlite database. char *update="INSERT OR REPLACE INTO ct_subject (id,id_parent, title, description, link, address, phone, pos_lat, pos_long, no_votes, avg_vote, photo, id_comerc, id_city, placement, type, timestamp, mail) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);"; sqlite3_stmt *stmt; if(sqlite3_prepare_v2(database, update, -1, &stmt, nil) == SQLITE_OK){ sqlite3_bind_int(stmt, 1, [[[newCategories objectAtIndex:i] valueForKey:@"id"] intValue]); sqlite3_bind_int(stmt, 2, [[[newCategories objectAtIndex:i] valueForKey:@"id_parent"] intValue]); sqlite3_bind_text(stmt, 3, [[[newCategories objectAtIndex:i] valueForKey:@"title"] UTF8String], -1, NULL); sqlite3_bind_text(stmt, 4, [[[newCategories objectAtIndex:i] valueForKey:@"description"] UTF8String], -1, NULL); sqlite3_bind_text(stmt, 5, [[[newCategories objectAtIndex:i] valueForKey:@"link"] UTF8String], -1, NULL); sqlite3_bind_text(stmt, 6, [[[newCategories objectAtIndex:i] valueForKey:@"address"] UTF8String], -1, NULL); sqlite3_bind_text(stmt, 7, [[[newCategories objectAtIndex:i] valueForKey:@"phone"] UTF8String], -1, NULL); sqlite3_bind_text(stmt, 8, [[[newCategories objectAtIndex:i] valueForKey:@"pos_lat"] UTF8String], -1, NULL); sqlite3_bind_text(stmt, 9, [[[newCategories objectAtIndex:i] valueForKey:@"pos_long"] UTF8String], -1, NULL); sqlite3_bind_int(stmt, 10, [[[newCategories objectAtIndex:i] valueForKey:@"no_votes"] intValue]); sqlite3_bind_text(stmt, 11, [[[newCategories objectAtIndex:i] valueForKey:@"avg_vote"] UTF8String], -1, NULL); if ([[[newCategories objectAtIndex:i] valueForKey:@"photo"] length]!=0) { NSMutableString *webUrl = (NSMutableString *)[[NSMutableString alloc] initWithString:@"http://www.crotune.com/public/images/subjects/"]; [webUrl appendString:[[newCategories objectAtIndex:i] valueForKey:@"photo"]]; UIImage *myImage = [self getWebImage:webUrl]; if(myImage != nil){ sqlite3_bind_blob(stmt, 12, [UIImagePNGRepresentation(myImage) bytes], [UIImagePNGRepresentation(myImage) length], NULL); } else { sqlite3_bind_blob(stmt, 12, nil, -1, NULL); } [webUrl release]; [myImage release]; } else { sqlite3_bind_blob(stmt, 12, nil, -1, NULL); //NSLog(@" ne dodajem sliku2"); } sqlite3_bind_int(stmt, 13, [[[newCategories objectAtIndex:i] valueForKey:@"id_comerc"] intValue]); sqlite3_bind_int(stmt, 14, [[[newCategories objectAtIndex:i] valueForKey:@"id_city"] intValue]); sqlite3_bind_int(stmt, 15, [[[newCategories objectAtIndex:i] valueForKey:@"placement"] intValue]); sqlite3_bind_int(stmt, 16, [[[newCategories objectAtIndex:i] valueForKey:@"type"] intValue]); sqlite3_bind_int(stmt, 17, [[[newCategories objectAtIndex:i] valueForKey:@"timestamp"] intValue]); sqlite3_bind_text(stmt, 18, [[[newCategories objectAtIndex:i] valueForKey:@"mail"] UTF8String], -1, NULL); } if (sqlite3_step(stmt) != SQLITE_DONE) { NSLog(@"%s", sqlite3_errmsg(database)); NSAssert1(0,@"nemogu updateat table %s", errorMsg); } else { NSLog(@"Ubacio %d",i); }sqlite3_finalize(stmt); What happens is that it starts to eat memory until it finaly quits... On memory warning i close and open database again, I have set cache size to 50 as mentioned in some posts here, and tried putting query into statement - same result.. it just garbles mamory and app quits after 300 inserts on iphone or somewhere around 900 inserts on iPad... Any help would be appreciated..

    Read the article

  • Accelerometer stops delivering samples when the screen is off on Droid/Nexus One even with a WakeLoc

    - by William
    I have some code that extends a service and records onSensorChanged(SensorEvent event) accelerometer sensor readings on Android. I would like to be able to record these sensor readings even when the device is off (I'm careful with battery life and it's made obvious when it's running). While the screen is on the logging works fine on a 2.0.1 Motorola Droid and a 2.1 Nexus One. However, when the phone goes to sleep (by pushing the power button) the screen turns off and the onSensorChanged events stop being delivered (verified by using a Log.e message every N times onSensorChanged gets called). The service acquires a wakeLock to ensure that it keeps running in the background; but, it doesn't seem to have any effect. I've tried all the various PowerManager. wake locks but none of them seem to matter. _WakeLock = _PowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "My Tag"); _WakeLock.acquire(); There have been conflicting reports about whether or not you can actually get data from the sensors while the screen is off... anyone have any experience with this on a more modern version of Android (Eclair) and hardware? This seems to indicate that it was working in Cupcake: http://groups.google.com/group/android-developers/msg/a616773b12c2d9e5 Thanks! PS: The exact same code works as intended in 1.5 on a G1. The logging continues when the screen turns off, when the application is in the background, etc.

    Read the article

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