How to get Package information programmatically in Android

In some cases we have to get global information about application environment programmatically. We will get package name, version name, version code, application info and last updated time using the PackageInfo class which contains all of the inf...

How to get the max value from given multidimensional array using PHP?

Hello Reader! If you having an multidiamensnal array and you want to get the max value from a single element key then you see the example below:- [0] => stdClass Object ( [id] => TRF1254 [cust] => CUST9897 ...

How to Export MySQL table data to CSV File using PHP

In this blog I am going toexplain how to export mysql data to CSV file using php. CSV stand for comma separated values. Using the below code you can easily download CSV file and use anywhere. <?php function exportMysqlToCsv($table,$...

How to Authenticate user in PHP using PDO

Hi friends, If you are using PDO in php , Now you can Authenticate user using simple code. include 'conn.php'; try { $username = $_POST['user']; $password = $_POST['pass']; $smt=$conn->prepare("SELECT * FROM signup WHER...

How to detect UTF encoding using PHP

Hello Readers! if you want to find out the type of file encoding using php then the code below will help you:- //check string strict for encoding out of list of supported encodings $enc = mb_detect_encoding($str, mb_list_encodings(), tr...

7 Main Differences Between Web Apps and Native Apps

  With more and more people now preferring to use smartphones over PCs, it often becomes a conundrum for businesses to choose between web apps and native apps to provide users a pleasing experience they always expe...

Clear Facebook Sharer Cache

Hello friend, Whenever we share a any URL on our Facebook, Web crawlers will surely visit this website to get some specific information about the linked page (the page link which we have shared on FB wall), for example title, text and image. ...

How to change backgraund color View on select radio button in android?

Here I have created change backgraund color View app. when we select any radio button then it will change the backgraund color. In the below example i have use four radio button on diffrent colour id. You can use the below code to change backgrau...

Latest Social Media Facts & Statistics

[zipedit]Social media is the collection of many online websites & applications that allows people to share their ideas, career interest, pictures/videos and to create, exchange or share information in their social communities & networks. ...

How to get color of image for the background using PHP

Hello Readers! If you are developing the dynamic website in which the image color will be the background color then you can see it doing in PHP :- <?php $filename = $_GET['filename']; $image = imagecreatefromjpeg($filenam...

How to make Popup function in android?

Here I have created Popup function , Popup function can be used to display menu item list, anchor text and listitem etc. In the below example when we clicked on menu button the popup will be open and if we click outside the popup it will disappea...

How to Find Facebook Profile ID Number

Hello Guys, Facebook has provided us facility to custom profile URL but some time we need some Facebook ID number for any reason. So, Below are the step by step procedure /screenshots to get your fb profile ID number: Step 1: Open the Pro...

How to display Full day of the week along with date month and year in windows 7?

It's very well said, sometimes easy thing are more strenuous to apply, this one is the same, ones I am trying to show the date format of on my system same like below screenshot- on goggling I found the below tutorial... Easy and hel...

How to get Exact path of a photo saved in Mobile Gallery?

1)Suppose we have a Button and a TextView in XML: activity_main.xml <Button android:id="@+id/btnGet" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="GET IMAGES" /> <TextVi...

How to make text url to hyperlink using PHP

Hello Reader!, On printing the url in plain text, they do not appears as hyper linked but using PHP you can perform this. Let's see the example below that takes a plan url as input and return the hyperlinked url:- <? function createHyper...

get Added accounts email from device Android

Blow code get list of Emails account from AccountManager. AccountManager manager = (AccountManager) mActivity.getSystemService(mActivity.ACCOUNT&#95;SERVICE); Account[] list = manager.getAccounts(); if (list.length &g...

How to Select specific category by writing PHP code to show lat & lng location in google map using volley library

I want to display location (lat & lng) markers in Android google map using volley library by selecting the category. I am not able to get individual selected item locations but I am able to get all locations markers in map. Please help in ...

Difference in using session_unset() and session_destroy() in PHP

For just the functioning part both the syntax will work the same but by writing session_unset will clears the $_SESSION variable but will not destroy the variables and it will initialize to this stage:- $_SESSION = array(); session_destro...

How to make a JSON call using jQuery?

To make JSON call we use getJSON method. Here is the syntax and description of it. Syntax : $.getJSON( url, [data], [callback] ) Description 1. url : It is URL where the request is send and which emits out JSON. 2. data : this ...

To call and send parameters to java Script function from Objective C

To call javascript function write the following lines : NSString *getStringvalue=[webView stringByEvaluatingJavaScriptFromString:@"getName()]; Where getName() is a JavaScript function which return a String value. and to send Objective C...

Social Media and SEO an Effective Business Solutions

As In my previous post I have already described How much SMO (Social media optimization) and marketing is important along with SEO, I just came across with this wonderful article describing how social media and search engine optimization can prod...

Picture orientation issue in samsung galaxy

I am encountering some problem with Cordova Camera plugin and Android, When taking picture in Android (e.g. in portrait mode) the image is rotated by -90, i am facing this problem only in Samsung Galaxy.

How to validate a given URL using PHP

Hello reader! If you have a to check the url is correct or not (not giving the status 404), Then you can get all the details of any url by using 'get_headers' in print_r. Let's see the example below:-0 <?php stream_context_set_default( ...

Date Picker Dialog and Time Picker Dialog in Android

Android provides Date and Time Picker dialog, user can select appropriate date and time as per his need. With DatePickerDialog we can select date, month and year using Calendar class. setMaxDate(long maxDate) and setMinDate(long minDate) meth...

How to remove all special characters from a string using PHP

Hello Reader! If you want to remove all of the special charracter from a given string then PHP offers you to use 'preg_replace'; Lets see the example below:- $GivenString = 'a2|"dM!@PO^&$f 12~'; $NewString = preg_replace('/[^A-Za-...

Customize seekbar in android

If you want to customize seekbar in Android then follow the steps mentioned below:- 1) To customize seekbar background create a new xml file in your project's drawable folder . seekbar_background.xml <?xml version="1.0" encoding="utf-...

Call a procedure with in procedure in SQL server

Call a procedure with in procedure in SQL server :- While working in sql Some times you need to Calling one stored procedure within another stored procedure. So you can implement this using below sample code:--- //Store Procedure 1 CREATE...

How to show and hide a pop-up div on a button click using jquery?

Showing a pop-up div on a button click is a very simple task. Below is the code for showing and closing(hiding) a div and use it like a popup using jquery. <!DOCTYPE html> <html lang="en"><head> <meta charset="utf-8...

How to make Toast with AlertDialog in android?

Here I have created Toast with alertDialog code function, according to below code both function runs in same time and display same time when we clicked listview item. In the below code I have explain how to make toast with AlertDialog function in...

Use of '@' in PHP

Hello Reader!, You might have seen people using the '@' in the PHP coding. The operator '@' is used when you don't want to show the error messages even if they occur. By using '@' the errors will be hidden. Let's see the two syntax below:- ...

How to reindex array in php?

Hello Readers!, If you have an array whose key index are missing then you could use the 'array_values' function to easily reindex the array. Let's see the example below:- <?php $array = array( 0 => 'string1', 2 => 'string2',...

How to find OS version from web browsers using PHP

Hello Reader! If you want to detect the OS version of user though the web browser. Then you can use the library code below:- <?php $OSList = array ( // Match user agent string with operating systems 'Windows 3.11' => 'Win16', 'Wi...

SQL Like Operator

This operator is used when we want specific pattern from a column in a table . % : This is called wildcards , it is used before and after the pattern . Syntax : select column_name1 .......column_nameN from table_name where column_name like p...

Javascript events in HTML

HTML events happen to HTML codes. When we add Javascript in HTML pages, Javascript then react to those HTML pages.HTML event does by the browser or a user. Some common HTML events are -->> Here is a list of some common HTML events: 1...

default keword in javascript

defautl keyword is used in two situations 1)switch statement. 2)export statement. 1) example of switch statement switch (expr) { case "Oranges": console.log("Oranges are my 1st choice."); break; case "Apples": console...

JQuery Chaining

For running multiple jQuery methods within a single statement,we make use of chaining. here is the example: <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"...

Load custom cell(Xib) in UITableView in swift

hello friends, if you would like to Load custom cell(Xib) in UITableView in swift ,you may use the following code -> func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return array.count; //...

test if an NSString is empty in Objective C

You can check if( [empName length]==0 || [[empName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) this will return 1 else 0 NSString *empName; if ([empName length]==0 || [[empName stringByTrimmingCharac...

SQL And & Or Operator

These operators are used where we want to get records based on more than one condition . And : From this operator we can get data if both the condition ( i.e first and second condition ) are true . Or : From this operator we can get data if eit...

Adding Elements in JQuery

For adding new HTML elements, following methods are used: 1)append(). 2)prepend(). 1)append This method is used to insert content at the end of the selected elements. <!DOCTYPE html> <html> <head> <script src=...

Question about using Java for data compression:

Hello, I have a question regarding the best approach to using Java to compress an MP4 music file. My approach is to use Java NIO to input the MP4 file into RAM as a stream and parse the bits to find a specific bit pattern. When I find the bi...

How to protect Joomla Administrator directory using htpasswd utility

.htpasswd file is just a simple text file which contains user name and encrypted password. It is Apache based login which protects and secure the specific directory on website and provide more security with the help of user name and password. ...

How to convert .ppk file into .pem file

If you would like to convert .ppk file into .pem file, the process are given below: 1) Open terminal and make your login 2) sudo apt-get install putty-tools 3) puttygen /var/www/html/abc.ppk -O private-openssh -o /var/www/html/abc.pem 4) c...

Convert local time to UTC format

Hello Guys, Today we will learn how to convert the local time period into UTC format : We will create a function with offset and time as parameter.Below is the code: function convertToUTC($DateTimeZone,$offset){ $DateTimeZone='201...

What is the require permission for ppk and pem files

If you are going to connect server via linux terminal or putty and you are getting error, "Permissions are too open" this mean your .ppk file have some wrong permission. You need to correct the file permission as below: chmod 400 abcxyz.pem

Android Expandable ListView

Expandable listview is used to categorise data in some specific type. Expandable list can have a two level scrolling list. Using ChildDivider feature we divide list items with drawables or colors, and ChildIndicator & GroupIndicator is for st...

NSAppTransportSecurity to run API in iOS 9

Hello all , To run any API in ios 9 ,a key should be added in info.plist in supporting files folder in any project. First select info.plist and open as source code and add this code starting of ... <key>NSAppTransportSecurity</...

How to Search in a List using Search Button in ToolBar?

1)In your XML,make a ListView: <ListView android:id="@+id/mylist" android:layout_width="match_parent" android:layout_height="match_parent"></ListView> 2)Go to menu.xml and add a Search Button: <item an...

Integrate jQuery fullcalendar in cakephp

This tutorial will help user learn how to integrate the jQuery fullcalendar in our web application blogs etc.Below are the steps to integrate the fullcalendar: Step 1:Write an action in an Eventcontroller let us say, event_calendar path...

overloading and overridding in php

Hello Readers overloading and overridding in php In php overloading define functions have similar signatures but thy have different parameters. Overriding means one class may have override the another methods where the parent class defin...
1 207 292