Works well with:
      http://www.appelsiini.net/projects/jeditable
769313
def survey_change_name(request, pk):
    
    survey = get_object_or_404(Survey, pk=pk)

    if not request.user.has_perm("formly.change_survey_name", obj=survey):
        raise PermissionDenied()

    survey.name = request.POST.get("name")
    survey.save()
    return JsonResponse({
        "status": "OK",
        "name": survey.name
    })
707218
final public function insertIntoJunction($table, $masterValue, array $slaves, $masterColumn = self::PARAM_JUNCTION_MASTER_COLUMN, $slaveColumn = self::PARAM_JUNCTION_SLAVE_COLUMN)
    {
        // Avoid executing empty query
        if (!empty($slaves)) {
            return $this->db->insertIntoJunction($table, array($masterColumn, $slaveColumn), $masterValue, $slaves)
                            ->execute();
        } else {
            return false;
        }
    }
938222
def SafeLoadKextManager(self, fn_table):
    """"""
    dll = None
    try:
      dll = SetCTypesForLibrary('IOKit', fn_table)
    except AttributeError as ae:
      if 'KextManagerUnloadKextWithIdentifier' in str(ae):
        # Try without this symbol, as it is not available on 10.6
        logging.debug('Using legacy kextunload')
        dll = self.SafeLoadKextManager(
            FilterFnTable(fn_table, 'KextManagerUnloadKextWithIdentifier'))
        dll.KextManagerUnloadKextWithIdentifier = self.LegacyKextunload
      elif 'KextManagerLoadKextWithURL' in str(ae):
        logging.debug('Using legacy kextload')
        dll = self.SafeLoadKextManager(
            FilterFnTable(fn_table, 'KextManagerLoadKextWithURL'))
        dll.KextManagerLoadKextWithURL = self.LegacyKextload
      else:
        raise OSError('Can\'t resolve KextManager symbols:{0}'.format(str(ae)))

    return dll
1209208
private void buildWidget() {
		// setTitle(MESSAGES.nearbyFeaturesListTooltip());
		setShowEmptyMessage(true);
		setWidth100();
		setHeight100();
		setShowHeader(false);
		setShowAllRecords(true);

		// List size calculation
		setDefaultWidth(400);
		setDefaultHeight(300);
		setAutoFitData(Autofit.BOTH);
		setAutoFitMaxRecords(MAX_ROWS);
		setAutoFitFieldWidths(true);
		setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);

		ListGridField labelField = new ListGridField(LABEL);
		ListGridField featIdField = new ListGridField(FEATURE_ID);
		ListGridField layerField = new ListGridField(LAYER_ID);
		ListGridField layerLabelField = new ListGridField(LAYER_LABEL);

		setGroupByField(LAYER_LABEL);

		setGroupStartOpen(GroupStartOpen.ALL);
		setFields(/* dummyIndentField, */labelField, layerField, featIdField, layerLabelField);
		hideField(LAYER_ID);
		hideField(FEATURE_ID);
		hideField(LAYER_LABEL);
		addRecordClickHandler(new RecordClickHandler() {

			public void onRecordClick(RecordClickEvent event) {
				String fId = event.getRecord().getAttribute(FEATURE_ID);
				String lId = event.getRecord().getAttribute(LAYER_ID);
				Feature feat = vectorFeatures.get(fId);

				if (feat != null) {
					featureClickHandler.onClick(feat, feat.getLayer());
				} else {
					Layer<?> rasterLayer = rasterLayers.get(lId);
					feat = rasterFeatures.get(fId);
					featureClickHandler.onClick(feat, rasterLayer);
				}
			}

		});

		setShowHover(true);
		setCanHover(true);
		setHoverWidth(200);
		setHoverCustomizer(new HoverCustomizer() {

			public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
				String fId = record.getAttribute(FEATURE_ID);
				Feature feat = vectorFeatures.get(fId);

				StringBuilder tooltip = new StringBuilder();

				if (feat != null) {
					for (AbstractAttributeInfo a : feat.getLayer().getLayerInfo().getFeatureInfo().getAttributes()) {
						if (a instanceof AbstractReadOnlyAttributeInfo &&
								((AbstractReadOnlyAttributeInfo) a).isIdentifying()) {
							tooltip.append("<b>");
							tooltip.append(((AbstractReadOnlyAttributeInfo) a).getLabel());
							tooltip.append("</b>: ");
							tooltip.append(feat.getAttributeValue(a.getName()));
							tooltip.append("<br/>");
						}
					}
					tooltip.append(MESSAGES.nearbyFeaturesListTooltip());
				}
				return tooltip.toString();
			}
		});
	}
521479
def getDigitalActionData(self, action, unActionDataSize, ulRestrictToDevice):
        

        fn = self.function_table.getDigitalActionData
        pActionData = InputDigitalActionData_t()
        result = fn(action, byref(pActionData), unActionDataSize, ulRestrictToDevice)
        return result, pActionData
1328914
private void importTable(PdfPTable table) {
        this.rows = new ArrayList();
        this.tableWidthPercent = table.getWidthPercentage();
//        this.tableWidthPercent = table.getWidth();
        this.proportionalWidths = table.getAbsoluteWidths();
//        this.proportionalWidths = table.getProportionalWidths();
        this.cellPadding = (float) (table.spacingAfter() * TWIPS_FACTOR);
//        this.cellPadding = (float) (table.getPadding() * TWIPS_FACTOR);
        this.cellSpacing = (float) (table.spacingAfter() * TWIPS_FACTOR);
//        this.cellSpacing = (float) (table.getSpacing() * TWIPS_FACTOR);
//        this.borders = new RtfBorderGroup(this.document, RtfBorder.ROW_BORDER, table.getBorder(), table.getBorderWidth(), table.getBorderColor());
//        this.borders = new RtfBorderGroup(this.document, RtfBorder.ROW_BORDER, table.getBorder(), table.getBorderWidth(), table.getBorderColor());
        this.alignment = table.getHorizontalAlignment();
//        this.alignment = table.getAlignment();
        
        int i = 0;
        Iterator rowIterator = table.getRows().iterator();
//        Iterator rowIterator = table.iterator();
        while(rowIterator.hasNext()) {
            this.rows.add(new RtfRow(this.document, this, (PdfPRow) rowIterator.next(), i));
            i++;
        }
        for(i = 0; i < this.rows.size(); i++) {
            ((RtfRow) this.rows.get(i)).handleCellSpanning();
            ((RtfRow) this.rows.get(i)).cleanRow();
        }
        
        this.headerRows = table.getHeaderRows();
//        this.headerRows = table.getLastHeaderRow();
        this.cellsFitToPage = table.getKeepTogether();
//        this.cellsFitToPage = table.isCellsFitPage();
        this.tableFitToPage = table.getKeepTogether();
//        this.tableFitToPage = table.isTableFitsPage();
//        if(!Float.isNaN(table.getOffset())) {
//            this.offset = (int) (table.getOffset() * 2);
//        }
//        if(!Float.isNaN(table.getOffset())) {
//            this.offset = (int) (table.getOffset() * 2);
//        }
    }
1126505
def getPoseActionData(self, action, eOrigin, fPredictedSecondsFromNow, unActionDataSize, ulRestrictToDevice):
        """"""

        fn = self.function_table.getPoseActionData
        pActionData = InputPoseActionData_t()
        result = fn(action, eOrigin, fPredictedSecondsFromNow, byref(pActionData), unActionDataSize, ulRestrictToDevice)
        return result, pActionData
11006
private void addJoinColumnToInfo(String joinColumn, TableInfo targetTableInfo, List<TableInfo> targetTableInfos,
            EntityMetadata m)
    {
        if (!joinColumn.equals(targetTableInfo.getIdColumnName()))
        {

            if (!targetTableInfos.isEmpty() && targetTableInfos.contains(targetTableInfo))
            {
                int idx = targetTableInfos.indexOf(targetTableInfo);
                targetTableInfo = targetTableInfos.get(idx);
                ColumnInfo columnInfoOfJoinColumn = getJoinColumn(targetTableInfo, joinColumn,
                        m.getIdAttribute().getBindableJavaType());
                if (!targetTableInfo.getColumnMetadatas().contains(columnInfoOfJoinColumn))
                {
                    targetTableInfo.addColumnInfo(columnInfoOfJoinColumn);
                }
            }
            else
            {
                ColumnInfo columnInfoOfJoinColumn = getJoinColumn(targetTableInfo, joinColumn,
                        m.getIdAttribute().getBindableJavaType());
                if (!targetTableInfo.getColumnMetadatas().contains(columnInfoOfJoinColumn))
                {
                    targetTableInfo.addColumnInfo(columnInfoOfJoinColumn);
                }
                targetTableInfos.add(targetTableInfo);
            }
        }
    }
293466
function compatibilityValuesRamp (datasource, column, args) {
  var values = args[0];
  var method = (args[1] || 'quantiles').toLowerCase();
  var numBuckets = values.getLength();
  return getRamp(datasource, column, numBuckets, method).then(compatibilityCreateRampFn(values));
}
469869
def TableSimulation():
    
    sg.SetOptions(element_padding=(0,0))

    menu_def = [['File', ['Open', 'Save', 'Exit']],
                ['Edit', ['Paste', ['Special', 'Normal',], 'Undo'],],
                ['Help', 'About...'],]

    columm_layout = [[]]

    MAX_ROWS = 20
    MAX_COL = 10
    for i in range(MAX_ROWS):
        inputs = [sg.T('{}'.format(i), size=(4,1), justification='right')] + [sg.In(size=(10, 1), pad=(1, 1), justification='right', key=(i,j), do_not_clear=True) for j in range(MAX_COL)]
        columm_layout.append(inputs)

    layout = [ [sg.Menu(menu_def)],
               [sg.T('Table Using Combos and Input Elements', font='Any 18')],
               [sg.T('Type in a row, column and value. The form will update the values in realtime as you type'),
               sg.In(key='inputrow', justification='right', size=(8,1), pad=(1,1), do_not_clear=True),
               sg.In(key='inputcol', size=(8,1), pad=(1,1), justification='right', do_not_clear=True),
               sg.In(key='value', size=(8,1), pad=(1,1), justification='right', do_not_clear=True)],
               [sg.Column(columm_layout, size=(800,600), scrollable=True)] ]

    window = sg.Window('Table', return_keyboard_events=True).Layout(layout)

    while True:
        event, values = window.Read()
        # --- Process buttons --- #
        if event is None or event == 'Exit':
            break
        elif event == 'About...':
            sg.Popup('Demo of table capabilities')
        elif event == 'Open':
            filename = sg.PopupGetFile('filename to open', no_window=True, file_types=(("CSV Files","*.csv"),))
            # --- populate table with file contents --- #
            if filename is not None:
                with open(filename, "r") as infile:
                    reader = csv.reader(infile)
                    try:
                        data = list(reader)  # read everything else into a list of rows
                    except:
                        sg.PopupError('Error reading file')
                        continue
                # clear the table
                [window.FindElement((i,j)).Update('') for j in range(MAX_COL) for i in range(MAX_ROWS)]

                for i, row in enumerate(data):
                    for j, item in enumerate(row):
                        location = (i,j)
                        try:            # try the best we can at reading and filling the table
                            target_element = window.FindElement(location)
                            new_value = item
                            if target_element is not None and new_value != '':
                                target_element.Update(new_value)
                        except:
                            pass

        # if a valid table location entered, change that location's value
        try:
            location = (int(values['inputrow']), int(values['inputcol']))
            target_element = window.FindElement(location)
            new_value = values['value']
            if target_element is not None and new_value != '':
                target_element.Update(new_value)
        except:
            pass
600783
protected void setBigJoin(String[] masterLabels, String masterColumn,
                              String dataColumn, List<String> masterData) {
        setBigJoin(masterLabels, masterColumn, dataColumn, null, masterData);
    }
731399
def enable_notebook(verbose=0):
    
    libs = ['objexporter.js',
            'ArcballControls.js', 'filesaver.js',
            'base64-arraybuffer.js', 'context.js',
            'chemview.js', 'three.min.js', 'jquery-ui.min.js',
            'context.standalone.css', 'chemview_widget.js',
            'trajectory_controls_widget.js', "layout_widget.js",
            "components/jquery-fullscreen/jquery.fullscreen.js",
            'scales.js']
    fns = [resource_filename('chemview', os.path.join('static', f)) for f in libs]

    [install_nbextension(fn, verbose=verbose, overwrite=True, user=True) for fn in fns]
555456
def step_impl09(context):
    
    assert context.table, "ENSURE: table is provided."
    context.app_list = [row['application'] for row in context.table.rows]
811818
function notifyLightClientsAboutStableJoints(from_mci, to_mci) {
	db.query(
		"SELECT peer FROM units JOIN unit_authors USING(unit) JOIN watched_light_addresses USING(address) \n\
		WHERE main_chain_index>? AND main_chain_index<=? \n\
		UNION \n\
		SELECT peer FROM units JOIN outputs USING(unit) JOIN watched_light_addresses USING(address) \n\
		WHERE main_chain_index>? AND main_chain_index<=? \n\
		UNION \n\
		SELECT peer FROM units JOIN watched_light_units USING(unit) \n\
		WHERE main_chain_index>? AND main_chain_index<=?",
		[from_mci, to_mci, from_mci, to_mci, from_mci, to_mci],
		function (rows) {
			rows.forEach(function (row) {
				let ws = getPeerWebSocket(row.peer);
				if (ws && ws.readyState === ws.OPEN)
					sendJustsaying(ws, 'light/have_updates');
			});
			db.query("DELETE FROM watched_light_units \n\
				WHERE unit IN (SELECT unit FROM units WHERE main_chain_index>? AND main_chain_index<=?)", [from_mci, to_mci], function () {

			});
		}
	);
}
482403
function &_getInvTables()
    {
        static $tables;
        if (empty($tables)) {
            $dt3 = array_map('intval', array(
                0xF4A75051, 0x4165537E, 0x17A4C31A, 0x275E963A, 0xAB6BCB3B, 0x9D45F11F, 0xFA58ABAC, 0xE303934B,
                0x30FA5520, 0x766DF6AD, 0xCC769188, 0x024C25F5, 0xE5D7FC4F, 0x2ACBD7C5, 0x35448026, 0x62A38FB5,
                0xB15A49DE, 0xBA1B6725, 0xEA0E9845, 0xFEC0E15D, 0x2F7502C3, 0x4CF01281, 0x4697A38D, 0xD3F9C66B,
                0x8F5FE703, 0x929C9515, 0x6D7AEBBF, 0x5259DA95, 0xBE832DD4, 0x7421D358, 0xE0692949, 0xC9C8448E,
                0xC2896A75, 0x8E7978F4, 0x583E6B99, 0xB971DD27, 0xE14FB6BE, 0x88AD17F0, 0x20AC66C9, 0xCE3AB47D,
                0xDF4A1863, 0x1A3182E5, 0x51336097, 0x537F4562, 0x6477E0B1, 0x6BAE84BB, 0x81A01CFE, 0x082B94F9,
                0x48685870, 0x45FD198F, 0xDE6C8794, 0x7BF8B752, 0x73D323AB, 0x4B02E272, 0x1F8F57E3, 0x55AB2A66,
                0xEB2807B2, 0xB5C2032F, 0xC57B9A86, 0x3708A5D3, 0x2887F230, 0xBFA5B223, 0x036ABA02, 0x16825CED,
                0xCF1C2B8A, 0x79B492A7, 0x07F2F0F3, 0x69E2A14E, 0xDAF4CD65, 0x05BED506, 0x34621FD1, 0xA6FE8AC4,
                0x2E539D34, 0xF355A0A2, 0x8AE13205, 0xF6EB75A4, 0x83EC390B, 0x60EFAA40, 0x719F065E, 0x6E1051BD,
                0x218AF93E, 0xDD063D96, 0x3E05AEDD, 0xE6BD464D, 0x548DB591, 0xC45D0571, 0x06D46F04, 0x5015FF60,
                0x98FB2419, 0xBDE997D6, 0x4043CC89, 0xD99E7767, 0xE842BDB0, 0x898B8807, 0x195B38E7, 0xC8EEDB79,
                0x7C0A47A1, 0x420FE97C, 0x841EC9F8, 0x00000000, 0x80868309, 0x2BED4832, 0x1170AC1E, 0x5A724E6C,
                0x0EFFFBFD, 0x8538560F, 0xAED51E3D, 0x2D392736, 0x0FD9640A, 0x5CA62168, 0x5B54D19B, 0x362E3A24,
                0x0A67B10C, 0x57E70F93, 0xEE96D2B4, 0x9B919E1B, 0xC0C54F80, 0xDC20A261, 0x774B695A, 0x121A161C,
                0x93BA0AE2, 0xA02AE5C0, 0x22E0433C, 0x1B171D12, 0x090D0B0E, 0x8BC7ADF2, 0xB6A8B92D, 0x1EA9C814,
                0xF1198557, 0x75074CAF, 0x99DDBBEE, 0x7F60FDA3, 0x01269FF7, 0x72F5BC5C, 0x663BC544, 0xFB7E345B,
                0x4329768B, 0x23C6DCCB, 0xEDFC68B6, 0xE4F163B8, 0x31DCCAD7, 0x63851042, 0x97224013, 0xC6112084,
                0x4A247D85, 0xBB3DF8D2, 0xF93211AE, 0x29A16DC7, 0x9E2F4B1D, 0xB230F3DC, 0x8652EC0D, 0xC1E3D077,
                0xB3166C2B, 0x70B999A9, 0x9448FA11, 0xE9642247, 0xFC8CC4A8, 0xF03F1AA0, 0x7D2CD856, 0x3390EF22,
                0x494EC787, 0x38D1C1D9, 0xCAA2FE8C, 0xD40B3698, 0xF581CFA6, 0x7ADE28A5, 0xB78E26DA, 0xADBFA43F,
                0x3A9DE42C, 0x78920D50, 0x5FCC9B6A, 0x7E466254, 0x8D13C2F6, 0xD8B8E890, 0x39F75E2E, 0xC3AFF582,
                0x5D80BE9F, 0xD0937C69, 0xD52DA96F, 0x2512B3CF, 0xAC993BC8, 0x187DA710, 0x9C636EE8, 0x3BBB7BDB,
                0x267809CD, 0x5918F46E, 0x9AB701EC, 0x4F9AA883, 0x956E65E6, 0xFFE67EAA, 0xBCCF0821, 0x15E8E6EF,
                0xE79BD9BA, 0x6F36CE4A, 0x9F09D4EA, 0xB07CD629, 0xA4B2AF31, 0x3F23312A, 0xA59430C6, 0xA266C035,
                0x4EBC3774, 0x82CAA6FC, 0x90D0B0E0, 0xA7D81533, 0x04984AF1, 0xECDAF741, 0xCD500E7F, 0x91F62F17,
                0x4DD68D76, 0xEFB04D43, 0xAA4D54CC, 0x9604DFE4, 0xD1B5E39E, 0x6A881B4C, 0x2C1FB8C1, 0x65517F46,
                0x5EEA049D, 0x8C355D01, 0x877473FA, 0x0B412EFB, 0x671D5AB3, 0xDBD25292, 0x105633E9, 0xD647136D,
                0xD7618C9A, 0xA10C7A37, 0xF8148E59, 0x133C89EB, 0xA927EECE, 0x61C935B7, 0x1CE5EDE1, 0x47B13C7A,
                0xD2DF599C, 0xF2733F55, 0x14CE7918, 0xC737BF73, 0xF7CDEA53, 0xFDAA5B5F, 0x3D6F14DF, 0x44DB8678,
                0xAFF381CA, 0x68C43EB9, 0x24342C38, 0xA3405FC2, 0x1DC37216, 0xE2250CBC, 0x3C498B28, 0x0D9541FF,
                0xA8017139, 0x0CB3DE08, 0xB4E49CD8, 0x56C19064, 0xCB84617B, 0x32B670D5, 0x6C5C7448, 0xB85742D0
            ));

            foreach ($dt3 as $dt3i) {
                $dt0[] = (($dt3i << 24) & 0xFF000000) | (($dt3i >>  8) & 0x00FFFFFF);
                $dt1[] = (($dt3i << 16) & 0xFFFF0000) | (($dt3i >> 16) & 0x0000FFFF);
                $dt2[] = (($dt3i <<  8) & 0xFFFFFF00) | (($dt3i >> 24) & 0x000000FF);
            };

            $tables = array(
                // The Precomputed inverse mixColumns tables dt0 - dt3
                $dt0,
                $dt1,
                $dt2,
                $dt3,
                // The inverse SubByte S-Box
                array(
                    0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB,
                    0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, 0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB,
                    0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E,
                    0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, 0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25,
                    0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92,
                    0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84,
                    0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, 0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06,
                    0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, 0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B,
                    0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, 0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73,
                    0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, 0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E,
                    0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, 0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B,
                    0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4,
                    0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, 0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F,
                    0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, 0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF,
                    0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61,
                    0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, 0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D
                )
            );
        }
        return $tables;
    }
49872
def table(options)
      lpadding = options.keys.max_by(&:length).length + 2
      rpadding = options.values.max_by { |v| v.to_s.length }.to_s.length
      puts 'PROPERTY'.ljust(lpadding) + 'VALUE'
      puts '=' * (lpadding + rpadding)
      options.keys.sort.each do |key|
        puts key.to_s.ljust(lpadding) + options[key].to_s
      end
      puts
      options
    end
713527
public boolean allowsAutoTables() {
        String optValue = getOption(CommonDefs.AUTO_TABLES);
        return optValue != null && optValue.equalsIgnoreCase("true");
    }