Install GCC 4.9.3

#!/bin/bas# this script installs GCC 4.9.# to use it navigate to your home directory and type# sh install-gcc-4.9.3.s# download and install gcc 4.9.wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.gtar xzf gcc-4.9.3.tar.gcd gcc-4.9../contrib/download_prerequisitecd ..mkdir objdicd objdi../gcc-4.9.3/configure --prefix=$HOME/gcc-4.9.3 --enable-languages=c,c++,fortran,go --disable-... Read More

Change the mirror of HomeBrew to AliYun’s

简介Homebrew 是一款自由及开放源代码的软件包管理系统,用以简化 macOS 系统上的软件安装过程。它拥有安装、卸载、更新、查看、搜索等很多实用的功能,通过简单的一条指令,就可以实现包管理,十分方便快捷。配置方法首先确保你已经安装好了 Homebrew 了, 如果没有, 请参考 OPSX 指引页的 Homebrew 文档;然后你只需要粘贴下述命令在对应终端运行。 Read More

Exuberant Ctags Manual

Thectagsandetagsprograms (hereinafter collectively referred to asctags, except where distinguished) generate an index (or "tag") file for a variety of language objects found infile(s). This tag file allows these items to be quickly and easily located by a text editor or other utility. A "tag" signifies a language object for which an index entry is available (or, alternatively, the index entry crea... Read More

Got “our configuration does not allow connections to ” while using composer install

Got this message while using the composer install command[Composer\Downloader\TransportExceptionYour configuration does not allow connections to http://xxx.com:80/path/to/repo/repo-name-0.0.0.tar.gz. See https://getcomposer.org/doc/06-config.md#secure-http for details.Just run this commandcomposer config -g secure-http falsThen, go aheadReferrenc[1]. Latest Composer version not pulling Larav... Read More

[XChat-Server开发笔记]2019.02.15

http://blog.ihuxu.com/xchat-server-development-notes-list在👆上面,可以找到[XChat-Server开发笔记]主题相关的所有文章1. Log4增加Log4j插件扩展2. 数据包报文头协议设计参考QQ的协议:https://www.pediy.com/kssd/pediy10/83047.htm0000: 02 ->表示QQ数据包的起点。0001 - 0002: 为QQ客户端版本号对于QQ2008为:1221。0003 - 0004: 就是我们所说的QQ命令。根据试验发现命令为0016表示该包包含发出聊天记录的信息。0005 - 0006: 2B的序列号。0007 - 000A: 4B的发送消息的QQ号码。000B - 倒数第二字节: 用改进的TEA算法加密的包含聊天内容的数据包。(里面有很多丰富的信息如接收信息的QQ号码IP地... Read More

[XChat-Server开发笔记]2019.01.28 – 30

http://blog.ihuxu.com/xchat-server-development-notes-list在👆上面,可以找到[XChat-Server开发笔记]主题相关的所有文章1. 未登录的客户端线程池采用单例模式(Singleton Parttern)设计未登录的客户端线程池,采用静态内部类的形式保证其线程安全。之所以静态内部类能够保证单例模式的线程安全,是因为Java在底层针对类的加载已经做了同步处理,已经是线程安全的了。这种方式的优点懒加载,只有在需要的时候进行加载,节省资源在多线程共享使用一个单例时,确保线程安全关于线程安全下的单例模式的使用,参考文章:http://blog.ihuxu.com/java-singleton-pattern-usages-for-thread-safe1.1 客户端线程池的主要数据结构1.1.1 基于链表的阻塞队列(Linked B... Read More

[LeetCode]4Sum

原题Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.NoteThe solution set must not contain duplicate quadruplets.ExampleGiven array nums = [1, 0, -1, 0, -2, 2], and target = 0.A solution set is[-1, 0, 0, 1][-2, -1, 1, 2][-2, 0, 0, 2题解本题的... Read More