Search Results

Search found 645 results on 26 pages for 'phil yates'.

Page 18/26 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How do I compare two complex data structures?

    - by Phil H
    I have some nested datastructures, each something like: [ ('foo', [ {'a':1, 'b':2}, {'a':3.3, 'b':7} ]), ('bar', [ {'a':4, 'd':'efg', 'e':False} ]) ] I need to compare these structures, to see if there are any differences. Short of writing a function to explicitly walk the structure, is there an existing library or method of doing this kind of recursive comparison?

    Read the article

  • Where can I find a deliberately insecure open source web application?

    - by Phil Laliberte
    As a developer, I've learned that I usually gain a better understanding of best/worst practices through experience. The area of web application security isn't really somewhere where my organization can afford to let developers learn through trial and error. So looking for a hands-on approach to knowledge sharing of best practices in web application security, I was thinking that it would be useful to have an open source application that was deliberately built to be insecure in order to help teach junior developers about application security. Does anyone out there know where to find something like this?

    Read the article

  • Problems with Database Search Code (asp.net vb)

    - by Phil
    Here is a sample of my database search code: Dim sql As String = "Select * From Table Where " Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim andor As Boolean = AndOr1.SelectedValue 'selection can be AND or OR (0 / 1) 'Code for when the user selects AND If NameSearch.Text.ToString IsNot String.Empty And andor = 0 Then sql += "Surname LIKE '%" & name & "%' AND " End If If EmailSearch.Text.ToString IsNot String.Empty And andor = 0 Then sql += "Email LIKE '%" & email & "%' AND " End If If CitySearchBox.Text.ToString IsNot String.Empty And andor = 0 Then sql += "City LIKE '%" & city & "%' AND " End If 'Code for when the user selects OR If NameSearch.Text.ToString IsNot String.Empty And andor = 1 Then sql += "(Surname LIKE '%" & name & "%' OR " End If If EmailSearch.Text.ToString IsNot String.Empty And andor = 1 Then sql += "Email LIKE '%" & email & "%') OR " End If If CitySearchBox.Text.ToString IsNot String.Empty And andor = 1 Then sql += "(City LIKE '%" & city & "%' OR " End If sql = CleanString(sql) End Sub When the user selects AND (as andor.selectedvalue(0)) then the sql is produced fine like this; Select * From Table Where Surname LIKE '%test%' AND Email LIKE '%test%' AND City LIKE '%test%' But if the user selects OR (as andor.selectedvalue(1)), nothing is outputted except; Select * From Table Where Im sure the controls have values so are not string.empty and when the user selects OR the correct value 1 is being assigned to andor.

    Read the article

  • domain -> subdomain - passing session data

    - by Phil Jackson
    Howdy, having a little trouble here. I have domain.co.uk setting a session. When I click on a link on domain.co.uk to go to sub.domain.co.uk the session is not being read. I have altered session.cookie_domain to .domain.co.uk not still not working. Is there anything else that needs changing? Regards, me.

    Read the article

  • Freshbooks oauth question

    - by Phil
    Very quick question for freshbooks oauth. When requesting a Request Token you need to provide (amoung others) the oauth_signature method. Is the signature the consumer key and the consumer secret seperated by an ampersand? e.g. _consumer_key_%26_consumer_secret_ where _consumer_key_ is the consumer key. _consumer_secret_ is the consumer secret and %26 is a urlencode ampersand.

    Read the article

  • jquery autocomplete() is not working

    - by phil
    <script src="http://code.jquery.com/jquery-latest.js"></script> Search: <input id="example" /> <script> $(document).ready(function(){ var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" "); $("#example").autocomplete(data); }); </script>

    Read the article

  • PHP - string to image only produces black background

    - by Phil Jackson
    Hi im really having a problem find how to fix this. $string = "foo"; $font = 4; $width = ImageFontWidth($font) * strlen($string); $height = ImageFontHeight($font); $im = @imagecreatetruecolor ($width,$height); $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 0); imagestring($im, 5, 0, 0, $string, $textcolor); imagegif($im, 'somefile.gif', 8); imagedestroy($im); I cannot seem to change the background from black. Does anyone have any ideas?

    Read the article

  • Lose the last 3 chars from string variable

    - by Phil
    if the last 4 chars in my string(result) are " AND" or the last three chars are " OR" I would like to remove these from the string. So far I have am trying result.trimend and a few other methods but am unsure how to get it working. Thanks

    Read the article

  • crashing on iPhone Address API

    - by phil swenson
    Any ideas on why this code would crash (crash location indicated below)? email is a valid NSString*... ([email protected]) +(void)newContactFromEmail:(DetailViewController*)controller email:(NSString*)emailAddress{ ABNewPersonViewController *npvc = [[ABNewPersonViewController alloc] init]; ABRecordRef newPerson = ABPersonCreate(); [self updateEmail:newPerson email:emailAddress]; npvc.displayedPerson = newPerson; npvc.newPersonViewDelegate = controller; [controller.navigationController pushViewController:npvc animated:YES]; } +(void)updateEmail:(ABRecordRef)person email:(NSString*)email{ **crashes Here**---->> ABMutableMultiValueRef multiEmail = ABMultiValueCreateMutableCopy (ABRecordCopyValue(person, kABPersonEmailProperty)); ABMultiValueAddValueAndLabel(multiEmail, email, kABHomeLabel, NULL); ABRecordSetValue(person, kABPersonEmailProperty, multiEmail, nil); CFRelease(multiEmail); }

    Read the article

  • Wordpress ajax conflicts

    - by Phil
    I have problems with wordpress and ajax. The ajax request via jQuery just dont work. Jquery noconflict is enabled and the effects work but the ajax requst dont. Where could be the problem? Thank you!

    Read the article

  • no such file to load -- ruby-mbox (LoadError)

    - by Phil M
    sudo gem install ruby-mbox then I run this require "rubygems" require "ruby-mbox" mbox = Mbox.new("Inbox") and I get this $ ruby mbox_read.rb /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- ruby-mbox (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from mbox_read.rb:2 gem server says this ruby-mbox 0.0.2 [rdoc] [www] A simple library to read mbox files. Executables are mbox-daemon, mbox-do. Thanks in advance

    Read the article

  • Loading child entities with JPA on Google App Engine

    - by Phil H
    I am not able to get child entities to load once they are persisted on Google App Engine. I am certain that they are saving because I can see them in the datastore. For example if I have the following two entities. public class Parent implements Serializable{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true") private String key; @OneToMany(cascade=CascadeType.ALL) private List<Child> children = new ArrayList<Child>(); //getters and setters } public class Child implements Serializable{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true") private String key; private String name; @ManyToOne private Parent parent; //getters and setters } I can save the parent and a child just fine using the following: Parent parent = new Parent(); Child child = new Child(); child.setName("Child Object"); parent.getChildren().add(child); em.persist(parent); However when I try to load the parent and then try to access the children (I know GAE lazy loads) I do not get the child records. //parent already successfully loaded parent.getChildren.size(); // this returns 0 I've looked at tutorial after tutorial and nothing has worked so far. I'm using version 1.3.3.1 of the SDK. I've seen the problem mentioned on various blogs and even the App Engine forums but the answer is always JDO related. Am I doing something wrong or has anyone else had this problem and solved it for JPA?

    Read the article

  • String date time format

    - by Phil
    Hi i am using the vimeo API and i want to convert the string to a short date formate {0:d} or {0:dd/mm/yyyy}. This is my code but doesnt seem to be working for me. select new VimeoVideo { Date = String.Format("{0:d}",(item.Element("upload_date").Value)), }; return Vids.ToList(); } public class VimeoVideo { public string Date { get; set; } } Any help would be much appreciated Thanks

    Read the article

  • javascript validate zip regular expression

    - by phil
    It's not working. Probably it's syntax error, but I can't figure it out. <script src="jquery-1.4.2.min.js" type="text/javascript"></script> <script> pattern=/^[0-9]{5}$/; if (!pattern.test($('#zip').val)) {$('#zip').append($('<p>',{html: zip is invalid}));} </script> zip (US only): <input type="text" name='zip' id='zip' maxlength="5">

    Read the article

  • Generate Soap Headers with asp.net

    - by Phil
    I am looking for the asp.net vb syntax to write; <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://its/foo.wsdl"> With an xmlwriter Any help greatly appreciated, I'm very stuck! Thanks.

    Read the article

  • WPF Binding to IDictionary<int,MyType>.Values Doesn't Respond to Property Changes?

    - by Phil Sandler
    I am binding a ListView a property that essentially wraps the Values collection (ICollection) on a generic dictionary. When the values in the dictionary change, I call OnNotifyPropertyChanged(property). I don't see the updates on the screen, with no binding errors. When I change the property getter to return the Linq extension dictionary.Values.ToList(), without changing the signature of the property (ICollection) it works with no problem. Any reason why the Values collection bind and notify properly without projecting to an IList<?

    Read the article

  • StructureMap Configuration Per Thread/Request for the Full Dependency Chain

    - by Phil Sandler
    I've been using Structuremap for a few months now, and it has worked great on some smaller (green field) projects. Most of the configurations I have had to set up involve a single implementation per interface. In the cases where I needed to choose a specific implementation at runtime, I created a factory class that used ObjectFactory.GetNamedInstance<(). In the smaller projects, there were few enough of these cases where I was comfortable with the references to ObjectFactory. My understanding is that you want to limit these references as much as possible, and ideally only reference the ObjectFactory once. I am working to refactor a larger codebase to use IOC/StructureMap, and am finding that I may need many of these factory classes with ObjectFactory references to get what I need. Essentially, I am creating a "root service" with the ObjectFactory, so that everything in the dependency chain is managed by the container. The root service is created by name (i.e. "BuildCar", "BuildTruck"), and the services needed deeper in the dependency chain could also be constructed using the same name--so the "IAttachWheels" service could vary based on whether a car or truck is being built. Since the class that depends on IAttachWheels is the same in both configurations, I don't think I can use ConstructedBy in the registry to choose the implementation. Also, to be clear, the IAttachWheels implementations need to be managed by the container as well, because the dependency chain runs fairly deep. I looked briefly at Profiles as an option, but read (here on StackOverflow) that changing profiles essentially changes implementations for all threads. Is there a feature that is similar to profiles that is thread/request specific? Is the factory class that references ObjectFactory approach the right way to go? Any thoughts would be appreciated.

    Read the article

  • Nhibernate schema clasue

    - by Phil Whittaker
    How do I use the schema clause on a bag object in Nhibernate mapping? I have an table that I need to sepcify the schema for and the nhibernate documentation talks about table schema but I can't find any further details...

    Read the article

  • javascript getElementByName doesn't work

    - by phil
    This simple js script can't set the value of "para". I guess getElementByName doesn't work. But why? <script function fn() { document.getElementById("para").setAttribute("name","hi"); document.getElementByName("hi").setAttribute("value","my value is high"); } </script <html <input type="button" onClick="fn()" value="click me" <input id="para" type="text" / </html

    Read the article

  • Why cant I specify the width and height of a cell in an html table?

    - by Phil
    I am using CSS but for the sake of quick testing i am just using a style tag. This is the code I am trying to implement: echo "<td style='height=10px; width=10px;'>"; it makes sure that the max width of the cell is 10px however the height overflows with the text so becomes very large (high). what I am trying to achieve is any information that is in that cell more than 30 charcters I want to hide so you cant see it. (I know 30 charaters is more than 10px but I am just playing to see if it worked!) Thanks guys.

    Read the article

  • authlogic rails question - how to code for an API

    - by phil swenson
    I have authlogic going on my app, but now I need to have an an API. I don't want to establish a session, just want a user to send in data in a json request such as: {"type":"address","password":"mypassword","name":"my notificaiton name goes here","user":"myusername","text":"my interesting stuff goes here"} So questions - 1) is this a decent approach? 2) how do i do the auth inside my rails controller?

    Read the article

  • Open an external program in Qt with an attached file extension

    - by Phil
    I am making a qt application which allows the user to select a file and then upon clicking ok, start the associated program with the file already loaded. The program I want to start is java based, and I know how to use QProcess to get it to open, I don't know however how to add the file extension which the user is selecting. Any suggestions?

    Read the article

  • TeamCity build triggers don't automatically run

    - by Phil.Wheeler
    I've been playing around with and learning a bit about TeamCity and have the server correctly set up with my .Net MVC project committed in Subversion successfully and build configurations and triggers sorted to kick off when any changes are committed to the repository. TeamCity polls on its default time period and is picking up that changes have been committed, but it is adding these to the queue without actually ever running them. I have to manually click the "Run" button to kick them off. What setting do I need to change in order to ensure that any new changes are automatically run?

    Read the article

  • jquery dynamically genearate element id in a loop

    - by phil
    This is a loop in a function intending to create elements <li> and give each <li> an unique id. But it's not working. I suspect it's a simple syntax error with the use of quote in .attr(). But I can't get a straight answer from Google. for (i=0;i<array.length;i++) { //create HTML element of tag li $('#suggest').append("<li></li>"); $("li").attr("id",'li'+i); $('#li'+i).html(array[i]); }

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >