摘要: 1、建立数据库连接:createConnection(Object)方法 该方法接受一个对象作为参数,该对象有四个常用的属性host,user,password,database。与php中链接数据库的参数相同。属性列表如下: 还可以使用字符串连接数据库例如: 2、结束数据库连接end()和dest 阅读全文
posted @ 2017-09-29 19:43 风叙 阅读(372) 评论(0) 推荐(0)
摘要: 其实想做游戏很久了,只是一直碍于工作及懒癌^-^,没有动手实施。 最近又升起了做游戏的念头,便想动手实践一下,作为新人,我应该从2D游戏入手,那么首先想到的工具当然是Cocos2dx,其官方推出了新的IDE:Cocos Creator。目前最新的版本是 Cocos Creator 1.5.1。 下面 阅读全文
posted @ 2017-07-12 14:18 风叙 阅读(1935) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem;usingSystem.Collections.Generic;usingSystem.Threading;namespacepLib{publicclassMSQueue&l... 阅读全文
posted @ 2010-07-01 14:37 风叙 阅读(1000) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///GB2312的拼音算法,不支持多音字///</summary>publicclassGB2Alpha{publicstaticvoidGetAlp... 阅读全文
posted @ 2010-07-01 12:35 风叙 阅读(267) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///微软桌面操作系统版本///</summary>publicenumOSVersion{UnKnown=0,Windows95=1,Windows9... 阅读全文
posted @ 2010-07-01 12:25 风叙 阅读(155) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///<code>///byte数组///本类实例和socket配对///仅用于储存网络缓存数据///</code>///</summ... 阅读全文
posted @ 2010-07-01 12:23 风叙 阅读(253) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--publicstaticboolIsNumber(stringinString){if(string.IsNullOrEmpty(inString))returnfalse;Regexregex=ne... 阅读全文
posted @ 2010-07-01 12:21 风叙 阅读(121) 评论(0) 推荐(0)
摘要: /// <summary> /// 获取当前socket连接所属网卡的MAC地址 /// </summary> /// <returns></returns> public static string GetNetCardMacAddress() { System.Management.ManagementClass mc; System.M... 阅读全文
posted @ 2010-07-01 12:19 风叙 阅读(603) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///char[]转换为string///</summary>publicstaticstringCharsToStr(char[]buff){stri... 阅读全文
posted @ 2010-07-01 12:18 风叙 阅读(129) 评论(0) 推荐(0)
摘要: c#中要让struct转换为byte[],首先要在struct申明中说明struct的结构,如下:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///数据包内容的头信息///</summary>[... 阅读全文
posted @ 2010-07-01 12:16 风叙 阅读(6760) 评论(0) 推荐(2)