Search Results

Search found 516 results on 21 pages for 'doug reid'.

Page 16/21 | < Previous Page | 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Problem: Movie Clip contains just one frame

    - by Doug
    I'm a newbie at Flash, so started playing with a pretty standard code sample: one layer contains a movie clip with a flying rectangle, another layer has a button to control it. All script code is in Main.as file. The rectangle was named square1 through the Property window. Here is the problem: the constructor for Main has a line: square1.stop(); to prevent clip from playing, but it doesn't help - it plays. I know the constructor fires, because it has trace("stuff") in it. The code does check that the stage has been created. What strange is that square1.currentFrame always returns 1, and square1.totalFrames returns 1 as well. The layer has 24 frames on the timeline. I tried a tween with just 2 keyframes, then converted whole tween into frames - same result. I mean, the thing is flying before my eyes, how can it be 1 frame??? I even added a listener: square1.addEventListener(Event.ENTER_FRAME, onFrameChange); The event fires all the time, i.e. the frames change, but currentFrame is still 1. Also, tried to name individual frames and use square1.gotoAndStop("begin") and stuff like that. Nothing helps. I am really stuck with this stupid problem.

    Read the article

  • Why am I getting this error?

    - by Doug
    function changeSize( fontsize ) { var body = document.getElementById("body"); var font = fontsize + "-font"; body.className = font; } <input type="button" onclick="changeSize(small)" value="Small" /> Firefox console keeps saying that small is undefined. What am I doing wrong?

    Read the article

  • jQuery textbox required validation based on another text box having text

    - by doug
    Pretty basic question, however, I am very new to jQuery and javascript in general. I have a jQuery validation that is requiring a text box to have text in it, if a checkbox is checked. <script type="text/javascript"> $(document).ready(function () { $("form").validate( { rules: { Comments: { required: "#IsAbnormal:checked" } }, messages: { Comments: { required: "Comments are required" } }, onkeyup: false, wrapper: "", errorLabelContainer: "#ErrorMessageBox" }); }); Pretty straight forward, if you check the IsAbnormal checkbox, it will throw a validation if there are no comments. What I am trying to do is require a textbox based on if another text box has any text in it, for instance require the old password if a user enters a new password into a textbox. Is there an easy way to get the required: "#NewPassword:NotBlank" to work?

    Read the article

  • Finding What You Need in R: function arguments/parameters from outside the function's package

    - by doug
    Often in R, there are a dozen functions scattered across as many packages--all of which have the same purpose but of course differ in accuracy, performance, theoretical rigor, and so on. How do you gather all of these in one place before you start your task? So for instance: the generic plot function. Setting secondary ticks is much easier (IMHO) using a function outside of the base package, minor.tick(nx=n, ny=n, tick.ratio=n), found in Hmisc. Of course, that doesn't show up in plot's docstring. Likewise, the data-input arguments to 'plot' can be supplied by an object returned from the function 'hexbin', again, from a library outside of the base installation (where 'plot' resides). What would be great obviously is a programmatic way to gather these function arguments from the various libraries and put them in a single namespace. edit: (trying to re-state my example just above more clearly:) the arguments to plot supplied in the base package for, e.g., setting the axis tick frequency are xaxp/yaxp; however, one can also set a/t/f via a function outside of the base package, again, as in the minor.tick function from the Hmisc package--but you wouldn't know that just from looking at the plot method signature. Is there a meta function in R for this? So far, as i come across them, i've been manually gathering them in a TextMate 'snippet' (along with the attendant library imports). This isn't that difficult or time consuming, but i can only update my snippet as i find out about these additional arguments/parameters. Is there a canonical R way to do this, or at least an easier way? Just in case that wasn't clear, i am not talking about the case where multiple packages provide functions directed to the same statistic or view (e.g., 'boxplot' in the base package; 'boxplot.matrix' in gplots; and 'bplots' in Rlab). What i am talking is the case in which the function name is the same across two or more packages.

    Read the article

  • Extra Small Spacing

    - by Doug
    removed So if you look at the tabs and look at hw2, you'll notice it has a little extra spacing that overlaps the spacing on the right. That's because wrapped the div in the <li>. You will notice the others not having it. I don't understand why is it making that extra little spacing after I wrap it. Just for the record, this is for CSS spacing which has nothing to do with the JS. Update: I found a ghetto work around!

    Read the article

  • How do I show the print with AJAX/jQuery?

    - by Doug
    So I'm trying to understand this whole AJAX/jQuery thing. Right now, when I run this PHP script alone, I would have to wait and watch the wheel spin until it's done with the loop and then it will load. while ( $row = mysql_fetch_array($res) ) { postcode_to_storm( $row['Test'] ); $dom = new DOMDocument(); @$dom->loadHTML($result); $xPath = new DOMXPath($dom); $failInvite = 'Rejected'; $findFalse = strpos($result, $failInvite); if ( $findFalse == true ) { $array[$i] = $row['Test']; $i++; echo $array[$i]}; } } Now, how do I use AJAX/jQuery to show echo $array[$i]}; everytime it is invoked instead of waiting for the whole process to complete?

    Read the article

  • Why are my \n not working in PHP?

    - by Doug
    I'm playing with SAX and noticed it's not line breaking properly. I have no iea why. function flush_data() { global $level, $char_data; $char_data = trim($char_data); if( strlen( $char_data ) > 0 ) { print "\n"; $data = split("\n", wordwrap($char_data, 76 - ($level*2))); foreach($data as $line) { print str_repeat(' ', ($level +1)) . "[".$line."]"."\n"; } } $char_data = ''; }

    Read the article

  • Why can I not send more than one request?

    - by Doug
    function stateChanged(idname) { xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(idname).value = xmlhttp.responseText; } } } function openSend(php,idname) { stateChanged(idname); xmlhttp.open("GET",php,true); xmlhttp.send(); } function showHint() { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } openSend("time.php", "Time"); openSend("date1.php", "Date1"); openSend("date2.php", "Date2"); return; } These two say aborted (in Firebug) and doesn't return a value. Why is that? Is it because I can't send more than 1 request? openSend("time.php", "Time"); openSend("date1.php", "Date1"); If I can't, how could I achieve 3 requests with only one invocation?

    Read the article

  • Why might this work on my server but not my schools?

    - by Doug
    I created a captcha just now, and it works PERFECTLY on my own server. On the school's server, it doesn't generate an image. Why might this be? The difference in code is one line. *Edit:*Originally, it was working, but I deleted the directory by mistake and I do not know why did it suddenly work in the first place. Source code on school server: <?php session_save_path("/ichanged/this/path/for/this/post/"); session_start(); $img=imagecreatefromjpeg("bg.jpg"); if( empty($_SESSION['captcha_numbers']) ) { $captcha_numbers = 'error'; } else { $captcha_numbers = $_SESSION['captcha_numbers']; } $image_numbers=$captcha_numbers; $red=rand(100,150); $green=rand(100,255); $blue=rand(100,255); $color=imagecolorallocate($img,255-$red,255-$green,255-$blue); $text=imagettftext($img,12,rand(-7,7),rand(10,20),rand(20,30),$color,"fonts/M04.TTF",$image_numbers); header("Content-type:image/jpeg"); header("Content-Disposition:inline ; filename=secure.jpg"); imagejpeg($img); ?> Source code on my server: <?php session_start(); $img=imagecreatefromjpeg("bg.jpg"); if( empty($_SESSION['captcha_numbers']) ) { $captcha_numbers = 'error'; } else { $captcha_numbers = $_SESSION['captcha_numbers']; } $image_numbers=$captcha_numbers; $red=rand(100,150); $green=rand(100,255); $blue=rand(100,255); $color=imagecolorallocate($img,255-$red,255-$green,255-$blue); $text=imagettftext($img,12,rand(-7,7),rand(10,20),rand(20,30),$color,"fonts/M04.TTF",$image_numbers); header("Content-type:image/jpeg"); header("Content-Disposition:inline ; filename=secure.jpg"); imagejpeg($img); ?>

    Read the article

  • How can I create or assign a method to temp (WindowAdapter)?

    - by Doug Hauf
    I want to create an instance of the WindowAdapter and put my method for windowClosing in it and then sent the temp into the f.addWindowListener(temp) can this be done. Java will not let me create an instance of WindowAdapter like below. WindowAdapter temp = new WindowAdapter(); <-- Does not compile How could this be done? Code: public static void main(String args[]) { setLookFeel(); JFrame f = new JFrame("Hello World Printer..."); WindowAdapter temp; f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); JButton printButton = new JButton("Print Hello World"); printButton.addActionListener(new HelloWorldPrinter()); f.add("Center", printButton); f.pack(); f.setVisible(true); }

    Read the article

  • JavaScript and PHP - A little confused on how to work them together.

    - by Doug
    So right now, I'm just using a basic form to check a password. I want it to check the password and basically remain on page.html so I can use JavaScript to alert incorrect password or something. I'm not really sure how to do that. It seems it would bring me to check.php. I'm not too sure on the whole process, any help appreciated! Thanks! Page.html <form action="check.php" method="post"> <input type="password" name="password" /> <input type="submit" value="Submit" /> </form> check.php <?php $password = $_POST['password']; if ( $password != "testing" ) { die(); } ?>

    Read the article

  • JQuery Div not animating in click function

    - by Doug
    Hi Everyone! I have the following code, I am attempting to have a div animate on a click event, but for some reason the div is immediately moving to the location and it's not animating to the coordinates specified, what am I doing wrong here? code: $(document).ready(function() { $('#example1').click(function(e){ var x = e.pageX - this.offsetLeft; var y = e.pageY - this.offsetTop; $('#example1-xy').html("X: " + x + " Y: " + y); var leftOfShip = x; //var leftOfShip = document.getElementById("ship").style.left + 20; $("#ship").animate({left: $("#ship").css("left",leftOfShip)},5000); }); }); Any Advice would be of help!!

    Read the article

  • JavaScript, iPhone: Repeat Action while Holding Button

    - by Doug
    I am working on a website which I would like to work on iPhones, however I want it so they can tap and hold a button and have it continue firing the onclick event. I got it to work in other browsers, but the iPhone is the only one that will need to hold down the button. Is there a way to repeat a function when holding down the button? Thanks.

    Read the article

  • Is there anything inherently wrong with long variable/method names in Java?

    - by Doug Smith
    I know this is probably is a question of personal opinion, but I want to know what's standard practice and what would be frowned upon. One of my profs in university always seems to make his variable and method names as short as possible (getAmt() instead of getAmount) for instance. I have no objection to this, but personally, I prefer to have mine a little longer if it adds descriptiveness so the person reading it won't have to check or refer to documentation. For instance, we made a method that given a list of players, returns the player who scored the most goals. I made the method getPlayerWithMostGoals(), is this wrong? I toiled over choosing a way to make it shorter for awhile, but then I thought "why?". It gets the point across clearly and Eclipse makes it easy to autocomplete it when I type. I'm just wondering if the short variable names are a piece of the past due to needing everything to be as small as possible to be efficient. Is this still a requirement?

    Read the article

  • Converting serial port data to TCP/IP in a linux environment

    - by Doug
    Thank you in advance. I need to get data from the serial port of a linux system and convert it to TCP/IP to send to a server. Is this difficult to do? I have some basic programming experience but not much experience with Linux. Are there any open source applications that do this? Again thank you for any help.

    Read the article

  • Am I supposed to store hashes for passwords?

    - by Doug
    User System and Passwords: I was looking through MD5 stuff, and I am wondering what is the normal/good practice for passwords. Right now, I think people super encrypt the passwords and store the hashes. If so, how does password checking work? I just have the input password go through the encryption process again and then check the hash with the stored one, correct? This question may contradict the above, but should my salt ever be a randomly generated value?

    Read the article

  • Making a function for selecting from MySQL, how is mine?

    - by Doug
    This is my first time. I will appreciate any thoughts, tips, and what not. How can I improve this? Ultimately, I don't want so many selects in my script. function mysqlSelectCodes($table, $where, $order, $limit) { $sql = "SELECT * FROM $table WHERE $where ORDER BY $order LIMIT $limit" or die(mysql_error()); }

    Read the article

  • How do I make menus like these?

    - by Doug
    So I'm looking at slickdeals.net and amazon.com, and I found something very intriguing. It's basic for most of you guys out there, but it's new to me. For slickdeals.net, when you click login, a login box pops up like so. Also for Amazon.com, when you hover over the left navigational menus, a new menu pops up! I think it's JavaScript, but how does this work? How can I do something like that?

    Read the article

  • Does the for foreach construct in java create a hard or soft copy?

    - by Doug
    Say I have the following piece of java code ArrayList<Double> myList = new Double[100]; for (Double x : myList) x = randomDouble(); Does this actually modify myList or just the dummy variable? I realize I should just try this code segment out, but I think this is the sort of thing I should be able to google or search for on this site, and several queries so far have turned up nothing useful.

    Read the article

  • How to expose information about a running .NET exe?

    - by Doug
    I have a .NET exe that I wrote and it has a couple properties that I made public and want to expose. I want to shell this exe (Process.Start()) and then somehow reference this exe and get access to these public properties. These properties expose information about the running exe. I know how to shell to the exe. And I know how to add a reference to the exe from my project that I want to use this object. But how do I get access to the properties of this running exe? I hope I am explaining myself well. If you do know the answer maybe you could just tell me what the standard method is to expose properties of a running exe to another application at run-time. Thanks for any help!

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21  | Next Page >