Blog Articles
-
getnameinfo Non-recoverable name resolution failure 错误
原文地址: http://www.jimmo.org/non-recoverable-name-resolution-failure-with-getnameinfo-on-solaris/ 函数原型: int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t
Published on: -
Jira配置相关问题
<h1><a id="bitbucketconfluencejira_1"></a>bitbucket和confluence使用jira登录</h1> <p>1.首先在jira->系统->用户管理->Jira用户服务器->添加应用程序, 添加两个应用程序, 设置好密码和ip, 注意这里ip是白名单,如果使用容器,那么可能是172.17.0.1<br /> 2.到bitbucket或者confluence中,进入管理->用户目录, 添加jira用户目录,设置好参数。</p> <h
Published on: -
命令行参数解析: getopt()和getopt_long()
<br />Linux下非常多程式甚至那些具有图像用户界面(graphical user interface,GUI)的程式,都能接受和处理命令行选项。对于某些程式,这是和其他程式或用户进行交互的主要手段。具有可靠的复杂命令行参数处理 机制,会使得你的应用程式更好、更有用。不过非常多研发人员都将其宝贵的时间花在了编写自己的命令行解析器,却不使用 getopt(),而后者是个专门设计来减轻命令行处理负担的库函数。<br />1、命令行参数<br />命令行程式设计的首要任务是解析命令行参数,GUI派的程式员非
Published on: -
ubuntu 10.4 下安装samba
参考了网贴子:http://blog.163.com/txy_2009_hz/blog/static/124795635200981491332633/?fromdm&fromSearch&isFromSearchEngine=yeshttp://hejiantx.blog.163.com/blog/static/6186734201072754338170/1.安装:sudo apt-get install samba smbfs smbclient samba 用来创建,修改,删除samba
Published on: -
pthread多线程编程
●头文件:#include ●在编译时注意加上-lpthread参数,以调用静态链接库。因为pthread并非Linux系统的默认库 ●man帮助中看不到pthread的手册,使用命令安装: sudo apt-get install manpages-posix manpages-posix-dev linux下进程和线程使用的函数比较: 1.线程的创建 int
Published on: -
LINUX UDP网络编程
<br />地址的转换:<br />主机字节序和网络字节序的转换函数,通常X86用的是大端格式,而网络是小端格式,所以在设定IP地址时要来一个转换<br />#include <netinet/in.h><br />uint32_t htonl(uint32_t hostlong);<br />uint16_t htons(uint16_t hostshort);<br />uint32_t ntohl(uint32_t netlong);<br />uint16_t ntohs(uint16_t nets
Published on: -
VIM相关
让VIM打开文件时回到上次的光标位置: 编辑/etc/vim/vimrc,启动这段: " Uncomment the following to have Vim jump to the last position when " reopening a file if
Published on: -
LINUX TCP编程
相关结构体: struct sockaddr_in { sa_family_t sin_family; /* address family: AF_INET */ in_port_t sin_port; /* port in network byte order */
Published on: -
外网ssh到内网
<p>很多时候我们需要从外网ssh连接到内网服务器,进行一些操作,ssh可以很方便地实现这一点,我遇到了几个问题,写此文记录之。<br /> 首先在网上查找到转发命令是这样的:</p> <pre><div class="hljs"><code class="lang-shell">ssh -gR <remote_port>:<local_host>:<local_port> <remote_host> </code></div></pre> <p>这条命令的作
Published on: -
ubuntu 升级内核版本
<p>为了更快的速度和其他特性,可以升级linux内核, 下面是基于ubuntu16.04 4.15升级到4.20低延时版本的过程, 非常简单:</p> <p>下载内核: https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.20/<br /> 下载libssl1.11 http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4.3_amd64.deb</p> <
Published on: