還真有人用bat寫brainfuck interpreter 然而註解是日文,完全看不懂在寫啥
大家好像很喜歡用各個語言寫 brainfuck interpreter
總覺得這個狀況我在哪裡遇到過,firefox會無視實作錯誤的range header
那就是firefox或是伺服器或是影片的bug了…
Python還有更多更好玩的
你可以再弄更多東西owo
RSA, a most commonly used asymmetric cryptography algorithm for encrypting message. Usually RSA is unbreakable, but there are some situation that can cause the algorithm to be vulnerable. One case is when some keys shared their prime, which makes the process of cracking keys relatively easy. In order to find the common factor of two key pairs, we can use the Euclidean algorithm for calculating the common factor for huge numbers.
--- for encrypting message
+++for message encryption
===
下面好多要改的(台灣人英文的通病)
可是我現在想睡覺
就類似上面的語法使用毛病
(本私立科大英文專業的系等級等同我國小六年級補習班程度
就太主動(?)了
像Usually RSA is unbreakable可以換成RSA is usually unbreakable
用HKExpress的Theme結帳
然後用CI的Coupon折扣
QQ
前天早上換好GPON
昨天晚上機器爆炸
剛剛換機器
這台能撐多久呢(X
for coup in "Python":
print (coup)
time.sleep (0.3)
1. \r & , (沒用)
2. print (coup ,end="")
把 CPU 時脈調到慢到 print("Python") 還要等幾秒
迴圈
第一次 print (coup) 輸出 P
第二次 輸出 y
第三次 輸出 t
...
第六次輸出 n
結束
請去看 print 的文件
print(coup,end="",fush=True)
即可
我只做到 print(coup, end="") 而已
python print Non-Enter (#
不過其實我真的不知道 Python 怎麼 print 不換行
doc寫說是刷新buffer,是指什麼的buffer?
就是 buffer
stdout 是很慢的 所以除非碰到換行之類的才會真的丟出去
不然都會暫時放在 buffer
#include<stdio.h>
int main(void){
// :D 下課
}
絕對不要想在windows協linux那樣噴進度出來洗版...因為會拖慢執行速度
因为 Google Android 正式支持 kotlin 了?
c++表示:
std::cout « foo « std::endl;
沒有,因為我code會推不上github然後也查不了文件
之前在 Google Play 書店有看到有人寫中文的
先看是否可以被 2,3,5,7,11,13,17 整除
一個數字 如果從 1 到 sqrt(n) 都不能整除
你把这个数自己加自己,加到大于他自己。如果没有等于这个数的话就不是质数
那 for count in * (2,101) 的 * 要加啥
是說我覺得telegram該出個sticker資料夾的功能了,我家的已經多到我要翻要找很久了
我覺得可以分成 低畫質系列, SITCON, COSCUP, Ingress, Anime, Meme 這樣
反正telegram貼圖不用錢,在路上看到就加一下
會自己調更窘吧,用一用,下次拉到那個地方發現怎麼找不到,原來被自動調整
def cip(a,b)
cip (30,50)
那 cip 裡面的數值除了用 return 還有其他方法可以讀取嗎
可以 print(return a + " : " + return b) 嗎?
functional programming 是需要基礎語法認知的
🌚 class 需要看很多 attribute 的
私以为只有搞不清楚需求和大项目的人才需要 OOP 那种东西。
我覺得class可以節省coding時,大腦的記憶體用量(?),因為可以把一堆東西塞進黑盒子
可是寫的糟糕的class,那個盒子一打開可能會發現裡面都是屎
service temporary unavailable
@koru1130.position.go(POSITION.outside) (?
我丟給他一個30MB的檔案,然後他就默默的卡在下載了
他們兩個不是本來就是好基友,你有送沒送有差嗎www
是說如果有 SITCON x JP 跟 SITCON x HK ,然後撞期,會怎麼選(?
def CalcTest(a, b, c):
# a (b) c = answer.
return abc
CalcTest (10, +, 20)
^
SyntaxError: invalid syntax
把 inflix + 变成 pointfree 也不行噢
def CalcTest(a,b):
# a+b = answer
return a+b
只是一個偏好 Python 的人看到覺得不太舒服,沒事(?
@k1tten 對了!你要那資助的就跟我說,我看一下是直接給你機票還是現金
i = 2
print ("2")
for count in range(0,20,+1):
i = i ** 2
print (" " + i)
time.set (0.3)
e.g
C:\Users\Peter>py C:\Users\Peter\Desktop\
指數.py2
i
Traceback (most recent call last):
File "C:\Users\Peter\Desktop\
指數.py", line 7, in <module>
time.set (0.3)
AttributeError: module 'time' has no attribute 'set'
Traceback (most recent call last):
File "C:\Users\Peter\Desktop\指數.py", line 7, in <module>
time.set (0.3)
AttributeError: module 'time' has no attribute 'set'
import time
i = 2
print ("2")
for count in range(0,20,+1):
i = i ** 2
print (" " + 'i')
time.set (0.3)
不是已經 import time,為甚麼還會要求設定 'TIME'?
2
4 16 256 65536 4294967296 18446744073709551616 340282366920938463463374607431768211456 ...
i = 2
print (i)
for count in range(0,20,+1):
i = i * 2
然後我的執行結果變成 2 22 222 2222 ...
請輸入一個值,預設值是 '2':
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576
import time
i = input("請輸入一個值,預設值是 '2':")
j = input("請輸入執行次數,預設值是 '20':")
if i == "":
i = 2
if j == "":
j = 20
print (i, end="")
for count in range(0, j, +1):
i = i * 2
print(" ", i, end="", flush=True)
time.sleep (0.3)
請輸入執行次數,預設值是 '20': 如果不輸入可以正常運作
但假如輸入其他數字,e.g 15 他會顯示這個錯誤
2Traceback (most recent call last):
File "C:\Users\Peter\Desktop\指數.py", line 9, in <module>
for count in range(0, j, +1):
TypeError: 'str' object cannot be interpreted as an integer
j = str(input("請輸入執行次數,預設值是 '20':"))
str object cannot be interpreted as an integer
所以 len 是計算數字、str 是字符、int 是整數
e.g int 是英文整數的縮寫、str 是 string 的縮寫、len 是 length 的縮寫 ...
len(list)的話會回傳 list 的元素數量
»>len(str(hello world 1234))
16
能夠 (+) 這樣當函數用的語言比較多還是不能用的比較多
TypeError: a bytes-like object is required, not 'str
請輸入欲編碼字串: 2333
Traceback (most recent call last):
File "C:\Users\Peter\Desktop\Base64.py", line 18, in <module>
print (b64encode + "已編碼為" + encode_result + ".")
TypeError: must be str, not bytes
過程是
str2bytes - encode - bytes2str - output
請輸入欲解碼字串 (base64): b'Njk2NTI1OTY2Ng=='
b'Njk2NTI1OTY2Ng==' 已解碼成
b'l\xd8\xe4\xd8\xd4\xc8\xd4\xe4\xd8\xd8\xd8'
encode_result = encode_result.lstrip()
print (b64encode + " 已編碼為 \nBase64: " + encode_result, end="")
encode_result.lstrip()
資料型別就是 str, binary, inv 吧
print (b64encode + " 已編碼為 \nBase64: ", end="")
print(str(encode_result.lstrip()))
請輸入欲編碼字串: SS
SS 已編碼為
Base64: b'U1M='
對了,是 # coding: utf8 還是 # -*-*- coding: utf8 -*-*
另外 py3 開始就把 raw_input 合併到 input 了
Code只為了迎合題目要求,不負責Bug維修以及善後。
不過第一個遇到的障礙是API Server我要怎麼做
用C做也太靠北
你是要從 web server 開始逆
""/\||&&#!+-/\這種東西手機鍵盤不好打
下個計畫: 用 Python 寫 telegram bot
之前最開始是導向一個github repo ,然後被洗了一整排,請他媽的關掉這個網域的issue