Search Results

Search found 1932 results on 78 pages for 'tom hubbard'.

Page 10/78 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • iPhone: addAnnotation not working when called from another view

    - by Nic Hubbard
    I have two views, the first view has an MKMapView on it named ridesMap. The second view is just a view with a UITableView in it. When you click the save button in the second view, it calls a method from the first view: // Get my first views class MyRidesMapViewController *rideMapView = [[MyRidesMapViewController alloc] init]; // Call the method from my first views class that removes an annotation [rideMapView addAnno:newRidePlacemark.coordinate withTitle:rideTitle.text withSubTitle:address]; This correctly calls the addAnno method, which looks like: - (void)addAnno:(CLLocationCoordinate2D)anno withTitle:(NSString *)annoTitle withSubTitle:(NSString *)subTitle { Annotation *ano = [[[Annotation alloc] init] autorelease]; ano.coordinate = anno; ano.title = annoTitle; ano.subtitle = subTitle; if ([ano conformsToProtocol:@protocol(MKAnnotation)]) { NSLog(@"YES IT DOES!!!"); } [ridesMap addAnnotation:ano]; }//end addAnno This method creates an annotation which does conform to MKAnnotation, and it suppose to add that annotation to the map using the addAnnotation method. But, the annotation never gets added. I NEVER get any errors when the annotation does not get added. But it never appears when the method is called. Why would this be? It seems that I have done everything correctly, and that I am passing a correct MKAnnotation to the addAnnotation method. So, I don't get why it never drops a pin? Could it be because I am calling this method from another view? Why would that matter?

    Read the article

  • ColdFusion structs Direct Assignment vs object literal notation.

    - by Tom Hubbard
    The newer versions of ColdFusion (I believe CF 8 and 9) allow you to create structs with object literal notation similar to JSON. My question is, are there specific benefits (execution efficiency maybe) to using object literal notation over individual assignments for data that is essentially static? For example: With individual assignments you would do something like this: var user = {}; user.Fname = "MyFirstnam"; user.Lname = "MyLastName"; user.titles = []; ArrayAppend(user.titles,'Mr'); ArrayAppend(user.titles,'Dr.'); Whereas with object literals you would do something like. var user = {Fname = "MyFirstnam", Lname = "MyLastName", titles = ['Mr','Dr']}; Now this limited example is admittedly simple, but if titles was an array of structures (Say an array of addresses), the literal notation becomes awkward to work with.

    Read the article

  • Objective C: Create arrays from first array based on value

    - by Nic Hubbard
    I have an array of strings that are comma separated such as: Steve Jobs,12,CA Fake Name,21,CA Test Name,22,CA Bill Gates,44,WA Bill Nye,21,OR I have those values in an NSScanner object so that I can loop through the values and get each comma seperated value using objectAtIndex. So, what I would like to do, is group the array items into new arrays, based on a value, in this case, State. So, from those, I need to loop through, checking which state they are in, and push those into a new array, one array per state. CA Array: Steve Jobs,12,CA Fake Name,21,CA Test Name,22,CA WA Array: Bill Gates,44,WA OR Array: Bill Nye,21,OR So in the end, I would have 3 new arrays, one for each state. Also, if there were additional states used in the first array, those should have new arrays created also. Any help would be appreciated!

    Read the article

  • Workflow engine BPMN, Drools, etc or ESB?

    - by Tom
    We currently have an application that is based on an in-house developed workflow engine with YAML based DSL. We are looking to move parts of it to Java. I have discovered a number of java solutions like Intalio, JBPM, Drools Expert, Drools Flow etc. They appear to be aimed at businesses where the business analyst creates the workflows using a graphical editor and submits them to the workflow engine. They seem geared towards ease of use for non-technical people rather than for developers with a focus on human interaction. The workflows tend to look like. Discover-a-file -\ -> join -> process-file -> move-file -> register-file Discover-some-metadata -/ If any step fails we need to retry it X times. We also need to be able to stop the system and be able to restart it and have it continue from where it was (durable). Some of our workflows can be defined by a set of goals we need to achieve so Jess's backwards rule chaining sounds interesting but it is not open source. It might be that what we are after is a Finite State Machine engine or just an Enterprise Service Bus and do everything as JMS queues. Is there a good open source workflow engine that is both standards-based but also geared towards developers. We don't particular want to use a graphical workflow designer or write reams of XML and it should ideally be in Java or language agnostic (makes REST/Soap calls to external services). Thanks, Tom

    Read the article

  • iPhone: Remove annotation from MKMapView which is in another view

    - by Nic Hubbard
    I have two views. The first is a MKMapView with some annotations. Clicking a UIButton pushes a second view on the stack. This has a UITableView with a list of annotations which correspond to the map annotations. So, when you click the delete button, how can I call my MKMapView which is in another view, so that I can remove the annotation. My MKMapView is declared in my app delegate, as well as my current class. I am trying to use the following, but it is not working: RideAppDelegate *appDelegate = (RideAppDelegate *)[[UIApplication sharedApplication] delegate]; Annotation *ano; CLLocationCoordinate2D anoPoint; anoPoint.latitude = [[eventToDelete valueForKey:@"latitude"] doubleValue]; anoPoint.longitude = [[eventToDelete valueForKey:@"longitude"] doubleValue]; ano = [[[Annotation alloc] init] autorelease]; ano.coordinate = anoPoint; [appDelegate.ridesMap removeAnnotation: ano]; [appDelegate release]; I must be trying to access the MKMapView of my other view incorrectly?

    Read the article

  • Testing a wide variety of computers with a small company

    - by Tom the Junglist
    Hello everyone, I work for a small dotcom which will soon be launching a reasonably-complicated Windows program. We have uncovered a number of "WTF?" type scenarios that have turned up as the program has been passed around to the various not-technical-types that we've been unable to replicate. One of the biggest problems we're facing is that of testing: there are a total of three programmers -- only one working on this particular project, me -- no testers, and a handful of assorted other staff (sales, etc). We are also geographically isolated. The "testing lab" consists of a handful of VMWare and VPC images running sort-of fresh installs of Windows XP and Vista, which runs on my personal computer. The non-technical types try to be helpful when problems arise, we have trained them on how to most effectively report problems, and the software itself sports a wide array of diagnostic features, but since they aren't computer nerds like us their reporting is only so useful, and arranging remote control sessions to dig into the guts of their computers is time-consuming. I am looking for resources that allow us to amplify our testing abilities without having to put together an actual lab and hire beta testers. My boss mentioned rental VPS services and asked me to look in to them, however they are still largely very much self-service and I was wondering if there were any better ways. How have you, or any other companies in a similar situation handled this sort of thing? EDIT: According to the lingo, our goal here is to expand our systems testing capacity via an elastic computing platform such as Amazon EC2. At this point I am not sure suggestions of beefing up our unit/integration testing are going to help very much as we are consistently hitting walls at the systems testing phase. Has anyone attempted to do this kind of software testing on a cloud-type service like EC2? Tom

    Read the article

  • Solr associations

    - by Tom
    Hi all, The last couple of days we are thinking of using Solr as our search engine of choice. Most of the features we need are out of the box or can be easily configured. There is however one feature that we absolutely need that seems to be well hidden (or missing) in Solr. I'll try to explain with an example. We have lots of documents that are actually businesses: <document> <name>Apache</name> <cat>1</cat> ... </document> <document> <name>McDonalds</name> <cat>2</cat> ... </document> In addition we have another xml file with all the categories and synonyms: <cat id=1> <name>software</name> <synonym>IT<synonym> </cat> <cat id=2> <name>fast food</name> <synonym>restaurant<synonym> </cat> We want to associate both businesses and categories so we can search using the name and/or synonyms of the category. But we do not want to merge these files at indexing time because we should update the categories (adding.remioving synonyms...) without indexing all the businesses again. Is there anything in Solr that does this kind of associations or do we need to develop some specific pieces? All feedback and suggestions are welcome. Thanks in advance, Tom

    Read the article

  • iPhone: Push Navigation Controller (w/ TableViewController) onto stack. Is this possible?

    - by Nic Hubbard
    I have a view which contains a UIButton. When this is clicked, it calls a method that loads another NIB. Now, normally, that nib would load a view onto the stack, and everything would be fine. But, I am trying to load a Navigation Controller (so that I can have table views that are multiple levels deep), and all I get it errors. What is the proper method for loading a Navigation Controller and putting it on the top of the stack?

    Read the article

  • Entity framework memory leak after detaching newly created object

    - by Tom Peplow
    Hi, Here's a test: WeakReference ref1; WeakReference ref2; TestRepositoryEntitiesContainer context; int i = 0; using (context = GetContext<TestRepositoryEntitiesContainer>()) { context.ObjectMaterialized += (o, s) => i++; var item = context.SomeEntities.Where(e => e.SomePropertyToLookupOn == "some property").First(); context.Detach(item); ref1 = new WeakReference(item); var newItem = new SomeEntity {SomePropertyToLookupOn = "another value"}; context.SomeEntities.AddObject(newItem); ref2 = new WeakReference(newItem); context.SaveChanges(); context.SomeEntities.Detach(newItem); newItem = null; item = null; } context = null; GC.Collect(); Assert.IsFalse(ref1.IsAlive); Assert.IsFalse(ref2.IsAlive); First assert passes, second fails... I hope I'm missing something, it is late... But it appears that detaching a fetched item will actually release all handles on the object letting it be collected. However, for new objects something keeps a pointer and creates a memory leak. NB - this is EF 4.0 Anyone seen this before and worked around it? Thanks for your help! Tom

    Read the article

  • Sort NSArray of custom objects based on sorting of another NSArray of strings

    - by Nic Hubbard
    I have two NSArray objects that I would like to be sorted the same. One contains NSString objects, the other custom Attribute objects. Here is what my "key" NSArray looks like: // The master order NSArray *stringOrder = [NSArray arrayWithObjects:@"12", @"10", @"2", nil]; The NSArray with custom objects: // The array of custom Attribute objects that I want sorted by the stringOrder array NSMutableArray *items = [[NSMutableArray alloc] init]; Attribute *attribute = nil; attribute = [[Attribute alloc] init]; attribute.assetID = @"10"; [items addObject:attribute]; attribute = [[Attribute alloc] init]; attribute.assetID = @"12"; [items addObject:attribute]; attribute = [[Attribute alloc] init]; attribute.assetID = @"2"; [items addObject:attribute]; So, what I would like to do is use the stringOrder array to determine the sorting of the items array of custom objects. How can I do this?

    Read the article

  • PHP: Recursively get children of parent

    - by Nic Hubbard
    I have a function which gets the ids of all children of a parent from my DB. So, if I looked up id 7, it might return an array with 5, 6 and 10. What I then want to do, is recursively find the children of those returned ids, and so on, to the final depth of the children. I have tried to write a function to do this, but I am getting confused about recursion. function getChildren($parent_id) { $tree = Array(); $tree_string; if (!empty($parent_id)) { // getOneLevel() returns a one-dimentional array of child ids $tree = $this->getOneLevel($parent_id); foreach ($tree as $key => $val) { $ids = $this->getChildren($val); array_push($tree, $ids); //$tree[] = $this->getChildren($val); $tree_string .= implode(',', $tree); } return $tree_string; } else { return $tree; } }//end getChildren() After the function is run, I would like it to return a one-dimentional array of all the child ids that were found.

    Read the article

  • jQuery UI: Drag and clone from original div, but keep clones

    - by Nic Hubbard
    I have a div, which has jQuery UI Draggable applied. What I want to do, is click and drag that, and create a clone that is kept in the dom and not removed when dropped. Think of a deck of cards, my box element is the deck, and I want to pull cards/divs off that deck and have them laying around my page, but they would be clones of the original div. I just want to make sure that you cannot create another clone of one of the cloned divs. I have used the following, which didn't work like I wanted: $(".box").draggable({ axis: 'y', containment: 'html', start: function(event, ui) { $(this).clone().appendTo('body'); } });

    Read the article

  • iPhone: UITableView with custom cells for settings

    - by Nic Hubbard
    I want to use a UITableView for my settings screen. So that my settings view will look like apple does it, with a group table view, and then the UI elements to let you change settings. So, it does not seem like the cells are loaded from an array, but seems like each one is customized. Ideas on how to do this?

    Read the article

  • web design question (php/ajax)

    - by tom smith
    Hi guys... Hope this isn't a waste of your time. I'm working on a project, and it occured to me that there's a chunk of code out there, that should allow me to see how others have implemented this. I've got a project where I'm going to have a page, with a sel box. the user will select an item from the selList, and based on the item selected, a separate section of the page (areaB) will change in terms of the content/tbls being displayed. i then want to allow the user to go through a series of subpages in areaB, where the user goes through a submit/cancel/confirm process, where the stuff in areaB changes, with the rest of the page remaining the same... i'm trying to figure out the best approach to implement the on both client/server side. i could just have an ugly "if block" where i have abunch of logic, and i completely regen the page each time the user selects an action.. i could have an approach that might involve divs/frames, where i then just regen the targeted frame/div area.. is this even possible?? i could have some form of ajaxy process, which would only alter the targeted section(s) of the page... so.. i'm trying to talk to anyone who has ideas on how to do this, or more ideally, if you know of a good code (client/server) side example of this... that i can examine. i'd really appreciate it!! i've got a more detailed overview but didn't know if it would be cool to post it here... thanks.. tom

    Read the article

  • A way to specify a different host in an SSH tunnel from the host in use

    - by Tom
    I am trying to setup an SSH tunnel to access Beanstalk (to bypass an annoying proxy server). I can get this to work, but with one caveat: I have to map my Beanstalk host URL (username.svn.beanstalkapp.com) in my hosts file to 127.0.0.1 (and use the ip in place of the domain when setting up the tunnel). The reason (I think) is that I am creating the tunnel using the local SSH instance (on Snow Leopard) and if I use localhost or 127.0.0.1 when talking to Beanstalk, it rejects the authorisation credentials. I believe this is because Beanstalk use the hostname specified in a request to determine which account the username / password combination should be checked against. If localhost is used, I think this information is missing (in some manner which Beanstalk requires) from the requests. At the moment I dig the IP for username.svn.beanstalkapp.com, map username.svn.beanstalkapp.com to 127.0.0.1 in my hosts file, then for the tunnel I use the command: ssh -L 8080:ip:443 -p 22 -l tom -N 127.0.0.1 I can tell Subversion that the repo. is located at: https://username.svn.beanstalkapp.com:8080/repo-name This uses my tunnel and the username and password are accepted. So, my question is if there is an option when setting up the SSH tunnel which would mean I wouldn't have to use my hosts file workaround?

    Read the article

  • iPhone: Fetched Results Controller, don't use sections in UITableView

    - by Nic Hubbard
    I am using a fetched results controller, which, it seems wants to set up using sections in my UITableView. Well, in this case, I don't want to use sections. Which, is easy enough to set the value for numberOfSectionsInTableView: to 1. But, now I am not sure how to get the numberOfRowsInSection: to return all of the cells into one section. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section. id <NSFetchedResultsSectionInfo> sectionInfo = [[fetchedResultsController sections] objectAtIndex:section]; return [sectionInfo numberOfObjects]; } How can I make that method return all the cells, since I only want to use 1 section?

    Read the article

  • Can I reset a forgotten owner password with iText?

    - by Tom Hubbard
    With iText I can use Java to open a pdf and write it. If the pdf has an owner password I can still open it but it can not be written. Clearly the content is readable, it seems like at that point you could simply write the document to a new file. iText doesn't allow this, it throws a bad password exception. Is there a way around this?

    Read the article

  • iPhone: Core Data save Class object

    - by Nic Hubbard
    I have an entity in core data called Location. Inside this I have a few fields, such as date. But, I would also like to save a class object in it that I created called Annotation. What type of attribute would I use for this, since it is a custom class object that I created? Location (object) |__ Date |__ Annotation (MKAnnotation protocol)

    Read the article

  • call addsubview again causes slowdown

    - by Tom
    hi guys, i am writing a little music-game for the iphone. I am almost done, this is the only issue which keeps me from rolling it out. any help to solve this is much appreciated. this is what i do: at my appDelegate I add my menu-view-screen to the window. the menu-view-screen acts as a container and controls which view gets presented to the user. means, on the menu-view-screen I got 4 buttons (new game, options, faq, highscore). when the user clicks on a button something as this happens: if (self.gameViewController == nil) { GameViewController *viewController = [[GameViewController alloc] initWithNibName:@"GameViewController" bundle:nil]; self.gameViewController = viewController; [viewController release]; } [self.view addSubview:self.gameViewController.view]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleSwitchViewNotificationFromGameView:) name:@"SwitchView" object:gameViewController]; when the user returns to the menu, this piece of code gets executed: [[NSNotificationCenter defaultCenter] removeObserver:self]; [self.gameViewController viewWillDisappear:YES]; [self.gameViewController.view removeFromSuperview]; this works fine for all screens but not for the gamescreen(well this is the only one with heaps of user-interaction) means the responsiveness of the iphone(when playing tones) gets really slow. The performance is fine when I display the gameview for the first time. it starts getting slower as soon as I add it to the menu-views-container-subviews again (addsubview) (basically open up a new game) any ideas what causes(or to get around) this? thanks heaps Best regards Tom

    Read the article

  • NSTimer calculate hours

    - by Nic Hubbard
    I am using an NSTimer which I have working to show minutes and seconds. But I am confused about the math needed to calculate hours. I am using: - (void)updateCounter:(NSTimer *)theTimer { static int count = 0; count += 1; int seconds = count % 60; int minutes = (count - seconds) / 60; // Not sure how to calculate hours int hours = (count - minutes) / 60; self.timer.text = [NSString stringWithFormat:@"%.2d:%.2d:%.2d", hours, minutes, seconds]; } What calculation should I use for hours?

    Read the article

  • IE Cannot open the internet site (no JS on the page)

    - by Nic Hubbard
    I know that there are many posts about this on Stackoverflow, but this one is different. All of the other fixes to this have to do with javascript, but I don't even have javascript on my page. None. And I am still getting this error. Was there any other reasons why this error was being caused? Also, it only happens when I visit my top navigation links, rather than the page directly from the url. Take a look at: http://www.mayandivers.com/see EDIT: This is happening in IE6/7.

    Read the article

  • jsTree: Prevent before and after TYPE, only use inside

    - by Nic Hubbard
    I am using jsTree which is very nice. When dragging and dropping, I don't really care for the before and after types, I only want to use inside. Meaning, I am only concerned about that parent that a child is dropped into, rather than where the order is with other elements INSIDE the parent. So, I wanted to build my callback, so it always refers to the parent node that it is inside. But, it is not fool proof, yet. onmove : function (NODE,REF_NODE,TYPE,TREE_OBJ,RB) { if (TYPE == 'inside') { alert('Item to move:'+$(NODE).attr('rel')+' to '+$(REF_NODE).attr('rel')+' '+TYPE); } else if (TYPE == 'after') { alert('Item to move:'+$(NODE).attr('rel')+' to '+$(REF_NODE).parent().parent('li').attr('rel')+' '+TYPE); } }, Does anyone have suggestions, how I can change my callback, so that the REF_NODE is always the parent that the NODE is moved into? Rather than a sibling of, which is a child of the parent?

    Read the article

  • Symfony: How to hide form fields from display and then set values for them in the action class

    - by Tom
    I am fairly new to symfony and I have 2 fields relating to my table "Pages"; created_by and updated_by. These are related to the users table (sfGuardUser) as foreign keys. I want these to be hidden from the edit/new forms so I have set up the generator.yml file to not display these fields: form: display: General: [name, template_id] Meta: [meta_title, meta_description, meta_keywords] Now I need to set the fields on the save. I have been searching for how to do this all day and tried a hundred methods. The method I have got working is this, in the actions class: protected function processForm(sfWebRequest $request, sfForm $form) { $form_params = $request->getParameter($form->getName()); $form_params['updated_by'] = $this->getUser()->getGuardUser()->getId(); if ($form->getObject()->isNew()) $form_params['created_by'] = $this->getUser()->getGuardUser()->getId(); $form->bind($form_params, $request->getFiles($form->getName())); So this works. But I get the feeling that ideally I shouldnt be modifying the web request, but instead modifying the form/object directly. However I havent had any success with things like: $form->getObject()->setUpdatedBy($this->getUser()->getGuardUser()); If anyone could offer any advice on the best ways about solving this type of problem I would be very grateful. Thanks, Tom

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >