This file contains 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
// 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; |
This file contains 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.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; | |
} |
This file contains 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 <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() { |
This file contains 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
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); |