decodeURIComponent Function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 13:04:46

286 Views

The decodeURIComponent() function accepts a string value representing an encoded URI (Uniform Resource Identifier) decodes it and returns the result.SyntaxIts Syntax is as followsencodeURIComponent('http://www.qries.com/');Example Live Demo    JavaScript Example           var encodedData = encodeURIComponent('http://www.qries.com/?x=шеллы');       document.write("Encoded Data: "+encodedData);       document.write("");       var decodedData = decodeURIComponent(encodedData);       document.write("Decoded Data: "+decodedData);     OutputEncoded Data: http%3A%2F%2Fwww.qries.com%2F%3Fx%3D%D1%88%D0%B5%D0%BB%D0%BB%D1%8B Decoded Data: http://www.qries.com/?x=шеллы

Decode URI Function in JavaScript

Samual Sam
Updated on 25-Jun-2020 13:04:20

124 Views

The decodeURI() function accepts a string value representing an encoded URI, decodesit and, returns the resultant string.SyntaxIts Syntax is as followsdecodeURI('http://www.qries.com/');Example    JavaScript Example           var result1 = decodeURI('http://www.qries.com/');       document.write(result1);       document.write("");       var result2 = decodeURI('http://www.tutorialspoint.com/');       document.write(result2);     Outputhttp://www.qries.com/ http://www.tutorialspoint.com/

Fill an Array in Java Using setInt Method

Smita Kapse
Updated on 25-Jun-2020 13:04:06

161 Views

In order to fill an array in Java, we use the Array.setInt() method. The java.lang.reflect.Array.setInt(Object array, int index, int value) method assigns the value of the component with a particular index of the given array object to the specified integer value.Declaration − The java.lang.reflect.Array.setInt(Object array, int index, int value) is declared as follows -public static void setInt(Object array, int index, int value) throws IllegalArgumentException, ArrayIndexOutOfBoundsExceptionLet us see a program to fill an array in Java using the Array.setInt() method to fill an array in Java -Example Live Demoimport java.lang.reflect.Array; public class Example {    public static void main(String[] args) {   ... Read More

Fourth Generation (4G) Mobile Phones

Arjun Thakur
Updated on 25-Jun-2020 13:03:45

5K+ Views

Fourth Generation (4G) mobile phones provides broadband cellular network services and is successor to 3G mobile networks. It provides an all IP based cellular communications. The capabilities provided adhere to IMT-Advanced specifications as laid down by International Telecommunication Union (ITU).FeaturesIt provides an all IP packet switched network for transmission of voice, data, signals and multimedia.It aims to provide high quality uninterrupted services to any location at any time.As laid down in IMT-Advanced specifications, 4G networks should have peak data rates of 100Mbps for highly mobile stations like train, car etc., and 1Gbps for low mobility stations like residence etc.It also ... Read More

Check If a String Is Not Empty and Not Null in Java

karthikeya Boyini
Updated on 25-Jun-2020 13:03:23

2K+ Views

Let’s say we have the following string −String myStr1 = "Jack Sparrow";Let us check the string now whether it is not null or not empty.if(myStr != null || myStr.length() != 0) { System.out.println("String is not null or not empty");Example Live Demopublic class Demo {    public static void main(String[] args) {       String myStr = "Jack Sparrow";       boolean res;       if(myStr != null || myStr.length() != 0) {          System.out.println("String is not null or not empty");       } else {          System.out.println("String is null or empty");       }    } }OutputString is not null or not empty

Set has Function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 13:03:11

285 Views

The has() function of the Set accepts a value and verifies whether the current object contains the specified value. If so, this function returns the boolean value true else, it returns false.SyntaxIts Syntax is as followssetObj.has()Example Live Demo    JavaScript Example           const setObj = new Set();       setObj.add('Java');       setObj.add('JavaFX');       setObj.add('JavaScript');       setObj.add('HBase');       document.write("Contents of the Set: ");       document.write("");       for (let item of setObj) {          document.write(item);          document.write(""); ... Read More

Get the Component Type of an Array Object in Java

Anvi Jain
Updated on 25-Jun-2020 13:02:42

2K+ Views

In order to get the component type of an Array Object in Java, we use the getComponentType() method. The getComponentType() method returns the Class denoting the component type of an array. If the class is not an array class this method returns null.Declaration − The java.lang.Class.getComponentType() method is declared as follows -public Class getComponentType()Let us see a program to the get the component type of an Array Object in Java -Example Live Demopublic class Example {    public static void main(String[] args) {       int[] array = new int[] {1, 2, 3};       // obtain the Class ... Read More

MySQL Update with Random Number Between 1 and 3

Chandu yadav
Updated on 25-Jun-2020 13:01:59

1K+ Views

The syntax for updating a column with random number between 1-3 is is as follows −update yourTableName set yourColumnName=FLOOR(1+RAND()*3);To understand the above syntax, let us first create a table. The query to create a table is as follows −mysql> create table UpdateNumber1To3 -> ( -> MyNumber int -> ); Query OK, 0 rows affected (0.61 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into UpdateNumber1To3 values(100); Query OK, 1 row affected (0.16 sec) mysql> insert into UpdateNumber1To3 values(140); Query OK, 1 row affected (0.25 sec) mysql> insert into UpdateNumber1To3 values(130); ... Read More

Change Column Rule Width with CSS Animations

George John
Updated on 25-Jun-2020 13:01:46

201 Views

To implement animation on column-rule-width property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 600px;             height: 300px;             background: white;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;             column-rule: 10px inset orange; ... Read More

Set Values Function in JavaScript

Samual Sam
Updated on 25-Jun-2020 13:00:59

873 Views

The values() function of the Set returns an iterator object which holds the values of the current Set object.The next() method returns the next element in the iterator object.SyntaxIts Syntax is as followssetObj.values()Example Live Demo    JavaScript Example           const setObj = new Set();       setObj.add('Apples');       setObj.add('Oranges');       setObj.add('Bananas');       setObj.add('Grapes');       var valuesObject = setObj.values();       for(i=0; i

Advertisements