Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2014-11-29 11:40:36
阅读次数:
255
How Big Is It?Ian's going to California, and he has to pack his things, including his collection of circles. Given a set of circles, your program must...
分类:
其他好文 时间:
2014-11-29 11:39:36
阅读次数:
212
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:
其他好文 时间:
2014-11-29 11:38:36
阅读次数:
128
/****c code****/#includeint main(){ printf("Hello world!\n); return 0;}/****CUDA code****/_global_ void mykernel(void){}int main(){ mykernel>...
分类:
其他好文 时间:
2014-11-29 11:39:15
阅读次数:
219
challenge 4:这一关输入依然是过滤的,而且后面的下拉菜单都过滤了,但是我们发现,源码里有name=p3的东西,他的内容提交后不变,so,将value值变为 ""提交后成功。challenge 5:这一关是没有过滤的,但是文本框有maxlength,从原代码中果断删掉。然后构造"" 弹窗成功...
分类:
其他好文 时间:
2014-11-29 11:39:36
阅读次数:
366
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the c...
分类:
其他好文 时间:
2014-11-29 11:38:05
阅读次数:
124
public class Department { public String name; private int number; public Department() { super(); } public Department(String n...
分类:
其他好文 时间:
2014-11-29 11:37:11
阅读次数:
156
当下载的文件名字中不含有汉字,或者下载的文件不需要考虑用户的权限问题时。直接让超链接的href属性为所要下载的文件名即可。否则最好使用struts2的文件下载机制。 以下载图片为例 完整的代码: action: import java.io.File;
import java.io.InputStr...
分类:
其他好文 时间:
2014-11-29 11:38:33
阅读次数:
222
《经典密码学与现代密码学》书摘:一个简单的“流加密法”需要一个“随机”的“二进制位流”作为“密钥”。通过将明文与这个“随机的密钥流”进行XOR逻辑运算,就可以生成密文。将密文与相同的“随机密钥流”进行XOR逻辑运算即可还原明文。要实现XOR逻辑运算很简单,当作用于位一级上时,这是一个快速而有效的加密...
分类:
其他好文 时间:
2014-11-29 11:35:40
阅读次数:
168
Write a function to find the longest common prefix string amongst an array of strings.Solution: 1 public class Solution { 2 public String longestC...
分类:
其他好文 时间:
2014-11-29 11:35:58
阅读次数:
165
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2014-11-29 11:37:32
阅读次数:
131
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Solution: 1 public class Solution { 2 pu...
分类:
其他好文 时间:
2014-11-29 11:36:32
阅读次数:
148
CentOS6.5安装Tab增强版:bash-completion,可补全命令参数;因为CentOS官方源并不带有bash-completion的包,所以,为了可用yum安装,增加epel的源,首先,使用wget下载epel的rpm包,使用rpm指令安装,之后运行yum安装,代码如下:[adam@ultraera~]$wgethttp://mirrors.yun-idc...
分类:
其他好文 时间:
2014-11-29 10:33:52
阅读次数:
138
一、glfs_discard_async今天将笔记本从CentOS6.5换到Fedora20,运行qemu-kvm和qemu-img时报出下面这个错误.[root@localhost~]#qemu-kvm
/usr/bin/qemu-system-x86_64:symbollookuperror:/usr/bin/qemu-system-x86_64:undefinedsymbol:glfs_discard_async这是因为缺少glusterfs-d..
分类:
其他好文 时间:
2014-11-29 10:32:52
阅读次数:
239
本学期最主要的任务就是参加全省的“信息安全管理与评估”技能大赛,9月份开学之后不久就开始着手选拔学生,组建参赛队伍。从10月份开始就基本上天天待在实验室里,一直到11月27日参加比赛。在这期间,我基本上保持了每天发一篇博文的速度,将备赛时的一些主要资料都整理了出来..
分类:
其他好文 时间:
2014-11-29 10:32:53
阅读次数:
179
pages.jsp
//分页变量定义
final int e=3;//每页显示的记录数
int totalPages=0;//页面总数
int currentPage=1;//当前页面
int totalCount=0;//数据库中数据的总记录数
int p=0;//当前页面所显示的第一条记录的索引
//读取当前待显示的页面的编号
String tempStr=ruques...
分类:
其他好文 时间:
2014-11-29 10:33:48
阅读次数:
186
流程控制
1.顺序结构
顺序结构就是程序从上到下逐行地执行,中间没有任何判断和跳转
如果main方法的多行代码之间没有任何流程控制,则顺序总是从上向下依次执行,排在前面的代码
先执行,排在后面的代码后执行,这意味着,如果没有流程控制,Java方法里语句是一个顺序执行
流,则上向下依次执行每条语句
2.if分支语句
分支结构:
(1).if(logic statement){...
分类:
其他好文 时间:
2014-11-29 10:32:06
阅读次数:
246