What is the x86-64 calling convention by gcc? The calling convention of the System V AMD64 ABI is followed on GNU/Linux. The registers RDI, RSI, RDX, RCX, R8, and R9 are used for integer and memory address arguments and XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6 and XMM7 are used for floating point arguments. For […]
How to get a file’s size in C? If you have the file stream (FILE * f): fseek(f, 0, SEEK_END); // seek to end of file size = ftell(f); // get current file pointer fseek(f, 0, SEEK_SET); // seek back to beginning of file // proceed with allocating memory and reading the file Or, #include […]
How to convert a string to long in C? Use strtol or strtoul C library: strtol man page.strtoul man page. If the value of base is 0, the expected form of the subject sequence is that of a decimal constant, octal constant, or hexadecimal constant, any of which may be preceded by a ‘+’ or […]
We all know scanf / fscanf / sscanf is dangerous. But why? what is the exact reason? I thought the ‘%s’ is a problem that causes buffer overflow and ‘fgets’ is a better solution. But is it the exact reason? I pased a discussion by AndreyT and his discussion helps me figure it out: Claiming […]
Is there any good material for the ANSI C grammar? The ANSI C grammar in Yacc: http://www.quut.com/c/ANSI-C-grammar-y.html#compound-statement Answered by anonymous.
Are there some good free CDNs on the Web? There are some free CDNs in the Web. Cloudflare: https://www.cloudflare.com CloudFlare protects and accelerates any website online. Once your website is a part of the CloudFlare community, its web traffic is routed through our intelligent global network. We automatically optimize the delivery of your web pages […]
How to download the video playing in Chrome? Download the video playing in Chrome. Checkout the “FVD Video Downloader”: FVD Video Downloader Answered by anonymous. If you are using Firefox, DownloadHelper ( http://www.downloadhelper.net/ ) can handle videos even youtube very well.
However, there is only limited buttons in the default WordPress HTML editor. How to custom the HTML editor buttions? I like HTML editors with BBCode in WordPress and totally disable the Visual Editor. However, there is only limited buttons in the default WordPress HTML editor. I found a plugin to custom the HTML editor buttions. […]
Any suggestion on the hosting services? Seems Hostgator is great: http://www.warriorforum.com/internet-marketing-product-reviews-ratings/362470-hostgator-bluehost-dreamhost-pair-com.html I was considering moving to Hostgator from Dreamhost. Dreamhost has less limitations after comparing it with others (e.g. the 250k inodes number limitation). I will stick with it. Moreover, with CloudFlare enabled ( https://www.systutorials.com/b/web/3218/cloudflare-with-dreamhost/ ), it looks better. Answered by anonymous.
The built-in canonical URL function since WordPress 2.9 is great. But under some situation, it is not needed. For example, all the Mingle Forum threads’ canonical URL is set to the URL of the page that contains the [mingleforum] shortcode, which, of course, is wrong. How to diabled it? We can disabled WordPress’s Built-in Canonical […]
In Windows XP, Chrome fonts are ugly. How to enable font hinting / smoothing fonts edges? For Windows XP: In “Display Properties” -> “Appearance” -> “Effects…” -> Enable ClearType. And then restart Chrome. Answered by anonymous.
When managing many hosts, answering 100s of “yes” can make us crazy. In a trusted environment, let ssh automatically add the new hosts to the list of known hosts and free us from typing “yes”es. How to enable it? Method 1. Passing option to ssh ssh -o StrictHostKeyChecking=no username@host Method 2. Configuring ~/.ssh/config To automatically […]
Pasting code from another application to Vim is a nightmare. The autoindent features of Vim drive you crazy. How to make it easier to use? Pasting code from another application to Vim is a nightmare. The autoindent features of Vim will drive you crazy. What help you out is the “paste mode”. To paste code […]
How to enable the author information in Google search results as shown for many posts? As a post writer, we may want our authorship information to appear in search results. To do this, we need a Google+ Profile with a good, recognizable headshot as the profile photo. Then, verify authorship of our content by associating […]
By default, Vim does case sensitive search. How to make case-insensitive search in Vim? By default, Vim does case sensitive search. :set ignorecase can set Vim to conduct case insensitive search. However, it also affects substitutions, which is not we want However, how to do a case insensitive search only when it is needed? Use […]
How to set up Firefox Sync? The online Firefox help provides a very good tutorial on setting up Firefox sync across computers and other devides: http://support.mozilla.org/en-US/kb/how-do-i-set-up-firefox-sync Answered by anonymous.
What are the Google Chrome keyboard and mouse shortcuts for Linux and Windows? Keyboard shortcuts of Chrome can make it easier to control the browser and save our time. Here are a list of commonly used shortcuts: Ctrl+T Opens a new tab. Press Ctrl and click a link. Or click a link with your middle […]
How to disable automatic comment insertion in Vim? Add to ~/.vimrc: au FileType c,cpp setlocal comments-=:// comments+=f:// More: http://vim.wikia.com/wiki/Disable_automatic_comment_insertion Answered by anonymous.
How to compile Latex on Linux, and what’s the needed packages? On Fedora, the packages needed can be simply installed via: # yum install texlive* dvipdfmx To compile a latex document (say doc.tex) with bibtex used: $ latex doc $ bibtex doc $ latex doc $ latex doc $ dvips doc.dvi $ ps2pdf doc.ps The […]
How to disable/delete the current keyrings on gnome? If the Gnome keyrings are not needed, or we forget the password, we can disable/delete the current keyrings. The keyrings are stored under ~/.gnome2/keyrings/ To disabled or delete current keyrings, we can simply delete this folder: rm -rf ~/.gnome2/keyrings/ Remember to backup this directory if you still […]