Search Results

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

Page 164/545 | < Previous Page | 160 161 162 163 164 165 166 167 168 169 170 171  | Next Page >

  • Exemple where TYPE_ALIGNMENT() fails

    - by JustMaximumPower
    Hi, I have a question relating to alignment in c/c++. In http://stackoverflow.com/questions/364483/determining-the-alignment-of-c-c-structures-in-relation-to-its-members Michael Burr posted this Makro: #define TYPE_ALIGNMENT( t ) offsetof( struct { char x; t test; }, test ) in the comments someone wrote this might fail with non POD typs. Can someone give me an code example where this fails?

    Read the article

  • How to get the dynamic generated content of an external ASP file using PhP?

    - by theCrius
    This is the situation: I've a PhP login page that check is an external ASP page has generated something (nickname). For example: i'm logged? So opening directly the asp page will display "nickname:thecrius" and nothing more. I'm not logged? So opening the ASP page will display nothing. Now i've to catch the "thecrius" string with a PhP page. Using file_get_contents only return me "nickname:", the "static" part of the asp page. What i'm doing wrong? Some codes: $aspSource = "http://www.domain.com/inc/whois.asp"; //ASP external $file = file_get_contents($aspSource); //get content of the asp page $start = strpos($file, "username:") + 9; //cutting off the "nickname:" $username = substr($file, $start); //get the username echo "URL-> $aspSource<br>Content-> $file<br>Start-> $start<br>Username-> $username<br>END"; But the result is only URL-> http://www.domain.com/inc/whois.asp Content-> username: Start-> 9 Username-> END Thanks in advance to anyone will help!

    Read the article

  • If I allocate memory in one thread in C++ can I de-allocate it in another

    - by Shane MacLaughlin
    If I allocate memory in one thread in C++ (either new or malloc) can I de-allocate it in another, or must both occur in the same thread? Ideally, I'd like to avoid this in the first place, but I'm curious to know is it legal, illegal or implementation dependent. Edit: The compilers I'm currently using include VS2003, VS2008 and Embedded C++ 4.0, targetting XP, Vista, Windows 7 and various flavours of Windows CE / PocketPC & Mobile. So basically all Microsoft but across an array of esoteric platforms.

    Read the article

  • How do I keep from running out of memory on graphics for an Android app?

    - by user279112
    I've been working on an Android app in Eclipse, and so far, my program hasn't really grown past midget size. However I've already run into an issue with an Out of Memory error. You see, I've been using graphics comprised solely of bitmaps and PNGs in this program, and recently, when I tried to add a little bit more functionality to the program (mainly including a few more bitmaps and causing an extra sprite to be created), it started crashing in the graphics thread's constructor - sprite's constructor. When I tracked the problem down, it turned out to be an Out of Memory error that is seemingly caused by adding too many picture files to the program and creating Drawables out of them. This would be a problem, as I really don't have that many picture resources worked into that program...maybe 20 or so. I haven't even started to include sound yet. These images aren't all that fancy. My questions are this: 1) Are programs for the Android phone really that limited on how much memory they can employ, or is it probably something other than the 20-30 resource pictures causing that error? 2) If the memory for Android apps is so awful it can't even handle 20-30 picture resources being loaded into Drawables that exist at the same time, then how in the world are you supposed to make decent graphics and sound for that thing? Thanks.

    Read the article

  • Objective-c garbage collection

    - by Chris
    If garbage collection is not required: - (void) awakeFromNib{ //Create the NSStatusBar and set its length statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; ... Do I have to release that? And if I do, would that be in a finalize method or dealloc method? If garbage collection is required, then is the retain call above ignored automatically?

    Read the article

  • Grading your programming ability?

    - by Farstucker
    I understand this is a subjective question and very likely could be closed, and although there is no right or wrong answer I do believe its a legitimate question. At what point do you no longer consider someone a beginner (ie knowledge of loops, encapsulation, instantiation), an intermediate (design patterns, reflection, delegates, interfaces) or an expert (architecture, multi-threadding). My rational for asking such a question is two-fold, first, when do I stop labeling my questions as beginner and during a job interview how should I categorize myself?

    Read the article

  • How do you get clients to use your bug tracking system?

    - by louism
    on larger projects i use a simple bug tracking system that's designed to be used by clients i have a lot of trouble convincing clients to use it (they send bug reports via email) does anyone have any strategies they can suggested? also, i have been playing around with a theory as to why this is the case; it goes like this: asking a client to log a bug is like taking your car to a mechanic for a service, and the mechanic hands you the engine oil and says "here, pop that in". basically, the client has paid you to do the work, logging a bug sounds too much like work, so they want you to do it thoughts?

    Read the article

  • Any useful suggestions to figure out where memory is being free'd in a Win32 process?

    - by LeopardSkinPillBoxHat
    An application I am working with is exhibiting the following behaviour: During a particular high-memory operation, the memory usage of the process under Task Manager (Mem Usage stat) reaches a peak of approximately 2.5GB (Note: A registry key has been set to allow this, as usually there is a maximum of 2GB for a process under 32-bit Windows) After the operation is complete, the process size slowly starts decreasing at a rate of 1MB per second. I am trying to figure out the easiest way to quickly determine who is freeing this memory, and where it is being free'd. I am having trouble attaching a memory profiler to my code, and I don't particularly want to override the new/delete operators to track the allocations/deallocations (IOW, I want to do this without re-compiling my code). Can anyone offer any useful suggestions of how I could do this via the Visual Studio debugger? Update I should also mention that it's a multi-threaded application, so pausing the application and analysing the call stack through the debugger is not the most desirable option. I considered freezing different threads one at a time to see if the memory stops reducing, but I'm fairly certain this will cause the application to crash.

    Read the article

  • iPhone objective-c autoreleasing leaking

    - by okami
    I do this: NSString *fullpath = [[NSBundle mainBundle] pathForResource:@"text_file" ofType:@"txt"]; Why the following message appear? Is my code leaking? 2010-03-31 13:44:18.649 MJIPhone[2175:207] *** _NSAutoreleaseNoPool(): Object 0x3909ba0 of class NSPathStore2 autoreleased with no pool in place - just leaking Stack: (0x1656bf 0xc80d0 0xcf2ad 0xcee0e 0xd3327 0x2482 0x2426) 2010-03-31 13:44:18.653 MJIPhone[2175:207] *** _NSAutoreleaseNoPool(): Object 0x390b0b0 of class NSPathStore2 autoreleased with no pool in place - just leaking Stack: (0x1656bf 0xc80d0 0xc7159 0xd0c6f 0xd3421 0x2482 0x2426) 2010-03-31 13:44:18.672 MJIPhone[2175:207] *** _NSAutoreleaseNoPool(): Object 0x390d140 of class NSCFString autoreleased with no pool in place - just leaking Stack: (0x1656bf 0xc6e62 0xcec1b 0xd4386 0x24ac 0x2426)

    Read the article

  • Why do I have a memory leak in UIApplication

    - by saintmac
    I have an iphone app project. I analysed it using instruments memory leak tool. According to instruments I have 2 leaks the Trace is as follows: start main UIAplicationMain _run CFRunLoopInMode CFRunLoopRunSpecific PurpleEventCallback _UIAplicationHandleEvent sendEvent: handleEvent:withNewEvent: After this trace there are two separate traces. What causes this and how can I fix it?

    Read the article

  • In a Tab Bar based app a controller release data of the other ! !

    - by Flodev03
    Hi all ! I've made a ViewBased app, in the app delegate i've set a UITabBarCotntroller, in the app i have different view Controller two of them displays text in a UITextView and labels, the other one is my "ShakeController" a UIViewController in which i've set a UIAcelerometerDelegate, in it i create a instance of UIAccelerometer, in the method which manages the shake everything works fine, in this controller i have also set a UIImageView to make a simple animation, in the view Did Load method i set my imageView.animation to an array of UIImage. My problem is : when the app is launched i use the ViewControllers and everything work fine, but when i tap the ShakeController item in the tab bar and then when i come back to the other controllers the label looks like : label and textView like : Lorem ipsum..... the text of UItextView in IB. I have noticed thaht if i comment the initialisation of my imageView to the array of image i can navigate the items (from a view controller to another) without the label change and stay what i want them to be. Notice that the two controllers are in a UINavigationController. (i use @proprety (nonnatomic, retain) then @synthesize ... then releqse in the dealloc for the labels textview and my uiimageView) Do not know what to do thanks to all

    Read the article

  • Memory issues - Living vs. overall -> app is killed

    - by D33
    I'm trying to check my applications memory issues in Instruments. When I load the application I play some sounds and show some animations in UIImageViews. To save some memory I load the sounds only when I need it and when I stop playing it I free it from the memory. problem 1: My application is using about 5.5MB of Living memory. BUT The Overall section is growing after start to 20MB and then it's slowly growing (about 100kB/sec). But responsible Library is OpenAL (OAL::Buffer), dyld (_dyld_start)-I am not sure what this really is, and some other stuff like ft_mem_qrealloc, CGFontStrikeSetValue, … problem 2: When the overall section breaks about 30MB, application crashes (is killed). According to the facts I already read about overall memory, it means then my all allocations and deallocation is about 30MB. But I don't really see the problem. When I need some sound for example I load it to the memory and when I don't need it anymore I release it. But that means when I load 1MB sound, this operation increase overall memory usage with 2MB. Am I right? And when I load 10 sounds my app crashes just because the fact my overall is too high even living is still low??? I am very confused about it. Could someone please help me clear it up? (I am on iOS 5 and using ARC) SOME CODE: creating the sound OpenAL: MYOpenALSound *sound = [[MyOpenALSound alloc] initWithSoundFile:filename willRepeat:NO]; if(!sound) return; [soundDictionary addObject:sound]; playing: [sound play]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, ((sound.duration * sound.pitch) + 0.1) * NSEC_PER_SEC), dispatch_get_current_queue(), ^{ [soundDictionary removeObjectForKey:[NSNumber numberWithInt:soundID]]; }); } creating the sound with AVAudioPlayer: [musics replaceObjectAtIndex:ID_MUSIC_MAP withObject:[[Music alloc] initWithFilename:@"mapMusic.mp3" andWillRepeat:YES]]; pom = [musics objectAtIndex:musicID]; [pom playMusic]; and stop and free it: [musics replaceObjectAtIndex:ID_MUSIC_MAP withObject:[NSNull null]]; AND IMAGE ANIMATIONS: I load images from big PNG file (this is realated also to my other topic : Memory warning - UIImageView and its animations) I have few UIImageViews and by time I'm setting animation arrays to play Animations... UIImage *source = [[UIImage alloc] initWithCGImage:[[UIImage imageNamed:@"imageSource.png"] CGImage]]; cutRect = CGRectMake(0*dimForImg.width,1*dimForImg.height,dimForImg.width,dimForImg.height); image1 = [[UIImage alloc] initWithCGImage:CGImageCreateWithImageInRect([source CGImage], cutRect)]; cutRect = CGRectMake(1*dimForImg.width,1*dimForImg.height,dimForImg.width,dimForImg.height); ... image12 = [[UIImage alloc] initWithCGImage:CGImageCreateWithImageInRect([source CGImage], cutRect)]; NSArray *images = [[NSArray alloc] initWithObjects:image1, image2, image3, image4, image5, image6, image7, image8, image9, image10, image11, image12, image12, image12, nil]; and this array I just use simply like : myUIImageView.animationImages = images, ... duration -> startAnimating

    Read the article

  • Effect of 'myObj = [[[[MyClass alloc] init] autorelease] retain];'?

    - by filipe
    I've just downloaded the Facebook iOS SDK and I noticed that in the sample code that comes with the SDK whenever it creates an instance of the Facebook class it does it like this: _facebook = [[[[Facebook alloc] init] autorelease] retain]; where _facebook is a member variable of the calling object (i.e. not a local variable). Can anyone explain exactly what's the point of autoreleasing and then retaining it?

    Read the article

  • Subversion: Write protection for tagged directories

    - by Alexander
    Hi, i am using subversion as RCS. Always when a new version of my project is finised i create a tag of it (copy of the trunk). Does anybody know how i can protect this tagged directory from being accidentally modified? At the moment as a workaround i lock all files. But this sill means that the user with the lock can edit the files. Is there any better solution?

    Read the article

  • Debug a local maven dependency with eclipse

    - by mcamier
    i have two maven projects, the first one is a library and the other one use it to works properly, the both have to elvolve regardless each other, this is why i use two different project. But breakpoints on my library code doesn't work when i launch my app (the second application). This is how i include my library in the second project's POM (my IDE is eclipse and projects are in the same workspaces) <dependency> <groupId>com.mcamier</groupId> <artifactId>lazyEngine</artifactId> <version>0.0.1-SNAPSHOT</version> <scope>system</scope> <systemPath>${basedir}/../lazyEngine/target/lazyEngine-0.0.1-SNAPSHOT-jar-with-dependencies.jar</systemPath> </dependency>

    Read the article

  • App crashes every second time a tableview row is selected in navigation controller setup

    - by Thaurin
    Disclaimer first: I'm pretty new to Objective-C and the retain model. I've been developing in a garbage collected .NET environment for the last five years, so I've been spoiled. I'm still learning. I'm having my iPhone app crash with EXC_BAD_ACCESS. It happens in a navigtation controller/tableview setup. When I select a row the first time, no problems. It switches in the child controller without problems. I go back and select the same row again. Program then proceeds to crash. Every other row works fine, but every second time a row is accessed, it's a crash. I've pinpointed the location where this happens. The child controller (which is a class that I reuse for every row of the same type) that's being switched into has an array of NSString's representing the rows that will be displayed. I set it before pushing the child viewcontroller. It's there where this apparently happens. I'm having a hard time debugging this problem, still wrestling with xcode and all. I fear there may be some vital information missing here, but maybe there is something you recognize here.

    Read the article

  • How do you keep track of what you have released in production?

    - by systempuntoout
    Tipically a deploy in production does not involve just a mere source code update (build) but requires a lot of other important tasks like for example: Db scripts (tables, query..) Configuration files (differents from test\production) Batch to schedule Executables to move to the correct path Etc. etc. In our company we just send an email to a "Release email address" describing the tasks in order, which changeset need to be published (TFS), which SP need to be updated, db scripts and so on. I believe there's not a magic tool that does these tasks automagically in order, rollback included; but probably there's something better than email that helps to keep track of releases in production. Do you have any tools to suggest or practices to share?

    Read the article

  • Memory leaks while using array of double

    - by Gacek
    I have a part of code that operates on large arrays of double (containing about 6000 elements at least) and executes several hundred times (usually 800) . When I use standard loop, like that: double[] singleRow = new double[6000]; int maxI = 800; for(int i=0; i<maxI; i++) { singleRow = someObject.producesOutput(); //... // do something with singleRow // ... } The memory usage rises for about 40MB (from 40MB at the beggining of the loop, to the 80MB at the end). When I force to use the garbage collector to execute at every iteration, the memory usage stays at the level of 40MB (the rise is unsignificant). double[] singleRow = new double[6000]; int maxI = 800; for(int i=0; i<maxI; i++) { singleRow = someObject.producesOutput(); //... // do something with singleRow // ... GC.Collect() } But the execution time is 3 times longer! (it is crucial) How can I force the C# to use the same area of memory instead of allocating new ones? Note: I have the access to the code of someObject class, so if it would be needed, I can change it.

    Read the article

  • Precise explanation of JavaScript <-> DOM circular reference issue

    - by Joey Adams
    One of the touted advantages of jQuery.data versus raw expando properties (arbitrary attributes you can assign to DOM nodes) is that jQuery.data is "safe from circular references and therefore free from memory leaks". An article from Google titled "Optimizing JavaScript code" goes into more detail: The most common memory leaks for web applications involve circular references between the JavaScript script engine and the browsers' C++ objects' implementing the DOM (e.g. between the JavaScript script engine and Internet Explorer's COM infrastructure, or between the JavaScript engine and Firefox XPCOM infrastructure). It lists two examples of circular reference patterns: DOM element → event handler → closure scope → DOM DOM element → via expando → intermediary object → DOM element However, if a reference cycle between a DOM node and a JavaScript object produces a memory leak, doesn't this mean that any non-trivial event handler (e.g. onclick) will produce such a leak? I don't see how it's even possible for an event handler to avoid a reference cycle, because the way I see it: The DOM element references the event handler. The event handler references the DOM (either directly or indirectly). In any case, it's almost impossible to avoid referencing window in any interesting event handler, short of writing a setInterval loop that reads actions from a global queue. Can someone provide a precise explanation of the JavaScript ↔ DOM circular reference problem? Things I'd like clarified: What browsers are effected? A comment in the jQuery source specifically mentions IE6-7, but the Google article suggests Firefox is also affected. Are expando properties and event handlers somehow different concerning memory leaks? Or are both of these code snippets susceptible to the same kind of memory leak? // Create an expando that references to its own element. var elem = document.getElementById('foo'); elem.myself = elem; // Create an event handler that references its own element. var elem = document.getElementById('foo'); elem.onclick = function() { elem.style.display = 'none'; }; If a page leaks memory due to a circular reference, does the leak persist until the entire browser application is closed, or is the memory freed when the window/tab is closed?

    Read the article

  • PHP: Over-writing session variables

    - by Tom
    Hi, Question related to PHP memory-handling from someone not yet very experienced in PHP: If I set a PHP session variable of a particular name, and then set a session variable of the exact same name elsewhere (during the same session), is the original variable over-written, or does junk accumulate in the session? In other words, should I be destroying a previous session variable before creating a new one of the same name? Thank you.

    Read the article

< Previous Page | 160 161 162 163 164 165 166 167 168 169 170 171  | Next Page >