摘要: 一个可能的原因是由于你的网络从局域网(比如实验室网)切换到了代理网络(比如校园公共网)。 方法一:重新切换到非代理网络 办法二:repository 或 dependency 名称不对,比如新repository中给dependency起了个新名字,而你的pom.xml文件中没有更新 办法三:更改 阅读全文
posted @ 2015-06-23 17:29 lasclocker 阅读(930) 评论(0) 推荐(0) 编辑
摘要: words.txt中的内容如下:the day is sunny the the the sunny is is统计每个单词出现的次数,并降序输出。Unix Pipes脚本如下:cat words.txt | tr -s ' ' '\n' | sort | uniq -c | s... 阅读全文
posted @ 2015-06-17 22:04 lasclocker 阅读(2296) 评论(0) 推荐(0) 编辑
摘要: 在host1上,把下面的两行内容通过ssh追加到host2上的/etc/ca-certificates.conf文件中I am a studentAre you okssh host2 "echo -e \"I am a student\nAre you ok\" >> /etc/ca-certif... 阅读全文
posted @ 2015-06-05 17:20 lasclocker 阅读(1477) 评论(0) 推荐(0) 编辑
摘要: declare -A animals=(["moo"]="cow" ["woof"]="dog")for sound in "${!animals[@]}";doecho "$sound - ${animals["$sound"]}";done 阅读全文
posted @ 2015-06-04 09:41 lasclocker 阅读(140) 评论(0) 推荐(0) 编辑
摘要: /** * * 二分查找算法 * * * * @param srcArray 有序数组 * * @param target 查找元素 * * @return srcArray数组下标,没找到返回-1 */ public ... 阅读全文
posted @ 2015-05-30 18:32 lasclocker 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 一、在当前目录及其子目录查找以mesos开头,并以.jar结尾的文件,并打印出来sudo find ./ -name mesos*.jar -print二、whereis, locate 也有类似功能。 阅读全文
posted @ 2015-04-28 12:46 lasclocker 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 表t_alibaba_data的数据结构如下:各列含义分别是:用户id(user_id),品牌id(brand_id),用户行为(type, 其中,点击为0,购买为1,加入收藏为2,加入购物车为3),产生行为的时间(visit_datetime)。一、用一条sql语句,找出点击过热销品牌(Top10... 阅读全文
posted @ 2015-04-25 21:59 lasclocker 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 假设你制作了个docker的 hadoop的镜像,镜像名叫 hd_image,如果想在外网的浏览器中访问hadoop的50070和8088端口,则在启动镜像hd_image时,脚本如下:docker run -d -it -h aaaaa -p 50070 -p 8088 --name bbbbb ... 阅读全文
posted @ 2015-04-25 14:37 lasclocker 阅读(1888) 评论(0) 推荐(0) 编辑
摘要: 卸载docker:apt-get purge lxc-dockerapt-get autoremove更新docker:apt-get updateapt-get install lxc-docker 阅读全文
posted @ 2015-04-23 14:02 lasclocker 阅读(854) 评论(0) 推荐(0) 编辑
摘要: 问题描述: ubuntu下仅仅获取网卡一的ip地址问题背景: eth0,eth1,eth2……代表网卡一,网卡二,网卡三…… lo代表127.0.0.1,即localhostsudo ifconfig eth0 | grep 'inet addr' | cut -d : -f 2 | cut ... 阅读全文
posted @ 2015-04-22 19:15 lasclocker 阅读(902) 评论(0) 推荐(0) 编辑