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
from flask import Flask | |
from flask import * | |
# import redis | |
app = Flask(__name__) | |
fname = r"E:/much.txt" | |
# db = redis.StrictRedis(host='localhost', port=6379, db=0) | |
# db.client_setname("Url_shortener") | |
# db_list_user_name = "user" |
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
---bug_file.py--- | |
import math,another_file | |
a=another_file.class_a() | |
--another_file.py-- | |
class class_a(): | |
def __init__(self): | |
print(math.cos(0)) |
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 pygame | |
class ball(object): | |
global mouse_down | |
#global pygame | |
def __init__(self,x=320,y=240,speed=3): | |
#global pygame | |
self.x=x | |
self.y=y | |
self.speed=speed | |
self.dir=None |
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 sys,pygame,math; | |
from class_ball import ball | |
pygame.init() | |
clock = pygame.time.Clock() | |
size=width,height=640,480 | |
#x=320 | |
#y=240 | |
#speed=3 | |
#dir=None | |
black=0,0,0 |
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
class TODOList { | |
... | |
... | |
addNewTodo(todoText){ | |
this.todos. ?? | |
} | |
} |
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 { useState } from 'react'; | |
function Example() { | |
// Declare a new state variable, which we'll call "count" | |
const [count, setCount] = useState(0); | |
return ( | |
<div> | |
<p>You clicked {count} times</p> | |
<button onClick={() => setCount(count + 1)}> |
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
// change to slow down get order status | |
module.exports = { | |
summary: 'slow down placing order (https)', | |
*beforeDealHttpsRequest(requestDetail) { | |
return true; | |
}, | |
*beforeSendRequest(requestDetail) { | |
const newRequestOptions = requestDetail.requestOptions; | |
// set rejectUnauthorized as false | |
newRequestOptions.rejectUnauthorized = false; |
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
*{background:#5d3a3a;margin:0;}p{width:200px;height:200px;background:#b5e0ba;} |
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
{ | |
repositoryOwner(login: "bendtherules") { | |
repositories(first: 100, isFork: true) { | |
nodes { | |
id | |
nameWithOwner | |
refs(refPrefix: "refs/heads/", last: 100) { | |
edges { | |
node { | |
branchName: name |
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
// IsPropertyReference? | |
// 1. Different notations for accessing a property name | |
foo.bar() // ✅ | |
foo["any string here"]() // ✅ | |
// 2 Property name can also be a symbol - inbuilt or custom | |
someArray[Symbol.iterator].toString() // ✅ |
OlderNewer