A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
package demo; | |
class Clock{ | |
int hour,minute,second; | |
//构造函数 | |
public Clock(){ | |
this.hour=0; | |
this.minute=0; | |
this.second=0; | |
} | |
//设定时间 |
float x=0.0; | |
float y=200.0; | |
void setup() | |
{ | |
size(400,400); | |
background(0); | |
} | |
void draw() | |
{ | |
ellipse(x,y,10,10); |
string = '12345' | |
L = [] | |
for i in string: | |
i += ' ' | |
L.append(i) | |
string = ''.join(L) | |
#重写一下,这样更短也更快 | |
string = '12345' | |
L = [i + ' ' for i in string] |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import logging | |
import requests | |
''' | |
A module for helping you to finish the daily task on Neteasy Music | |
''' |
int i; | |
void setup(){ | |
Serial.begin(9600); | |
} | |
void loop(){ | |
i++; | |
Serial.write(150 + i); | |
delay(1000); | |
} |
void setup() | |
{ | |
String s = "12"; | |
int i = parseInt(s); | |
println(s+1); | |
println(i+1); | |
} |
These character sets are not exhaustive, but merely a quick reference for common characters. | |
Quotation | |
‘ ‘ \2018 Open single quotation mark | |
’ ’ \2019 Closed single quotation mark / Apostrophe | |
“ “ \201C Open double quotation mark | |
” ” \201D Closed double quotation mark | |
' ' \0027 Typewriter single quotation mark | |
" " \0022 Typewriter double quotation mark | |
′ ′ \2032 Prime (Feet / Minutes) |