This file contains hidden or 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
def logon(self): | |
p = proto.LogonRequest() | |
p.program = "WTCG" | |
p.platform = "Win" | |
p.locale = "enUS" | |
# p.email = None | |
p.version = "12051" | |
p.application_version = 1 | |
p.public_computer = False | |
# p.sso_id = None |
This file contains hidden or 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
/* | |
* DO NOT EDIT. | |
* | |
* Generated by the protocol buffer compiler. | |
* Source: connection_service.proto | |
* | |
*/ | |
import Foundation | |
import SwiftProtobuf |
This file contains hidden or 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
func sumAll(objs: Any...) -> Int { | |
var sum = 0 | |
for object in objs { | |
if let num = object as? Int { | |
sum += num | |
} else if let str = object as? String { | |
if let num = Int(str){ | |
sum += num | |
} |
This file contains hidden or 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
# Integer -> String | |
# 1 to 999999999 | |
#create global dictionaries of specific "number" words | |
onesDic = {"1": "one ", "2": "two ", "3": "three ", "4": "four ", "5": "five ", "6": "six ", "7": "seven ", "8": "eight ", "9": "nine "} | |
teensDic = {"0": "ten ", "1": "eleven ", "2": "twelve ", "3": "thirteen ", "4":"fourteen ", "5":"fifteen ", "6":"sixteen ", "7":"seventeen ", "8":"eighteen ", "9": "nineteen "} | |
entysDic ={"2":"twenty ", "3": "thirty ", "4": "forty ", "5":"fifty ", "6":"sixty ", "7":"seventy ", "8":"eighty ", "9": "ninety "} | |
def int_to_string(num): | |
numString = str(num) |