A little over a year ago, I joined Coursera. I took a few classes (Accounting, Entrepreneurial Studies, etc) mainly staying behind in the office for around two hours after close of work because I have crappy internet service at home.
In May last year I lost my Blackberry and so I joined the Android community and I was mighty pleased to have the Coursera Android app on my smart phone – now I could complete more courses as I could download the videos and watch them anytime (or so I thought).
But, I digress. I downloaded lots of videos and as time went on, I found out that Coursera was using up over 1GB of PREMIUM Internal storage space (My LG G Pro Lite comes with 8GB internal storage). I needed to move my videos out and so I started looking for ways to do this.
Luckily, I found this StackExchange Question which led me to another StackExchange question from which I got my solution. I’m going to just go ahead and list the steps here both for future references and for people out there looking for help:
- Enable USB debugging on your Android device.
- Install and Android SDK and USB drivers for your device.
- In Windows open Command Prompt (or Terminal in Linux), navigate to a directory where you want to store the backup, and issue the following command:
adb backup -f courseraBackup.ab org.coursera.android -d This backs up the app and its data (including the downloaded videos) to the location where you ran the command.
- For Linux, convert the backup to an archive by running this command:
dd if=courseraBackup.ab bs=24 skip=1|openssl zlib -d > courseraBackup.tar
- Extract the archive using:
tar xvf courseraBackup.tar
UPDATE: A previous version of this post asked Windows users to download Droid Explorer. That didn’t work for me and I’ve updated this post to show what worked for me.
It turns out a bit more complicated for Windows users (at least, in my case). I spent 4 hours trying different “hacky” solutions before eventually reverting to one that I finally used.
Download Android Backup Extractor (here). And form thence, it’s a simple case of running the following command:
java -jar abe.jar unpack courseraBackup.ab courseraBackup.tar [password]
Running that took me all of 5 minutes and I started to wonder what I was thinking by ignoring this approach in the first instance.
A while back, I thought creating virtual hosts on my Windows development machine was a pretty novel way to develop my PHP applications. So I looked for how to configure my Windows machine and soon enough I modified my
hosts file in order to add my virtual hosts.
In making the edits, I did something like this:
# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 22.214.171.124 rhino.acme.com # source server
# 126.96.36.199 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Prior to this time, my web server had been relatively good (speed-wise) and I never really noticed the speed drop until I tried to benchmark one of my apps.
When I did, I found out that a page request that was meant to be served in 100-200ms took between 5 and 7 seconds. At first, I thought maybe it was bottlenecks in my code but when I deployed the same application on the production server, response time dropped to the expected 100-200ms band.
So I fired up my browser and tried to Google a solution. I found this somehow related question on server fault: http://serverfault.com/questions/384136/apache-slow-at-responding
As indicated in the thread, the OP found his answer here: http://stackoverflow.com/questions/7547316/apache-virtualhost-slow-lookup/7553256#7553256
As it turns out, I put all of my Virtual Hosts definitions on the same line and it seemed to reduce the response time by about 65%. While this isn’t as fast as it once was, it’s definitely faster than 5-7 seconds.
Bored and sleepy this Sunday afternoon, I launched my WordPress app to work on one of my draft posts. After adding two more paragraphs, I checked out WordPress’ freshly pressed articles and stumbled on this “tribute”…
Welcome to Baga
where nightmares live
and dreams go to die
I had heard the men talk in low tones about what they did to Chibok
and how the nation stood still for a day and moved on
Mama never thought they would come
we have soldiers here, she would brag
oh but you see, they did
last night while men slept, they crept in on us
plundered our lands and set our homes on fire
It burned so beautifully that it reminded me of the fireworks last Christmas
mama and papa were taken away in that van
perhaps they will be back tomorrow
My shoes were left behind
the ones mama bought me for school
but my life is worth more
and so I ran through the forest until I came to a temporary place of solace
where a million other children dwelt
Every night since Baga
I wake up with screams that drown out the screams of the other tortured souls
perhaps, our brothers in the south would help us
or today, the world will end
and I will finally rest where peace lives
(c) Olamide Oti
Reblogged from: https://gabriellalove.wordpress.com/2015/01/10/525/
Here’s the problem: we have a customer’s database and inasmuch as we’ve tried to eliminate duplicates, we still have them. Multiple Customer Relationship Managers have gone ahead to create customer records without first checking if they exist and in so doing we now have instances where a single customer could appear five to eight times in our database. This is simply not good enough.
We laid this problem at the doorstep of a Tech Intern at the office (while we focused on more important stuff, yeah right) but she couldn’t figure it out. That’s where I came into the picture.
Here’s the Solution
So we had a table of this form:
| id | name | title | description |
| 1 | google | search engine | search here free |
| 2 | yahoo | also search engine | findout web easily |
| 3 | Facebook| connect with world | meet with world |
| 4 | google | search engine | search here free |
| 5 | msn | Microsoft network | network by MS |
| 6 | google | search engine | search here free |
| 7 | msn | Microsoft network | network by MS |
| 8 | yahoo | also search engine | findout web easily |
| 9 | myweb | my website | ideal website |
|... | .... | .....continue.... | ..... ... ..... |
What we want to do here is to delete all duplicates and leave just one record.
Here’s the SQL statement to do it:
DELETE s1 FROM my_services s1, my_services s2
WHERE s1.`name` = s2.`name`
AND s1.`title` = s2.`title`
AND s1.`id` <> s2.`id`
AND s1.`id` < s2.`id`
This query, when executed on the dummy table we have above would delete row 1 and row 4 (Google), leaving row 6. It would delete row 2, leaving row 8 (Yahoo) and it would delete row 5 leaving row 7 (MSN).
In essence, the last condition (highlighted) instructs MySQL to delete the records with the lower
ids hence, keeping the record with the highest
id value. You could change it to
AND s1.`id` > s2.`id` to keep the record with the lowest
id value instead.
Of course, you want to back up your database table before trying this out. Here’s a quick way I discovered some months back:
CREATE TABLE backup_destination_table
AS SELECT * FROM table_to_backup;
It’s a new year! Yay!!! Cue the drumroll and break out with the new dance steps.
I’m really excited about what 2015 has to offer (and what I’m offering 2015 myself). The past year was good in more ways than one. I got to do a lot of things which I never thought I could do so early in my short life. And I’m looking to keep that trend going this year. I’m really grateful to God for my family, loved ones, my friends (the few ones I’ve got), colleagues and acquaintances.
Thanks for all the support and encouragement you’ve given me. Its my hope that 2015 would be better for us all than 2014 ever was.
Over the past few days, I came across those quotes that people suddenly get the inspiration to come up with I only as the year comes to an end and one of them really stayed with me.
2015 won’t change anything unless you do.
So, it’s alright to say all the right things about this year being your year of *insert church prophesy/new year resolution here* but the truth is you need to take active steps to bring those things you desire into reality.
This is as much a note to myself as it is to other readers.
Be the change you want to see in 2015.
HAPPY NEW YEAR again. Welcome to 2015.