1.集群管理 在我们的业务场景中,服务间通信的url是通过zookeeper来管理的。我们服务间,当A和B服务需要建立连接时,服务启动时,首先回去建立和ZK的连接,然后在事先定义好的节点获取url列表,并且注册事件,zk节...
分类:
其他好文 时间:
2015-04-30 16:22:45
阅读次数:
164
2015年4月21号,apktool2.0.0正式版本发布,请从http://ibotpeaches.github.io/Apktool/下载。 .......................晚上在写..................................................
分类:
其他好文 时间:
2015-04-30 16:24:24
阅读次数:
407
这些新增的方法和属性用于改进我们的编程方式。那么让我们先看看以前的对于UIViewController的使用有什么潜在的问题,认清问题,我们才能理解苹果改变的意义。 在以前,一个UIViewController的View可能有很多小的...
分类:
其他好文 时间:
2015-04-30 16:23:30
阅读次数:
107
快捷键 说明 super + j 调用在线snippet代码片段 super + shift + t 创建 junit 测试类 super + b 查看接口 super + e 最近操作过的文件 super + alt + b 查看实现 super + delete 删除当前行 super + alt + L 代...
分类:
其他好文 时间:
2015-04-30 16:23:20
阅读次数:
220
Detours 可以用来拦截Win32的API函数,从而让程序按照我们自定义的方式进行处理,而不是Windows默认的。
Detours 也是通过Dll的方式,拦截Api函数。
例:拦截Win32的MessageBoxA()函数
1.先新建一个Dll工程
#include "detours.h"
#pragma comment(lib,"detours.lib") //导入detours....
分类:
其他好文 时间:
2015-04-30 16:22:47
阅读次数:
160
点击打开杭电1503
Problem Description
The company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from one fruit into the genome of another one. Most times thi...
分类:
其他好文 时间:
2015-04-30 16:20:23
阅读次数:
159
The 3n + 1 problem
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 26353 Accepted Submission(s): 9784
题目链接:http://acm.hdu.edu.cn/sh...
分类:
其他好文 时间:
2015-04-30 16:19:29
阅读次数:
110
setdll.exe 下载地址:http://download.csdn.net/detail/u013147600/8649009点击打开链接
1.将下载好的setdll.exe 和.exe应用程序以及.dll文件放在同一个文件夹下
如图:
在同一文件夹下新建一个批处理文件:Setdll.bat
内容如下:
@echo off
setdll /d:messageDll.dll H...
分类:
其他好文 时间:
2015-04-30 16:20:19
阅读次数:
572
Write a SQL query to get the nth highest salary from the Employee table.
+----+--------+
| Id | Salary |
+----+--------+
| 1 | 100 |
| 2 | 200 |
| 3 | 300 |
+----+--------+
For exampl...
分类:
其他好文 时间:
2015-04-30 16:20:47
阅读次数:
116
这几天做了一个网站的CMS系统,当然就要用到TOMCAT来对项目进行部署了.但是客户的服务器上已经安转了我们用.NET制作的OA系统,所以在客户的服务器上已经有完整的IIS7服务,而IIS7默认会占用所有的80端口(虽然服务器有两个IP,而它只用了一个,呵呵)。所以我们只能通过设置来让它让出一个IP来了。设置过程如下:
首先,进入命令行,进入C:/inetpub/Adminscripts 文件夹...
分类:
其他好文 时间:
2015-04-30 16:19:08
阅读次数:
115
Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with another chara...
分类:
其他好文 时间:
2015-04-30 16:18:47
阅读次数:
97
题意:
Description
Dr. Kong 设计的机器人卡尔非常活泼,既能原地蹦,又能跳远。由于受软硬件设计所限,机器人卡尔只能定点跳远。若机器人站在(X,Y)位置,它可以原地蹦,但只可以在(X,Y),(X,-Y),(-X,Y),(-X,-Y),(Y,X),(Y,-X),(-Y,X),(-Y,-X)八个点跳来跳去。
现在,Dr. Kong想在机器人卡尔身上设计一个计数器,记录它...
分类:
其他好文 时间:
2015-04-30 16:18:32
阅读次数:
148
题目链接:点击打开链接
题意:
给出闹钟的n个指针当前所指的角度
求2个闹钟通过旋转后能否相同
思路:
先排个序保证偏序的关系,然后坐差,
枚举第二个串的哪一位和第一个串的第一字符匹配,然后hash判断
#include
#include
#include
#include
#include
template
inline bool rd(T &ret)...
分类:
其他好文 时间:
2015-04-30 16:19:54
阅读次数:
124
Search for a Range
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 order of O(log n).
If ...
分类:
其他好文 时间:
2015-04-30 16:19:15
阅读次数:
133
在手机客户端上,广告的循环播放很是常见,在网上也看过一些Demo,好多写的不是太完整,人为不干预的情况下确实是按照顺序轮播,但是人为去滑动后,接下来的自动轮播不是按滑动后的currentposition播放的,而是按照手动滑动前position的位置跳跃播放的。闲暇之余,把这个问题简单的解决了一下,为后来者提供一些思路。
=====================================...
分类:
其他好文 时间:
2015-04-30 16:20:01
阅读次数:
107
CentOS下SVN服务的启动与关闭操作系统:CentOS 6.5
SVN版本:1.8.11启动SVN服务:
svnserve -d -r /home/svn/home/svn 为版本库的根目录;关闭SVN服务:
使用以下命令查找进程
ps aux | grep svn# ps aux | grep svn
root 64434 0.0 0.0 181584 1120 ?...
分类:
其他好文 时间:
2015-04-30 16:17:44
阅读次数:
98
背景:使用idea14+tomcat7+ssh2,hbm文件放在src目录及子目录下
情况:提示错误application中配置的sessionFactory中找不到hbm文件.
解决方案,打开moudle配置,在source folder配置中,将存放hbm的文件夹 mark as resource,就是上面的一排按钮里有一个resource按钮
随后tomcat即...
分类:
其他好文 时间:
2015-04-30 16:16:50
阅读次数:
160