Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
People, Fund, Strategy ...

xiaodao lychees

🌴
People, Fund, Strategy ...
View GitHub Profile
View Go
// Dependency file: @openzeppelin/contracts/GSN/Context.sol
// SPDX-License-Identifier: MIT
// pragma solidity ^0.6.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
@lychees
lychees / yUniswap_ETH_USDT_LP.sol
Created Sep 18, 2020
yUniswap_ETH_USDT_LP.sol
View yUniswap_ETH_USDT_LP.sol
// Dependency file: contracts/interfaces/IERC20.sol
// SPDX-License-Identifier: MIT
// pragma solidity ^0.6.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
View UniPool.solidity
/*
___ ___ ________ ________
|\ \ / /|\_____ \|\ ___ \
\ \ \/ / \|____|\ /\ \ \_|\ \
\ \ / / \|\ \ \ \ \\ \
\/ / / __\_\ \ \ \_\\ \
__/ / / |\_______\ \_______\
|\___/ / \|_______|\|_______|
\|___|/
*/
View Go
pragma solidity ^0.5.0;
import './y3dPool.sol';
import './y3dToken.sol';
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract y3dFactory {
y3dToken public y3d;
View gist:aaa1d201cae9d15b1c31f5619f75d8c9
/* &*#()&*#)&E*F& */
#include <iostream>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <cmath>
#include <algorithm>
#include <sstream>
#include <string>
View edit-distance.js
/**
* @param {string} word1
* @param {string} word2
* @return {number}
*/
let minDistance = function(word1, word2) {
let a = word1.split("")
let b = word2.split("")
let n = a.length
let m = b.length
View A.cpp
// https://paste.ubuntu.com/p/g7hk9rjTkc
#include<bits/stdc++.h>
#define mset(a,b) memset(a,b,sizeof(a))
using namespace std;
const int N=2e3+50;
long long xx[N],yy[N];
//long long qx[N],qy[N];
long long res[N];
struct Point //向量,但是主要判断方向与自己平行的多少个
{
@lychees
lychees / A.cpp
Created Sep 18, 2019
Failed to pass QTREE4
View A.cpp
#include<bits/stdc++.h>
#include <iostream>
#include <vector>
typedef long long LL;
using namespace std;
int read()
{
int x = 0, f = 1; char c = getchar();
while(!isdigit(c)) { if(c == '-') f = -1; c = getchar(); }
while(isdigit(c)) { x = (x << 3) + (x << 1) + (c ^ 48); c = getchar(); }
View A.cpp
#include<bits/stdc++.h>
typedef long long LL;
using namespace std;
int read()
{
int x = 0, f = 1; char c = getchar();
while(!isdigit(c)) { if(c == '-') f = -1; c = getchar(); }
while(isdigit(c)) { x = (x << 3) + (x << 1) + (c ^ 48); c = getchar(); }
return x * f;
}
View gist:bb0afe4ddb1a2a884cc328667c9b8998
D:\Program Files\nodejs\node.exe --nolazy -r ts-node/register --inspect-brk=36495 D:\Documents\GitHub\game_mahjong_server/game_server/src/app.ts
Debugger listening on ws://127.0.0.1:36495/82de9fb6-fbd1-4a5b-881b-9219b538152a
For help, see: https://nodejs.org/en/docs/inspector
game server is listening on localhost:9003
game server is listening on 10000
null:  SQL  select c.`value` from t_app_const c where c.`key`=? order by id desc limit 1 
null: Array(1) ["room.config"]
null:  SQL  SELECT userid, name, roomid, seat_0_userId, seat_1_userId, seat_2_userId, seat_3_userId FROM t_users JOIN v_roominfo ON t_users.roomid = v_roominfo.id 
null: Array(0) []
null:  SQL  SELECT DISTINCT roomid FROM t_users a WHERE a.account LIKE 'bot_%' AND roomid IS NOT NULL AND NOT EXISTS (SELECT 1 FROM t_users b WHERE b.account NOT LIKE 'bot_%' AND b.roomid = a.roomid); 
You can’t perform that action at this time.