Search Results

Search found 8224 results on 329 pages for 'sometimes'.

Page 7/329 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Why does Custom UITableViewCell *sometimes* cause an NSInvalidArgumentException?

    - by Wayne Hartman
    I have created a custom UITableViewCell, but when I dequeue the cell, sometimes it throws an NSInvalidArgumentException: [UITableViewCell nameLabel]: unrecognized selector sent to instance 0x3b4e7f0 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[UITableViewCell nameLabel]: unrecognized selector sent to instance 0x3b4e7f0' Now, my custom UITableViewCell does have an attribute nameLabel, so I am confused why it is throwing this error. Below is the code I use to dequeue the cell: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; CTMenuItemVO* key = [[[self retrieveCartItems] allKeys] objectAtIndex:row]; NSNumber* quantity = [[self retrieveCartItems] objectForKey:key]; static NSString* SectionsTableIdentifier = @"SectionsTableIdentifier2"; OrderItemCell* cell = (OrderItemCell*)[tableView dequeueReusableCellWithIdentifier: SectionsTableIdentifier]; if (cell == nil) { NSArray* topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"OrderItemCell" owner:nil options:nil]; for(id currentObject in topLevelObjects) { if ([currentObject isKindOfClass:[UITableViewCell class]]) { cell = (OrderItemCell*) currentObject; break; } } } cell.nameLabel.text = key.Name; cell.qtyLabel.text = [quantity stringValue]; return cell; }

    Read the article

  • Session sometimes timesout too quick

    - by kaivalya
    I am noticing session timeouts on my asp.net mvc web app randomly without browser being incative for for more than few minutes. My understanding is the default timeout should be 20mins. But sometimes I get a timeout in couple minutes or even less than that. For example after browsing on the site for a while I might get a session timeout when i refresh a page very soon after I enter the page. This is very random but I have seen this happen quite a few times now and I am not sure how I can trace this to see why I loose sessions every once in a while whithout browser being inactive long. I checked my web.config an no timeout value is defined there so I assume it should be 20mins. Hard to debug as this does not occur regularly..

    Read the article

  • PHP> Sort query results by name while letting each letter be on the top sometimes

    - by Don
    Hi, I'm currently working on a site that will display a list of online shops, Each shop will be stored on my database and I'll be using PHP to select and display them. But since those shops will pay me, I want to let each shop to be on the top of the list sometimes, (for example if the shop name starts with a "Z", they will probably complain for being on the bottom of the list all the time, so I want to keep it fair). So I thought about letting each letter be on the top of the list for an hour, but i have no idea how to do that.. Is that even possible? Thanks in advance!

    Read the article

  • App disappears from Win7's ALT-TAB list sometimes

    - by Mason Wheeler
    I've been having some trouble with one of my Delphi 2010 projects lately. It seems that sometimes, when I have a form open as a modal dialog, the app stops showing up in the ALT-TAB list until I close the dialog. It's still in the Taskbar, but not in ALT-TAB, which means I can't switch to it without using the mouse. Running under Windows 7, 64-bit. Has anyone seen this before? Any idea what causes it and how to fix it?

    Read the article

  • .NET applications sometimes doesn’t work on Windows CE

    - by KZChris
    Hi, I write applications for Windowe ME and CE in C# .NET 2.0. Sometimes I’ve got problems because applications don’t work on some navigation devices. On Windowe ME it is not problem because .NET can be installed from a cab, but on most Windows CE devices it is impossible because after soft reset all changes disappear. I found out that in most difficult cases good solution is to put all dll-s belonging to .NET installation cab in the folder where the application runs and everything work well. However there are some devices for example Navroad NR460 (Windows CE 5.0) on which none of .NET applications work (it is funny because previous and next version of that navigation works well). I didn’t found on this device cgacutil.exe program. Is this possible to force the device to run any .NET application without installing the Windows again? What should I try to do to check if running .NET a applications is possible? What conditions should be fulfilled to run easiest application written even in .NET 1.0

    Read the article

  • Sometimes my dropdowns/datepickers will stop functioning?

    - by BlargINC
    Q: Where should I check to track this down? Issue: Opening a view model in my application sometimes makes dropdowns/datepickers nonfunctional. ie. dropdown won't drop and the datepicker calendar won't come up I suspect a binding issue but don't see one. Dropdowns have normal things like strings, numbers. One drop has a list of mini views. Datepickers are bound to nullable dates set in the constructor of the viewmodel. Note: These same things work in other viewmodels/views. I can paste code, I'm just not sure what code is relevant here.

    Read the article

  • Visual studio debug console sometimes stays open and is impossible to close

    - by JC
    Hey, Sometimes when I run an application from Visual Studio and it crashes or I stop it using the stop button in the debug menu (Debug-Stop Debugging (Shift-F5)), the console of said application stays open... and never closes. I cannot close it by clicking the 'x' button in the top right corner. I cannot kill the process as it is not even listed in taskmgr. I have seen this problem documented in different places on the web, but no solution so far. I am running on windows XP SP3, using visual studio 2008 w/ SP1. 1- What could be causing this ? 2- Is there a fix ? thanks alot. JC EDIT: There is no MyApp.vshost.exe process to close, and closing visual studio does not close the console either. Worse even, if I try to restart my computer windows will hang and never close, I need to do a forced shut down. EDIT #2 : (from Brad Sullivan, Program Manager - Visual Studio Debugger on March 2nd) [...] this issue is likely not in Visual Studio since it also occurs in scenarios where Visual Studio is not present. We are in the process of handing over our investigation to the Windows Servicing team. But for now, removing the KB978037 update and it's related files seems to work.

    Read the article

  • Grouped UITableView Footer Sometimes Hidden On Quick Scroll

    - by jdandrea
    OK, this one is a puzzler. There is one similar post but it's not similar enough to count, so I'm posting this one. :) I've got a grouped UITableView with a header and footer. The footer includes two UIButton views, side-by-side. Nothing major. Now … there is a toggle button in a UIToolbar at the bottom for more/less info in this table view. So I build my index paths to delete/insert with fade row animation, all the usual ingredients, sandwiched between beginUpdates and endUpdates calls on the UITableView … and this works fine! In also happens that my footer can sometimes be pushed off past the bottom of the display. Here's where it gets weird. If I drag my finger up the display, scrolling the view upward, I should see that footer eventually, right? Well … most of the time I do. BUT, if I flick my finger up, for a faster scroll, the footer is missing. Even if you try to tap in that area - no response. However, if I scroll back down again, just to hide that footer (or rather hide the area where the footer would normally be), and then scroll back up, it's there once again! This only happens when inserting rows. If I delete rows, the footer stays put … unless of course it was already hidden and I didn't perform the aforementioned incantation to get it back. :) I am trying to trace through this, but to no avail. I suppose tracing through scroll operations is a bit of a crazy proposition! Perhaps some creative logging … suggestions, anyone? Or is this a known issue in 3.1 where row insert/deletes are concerned? (I don't recall seeing it until 3.1.)

    Read the article

  • Django + jQuery: Sometimes AJAX, but always DRY?

    - by Justin Myles Holmes
    Let's say I have an app (in Django) for which I want to sometimes (but not always) load content via ajax. An easy example is logging in. When the user logs in, I don't want to refresh the page, just change things around. Yet, if they are already logged in, and then arrive at (or refresh) the same page, I want it to show the same content. So, in the first case, obviously I do some sort of ajax login and load changes to the page accordingly. Easy enough. But what about in the second case? Do I go back through and add {% if user.authenticated %} all over the place? This seems cold, dark, and WET. On the other hand, I can just wrap all the ajaxy stuff in a javascript function, called loggedIn(), and run that if the user is authenticated. But then I'm faced with two http requests instead of one. Also undesirable. So what's the standard solution here?

    Read the article

  • Sending jpegs by tcp socket...sometimes incomplete.

    - by Guy
    Vb.net Hi I've been working on a project for months now (vb 2008 express). There is one final problem which I can't solve. I need to send images to a client from a 'server'(listener). The code below works most of the time but sometimes the image is incomplete. I believe this might be something to do with the tcp packet sizes varying, maybe limited by how busy it is out there on the net. I have seen examples of code that splits the image into chunks and sends them out, but I can't get them to work maybe because I'm using a different vb version. The pictures to be sent are small 20k max. Any working code examples would be wonderful. I have been experimenting and failing with this final hurdle for weeks. Thanks in anticipation. Client----- Sub GetPic() '------- Connect to Server ClientSocket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, _ ProtocolType.Tcp) ClientSocket.Connect(Epoint) '------- Send Picture Request Dim Bytes() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes("Send Picture") ClientSocket.Send(Bytes, Bytes.Length, SocketFlags.None) '------- Receive Response Dim RecvBuffer(20000) As Byte Dim Numbytes As Integer Numbytes = ClientSocket.Receive(RecvBuffer) Dim Darray(Numbytes) As Byte Buffer.BlockCopy(RecvBuffer, 0, Darray, 0, Numbytes) '------- Close Connection ClientSocket.Shutdown(SocketShutdown.Both) ClientSocket.Close() '------- Dim MStrm = New MemoryStream(Darray) Picture = Image.FromStream(MStrm) End Sub Listener----- 'Threaded from a listener Sub ClientThread(ByVal Client As TcpClient) Dim MStrm As New MemoryStream Dim Rbuffer(1024) As Byte Dim Tbyte As Byte() Dim NStrm As NetworkStream = Client.GetStream() Dim I As Integer = NStrm.Read(Rbuffer, 0, Rbuffer.Length) Dim Incoming As String = System.Text.Encoding.ASCII.GetString(Rbuffer, 0, I) If Incoming = "Send Picture" then Picture Save(MStrm, Picture.RawFormat) Tbyte = MStrm.ToArray NStrm.Write(Tbyte, 0, Tbyte.Length) End if Client.Close() End Sub

    Read the article

  • MKAnnotations are being made successfully, however they sometimes fail to render on MKMapView

    - by jtkendall
    I'm working on an iPhone app using the 3.1.3 SDK, my app finds the users current location, displays it on a MKMapView and then finds nearby locations and renders them as MKAnnotations. My code is working, however sometimes the nearby annotations do not appear on the map. They are still being made as I see the correct data in the console (from NSLog which runs just after the annotations are made). When it fails is completely random, it could be the 5th time I've hit "Build and Run" for the day, or the 500th it doesn't appear to have any pattern and doesn't throw any type of error, it just doesn't add the annotations to the MapView. This is the method called for each nearby location to add the MKAnnotation. - (void)addPinsWithLocation:(NSDictionary *)spot { CLLocationCoordinate2D location; location.longitude = [[spot objectForKey:@"spot_longitude"] doubleValue]; location.latitude = [[spot objectForKey:@"spot_latitude"] doubleValue]; PlaceMarks *placemark = [[PlaceMarks alloc] initWithCoordinate:location title:[spot objectForKey:@"spot_name"] subtitle:@""]; NSLog(@"Adding Pin for Location: '%@' at %f, %f", [spot objectForKey:@"spot_name"], location.latitude, location.longitude); [mapView addAnnotation:placemark]; } Any ideas on how to get MKAnnotations to always show?

    Read the article

  • Emails sometimes get scrambled

    - by Alex
    Folks, I have a PHP-based based site (using the QCubed framework); as a part of the site, I have a daemon that's sending out several thousand emails a day (no i'm not a spammer, everything is opt-in :)). Emails are sent through a custom framework component; that component serves as an SMTP client. I'm using a paid SMTP gateway from DNSExit.com to get the emails actually delivered. Those emails are simple HTML-based emails; they really have just simple links inside. My issue is that these links sometimes (not consistently!) get scrambled during transition. Tags somehow get mixed up, and some links are non-functional in the email. The issue happens on a small percentage of all sent emails; it is not consistent (i.e. the same exact source message HTML may or may not cause the scrambling in transition). Have any of you seen this? Any thoughts on how to troubleshoot?

    Read the article

  • ImageViews sometimes not displaying in FrameLayout activity

    - by Ken
    The top level layout in my activity is a framelayout. I have completed, debugged and tested this app and it works exactly like it should in all respects on my g1 and on various emulators. But on 3.7-inch displays running 2.1+, some imageviews packed in a linearlayout are periodically not visible. I know that they are there because you can touch and drag them with effect in the app. So I assume somehow they have gotten under the SurfaceView that is the main component of the app. This is apparently so even though the SurfaceView is declared in the xml prior to the LinearLayout. However, the ImageViews IN the LinearLayout are added programmatically towards the end of onCreate(). Framelayout stacks everything that is added to it, one on top of the other--the only way you will see more than one child of a frame layout is if they are smaller than the screen and are placed apart from eachother. Oddly, sometimes the imageviews ARE visible--it is random. Anyway, I've been trying to combat this with framelayout.bringChildToFront(View v) on the linearlayout without success. I wonder if anyone has any insight into how the behavior could be random like that, and how I should code these imageviews to keep this from happening, and why the problem appears only to occur on 3.7 vs 3.2 inch screens (as it happens, the two 3.2-inch screens were both htc, so vendor might be factor too). [edit] Actually, I've determined that this is a 2.2 issue, not a screen size (or even vendor) issue. Can't ensure that ImageViews added to a framelayout with a SurfaceView in it will appear on top of the surfaceview. I ran some tests in the respective onDraw() methods and the imageviews are 'visible' (0), and nothing does anything to the alpha of the drawables, which are there as well at ondraw(). [/edit] Any insight would be welcomed. Ken T.

    Read the article

  • gcc compilations (sometimes) result in cpu underload

    - by confusedCoder
    I have a larger C++ program which starts out by reading thousands of small text files into memory and storing data in stl containers. This takes about a minute. Periodically, a compilation will exhibit behavior where that initial part of the program will run at about 22-23% CPU load. Once that step is over, it goes back to ~100% CPU. It is more likely to happen with O2 flag turned on but not consistently. It happens even less often with the -p flag which makes it almost impossible to profile. I did capture it once but the gprof output wasn't helpful - everything runs with the same relative speed just at low cpu usage. I am quite certain that this has nothing to do with multiple cores. I do have a quad-core cpu, and most of the code is multi-threaded, but I tested this issue running a single thread. Also, when I run the problematic step in multiple threads, each thread only runs at ~20% CPU. I apologize ahead of time for the vagueness of the question but I have run out of ideas as to how to troubleshoot it further, so any hints might be helpful. UPDATE: Just to make sure it's clear, the problematic part of the code does sometimes (~30-40% of the compilations) run at 100% CPU, so it's hard to buy the (otherwise reasonable) argument that I/O is the bottleneck

    Read the article

  • Small openmp programm freezes sometimes (gcc, c, linux)

    - by osgx
    Hello Just write a small omp test, and it does not work correctly all the times: #include <omp.h> int main() { int i,j=0; #pragma omp parallel for(i=0;i<1000;i++) { #pragma omp barrier j+= j^i; } return j; } The usage of j for writing from all threads is incorrect in this example, BUT there must be only nondeterministic value of j I have a freeze. Compiled with gcc-4.3.1 -fopenmp a.c -o gcc -static Run on 4-core x86_Core2 Linux server: $ ./gcc and got freeze (sometimes; like 1 freeze for 4-5 fast runs). Strace: [pid 13118] <... futex resumed> ) = 0 [pid 13118] futex(0x80d3014, FUTEX_WAIT, 2, NULL <unfinished ...> [pid 13120] <... futex resumed> ) = 0 [pid 13119] futex(0x80d3014, FUTEX_WAIT, 2, NULL <unfinished ...> [pid 13120] futex(0x80d3014, FUTEX_WAKE, 1) = 1 [pid 13120] futex(0x80cd798, FUTEX_WAIT, 1, NULL <unfinished ...> [pid 13109] <... futex resumed> ) = 0 [pid 13109] futex(0x80d3014, FUTEX_WAKE, 1) = 1 [pid 13109] futex(0x80d3020, FUTEX_WAIT, 251, NULL <unfinished ...> [pid 13118] <... futex resumed> ) = 0 [pid 13118] futex(0x80d3014, FUTEX_WAKE, 1) = 1 [pid 13119] <... futex resumed> ) = 0 [pid 13118] futex(0x80d3020, FUTEX_WAIT, 251, NULL <unfinished ...> [pid 13119] futex(0x80d3014, FUTEX_WAKE, 1) = 0 [pid 13119] futex(0x80d3020, FUTEX_WAIT, 251, NULL <freeze> Why do I have a freeze (deadlock)?

    Read the article

  • Reason why UIImageView gives me a 'distorted' image sometimes

    - by Cedric Vandendriessche
    I have a custom UIView with a UILabel and a UIImageView subview. (tried using UIImageView subclass aswell). I assign an image to it and add the view to the screen. I wrote a function which adds the amount of LetterBoxes to the screen as there are letters in the word: - (void)drawBoxesForWord:(NSString *)word { if(boxesContainer == nil) { /* Create a container for the LetterBoxes (animation purposes) */ boxesContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 205, 320, 50)]; [self.view addSubview:boxesContainer]; } /* Calculate width of letterboxes */ NSInteger numberOfCharacters = [word length]; CGFloat totalWidth = numberOfCharacters * 28 + (numberOfCharacters - 1) * 3; CGFloat leftCap = (320 - totalWidth) / 2; [letters removeAllObjects]; /* Draw the boxes to the screen */ for (int i = 0; i < numberOfCharacters; i++) { LetterBox *letter = [[LetterBox alloc] initWithFrame:CGRectMake(leftCap + i * 31 , 0, 28, 40)]; [letters addObject:letter]; [boxesContainer addSubview:letter]; [letter release]; }} This gives me the image below: http://www.imgdumper.nl/uploads2/4ba3b2c72bb99/4ba3b2c72abfd-Goed.png But sometimes it gives me this: imgdumper.nl/uploads2/4ba3b2d888226/4ba3b2d88728a-Fout.png I add them to the same boxesContainer but they first remove themselves from the superview, so it's not like you see them double or something. What I find weird is that they are all good or all bad.. This is the init function for my LetterBox: if (self == [super initWithFrame:aRect]) { /* Create the box image with same frame */ boxImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)]; boxImage.contentMode = UIViewContentModeScaleAspectFit; boxImage.image = [UIImage imageNamed:@"SpaceOpen.png"]; [self addSubview:boxImage]; /* Create the label with same frame */ letterLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)]; letterLabel.backgroundColor = [UIColor clearColor]; letterLabel.font = [UIFont fontWithName:@"ArialRoundedMTBold" size:26]; letterLabel.textColor = [UIColor blackColor]; letterLabel.textAlignment = UITextAlignmentCenter; [self addSubview:letterLabel]; } return self;} Does anyone have an idea why this could be? I'd rather have them display correctly every time :)

    Read the article

  • One Controller is Sometimes Bound Twice with Ninject

    - by Dusda
    I have the following NinjectModule, where we bind our repositories and business objects: /// <summary> /// Used by Ninject to bind interface contracts to concrete types. /// </summary> public class ServiceModule : NinjectModule { /// <summary> /// Loads this instance. /// </summary> public override void Load() { //bindings here. //Bind<IMyInterface>().To<MyImplementation>(); Bind<IUserRepository>().To<SqlUserRepository>(); Bind<IHomeRepository>().To<SqlHomeRepository>(); Bind<IPhotoRepository>().To<SqlPhotoRepository>(); //and so on //business objects Bind<IUser>().To<Data.User>(); Bind<IHome>().To<Data.Home>(); Bind<IPhoto>().To<Data.Photo>(); //and so on } } And here are the relevant overrides from our Global.asax, where we inherit from NinjectHttpApplication in order to integrate it with Asp.Net Mvc (The module lies in a separate dll called Thing.Web.Configuration): protected override void OnApplicationStarted() { base.OnApplicationStarted(); //routes and areas AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); //Initializes a singleton that must reference this HttpApplication class, //in order to provide the Ninject Kernel to the rest of Thing.Web. This //is necessary because there are a few instances (currently Membership) //that require manual dependency injection. NinjectKernel.Instance = new NinjectKernel(this); //view model factory. NinjectKernel.Instance.Kernel.Bind<IModelFactory>().To<MasterModelFactory>(); } protected override NinjectControllerFactory CreateControllerFactory() { return base.CreateControllerFactory(); } protected override Ninject.IKernel CreateKernel() { var kernel = new StandardKernel(); kernel.Load("Thing.Web.Configuration.dll"); return kernel; } Now, everything works great, with one exception: For some reason, sometimes Ninject will bind the PhotoController twice. This leads to an ActivationException, because Ninject can't discern which PhotoController I want. This causes all requests for thumbnails and other user images on the site to fail. Here is the PhotoController in it's entirety: public class PhotoController : Controller { public PhotoController() { } public ActionResult Index(string id) { var dir = Server.MapPath("~/" + ConfigurationManager.AppSettings["UserPhotos"]); var path = Path.Combine(dir, id); return base.File(path, "image/jpeg"); } } Every controller works in exactly the same way, but for some reason the PhotoController gets double-bound. Even then, it only happens occasionally (either when re-building the solution, or on staging/production when the app pool kicks in). Once this happens, it continues to happen until I redeploy without changing anything. So...what's up with that?

    Read the article

  • Google maps sometimes does not return a geocoded value for string

    - by XGreen
    Hi Guys, I have the following code: It basically looks into a HTML list and geocodes and markets each item. it does it correctly 8 out of ten but sometimes I get an error I set for show in the console. I can't think of anything. Any thoughts is much appreciated. $(function () { var map = null; var geocoder = null; function initialize() { if (GBrowserIsCompatible()) { // Specifies that the element with the ID map is the container for the map map = new GMap2(document.getElementById("map")); // Sets an initial map positon (which mainly gets ignored after reading the adderesses list) map.setCenter(new GLatLng(37.4419, -122.1419), 13); // Instatiates the google Geocoder class geocoder = new GClientGeocoder(); map.addControl(new GSmallMapControl()); // Sets map zooming controls on the map map.enableScrollWheelZoom(); // Allows the mouse wheel to control the map while on it } } function showAddress(address, linkHTML) { if (geocoder) { geocoder.getLatLng(address, function (point) { if (!point) { console.log('Geocoder did not return a location for ' + address); } else { map.setCenter(point, 8); var marker = new GMarker(point); map.addOverlay(marker); // Assigns the click event to each marker to open its balloon GEvent.addListener(marker, "click", function () { marker.openInfoWindowHtml(linkHTML); }); } } ); } } // end of show address function initialize(); // This iterates through the text of each address and tells the map // to show its location on the map. An internal error is thrown if // the location is not found. $.each($('.addresses li a'), function () { var addressAnchor = $(this); showAddress(addressAnchor.text(), $(this).parent().html()); }); }); which looks into this HTML: <ul class="addresses"> <li><a href="#">Central London</a></li> <li><a href="#">London WC1</a></li> <li><a href="#">London Shoreditch</a></li> <li><a href="#">London EC1</a></li> <li><a href="#">London EC2</a></li> <li><a href="#">London EC3</a></li> <li><a href="#">London EC4</a></li> </ul>

    Read the article

  • Reason why UIImage gives me a 'distorted' image sometimes

    - by Cedric Vandendriessche
    I have a custom UIView with a UILabel and a UIImageView subview. (tried using UIImageView subclass aswell). I assign an image to it and add the view to the screen. I wrote a function which adds the amount of LetterBoxes to the screen (my custom class): - (void)drawBoxesForWord:(NSString *)word { if(boxesContainer == nil) { /* Create a container for the LetterBoxes (animation purposes) */ boxesContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 205, 320, 50)]; [self.view addSubview:boxesContainer]; } /* Calculate width of letterboxes */ NSInteger numberOfCharacters = [word length]; CGFloat totalWidth = numberOfCharacters * 28 + (numberOfCharacters - 1) * 3; CGFloat leftCap = (320 - totalWidth) / 2; [letters removeAllObjects]; /* Draw the boxes to the screen */ for (int i = 0; i < numberOfCharacters; i++) { LetterBox *letter = [[LetterBox alloc] initWithFrame:CGRectMake(leftCap + i * 31 , 0, 28, 40)]; [letters addObject:letter]; [boxesContainer addSubview:letter]; [letter release]; }} This gives me the image below: http://www.imgdumper.nl/uploads2/4ba3b2c72bb99/4ba3b2c72abfd-Goed.png But sometimes it gives me this: imgdumper.nl/uploads2/4ba3b2d888226/4ba3b2d88728a-Fout.png I add them to the same boxesContainer but they first remove themselves from the superview, so it's not like you see them double or something. What I find weird is that they are all good or all bad.. This is the init function for my LetterBox: if (self == [super initWithFrame:aRect]) { /* Create the box image with same frame */ boxImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)]; boxImage.contentMode = UIViewContentModeScaleAspectFit; boxImage.image = [UIImage imageNamed:@"SpaceOpen.png"]; [self addSubview:boxImage]; /* Create the label with same frame */ letterLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)]; letterLabel.backgroundColor = [UIColor clearColor]; letterLabel.font = [UIFont fontWithName:@"ArialRoundedMTBold" size:26]; letterLabel.textColor = [UIColor blackColor]; letterLabel.textAlignment = UITextAlignmentCenter; [self addSubview:letterLabel]; } return self;} Does anyone have an idea why this could be? I'd rather have them display correctly every time :)

    Read the article

  • Sometimes big delay when using PHP mail()

    - by Robbert Dam
    I have a website which processes orders from a Windows application. This works as follows: User clicks "Order now" in the windows app App uploads a file with POST to a PHP script The script immediately calls the PHP mail() function (order is not stored in a db) This works fine most of the time. However, sometimes a big delay occurs (several days). Customers calls why the product has not yet been delivered. E-mail headers of delayed mail follows: Microsoft Mail Internet Headers Version 2.0 Received: from barracuda.nkl.nl ([10.0.0.1]) by smtp.nkl.nl with Microsoft SMTPSVC(6.0.3790.3959); Wed, 26 May 2010 16:26:51 +0200 X-ASG-Debug-ID: 1274883818-2f8800000000-X58hIK X-Barracuda-URL: http://10.0.0.1:8000/cgi-bin/mark.cgi Received: from server45.firstfind.nl (localhost [127.0.0.1]) by barracuda.nkl.nl (Spam & Virus Firewall) with ESMTP id ECAFD15776A for <[email protected]>; Wed, 26 May 2010 16:23:38 +0200 (CEST) Received: from server45.firstfind.nl (server45.firstfind.nl [93.94.226.76]) by barracuda.nkl.nl with ESMTP id 85bAT2AU58kkxjPb for <[email protected]>; Wed, 26 May 2010 16:23:38 +0200 (CEST) X-Barracuda-Envelope-From: [email protected] Received: from server45.firstfind.nl (localhost [127.0.0.1]) by server45.firstfind.nl (8.13.8/8.13.8/Debian-3+etch1) with ESMTP id o4QEM3Hb004301 for <[email protected]>; Wed, 26 May 2010 16:23:31 +0200 Received: (from nklsemin@localhost) by server45.firstfind.nl (8.13.8/8.13.8/Submit) id o4J9lA7M031307; Wed, 19 May 2010 11:47:10 +0200 Date: Wed, 19 May 2010 11:47:10 +0200 Message-Id: <[email protected]> To: [email protected] X-ASG-Orig-Subj: easyfit - ref: Hoen3443 Subject: easyfit - ref: Hoen3443 X-PHP-Script: www.nklseminar.nl/emailer/upload.php for 77.61.220.217 From: [email protected] Content-type: text/html X-Virus-Scanned: by amavisd-new X-Barracuda-Connect: server45.firstfind.nl[93.94.226.76] X-Barracuda-Start-Time: 1274883820 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at nkl.nl X-Barracuda-Spam-Score: 0.92 X-Barracuda-Spam-Status: No, SCORE=0.92 using global scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.0 tests=DATE_IN_PAST_96_XX, DATE_IN_PAST_96_XX_2, HTML_MESSAGE, MIME_HEADER_CTYPE_ONLY, MIME_HTML_ONLY, NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.30817 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.01 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date 0.00 MIME_HTML_ONLY BODY: Message only has text/html MIME parts 0.00 HTML_MESSAGE BODY: HTML included in message 0.86 MIME_HEADER_CTYPE_ONLY 'Content-Type' found without required MIME headers 2.07 DATE_IN_PAST_96_XX_2 DATE_IN_PAST_96_XX_2 Return-Path: [email protected] X-OriginalArrivalTime: 26 May 2010 14:26:51.0343 (UTC) FILETIME=[7B80DDF0:01CAFCDF] The delay seems to occur here: Received: from server45.firstfind.nl (localhost [127.0.0.1]) by server45.firstfind.nl (8.13.8/8.13.8/Debian-3+etch1) with ESMTP id o4QEM3Hb004301 for <[email protected]>; Wed, 26 May 2010 16:23:31 +0200 Received: (from nklsemin@localhost) by server45.firstfind.nl (8.13.8/8.13.8/Submit) id o4J9lA7M031307; Wed, 19 May 2010 11:47:10 +0200 I've reported this issue various times to the web hosting service that hosts my website. They say the delay does not occur in their network (impossible). But they do confirm that the e-mail is first seen in their mail server on May 26, which is 7 days after the mail has been composed. The order is marked with the timestamp of the user's local PC, which also matches May 19 (so it's not a PC clock problem) It's also interesting to see that all delayed mails (orders were placed on different days) come in at once. So I suddenly receive 14 e-mail in my mailbox from various days. Any idea were this delay may be introduced? Could there be a bug in my PHP code that causes this? (I cannot believe I can introduce a loop of 7 days in my PHP code)

    Read the article

  • Sometimes Java web app hang

    - by zhongshu
    The web app occasionally get hang for about 30 seconds when user request a web page, the server's CPU and memory usage are ok, and the jstack shows: "http-9999-3" daemon prio=6 tid=0x552f3400 nid=0xf40 runnable [0x578fc000] java.lang.Thread.State: RUNNABLE at org.eclipse.jdt.internal.compiler.parser.Parser.getTypeReference(Parser.java:8354) at org.eclipse.jdt.internal.compiler.parser.Parser.consumeClassHeaderExtends(Parser.java:2125) at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:5107) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9020) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9251) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9208) at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:7864) at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:587) at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:413) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) - locked <0x10a75fc0> (a org.apache.jasper.servlet.JspServletWrapper) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) ...... seems it's related with some jsp files, how to find the root cause? thanks.

    Read the article

  • Reachability sometimes fails, even when we do have an internet connection

    - by stoutyhk
    Hi I've searched but can't see a similar question. I've added a method to check for an internet connection per the Reachability example. It works most of the time, but when installed on the iPhone, it quite often fails even when I do have internet connectivity (only when on 3G/EDGE - WiFi is OK). Basically the code below returns NO. If I switch to another app, say Mail or Safari, and connect, then switch back to the app, then the code says the internet is reachable. Kinda seems like it needs a 'nudge'. Anyone seen this before? Any ideas? Many thanks James + (BOOL) doWeHaveInternetConnection{ BOOL success; // google should always be up right?! const char *host_name = [@"google.com" cStringUsingEncoding:NSASCIIStringEncoding]; SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, host_name); SCNetworkReachabilityFlags flags; success = SCNetworkReachabilityGetFlags(reachability, &flags); BOOL isAvailable = success && (flags & kSCNetworkFlagsReachable) && !(flags & kSCNetworkFlagsConnectionRequired); if (isAvailable) { NSLog(@"Google is reachable: %d", flags); }else{ NSLog(@"Google is unreachable"); } return isAvailable; }

    Read the article

  • C#, sometimes I could flush down my boss the toilet [closed]

    - by msfanboy
    Hello all, I got a paper of instructions from my boss. One of the instructions is in this order: Extend the method GetProductIdBy with theShipmentDate Overload the method GetProductIdBy without theShipmentDate This is the Method I speak about: ...and theShipmentDate is a DateTime variable public IProduct GetProductIdBy(string productID) { ... return product; } You know what I did? this - public IProduct GetProductIdBy(string productID, DateTime theShipmentDate ) { ... return product; } You know what my boss said? The above is wrong! I asked him how can I overload a method without a parameter like theShipmentDate ??? That makes no sense, he said that reason in because of the subversion repository... what the fuck?? But he did not tell me whats really right I would have to find out for myself... he just didnt tell me and I am sick of asking him every crap if he cant express himself properly. How would you manage his instruction?

    Read the article

  • Access Violation When Writing Dynamic 2D Array... Sometimes

    - by Shraptnel
    This program is meant to generate a dynamic array, however it gives an access violation error when writing when given certain dimensions. Eg: R = 6, C = 5 crashes, but then R = 5, C = 6 doesn't. In case your wondering, it isn't my homework to "fix" this broken program, this is the method we were taught in class. Also part of my assessment is to use this method, so vectors are out. Thanks in advance! #include <iostream> using namespace std; int main(){ const int R = 6; const int C = 5; char **d; d = new char *[R]; for(int i=0; i<C; ++i){ d[i] = new char[C]; } //initialise for(int i=0; i<R; ++i){ for(int j=0; j<C; ++j){ d[i][j] = 'd'; cout<<d[i][j]; } cout<<endl; } cout<<endl; system("pause"); return 0; }

    Read the article

  • Navigation bar's buttons tint color sometimes not set

    - by Felipe
    Refer to the following, short video: http://screencast.com/t/cmnsqVTh The problem is with the color of a navigation bar's back button. The first time I load the app, the navigation bar + its buttons have the default color. I then push a view controller on the stack, and when the new view loads (in the viewDidLoad method), it sets the navigation bar's tint color to pink. The nav bar's buttons are also pink as expected. I then press the back button, and the view is popped from the stack. On the root view controller's viewWillAppear method I set the tint color back to nil so that it's the default color again. The navigation bar looks as expected. However if I push the view controller on the stack yet again, the navigation bar's tint color is pink, but the back button's color is the default light blue. Hope that was understandable. So what's the cause of the problem?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >