The encodeURIComponent() function accepts a string value representing an URI and encodes it by replacing the characters in it using numbers (1 to 4) and escape sequence.SyntaxIts Syntax is as followsencodeURIComponent('http://www.qries.com/');Example Live Demo JavaScript Example var result1 = encodeURIComponent('http://www.qries.com/'); document.write(result1); document.write(""); var result2 = encodeURIComponent('http://www.tutorialspoint.com/'); document.write(encodeURIComponent(result2)); Outputhttp%3A%2F%2Fwww.qries.com%2F http%253A%252F%252Fwww.tutorialspoint.com%252F
The encodeURI() function accepts a string value representing an URI and encodes it by replacing the characters in it using numbers (1 to 4) and escape sequence.SyntaxIts Syntax is as followsencodeURIComponent('http://www.qries.com/');Example Live Demo JavaScript Example var result1 = encodeURI('http://www.qries.com/?x=шеллы'); document.write(result1); document.write(""); var result2 = encodeURI('http://www.tutorialspoint.com/?x=шеллы'); document.write(result2); Outputhttp://www.qries.com/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B http://www.tutorialspoint.com/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B
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=шеллы
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/
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 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
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
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
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
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
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP