Saturday, July 26, 2014

Setup phpMyAdmin for your freshly installed MySQL server

Download phpmyadmin to your machine. Unzip the file. Inside phpmyadmin folder there is a file config.sample.inc.php rename the file to config.inc.php

Open config.inc.php file and Change

$cfg['Servers'][$i]['host'] = 'localhost';

to

$cfg['Servers'][$i]['host'] = '127.0.0.1';




then Change

$cfg['Servers'][$i]['AllowNoPassword'] = false;

to

$cfg['Servers'][$i]['AllowNoPassword'] = true;


Now try opening phpmyadmin inside browser. Since your mysql is freshly installed it will have an empty password. Login phpmyadmin with

Username: root

and leave Password empty. Click Go button and here you go. You have successfully configured your phpmyadmin to work with mysql server.

Wednesday, July 23, 2014

My Experience with Breach (A browser written in JS)

After cloning breach from its core i ran breach with ExoBrowser on my machine. Unfortunately it failed to run on my Mac 10.6.8. I went to their issues listing on github and found out it doesn't support 10.6.8. I guess its time i should upgrade my machine to a higher OS version.

You can try breach on your machine using the below link.

Saturday, July 12, 2014

Hackerrank.com Challenges VS Real World

I doubt any serious developers would consider doing hackerrank.com challenges, there's already a way to demonstrate your programming capabilities in the real world, either by contributing to an existing open source project or maintaining your own projects on github.

Software engineering != puzzle solving, Kiddy.

Sunday, September 8, 2013

AIR 3.6 flash/ flex - iOS - Invalid binary while uploading to itunes connect / App store via application uploader

Solution:

Add splash screen image files for iOS on your project root.

File names are

Default-568h@2x.png
Default.png
Default@2x.png


Cheers!

Saturday, February 23, 2013

Safari Slides Lite launched on Google Playstore


Our first android app has been launched on Google Playstore. It is an educational app targeting toddlers. Safari Slides Lite is a free version of Safari Slides series. Safari Slides Lite is published under the name Chokas Apps which is a new company responsible of developing mobile apps.

Although Safari Slides Lite is not bundled with unique features but we do intend to improve the app based on user feedback. So do write to us about your opinions on Safari Slides. We will be pushing regular updates of this app on playstore. Hope your toddlers will enjoy this app just like the way you wanted to.


Android app on Google Play

Wednesday, November 21, 2012

HTML5 Drag and Drop example tested in Chrome,IE(7-9),FF

I was looking for HTML5 drag and drop example on google so i came across w3schools example and the code worked fine on their own online editor. Then i copied the same code inside an html file that i created locally on my system. After running local html file inside different browsers the script went against my expectations and refused to work inside IE.

I went back to w3schools editor with the working code and checked if any extra javascript code was included but found nothing additional there.

I was a bit disappointed and returned back to my local script. I had no option but to find the solutions for IE errors. When i googled the errors, it occured the methods used inside javascript code were not available inside IE. Anyway i debugged the code and fixed all the IE specific errors which took exceptional time. Thanks to IE developer tool that helped me a lot and thanks to w3schools example who led me to the errors.

After wasting lot of time in fixing w3schools example i thought why not i put it on my blog so that someone else's time would not be wasted. Hope this helps.

Below link has the example script.

https://www.dropbox.com/s/89s89xrh6cw12pt/index.html





Friday, November 9, 2012

MySQL Function to Calculate x time ago from a particular date

Couple of days ago i was searching for a function in MySQL that could calculate time difference of a particular time with current time and return string like "3 minutes ago" or "2 days ago" and etc. I came across many functions for PHP but no MySQL. So i picked a PHP function and converted it to MySQL function. I used the PHP script from
http://www.tom-elliott.net/php/php-seconds-minutes-hours-ago/ by Tom Elliot.

MySQL script to create this function is


DELIMITER $$

DROP FUNCTION IF EXISTS `fn_x_time_ago`$$

CREATE DEFINER=`root`@`localhost` FUNCTION `fn_x_time_ago`(old_time DATETIME) RETURNS VARCHAR(100) CHARSET latin1
BEGIN
DECLARE the_result VARCHAR(100) DEFAULT '';
DECLARE time_difference INT(11);
SELECT UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(old_time) INTO time_difference;

IF (time_difference > (60*60*24))
THEN SELECT CONCAT(ROUND(time_difference/60/60/24)," days ago") INTO the_result;
ELSEIF (time_difference > (60*60))
THEN SELECT CONCAT(ROUND(time_difference/60/60)," hours ago") INTO the_result;
ELSEIF (time_difference > (60))
THEN SELECT CONCAT(ROUND(time_difference/60)," minutes ago") INTO the_result;
ELSEIF (time_difference > (0))
THEN SELECT CONCAT(time_difference," seconds ago") INTO the_result;
END IF;
RETURN the_result;
END$$

DELIMITER ;


Name of MySQL function is fn_x_time_ago. It takes a date as argument. So the query to call this function will become.

SELECT fn_x_time_ago('2012-11-10 10:15:00');