Skip to main content

Posts

Getting Started with R

The easy way to get started with R is to use RStudio. You will need to install both R and RStudio. Here are the software packages you need to install: Windows http://cran.csie.ntu.edu.tw/ http://www.rstudio.com/products/rstudio/download/ Mac OSX http://xquartz.macosforge.org/landing/ http://cran.csie.ntu.edu.tw/ http://www.rstudio.com/products/rstudio/download/ You will need access to the internet to download R packages. If you need to configure a proxy, in RStudio, you will need to edit the environment text file: file.edit('~/.Rprofile') In that file, you will need to add the following settings: Mac OSX: Sys.setenv(http_proxy="http://proxy:8080") Windows: http_proxy=http://proxy:8080 Instructions were based from the following articles: https://support.rstudio.com/hc/en-us/articles/200488488-Configuring-R-to-Use-an-HTTP-Proxy http://www.kenbenoit.net/how-to-set-proxy-settings-for-r-mac-osx/ Once you have set up internet access, you s...

Classifieds Scam

Here's an actual scam attempt that I encountered. The pattern is similar and looks believable. The general steps: Scammer will signify interest in purchasing item. Scammer will say he is working for some non-profit and wants to buy the item for a fiance who is in South Africa. He will ask you to calculate the shipping cost via Fedex and will say he plans to pay by PayPal. Once you give the shipping cost, he will ask for the email where he will send the PayPal payment. He will then say he will make the payment now and ask you to check your email for the PayPal. You will receive an email from service@paypal. If you are using Gmail, this will likely be flagged as a phishing email in the Spam folder. Notice that the email will have typos and will ask that you send the tracking number to ppalonlinecare@mail2consultant.com or something other than paypal.com. The general content of this bogus email is that this is a new PayPal policy and that the funds will only transferred to you o...

Batch renaming of files in OSX using Automator

While I was organizing my photos, I encountered many instances where the filenames of different photos were the same, so I couldn't place them in the same folder without renaming them. It was fine at first when there only a handful of duplicate filenames, but there had to be better way. There was another scenario where I wanted to insert the year before each video so that I could easily group them. In OSX, there is a built-in tool called Automator, which is found in Applications. Just open it and create an Application. When it opens, just search for rename and drag "Rename Finder Items" to the main window, which will ask you if you want a copy or not. In my case, I did not need a copy. You can change the parameters to something like below. Then save it to your Desktop for easy access. Inserts the year in front of the files. To use this, in Finder, select the files you wish to rename and drag them to the Automator icon that you just saved in your Desktop. I have two...

Android KitKat 4.4.1 on Nexus S (CM11)

My Nexus S was on CM 10.2 (Android 4.2) for a while and held off upgrading to 10.3 (Android 4.3) because there was little difference in the upgrade. Kitkat (Android 4.4), on the other hand, promised good performance on devices with as little as 512MB, so I jumped at the chance when the first Nexus S (crespo) KitKat nightlies started appearing on Cyanogenmod. I encountered just one hitch in the upgrade and it was related to the clockwork recovery I had. Here are the steps to upgrade from CM 10.2 to CM 11 Nightly. Backup your phone data Backup your SMS messages. I used the SMS Backup and Restore app. Backup your photos. Just copy the \DCIM\Camera folder to your drive. Backup your phone ROM. Just boot to recovery (Power off, Hold Power and Vol Up button until the recover menu comes up) and do a backup. Download the following files on your PC download.cyanogenmod.org/?device=crespo ( cm-11-20131207-NIGHTLY-crespo.zip ) http://wiki.cyanogenmod.org/w/Google_Apps ( gapps-kk-2...

Your car key remote got wet, what now?

My car key fell into a street drain where it lay there for at least 5 minutes before somebody was able to fish it out. The first thing you need to do is remove the battery and dry out the electronic parts. I used tissue paper to blot out all visible moisture. When everything appeared to be dry, assembled the key back and tried to open the car. Fortunately, it worked. A couple of hours later, it didn't work anymore. When I checked the battery again, there was a little water and it appeared that there was still moisture inside the casing. The best thing to do here is to find silica gel or a dessicant which you can find inside new shoes or bags. If you can't find any, you can go to a supermarket and buy a pack of rice crackers. I knew One One Rice Crackers had a large pack of dessicant inside. That's the one on the left below. I found the one on the right from a Case Logic bag. Just pack these together with the electronic component of the car key in plastic bag. Seal it and...

PDI Kettle 4.4.0 Missing MySQL and Oracle

Pentaho Data Integration (PDI) Kettle does not include all database JDBC drivers by default beginning with version 4.4.0. Oracle and MySQL, in particular are have been taken out. That means all your transformations and jobs that access those databases will not run until you copy the jdbc drivers to the  libext folder. The following table shows the comparison between an older version of PDI. The highlighted rows are no longer bundled by default, so you'll have to copy the drivers over from an previous version or download from the database vendor's website.