Example
business_hours['monday'] = [800..1200, 1300..1700]
business_hours['tuesday'] = [900..1100, 1300..1700]
...
I then have a bunch of events which occupy some of these intervals, for example
event = { start_at: somedatetime, end_at: somedatetime }
Iterating over events from a certain date to a certain date, I create another ar...
I have a select query which takes 10 min to complete as it runs thru 10M records. When I run thru TOAD or program using normal JDBC connection I get the results back, but while running a Job which uses Hibernate as ORM does not return any results. It just hangs up ...even after 45 min? Please help
...
The user is entering a python script in a Java GUI python-editor and can run it from the editor. Is there a way to take the user's script and impose a time limit on the total script?
I'm familiar with how to this with functions / signal.alarm(but I'm on windows & unix Jython) but the only solution I have come up with is to put that scr...
If I have an integer in c that represents the date how do I print out the actuall mm/dd/year?
64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)
1183042181
what if I am on a 32 bit system, and have to read the integer in from a file?
C not C++
...
I am building a scheduling system. The current system is just using excel, and they type in times like 9:3-5 (meaning 9:30am-5pm). I haven't set up the format for how these times are going to be stored yet, I think I may have to use military time in order to be able to calculate the hours, but I would like to avoid that if possible. But ...
Seems like a dumb question but I'm confused by this and haven't been able to figure it out.
My Jboss app server (4.2.2) running on my dev machine (ubuntu 810) is using the wrong time.
Basically all the logs etc show the time as being 1 hour behind what it really is. My system time and zone are setup properly.
I also tried using -Duser...
Hey
I'm using AVAudioPlayer to play music in my iPhone app.
In a class that I wrote I have an array that contains random ascending integers. (2, 4, 9, 17, 18, 20,...)
These integers represent times in the song at which a certain event should occur. So if you take the above array, after 2 seconds of the song playing, some method should...
i have application view with nine icons on each page, i want to call a function when a certain icon is pressed for certain amount of time. similarly i want to do this with a cell in UITableView.
...
Is there a way to find out when the system was last shutdown?
I know there's a way to find out last boot up time using the LastBootUpTime property in Win32_OperatingSystem namespace using WMI.
Is there anything similar to find out last shutdown time?
Thanks.
...
I am trying to get an array of a date plus the next 13 dates to get a 14 day schedule starting from a given date.
here is my function:
$time = strtotime($s_row['schedule_start_date']); // 20091030
$day = 60*60*24;
for($i = 0; $i<14; $i++)
{
$the_time = $time+($day*$i);
$date = date('Y-m-d',$the_time);
array_push($dates,$dat...
I have strings like "84", "03" etc. that I want to convert to Date objects, but Date.new only takes the expanded 4-digit year as a parameter. I know it's simple to do, but I don't want to reinvent this wheel. Is there something that does this already? Either in standard Ruby or in ActiveSupport.
...
datetime, M01, M02, M03, M04, M05, M06
8/15/2009 0:00, 5.8, 7.8, 7.8, 7.3, 0, 7.9
8/15/2009 0:10, 7.1, 8.1, 8.1, 7.7, 0, 8.1
8/15/2009 0:20, 6.8, 7.4, 7.6, 7.1, 0, 7.3
8/15/2009 0:30, 5.6, 6.8, 7.1, 6.6, 0, 6.8
8/15/2009 0:40, 3.9, 6.2, 6.4, 6.2, 0, 6.4
8/15/2009 0:50, 4.6, 5.5, 6.1, 5.8, 0, 5.6
8/15/2009 1:40, 7, 7, 7.2, 6.9, 0, 6.3
C...
I'm building my own unix time to human readable conversion, and I'm stuck.
I can extract the year just fine, but the day is proving too tricky.
/*
Converts a 32-bit number of seconds after 01-01-1970 to a _SYSTEMTIME structure
*/
static _SYSTEMTIME Convert(unsigned long a_UnixTime)
{
newtime.wMilliseconds = 0;
newtime.wYear = (un...
I get this error when I try to use time_ago_in_words:
Comparison of String with ActiveSupport::Duration failed
I'm trying to check whether an object was created more than 8 minutes ago:
<% if time_ago_in_words(obj.created_at) > 8.minutes %>
<p>Yes</p>
<% end %>
Would appreciate it if anyone knows the correct way to perform...
I don't know how to show Time in AM/PM format in blackberry using blackberry datefield.Pls give me a idea how to do this.
...
I'd like a static time indicator that counts from 0 to whatever as time passes. The game I'm making will change after a certain number of days has passed. I'm sure this is a simple question, but how I can I store the total time passed, even between launches?
So..., first launch, time = 0;
Second launch an hour later time = 60;
Third ...
Jon Skeet spoke of the complexity of programming dates and times at the 2009 DevDays in London.
Can you give me an introduction to the ANSI C date/time functions on UNIX and indicate some of the deeper issues I should also consider when using dates and times?
...
Im building a bus schedule app.
In the mysql db I have a 'time' field that is static - let's say 15:23 which is the scheduled time for the bus and never changes from one day to the next - the bus always comes at 15:23. It's 3:20 PM and the user is running for the bus stop. How do I present the user with "The next bus is in 3 minutes"
T...
I am using Mysql NDB Cluster, in my information_schema.Tables tbl I have null entries in the colummn called Create_Time and Update_Time.
Does anyone have any known solution for this.
as on my normal innodb databases the Create_Time and Update_Time is there properly.
...
I get the time:
$today = time();
$date = date('h:i:s A', strtotime($today));
if the current time is "1:00:00 am", how do i add 10 more hours to become 11:00:00 am??
...