Description
An anagram of a string is any string that can be formed using the same letters as the original. (We consider the original string an anagram of itself as well.) For example, the string...
分类:
其他好文 时间:
2015-04-07 17:45:41
阅读次数:
114
1,下载xig工具,xml-xig-0.1.1.jar可以到一下链接下载
2.编写schema文件,如下:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://my.soa.com"
targetNamespace="http://my.soa.com"
elementForm...
分类:
其他好文 时间:
2015-04-07 17:45:20
阅读次数:
154
1,安装jdk,
去甲骨文网站下载jdk1.7.0_71.tar.gz
展开到/opt目录下
2,安装git-core
3,安装maven
下载链接:http://maven.apache.org/download.cgi
下载apache-maven-3.3.1-bin.tar.gz
展开到/usr/local下
4,配置路径
修改/etc/profile文件(sudo ged...
分类:
其他好文 时间:
2015-04-07 17:48:06
阅读次数:
203
lua中的正则表达式,规则如图:
常用示例,代码如下:
-- 去掉首尾所有空格
function trim(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
local s = " space "
local txt = trim(s)
print(string.len(s), string.len(txt))...
分类:
其他好文 时间:
2015-04-07 17:44:59
阅读次数:
422
视频录像
根据两边轮子转动的速率不同,推算出转动的角度。包括原地旋转。
计算的原理和代码可以查看文章 ROS 教程之 navigation : 用 move_base 控制自己的机器人(2)...
分类:
其他好文 时间:
2015-04-07 17:45:05
阅读次数:
163
Description
A word cloud (or tag cloud) is a visual representation of textual data based on a weighted metric. In the above cloud (which is based on this year's list of Mid-Central teams), the fo...
分类:
其他好文 时间:
2015-04-07 17:45:51
阅读次数:
163
今天,在开发过程中发现一个问题,在提交form表单时,有一个input一直不能被提交,后台一直报错!究其原因,是因为该input上设置了disabled属性。然而,有时我们又不得不设置某些元素为不可操作的,建议使用readonly替之。
一、readonly & disabled区别
readonly和disabled是用在表单中的两个属性,它们都能够做到使用户不能够更改表单域中的内容。
...
分类:
其他好文 时间:
2015-04-07 17:45:12
阅读次数:
103
背景:wa~Tl~看来背包还是很欠缺啊~
思路1(1500ms):变形的01背包。把题目改为:选择一组HP和大于等于所需血量且这组物品的分数之和最小,即可。这里把HP看做cost,score看做weight。但是这个题有个特点是最后选择HP必须大于等于k,容易想到,最多我们会有k+10000(10000为单个物品的最大HP值)的HP值,所以我们有这样的转移方程:
for i 0....n
...
分类:
其他好文 时间:
2015-04-07 17:45:02
阅读次数:
121
mysql> set password for root@localhost=password('12'); ----将主机地址为localhost用户名为root的密码改为12
Query OK, 0 rows affected (0.02 sec)...
分类:
其他好文 时间:
2015-04-07 17:43:57
阅读次数:
109
把svn中的分支(branch)合并到主分支(trunk)
branch 和 trunk的代码同步至最新
选中trunk项目需要合并的代码(可以项目根目录、也可以是子目录或文件)
选择合并操作 ( team-->合并)
选择合并一个分支(reintegrate a branch)
填写需要合并的分支目录(reintegrate a branch)...
分类:
其他好文 时间:
2015-04-07 17:45:58
阅读次数:
107
输入一个整数矩阵,计算位于矩阵边缘的元素之和.所谓矩阵边缘的元素,就是第一行和最后一行的元素以及第一列和最后一列的元素。
源代码:
#include
#include
int main()
{
int m,n;//矩阵的长和宽
int sum = 0;
printf("输入矩阵的长和宽\n");
scanf("%d%d",&m,&n);
int a[m][n];//存储矩阵的值...
分类:
其他好文 时间:
2015-04-07 17:45:15
阅读次数:
373
HDU 4291 A Short problem(矩阵快速幂+循环节)...
分类:
其他好文 时间:
2015-04-07 17:44:09
阅读次数:
93
题目:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4
5 6 7 0 1 2).
You are given a target value to search. If found in the ar...
分类:
其他好文 时间:
2015-04-07 17:42:36
阅读次数:
161
//bfs用vis[i][x][y][k] 表示从i的方向到x,y且剩下的转弯数是k
#include
#include
#include
#include
using namespace std;
const int maxn = 110 ;
int vis[4][maxn][maxn][maxn] ;
char map[maxn][maxn] ;
struct node
{...
分类:
其他好文 时间:
2015-04-07 17:42:23
阅读次数:
122
题解:
……两遍最短路然后判断哪些边可以在某条最短路上,然后加到网络流图中。
然后题意是一个点经过流量有限制,拆点就好。
然后有重边Qwq(调了好久。。。)
然后或许有自环,不过这并不影响什么。
代码:
调试过程中代码风格已经狗一样。
看到 long long i;i
#include
#include
#include
#include
#include
#defi...
分类:
其他好文 时间:
2015-04-07 17:44:11
阅读次数:
126