Search Results

Search found 2682 results on 108 pages for 'michael rut'.

Page 76/108 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • sqlite3 DELETE problem "Library Routine Called Out Of Sequence"

    - by Michael Bordelon
    Here is my second stupid Noob problem. I am trying to do a simple Delete and I keep blowing up on the prepare step. I already have other Deletes, Inserts, Updates and Selects working. I am sure it is something simple. I appreciate your help. + (void)flushTodaysWorkouts { sqlite3_stmt *statement = nil; //open the database if (sqlite3_open([[BIUtility getDBPath] UTF8String], &database) != SQLITE_OK) { sqlite3_close(database); NSAssert(0, @"Failed to opendatabase"); } NSArray *woList = [self todaysScheduledWorkouts]; for (Workout *wo in woList) { NSInteger woID = wo.woInstanceID; if(statement == nil) { const char *sql = "DELETE FROM IWORKOUT WHERE WOINSTANCEID = ?"; if(sqlite3_prepare_v2(database, sql, -1, &statement, NULL) != SQLITE_OK) NSAssert1(0, @"Error while creating delete statement. '%s'", sqlite3_errmsg(database)); } //When binding parameters, index starts from 1 and not zero. sqlite3_bind_int(statement, 1, woID); if (SQLITE_DONE != sqlite3_step(statement)) NSAssert1(0, @"Error while deleting. '%s'", sqlite3_errmsg(database)); sqlite3_finalize(statement); } if(database) sqlite3_close(database); }

    Read the article

  • Tool to profile php code

    - by Michael
    Looking for some [freeware/opensource] tool in order to make it easy to profile a big php project on win32 platform. Need to find out which part of code is most time consuming. It's hard to manually put timing function for each function, loop...

    Read the article

  • Oracle access from iOS

    - by Michael Lowman
    I'm developing an iPad app that needs read-only access to an Oracle database. Is there any way to do this? As far as I can see, the only options are using OCI, which requires a prebuilt binary in the form of the instant client (and not built for ARM), or OJDBC drivers. Both of these seem to be out of the question. In my research I have discovered that libmysqlclient compiles for arm with minimal tuning. This is a stretch, but is there any possible way to use this to my advantage? I have seen this product providing odbc connectivity through the use of a Windows gateway machine using the ODBC client libraries, but this solution really isn't an option for me at the present time. Any ideas?

    Read the article

  • Scrolbar on a Label

    - by Michael Quiles
    I need to be able to scroll text on a label i am using this for the credits portion of a tic tac toe game. How can I make this happen we've only been taught to scroll through number values in the scrollbar not text. Your help is appreciated. private void xGameCreditsButton_Click(object sender, EventArgs e) { this.xWinnerLabel.BackColor = Color.White; this.xCreditsScrollBar.Visible = true; this.xWinnerLabel.Text = "This game was made possible with the help of: blah bla blah"; }

    Read the article

  • PHP - error when insert date into MySQL

    - by Michael Mao
    Hello everyone: I've got a typical problem when trying to insert a date into MySQL. The column defined in MySQL is of type DATE. My PHP version is 5.3.0 Apart from this date-related issue, the rest of my code works just fine. And this is my PHP script to do this: $tablename = BOOKS_TABLE; $insert = mysql_query("INSERT INTO $tablename (barcode, book_name, volume_num,". " author, publisher, item_type, buy_price, buy_date) VALUES ". "(". "'" . $barcode . "', ". "'" . $bookname . "', ". "'" . $volumenum . "', ". "'" . $author . "', ". "'" . $publisher . "', ". "'" . $itemtype . "', ". "'" . $buyprice . "', ". "'" . getMySQLDateString($buydate). //"'STR_TO_DATE('".$buydate ."', '%d/%m/%Y'))'". //nothing changes in MySQL ")"); And this is the faulty function : function getMySQLDateString($buydate) //typical buydate : 04/21/2009 { $mysqlDateString = date('Y-m-d H:i:s', $strtotime($buydate)); return $mysqlDateString; } The first commented out line wouldn't do anything, the script is executed with no error, however, there is nothing changed in datebase after this. The current approach will cause a Fatal error saying function name must be a string in this line. Actually I followed this thread on SO, but just cannot pass the date into MySQL... Can anyone help me figure out which part is not right? How would you do it, in this case, to get it right? Sorry about such a journeyman-like question, thanks a lot in advance.

    Read the article

  • Need help in using Eclipse JEE version to develop a servlet project

    - by michael
    Hi, I have downloaded eclipse jee version (3.5) and I would like to use it to develop a servlet project on tomcat. So I * install tomcat and add it as my server in my eclipse environment. * create a Dynamic Web Project called 'TestServlet' * create a new servlet called 'MainServlet' and then I deploy my project to the tomcat server via eclipse and 'run the server in debug' mode. But when I use the browser to hit 'http://localhost:8080/TestServlet/MainServlet' I see no resource found (that page is generated by Tomcat, so I know my Tomcat is running). Can you please tell me what am I missing? Or how can I trouble shoot my problem? I think it must be some path /name is not set correctly.

    Read the article

  • How long until programming becomes a professionally certified (and respected as such) skill such as

    - by Michael Campbell
    Given Toyota's recent issues and the ENORMOUS amount of safety that is being relegated to computers, how long do you think it will be before programming, or perhaps programming certain things (embedded transportation software, (air) traffic control, electrical grid, hospital equipment, nuclear plant security, planes, etc.) becomes regulated? And/or, how long before there will be certain regulated certifications before you can call yourself a "software developer", like Architects and Engineers have now? (NB: I'm from the US, so I don't know how it works in other countries; please forgive my ignornace.)

    Read the article

  • Convert Lat/Longs to X/Y Co-ordinates

    - by michael
    I have the Lat/Long value of New York City, NY; 40.7560540,-73.9869510 and a flat image of the earth, 1000px × 446px. I would like to be able to convert, using Javascript, the Lat/Long to an X,Y coordinate where the point would reflect the location. So the X,Y coordinate form the Top-Left corner of the image would be; 289, 111 Things to note: don't worry about issues of what projection to use, make your own assumption or go with what you know might work X,Y can be form any corner of the image Bonus points for the same solution in PHP (but I really need the JS)

    Read the article

  • Rails problem with Delayed_Job and Active Record

    - by Michael Waxman
    I'm using Delayed_Job to grab a Twitter user's data from the API, but it's not saving it in the model for some reason! Please help! (code below) class BandJob < Struct.new(:band_id, :band_username) #parameter def perform require 'json' require 'open-uri' band = Band.find_by_id(band_id) t = JSON.parse(open("http://twitter.com/users/show/#{band_username}.json").read) band.screen_name = t['screen_name'] band.profile_background_image = t['profile_background_image_url'] band.url = 'http://' + band_username + '.com' band.save! end end To clarify, I'm actually not getting any errors, it's just not saving. Here's what my log looks like: * [JOB] acquiring lock on BandJob [4;36;1mDelayed::Job Update (3.1ms)[0m [0;1mUPDATE "delayed_jobs" SET locked_at = '2009-11-09 18:59:45', locked_by = 'host:dhcp128036151228.central.yale.edu pid:2864' WHERE (id = 10442 and (locked_at is null or locked_at < '2009-11-09 14:59:45') and (run_at <= '2009-11-09 18:59:45')) [0m [4;35;1mBand Load (1.5ms)[0m [0mSELECT * FROM "bands" WHERE ("bands"."id" = 34) LIMIT 1[0m [4;36;1mBand Update (0.6ms)[0m [0;1mUPDATE "bands" SET "updated_at" = '2009-11-09 18:59:45', "profile_background_image" = 'http://a3.twimg.com/profile_background_images/38193417/fbtile4.jpg', "url" = 'http://Coldplay.com', "screen_name" = 'coldplay' WHERE "id" = 34[0m [4;35;1mDelayed::Job Destroy (0.5ms)[0m [0mDELETE FROM "delayed_jobs" WHERE "id" = 10442[0m * [JOB] BandJob completed after 0.5448 1 jobs processed at 1.8011 j/s, 0 failed ... Thanks!

    Read the article

  • SSH is looking in the wrong place for the public/private key pair on Windows

    - by Michael Morisy
    I'm trying to configure GIT on my Windows XP machine, but SSH keeps creating and looking for the public/private key pair in non-sensical places, e.g. /.ssh/id_rsa Is there a configuration file in the GIT Installation for Windows where I can switch this to my home directory, or another user defined place? By default, it offers to create new key pairs at //.ssh/id_rsa but that gives me the error "Could not create directory '//.ssh'." And when I'm able to find a directory I can create it in, GIT won't look there.

    Read the article

  • How to get datarow array refering to datatable 's field value with linq

    - by Michael
    I want to use linq to get datarow array from a datatable which its string type ColumnA is not null or depending on its length 0 , so I can get the row index with Indexof() method to deal with something else. ColumnA ColumnB ColumnC A0 B0 C0 Null B1 C1 A2 B2 C2 Null B3 C3 My Linq Statment: DataRow[] rows = myDataTable.Select("ColumnA is not null").Where(row=>row.Field<string>("ColumnA").Length>0); somebody who can help?

    Read the article

  • Changing <object> height and width works in Chrome but not Firefox or IE. Why?

    - by Michael Hopkins
    I am making a site with two Youtube videos. These videos use the raw embed code from Youtube. The site's design doesn't work with any of the default Youtube sizes, so I am writing code to automatically resize the video. Here is my code. There will never be more than these two tags on the page, otherwise I'd do a better job selecting the videos. <script language='JavaScript' type='text/javascript'> var x=document.getElementsByTagName('object'); x.[0].width='350'; x.[0].height='350'; x.[1].width='350'; x.[1].height='350'; </script> For reference, here's a sample default Youtube embed that the code might alter: <object width="480" height="385"> <param name="movie" value="http://www.youtube-nocookie.com/v/zSgiXGELjbc&hl=en_US&fs=1&rel=0"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube-nocookie.com/v/zSgiXGELjbc&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed> </object> In Chrome, the video players sit perfectly in a 350x350 box. In IE and FF (latest versions), the videos are the unchanged, normal size. I cannot find anything in Google that explans why this won't work. I have tried using setattribute, for loops, adjusting both and , single-quotes and double-quotes, etc. Any ideas what is going wrong?

    Read the article

  • Inject a EJB into a JSF converter with JEE6

    - by Michael Bavin
    Hi, I have a stateless EJB that acceses my database. I need this bean in a JSF 2 converter to retreive an entity object from the String value parameter. I'm using JEE6 with Glassfish V3 @EJB annotation does not work and gets a NPE, because it's in the faces context and it has not access to the ejb context. My question is: Is it still possible to Inject this bean (With a @Resource or other annotation, a JNDI lookup,...), or do i need a workaround? Thank you Solution Do a JNDI lookup like this: try { ic = new InitialContext(); myejb= (MyEJB) ic .lookup("java:global/xxxx/MyEJB"); } catch (NamingException e) { e.printStackTrace(); }

    Read the article

  • How to apply patterns when not all team members can follow them

    - by michael moore
    We're going to start a new huge project and while it's in the process of architecting the system, I have certain doubts whether I can apply patterns and be sure they won't be violated by team members. The problem is, not all team members have enough skills to develop asp.net apps let's say using MVP pattern. So maybe this question is addressed to Team leads, or experienced devs. Did you dealt with this kind of situation, and if so what was your solution. I was thinking to create the core by myself, and let 'em start building upon that core, however I'm not sure it will work out.

    Read the article

  • Is there a browser-agnostic way to detect client-side script errors with Watin?

    - by Michael
    We're using WatiN to test our web portals. During the course of an E2E test, we'll occasionally see client-side script errors on the IE status bar. I'd like to chain a handler onto the script error event and record the error for later analysis and bug filing. Problem is, I don't know that there's a global script error event or how to chain into it. And if there's not a browser-agnostic way to accomplish this, I can create MyIE and MyFF subclasses but then this becomes two browser-specific questions. In essence, I'm thinking of something like this entirely made-up call: browser.ScriptEngine.SetCustomErrorHandler(LogScriptingError); ... where LogScriptErrors is my code that does the obvious. Many of our client-side scripting errors don't necessarily prevent the test from continuing (a pretty UI element didn't animate, for example, but the underlying form is still submittable), so I'd like to log the error and forge ahead in most cases.

    Read the article

  • php cURL. preg_match , extract text from xhtml

    - by Michael
    I'm trying to extract the price from the bellow html page/link using php cURL and preg_match . Basically I'm expecting for this code to output 4,550 but for some reasons I get Notice: Undefined offset: 1 in C:\wamp\www\test.php on line 22 I think that the pattern is correct because if I put the html itself in a variable and escape the "" it works ! . Also if I output (echo $result;) it displays the html properly grabbed from foxtons website so I just can't figure it out why the whole thing doesn't work . I need to make this work and also I would appreciate if you would tell me why is that notice generated and why my current script doesn't work. $url = "http://www.foxtons.co.uk/search?bedrooms_from=0&property_id=727717"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); curl_exec($ch); curl_close($ch); $result2 = str_replace('"', '\"', $result); $tagname1= ");<\/script "; $tagname2= "<\/noscript per month<\/a"; $pattern = "/$tagname1(.*?)$tagname2/"; preg_match($pattern, $result, $matches); $prices = $matches[1]; print_r($prices); ?

    Read the article

  • I'm trying to run a command using WMI.

    - by MIchael Burns
    This is my code: a button is clicked and the text in a textbox is taken for the remotePC. I can run it locally but when I try to run it remotely it will not work, I think it has something to do with using WMI to run a shared file? public void IPXFER(string RemotePC) { object[] theProcessToRun = { @"\\network-share\ipxfer\ipxfer.exe -s corp-trend -p 1234 -m 1 -c 12345" }; ConnectionOptions theConnection = new ConnectionOptions(); theConnection.Impersonation = ImpersonationLevel.Impersonate; theConnection.EnablePrivileges = true; ManagementScope theScope = new ManagementScope("\\\\" + RemotePC + "\\root\\cimv2", theConnection); ManagementClass theClass = new ManagementClass(theScope, new ManagementPath("Win32_Process"), new ObjectGetOptions()); theClass.InvokeMethod("Create", theProcessToRun); }

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >