What is Exception Handling in PHP

Alok Prasad
Updated on 29-Jun-2020 12:05:32

323 Views

An exception is a problem that arised during the execution of a program. During the execution of a program when an exception occurs, code following the statement will not be executed, and PHP will attempt to find the first matching catch block. If an exception is not caught, a PHP Fatal Error will be issued with an “Uncaught Exception”.Syntax   try {       print "this is our try block";       throw new Exception();       }catch (Exception $e) {          print "something went wrong, caught yah! n";       }finally {   ... Read More

Get Volley Elements in ArrayList in Android

Ankith Reddy
Updated on 29-Jun-2020 12:04:45

746 Views

This example demonstrate about How to get volley elements in array list in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. In the above code, we have taken text view to show volley elements.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.TextView; import android.widget.Toast; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import org.json.JSONArray; import ... Read More

Meaning of a Persistent Cookie in PHP

Alok Prasad
Updated on 29-Jun-2020 12:04:35

1K+ Views

A persistent cookie is a cookie that is stored in a cookie file permanently on the browser's computer. As we know cookies are small text files which are as a matter, of course, temporary cookies which stored only in the browser's memory. When the browser is closed, temporary cookies will be erased from the memory.When to use persistent cookies −Temporary cookies can not be used for tracking long-term information.Persistent cookies can be used for tracking long-term information.Temporary cookies are safer because no programs other than the browser can access them.Persistent cookies are less secure because users can open cookie files ... Read More

Find Wi-Fi Maximum Speed Supports in Android

George John
Updated on 29-Jun-2020 12:04:04

185 Views

This example demonstrate about How to find Wi-Fi maximum speed supports in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken a text view to show about Wi-Fi speed.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    TextView textView; ... Read More

Enable WiFi in Android

Chandu yadav
Updated on 29-Jun-2020 12:03:27

692 Views

This example demonstrate about How to enable wifi in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken a text view to enable wifi.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.net.wifi.WifiManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    TextView textView;    @RequiresApi(api = Build.VERSION_CODES.N)    @Override ... Read More

Read JSON Array in Reverse Order in Android

Arjun Thakur
Updated on 29-Jun-2020 12:02:52

538 Views

This example demonstrate about How to read json array in reverse order in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken text view to show NAME from object.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.TextView; import android.widget.Toast; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import ... Read More

CSS3 Multi-Column Property

radhakrishna
Updated on 29-Jun-2020 12:02:25

101 Views

CSS3 supported multi columns to arrange the text as newspaper structure. Some of the most common used multi columns properties as shown below −ValuesDescriptioncolumn-countUsed to count the number of columns that element should be dividedcolumn-fillUsed to decide, how to fill the columnscolumn-gapUsed to decide the gap between the columnscolumn-ruleUsed to specify the number of rulesrule-colorUsed to specify the column rule colorrule-styleUsed to specify the style rule for a columnrule-widthUsed to specify the widthcolumn-spanUsed to specify the span between columns

Moving Left Animation with Keyframes using CSS3

Arjun Thakur
Updated on 29-Jun-2020 12:01:46

253 Views

You can try to run the following code to move left animation with keyframes using CSS3ExampleLive Demo                    h1 {             -moz-animation-duration: 3s;             -webkit-animation-duration: 3s;             -moz-animation-name: slidein;             -webkit-animation-name: slidein;          }          @-moz-keyframes slidein {             from {                margin-left:100%;                width:300%             }             75% {                font-size:300%;                margin-left:25%;                width:150%;             }             to {                margin-left:0%;                width:100%;             }          }          @-webkit-keyframes slidein {             from {                margin-left:100%;                width:300%             }             75% {                font-size:300%;                margin-left:25%;                width:150%;             }             to {                margin-left:0%;                width:100%;             }          }                     Tutorials Point       This is an example of animation left with an extra keyframe to make text changes.       Reload page                function myFunction() {             location.reload();          }          

Count Character Occurrences in a String Using PHP

Alok Prasad
Updated on 29-Jun-2020 11:59:22

2K+ Views

Example Live DemoOutputw appears 1 times e appears 2 times l appears 2 times c appears 1 times o appears 4 times m appears 1 times t appears 4 times u appears 1 times r appears 1 times i appears 2 times a appears 1 times s appears 1 times p appears 1 times n appears 1 times

What is .htaccess in PHP

Alok Prasad
Updated on 29-Jun-2020 11:58:23

8K+ Views

.htaccess is a configuration file for use on web servers running on the web apache server software. when a .htaccess file is placed in a directory which in turn loaded via the Apache web server, then the .htaccess file detected and executed by the Apache server software. .htaccess files can be utilized to modify the setup of the Apache server software to empower additional functionality and fetures that the apache web server softwatre brings to the table. We can use the .htaccess file for alteration various configuration in apache web server software. Some of them are listed below:ErrorDocumentsCreating custom error pages ... Read More

Advertisements