第71号元素 【Lu】 镥 Lutetium

第71号元素

镥是一种银白色的抗侵蚀的三价的金属,是熔点最高的镧系元素,是最重、最硬、原子半径最小的稀土元素。

wikipedia

镥发现于1906年

May 2012
M T W T F S S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  

网站管理

SQLite读写二进制数据

- (MRecTemplate*)GetDataRecTemplate
{
MRecTemplate* data = [[[MRecTemplate alloc] init] autorelease];

sqlite3_stmt* stmt;
NSString* str = @”SELECT * FROM RecTemplates”;
int nResult = sqlite3_prepare_v2(m_db, [str UTF8String], -1, &stmt, NULL);
if (nResult == SQLITE_OK)
{
if (sqlite3_step(stmt) == SQLITE_ROW)
{
int i = 0;
. . . → Read More: SQLite读写二进制数据

Database is in transition. Try the statement later.

–get the dbid which is in Transition mode, check the status is 0 or not.

select * from sys.databases where name =

–if status is not zero reset db status

exec sp_resetstatus

–look for blocking spid or IF WaitRsource column has that DBID

select * from sys.sysprocesses

–Look for waitresource column if that dbid is blocking

select * from sys.dm_exec_requests

–kill the sp . . . → Read More: Database is in transition. Try the statement later.

SQL Server Base64编码

CREATE FUNCTION ToBase64 (@Input varchar(6000))
RETURNS varchar(8000)
AS
BEGIN
DECLARE
@Output varchar(8000),
@Bits varbinary(3),
@Pos int
SET @Pos = 1
SET @Output = ”
WHILE @Pos . . . → Read More: SQL Server Base64编码

SQL Server十六进制字符串转二进制

CREATE FUNCTION dbo.HexStrToVarBin(@hexstr VARCHAR(max))
RETURNS varbinary(max)
AS

BEGIN
DECLARE @hex CHAR(2), @i INT, @count INT, @b varbinary(max), @odd BIT, @start bit
SET @count = LEN(@hexstr)
SET @start = 1
SET @b = CAST(” AS varbinary(1))
IF SUBSTRING(@hexstr, 1, 2) = ‘0x’
SET @i = 3
ELSE
SET @i = 1
SET @odd = CAST(LEN(SUBSTRING(@hexstr, @i . . . → Read More: SQL Server十六进制字符串转二进制

用VBS将Access数据库表结构转SQL语句

Sub Class1()
Dim db As Database
Dim tdf As TableDef
Dim fld As DAO.Field
Dim ndx As DAO.Index
Dim strSQL As String
Dim strFlds As String
Dim strCn As String

Dim fs, f

Set db = CurrentDb

Set fs = CreateObject(“Scripting.FileSystemObject”)
Set f = fs.CreateTextFile(“D:\Schema.txt”)

For Each tdf In db.TableDefs
If Left . . . → Read More: 用VBS将Access数据库表结构转SQL语句

Sql Server枚举表结构

–输入参数
–@tableName

SELECT column_name=syscolumns.name, datatype=systypes.name, length=syscolumns.length
FROM sysobjects
JOIN syscolumns ON sysobjects.id = syscolumns.id
JOIN systypes ON syscolumns.xtype=systypes.xtype
WHERE sysobjects.xtype=’U’
AND sysobjects.name=@tableName
ANDsystypes.name <> ’sysname’
ANDsyscolumns.name <> ‘isactive’ . . . → Read More: Sql Server枚举表结构

Sql Server读取ADO样式的XML文件

–存储过程输入参数
–@Path varchar(500)
–@FileName varchar(500)

set @sql = ‘DECLARE @idoc int ‘
set @sql += ‘DECLARE @xmlDocument varchar(MAX) ‘
set @sql += ‘DECLARE @Status int’

set @sql += ’set @xmlDocument = dbo.ufsReadfileAsString(‘ + char(39) + @Path + char(39) + ‘,’ + char(39) + @FileName + char(39) + ‘) ‘

set @sql += ‘EXEC @Status = sp_xml_preparedocument @idoc OUTPUT, . . . → Read More: Sql Server读取ADO样式的XML文件

wxWidgets Contributing

Original URL: http://ftp.sunet.se/wmirror/wxwidgets.org/develop2.htm

The wxWidgets Community

These pages are for people involved in, or thinking of becoming involved in, contributing code or other effort to wxWidgets. If you’re a satisfied wxWidgets user, please help spread the word by adding a ‘Built with wxWidgets’ icon to your site, linking to www.wxwidgets.org.
Communicating
. . . → Read More: wxWidgets Contributing

VBS调用Web Service

简单类型调用soapsdk:

dim oSoap
set oSoap = createobject(“MSSOAP.SOAPClient30″)
on error resume next
oSoap.mssoapinit(“http://www.MyService.com/MyService/MyService.asmx?wsdl”)
if err then
wscript.echo oSoap.faultString
wscript.echo oSoap.detail
end if
wscript.echo oSoap.getServerDateTime()‘括号里可以放web service的参数,用逗号分隔,或用一个xm . . . → Read More: VBS调用Web Service

VC++中与.Net RijndaelManaged等价的加密解密算法

.Net中定义RijndaelManaged的key和iv
Public ReadOnly key As Byte() = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
Public ReadOnly IV As Byte() = {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}

.Net这么做
Dim Buf As Byte()//函数传人参数,加密的二进制数据
Imports System.Security.Cryptography
Dim _ms As New MemoryStream(Buf)
Dim _RMCrypto As N . . . → Read More: VC++中与.Net RijndaelManaged等价的加密解密算法