In sbt, I found this message printed out by the scala compiler: [warn] there were 1 deprecation warning(s); re-run with -deprecation for details [warn] one warning found The question is, how to add options (-deprecation here) to the scala compiler in sbt? You can use this inside the sbt console: set scalacOptions += “-deprecation”
Category: QA
Questions and answers.
How to efficiently take screenshot on Windows 7
Posted onI am tired of the non-efficient “Print Screen” -> Paste in Paint -> Save way. How to efficiently take screenshot on Windows 7? On Windows 7 and later ones, the “Snipping Tool” is handy. Press the “Win” key and input “snipping tool”. The tool will appear in the menu. You can select the whole window,
Read more
Programming language popularity indices?
Posted onAny good programming language popularity indices? Those are interesting ones: TIOBE Indexhttp://www.tiobe.com/index.php/content/paperinfo/tpci/index.html The RedMonk Programming Language Rankings: January 2014 This ranking is published as blog posts. So no persistent homepage found yet. The January 2014 version is: http://redmonk.com/sogrady/2014/01/22/language-rankings-1-14/ Programming Language Popularityhttp://langpop.com/
How to `cut` a String Using a String as the Delimiter in Bash?
Posted onIs is possible to cut in Linux using a string as the delimiter? cut –delimiter=”delim” -f 1,3 cut reports: cut: the delimiter must be a single character The most closest solution that I find is using awk/gawk: awk -F ‘delim’ ‘{print $1; print $3}’ From the manual: -F fs –field-separator fs Use fs for the
Read more
WordPress theme TwentyFourteen interfere with AddThis Welcome Bar
Posted onThe AddThis welcome bar will make a empty gap on top of the WordPress webpage with the TwentyFourteen wordpress theme. Is there a fix for it? You will find AddThis will add this div to the webpage: <div class=”addthis_bar_placeholder” style=”height: 46px;”></div> which cause the problem. A little trick that works is to set that div’s
Read more
How to install drivers for TL-WN725N v2 USB wireless adapter on Fedora 19
Posted onI had a TP-Link TL-WN725N v2 USB wireless adapter. But it seems the kernels in Fedora 19 have not yet included drivers for it. How to install drivers for TL-WN725N v2 on Fedora 19? The driver is under development. You can find the source here and in the drivers/staging in the Linux kernel. If you
Read more
How to prevent roommates from hogging bandwidth
Posted onI share a ADSL modem via a Wifi router with several roommates. Sometimes, I find the network bandwidth left is too little. Suspiciously, some one is using BT, Thunder, eMule or other P2P tools. These tools can easily use up all the bandwidth and left little for others. How to prevent some roommates from hogging
Read more
How to concatenate multiple video file together on Linux
Posted onI have multiple video files, say video1.avi, video2.avi and video3.avi. How to concatenate these multiple video file to a single file together on Linux? You can use mencoder to concatenate multiple video files to one file. For installing mencoder on Fedora, please check: http://www.systutorials.com/1493/mplayer-on-fedora/ For the question, the command is: mencoder -oac copy -ovc copy
Read more
How to get a Makefile’s directory for including other Makefiles
Posted onI experience this problem: I have a file common.mk that includes release.mk which in the same directory. common.mk is included by the top-level Makefile. common.mk and release.mk are shared by multiple projects and the top-level Makefile may stay in different directories with {common,release}.mk. Now, include in make use the pwd as base directory. So, simply
Read more
Add via to the Tweet button of AddThis share
Posted onI use the AddThis share buttons on my sites. How to add the via @fclosedotcom to the Tweet button of AddThis share so that the tweets automatically @ my twitter handle? Change <a class=”addthis_button_tweet”></a> to <a class=”addthis_button_tweet” tw_via=”fclosedotcom”></a> Try it on this page with the Tweet button.
How to find files in a directory that are larger than certain size?
Posted onI have many files under a directory. How to find those files under the directory that are larger than certain size, say 500MB? Find the files that are larger than 500MB in the current directory (./): find ./ -size +500M Prints our more information about these files: find ./ -size +500M -exec ls -lh {}
Read more
How to find top K largest files in a directory on Linux?
Posted onI have many files in a directory on Linux. How to find top K largest files in a directory? For example, find top 10 (K=10) large files in the current directory: du -h –max-depth 1 * | sort -rh | head -n 10
How to change the fonts used in Gnome 3?
Posted onHow to change the fonts used in Gnome 3? The default configuration tool of gnome does not provide an option to change the fonts. However, the gnome-tweak-tool provides it. If you have not installed it, you need to install it first. On Fedora, run # yum install gnome-tweak-tool. Then you can run gnome-tweak-tool and set
Read more
How to change the fonts of gnome-shell for gnome3?
Posted onHow to change the fonts of gnome-shell for gnome3? Like the system bar. The fonts of gnome-shell is described in its own theme. For the default gnome-shell, you need to edit the file as root: /usr/share/gnome-shell/theme/gnome-shell.css Right, it is a css file. Find the font-family keyword and change the corresponding fonts. Then you can restart
Read more
How to find broken soft links in a directory?
Posted onHow to find broken symbolic links in a directory which have many symbolic links? Use this command to find broken soft links: find -xtype l /path/to/dir/to/find/in/ You can also specify the action by -exec. For example, delete the soft links that are broken in the current directory: find -xtype l -exec rm -f {} ;
Read more
Random string password generator in Scala
Posted onManaging our research cluster, I frequently need to generate some string for new users’ password. How to generate them automatically and randomly in Scala? The passwords need characters ‘a’ – ‘z’, ‘A’ – ‘Z’ and ‘0’ – ‘9’ only. This piece of code works very well for me: def randomString(len: Int): String = { val
Read more
How to change my Linux password
Posted onHow to change my password on a Linux box? The original password is generated by the administrator for me. User the passwd command. The easiest way: Log in the Linux box with your account Run passwd and it will ask your old and new passwords.
Domain registration coupons
Posted onThis page lists some domain registration coupons that users can use. The best that I can find currently the the $2.95 .com domain from godaddy: If you want to buy hosting from Godaddy at the same time, you can check this one which provides a free domain:
Syntactical difference among OCaml, Scala, F# and Haskell
Posted onWhat’s the syntactical difference among OCaml, Scala, F# and Haskell. This page gives a side-by-side reference among OCaml, F#, Scala and Haskell: ML Dialects and Friends: OCaml, F#, Scala, Haskell
How to write paper reviews?
Posted onSometimes, we need to write paper reviews after read many papers which belong to a specific area (like information retrieval). I have found some useful links which are as follows. http://www.uwlax.edu/biology/communication/ReviewPapers.htmlhttps://users.ece.utexas.edu/~miryung/teaching/EE382V-Fall2009/review.html