HDU 2000 (水)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2000 题目大意:仨字符从小到大排序 解题思路: 很水很水,需要注意的地方是如果用苦力(三个if)要注意正确写法是 if(x >= y){ t = x; x = y; y = t; } if(x >= z){ t = x; x = t; z = t; } if(y >= z){ t = y; y = z; z = t; } 或者
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

jdk导入证书命令 https升级证书对支付的影响

##导出keystore到txt文件,通过序列号来查找是否已经存在。 keytool -list -v -keystore "/usr/java/jdk1.8.0_101/jre/lib/security/cacerts" > cacerts.txt ##定位执行目录 /usr/java/jdk1.8.0_101/jre/bin ##导入,密码默认: changeit keytool -import -alias DigiCert_CA_chain -file /home/xx/crt/Dig
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

$cast用法

http://bbs.eetop.cn/viewthread.php?tid=456197&extra=&page=1 http://bbs.eetop.cn/viewthread.php?tid=473879 http://bbs.eetop.cn/viewthread.php?tid=473879 http://www.eetop.cn/blog/html/50/320550-34905.html
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

性能测试之七--jdbc

jdbs用任意协议打开都行,具体脚本见下 在vuser_init里面 #include "Ptt_Mysql.h" vuser_init() { lr_load_dll ("libmysql.dll"); #define MYSQLSERVER "192.168.1.104" #define MYSQLUSERNAME "root" #define MYSQLPASSWORD "123456" #define MYSQLDB "ultrax" #define MYSQLPORT "3306"
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

Dereference and Increment on vector Iterators

Dereference and Increment on vector Iterators The operations on iterator types let us retrieve element to which an iterator refers and let us move an iterator from one element to another. Iterator types use the dereference operator (the * operator)
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

关于进程间通信

进程间通信(IPC)的方式很多。下面进行归类总结。 在传统的进程间通信中有 无名管道,有名管道,信号通信。后来system v 退出了自己的IPC 方式 消息队列,共享内存和信号灯集合但是system v的通信方式也存在自己的缺点。POSIX 在此基础上退出了自己的posix的消息队列,共享内存和信号灯集。另外,进程间还可以通过对文件的操作实现沟通,这里用到了文件锁。还有后期的内存映射方式。在网络上BSD率先提出了socket的方法,成为后来为流行的套接字通信方式,这种方式既可以在本机上的进程
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

MySQL 面试基础

1、如何登陆mysql数据库 mysql -u username -p 2、如何开启/关闭mysql服务 service mysql start/stop 3、查看mysql的状态 service mysql status 4、如何显示数所有数据库 show databases 5、如何获取表内所有字段对象的名称和类型 describe table_name; 6、MYSQL支持事务吗? 在缺省模式下,MYSQL是autocommit模式的,所有的数据库更新操作都会即时提交,所以在缺省情况下,
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

java,让debug出色

虽然我们不喜欢bug,但是bug永远都存在。 虽然我们牛逼,但是仍然有不知道的东西,解决不了的问题。 so,还得借助工具,让咱效率提起来扛扛的。 解决的问题如是:由于某种原因,其他系统发送的mq,我这边说没收到,他那边说发了。然后,一愁不展,咋办呢?好吧,肯定是抓包确认问题咯。嘿,这不是本文的重点,请自行脑补抓包。 从对方系统的mq记录里,取出消息体,放到mq后台,直接发送到消费服务器。然后就遇到报错了,苦思不得结果后,当然了,只能使用终级绝招,就用本机来代替debug吧。 本地服务起来之后,
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

hibernate二级缓存demo2

@Test public void hello3(){ Session session=sessionFactory.openSession(); List list = session.createQuery("from User").list(); System.out.println(list); session.close(); /** * 由于
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

PostgreSQL>窗口函数的用法

PostgreSQL之窗口函数的用法 转载请注明出处:https://www.cnblogs.com/funnyzpc/p/9311281.html   PostgreSQL的高级特性本准备三篇的(递归、窗口函数、JSON),结果中间一直一直加班 和遗忘 拖到现在才写到中篇,欸,加班真不是一件好事情。   谈谈我对加班的看法吧=> 如果加班能控制在一个小时内,这样会比较好(当然如果不加班的话更好),偶尔适当的加班能提高工作进度,对创业公司来说尤为重要;但,糟糕的地方也不少,加班时间长了容易造成
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

des对称加密算法 Invalid key length: 8 bytes

Security.addProvider(new com.sun.crypto.provider.SunJCE()); Key key = new SecretKeySpec(secretKey.getBytes(), "DES"); encryptCipher = Cipher.getInstance("DES"); encryptCipher.init(Cipher.ENCRYPT_MODE, key); 8个密钥字符串,3des是最少是16个密钥字符串。这个是关键。 基本思路:签约号取后
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

JavaScript学习笔记一

javascript简单介绍 ECMAScript     1.语法     2.变量:只能使用var定义,如果在函数的内容使用var定义,那么它是一个局部变量,如果没有使用var它是一个全局的。弱类型!     3.数据类型:原始数据类型(undefined/null/string/number/boolean)     4.语句:     5.运算符:==与===的区别     6.函数:两种...
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

equals方法与==

equals方法是Object类的方法,所以所有的类都有这个方法,底层的源代码是 public boolean equals(Object obj) { return (this == obj); } 引用类型==比较,比较的是两个对象的的内存地址是否相同。但是比较内存地址是毫无意义的。所以equals方法只是用来让子类重写的,比如String中的equals方法就经...
分类: 其他 发布时间: 07-22 22:45 阅读次数: 0

Abbott's Revenge 题解

    The 1999 World Finals Contest included a problem based on a dice maze. At the time the problemwas written, the judges were unable to discover the original source of the dice maze concept. Shortlya..
分类: 其他 发布时间: 07-22 22:44 阅读次数: 0

Silver Cow Party

One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M≤ 100,000) unidirectional (one-way roa...
分类: 其他 发布时间: 07-22 22:44 阅读次数: 0

Tree Cutting 题解

After Farmer John realized that Bessie had installed a "tree-shaped" network among his N (1 <= N <= 10,000) barns at an incredible cost, he sued Bessie to mitigate his losses.  Bessie, feeling v...
分类: 其他 发布时间: 07-22 22:44 阅读次数: 0

Filthy Rich 题解

They say that in Phrygia, the streets are paved with gold. You’re currently on vacation in Phrygia, and to your astonishment you discover that this is to be taken literally: small heaps of gold are di...
分类: 其他 发布时间: 07-22 22:43 阅读次数: 0

折线分割平面

  我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。  Input 输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含一个整数n(0<n<=10000),表示折线的数量。    Output 对于每个测试实例,...
分类: 其他 发布时间: 07-22 22:43 阅读次数: 0

Eight

The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and all packed...
分类: 其他 发布时间: 07-22 22:41 阅读次数: 0

Sticks

George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he had orig...
分类: 其他 发布时间: 07-22 22:41 阅读次数: 0