Search Case-Insensitive in a Column Using LIKE Wildcard

Ankith Reddy
Updated on 25-Jun-2020 07:44:36

256 Views

We can do this with the help of lower() with column name. Firstly, we will create a table with the help of CREATE command.Creating a table −mysql> CREATE table InCaseSensDemo -> ( -> Name varchar(100) -> ); Query OK, 0 rows affected (0.50 sec)Inserting records into the table with the help of INSERT command −mysql> INSERT into InCaseSensDemo values('JOhN'); Query OK, 1 row affected (0.11 sec) mysql> INSERT into InCaseSensDemo values('bob'); Query OK, 1 row affected (0.21 sec) mysql> INSERT into InCaseSensDemo values('BoB'); Query OK, 1 row affected (0.13 sec) mysql> INSERT into InCaseSensDemo values('Bob'); Query OK, ... Read More

Alternatives to HTML5 iframe srcdoc

George John
Updated on 25-Jun-2020 07:44:29

596 Views

The HTML tag is used to create an inline frame.Example           HTML iframe Tag                   The srcdoc attribute specifies the HTML content of the page to show in the iframeAn alternative of the srcdoc attribute will be −var doc = document.querySelector('#demo').contentWindow.document; var content = ''; doc.open('text/html', 'replace'); doc.write(content); doc.close();

SQL Case-Sensitive String Comparison in MySQL

Arjun Thakur
Updated on 25-Jun-2020 07:44:14

853 Views

Firstly, we will create a table with the help of CREATE command.Creating a table −mysql> CREATE table InCaseSensDemo -> ( -> Name varchar(100) -> ); Query OK, 0 rows affected (0.50 sec)Inserting records into the table with the help of INSERT command −mysql> INSERT into InCaseSensDemo values('JOhN'); Query OK, 1 row affected (0.11 sec) mysql> INSERT into InCaseSensDemo values('bob'); Query OK, 1 row affected (0.21 sec) mysql> INSERT into InCaseSensDemo values('BoB'); Query OK, 1 row affected (0.13 sec) mysql> INSERT into InCaseSensDemo values('Bob'); Query OK, 1 row affected (0.18 sec)Displaying all the records with the help of ... Read More

Disable HTML5 sessionStorage: Can a User Do It?

Vrundesha Joshi
Updated on 25-Jun-2020 07:43:47

2K+ Views

Yes, a user can disable HTML5 sessionStorage.It is easy to prevent browsers from accepting localStorage and sessionStorage. Let us see the settings for web browsers −Firefox Type “about config” in the address bar and press. This would show the internal browser settings. Move to dom.storage.enabled“, you need to right-click and Toggle to disable the DOM Storage.In Internet Explorer, You need to select “Extras”, “Internet Options”, “Advanced” Tab. Now go to “Security” and uncheck “Enable DOM-Storage”Google Chrome In Google Chrome, you need to open “Options”, then select “Under the Hood” Tab.Click “Content settings…”, then select “Cookies” and you need to set ... Read More

Select Column Name with Spaces in MySQL

Ankith Reddy
Updated on 25-Jun-2020 07:43:38

20K+ Views

To select a column name with spaces, use the back tick symbol with column name. The symbol is ( ` `). Back tick is displayed in the keyboard below the tilde operator ( ~).Firstly, create a table −mysql> CREATE table SpaceColumn -> ( -> `Student Name` varchar(100) -> ); Query OK, 0 rows affected (0.48 sec)Inserting recordsmysql> INSERT into SpaceColumn values('John'); Query OK, 1 row affected (0.18 sec) mysql> INSERT into SpaceColumn values('Bob'); Query OK, 1 row affected (0.17 sec)The syntax to get column name with space is as follows −SELECT `column_name` from yourTableName; Now I will apply the ... Read More

Take Snapshot of HTML5 JavaScript Video Player

Ankith Reddy
Updated on 25-Jun-2020 07:42:59

836 Views

You can try to run the following code to take a snapshot of HTML5-JavaScript-based video player −Example                                       Snapshot                var video = document.querySelector('video');          var canvas = document.querySelector('canvas');          var context = canvas.getContext('2d');          var myWidth, myHeight, ratio;                    video.addEventListener('loadedmetadata', function() {             ratio = video.videoWidth/video.videoHeight;             myWidth = video.videoWidth-100;             myHeight = parseInt(w/ratio,10);             canvas.width = myWidth;             canvas.height = myHeight;          },false);          function snap() {             context.fillRect(0,0,myWidth,myHeight);             context.drawImage(video,0,0,myWidth,myHeight);          }          

HTML5 Canvas Text Stroke for Large Font Size

Arjun Thakur
Updated on 25-Jun-2020 07:42:11

293 Views

To draw large font properly in HTML5 Canvas, you can try to run the following code −var myCanvas = document.getElementById("myCanvas"); var context = myCanvas.getContext("2d"); context.font = '180pt Georgia'; context.strokeStyle = "#FF0000"; context.fillStyle = "#FFFFFF "; context.lineWidth = 34; context.fillText("Demo!",0,200); context.strokeText("Demo!",0,200);

HTML5 Geolocation in Safari 5

George John
Updated on 25-Jun-2020 07:40:03

1K+ Views

HTML5 Geolocation API lets you share your location with your favorite web sites. A JavaScript can capture your latitude and longitude, can be sent to backend web server, and do fancy location-aware things like finding local businesses or showing your location on a map.ExampleLet us see how to get the current position −                    function showLocation(position) {             var latitude = position.coords.latitude;             var longitude = position.coords.longitude;             alert("Latitude : " + latitude + " ... Read More

Cache Manifest Works for the First Time Then Fails in HTML

Smita Kapse
Updated on 25-Jun-2020 07:39:31

93 Views

Add the following in the bottom −NETWORK: *Set the version number of the manifest in the URL with the path.In addition, set −CACHE MANIFEST #rev ?v = 42 /css/style.css?v = 20 /js/myscript.js?v = 20

Animate CSS Border Bottom Left Radius Property

karthikeya Boyini
Updated on 25-Jun-2020 07:39:14

92 Views

To implement animation on the border-bottom-left-radius property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 500px;             height: 400px;             background: yellow;             border: 10px solid green;             border-bottom-left-radius: 150px;             animation: myanim 3s infinite;             background-position: bottom left;             background-size: 50px;          }          @keyframes myanim {             20% {                background-size: 90px;                border-bottom-left-radius: 50px;             }          }                     Performing Animation for bottom border left radius          

Advertisements