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 lazyMap() { | |
val map = mutableMapOf("aaa" to mutableListOf(32)) | |
map.putIfAbsent("aaa", mutableListOf(2))?.add(2) | |
println(map) | |
} |
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
static void lazyMap() { | |
Map<String, List<Integer>> map = new HashMap<>(); | |
final ArrayList<Integer> integers = new ArrayList<>(); | |
integers.add(32); | |
map.put("aaa", integers); | |
final String key = "aaa"; | |
final int value = 2; | |
if (!map.containsKey(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
public class App { | |
private static final String PATTERN = "D:\\maven-repository\\commons-cli\\commons-cli\\1.0\\commons-cli-.*.jar"; | |
public static void main(String[] args) { | |
List<File> matches = new ArrayList<File>(); | |
String[] pieces = PATTERN.split("\\.\\*"); | |
if(pieces.length >= 2) { | |
File rootFile = getRootFile(pieces[0]); | |
String remainingPath = PATTERN.substring(rootFile.getPath().length()+1, PATTERN.length()); |
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"> | |
<title>Repository build status from GitLab CI</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script> | |
</head> | |
<body> | |
<div ng-app="statuses" ng-controller="gitlabCtrl as gitlab"> |
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://gitlab.com/api/v3/projects/$REPO_ID/repository/commits/$COMMIT_SHA?private_token=$PRIVATE_TOKEN |
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 | |
/** | |
* IBM key punch 029 decoder | |
* http://en.wikipedia.org/wiki/Punched_card | |
* | |
* control characters not implemented but you can do it from this link | |
* | |
* http://www.cs.uiowa.edu/~jones/cards/codes.html | |
* | |
* @param string binary chain represent EBCDIC character set |