This file contains hidden or 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 Things | |
| @@count = 0 | |
| attr_accessor(:id, :name) | |
| def initialize(id, name) | |
| @id = id; | |
| @name = name; | |
| @@count += 1 | |
| end |
This file contains hidden or 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
| s = 'Keesun'; | |
| puts "Hello #{s}, #{2000 + 12}" | |
| if(true) then | |
| puts "Puss int the Boots" | |
| end | |
| class Company | |
| $founder = "Toby" |
This file contains hidden or 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
| repositories { | |
| mavenCentral() | |
| maven { | |
| url "http://repo.mycompany.com/maven2" | |
| } | |
| } |
This file contains hidden or 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
| # Define how Bash prompt looks like: | |
| # | |
| # Cli Colors | |
| export CLICOLOR=1 | |
| # use yellow for dir's | |
| export COLOR_NC='\033[0m' # No Color | |
| export COLOR_WHITE='\033[1;37m' | |
| export COLOR_BLACK='\033[0;30m' | |
| export COLOR_BLUE='\033[0;34m' |
This file contains hidden or 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 http; | |
| import org.vertx.java.core.Handler; | |
| import org.vertx.java.core.app.VertxApp; | |
| import org.vertx.java.core.http.HttpServer; | |
| import org.vertx.java.core.http.HttpServerRequest; | |
| /** | |
| * @author Keesun Baik | |
| */ |
This file contains hidden or 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 echo; | |
| import org.vertx.java.core.Handler; | |
| import org.vertx.java.core.app.VertxApp; | |
| import org.vertx.java.core.buffer.Buffer; | |
| import org.vertx.java.core.net.NetClient; | |
| import org.vertx.java.core.net.NetSocket; | |
| /** | |
| * @author Keesun Baik |
This file contains hidden or 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 echo; | |
| import org.vertx.java.core.Handler; | |
| import org.vertx.java.core.app.VertxApp; | |
| import org.vertx.java.core.buffer.Buffer; | |
| import org.vertx.java.core.net.NetServer; | |
| import org.vertx.java.core.net.NetSocket; | |
| /** | |
| * @author Keesun Baik |
This file contains hidden or 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
| define('calculator', ['adder'], function(adder) { | |
| return { | |
| add: function(n1, n2) { | |
| return adder.add(n1, n2); | |
| } | |
| }; | |
| }); |
This file contains hidden or 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
| // calculator.js | |
| exports.add = function(n1, n2) { | |
| }; | |
| // app.js | |
| var calculator = require('./calculator'); | |
| calculator.add(2, 2); |
This file contains hidden or 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
| (function(lab49) { | |
| function privateAdder(n1, n2) { | |
| return n1 + n2; | |
| } | |
| lab49.add = function(n1, n2) { | |
| return privateAdder(n1); | |
| }; |