Click here to Skip to main content
15,923,168 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: shared web hosting Pin
Sarvesvara (BVKS) Dasa11-Apr-03 22:55
Sarvesvara (BVKS) Dasa11-Apr-03 22:55 
GeneralRe: shared web hosting Pin
J. Dunlap12-Apr-03 8:27
J. Dunlap12-Apr-03 8:27 
QuestionServer side security access? Pin
Nick Seng10-Apr-03 0:23
Nick Seng10-Apr-03 0:23 
GeneralGUIDs via JavaScript Pin
Senkwe Chanda9-Apr-03 22:32
Senkwe Chanda9-Apr-03 22:32 
GeneralRe: GUIDs via JavaScript Pin
alex.barylski10-Apr-03 14:33
alex.barylski10-Apr-03 14:33 
GeneralRe: GUIDs via JavaScript Pin
Senkwe Chanda10-Apr-03 23:14
Senkwe Chanda10-Apr-03 23:14 
GeneralRe: GUIDs via JavaScript Pin
alex.barylski11-Apr-03 11:20
alex.barylski11-Apr-03 11:20 
GeneralRe: GUIDs via JavaScript Pin
ian mariano13-Apr-03 12:41
ian mariano13-Apr-03 12:41 
I don't this will work in JavaScript, but it certainly works in Java and might be useful to some people out there (this is obviously part of a class):

import java.util.*;
import java.net.*;
import java.security.*;
 
//	stuff for GUIDs
private SecureRandom	m_secureRandom;
private String	m_strIP;
 
// in your constructor somewhere
{
	m_secureRandom = new SecureRandom();
 
	try
	{
		m_strIP = InetAddress.getLocalHost().toString(); 
	}
	catch (UnknownHostException e)
	{
		//  Handle the exception, possibly setting the IP to some 162.xxx.xxx.xxx
		//  number.
	}
}
 
private String	GenerateGUID()
{
	try
	{
		StringBuffer	sGUID = new StringBuffer();
		StringBuffer	sRaw = new StringBuffer();
		MessageDigest	md5 = MessageDigest.getInstance("MD5");
		long	time = System.currentTimeMillis();
		long	rand = m_secureRandom.nextLong();
 
		sRaw.append(m_strIP);
		sRaw.append(".");
		sRaw.append(Long.toString(time));
		sRaw.append(".");
		sRaw.append(Long.toString(rand));
 
		md5.update(sRaw.toString().getBytes());
 
		byte[]	raw = md5.digest();
 
		for (int i = 0; i < raw.length; i++)
		{
			int	x = raw[i] & 0xff;
 
			if (x < 0x10)	sGUID.append('0');
 
			sGUID.append(Integer.toHexString(x));
		}
 
		return sGUID.toString().toUpperCase();
	}
	catch (Exception  e)
	{
		e.printStackTrace();
	}
 
	return "";
}


I use the above with great success Wink | ;) DUnno how to impl. in JavaSCript, though.

"The greatest danger to humanity is humanity without an open mind."
  - Ian Mariano - http://www.ian-space.com/

GeneralRe: GUIDs via JavaScript Pin
Senkwe Chanda13-Apr-03 20:56
Senkwe Chanda13-Apr-03 20:56 
GeneralRe: GUIDs via JavaScript Pin
Jim Taylor21-Apr-03 8:33
Jim Taylor21-Apr-03 8:33 
General“print” problem in cgi web application Pin
Aiyappa9-Apr-03 20:20
Aiyappa9-Apr-03 20:20 
GeneralControlling IE Settings Pin
scottbmunro9-Apr-03 3:46
scottbmunro9-Apr-03 3:46 
GeneralRe: Controlling IE Settings Pin
Paul Watson9-Apr-03 4:11
sitebuilderPaul Watson9-Apr-03 4:11 
GeneralRe: Controlling IE Settings Pin
J. Dunlap9-Apr-03 8:38
J. Dunlap9-Apr-03 8:38 
GeneralRe: Controlling IE Settings Pin
Paul Watson9-Apr-03 20:34
sitebuilderPaul Watson9-Apr-03 20:34 
QuestionHow many instance ? Pin
Nick Seng8-Apr-03 20:19
Nick Seng8-Apr-03 20:19 
GeneralImplementing wSpell in .asp Pin
IceOl8d8-Apr-03 9:55
IceOl8d8-Apr-03 9:55 
GeneralpasteHTML() Problem Pin
dutchy8-Apr-03 6:02
dutchy8-Apr-03 6:02 
QuestionCoordinate-based popups? Pin
Jamie Hale8-Apr-03 4:17
Jamie Hale8-Apr-03 4:17 
AnswerRe: Coordinate-based popups? Pin
alex.barylski8-Apr-03 12:47
alex.barylski8-Apr-03 12:47 
Generalhttp post via javascript Pin
Senkwe Chanda8-Apr-03 3:19
Senkwe Chanda8-Apr-03 3:19 
GeneralRe: http post via javascript Pin
alex.barylski8-Apr-03 12:33
alex.barylski8-Apr-03 12:33 
GeneralRe: http post via javascript Pin
Senkwe Chanda8-Apr-03 19:51
Senkwe Chanda8-Apr-03 19:51 
GeneralRe: http post via javascript Pin
alex.barylski10-Apr-03 14:25
alex.barylski10-Apr-03 14:25 
GeneralRe: http post via javascript Pin
Still Learning Dude11-Apr-03 14:02
Still Learning Dude11-Apr-03 14:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.