Every response to all the endpoints is encapsulated in a root JSON object with two keys, a data_headers and a data. The data value is a JSON object. For every endpoint, there exist different keys which contain the actual queried data. In case of any errors, data will contain an empty JSON array.
| def findSmallestDivisor(s,t): | |
| if(check_if_divisible(s, t)): | |
| return len(find_shortest_repeating_substring(t)) | |
| else: | |
| return -1 | |
| def check_if_divisible(s, t): | |
| is_length_divisible = (len(s) % len(t)) == 0 | |
| if(is_length_divisible): | |
| return t*(len(s)//len(t)) == s |
| a = $("iframe").contents().find("svg") | |
| b="<!DOCTYPE html><html><head><title></title></head><body>" | |
| for (i = 0; i < a.length; i++) { | |
| b +=a[i].outerHTML; | |
| } | |
| b+="</body></html>" |
An uncurated list of programming resources.
Daily updates of the tech world https://www.reddit.com/r/programming/
Instant HTML5 templates https://html5up.net/
Pain points of the tech world identified by Citibank and the SG gov http://www.techforintegritychallenge.com/wp-content/uploads/2016/12/Citi_T4I_Integrity_Pain_Points.pdf?x88791
An uncurated list of programming resources.
Daily updates of the tech world https://www.reddit.com/r/programming/
Instant HTML5 templates https://html5up.net/
Pain points of the tech world identified by Citibank and the SG gov http://www.techforintegritychallenge.com/wp-content/uploads/2016/12/Citi_T4I_Integrity_Pain_Points.pdf?x88791
An uncurated list of programming resources.
Daily updates of the tech world https://www.reddit.com/r/programming/
Instant HTML5 templates https://html5up.net/
Pain points of the tech world identified by Citibank and the SG gov http://www.techforintegritychallenge.com/wp-content/uploads/2016/12/Citi_T4I_Integrity_Pain_Points.pdf?x88791
An uncurated list of programming resources.
Daily updates of the tech world https://www.reddit.com/r/programming/
Instant HTML5 templates https://html5up.net/
Pain points of the tech world identified by Citibank and the SG gov http://www.techforintegritychallenge.com/wp-content/uploads/2016/12/Citi_T4I_Integrity_Pain_Points.pdf?x88791
| schema.pageSchema=new mongoose.Schema({ | |
| timestamp:Date, | |
| hash:String, | |
| text:String, | |
| user_id:Number | |
| }); | |
| schema.chapterSchema=new mongoose.Schema({ | |
| title:String, | |
| page:[schema.pageSchema], |
| test="cu/a/ca ha/ri i/ni san/gat pa/nas" | |
| def split_words(sentence): | |
| return map(lambda x : x.split("/"), sentence.split()) | |
| def generate_f(syllable): | |
| return syllable+"f"+ (syllable[1:] if syllable[0] not in "aeiou" else syllable) | |
| print(" ".join("".join(map(generate_f, word)) for word in split_words(test))) | |