好好爱自己!

07 2017 档案

摘要:参考:http://www.cnblogs.com/dire/p/5222968.html 参考baidu: char和int的定义我是清楚的,现在有一个问题: 1、设A和B是int型,C是char型,那么if (C<(A-B)) 这个语句可不可以,有没有BUG存在? 2、设A和B是char型,C是 阅读全文
posted @ 2017-07-30 16:45 立志做一个好的程序员 阅读(847) 评论(0) 推荐(0) 编辑
摘要:ifconfig 命令的结果 和 ip addr (或者查看具体网卡的是 ip addr show eth0) 看到的结果不一样, ip addr show eth0 可以看到eth0网卡上面的多个 ip, 而 ifconfig 只能看到 eth0 上面的一个ip 现在我们已经成功添加了一个 ip 阅读全文
posted @ 2017-07-28 16:24 立志做一个好的程序员 阅读(279) 评论(0) 推荐(0) 编辑
摘要:原文: http://blog.csdn.net/hinyunsin/article/details/6650879/ http://www.cnblogs.com/life2refuel/p/5322567.html http://blog.csdn.net/ithomer/article/det 阅读全文
posted @ 2017-07-28 08:16 立志做一个好的程序员 阅读(266) 评论(0) 推荐(0) 编辑
摘要:apt-get install sl 阅读全文
posted @ 2017-07-27 18:31 立志做一个好的程序员 阅读(387) 评论(0) 推荐(0) 编辑
摘要:执行结果: 稍微改一下 #!/bin/bash - function mytest(){ echo "arg1 = $1" if [ $1 = "1" ] ;then return 1 else return 0 fi}if mytest 1; then echo "aaaaaaaaaa"fi sh 阅读全文
posted @ 2017-07-27 18:17 立志做一个好的程序员 阅读(5957) 评论(0) 推荐(0) 编辑
摘要:参考: http://www.cnblogs.com/zhaiqianfeng/p/4621297.html “sum=$(fsum 2 5)”这种方式,是将标准输出(echo 出来的东子)传递给主程序的变量,而不是返回值! 脚本执行结果: ret_val = $(sum 10 20) 将sum 1 阅读全文
posted @ 2017-07-27 17:21 立志做一个好的程序员 阅读(21603) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2017-07-27 15:55 立志做一个好的程序员 阅读(348) 评论(0) 推荐(0) 编辑
摘要:踢掉一个从某个终端连上的用户pkill -kill -t pts/0 Linux中W与Who命令的使用 LINUX是个多用户系统,一旦连接到网络中,它可以同时为多个登录用户提供服务。系统管理员可以随时了解系统中有那些用户,用户都在进行什么操作。 查看用户的操作 系统管理员若想知道某一时刻用户的行为, 阅读全文
posted @ 2017-07-27 13:55 立志做一个好的程序员 阅读(6458) 评论(0) 推荐(0) 编辑
摘要:POSIX为shell为进行模式匹配提供了四种参数替换结构(老版本的shell可能不支持),每种结构有两个参数:变量名(或变量号)及模式。 第一种模式: ${variable%pattern},这种模式时,shell在variable中查找,看它是否一给的模式pattern结尾,如果是,就从命令行把 阅读全文
posted @ 2017-07-27 08:11 立志做一个好的程序员 阅读(5832) 评论(0) 推荐(0) 编辑
摘要:参考: http://jimmygod.blog.163.com/blog/static/43511339200792605627411/ http://blog.csdn.net/archersaber39/article/details/51422602 我两年前就知道不应该用==号来判断浮点数 阅读全文
posted @ 2017-07-25 14:46 立志做一个好的程序员 阅读(22260) 评论(2) 推荐(4) 编辑
摘要:参考:http://www.cnblogs.com/starof/p/4709805.html https://www.chenyudong.com/archives/ssh-using-private-public-key-no-password.html http://www.jianshu.c 阅读全文
posted @ 2017-07-25 02:00 立志做一个好的程序员 阅读(297) 评论(0) 推荐(0) 编辑
摘要:上面的报告说明, postgres这个用户没在 sudoers 的列表中, 所以这个“事件”会被报告。 阅读全文
posted @ 2017-07-24 20:14 立志做一个好的程序员 阅读(354) 评论(0) 推荐(0) 编辑
摘要:备份: pg_dump -d m3vg -h localhost -p 5432 -U delta -W -f 1024.dump -F tar 恢复: pg_restore -h localhost -p 5432 -Udelta -W 1024.dump -d m3vg 忘记postgresql 阅读全文
posted @ 2017-07-24 17:03 立志做一个好的程序员 阅读(1726) 评论(0) 推荐(0) 编辑
摘要:sudo apt-get purge postgresql-9.5 On Ubuntu 14.04 I have done this to get the latest postgres: Then I installed version 9.4: However it seems I have n 阅读全文
posted @ 2017-07-24 16:24 立志做一个好的程序员 阅读(2239) 评论(0) 推荐(0) 编辑
摘要:I happen to have 2 installed instances of postgresql at my machine: 9.1 and 9.2: They are located at /etc/postgresql/9.1/ and /etc/postgresql/9.2/. Th 阅读全文
posted @ 2017-07-24 15:45 立志做一个好的程序员 阅读(202) 评论(0) 推荐(0) 编辑
摘要:原文:http://wiki.ubuntu.org.cn/Shell%E7%BC%96%E7%A8%8B%E5%9F%BA%E7%A1%80 参考: http://www.cnblogs.com/zqyanywn/p/5943977.html Shell编程基础 原作者 Leal;请参阅页面底部的编 阅读全文
posted @ 2017-07-24 01:27 立志做一个好的程序员 阅读(312) 评论(0) 推荐(0) 编辑
摘要:原文 http://blog.chinaunix.net/uid-24426415-id-77244.html 初级入门 sed工具是一种非交互式的流编辑器。默认情况下只会影响输出,不会改变输入。sed处理文档时是以行为单位的。功能有:删除、查找替换、添加、插入、从其他文件读取。 其实这些功能看起来 阅读全文
posted @ 2017-07-24 01:07 立志做一个好的程序员 阅读(5025) 评论(0) 推荐(0) 编辑
摘要:1. Linux登录过程中加载配置文件顺序: /etc/profile → /etc/profile.d/*.sh → ~/.bash_profile → ~/.bashrc → [/etc/bashrc] 可查看默认的~/.bashrc文件如下: 2. Shell命令提示符及颜色是由PS1来配置: 阅读全文
posted @ 2017-07-24 00:13 立志做一个好的程序员 阅读(345) 评论(0) 推荐(0) 编辑
摘要:"Peer authentication" means that it's comparing your database username against your Linux username. It should work if you're logged in as postgres. Yo 阅读全文
posted @ 2017-07-24 00:03 立志做一个好的程序员 阅读(3504) 评论(0) 推荐(0) 编辑
摘要:原文: https://www.if-not-true-then-false.com/2012/php-apc-configuration-and-usage-tips-and-tricks/ PHP APC (Alternative PHP Cache / Opcode Cache) is fra 阅读全文
posted @ 2017-07-23 19:17 立志做一个好的程序员 阅读(440) 评论(0) 推荐(0) 编辑
摘要:go run footer.go 的时候呢, go会依次去GOPATH 和GOROOT设置的对应路径下面找对应的包(目录和文件) 找的时候呢, 会在GoPATH 和GOROOT对应的目录后面再加一层路径 "/src/"哦 https://stackoverflow.com/questions/321 阅读全文
posted @ 2017-07-23 12:32 立志做一个好的程序员 阅读(2879) 评论(0) 推荐(0) 编辑
摘要:apc缓存用户数据这个会用, apc_store() 和apc_fetch()函数。 那apc 缓存php 代码,这个怎么用呢? 原文: http://blog.csdn.net/w18704622664/article/details/47132061# APC简介 APC的全称为Alternat 阅读全文
posted @ 2017-07-23 12:17 立志做一个好的程序员 阅读(934) 评论(0) 推荐(0) 编辑
摘要:One of the most powerful features of PostgreSQL is its support for user-defined functions written in various programming languages, including pure SQL 阅读全文
posted @ 2017-07-21 17:51 立志做一个好的程序员 阅读(4432) 评论(3) 推荐(0) 编辑
摘要:\ef 创建一个新的函数。 \df 显示已经创建的函数。 \df+ somefunc 显示这个函数的详细定义 \ef somefunc 编辑这个函数, 编辑保存退出之后,要执行 \g ,刚才的修改才会生效。 \g 使刚才的修改生效。 https://stackoverflow.com/questio 阅读全文
posted @ 2017-07-21 15:06 立志做一个好的程序员 阅读(466) 评论(0) 推荐(0) 编辑
摘要:有时候,忘记了postgresql 安装时默认用户postgres 的密码,怎么办呢? linux shell命令下面输入: sudo -u postgres psql (这样就可以直接登录进postgres 了, 然后在里面可以进行添加用户,修改密码之类的,都不是问题了!!) 修改PostgreS 阅读全文
posted @ 2017-07-21 13:59 立志做一个好的程序员 阅读(60004) 评论(0) 推荐(1) 编辑
摘要:开源软件, Review Board 代码审查的。 https://www.reviewboard.org/ 阅读全文
posted @ 2017-07-20 22:01 立志做一个好的程序员 阅读(242) 评论(0) 推荐(0) 编辑
摘要:How do I create a public certificate for use with PayPal Encrypted Website Payments? Before you can use Encrypted Website Payments, PayPal requires th 阅读全文
posted @ 2017-07-19 22:01 立志做一个好的程序员 阅读(772) 评论(0) 推荐(0) 编辑
摘要:https://www.tecmint.com/usermod-command-examples/ In Unix/Linux distributions, the command ‘usermod‘ is used to modify or change any attributes of a a 阅读全文
posted @ 2017-07-18 23:21 立志做一个好的程序员 阅读(338) 评论(0) 推荐(0) 编辑
摘要:1.http://www.networkworld.com/ 2.http://www.infoworld.com http://www.awaimai.com/patterns/adapter UMLet(UML建模工具) 写PHP MVC 框架: http://www.phpchina.com/ 阅读全文
posted @ 2017-07-13 09:40 立志做一个好的程序员 阅读(226) 评论(0) 推荐(0) 编辑
摘要:原文: http://www.networkworld.com/article/2931534/it-management/what-are-unix-swap-swp-files.html When someone mentions a "swap file", the first thing t 阅读全文
posted @ 2017-07-13 09:30 立志做一个好的程序员 阅读(425) 评论(0) 推荐(0) 编辑
摘要::Ve 垂直打开目录结构 :S 水平打开目录结构 原文: https://stackoverflow.com/questions/14385379/explore-filesystem-directories-in-vim The best way to explore filesystem/dir 阅读全文
posted @ 2017-07-13 09:06 立志做一个好的程序员 阅读(275) 评论(0) 推荐(0) 编辑
摘要:我在想, 怎么让vim可以 显示目录结构呢?一个目录里面的文件? vim插件的网站:http://www.vim.org/scripts/script.php?script_id=1658 原文:http://blog.sina.com.cn/s/blog_163e6cfd30102wkqy.htm 阅读全文
posted @ 2017-07-12 21:53 立志做一个好的程序员 阅读(793) 评论(0) 推荐(0) 编辑
摘要:https://nanxiao.gitbooks.io/golang-101-hacks/content/posts/select-operation.html Select operation Go's select operation looks similar to switch, but i 阅读全文
posted @ 2017-07-09 12:29 立志做一个好的程序员 阅读(4555) 评论(0) 推荐(0) 编辑
摘要:google 搜索了好多文档,终于发现了这个靠谱的回答。 https://groups.google.com/forum/#!topic/influxdb/I5eady_Ta5Y You can see the approximate size of the InfluxDB data direct 阅读全文
posted @ 2017-07-07 14:59 立志做一个好的程序员 阅读(3350) 评论(0) 推荐(0) 编辑
摘要:原文:http://mdsa.51cto.com/art/201707/544211.htm 如何阅读框架源代码 不管对于那个段位的 Developer 来说,读源码都是一件好处颇多的事情,特别于初学者而言,这能迅速的吸纳优秀框架精华代码营养,迅速成长。 作者:小虫巨蟹来源:掘金|2017-07-0 阅读全文
posted @ 2017-07-07 02:53 立志做一个好的程序员 阅读(3954) 评论(0) 推荐(3) 编辑
摘要:广播风暴与VLAN有什么关系? VLAN不是为了防广播风暴的。是为了更加有效的管理网络,使用IP的。 一个交换机不是只能学习一个MAC。 广播风暴是指网络环路了。两者之间根本风马牛不相及。 追问 Google一下“vlan 广播风暴”,看到不少“利用Vlan控制与隔离广播风暴”之类的题目。 再查一下 阅读全文
posted @ 2017-07-07 02:41 立志做一个好的程序员 阅读(7781) 评论(0) 推荐(1) 编辑
摘要:原文:http://blog.csdn.net/ghostly78/article/details/480706 教你如何读懂路由表, 你能读懂路由表吗?不懂?进来看看吧! 当前的路由: destination 目的网段 mask 子网掩码 interface 到达该目的地的本路由器的出口ip ga 阅读全文
posted @ 2017-07-07 01:36 立志做一个好的程序员 阅读(1028) 评论(0) 推荐(0) 编辑
摘要:原文:http://www.cnblogs.com/lovevivi/archive/2013/09/04/3300950.html 范例一:将整个 /etc 目录下的文件全部打包成为 /tmp/etc.tar[root@linux ~]# tar -cvf /tmp/etc.tar /etc <= 阅读全文
posted @ 2017-07-06 17:34 立志做一个好的程序员 阅读(450) 评论(0) 推荐(0) 编辑
摘要:原文:http://www.jianshu.com/p/99282a4f3870 https://sourceforge.net/projects/winmerge/?source=typ_redirect http://winmerge.org/downloads/ WinMerge 免费开源的文 阅读全文
posted @ 2017-07-06 15:45 立志做一个好的程序员 阅读(1780) 评论(0) 推荐(0) 编辑
摘要:原文:https://www.goinggo.net/2014/02/the-nature-of-channels-in-go.html The Nature Of Channels In Go 这篇文章关于channel讲解得非常好,深度形象。深入浅出。尤其是这两幅图,太厉害了。非常清楚,一目了然 阅读全文
posted @ 2017-07-06 02:19 立志做一个好的程序员 阅读(1449) 评论(0) 推荐(0) 编辑
摘要:A common sequence of events when editing files is to make a change and then need to test by executing the file you edited in a shell. If you're using 阅读全文
posted @ 2017-07-06 01:24 立志做一个好的程序员 阅读(401) 评论(0) 推荐(0) 编辑
摘要:package main import ( "github.com/robertkrimen/otto" "log" ) func main() { log.Printf("Creating JS interpreter") js := otto.New() var function otto.Value log.Printf("Defining setEnrichFunct... 阅读全文
posted @ 2017-07-05 14:21 立志做一个好的程序员 阅读(2410) 评论(0) 推荐(0) 编辑
摘要:原文:https://www.goinggo.net/2013/11/using-log-package-in-go.html Linux is unique to Windows in many ways, and writing programs in Linux is no exception 阅读全文
posted @ 2017-07-05 11:02 立志做一个好的程序员 阅读(698) 评论(0) 推荐(0) 编辑
摘要:写一个程序, 5s, 10s后能定时执行一个任务,同时能不停的处理来的消息。 写出上面这段程序的目的是从 input channel 持续接收消息加以处理,同时希望每过5秒钟和每过10秒钟就分别执行一个定时任务 阅读全文
posted @ 2017-07-02 21:29 立志做一个好的程序员 阅读(4543) 评论(0) 推荐(0) 编辑

不断学习创作,与自己快乐相处

点击右上角即可分享
微信分享提示