Create Blurry Background Image with CSS

AmitDiwan
Updated on 06-Apr-2020 13:14:23

903 Views

Following is the code to create a blurry background image with CSS −Example Live Demo body, html {    height: 100vh;    margin: 0;    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } * {    box-sizing: border-box; } .backgroundImage {    background-image: url("https://images.pexels.com/photos/1172207/pexels-photo-1172207.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500");    filter: blur(10px);    height: 100%;    background-position: center;    background-repeat: no-repeat;    background-size: cover; } .transparentText {    background-color: rgba(0, 0, 0, 0.4);    color: white;    border: 3px solid #f1f1f1;    position: absolute;    top: 40%;    left: 30%;    width: 50%;    padding: 20px;    text-align: center; } I am Shawn I am a web developer OutputThe above code will produce the following output −

Project Field in MongoDB

AmitDiwan
Updated on 06-Apr-2020 13:14:17

221 Views

To project field in MongoDB, use $project. Let us create a collection with documents −> db.demo439.insertOne( ...    { ...       "Name" : "Chris", ...       "MarksInformation" : { ...          "Marks1" : 67, ...          "Marks2" :45, ...          "Marks3" : 78 ...       } ...    } ... ); {    "acknowledged" : true,    "insertedId" : ObjectId("5e77833abbc41e36cc3caeab") } > db.demo439.insertOne( ...    { ...       "Name" : "David", ...       "MarksInformation" : { ...         ... Read More

MySQL Update Field with Group By

AmitDiwan
Updated on 06-Apr-2020 13:12:36

872 Views

To update field with GROUP BY, use ORDER BY LIMIT with UPDATE command −mysql> create table DemoTable2018    -> (    -> EmployeeId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> EmployeeName varchar(20),    -> EmployeeSalary int    -> ); Query OK, 0 rows affected (0.61 sec)Insert some records in the table using insert command −mysql> insert into DemoTable2018(EmployeeName, EmployeeSalary) values('Chris', 10000); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable2018(EmployeeName, EmployeeSalary) values('David', 12560); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable2018(EmployeeName, EmployeeSalary) values('Chris', 25400); Query OK, 1 row affected (0.09 sec)Display all ... Read More

Create a Hero Image with CSS

AmitDiwan
Updated on 06-Apr-2020 13:10:58

411 Views

Following is the code to create a hero image with CSS −Example Live Demo body, html {    height: 100%;    margin: 0;    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } *, *::before, *::after {    box-sizing: border-box; } h1 {    font-size: 60px;    font-weight: bolder; } .heroContainer {    background-image: linear-gradient( rgba(185, 255, 243, 0.5), rgba(31, 12, 117, 0.5) ),    url("https://images.pexels.com/photos/670720/pexels-photo-670720.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=1000");    height: 50%;    background-position: center;    background-repeat: no-repeat;    background-size: cover;    position: relative; } .heroCaption {    text-align: center;    position: absolute;    top: 20%;    left: 45%;    color: ... Read More

Remove Duplicate Records in MongoDB 3.x

AmitDiwan
Updated on 06-Apr-2020 13:08:14

349 Views

To remove duplicate record, use aggregate(). Let us create a collection with documents −> db.demo438.insertOne({"FirstName":"Chris"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5e775c37bbc41e36cc3caea1") } > db.demo438.insertOne({"FirstName":"David"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5e775c3dbbc41e36cc3caea2") } > db.demo438.insertOne({"FirstName":"Chris"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5e775c40bbc41e36cc3caea3") } > db.demo438.insertOne({"FirstName":"Bob"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5e775c44bbc41e36cc3caea4") } > db.demo438.insertOne({"FirstName":"David"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5e775c47bbc41e36cc3caea5") }Display all documents from a collection with the help of find() method −> db.demo438.find();This will produce the following output −{ "_id" : ObjectId("5e775c37bbc41e36cc3caea1"), "FirstName" : "Chris" } { ... Read More

Capitalize First Letter and Lowercase Others in MySQL

AmitDiwan
Updated on 06-Apr-2020 13:07:21

865 Views

Let us first create a table −mysql> create table DemoTable2017    -> (    -> Name text    -> ); Query OK, 0 rows affected (0.55 sec)Insert some records in the table using insert command −mysql> insert into DemoTable2017 values('JOHN SMITH, MYSQL'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable2017 values('DAVID MILLER, MONGODB'); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable2017 values('CHRIS BROWN, JAVA'); Query OK, 1 row affected (0.11 sec)Display all records from the table using select statement −mysql> select *from DemoTable2017;This will produce the following output −+----------------------+ | Name   ... Read More

Create Full Page Background Image with CSS

AmitDiwan
Updated on 06-Apr-2020 13:04:49

621 Views

Following is the code to create a full-page background image with CSS −Example Live Demo body, html {    height: 100%;    margin: 0; } .background {    background-image: url("https://images.pexels.com/photos/1424246/pexels-photo-1424246.jpeg?         auto=compress&cs=tinysrgb&dpr=1&w=1000");    height: 100%;    background-position: center;    background-repeat: no-repeat;    background-size: cover; } OutputThe above code will produce the following output −

Concatenate Records with Similar IDs in MySQL

AmitDiwan
Updated on 06-Apr-2020 13:04:16

268 Views

For this, you can use CONCAT_WS() along with GROUP_CONCAT(). Let us first create amysql> create table DemoTable2016    -> (    -> UserId int,    -> UserName varchar(20)    -> ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable2016 values(1, 'Chris'); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable2016 values(2, 'Bob'); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable2016 values(1, 'David'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable2016 values(2, 'Carol'); Query OK, 1 row affected (0.12 ... Read More

Set Alias for All Column Names in a Single MySQL Query

AmitDiwan
Updated on 06-Apr-2020 12:55:44

324 Views

To set alias for column names, the syntax is as follows −select yourColumnName1 anyAliasName1, yourColumnName2 anyAliasName2 from yourTableName anyAliasName;To understand the above syntax, let us create a table −mysql> create table DemoTable2014    -> (    -> FirstName varchar(20),    -> LastName varchar(20)    -> ); Query OK, 0 rows affected (0.70 sec)Insert some records in the table using insert command −mysql> insert into DemoTable2014 values('John', 'Smith'); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable2014 values('David', 'Miller'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable2014 values('John', 'Doe'); Query OK, ... Read More

Set MySQL SELECT in a Custom Variable

AmitDiwan
Updated on 06-Apr-2020 12:51:59

373 Views

Let us first create a table −mysql> create table DemoTable2013    -> (    -> Name varchar(20)    -> ); Query OK, 0 rows affected (0.63 sec)Insert some records in the table using insert command −mysql> insert into DemoTable2013 values('Chris'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable2013 values('David'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable2013 values('Mike'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable2013 values('Sam'); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable2013 values('Bob'); Query OK, 1 row affected (0.12 sec)Display all ... Read More

Advertisements