- Hexo: https://hexo.io/
- HubPress: https://github.com/HubPress/hubpress.io (Demo - https://www.youtube.com/watch?v=7gP3i4tHlRM)
- Hugo: https://gohugo.io/
- Jekyll: https://jekyllrb.com/
- Lektor: https://www.getlektor.com/
- Octopress: http://octopress.org/
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 | |
########################################################## | |
## Simple script to get maven dependency tree ## | |
## @author Lee, SeongHyun (Kevin) ## | |
## @veraion 0.0.1 (2013-01-17) ## | |
## ## | |
## To change the option 'include' and 'output', change ## | |
## the values of INCLUDE_NAME and OUTPUT_NAME ## | |
## respectively. ## | |
## e.g.) to change 'include' to 'inc' and 'output' to ## |
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
/** | |
* Copyright 2013 Lee, Seong Hyun (Kevin) | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
/** | |
* @author Kevin Lee | |
* @since 2016-01-15 | |
*/ | |
object WordCount extends App { | |
def wordCount(lines: String): Map[String, Array[Int]] = | |
lines.split('\n') | |
.map(_.trim) | |
.map(_.split("[\\s]+")) | |
.zipWithIndex |
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
let primes :: [Integer] | |
primes = sieve [2..] | |
where sieve :: [Integer] -> [Integer] | |
sieve (x : xs) = x : sieve [n | n <- xs, n `mod` x /= 0] | |
-- It works even without parameter types specified yet it is always good to have the type information | |
-- as it tells the users of the function how to use it. | |
-- It can also help you implement the function. | |
-- primes without parameter types (Uncomment it if you want to try). |
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
Copyright 2015 Lee, Seong Hyun (Kevin) | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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 SuperClass | |
{ | |
public static void runStatic(String code) | |
{ | |
System.out.println(code + ": I am the runStatic method in SuperClass."); | |
} | |
public static void runStatic2(String code) | |
{ | |
System.out.println(code + ": I am the runStatic2 method in SuperClass."); |
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
/** | |
* @author Kevin Lee | |
* @since 2016-04-09 | |
*/ | |
object StringInterpolation extends App { | |
implicit class EscapeNewLineAndDoubleQuote(val sc: StringContext) extends AnyVal { | |
def esc(args: Any*): String = { | |
val strings = sc.parts.iterator | |
val expression = args.iterator |
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
/* | |
* Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* - Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* |
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
fib 0 = 0 | |
fib 1 = 1 | |
fib 2 = 1 | |
fib n = fib (n - 1) + fib (n - 2) | |
-- Get the 100th number | |
fib 100 | |
-- But it takes too long. | |
-- You can do it with zipWith like the following line and it works much faster | |
fibs = 0 : 1 : 1 : zipWith (+) (drop 1 fibs) (drop 2 fibs) |