Daily Archives

Articles indexed Sunday April 11 2010

Page 9/79 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • DBD::SQLite::st execute failed: datatype mismatch

    - by Barton Chittenden
    Here's a snippit of perl code: sub insert_timesheet { my $dbh = shift; my $entryref = shift; my $insertme = join(',', @_); my $values_template = '?, ' x scalar(@_); chop $values_template; chop $values_template; #remove trailing comma my $insert = "INSERT INTO timesheet( $insertme ) VALUES ( $values_template );"; my $sth = $dbh->prepare($insert); debug("$insert"); my @values; foreach my $entry (@_){ push @values, $$entryref{$entry} } debug("@values"); my $rv = $sth->execute( @values ) or die $dbh->errstr; debug("sql return value: $rv"); $dbh->disconnect; } The value of $insert: [INSERT INTO timesheet( idx,Start_Time,End_Time,Project,Ticket_Number,Site,Duration,Notes ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? );] Here are @values: [null '1270950742' '1270951642' 'asdf' 'asdf' 'adsf' 15 ''] Here's the schema of 'timesheet' timesheet( idx INTEGER PRIMARY KEY AUTOINCREMENT, Start_Time VARCHAR, End_Time VARCHAR, Duration INTEGER, Project VARCHAR, Ticket_Number VARCHAR, Site VARCHAR, Notes VARCHAR) Here's how things line up: ---- Insert Statement Schema @values ---- idx idx INTEGER PRIMARY KEY AUTOINCREMENT null: # this is not a mismatch, passing null will allow auto-increment. Start_Time Start_Time VARCHAR '1270950742' End_Time End_Time VARCHAR '1270951642' Project Project VARCHAR 'asdf' Ticket_Number Ticket_Number VARCHAR 'asdf' Site Site VARCHAR 'adsf' Duration Duration INTEGER 15 Notes Notes VARCHAR '' ... I can't see the data-type mis-match.

    Read the article

  • Poping multiple levels in UITableViewController

    - by LavaSlider
    I would like to be able to pop multiple views from a UITableViewController stack. For example in the Apple DrillDownSave example, when viewing Level 3 to go back to Level 1 or when viewing an Item to go back to Level 2 when a button is pushed. I tried: [self.navigationController.parentViewController.navigationController popViewControllerAnimated: NO]; [self.navigationController popViewControllerAnimated: NO]; and [self.navigationController popViewControllerAnimated: NO]; [self.navigationController.parentViewController.navigationController popViewControllerAnimated: NO]; but these leave me the same place as just a single popViewControllerAnimated:. Is there an easy way to do this?

    Read the article

  • grails datepicker

    - by Srinath
    Hi, I'm using g:datePicker name="date1" id="date1" value="${program?.startDate}" In controller when used params.date1 it is showing value as "struct" and unable to save date in my database. How can we parse date in to one param like eg: 2010-10-10 11:11:11 using datePicker ? thanks in advance srinath

    Read the article

  • C - how to get fscanf() to determine whether what it read is only digits, and no characters

    - by hatorade
    Imagine I have a csv with and each value is an integer. so the first value is the INTEGER 100. I want fscanf() to read this line, and either tell me it's an integer ONLY, or not. So, it would pass 100 but fail on 100t. What i've been trying to get work is "%d," where the comma is the delimiter of my CSV. so the whole function is fscanf(fp, "%d,", &count) Unfortunately, this fails to fail on '100t,' works on '100' and works on 't'. so it just isn't distinguishing between 100 and 100t (all of these numbers are followed by commas, of course

    Read the article

  • Why is only 2 of my querys working? (PHP/Mysql)

    - by ggfan
    When I remove a posting, I want it to remove the posting itself, any comments related to it, and like/dislike of the comments, and favorites that people added. So there are 4 queries that do this, but somehow only 2 of the 4 are working. When I switch say query 2 for query 3, then query 2 works and query 3 doesn't... The table names are correct and it is getting the data via $_GET. // Grab the data from the GET $posting_id = $_GET['posting_id']; // Delete the posting from the database $query = "DELETE FROM posting WHERE posting_id=$posting_id LIMIT 1"; mysqli_query($dbc, $query) or die(mysql_error()); // Delete the comments $query2 = "DELETE FROM comments WHERE posting_id=$posting_id "; mysqli_query($dbc, $query2) or die(mysql_error()); // Delete the like/dislike $query3 = "DELETE FROM comment_likedislike WHERE posting_id=$posting_id "; mysqli_query($dbc, $query3) or die(mysql_error()); // Delete the favorites $query4 = "DELETE FROM favorite WHERE posting_id=$posting_id "; mysqli_query($dbc, $query4) or die(mysql_error());

    Read the article

  • android call log like design

    - by Alxandr
    I'm trying to create a design for a list that looks like (and mostly behaves like) the call log, like shown here: I don't need all the design, but what I'm trying to achieve is the two-columned design with the splitter in-between, and the behavior that if I click on the main item (the left part) one thing happens (in this case, you open some details about the call), and if you press the outer right part something else happens (you call the contact). I'm pretty new to android, but I've managed to do most of the designs I wanted so far, so I don't need the entire layout for this one, only the part that does the splitting and the splitter. And if possible it would be nice to know how to map the clicks appropriately, though I think I might be able to find that out by my self.

    Read the article

  • CakePHP: Why does adding 'Security' component break my app?

    - by Steve
    I have a strange problem -- of my own making -- that's cropped up, and is driving me crazy. At some point, I inadvertently destroyed a file in the app/tmp directory...I'm not sure which file. But now my app breaks when I include the "Security" component, and works just fine when it's not included. I'm thinking it might be related to the Security.salt value somehow, or possibly to the saved session info, but I don't really have a deep enough knowledge of CakePHP to figure it out. Can anyone offer any insight here?

    Read the article

  • Why does Java tell me my applet contains both signed and unsigned code?

    - by JohnCooperNZ
    My signed Java applet has been running fine until Java update 19. Now some but not all of our users on Java Update 19 report a java security message stating that our applet contains both signed and unsigned code. The process for creating our applet is as follows: 1: Clean and Build the applet project in Netbeans IDE. 2: Open the Applet jar file in WinRAR and add the required mysql JDBC driver .class files to the jar file. 3: Sign the applet jar file. Can someone please tell me how to determine what code is signed and what code is not signed in our applet? Is there a better way to include the mysql JDBC driver jar file in our applet other than copying the jar file contents into our applet jar file? Thanks

    Read the article

  • Popping multiple levels in UITableViewController

    - by LavaSlider
    I would like to be able to pop multiple views from a UITableViewController stack. For example in the Apple DrillDownSave example, when viewing Level 3 to go back to Level 1 or when viewing an Item to go back to Level 2 when a button is pushed. I tried: [self.navigationController.parentViewController.navigationController popViewControllerAnimated: NO]; [self.navigationController popViewControllerAnimated: NO]; and [self.navigationController popViewControllerAnimated: NO]; [self.navigationController.parentViewController.navigationController popViewControllerAnimated: NO]; but these leave me the same place as just a single popViewControllerAnimated:. Is there an easy way to do this?

    Read the article

  • Converting dynamic to basic disk

    - by Josip Medved
    I converted basic disk to dynamic on my laptop. However, now I cannot install Windows 7 on another partition. I just get message that installing them on dynamic disk is not supported. Is there a way to convert dynamic disk to basic without losing data on already existing partition?

    Read the article

  • Going from small to medium sized websites.

    - by Landitus
    I've been coding websites for a couple of years now, mostly in php and xhtml. I come from the design world, but I'm proud of doing standart compliant websites and great interfaces. Also used Wordpress and loved it. Most of the time there were really simple commercial websites, with no database included, where everything is done from scratch. Every page is parsed through an index?page=xxx and But I have a few prospects that are larger websites (let's call them 'medium sized websites') where I feel I'm lacking the following: How to dispach or render the pages (MVC controller instead of index?page=???) Proper page hierarchy and easy breadcrumbs implementation Auto generation of navigation menu, or an easy way to maintain them? Clean URLs Form validation Easy database support I really don't know if I should be looking into php scripts, and refine my skills or get into a CMS (like drupal) or a PHP framework. I found Wordpress very assuring and didn't feel trapped into crazy conventions, but I feel is not the right tool for this. I hate the CMS Page with the big textbox as I am used to code every page by hand my pages are not a title and a textbox. Got the feeling? My php skills are sort of medium/low still, but I would like to hear some thoughts of what I should learn to take the next step!

    Read the article

  • Keep Windows Mobile 6 phone alive in C#

    - by QAH
    Hello! I am making an application for Windows Mobile 6.1 Pocket PC (Touchscreen). I know when a Pocket PC's screen turns off, it goes into a standby mode and applications are pretty much halted in the background. My application can't do that. It needs to keep going. So my question is, how can I keep the phone alive (backlight turned on) until my application is done? An example of this would be video streaming applications such as Youtube. It keeps the phone on while the video is playing. Thanks

    Read the article

  • Getting Permissions error while using stream.publish method of facebook API

    - by tek3
    Hi I want to publsh a post on user's wall but am getting this "permission error" error code 200 when trying to use stream.publish method of facebook api...i hve requested for extended permissions as: http://m.facebook.com/login.php?api%5Fkey="+API_KEY&....&req_perms=read_stream,publish_stream,offline_access but when i make call to the method stream.publish i am getting this permission error..it seems that req_perms in above url is simply getting ignored.. i am passing "method(stream.publish)","api_key","message","session_key","v","sig" as parametres to url http://api.facebook.com/restserver.php? will be greatful if anyone helps meout in this problem or provide me with proper steps for publishing a post on user's wall...the application is being developed on blackbery platform..

    Read the article

  • Overriding an abstract method of base class

    - by jess
    Hi, I have an abstract class with some methods,including an abstract method(Execute()).This method is overridden in child class.Now, an event is raised(somewhere in application),and for this event there is a handler in base class.And,in this handler,I call Execute. Now, the method of chilobject is executed.I am bit confused,how this works under the hood?

    Read the article

  • Where can I find a good XMPP (Jabber) tutorial?

    - by amerninja13
    Where can I find a good XMPP (Jabber) tutorial with detailed information on the XML that's sent to/from a Jabber client and server. I've looked at the xmpp.org website, but what they show there is confusing and doesn't help me learn. I want to write an XMPP client in C# that uses a TcpClient to connect to the server and send/receive XML data.

    Read the article

  • Installing virtualenvwrapper

    - by pocoa
    I've installed virtualenv and virtualenvwrapper on Windows using easy_install. But mkvirtualenv is missing. I tried to search on my machine but I couldn't find it. I don't know how to solve it. Do you have any idea?

    Read the article

  • Best Guide To Doing On Page SEO

    If you want your website to start dominating the search engines for certain keywords, the first step is doing On Page SEO. The fact is that if your own website is not correctly optimised for keywords... [Author: Martin Sejas - Web Design and Development - April 10, 2010]

    Read the article

  • Different Directives for Dot NET

    Directives are those that are responsible for any kind of change in the settings that decide the actions of an entire page. They are language specific and for .NET they function as settings of the pa... [Author: Jessica Woodson - Web Design and Development - April 10, 2010]

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >