Search Results

Search found 3177 results on 128 pages for 'david undy'.

Page 92/128 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • HTML_Template_IT and wordpress

    - by David Ryder
    I want to use PEAR's HTML_Template_IT in one of my Wordpress page templates so I can separate the HTML from the PHP. I got it working, except I am not sure about one thing. Wordpress's built-in function get_header() actually echo's HTML - so I can't technically set it as a template variable. Is this considered acceptable or is there another way to put the contents of get_header() in a variable? Thanks!

    Read the article

  • Memory management technique for Objective-C iVars/properties

    - by David Rea
    Is the following code doing anything unnecessary? @interface MyClass { NSArray *myArray; } -(void)replaceArray:(NSArray *)newArray; @implementation MyClass -(void)replaceArray:(NSArray *)newArray { if( myArray ) { [myArray release]; myArray = nil; } myArray = [[NSArray alloc] initWithArray: newArray]; } @end What if I made the following changes: 1) Made myArray a property: @property (nonatomic, retain) NSArray myArray; 2) Changed the assignment to: self.myArray = [NSArray arrayWithArray: newArray]; Would that allow me to remove the conditional?

    Read the article

  • Luntbuild + svn - set tagging directory using variables

    - by David Belanger
    Hi, I'm using Luntbuild with Subversion and would like to have our svn tagging environment specific (dev, testing, etc.) and I'm wondering if there's a way to use a variable in the VCS Adapters section. I'm looking for something like this: Directory for tags: tags/Builds/${env}/Service Where ${env} is a variable I can set in the Luntbuild builders section or elsewhere. Does anyone know if what I'm wanting is possible? Thanks.

    Read the article

  • Why does $('#id') return true if id doesn't exist?

    - by David
    I always wondered why jQuery returns true if I'm trying to find elements by id selector that doesnt exist in the DOM structure. Like this: <div id="one">one</div> <script> console.log( !!$('#one') ) // prints true console.log( !!$('#two') ) // is also true! (empty jQuery object) console.log( !!document.getElementById('two') ) // prints false </script> I know I can use !!$('#two').length since length === 0 if the object is empty, but it seems logical to me that a selector would return the element if found, otherwise null (like the native document.getElementById does). F.ex, this logic can't be done in jQuery: var div = $('#two') || $('<div id="two"></div>'); Wouldnt it be more logical if the ID selector returned null if not found? anyone?

    Read the article

  • .net bitmap file type limitations

    - by David Archer
    Hi, Given the line: Bitmap bitmap = new Bitmap(stream); where stream is a System.IO.Stream, are there any limitations on the image file type e.g png, jpg, gif etc that can be handled. i.e are all image file/stream header info clear enough to say "I am an image". I haven't run into any yet, but have only being using the pretty standard ones so far. Thanks

    Read the article

  • Delete NSManageObject at the event tableView:commiteEditingStyle:forRowAtIndexPath:

    - by David.Chu.ca
    I got exception when I tried to delete one NSManageObject at the event of tableView:commiteEditingStyle:forRowAtIndexPath:. Here is the part of my codes: - (void)tableView:(..)tableView commitEditingStyle:(..)editingStyle forRowAtIndexPath:(..)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { [managedObjectContext deleteObject: [fetchedResultController objectAtIndexPath:indexPath]]; ... } } The exception was thrown at the line of deleteObject:(method of my local NSManagedObjectContext). This is the exception message: uncaught exception 'NSObjectInaccessibleException', reason: 'The NSManagedObject with ID:0x3d07a30 <x-coredata://0D2CC9CB-042B-496D-B3FE-5F1ED64EAB97/paymentType/p2> has been invalidated.' I tried to get entity object first and then to delete it. The entity looks OK but still the exception was at delete: NSManagedObject *entityToDelete = [fetchedResultsController objectAtIndexPath:indexPath]; [mangedObjectContext deleteObject:entityToDelete]; // Exception again. I am not sure if the entity object retrieved from the fetchedResultsController(NSFetchedResultsController type) cannot be deleted? If so, is there any other way to get the entity object for deleting?

    Read the article

  • Android: Width and Height of View After Orientation Change

    - by David
    I need to get the width and height of a WebView and pass them in the query string of the URL I am loading in the WebView. I have found a way to do this in onResume(). Since the width and height are not calculated at this point, I post a Runnable to the WebView to be queued for after the UI loads. Here's my problem: when the orientation changes, I am handling it in onConfigurationChanged. When I try to post a Runnable in onConfigurationChanged to the WebView, the WebView's width and height end up being the old orientation's width and height. At what point can I intercept the new width and height after orientation change?

    Read the article

  • Including Build Date strings in a C# project

    - by David Rutten
    I'd like to hard code the build date into my application (DD-mmmm-YYYY), but how do I embed this constant into the code? I thought perhaps I could make a pre-build event that executes a *.bat file that updates a textfile which is resourced, but it sounds pretty involved. What's the best approach?

    Read the article

  • Resolving Assemblies, the fuzzy way

    - by David Rutten
    Here's the setup: A pure DotNET class library is loaded by an unmanaged desktop application. The Class Library acts as a plugin. This plugin loads little baby plugins of its own (all DotNET Class Libraries), and it does so by reading the dll into memory as a byte-stream, then Assembly asm = Assembly.Load(COFF_Image); The problem arises when those little baby plugins have references to other dlls. Since they are loaded via the memory rather than directly from the disk, the framework often cannot find these referenced assemblies and is thus incapable of loading them. I can add an AssemblyResolver handler to my project and I can see these referenced assemblies drop past. I have a reasonably good idea about where to find these referenced assemblies on the disk, but how can I make sure that the Assmebly I load is the correct one? In short, how do I reliably go from the System.ResolveEventArgs.Name field to a dll file path, presuming I have a list of all the folders where this dll could be hiding)?

    Read the article

  • iPhone Application: force landscape mode, strange behaviour...?

    - by David Lawson
    This is a method I use to switch display views, based on a string passed (for example you could pass MainMenuViewController to switch views to a new instance of that class): - (void)displayView:(NSString *)newView { NSLog(@"%@", newView); [[currentView view] removeFromSuperview]; [currentView release]; UIViewController *newView = [[NSClassFromString(newView) alloc] init]; [[newView view] setFrame:CGRectMake(0, 0, 320, 460)]; [self setCurrentView:newView]; [[self view] addSubview:[currentView view]]; } I have my application forced into landscape view (.plist and -shouldRotate), but if you look in the code: [[newView view] setFrame:CGRectMake(0, 0, 320, 460)]; I have to set the frame of the newView to a portrait frame for the view to be displayed correctly - otherwise, for example, a button on the new view can only be pressed in certain parts of the screen (rectangle up the top), unresponsive anywhere else. Even though in all my NIB files they are set to landscape.

    Read the article

  • How can I use splne() with ggplot?

    - by David
    I would like to fit my data using spline(y~x) but all of the examples that I can find use a spline with smoothing, e.g. lm(y~ns(x), df=_). I want to use spline() specifically because I am using this to do the analysis represented by the plot that I am making. Is there a simple way to use spline() in ggplot? I have considered the hackish approach of fitting a line using geom_smooth(aes(x=(spline(y~x)$x, y=spline(y~x)$y)) but I would prefer not to have to resort to this. Thanks!

    Read the article

  • iPhone - Launching selectors from a different class

    - by David Schiefer
    Hi, I'd like to reload a table view which is in another class called "WriteIt_MobileAppDelegate" from one of my other classes which is called "Properties". I've tried to do this via the NSNotificationCenter class - the log gets called but the table is never updated. Properties.h: [[NSNotificationCenter defaultCenter] postNotificationName:@"NameChanged" object:[WriteIt_MobileAppDelegate class] userInfo:nil]; WriteIt_MobileAppDelegate.m -(void)awakeFromNib { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadItProperties:) name:@"NameChanged" object:self]; } - (void) reloadItProperties: (NSNotification *)notification { NSLog(@"Reloading Data"); //this gets called [self.navigationController popToRootViewControllerAnimated:YES]; [self.tblSimpleTable reloadData]; [self.tblSimpleTable reloadSectionIndexTitles]; // but the rest doesn't } What am I doing wrong here?

    Read the article

  • Possible iphone animation timing/rendering bug?

    - by David
    Hi all, I have been working on an iphone apps for several weeks. Now I encounter an animation problem that I can't figure out how to resolve. Mayhbe you can help. Here is the details (a little long, bear with me): Basically the effect I want to achieve is, when user click a button, a loading view pops up, hiding the whole screen; and then the apps does a lot of heavy computation, which takes a few seconds. Once the computation is done, soem result views (something likes checkers on a checker board) are rendered under the loading view. Once all result views are rendered, I used animation animation to remove the loading view nand show the result views to the user. Here is what I do: when user click a button, run this code: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(loadingViewInserted:finished:context:)]; // use a really high index number so it will always on top [self.view insertSubview:loadingViewController.view atIndex:1000]; [UIView commitAnimations]; In the "loadingViewInserted" function, it calls another function doing the heavy computation work. Once the computation is done, a lot of result views (like checkers on a checker board) are rendered under the loading view. for(int colIndex = 1; colIndex <= result.columns; colIndex++) { for(int rowIndex = 1; rowIndex <= result.rows; rowIndex++) { ResultView *rv = [ResultView resultViewWithData:results[colIndex][rowIndex]]; [self.view addSubview:rv]; } } Once all result views are added, following animation is invoked to remove the loading view: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; [loadingViewController.view removeFromSuperview]; [UIView commitAnimations]; By doing this, most of the time (maybe 90%) it does exactly what I want. However, sometime I see some weird result: the loading view shows up first as expected, then before it disappears, some result views, which suppose to be under the loading view, suddenly appears on top of the loading view; and some of them are partial rendered. And then the loading view curled up, and everything looks normal again. The weird situation only lasts for less than a second, but already bad enough to screw up the UI. I have tried all different kinds of thing to fix this (using another thread to remove the loading view, make the loading view non-transparent), but none of them works. The only thing that makes a little better is, I hide all the result views first; after the last animation finished, in its call back, unhide all result views. But this loses the nice effect that when curling up the loading view, the results are already there. At this point, I really think this is a bug in iphone (I compile it with OS 3.0) OS. Or maybe you can point out what I have done wrong (or could do differently). (thanks for finishing this long post, :-) )

    Read the article

  • Prove that the set of regular languages is a proper subset of the set of the context-free languages

    - by David Relihan
    I was brushing up (not homework)on some computation-theory and came accross this problem: How can you prove that the set of regular languages is a proper subset of the set of the context-free languages. Now I know a language is regular iff it is accepted by a finite automaton. And I know a language is context-free iff it is accepted by a pushdown automaton. But I'm not sure of what solution is.

    Read the article

  • Within an aray of objects can one create a new instance of an object at an index?

    - by David
    Here's the sample code: class TestAO { int[] x; public TestAO () { this.x = new int[5] ; for (int i = 0; i<x.length; i++) x[i] = i; } public static void main (String[]arg) { TestAO a = new TestAO (); System.out.println (a) ; TestAO c = new TestAO () ; c.x[3] = 35 ; TestAO[] Z = new TestAO[3] ; Z[0] = a ; Z[1] = (TestAO b = new TestAO()) ; Z[2] = c ; } } When i try to compile this i get an error message at the line Z[1] which reads as follows: TestAO.java:22: ')' expected Z[1] = (TestAO b = new TestAO()) ; ^ What i'm trying to do here is create an instance of the object TestAO that i want to be in that index within the assignment of the value at that index instead of creating the instance of the object outside of the array like i did with a. Is this legal and i'm just making some syntax error that i can't see (thus causing the error message) or can what i'm trying to do just not be done?

    Read the article

  • How do I deliver mail for wildcard addresses to a particular user/alias/program?

    - by David M
    I need to configure sendmail so that mail delivered for wildcard addresses is accepted for delivery and then delivered to a user, alias, or directly to a script. I can rewrite the envelope/headers any number of ways, but I don't know how to accept the wildcard address when it's provided in RCPT TO: Everything I've tried so far winds up with a 550 user unknown error. So here's a specific example: I want to be able to handle any address that consists of a series of digits followed by a dot followed by a word, then pipe that to a script. If the headers get rewritten, that's OK, but I need the envelope to contain the actual Delivered-To address. Here's the sort of SMTP session I need: 220 blah.foo.com ESMTP server ready; Thu, 22 Apr 2010 20:41:08 -0700 (PDT) HELO blort.foo.com 250 blah.foo.com Hello blort.foo.com [10.1.2.3], pleased to meet you MAIL FROM: <[email protected]> 250 2.1.0 <[email protected]>... Sender ok RCPT TO: <[email protected]> 250 2.1.5 <[email protected]>... Recipient ok I tried some stuff with regex maps, but I never got past 550 user unknown.

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >