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
| var valueElement = document.getElementById('attr' + i +'value_'); | |
| if (!wsptIsNull(valueElement)) | |
| { | |
| data.values[dataIndex].value = valueElement.value; | |
| //if this happens to be a checkbox, its returning "true" (string) always, | |
| //and not checking the checked state. valueElement.checked is the boolean i want | |
| } | |
| else | |
| { | |
| data.values[dataIndex].value = ''; |
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
| this is a triumph! |
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
| THE DOCTOR & THE NURSE | |
| A doctor and nurse, were in the office one morning before patients arrived. | |
| The doctor told the nurse that he was scheduled to see 3 patients in the | |
| morning. The nurse asked how old they were and the doctor answered: | |
| "The product of the ages of those three people is 2450 and the sum is twice | |
| your age. How old are those people?" | |
| The nurse thought for a while and then said, "I cannot answer your question." |
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
| from collections import defaultdict | |
| def sorter_second_desc(x,y): | |
| """for sorting list of pairs by the second element, descending. | |
| e.g. count""" | |
| return -1 * cmp(x[1], y[1]) | |
| def main(): | |
| sentence='the quick brown FOX JumpeD Over the lazy dog' | |
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
| public static String buildUpdateSingleSql(SimpleDataCollection data, ITmfTypeInfo typeInfo, ITmfAppContext context)throws Exception | |
| { | |
| long revision = getRevisionValue(data); | |
| List<ITmfTypeFieldInfo> appFields = typeInfo.getAppSingleFields(); | |
| StringBuilder sb = new StringBuilder(2048); | |
| sb.append("UPDATE "); | |
| appendSchemaPrefix(sb); | |
| sb.append(typeInfo.getSingleTableName()); |
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
| IDBConnection conn = appContext.getDbConnection(); | |
| IDBTransactionManager transaction = conn.getTransactionManager(); | |
| transaction.begin(); | |
| try | |
| { | |
| doSave(tmfObject, revision, appContext); | |
| assert false:"bust the transaction"; | |
| checkIntegrity(appContext); | |
| transaction.commit(); | |
| } |
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
| import java.util.Locale; | |
| public class Util | |
| { | |
| /** | |
| * Always-enabled assertions. | |
| * | |
| * "Each assertion contains a boolean expression that you believe will be true | |
| * when the assertion executes. If it is not true, the system will throw an error. |
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
| { | |
| "events": [ | |
| { | |
| "type": "WAVELET_SELF_ADDED", | |
| "modifiedBy": "dustin.getz@googlewave.com", | |
| "timestamp": 1299396504221, | |
| "properties": { | |
| "blipId": "b+L1Y00ipBB" | |
| } | |
| } |
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
| #http://google-wave-resources.googlecode.com/svn/trunk/samples/apps/inboxchecker/blip_renderer.py | |
| import logging | |
| import re | |
| import cgi | |
| def log(message, string): | |
| logging.info(message + ': ' + string) | |
| def to_text(blip): | |
| format = "-------------------------------\n\ |
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
| if (CMD_CREATE.equals(command)) | |
| ... | |
| else if (CMD_COPY.equals(command)) | |
| ... | |
| else if (CMD_SAVE.equals(command)) | |
| ... | |
| else if (CMD_NEXT.equals(command)) | |
| ... | |
| else if CMD_PREVIOUS.equals(command)) | |
| ... |