I use curl to send requests to remote servers like following command. curl http://example.com/send –date-urlencode “data=hello” However, it is blocked by the network proxy squid in some networks with message like (some info anonymized with “…”): ERROR The requested URL could not be retrieved POST /… HTTP/1.1 Proxy-Authorization: Basic … User-Agent: Mozilla/4.0 (compatible;) Host: …
Read more
Category: QA
Questions and answers.
How to identify a certificated lightning cable for iPhone 6?
Posted onThere are various lightning cables on the market. I ever purchased one but it does not work for iPhone 6… How to identify a certificated lightning cable that is good for iPhone 6? (I know the cables from Apple will definitely work. But it takes time to receive one from Apple or not always easy
Read more
how to install older version gcc/g++ in Ubuntu (other linux distro are similar)
Posted onWhen we compile some project, it needs older version gcc/g++ version. So how to insall older ones in ubuntu 16? Install older gcc/g++ version sudo apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib gcc-4.4-multilib Set gcc/g++ version to be used automatically sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-4.4 50 sudo update-alternatives –install /usr/bin/g++ gcc /usr/bin/g++-4.4 50 You may need
Read more
How to find a wireless network adapter’s speed in Linux?
Posted onHow to find a wireless adapter‘s speed in Linux? ethtool does not show the speed of the wireless adapters. For finding the configured speed of wireless adpaters in Linux, you can use the iwconfig tool. iwconfig: configure a wireless network interface For example, to find the speed of the wireless adapter wlp8s0: # iwconfig wlp8s0
Read more
How to make AdSense responsive ads show rectangle ads instead of horizontal ones?
Posted onI noticed that many sites with AdSense responsive ads show large rectangle ads (336px x 280px) or large rectangle text ads (full width x 280px). However, in my own website (640px width content area), it shows most of time horizontal ones. How to make AdSense responsive ads show rectangle ads instead of horizontal ones? At
Read more
How to find a network adapter’s speed in Linux?
Posted onI have a Linux box and it is connected to a network through a network adapter, say gate. How to find what is the current speed (10Mbps, 100Mbps or 1000Mbps) of the adapter? You can find the network adapter speed by the ethtool command: ethtool: query or control network driver and hardware settings For example,
Read more
Printing “powernow-k8 transition frequency failed” after install XEN
Posted onAfter I installed XEN hypervisor, the tty0 (CTRL+ALT+F1) prints “powernow-k8 transition frequency failed” to STDOUT continously, how to solve it? sudo rmmod powernow_k8 From https://lists.debian.org/debian-user/2013/01/msg00754.html How to make the settings persistent (take effect after reboot)? 1, Create script file ‘/etc/init.d/stop_pwoerk8.sh’ as follows. harry2vera@node1:/etc/init.d$ cat stop_pwoerk8.sh #! /bin/sh rmmod powernow_k8 2, Add the full PATH of
Read more
Implementation of strstr in glibc
Posted onWhat is the implementation of strstr in glibc? Implementation of STRSTR in glibc (string/strstr.c): /* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK if NEEDLE is empty, otherwise NULL if NEEDLE is not found in HAYSTACK. */ char * STRSTR (const char *haystack_start, const char *needle_start) { const char *haystack = haystack_start; const
Read more
How to disable SSH reverse DNS lookup on Linux?
Posted onHow to disable the reverse DNS lookup by the SSD server on Linux? To turn off reverse DNS lookups of the SSH daemon, log on the server and add UseDNS no to /etc/ssh/sshd_config. And remember to restart the sshd service by service sshd restart or systemctl restart sshd.service or other commands depending on your system.
Max number of Emails allowed to Sent from Gmail SMTP per day
Posted onGmail’s SMTP is convenient. You “sender” needs not to be always your Gmail address (but the emails will include your Gmail address in the header “send by”). I am wondering how many emails at maximum can I send each day through Gmail’s SMTP. Here there a nice recent list of the sending limits of the
Read more
rtnetlink answers file exists
Posted onWhen you replace dynamic IP to static IP, you may need to restart your netwrok on Debian as follows. $sudo /etc/init.d/networking restart … …. reconfiguring network interfaces…rtnetlink answers file exists … However, error happens here “rtnetlink answers file exists”. How to solve it??? Run following commands could solve this problem # ip addr flush dev
Read more
Vim turns to be slow after enabling some plugins, how to find which leads the problem?
Posted onVim itself is very fast. But it turns to be slow after enabling some plugins. How to find which plugin leads the slowness of Vim? You may use the profiling mechanisms in Vim. Please check a tutorial on profiling Vim. For profiling Vim startup: vim –startuptime profile.log For profiling certain actions in Vim: :profile start
Read more
How to exclude last N columns in Bash on Linux?
Posted onHow to exclude last N columns of a string in bash? The point is that the number of columns in each line is uncertain (but > N). For example, I would like to remove the last 2 columns separated by ‘.’ in the following lines. systemd.3.gz systemd.mount.3.gz systemd.mount.f.3.gz The simple cut command cut -d’.’ -f1
Read more
I cannot login Ubuntu Precise desktop
Posted onI cannot login desktop in Ubuntu Precise. It told me following errors: Could not write bytes: Broken Pipe… Check Battery Satte Actually, I tried many ways to solve this problem. It seems that something wrong with my lightdm software so, at last, I use gdm software to replace lightdm to kill this problem. Just install
Read more
How to sort all files recursively by modification time in a directory on Linux?
Posted onHow to sort all the files in a directory and subdirectories recursively by modification time on Linux? You can make use of find (GNU find, or plus stat), sort and sed together to achieve recursively sort files by modification time: find . -type f -printf ‘%T@ %pn’ | sort -k 1 -n | sed ‘s/^[^
Read more
Required packages for building YouCompleteMe for Vim on Fedora 21
Posted onYouCompleteMe for Vim on Fedora 21 reports this error: [zma@laptop:~/.vim/bundle/YouCompleteMe]$ ./install.sh — The C compiler identification is GNU 4.9.2 — The CXX compiler identification is GNU 4.9.2 — Check for working C compiler: /usr/bin/cc — Check for working C compiler: /usr/bin/cc — works — Detecting C compiler ABI info — Detecting C compiler ABI info
Read more
List of all Xen hypervisor command line options
Posted onWhere can I find a list of all Xen hypervisor command line options that can be passed to Xen hypervisor during boot? This page lists all options of Xen hypervisor: Xen Hypervisor Command Line Options
How to make WordPress regenerate the thumbnails after I changing the media aspects?
Posted onI recently changes the media aspects. The problem is that the existing thumbnails are not changed to the new aspects. How to make WordPress regenerate the thumbnails after I changing the media aspects? The “Regenerate Thumbnails” works like a charm for me: https://wordpress.org/plugins/regenerate-thumbnails/ . It allows you to regenerate your thumbnails after changing the thumbnail
Read more
What is Double-Blind review for a paper?
Posted onI want to submit my paper to NAS 2015 but I am confused about its double-blind review 盲审又包括单盲审(Single-Blind Peer Review, SBPR)和双盲审(Double-Blind Peer Review, DBPR)。双盲审是审者与作者之间互相都不知道彼此身份的匿名评审。在双盲审的过程中,中间组织者的规范和保密工作很重要。单盲审一般是审者知道作者的身份,而作者不知道审者是谁。 计算机有不少会议实行双盲评审。 Reference: http://emuch.net/html/201104/3022021.html
How to edit eps file?
Posted onI have made some eps figures for my paper but now I wanna modify them. How to edit them now? You may try inkscape on Linux: https://inkscape.org/en/ It can edit eps files.