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
## By BingLi224 | |
## 00:57 THA 30/04/2019 | |
## | |
## Simple middleware tool to test websocket connection. | |
## | |
## Use http://demos.kaazing.com/echo/ as a free websocket testing server/client. | |
## 1) run this script | |
## 2) open http://demos.kaazing.com/echo/ | |
## 3) set "Location" to "ws://localhost:8888/echo" |
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
#include <bits/stdc++.h> | |
using namespace std; | |
vector<string> split_string(string); | |
// By BingLi224 | |
// 20:07 THA 04/03/2019 | |
// | |
// TripleSum |
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
// 23:53 THA 25/02/2019 | |
// by BingLi224 | |
// Reference: https://www.hackerrank.com/challenges/30-2d-arrays/problem | |
#include <bits/stdc++.h> | |
using namespace std; | |
int main() | |
{ |
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
#include <bits/stdc++.h> | |
using namespace std; | |
// Complete the isValid function below. | |
string isValid(string s) { | |
// 23:21 THA 25/02/2019 | |
// by BingLi224 | |
// Reference: https://www.hackerrank.com/challenges/sherlock-and-valid-string/problem | |
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
import java.io.*; | |
import java.math.*; | |
import java.security.*; | |
import java.text.*; | |
import java.util.*; | |
import java.util.concurrent.*; | |
import java.util.regex.*; | |
public class Solution { |
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
import java.io.*; | |
import java.math.*; | |
import java.security.*; | |
import java.text.*; | |
import java.util.*; | |
import java.util.concurrent.*; | |
import java.util.regex.*; | |
public class Solution { |
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
""" | |
By BingLi224 | |
23:20 THA 01/02/2019 | |
Simple RSA | |
The 2 keys--p and q--of RSA are positive values and co-prime to each other. | |
The data to be encrypted (and decrypted) value must be < p * q. |
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
/** | |
* @author BingLi224 | |
* @version 2019.01.30 | |
* | |
* Simple RSA | |
* | |
* The 2 keys--p and q--of RSA are positive values and co-prime to each other. | |
* | |
* The data to be encrypted (and decrypted) value must be < p * q. | |
* |
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
/** | |
* Socket+Selector+Lambda in Kotlin | |
* | |
* Further issues: | |
* When the receiver takes action fast enough before data is fully delivered through SocketChannel, | |
* especially the original one is likely to be bigger than buffer. | |
* | |
* Also, what if the register() is repeated again? | |
* | |
* @author BingLi224 |