git init //git init
git status //show the status of git directory
git add . //add all file of direcotry to stage
git commit -m "message" //commit the statge
git commit -a -m "message" //add modified files to stage and commit
git rm --cached filename //remove file from stage
git diff //show diff of commited state with modified file
git diff --help //show diff help
git log //show all commit informations
git log --help //help for git log
This file contains hidden or 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
set_time_limit(0); | |
$curl = curl_init(); | |
try { | |
for ($page = 1; $page < 100; $page++) { | |
file_put_contents('progress.log', 'page: ' . $page, FILE_APPEND); | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => 'https://www.{DOMAIN}.com/wp-json/wp/v2/media?page=' . $page . '&media_type=image', | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => '', | |
CURLOPT_MAXREDIRS => 10, |
This file contains hidden or 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
import tensorflow as tf | |
import numpy as np | |
from keras.preprocessing.image import ImageDataGenerator | |
import math | |
class CustomDataGen(tf.keras.utils.Sequence): | |
def __init__(self, path, batch_size, target_size=(224, 224, 3), shuffle=False): | |
train_datagen = ImageDataGenerator() | |
generator_train = train_datagen.flow_from_directory(path, class_mode="sparse") |
This file contains hidden or 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 | |
function checkSMSLength($text) { | |
$ucs2 = preg_match('/[^\x00-\x7E]/', $text); | |
if (!$ucs2){ | |
$text = preg_replace('/([[\]{}~^|\\\\])/', "\\$1",$text); | |
} | |
$strLength = mb_strlen($text); | |
$unitLength = $ucs2 ? 70 : 160; |
This file contains hidden or 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
<html> | |
<head></head> | |
<body> | |
<script> | |
var AudioContext , audioContext , currentBuffer ; | |
// AUDIO CONTEXT | |
function call() { |
This file contains hidden or 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
DELIMITER $$ | |
CREATE FUNCTION CHECK_NATIONAL_CODE(national_code VARCHAR(50)) | |
RETURNS BOOLEAN | |
DETERMINISTIC | |
BEGIN | |
DECLARE c INT; | |
DECLARE n INT; | |
DECLARE r INT; | |
IF length(national_code) != 10 |