Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
contain
will show the entire image
#img1 {
  object-fit: contain;
}
cover
will take the entire space and maintain the image aspect ratio
#img2 {
  object-fit: cover;
}
by Valeri Tandilashvili
3 years ago
0
CSS
properties
0
As default
border
size is included into container's width but
outline
property is opposite of border, it's added outside of the container
by Valeri Tandilashvili
3 years ago
0
CSS
properties
0
Check some value into json: Json:
{"name":"John", "age":30, "car":null,"salary": 5000,}
Query
$users = DB::table('users')
                ->where('column_name_in_database->salary', 5000)
                ->get();
by Luka Tatarishvili
3 years ago
0
0
add
Paginator::useBootstrap();
to
AppServiceProvider.php
boot
method
use Illuminate\Pagination\Paginator;
public function boot()
    {
        Paginator::useBootstrap();
    }
by გიორგი უზნაძე
3 years ago
0
Bootstrap
CSS
Laravel
Pagination
0
Each
.js
file is a
module
itself, which contains important information about the file. If we
console.log(module)
, it will print the following object:
Module {
  id: '.',
  path: '/home/runner/xrfnkv6ixs',
  exports: {},
  parent: null,
  filename: '/home/runner/xrfnkv6ixs/index.js',
  loaded: false,
  children: [],
  paths: [
    '/home/runner/xrfnkv6ixs/node_modules',
    '/home/runner/node_modules',
    '/home/node_modules',
    '/node_modules'
  ],
  _compile: [Function]
}
exports
key includes the content (variable / function / object) that's going to be publicly available for other modules
filename
key is equal to the module file location ...
by Valeri Tandilashvili
2 years ago
0
Node
Node.js Tutorial for Beginners - 1 Hour
0
logger.js
file exports
log()
function. Content of the
logger.js
file:
function log(message) {
  console.log(message)
}

module.exports = log
The
log()
function is called in the
index.js
file:
const log = require('./logger')

log('some text')
by Valeri Tandilashvili
2 years ago
0
Node
Node.js Tutorial for Beginners - 1 Hour
0
logger.js
file exports object which contains only the
log()
function. Content of the
logger.js
file:
function log(message) {
  console.log(message)
}

module.exports.log = log
The
log()
function is called in the
index.js
file:
const logger = require('./logger')

logger.log('some text')
by Valeri Tandilashvili
2 years ago
0
Node
Node.js Tutorial for Beginners - 1 Hour
0
Prints total and free memory using OS built-in module:
const os = require('os')

let totalMemory = os.totalmem()
let freeMemory = os.freemem()

console.log(`Total memory: ${totalMemory}`)
console.log(`Free memory: ${freeMemory}`)
by Valeri Tandilashvili
2 years ago
0
Node
Node.js Tutorial for Beginners - 1 Hour
0
Reads the current directory synchronously
const fs = require('fs')

// With Sync function
let files = fs.readdirSync('./')
console.log(files)
Reads the current directory asynchronously
const fs = require('fs')

// With Async function
fs.readdir('./', function(err, files){
    if (err) {
        console.log('Error', err)
    } else {
        console.log(files)
    }
})
by Valeri Tandilashvili
2 years ago
0
Node
Node.js Tutorial for Beginners - 1 Hour
0
ctype_alnum
function
ctype_alnum
returns true if the value contains only alphanumeric letters. In the example
IF
statement will be executed because the value is alphanumeric
$var = 'as2df234asdf';

if (ctype_alnum($var)) {
	echo 'if';
} else {
	echo 'else';
}
by Valeri Tandilashvili
2 years ago
0
PHP
functions
0
Results: 1580