Quote
ls
command
used to list files in a directory (folder)
Arguments:
-a => Lists all files including hidden files (starts with .)
-l => Long list (detailed)
-r => Reverse the order of the files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arrayOfFunctions = [] | |
for (var i = 0; i < 5; i++) { | |
arrayOfFunctions.push( function () { | |
console.log(i); | |
}); | |
} | |
arrayOfFunctions[0](); // Expected? | |
arrayOfFunctions[1](); // Expected? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const students = [ | |
{firstName: 'Mohammed', lastName: 'Mwafaq', age: 24, married: false, avgScore: 79.3}, | |
{firstName: 'Shaymaa', lastName: 'Adnan', age: 22, married: false, avgScore: 73.52}, | |
{firstName: 'Sazgar', lastName: 'Omar', age: 22, married: false, avgScore: 75.39}, | |
{firstName: 'Shakhawan', lastName: 'Shukr', age: 34, married: true, avgScore: null}, | |
{firstName: 'Mahmood', lastName: 'Bashar', age: 29, married: false, avgScore: 70.2}, | |
]; | |
/** | |
* {name: 'Shakhawan', age: 34, married: true, avgScore: null}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Licensed under MIT license. | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Concerns; | |
use Illuminate\Database\Eloquent\MassAssignmentException; | |
use Illuminate\Database\Eloquent\Model; | |
/** | |
* @package App\Concerns | |
* @mixin Model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a id="link" href="">Print Rx Resume</a> | |
<script id="js"> | |
function init() { | |
if (window.location.host != 'rxresu.me') { | |
if (!confirm("This supposed to run on https://rxresu.me/.\nRun anyway?")) { | |
return; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const { useState, useCallback, useEffect } = React | |
const JobTitle = React.memo(function JobTitle(props) { | |
console.log('rendered') | |
return <h1>Hello, {props.name} {props.age}</h1> | |
}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
def multi_format(default='json'): | |
def decorator(func): | |
@wraps(func) | |
def wrapper(*args, **kwargs): | |
request = args[0] | |
request.match_format = lambda *args, **kwargs: _match_format(request, default_format=default, *args, **kwargs) | |
return func(*(request, *args[1:]), **kwargs) |
OlderNewer