Search This Blog

Thursday, January 24, 2008

You can convert a coldfusion string to a Java array of bytes using the .getBytes hidden function

<Cfset variables.aBytes = variables.cString.getBytes() />

Thursday, January 3, 2008

Converting russian characters too URL hexadecimal characters

The binary code should be of the following format

// The position in the Unicode table tells us how many bytes are needed.
// Note that if we talk about first, second, etc. in the following, we are
// counting from left to right:
//
// Position in | Bytes needed | Binary representation
// Unicode table | for UTF-8 | of UTF-8
// ----------------------------------------------------------
// 0 - 127 | 1 byte | 0XXX.XXXX
// 128 - 2047 | 2 bytes | 110X.XXXX 10XX.XXXX
// 2048 - 65535 | 3 bytes | 1110.XXXX 10XX.XXXX 10XX.XXXX
// 65536 - 2097151 | 4 bytes | 1111.0XXX 10XX.XXXX 10XX.XXXX 10XX.XXXX
You can retrieve the last executed queries from the database using the query

SELECT deqs.last_execution_time AS [Time], dest.text AS [Query],deqs.*
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC