Skip to content

Instantly share code, notes, and snippets.

View bingli224's full-sized avatar
🚀
2024.06.22 vscode, java, mockito

BingLi224 bingli224

🚀
2024.06.22 vscode, java, mockito
  • Self-Employed
  • BKK, Thailand
View GitHub Profile
@bingli224
bingli224 / middle.py
Created April 30, 2019 16:58
Simple middleware tool to test websocket connection
## 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"
#include <bits/stdc++.h>
using namespace std;
vector<string> split_string(string);
// By BingLi224
// 20:07 THA 04/03/2019
//
// TripleSum
// 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()
{
#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
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 {
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 {
@bingli224
bingli224 / SimpleRSA.py
Created February 1, 2019 17:11
Simple RSA algorithm in Python
"""
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.
@bingli224
bingli224 / SimpleRSA.kt
Created February 1, 2019 16:56
Simple RSA algorithm in Kotlin
/**
* @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.
*
@bingli224
bingli224 / SocketSelectorLambdaTester.kt
Last active October 21, 2018 08:21
Socket+Selector+Lambda in Kotlin
/**
* 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