» Home » Time » Page 1
Execute CommandA A% of time, CommandB B% of time, CommandC C% of time --— CommandZ Z% of time by using Random Number
by Justin Chen in Programming Languages

Problem Statement: Execute Various Command randomly by matching its percentage.
like execute CommandA 50% of time and commandB 25% of the time and commandC 15% of time and etc etc and total percentage should be 100%.


My Question is- Execute CommandA A% of time, CommandB B%
of time, CommandC C% of time ----- CommandZ Z% of time.
And total perce


Ruby can only show local time and Greenwich Mean Time (UTC) but not East Coast Time or Central Time?
by Mcad in Programming Languages

$ irb


ruby-1.9.2-p0 > RUBY_DESCRIPTION
=> "ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]"
ruby-1.9.2-p0 > Time.now
=> 2010-09-07 18:18:38 -0700
ruby-1.9.2-p0 > Time.now.gmtime
=> 2010-09-08 01:18:43 UTC
ruby-1.9.2-p0 > Time.now.strftime('%H:%M %Z')
=> "18:22 PDT"
ruby-1.9.2-p0 > Time.now.gm

Converting any date time from server time to user time (dealing with standard and daylight time)
by patrickcarver in Programming Languages

I am working on a web app using .NET MVC 3 and SQL server 2008 (r2).


Anyway, I have a date time object and I want to convert it to user time. It is fairly trivial to convert right now to user time; I have some java script that will get me the users offset from UTC. And I know my date times offset to UTC.


What I realized yesterday, is that my user's offsets will change, i


Get time of different Time zones on selection of time from time picker
by ms-access in Programming Languages

I have an issue of converting selected hours and minutes to different time zones of countries.
Supposing if i select 10 am in India then i want to know at 10 am in india what will be the time in USA/New york and Tokyo.and Vice versa.


Any help is appreciable...
Thank you


Compare Round Robin and Multilevel Feedback Queue in terms of waiting time, response time, turnaround time
by DJ-phYre in Network & Servers

I want to make a comparison between RR and MLFQ in terms of waiting time, response time, turnaround time in 3 cases:


a) More CPU-bounded jobs than I/O
jobs


b) More I/O-bounded jobs than
CPU bounded jobs


c) When only a few
jobs need to schedule.


Could you help me to clarify or give me some sources for reference. Thanks


How to time-bound a computation in Java and be able to get all the results computed so far, even when the time budget ends (time-out)?
by tolis626 in Java

In a framework I'm developing the user can choose to run a certain time consuming task in background while doing something else. That task computes a series of results. In some point, when he/she needs the results from the background task, it's acceptable to wait some more time until:


a) a time-out occurs (in this case the user would like to get all the results computed so far, if


Python time.gmtime() returning time that's 5 hours ahead of system time
by php in Programming Languages

I have been scouring the google machine and have come up with nothing to answer this. When making calls to:


time.gmtime()

This ends up returning a time, as the subject line says, 5 hours ahead of my system time. I cannot figure out what is going on. time.tzname() returns the proper timezone. Aside from setting python to a timezone 5 hours earlier than min


how to calculate time difference when start time and end time are generated dynamically dynamic id for each row?
by Prasant Jain in Programming Languages

I would like to calculate time difference based on dynamic id from 2 text-fields and display it on third.


My current code:


function mdiff(t1,t2) {
var t1 = hour2mins(t1); var t2=hour2mins(t2);
var ret = mins2hour(parseInt(t2-t1));
if(t2<t1) {
ret=mins2hour(parseInt(parseInt(t2+1440)-t1));
}
return ret;
}

mysql time slot query with a start time and end time and over running times
by Gilmar Souza Jr. in Programming Languages

I have a mysql query that returns time slots. I have a table called timeslots that contains starttimeb, endtimeb and employeeb. Booked Starttime and endtime fields pull from a different table called schedule. The problem is I can only assign appointments defined by the timeslots table.


For example I would like slots 8:00 to 10:00, 10:00 to 12:00, 12:00 to 14:00, 14:00 to 16:00


How to get the current local time using the system time zone and UTC time from the server in javascript
by loki8481 in Javascript

I have got the UTC time as Sat, 19 May 2012 11:26:51 +0000 in the json response and have the system time zone as +0530. How can i convert the UTC time to the local time using the two available result? I want the date as isoDate format and time as isoTime format. Please help how to do that?


Next



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .