Search Results

Search found 980 results on 40 pages for 'ryan burnham'.

Page 23/40 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Use an Array to Cycle Through a MySQL Where Statement

    - by Ryan
    I'm trying to create a loop that will output multiple where statements for a MySQL query. Ultimately, my goal is to end up with these four separate Where statements: `fruit` = '1' AND `vegetables` = '1' `fruit` = '1' AND `vegetables` = '2' `fruit` = '2' AND `vegetables` = '1' `fruit` = '2' AND `vegetables` = '2' My theoretical code is pasted below: <?php $columnnames = array('fruit','vegetables'); $column1 = array('1','2'); $column2 = array('1','2'); $where = ''; $column1inc =0; $column2inc =0; while( $column1inc <= count($column1) ) { if( !empty( $where ) ) $where .= ' AND '; $where = "`".$columnnames[0]."` = "; $where .= "'".$column1[$column1inc]."'"; while( $column2inc <= count($column2) ) { if( !empty( $where ) ) $where .= ' AND '; $where .= "`".$columnnames[1]."` = "; $where .= "'".$column2[$column2inc]."'"; echo $where."\n"; $column2inc++; } $column1inc++; } ?> When I run this code, I get the following output: `fruit` = '1' AND `vegetables` = '1' `fruit` = '1' AND `vegetables` = '1' AND `vegetables` = '2' `fruit` = '1' AND `vegetables` = '1' AND `vegetables` = '2' AND `vegetables` = '' Does anyone see what I am doing incorrectly? Thanks.

    Read the article

  • Showing renames in hg status?

    - by Ryan Thompson
    I know that Mercurial can track renames of files, but how do I get it to show me renames instead of adds/removes when I do hg status? For instance, instead of: A bin/extract-csv-column.pl A bin/find-mirna-binding.pl A bin/xls2csv-separate-sheets.pl A lib/Text/CSV/Euclid.pm R src/extract-csv-column.pl R src/find-mirna-binding.pl R src/modules/Text/CSV/Euclid.pm R src/xls2csv-separate-sheets.pl I want some indication that four files have been moved. I think I read somewhere that the output is like this to preserve backward-compatibility with something-or-other, but I'm not worried about that.

    Read the article

  • ASP.NET Canceling the Default Submit Button

    - by Ryan Smith
    I have an ASP.NET application where there's a few ASP.NET buttons and several plain HTML buttons. Anytime there's a textbox where a user hits enter, the ASP.NET button trys to submit the form. I know I can change the defaultButton, but I don't want there to be any default button. I just want it so when the user presses enter it doesn't do anything. I've tried setting defaultButton to blank, but that doesn't seem to work and I can't seem to find the answer anywhere on the web. What's the code to make this happen? Thanks.

    Read the article

  • Why wont this compile its killing me. (java)

    - by Ryan The Leach
    import java.util.*; public class Caesar { public static void main(String [] args) { final boolean DEBUG = false; System.out.println("Welcome to the Caesar Cypher"); System.out.println("----------------------------"); Scanner keyboard = new Scanner (System.in); System.out.print("Enter a String : "); String plainText = keyboard.nextLine(); System.out.print("Enter an offset: "); int offset = keyboard.nextInt(); String cipherText = ""; for(int i=0;i<plainText.length();i++) { int chVal = plainText.charAt(i); if (DEBUG) {int debugchVal = chVal;} chVal +=offset; if (DEBUG) {System.out.print(chVal + "\t");} while (chVal <32 || chVal > 127) { if (chVal < 32) chVal += 96; if (chVal > 127) chVal -= 96; if(DEBUG) {System.out.print(chVal+" ");} } if (DEBUG) {System.out.println();} char c = (char) chVal; cipherText = cipherText + c; if (DEBUG) {System.out.println(i + "\t" + debugchVal + "\t" + chVal + "\t" + c + "\t" + cipherText);} } System.out.println(cipherText); } }

    Read the article

  • HTML checkbox field is being passed to PHP as checked even when it is not

    - by Ryan
    Hello all, First of all thanks in advance, this has been very frustrating and I'm hoping someone can see something I'm not, I am definitely no php expert. Well here' what is going on. I have a form where I have a checkbox for people to opt in to our newletter. The form element looks like this: <label for=newsletter accesskey=N class="checkbox">Signup for Cloverton's Newsletter</label> <input name="newsletter" type="checkbox" id="newsletter" value="Yes" style="width:20px;" /> That is then submitted to a php file with this code: if (isset($_POST['newsletter']) && $_POST['newsletter'] == 'Yes'){ echo "newletter yes"; $newsletter = 1; }else{ echo "newsletter no"; $newsletter = 0; } $newsletter is then inserted into a database field. The issue is that whether the box is checked or not it is being sent to php as true, so every entry is receiving the newsletter. Any help would be greatly appreciated! Thanks!

    Read the article

  • How can I get latency info from Android's AudioTrack class?

    - by Ryan
    I've noticed that the C++ classes underlying the AudioTrack and AudioRecord APIs in Android both have a latency() method that is not exposed via JNI. As far as I can see, the latency() method in AudioRecord still does not take into account the hardware latency (they have a TODO comment for that), but the latency() method in AudioTrack does add in the hardware latency. I absolutely need to get this latency value from AudioTrack. Is there any possible way I can do this? I don't care what kind of crazy hack is needed as long as it doesn't require a rooted phone (the resulting code must still be packaged as an app on the market).

    Read the article

  • How can I save BioPerl sequence nested features in genbank or embl format?

    - by Ryan Thompson
    In BioPerl, a sequence object can have any number of features, and each of these can have subfeatures nested within them. For example, a feature may be a complete coding sequence of a gene, and its subfeatures might be individual exons that are concatenated to form the full coding sequence. However, when I use BioPerl to write a sequence object to a file in genbank or embl format, only the top-level features are written to the file, not the sub-features nested within the top-level features. How can I store my subfeatures in sequence files? Should I just convert all my subfeatures into top-level features, and then reconstruct the tree structure next time I read in the sequence?

    Read the article

  • Redirect parent of a page from a cfwindow

    - by Ryan French
    Hi All, I have a page with cfwindow that require the user to be logged in to view the content on the page. The problem at the moment is if the user logs into the site, then does nothing and the session times out, I have no way that I can think of to redirect the parent of the window to the login screen when the user opens it. So far I have tried using cflocation but that has no way of specifying the container that should be redirected (i.e. the page in the window is being redirected but not the windows parent). I have also thought about using a hidden input with a value based on the session which is then check with Body onLoad event but currently this doesnt work with how the pages have been setup. The last option I have is to check the session variable on loading the window and then closing it if the user is not logged in, which will cause the parent to refresh and redirect to login anyway. However I cant find a way to close a cfwindow without using javascript. Thanks for any help you can give.

    Read the article

  • Bioperl, equivalent of IO::ScalarArray for array of Seq objects?

    - by Ryan Thompson
    In perl, we have IO::ScalarArray for treating the elements of an array like the lines of a file. In BioPerl, we have Bio::SeqIO, which can produce a filehandle that reads and writes Bio::Seq objects instead of strings representing lines of text. I would like to do a combination of the two: I would like to obtain a handle that reads successive Bio::Seq objects from an array of such objects. Is there any way to do this? Would it be trivial for me to implement a module that does this? My reason for wanting this is that I would like to be able to write a subroutine that accepts either a Bio::SeqIO handle or an array of Bio::Seq objects, and I'd like to avoid writing separate loops based on what kind of input I get. Perhaps the following would be better than writing my own IO module? sub process_sequences { my $input = $_[0]; # read either from array of Bio::Seq or from Bio::SeqIO my $nextseq; if (ref $input eq 'ARRAY') { my $pos = 0 $nextseq = sub { return $input->[$pos++] if $pos < @$input}; } } else { $nextseq = sub { $input->getline(); } } while (my $seq = $nextseq->()) { do_cool_stuff_with($seq) } }

    Read the article

  • Umbraco -- controlling access to media by membership

    - by Ryan
    I need to set up access to media files with the following structure: A media folder is designated as belonging to a specific member group. Then, a sub-folder below that needs to be available to a subset of members from the parent's member group. Any thoughts on how this can best be accomplished? I'll render the actual file download links with a user control, but how should I set up this access control on the back end? I need a member-group picker and a multiple member picker. Do these exist anywhere?

    Read the article

  • Extract XML name/value pairs from different nodes in Coldfusion

    - by Ryan French
    Hi All, I am working on some Plesk integration using the XML API and I am trying to figure out how to parse the XML response that I get back. Most of the data is fine, but the Limits and Permissions are setout differently. Essentially they are set out like so: <data> <limits> <limit> <name>foo</name> <value>bar</value> </limit> <limit> <name>foo2</name> <value>bar2</value> </limit> </limits> </data> How do I extract 'bar' from the xml given that I know I want the value of 'foo', but not the value of 'foo2'?

    Read the article

  • BlueJ Chpt 4 - Auction Project - How to make removeLot method work after entering a new lot

    - by Ellaine Ryan
    Hi All I am learning Java through BlueJ I would like to add a removeLot method to the Auction Class in BlueJ Chpt 4. This involves also returning the lot with the given number or null if there is no such lot. If you enter , say 5 lots and then use the remove method, this codes removes whichever lot you specify. However if you enter a new lot after using the removeLot method - an internal error message comes up regarding lotnumbering . Any ideas? Thanks Elaine public Lot removeLot(int number) { if((number >= 1) ) { } Lot lot = getLot (number); if(lot !=null) { lots.remove(lot); } return lot; }

    Read the article

  • How do I insert an input's value into a separate form?

    - by ryan
    I'm making a tool for my university that allows students to create a list of classes by doing the following: Searching by course title for their course via an autocomplete input field. Adding that course to a separate form that upon being submitted creates a course list. I am trying to link the autocomplete and the course list form with an 'add to course list' button that inserts a hidden input field into the course list form which can subsequently be submitted by a 'create course list' button. My question is this: How do I take the value of the autocomplete input and insert it into the course list form without using AJAX? So far I have something like the following: <%= text_field_with_auto_complete :course, :title, :size => 40 %> <%= link_to_function "Add to Course List" do |page| page.insert_html :top, :course_list, hidden_field(:courses, :course, {:value => "$('course_title').value"}) %> <% form_for(@course_list) do |f|%> <div id="course_list">Insert selected courses here.</div> <% end %>

    Read the article

  • Access to Perl's empty angle "<>" operator from an actual filehandle?

    - by Ryan Thompson
    I like to use the nifty perl feature where reading from the empty angle operator <> magically gives your program UNIX filter semantics, but I'd like to be able to access this feature through an actual filehandle (or IO::Handle object, or similar), so that I can do things like pass it into subroutines and such. Is there any way to do this? This question is particularly hard to google, because searching for "angle operator" and "filehandle" just tells me how to read from filehandles using the angle operator.

    Read the article

  • JavaScript setInterval loop not holding variable

    - by Ryan
    Here is my code: var showNo = 1; window.setInterval(function() { console.log(showNo); if(showNo === 1) { var nextNo = 2; } else if(showNo === 2) { var nextNo = 3; } else if(showNo === 3) { var nextNo = 4; } else if(showNo === 4) { var nextNo = 5; } else if(showNo === 5) { var nextNo = 1; } else { var showNo = 1; var nextNo = 2; } var showNo = nextNo; }, 500); My question is, why is the showNo variable not holding when the setInterval loop starts? The console displays 'undefined' in the above example. This may be a simple question, but I am trying to teach myself query and this has me stuck.. Any answers would be great. Thanks.

    Read the article

  • How do I catch generic fault exceptions in Fitnesse?

    - by Dan Ryan
    Previously within my Fitnesse fixture I was specifying an expected WCF exception using: exception[FaultException] Since then I have converted the WCF service to return a strongly typed FaultContract. I am now getting the following failure message: exception[FaultException`1: "A file with the name DMS Documents/testFileWord.doc already exists. It was last modified by SHAREPOINT\system on 09 Mar 2010 15:36:14 -0000."] This is not unexpected but how do I check for strongly typed fault exceptions? Please note I cannot include the fault message as part of the check as it contains a date which changes (I check this separately).

    Read the article

  • Multiple Jquery modal Dialog Boxes in one page?

    - by Ryan Max
    Hi, I am brand stinking new to jquery and attempting to have a "Services" page for a tech website I am working on. I am having trouble with different services opening the same info in the window. Basically I am using the code straight from the demo. Any ideas on how to have multiple windows in the same page? Thanks!

    Read the article

  • jQuery Validation Plugin - Enable 'Eager' Validation only after and Invalid Submit

    - by Ryan Fitzer
    By default, if a user enters a value in a field, the 'eager' validation kicks in. Is there any way to disable 'eager' validation before submit and then enable it after an invalid submit has happened? I've used $.validator.setDefaults() to initially set the onkeyup and onfocusout properties to false. In the invalidHandler method I rerun the $.validator.setDefaults(), setting onkeyup and onfocusout properties to true. No luck with this approach. Basically, I only want the 'eager' validation to take place after the user tries to submit an invalid form. Thanks for any help.

    Read the article

  • ssh-keygen accepting stdin

    - by Ryan
    I am trying to call ssh-keygen using a variable through bash as an input instead of a file to get a fingerprint of a public key. This method does not work as it says the key file is invalid (it's correct for sure) echo $pubkey | ssh-keygen -lf /dev/stdin This does work ssh-keygen -lf /dev/stdin < alpha.pub This does not work because I get an ambiguous redirect ssh-keygen -lf /dev/stdin < $(echo $pubkey) I would appreciate some insight as to how to get ssh-keygen to read from a variable with a public key and if possible, an explanation as to why the redirects aren't doing what I think they should be doing. I searched online but many of the redirect tutorials didn't seem to answer my questions.

    Read the article

  • SVN Serve, Missing a Directory

    - by Ryan Smith
    I'm sure this is an asinine question, and I blame myself for not fully understanding how the SVNSERVE process works. I have an SVN repo, but it needs to be moved to a server within a clients cloud. I did this a while back and ran into the issue of the SVNSERVE.exe process not getting set to the right directory. I have the SVNSERVE.exe process running as a windows service and pointing to the right directory. There are two other repos there that are serving out fine in the same directory. I copied out the new directory just like I did with the others, but I'm getting the error "No repository found". I thought that SVNSERVE just looked at that directory and served out the repositories that were there, but I have had a hard time finding more information about that. I thought it was a Windows permission problem, but I set the whole folder to be full control to EVERYONE, so that's not it. I feel horrible I didn't fully understand this problem the first time I fought it, but it's late on a Sunday night and clients are yelling. Anyone know what I'm missing? Thanks. EDIT: It's specific to the repository. I tested the same process with some of the other repos we have on our server and when I copied them up, they worked just as expected. This bug is breaking me and I wish I could provide more details, but that's all I know. I'm going to try to do an SVN Dump instead of an XCopy and see how that goes. I'll let you know.

    Read the article

  • Cocos2d shake/accelerometer issue.

    - by Ryan Poolos
    So I a little backstory. I wanted to implement a particle effect and sound effect that both last about 3 sec or so when the user shakes their iDevice. But first issue arrived when the build in UIEvent for shakes refused to work. So I took the advice of a few Cocos veterans to just use some script to get "violent" accelerometer inputs as shakes. Worked great until now. The problem is that if you keep shaking it just stacks the particle and sounds over and over. Now this wouldn't be that big of a deal except it happens even if you are careful to try and not do so. So what I am hoping to do is disable the accelerometer when the particle effect/sound effect start and then reenable it as soon as they finish. Now I don't know if I should do this by schedule, NStimer, or some other function. I am open to ALL suggestions. here is my current "shake" code. - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { const float violence = 1; static BOOL beenhere; BOOL shake = FALSE; if (beenhere) return; beenhere = TRUE; if (acceleration.x > violence * 1.5 || acceleration.x < (-1.5* violence)) shake = TRUE; if (acceleration.y > violence * 2 || acceleration.y < (-2 * violence)) shake = TRUE; if (acceleration.z > violence * 3 || acceleration.z < (-3 * violence)) shake = TRUE; if (shake) { id particleSystem = [CCParticleSystemQuad particleWithFile:@"particle.plist"]; [self addChild: particleSystem]; // Super simple Audio playback for sound effects! [[SimpleAudioEngine sharedEngine] playEffect:@"Sound.mp3"]; shake = FALSE; } beenhere = FALSE; }

    Read the article

  • Categorising a large mysql result with php while?

    - by Ryan
    I'm using the following to grab my large result set from a mysql db: $discresult = 'SELECT t.id, t.subject, t.topicimage, t.topictype, c.user_id, c.disc_id FROM topics AS t LEFT JOIN collections AS c ON t.id=c.disc_id WHERE c.user_id='.$user_id; $userdiscs = $db->query($discresult) or error('Error.', __FILE__, __LINE__, $db->error()); This returns a list of all items that the user owns. I'm then needing to categorise these items based on the value of the "topictype" column, which Im currently doing by using: <h2>Category 1</h2> <?php while ($cur_img = mysql_fetch_array($userdiscs)) { if ($cur_img['topictype']=="cat-1") { if ($cur_img['topicimage']!="") { echo "<div><a href=\"viewtopic.php?id=".$cur_img['id']."\" title=\"".$cur_img['subject']."\"><img src=\"".$cur_img['topicimage']."\" style=\"width:60px; height: 60px\" /></a><br /><a href=\"viewtopic.php?id=".$cur_img['id']."\" title=\"".$cur_img['subject']."\">".$cur_img['subject']."</a></div>"; } else { echo "<div><a href=\"viewtopic.php?id=".$cur_img['id']."\" title=\"".$cur_img['subject']."\"><img src=\"img/no-disc-art.jpg\" style=\"width:60px; height: 60px\" /></a><br /><a href=\"viewtopic.php?id=".$cur_img['id']."\" title=\"".$cur_img['subject']."\">".$cur_img['subject']."</a></div>"; } } } mysql_data_seek($userdiscs, 0); ?> <h2>Category 2</h2> <?php while ($cur_img = mysql_fetch_array($userdiscs)) { if ($cur_img['topictype']=="cat-2") { if ($cur_img['topicimage']!="") { echo "<div><a href=\"viewtopic.php?id=".$cur_img['id']."\" title=\"".$cur_img['subject']."\"><img src=\"".$cur_img['topicimage']."\" style=\"width:60px; height: 60px\" /></a><br /><a href=\"viewtopic.php?id=".$cur_img['id']."\" title=\"".$cur_img['subject']."\">".$cur_img['subject']."</a></div>"; } else { echo "<div><a href=\"viewtopic.php?id=".$cur_img['id']."\" title=\"".$cur_img['subject']."\"><img src=\"img/no-disc-art.jpg\" style=\"width:60px; height: 60px\" /></a><br /><a href=\"viewtopic.php?id=".$cur_img['id']."\" title=\"".$cur_img['subject']."\">".$cur_img['subject']."</a></div>"; } } } mysql_data_seek($userdiscs, 0); ?> This works fine when I rinse and repeat the code, but as the site grows I expect I'll run into problems as the number of "topictype" options increases (expecting around 30 categories). I dont want to have to make seperate queries for each categorised group of discs either, as Id eventually have 30 queries being run as categories increase, so hoping to hear some suggestions or alternative approaches :) Thanks

    Read the article

  • How would I create a silverlight control for tagging content similar to StackOverflow?

    - by Dan Ryan
    I am new to Silverlight. How would I go about creating a control for users to tag content. I would like it to work like it does it StackOverflow i.e. Autocomplete and when you press space it inserts the tag in a box with a remove button. I want the control to be bindable to a collection of strings. If someone can just point me in the right direction to get me started I would be very grateful.

    Read the article

  • the MVCC effect on migration from oracle to db2

    - by Ryan Fernandes
    I have a simple (actually simplified :) ) scenario that is possibly the cause for the headache I've been having for the last few days... My current application (that serves 100's of users) currently uses Oracle as the database. I have no stored procs (I wish actually). Now, I've been asked if the product will work if I migrate to IBM DB2 as the database. So, after taking Oracle for granted all this while.... and having re-read Tom's article on MVCC (Multiversion Concurrency Control) and going through this post stating that DB2 is not 'on the list' or 'just tip-toeing in the area' as it were... I know I can't be sure that the product will work with DB2 as is. Is there no hope.. or is there a nice disclaimer I could use.. ?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >