Bài đăng

Đang hiển thị bài đăng từ Tháng 4, 2016

Extra small numbers in javascript

Hình ảnh
     Big numbers can write using the below format in javascript. Example Program:- (Editor) Editor is Loading... Output:- Advertisement

How to convert Hexadecimal, octal,binary

Hình ảnh
     In javascript we can easy to convert any numbers to corespoinding hexadecimal, octal or binary value using toString() method. Syntax    variable.toString()      //convert to String    variable.toString(2)    //convert to Binary    variable.toString(8)    //convert to Octal    variable.toString(16)  //convert to Hexadecimal Example    var num=66;    num.toString();     //return "66"    num.toString(2);   //return "1000010"    num.toString(8);   //return "102"    num.toString(16); //return "42" Example Program:- (Editor) Editor is Loading... Output:- Advertisement

Delete all facebook messages at once

Hình ảnh
     If you have many messages for delete from facebook, it is very difficult to select all the messages, because facebook don't have the option for select all the message at once and delete in a click. But we have the solution for this we will give a small script for selecting all the message at once and delete in a single click. Step 1:    Login to your facebook account and go to message section. Step 2:       Select whose message you want to delete. Step 3:      Scroll up all the messages will load. Step 4:       Click Action (gear icon) and click Delete Messages... button like the below image. Step 5:       After press the Delete Messages... button you can see some check box on righside of the messages. Step 5:       Now Right click anywhere of the facebook page and click Inspect and on that window press Console (or simply press ctrl+shift+j  ), copy the below code and pa...

parseInt() in javascript

Hình ảnh
     The parseInt() function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems). Syntax    parseInt(string, radix); string      The value to parse. If string is not a string, then it is converted to a string (using the ToString abstract operation). Leading whitespace in the string is ignored. radix      An integer between 2 and 36 that represents the radix (the base in mathematical numeral systems) of the above mentioned string. Specify 10 for the decimal numeral system commonly used by humans. Always specify this parameter to eliminate reader confusion and to guarantee predictable behavior. Different implementations produce different results when a radix is not specified, usually defaulting the value to 10. Description      The parseInt function converts its first argument to a string, parses it, and returns an integer or NaN. If not NaN, the retur...

parseFloat() in javascript

Hình ảnh
     The parseFloat() function parses a string argument and returns a floating point number. parseFloat is a top-level function and is not associated with any object.      parseFloat parses its argument, a string, and returns a floating point number. If it encounters a character other than a sign (+ or -), numeral (0-9), a decimal point, or an exponent, it returns the value up to that point and ignores that character and all succeeding characters. Leading and trailing spaces are allowed.      If the first character cannot be converted to a number, parseFloat returns NaN.      For arithmetic purposes, the NaN value is not a number in any radix. You can call the isNaN function to determine if the result of parseFloat is NaN. If NaN is passed on to arithmetic operations, the operation results will also be NaN.      parseFloat can also parse and return the value Infinity. You can use the isFinite function to de...

Naming standards for SQLite

Hình ảnh
Naming Conventions for SQLite      Each database, table, column, index, trigger, or view has a name by which it is identified and almost always the name is supplied by the developer.The rules governing how a valid identifier is formed in SQLite are set out in the next few sections. Valid Characters      An identifier name must begin with a letter or the underscore character, which may be followed by a number of alphanumeric characters or underscores. No other characters may be present. These identifier names are valid :    mytable    my_field   xyz123   a However, the following are not valid identifiers :    my table    my-field    123xyz Name Length      SQLite does not have a fixed upper limit on the length of an identifier name, so any name that you find manageable to work with is suitable. Reserved Keywords Care must be taken when using SQLite keywords as identifier names. As a ...

SQLite first setup

Hình ảnh
   SQLite is not directly comparable to client/server SQL database engines such as MySQL, Oracle, PostgreSQL, or SQL Server since SQLite is trying to solve a different problem. Client/server SQL database engines strive to implement a shared repository of enterprise data. They emphasis scalability, concurrency, centralization, and control. SQLite strives to provide local data storage for individual applications and devices. SQLite emphasizes economy, efficiency, reliability, independence, and simplicity. SQLite does not compete with client/server databases. First configuration for SQLite      You have to write three js files they are 1) database_startup.js 2) database_query.js 3) database_debug.js       database_startup.js file helps you to initialize the database, create tables and if you want to insert any default values. var CreateTb1 = "CREATE TABLE IF NOT EXISTS tbl1(ID INTEGER PRIMARY KEY AUTOINCREMENT, CreatedDate TEXT,LastModifiedDa...

Problem on materialize css text box or textarea

Hình ảnh
     In materialize css textbox or textarea always shown in active mode if you clear the text box or text area values dynamically. If you want to deactivate the controller, just you can remove the active class while clear the text or textarea. Example     $("#txtincome").val("");     $("#txtincome").next().removeClass("active"); Problem       In the following example you can see the problem, first type any text on the Name text box, and try to click the " remove value" button, the text box is still in the active mode. Name      You can solve this problem using the following example program. Example Program:- (Editor) Editor is Loading... Output:- Advertisement

Auto delete friend request for facebook

Hình ảnh
     Some one get too many friend requests and if they want to reject all friend request you need to click all the " Delete Request " buttons. So it take long time to reject all friend requests. So you can use the following script for doing your work simply, the script will click your " Delete Request " button automatically. Auto Accept Friend Request Script 1) Go the this URL link facebook friend request page 2) Just copy the following code and paste it to your browser console window and press enter key. Code javascript:for( i = 0;i<document.getElementsByName("actions[reject]").length;i++){document.getElementsByName("actions[reject]")[i].click();}void(0);

Facebook auto accept friend request

Hình ảnh
     Some one get too many friend requests and if they want to accept all friend request you need to click all the " Confirm " buttons. So it take long time to accept all friend requests. So you can use the following script for doing your work simply, the script will click your " Confirm " button automatically. Auto Delete Friend Request Script 1) Go the this URL link facebook friend request page 2) Just copy the following code and paste it to your browser console window and press enter key. Code javascript:for( i = 0;i<document.getElementsByName("actions[accept]").length;i++){document.getElementsByName("actions[accept]")[i].click();}void(0);

toFixed() in javascript

Hình ảnh
     The toFixed() method formats a number using fixed-point notation. digits Optional. The number of digits to appear after the decimal point; this may be a value between 0 and 20, inclusive, and implementations may optionally support a larger range of values. If this argument is omitted, it is treated as 0. Returns A string representation of numObj that does not use exponential notation and has exactly digits digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length. If numObj is greater than 1e+21, this method simply calls Number.prototype.toString() and returns a string in exponential notation. Throws RangeError If digits is too small or too large. Values between 0 and 20, inclusive, will not cause a RangeError. Implementations are allowed to support larger and smaller values as well. TypeError If this method is invoked on an object that is not a Number. Synt...

toPrecision() in javascript

Hình ảnh
     The toPrecision() method returns a string representing the Number object to the specified precision.      A string representing a Number object in fixed-point or exponential notation rounded to precision significant digits. See the discussion of rounding in the description of the Number.prototype.toFixed() method, which also applies to toPrecision() .      If the precision argument is omitted, behaves as Number.prototype.toString() . If the precision argument is a non-integer value, it is rounded to the nearest integer. Syntax    number.toPrecision([precision]); Example    (3.666621).toPrecision(2)  //3.37 Example Program:- (Editor) Editor is Loading... Output:- Advertisement