Credit/Debit card validation using LUHN (Mod10) algorithm
/** * @author anshu * */ public class Validator { public static final byte VISA = 0; public static final byte MASTERCARD = 1; public static final byte AMEX = 2; public static final byte DINERS_CLUB =...
View ArticleConfiguring and accessing MySQL jdbc driver on android application
So you want an application to secure client’s data on cloud and do not have enough expertise on web services. Guess what, you don’t need web service for that. If you are good with Database and know how...
View ArticleAndroid – Simple JSON parsing using jackson APIs
Here is a sample application which demonstrates usage of open source Jackson JSON Processor. This sample application performs a very simple HTTP GET Request to get JSON object from...
View ArticleAndroid 4.1 Jelly Bean View Animation Tutorial
Android 4.1 Jelly Beans released last week and there are lots of exciting new features.. I will try and give an over view of all the features. To start with let us have a look at new Animations APIs...
View ArticleAndroid 4.1 Jelly Bean Notification Tutorial
Notifications have always been very interesting feature of android. Developers can use them to present important event information in front of user in notification bar, outside of the application’s UI....
View ArticleAndroid 4.1 Jelly Bean Notification Tutorial Part II
In Android 4.1 Jelly Bean Notification Tutorial we saw how simple notifications can be build on Android 4.1. Now let us have a look at 3 new notification styles introduced in Jelly Bean. There are 3...
View ArticleAndroid 4.1 Jelly Bean Notification Tutorial Part III
In Android 4.1 Jelly Bean Notification Tutorial Part 1 & Part 2 we saw how to create simple notification and how to create styled notifications. In this post, we will see how to add an action...
View ArticleAndroid JDBC driver for Microsoft SQL Server and Sybase
Recently i shared a post about Configuring and accessing MySQL jdbc driver on android application. Good thing about MySQL is that it is open source and hence the driver is open source too. Even if we...
View ArticleAndroid 3.0 Honeycomb Drag and Drop tutorial
Since Android 3.0 Honeycomb we have drag and drop framework which allows us to move data from one view to another in current layout by simple graphical drag and drop gesture. The Drag and Drop...
View ArticleDifferent screen orientation on different screen size.
There are many tutorials around on web which tells how to support different screen sizes in android. But there are many tiny little real problems which comes in every day life of android developer...
View ArticleResizing webview to match the content size
There has been lots of discussion around methods of resizing the webview to fit the size of its content. The actual issue can be seen when we are using webview inside a scrollview. In case we wish to...
View ArticleAndroid, open application on click of a URL.
Add following code in your AndroidManifest.xml tag. <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" />...
View ArticleGet Apache & PHP working on Mac OS X 10.10 Yosemite
Three saviour commands Start Apache sudo apachectl start Stop Apache sudo apachectl stop Restart Apache sudo apachectl restart Enable PHP Open terminal and edit /etc/apache2/httpd.conf sudo vi...
View ArticleGIT find out the url of current repository.
If referential integrity has been broken: git config --get remote.origin.url If referential integrity is intact: git remote show originFiled under: Android
View ArticleJavaScript faster for loops
Assuming you want to traverse through an array using for-loop var array = [...........] Slow Way array.forEach(function(x){ // TODO: Do Something }); Fast Way for(var i = 0; i < array.length; i++){...
View ArticleAndroid Screen & Aspect Ratios
Most of the time one need to understand the target device’s aspect ratio for designing the UX, Following is the list of aspect ratios known to be available on Android devices. 4:3 3:2 16:10 5:3 16:9...
View ArticleHTML, jQUERY find actual size of image in img tag
Basically using DOM functions, if we try and get the size of <img />, we always get the dimensions of DOM element, not the actual image. To be able to get actual size of image, we will have to...
View ArticleHTML – Download image through AJAX and display it
AJAX was initially designed to be used with text data (JSON/HTML/XML) and that is why this requirement of downloading images using AJAX were never fulfilled. But with HTML5, XHR2 has been introduced...
View Article