- 博客(91)
- 收藏
- 关注
原创 DB connection was not acquired. (Cannot create JDBC driver of class '' for connect URL 'null') 解决
最近在搭建UDDI服务器的时候解决一个BUG。在根据一篇博客介绍的UDDI的使用教程操作之后,发现最后jUDDI DataSource Validation部分出了问题。jUDDI DataSource Validation的前两个是对的,第三个出错(导致第四个也出错):DB connection was not acquired. (Cannot create JDBC driver o...
2018-11-20 00:47:50
509
原创 java服务器返回中文乱码:???
从java服务器中传来的中文显示为问号“?”,例如下面的name的值:原因是服务器response的charset没有设置位“UTF-8",默认为”ISO-8859-1"。解决办法:在PrintWriter out = response.getWriter();之前添加一句:response.setHeader("Content-type", "applicat
2018-01-06 14:28:43
11144
原创 Ubuntu 16 install Play Framewrok
1、Download “play-2.2.6.zip” from https://www.playframework.com/download extract it and rename the file as “play”2、move file “play” to /home :3、 in the terminal: ” echo “export PATH=/home/play:$PAT
2017-10-31 15:17:18
614
原创 JAVA通过JDBC连接Mysql获取中文输出乱码解决方法
情景:写一个java程序,通过jdbc 连接Mysql数据库,读取数据,打印出来发现中文是乱码。
2017-07-03 16:59:00
6345
原创 # Exceptionin thread "main" java.lang.UnsatisfiedLinkError:org.apache.hadoop.util.NativeCrc32.native
Exceptionin thread “main” java.lang.UnsatisfiedLinkError:org.apache.hadoop.util.NativeCrc32.nativeComputeChunkedSumsByteArray(II[BI[BIILjav 问题产生背景 : 运行环境:win7,64位 hadoop版本:hadoop-common-2.2.
2017-06-29 16:25:39
965
原创 Python write unicode into txt document as 中文
环境: Ubuntu 14.04 , Python 3.4将unicode的中文,形如”u’你好” , 写入txt文档中,在文档中能看到中文”你好”,而不是形如 “u’3x0#d” 这样的乱码import codecsf = codecs.open('yourFilePath/yourFile.txt', "w", "utf-8-sig")/* f.write() */f.close()
2017-05-28 18:28:55
635
原创 getaddrinfo ENOTFOUND api.github.com api.github.com:443
**系统:**Ubuntu 14.04LTS 问题产生背景:命令行创建Vue项目: vue init webpack protectName 的时候,出现错误: getaddrinfo ENOTFOUND api.github.com api.github.com:443原因:网络信号差 解决:转移到网络好的地方,问题解决
2017-04-29 22:58:49
6834
原创 The system is running in low-graphics mode [ubuntu 14.04]
The system is running in low-graphics mode背景:已有win10系统,装ubuntu14.04系统。选择进入Ubuntu系统时,出现该提示。 原因:电脑显卡驱动没更新。 解决办法: 第一步:ctrl +alt+f1,进入命令行模式。(ctrl + alt +f1~f6 是Ubuntu提供的命令行模式,ctrl + alt + f7是图形界面模式)第二步
2017-04-27 01:15:41
728
原创 wamp+win10: php连接Mysql, delete update insert 详细操作步骤
一、新建数据库用户进入phpmyAdmin - 点击“用户”(Users) 点击用户列表下方的“添加用户”(Add user)如下图操作 点击“执行”(“Go”)之后,可以看到增加了user用户。 注意:Grant必须为Yes,否则无法连接数据库。如果为No,点击右边“Edit Privileges” ,在上图中的Administration下的GRANT前面框框打勾,再点击”Go”或”执行
2017-01-18 05:03:44
952
原创 Win10下 Gulp,Browser-sync 入门
一定要按顺序做在网上看了很多博客,90%都是一样的,而且并没有实际的例子,所以做起来有很多困难。所以我建议,大家就不要转载那种没有加入新元素的文章了!对自己没用,且对新学者简直就是一种伤害,半天搜不到一篇有用的文章Orz……首先说技巧:1、在指定目录下进入cmd命令,而不必通过麻烦的cd命令进入目录。 详情见博客:“http://blog.youkuaiyun.com/dafang_xu/article/d
2016-11-25 17:58:04
1592
转载 前端构建工具gulpjs的使用介绍及技巧
懒得编辑了,原文在下面,好文章,转载!http://www.cnblogs.com/2050/p/4198792.html
2016-11-25 13:45:54
782
转载 如何方便快速在指定文件夹打开命令行
如何方便快速在指定文件夹打开命令行- * 我就懒得编辑了,这是很好的一个小技巧,所以转载记下来,原文在下面*http://www.cnblogs.com/Wayou/p/3359993.html
2016-11-25 12:39:29
673
原创 leetcode 371. Sum of Two Integers(不用+ -实现加法)
**我的思路:** 1、两个数异或的结果A中,为1的部分表示两个数在该位一共只有一个1; 2、相与的结果B中,为1的部分表示两个数在该位有两个1(即产生进位); 随意举个例子过一遍就清楚了。public class Solution { public int getSum(int a, int b){ int A,B; while(tr
2016-07-23 20:22:18
798
原创 POJ2480Longge's problem 欧拉函数
Longge's problemTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 7737 Accepted: 2565 Description Longge is good at mathematics and he likes to think about hard mathematical probl
2016-03-30 01:21:14
689
原创 poj2481 Cows 树状数组 解题报告
Cows Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 15519 Accepted: 5182 Description Farmer John’s cows have discovered that the clover growing along the ridge of the hill (
2016-03-16 13:16:17
681
原创 POJ 1988 Cube Stacking并查集
Cube Stacking Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 22236 Accepted: 7803 Case Time Limit: 1000MS Description Farmer John and Betsy are playing a game with N (1 <=
2016-03-11 01:08:33
652
原创 中国剩余定理算法详解(余数互质和不互质)
参考: 中国剩余定理: http://itdocument.com/7701006441/ http://www.cppblog.com/qywyh/archive/2007/08/27/30943.aspx 扩展欧几里得算法: http://blog.youkuaiyun.com/dafang_xu/article/details/50186653 中国剩余定理介绍 在《孙子算经》中有这样一个
2016-03-07 14:07:22
19608
5
原创 蓝桥杯-十六进制转八进制
本程序处理的情况是当十六进制数很大的时候,比如有100000位。 程序由算法和数据结构组成: 1、算法:将16进制转换成2进制,再转换成8进制。 2、数据结构:16进制转换成2进制不用反复除,取余,而是将每位16进制位数hash成4位二进制数,保存在数组Hash1和Hash2中。2进制转换成8进制也同样将每三位2进制hash成一位八进制数保存在数组Hash3中。这样大大节省了时间! 注意:如
2016-03-05 23:12:20
928
原创 hash&Rabin-Karp字符串查找POJ 1200 Crazy Search
hash&Rabin-Karp字符串查找POJ 1200 Crazy Search
2016-03-03 21:24:25
699
原创 KMP POJ 2752 Seek the Name, Seek the Fame
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 15562 Accepted: 7875 Description The little cat is so famous, that many couples tramp over hill a
2016-03-02 00:06:06
387
原创 [dp]POJ 2229 Sumsets 解题报告
Sumsets Time Limit: 2000MS Memory Limit: 200000K Total Submissions: 15174 Accepted: 6031 Description Farmer John commanded his cows to search for different sets of numbers that sum to a
2016-01-11 05:11:30
689
原创 Codeforces Round #338 (Div. 2)B. Longtail Hedgehog解题报告
B. Longtail Hedgehog time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output This Christmas Santa gave Masha a magic picture and a pencil.
2016-01-09 02:23:43
605
原创 [dp]POJ 3176 Cow Bowling解题报告
题目: Cow Bowling Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16077 Accepted: 10705 DescriptionThe cows don’t use actual bowling balls when they go bowling. They each take
2016-01-04 13:28:17
516
原创 error: ISO C++ forbids declaration of `FILE' with no type
用g++编译一个cpp的源文件时报错如题。源文件中引用了另一个头文件,那个头文件中声明了一个FILE的指针变量,但没有包含stdio.h,源文件对应的头文件也没有显式包含。在引用的那个头文件之前加上#include stdio.h>编译通过。
2015-12-06 00:48:18
1187
原创 c++文件操作精简详解
要读取文件必须包含头文件,这里包含了C++读写文件的方法。 可以使用fstream类,这个类可以对文件进行读写操作。 1、打开文件。 打开文件可以有两种方式,第一种可以使用fstream类的构造函数。 fstream file(“test.dat”,ios_base::in|ios_base::out|ios_base::app); 另外一种方法就是使用open函数。 fstream f
2015-11-30 10:14:11
587
转载 Codeforces Round #332 (Div. 2) D. Spongebob and Squares详解
Codeforces Round #332 (Div. 2) D. Spongebob and Squares
2015-11-22 05:09:05
509
原创 Codeforces Round #332 (Div. 2) C. Day at the Beach详解
Codeforces Round #332 (Div. 2) C. Day at the Beach
2015-11-21 23:59:18
713
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人