Search Results

Search found 627 results on 26 pages for 'ray vega'.

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

  • Disposing of Objects with long living dependencies

    - by Ray Booysen
    public class ABC { public ABC(IEventableInstance dependency) { dependency.ANewEvent += MyEventHandler; } private void MyEventHandler(object sender, EventArgs e) { //Do Stuff } } Let us say that an instance of ABC is a long living object and that my dependency is an even longer running object. When an instance of ABC needs to be cleaned up, I have two options. One I could have a Cleanup() method to unsubscribe from the ANewEvent event or I could implement IDisposable and in the Dispose unwire the event. Now I have no control over whether the consumer will call the dispose method or even the Cleanup method should I go that route. Should I implement a Finaliser and unsubscribe then? It feels dirty but I do not want hanging instances of ABC around. Thoughts?

    Read the article

  • UITextFields losing values after UINavigationController activity

    - by Dan Ray
    This is going to be hard to demonstrate in code, but maybe you can picture it with me. I have a view that contains two UITextFields, "title" and "descr". That same view contains two UIButtons that push another controller onto the navController to get more detail from the user about the object we're assembling and ultimately uploading to my server. It appears that pushing another view on, doing something, and popping it back off results in the two UITextFields keeping their content VISUALLY, but the .text property of those fields becomes NULL. I've confirmed that if I do my two push-pop fields before filling in those UITextFields, I get my data when I upload, and if I do them in the opposite order, I don't. It LOOKS like there's data there, but I get nothing when I NSLog their .text properties. Is this normal? Do I need to just design around this? Or is this as weird as it seems, and I should be looking deeper at causes of this?

    Read the article

  • Static variable for communication among like-typed objects

    - by Dan Ray
    I have a method that asynchronously downloads images. If the images are related to an array of objects (a common use-case in the app I'm building), I want to cache them. The idea is, I pass in an index number (based on the indexPath.row of the table I'm making by way through), and I stash the image in a static NSMutableArray, keyed on the row of the table I'm dealing with. Thusly: @implementation ImageDownloader ... @synthesize cacheIndex; static NSMutableArray *imageCache; -(void)startDownloadWithImageView:(UIImageView *)imageView andImageURL:(NSURL *)url withCacheIndex:(NSInteger)index { self.theImageView = imageView; self.cacheIndex = index; NSLog(@"Called to download %@ for imageview %@", url, self.theImageView); if ([imageCache objectAtIndex:index]) { NSLog(@"We have this image cached--using that instead"); self.theImageView.image = [imageCache objectAtIndex:index]; return; } self.activeDownload = [NSMutableData data]; NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:[NSURLRequest requestWithURL:url] delegate:self]; self.imageConnection = conn; [conn release]; } //build up the incoming data in self.activeDownload with calls to didReceiveData... - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"Finished downloading."); UIImage *image = [[UIImage alloc] initWithData:self.activeDownload]; self.theImageView.image = image; NSLog(@"Caching %@ for %d", self.theImageView.image, self.cacheIndex); [imageCache insertObject:image atIndex:self.cacheIndex]; NSLog(@"Cache now has %d items", [imageCache count]); [image release]; } My index is getting through okay, I can see that by my NSLog output. But even after my insertObject: atIndex: call, [imageCache count] never leaves zero. This is my first foray into static variables, so I presume I'm doing something wrong. (The above code is heavily pruned to show only the main thing of what's going on, so bear that in mind as you look at it.)

    Read the article

  • NSMutableArray can't be added to

    - by Dan Ray
    I've had this sort of problem before, and it didn't get a satisfactory answer. I have a viewcontroller with a property called "counties" that is an NSMutableArray. I'm going to drill down a navigation screen to a view that is about selecting the counties for a geographical search. So the search page drills down to the "select counties" page. I pass NSMutableArray *counties to the second controller as I push the second one on the navigation stack. I actually set that second controller's "selectedCounties" property (also an NSMutableArray) with a pointer to my first controller's "counties", as you'll see below. When I go to addObject to that, though, I get this: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[NSCFArray insertObject:atIndex:]: mutating method sent to immutable object' Here's my code: in SearchViewController.h: @interface SearchViewController : UIViewController { .... NSMutableArray *counties; } .... @property (nonatomic, retain) NSMutableArray *counties; in SearchViewController.m: - (void)getLocationsView { [keywordField resignFirstResponder]; SearchLocationsViewController *locationsController = [[SearchLocationsViewController alloc] initWithNibName:@"SearchLocationsView" bundle:nil]; [self.navigationController pushViewController:locationsController animated:YES]; [locationsController setSelectedCounties:self.counties]; [locationsController release]; } in SearchLocationsViewController.h: @interface EventsSearchLocationsViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { ... NSMutableArray *selectedCounties; } ... @property (nonatomic, retain) NSMutableArray *selectedCounties; in SearchLocationsViewController.m (the point here is, we're toggling each element of a table being active or not in the list of selected counties): -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; if ([self.selectedCounties containsObject:[self.counties objectAtIndex:indexPath.row]]) { //we're deselcting! [self.selectedCounties removeObject:[self.counties objectAtIndex:indexPath.row]]; cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_check_inactive.png"]]; } else { [self.selectedCounties addObject:[self.counties objectAtIndex:indexPath.row]]; cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_check_active.png"]]; } [tableView deselectRowAtIndexPath:indexPath animated:YES]; } We die at [self.selectedCounties addObject.... there. Now, when I NSLog myself [self.selectedCounties class], it tells me it's an NSCFArray. How does this happen? I understand about class bundles (or I THINK I do anyway), but this is explicitly a specific type, and it's losing it subclassing at some point in a way that kills the whole thing. I just completely don't understand why that would happen.

    Read the article

  • Get name of currently executing test in JUnit 4

    - by Dave Ray
    In JUnit 3, I could get the name of the currently running test like this: public class MyTest extends TestCase { public void testSomething() { System.out.println("Current test is " + getName()); ... } } which would print "Current test is testSomething". Is there any out-of-the-box or simple way to do this in JUnit 4? Background: Obviously, I don't want to just print the name of the test. I want to load test-specific data that is stored in a resource with the same name as the test. You know, convention over configuration and all that. Thanks!

    Read the article

  • DOS batch command to read some info from text file

    - by Ray
    Hello All, I am trying to read some info from a text file by using windows command line, and save it to a variable just like "set info =1234" Below is the content of the txt file, actually I just need the revision number, and the location of it is always the same line 5, and from column 11 to 15. In the sample it's 1234, and I am wondering is there a way to save it to a variable in Dos command line. Thanks a lot! svninfo.txt: Path: . URL: https://www.abc.com Repository Root: https://www.abc.com/svn Repository UUID: 12345678-8b61-fa43-97dc-123456789 Revision: 1234 Node Kind: directory Schedule: normal Last Changed Author: abc Last Changed Rev: 1234 Last Changed Date: 2010-04-01 18:19:54 -0700 (Thu, 01 Apr 2010)

    Read the article

  • Accessing Virtual Host from outside LAN

    - by Ray
    I'm setting up a web development platform that makes things as easy as possible to write and test all code on my local machine, and sync this with my web server. I setup several virtual hosts so that I can access my projects by typing in "project" instead of "localhost/project" as the URL. I also want to set this up so that I can access my projects from any network. I signed up for a DYNDNS URL that points to my computer's IP address. This worked great from anywhere before I setup the virtual hosts. Now when I try to access my projects by typing in my DYNDNS URL, I get the 403 Forbidden Error message, "You don't have permission to access / on this server." To setup my virtual hosts, I edited two files - hosts in the system32/drivers/etc folder, and httpd-vhosts.conf in the Apache folder of my WAMP installation. In the hosts file, I simply added the server name to associate with 127.0.0.1. I added the following to the http-vhosts.conf file: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "c:/wamp/www/ladybug" ServerName ladybug ErrorLog "logs/your_own-error.log" CustomLog "logs/your_own-access.log" common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "c:/wamp/www" ServerName localhost ErrorLog "logs/localhost-error.log" CustomLog "logs/localhost-access.log" common </VirtualHost> Any idea why I can't access my projects from typing in my DYNDNS URL? Also, is it possible to setup virtual hosts so that when I type in http://projects from a random computer outside of my network, I access url.dyndns.info/projects (a.k.a. my WAMP projects on my home computer)? Help is much appreciated, thanks!

    Read the article

  • UINavigationController and memory management

    - by Dan Ray
    - (void)launchSearch { EventsSearchViewController *searchController = [[EventsSearchViewController alloc] initWithNibName:@"EventsSearchView" bundle:nil]; [self.navigationController pushViewController:searchController animated:YES]; //[searchController release]; } Notice the [searchController release] is commented out. I've understood that pushing searchController onto the navigation controller retains it, and I should release it from my code. I did just alloc/init it, after all, and if I don't free it, it'll leak. With that line commented out, navigation works great. With it NOT commented out, I can navigate INTO this view okay, but coming back UP a level crashes with a *** -[CFArray release]: message sent to deallocated instance 0x443a9e0 error. What's happening here? Is the NavigationController releasing it for me somehow when it goes out of view? The boilerplate that comes on a UINavigationController template in XCode has the newly-pushed controller getting released. But when I do it, it fails.

    Read the article

  • Open Office Impress

    - by Daniel Ray
    Hi I have seen that in some question around presentation you suggest using OO Impress for this. I am trying to show multiple presentation in a non fullscreen window, but havent been very successful so far. Ideally I want to be able to move this presentation windows around the screen. I have searched the Open Office forum but the is almost nothing concerning this topic and noone seems to know the answer to my question. Im trying to do this in C#. I would be very thankfull if you can give me some directions, how to do this. Thank you

    Read the article

  • does anyone know of good delphi docking components?

    - by X-Ray
    we'd like to add movable panels to an application. presently we've used DevExpress docking library but have found them to be disappointingly quirky & difficult to work with. it also has some limitations that aren't so great. auto-hide, pinning, and moving of pages by drag-and-drop are all features we'd like to use. the built-in delphi docking doesn't seem to be full-featured enough to do the things we need (also see sample below). perhaps i should dig deeper into delphi's docking abilities...my initial impression is that they seem very toolbar-oriented rather than something i can drop a frame into. i'm not experienced at docking topics. my only experience has been with the DevExpress docking library where i needed to programmatically create & dock panels. is it my imagination or are DevExpress's products unduly difficult to use/learn? the DevExpress Ribbon Bar component compared to the d2009 Ribbon Bar was certainly a useful experience. i will migrate to the d2009 Ribbon Bar as soon as convenient to do so. it was refreshingly straight-forward to learn and use. a sharp contrast compared to the DevExpress equivalent. if it takes 4x as longer to make it using the DevExpress equivalent, it's time to change direction. what would you suggest in regard to the docking library? thank you for your suggestions/comments!

    Read the article

  • Is Fast Enumeration messing with my text output?

    - by Dan Ray
    Here I am iterating through an array of NSDictionary objects (inside the parsed JSON response of the EXCELLENT MapQuest directions API). I want to build up an HTML string to put into a UIWebView. My code says: for (NSDictionary *leg in legs ) { NSString *thisLeg = [NSString stringWithFormat:@"<br>%@ - %@", [leg valueForKey:@"narrative"], [leg valueForKey:@"distance"]]; NSLog(@"This leg's string is %@", thisLeg); [directionsOutput appendString:thisLeg]; } The content of directionsOutput (which is an NSMutableString) contains ALL the values for [leg valueForKey:@"narrative"], wrapped up in parens, followed by a hyphen, followed by all the parenthesized values for [leg valueForKey:@"distance"]. So I put in that NSLog call... and I get the same thing there! It appears that the for() is somehow batching up our output values as we iterate, and putting out the output only once. How do I make it not do this but instead do what I actually want, which is an iterative output as I iterate? Here's what NSLog gets. Yes, I know I need to figure out NSNumberFormatter. ;-) This leg's string is ( "Start out going NORTH on INFINITE LOOP.", "Turn LEFT to stay on INFINITE LOOP.", "Turn RIGHT onto N DE ANZA BLVD.", "Merge onto I-280 S toward SAN JOSE.", "Merge onto CA-87 S via EXIT 3A.", "Take the exit on the LEFT.", "Merge onto CA-85 S via EXIT 1A on the LEFT toward GILROY.", "Merge onto US-101 S via EXIT 1A on the LEFT toward LOS ANGELES.", "Take the CA-152 E/10TH ST exit, EXIT 356.", "Turn LEFT onto CA-152/E 10TH ST/PACHECO PASS HWY. Continue to follow CA-152/PACHECO PASS HWY.", "Turn SLIGHT RIGHT.", "Turn SLIGHT RIGHT onto PACHECO PASS HWY/CA-152 E. Continue to follow CA-152 E.", "Merge onto I-5 S toward LOS ANGELES.", "Take the CA-46 exit, EXIT 278, toward LOST HILLS/WASCO.", "Turn LEFT onto CA-46/PASO ROBLES HWY. Continue to follow CA-46.", "Merge onto CA-99 S toward BAKERSFIELD.", "Merge onto CA-58 E via EXIT 24 toward TEHACHAPI/MOJAVE.", "Merge onto I-15 N via the exit on the LEFT toward I-40/LAS VEGAS.", "Keep RIGHT to take I-40 E via EXIT 140A toward NEEDLES (Passing through ARIZONA, NEW MEXICO, TEXAS, OKLAHOMA, and ARKANSAS, then crossing into TENNESSEE).", "Merge onto I-40 E via EXIT 12C on the LEFT toward NASHVILLE (Crossing into NORTH CAROLINA).", "Merge onto I-40 BR E/US-421 S via EXIT 188 on the LEFT toward WINSTON-SALEM.", "Take the CLOVERDALE AVE exit, EXIT 4.", "Turn LEFT onto CLOVERDALE AVE SW.", "Turn SLIGHT LEFT onto N HAWTHORNE RD.", "Turn RIGHT onto W NORTHWEST BLVD.", "1047 W NORTHWEST BLVD is on the LEFT." ) - ( 0.0020000000949949026, 0.07800000160932541, 0.14000000059604645, 7.827000141143799, 5.0329999923706055, 0.15299999713897705, 5.050000190734863, 20.871000289916992, 0.3050000071525574, 2.802999973297119, 0.10199999809265137, 37.78000259399414, 124.50700378417969, 0.3970000147819519, 25.264001846313477, 20.475000381469727, 125.8580093383789, 4.538000106811523, 1693.0350341796875, 628.8970336914062, 3.7990000247955322, 0.19099999964237213, 0.4099999964237213, 0.257999986410141, 0.5170000195503235, 0 )

    Read the article

  • Excluding files from web logs

    - by Ray
    Looking through my web logs, I see a lot of entries that don't interest me. Some of them are commonly used images, css files, and scripts, which I can easily exclude by un-checking the 'log visits' check box in IIS for the folder properties. I would also like to exclude log entries for certain common requests which are not in their own folders. Mostly, 'favicon.ico'. 'scriptresource.axd', and 'webresource.axd'. These (especially scriptresource.axd) make up almost a third of a typical log file on my site. So, the question is, how do I tell IIS not to log these requests? And is there any reason that this is a bad idea?

    Read the article

  • IConnectableObservables in Rx

    - by Ray Booysen
    Hi there Can someone explain the differences between an Observable and a ConnectableObservable? The Rx Extensions documentation is very sparse and I don't understand in what cases the ConnectableObservable is useful. This class is used in the Replay/Prune methods.

    Read the article

  • SSRS 2008 Interactive Sorting in Sub-Report not working as expected

    - by Ray J
    I have a (parent) report that has a list. The details group of this list contains one sub-report. So basically if the list has 10 records (rows) the sub-report is executed 10 times. The problem seems to be with interactive sorting in the Sub-Report. It has 4 columns with interactive sorting enabled. When I run the parent report and try to sort columns SSRS "remembers" the previous sort column and sorts by multiple columns at the same time. For example if I sort by Col A then click to sort by Col B, SSRS will preserve the sorting of Col A (and the direction) and then apply the sorting to Col B. However I simply want to sort by Col B and do not want to Col A to be part of the sort. When I try this directly with the sub-report everything works as expected. Any ideas why this is happening?

    Read the article

  • Exception in thread "main" java.lang.StackOverflowError

    - by Ray.R.Chua
    I have a piece of code and I could not figure out why it is giving me Exception in thread "main" java.lang.StackOverflowError. This is the question: Given a positive integer n, prints out the sum of the lengths of the Syracuse sequence starting in the range of 1 to n inclusive. So, for example, the call: lengths(3) will return the the combined length of the sequences: 1 2 1 3 10 5 16 8 4 2 1 which is the value: 11. lengths must throw an IllegalArgumentException if its input value is less than one. My Code: import java.util.HashMap; public class Test { HashMap<Integer,Integer> syraSumHashTable = new HashMap<Integer,Integer>(); public Test(){ } public int lengths(int n)throws IllegalArgumentException{ int sum =0; if(n < 1){ throw new IllegalArgumentException("Error!! Invalid Input!"); } else{ for(int i =1; i<=n;i++){ if(syraSumHashTable.get(i)==null) { syraSumHashTable.put(i, printSyra(i,1)); sum += (Integer)syraSumHashTable.get(i); } else{ sum += (Integer)syraSumHashTable.get(i); } } return sum; } } private int printSyra(int num, int count){ int n = num; if(n == 1){ return count; } else{ if(n%2==0){ return printSyra(n/2, ++count); } else{ return printSyra((n*3)+1, ++count) ; } } } } Driver code: public static void main(String[] args) { // TODO Auto-generated method stub Test s1 = new Test(); System.out.println(s1.lengths(90090249)); //System.out.println(s1.lengths(5)); } . I know the problem lies with the recursion. The error does not occur if the input is a small value, example: 5. But when the number is huge, like 90090249, I got the Exception in thread "main" java.lang.StackOverflowError. Thanks all for your help. :) I almost forgot the error msg: Exception in thread "main" java.lang.StackOverflowError at Test.printSyra(Test.java:60) at Test.printSyra(Test.java:65) at Test.printSyra(Test.java:60) at Test.printSyra(Test.java:65) at Test.printSyra(Test.java:60) at Test.printSyra(Test.java:60) at Test.printSyra(Test.java:60) at Test.printSyra(Test.java:60)

    Read the article

  • I want to combine my www and non www and keep the link jucie from both.

    - by John Ray
    My website shows up for some keywords in the www and some in the non www. Seaquake shows more links to the non www version. It is a PR2 either way. I would like to combine the link juice of the two versions into the non www version. Does anyone know the best way to combine the two and keep the link juice of both. It is as simple as a 301 redirect and if so does the 301 need to be handled in any specific way.

    Read the article

  • Rails acts_as_taggable_on grouped alphabetically?

    - by Ray Dookie
    Having sorted the tag_counts hash via the following code: sorted_tags = Contact.tag_counts.sort{ |x,y| x.name.downcase <= y.name.downcase } what is the easiest/most efficient way to display the tags in my view grouped by letters? i.e A - "Alpha", "Apple", "Aza" B - "Beta", "Bonkers" . . . Z - "Zeta", "Zimmer" Any ideas?

    Read the article

  • Displaying UserControls based on the type a TreeView selection is bound to

    - by Ray Wenderlich
    I am making an app in WPF in a style similar to Windows Explorer, with a TreeView on the left and a pane on the right. I want the contents of the right pane to change depending on the type of the selected element in the TreeView. For example, say the top level in the Tree View contains objects of class "A", and if you expand the "A" object you'll see a list of "B" objects as children of the "A" object. If the "A" object is selected, I want the right pane to show a user control for "A", and if "B" is selected I want the right pane to show a user control for "B". I've currently got this working by: setting up the TreeView with one HierarchialDataTemplate per type adding all the UserControls to the right pane, but collapsed implementing SelectedItemChanged on the TreeView, and setting the appropriate usercontrol to visible and the others to collapsed. However, I'm sure there's a better/more elegant way to switch out the views based on the type the selection is bound to, perhaps by making more use of data binding... any ideas?

    Read the article

  • Threading is slow and unpredictable?

    - by Jake
    I've created the basis of a ray tracer, here's my testing function for drawing the scene: public void Trace(int start, int jump, Sphere testSphere) { for (int x = start; x < scene.SceneWidth; x += jump) { for (int y = 0; y < scene.SceneHeight; y++) { Ray fired = Ray.FireThroughPixel(scene, x, y); if (testSphere.Intersects(fired)) sceneRenderer.SetPixel(x, y, Color.Red); else sceneRenderer.SetPixel(x, y, Color.Black); } } } SetPixel simply sets a value in a single dimensional array of colours. If I call the function normally by just directly calling it it runs at a constant 55fps. If I do: Thread t1 = new Thread(() => Trace(0, 1, testSphere)); t1.Start(); t1.Join(); It runs at a constant 50fps which is fine and understandable, but when I do: Thread t1 = new Thread(() => Trace(0, 2, testSphere)); Thread t2 = new Thread(() => Trace(1, 2, testSphere)); t1.Start(); t2.Start(); t1.Join(); t2.Join(); It runs all over the place, rapidly moving between 30-40 fps and sometimes going out of that range up to 50 or down to 20, it's not constant at all. Why is it running slower than it would if I ran the whole thing on a single thread? I'm running on a quad core i5 2500k.

    Read the article

  • Why doesn't IB see my IBAction?

    - by Dan Ray
    I've been staring at this for way too long. There's nothing fancy happening here, and I've done this dozens of times, yet Interface Builder steadfastly refuses to provide me an action target for -(IBAction)slideDirections. I'm at the point where I'm willing to post publicly and feel stupid. So let 'er rip. Here's my .h: #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> @interface PulseDetailController : UIViewController { NSDictionary *pulse; IBOutlet MKMapView *map; IBOutlet UIWebView *directions; IBOutlet UIView *directionsSlider; BOOL directionsExtended; IBOutlet UILabel *vendor; IBOutlet UILabel *offer; IBOutlet UILabel *offerText; IBOutlet UILabel *hours; IBOutlet UILabel *minutes; IBOutlet UILabel *seconds; IBOutlet UILabel *distance } @property (nonatomic, retain) NSDictionary *pulse; @property (nonatomic, retain) MKMapView *map; @property (nonatomic, retain) UIWebView *directions; @property (nonatomic, retain) UIView *directionsSlider; @property (nonatomic) BOOL directionsExtended; @property (nonatomic, retain) UILabel *vendor; @property (nonatomic, retain) UILabel *offer; @property (nonatomic, retain) UILabel *offerText; @property (nonatomic, retain) UILabel *hours; @property (nonatomic, retain) UILabel *minutes; @property (nonatomic, retain) UILabel *seconds; @property (nonatomic, retain) UILabel *distance; -(IBAction)slideDirections; @end

    Read the article

  • Craziest JavaScript behavior I've ever seen

    - by Dan Ray
    And that's saying something. This is based on the Google Maps sample for Directions in the Maps API v3. <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Directions</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var directionDisplay; var directionsService = new google.maps.DirectionsService(); var map; function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var myOptions = { zoom:7, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById("directionsPanel")); } function render() { var start; if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { start = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); }, function() { handleNoGeolocation(browserSupportFlag); }); } else { // Browser doesn't support Geolocation handleNoGeolocation(); } alert("booga booga"); var end = '<?= $_REQUEST['destination'] ?>'; var request = { origin:start, destination:end, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); } </script> </head> <body style="margin:0px; padding:0px;" onload="initialize()"> <div><div id="map_canvas" style="float:left;width:70%; height:100%"></div> <div id="directionsPanel" style="float:right;width:30%;height 100%"></div> <script type="text/javascript">render();</script> </body> </html> See that "alert('booga booga')" in there? With that in place, this all works fantastic. Comment that out, and var start is undefined when we hit the line to define var request. I discovered this when I removed the alert I put in there to show me the value of var start, and it quit working. If I DO ask it to alert me the value of var start, it tells me it's undefined, BUT it has a valid (and accurate!) value when we define var request a few lines later. I'm suspecting it's a timing issue--like an asynchronous something is having time to complete in the background in the moment it takes me to dismiss the alert. Any thoughts on work-arounds?

    Read the article

  • Handling session between two pages in iframe-based facebook app.

    - by Ray Yun
    I'm a newbie to iframe based facebook application and stuck with session related problems. There are just two pages in my app. First page got many fb_sig_* parameters from facebook platform but when I click a anchor to next page, those fb_sig_* were lost because this is just direct request from end user's browser not from facebook. So I found that http://forum.developers.facebook.com/viewtopic.php?id=52885. It was told that I should not using cookie and always append every fb_sig* to every anchor. This can be the only solution for my problems? Any side effect like session expiry problem?

    Read the article

  • Why doesn't this UIButton show its text label?

    - by Dan Ray
    Everything about this UIButton renders great except the text that's supposed to be on it. NSLog demonstrates that the text is in the right place. What gives? UIButton *newTagButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [newTagButton addTarget:self action:@selector(showNewTagField) forControlEvents:UIControlEventTouchUpInside]; newTagButton.titleLabel.text = @"+ New Tag"; NSLog(@"Just set button label to %@", newTagButton.titleLabel.text); newTagButton.titleLabel.font = [UIFont systemFontOfSize:17]; newTagButton.titleLabel.textColor = [UIColor redColor]; CGSize addtextsize = [newTagButton.titleLabel.text sizeWithFont:[UIFont systemFontOfSize:17]]; CGSize buttonsize = { (addtextsize.width + 20), (addtextsize.height * 1.2) }; newTagButton.frame = CGRectMake(x, y, buttonsize.width, buttonsize.height); [self.mainView addSubview:newTagButton];

    Read the article

  • Improving the efficiency of Kinect for Windows DTWGestureRecognition Application

    - by Ray
    Currently I am using the DTWGestureRecognition open source tool for Kinect SDK v1.5. I have recorded a few gestures and use them to navigate through Windows 7. I also have implemented voice control for simple things such as opening PowerPoint, Chrome, etc. My main issue is that the application uses quite a bit of my CPU power which causes it to become slow. During gestures and voice commands, the CPU usage sometimes spikes to 80-90%, which causes the application to be unresponsive for a few seconds. I am running it on a 64 bit Windows 7 machine with an i5 processor and 8 GB of RAM. I was wondering if anyone with any experience using this tool or Kinect in general has made it more efficient and less performance hogging. Right now I removed sections which display the RGB video and the Depth video but even doing that did not make a big impact. Any help is appreciated, thanks!

    Read the article

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