- 博客(110)
- 资源 (8)
- 收藏
- 关注
原创 安全小记
<br />Web Security:<br />As a user<br />Do not click suspicious link in suspicious places<br />As a website developer/tester<br />Never trust user input and always filter metacharacters<br />Cookie protection<br />Pay attention to Javascript<br /
2010-07-20 12:30:00
636
转载 sizeof union struct 内存对齐
union的sizeof问题union u { double a; int b; }; union u2 { char a[13]; int b; }; union u3 { char a[13]; char b; };
2010-05-25 22:38:00
942
转载 C++中如何使类不能继承
java中有一种类不能被继承,那就是final类. C++要实现一个不能被继承的类有很多方法. 主要的思路就是使子类不能构造父类的部分,这样子类就没有办法实例化整个子类.这样就限制了子类的继承. 所以我们可以将父类的构造函数声明成为私有的,但是这样父类不就不能实例化. 我们可以利用友员不能被继承的特性! 首先假设CParent不能够被继承. 让CPa
2010-05-25 22:10:00
1432
原创 词法分析 VS 语法分析
词法分析阶段是编译过程的第一个阶段。这个阶段的任务是从左到右一个字符一个字符地读入源程序,即对构成源程序的字符流进行扫描然后根据构词规则识别单词(也称单词符号或符号,如标识符、常数、运算符、定界符等)。词法分析程序实现这个任务。词法分析程序可以使用Lex等工具自动生成。词法分析是从左到右逐个字符对构成源程序的字符串进行扫描,依据词法规则,识别出一个一个的单词(token),把作为字符串的
2009-11-20 11:32:00
7562
转载 V4L2官方实例
/* * V4L2 video capture example * * This program can be used and distributed without restrictions. */#include #include #include #include #include /* getopt_long()
2009-09-25 17:29:00
2403
6
原创 File Sync 扩展对象
package com.xxxxxx.xfast.js.lib;import java.io.*;import java.util.Enumeration;import java.util.Hashtable;import java.util.Vector;import javax.microedition.io.*;import javax.microeditio
2009-09-18 10:29:00
1819
原创 Symbian有待理解的部分
As we’ve seen, deleting an object is simply a matter of using the deleteoperator on a pointer to the object to be deleted. If a pointer is alreadyzero, then calling delete on it is harmless. Howev
2009-09-18 10:17:00
592
原创 Symbian Cpp基础语法要点(2)
Use:? const TDesC& to pass a descriptor for data that you will read from,but not attempt to change? TDes& to pass a descriptor for data that you want to change.Take this global function called
2009-09-18 10:16:00
486
原创 Observer
The observer pattern (a subset of the asynchronous publish/subscribe pattern) is a software design pattern in which an object,called the subject, maintains a list of its dependents, calledobserv
2009-09-18 10:12:00
518
原创 Memento
The memento pattern is a software design pattern that provides the ability to restore an object to its previous state (undo via rollback).The memento pattern is used by two objects: the originator
2009-09-18 10:08:00
520
转载 UAProf
UAProf / User Agent Profile Reference<!-- <!--google_ad_client = "pub-6958268168919450";/* uaprofRefHomeTop, 300x250 */google_ad_slot = "7953627062";google_ad_width = 300;google_ad_hei
2009-09-01 08:58:00
2035
原创 Symbian Cpp基础语法要点(1)
There are two places in Symbian OS where you can create objects:the heap and the program stack.In Symbian OS, classes that are intended to be instantiated on the heapare nearly always derived
2009-09-01 08:54:00
641
原创 Mediator
Introduction The Mediator is a behavioral design pattern that provides a central hub to guide the interactions between many objects. According to Gamma et al, the intent of the Media
2009-08-18 15:13:00
582
原创 Iterator
The Iterator is one of the simplest and most frequently used of thedesign patterns. The Iterator pattern allows you to move through a list orcollection of data using a standard interface without h
2009-08-11 16:24:00
571
转载 oracle数组类型
源自:http://jihongbin12329.javaeye.com/blog/108674 关于ORACLE中的数组:记录同集合集合可以有三种实现方式:1 自定义一个TYPE使用VARRAY来得到一个数组但只能对基本类型定义如:CREATE TYPE 类型名 AS VARRAY OF VARCHAR2(20);1 自定义一个TYPE使用VARRA
2009-08-10 11:50:00
4280
原创 windows服务的操作
删除服务办法一: 用sc.exe这个Windows命令 开始——运行——cmd.exe,然后输入sc就可以看到了。使用办法很简单: sc delete "服务名" (如果服务名中间有空格,就需要前后加引号) 如针对上面的: sc delete KSD2Service 方法二:直接进行注册表编辑(不推荐)
2009-08-10 11:46:00
471
转载 oracle字段类型
Char 用于描述定长的字符型数据,长度varchar2 用于描述变长的字符型数据,长度nchar 用来存储Unicode字符集的定长字符型数据,长度nvarchar2 用来存储Unicode字符集的变长字符型数据,长度number 用来存储整型或者浮点型数值 Date 用来存储日期数据 Long 用来存储最大长度为2GB的变长字符数据 Raw 用来存储非结构化数据的变
2009-08-05 10:18:00
1828
原创 Interpreter
In computer programming, the interpreter pattern is a particular design pattern. The interpreter pattern specifies how to evaluate sentences in a language. The basic idea is to have a class for each
2009-07-30 10:20:00
621
原创 Command
The command pattern is a design pattern in which an object is used to represent and encapsulateall the information needed to call a method at a later time. Thisinformation includes the metho
2009-07-29 10:32:00
585
原创 Java调试断点不起作用的解决办法
eclipse中 window->preference->debug->Debugger timeout 设大一点
2009-07-21 16:41:00
10170
1
原创 Chain of Responsibility
In Object Oriented Design, the chain-of-responsibility pattern is a design pattern consisting of a source of command objects and a series of processing objects.Each processing object contains
2009-07-21 14:19:00
693
原创 SUMMARY OF STRUCTURAL PATTERNS
The Adapter pattern, used to change the interface of one class to that ofanother one.The Bridge pattern, intended to keep the interface to your client programconstant while allowing you to c
2009-07-20 11:57:00
411
原创 Proxy
The Proxy pattern is used when you need to represent a complexobject by a simpler one. If creating an object is expensive in time or computerresources, Proxy allows you to postpone this creation
2009-07-20 11:52:00
606
转载 getRealPath()过期解决方法
request.getRealPath("") 这个方法已经不推荐使用了,那代替它的是什么方法呢?下面就是替代它的方法:request.getSession().getServletContext().getRealPath() 得到站点的绝对地址在servlet或者struts中还可以这样:this.getServletContext().getRealPath("/
2009-07-15 16:01:00
4563
转载 J2ME中的文件读写问题
理论[file:///] 或者 [file://localhost/] 表示模拟器的根目录地址WTK2.5.1根目录为C:/Documents and Settings/Administrator/j2mewtk/2.5.2/appdb/DefaultColorPhone/filesystem问题if( System.getPropert
2009-07-15 11:59:00
4878
原创 J2ME FileConnector相关 暂不理解
J2ME实现手机图片上传的小经验http://www.yustu.com/?viewnews-55067.htmlJ2ME可选包FileConnection开发入门http://www.yesky.com/319/1935819.shtml 建议先使用如下方法获取根目录列表 public String[] DeviceGetRoots() { Enumera
2009-07-15 11:55:00
486
转载 文件转换为字节数组
/** * 文件转化为字节数组 * * @param file * @return */ public static byte[] getBytesFromFile(File file) { byte[] ret = null; try { if (file ==
2009-07-15 11:51:00
765
转载 j2me上传文件的问题
客户端:sc = (HttpConnection)Connector.open( url, Connector.READ_WRITE, true );sc.setRequestMethod( HttpConnection.POST );sc.setRequestProperty("Content-Type", "application/x-www-form-urlencoded")
2009-07-15 11:49:00
682
原创 J2ME 文件上传 实例(FileConnector链接文件系统,非RMS)
客户端:import java.io.InputStream;import java.io.OutputStream;import java.io.ByteArrayOutputStream;import javax.microedition.io.*;import javax.microedition.midlet.MIDlet;import javax.microedi
2009-07-15 11:03:00
648
原创 J2ME版HttpConnect
import java.io.DataInputStream;import javax.microedition.midlet.MIDlet;import javax.microedition.midlet.MIDletStateChangeException;import javax.microedition.io.*;public class HttpConnect ext
2009-07-10 17:36:00
572
原创 Flyweight
The term comes from the boxing weight classwith the same name. Often some parts of the object state can be sharedand its common to put them in external data structures and pass themto the flywe
2009-07-09 16:52:00
660
原创 Facade
The facade pattern is a software engineering design pattern commonly used with Object-oriented programming.A facade is an object that provides a simplified interface to a larger body of code, such
2009-07-02 11:22:00
731
原创 用MYSQL创建utf-8格式的数据库
mysql>Create DATABASE IF NOT EXISTS my_db default charset utf8 COLLATE utf8_general_ci; #my_db:是要创建的数据库#注意后面这句话 “COLLATE utf8_general_ci“,大致意思是在排序时根据utf8编码格式来排序 #那么在这个数据库下创建的所有数据表的默认字符集都会是ut
2009-07-01 17:50:00
8476
原创 gang of four resources
Download:The gang of four patterns in LePUS3 (Visio 2003 format)The gang of four patterns in UML (Visio 2003 format)
2009-07-01 15:24:00
668
原创 Decorator
<v:shapetype id="_x0000_t74" coordsize="21600,21600" o:spt="74" path="m10860,2187c10451,1746,9529,1018,9015,730,7865,152,6685,,5415,,4175,152,2995,575,1967,1305,1150,2187,575,3222,242,4220,,5410,242
2009-07-01 15:18:00
613
原创 Decorator
<br />In object-oriented programming, the decorator pattern is a design pattern that allows new/additional behaviour to be added to an existing class dynamically.<br /> Introduction<br />The decorator pattern can be used to make it possible to extend (de
2009-07-01 15:06:00
394
原创 Composite
In computer science, the composite pattern is a partitioning design pattern.Composite allows a group of objects to be treated in the same way as asingle instance of an object. The intent of comp
2009-06-30 15:51:00
497
转载 怎样让搜索引擎收入自己的资源
1.你上传的资源在csdn上 。蜘蛛会自动抓取你的资源.因为,csdn这种大型bbs或类似sina这中网站,baiud和google 的蜘蛛上经常来的。一周内基本上你就要以在baidu或google 找到了。 2.如果自己的网站需要到百度提交:http://www.baidu.com/search/url_submit.html ; google提交:http://www.goog
2009-06-30 12:23:00
551
servlet例子 写多少字才允许上传
2009-03-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人