Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Lakshmi Srinivas
Page 9 of 24
How to make the web page height to fit screen height with HTML?
Many ways are available to make the web page height to fit the screen height −Give relative heights −html, body { height: 100%; }You can also give fixed positioning −#main { position:fixed; top:0px; bottom:0px; left:0px; right:0px; }You can also use Viewport height to fulfill your purpose −height: 100vh;
Read MoreHTML5 Input type=number removes leading zero
The leading zero issues may arise when you want to add an international phone number.To solve this −On iOS, the numeric keyboard appears with only numbers.On Android phones, the "tel" is rightly interpreted but not the pattern.You can also use −
Read MorePull down to refresh on the mobile web browser in HTML.
When there is a requirement to pull down the screen to refresh the page to get latest updates, this can be done with the help of JavaScript, xhttprequests and then touch events.Pull refresh is a trigger to XHR in AJAX .It adds new data to the element we want.Pull refresh can be implemented with the help of hijacked JavaScript scrolling mechanism like iscroll. Twitter is using iscroll to pull refresh option.Another way is to create a refresh handler for overflow:scroll components.The interface provided can give an idea about the handler interface −var PullToRefresh= function(callback, wrapper, instructionsText) { //It ...
Read MoreWhat are Pure HTML export buttons in jQuery Data Table?
jQuery Data Table provides export buttons with the help of which we can make a structure like the following −Export PDFExport CSVExport HTMLExport ExcelFor this, we need to write code −var tbl = $('#extable').DataTable({ dom: 'export', buttons: [ { extend: 'collection', text: 'Export', buttons: [ 'csvHtml5', ' pdfHtml5', 'copyHtml5', 'excelHtml5' ] } ] });
Read MoreHow to set the height of an element with JavaScript?
Use the height property to set the height of an element. You can try to run the following code to set the height of a button with JavaScript − Example Heading 1 This is Demo Text. Update Height function display() { document.getElementById("myID").style.height = "100px"; }
Read MoreHow to set all the four border radius properties at once with JavaScript?
To set all the border-radius properties in JavaScript, use the borderRadius property. Set the border-radius properties at once using this. Example You can try to run the following code to learn how to set all the four border-radius properties − #box { border: thick solid gray; width: 200px; height: 200px } Demo Text Add border radius function display() { document.getElementById("box").style.borderRadius = "20px"; }
Read MoreFor Hosts Locale how to convert a string to lowercase letters in JavaScript?
To convert a string to lowercase letters in JavaScript, use the toLocaleLowerCase() method. Example You can try to run the following code to learn how to work with toLocaleLowerCase() method in JavaScript − var a = "WELCOME!"; document.write(a.toLocaleLowerCase());
Read MoreWhat is MySQL GENERATED COLUMN and how to use it while creating a table?
Basically generated columns are a feature that can be used in CREATE TABLE or ALTER TABLE statements and is a way of storing the data without actually sending it through the INSERT or UPDATE clause in SQL. This feature has been added in MySQL 5.7. A generated column works within the table domain. Its syntax would be as follows −Syntaxcolumn_name data_type [GENERATED ALWAYS] AS (expression) [VIRTUAL | STORED] [UNIQUE [KEY]]Here, first of all, specify the column name and its data type.Then add the GENERATED ALWAYS clause to indicate that the column is a generated column.Then, indicate whether the type of ...
Read MoreHow can we see the metadata of a view(s) stored in a particular MySQL database?
The INFORMATION_SCHEMA database has a VIEWS table that contains view metadata i.e. data about views. To illustrate it we are taking the example of a view named ‘Info’.ExampleThe following query will show the metadata of a view named ‘Info’ −mysql> SELECT * from INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'Info' AND TABLE_SCHEMA = 'query'\G *************************** 1. row *************************** TABLE_CATALOG: def TABLE_SCHEMA: query TABLE_NAME: info VIEW_DEFINITION:select`query`.`student_info`.`id`AS`ID`, `query`.`student_info`.`Name` AS `NAME`, `query`.`student_info`.`Subject` AS `SUBJECT`, `query`.` student_info`.`Address` AS `ADDRESS` from `query`.`student_info` CHECK_OPTION: NONE IS_UPDATABLE: YES DEFINER: root@localhost ...
Read MoreWhat are the different privileges required for using views?
Following privileges are required for a different kind of CREATE, REPLACE, DROP, ACCESS, UPDATE etc. of usage of views − CREATE VIEW Privilege − CREATE VIEW privilege is required to create a view. Along with this we must have sufficient privileges, like SELECT, INSERT or UPDATE, for accessing the tables to which the view definition refers. DROP VIEW Privilege − We require DROP VIEW privileges for using OR REPLACE clause, DROP VIEW statement and also for using ALTER VIEW statement. SELECT Privilege − We must have SELECT privileges for selecting from a view. INSERT, DELETE or UPDATE Privileges − Actually for an updateable view ...
Read More