摘要: // jQuery.event.swipe // 0.5 // Stephen Band // Dependencies // jQuery.event.move 1.2 // One of swipeleft, swiperight, swipeup or swipedown is trigger 阅读全文
posted @ 2014-04-14 10:37 star丶清影 阅读(15690) 评论(0) 推荐(0)
摘要: 1 #include "stdafx.h" 2 #include "CStringHelper.h" 3 #include "AFileEngine.h" 4 #include "CFilePacket.h" 5 #include 6 #pragma comment(lib,"Ws2_32.lib") 7 #include 8 9 void ExecuteCallBack(Json::Value iResponse,Json::FastWriter iWriter,VARIANT lpCallB 阅读全文
posted @ 2014-04-05 00:06 star丶清影 阅读(1726) 评论(0) 推荐(0)
摘要: #region 以下函数用于忽略大小写替换操作 public static string Replace(string Expression, string Find, string Replacement) { return Replace(Expression, Find, Replacement, StringComparison.OrdinalIgnoreCase); } public static string Replace(string Expression, string Find, s... 阅读全文
posted @ 2014-01-10 00:57 star丶清影 阅读(3494) 评论(0) 推荐(0)
摘要: 原来公司的一段代码,现在给朋友写的软件里也用上了,看样用处挺多,所以保存一下。自定义属性类:using System;using System.Collections.Generic;using System.Text;using System.Drawing.Design;using System.Windows.Forms.Design;using System.Windows.Forms;namespace MaoYoo.ChinaMobile.Core.PropertyGridUI{ public class PropertyGridFileSelector:UITypeEdit... 阅读全文
posted @ 2014-01-10 00:49 star丶清影 阅读(2470) 评论(0) 推荐(0)
摘要: 最近公司的产品需要使用ActiveX文件上传。讨论了基本所有的技术,最后还是决定C++搞个ActiveX。。。但上传的回调费了半天劲,才搞定。代码如下STDMETHODIMP CFileSelector::TestJSInvoke(VARIANT scriptCallback){ AFX_MANAGE_STATE(AfxGetStaticModuleState()); CComPtr spCallback; if(scriptCallback.vt == VT_DISPATCH) spCallback = scriptCallback.pdispVal; CComVariant avarPa. 阅读全文
posted @ 2014-01-09 22:23 star丶清影 阅读(1615) 评论(0) 推荐(0)
摘要: 为了公司的项目,小的我各种折腾啊,不过高兴的是实现了Silverlight直接提交至阿里云OSS的文件上传,文件上传再也不用通过服务器中转了。研究SDK发现还有个Node-oss.js,但还没进行测试。哪天搞一下。成功的话再搞上来。。。明天还得研究基于ActionScript 2.0/3.0直接上传至阿里云OSS。有得搞了。。。不废话了,把Silverlight上传OSS的代码贴这里,也许大家很多人需要吧。using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.W 阅读全文
posted @ 2014-01-04 01:55 star丶清影 阅读(1404) 评论(13) 推荐(0)
摘要: $.fn.numeral=function(bl){//限制金额输入、兼容浏览器、屏蔽粘贴拖拽等 $(this).keypress(function(e){ var keyCode=e.keyCode?e.keyCode:e.which; if(bl){//浮点数 if((this.value.length==0 || this.value.indexOf(".")!=-1) && keyCode==46) return false; return keyCode>=48&&keyCode=48&&keyCode< 阅读全文
posted @ 2013-12-24 14:32 star丶清影 阅读(2016) 评论(2) 推荐(0)
摘要: 项目中用到的,获取已知年份的第一天和最后一天,觉得网来的不错,留下做个备用。1.一个月第一天的SELECT DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)2.本周的星期一SELECT DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)3.一年的第一天SELECT DATEADD(yy, DATEDIFF(yy,0,getdate()), 0)4.季度的第一天SELECT DATEADD(qq, DATEDIFF(qq,0,getdate()), 0)5.当天的半夜SELECT DATEADD(dd, DATEDIFF(dd,0,g 阅读全文
posted @ 2013-12-16 17:56 star丶清影 阅读(683) 评论(0) 推荐(0)
摘要: function SetTextAreaMaxLength(controlId,length){ // JScript File for TextArea // Keep user from entering more than maxLength characters function doKeypress(control,length){ maxLength = length; value = control.value; if(maxLength && value.length > maxLength-1){ ... 阅读全文
posted @ 2013-12-08 01:36 star丶清影 阅读(479) 评论(0) 推荐(0)
摘要: 首先说,这篇文章是很久以前为了玩成某游戏的HOOK找到的资料,虽然一直没用上,但是还是让我保留下来了。直接贴上了。。看不懂也不要问我,我都没看。也许看得懂的人对他们来说这是一个思路,不懂的就当垃圾文不看就好。。我们要想拥有自己的窗口,那么就必须在诸仙的进程启动之前得到Direct3DCreate8接口(诸仙用Direct3D8)。所以启动过程如下://启动诸仙并获取诸仙进程句柄 ZhuXianProc.OpenExe("C:\\游戏目录\\诛仙\\element\\elementclient.exe"); if(!ZhuXianProc.GetProcess()) { Me 阅读全文
posted @ 2013-08-17 21:42 star丶清影 阅读(6209) 评论(0) 推荐(0)
摘要: 在这两年工作中的项目中越来越多的接触WPF控件的开发工作,同样也大量的用到了WPF的RoutedEvent事件,但每次需要编写的时候,总要翻以前的代码,所以在这里直接记录下来,免得自己再查来查去了。。 public static readonly DependencyProperty PageIndexProperty = DependencyProperty.Register("PageIndex", typeof(int), typeof(MoonPdfPanel), new UIPropertyMetadata(1)); public i... 阅读全文
posted @ 2013-07-22 16:13 star丶清影 阅读(6573) 评论(0) 推荐(0)
摘要: 最近在一家某电力外派公司开发相关于GIS的功能,在实现代码的过程中出现了一些常见的问题比如:1、跨线程执行窗体或控件操作(直接使用委拖)2、异步模式执行某长时间耗时方法经过一系列摸索可算找到解决方案,这里就记录一下两个重要的东西的使用方法// 跨窗体或控件执行某个窗体的方法(使用委拖)public void Main(string[] args){ Invoke(new MethodInvoker(delegate() { // 这里是要执行的方法或相关操作 }));}// APM模式异步带参数实现public void Main(string[] args){ Action action . 阅读全文
posted @ 2013-07-17 11:44 star丶清影 阅读(313) 评论(0) 推荐(0)
摘要: WIS(Well Information Standard)是中国石油天然气总公司推出的Forward 测井处理平台所采用的一种测井数据记录格式,WIS 数据格式可记录以下测井数据: ⑴ 常规测井曲线(深度连续)。 ⑵ 点测井斜曲线(深度不连续)。 ⑶ 波形数据(深度连续,时间连续,时间范围相同)。 ⑷ 地层测试数据(深度离散,时间连续,时间范围不定)。 ⑸ 生产测井数据(时间离散(不同次测井),深度离散,时 间离散)。 ⑹ 二维表格数据。 ⑺ 二进制数据流(参数文件,图片,其他各种数据... 阅读全文
posted @ 2012-12-18 00:21 star丶清影 阅读(3306) 评论(0) 推荐(0)
摘要: 最近一直为文件内存映射发愁,整个两周一直折腾这个东西。在64位系统和32位系统还要针对内存的高低位进行计算。好麻烦。。还是没搞定偶然从MSDN上发现.NET 4.0把内存文件映射加到了.NET类库中。。好像方便了很多啊。。比用C#直接调用WINDOWS API方便多了。所以这个必须果断记录之。。。项目马上要用,为了加强内存数据交换的效率。。这个。。。必须啊。。任务使用的方法或属性MemoryMappedFile object that represents a persisted memory-mapped file from a file on disk.' data-guid=&q 阅读全文
posted @ 2012-11-25 01:30 star丶清影 阅读(3340) 评论(0) 推荐(0)
摘要: 数据类型 别名 占用字节 说明 C++数据类型 开始范围 结束范围 byte Byte 1 8位的无符号整数 char 0 255 sbyte Sbyte 1 8位的有符号整数 signed char -128 127 short Int16 2 16位的有符号整数 short -32768 32767 ushort UInt16 2 16位的无符号整数 unsigned short 0 655... 阅读全文
posted @ 2012-11-23 12:37 star丶清影 阅读(365) 评论(0) 推荐(0)
摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;4usingSystem.Web;5usingSystem.Collections.Specialized;6usingeBriny.Framework.Core;78namespaceeBriny.Framework.Web9{10///<summary>11///HttpContext处理类12///</summary>13publicclassHttpContextHelper14{15privatestaticHttpContextHe 阅读全文
posted @ 2012-08-14 01:06 star丶清影 阅读(1130) 评论(0) 推荐(0)
摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;4usingSystem.Xml.Serialization;5usingSystem.IO;6usingSystem.Runtime.Serialization.Formatters.Soap;7usingSystem.Runtime.Serialization.Formatters.Binary;8usingSystem.Runtime.Remoting.Messaging;9usingSystem.Runtime.Serialization;1011namesp 阅读全文
posted @ 2012-07-02 17:35 star丶清影 阅读(629) 评论(0) 推荐(0)
摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;4usingSystem.Data.Common;5usingSystem.Configuration;6usingSystem.Data;78namespaceECS.TestProject9{10classProgram11{12staticvoidMain(string[]args)13{14ConnectionStringSettingssettings=ConfigurationManager.ConnectionStrings["DB" 阅读全文
posted @ 2012-07-02 17:22 star丶清影 阅读(3255) 评论(0) 推荐(0)
摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;4usingSystem.Net;5usingSystem.Net.Sockets;6usingSystem.Threading;7usingSystem.IO;89namespaceCSocketServer10{11publicclassSocketObject12{13publicSocketCSocket=null;14publicconstintBufferSize=8;15publicbyte[]Buffer=newbyte[BufferSize];16p 阅读全文
posted @ 2012-07-02 17:19 star丶清影 阅读(823) 评论(0) 推荐(0)
摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSystem.Text;5usingSystem.Net;6usingSystem.Net.Sockets;7usingDevSDK.Net.Sockets;8usingSystem.IO;910namespaceConsoleApplication111{12classProgram13{14staticHttpListenersSocket=null;1516staticvoidMain(string[]args)17{18sSocket=newHtt 阅读全文
posted @ 2012-03-07 03:31 star丶清影 阅读(14266) 评论(7) 推荐(0)