View abortRequest.tsx
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 { unAuthed } from '@utils/http'; | |
import axios, { CancelTokenSource } from 'axios' | |
import { useState } from 'react'; | |
export function AxiosAbortTest(){ | |
let source: CancelTokenSource | undefined; | |
async function requestResource(){ | |
if (source){ | |
source.cancel('Operation canceled due to new request.'); |
View x.ru
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
(fun downsweep (xPrev Int tree String) Unit | |
(let [length 10000000) | |
input (map #(toArray (- % (- 100 50))) '(0 until length)) | |
output (array (- 1 length) :float) | |
seqtime (standardConfig measure (runningAverage input output)) | |
partime (standardConfig measure (parRunningAverage input output 10000))] | |
(case xprev | |
{:node (left right)} | |
(parallel (downsweep xPrev, left) |
View To study
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://www.reddit.com/r/Clojure/comments/f0b9bk/what_would_you_consider_to_be_the_hardest_thing/fgszcq0/ | |
Learning the "vocabulary" ( partion-all, interpose, nthnext, nthrest, take-nth...) | |
def rabbits | |
[{:name "Fluffy" :color :white :size :large} | |
{:name "Chocolate" :color :brown :size :medium} |
View gist:0e244624ace6f80594cf242e03de6cd0
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://clojure.org/guides/deps_and_cli#local_jar | |
Set-ExecutionPolicy Unrestricted -Scope CurrentUser |
View gist:3021a814e494a517118d927e7e578a92
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
cat `find * -type f | grep .php` | wc -l |
View life_saver.php
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 | |
\DB::statement('SET FOREIGN_KEY_CHECKS=0'); | |
App\Product::truncate(); | |
App\ProductCategory::truncate(); | |
App\ProductBrand::truncate(); | |
App\Attribute::truncate(); | |
App\Review::truncate(); | |
\DB::statement('SET FOREIGN_KEY_CHECKS=1'); |
View read-csv.php
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 | |
$path = '/tmp/test.csv'; | |
$header = []; | |
$items = []; | |
foreach (array_map('str_getcsv', file($path)) as $key => $row) { | |
if ($key == 0){ | |
$header = $row; | |
}else{ | |
try { |
View main.cpp
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
#include <iostream> | |
#include <Windows.h> | |
#include <fstream> | |
#include <string> | |
#include <ctime> | |
#include <vector> | |
#include <iterator> | |
using namespace std; |
View 1vs1 cs go
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
mp_humanteam any; | |
bot_kick; | |
mp_warmuptime 333333331; | |
bot_knives_only 1; | |
sv_infinite_ammo 1; | |
mp_autoteambalance 0; | |
mp_limitteams 999; |
NewerOlder