Search Results

Search found 148 results on 6 pages for 'josten moore'.

Page 5/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • mysql_affected_rows() returns 0 for UPDATE statement even when an update actually happens

    - by Alex Moore
    I am trying to get the number of rows affected in a simple mysql update query. However, when I run this code below, PHP's mysql_affected_rows() always equals 0. No matter if foo=1 already (in which case the function should correctly return 0, since no rows were changed), or if foo currently equals some other integer (in which case the function should return 1). $updateQuery = "UPDATE myTable SET foo=1 WHERE bar=2"; mysql_query($updateQuery); if (mysql_affected_rows() > 0) { echo "affected!"; } else { echo "not affected"; // always prints not affected } The UPDATE statement itself works. The INT gets changed in my database. I have also double-checked that the database connection isn't being closed beforehand or anything funky. Keep in mind, mysql_affected_rows doesn't necessarily require you to pass a connection link identifier, though I've tried that too. Details on the function: mysql_affected_rows Any ideas? SOLUTION The part I didn't mention turned out to be the cause of my woes here. This PHP file was being called ten times consecutively in an AJAX call, though I was only looking at the value returned on the last call, ie. a big fat 0. My apologies!

    Read the article

  • How to avoid nested functions when using AJAX?

    - by Fletcher Moore
    Sequential Asynchronous calls are gross. Is there a more readable solution? The problem is this is hard to follow: ajaxOne(function() { // do something ajaxTwo(function() { // do something ajaxThree() }); }); where the anonymous functions are callbacks that are called on server response. I'm using a third party API to make the AJAX calls, so I need a generic solution.

    Read the article

  • vbsript and excel delete all worksheets except last one

    - by matthew moore
    I am trying to delete all worksheet in excel exept last one and save it then move its location. I can not get it took work as it deletes all other worksheets but errors out with and out of range error. Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True objExcel.DisplayAlerts = False Set objWorkbook = objExcel.Workbooks.Open("C:\M-tek 10-31-12_Tony.xlsx") i = objWorkbook.Worksheets.Count Do while i = i i = i - 1 objWorkbook.Worksheets(i).Delete Loop

    Read the article

  • Is there any difference between var name = function() {} & function name() {} in Javascript?

    - by Fletcher Moore
    Suppose we are inside a function and not in the global namespace. function someGlobalFunction() { var utilFunction1 = function() { } function utilFunction2 () { } utilFunction1(); utilFunction2(); } Are these synonymous? And do these functions completely cease to exist when someGlobalFunction returns? Should I prefer one or the other for readability or some other reason?

    Read the article

  • Android onFling not responding

    - by Kevin Moore
    I am new to android first of all so think of any newbie mistakes first I am trying to add a fling function in my code. public class MainGamePanel extends SurfaceView implements SurfaceHolder.Callback, OnGestureListener { private MainThread thread; private Droid droid; private Droid droid2; private static final String TAG = gameView.class.getSimpleName(); private GestureDetector gestureScanner; public MainGamePanel(Context context){ super(context); getHolder().addCallback(this); droid = new Droid(BitmapFactory.decodeResource(getResources(), R.drawable.playerbox2), 270, 300); droid2 = new Droid(BitmapFactory.decodeResource(getResources(), R.drawable.playerbox2), 50, 300); thread = new MainThread(getHolder(), this); setFocusable(true); gestureScanner = new GestureDetector(this); } public boolean onTouchEvent(MotionEvent event){ return gestureScanner.onTouchEvent(event); } @Override protected void onDraw(Canvas canvas){ canvas.drawColor(Color.BLACK); droid.draw(canvas); droid2.draw(canvas); } @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { droid.setX(50); droid.setY(50); Log.d(TAG, "Coords: x=" + e1.getX() + ",y=" + e2.getY()); return true; } @Override public boolean onDown(MotionEvent e) { droid2.setX((int)e.getX()); droid2.setY((int)e.getY()); Log.d(TAG, "Coords: x=" + e.getX() + ",y=" + e.getY()); return false; } I got the gestureListener to work with: onDown, onLongPress, and onShowPress. But i can't get any response with onFling, onSingleTapUp, and onScroll. What mistake am I making? does it have to do with views? I don't know what code would be useful to see.... so any suggestions would be much appreciated. Thank You!

    Read the article

  • Should comments say WHY the program is doing what it is doing? (opinion on a dictum by the inventor of Forth)

    - by AKE
    The often provocative Chuck Moore (inventor of the Forth language) gave the following advice (paraphrasing): "Use comments sparingly. Programs are self-documenting, with a modicum of help from mnemonics. Comments should say WHAT the program is doing, not HOW." My question: Should comments say WHY the program is doing what it is doing? Update: In addition to the answers below, these two provide additional insight. Beginner's guide to writing comments? http://programmers.stackexchange.com/a/98609/62203

    Read the article

  • "Half of everything you know will be obsolete in 18-24 months" = ( True, or False? )

    - by blunders
    Just ran across this, and wondering if anyone has a way to prove or disprove this statement: Something to keep in mind ... what's the half-life of knowledge in high tech? It tracks with Moore's Law: half of everything you know will be obsolete in 18-24 months. SOURCE: Within answer by Craig Trader to this question "What is the single most effective thing you did to improve your programming skills?"

    Read the article

  • Aligning music notes using String matching algorithms or Dynamic Programming

    - by Dolphin
    Hi I need to compare 2 sets of musical pieces (i.e. a playing-taken in MIDI format-note details extracted and saved in a database table, against sheet music-taken into XML format). When evaluating playing against sheet music (i.e.note details-pitch, duration, rhythm), note alignment needs to be done - to identify missed/extra/incorrect/swapped notes that from the reference (sheet music) notes. I have like 1800-2500 notes in one piece approx (can even be more-with polyphonic, right now I'm doing for monophonic). So will I have to have all these into an array? Will it be memory overloading or stack overflow? There are string matching algorithms like KMP, Boyce-Moore. But note alignment can also be done through Dynamic Programming. How can I use Dynamic Programming to approach this? What are the available algorithms? Is it about approximate string matching? Which approach is much productive? String matching algos like Boyce-Moore, or dynamic programming? How can I assess which is more effective? Greatly appreciate any insight or suggestions Thanks in advance

    Read the article

  • need to print 5 column list in alpha order, vertically

    - by Brad
    Have a webpage that will be viewed by mainly IE users, so CSS3 is out of the question. I want it to list like: A D G B E H C F I Here is the function that currently lists like: A B C D E F G H I function listPhoneExtensions($group,$group_title) { $adldap = new adLDAP(); $group_membership = $adldap->group_members(strtoupper($group),FALSE); sort($group_membership); print " <a name=\"".strtolower($group_title)."\"></a> <h2>".$group_title."</h2> <ul class=\"phone-extensions\">"; foreach ($group_membership as $i => $username) { $userinfo = $adldap->user_info($username, array("givenname","sn","telephonenumber")); $displayname = "<span class=\"name\">".substr($userinfo[0]["sn"][0],0,9).", ".substr($userinfo[0]["givenname"][0],0,9)."</span><span class=\"ext\">".$userinfo[0]["telephonenumber"][0]."</span>"; if($userinfo[0]["sn"][0] != "" && $userinfo[0]["givenname"][0] != "" && $userinfo[0]["telephonenumber"][0] != "") { print "<li>".$displayname."</li>"; } } print "</ul><p class=\"clear-both\"><a href=\"#top\" class=\"link-to-top\">&uarr; top</a></p>"; } Example rendered html: <ul class="phone-extensions"> <li><span class="name">Barry Bonds</span><span class="ext">8281</span></li> <li><span class="name">Gerald Clark</span><span class="ext">8211</span></li> <li><span class="name">Juan Dixon</span><span class="ext">8282</span></li> <li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li> <li><span class="name">Freddie Flank</span><span class="ext">2281</span></li> <li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li> <li><span class="name">Kim Moore</span><span class="ext">5767</span></li> <li><span class="name">Barry Bonds</span><span class="ext">8281</span></li> <li><span class="name">Gerald Clark</span><span class="ext">8211</span></li> <li><span class="name">Juan Dixon</span><span class="ext">8282</span></li> <li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li> <li><span class="name">Freddie Flank</span><span class="ext">2281</span></li> <li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li> <li><span class="name">Kim Moore</span><span class="ext">5767</span></li> <li><span class="name">Barry Bonds</span><span class="ext">8281</span></li> <li><span class="name">Gerald Clark</span><span class="ext">8211</span></li> <li><span class="name">Juan Dixon</span><span class="ext">8282</span></li> <li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li> <li><span class="name">Freddie Flank</span><span class="ext">2281</span></li> <li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li> <li><span class="name">Kim Moore</span><span class="ext">5767</span></li> </ul> Any help is appreciated to getting it to list alpha vertically.

    Read the article

  • Google I/O 2012 - Maps for Good

    Google I/O 2012 - Maps for Good Rebecca Moore, Dave Thau Developers are behind many cutting-edge map applications that make the world a better place. In this session we'll show you how developers are using Google Earth Builder, Google Earth Engine, Google Maps API and Android apps for applications as diverse as ethno-mapping of indigenous cultural sites, monitoring deforestation of the Amazon and tracking endangered species migrations around the globe. Come learn about how you can partner with a non-profit to apply for a 2012 Developer Grant and make a positive impact with your maps. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 739 7 ratings Time: 54:23 More in Science & Technology

    Read the article

  • Dartisans Ep. 7 - Dart news and special guests

    Dartisans Ep. 7 - Dart news and special guests In this episode of Dartisans, we talk to Kevin Moore and Bob Nystrom about the latest language changes as Dart heads to M1. We'll also chat about Dart's package manager and Kevin's proposed package structure. If we're lucky, we'll get a sneak peek at the Seattle Dart Hackathon (on July 14th) and Bob's Dart talk at OSCON. Learn more at www.dartlang.org From: GoogleDevelopers Views: 211 12 ratings Time: 42:04 More in Science & Technology

    Read the article

  • Verizon Business Delivers New Sales and Support Tools

    - by michael.seback
    Verizon Business Delivers New Sales and Support Tools and Improves System Performance by 35% Verizon Business, a unit of Verizon Communications, is a global leader in communications and IT solutions. With one of the world's most connected internet protocol networks, Verizon Business delivers communications, IT, security, and network solutions to many of the largest businesses and governments. ..."Our work with Accenture to upgrade our Oracle systems has improved system performance significantly. In a recent survey, 84% of users said performance was 'faster' or 'much faster.' Plus, our sales and support staff have new tools to improve productivity and customer service, which ultimately drives customer retention and revenue." - Rob Moore, Director Verizon Business ...Read more.

    Read the article

  • Can this word search algorithm be made faster?

    - by Ashwin Singh
    Problem: Find a match of word S in text T Given: S and T are part of spoken and written English. Example: Match 'Math' in 'I love Mathematics' NOTE: Ignore CASES. My algorithm: STEP 1) Convert S, T to char[] STEP 2) for i=0, i < T.length , i++ STEP 3) for j=S.length-1, j>0 , j-- STEP 3 is the magic, instead of going about matching M,A,T,H, this matches M, H, T and finally A. This helps in eliminating a lot of possible partial matches. For example, if I go sequentially like M A as in Boyer Moore's method ... it can match Matter, Mass, Matchstick etc. using M _ _ H will bring down size of partial matches. STEP 4) if S[j]!=T[i] -> break; else if j==i -> PRINT MATCH

    Read the article

  • Mercury and Sound Waves [Video]

    - by Jason Fitzpatrick
    In this video a tone generator is used to shoot specific frequencies through a large drop of mercury which results in a wide array of unique shapes and patterns created by standing waves–but really, you need to see it to appreciate it. The experiment, put together by Nick Moore, combines a glass dish, a drop of mercury, and a old tone generator to demonstrate standing waves in 3D. Check out the video above to see the experiment in full speed or hit up his YouTube channel to see a remix with music (and other cool science experiment videos). Mercury Hz [via Mental_Floss] How to Use an Xbox 360 Controller On Your Windows PC Download the Official How-To Geek Trivia App for Windows 8 How to Banish Duplicate Photos with VisiPic

    Read the article

  • Dartisans ep 14 - Dart Community Demos

    Dartisans ep 14 - Dart Community Demos The #dartlang community has been busy! You'll meet some members of the Dart community and see demos of their latest projects. Also, learn how an open-source contributor gained committer status for Dart! As always, ask and vote for questions for Dart engineers and community members. Meet +Kevin Moore, +Alexander Aprelev, and +John McCutchan show off their libraries and projects. You might just see WebGL, dart2js, and BOT in action. Ask questions here: developers.google.com Learn more about Dart at www.dartlang.org From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Science & Technology

    Read the article

  • What should NOT be included in comments? (opinion on a dictum by the inventor of Forth)

    - by AKE
    The often provocative Chuck Moore (inventor of the Forth language) gave the following advice (paraphrasing): "Use comments sparingly. Programs are self-documenting, with a modicum of help from mnemonics. Comments should say WHAT the program is doing, not HOW." My question: Should comments say WHY the program is doing what it is doing? Update: In addition to the answers below, these two provide additional insight. 1: Beginner's guide to writing comments? 2: http://programmers.stackexchange.com/a/98609/62203

    Read the article

  • Regex one-to-one mapping pattern replace

    - by polygenelubricants
    How would you use regex to write a function that replaces all lowercase letters with uppercase and vice versa? Note: this is NOT a homework question. See also my previous explorations of regex: Regex split into overlapping strings (Alan Moore's answer is especially instructive) Can you use zero-width matching regex in String split? (my solution exploits a known Java regex bug with regards to non-obvious length lookbehind!)

    Read the article

  • String searching algorithm for Chinese characters.

    - by Jack Low
    There are Python code available for existing algorithms for normal string searching e.g. Boyer-Moore Algorithm. I am looking to use this on Chinese characters and it doesn't seem like the same implementation would work. What would I go about doing in order to make the algorithm work on Chinese characters? I am referring to this: http://en.literateprograms.org/Boyer-Moore_string_search_algorithm_(Python)#References

    Read the article

  • Creating a folder named after the current date and time

    - by lowerkey
    I'm trying to create a powershell script that creates a new folder with the current date (formatted as yyyy-MM-dd) as a name. Here's what I have so far: PS C:\Users\me\Desktop> powershell.exe -command "new-item ($(get-location) + (Get-Date).year + "-" + (Get-Date).month + "-" + (Get-Date).day) -type directo ry" Die Benennung "C:\Users\me\Desktop" wurde nicht als Name eines Cmdlet, ein er Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überp rüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern ent halten), und wiederholen Sie den Vorgang. Bei Zeile:1 Zeichen:35 + new-item (C:\Users\me\Desktop <<<< + (Get-Date).year + - + (Get-Date). month + - + (Get-Date).day) -type directory + CategoryInfo : ObjectNotFound: (C:\Users\j.moore\Desktop:String ) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

    Read the article

  • Parallelism in .NET – Introduction

    - by Reed
    Parallel programming is something that every professional developer should understand, but is rarely discussed or taught in detail in a formal manner.  Software users are no longer content with applications that lock up the user interface regularly, or take large amounts of time to process data unnecessarily.  Modern development requires the use of parallelism.  There is no longer any excuses for us as developers. Learning to write parallel software is challenging.  It requires more than reading that one chapter on parallelism in our programming language book of choice… Today’s systems are no longer getting faster with each generation; in many cases, newer computers are actually slower than previous generation systems.  Modern hardware is shifting towards conservation of power, with processing scalability coming from having multiple computer cores, not faster and faster CPUs.  Our CPU frequencies no longer double on a regular basis, but Moore’s Law is still holding strong.  Now, however, instead of scaling transistors in order to make processors faster, hardware manufacturers are scaling the transistors in order to add more discrete hardware processing threads to the system. This changes how we should think about software.  In order to take advantage of modern systems, we need to redesign and rewrite our algorithms to work in parallel.  As with any design domain, it helps tremendously to have a common language, as well as a common set of patterns and tools. For .NET developers, this is an exciting time for parallel programming.  Version 4 of the .NET Framework is adding the Task Parallel Library.  This has been back-ported to .NET 3.5sp1 as part of the Reactive Extensions for .NET, and is available for use today in both .NET 3.5 and .NET 4.0 beta. In order to fully utilize the Task Parallel Library and parallelism, both in .NET 4 and previous versions, we need to understand the proper terminology.  For this series, I will provide an introduction to some of the basic concepts in parallelism, and relate them to the tools available in .NET.

    Read the article

  • Leaving Microsoft

    - by Stephen Walther
    After two and a half years working with the ASP.NET team, I’ve decided that this is the right time to leave Microsoft and, with the help of some friends, re-launch my ASP.NET training and consulting company. The company has the modest name Superexpert. While working on my Ph.D. at MIT, I was surrounded by professors and students who were passionate about knowledge. During the Internet boom, I was lucky enough to work side-by-side with some very smart and hard-working people to create several successful startups. However, the people I worked with at Microsoft were among the smartest and hardest working. Microsoft hires a small number of people and gives them huge responsibilities. It continues to amaze me that so few people work on the ASP.NET team when you consider how much the team produces. I had the opportunity to work with a number of inspiring people at Microsoft. I’ll miss working with Scott Hunter, Dave Reed, Boris Moore, Eilon Lipton, Scott Guthrie, James Senior, Jim Wang, Phil Haack, Damian Edwards, Vishal Joshi, Mike Pope, Jon Young, Dmitry Robsman, Simon Calvert, Stefan Schackow, and many others. I’m proud of what we accomplished while I was working at Microsoft. We reached out to the jQuery team and changed direction from Microsoft Ajax to jQuery. We successfully contributed several important new features to the open-source jQuery project including jQuery Templates, jQuery Data-Linking, jQuery Globalization, and (as John Resig announced at the last jQuery conference) jQuery Require. I’m looking forward to returning to training and consulting. We want to focus on providing consulting on the “right way” of building ASP.NET websites, which we call Modern ASP.NET applications. By Modern ASP.NET applications, I mean applications built with ASP.NET MVC, jQuery, HTML5, and Visual Studio ALM. Additionally, we want to help companies that have existing ASP.NET Web Forms applications migrate to ASP.NET MVC. If you are interested in having us provide training for your company or you need help building a custom ASP.NET application then please contact us at [email protected] or visit our website at Superexpert.com.

    Read the article

  • ArchBeat Link-o-Rama for 11/30/2011

    - by Bob Rhubart
    Coding - the new Latin | @BBCRoryCJ BBC Technology Correspondent Rory Cellan-Jones reports on why "the campaign to boost the teaching of computer skills - particularly coding - in schools is gathering force." BPM Business Value Patterns | SOA Partner Community Blog Juergen Kress shares the presentation he and Matthias Ziegler from Accenture delivered at the SOA & BPM Integration Days event in Germany in October. Coherence 3.7.1 Resources Busy blogger Juergen Kress shares links to screencasts and other resources for those interested in Oracle Coherence 3.7.1. OBIEE 11.1.1 - Introduction to OBIEE 11g Full Sample App "The OBIEE 11g Full Sample App (FSA) is a comprehensive collection of examples designed to demonstrate the latest Oracle BIEE 11g capabilities and design best practices." Solaris 11 Customer Maintenance Lifecycle | Gerry Haskins Gerry Haskins launches a new blog devoted to Solaris "policies, best practices, clarifications, and lots of other stuff." Harnessing Business Events for Predictive Decision Making - part 1 / 3 | Sanjeev Sharma "Data growth is outpacing storage capacity by a factor of two and computing power is still very much bounded by Moore's Law, doubling only every 18 months," says Sanjeev Sharma. The Latest Research from the SEI | Douglas C. SchmidtSchmidt shares information on several recently published Software Engineering Institute (SEI) technical reports that "highlight the latest work of SEI technologists in Agile methods, insider threat,the SMART Grid Maturity Model, acquisition, and CMMI." Tiger/Line Shape Files and Oracle | Bradley D. Brown "Have you ever needed to load an ESRI "shape file" and wondered if that's an easy effort or a difficult effort? I know I have and I assumed that it was a pretty difficult effort. However, I learned today that's actually pretty easy!" -- Oracle ACE Director Bradley Brown of TUSC. Webcast: Enterprise Clouds with Oracle VM Tuesday, December 6, 2011, 9:00 am PT / Noon ET. Featuring Adam Hawley (Senior Director of Product Management, Oracle) and Dan Herrup (Principal Systems Engineer, Oracle Corporate Citizenship). SOA Made Simple; Architects in AZ; Cloud Migration Introduction This week on the Architect Home Page on OTN.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >