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"> | |
<title>Document</title> | |
<script src="https://unpkg.com/swapy/dist/swapy.min.js"></script> |
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"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://esm.sh/@xyflow/[email protected]/dist/style.css?dev"> |
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 org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import java.util.zip.DeflaterOutputStream; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipOutputStream; |
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
public final class StreamHelpers { | |
public static <T> Consumer<T> branch(Predicate<? super T> test, | |
Consumer<? super T> t, | |
Consumer<? super T> f) { | |
return o -> { | |
if (test.test(o)) t.accept(o); | |
else f.accept(o); | |
}; | |
} |
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
package com.example.tools; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
public class ThreadStackPrinter { | |
private static Gson gson = new GsonBuilder() | |
.setPrettyPrinting() | |
.serializeNulls() |
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
Set<String> initials = Files.lines(Paths.get("e.txt")).filter(s->!s.trim().isEmpty()).map(s->s.substring(0, 1)).collect(Collectors.toSet()); |
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 tweepy, simplejson, urllib, os,datetime,re | |
#---------------------------------------------------------------- | |
def getBitlyKey(): | |
bu='USER' | |
bkey='KEY' | |
return bu,bkey | |
def getTwapperkeeperKey(): | |
key='KEY' |
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 gulp = require('gulp'); | |
var plugins = require('gulp-load-plugins')(); | |
var del = require('del'); | |
var es = require('event-stream'); | |
var bowerFiles = require('main-bower-files'); | |
var print = require('gulp-print'); | |
var Q = require('q'); | |
var naturalSort = require('gulp-natural-sort'); | |
var svgSprite = require("gulp-svg-sprites"); |
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
// Bonfire: Seek and Destroy | |
// Author: @kobibr | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-seek-and-destroy?solution=%2F*%20jshint%20esnext%3A%20true%20*%2F%0Afunction%20destroyer(arr)%20%7B%0A%20%20%27use%20strict%27%3B%0A%20%20var%20args%20%3D%20Array.prototype.slice.call(arguments)%3B%0A%20%20args.splice(0%2C1)%3B%0A%20%20for(let%20inR%20in%20arr)%20%7B%0A%20%20%20%20for(let%20inG%20in%20args)%20%7B%0A%20%20%20%20%20%20if(arr%5BinR%5D%20%3D%3D%20args%5BinG%5D)%7B%0A%20%20%20%20%20%20%20%20delete%20arr%5BinR%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20%0A%20%20function%20filterred%20(obj)%7B%0A%20%20%20%20return%20Boolean(obj)%3B%0A%20%20%7D%0A%20%20%0A%20%20var%20waitingRoom%20%3D%20arr.filter(filterred)%3B%0A%20%20return%20waitingRoom%3B%0A%7D%0A%0Adestroyer(%5B1%2C%202%2C%203%2C%201%2C%202%2C%203%5D%2C%202%2C%203)%3B%0A | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
/* jshint esnext: true */ | |
function destroyer(arr) { | |
'use strict'; | |
var args = Array |
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
// Bonfire: Slasher Flick | |
// Author: @kobibr | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-slasher-flick?solution=function%20slasher(arr%2C%20howMany)%20%7B%0A%20%20return%20arr.splice(howMany-arr.length%2Carr.length-howMany)%3B%0A%7D%0A%0Aslasher(%5B1%2C%202%2C%203%5D%2C%202)%3B%0A | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function slasher(arr, howMany) { | |
return arr.splice(howMany-arr.length,arr.length-howMany); | |
} | |
slasher([1, 2, 3], 2); |
NewerOlder