现在位置: 首页 > qingzixi发表的所有文章
  • 11月
  • 10日
综合 ⁄ 共 665字 评论关闭
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given:s1 = "aabcc",s2 = "dbbca", When s3 = "aadbbcbcac", return true. When s3 = "aadbbbaccc", return false. 判断是否有s1和s2组成,用二维dp,相当与在一个二维数组画个路线图判断能否组成s3 class Solution { public: bool isInterleave(string s1, string s2, string s3) { if(s1.size()+s2.size() != s3.size()) return false; bool f[1000][1000]; memset(f,0,sizeof(f)); f[0][0] ......
阅读全文
  • 08月
  • 15日
综合 ⁄ 共 3488字 评论关闭
ZOJ题型分类   初学者题: 1001 1037 1048 1049 1051 1067 1115 1151 1201 1205 1216 1240 1241 1242 1251 1292 1331 1334 1337 1338 1350 1365 1382 1383 1394 1402 1405 1414 1494 1514 1622 1715 1730 1755 1760 1763 1796 1813 1879 1889 1904 1915 1949 2001 2022 2099 2104 2108 2172 2176 2201 2208 2321 2345 2351 2376 2388 2405 2417 2433  模拟问题: 1006 1009 1012 1016 1019 1023 1026 1028 1038 1042 1045 1051 1056 1057 1058 1061 1065 1066 1068 1072 1073 1078 1087 1088 1097 1098 1099 1103 1......
阅读全文
  • 08月
  • 01日
综合 ⁄ 共 574字 评论关闭
转自:    http://blog.csdn.net/silence1214/article/details/5515503 1:下载http://ftp.twaren.net/Unix/NonGNU/color-theme/color-theme-6.6.0.tar.gz  然后自己解压 2:把color-theme-6.6.0.tar.gz解压后的 color-theme.el和 theme文件夹 复制到 ~/.emacs.d文件夹内(如果~/.emacs.d文件夹不存在请先建立)。 3:打开~/.emacs文件,写入 :       (add-to-list 'load-path "~/.emacs.d/")       (require 'color-theme)       (color-theme-initialize)       (color-theme-matrix)     这4句话前三句少任何一句都会报......
阅读全文
  • 08月
  • 23日
综合 ⁄ 共 1226字 评论关闭
    @try{         int read, write;         FILE *pcm = fopen([fileCache cStringUsingEncoding:1], "rb");  //source 被转换的音频文件位置 //        NSLog(@"1111%s",[fileCache cStringUsingEncoding:1]);         fseek(pcm, 4*1024, SEEK_CUR);                                   //skip file header         FILE *mp3 = fopen([mpfileCache cStringUsingEncoding:1], "wb");  //output 输出生成的Mp3文件位置                  const int PCM_SIZE = 8192;         const int MP3_SIZE = 8192;         short int pcm_......
阅读全文
  • 06月
  • 08日
综合 ⁄ 共 547字 评论关闭
Insert是T-sql中常用语句,Insert INTO table(field1,field2,...) values(value1,value2,...)这种形式的在应用程序开发中必不可少。但我们在开发、测试过程中,经常会遇到需要表复制的情况,如将一个table1的数据的部分字段复制到table2中,或者将整个table1复制到table2中,这时候我们就要使用SELECT INTO 和 INSERT INTO SELECT 表复制语句了。 1.INSERT INTO SELECT语句 语句形式为:Insert into Table2(field1,field2,...) select value1,value2,... from Table1 要求目标表Table2必须存在,由于目标表Table......
阅读全文
  • 04月
  • 07日
综合 ⁄ 共 888字 评论关闭
【说明】     Oracle中通过v$session表中的OSUSER和MACHINE字段可以查看当前客户端登陆连接的“操作系统名称”和“机器名”,但没能查看到客户端电脑IP。 查询:select * from v$session where username='HFY120401'; ---------------------------------------- 利用触发器实现查看所有客户端IP的方法 收集了网上的一些做法,做个总结,方便以后用,其操作步骤: 1. 在sys模式下创建一个表,用于记录客户端登录数据库服务器的详细信息。 1 create table login_history 2 ( 3 username varchar2(60), --用户名 ......
阅读全文
要点: 1.预编译指令#pragma 2.关键字extern “C”;extern “C++” 3.库程序的运行和调试方法 4.创建一个静态链接库并使用 内容: 1.#pragma 宏:通知编译器,在编译文件前需要完成的一些动作,常用指令包括 #pragma message(“test”)在编译前输出test,#pragma comment预先链接一些东西至输出文件(exe),#pragma comment (lib,”file add”)就是说在编译这个文件之前需要将存储在file add的库链接到这里。 2.extern “x”关键字:extern 是声明关键字,如果你使用过脚本语言或者学过很细致的C教程就会知道这个关键字,在库中,如......
阅读全文
  • 01月
  • 28日
综合 ⁄ 共 2629字 评论关闭
看程序前先来了解下身份证号的构成:身份证号分为两种,旧的为15位,新的为18位。身份证15位编码规则:dddddd yymmdd xx p    其中 dddddd:地区码    yymmdd: 出生年月日    xx: 顺序类编码,无法确定    p: 性别,奇数为男,偶数为女; 身份证18位编码规则:dddddd yyyymmdd xxx y    其中 dddddd:地区码    yyyymmdd: 出生年月日     xxx:顺序类编码,无法确定,奇数为男,偶数为女    y: 校验码,该位数值可通过前17位计算获得,计算的公式见程序,一些需要用到的常数:18位号码加权因子为(从右到左) Wi = [ 7, 9, 10, 5, 8......
阅读全文
  • 01月
  • 13日
综合 ⁄ 共 2468字 评论关闭
A. Bayan Bus time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The final round of Bayan Programming Contest will be held in Tehran, and the participants will be carried around with a yellow bus. The bus has 34 passenger seats: 4 seats in the last row and 3 seats in remaining rows. The event coordinator has a list of k participants who should be picked up at the airport. When a participant gets on the bus, he will sit......
阅读全文
  • 12月
  • 27日
综合 ⁄ 共 1382字 评论关闭
JSON后台操作(Gson): 官网:https://code.google.com/p/google-gson/ Gson API: http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/Gson.html#Gson() GsonJsonObject API:http://google-gson.googlecode.com/svn/tags/1.2.3/docs/javadocs/com/google/gson/JsonObject.html GsonJsonArray API:http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/JsonArray.html 链接:http://blog.csdn.net/lk_blog/article/category/1172246  解析包:org.json.simple.JSONO......
阅读全文
  • 12月
  • 25日
综合 ⁄ 共 1316字 评论关闭
在进行文件处理中遇到的几个问题,思考并解决 1. 犯了个错,使用 gcc -c -g  test_open1.c -o test_open1  (-c就不链接了)  总是permission denied -c  Compile or assemble the source files, but do not link.  The linking            stage simply is not done.  The ultimate output is in the form of an            object file for each source file.                                                                                                                          By default, the object file name f......
阅读全文
  • 12月
  • 20日
综合 ⁄ 共 5405字 评论关闭
      public class ExportFileService { private static final String SAVEPATH = "D:\\"; private static final String BUTTONTEXT = "导出"; private static final String TITLE = "导出数据"; public ExportFileService(){ } /** * * @param filters 可选择的导出类型 * @return file[0] 文件全路径;file[1] 导出类型 */ public static String[] exportFile(List<FileFilter> filters){ JFileChooser fileChooser = initEmportFi......
阅读全文