Search Results

Search found 2004 results on 81 pages for 'james foster'.

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

  • Objective C selector memory managment (does this leak memory)?

    - by James Jones
    - (IBAction) someButtonCall { if(!someCondition) { someButtonCallBack = @selector(someButtonCall); [self presentModalViewController:someController animated:YES]; } else ... } //Called from someController - (void) someControllerFinished:(BOOL) ok { [self dismissModalViewControllerAnimated:YES]; if(ok) [self performSelector:someButtonCallBack]; else ... } I'm wondering if the user keeps getting into the !someCondition clause if the selector is leaked by assigning a new selector each time (the code above is hypothetical and not what i'm doing). Any help is appreciated. Thanks, James Jones

    Read the article

  • GoogleAppEngine : JAR for enhancer not found, yet ASM is on the classpath

    - by James.Elsey
    When deploying my application to GoogleAppEngine I'm getting the following message after the upload Exception in thread "Thread-0" You have selected to use ClassEnhancer "ASM" yet the JAR for that enhancer does not seem to be in the CLASSPATH! org.datanucleus.enhancer.NucleusEnhanceException: You have selected to use ClassEnhancer "ASM" yet the JAR for that enhancer does not seem to be in the CLASSPATH! at org.datanucleus.enhancer.DataNucleusEnhancer.init(DataNucleusEnhancer.java:212) at org.datanucleus.enhancer.DataNucleusEnhancer.addClasses(DataNucleusEnhancer.java:370) at org.datanucleus.enhancer.EnhancerProcessor$EnhanceRunnable.run(EnhancerProcessor.java:163) at java.lang.Thread.run(Thread.java:636) I'm not sure why this is happening, since I have the following in my POM <dependency> <groupId>asm</groupId> <artifactId>asm</artifactId> <version>3.2</version> </dependency> Which is required by GAE, and the ASM jar is located in the target directory, so I'm failing to see what the issue is Any ideas? [james@nevada gae-deployment]$ ls target/salestracker/WEB-INF/lib/asm* target/salestracker/WEB-INF/lib/asm-3.2.jar

    Read the article

  • Better to build or buy a compute grid platform?

    - by James B
    I am looking to do some quite processor-intensive brute force processing for string matching. I have run my prototype in a multi-threaded environment and compared the performance to an implementation using Gridgain with a couple of nodes (also multithreaded). The performance I observed was that my Gridgain implementation performed slower to my multithreaded implementation. It could be the case that there was a flaw in my gridgain implementation, but it was only a prototype, and I thought the results were indicative. So my question is this: What are the advantages of having to learn and then build an implementation for a particular grid platform (hadoop, gridgain, or EC2 if going hosted - other suggestions welcome), when one could fairly easily put together a lightweight compute grid platform with a much shallower learning curve?...i.e. what do we get for free with these cloud/grid platforms that are worth having/tricky to implement? (Please note, I don't have any need for a data grid) Cheers, -James (p.s. Happy to make this community wiki if needbe)

    Read the article

  • Reflection and changing a variables type at runtime?

    - by james-west
    Hi I'm trying to create an object Of a specific type. I've got the following code, but it fails because it can't cast the new table object to the one that is already defined. I need table to start of an IEnumerable type so I can't declare is an object. Public sub getTable(ByVal t as Type) Dim table As Table(Of Object) Dim tableType As Type = GetType(Table(Of )).MakeGenericType(t) table = FormatterServices.GetUninitializedObject(tableType) End sub So in short - is there a way of changing a variable type at runtime? (or a better way of doing what I'm doing) Thanks in advance. James

    Read the article

  • Remove clear button (grey x) to the right of UISearchBar when cancel button tapped

    - by David Foster
    Right, to begin my question, here's some screenies of the problem already solved by the Spotify app: Spotify's Step 1: Standard UISearchBar not in editing mode. Spotify's Step 2: UISearchBar now in editing mode. Search term entered. Cancel button slides in from the right, and the clear button (grey x) appears. Spotify's Step 3: Cancel button pressed; keyboard slides out and the search bar is no longer in editing mode. Search term remains and the grey x button is now hidden. At present, the following code fires off when my cancel button is pressed: - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar { [searchBar resignFirstResponder]; [searchBar setShowsCancelButton:NO animated:YES]; } Which results in: My Step 3: Search bar now not in editing mode. Cancel button and keyboard has slid out. Search term remains but so does the grey x. So, my question is this: given that -resignFirstResponder (and -endEditing:, FYI) does not hide the grey x button when a search bar has had text entered into it, how does one hide it? Thanks again, friends.

    Read the article

  • PHP application variable... maybe?

    - by James
    I went to a PHP job interview, I was asked to implement a piece of code to detect visitors are bots to crawl thru the website and steal content. So I implemented a few lines of code to detect if the site is being refreshed/visited too quickly/often by using a session variable to store last visit timestamp. I got told that session varaibles can be manupilated by cookies etc, so I am wondering if there is a application variable that I can use to store the timestamp information against visitor IPs eg $_SERVER[REMOTE_ADDR]? I know that I can write the data to a file but it's not very good for a high traffic website. Regards James

    Read the article

  • Programmatically Centering UIViews

    - by David Foster
    I've seen a bunch of similar questions to this, but nothing seems to be completely what I'm looking for. Do forgive me if I have missed the solution answered in another question, though! Right. I have a view. 160 pixels both tall and wide. I know that this view is going to be used as a subview, and I know that it always needs to be centered about both axis in whatever situation it's used. If defining the view programmatically, how can I be sure that it is always perfectly centered, horizontally and vertically, relative to its superview? So far, all I have is this simple code: - (void)loadView { self.view = [[UIView alloc] initWithFrame:CGRectMake(80, 150, 160, 160)]; self.view.backgroundColor = [UIColor greenColor]; self.view.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin); [self.view release]; } This does the centralization, but only in the simplest of cases. Any insight is greatly appreciated.

    Read the article

  • How to make a DropDownList control display some items in bold ASP.Net

    - by james lewis
    I'm working with a custom DropDownList control in ASP.Net and there's been a request to display certain items in the list with a bold typeface (NOTE - the control inherits from CompositeDataBoundControl so it can be data bound... not DropDownListBox). The control is bound to a table and there's a column in the table named IsUsed - if this is set to true, the corresponding item in the list should be rendered bold. (It should be noted here that this will only ever be viewed in FireFox.) My experience is all in the middle \ backend tiers so the presentation layer is very new to me - can someone point me in the right direction? My initial thought was that somewhere in the custom control I would have access to all the rows that are returned from the data source which I could cycle through etc but I'm not sure if that's possible... There's also RenderContents which I can override... looks interesting! Any help appreciated - cheers. James

    Read the article

  • Updating GUI axes in MATLAB

    - by James
    HI, I am making a GUI for a program I have created, where I need to be able to change the position of a load along a beam. I have set up the axes and the slider properly, but I am unsure how to get the axes to update, as I can't find any examples that show how to do this on the internet. At present, as I move the load, the position updates properly, but the old position stays on screen as well, which is quite annoying. Can anyone recommend any good examples that show how to do this, or does anyone have a suggestion of how to go about refreshing the axes? Regards, James

    Read the article

  • Concatenating text in an ASP.NET localized label

    - by James B
    Trying to localize text in ASP.NET labels... want to add a ':' after the localized text. I could just add the ':' to the localized text in the resource file, but that seems silly... there should be an easy way to do this. <asp:Label id="RoleTypeLabel" runat="server" Text='<%$ Resources: GS3, RoleTypeLabel %>:' AssociatedControlID="RoleTypeDropDown"></asp:Label> (note the ':' at the end of Text='...') Of course, this doesn't work... and neither does anything I can think of to concatenate a ':' onto the end of the localized text. Anyone know how to do it? TIA, James

    Read the article

  • How to add a timeout value when using Java's Runtime.exec()?

    - by James Adams
    I have a method I am using to execute a command on the local host. I'd like to add a timeout parameter to the method so that if the command being called doesn't finish in a reasonable amount of time the method will return with an error code. Here's what it looks like so far, without the ability to timeout: public static int executeCommandLine(final String commandLine, final boolean printOutput, final boolean printError) throws IOException, InterruptedException { Runtime runtime = Runtime.getRuntime(); Process process = runtime.exec(commandLine); if (printOutput) { BufferedReader outputReader = new BufferedReader(new InputStreamReader(process.getInputStream())); System.out.println("Output: " + outputReader.readLine()); } if (printError) { BufferedReader errorReader = new BufferedReader(new InputStreamReader(process.getErrorStream())); System.out.println("Error: " + errorReader.readLine()); } return process.waitFor(); } Can anyone suggest a good way for me to implement a timeout parameter? Thanks in advance for any suggestions! --James

    Read the article

  • Why won't asp.net create cookies in localhost?

    - by James McConnell
    Okay, this is really kinda starting to bug me. I have a simple Web project setup located at: "C:\Projects\MyTestProject\". In IIS on my machine, I have mapped a virtual directory to this location so I can run my sites locally (I understand I can run it from Visual Studio, I like this method better). I have named this virtual directory "mtp" and I access it via http://localhost/mtp/index.aspx. All this is working fine. However, whenever I try to create a cookie, it simply never gets written out? I've tried this in FF3 and IE7 and it just plain won't write the cookie out. I don't get it. I do have "127.0.0.1 localhost" in my hosts file, I can't really think of anything else I can do. Thanks for any advice. James

    Read the article

  • % style macros not supported in some C++/CLI project property pages under VS2010?

    - by Dave Foster
    We're currently evaluating VS2010 and have upgraded our VS2008 C++/CLI project to the new .vcxproj format. I've noticed that a certain property we had set in the project settings did not get translated properly. Under Configuration Properties - Managed Resources - Resource Logical Name, we used to have (in VS2008) the setting: $(IntDir)\$(RootNamespace).$(InputName).resources which indicated that all .resx files were to compile into OurLib.SomeForm.resources inside of the assembly. (the Debug portion is dropped when assembled) According to MSDN, the $(InputName) macro no longer exists and should be replaced with %(Filename). However, when translating the above line to swap those macros, it does not seem to ever expand. The second .resx file it tries to compile, I get a "LINK : fatal error LNK1316: duplicate managed resource name 'Debug\OurLib.%(Filename).resources". This indicates to me that the % style macros are not being expanded here, at least in this specific property. If we don't set anything in that property, the default behavior seems to be to add the subdirectory as a prefix, such as: OurLib.Forms.SomeForm.resources where Forms is the subdir of our project that the .resx file lives. This only occurs when the .resx file is in an immediate subdirectory of the project being built. If a .resx file exists somewhere else on disk (aka ..\OtherLib\Forms\SomeForm2.resx) this prefix is NOT added. This is causing an issue with loading form resources, as it does not account for this possible prefix, even though we are using the standard Forms Designer method of getting at resources: System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(SomeForm::typeid)); and do not specify the .resources file by name. The issue I've just described may not be the same as the original question, but if I were to fix the Resource Logical Name issue I think this would all go away. Does anyone have any information about these % macros and where they are allowed to be used?

    Read the article

  • Text overflowing floated div

    - by James Hatton
    I have a problem with a fluid layout I am attempting to create. I was wondering why I am not able to get overflow:hidden to work on the left menu text on this site. As you can see here, I have labelled in blue, the text which I would like contained within the left menu div, although it overflows and pushes the rest of the site down with it. Please see here for a JS Bin: http://jsbin.com/OcoJEpe/2/edit?html,css,output Thanks for your help. James.

    Read the article

  • Why doesnt R.raw.'songname' not work on android devices?

    - by James Rattray
    I have some media (Audio tracks) on an app... With file path 'R.raw.test' I use some code to get it into a mediaplayer... MediaPlayer.create(Textbox.this, R.raw.fly); And it works PERFECTLY on the Android Emulator... (Plays track on click of button) Can someone explain why, when I put it on my Archos (5 IT) it doesnt work at all? -As soon as the button is clicked, it crashes... Do you have to do something to file paths or what? Please help... Thanks alot... James

    Read the article

  • Converting a string to an integer (Android)

    - by James Rattray
    I'm not 100% on how to do this so i'm asking... May seem stupid but... How do I convert a string into an integer? Background info: I have a textbox I have the user enter a number into... it then: EditText et = (EditText) findViewById(R.id.entry1); String hello = et.getText().toString(); gets the string 'hello' Now I want to convert it to a integer so I can get the number they typed in -will be used later on in code... Is there a way to get the edittext to a integer? -That would skip the middle man... If not, string to integer will be just fine... Thanks alot, James

    Read the article

  • NHibernate Unique Constraint on Name and Parent Object fails because NH inserts Null

    - by James
    Hi, I have an object as follows Public Class Bin Public Property Id As Integer Public Property Name As String Public Property Store As Store End Class Public Class Store Public Property Id As Integer Public Property Bins As IEnumerable(Of Bin) End Class I have a unique constraint in the database on Bin.Name and BinStoreID to ensure unique names within stores. However, when NHibernate persists the store, it first inserts the Bin records with a null StoreID before performing an update later to set the correct StoreID. This violates the Unique Key If I persist two stores with a Bin of the same name because The Name columns are the same and the StoreID is null for both. Is there something I can add to the mapping to ensure that the correct StoreID is included in the INSERT rather than performing an update later? We are using HiLo identity generation so we are not relying on DB generated identity columns Thanks James

    Read the article

  • Using FindAll on a List<List<T>> type

    - by Ken Foster
    Assuming public class MyClass { public int ID {get; set; } public string Name {get; set; } } and List<MyClass> classList = //populate with MyClass instances of various IDs I can do List<MyClass> result = classList.FindAll(class => class.ID == 123); and that will give me a list of just classes with ID = 123. Works great, looks elegant. Now, if I had List<List<MyClass>> listOfClassLists = //populate with Lists of MyClass instances How do I get a filtered list where the lists themselves are filtered. I tried List<List<MyClass>> result = listOfClassLists.FindAll (list => list.FindAll(class => class.ID == 123).Count > 0); it looks elegant, but doesn't work. It only includes Lists of classes where at least one class has an ID of 123, but it includes ALL MyClass instances in that list, not just the ones that match. I ended up having to do List<List<MyClass>> result = Results(listOfClassLists, 123); private List<List<MyClass>> Results(List<List<MyClass>> myListOfLists, int id) { List<List<MyClass>> results = new List<List<MyClass>>(); foreach (List<MyClass> myClassList in myListOfLists) { List<MyClass> subList = myClassList.FindAll(myClass => myClass.ID == id); if (subList.Count > 0) results.Add(subList); } return results; } which gets the job done, but isn't that elegant. Just looking for better ways to do a FindAll on a List of Lists. Ken

    Read the article

  • Omniauth Facebook authentication on localhost

    - by Ryan Foster
    I am trying to set up Omniauth as described in this Railscast. While it works with Twitter, I am unable to get it working with Facebook. I also set up 'http://localhost:3000' as siteurl and 'localhost' as domain but still see the following error message in the browser: Invalid redirect_uri: Given URL is not allowed by the Application configuration. Does anyone of you have any suggestions on how to fix this? Thanks in advance.

    Read the article

  • Dynamic "OR" conditions in Rails 3

    - by Ryan Foster
    I am working on a carpool application where people can search for lifts. They should be able to select the city from which they would liked to be picked up and choose a radius which will then add the cities in range to the query. However the way it is so far is that i can only chain a bunch of "AND" conditions together where it would be right to say "WHERE start_city = city_from OR start_city = a_city_in_range OR start_city = another_city_in_range" Does anyone know how to achive this? Thanks very much in advance. class Search < ActiveRecord::Base def find_lifts scope = Lift.where('city_from_id = ?', self.city_from) #returns id of cities which are in range of given radius @cities_in_range_from = City.location_ids_in_range(self.city_from, self.radius_from) #adds where condition based on cities in range for city in @cities_in_range_from scope = scope.where('city_from_id = ?', city) #something like scope.or('city_from_id = ?', city) would be nice.. end end

    Read the article

  • Logs overwritten in CruiseCControl.NET when there is multiple MSBuild Tasks.

    - by James Poulose
    I have two MSBuild tasks in my CC.NET config. In the end of the execution, i can see two blocks of warnings/errors in the log and published email. But the problem is that the contents of both the blocks are the same and that is from the second MSBuild task!! In another way, the second MSBuild task overwrites the first log, and then creates another one for itself effectively creating two exactly identical block!!! Do anybody have any thoughts on this? I am happy to provide more information if you require about the environment and configuration. Thanks, James Poulose

    Read the article

  • Regular Expression find a phrase not inside an HTML tag

    - by James Buckingham
    Hi there, I'm struggling a bit with this regular expression and wondered if anyone was about to help me please? What I need to do is isolate the 1st phrase inside a string which is NOT inside an HTML tag. So the examples I have at the moment are: This is some test text about ITS for the ITS department. Also worth mentioning ABS as well I guess.ITS, ... and ... This is some ITS test text about ITS for the ITS department. Also worth mentioning ABS as well I guess So in the first example I want it to ignore the wrapped ITS and give me the ITS at the end of the 1st sentence. In the second example I want it to return the ITS at the start of the 2nd sentence. The aim is to replace these with my own custom wrapped acronym tags in a ColdFusion application I'm writing. Thanks a lot, James

    Read the article

  • Sending email from Drupal contact form, but GMail marks it as "Forged"

    - by James Shields
    Hi, My Drupal site sends email to a GMail account, but the emails sent all go into the Spam folder, and GMail puts up a bar with the message "This message was likely forged and did not originate from your account." Although I can create a filter to prevent them going to Spam, I want to start sending newsletters, and I suspect they'll have the same problem. I suspect the problem is with the way I've set up either PHP or Drupal to send mail. As far as I know it's just using the sendmail function. I've set the from address to "info@..." where ... is the site domain. Any tips on how I can make set up my outgoing mail so it won't be refused by GMail (and presumably other major mail providers)? Thanks, James

    Read the article

  • Core Data: Overkill for simple, static UITableView-based iPhone App?

    - by David Foster
    Hello! I have a rather simple iPhone app consisting of numerous views containing a single, grouped table view. These views are held together in navigation controllers which are grouped in a tab bar. Simple stuff. My table views do little more than list text (like "Dog", "Cat" and "Weasel") and this data is being served from a collection of plists. It's perhaps worth mentioning too that these tables are 'static' in the sense that their data is pre-determined and will only ever be amended—and if so, very rarely indeed—by the developer (in this case, moi). This rudimentary approach has reached its limits though, and I think I'm going to need something a bit more relational. I have worked a tad with Core Data in the past, but only with apps whose data is determined by user input. I have four closely related questions: Is Core Data overkill for an app consisting mainly of a selection of simple table views? Do you recommend using Core Data to manage data which is predetermine and extremely unlikely to ever change? Can one lock Core Data down so that its data can't change, thereby relinquishing my responsibility as the developer to handle the editing and saving of the managed object context? How do I go about giving Core Data my predetermined data, and in a format I know that it can work with? Thanks a bunch guys.

    Read the article

  • Getting a variable out of a Public Void (Android)

    - by James Rattray
    I have this code: hubSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) { final MediaPlayer mp2 = MediaPlayer.create(Textbox.this, R.raw.hero); mp2.start(); } public void onNothingSelected(AdapterView<?> parentView) { } }); (The code basically runs when a new item is selected of a spinner and then plays a song, -which later will be a variable based on what was picked, but i'm fine as it is for now) Problem: And I want to be able to use 'mp2' out of this public void, (I want a button which pauses it) How can I do this? Please explain/show... Thanks alot James

    Read the article

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