time

Time not updatating when using sysdate Oracle on Windows

Not sure what causes that problem, but when I run query select to_char(sysdate, 'HH24:MM') from dual; I constantly get the same time 15:08. I even check a different Oracle DBMS on different machine (also Windows) and got the same result. ...

About exec() function and time

I'll show some code, first: echo exec("compile\\save.exe Untitled.c tmpUntitled.c"); I have a program, named save.exe and i want to know if it already stopped? If stopped, ok... Do something... If not, may be an error, or a loop... Now: I want to build same way to control the time that program use, and put a limit (time limit exceed,...

How can I aggregate the # of seconds in a query result?

Hi everyone, I have an Oracle 10g table that contains a # of log records. This table collects data from an environmental recording device that creates a log record every 15 seconds when it is running. I want to add all of the seconds together from the reading dates of the log file entries to ensure that the logger ran > 24 hours (84...

"pretty print" duration in java

Hi folks, Does anyone know of a java library that can pretty print a number in milli seconds in the same way that c# does? E.g. 123456 ms as a long would be printed as 4d1h3m5s (might not be accurate , but you see hopefully what I'm getting at!!) -ace ...

Android java.util.concurrent.TimeUnit Convert Milliseconds to Minutes

Is there a way to convert milliseconds to minutes using java.util.concurrent.TimeUnit? This answer seems to suggest that you can use a TimeUnit.MILLISECONDS.toMinutes() method, and the documentation suggests that you could use the TimeUnit.MILLISECONDS.convert() method with TimeUnit.MINUTES - the problem is that neither TimeUnit.MINUTES...

Hudson plugin for trend of timings of all jobs in a view

Is there a Hudson plugin which would allow me to create a "trend" graph for build times for all jobs/projects in a view? ...

MySQL add time to column

Bit of a puzzle for you guys. I can come up with blunt workaround (below) but I thought it would present it to you all to see if there was a more elegant solution out there. Keep in mind I'm looking for a PHP or MySql only solution. Tables is 'candles2'. I have a MySQL TEXT column 'time' that has a datestamp in it ( e.g. 2010.08.13 19:3...

how to modify this javascript time function to show hours less than ten as: 0x.

//Live Javascript Server Time function getthedate(){ var mydate=new Date() var hours=mydate.getHours() var minutes=mydate.getMinutes() var seconds=mydate.getSeconds() var dn="AM" if (hours>=12) dn="PM" if (hours>12){ hours=hours-12 } if (hours==0) hours=12 ...

Python, hard-code it time for filename manipulation

Hello all, I know how to append date to the end of the file name, but I m not sure how can I later in script put that filename as a link to FTP server. For instance: import datetime now = datetime.datetime.now() suffix = now.strftime(""%d-%m-%Y, %H:%M"") filename = 'My history(%s).txt'%suffix How can I hard code it NOW variable so ...

validate time field entry

hi, is there any easy to validate a time field entry against the current date and time?i get date and time entry from an user in two separate fields. I used jquery date picker and time picker for both. with the date I had the option to show current date and future dates and not the past dates so it's good. with the time field i have to s...

MySQL create time and update time timestamp

I am creating some tables where I want to store the time when a record was created and when it was last updated. I thought I could have two timestamp fields where one would have the value CURRENT_TIMESTAMP and the other would have CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. But I guess I can't do this because you can have only 1 times...

Can't figure out how to invoke cProfile inside of a program

Hey guys, Sorry for the beginner question, but I can't figure out cProfile (I'm really new to Python) I can run it via my terminal with: python -m cProfile myscript.py But I need to run it on a webserver, so I'd like to put the command within the script it will look at. How would I do this? I've seen stuff using terms like __init__ ...

Getting the time interval

I have two timestamp input one is the current time and another one is future i.e. Future time: 2010-8-17 23:00 Present time: 2010-8-15 11:00 I want to setup notification system which will display the time intervals between the above dates. i.e. 15 minutes before 30 minutes before 1 hour before 2 hour before 3 hour before .... .... ....

Using cProfile or line_profile on a Python script in /cgi-bin/ ?

Is there a way to run cProfile or line_profile on a script on a server? ie: how could I get the results for one of the two methods on http://www.Example.com/cgi-bin/myScript.py Thanks! ...

How can I speed up fetching pages with urllib2 in python?

I have a script that fetches several web pages and parses the info. (An example can be seen at http://bluedevilbooks.com/search/?DEPT=MATH&CLASS=103&SEC=01 ) I ran cProfile on it, and as I assumed, urlopen takes up a lot of time. Is there a way to fetch the pages faster? Or a way to fetch several pages at once? I'll do whatever...

UTC support for comparing 2 files date/time

I have a utility that compares a source and destination file date/time. This works in most cases but fails when comparing date/time for files in different time zones. So I need a UTC datetime routine. From looking around it seems the Windows API GetFileTime will support this. I also found this wrapper procedure, but it crashes on the...

How do I get different timezone date in javascript?

I have timezone stored with me in a var like: timezone = "America/Los_Angeles". So by providing this timezone, can I get the LA's current time in Javascript? ...

how to resolve a Bad format for Time problem in java?

hi, i'm working with java to extract values of a time column in table in mysql. the code below show the query i do send. String query="select id,time from table where Hour(time)<=32 "; ResultSet res = stmt.executeQuery(query); while (res.next()) { String id = res.getString(1); Time tc = res.getTime("time"); System.out.println(tc...

Rounding down UNIX time to lower hour in PHP

I have been trying in vain to round down the current time to the lower hour in PHP. Here's what I want to do: 1. Take the current time: $time_now = time(); 2. Round it down to the closest hour: $time_now = $time_now - ($time_now % 3600); 3. Print it using the function date: print date('d m Y H:i', $time_test); But what seems to be happ...

How to cluster time series data using K-means algorithm?

Hi, I am wondering how can I do clustering of time series data. I understand if the data is a point. But I do not know how to cluster if the data is time series with 1XM where M is the data length. Especially the part on how to compute new mean of the cluster for time series data. My X matrix will be N X M where N is number of time ser...