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
type Data struct { | |
Id string `json:"id"` | |
Name string `json:"name"` | |
PId string `json:"p_id"` | |
Child []*Data `json:"child"` | |
} | |
type SliceData []*Data | |
func (s SliceData) Len() int { |
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
# today my lucky number | |
from random import choice | |
a =raw_input("Please enter /roll + number :") | |
def roll(c): | |
y = choice(range(c)) | |
return y | |
if a.startswith("/roll") : |