git 知识点 1. 使用git server 最新版覆盖本地的修改:git fetch --allgit reset --hard origin/masterOR If you are on some other branchgit reset --hard origin/your_branchhttp://stackoverflow.com/questions/1125968/...
golang 常见知识点 [持续更新中]1. 如何将int64转换为string:[code="java"] package main import ( "fmt" "strconv" ) func main() { var val int64 = 123456789 str := strconv.Forma...
sublime 快捷键 -----windows下的快捷键--------Alt+R : 开启正则表达式功能Alt+Enter: 找到匹配目标后全部选择Ctrl+R:前往 method(mac下⌘R)Ctrl+M:跳转到对应括号按Ctrl+Shift+上下键,可替换行Ctrl+D:选择单词,重复可增加选择下一个相同的单词Ctrl+L:选择行,重复可依次增加选择下一行Ctrl+Shift+P...
Best Practices for Designing a Pragmatic RESTful API [b][url=http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api]Best Practices for Designing a Pragmatic RESTful API[/url][/b]Your data model has started to stabilize and you're in a ...
CURL基本命令 作者: nickwolfe@CCF 从某网站上面看到的,觉得讲的很精彩,故借鉴过来。CURL? 嗯,说来话长了~~~~这东西现在已经是苹果机上内置的命令行工具之一了,可见其魅力之一斑1)二话不说,先从这里开始吧![code="java"]curl http://www.yahoo.com[/code]回车之后,www.yahoo.com 的html就稀里哗啦地显示在屏幕...
做个谦卑的架构师【转】 谦卑并不是软件架构师一个非常常见的特质。我曾与一些可怕的架构师共事过,最近也与一位非常棒的架构师合作过。基于此,我根据每个架构师都喜欢的方式将我过去的经验汇聚起来,以规则集的形式写出来,与大家一起分享并讨论。[b]规则0:不要愚蠢地做出假设[/b]看起来有些架构师会觉得一旦让开发者自行处理某些事情,那么他们就会像猴子那样杂乱无序。根据我的经验,这种情况其实是很少会出现的。只有一种情况会让开...
java socket performance investigation these days I'm confused about the Tcp performance while using java socket. In fact the java code is very simple. details as below:1. server open a port and begin to listen.2. client request and ...
[java] change the env in java code In Java API, there is the method System.getenv(), but no interface to set the env. This is because Java forbid the operation based on platform. But sometimes we need to change the env to finish some u...
[java] change the env in java code In Java API, there is the method System.getenv(), but no interface to set the env. This is because Java forbid the operation based on platform. But sometimes we need to change the env to finish some u...
[unit test] how to test real-time based method. (for example new Date() ) While we are writing the unit test cases, we may meet some method that is real-time based. It'll be a challenge to get the expected result as they are changing with time, then it's time to use the Moc...
Eclipse Shortcuts Editors are an integral part of a programmer’s life. If you have good proficiency in using an editor thats a great advantage. It comes very handy to debug. Traditional notepad and SOPs (System.out.pri...
Eclipse Shortcuts Editors are an integral part of a programmer’s life. If you have good proficiency in using an editor thats a great advantage. It comes very handy to debug. Traditional notepad and SOPs (System.out.pri...
java中多维数组探讨及发散思考 今天在stackoverflow上面看到一个帖子讨论说关于提高数组效率的问题,看了下他的问题,是关于一个四维数组的效率问题,四维数组类似这样子:[code="java"]ushort[, , ,] map = new ushort[3000, 3000, 3, 3];[/code]暂且先不管为啥要搞一个四维数组(毕竟四维已经超出了人的立体思维想象了-_-),我随手写了一个测试类来测试,但是...
日常笔记(持续更新记录中) 以此作为笔记,记录一些小碎片,省得以后再去找。1. 如何读取和当前class位于同一目录下的文件,也可以是其他相对路径:xml在随意某个包路径下:[code="java"]String s_xmlpath="com/spf/web/ext/hotspot/hotspotxml/hotspot.xml";ClassLoader classLoader=HotspotXmlPars...
Some noteson reading the book <refactoring, improving the design existing code> While reading the book , I got some impressed tips and mark them as below.When you use refactoring to develop software, you divide your time between two distinct activities: adding function and re...
Eclipse 无法识别插件的处理办法(转载) 昨天系统崩溃,重装系统后eclipse突然对links方式加载插件失效。用尽了网上各种解决方法,始终不行。在%eclispe_dir%/configration/org.eclipse.update/platform.xml中显示了加载的插件信息,进入eclipse在prefernce里却没有。删除%eclispe_dir%/configration/org.eclipse.update后结果一样...
OOCamp--测试驱动开发 现在有类似这样一个需求:需要提供一个简单类库,以供其他开发者调用。现在进行Tasking,最简单的需求,这个类中应该拥有一个value记录长度值,也应该有一个单位unit来记录相应的单位,对于一个length对象来说,用户只关心我拿到这个对象后怎么用,比如,我两个对象可以比较是否相等,是否可以相加,对于其length的value和unit来说,也许用户并不关心他们的行为(至少现在是这样的),...