getSeconds() and getMIlliseconds() return the seconds and milliseconds values.
<SCRIPT LANGUAGE=”JAVASCRIPT”>
<!–
var d = new Date();
var curr_hour = d.getHours();
var curr_min = d.getMinutes();
var curr_sec = d.getSeconds();
var curr_msec = d.getMilliseconds();
document.write(curr_hour + “:” + curr_min + “:”
+ curr_sec + “:” + curr_msec);
//–>
</SCRIPT>
Archive for July, 2008
Get the System time with the number of seconds and milliseconds using javascript
Posted in javascript, tagged Date, getHours, getMilliseconds, getMinutes, getSeconds, javascript, milliseconds, seconds, system time, SystemTime on July 25, 2008 | Leave a Comment »
Reading the system time in C#
Posted in C#.NET, tagged .net, C#, currentSystemTime, DateTime, read, system time on July 21, 2008 | Leave a Comment »
In order to retrieve the current system time, we can use the static property “Now” of the ” DateTime” class. For example the following two lines of code
DateTime currentSystemTime = DateTime.Now;
Console.WriteLine(currentSystemTime);
print out something like this:
4/7/2008 4:05:35 PM
Split a string using String.split()
Posted in Java, tagged Java, oussama akir, split, split string java, string on July 8, 2008 | 1 Comment »
The String class has a split() method, that will return a String array.
Example 1:
public class StringSplit {
public static void main(String args[]) throws Exception{
new StringSplit().doit();
}
public void doit() {
String s3 = “Real-How-To”;
String [] temp = null;
temp = s3.split(“-”);
dump(temp);
}
public void dump(String []s) {
System.out.println(“————”);
for (int i = 0 [...]
What ports does WMI use?
Posted in WMI: Windows Management Instrumentation, tagged DCOM, ports, RPC, TCP, Windows Management Instrumentation, WMI on July 3, 2008 | Leave a Comment »
DCOM dynamically allocates one port per process. You need to decide how many ports you want to allocate to DCOM processes, which is equivalent to the number of simultaneous DCOM processes through the firewall. You must open all of the UDP and TCP ports corresponding to the port numbers you choose. You also need to [...]


