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 math | |
import random | |
### Random number | |
### 2 10% | |
### 9 90% | |
my_list = [2] * 1 + [4] * 9 | |
print my_list |
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.*; | |
import java.util.stream.*; | |
import java.util.regex.*; | |
import java.util.function.Function; | |
class Main { | |
public static void main(String[] args) { | |
List.of("This ", "is ", "created ", "by ", "List.of().stream() ") |
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
/** 3 seconds: | |
* - Library example class | |
* - Updated composer.json | |
* - Example usage in a controller | |
*/ | |
/** | |
* '/library/Hello.php' | |
*/ | |
<?php namespace Library; |
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.nrg.xoom; | |
import java.lang.reflect.Field; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; | |
public class TestUtils { | |
static final Logger logger = LogManager.getLogger(TestUtils.class.getName()); | |
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
#!/bin/bash | |
################ | |
# Uncomment if you want the script to always use the scripts | |
# directory as the folder to look through | |
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
REPOSITORIES=`pwd` | |
IFS=$'\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
<div id="output">Hello World</div> | |
<script> | |
$('#output').click(function(){ | |
$.ajax({ | |
dataType:"json", | |
url:'https://jsonplaceholder.typicode.com/posts/1', | |
success:success | |
}) | |
.done(function(){console.log('DONE')}) | |
}) |
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 Example { | |
private Delegate delegate; | |
Example(Delegate delegate) { | |
this.delegate = delegate; | |
} | |
public void doIt() { | |
delegate.execute(); |
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
$ git remote prune origin --dry-run | |
$ git remote prune origin [to execute] | |
### To show branches on remote (should now be pruned of outdated branches) | |
$ git branch -r | |
origin/CI/develop-CI | |
origin/HEAD -> origin/master | |
origin/develop | |
origin/features/ESIID |
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
spring.h2.console.enabled=true | |
spring.h2.console.path=/h2 | |
spring.datasource.url=jdbc:h2:mem:testdb | |
spring.datasource.username=sa | |
spring.datasource.password= | |
spring.datasource.driver-class-name=org.h2.Driver | |
spring.jpa.show-sql = true |
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
/* | |
* Get raw json and output to string | |
*/ | |
System.out.println(res.getBody().asString()); | |
/* | |
* Read Excel Worksheet | |
*/ | |
package Framework.ExcelDriven; |
NewerOlder