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
log4j.rootLogger=DEBUG,rollingByDate | |
# logfile is set to be a TimeAndSizeRollingAppender. Keep 100 backup files before rotating and rolling daily, compression set to GZ | |
log4j.appender.rollingByDate=uk.org.simonsite.log4j.appender.TimeAndSizeRollingAppender | |
log4j.appender.rollingByDate.File=/logs/app.log | |
log4j.appender.rollingByDate.RollOnStartup=true | |
log4j.appender.rollingByDate.DateRollEnforced=true | |
log4j.appender.rollingByDate.Threshold=DEBUG | |
log4j.appender.rollingByDate.DatePattern=.yyyy-MM-dd | |
log4j.appender.rollingByDate.MaxFileSize=10MB |
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
main() { | |
List<String> list = new List<String>(); | |
list.add('one'); | |
list.add('two'); | |
list.add('twelve'); | |
list.forEach((element) => print(element)); | |
Set<String> set = Set.from(list); | |
set.forEach((element) => print(element)); | |
} |
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
//based on code from http://www.arcfn.com/2009/03/y-combinator-in-arc-and-java.html and the generic version https://gist.github.com/2571928 | |
class YFact { | |
// T function returning a T | |
// T -> T | |
public static interface Func<T> { | |
T apply(T n); | |
} | |
// Higher-order function returning a T function |
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
class TheCompanyProcess { | |
public static String cleanUpNames(List listOfNames) { | |
listOfNames | |
.findAll {it.length() > 1} | |
.collect {it.capitalize()} | |
.join(',') | |
} | |
} |
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
main() { | |
var user = 'John Doe'; | |
var message = """ | |
$user! | |
Welcome to Programming Dart! | |
"""; | |
print(message); | |
} |
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
main() { | |
Map<String, int> map = { | |
'one': 1, | |
'two': 2, | |
'twelve': 12}; | |
void iterateMapEntry(key, value) { | |
map[key] = value; | |
print('$key:$value');//string interpolation in action | |
} |
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
[ec2-user@mldev ~]$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" | |
==> Installing Ruby to /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
100 26.9M 100 26.9M 0 0 11.9M 0 0:00:02 0:00:02 --:--:-- 15.4M | |
==> Installing successful | |
==> /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/current/bin/ruby | |
ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-linux] | |
==> Add Ruby to your PATH by running: |
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
Homebrew build logs for certbot on 4.14.133-113.112.amzn2.x86_64 | |
Build date: 2019-08-17 21:14:09 |
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.jetbrains.annotations.NotNull; | |
import java.util.Comparator; | |
import java.util.function.ToLongFunction; | |
import java.util.stream.Stream; | |
public class RideProviderTest { | |
@FunctionalInterface | |
private interface RideProvider { |
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.Comparator; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.stream.Stream; | |
public class RideTest { | |
interface RideProvider { | |
long getFareEstimate(String start_lat, String start_lng, String end_lat, String end_lng, String type); | |
} |
NewerOlder