» 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
Category : 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

View Replies

Ruby can only show local time and Greenwich Mean Time (UTC) but not East Coast Time or Central Time?
Category : 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

View Replies

Converting any date time from server time to user time (dealing with standard and daylight time)
Category : 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

View Replies

Get time of different Time zones on selection of time from time picker
Category : 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

View Replies

Compare Round Robin and Multilevel Feedback Queue in terms of waiting time, response time, turnaround time
Category : 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

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

View Replies

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)?
Category : 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

View Replies

Django Templates: How to show the time differences between a Datastore time and current time?
Category : Development Tools & Services

I am working on a django- Google app engine project. A user inserts some value and the datetime field is auto filled using google app engine DateTimeProperty(auto_now_add=True) property. Now, I have to display on the template the difference of this time and the current time when the user is viewing the result.

For e.g. if the inserted time was 5:00 and the user is viewing the post a

View Replies

Calculate time equivalent respective to a users time zone and a fixed time in PHP
Category : PHP

Below is some text I am working on that tells users what time an online sale begins respective to their local time zone. The online sale always begins at 9am Pacific Time, but not every day.

Our online sale begins at 9am PDT. Your local time, based on your
time zone setting, is September 11, 2012 - 12:02 am HST, which is
UTC -10 or 3 hours behind PDT. The sale will b

View Replies

how to calculate time difference when start time and end time are generated dynamically dynamic id for each row?
Category : 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) {
return ret;

View Replies

Are the 25 secs running time for a Windows Phone PeriodicTask real time or cpu time?
Category : Programming Languages

A PeriodicTask on WP will run every 30 minutes and is allowed to run for 25 seconds.

I wonder if those 25 seconds are cpu time or real (calendar) time?
I can imagine that if the user eg is playing a resource intensive game or talking or the phone - your background task (PeriodicTask) will not get that many cpu

View Replies

2012 / 2017 Copyrights BigHow , All Rights Reserved .