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 anti_vowel(text): | |
| vowels = ['a','e','i','o','u','A','E','I','O','U'] | |
| new_word = [] | |
| for piece in text: | |
| if piece in vowels: | |
| new_word.append("") | |
| else: | |
| new_word.append(piece) | |
| return "".join(new_word) | |
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
| score = {"a": 1, "c": 3, "b": 3, "e": 1, "d": 2, "g": 2, | |
| "f": 4, "i": 1, "h": 4, "k": 5, "j": 8, "m": 3, | |
| "l": 1, "o": 1, "n": 1, "q": 10, "p": 3, "s": 1, | |
| "r": 1, "u": 1, "t": 1, "w": 4, "v": 4, "y": 4, | |
| "x": 8, "z": 10} | |
| def scrabble_score(word): | |
| total = 0 | |
| for piece in word: | |
| piece = piece.lower() |
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
| helper.write_json(resp, falcon.HTTP_201, { | |
| 'id': obj.id, | |
| 'school_name': obj.school_name, | |
| 'study_period': obj.study_period, | |
| 'highest_award': obj.highest_award | |
| }) |
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
| { | |
| alt_tel_num1: "" | |
| alt_tel_num2: "" | |
| archived: false | |
| cell_num: "0168028426" | |
| chi_name: "Chinese Name" | |
| church_name: "Church" | |
| denom_id: 1 | |
| edit_seq: 1 | |
| email_addr: "deojeff@email.com" |
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
| switch(msgType) { | |
| fadeTarget.children[0].children[1].children[0].innerHTML = 'Success'; | |
| case 'create': | |
| domClass.add(fadeTarget, 'lightblueColor'); | |
| domClass.add(fadeTarget.children[0].children[0], 'popupCreate'); | |
| boxColor = 'lightblueColor'; |
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
| <!-- In Dialogs.js --> | |
| onDelete: function(evt) { | |
| confirmBox.show(); | |
| } | |
| on(widget.deleteButton, 'click', func.onDelete); | |
| <!-- HTML in Dialogs.html --> |
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
| // Dialog.js | |
| var widget = { | |
| confirmDeleteButton: registry.byId('confirmDeleteButton'), | |
| }; | |
| var func = { | |
| onAwesome: function(evt) { | |
| alert(1); | |
| } | |
| }; |
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
| <!-- HTML --> | |
| <div id="basicWipeNode" class="popupMessageBox" data-dojo-type="dijit/layout/ContentPane" style="width: 200px; height: 50px;"> | |
| <b id="messageContainer"></b> | |
| </div> | |
| <!-- End of HTML --> | |
| loadMsgBox: function(msg, msgType) { | |
| var messageBox = dom.byId('basicWipeNode'); |
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
| GET: | |
| curl -X GET http://localhost/api/modules | |
| DELETE: | |
| curl -X DELETE http://localhost/api/single_module/{id} | |
| POST: | |
| curl -X POST -h "Content-Type:application/json" -d '{"key":"value","key2":"value"}' http://localhost/api/modules | |
| PUT: |
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
| class Account(Base): | |
| __tablename__ = 'acct' | |
| __table_args__ = ( | |
| UniqueConstraint('code'), | |
| {'schema': 'accounting'} | |
| ) | |
| id = Column(Integer, Sequence('acct_id_seq', schema='accounting'), primary_key=True) | |
| code = Column(String(10), nullable=False) |
OlderNewer