Friday, December 18, 2015

Getting Code::Blocks to work with std_lib_facilities.h

In Stroustrup's book, 'Programming: Principles and Practice Using C++', one must include the header file. This won't work in Code::Blocks without some modification.

First, go to settings→compiler→ and make sure 'Have g++ follow the C++11 ISO C++ language standard' is checked.

Then comment out or delete the following  in the std_lib_facilities.h as shown below:

#ifdef _MSC_VER
 // microsoft doesn't yet support C++11 inheriting constructors
 Vector() { }
 explicit Vector(size_type n) :std::vector<T>(n) {}
 Vector(size_type n, const T& v) :std::vector<T>(n,v) {}
 template <class I>
 Vector(I first, I last) : std::vector<T>(first, last) {}
 Vector(initializer_list<T> list) : std::vector<T>(list) {}
#else
 using std::vector<T>::vector; // inheriting constructor
#endif 

Source: http://www.cplusplus.com/forum/general/136389/

Friday, December 11, 2015

Stop Excel from changing cell contents

Highlight the column. Right-click → format cells → custom → then choose a single 0.

Source: http://stackoverflow.com/questions/2420931/stop-excel-from-changing-cell-contents-ever

Wednesday, November 11, 2015

Rainmeter Network

A modified version of the default Rainmeter network skin found in the illustro package. Theme is the same as illustro. In addition to the features found in the default network skin, this also tracks the total data uploaded and downloaded each month. At the start of each month it will write the data to a text file and reset the data usage.
https://mega.nz/#!LRR2iYxI!bQ3uDHBSvBnNVkZO6hed4ybQ4TGOv4XmDHRTkGJfKYM

Sunday, September 27, 2015

Multiple instances of TeXstudio

To have multiple instances of TeXstudio in Windows, right click TeXstudio->Properties. Go to Target, and add --start-always. Make sure there is a space between the filepath and the --start-always

Source: http://tex.stackexchange.com/questions/123660/start-texstudio-portable-in-multiple-instances

Wednesday, July 29, 2015

Rainmeter Perth Weather

Rainmeter skin which displays the current forecast for the day, and also shows the current temperature for Perth, WA. Information is taken from the Bureau of Meteorology website. Theme is the same as illustro.
https://mega.nz/#!aBZ10aRA!D-ByNBxyFMszdxmbpi6hfDc9NC7FKAL7LCkS4Jdk83g

Wednesday, July 22, 2015

Doing stuff in Ubuntu

The following works for Ubuntu 14.04.2 LTS

In the terminal:

- Checking the ubuntu version:
lsb_release -d

- Installing programs:
sudo apt-get install program-name

- Looking for a certain type of file within the current directory, e.g. .pdf files:
find -name "*.pdf"

- Increase the screen idle dim timeout for Ubuntu 14.04:
gsettings set org.gnome.desktop.session idle-delay number-of-seconds

- Opening files in the current directory:
xdg-open file-name


 Other:

- To create desktop shortcut, go to /usr/share/applications.
Select the icon and press Ctrl+c to copy it. Go to the desktop and press Ctlr+v.
Note that drag and drop won't work.

Wednesday, July 15, 2015

Modifying Google Chrome

- To mute audio in tabs, type into the address bar: chrome://flags/#enable-tab-audio-muting. Enable it and restart chrome. Next time you want to disable audio from a tab, click the speaker icon on the tab.
- To remove name badge from the top right corner, type into the address bar: chrome://flags. Go to 'Enable new avatar menu', disable it, and restart chrome
- To remove name badge from the top right corner, follow the instructions as provided here: http://techdows.com/2015/06/chrome-44-disable-user-menu.html

Source:
http://betanews.com/2014/09/30/you-can-now-mute-audio-in-chrome-with-a-single-click/
http://www.addictivetips.com/web/remove-your-name-badge-from-the-top-right-corner-of-chrome/

Sunday, June 28, 2015

Sonata Pathétique

Ludwig Van Beethoven - Piano Sonata No. 8 in C minor, Op. 13, 1st Movement 
https://mega.co.nz/#!HMYnQY6J!ltskieagfg40y699vre30jAGvnirXRfp_6FlQ5_ZU0c

Ludwig Van Beethoven - Piano Sonata No. 8 in C minor, Op. 13, 2nd Movement
https://mega.co.nz/#!KUgkVbbC!YawporVMJ9j7SPIw9qcHjfkKyn-PpWlSdFU8UFu4QDI

Ludwig Van Beethoven - Piano Sonata No. 8 in C minor, Op. 13, 3rd Movement
https://mega.co.nz/#!PF4BADgA!lhUT75Am1vYJcWTODW03sdxI3K1ADdyScbhIieY1Vgs

All three movements played by Glenn Gould.

Monday, June 15, 2015

Advantages of rooting an Android device

- Get rid of ads, e.g. by using AdFree. This has successfully blocked ads within free apps.
- Get rid of pre-installed bloatware, e.g. by using Titanium Backup.
- Permanently request desktop site on Chrome, e.g. using Chrome User Agent  (this may not actually require a rooted device.).
- Add additional apps that can support multi-window for multi-window compatible devices, e.g. by using MultiWindow Apps Manager.
- Add useful apps that require root, e.g. f.lux, or Root Explorer

Disabling camera shutter sound in Google Camera

This only works if your android has been rooted.

A Google search suggests renaming the camera_click.ogg file, however this did not work for me. The file I had to rename was called Shutter.ogg

1. Use ES File Explorer to navigate to system/media/audio/ui
2. Rename the Shutter.ogg file to disable shutter sound.


April 2017 update: camera shutter sound can now be disabled via settings.

Wednesday, June 10, 2015

Changing colour of visited hyperlink in Microsoft Word 2010

Issue: You want the colour of a hyperlink to stay the default blue colour, but after clicking a link in Word, the colour changes to a purple-like colour.

Solution: http://answers.microsoft.com/en-us/office/forum/office_2010-word/hyperlinks-purple-and-microsoft-word-2010/93cb5832-dafc-4634-89a3-82358acf9b6a

Go to Page Layout, Colors, Create New Theme Colors. Change the colour of 'Followed Hyperlink' to the same colour as 'Hyperlink'.

Wednesday, May 13, 2015

Interesting Reads: Making of Crash Bandicoot

http://all-things-andy-gavin.com/2011/02/02/making-crash-bandicoot-part-1/

Andy Gavin and Jason Rubin, creators of the original Crash Bandicoot released in 1996, details the makings of the game, over a series of 13 blog posts.

Friday, May 8, 2015

Product Review: Rotating 360 Leather Case for Samsung Galaxy Tab S 8.4 SM-T700/SM-T705

Bought from here.

Pros:
- Does its job, protects the Samsung galaxy tab.
- Cheap, about $12

Cons:
- Rotating 360 isn't as useful as it sounds. No real need to put in portrait mode. The fact that it can be put it both landscape and portrait mode makes it less structurally sound.
- It has two slots to hold the tablet. The most upright position isn't very stable. It has fallen down more than once when playing games in this position.
- Inside cover gets dirty easily. So when you close the cover, the screen itself will also get dirty.
- After two and a half months of use, fabric has started to wear and tear out at the part where the cover bends.

Additional comment: To keep the cover on the tablet, an elastic strap is used to hold it in place. This mechanism slightly bends the cover at the edges.

Wednesday, April 29, 2015

Bolded text in pdf

Problem: After compiling latex, pdf containing images have text bolded. Problem only occurs within Adobe Reader

Solution: http://tex.stackexchange.com/questions/141/why-are-some-pages-in-my-pdf-coming-out-bold

To remove transparency in photoshop, Layer-> Flatten Image. Save the image, and recompile latex file. pdf should now look normal in Adobe Reader.

Thursday, March 12, 2015

Installing Cygwin

1. Grab the installation package from https://www.cygwin.com/
2. Install any packages you require. Common packages include: vim, gnuplot, x11.
- vim is a text editor.
- gnuplot to generate plots
- x11 to open up new windows. Need to use this for gnuplot
  • Attempting to open the gnuplot directly from the cygwin terminal won't work. Have to type in "startxwin", which will open another window. From this window, gnuplot will work.

Tuesday, February 24, 2015

Frédéric Chopin - Piano Sonata No. 2 in B-flat minor, Op. 35, 3rd movement (Funeral March)
https://mega.co.nz/#!aJAjGShZ!IoeFePsHD4DmDf9PTexlmWNLBqAB_cUgWJ6vYTsRnb0
Played by İdil Biret.

Friday, February 20, 2015

More often a change of self is needed than a change of scene - Benson