Skip to content

Instantly share code, notes, and snippets.

View goish135's full-sized avatar

阿瑜 goish135

View GitHub Profile
const mongoose = require('mongoose')
const {model,Schema} = require('mongoose')
mongoose.connect('mongodb://localhost:27017/myapp',{useNewUrlParser:true});
const app = require('express')()
const DepartmentSchema = new Schema({
name: String,
location: String
}
)
const express = require("express");
const app = express();
const mongoose = require("mongoose");
const bodyParser = require("body-parser");
const session = require("express-session");
const flash = require("connect-flash");
const moment = require("moment");
const seedDB = require("./seed");
const removeUsers = require("./remove");
# -*- coding: utf-8 -*-
#from pytube import YouTube
#url = 'https://youtu.be/Ej83dvkU-Z4'
#YouTube(url).streams.first().download()
# -*- coding: utf-8 -*-
from moviepy.editor import *
#include<iostream>
using namespace std;
int main()
{
for(int i=1;i<=7;i++)
{
for(int j=1;j<=7;j++)
{
if(!(i>=3&&i<=5)&&!(j>=3&&j<=5)&&!((i==1||i==7)&&(j==1||j==7)))
{
List<String> strings = list.stream().map(object -> Objects.toString(object,null)).collect(Collectors.toList());
// table 1
// 有 A 才有 B
#include<iostream>
using namespace std;
/*
Out: num'
In: num
*/
int main()
{
int num;
#include<iostream>
using namespace std;
int main()
{
int n,m;
cin >> n >> m; // [100,400]
int i = n;
int total = 0;
while(i<=m)
{
// Copyright 2018-present the Flutter authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
class Solution:
def reachableNodes(self, edges: List[List[int]], maxMoves: int, n: int) -> int:
'''
status: 7/47
Step 1: Create graph
Step 2: HP[node] = remain power
Step 3: sum of main-nodes + sub-nodes
'''
# Step 1
#!/usr/bin/py
from collections import defaultdict
def hermionesWand(arr, K, max_x, max_y):
# find both entry and exit points
for idx, line in enumerate(arr):
for inner_idx in range(len(line)):
if line[inner_idx] == 'M':
start = (idx, inner_idx)
if line[inner_idx] == '*':