今天遇到RT这个问题后,导致数据库错误,然后在国外网站发现了一个解决方法,记录如下:原因是:多个Mysql进程使用了同一个socket。解决方法是:直接把mysql.sock文件改名即可。也可以删除,推荐改名。SSH里输入下列命令即可解决:#
mv /var/lib/mysql/mysql.sock...
分类:
数据库 时间:
2014-05-08 13:08:22
阅读次数:
293
Given n points on a 2D plane, find the maximum
number of points that lie on the same straight line. 解题想法:
其实判断一个直线上最好的方法是判断斜率。如果在同一直线上,那么直线上一点与其他点的斜率相...
分类:
其他好文 时间:
2014-05-07 21:13:02
阅读次数:
323
Given an array with n objects colored red,
white or blue, sort them so that objects of the same color are adjacent, with
the colors in the order red, ...
分类:
其他好文 时间:
2014-05-07 18:01:05
阅读次数:
412
方法一:
在Arcmap中转换:
1、加载要转换的数据,右下角为经纬度
2、点击View——Data Frame Properties——Coordinate System
3、导入或选择正确的坐标系,确定。这时右下角也显示坐标。但数据没改变
4、右击图层——Data——Export Data
5、Use the same coordinate system a...
分类:
其他好文 时间:
2014-05-06 15:00:20
阅读次数:
403
Problem DescriptionThere are n people and n
target, everyone should get one target, no two people get the same target, the
last one who get the target...
分类:
其他好文 时间:
2014-05-06 09:00:51
阅读次数:
354
1 /** 2 * Definition for binary tree 3 * public
class TreeNode { 4 * int val; 5 * TreeNode left; 6 * TreeNode right; 7 *
TreeNo...
分类:
其他好文 时间:
2014-05-05 22:43:14
阅读次数:
313
在做hibernate修改和删除的时候,可能会遇到
org.hibernate.NonUniqueObjectException异常,a different object with the same
identifier value was already associated with the s...
分类:
系统相关 时间:
2014-05-05 22:27:35
阅读次数:
361
这两道题,大同小异。
我都是用BFS,在遍历的过程,判断结构是否相同/对称,值是否相同。下面是AC代码: 1 /** 2 * Given a binary tree, check
whether it is a mirror of itself (ie, symmetric aroun...
分类:
其他好文 时间:
2014-05-05 09:48:26
阅读次数:
401
ArraysArrays are zero-indexed, ordered lists of
values. They are a handy way to store a set of related items of the same type
(such as strings), thoug...
分类:
编程语言 时间:
2014-05-04 19:08:29
阅读次数:
533
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:
其他好文 时间:
2014-05-03 21:35:49
阅读次数:
310