2016年1月5日

摘要: 先说一下background前段时间想实现一个Sqlite localstorage的功能,对应不同的Model 实体有不同的table, 每一次sql操作的函数签名中会有model实体中的struct结构作为参数,struct完全不同,无法抽象,如何实现呢?方式1:每一次操作实现一个函数,如upd... 阅读全文

posted @ 2016-01-05 12:37 leon_ALiang 阅读(5448) 评论(0) 推荐(0) 编辑


2014年1月9日

摘要: solution 1: http://grokbase.com/t/tomcat/users/111d593qft/tomcat-6-0-gzip-compression-not-working-for-large-js-filessolution 2:Addthe custom gzip filterhttp://darrenzhu.iteye.com/blog/1894261 阅读全文

posted @ 2014-01-09 23:06 leon_ALiang 阅读(291) 评论(0) 推荐(0) 编辑


2013年11月28日

摘要: 1 int main(int argc, char **argv) { 2 3 std::string reportDir; 4 std::string transURL; 5 std::string visualElement; 6 std::string outputFile; 7 std::string outputType; 8 static std::string SASFontsLoc; 9 static std::string SASResLoc;10 static std::string SASLocale;... 阅读全文

posted @ 2013-11-28 17:12 leon_ALiang 阅读(248) 评论(0) 推荐(0) 编辑


2012年10月18日

摘要: OpenGL ES2需要的库:libGLESv2, libEGL其中libEGL是用于和不同系统的窗口打交道的,是一个标准。如果需要让你显示在窗口中,如调用eglCreateWindowSurface;若off-screen,则eglCreatePbufferSurface。直接上一下代码:void esInitContext(ESContext *esContext){ if ( esContext != NULL ) { memset( esContext, 0, sizeof( ESContext) ); }}GLboolean esCreateOffScreen(... 阅读全文

posted @ 2012-10-18 15:28 leon_ALiang 阅读(2662) 评论(0) 推荐(0) 编辑


2012年8月15日

摘要: 回调用于层间协作,上层将本层函数安装在下层,这个函数就是回调,而下层在一定条件下触发回调,例如作为一个驱动,是一个底层,他在收到一个数据时,除了 完成本层的处理工作外,还将进行回调,将这个数据交给上层应用层来做进一步处理,这在分层的数据通信中很普遍。其实回调和API非常接近,他们的共性都是 跨层调用的函数。但区别是API是低层提供给高层的调用,一般这个函数对高层都是已知的;而回调正好相反,他是高层提供给底层的调用,对于低层他是未知 的,必须由高层进行安装,这个安装函数其实就是一个低层提供的API,安装后低层不知道这个回调的名字,但它通过一个函数指针来保存这个回调,在需要调用 时,只需引用这个函 阅读全文

posted @ 2012-08-15 15:17 leon_ALiang 阅读(241) 评论(0) 推荐(0) 编辑


2012年7月20日

摘要: 利用centOS源:rpm -aq|grep yum|xargs rpm -e --nodepsrpm -ivhhttp://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpmrpm -ivhhttp://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpmrpm -ivhhttp://mirrors.163.com/centos/6/os/x86_64/P 阅读全文

posted @ 2012-07-20 16:05 leon_ALiang 阅读(205) 评论(0) 推荐(0) 编辑


2012年7月18日

摘要: 艰辛!!!由于最近项目需要接触OpenGL,实现软件渲染,Mesa则是OpenGL的开源实现。网址:www.mesa3d.org1.下载MesaLib-8.0.4.tar.gz,mesa-demos-8.0.1.tar.gz; 并解压2. 安装Meas-8.0.41> ./configure, error:makedepend is required to build Mesasudo apt-get install xutils-dev2> ./configure, error: flex is needed to build Mesasudo apt-get install f 阅读全文

posted @ 2012-07-18 19:49 leon_ALiang 阅读(3786) 评论(0) 推荐(0) 编辑


2012年7月2日

摘要: class Class2 { static void Main(string[] args) { Exception exception = null; Thread thread = new Thread(() => SafeExecute(() => Test(0, 0), out exception)); Console.WriteLine(Thread.CurrentThread.ManagedThreadId); thread.Start(); thread.... 阅读全文

posted @ 2012-07-02 15:35 leon_ALiang 阅读(310) 评论(0) 推荐(0) 编辑


2012年6月13日

摘要: Theimplicitkeyword is used to declare an implicit user-defined type conversion operator.http://msdn.microsoft.com/en-us/library/z5z9kes2(v=vs.71).aspx之前一直没有用过,最近项目中用到,发现隐式转化还是很有用的,尤其是在代码重构的过程中。举个简单的例子:在原先的代码中,某一个数据成员一直是String类型,但由于需求变化,我们需要将用到该数据成员的某些scenario变化为CustomList类型。这时候我们首先需要实现一个CustomList类型 阅读全文

posted @ 2012-06-13 13:16 leon_ALiang 阅读(505) 评论(0) 推荐(0) 编辑


2012年5月15日

摘要: C# []、List、Array、ArrayList 区别及应用[] 是针对特定类型、固定长度的。List是针对特定类型、任意长度的。Array 是针对任意类型、固定长度的。ArrayList是针对任意类型、任意长度的。Array 和 ArrayList 是通过存储 object 实现任意类型的,所以使用时要转换。应用示例usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem 阅读全文

posted @ 2012-05-15 16:31 leon_ALiang 阅读(248) 评论(0) 推荐(0) 编辑


Copyright © 2024 leon_ALiang
Powered by .NET 8.0 on Kubernetes