Excel Spreadsheet Google Sheets XLS Notes

The following are some Excel  functions I use for data processing. I use Google Drive/ Google Docs/ Google Sheets.

Repeat count for each element in a list

In the 1st column of the sheet, have a list of items, then in the 2nd column, first cell, add this code:

 =ArrayFormula(QUERY(A:A&{"",""},"select Col1, count(Col2) where Col1 != '' group by Col1 label count(Col2) 'Count'",1))

The code will generate a list of unique items that make up the 1st list, and next to it in the 3rd column, will show the counts. (EG: if the 1st list is completely unique, nothing repeating, it will generate the same list with “1″ next to each item)

I found the code on this Stack Overflow thread, submitted by Adam L.


Various JavaScript Programming Notes

To make a 2 dimensional array

var v=new Array();
var v2=new Array();
v[0]=1; v[1]=7; v2[0]=v;
var x = v2[0][0] // x is 1;

Add to an array


Function – If string S is in array A, then return true

function inArray(string, array){
 for(var i = 0;i < array.length;i++){
 if (array[i]==string){
 return true;
 return false;



Phone Idea from 2007 – Automatic phone sound profiles

I found a funny draft email in an old email account with my revolutionary phone idea I emailed to some companies.. 

It is now possible to do this with Android apps – I use it to auto-switch my phone to aeroplane mode at night, and turn to silent during weekly lectures or meetings.


As a user of mobile phones, I have an idea that would revolutionize the phone experience.
There is a feature that no phone company has thought of and one that almost every person in the world with a phone needs.

The idea is a build on the “theme” feature of most phones, a profile for your phone for specific times (e.g. in car, meetings, outside etc.), in which you can change the volume of ringing, ring tone, vibration etc. This is a very convenient feature, but it is inconvenient to constantly change themes, especially when you always change it at the same times, in a pattern.

If you could set alarm like times for your different themes, You would never have a phone go off in class, or at work, or in a meeting; and you would never miss a call because you forget to turn your phone off silent, or if your on public transport and forget to turn your phone on loud.

There could be settings for changing themes at different times every day (9 to 5 job, same every day) or a weekly set up for different times every day (uni, with different classes)

For the interface, you could have visual calendar-like screen for planning the times for the week, or you could add changes to the theme one by one using drop down boxes (selecting, day, time, what theme, etc.)

 You can get several different apps to do this – I recommend AutomateIt 

Get it on Google Play


Apple iCloud Verification Email not sending or arriving

I wanted to try out the Apple version of Google Docs (Pages, Numbers, Keynote) but I’ve been using Google and Android for my digital life for many years, so though I registered an iCloud account when it was just starting for free, it wasn’t verified.

My login failed because it said that I needed to check my email account for the verification email, but it wasn’t sending any. It was asking to find the original one.

To receive your Apple iCloud verification email on Windows – download the iCloud application and install it, then login to your Apple ID account and click “resend verification email”


Gvim loading slowly when used with FileZilla

I learned emacs and vim briefly, so I wanted to start using it with everything, especially FileZilla, which is where I do a lot of coding.

I installed Gvim, since logging into the server through the terminal, and editing files directly with vim was too cumbersome (you needed to manually download a file, edit it, then upload it all in the terminal..)

I had this as my default editor:


And files were taking 5-10 seconds to load after they were downloaded from the server.. 
I changed it to:

/usr/bin/gvim -f

And it fixed it (for some reason)

Ubuntu GIF screen cast

A screencast is the recording of computer screen (aka screen capture) with the help of screen recording software. If you want to convert these screencasts into animated GIFs to use them on your blog or website, then this tutorial will explain this using two methods under Ubuntu/Linux Mint.

Method 1

The first method consists of using Byzanz which allows to record screencasts as GIFs. To install it under Ubuntu 12.10/12.04/11.10 or Linux Mint 13/12, open the terminal and run these commands:

sudo add-apt-repository -y ppa:fossfreedom/byzanz
sudo apt-get update
sudo apt-get install -y byzanz

You can now use this comman to record GIF screencasts (replace details with your own):

byzanz-record --duration=15 --delay=2 --cursor --x=65 --y=88    --width=666 --height=500  output.gif


For more help about the use of Byzanz, run this command:

byzanz-record –help

Note: The GIF file will be saved in the current terminal location.


Wacom Pen Keeps Drawing after lift from page – lift off tablet

If your tablet keeps writing after you lift of the page, there might be something caught in your pen sensor.

Take out the nib (plastic point that writes on the tablet) – pull it out with your teeth, and hit the pen point down on a table – then it should be ok.

Is Yahoo relevant or useful?

My first email address was a Yahoo one – My sister helped me set it up when I was younger, I think it was begreen4eva@yahoo.com hahaha~

After that, in high school, I made some HTML websites using Geocities, using many hideous flashing animated gifs and bright colours…

after that, I pretty much never saw Yahoo again, hooray Google ~

But there is actually one thing I love that came from Yahoo – Yahoo Widgets.

Google and Microsoft had their versions, but I found them both to be alike, and displeasing.

But I only like 3 of the Yahoo widgets (and a specific older version of one of them)

Click here to download Yahoo Widgets

Click here to download a ZIP of my favourite 3 widgets

Settings changes:

  • Calendar change to outline current day, change to white outline
  • Time make maximum size, and glow size, hide animation, alarm, date, etc. white font, black glow
  • Weather set location, change to metric
  • Set all to “below windows” and “prevent dragging”


If only they were available on Linux, but they are under some strict licence by Yahoo…