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\Providers; | |
use Config; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\ServiceProvider; | |
class MailConfigServiceProvider extends ServiceProvider | |
{ |
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
sudo apt update | |
sudo apt install nodejs | |
sudo apt install npm | |
nodejs -v | |
npm -v |
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 | |
function factorial($n){ | |
if(gettype($n) == "double" || gettype($n) == "float"){ | |
$newN = trim($n); | |
$ceilN = ceil($newN/2) - 1; | |
$newFactorial = 1; | |
for($n=0; $n <= $ceilN; $n++) { | |
$newFactorial = bcmul($newFactorial, $newN - 2*$n); | |
} |
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
function divideAndSort(value){ | |
const division = value.toString().split("0"); | |
for(let num in division){ | |
if(division[num] == "") { | |
division.splice(num,1); | |
}else{ | |
division[num] = division[num].split("").sort().join().replace(/,/g,""); |
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
private static void setTimeout(Runnable runnable, int delay){ | |
new Thread(() -> { //java arrow function :D (arrow operator) | |
try { | |
Thread.sleep(delay); | |
runnable.run(); | |
} | |
catch (Exception ex){ | |
System.err.println(ex); | |
} | |
}).start(); |
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
import java.util.Arrays; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ |
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
import java.util.Arrays; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ |
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 qs = require("qs"); | |
const axios = require("axios"); | |
let data = qs.stringify({ | |
search: { | |
type: "credit", | |
}, | |
}); | |
await axios.post( |
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
//https://github.com/pokusew/nfc-pcsc | |
const { NFC } = require('nfc-pcsc'); | |
const nfc = new NFC(); | |
const key = 'FFFFFFFFFFFF'; | |
const keyType = 0x60; | |
nfc.on('reader', async reader => { | |
reader.autoProcessing = false; | |
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 arr = [ | |
72, 220, 220, 100, 128, | |
107, 44, 16, 126, 96, | |
66, 140, 242, 186, 197, | |
46 | |
]; | |
const arrBufToBs = Buffer.from(arr).toString("base64"); | |
const bsBuffToArr = Buffer.from(arrBufToBs,"base64").toJSON().data; |
OlderNewer