自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(171)
  • 资源 (6)
  • 收藏
  • 关注

原创 用MeCab解决日文汉字的排序问题

#### 要对一份Excle存在的上K条由日语汉字组成的书名按50音排序。1. 尝试直接用中文系统环境下的Excle直接排序 (Windows也应该是针对每个字符对应的编码顺序进行排序的。明显地看假名排在汉字前面)2. 尝试用日语操作环境下的Excle排序功能(貌似非日语环境下输入的内容无法提取假名)3. 尝试用C#的本地化排序 [↗](http://stackoverflow.c

2013-07-08 15:20:54 3292

原创 Python编写WebService SOAP之原型

REST也没有同一的标准,因而也就没有什么快速开发工具可用。REST对查询(任何可转换为数据的东西)和简单的状态修改上比较方便;另外,所谓的方便仅指客户端调用方便,对于服务器端实现来说,都是一样的。  为什么不用普通的http get方式实现:因为get传递的数据有长度限制。为什么不用普通的http post方式实现:post比get好一点,没有长度的问题,但是post的数据在服务器端解析起来

2013-07-08 15:12:25 4131

原创 Python笔试题

题目全部来自于网络,答案为个人解答和收集,因此不保证其正确和完备性,写此文是为了整理下之前学过的知识点,作复习为之。希望能够和大家一起讨论下有关Python的问题,但博主不承担任何人因采用本文内部分或完全内容而带来的任何损失。1,是否知道动态语言(Python)中的鸭子类型?#“当看到一只鸟走起来像鸭子、游泳起来像鸭子、叫起来也像鸭子,那么这只鸟就可以被称为鸭子。”#Th

2012-04-23 15:39:46 5585 1

原创 Git错误non-fast-forward后的冲突解决

当要push代码到git时,出现提示:error:failed to push some refs to ...Dealing with “non-fast-forward” errorsFrom time to time you may encounter this error while pushing:$ git push origin masterTo ../remo

2012-04-19 10:55:26 108520 5

原创 水晶报表中图表形式显示CSV数据

水晶报表支持以csv文件作为数据源,导入数据。打开CrystalReport 2008,创建新连接——Access/Excel(DAO),数据库类型选择“文本”,然后导入.csv文件即可。顺便一提,水晶报表会自动识别csv第一行数据作为变量名称。插入报表,在报表专家内进行如下设置:Y是我自行设置的公式字段引用。不自己增加一个新字段的话会直接显示Y的和如果curve_2_cs

2012-04-18 15:25:22 2624 1

原创 VS2010动态生成水晶报表

废话不说,直接上干货1,在VS2010.NET中想要使用CrystalReport Viewer 13.0 必须先去SAP官网下载免费的插件:CRforVS_13_0_3.exe。2,用Visual C#新建一个WinForm,在工具栏--组件--右击“选择项...”在出现的一堆列表中选择3,在IDE的菜单上方,选择XXX项目--属性--目标框架。可能是从原来的“.NET Framew

2012-04-17 14:19:27 4707

原创 Win::gVim配置Python编译环境(轻量级

Vim初学2天,上午花了1个多小时简单地把Vim对Python的编译环境搭建起来了以下是作分享与笔记(我自己配置环境之花了1个小时,写这篇东西倒花了1个多小时……)按流程开始配置自己的Vim30分钟可以搞定,第2遍相信更快 下载各种插件首先去www.vim.org下载Python相关插件plugin:1,python_fold 提供代码折叠功能2,NERD_tree 提

2012-04-10 15:22:05 12433 1

原创 Python学习总结,未完成,不断更新

#Decorator@deco1(deco_arg)@deco2def func():pass等价于 func=deco1(deco_arg)(deco2(func))另一种实现def deco(fun,arg): #dosomthing return fun(arg)@deco.__get__def fun():pass#反射机

2012-04-09 10:12:23 943

转载 10000 things all ICS students should do before graduating

It’s Commencement time! So I thought I’d compile a list of 1010 10000 things I believe all ICS students should have done (by  themselves) by the time they get their diplomas. With luck, students hav

2012-04-04 19:53:05 706

原创 Python3.X增加的关键字nonlocal

全局变量和别名Python里只有2种作用域:全局作用域和局部作用域。全局作用域是指当前代码所在模块的作用域,局部作用域是指当前函数或方法所在的作用域。其实准确来说,Python 3.x引入了nonlocal关键字,可以用于标识外部作用域的变量。局部作用域里的代码可以读外部作用域(包括全局作用域)里的变量,但不能更改它。一旦进行更改,就会将其当成是局部变量。而如果在更改前又进行了读取操作

2012-03-31 14:21:02 6500

原创 获取当前工作目录下某个文件的全路径

TCHAR tchBuffer[MAX_PATH]; LPTSTR lpszCurDir = tchBuffer; GetCurrentDirectory(MAX_PATH, lpszCurDir); CString cstrCurDir(lpszCurDir); CString cstrConfPath = cstrCurDir+ _T("\\yourFileName.xxx");

2012-03-09 14:15:56 572

原创 快速使用Github

1.下载Git的win版本:http://code.google.com/p/msysgit/2.安装Git,基本上都是Next step:http://help.github.com/win-set-up-git/3.接下来就是git shell4获取SSH Key  $ ssh-keygen -t rsa -C "[email protected]"

2012-03-04 21:37:57 729

原创 Python基础语法学习

函数声明以def开始,不指名具体的返回类型,但是通常都会有返回值,即使为空。函数声明后即可使用def approximate_size(size, a_kilobyte_is_1024_bytes=True):在 Python 里面,变量从来不会显式的指定类型。Python 会在内部算出一个变量的类型并进行跟踪。只要你有一个命名参数,它右边的所有参数也都需要是命名参数。

2012-03-02 18:28:11 627

原创 设计模式——备忘录模式_Memento Pattern

备忘录模式:Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.(在不破坏封闭的前提下,捕获一个对象的内部状态,并在该对象之外保存这个状态。这样以后就可将该对象恢复到原先

2012-01-18 13:10:54 527

原创 设计模式——命令模式_Command Pattern

命令模式:Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations(将一个请求封装成一个对象,从而让你使用不同的请求把客户端参数化,对请求排

2012-01-17 13:51:06 463

原创 设计模式——中介者模式_Mediator Pattern

中介者模式:Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicity, and it lets you vary their interac

2012-01-16 17:01:08 407

原创 设计模式——责任链模式_Chain of Responsibility Pattern

责任链模式:Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an

2012-01-12 14:08:49 402

原创 设计模式——迭代器模式_Iterator Pattern

迭代器模式:Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.(它提供一种方法访问一个容器对象中各个元素,而又不需要该对象的内部细节C++代码实现#ifndef __AGGREGATE__H

2012-01-10 17:23:53 399

原创 设计模式——访问者模式_Visitor Pattern

访问者模式:Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.(封装一些作用

2012-01-09 14:06:15 471

原创 设计模式——策略模式_Strategy Pattern

策略模式Define a family of algorithms, encapsulate each one, and make them interchangeable. (定义一组算法,将每个算法都封装起来,并且使它们之间可以互换。)UML类图C++代码实现#include using namespace std;class Strategy {pu

2011-12-02 13:13:31 737

原创 设计模式——适配器模式_Adapter Pattern

适配器模式,又称变压器模式,包装模式Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.(将一个类的接口变换成客户端

2011-11-30 14:20:40 742

原创 设计模式——组合模式_Composite Pattern

组合模式,又称合成模式,部分-整体模式(part-whole)Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.(将对象组合成

2011-11-29 14:19:10 416

原创 设计模式——模板模式_Template Pattern

模板方法模式Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's

2011-11-29 09:55:55 434

原创 设计模式——装饰模式_Decorator Pattern

装饰模式Attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternative to subclassing for extending functionality.(动态地给一个对象添加一些额外的职责,就增

2011-11-28 13:31:48 364

原创 设计模式——享元模式_Flyweight Pattern

享元模式:Use sharing to support large numbers of fine-grained objects efficiently. (使用共享对象可有效地支持大量的细粒度的对象。)UML类图:C++代码实现:#include #include #include using namespace std;class Fly

2011-11-25 19:59:44 386

原创 设计模式——外观模式_Facade Pattern

外观模式,又称门面模式。其实是为外部访问子系统而提供的一个窗口Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. (要求一个子系统的外部与其内部的通信必须

2011-11-24 15:04:05 424

原创 设计模式——代理模式_Proxy Pattern

代理模式Provide a surrogate or placeholder for anther object to control access to it.(为其他对象提供一种代理以控制对这个对象的访问。)UML类图C++代码实现#include using namespace std;class Subject {public: vir

2011-11-23 14:33:13 477

原创 设计模式——原型模式_Prototype Pattern

原型模式       Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.(用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。)UML类图C++代码实现

2011-11-22 14:11:14 406

原创 设计模式——观察者模式_Observer Pattern

观察者模式        Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. (定义对象间一种一对多的依赖关系,使得每当一个对象改变状态,则所有依赖于它的对

2011-11-22 10:42:57 355

原创 设计模式——建造者模式_Builder Pattern

建造者模式(或生成器模式)定义:Separate the construction of a complex object from its representation so that the same construction process can create different representations.(将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示

2011-11-18 16:08:03 388

原创 设计模式——单例模式_Singleton Pattern

单例模式定义:Ensure a class has only one instance, and provide a global point of access to it.(确保类只有一个实例,自行实例化并向整个系统提供这个实例)UML类图:C++实现代码:#include using namespace std;class MMORPG {p

2011-11-18 10:39:48 307

原创 设计模式——工厂方法模式_FactoryMethod

工厂方法模式Define an interface for creating an object, but let subclasses decide which class to instantiate Factory Method lets a class defer instantiation to subclasses.定义一个用于创建对象的接口,让子类决定实例化哪一个类。工厂方法

2011-11-17 13:07:16 408

原创 《代码整洁之道》读书笔记

代码整洁之道稍后等于永不(Later equals never)整洁的代码只做好一件事,代码只讲述事实,不引人猜测。在意代码重复,有意义的命名,小规模抽象*命名一旦发现有更好的名称,就换掉旧的只是为了满足编译器或解释器的需要而写代码,就会制造麻烦。(以数字系列,或废话ProductInfo或ProductData的区间,没区别)

2011-11-16 17:17:32 505

原创 《代码整洁之道》读书笔记

稍后等于永不(Later equals never)整洁的代码只做好一件事,代码只讲述事实,不引人猜测。在意代码重复,有意义的命名,小规模抽象*命名一旦发现有更好的名称,就换掉旧的只是为了满足编译器或解释器的需要而写代码,就会制造麻烦。(以数字系列,或废话ProductInfo或ProductData的区间,没区别)使用读得出来的名称使用

2011-11-16 17:16:11 70

原创 设计模式——抽象工厂模式_AbstractFactory

#include using namespace std;class Human {public: virtual void Talk(){ } virtual void GetColour() {} virtual void GetSex() {}};class AbstractYellowHuman {public: virtual void Talk() = 0;

2011-11-16 13:33:44 407

原创 DirectX3D 纹理贴图

//初始化部分// 创建一个cube g_Box = new Cube(g_Device); // 设置方向光源 D3DLIGHT9 light; ::ZeroMemory(&light, sizeof(light)); light.Type = D3DLIGHT_DIRECTIONAL; light.Type = D3DLIGHT_DIRECTIONAL;

2011-10-26 16:56:49 1052

原创 DirectX3D中绘制立方体

IDirect3DDevice9* g_Device = NULL;IDirect3DVertexBuffer9* g_VB = 0; //立方体顶点IDirect3DIndexBuffer9* g_IB = 0; //索引数据struct Vertex { Vertex(){} Vertex(float x, float y, float z) { _x = x; _y=y;

2011-10-24 15:58:07 1924

原创 第一个DirectX9.0 3D应用实例

/*需要包含以下库d3d9.libd3dx9.libwinmm.lib */#include namespace d3d { bool InitD3D(HWND hwd, HINSTANCE hInstance, //[in]应用程序实例 int width, int height,//[in]Back buffer尺寸 bool w

2011-10-24 14:21:02 754 1

原创 DirectX3D环境配置问题解决集中帖

问题1:fatal error C1083: 无法打开包括文件:“d3dx9”: No such file or directory需要自行把DirectX SDK的Include文件夹包含到项目中去。配置属性-->C/C++ --> 附加包含路径 --> ..\Microsoft DirectX SDK (February 2010)\Include

2011-10-24 12:00:22 722

原创 用粒子系统模拟烟花效果

//定义粒子系统状态#define PARTICLE_STATE_DEAD 0#define PARTICLE_STATE_ALIVE 1//定义粒子的类型#define PARTICLE_TYPE_FLICKER 0#define PARTICLE_TYPE_FADE

2011-10-20 16:39:52 3218

MFC watchTime

自己的MFC练习。统计历史开机时间用。 介绍完了

2010-05-19

MFC 本地电脑历史开机时间统计

MFC练习 1.注册表读写 2.CDC运用 3.托盘图标设置

2010-05-18

MFC 多线程画渐变空心圆

花了3个小时做的一个利用多线程画圆的小程序。资源包括exe运行程序和源代码

2010-04-29

数据结构习题解析 用面向对象方法与C++语言描述.pdf

数据结构习题解析 用面向对象方法与C++语言描述.pdf

2010-01-22

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除