- 军军小站|张军博客
搜索到与相关的文章
编程技术

UVa 10624 - Super Number, Rujia Liu的神题(四

链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=112&page=show_problem&problem=1565原题:Don'tyouthink162456723veryspecial?Lookatthepicturebelowifyouareunabletofinditsspeciality.(a|bmeans‘bisdivisibleb

系统 2019-08-29 22:54:04 1966

编程技术

一致性hash

【转】一致性hash算法-consistenthashinghttp://blog.csdn.net/sparkliang/article/details/5279393目录(?)[+]一致性hash算法(consistenthashing)张亮consistenthashing算法早在1997年就在论文Consistenthashingandrandomtrees中被提出,目前在cache系统中应用越来越广泛;1基本场景比如你有N个cache服务器(后面

系统 2019-08-29 22:30:16 1966

Python

发邮件 python

#!/usr/bin/envpython#-*-coding:utf8-*-#导入smtplib和MIMETextimportsmtplibfromemail.mime.textimportMIMEText##############要发给谁,这里发给2个人mailto_list=["13426444511@139.com","mlzboy@tom.com","frederick.mao@gmail.com","maolingzhi@vancl.cn"]#

系统 2019-08-29 22:16:19 1966

编程技术

ESBasic 可复用的.NET类库(10) -- 简易的读

1.缘起:对于需要进行线程同步的地方,我们经常用的就是.NET内置的lock关键字和ReaderWriterLock类。lock的功能相对简单,因为它不区分读写,也就是说如果都在lock块中,读线程都会阻塞另一个读线程,在很多读远远多于写的应用中,这会极大地折损性能。所以我们也经常需要使用读写分离的锁ReaderWriterLock,使用它,我们可以明确的指定是要获取“读”锁还是“写”锁。而且,当前的“读”线程是不会阻塞其它的“读”线程的。lock的使用非

系统 2019-08-29 22:05:23 1966

编程技术

细节的积累 ---字符串的常用方法总结

字符串的常用方法总结:packagecn.com.huawei.opensource.common.lang;importjava.io.*;publicclassStringConverter{publicStringConverter(){}byte[]stringToFullByteArray(Strings){inti=s.length();byteabyte0[]=newbyte[i*2];for(intj=0;j

系统 2019-08-12 09:30:33 1966

各行各业

Timus 1057

#includeusingnamespacestd;intX,Y,K,B;intX_value[33]={0},X_len;intY_value[33]={0},Y_len;unsignedlonglongcount_Y,count_X,ret;voidto_base(intbase,int*new_value,int*value_len,intvalue){intmod,div,len=0;while(value){div=value

系统 2019-08-12 09:27:30 1966

各行各业

Eclipse插件安装几种方式及使用说明

Eclipse下安装插件的三种方法:拷贝安装方式,links安装方式,update安装方式详细介绍,参见此文:http://wenku.baidu.com/view/d10246d380eb6294dd886c15.html特别说明links方式安装!!此文很好:http://java.chinaitlab.com/Eclipse/37794.html以下以汉化包的使用为例说明links方式安装插件:汉化包是由著名的Babel项目提供的Babel项目不仅提

系统 2019-08-12 09:27:13 1966

各行各业

sql连接语句中的Integrated Security=SSPI/ture

关于sql连接语句中的IntegratedSecurity=SSPI解决方法:即:SecuritySupportProviderInterface设置IntegratedSecurity为True的时候,连接语句前面的UserID,PW是不起作用的,即采用windows身份验证模式。只有设置为False或省略该项的时候,才按照UserID,PW来连接。IntegratedSecurity可以设置为:True,false,yes,no,这四个的意思很明白了,

系统 2019-08-12 09:26:45 1966