Almost all android application will have login or registration process in order to authenticate a user. In this article i will be demonstrating how to design android login screen design (note that it just designing the screens – no database connection or user validation).
Read More »Dynamically add Fragments to an Activity in Android
Fragments are more often used for user interfacepurposes. Fragments are used when the user wants to see two different views of two different classes on the same screen. In this article , we will create an Android application in which a fragment can be added to an activity on a …
Read More »Parse JSON Data Using PHP
With most of the popular web services like Twitter providing their data through APIs, it is always helpful to know how to parse API data which is sent in various formats including JSON, XML etc.
Read More »Generate An Authentication Code in PHP
This basic snippet will create a random authentication code, or just a random string. <?php # This particular code will generate a random string # that is 25 charicters long 25 comes from the number # that is in the for loop $string = “abcdefghijklmnopqrstuvwxyz0123456789”; for($i=0;$i<25;$i++){ $pos = rand(0,36); $str …
Read More »Encode Email Address using php
With this snippet, you can encode any email address into HTML entities so that spam bots do not find it. function encode_email($email=’info@domain.com’, $linkText=’Contact Us’, $attrs =’class=”emailencoder”‘ ) { // remplazar aroba y puntos $email = str_replace(‘@’, ‘@’, $email); $email = str_replace(‘.’, ‘.’, $email); $email = str_split($email, 5); $linkText = str_replace(‘@’, …
Read More »Passing data from one Activity to another in Android
You can start another activity within the same application by calling startActivity(), passing it an Intent that describes the activity you want to start. Also you can pass some data to the activity “to be started”, using the Intent object too.
Read More »Android Gridview
Android GridView shows items in two-dimensional scrolling grid (rows & columns) and the grid items are not necessarily predetermined but they automatically inserted to the layout using a ListAdapter. An adapter actually bridges between UI components and the data source that fill data into UI Component. Adapter can be used …
Read More »Validate Email Address
Sometimes, while filling forms on your website, a user can mistype his email address. Using the below function you can check if the email provided by user is in correct format.
Read More »Opera mini in .vxp format
You can download Opera mini in .vxp format. Click on this link Download now
Read More »SHOW NUMBER OF PEOPLE WHO HAVE LIKED YOUR FACEBOOK PAGE
function fb_fan_count($facebook_name) { $data = json_decode(file_get_contents(“https://graph.facebook.com/”.$facebook_name)); $likes = $data->likes; return $likes; } Syntex: <?php $page = “w2class.com”; $count = fb_fan_count($page); echo $count; ?>
Read More »