摘要: http://blog.csdn.net/zz457887107/article/details/6612034 阅读全文
posted @ 2017-10-14 13:42 fish7 阅读(221) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/wangdan1600/article/details/43857195 http://blog.csdn.net/artprog/article/details/50178747 http://www.cnblogs.com/larryking/p/573 阅读全文
posted @ 2017-10-10 22:00 fish7 阅读(168) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import wx import modelmngr_execute ########################################################################################## class MyFrame1 ( wx.Frame ): def __ini... 阅读全文
posted @ 2017-08-01 21:21 fish7 阅读(178) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import wx from modelmngr_frame import MyFrame1 ########################################################################################## if __name__ == '__main__': ap... 阅读全文
posted @ 2017-07-16 17:46 fish7 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 08-01 21:45:32.883 609 24297 I : Ipu_set_double_addr1:0 08-01 21:45:32.883 609 24297 I : Ipu_set_double_addr2:0 08-01 21:45:32.883 609 24297 I : Ipu_set_double_addr-- 08... 阅读全文
posted @ 2017-07-03 08:16 fish7 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 经验归档分享,建立内部wiki,专人管理资料,分享知识 余成龙 OPEN 2017/6/29:没有提交(郑明,李宗原,周生伟),每个人赞助30元到余成龙处;2017/5/25:注意信息安全;余成龙承诺每周增加五篇文章,如未达成,承诺赞助100元;2017/6/29:上周周例会取消,两周共计提交23篇 阅读全文
posted @ 2017-07-01 15:14 fish7 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Head Pos: (0,0)(0,9) (1,9) (2,9) (3,9) (4,9) (5,9) (6,9) (7,9) (8,9) (9,9)(0,8) (1,8) (2,8) (3,8) (4,8) (5,8) (6,8) (7,8) (8,8) (9,8)(0,7) (1,7) (2,7) 阅读全文
posted @ 2017-06-18 18:15 fish7 阅读(175) 评论(0) 推荐(0) 编辑
摘要: #include #include #include "map" #include "stdio.h" #include "stdlib.h" #include "string.h" #include "array" using namespace std; #define NULL (0) #define OUT_X ... 阅读全文
posted @ 2017-06-08 08:39 fish7 阅读(172) 评论(0) 推荐(0) 编辑
摘要: common.cpp common.h hash.cpp hash.h main.cpp testfunc.cpp testfunc.h 阅读全文
posted @ 2017-06-04 10:32 fish7 阅读(339) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bashadb shell screencap -p /sdcard/screen.pngadb pull /sdcard/screen.png ./adb shell rm /sdcard/screen.pngecho "获取屏幕截图完毕" 阅读全文
posted @ 2017-06-01 08:04 fish7 阅读(164) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" #include "map" #include "string" #include "iostream" using namespace std; int u[4] = {0, 0, 1, -1}; int v[4] = {1, -1, 0, 0}; // global map g_SCORE; int g_BEST_SCORE; int... 阅读全文
posted @ 2017-06-01 08:02 fish7 阅读(177) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bashlet actual_x=104+144*$[$2-1]let actual_y=945+144*$[$1-1]adb shell input tap ${actual_x} ${actual_y}adb shell input tap ${actual_x} ${actual 阅读全文
posted @ 2017-06-01 08:02 fish7 阅读(259) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash./simulate_screencap.sh./analysis_screencap.py 阅读全文
posted @ 2017-06-01 08:01 fish7 阅读(119) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env pythonfrom PIL import Imageimg = Image.open("./screen.png")maps = [[] for i in range(11)]for i in range(11): for j in range(11): maps[i 阅读全文
posted @ 2017-06-01 08:00 fish7 阅读(135) 评论(0) 推荐(0) 编辑
摘要: adb shell screencap -p /sdcard/p1.pngadb pull /sdcard/p1.png c:\BaiduYunDownloadadb shell rm /sdcard/p1.png adb shell input tap 100 100 from PIL impor 阅读全文
posted @ 2017-05-31 21:12 fish7 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 获取 buf 里的 symbol 阅读全文
posted @ 2017-04-06 10:08 fish7 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 获取 buf 里的 symbol 阅读全文
posted @ 2017-04-06 10:04 fish7 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题意:给定一个十进制正整数N,写下从1开始,到N的所有正数,计算出其中出现所有1的个数。例如:n = 12,包含了5个1。1,10,12共包含3个1,11包含2个1,总共5个1。Input输入N(1> n; int w=(int)log10(n)+1; ll ans=0; rep(... 阅读全文
posted @ 2015-04-09 13:42 fish7 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 题意:给出一个整数N,输出N^N(N的N次方)的十进制表示的末位数字。Input一个数N(1>n; int t=n%10; print("%d\n",calc(t,n)); ret 0;} 阅读全文
posted @ 2015-04-09 13:36 fish7 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 题意:n的阶乘后面有多少个0?6的阶乘 = 1*2*3*4*5*6 = 720,720后面有1个0。Input一个数N(1> n; ll ans=0; ll tmp=5; while(tmp<=n){ ans+=(n/tmp); tmp*=5; }... 阅读全文
posted @ 2015-04-09 13:35 fish7 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 题意:给出一个整数K和一个无序数组A,A的元素为N个互不相同的整数,找出数组A中所有和等于K的数对。例如K = 8,数组A:{-1,6,5,3,4,2,9,0,8},所有和等于8的数对包括(-1,9),(0,8),(2,6),(3,5)。Input第1行:用空格隔开的2个数,KN,N为A数组的长度。... 阅读全文
posted @ 2015-04-09 13:31 fish7 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 题意:给出两个字符串A B,求A与B的最长公共子序列(子序列不要求是连续的)。比如两个串为:abcicbaabdkscabab是两个串的子序列,abc也是,abca也是,其中abca是这两个字符串最长的子序列。输出最长的子序列,如果有多个,随意输出1个。思路:DP,同时DP记录路径。代码:strin... 阅读全文
posted @ 2015-04-09 13:26 fish7 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 清华精神: 爱国奉献,追求卓越校训: 自强不息,厚德载物校风: 行胜于言学风: 严谨、勤奋、求实、创新教育理念: 中西融会,古今贯通,文理渗透 又红又专,全面发展 阅读全文
posted @ 2015-04-04 23:15 fish7 阅读(1886) 评论(0) 推荐(0) 编辑
摘要: 之所以抛弃char*的字符串而选用C++标准程序库中的string类,是因为他和前者比较起来,不必 担心内存是否足够、字符串长度等等,而且作为一个类出现,他集成的操作函数足以完成我们大多数情况下(甚至是100%)的需要。我们可以用 = 进行赋值操作,== 进行比较,+ 做串联(是不是很简单?)。我们... 阅读全文
posted @ 2015-04-04 10:26 fish7 阅读(2126) 评论(0) 推荐(0) 编辑
摘要: 一.unique函数类属性算法unique的作用是从输入序列中“删除”所有相邻的重复元素。该算法删除相邻的重复元素,然后重新排列输入范围内的元素,并且返回一个迭代器(容器的长度没变,只是元素顺序改变了),表示无重复的值范围得结束。 1 // sort words alphabetically so ... 阅读全文
posted @ 2015-04-03 21:13 fish7 阅读(917) 评论(0) 推荐(0) 编辑
摘要: from django.http import HttpResponsedef hello(request): return HttpResponse("Hello world")from django.conf.urls.defaults import *from views import ... 阅读全文
posted @ 2015-03-28 21:35 fish7 阅读(164) 评论(0) 推荐(0) 编辑
摘要: freopen()函数在ACM中的使用 - cfzjxz的专栏 - 博客频道 - CSDN.NET在做acm题目的过程中,我们需要在本地机器上调试。调试过程中,如果输入数据少还可以接受,但如果输入数据很庞大的话,我们就很难忍受一次又一次的重新输入和调试了。通过google,找到一种简便的方法,那就是... 阅读全文
posted @ 2015-03-27 20:07 fish7 阅读(560) 评论(0) 推荐(0) 编辑
摘要: 我所使用的操作系统是Windows7,内存是2G在搜索了一些资料发现,对于Django的安装,详细的真的很少,都说的很简化,然而,这篇blog可以手把手教你成功安装Django对于Django的详细了解:Django下面我们进行安装操作:1.下载Django包目前的最新版本是:Django-1.6.... 阅读全文
posted @ 2015-03-21 10:00 fish7 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 用二维数组作为参数传递(用二维数组处理矩阵),但是希望接受传递二维数组参数的函数可以处理任意维度的数组(希望矩阵的行数和列数都是不固定的)。--------------------------------------------------------------------------------... 阅读全文
posted @ 2015-03-19 14:51 fish7 阅读(2171) 评论(0) 推荐(1) 编辑
摘要: python 2.6 引入了itertools模块,使得排列组合的实现非常简单:import itertools 有序排列:e.g., 4个数内选2个排列:>>> print list(itertools.permutations([1,2,3,4],2))[(1, 2), (1, 3), (1, ... 阅读全文
posted @ 2015-03-16 21:01 fish7 阅读(234) 评论(0) 推荐(0) 编辑
摘要: python的str,unicode对象的encode和decode方法python中的str对象其实就是"8-bit string" ,字节字符串,本质上类似java中的byte[]。而python中的unicode对象应该才是等同于java中的String对象,或本质上是java的char[]。... 阅读全文
posted @ 2015-03-16 20:57 fish7 阅读(859) 评论(0) 推荐(0) 编辑
摘要: hashlib是涉及安全散列和消息摘要,提供多个不同的加密算法借口,如SHA1、SHA224、SHA256、SHA384、SHA512、MD5等。import hashlibm = hashlib.md5() #创建hash对象,md5:(message-Digest Algorithm 5)消... 阅读全文
posted @ 2015-03-16 20:19 fish7 阅读(517) 评论(0) 推荐(0) 编辑
摘要: import hashlibimport osimport itertoolsf = open(r'D:\KEY\gesture.key','r')psd = f.readline()f.close()ANS = psd.encode('hex')print ANSb = ['00','01','0... 阅读全文
posted @ 2015-03-16 19:51 fish7 阅读(877) 评论(0) 推荐(0) 编辑
摘要: 题意:有N种【价格从低到高】珍珠,每种珍珠有一个价格。每种珍珠有一个需要的个数。如果你决定买某种珍珠x个,则需要额外多买10个。【防止游客购买少量】你可以把低价格的珍珠换成高价格的珍珠,但不允许把高价格的珍珠换成低价格的珍珠。问总共最少需要花多少钱。思路:假设第 i 种珍珠需要X个。可以知道要么这X... 阅读全文
posted @ 2015-03-13 11:45 fish7 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 题意:某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?思路:简单并查集代码:int n,m;int fa[1005];i... 阅读全文
posted @ 2015-03-13 10:37 fish7 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 题意:Mr Wang wants some boys to help him with a project. Because the project is rather complex,the more boys come, the better it will be. Of course ther... 阅读全文
posted @ 2015-03-13 10:35 fish7 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 题意:Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in the... 阅读全文
posted @ 2015-03-12 16:22 fish7 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题意:N个城市,每个城市有一个龙珠。两个操作:1.T A B:A城市的所有龙珠转移到B城市。2.Q A:输出第A颗龙珠所在的城市,这个城市里所有的龙珠个数,第A颗龙珠总共到目前为止被转移了多少次。思路:前两个好求,第三个求转移的次数只要把它到根的路径上的值加起来就行了看代码代码:int N,Q;in... 阅读全文
posted @ 2015-03-12 16:12 fish7 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 题意:N和M。有N个数。M个回答:ai, bi, si。代表:sum(ai...bi)=si。如果这个回答和之前的冲突,则这个回答是假的。问:M个回答中有几个是错误的。思路:如果知道sum(ai...bi)=si。假设下一个是sum(ai,ci)=sj。则sum(ai,ci)肯定也知道了。这很符合并... 阅读全文
posted @ 2015-03-12 15:44 fish7 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 题意: AP x yA recruit with ability rate x were asked to join company y. (0<=x<2^31, 0<=y<n)MG x yCompany x and company y is merged. The new company is n... 阅读全文
posted @ 2015-03-12 15:27 fish7 阅读(142) 评论(0) 推荐(0) 编辑