现在位置: 首页 > angina发表的所有文章
  • 04月
  • 08日
综合 ⁄ 共 1699字 评论关闭
大意略。 思路:首先开始写了一个STL,后来果断发现老是WA,为什么呢?后来手写了一个哈希,还是WA,然后发现,靠,原来还有空串,题目木有说呀。 /*哈希 0.752s*/ #include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <string> #include <set> #include <map> using namespace std; const int MAXSIZE = 10000003; const int MAXN = 1510; char A[MAXN][15], B[MAXN][15]; char st[MAXN*MAXN][30]; int first[MAXSIZE], next[MAXN*MAXN]; int ......
阅读全文
  • 06月
  • 07日
综合 ⁄ 共 2036字 评论关闭
http://www.cnblogs.com/wangsaiming/archive/2013/01/11/2856253.html 第一步:下载Log4Net            下载地址:http://logging.apache.org/log4net/download_log4net.cgi            把下载的  log4net-1.2.11-bin-newkey解压后,如下图所示:                        双击bin文件夹                              双击net文件夹,选择针对.NET FramerWork的不同版本                             找到相应版本的log4net.dll 第二步:应用Log4Net                      1、在项目中添加Log4Net.DLL的引用       ......
阅读全文
  • 05月
  • 08日
综合 ⁄ 共 3680字 评论关闭
#!/bin/sh # modprobe ipt_MASQUERADE modprobe ip_conntrack_ftp modprobe ip_nat_ftp iptables -F iptables -t nat -F iptables -X iptables -t nat -X ###########################INPUT键################################### iptables -P INPUT DROP iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 110,80,25 -j ACCEPT iptables -A INPUT -p tcp -s 192.168.0.0/24 --dport 139 -j ACCEPT #允许内网samba,smtp,pop3,连接 iptables -A INPUT -i eth1 -......
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 1865字 评论关闭
VSS用法指南 The usage of VSS (Visual Source Safe 2005) 1. 首先,当然是得安装好Visual Source Safe 2005 你可以在Visual Studio 2005的安装光盘中找到VSS目录,相关的安装文件就在那个目录下,如果你的光盘上没有,你可以发送一封邮件给我:stillful@foxmail.com, 我可以发送一份给您。 安装好VSS后程序菜单中应该已经有相应的快捷方式了: 2. 配置"Microsoft Visual SourceSafe Administration"(VSS管理器VSSA) 1). 启动VSS管理器 (因汉化包的效果并不理想,偶建议大家还是使用英文版) 2). File - > New database... (......
阅读全文
  • 01月
  • 25日
综合 ⁄ 共 1188字 评论关闭
在iOS开发中,经常有设计给到的颜色值是类似0xffaabb,或者#FFFFFF这种格式的,对于iOS内置的颜色处理UIColor来说,是无法直接处理使用的,因此需要做一个转换,转换方式如下: +(UIColor *)colorWithHexColorString:(NSString *)hexColorString{ if ([hexColorStringlength] <6){//长度不合法 return [UIColorblackColor]; } NSString *tempString=[hexColorStringlowercaseString]; if ([tempStringhasPrefix:@"0x"]){//检查开头是0x tempString = [tempStringsubstringFromIndex:2]; }els......
阅读全文
  • 01月
  • 22日
综合 ⁄ 共 8824字 评论关闭
From :http://rdc.taobao.com/blog/cs/?p=480#more-480 1、概述 在我们給MySQL打了patch后,不仅需要测试新增的功能,同时更重要的问题是,需要对原有的功能作回归――若新增的patch导致原有其他功能产生bug,就得不偿失。 MySQL自动测试框架是一个以MySQL框架和内部引擎为测试对象的工具。主要执行脚本在发布路径的mysql-test目录下。自动测试框架的主要测试步骤,是通过执行一个case,将该case的输出结果,与标准的输出结果作diff。这里的“标准输出结果”指代在可信任的MySQL版本上的执行结果。 如果某个case的执行结果与标准......
阅读全文
  • 01月
  • 14日
综合 ⁄ 共 908字 评论关闭
 find the safest road 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1596 题意:一条从u 到 v 的通道P 的安全度为Safe(P) = s(e1)*s(e2)…*s(ek) e1,e2,ek是P 上的边,找一条最安全的路。 题解:用spfa求最短路。 代码: #include<cstdio> #include<cstring> #include<queue> #include<algorithm> using namespace std; #define inf 0x7ffffff double cost[1005][1005]; double dist[1005]; bool visit[1005]; int n,m; void spfa(int now) { memset(visit,false,sizeof(visit)); memset(di......
阅读全文
  • 01月
  • 08日
综合 ⁄ 共 315字 评论关闭
1、Netlib  网站:http://www.netlib.org/ 介绍:Netlib is a repository of software for scientific computing maintained by AT&T, Bell Laboratories, the University of Tennessee and Oak Ridge National Laboratory.[1] Netlib comprises a large number of separate programs and libraries. Most of the code is written in Fortran, with some programs in other languages. 2、
阅读全文
  • 12月
  • 19日
综合 ⁄ 共 229字 评论关闭
#include "stdio.h" void main() { int a[5][5]; int i,j; for (i=0;i<5;i++) { for (j=0;j<5;j++) { a[i][j] =i; } } for (i=0;i<5;i++) { for (j=0;j<5;j++) { printf("%d ",a[i][j]); } printf("\n"); } } 本文出自 “阿凡达” 博客,请务必保留此出处http://shamrock.blog.51cto.com/2079212/1293586
阅读全文
  • 12月
  • 09日
综合 ⁄ 共 793字 评论关闭
  一 基本的异常处理 def TestTryException():    try:        f = open('myfile.txt')        s = f.readline()        f.close()        i = int(s.strip())    except IOError as ioerror :        print (ioerror)    except ValueError as valueerror:        print (valueerror)    except:        print ("Unexpected error")    else:       print (i)    finally:       print ("always running")       #TestTryException()   使用方式为try...except...else...finally,其中else和finally是可选项,finally不管是否有......
阅读全文
  • 11月
  • 23日
综合 ⁄ 共 537字 评论关闭
小记:原来任意数对0取模是个RE。  思路: 从0-9,每一位数字的N次方都会有一个循环节,找出这个循环节,制成表。 然后输出一个就可直接输出一个了。 因为只看最右边那个位的数,所以先取模保存个位,然后将输入的数对该个位数字的循环节取模,输出即可。 代码: #include <iostream> #include<math.h> #include <stdlib.h> #include <stdio.h> #include <string.h> using namespace std; #define mst(a,b) memset(a,b,sizeof(a)) #define eps 10e-8 const int MAX_ = 31; int num[MAX_][6]......
阅读全文
  • 11月
  • 08日
综合 ⁄ 共 956字 评论关闭
恩,并且决定写csdn的第一篇博客,记录下以后学习过程中出现的一些问题,也许能对以后的新学者一些帮助呢,嘿嘿,虽然自己也是个新手,不过我觉得不少技术博客帮了我很大的忙,我觉得以后要是能帮到别人,也算是一种传承吧! 今天我先下了虚拟机,貌似有两种,不过我不大清楚,linux在我心中一直都很神秘,前几天本来想搞本鸟叔的linux私房菜,60m一本的,都没舍得买,主要是我连linux都没装呢! 啊,废话少说,虚拟机有个vmware,比较大,400多m吧,另外有个virtual box,才90多m,鉴于我破笔记本硬盘的320G空间已经所剩无几,只好......
阅读全文