private byte[] CRC(byte[] x, int len) //CRC校验函数 { byte[] temdata = new byte[2]; UInt16 crc = 0; byte da; ...
当提及指针时,我们通常认为它是可以用void * 指针表示的在x86_64架构上占用8字节的东西。例如, 维基百科有一篇 关于x86_64的文章 中这样写道: Pushes and pops on the stack are always in 8-byte strides, and pointe....
分类:
编程语言 时间:
2014-12-04 13:54:04
阅读次数:
178
结构体原型:typedef struct tagLOGFONT{ // lf LONG lfHeight;LONG lfWidth;LONG lfEscapement;LONG lfOrientation;LONG lfWeight;BYTE lfItalic;BYTE lfUnderline;BY...
首先明确一点:就是值类型变量(bool byte char decimal double enum float int long sbyte short struct uint ulong ushort)是存储在栈上的(是先进后出的数据结构),它是由OS管理的,即出了作用域,操作系统自动释放相关内存...
分类:
Web程序 时间:
2014-12-04 13:30:06
阅读次数:
215
编码:String->byte[]; str.getBytes(charsetName)解码:byte[]->String; new String(byte[],charsetName);package pack;import java.io.UnsupportedEncodingException...
分类:
编程语言 时间:
2014-12-04 08:47:03
阅读次数:
179
python在安装时,默认的编码是ascii,当程序中出现非ascii编码时,python的处理常常会报这样的错UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1: ordinal not in range(1...
分类:
编程语言 时间:
2014-12-03 23:00:32
阅读次数:
211
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
namespace_3.变量
{
classProgram
{
staticvoidMain(string[]args)
{
//整数类型
sbytemySbyte=45;
bytemyByte=(byte)mySbyte;
Console.WriteLine("mySbyte={0}",mySbyte);
Console.Write..
分类:
其他好文 时间:
2014-12-03 01:54:08
阅读次数:
126
当我们讨论指针时,通常假设它是一种可以用void *指针来表示的东西,在 x86_64 平台下是 8 个字节大小。例如,下面是来自维基百科中关于 x86_64 的文章的摘录:Pushes and pops on the stack are always in 8-byte strides, andp...
分类:
编程语言 时间:
2014-12-03 00:07:50
阅读次数:
156
最近在看mysql优化视频及各方帖子,其中有建议为字段选取合适的整型类型,在看int、bigint、smallint和tinyint的选取的时候有点迷惑,刚刚弄清楚,这里分享一下这里先得说下基础知识,1字节(Byte)占8个位(bit),1个位表示一个二进制的0或者1,1个字节能表示最大的整数是255,怎..
分类:
数据库 时间:
2014-12-02 17:36:20
阅读次数:
142
ASP.NET常用加密解密方法一、MD5加密解密1、加密C# 代码 public static string ToMd5(string clearString) { Byte[] clearBytes = System.Text.Encoding.Unicode.GetBytes(clearStr....
分类:
Web程序 时间:
2014-12-02 14:48:36
阅读次数:
134