time

Convert ISO 8601-formatted time period to ticks / miliseconds

Is there a built-in way in .NET 3.5 to convert an ISO 8601 period into a .NET TimeSpan / ticks / miliseconds? ...

Why he return 11 all the time ??? (btw. now is 16 h my local time)

private void hour() { Toast.makeText(this,String.valueOf(Calendar.HOUR_OF_DAY),Toast.LENGTH_LONG).show(); } ...

Least squares fit routine for timescaling in Matlab

Dear all, I would like to know if there is a least squares routine in Matlab to scale a template signal to a measured signal in time. Let's say my template is a signal of approx. 1 second, but the corresponding part in the measurement is 1.2 seconds. Now I want to scale my template to be 1.2 seconds long as well. Of course it is possibl...

Timing a command's execution in PowerShell

Is there a simple way to time the execution of a command in PowerShell, like the 'time' command in Linux? I came up with this: $s=Get-Date; .\do_something.ps1 ; $e=Get-Date; ($e - $s).TotalSeconds But I would like something simpler like time .\do_something.ps1 ...

Which language is easiest to learn?

This is a subjective question just to get a general impression. As Java is the most popular programming language right now it is used as a benchmark. Lets say I have to spend T amount of time/effort to learn/master Java. By what factor should I multiply T to get a time/effort needed to learn/master other language instead, say C, C++, C#...

remaining time in the progress dialog

In a GUI application I would like to show a progess dialog displaying how much time left for the task to accomplish, how may I get the remaining time before the task ends and count it down please? thanks ...

Algorithm needed to calculate difference between two times

Hi, I have an hour selection drop down 0-23 and minutes selection drop down 0-59 for Start time and End time respectively (so four controls). I'm looking for an algorithm to calculate time difference using these four values. Since they're not stored in fancy date/time selection controls, I don't think I can use any standard date/time ...

handle a time object from php in flex (parse it to a Date object)

I've got a php backend which delivers a time (e.g. '07:00:00'). This time is recognized as a string but I need it as a Date. So what I need is: Convert a string '07:00:00' to a Flex Date object. Is there a way to do this (without using regular expressions)? ...

How to get execution time in rails console?

I want compare time of execution Post.all and SELECT * FROM posts (or some other statements) How can i get execution time of Post.all ? ...

Convert PHP Date to Time

How can I covert this PHP date string: Thu 19th Aug 2010 @ 7:52PM to this: 1282247549 Which is done by: gmdate("D jS M Y @ g:iA", $row['project_deadline']) The timestamp is from the database with the stored time() function ...

perl- help formatting a timestamp

I am reading in log data with the following time stamp format: Sat Aug 07 04:42:21 2010 I want to convert it to something like this: 20100807044221 What is the best way to do this in perl? Thanks. ...

Need code critique for time interval test script PHP

Hey again! I'm trying to write a set of scripts that will run on a page only if it has been more than 15 minutes since they last ran. Basically, an automated script updates a database of mine every half hour--and a page which displays that information and updates session variables must obviously query the database whenever it is opened...

Custom formatting a time in the past

Want to display a different message if the time is under a certain amount. I have then function that I have been working on, but cannot not get it to work unless the if for time is 1. Would like 10 minutes. function TimeSince($timestamp) { // array of time period chunks $chunks = array( array(60 * 60 * 24 * 365 , 'ye...

Output is in seconds. convert to hh:mm:ss format in php

My output is in the format of 290.52262423327 seconds. How can i change this to 00:04:51? The same output i want to show in seconds and in HH:MM:SS format, so if it is seconds, i want to show only 290.52 seconds.(only two integers after decimal point)? how can i do this? I am working in php and the output is present in $time variable....

Getting Current Date Time for a Random Number Generator's Seed

Preferably as a long. All the example I can find are getting the date/time as a string and not any scalar value. :) ...

date to time ago ? without useing strtime ?

ok i have a date date('Y-m-d H:i:s'); how can we make it like 0 seconds ago or x year x month x day x minutes x seconds ago ? but without useing the str_time ( php 5.3.3 ) edit* i mean is some.date - time.now = someyear some month someday someminutes someseconds ago. like facebook or stackoverflow ( updated. i mean like that. – Adam...

Perl max execution time on webserver

How can I set the execution time of a perl skript on a webserver. Is this analog to php in the php.ini "max_execution_time" or is there another way? ...

R: Date format when writing a zoo object to a file?

Hello I've been playing for a while with zoo package. I can read files using the format="%Y-%m-%d %H:%M" option But how can I use this option when writing the results back to the disk? I mean, the default format seems to be "%m/%d/%Y %H:%M" and I need to be "%Y-%m-%d %H:%M" Where can I change it? cheers ...

Output time as words, as in "One O'Clock PM" in PHP

Hi. I'm working on a relatively rudimentary project which requires using a text-to-speech engine to read the current time. PHP will allow me to output the current time in many ways. However, I need to output the time as words. For example, 13:00 should output as "one o'clock pm" and so forth. Another example, 01:23 should output as ...

is it worth to trim a graph as desired before applying a Dijkstra algorithm on that?

I am using Dijkstra algorithm in a program.suppose i have a graph with vertices and edges.if we imaging all the edges starting from source vertex "a" are as below a-->b a-->c and a-->d and all the edges ending to vertex "f" are : b-->f m-->f e-->f w-->f what i need is i know from beginning that i want the edge a-->b as my starting edg...