graphs

Mac Numbers document to Excel

Starting to play with the mac numbers app that comes with my mac, and after doing my spreadsheet, pretty much the same as excel so far, i want to share it and the standard being xls file, I figured how to do that.

Go to file menu on the number application and select the export to => Excel. export-to-excel

The rest is history after that.. I like how neat the number app is so far, I will try to see how it is flexing its muscles over the giant excel as I have a lot to do on that..

By the way, I have been a great fan of apaches open office just check it out.

 

Browser shows the same image after the update

If there is an image change on the same file name, say logo.png or front.jpeg, the change won’t happen right away unless you force refresh it on browser to clear the cache.
The problem with this one is when you have dynamic updates and your users couldn’t see the change right away b/c of the cache.

The simple fix for this would be appending version at the end of the file name. Like your original html would look like:

img height="200" src="/path/to/image/file.ext" 

Then appending the version at the end

img height="200" src="/path/to/image/file.ext?v=someVersionGoesHere" 

For any backend it would be easy to append the versioning when the image is presented. It could be random number or unix timestamp would work in this case too..

If you are generating the images from javascript, say based on the json response, you can do

var version = new Date()->getTime(); //get the unix timestamp
var path = "/path/to/image/file.ext?v="+version;

$('#image_id').attr('src', path);

Shall do the trick. I used jQuery her but, it is not limited to it..

Changes made in new revision of SVN. How to see changes in revision in SVN

Working on SVN? I am sure these days we are on the era of DVCS ( Decentralized Version Control System ) like that of git and mercurial but still, we will be using svn..

To see the changes you made on the current revision vs the previous one, use:

svn diff -r PREV:COMITTED file_name_goes_here

or if you have specific revision numbers then plug them in place of the prev and committed above and it will list the changes you made on that file.

How to change default MySQL directory

Originally it will be located at /var/lib/mysql

Say you want to change it to /home/myApps/mysql

First if the mysql is running stop it: sudo /etc/init.d/mysql stop
and stop the server too: sudo/etc/init.d/apache2 stop

Go to /etc/mysql/my.cnf and edit:
datadir = /var/lib/mysql to datadir = /home/myApps/mysql

Copy files from existing path to the new path
cp -R /var/lib/mysql* /home/myApp/mysql

Grant ownership to new directory for mysql

sudo chown -R mysql:mysql /home/myApp/mysql

then start up your server and mysql – voila.