摘要: 原创文章,转载请注明:MyEclipse下Struts2配置使用和Ajax、JSON的配合 By Lucio.Yang 新手,初学Struts2的配置,同时尝试与Ajax通过JSON交互。首先介绍MyEclipse下Struts2的配置。 1.Struts2的配置 右键项目,MyEclips->pr 阅读全文
posted @ 2015-03-09 09:26 Lucio.Yang 阅读(636) 评论(0) 推荐(1) 编辑
摘要: 原创文章,转载请注明:JavaScript中的闭包理解 By Lucio.Yang 1.JavaScript闭包 在小学期开发项目的时候,用node.js开发了服务器,过程中遇到了node.js的第一个陷阱:由事件和回调函数形成的特殊的循环。解决这个问题时我使用了创建闭包的方法,当然如果不需要控制循 阅读全文
posted @ 2014-10-24 12:16 Lucio.Yang 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 原创文章,转载请注明原文:MFC通过ODBC连接mysql(使用VS2012编写MFC) By Lucio.Yang 1.ODBC连接mysql 首先ODBC是什么呢? 开放数据库互连(Open Database Connectivity,ODBC)是微软公司开放服务结构(WOSA,Windows 阅读全文
posted @ 2014-07-17 09:45 Lucio.Yang 阅读(3101) 评论(0) 推荐(1) 编辑
摘要: Do not go gentle into that good night By:Dylan Thomas Do not go gentle into that good night,Old age should burn and rave at close of day;Rage, rage ag 阅读全文
posted @ 2016-04-18 15:02 Lucio.Yang 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 1.环境变量-系统变量: Path添加:;D:\worksoftware\mysql-5.7.11\bin 2.配置更改:my-default.ini,注意是ANSI编码 添加 #(mysql所在目录) basedir=D:\worksoftware\mysql-5.7.11 #mysql所在目录\ 阅读全文
posted @ 2016-04-05 11:49 Lucio.Yang 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 使用标准库的栈和队列时,先包含相关的头文件 #include<stack> #include<queue> 定义栈如下: stack<int> stk; 定义队列如下: queue<int> q; 栈提供了如下的操作 s.empty();//如果栈为空返回true,否则返回false s.size( 阅读全文
posted @ 2016-03-16 14:15 Lucio.Yang 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 要想使用标准C++中string类,必须要包含 #include <string>// 注意是<string>,不是<string.h>,带.h的是C语言中的头文件 using std::string; using std::wstring; 或 using namespace std; strin 阅读全文
posted @ 2016-03-16 10:39 Lucio.Yang 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 描述: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following seq 阅读全文
posted @ 2016-02-26 20:59 Lucio.Yang 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 原创文章,转载请注明:全排列的编码与解码:康托展开 By Lucio.Yang 一、康托展开:全排列到一个自然数的双射 X=an*(n-1)!+an-1*(n-2)!+...+ai*(i-1)!+...+a2*1!+a1*0!,ai为整数,并且0<=ai<i(1<=i<=n) 适用范围:没有重复元素 阅读全文
posted @ 2016-02-26 20:55 Lucio.Yang 阅读(1214) 评论(0) 推荐(2) 编辑
摘要: 描述: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not po 阅读全文
posted @ 2016-02-26 11:36 Lucio.Yang 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: 1.简介 随着C++0x标准的确立,C++的标准库中也终于有了hash table这个东西。很久以来,STL中都只提供<map>作为存放对应关系的容器,内部通常用红黑树实现,据说原因是二叉平衡树(如红黑树)的各种操作,插入、删除、查找等,都是稳定的时间复杂度,即O(log n);但是对于hash表来 阅读全文
posted @ 2016-02-25 11:06 Lucio.Yang 阅读(26797) 评论(0) 推荐(0) 编辑
摘要: 部分内容转自:C++ vector用法 在c++中,vector是一个十分有用的容器,下面对这个容器做一下总结。 1.基本操作 (1)头文件#include<vector>. (2)创建vector对象,vector<int> vec; (3)尾部插入数字:vec.push_back(a); 初次访 阅读全文
posted @ 2016-02-24 11:11 Lucio.Yang 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 原创文章,转载请注明:Java和JavaScript的时间互传 By Lucio.Yang 1.从JavaScript到Java JavaScript: Java: 2.从Java到JavaScript Java: JavaScript: 而后可以参考W3School-JavaScript Date 阅读全文
posted @ 2015-09-18 17:37 Lucio.Yang 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 今天写SSH的工程的时候,执行到一个DAO中的Query query = session.createQuery(hql)的时候,没有成功执行,直接跳到了finally,然后前台报了500和java.lang.reflect.InvocationTargetException的错误。 代码如下: 然 阅读全文
posted @ 2015-09-15 19:40 Lucio.Yang 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://gocom.primeton.com/blog21307_27051.htm 我以前在写<A>的href和onclick一直很随意,后来出过几次问题,以后才开始重视这个问题: 在Javascript中void是一个操作符,该操作符指定要计算一个表达式但是不返回值。 void 操 阅读全文
posted @ 2015-09-13 11:54 Lucio.Yang 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 转载自:毫秒必争,前端网页性能最佳实践-微软互联网开发支持 参考:Best Practices for Speeding Up Your Web Site-yahoo developer 你愿意为打开一个网页等待多长时间?我一秒也不愿意等。但是事实上大多数网站在响应速度方面都让人失望。现在越来越多的 阅读全文
posted @ 2015-09-13 11:47 Lucio.Yang 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 描述: Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the 阅读全文
posted @ 2015-08-30 22:11 Lucio.Yang 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 描述: Suppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a card is a pos 阅读全文
posted @ 2015-08-30 18:31 Lucio.Yang 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 这个主题很漂亮,不过为了迎合自己的喜好ヽ(•̀ω•́ )ゝ,修改了字号、阴影之类的小细节。同时下面还有我博客里面的两个有意思的小挂件,请向右边看(๑و•̀ω•́)و 1.主题修改:复制下面的css代码到设置-页面定制css代码(前提是博客皮肤选择了codinglife)。 2.博客挂件:复制下面的h 阅读全文
posted @ 2015-08-30 12:26 Lucio.Yang 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 描述: Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within 阅读全文
posted @ 2015-08-30 10:45 Lucio.Yang 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 描述: There are many magic numbers whose lengths are less than 10. Given some queries, each contains a single number, if the Levenshtein distance (see b 阅读全文
posted @ 2015-08-26 12:04 Lucio.Yang 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 描述: The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they beco 阅读全文
posted @ 2015-08-23 19:29 Lucio.Yang 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 描述: A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> anothe 阅读全文
posted @ 2015-08-21 21:03 Lucio.Yang 阅读(143) 评论(0) 推荐(0) 编辑