Search Results

Search found 1503 results on 61 pages for 'timestamp'.

Page 32/61 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Recursive SQL giving ORA-01790

    - by PenFold
    Using Oracle 11g release 2, the following query gives an ORA-01790: expression must have same datatype as corresponding expression: with intervals(time_interval) AS (select trunc(systimestamp) from dual union all select (time_interval + numtodsinterval(10, 'Minute')) from intervals where time_interval < systimestamp) select time_interval from intervals; The error suggests that the datatype of both subqueries of the UNION ALL are returning different datatypes. Even if I cast to TIMESTAMP in each of the subqueries, then I get the same error. What am I missing?

    Read the article

  • date() is showing December 1969

    - by Doug
    $sql = "SELECT * FROM news ORDER BY `news_id` DESC LIMIT 1"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result); $date = $row['time_posted']; echo "<i> " .date("Y/m/d", $date) . "</i>: "; I used timestamp in mysql. So, what's the problem?

    Read the article

  • Is it possible to make WebLogic check REDEPLOY file more often?

    - by doublep
    [sorry for apparent shouting in the title, it's just that the file is named in all uppercase] Given advice in http://stackoverflow.com/questions/2695124 I successfully implemented and have been using autodeployment in WebLogic. This works great, but a tad too slow to my tastes, it seems like about 10 seconds pass between touching REDEPLOY file and WebLogic's start of redeployment. Is there any way I can instruct WebLogic to test timestamp on that file more often?

    Read the article

  • Updatable false behvior incosistent

    - by jpanewbie
    I need LastUpdatedDttm to be updated by SYSDATE whenever record is updated. But below annoataions do nt work as desired. SYSDATE is inserted only once and not updated for subsequent updations. Also, lastUpdDTTM is not part of sql generated by hibernate. @Generated(GenerationTime.ALWAYS) @Column(name="LAST_UPDATED_DTTM",insertable=false,updatable=true, columnDefinition ="timestamp default SYSDATE") private Date lastUpdDTTM; @Generated(GenerationTime.ALWAYS) @Column(name="CREATED_DTTM", insertable=false, updatable=false) private Date createdDTTM;

    Read the article

  • Formatting Timestamps in Java

    - by Craig H
    Is there a way to format a UTC time into any arbitrary string format I want in java? Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me. Is there a way to do this?

    Read the article

  • mysql datetime performance

    - by praksant
    Hi, since in mysql datetime field is represented as string (i'm not sure how it works internally), wouldn't be from performance point of view faster to store date as unix timestamp? I don't need to use any mysql native date functions, i'm going for performance of sorting and selecting data. if there was an index for that column, would be difference between int and datetime? Thank you

    Read the article

  • Default encoding type for wsHttp binding

    - by user102533
    My understanding was that the default encoding for wsHttp binding is text. However, when I use Fiddler to see the SOAP message, a part of it looks like this: <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><a:Action s:mustUnderstand="1" u:Id="_2">http://tempuri.org/Services/MyContract/GetDataResponse</a:Action><a:RelatesTo u:Id="_3">urn:uuid:503c5525-f585-4ecd-ac09-24db78526952</a:RelatesTo><o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="uuid-8935f789-fbb7-4c69-9f67-7708373088c5-22"><u:Created>2010-03-08T19:15:50.852Z</u:Created><u:Expires>2010-03-08T19:20:50.852Z</u:Expires></u:Timestamp><c:DerivedKeyToken u:Id="uuid-8935f789-fbb7-4c69-9f67-7708373088c5-18" xmlns:c="http://schemas.xmlsoap.org/ws/2005/02/sc"><o:SecurityTokenReference><o:Reference URI="urn:uuid:b2cbfe07-8093-4f44-8a06-f8b062291643" ValueType="http://schemas.xmlsoap.org/ws/2005/02/sc/sct"/></o:SecurityTokenReference><c:Offset>0</c:Offset><c:Length>24</c:Length><c:Nonce>afOoDygRG7BW+q8+makVIA==</c:Nonce></c:DerivedKeyToken><c:DerivedKeyToken u:Id="uuid-8935f789-fbb7-4c69-9f67-7708373088c5-19" xmlns:c="http://schemas.xmlsoap.org/ws/2005/02/sc"><o:SecurityTokenReference><o:Reference URI="urn:uuid:b2cbfe07-8093-4f44-8a06-f8b062291643" ValueType="http://schemas.xmlsoap.org/ws/2005/02/sc/sct"/></o:SecurityTokenReference><c:Nonce>l4rFsdYKLJTK4tgUWrSBRw==</c:Nonce></c:DerivedKeyToken><e:ReferenceList xmlns:e="http://www.w3.org/2001/04/xmlenc#"><e:DataReference URI="#_1"/><e:DataReference URI="#_4"/></e:ReferenceList><e:EncryptedData Id="_4" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:e="http://www.w3.org/2001/04/xmlenc#"><e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/><KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><o:SecurityTokenReference><o:Reference ValueType="http://schemas.xmlsoap.org/ws/2005/02/sc/dk" URI="#uuid-8935f789-fbb7-4c69-9f67-7708373088c5-19"/></o:SecurityTokenReference></KeyInfo><e:CipherData><e:CipherValue>dW8B7wGV9tYaxM5ADzY6UuEgB5TFzdy4BZjOtF0NEbHyNevCIAVHMoyA69U4oUjQHMJD5nHS0N4tnJqfJkYellKlpFZcwqruJ1J/TFx9uwLFFAwZ+dSfkDqgKu/1MFzVSY8eyeYKmbPbVEYOHr0lhw3+7wn5NQr3yxvCjlucTAdklIhD72YnVlSVapOW3zgysGt5hStyj+bmIz5hLGyyv6If4HzWjUiru8V3iMM/ss1I+i9sJOD013kr4zaaA937CN9+/aZ2wbDXnYj31UX49uE/vvt9Tl+c4SiydbiX7tp1eNSTx9Ms5O64gb3aUmHEAYOJ19XCrr756ssFZtaE7QOAoPQkFbx9zXy0mb9j1YoPQNG+JAcrN0yoRN1klhccmY+csfYXdq7YBB/KS+u2WnUjQ7SlNFy5qIPxuy5y0Jyedr2diPKLi0gUi+cK49BLQtG/XEShtxFaeMy7zZTrQADxww7kEkhvtmAlmyRbz3oGc+ This doesn't look like text encoding to me (Shouldn't text encoding send data in readable form)? What am I missing? Also, how do I setup binary encoding for wsHttp binding?

    Read the article

  • C# why datetime cannot compare?

    - by 5YrsLaterDBA
    my C# unit test has the following statement: Assert.AreEqual(logoutTime, log.First().Timestamp); Why it is failed with following information: Assert.AreEqual failed. Expected:<4/28/2010 2:30:37 PM>. Actual:<4/28/2010 2:30:37 PM>. Are they not the same?

    Read the article

  • Warning: Cannot modify header information - headers already sent

    - by Pankaj Khurana
    Hi, I am using code available on http://www.forosdelweb.com/f18/zip-lib-php-archivo-zip-vacio-431133/ for creating zip file. First file-zip.lib.php <?php /* $Id: zip.lib.php,v 1.1 2004/02/14 15:21:18 anoncvs_tusedb Exp $ */ // vim: expandtab sw=4 ts=4 sts=4: /** * Zip file creation class. * Makes zip files. * * Last Modification and Extension By : * * Hasin Hayder * HomePage : www.hasinme.info * Email : [email protected] * IDE : PHP Designer 2005 * * * Originally Based on : * * http://www.zend.com/codex.php?id=535&single=1 * By Eric Mueller <[email protected]> * * http://www.zend.com/codex.php?id=470&single=1 * by Denis125 <[email protected]> * * a patch from Peter Listiak <[email protected]> for last modified * date and time of the compressed file * * Official ZIP file format: http://www.pkware.com/appnote.txt * * @access public */ class zipfile { /** * Array to store compressed data * * @var array $datasec */ var $datasec = array(); /** * Central directory * * @var array $ctrl_dir */ var $ctrl_dir = array(); /** * End of central directory record * * @var string $eof_ctrl_dir */ var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"; /** * Last offset position * * @var integer $old_offset */ var $old_offset = 0; /** * Converts an Unix timestamp to a four byte DOS date and time format (date * in high two bytes, time in low two bytes allowing magnitude comparison). * * @param integer the current Unix timestamp * * @return integer the current date in a four byte DOS format * * @access private */ function unix2DosTime($unixtime = 0) { $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime); if ($timearray['year'] < 1980) { $timearray['year'] = 1980; $timearray['mon'] = 1; $timearray['mday'] = 1; $timearray['hours'] = 0; $timearray['minutes'] = 0; $timearray['seconds'] = 0; } // end if return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) | ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1); } // end of the 'unix2DosTime()' method /** * Adds "file" to archive * * @param string file contents * @param string name of the file in the archive (may contains the path) * @param integer the current timestamp * * @access public */ function addFile($data, $name, $time = 0) { $name = str_replace('', '/', $name); $dtime = dechex($this->unix2DosTime($time)); $hexdtime = 'x' . $dtime[6] . $dtime[7] . 'x' . $dtime[4] . $dtime[5] . 'x' . $dtime[2] . $dtime[3] . 'x' . $dtime[0] . $dtime[1]; eval('$hexdtime = "' . $hexdtime . '";'); $fr = "\x50\x4b\x03\x04"; $fr .= "\x14\x00"; // ver needed to extract $fr .= "\x00\x00"; // gen purpose bit flag $fr .= "\x08\x00"; // compression method $fr .= $hexdtime; // last mod time and date // "local file header" segment $unc_len = strlen($data); $crc = crc32($data); $zdata = gzcompress($data); $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2); // fix crc bug $c_len = strlen($zdata); $fr .= pack('V', $crc); // crc32 $fr .= pack('V', $c_len); // compressed filesize $fr .= pack('V', $unc_len); // uncompressed filesize $fr .= pack('v', strlen($name)); // length of filename $fr .= pack('v', 0); // extra field length $fr .= $name; // "file data" segment $fr .= $zdata; // "data descriptor" segment (optional but necessary if archive is not // served as file) $fr .= pack('V', $crc); // crc32 $fr .= pack('V', $c_len); // compressed filesize $fr .= pack('V', $unc_len); // uncompressed filesize // add this entry to array $this -> datasec[] = $fr; // now add to central directory record $cdrec = "\x50\x4b\x01\x02"; $cdrec .= "\x00\x00"; // version made by $cdrec .= "\x14\x00"; // version needed to extract $cdrec .= "\x00\x00"; // gen purpose bit flag $cdrec .= "\x08\x00"; // compression method $cdrec .= $hexdtime; // last mod time & date $cdrec .= pack('V', $crc); // crc32 $cdrec .= pack('V', $c_len); // compressed filesize $cdrec .= pack('V', $unc_len); // uncompressed filesize $cdrec .= pack('v', strlen($name) ); // length of filename $cdrec .= pack('v', 0 ); // extra field length $cdrec .= pack('v', 0 ); // file comment length $cdrec .= pack('v', 0 ); // disk number start $cdrec .= pack('v', 0 ); // internal file attributes $cdrec .= pack('V', 32 ); // external file attributes - 'archive' bit set $cdrec .= pack('V', $this -> old_offset ); // relative offset of local header $this -> old_offset += strlen($fr); $cdrec .= $name; // optional extra field, file comment goes here // save to central directory $this -> ctrl_dir[] = $cdrec; } // end of the 'addFile()' method /** * Dumps out file * * @return string the zipped file * * @access public */ function file() { $data = implode('', $this -> datasec); $ctrldir = implode('', $this -> ctrl_dir); return $data . $ctrldir . $this -> eof_ctrl_dir . pack('v', sizeof($this -> ctrl_dir)) . // total # of entries "on this disk" pack('v', sizeof($this -> ctrl_dir)) . // total # of entries overall pack('V', strlen($ctrldir)) . // size of central dir pack('V', strlen($data)) . // offset to start of central dir "\x00\x00"; // .zip file comment length } // end of the 'file()' method /** * A Wrapper of original addFile Function * * Created By Hasin Hayder at 29th Jan, 1:29 AM * * @param array An Array of files with relative/absolute path to be added in Zip File * * @access public */ function addFiles($files /*Only Pass Array*/) { foreach($files as $file) { if (is_file($file)) //directory check { $data = implode("",file($file)); $this->addFile($data,$file); } } } /** * A Wrapper of original file Function * * Created By Hasin Hayder at 29th Jan, 1:29 AM * * @param string Output file name * * @access public */ function output($file) { $fp=fopen($file,"w"); fwrite($fp,$this->file()); fclose($fp); } } // end of the 'zipfile' class ?> My second file newzip.php <? include("zip.lib.php"); $ziper = new zipfile(); $ziper->addFiles(array("index.htm")); //array of files // the next three lines force an immediate download of the zip file: header("Content-type: application/octet-stream"); header("Content-disposition: attachment; filename=test.zip"); echo $ziper -> file(); ?> I am getting this warning while executing newzip.php Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\demo\zip.lib.php:233) in E:\xampp\htdocs\demo\newzip.php on line 6 I am unable to figure out the reason for the same. Please help me on this. Thanks

    Read the article

  • Help with regex - extracting text.

    - by Yeti
    I have 3 separate strings: $d = 'Created on November 25, 2009'; $v = 'Viewed 17,603 times'; $h = '389 hits'; Which needs to be converted to: $d1 = {unix timestamp of November 25, 2009}; $v1 = "17603"; (commas stripped if it exists) $h1 = "389"; What is the most efficient way to do this (possibly with regex)? Any code snippet would be great.

    Read the article

  • iPhone: Tracking/Identifying individual touches

    - by FlorianZ
    I have a quick question regarding tracking touches on the iPhone and I seem to not be able to come to a conclusion on this, so any suggestions / ideas are greatly appreciated: I want to be able to track and identify touches on the iphone, ie. basically every touch has a starting position and a current/moved position. Touches are stored in a std::vector and they shall be removed from the container, once they ended. Their position shall be updated once they move, but I still want to keep track of where they initially started (gesture recognition). I am getting the touches from [event allTouches], thing is, the NSSet is unsorted and I seem not to be able to identify the touches that are already stored in the std::vector and refer to the touches in the NSSet (so I know which ones ended and shall be removed, or have been moved, etc.) Here is my code, which works perfectly with only one finger on the touch screen, of course, but with more than one, I do get unpredictable results... - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { [self handleTouches:[event allTouches]]; } - (void) touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { [self handleTouches:[event allTouches]]; } - (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { [self handleTouches:[event allTouches]]; } - (void) touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event { [self handleTouches:[event allTouches]]; } - (void) handleTouches:(NSSet*)allTouches { for(int i = 0; i < (int)[allTouches count]; ++i) { UITouch* touch = [[allTouches allObjects] objectAtIndex:i]; NSTimeInterval timestamp = [touch timestamp]; CGPoint currentLocation = [touch locationInView:self]; CGPoint previousLocation = [touch previousLocationInView:self]; if([touch phase] == UITouchPhaseBegan) { Finger finger; finger.start.x = currentLocation.x; finger.start.y = currentLocation.y; finger.end = finger.start; finger.hasMoved = false; finger.hasEnded = false; touchScreen->AddFinger(finger); } else if([touch phase] == UITouchPhaseEnded || [touch phase] == UITouchPhaseCancelled) { Finger& finger = touchScreen->GetFingerHandle(i); finger.hasEnded = true; } else if([touch phase] == UITouchPhaseMoved) { Finger& finger = touchScreen->GetFingerHandle(i); finger.end.x = currentLocation.x; finger.end.y = currentLocation.y; finger.hasMoved = true; } } touchScreen->RemoveEnded(); } Thanks!

    Read the article

  • ROR heroku PostGres issue

    - by oelbrenner
    getting error: ActiveRecord::StatementInvalid (PGError: ERROR: argument of HAVING must be type boolean, not type timestamp without time zone controller code snippet: def inactive @number_days = params[:days].to_i || 90 @clients = Client.find(:all, :include = :appointments, :conditions = ["clients.user_id = ? AND appointments.start_time <= ?", current_user.id, @number_days.days.ago], :group = 'client_id', :having = 'MAX(appointments.start_time)' ) end

    Read the article

  • Convert Unix Epoch Time to Seconds in SQL or .NET

    - by user293249
    First let me thank you all for your help. What I need is a function that takes in a EPOCH time stamp, like 1452.235687 and converts it to a readable timestamp like '01-01-1970 00:00:00'. More specifically I only need the time not the date. If at all possible I would prefer a .NET function instead of a SQL stored procedure. However an SQL stored procedure would work fine as well. Thank you again,

    Read the article

  • MySQL 5.1 / phpMyAdmin - logging CREATE/ALTER statements

    - by pako
    Is it possible to log CREATE / ALTER statements issued on a MySQL server through phpMyAdmin? I heard that it could be done with a trigger, but I can't seem to find suitable code anywhere. I would like to log these statements to a table, preferably with the timestamp of when they were issued. Can someone provide me with a sample trigger that would enable me to accomplish this? I would like to log these statements so I can easily synchronize the changes with another MySQL server.

    Read the article

  • Calculate date from numeric value

    - by elias
    The number 71867806 represents the present day, with the smallest unit of days. How can I calculate the currente date from it? (or) convert it into an Unix timestamp? Solution shouldn't use language depending features. Thanks!

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >