Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
.flex-item:nth-child(1) {
  flex:1;
}
The above
flex
property is a shorthand of the following properties:
.flex-item:nth-child(2) {
  flex-grow:1;
  flex-shrink:1;
  flex-basis:0;
}
In the example, the first two elements have the same effect
by Valeri Tandilashvili
5 years ago
0
CSS
properties
CSS Flexbox Course
2
Extracts values from JSON object. In this example we extract two values:
number
,
issue_date
SELECT
    document_details,
    JSON_EXTRACT(document_details, '$.number'),
    JSON_EXTRACT(document_details, '$.issue_date'),
    JSON_UNQUOTE(JSON_EXTRACT(document_details, '$.issue_date'))
FROM students
Note: We can use
JSON_UNQUOTE()
function to remove quotes around JSON string values
by Valeri Tandilashvili
4 years ago
0
MySQL
JSON
Full MySQL Course for Beginners
2
Function
JSON_OBJECT
returns JSON string. It takes comma separated key / value pairs as parameters
INSERT INTO students (
    first_name, 
    last_name, 
    gender, 
    points, 
    document_details
) 
VALUES (
    'Beka', 
    'Gelashvili', 
    '1', 
    '82', 
    JSON_OBJECT('issue_date', "2020-05-25", "expire_date", "2030-05-18", "number", 5)
)
by Valeri Tandilashvili
4 years ago
0
MySQL
JSON
Full MySQL Course for Beginners
2
Function
JSON_ARRAY
takes parameters as array members and returns JSON string as array
SELECT
    JSON_ARRAY("2020-05-25", "2030-05-18", "number", 5)
by Valeri Tandilashvili
4 years ago
0
MySQL
JSON
Full MySQL Course for Beginners
2
Function
JSON_TYPE
takes JSON content and returns its type
SELECT 
    JSON_TYPE('{}'),  -- returns OBJECT
    JSON_TYPE('[]'),  -- returns ARRAY
    JSON_TYPE(NULL)   -- returns NULL
by Valeri Tandilashvili
4 years ago
0
MySQL
Full MySQL Course for Beginners
2
Function
JSON_PRETTY
prettifies JSON content
SELECT 
    JSON_PRETTY(document_details) 
FROM students
Note:
MariaDB
does not include
JSON_PRETTY
function
by Valeri Tandilashvili
4 years ago
0
MySQL
JSON
Full MySQL Course for Beginners
2
Accessing web page title
Prints the current web page title
console.log(document.title);
Updates the current web page title
document.title = 'Getting started with JavaScript';
by Valeri Tandilashvili
4 years ago
0
JavaScript
2
Sets
green
background color
document.body.style.backgroundColor = 'green';
Sets
display
property to
inline-block
for the element with id
element_id
document.getElementById('element_id').style.display = 'inline-block';
by Valeri Tandilashvili
4 years ago
0
JavaScript
CSS
The 10 Days of JavaScript
2
The object
cat
combines attributes and behaviors of a cat in the following object
let cat = {
    age: 4,
    name: 'Bella',
    meow() {
        console.log('Meowwww');
    }
}
Instead of the object, we would have separated function and variables, which is not organized way
let catName = 'Bella';
let catAge = 4;

function meow() {
    console.log('Meowwww');
}
by Valeri Tandilashvili
4 years ago
0
JavaScript
objects
The 10 Days of JavaScript
2
Nested objects
It's possible to have an object inside another object. In the example we have object
boyfriend
inside
cat
object
let cat = {
    name: 'Lucy',
    age: 4,
    meow() {
        console.log('Meowwww');
    },
    boyfriend: {
        name: 'Jack',
        age: 5,
        favoriteColors: ['Green', 'Yellow'],
        meow() {
            console.log('Meeoowwwwwwwwwwww');
        },
    }
}
Accessing nested object's attributes and methods:
console.log(cat.boyfriend.name); // Jack
cat.boyfriend.meow(); // Meeoowwwwwwwwwwww
by Valeri Tandilashvili
4 years ago
0
JavaScript
objects
2
Results: 1580