Skip to content

Instantly share code, notes, and snippets.

View ssysm's full-sized avatar
🚣‍♂️
划水中|Surfing Watering...

Shengming Yuan ssysm

🚣‍♂️
划水中|Surfing Watering...
View GitHub Profile
// SPDX-License-Identifier: MIT
// Only allow compiler versions from 0.7.0 to (not including) 0.9.0
pragma solidity >=0.7.0 <0.9.0;
contract FlowerShop {
// State variables
address public owner;
bool shopIsOpen;
import java.util.ArrayList;
public class DistinctPowers{
//Check if number exist in array
private static boolean isNumberExist(ArrayList<Double> arr, double cmp){
for(double d: arr){
if(d == cmp){
return true;
}
#include <iostream>
#include <vector>
#include <math.h>
using namespace std;
bool isNumExist(vector < double > & vec, double num);
int getDistinctPower(int a_min_base, int a_max_base, int b_min_power, int b_max_power);
void main() {
@ssysm
ssysm / niconico_keepalive.js
Created November 23, 2018 17:54
Niconico Live
const axios = require('axios');
const cherrio = require('cheerio');
const WebSocket = require('ws');
//请求生放链接
axios.get('http://live2.nicovideo.jp/watch/lv316496097')
.then(res => res.data)
.then(data => {
//parse HTML
const $ = cherrio.load(data);