I hereby claim:
- I am iamcrypticcoder on github.
- I am iamcrypticcoder (https://keybase.io/iamcrypticcoder) on keybase.
- I have a public key ASCEE1AUMNw-7QclSaZp30EoHUelXP_QpgAdXa7vayfthQo
To claim this, I am signing this object:
| import Foundation | |
| class CommandExecutor { | |
| var nextCommands = [Command]() | |
| var executedCommands = [Command]() | |
| init() { | |
| } | |
| import Foundation | |
| var book1: Book = Book() | |
| var executor: CommandExecutor = CommandExecutor() | |
| executor.addCommand(BuyCommand(book1)) | |
| executor.runCommand() | |
| print("Current owner: \(book1.currentOwner!)") | |
| executor.addCommand(GiftFriendCommand(book1, "Mahbub")) | |
| executor.addCommand(SellCommand(book1)) |
| public class SupplierDemo { | |
| static class Car { | |
| String brand; | |
| int engineCC; | |
| int wheelCount; | |
| int price; | |
| public Car(String brand, int engineCC, int wheelCount, int price) { | |
| this.brand = brand; |
| public class PredicateDemo { | |
| static class Person { | |
| String name; | |
| int age; | |
| String gender; | |
| public Person(String name, int age, String gender) { | |
| this.name = name; | |
| this.age = age; |
| public class ConsumerDemo { | |
| static class Point { | |
| Double x, y; | |
| public Point(Double x, Double y) { | |
| this.x = x; | |
| this.y = y; | |
| } | |
| } |
| public class FunctionDemo { | |
| static Function<String, String> shortName = (s) -> { | |
| if (null == s || s.length() == 0) return "Unknown"; | |
| String[] splits = s.split(" "); | |
| String ret = splits[0]; | |
| if (splits.length >= 2) ret += " " + splits[1].substring(0, 1) + "."; | |
| return ret; | |
| }; |
I hereby claim:
To claim this, I am signing this object:
| #include <iostream> | |
| #include <vector> | |
| #include <math.h> | |
| using namespace std; | |
| #define READ(x) freopen(x, "r", stdin) | |
| #define WRITE(x) freopen(x, "w", stdout) | |
| #define PB push_back |
| #include <iostream> | |
| #include <vector> | |
| #include <math.h> | |
| using namespace std; | |
| #define READ(x) freopen(x, "r", stdin) | |
| #define WRITE(x) freopen(x, "w", stdout) | |
| #define PB push_back |
| #include <iostream> | |
| #include <math.h> | |
| using namespace std; | |
| #define FOR(i, L, U) for(int i=(int)L; i<=(int)U; i++) | |
| #define FORD(i, U, L) for(int i=(int)U; i>=(int)L; i--) | |
| #define READ(x) freopen(x, "r", stdin) | |
| #define WRITE(x) freopen(x, "w", stdout) |