content
stringlengths 40
137k
|
---|
"private void writeFile() throws IOException {\n final MessageType schema = new MessageType(\"String_Node_Str\", new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.INT32, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.BINARY, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.BINARY, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.INT32, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.BINARY, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.DOUBLE, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.BINARY, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.BINARY, \"String_Node_Str\"), new GroupType(Repetition.OPTIONAL, \"String_Node_Str\", OriginalType.MAP_KEY_VALUE, new GroupType(Repetition.REPEATED, \"String_Node_Str\", new PrimitiveType(Repetition.REQUIRED, PrimitiveTypeName.BINARY, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.BINARY, \"String_Node_Str\"))), new GroupType(Repetition.OPTIONAL, \"String_Node_Str\", OriginalType.LIST, new GroupType(Repetition.REPEATED, \"String_Node_Str\", new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.INT32, \"String_Node_Str\"))));\n final MemPageStore pageStore = new MemPageStore(1000);\n final ColumnWriteStoreImpl store = new ColumnWriteStoreImpl(pageStore, 8 * 1024, 8 * 1024, 8 * 1024, false);\n final MessageColumnIO columnIO = new ColumnIOFactory().getColumnIO(schema);\n final RecordConsumer recordWriter = columnIO.getRecordWriter(store);\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"String_Node_Str\", \"String_Node_Str\");\n map.put(\"String_Node_Str\", \"String_Node_Str\");\n List<Integer> list = new ArrayList<Integer>();\n list.add(0);\n list.add(12);\n list.add(17);\n int recordCount = 0;\n mapData.clear();\n for (int i = 0; i < 1000; i++) {\n recordWriter.startMessage();\n mapData.put(i, UtilitiesTestMethods.createArrayWritable(i, i % 11 == 0 ? null : \"String_Node_Str\" + i, i % 12 == 0 ? null : \"String_Node_Str\" + i, i % 13 == 0 ? null : i, i % 14 == 0 ? null : \"String_Node_Str\" + i, i % 15 == 0 ? null : 1.2d * i, i % 16 == 0 ? null : \"String_Node_Str\" + i, i % 17 == 0 ? null : \"String_Node_Str\" + i, i % 18 == 0 ? null : map, i % 19 == 0 ? null : list));\n saveData(recordWriter, i, i % 11 == 0 ? null : \"String_Node_Str\" + i, i % 12 == 0 ? null : \"String_Node_Str\" + i, i % 13 == 0 ? null : i, i % 14 == 0 ? null : \"String_Node_Str\" + i, i % 15 == 0 ? null : 1.2d * i, i % 16 == 0 ? null : \"String_Node_Str\" + i, i % 17 == 0 ? null : \"String_Node_Str\" + i, i % 18 == 0 ? null : map, i % 19 == 0 ? null : list);\n recordWriter.endMessage();\n ++recordCount;\n }\n store.flush();\n UtilitiesTestMethods.writeToFile(new Path(testFile.getAbsolutePath()), conf, schema, pageStore, recordCount);\n}\n"
|
"public String getPathFromUrl(final String url) {\n String denormalizedUrl = denormalizeSeparators(url);\n return uploadDirectory.getAbsolutePath() + File.separator + denormalizedUrl.substring(denormalizedUrl.indexOf(File.separatorChar) + L_FILE_URL_PREFIX.length() - 1);\n}\n"
|
"public void testGetSummoner() throws InterruptedException, TimeoutException, ExecutionException {\n try {\n handler.getSummoner(SUMMONER_NAME_2).get(1, MINUTES);\n } catch (RequestException ex) {\n if (isNotServerside(ex))\n throw ex;\n }\n}\n"
|
"public void Init(FMLInitializationEvent event) {\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"String_Node_Str\");\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"String_Node_Str\");\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"String_Node_Str\");\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"String_Node_Str\");\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"String_Node_Str\");\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"String_Node_Str\");\n TickRegistry.registerTickHandler(TickHandler.instance, Side.SERVER);\n TickRegistry.registerTickHandler(TickHandler.instance, Side.CLIENT);\n MinecraftForge.EVENT_BUS.register(TickHandler.instance);\n MinecraftForge.EVENT_BUS.register(new PartPlacement());\n AEApi.instance().registries().gridCache().registerGridCache(ITickManager.class, TickManagerCache.class);\n AEApi.instance().registries().gridCache().registerGridCache(IEnergyGrid.class, EnergyGridCache.class);\n AEApi.instance().registries().gridCache().registerGridCache(IPathingGrid.class, PathGridCache.class);\n AEApi.instance().registries().gridCache().registerGridCache(IStorageGrid.class, GridStorageCache.class);\n AEApi.instance().registries().gridCache().registerGridCache(P2PCache.class, P2PCache.class);\n AEApi.instance().registries().gridCache().registerGridCache(ISpatialCache.class, SpatialPylonCache.class);\n AEApi.instance().registries().gridCache().registerGridCache(ISecurityGrid.class, SecurityCache.class);\n AEApi.instance().registries().externalStorage().addExternalStorageInterface(new AEExternalHandler());\n AEApi.instance().registries().cell().addCellHandler(new BasicCellHandler());\n AEApi.instance().registries().cell().addCellHandler(new CreativeCellHandler());\n AEApi.instance().registries().matterCannon().registerAmmo(AEApi.instance().materials().materialMatterBall.stack(1), 32.0);\n ((P2PTunnelRegistry) AEApi.instance().registries().p2pTunnel()).configure();\n NetworkRegistry.instance().registerGuiHandler(AppEng.instance, GuiBridge.GUI_Handler);\n}\n"
|
"protected File getAssemblyFile(Assembler assembler, File assemblyDir) {\n if (assemblyDir.getName().equals(\"String_Node_Str\")) {\n return assembler.getScaffoldsFile().getAbsoluteFile();\n } else if (assemblyDir.getName().equals(\"String_Node_Str\")) {\n return assembler.getContigsFile();\n } else if (assemblyDir.getName().equals(\"String_Node_Str\")) {\n return assembler.getUnitigsFile();\n } else {\n throw new IllegalStateException(\"String_Node_Str\" + assemblyDir.getName());\n }\n}\n"
|
"private void extractStatements(ControlFlowAnalyzer initiallyLive) {\n Map<Integer, List<JsStatement>> fragmentStats = new LinkedHashMap<Integer, List<JsStatement>>();\n {\n LivenessPredicate alreadyLoaded = new NothingAlivePredicate();\n LivenessPredicate liveNow = new CfaLivenessPredicate(initiallyLive);\n List<JsStatement> noStats = new ArrayList<JsStatement>();\n addFragment(0, alreadyLoaded, liveNow, noStats, fragmentStats);\n }\n ControlFlowAnalyzer liveAfterInitialSequence = new ControlFlowAnalyzer(initiallyLive);\n int cacheIndex = 1;\n {\n for (final int sp : initialLoadSequence) {\n splitPointToCodeIndexMap[sp] = cacheIndex;\n LivenessPredicate alreadyLoaded = new CfaLivenessPredicate(liveAfterInitialSequence);\n ControlFlowAnalyzer liveAfterSp = new ControlFlowAnalyzer(liveAfterInitialSequence);\n JRunAsync runAsync = jprogram.getRunAsyncs().get(sp - 1);\n liveAfterSp.traverseFromRunAsync(runAsync);\n LivenessPredicate liveNow = new CfaLivenessPredicate(liveAfterSp);\n List<JsStatement> statsToAppend = fragmentExtractor.createOnLoadedCall(cacheIndex);\n addFragment(sp, alreadyLoaded, liveNow, statsToAppend, fragmentStats);\n liveAfterInitialSequence = liveAfterSp;\n cacheIndex++;\n }\n }\n ControlFlowAnalyzer everything = computeCompleteCfa();\n Set<JField> allFields = new HashSet<JField>();\n Set<JMethod> allMethods = new HashSet<JMethod>();\n for (JNode node : everything.getLiveFieldsAndMethods()) {\n if (node instanceof JField) {\n allFields.add((JField) node);\n }\n if (node instanceof JMethod) {\n allMethods.add((JMethod) node);\n }\n }\n allFields.addAll(everything.getFieldsWritten());\n ArrayList<JsStatement> leftOverMergeStats = new ArrayList<JsStatement>();\n for (int i = 1; i < splitPointToFragmentMap.length; i++) {\n ArrayList<Integer> splitPoints = new ArrayList<Integer>();\n if (splitPointToFragmentMap[i] != i) {\n continue;\n }\n if (initialLoadSequence.contains(i)) {\n continue;\n }\n splitPoints.add(i);\n splitPointToCodeIndexMap[i] = cacheIndex;\n for (int j = i + 1; j < splitPointToFragmentMap.length; j++) {\n if (initialLoadSequence.contains(j)) {\n continue;\n }\n if (splitPointToFragmentMap[j] == i) {\n splitPointToCodeIndexMap[j] = cacheIndex;\n splitPoints.add(j);\n }\n }\n dependencyRecorder.startDependencyGraph(\"String_Node_Str\" + cacheIndex, extendsCfa);\n ControlFlowAnalyzer allButOne = computeAllButNCfas(liveAfterInitialSequence, splitPoints, dependencyRecorder);\n dependencyRecorder.endDependencyGraph();\n ControlFlowAnalyzer allFromSplitPoints = computeAllLiveFromSplitPoints(liveAfterInitialSequence, splitPoints);\n Set<JNode> allLiveNodes = union(allButOne.getLiveFieldsAndMethods(), allButOne.getFieldsWritten());\n Set<JNode> allLiveFromSplitPoints = union(allFromSplitPoints.getLiveFieldsAndMethods(), allFromSplitPoints.getFieldsWritten());\n updateReverseMap(i, fragmentMap.fields, allLiveNodes, allFields, allLiveFromSplitPoints);\n updateReverseMap(i, fragmentMap.methods, allButOne.getLiveFieldsAndMethods(), allMethods, allFromSplitPoints.getLiveFieldsAndMethods());\n updateReverseMap(i, fragmentMap.strings, allButOne.getLiveStrings(), everything.getLiveStrings(), allFromSplitPoints.getLiveStrings());\n updateReverseMap(i, fragmentMap.types, declaredTypesIn(allButOne.getInstantiatedTypes()), declaredTypesIn(everything.getInstantiatedTypes()), declaredTypesIn(allFromSplitPoints.getInstantiatedTypes()));\n if (splitPointToFragmentMap[i] != i) {\n continue;\n }\n if (initialLoadSequence.contains(i)) {\n continue;\n }\n LivenessPredicate alreadyLoaded = new ExclusivityMapLivenessPredicate(fragmentMap, 0);\n LivenessPredicate liveNow = new ExclusivityMapLivenessPredicate(fragmentMap, i);\n List<JsStatement> exclusiveStats = fragmentExtractor.extractStatements(liveNow, alreadyLoaded);\n if (fragmentSizeBelowMergeLimit(exclusiveStats, leftOverMergeLimit)) {\n leftOverMergeStats.addAll(exclusiveStats);\n splitPointToFragmentMap[i] = -1;\n continue;\n } else {\n List<JsStatement> statsToAppend = fragmentExtractor.createOnLoadedCall(cacheIndex);\n addFragment(i, alreadyLoaded, liveNow, statsToAppend, fragmentStats);\n }\n cacheIndex++;\n }\n for (int i = 0; i < splitPointToFragmentMap.length; i++) {\n if (splitPointToFragmentMap[i] == -1) {\n splitPointToFragmentMap[i] = splitPointToFragmentMap.length;\n }\n }\n {\n LivenessPredicate alreadyLoaded = new CfaLivenessPredicate(liveAfterInitialSequence);\n LivenessPredicate liveNow = new ExclusivityMapLivenessPredicate(fragmentMap, 0);\n List<JsStatement> statsToAppend = fragmentExtractor.createOnLoadedCall(cacheIndex);\n leftOverMergeStats.addAll(statsToAppend);\n addFragment(splitPointToFragmentMap.length, alreadyLoaded, liveNow, leftOverMergeStats, fragmentStats);\n }\n jsprogram.setFragmentCount(fragmentStats.size());\n int count = 0;\n for (int i : fragmentStats.keySet()) {\n JsBlock fragBlock = jsprogram.getFragmentBlock(count++);\n fragBlock.getStatements().clear();\n fragBlock.getStatements().addAll(fragmentStats.get(i));\n }\n jprogram.setFragmentPartitioningResult(new FragmentPartitioningResult(splitPointToCodeIndexMap, fragmentStats.size()));\n}\n"
|
"public void doubleClick(DoubleClickEvent event) {\n ISelection selection = ServerView.this.getViewer().getSelection();\n TreeObject xo = (TreeObject) ((IStructuredSelection) selection).getFirstElement();\n if (xo.getType() == TreeObject._ACTION_) {\n Class<?> actionClass = (Class<?>) xo.getWsKey();\n try {\n AServerViewAction action = (AServerViewAction) actionClass.newInstance();\n action.setServerView(ServerView.this);\n action.run();\n } catch (Exception ex) {\n MessageDialog.openError(viewer.getControl().getShell(), \"String_Node_Str\", \"String_Node_Str\");\n }\n return;\n }\n if (xo.getType() == TreeObject._SERVER_) {\n if (((TreeParent) xo).getChildrenList().size() == 1)\n initServer((TreeParent) xo);\n }\n if (xo.getType() == TreeObject.WORKFLOW)\n return;\n if (xo.getType() == TreeObject.SUBSCRIPTION_ENGINE || (xo.getType() == TreeObject.DATA_CLUSTER && xo.isXObject()) || xo.getType() == TreeObject.WORKFLOW_PROCESS)\n browseViewAction.run();\n else\n editXObjectAction.run();\n}\n"
|
"public static String toSan(Board board, int move) {\n board.generateLegalMoves();\n boolean isLegal = false;\n boolean disambiguate = false;\n boolean fileEqual = false;\n boolean rankEqual = false;\n for (int i = 0; i < board.legalMoveCount; i++) {\n int move2 = board.legalMoves[i];\n if (move == move2) {\n isLegal = true;\n } else if (getToIndex(move) == getToIndex(move2) && (getPieceMoved(move) == getPieceMoved(move2))) {\n disambiguate = true;\n if ((getFromIndex(move) % 8) == (getFromIndex(move2) % 8)) {\n fileEqual = true;\n }\n if ((getFromIndex(move) / 8) == (getFromIndex(move2) / 8)) {\n rankEqual = true;\n }\n }\n }\n if (move == 0 || move == -1 || !isLegal) {\n return \"String_Node_Str\";\n } else if (Move.getMoveType(move) == TYPE_KINGSIDE_CASTLING) {\n return Move.isCheck(move) ? \"String_Node_Str\" : \"String_Node_Str\";\n } else if (Move.getMoveType(move) == TYPE_QUEENSIDE_CASTLING) {\n return Move.isCheck(move) ? \"String_Node_Str\" : \"String_Node_Str\";\n }\n StringBuilder sb = new StringBuilder();\n if (getPieceMoved(move) != Piece.PAWN) {\n sb.append(PIECE_LETTERS_UPPERCASE.charAt(getPieceMoved(move)));\n }\n String fromSq = BitboardUtils.index2Algebraic(Move.getFromIndex(move));\n if (isCapture(move) && getPieceMoved(move) == Piece.PAWN) {\n disambiguate = true;\n }\n if (disambiguate) {\n if (fileEqual && rankEqual) {\n sb.append(fromSq);\n } else if (fileEqual) {\n sb.append(fromSq.charAt(1));\n } else {\n sb.append(fromSq.charAt(0));\n }\n }\n if (isCapture(move)) {\n sb.append(\"String_Node_Str\");\n }\n sb.append(BitboardUtils.index2Algebraic(Move.getToIndex(move)));\n if (isPromotion(move)) {\n sb.append(PIECE_LETTERS_UPPERCASE.charAt(getPiecePromoted(move)));\n }\n if (isCheck(move)) {\n sb.append(\"String_Node_Str\");\n }\n return sb.toString();\n}\n"
|
"public static final Complex[] resize(final Complex[] array, final int newLength, final int startIdx) {\n Complex[] returnValue = new Complex[newLength];\n int copySize = Math.min(newLength, array.length - startIdx);\n if ((startIdx >= array.length) && (copySize > 0)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + startIdx + \"String_Node_Str\" + array.length + \"String_Node_Str\" + copySize + \"String_Node_Str\");\n }\n if (copySize > 0) {\n System.arraycopy(array, startIdx, returnValue, 0, copySize);\n }\n for (int i = copySize; i < newLength; i++) {\n returnValue[i] = Complex.ZERO;\n }\n return returnValue;\n}\n"
|
"public static String[] getJobTypeToDispaly() {\n String[] dispalyNames = new String[values().length];\n for (int i = 0; i < values().length; i++) {\n dispalyNamesList.add(i, values()[i].getDisplayName());\n }\n if (!PluginChecker.isStormPluginLoader()) {\n dispalyNamesList.remove(JobType.BIGDATASTREAMING.getDisplayName());\n }\n if (!PluginChecker.isMapReducePluginLoader()) {\n dispalyNamesList.remove(JobType.BIGDATABATCH.getDisplayName());\n }\n dispalyNames = new String[dispalyNamesList.size()];\n for (int j = 0; j < dispalyNamesList.size(); j++) {\n if (dispalyNamesList.get(j) != null) {\n dispalyNames[j] = dispalyNamesList.get(j);\n }\n }\n return dispalyNames;\n}\n"
|
"public static void main(final String[] args) {\n final Mat pFrame = imread(\"String_Node_Str\", CV_LOAD_IMAGE_GRAYSCALE), cFrame = imread(\"String_Node_Str\", CV_LOAD_IMAGE_GRAYSCALE), pGray = new Mat(), cGray = new Mat(), Optical_Flow = new Mat();\n pFrame.convertTo(pGray, CV_32FC1);\n cFrame.convertTo(cGray, CV_32FC1);\n final DenseOpticalFlow tvl1 = createOptFlow_DualTVL1();\n tvl1.calc(pGray, cGray, Optical_Flow);\n final Mat OF = new Mat(pGray.rows(), pGray.cols(), CV_32FC1);\n final FloatBuffer in = Optical_Flow.createBuffer(), out = OF.createBuffer();\n final int height = pGray.rows(), width = pGray.cols();\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n final float xVelocity = in.get();\n final float yVelocity = in.get();\n final float pixelVelocity = (float) Math.sqrt(xVelocity * xVelocity + yVelocity * yVelocity);\n out.put(pixelVelocity);\n }\n }\n imwrite(\"String_Node_Str\", OF);\n}\n"
|
"private BufferedStructureArray passBaseCubeResultSet(IAggregationResultSet baseResultSet, List<IAggregationResultSet> drillResultSets, List<IEdgeDrillFilter> drillFilters) throws IOException {\n BufferedStructureArray tempBufferArray = new BufferedStructureArray(AggregationResultRow.getCreator(), 2000);\n List<Member[]> currentMemberList;\n List<Member[]> previewMemberList = new ArrayList<Member[]>();\n for (int i = 0; i < baseResultSet.length(); i++) {\n baseResultSet.seek(i);\n IAggregationResultRow row = baseResultSet.getCurrentRow();\n currentMemberList = getDrilledMemberList(row.getLevelMembers(), drillResultSets, drillFilters);\n addMemberIntoBufferedArray(tempBufferArray, currentMemberList, previewMemberList);\n }\n return tempBufferArray;\n}\n"
|
"public boolean onOptionsItemSelected(MenuItem item) {\n if (enableLog)\n Log.d(TAG, \"String_Node_Str\" + item);\n if (enableLog)\n Log.d(TAG, \"String_Node_Str\" + item.getItemId());\n switch(item.getItemId()) {\n case R.id.menuSave:\n updateDatabase();\n setResult(RESULT_OK);\n finish();\n return true;\n case android.R.id.home:\n case R.id.menuCancel:\n setResult(RESULT_CANCELED);\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n}\n"
|
"public synchronized boolean removeSSRC(long ssrc) {\n if (ssrcs.length == 1) {\n if (ssrcs[0] == ssrc) {\n ssrcs = NO_SSRCS;\n return true;\n } else\n return false;\n } else {\n for (int i = 0; i < ssrcs.length; i++) {\n if (ssrcs[i] == ssrc) {\n int[] newSSRCs = new int[ssrcs.length - 1];\n if (i != 0)\n System.arraycopy(ssrcs, 0, newSSRCs, 0, i);\n if (i != newSSRCs.length) {\n System.arraycopy(ssrcs, i + 1, newSSRCs, i, newSSRCs.length - i);\n }\n ssrcs = newSSRCs;\n return true;\n }\n }\n return false;\n }\n}\n"
|
"protected void onShutdown() {\n txMetricsCollector.gauge(\"String_Node_Str\", committingChangeSets.size());\n txMetricsCollector.gauge(\"String_Node_Str\", committedChangeSets.size());\n txMetricsCollector.gauge(\"String_Node_Str\", inProgress.size());\n txMetricsCollector.gauge(\"String_Node_Str\", getInvalidSize());\n}\n"
|
"protected Component deserializeItem(JsonElement json, JsonDeserializationContext context) {\n return context.deserialize(json, ComponentTypeAdapterFactory.getJsonComponentType(json));\n}\n"
|
"private void readIndexes(String schema) throws JDBCException, SQLException {\n updateListeners(\"String_Node_Str\" + database.toString() + \"String_Node_Str\");\n for (Table table : tablesMap.values()) {\n ResultSet rs;\n Statement statement = null;\n if (database instanceof OracleDatabase) {\n statement = database.getConnection().createStatement();\n String sql = \"String_Node_Str\" + database.convertRequestedSchemaToSchema(schema) + \"String_Node_Str\" + table.getName() + \"String_Node_Str\";\n rs = statement.executeQuery(sql);\n } else {\n rs = databaseMetaData.getIndexInfo(database.convertRequestedSchemaToCatalog(schema), database.convertRequestedSchemaToSchema(schema), table.getName(), false, true);\n }\n Map<String, Index> indexMap = new HashMap<String, Index>();\n while (rs.next()) {\n String indexName = rs.getString(\"String_Node_Str\");\n short type = rs.getShort(\"String_Node_Str\");\n String columnName = rs.getString(\"String_Node_Str\");\n short position = rs.getShort(\"String_Node_Str\");\n String filterCondition = rs.getString(\"String_Node_Str\");\n if (type == DatabaseMetaData.tableIndexStatistic) {\n continue;\n }\n if (columnName == null) {\n continue;\n }\n Index indexInformation;\n if (indexMap.containsKey(indexName)) {\n indexInformation = indexMap.get(indexName);\n } else {\n indexInformation = new Index();\n indexInformation.setTable(table);\n indexInformation.setName(indexName);\n indexInformation.setFilterCondition(filterCondition);\n indexMap.put(indexName, indexInformation);\n }\n indexInformation.getColumns().add(position - 1, columnName);\n }\n for (Map.Entry<String, Index> entry : indexMap.entrySet()) {\n indexes.add(entry.getValue());\n }\n rs.close();\n if (statement != null) {\n statement.close();\n }\n }\n Set<Index> indexesToRemove = new HashSet<Index>();\n for (Index index : indexes) {\n for (PrimaryKey pk : primaryKeys) {\n if (index.getTable().getName().equalsIgnoreCase(pk.getTable().getName()) && index.getColumnNames().equals(pk.getColumnNames())) {\n indexesToRemove.add(index);\n }\n }\n }\n indexes.removeAll(indexesToRemove);\n}\n"
|
"protected BufferedImage getButtonImage(T phenotype, int width, int height, double[] inputMultipliers) {\n GameBundle bundle = setUpGameWithLevelFromCPPN(phenotype);\n BufferedImage levelImage = GVGAIUtil.getLevelImage(((BasicGame) bundle.game), bundle.level, (Agent) bundle.agent, width, height, bundle.randomSeed);\n return levelImage;\n}\n"
|
"public static <T> ConfigurationMetadata<T> getConfigurationMetadata(Class<T> configClass) {\n ConfigurationMetadata<T> metadata = new ConfigurationMetadata<T>(configClass, false);\n return metadata;\n}\n"
|
"public void setSelectedItem(TreeItem item, boolean fireEvents) {\n if (item == null) {\n if (curSelection == null) {\n return;\n }\n curSelection.setSelected(false);\n curSelection = null;\n return;\n }\n onSelection(item, fireEvents, true);\n}\n"
|
"public void createControl(Composite parent) {\n cmpContent = new Composite(parent, SWT.NONE);\n {\n GridLayout glContent = new GridLayout(2, false);\n cmpContent.setLayout(glContent);\n GridData gd = new GridData(GridData.FILL_BOTH);\n cmpContent.setLayoutData(gd);\n }\n Composite cmpBasic = new Composite(cmpContent, SWT.NONE);\n {\n cmpBasic.setLayout(new GridLayout(3, false));\n cmpBasic.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n }\n if (getAxisAngleType() == AngleType.X) {\n btnCategoryAxis = new Button(cmpBasic, SWT.CHECK);\n {\n btnCategoryAxis.setText(Messages.getString(\"String_Node_Str\"));\n btnCategoryAxis.addSelectionListener(this);\n btnCategoryAxis.setSelection(getAxisForProcessing().isCategoryAxis());\n btnCategoryAxis.setEnabled(!AxisType.TEXT_LITERAL.equals(getAxisForProcessing().getType()));\n }\n btnReverse = new Button(cmpBasic, SWT.CHECK);\n {\n GridData gd = new GridData();\n gd.horizontalSpan = 2;\n btnCategoryAxis.setLayoutData(gd);\n btnReverse.setText(Messages.getString(\"String_Node_Str\"));\n btnReverse.addSelectionListener(this);\n btnReverse.setSelection(((ChartWithAxes) getChart()).isReverseCategory());\n btnReverse.setEnabled(btnCategoryAxis.getSelection());\n }\n }\n Label lblTitle = new Label(cmpBasic, SWT.NONE);\n lblTitle.setText(Messages.getString(\"String_Node_Str\"));\n List<String> keys = null;\n IUIServiceProvider serviceprovider = getContext().getUIServiceProvider();\n if (serviceprovider != null) {\n keys = serviceprovider.getRegisteredKeys();\n }\n txtTitle = new ExternalizedTextEditorComposite(cmpBasic, SWT.BORDER | SWT.SINGLE, -1, -1, keys, serviceprovider, getAxisForProcessing().getTitle().getCaption().getValue());\n {\n GridData gd = new GridData();\n gd.widthHint = 250;\n gd.horizontalIndent = 5;\n txtTitle.setLayoutData(gd);\n txtTitle.addListener(this);\n }\n btnTitleVisible = new Button(cmpBasic, SWT.CHECK);\n {\n btnTitleVisible.setText(Messages.getString(\"String_Node_Str\"));\n btnTitleVisible.setSelection(getChart().getTitle().isVisible());\n btnTitleVisible.addSelectionListener(this);\n btnTitleVisible.setSelection(getAxisForProcessing().getTitle().isVisible());\n }\n if (getAxisAngleType() != AngleType.Z) {\n Label lblType = new Label(cmpBasic, SWT.NONE);\n lblType.setText(Messages.getString(\"String_Node_Str\"));\n cmbTypes = new Combo(cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY);\n {\n GridData gd = new GridData();\n gd.widthHint = 220;\n gd.horizontalIndent = 5;\n cmbTypes.setLayoutData(gd);\n cmbTypes.addSelectionListener(this);\n }\n btnFormatSpecifier = new Button(cmpBasic, SWT.PUSH);\n {\n GridData gdBTNFormatSpecifier = new GridData();\n gdBTNFormatSpecifier.horizontalIndent = -3;\n btnFormatSpecifier.setLayoutData(gdBTNFormatSpecifier);\n btnFormatSpecifier.setToolTipText(Messages.getString(\"String_Node_Str\"));\n btnFormatSpecifier.addSelectionListener(this);\n btnFormatSpecifier.setText(Messages.getString(\"String_Node_Str\"));\n }\n if (getChart().getDimension().getValue() != ChartDimension.THREE_DIMENSIONAL) {\n Label lblOrigin = new Label(cmpBasic, SWT.NONE);\n lblOrigin.setText(Messages.getString(\"String_Node_Str\"));\n cmbOrigin = new Combo(cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY);\n {\n GridData gd = new GridData();\n gd.widthHint = 220;\n gd.horizontalSpan = 2;\n gd.horizontalIndent = 5;\n cmbOrigin.setLayoutData(gd);\n cmbOrigin.addSelectionListener(this);\n }\n boolean bValueOrigin = false;\n if (getAxisForProcessing().getOrigin() != null) {\n if (getAxisForProcessing().getOrigin().getType().equals(IntersectionType.VALUE_LITERAL)) {\n bValueOrigin = true;\n }\n }\n lblValue = new Label(cmpBasic, SWT.NONE);\n {\n lblValue.setText(Messages.getString(\"String_Node_Str\"));\n lblValue.setEnabled(bValueOrigin);\n }\n txtValue = createDataElementComposite(cmpBasic);\n {\n GridData gd = new GridData();\n gd.widthHint = 245;\n gd.horizontalSpan = 2;\n gd.horizontalIndent = 5;\n txtValue.setLayoutData(gd);\n txtValue.addListener(this);\n txtValue.setEnabled(bValueOrigin);\n }\n }\n populateLists();\n }\n new Label(cmpBasic, SWT.NONE).setText(Messages.getString(\"String_Node_Str\"));\n fdcFont = new FontDefinitionComposite(cmpBasic, SWT.NONE, getContext(), getAxisForProcessing().getLabel().getCaption().getFont(), getAxisForProcessing().getLabel().getCaption().getColor(), false);\n {\n GridData gdFDCFont = new GridData();\n gdFDCFont.widthHint = 250;\n gdFDCFont.horizontalIndent = 5;\n fdcFont.setLayoutData(gdFDCFont);\n fdcFont.addListener(this);\n }\n Composite cmpLabel = new Composite(cmpBasic, SWT.NONE);\n {\n GridLayout layout = new GridLayout(2, false);\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n cmpLabel.setLayout(layout);\n }\n btnLabelVisible = new Button(cmpLabel, SWT.CHECK);\n {\n btnLabelVisible.setText(Messages.getString(\"String_Node_Str\"));\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n btnLabelVisible.setLayoutData(gd);\n btnLabelVisible.addSelectionListener(this);\n btnLabelVisible.setSelection(getAxisForProcessing().getLabel().isVisible());\n }\n cbStaggered = new Button(cmpLabel, SWT.CHECK);\n {\n Axis ax = getAxisForProcessing();\n boolean bStaggered = ax.isSetStaggered() && ax.isStaggered();\n boolean bNot3D = !isChart3D();\n cbStaggered.setSelection(bNot3D && bStaggered);\n cbStaggered.setText(Messages.getString(\"String_Node_Str\"));\n cbStaggered.addSelectionListener(this);\n cbStaggered.setEnabled(bNot3D);\n }\n if (getChart().getDimension().getValue() != ChartDimension.THREE_DIMENSIONAL) {\n Label l = new Label(cmpBasic, SWT.NONE);\n l.setText(Messages.getString(\"String_Node_Str\"));\n FieldAssistHelper.getInstance().addRequiredFieldIndicator(l);\n Composite cmpEditorWithUnit = new Composite(cmpBasic, SWT.NONE);\n {\n GridData gd = new GridData();\n gd.widthHint = 250;\n cmpEditorWithUnit.setLayoutData(gd);\n GridLayout layout = new GridLayout(2, false);\n layout.marginWidth = 0;\n layout.marginHeight = 0;\n cmpEditorWithUnit.setLayout(layout);\n }\n lneLabelSpan = new LocalizedNumberEditorComposite(cmpEditorWithUnit, SWT.BORDER);\n new TextNumberEditorAssistField(lneLabelSpan.getTextControl(), null);\n {\n lneLabelSpan.setValue(getAxisForProcessing().getLabelSpan());\n lneLabelSpan.addModifyListener(this);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.horizontalIndent = 5;\n lneLabelSpan.setLayoutData(gd);\n lneLabelSpan.setEnabled(getAxisForProcessing().isSetLabelSpan());\n }\n new Label(cmpEditorWithUnit, SWT.NONE).setText(Messages.getString(\"String_Node_Str\"));\n btnFixLabelSpan = new Button(cmpBasic, SWT.CHECK);\n {\n btnFixLabelSpan.setText(Messages.getString(\"String_Node_Str\"));\n btnFixLabelSpan.addSelectionListener(this);\n btnFixLabelSpan.setSelection(getAxisForProcessing().isSetLabelSpan());\n }\n }\n createButtonGroup(cmpContent);\n setStateOfTitle();\n setStateOfLabel();\n}\n"
|
"public void run() {\n String sql = \"String_Node_Str\";\n List<String> args = new ArrayList<String>();\n if (dateFrom != null)\n args.add(\"String_Node_Str\" + dateFrom + \"String_Node_Str\");\n if (dateTo != null)\n args.add(\"String_Node_Str\" + dateTo + \"String_Node_Str\");\n if (players != null) {\n for (int i = 0; i < players.length; i++) players[i] = \"String_Node_Str\" + players[i].toLowerCase() + \"String_Node_Str\";\n args.add(\"String_Node_Str\" + Util.join(Arrays.asList(players), \"String_Node_Str\") + \"String_Node_Str\");\n }\n if (actions.size() == 0) {\n actions = new ArrayList<Integer>();\n for (DataType type : DataType.values()) actions.add(type.getId());\n }\n List<Integer> acs = new ArrayList<Integer>();\n for (int act : actions.toArray(new Integer[actions.size()])) if (Permission.searchType(sender, DataType.fromId(act).getConfigName()))\n acs.add(act);\n args.add(\"String_Node_Str\" + Util.join(acs, \"String_Node_Str\") + \"String_Node_Str\");\n if (loc != null) {\n int range = 5;\n if (radius != null)\n range = radius;\n args.add(\"String_Node_Str\" + (loc.getX() - range) + \"String_Node_Str\" + (loc.getX() + range) + \"String_Node_Str\");\n args.add(\"String_Node_Str\" + (loc.getY() - range) + \"String_Node_Str\" + (loc.getY() + range) + \"String_Node_Str\");\n args.add(\"String_Node_Str\" + (loc.getZ() - range) + \"String_Node_Str\" + (loc.getZ() + range) + \"String_Node_Str\");\n }\n if (worlds != null) {\n for (int i = 0; i < worlds.length; i++) worlds[i] = \"String_Node_Str\" + worlds[i].toLowerCase() + \"String_Node_Str\";\n args.add(\"String_Node_Str\" + Util.join(Arrays.asList(worlds), \"String_Node_Str\") + \"String_Node_Str\");\n }\n if (filters != null) {\n for (int i = 0; i < filters.length; i++) filters[i] = \"String_Node_Str\" + filters[i] + \"String_Node_Str\";\n args.add(\"String_Node_Str\" + Util.join(Arrays.asList(filters), \"String_Node_Str\") + \"String_Node_Str\");\n }\n if (args.size() == 0)\n Util.sendMessage(sender, \"String_Node_Str\");\n sql += Util.join(args, \"String_Node_Str\");\n List<SqlRow> results = DataManager.db.createSqlQuery(sql).findList();\n if (results == null || results.size() == 0)\n Util.sendMessage(sender, \"String_Node_Str\");\n DataManager.searchResults.put(sender, results);\n DataManager.displayPage(sender, 1);\n}\n"
|
"public void KKTFactorAndSolve(VectorNd vel, VectorNd fpar, VectorNd bf, VectorNd btmp, VectorNd vel0, double h, double a0, double a1, double a2, double a3) {\n updateStateSizes();\n int velSize = myActiveVelSize;\n boolean analyze = false;\n updateSolveMatrixStructure();\n if (myKKTSolveMatrixVersion != mySolveMatrixVersion) {\n myKKTSolveMatrixVersion = mySolveMatrixVersion;\n analyze = true;\n }\n SparseNumberedBlockMatrix S = mySolveMatrix;\n S.setZero();\n myC.setSize(S.rowSize());\n myC.setZero();\n mySys.addVelJacobian(S, myC, a0);\n if (useFictitousJacobianForces) {\n bf.scaledAdd(-a0, myC);\n if (fpar != null && myParametricVelSize > 0) {\n setSubVector(fpar, myC, velSize, myParametricVelSize);\n }\n }\n if (vel0 != null) {\n double alpha = a2 / a0 - a3 / a1;\n S.mul(btmp, vel0, velSize, velSize);\n bf.scaledAdd(alpha, btmp);\n }\n myC.setZero();\n mySys.addPosJacobian(S, myC, a1);\n if (useFictitousJacobianForces) {\n bf.scaledAdd(-a0, myC);\n if (fpar != null && myParametricVelSize > 0) {\n addSubVector(fpar, myC, velSize, myParametricVelSize);\n }\n }\n if (vel0 != null && a3 != 0) {\n double beta = a3 / a1;\n S.mul(btmp, vel0, velSize, velSize);\n bf.scaledAdd(beta, btmp);\n }\n addActiveMassMatrix(mySys, S);\n if (velSize > 0 && myParametricVelSize > 0) {\n S.mulTranspose(btmp, myUpar, 0, velSize, velSize, myParametricVelSize);\n bf.sub(btmp);\n }\n if (myKKTSolver == null) {\n myKKTSolver = new KKTSolver();\n }\n updateBilateralConstraints();\n if (myKKTGTVersion != myGTVersion) {\n analyze = true;\n myKKTGTVersion = myGTVersion;\n }\n if (myGsize > 0 && myParametricVelSize > 0) {\n myGT.mulTranspose(myBg, myUpar, 0, myGsize, velSize, myParametricVelSize);\n myBg.negate();\n } else {\n myBg.setZero();\n }\n setBilateralOffsets(h, -a0);\n updateUnilateralConstraints();\n if (myNsize > 0 && myParametricVelSize > 0) {\n myNT.mulTranspose(myBn, myUpar, 0, myNsize, velSize, myParametricVelSize);\n myBn.negate();\n } else {\n myBn.setZero();\n }\n setUnilateralOffsets(h, -a0);\n mySys.getBilateralImpulses(myLam);\n mySys.getUnilateralImpulses(myThe);\n if (!solveModePrinted) {\n String msg = (myHybridSolveP ? \"String_Node_Str\" : \"String_Node_Str\");\n if (mySys.getSolveMatrixType() == Matrix.INDEFINITE) {\n msg += \"String_Node_Str\";\n } else {\n msg += \"String_Node_Str\";\n }\n System.out.println(msg);\n solveModePrinted = true;\n }\n if (crsWriter == null && crsFileName != null) {\n try {\n crsWriter = ArtisynthIO.newIndentingPrintWriter(crsFileName);\n } catch (Exception e) {\n crsFileName = null;\n }\n }\n if (velSize != 0) {\n if (vel0 != null) {\n vel.set(vel0);\n }\n if (analyze) {\n myKKTSolver.analyze(S, velSize, myGT, myRg, mySys.getSolveMatrixType());\n }\n if (myHybridSolveP && !analyze && myNT.colSize() == 0) {\n if (profileKKTSolveTime) {\n timerStart();\n }\n myKKTSolver.factorAndSolve(S, velSize, myGT, myRg, vel, myLam, bf, myBg, myHybridSolveTol);\n if (profileKKTSolveTime) {\n timerStop(\"String_Node_Str\");\n }\n } else {\n if (profileKKTSolveTime) {\n timerStart();\n }\n myKKTSolver.factor(S, velSize, myGT, myRg, myNT, myRn);\n myKKTSolver.solve(vel, myLam, myThe, bf, myBg, myBn);\n if (profileKKTSolveTime) {\n timerStop(\"String_Node_Str\");\n }\n }\n if (computeKKTResidual) {\n double res = myKKTSolver.residual(S, velSize, myGT, myRg, myNT, myRn, vel, myLam, myThe, bf, myBg, myBn);\n System.out.println(\"String_Node_Str\" + velSize + \"String_Node_Str\" + myGT.colSize() + \"String_Node_Str\" + myNT.colSize() + \"String_Node_Str\" + res);\n }\n if (crsWriter != null) {\n String msg = \"String_Node_Str\" + velSize + \"String_Node_Str\" + myGT.colSize() + \"String_Node_Str\" + myNT.colSize() + (analyze ? \"String_Node_Str\" : \"String_Node_Str\");\n System.out.println(msg);\n try {\n crsWriter.println(msg);\n myKKTSolver.printLinearProblem(crsWriter, bf, myBg, \"String_Node_Str\", crsOmitDiag);\n } catch (Exception e) {\n e.printStackTrace();\n crsWriter = null;\n crsFileName = null;\n }\n }\n }\n mySys.setBilateralImpulses(myLam, h);\n mySys.setUnilateralImpulses(myThe, h);\n if (myUpdateForcesAtStepEnd) {\n if (myGsize > 0) {\n myGT.mulAdd(myFcon, myLam, velSize, myGsize);\n }\n if (myNsize > 0) {\n myNT.mulAdd(myFcon, myThe, velSize, myNsize);\n }\n }\n if (myLogWriter != null) {\n try {\n NumberFormat fmt = new NumberFormat(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\" + velSize + \"String_Node_Str\" + velSize + \"String_Node_Str\");\n S.write(myLogWriter, fmt, Matrix.WriteFormat.SYMMETRIC_CRS, velSize, velSize);\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\" + velSize + \"String_Node_Str\" + myGT.colSize() + \"String_Node_Str\");\n myGT.write(myLogWriter, fmt, Matrix.WriteFormat.CRS, velSize, myGT.colSize());\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\" + velSize + \"String_Node_Str\" + myNT.colSize() + \"String_Node_Str\");\n myNT.write(myLogWriter, fmt, Matrix.WriteFormat.CRS, velSize, myNT.colSize());\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\");\n bf.write(myLogWriter, fmt);\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\");\n myBg.write(myLogWriter, fmt);\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\");\n myBn.write(myLogWriter, fmt);\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\");\n vel.write(myLogWriter, fmt);\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\");\n myLam.write(myLogWriter, fmt);\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\");\n myThe.write(myLogWriter, fmt);\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.println(\"String_Node_Str\");\n myLogWriter.flush();\n System.out.println(\"String_Node_Str\");\n } catch (IOException e) {\n e.printStackTrace();\n myLogWriter = null;\n }\n }\n}\n"
|
"public void onCreate(Bundle _savedInstanceState) {\n super.onCreate(_savedInstanceState);\n setContentView(R.layout.main);\n context = getApplicationContext();\n DisplayMetrics dm = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(dm);\n Options.getInstance().scaleConversion(dm.densityDpi);\n SoundManager.getInstance();\n SoundManager.initSounds(this);\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n setVolumeControlStream(AudioManager.STREAM_MUSIC);\n View storyButton = findViewById(R.id.button_story);\n storyButton.setOnClickListener(this);\n View survivalButton = findViewById(R.id.button_survival);\n survivalButton.setOnClickListener(this);\n View helpButton = findViewById(R.id.button_help);\n helpButton.setOnClickListener(this);\n View highscoresButton = findViewById(R.id.button_highscores);\n highscoresButton.setOnClickListener(this);\n View quitButton = findViewById(R.id.button_quit);\n quitButton.setOnClickListener(this);\n particleCheckBox = (CheckBox) findViewById(R.id.checkBoxParticle);\n particleCheckBox.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n if (((CheckBox) v).isChecked()) {\n Toast.makeText(MainActivity.this, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n Options.settings[0] = false;\n } else {\n Toast.makeText(MainActivity.this, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n musicCheckBox = (CheckBox) findViewById(R.id.checkBoxMusic);\n musicCheckBox.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n if (((CheckBox) v).isChecked()) {\n Toast.makeText(MainActivity.this, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n Options.settings[1] = false;\n } else {\n Toast.makeText(MainActivity.this, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n soundCheckBox = (CheckBox) findViewById(R.id.checkBoxSound);\n soundCheckBox.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n if (((CheckBox) v).isChecked()) {\n Toast.makeText(MainActivity.this, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(MainActivity.this, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n if (!settingsLoaded) {\n XmlReader reader = new XmlReader(getBaseContext());\n boolean[] settingsTemp = reader.readSettings();\n particleCheckBox.setChecked(settingsTemp[0]);\n musicCheckBox.setChecked(settingsTemp[1]);\n soundCheckBox.setChecked(settingsTemp[2]);\n settingsLoaded = true;\n }\n}\n"
|
"public static Dbms getDbms(String dbmsId) {\n if (dbmsId == null) {\n throw new IllegalArgumentException();\n }\n Dbms[] allDbmsArray = getAllDbmsArray();\n for (Dbms dbms : allDbmsArray) {\n if (dbmsId.equals(dbms.getId())) {\n return dbms;\n }\n }\n ExceptionHandler.log(Messages.getString(\"String_Node_Str\", dbmsId));\n return null;\n}\n"
|
"public void setResultPanel(Object result) {\n System.out.println(\"String_Node_Str\" + result + \"String_Node_Str\");\n if (resultPane instanceof JEditorPane) {\n if (result == null)\n result = \"String_Node_Str\";\n ((JEditorPane) resultPane).setText(result.toString());\n } else {\n JComponent newResultPane = null;\n if (result instanceof JComponent) {\n newResultPane = (JComponent) result;\n } else if (result instanceof Icon) {\n newResultPane = new JLabel((Icon) result);\n } else {\n newResultPane = createEditorPane(result == null ? \"String_Node_Str\" : result.toString());\n }\n if (newResultPane != null) {\n resultScrollPane.remove(resultPane);\n resultPane = newResultPane;\n System.out.println(\"String_Node_Str\");\n resultScrollPane.add(resultPane);\n }\n }\n if (this.isVisible()) {\n Debug.outln(\"String_Node_Str\");\n setVisible(false);\n setVisible(true);\n } else {\n System.out.println(\"String_Node_Str\");\n }\n}\n"
|
"public String getDefaultWebAppName(String appPrefix) {\n return appPrefix + '_' + randomPrefix + '_' + getDefaultWebAppProjectName();\n}\n"
|
"public final boolean sameBits(OffsetBitVector B) {\n if (this == B) {\n return true;\n }\n int wordDiff = wordDiff(offset, set.offset);\n int maxWord = Math.min(bits.length, set.bits.length - wordDiff);\n int i = 0;\n if (wordDiff < 0) {\n for (; i < -wordDiff; i++) {\n if (bits[i] != 0) {\n return false;\n }\n } else if (B.bits.length > bits.length) {\n for (int i = n; i < B.bits.length; i++) {\n if (B.bits[i] != 0)\n return false;\n }\n }\n for (int i = n - 1; i >= 0; ) {\n if (bits[i] != B.bits[i]) {\n return false;\n }\n i--;\n }\n return true;\n}\n"
|
"private int runQueryIntentServices() {\n Intent intent;\n try {\n intent = parseIntentAndUser();\n } catch (URISyntaxException e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n try {\n List<ResolveInfo> result = mInterface.queryIntentServices(intent, null, 0, mTargetUser).getList();\n PrintWriter pw = getOutPrintWriter();\n if (result == null || result.size() <= 0) {\n pw.println(\"String_Node_Str\");\n } else {\n if (!mComponents) {\n pw.print(result.size());\n pw.println(\"String_Node_Str\");\n result.get(i).dump(pr, \"String_Node_Str\");\n }\n }\n } catch (RemoteException e) {\n throw new RuntimeException(\"String_Node_Str\", e);\n }\n return 0;\n}\n"
|
"private synchronized void cacheNewRootObject(IRootObject rootObject) throws RepositoryException {\n Integer key = new Integer(rootObject.getID());\n if (rootObjectsById.containsKey(key)) {\n throw new RepositoryException(\"String_Node_Str\" + rootObjectsById + \"String_Node_Str\");\n }\n CacheRecord cacheRecord = new CacheRecord();\n cacheRecord.rootObjectMetaData = rootObject.getRootObjectMetaData();\n if (rootObject.getReleaseNumber() != 1) {\n throw new RepositoryException(\"String_Node_Str\" + rootObject.getReleaseNumber());\n }\n cacheRecord.rootObjects = new HashMap<Integer, IRootObject>();\n cacheRecord.rootObjects.put(new Integer(1), rootObject);\n rootObjectsById.put(key, cacheRecord);\n rootObjectsByName.put(new RootObjectKey(rootObject.getName(), rootObject.getTypeID()), cacheRecord);\n}\n"
|
"public void replaceVars(Map<String, Oparg> renames) {\n replaceVarsInBlocks(renames, false);\n ICUtil.replaceVarsInList(renames, waitVars, true);\n ICUtil.replaceVarsInList(renames, usedVariables, true);\n ICUtil.replaceVarsInList(renames, containersToRegister, true);\n}\n"
|
"private void loadMediaPackages(HashMap<SdInstallArgs, String> processCids, int[] uidArr, HashSet<String> removeCids) {\n ArrayList<String> pkgList = new ArrayList<String>();\n Set<SdInstallArgs> keys = processCids.keySet();\n boolean doGc = false;\n for (SdInstallArgs args : keys) {\n String codePath = processCids.get(args);\n if (DEBUG_SD_INSTALL)\n Log.i(TAG, \"String_Node_Str\" + args.cid);\n int retCode = PackageManager.INSTALL_FAILED_CONTAINER_ERROR;\n try {\n if (args.doPreInstall(PackageManager.INSTALL_SUCCEEDED) != PackageManager.INSTALL_SUCCEEDED) {\n Slog.e(TAG, \"String_Node_Str\" + args.cid + \"String_Node_Str\");\n continue;\n }\n if (codePath == null || !codePath.equals(args.getCodePath())) {\n Slog.e(TAG, \"String_Node_Str\" + args.cid + \"String_Node_Str\" + args.getCodePath() + \"String_Node_Str\" + codePath);\n continue;\n }\n int parseFlags = PackageParser.PARSE_CHATTY | PackageParser.PARSE_ON_SDCARD | mDefParseFlags;\n doGc = true;\n synchronized (mInstallLock) {\n final PackageParser.Package pkg = scanPackageLI(new File(codePath), parseFlags, 0);\n if (pkg != null) {\n synchronized (mPackages) {\n retCode = PackageManager.INSTALL_SUCCEEDED;\n pkgList.add(pkg.packageName);\n args.doPostInstall(PackageManager.INSTALL_SUCCEEDED);\n }\n } else {\n Slog.i(TAG, \"String_Node_Str\" + codePath + \"String_Node_Str\");\n }\n }\n } finally {\n if (retCode != PackageManager.INSTALL_SUCCEEDED) {\n removeCids.add(args.cid);\n }\n }\n }\n synchronized (mPackages) {\n final boolean regrantPermissions = mSettings.mExternalSdkPlatform != mSdkVersion;\n if (regrantPermissions)\n Slog.i(TAG, \"String_Node_Str\" + mSettings.mExternalSdkPlatform + \"String_Node_Str\" + mSdkVersion + \"String_Node_Str\");\n mSettings.mExternalSdkPlatform = mSdkVersion;\n updatePermissionsLP(null, null, true, regrantPermissions);\n mSettings.writeLP();\n }\n if (pkgList.size() > 0) {\n sendResourcesChangedBroadcast(true, pkgList, uidArr, null);\n }\n if (doGc) {\n Runtime.getRuntime().gc();\n }\n if (removeCids != null) {\n for (String cid : removeCids) {\n Log.w(TAG, \"String_Node_Str\" + cid + \"String_Node_Str\");\n }\n }\n}\n"
|
"private static double getDouble(Object o) throws BirtException {\n if (o == null)\n return Double.NaN;\n return DataTypeUtil.toDouble(o);\n}\n"
|
"public void drop(DropTargetEvent event) {\n DropTarget dropTarget = (DropTarget) event.getSource();\n Control control = dropTarget.getControl();\n XmlToSchemaDraggedData draggedData = XPathTransfer.getInstance().getDraggedData();\n List<TransferableXPathEntry> transferableEntryList = draggedData.getTransferableEntryList();\n ExtractionLoopWithMDMEditorView loopTableEditorView = linker.getLoopTableEditorView();\n ExtractionFieldsWithMDMEditorView mdmEditorView = linker.getFieldsTableEditorView();\n if (loopTableEditorView.isReadOnly()) {\n return;\n }\n List<ConceptTarget> fullSchemaTargetList = new ArrayList<ConceptTarget>(mdmEditorView.getModel().getBeansList());\n ExtendedTableModel<Concept> extendedTableModel = loopTableEditorView.getExtendedTableModel();\n Concept concept = extendedTableModel.getBeansList().get(0);\n if (linker.isLoopTable((Table) control)) {\n if (transferableEntryList.size() > 0) {\n String absoluteXPath = transferableEntryList.get(0).getAbsoluteXPath();\n TableViewerCreatorColumn xpathColumn = linker.getLoopTableEditorView().getXPathColumn();\n Display display = linker.getTree().getDisplay();\n Cursor cursor = new Cursor(display, SWT.CURSOR_WAIT);\n linker.getTree().getShell().setCursor(cursor);\n loopTableEditorView.getTableViewerCreator().setBeanValue(xpathColumn, concept, absoluteXPath, true);\n linker.getTree().getShell().setCursor(null);\n }\n } else {\n ExtractionFieldsWithMDMEditorView tableEditorView = linker.getFieldsTableEditorView();\n Integer startInsertAtThisIndex = TableUtils.getItemIndexWhereInsertFromPosition(fieldsTable, new Point(event.x, event.y));\n List<ConceptTarget> list = new ArrayList<ConceptTarget>(transferableEntryList.size());\n for (TransferableXPathEntry entry : transferableEntryList) {\n ArrayList<String> loopXpathNodes = linker.getLoopXpathNodes();\n if (loopXpathNodes.size() > 0) {\n String loopPath = loopXpathNodes.get(0);\n String relativeXPath = XPathPopulationUtil.populateColumnPath(loopPath, entry.getAbsoluteXPath());\n if (relativeXPath == null) {\n continue;\n }\n if (relativeXPath.startsWith(\"String_Node_Str\")) {\n relativeXPath = relativeXPath.substring(1);\n }\n if (relativeXPath.endsWith(\"String_Node_Str\")) {\n relativeXPath = relativeXPath.substring(0, relativeXPath.length() - 1);\n }\n if (relativeXPath.trim().equals(\"String_Node_Str\")) {\n relativeXPath = \"String_Node_Str\";\n }\n ConceptTarget newTargetEntry = linker.getNewSchemaTargetEntry(relativeXPath);\n String name = \"String_Node_Str\";\n if (\"String_Node_Str\".equals(relativeXPath)) {\n if (entry.getAbsoluteXPath() != null) {\n String[] split = entry.getAbsoluteXPath().split(\"String_Node_Str\");\n name = extractColumnName(extractTagName(split[split.length - 1]), fullSchemaTargetList);\n }\n } else {\n name = extractColumnName(extractTagName(relativeXPath), fullSchemaTargetList);\n }\n newTargetEntry.setTargetName(name);\n list.add(newTargetEntry);\n fullSchemaTargetList.add(newTargetEntry);\n }\n }\n tableEditorView.getTableViewerCreator().getTableViewer().refresh();\n loopTable.deselectAll();\n fieldsTable.deselectAll();\n linker.getTree().deselectAll();\n if (list.size() > 0) {\n ExtendedTableAddCommand addCommand = new ExtendedTableAddCommand(tableEditorView.getModel(), list, startInsertAtThisIndex);\n tableEditorView.getExtendedTableViewer().executeCommand(addCommand);\n }\n }\n linker.updateLinksStyleAndControlsSelection(control, true);\n}\n"
|
"public void changeToPreRunning() {\n if (state != State.DESTROYED && state != State.STARTED) {\n return;\n }\n log.fine(String.format(\"String_Node_Str\", id, configuration));\n state = State.PRE_RUNNING;\n}\n"
|
"protected boolean putIfAbsent(Data key, Object value, ExpiryPolicy expiryPolicy, String caller, boolean disableWriteThrough) {\n final ExpiryPolicy localExpiryPolicy = expiryPolicy != null ? expiryPolicy : defaultExpiryPolicy;\n final long now = Clock.currentTimeMillis();\n final long start = isStatisticsEnabled() ? System.nanoTime() : 0;\n boolean result;\n CacheRecord record = records.get(key);\n boolean isExpired = processExpiredEntry(key, record, now);\n if (record == null || isExpired) {\n result = createRecordWithExpiry(key, value, localExpiryPolicy, now, disableWriteThrough);\n } else {\n result = false;\n }\n if (result && isStatisticsEnabled()) {\n statistics.increaseCachePuts(1);\n statistics.addPutTimeNanos(System.nanoTime() - start);\n }\n return result;\n}\n"
|
"public static void main(String[] args) {\n String password = \"String_Node_Str\";\n String username = \"String_Node_Str\";\n System.out.println(Calendar.getInstance().getTime());\n GoogleSkyJamAPI api = new GoogleSkyJamAPI(new ApacheConnector(), new JSON(), new File(\"String_Node_Str\"));\n GoogleMusicAPI aa = new GoogleMusicAPI(new ApacheConnector(), new JSON(), new File(\"String_Node_Str\"));\n try {\n api.login(username, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n try {\n api.login(username, password);\n Playlists playlists = api.getAllPlaylists();\n if (playlists.getMagicPlaylists() != null) {\n for (Playlist list : playlists.getMagicPlaylists()) {\n System.out.println(\"String_Node_Str\" + list.getTitle() + \"String_Node_Str\" + list.getPlaylistId() + \"String_Node_Str\");\n for (Song song : list.getPlaylist()) {\n System.out.println(song.getName() + \"String_Node_Str\" + song.getArtist());\n }\n }\n }\n Collection<Track> tracks = api.getAllTracks();\n for (Track track : tracks) {\n System.out.println(track);\n if (track.getAlbumArtRef() != null && !track.getAlbumArtRef().isEmpty()) {\n File track_f = api.downloadTrack(track);\n populateFileWithTuneTags(track_f, track);\n }\n }\n for (Playlist list : playlists.getPlaylists()) {\n System.out.println(\"String_Node_Str\" + list.getTitle() + \"String_Node_Str\" + list.getPlaylistId() + \"String_Node_Str\");\n for (Song song : list.getPlaylist()) {\n System.out.println(song.getName() + \"String_Node_Str\" + song.getArtist());\n if (song.getAlbumArtUrl() != null) {\n File song_f = api.downloadSong(song);\n populateFileWithTuneTags(song_f, song);\n }\n }\n }\n Collection<Song> songs = api.getAllSongs();\n api.downloadSong(songs.iterator().next());\n } catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(Calendar.getInstance().getTime());\n}\n"
|
"public void run() {\n changeExecutionState(ExecutionState.REPLAYING, null);\n if (this.executionObserver.isCanceled()) {\n changeExecutionState(ExecutionState.CANCELED, null);\n return;\n }\n resetAllOutputBroker();\n try {\n replayCheckpoint();\n if (this.executionObserver.isCanceled()) {\n changeExecutionState(ExecutionState.CANCELED, null);\n return;\n }\n resetAllOutputBroker();\n try {\n replayCheckpoint();\n if (this.executionObserver.isCanceled()) {\n throw new InterruptedException();\n }\n } catch (Exception e) {\n if (isRestartRequested()) {\n continue;\n }\n if (this.executionObserver.isCanceled()) {\n changeExecutionState(ExecutionState.CANCELED, null);\n } else {\n changeExecutionState(ExecutionState.FAILED, StringUtils.stringifyException(e));\n }\n return;\n }\n if (isRestartRequested()) {\n continue;\n }\n break;\n }\n changeExecutionState(ExecutionState.FINISHING, null);\n try {\n waitForAllOutputBrokerToFinish();\n } catch (Exception e) {\n if (this.executionObserver.isCanceled()) {\n changeExecutionState(ExecutionState.CANCELED, null);\n } else {\n changeExecutionState(ExecutionState.FAILED, StringUtils.stringifyException(e));\n }\n return;\n }\n changeExecutionState(ExecutionState.FINISHED, null);\n}\n"
|
"public void buildCellStyle(ICellContent cell, StringBuffer styleBuffer, boolean isHead, boolean fixedCellHeight) {\n IStyle style = getElementStyle(cell);\n if (fixedReport) {\n HTMLEmitterUtil.buildOverflowStyle(styleBuffer, style, true);\n }\n IStyle cellMergedStyle = new CellMergedStyle(cell);\n if (null != style) {\n CSSValue display = style.getProperty(IStyle.STYLE_DISPLAY);\n if (IStyle.NONE_VALUE == display) {\n styleBuffer.append(\"String_Node_Str\");\n }\n }\n if (null != style) {\n AttributeBuilder.buildFont(styleBuffer, style);\n }\n AttributeBuilder.buildFont(styleBuffer, cellMergedStyle);\n if (isHead) {\n String fontWeight = null;\n if (null != style) {\n fontWeight = style.getFontWeight();\n }\n String mergedFontWeight = cellMergedStyle.getFontWeight();\n if (null == fontWeight && null == mergedFontWeight) {\n IStyle cellComputedStyle = cell.getComputedStyle();\n if (null != cellComputedStyle) {\n fontWeight = cellComputedStyle.getFontWeight();\n }\n if (fontWeight == null) {\n fontWeight = \"String_Node_Str\";\n }\n styleBuffer.append(\"String_Node_Str\");\n styleBuffer.append(fontWeight);\n styleBuffer.append(\"String_Node_Str\");\n }\n }\n if (null != style) {\n AttributeBuilder.buildMargins(styleBuffer, style);\n if (fixedCellHeight) {\n styleBuffer.append(\"String_Node_Str\");\n } else {\n AttributeBuilder.buildPaddings(styleBuffer, style);\n }\n }\n AttributeBuilder.buildMargins(styleBuffer, cellMergedStyle);\n if (fixedCellHeight) {\n styleBuffer.append(\"String_Node_Str\");\n } else {\n AttributeBuilder.buildPaddings(styleBuffer, cellMergedStyle);\n }\n buildCellBorder(cell, styleBuffer);\n if (null != style) {\n AttributeBuilder.buildBackground(styleBuffer, style, reportEmitter);\n AttributeBuilder.buildText(styleBuffer, style);\n AttributeBuilder.buildVisual(styleBuffer, style);\n }\n AttributeBuilder.buildBackground(styleBuffer, cellMergedStyle, reportEmitter);\n AttributeBuilder.buildText(styleBuffer, cellMergedStyle);\n AttributeBuilder.buildVisual(styleBuffer, cellMergedStyle);\n}\n"
|
"public void scaleMshotImageBasedOnScrollPos(int scrollPos) {\n if (mImageMshot == null) {\n return;\n }\n float scale = Math.max(0f, 0.9f + (-scrollPos * 0.008f));\n if (scale != mCurrentMshotScale) {\n float centerX = mMshotWidth * 0.5f;\n Matrix matrix = new Matrix();\n matrix.setScale(scale, scale, centerX, 0);\n mImageMshot.setImageMatrix(matrix);\n mCurrentMshotScale = scale;\n }\n float centerX = mMshotWidth * 0.5f;\n Matrix matrix = new Matrix();\n matrix.setScale(scale, scale, centerX, 0);\n mImageMshot.setImageMatrix(matrix);\n mPreviousMshotScale = scale;\n}\n"
|
"public static ExperimentResults runExperiment(ErrorEstimationMethod method, List<boolean[][]> functionOutputs, List<boolean[]> trueLabels, List<boolean[][]> evaluationFunctionOutputs, double alpha, double gamma) {\n double[][] errorRates = new double[functionOutputs.size()][];\n boolean[][] labels = new boolean[functionOutputs.size()][];\n int numberOfClusters = 1;\n double logLikelihood = 0;\n switch(method) {\n case BAYESIAN_COMBINATION_OF_CLASSIFIERS:\n BayesianCombinationOfClassifiers bcc = new BayesianCombinationOfClassifiers(functionOutputs, 4000, 10, 200, alpha);\n bcc.runGibbsSampler();\n errorRates = bcc.getErrorRatesMeans();\n logLikelihood = bcc.logLikelihood(evaluationFunctionOutputs);\n double[][] labelMeansBcc = bcc.getLabelMeans();\n for (int p = 0; p < functionOutputs.size(); p++) {\n labels[p] = new boolean[functionOutputs.get(p).length];\n for (int i = 0; i < functionOutputs.get(p).length; i++) {\n labels[p][i] = labelMeansBcc[p][i] >= 0.5;\n }\n }\n break;\n case AR_2:\n for (int p = 0; p < functionOutputs.size(); p++) {\n int numberOfFunctions = functionOutputs.get(p)[0].length;\n ErrorEstimationData errorEstimationData = new ErrorEstimationData.Builder(Arrays.asList(functionOutputs.get(p)), 2, true).build();\n ErrorEstimation errorEstimation = new ErrorEstimation.Builder(errorEstimationData).optimizationSolverType(ErrorEstimationInternalSolver.IP_OPT).build();\n double[] allErrorRates = errorEstimation.solve().getErrorRates().array;\n errorRates[p] = new double[numberOfFunctions];\n System.arraycopy(allErrorRates, 0, errorRates[p], 0, numberOfFunctions);\n labels[p] = new boolean[functionOutputs.get(p).length];\n for (int i = 0; i < functionOutputs.get(p).length; i++) {\n double labelsSum = 0;\n double errorRatesSum = 0;\n for (int j = 0; j < functionOutputs.get(p)[i].length; j++) {\n labelsSum += (1 - errorRates[p][j]) * (functionOutputs.get(p)[i][j] ? 1 : 0);\n errorRatesSum += (1 - errorRates[p][j]);\n }\n labels[p][i] = labelsSum / errorRatesSum >= 0.5;\n }\n }\n break;\n case AR_N:\n for (int p = 0; p < functionOutputs.size(); p++) {\n int numberOfFunctions = functionOutputs.get(p)[0].length;\n ErrorEstimationData errorEstimationData = new ErrorEstimationData.Builder(Arrays.asList(functionOutputs.get(p)), functionOutputs.get(0)[0].length, true).build();\n ErrorEstimation errorEstimation = new ErrorEstimation.Builder(errorEstimationData).optimizationSolverType(ErrorEstimationInternalSolver.IP_OPT).build();\n double[] allErrorRates = errorEstimation.solve().getErrorRates().array;\n errorRates[p] = new double[numberOfFunctions];\n System.arraycopy(allErrorRates, 0, errorRates[p], 0, numberOfFunctions);\n labels[p] = new boolean[functionOutputs.get(p).length];\n for (int i = 0; i < functionOutputs.get(p).length; i++) {\n double labelsSum = 0;\n double errorRatesSum = 0;\n for (int j = 0; j < functionOutputs.get(p)[i].length; j++) {\n labelsSum += (1 - errorRates[p][j]) * (functionOutputs.get(p)[i][j] ? 1 : 0);\n errorRatesSum += (1 - errorRates[p][j]);\n }\n labels[p][i] = labelsSum / errorRatesSum >= 0.5;\n }\n }\n break;\n case ERROR_ESTIMATION_GM:\n ErrorEstimationGraphicalModel eesgm = new ErrorEstimationGraphicalModel(functionOutputs, 4000, 10, 200);\n eesgm.runGibbsSampler();\n errorRates = eesgm.getErrorRatesMeans();\n double[][] labelMeansEesgm = eesgm.getLabelMeans();\n for (int p = 0; p < functionOutputs.size(); p++) {\n labels[p] = new boolean[functionOutputs.get(p).length];\n for (int i = 0; i < functionOutputs.get(p).length; i++) {\n labels[p][i] = labelMeansEesgm[p][i] >= 0.5;\n }\n }\n break;\n case COUPLED_ERROR_ESTIMATION_GM:\n CoupledErrorEstimationGraphicalModel eedfdpgm = new CoupledErrorEstimationGraphicalModel(functionOutputs, 5000, 10, alpha);\n eedfdpgm.performGibbsSampling();\n errorRates = eedfdpgm.getErrorRatesMeans();\n logLikelihood = eedfdpgm.logLikelihood(evaluationFunctionOutputs);\n double[][] labelMeansEedfdpgm = eedfdpgm.getLabelMeans();\n for (int p = 0; p < functionOutputs.size(); p++) {\n labels[p] = new boolean[functionOutputs.get(p).length];\n for (int i = 0; i < functionOutputs.get(p).length; i++) {\n labels[p][i] = labelMeansEedfdpgm[p][i] >= 0.5;\n }\n }\n break;\n case HIERARCHICAL_COUPLED_ERROR_ESTIMATION_GM:\n ErrorEstimationDomainsHDPNew eedfhdp = new ErrorEstimationDomainsHDPNew(functionOutputs, alpha, gamma);\n eedfhdp.run_gibbs_collapsed(3000);\n eedfhdp.run_gibbs_uncollapsed(1000, 10, 200);\n errorRates = eedfhdp.rates_to_return;\n double[][] labelMeansEedfhdpmgm = eedfhdp.labels_to_return;\n int[][] li_cnt = new int[functionOutputs.size()][2];\n for (int p = 0; p < functionOutputs.size(); p++) {\n labels[p] = new boolean[functionOutputs.get(p).length];\n for (int i = 0; i < functionOutputs.get(p).length; i++) {\n labels[p][i] = labelMeansEedfhdpmgm[p][i] >= 0.5;\n int lid = labelMeansEedfhdpmgm[p][i] >= 0.5 ? 1 : 0;\n li_cnt[p][lid]++;\n }\n }\n logLikelihood = eedfhdp.get_log_likelihood(evaluationFunctionOutputs, alpha, gamma, 1000, li_cnt);\n break;\n }\n double[] errorRatesMAD = new double[functionOutputs.size()];\n double errorRatesMADMean = 0;\n double[] labelsErrorRate = new double[functionOutputs.size()];\n double labelsErrorRateMean = 0;\n for (int p = 0; p < functionOutputs.size(); p++) {\n labelsErrorRate[p] = 0;\n double[] realErrorRates = new double[errorRates[p].length];\n for (int i = 0; i < trueLabels.get(p).length; i++) {\n labelsErrorRate[p] += (labels[p][i] != trueLabels.get(p)[i]) ? 1 : 0;\n for (int j = 0; j < errorRates[p].length; j++) realErrorRates[j] += (functionOutputs.get(p)[i][j] != trueLabels.get(p)[i]) ? 1 : 0;\n }\n labelsErrorRate[p] /= trueLabels.get(p).length;\n labelsErrorRateMean += labelsErrorRate[p];\n errorRatesMAD[p] = 0;\n for (int j = 0; j < errorRates[p].length; j++) {\n realErrorRates[j] /= trueLabels.get(p).length;\n errorRatesMAD[p] += Math.abs(errorRates[p][j] - realErrorRates[j]);\n }\n errorRatesMAD[p] /= errorRates[p].length;\n errorRatesMADMean += errorRatesMAD[p];\n }\n errorRatesMADMean /= functionOutputs.size();\n labelsErrorRateMean /= functionOutputs.size();\n return new ExperimentResults(errorRates, errorRatesMADMean, labelsErrorRateMean, logLikelihood);\n}\n"
|
"public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = (prime * result) + connectionSetupTime;\n result = (prime * result) + ((name == null) ? 0 : name.hashCode());\n result = (prime * result) + timoutInSeconds;\n result = (prime * result) + ((version == null) ? 0 : version.hashCode());\n return result;\n}\n"
|
"public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {\n super.onReceivedError(view, errorCode, description, failingUrl);\n if (getActivity() != null)\n onTaskError(ErrorActivity.createErrorIntent(getActivity(), 0, description, false, null));\n}\n"
|
"public String getMeasureAlias(final int i) {\n Util.assertTrue(i == 0);\n return columnNames.get(columnNames.size() - 1);\n}\n"
|
"private boolean exists() {\n if ((vsid == null) || (httpService == null))\n return false;\n List<VirtualServer> list = httpService.getVirtualServer();\n for (VirtualServer vs : list) {\n String currId = vs.getId();\n if (currId != null && currId.equals(vsid))\n return true;\n }\n return false;\n}\n"
|
"protected MathTransform initialValue() {\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n try {\n final String googleWebMercatorCode = \"String_Node_Str\";\n final String cartesianCode = \"String_Node_Str\";\n final CRSAuthorityFactory crsAuthorityFactory = CRS.getAuthorityFactory(true);\n final CoordinateReferenceSystem mapCRS = crsAuthorityFactory.createCoordinateReferenceSystem(googleWebMercatorCode);\n final CoordinateReferenceSystem dataCRS = crsAuthorityFactory.createCoordinateReferenceSystem(cartesianCode);\n final boolean lenient = true;\n final MathTransform transform = CRS.findMathTransform(mapCRS, dataCRS, lenient);\n return new GeoSetup(mapCRS, dataCRS, transform);\n } catch (final Exception e) {\n e.printStackTrace();\n }\n return null;\n}\n"
|
"public void widgetDefaultSelected(SelectionEvent e) {\n if (getSelection() instanceof StructuredSelection) {\n List list = new ArrayList();\n Object selectedObject = ((StructuredSelection) getSelection()).getFirstElement();\n list.add(selectedObject);\n ReportRequest r = new ReportRequest();\n r.setType(ReportRequest.OPEN_EDITOR);\n r.setRequestConvert(new IRequestConvert() {\n public List convertSelectionToModelLisr(List list) {\n List lst = new ArrayList();\n for (Iterator itr = list.iterator(); itr.hasNext(); ) {\n Object obj = itr.next();\n lst.add(obj);\n }\n return lst;\n }\n });\n r.setSelectionObject(list);\n SessionHandleAdapter.getInstance().getMediator().notifyRequest(r);\n }\n}\n"
|
"public boolean applies(GameEvent event, Ability source, Game game) {\n Player blockController = game.getPlayer(source.getControllerId());\n if (blockController != null) {\n return true;\n }\n return false;\n}\n"
|
"public void update(TimeStep timeStep) {\n super.update(timeStep);\n alpha.update(timeStep);\n ease.update(timeStep);\n double dt = timeStep.asFraction();\n int newX = (int) Math.round(pos.x + vel.x * speed * dt);\n int newY = (int) Math.round(pos.y + vel.y * speed * dt);\n speed = getRandom().nextInt(maxSpeed);\n setPos(newX, newY);\n}\n"
|
"public void validateVoForCreation(EntityManager entityManager, CommentVo commentVo) throws MultipleMessagesException, DataBaseException {\n MultipleMessagesException multipleMessageException = new MultipleMessagesException();\n if (commentVo == null) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n throw multipleMessageException;\n }\n if (commentVo.getContent() == null) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n } else {\n commentVo.setContent(SecurityHelper.sanitizeHTML(commentVo.getContent()));\n if (commentVo.getContent().length() < 1 || commentVo.getContent().length() > MAX_COMMENT_LENGTH) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n }\n }\n if (commentVo.getCourseId() == null) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n } else if (getDaoFactory().getCourseDao().read(entityManager, commentVo.getCourseId()) == null) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n }\n if (commentVo.getDate() == null) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n }\n if (commentVo.getUserId() == null) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n } else if (getDaoFactory().getUserDao().read(entityManager, commentVo.getUserId()) == null) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n }\n if (commentVo.getRating() == null) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n } else if (commentVo.getRating() < 0.0F || commentVo.getRating() > 5.0F) {\n multipleMessageException.addMessage(\"String_Node_Str\");\n }\n if (!multipleMessageException.getMessages().isEmpty()) {\n throw multipleMessageException;\n }\n}\n"
|
"public static void main(String[] args) {\n String metaF = \"String_Node_Str\";\n GeoCoding gc;\n try {\n gc = new S1GeoCodingImpl(metaF);\n double lat = -27.49984;\n double lon = 30.69116;\n double pixel = 370.5;\n double line = 16482.2;\n double[] r;\n try {\n r = gc.pixelFromGeo(55.55, -21.12);\n System.out.println(\"String_Node_Str\" + r[1] + \"String_Node_Str\" + r[0]);\n r = gc.geoFromPixel(2907.080, 19312.507);\n System.out.println(\"String_Node_Str\" + r[1] + \"String_Node_Str\" + r[0]);\n } catch (GeoLocationException e) {\n e.printStackTrace();\n }\n } catch (MathException e1) {\n e1.printStackTrace();\n }\n}\n"
|
"public void increaseRank() {\n if (hasValidRank()) {\n curRank++;\n }\n}\n"
|
"public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory, IProgressMonitor monitor) {\n return execute(commandPath, args, env, changeToDirectory, monitor, null);\n}\n"
|
"public void createTestArtifact() throws OseeCoreException {\n testTopBranch = BranchManager.createTopLevelBranch(\"String_Node_Str\");\n testWorkingBranch = BranchManager.createWorkingBranch(CoverageTestUtil.getTestBranch(), \"String_Node_Str\");\n readOnlyTestUnitNames = ArtifactQuery.getOrCreate(ArtifactTestUnitStore.READ_ONLY_GUID, null, CoreArtifactTypes.GeneralData, testTopBranch);\n readOnlyTestUnitNames.setSoleAttributeFromString(CoreAttributeTypes.GeneralStringData, testInputDataReadOnlyList);\n}\n"
|
"public boolean isAttacked(UUID defenderId, Game game) {\n for (CombatGroup group : groups) {\n if (group.getDefenderId().equals(defenderId)) {\n return true;\n if (group.defenderIsPlaneswalker) {\n Permanent permanent = game.getPermanent(group.getDefenderId());\n if (permanent.getControllerId().equals(defenderId))\n return true;\n }\n }\n return false;\n}\n"
|
"public Result getUploadsForStudy(String studyId, String startTimeString, String endTimeString) throws EntityNotFoundException {\n getAuthenticatedSession(WORKER);\n DateTime startTime = DateUtils.getDateTimeOrDefault(startTimeString, null);\n DateTime endTime = DateUtils.getDateTimeOrDefault(endTimeString, null);\n StudyIdentifier studyId = new StudyIdentifierImpl(studyIdString);\n DateTimeRangeResourceList<? extends UploadView> uploads = uploadService.getStudyUploads(studyId, startTime, endTime);\n return okResult(uploads);\n}\n"
|
"public void testExtractDisplayId1() {\n String extractedDisplayId = extractDisplayId(uri1);\n assertEquals(uri1toplevelDisplayId, extractedDisplayId);\n}\n"
|
"public void testGeneric() throws TransformException {\n final MathTransform first = null;\n final AffineTransform2D second = new AffineTransform2D(0.5, 0, 0, 0.25, 0, 0);\n transform = new ConcatenatedTransform(first, second);\n isInverseTransformSupported = false;\n validate();\n final double[] source = generateRandomCoordinates(CoordinateDomain.PROJECTED, 0);\n final double[] target = new double[source.length / 2];\n first.transform(source, 0, target, 0, target.length / 2);\n second.transform(target, 0, target, 0, target.length / 2);\n verifyTransform(source, target);\n transform = ConcatenatedTransform.create(first, second);\n assertInstanceOf(\"String_Node_Str\", ProjectiveTransform.class, transform);\n validate();\n verifyTransform(source, target);\n}\n"
|
"public void receive(Event[] events) {\n EventPrinter.print(events);\n for (Event event : events) {\n if (event.isExpired()) {\n removeEventCount++;\n Assert.assertEquals(\"String_Node_Str\", removeEventCount, event.getData(2));\n if (removeEventCount == 1) {\n Assert.assertEquals(\"String_Node_Str\", length, inEventCount);\n }\n } else {\n inEventCount++;\n Assert.fail(\"String_Node_Str\");\n }\n }\n Assert.assertEquals(\"String_Node_Str\", inEventCount - length, removeEventCount);\n eventArrived = true;\n}\n"
|
"public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n if (XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {\n this.c_id = atts.getValue(\"String_Node_Str\", HREF_ATTRIBUTE_NAME);\n } else {\n XMLReader xmlReader = record.getXMLReader();\n xmlReader.setContentHandler(record);\n xmlReader.setLexicalHandler(record);\n record.startElement(namespaceURI, localName, qName, atts);\n }\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n MageObject sourceObject = game.getObject(source.getSourceId());\n if (controller != null && sourceObject != null) {\n for (UUID playerId : controller.getInRange()) {\n Player player = game.getPlayer(playerId);\n if (player != null) {\n for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {\n card.moveToExile(source.getSourceId(), \"String_Node_Str\", source.getSourceId(), game);\n }\n }\n }\n for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {\n permanent.sacrifice(source.getSourceId(), game);\n }\n for (Card card : game.getState().getExile().getExileZone(source.getSourceId()).getCards(game)) {\n card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), card.getOwnerId());\n }\n return true;\n }\n return false;\n}\n"
|
"private ResponsePacket readSimpleResponsePacket(InputStream inputStream) throws ProtocolException, IOException {\n byte[] payload = IOUtils.read(inputStream, 50, 3000);\n ChannelBuffer cb = ChannelBuffers.wrappedBuffer(payload);\n short packetType = cb.readShort();\n ResponsePacket packet = ResponsePacket.readBuffer(packetType, cb);\n return packet;\n}\n"
|
"public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {\n ResponseWriter writer = facesContext.getResponseWriter();\n Draggable draggable;\n if (component instanceof Draggable) {\n draggable = (Draggable) component;\n } else {\n throw new FacesException(\"String_Node_Str\" + component.getId());\n }\n String target = findTarget(facesContext, draggable);\n writer.startElement(\"String_Node_Str\", draggable);\n writer.writeAttribute(\"String_Node_Str\", \"String_Node_Str\", null);\n writer.write(\"String_Node_Str\" + target + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + draggable.getCursor() + \"String_Node_Str\");\n if (draggable.isDisabled()) {\n writer.write(\"String_Node_Str\");\n }\n if (draggable.getAxis() != null) {\n writer.write(\"String_Node_Str\" + draggable.getAxis() + \"String_Node_Str\");\n }\n if (draggable.getContainment() != null) {\n writer.write(\"String_Node_Str\" + draggable.getContainment() + \"String_Node_Str\");\n }\n if (draggable.getHelper() != null) {\n writer.write(\"String_Node_Str\" + draggable.getHelper() + \"String_Node_Str\");\n }\n if (draggable.getRevert() != null) {\n final String revert = draggable.getRevert();\n writer.write(\"String_Node_Str\" + ((\"String_Node_Str\".equalsIgnoreCase(revert) || \"String_Node_Str\".equals(revert)) ? revert : \"String_Node_Str\" + revert + \"String_Node_Str\"));\n }\n if (draggable.getZindex() != -1) {\n writer.write(\"String_Node_Str\" + draggable.getZindex());\n }\n if (draggable.getHandle() != null) {\n writer.write(\"String_Node_Str\" + draggable.getHandle() + \"String_Node_Str\");\n }\n if (draggable.getOpacity() != 1.0) {\n writer.write(\"String_Node_Str\" + draggable.getOpacity());\n }\n if (draggable.getRevertDuration() != null) {\n writer.write(\"String_Node_Str\" + draggable.getRevertDuration());\n }\n if (draggable.getStack() != null) {\n writer.write(\"String_Node_Str\" + draggable.getStack() + \"String_Node_Str\");\n }\n if (draggable.getGrid() != null) {\n writer.write(\"String_Node_Str\" + draggable.getGrid() + \"String_Node_Str\");\n }\n if (draggable.getScope() != null) {\n writer.write(\"String_Node_Str\" + draggable.getScope() + \"String_Node_Str\");\n }\n if (draggable.isSnap()) {\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + draggable.getSnapTolerance());\n if (draggable.getSnapMode() != null)\n writer.write(\"String_Node_Str\" + draggable.getSnapMode() + \"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n writer.endElement(\"String_Node_Str\");\n}\n"
|
"public Method run() {\n Class<?> foundClass = subject;\n Method method = null;\n for (foundClass = subject; method == null; foundClass = foundClass.getSuperclass()) {\n try {\n if (foundClass == null) {\n return null;\n }\n method = foundClass.getDeclaredMethod(name);\n } catch (NoSuchMethodException e) {\n continue;\n }\n }\n final int modifiers = method.getModifiers();\n if ((modifiers & Modifier.STATIC) != 0) {\n return null;\n } else if ((modifiers & Modifier.ABSTRACT) != 0) {\n return null;\n } else if ((modifiers & Modifier.PRIVATE) != 0 && foundClass != subject) {\n return null;\n } else if ((modifiers & (Modifier.PROTECTED | Modifier.PUBLIC)) != 0 || isSamePackage(foundClass, subject)) {\n method.setAccessible(true);\n return method;\n } else {\n return null;\n }\n}\n"
|
"public <T> T call(Callable<T> callable, CallArgs args) throws Exception {\n MDC.put(Constants.MDC_STAGE_KEY, stageName);\n try {\n return delegate.call(callable);\n } finally {\n MDC.remove(Constants.MDC_STAGE_KEY);\n }\n}\n"
|
"private void updatePanel(int top) {\n boolean chart3d = false;\n if (mnuPie3d.isSelected() || mnuBar3d.isSelected()) {\n chart3d = true;\n }\n chartData.setTop(top);\n updateChartEvents(chart3d);\n reloadTable();\n updateTextArea();\n}\n"
|
"boolean okToShowLocked(ActivityRecord r) {\n return isCurrentProfileLocked(r.userId) || (r.info.flags & FLAG_SHOW_ON_LOCK_SCREEN) != 0;\n}\n"
|
"private Long getHashRate() {\n HttpRequestFactory requestFactory = new NetHttpTransport().createRequestFactory(new HttpRequestInitializer() {\n public void initialize(HttpRequest request) {\n request.setParser(new JsonObjectParser(new JacksonFactory()));\n }\n });\n try {\n HttpRequest request = requestFactory.buildGetRequest(new GenericUrl(HASHRATE_INFO_API_URL));\n HttpResponse response = request.execute();\n InputStream inputStream = response.getContent();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n IOUtils.copy(inputStream, baos, true);\n return Long.parseLong(baos.toString().replace(\"String_Node_Str\", \"String_Node_Str\"));\n } catch (Exception ignored) {\n }\n return null;\n}\n"
|
"public static void refresh() {\n FMLCommonHandler.instance().getMinecraftServerInstance().addScheduledTask(EnchanterRecipeCategory::refresh);\n}\n"
|
"private void handleCell(CrosstabCellHandle cell, String emptyVlaue) throws BirtException {\n if (cell == null) {\n return;\n }\n if (handler != null) {\n ICrosstabCell cellItem = new CrosstabCellImpl(cell);\n handler.callFunction(CrosstabScriptHandler.ON_PREPARE_CELL, cellItem, context);\n }\n for (Iterator itr = cell.getContents().iterator(); itr.hasNext(); ) {\n ReportElementHandle handle = (ReportElementHandle) itr.next();\n context.prepare(handle);\n if (handle instanceof DataItemHandle) {\n DataItemHandle dataHandle = (DataItemHandle) handle;\n PropertyHandle mapHandle = dataHandle.getPropertyHandle(StyleHandle.MAP_RULES_PROP);\n ArrayList<MapRule> rules = mapHandle.getListValue();\n if (rules != null) {\n List<MapRule> removeList = new ArrayList<MapRule>();\n for (MapRule rl : rules) {\n if (rl.getTestExpression() != null && rl.getTestExpression().startsWith(AUTO_EMPTY_VALUE_EXPR_PREFIX)) {\n removeList.add(rl);\n }\n }\n if (removeList.size() > 0) {\n mapHandle.removeItems(removeList);\n }\n }\n MapRule rule = StructureFactory.createMapRule();\n rule.setTestExpression(AUTO_EMPTY_VALUE_EXPR_PREFIX + ExpressionUtil.createJSDataExpression(dataHandle.getResultSetColumn()));\n rule.setOperator(DesignChoiceConstants.MAP_OPERATOR_NULL);\n rule.setDisplay(emptyVlaue);\n try {\n mapHandle.addItem(rule);\n } catch (SemanticException e) {\n logger.log(Level.SEVERE, Messages.getString(\"String_Node_Str\"), e);\n }\n }\n }\n}\n"
|
"public Boolean call() throws Exception {\n Payload message = PayloadService.instance.findLatest(product.getId(), userId);\n if (message == null) {\n return true;\n }\n boolean ok = false;\n if (message.getClients() != null) {\n for (String client : message.getClients()) {\n Connection c = ConnectionKeeper.get(product.getKey(), client);\n ok = c.send(message);\n }\n try {\n PayloadService.instance.addHisotry(message, null, message.getClients().size(), ok);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return ok;\n}\n"
|
"private void validateFields(Class<?> klass, String[] row) {\n Mapper mapper = Mapper.of(klass);\n List<String> invalidFields = new ArrayList<String>();\n List<String> invalidRules = new ArrayList<String>();\n for (String col : row) {\n if (!isValidColumn(col)) {\n continue;\n }\n String[] cols = col.split(\"String_Node_Str\");\n log.debug(\"String_Node_Str\", col);\n String[] field = cols[0].split(\"String_Node_Str\");\n String name = isValidName(field[0]);\n if (name == null) {\n invalidFields.add(name);\n }\n if (column.length > 1) {\n String[] rules = column[1].replaceAll(\"String_Node_Str\", \"String_Node_Str\").split(\"String_Node_Str\");\n if (!RULES.containsAll(Arrays.asList(rules))) {\n invalidRules.add(name);\n }\n }\n }\n if (!invalidFields.isEmpty()) {\n logger.append(String.format(I18n.get(\"String_Node_Str\"), klass.getName(), invalidFields));\n }\n if (!invalidRules.isEmpty()) {\n logger.append(String.format(I18n.get(\"String_Node_Str\"), klass.getName(), invalidRules));\n }\n}\n"
|
"public String getCondition() {\n Date d2 = (Date) d.clone();\n d2.setDate(d.getDate() + 1);\n return \"String_Node_Str\" + df.format(d) + \"String_Node_Str\" + df.format(d2) + \"String_Node_Str\";\n}\n"
|
"public void applyContainerBottomStyle(XlsContainer container) {\n ContainerSizeInfo rule = container.getSizeInfo();\n StyleEntry entry = container.getStyle();\n int start = rule.getStartCoordinate();\n int col = engine.getAxis().getColumnIndexByCoordinate(start);\n int span = engine.getAxis().getColumnIndexByCoordinate(rule.getEndCoordinate());\n for (int i = col; i < span; i++) {\n SheetData data = engine.getColumnLastData(i);\n if (data == null) {\n continue;\n }\n int styleId = data.getStyleId();\n if (styleId != -1) {\n StyleEntry originalStyle = getStyle(styleId);\n StyleEntry newStyle = new StyleEntry(originalStyle);\n boolean isChanged = StyleBuilder.applyBottomBorder(entry, newStyle);\n if (isChanged)\n data.setStyleId(getStyleId(newStyle));\n }\n }\n}\n"
|
"public static String toXmlString(Map<String, Object> attributes) {\n StringBuilder result = new StringBuilder();\n result.append(\"String_Node_Str\").append(XML_ROOT_NODE).append(\"String_Node_Str\");\n for (Map.Entry<String, Object> entry : attributes.entrySet()) {\n result.append(\"String_Node_Str\").append(entry.getKey()).append(\"String_Node_Str\");\n result.append(format(entry.getValue()));\n result.append(\"String_Node_Str\").append(entry.getKey()).append(\"String_Node_Str\");\n }\n result.append(\"String_Node_Str\").append(xmlRootNode).append(\"String_Node_Str\");\n return result.toString();\n}\n"
|
"public String addUser(String json) {\n String strName = null;\n try {\n JSONObject content = new JSONObject(json);\n User u = new User();\n u.createNewID();\n if (content.getString(\"String_Node_Str\") != null) {\n u.setFirstName(content.getString(\"String_Node_Str\"));\n }\n if (content.getString(\"String_Node_Str\") != null) {\n u.setLastName(content.getString(\"String_Node_Str\"));\n }\n if (content.getString(\"String_Node_Str\") != null) {\n u.setPhone(content.getString(\"String_Node_Str\"));\n }\n if (content.getString(\"String_Node_Str\") != null) {\n u.setEmail(content.getString(\"String_Node_Str\"));\n }\n if (content.getString(\"String_Node_Str\") != null) {\n u.setPassword(content.getString(\"String_Node_Str\"));\n }\n if (content.getString(\"String_Node_Str\") != null) {\n u.setEmail(content.getString(\"String_Node_Str\"));\n } else {\n return \"String_Node_Str\";\n }\n u.save();\n strName = (String) content.get(\"String_Node_Str\");\n } catch (Exception ex) {\n return ex.toString();\n }\n return \"String_Node_Str\" + strName;\n}\n"
|
"public void onEnable() {\n plugin = this;\n if (!new File(this.getDataFolder() + \"String_Node_Str\").exists()) {\n saveDefaultConfig();\n if (verbose) {\n logger.log(Level.INFO, \"String_Node_Str\");\n }\n saveDefaultConfig();\n }\n eventList.add(new PlayerListener());\n eventList.add(new BlockListener());\n eventList.add(new EntityListener());\n eventList.add(new VehicleListener());\n if (config.logXRay()) {\n eventList.add(new XRayListener());\n }\n for (Listener listener : eventList) {\n getServer().getPluginManager().registerEvents(listener, this);\n if (verbose) {\n logger.log(Level.INFO, \"String_Node_Str\".concat(listener.toString()));\n }\n }\n getCommand(\"String_Node_Str\").setExecutor(new CommandHandler());\n if (verbose) {\n logger.log(Level.INFO, \"String_Node_Str\");\n logger.log(Level.INFO, \"String_Node_Str\");\n }\n if (update && config.autoUpdate()) {\n if (verbose) {\n logger.log(Level.INFO, \"String_Node_Str\");\n }\n File file = new File(\"String_Node_Str\" + updateFolder);\n if (!file.exists()) {\n try {\n file.mkdir();\n } catch (Exception ex) {\n }\n }\n try {\n saveFile(file.getCanonicalPath() + \"String_Node_Str\", \"String_Node_Str\");\n } catch (IOException ex) {\n }\n }\n}\n"
|
"public int getTag() {\n return 2009120232;\n}\n"
|
"protected void addTypeAttribute(MarshalRecord marshalRecord, String typeValue) {\n String xsiPrefix = null;\n if (marshalRecord.getNamespaceResolver() != null) {\n xsiPrefix = marshalRecord.getNamespaceResolver().resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);\n } else {\n xsiPrefix = XMLConstants.SCHEMA_INSTANCE_PREFIX;\n marshalRecord.namespaceDeclaration(xsiPrefix, XMLConstants.SCHEMA_INSTANCE_URL);\n }\n if (xsiPrefix == null) {\n xsiPrefix = marshalRecord.getNamespaceResolver().generatePrefix(XMLConstants.SCHEMA_INSTANCE_PREFIX);\n marshalRecord.attribute(XMLConstants.XMLNS_URL, xsiPrefix, XMLConstants.XMLNS + XMLConstants.COLON + xsiPrefix, XMLConstants.SCHEMA_INSTANCE_URL);\n }\n marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_TYPE_ATTRIBUTE, xsiPrefix + XMLConstants.COLON + XMLConstants.SCHEMA_TYPE_ATTRIBUTE, typeValue);\n}\n"
|
"public void onPageSelected(int position) {\n mSelectedTab = position;\n if (position != ViewEventFragmentPagerAdapter.TAB_INFO) {\n hideFab(true);\n } else {\n syncFabVisibilityWithMyTbaEnabled(true);\n }\n}\n"
|
"public void shouldFailIfAllValidatorsFail() {\n LogicalValidator<String> validator = validateThat(is(\"String_Node_Str\")).or(validateThat(is(\"String_Node_Str\"))).assigningFailuresTo(\"String_Node_Str\").castValidator();\n assertThat(validator.validate(\"String_Node_Str\").messages(\"String_Node_Str\"), hasExactly(AnyOfValidator.DEFAULT_MESSAGE));\n}\n"
|
"public static String readBigString(IOBuffer buffer) {\n int len = buffer.getShort();\n byte[] chars = new byte[len];\n for (int i = 0; i < len; i++) {\n chars[i] = buffer.getByte();\n }\n return new String(chars);\n}\n"
|
"protected void pageChange(final int newPageIndex) {\n super.pageChange(newPageIndex);\n setName();\n if (newPageIndex == 1) {\n if (codeEditor instanceof ISyntaxCheckableEditor) {\n moveCursorToSelectedComponent();\n }\n codeSync();\n if (codeEditor instanceof ISyntaxCheckableEditor && LanguageManager.getCurrentLanguage() == ECodeLanguage.PERL) {\n ((ISyntaxCheckableEditor) codeEditor).validateSyntax();\n }\n } else if (newPageIndex == 0 && oldPageIndex == 2) {\n covertJobscriptOnPageChange();\n IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();\n if (workbenchPage != null) {\n IViewPart view = workbenchPage.findView(ContextsView.ID);\n if (view != null) {\n ContextsView contextsView = (ContextsView) view;\n contextsView.getContextViewComposite().setTabEnable(true);\n contextsView.getContextViewComposite().getContextTemplateComposite().getViewer().getTree().setEnabled(true);\n }\n }\n } else if (newPageIndex == 2) {\n if (GlobalServiceRegister.getDefault().isServiceRegistered(ICreateXtextProcessService.class)) {\n ICreateXtextProcessService convertJobtoScriptService = CorePlugin.getDefault().getCreateXtextProcessService();\n String scriptValue;\n try {\n scriptValue = convertJobtoScriptService.convertJobtoScript(getProcess().saveXmlFile());\n IFile file = (IFile) getEditor(2).getEditorInput().getAdapter(IResource.class);\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(scriptValue.getBytes());\n if (file.exists()) {\n ((AbstractDecoratedTextEditor) getEditor(2)).getDocumentProvider().getDocument(getEditor(2).getEditorInput()).set(scriptValue);\n boolean isReadjob = ((JobEditorInput) getEditor(0).getEditorInput()).isReadOnly();\n IProxyRepositoryFactory rFactory = ProxyRepositoryFactory.getInstance();\n if (isReadjob || rFactory.isUserReadOnlyOnCurrentProject()) {\n IDocumentProvider provider = ((AbstractDecoratedTextEditor) getEditor(2)).getDocumentProvider();\n Class p = provider.getClass();\n Class[] type = new Class[1];\n type[0] = Boolean.TYPE;\n Object[] para = new Object[1];\n para[0] = Boolean.TRUE;\n Method method = p.getMethod(\"String_Node_Str\", type);\n method.invoke(provider, para);\n }\n IAction action = ((AbstractDecoratedTextEditor) getEditor(2)).getAction(\"String_Node_Str\");\n action.run();\n getEditor(2).doSave(null);\n } else {\n file.create(byteArrayInputStream, true, null);\n }\n } catch (PartInitException e) {\n ExceptionHandler.process(e);\n } catch (CoreException e) {\n ExceptionHandler.process(e);\n } catch (IOException e) {\n ExceptionHandler.process(e);\n } catch (SecurityException e) {\n ExceptionHandler.process(e);\n } catch (NoSuchMethodException e) {\n ExceptionHandler.process(e);\n } catch (IllegalArgumentException e) {\n ExceptionHandler.process(e);\n } catch (IllegalAccessException e) {\n ExceptionHandler.process(e);\n } catch (InvocationTargetException e) {\n ExceptionHandler.process(e);\n }\n IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();\n if (workbenchPage != null) {\n IViewPart view = workbenchPage.findView(ContextsView.ID);\n if (view != null) {\n ContextsView contextsView = (ContextsView) view;\n contextsView.getContextViewComposite().setTabEnable(false);\n contextsView.getContextViewComposite().getContextTemplateComposite().getViewer().getTree().setEnabled(false);\n }\n }\n }\n }\n oldPageIndex = getActivePage();\n}\n"
|
"public void run() {\n ClusterInstanceContext instanceContext = getAllNetworkPartitionCtxts().get(networkPartitionId).getClusterInstanceContext(instanceId);\n for (ClusterLevelPartitionContext partitionContext : instanceContext.getPartitionCtxts()) {\n log.info(\"String_Node_Str\" + getClusterId() + \"String_Node_Str\" + instanceContext.getNetworkPartitionId() + \"String_Node_Str\" + partitionContext.getPartitionId() + \"String_Node_Str\");\n Iterator<MemberContext> iterator = partitionContext.getActiveMembers().listIterator();\n while (iterator.hasNext()) {\n MemberContext activeMemberCtxt = iterator.next();\n String memberId = activeMemberCtxt.getMemberId();\n log.info(\"String_Node_Str\" + memberId);\n partitionContext.moveActiveMemberToTerminationPendingMembers(memberId);\n InstanceNotificationPublisher.sendInstanceCleanupEventForMember(memberId);\n }\n for (MemberContext pendingMemberCtxt : partitionContext.getPendingMembers()) {\n log.info(\"String_Node_Str\" + pendingMemberCtxt.getMemberId());\n terminateMember(pendingMemberCtxt.getMemberId());\n }\n for (String obsoleteMemberId : partitionContext.getObsoletedMembers().keySet()) {\n log.info(\"String_Node_Str\" + obsoleteMemberId);\n terminateMember(obsoleteMemberId);\n }\n }\n}\n"
|
"private void killAllWorkers() {\n List workers = getAllWorkers();\n for (Iterator iter = workers.iterator(); iter.hasNext(); ) {\n DownloadWorker doomed = (DownloadWorker) iter.next();\n doomed.interrupt();\n }\n List pushObservers = pushes.getAllAndClear();\n for (Iterator i = pushObservers.iterator(); i.hasNext(); ) {\n HTTPConnectObserver next = (HTTPConnectObserver) i.next();\n next.shutdown();\n }\n}\n"
|
"public int clampViewPositionVertical(View child, int top, int dy) {\n int newTop = draggableView.getHeight() - capturedView.getHeight();\n if (draggableView.isMinimized() && Math.abs(dy) >= MINIMUM_DY_FOR_VERTICAL_DRAG || (!draggableView.isMinimized() && !draggableView.isDragViewAtBottom())) {\n final int topBound = draggableView.getPaddingTop();\n final int bottomBound = draggableView.getHeight() - child.getHeight() - child.getPaddingBottom();\n newTop = Math.min(Math.max(top, topBound), bottomBound);\n }\n return newTop;\n}\n"
|
"protected final void initDefault() {\n LineAttributes lia = LineAttributesImpl.createDefault(null, LineStyle.SOLID_LITERAL, 1);\n setLineAttributes(lia);\n Label lb = LabelImpl.createDefault();\n setLabel(lb);\n Grid gr = ComponentFactory.eINSTANCE.createGrid();\n lia = LineAttributesImpl.createDefault(ColorDefinitionImpl.create(196, 196, 196), LineStyle.SOLID_LITERAL, 1);\n gr.setLineAttributes(lia);\n lia = LineAttributesImpl.createDefault(ColorDefinitionImpl.create(196, 196, 196), LineStyle.SOLID_LITERAL, 1);\n gr.setTickAttributes(lia);\n ((GridImpl) gr).tickStyle = TickStyle.BELOW_LITERAL;\n setMajorGrid(gr);\n gr = ComponentFactory.eINSTANCE.createGrid();\n lia = LineAttributesImpl.createDefault(ColorDefinitionImpl.create(225, 225, 225), LineStyle.SOLID_LITERAL, 1, false);\n gr.setLineAttributes(lia);\n lia = LineAttributesImpl.createDefault(ColorDefinitionImpl.create(225, 225, 225), LineStyle.SOLID_LITERAL, 1, false);\n gr.setTickAttributes(lia);\n ((GridImpl) gr).tickStyle = TickStyle.BELOW_LITERAL;\n setMinorGrid(gr);\n Scale sc = ComponentFactory.eINSTANCE.createScale();\n ((ScaleImpl) sc).minorGridsPerUnit = 5;\n setScale(sc);\n}\n"
|
"public static final HashMap gaussianHMM(int startAt, double[] y, double[][] A, double[] mu, double[] sigma, double[] prior) {\n int nStates = mu.length;\n double[][] alphas = new double[y.length][nStates];\n double[][] betas = new double[y.length][nStates];\n double[] Py = new double[y.length];\n double[][] gamma = new double[y.length][nStates];\n for (int t = 0; t < y.length; t++) {\n for (int i = 0; i < nStates; i++) {\n if (t == 0) {\n alphas[t][i] = prior[i] * gaussian(y[t], mu[i], sigma[i]);\n } else {\n alphas[t][i] = 0;\n for (int qt = 0; qt < nStates; qt++) {\n alphas[t][i] += A[qt][i] * gaussian(y[t], mu[i], sigma[i]) * alphas[t - 1][qt];\n }\n }\n }\n }\n for (int t = y.length - 1; t >= 0; t--) {\n Py[t] = 0;\n for (int i = 0; i < nStates; i++) {\n gamma[t][i] = 0.0;\n if (t == y.length - 1) {\n betas[t][i] = 1;\n } else {\n betas[t][i] = 0;\n for (int qtp = 0; qtp < nStates; qtp++) {\n betas[t][i] += A[i][qtp] * gaussian(y[t + 1], mu[qtp], sigma[qtp]) * betas[t + 1][qtp];\n }\n }\n Py[t] += alphas[t][i] * betas[t][i];\n }\n for (int i = 0; i < nStates; i++) {\n gamma[t][i] += alphas[t][i] * betas[t][i] / Py[t];\n }\n }\n double[][][] psi = new double[y.length - 1][nStates][nStates];\n double[][] A_hat = new double[nStates][nStates];\n double[] mu_hat = new double[nStates];\n double[] s_hat = new double[nStates];\n for (int next = 0; next < nStates; next++) {\n for (int now = 0; now < nStates; now++) {\n for (int t = 0; t < (y.length - 1); t++) {\n if (alphas[t + 1][next] == 0) {\n psi[t][now][next] = 0;\n } else {\n psi[t][now][next] = alphas[t][now] * gaussian(y[t + 1], mu[next], sigma[next]) * gamma[t + 1][next] * A[now][next] / alphas[t + 1][next];\n }\n A_hat[now][next] += psi[t][now][next];\n }\n }\n mu_hat[next] = 0;\n s_hat[next] = 0;\n }\n double[] rowsum = new double[nStates];\n double[] gammasum = new double[nStates];\n for (int i = 0; i < nStates; i++) {\n rowsum[i] = 0;\n for (int j = 0; j < nStates; j++) {\n rowsum[i] += A_hat[i][j];\n }\n for (int j = 0; j < nStates; j++) {\n A_hat[i][j] /= rowsum[i];\n }\n gammasum[i] = 0.0;\n }\n for (int j = 0; j < nStates; j++) {\n gammasum[j] = 0.0;\n for (int t = 0; t < y.length; t++) {\n gammasum[j] += gamma[t][j];\n mu_hat[j] += gamma[t][j] * y[t];\n }\n mu_hat[j] = mu_hat[j] / gammasum[j];\n for (int t = 0; t < y.length; t++) {\n s_hat[j] += (gamma[t][j] * Math.pow((y[t] - mu_hat[j]), 2));\n }\n s_hat[j] = Math.sqrt(s_hat[j] / gammasum[j]);\n }\n HashMap estimates = new HashMap();\n estimates = sortEstimates(mu_hat, s_hat, A_hat);\n return estimates;\n}\n"
|
"void refreshMenuDrawer() {\n if (mDrawerAdapter == null)\n return;\n setupCurrentBlog();\n updateMenuDrawer();\n Blog currentBlog = WordPress.getCurrentBlog();\n if (currentBlog != null && mDrawerListView != null && mDrawerListView.getHeaderViewsCount() > 0) {\n for (int i = 0; i < mBlogIDs.length; i++) {\n if (mBlogIDs[i] == currentBlog.getLocalTableBlogId()) {\n if (mBlogSpinner != null) {\n mBlogSpinner.setSelection(i);\n }\n }\n }\n }\n}\n"
|
"public void startRequest(MRCRequest rq) {\n try {\n final chmodRequest rqArgs = (chmodRequest) rq.getRequestArgs();\n final VolumeManager vMan = master.getVolumeManager();\n final FileAccessManager faMan = master.getFileAccessManager();\n validateContext(rq);\n Path p = new Path(rqArgs.getPath());\n VolumeInfo volume = vMan.getVolumeByName(p.getComp(0));\n StorageManager sMan = vMan.getStorageManager(volume.getId());\n PathResolver res = new PathResolver(sMan, p);\n faMan.checkSearchPermission(sMan, res, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n res.checkIfFileDoesNotExist();\n FileMetadata file = res.getFile();\n String target = sMan.getSoftlinkTarget(file.getId());\n if (target != null) {\n rqArgs.setPath(target);\n p = new Path(target);\n if (!vMan.hasVolume(p.getComp(0))) {\n finishRequest(rq, new ErrorRecord(ErrorClass.USER_EXCEPTION, ErrNo.ENOENT, \"String_Node_Str\" + target + \"String_Node_Str\"));\n return;\n }\n volume = vMan.getVolumeByName(p.getComp(0));\n sMan = vMan.getStorageManager(volume.getId());\n res = new PathResolver(sMan, p);\n file = res.getFile();\n }\n faMan.checkPrivilegedPermissions(sMan, file, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n AtomicDBUpdate update = sMan.createAtomicDBUpdate(master, rq);\n faMan.setPosixAccessMode(sMan, file, res.getParentDirId(), rq.getDetails().userId, rq.getDetails().groupIds, rqArgs.getMode(), update);\n MRCHelper.updateFileTimes(res.getParentDirId(), file, false, true, false, sMan, update);\n rq.setResponse(new chmodResponse());\n update.execute();\n } catch (UserException exc) {\n Logging.logMessage(Logging.LEVEL_TRACE, this, exc);\n finishRequest(rq, new ErrorRecord(ErrorClass.USER_EXCEPTION, exc.getErrno(), exc.getMessage(), exc));\n } catch (Throwable exc) {\n finishRequest(rq, new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR, \"String_Node_Str\", exc));\n }\n}\n"
|
"protected static <C, R extends Message> R syncCall(SERVICES service, UserCredentials userCreds, Auth auth, Options options, UUIDResolver uuidResolver, UUIDIterator it, boolean uuidIteratorHasAddresses, boolean delayNextTry, int maxRetries, C callRequest, ReusableBuffer buffer, CallGenerator<C, R> callGen) throws PosixErrorException, IOException, InternalServerErrorException, AddressToUUIDNotFoundException {\n int maxTries = maxRetries;\n int attempt = 0;\n R response = null;\n try {\n while (++attempt <= maxTries || maxTries == 0) {\n RPCResponse<R> r = null;\n try {\n InetSocketAddress server;\n if (uuidIteratorHasAddresses) {\n server = getInetSocketAddressFromAddress(it.getUUID(), service);\n } else {\n String address = uuidResolver.uuidToAddress(it.getUUID());\n server = getInetSocketAddressFromAddress(address, service);\n }\n r = callGen.executeCall(server, auth, userCreds, callRequest);\n response = r.get();\n if (r.getData() != null) {\n if (buffer != null) {\n buffer.put(r.getData());\n }\n BufferPool.free(r.getData());\n }\n } catch (PBRPCException pbe) {\n if (pbe.getErrorType().equals(ErrorType.REDIRECT)) {\n assert (pbe.getRedirectToServerUUID() != null);\n if (Logging.isInfo()) {\n String error;\n if (uuidIteratorHasAddresses) {\n error = \"String_Node_Str\" + it.getUUID() + \"String_Node_Str\" + pbe.getRedirectToServerUUID() + \"String_Node_Str\" + attempt;\n } else {\n error = \"String_Node_Str\" + it.getUUID() + \"String_Node_Str\" + pbe.getRedirectToServerUUID() + \"String_Node_Str\" + attempt;\n }\n Logging.logMessage(Logging.LEVEL_INFO, Category.misc, pbe, error);\n }\n if (maxTries != 0 && attempt == maxTries) {\n maxTries++;\n }\n it.markUUIDAsFailed(it.getUUID());\n continue;\n }\n if (((attempt < maxTries || maxTries == 0) || (attempt == maxTries && delayNextTry)) && (pbe.getErrorType().equals(ErrorType.IO_ERROR) || pbe.getErrorType().equals(ErrorType.INTERNAL_SERVER_ERROR))) {\n if (attempt == 1 && maxTries != 1) {\n String retriesLeft = (maxTries == 0) ? (\"String_Node_Str\") : (String.valueOf(maxTries - attempt));\n Logging.logMessage(Logging.LEVEL_ERROR, Category.misc, pbe, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", it.getUUID(), retriesLeft, options.getRetryDelay_s());\n }\n it.markUUIDAsFailed(it.getUUID());\n } else {\n throw pbe;\n }\n } catch (IOException ioe) {\n if (((attempt < maxTries || maxTries == 0) || (attempt == maxTries && delayNextTry))) {\n if (attempt == 1 && maxTries != 1) {\n String retriesLeft = (maxTries == 0) ? (\"String_Node_Str\") : (String.valueOf(maxTries - attempt));\n Logging.logMessage(Logging.LEVEL_ERROR, Category.misc, ioe, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", it.getUUID(), retriesLeft, options.getRetryDelay_s());\n }\n it.markUUIDAsFailed(it.getUUID());\n continue;\n } else {\n throw ioe;\n }\n } catch (InterruptedException ie) {\n if (options.getInterruptSignal() == 0) {\n if (Logging.isDebug()) {\n Logging.logMessage(Logging.LEVEL_DEBUG, Category.misc, ie, \"String_Node_Str\");\n }\n break;\n }\n throw new IOException();\n } finally {\n if (r != null) {\n r.freeBuffers();\n }\n }\n return response;\n }\n } catch (PBRPCException e) {\n handleErrorAfterMaxTriesExceeded(e, it);\n }\n return null;\n}\n"
|
"private void attachSampleFile(PDDocument doc) throws IOException {\n PDEmbeddedFilesNameTreeNode efTree = new PDEmbeddedFilesNameTreeNode();\n PDComplexFileSpecification fs = new PDComplexFileSpecification();\n fs.setFile(\"String_Node_Str\");\n COSDictionary dict = fs.getCOSDictionary();\n dict.setName(\"String_Node_Str\", \"String_Node_Str\");\n dict.setString(\"String_Node_Str\", \"String_Node_Str\");\n String payload = \"String_Node_Str\";\n InputStream is = new ByteArrayInputStream(payload.getBytes());\n PDEmbeddedFile ef = new PDEmbeddedFile(doc, is);\n ef.setSubtype(\"String_Node_Str\");\n ef.setFile(fs);\n ef.setModDate(GregorianCalendar.getInstance());\n ef.setSize(payload.length());\n ef.setCreationDate(new GregorianCalendar());\n fs.setEmbeddedFile(ef);\n efTree.setNames(Collections.singletonMap(\"String_Node_Str\", fs));\n PDDocumentCatalog catalog = doc.getDocumentCatalog();\n PDDocumentNameDictionary names = new PDDocumentNameDictionary(doc.getDocumentCatalog());\n names.setEmbeddedFiles(efTree);\n catalog.setNames(names);\n COSArray cosArray = new COSArray();\n cosArray.add(fs);\n catalog.getCOSDictionary().setItem(\"String_Node_Str\", cosArray);\n}\n"
|
"public Object[] getConstructorArgs() {\n Object[][] workerConfiguration = new Object[sparqls + updates][];\n int i = 0;\n for (SPARQLWorkerConfig config : sparqlWorkers) {\n workerConfiguration[i++] = config.asConstructorArgs();\n }\n for (UPDATEWorkerConfig config : updateWorkers) {\n workerConfiguration[i++] = config.asConstructorArgs();\n }\n constructorArgs = new Object[7];\n constructorArgs[0] = type ? typeValue : null;\n constructorArgs[1] = !type ? typeValue : null;\n constructorArgs[2] = workerConfiguration;\n constructorArgs[3] = getQHConstructor();\n constructorArgs[4] = warmupTime;\n constructorArgs[5] = warmupQueries;\n constructorArgs[6] = warmupUpdates;\n return constructorArgs;\n}\n"
|
"private int getResultCount(String query, SparqlEndpoint endpoint, ExtractionDBCache cache) {\n com.hp.hpl.jena.query.ResultSet rs = SparqlQuery.convertJSONtoResultSet(cache.executeSelectQuery(endpoint, getDistinctQuery(query)));\n SortedSet<String> resources = new TreeSet<String>();\n QuerySolution qs;\n while (rs.hasNext()) {\n qs = rs.next();\n if (qs.get(\"String_Node_Str\").isURIResource()) {\n resources.add(qs.get(\"String_Node_Str\").asResource().getURI());\n }\n }\n return resources.size();\n}\n"
|
"private void populateMeshViewSection(Section section, FormToolkit toolkit) {\n section.setText(\"String_Node_Str\");\n section.setDescription(\"String_Node_Str\");\n Composite container = toolkit.createComposite(section, SWT.NONE);\n section.setClient(container);\n container.setLayout(new GridLayout(1, false));\n ToolBarManager toolBarManager = new ToolBarManager();\n ToolBar toolBar = toolBarManager.createControl(container);\n toolkit.adapt(toolBar);\n toolBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\n meshPlotParent = toolkit.createComposite(container, SWT.BORDER);\n meshPlotParent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n IVizServiceFactory vizFactory = getVizServiceFactory();\n if (vizFactory != null) {\n vizService = (VisItVizService) vizFactory.get(\"String_Node_Str\");\n }\n if (vizService != null) {\n meshPlotParent.setLayout(new FillLayout());\n try {\n plot = (VisItPlot) vizService.createPlot(meshURI);\n for (IAction action : plot.getActions()) {\n toolBarManager.add(action);\n }\n toolBarManager.update(true);\n plot.draw(\"String_Node_Str\", \"String_Node_Str\", meshPlotParent);\n } catch (Exception e) {\n System.err.println(\"String_Node_Str\" + \"String_Node_Str\");\n e.printStackTrace();\n }\n } else {\n String errorMessage = \"String_Node_Str\" + \"String_Node_Str\";\n meshPlotParent.setLayout(new GridLayout(2, false));\n Label iconLabel = toolkit.createLabel(meshPlotParent, \"String_Node_Str\");\n iconLabel.setImage(Display.getCurrent().getSystemImage(SWT.ICON_ERROR));\n iconLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));\n Label msgLabel = toolkit.createLabel(meshPlotParent, errorMessage);\n msgLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));\n }\n section.setClient(container);\n return;\n}\n"
|
"private void extractMachines() {\n machines = new ArrayList<Machine>();\n List<Element> le = physLocRoot.elements(Constants.DEPLOY_MACHINE);\n for (Element e : le) {\n String os = e.attributeValue(Constants.MACHINE_OPERATING_SYSTEM_ATTRIBUTE);\n if (os != null && os.equalsIgnoreCase(Constants.OPERATING_SYSTEM_WINDOWS_ATTRIBUTE)) {\n machines.add(new WindowsMachine(e, settings, machineParameters, netarchiveSuiteFileName, logPropFile, securityPolicyFile, databaseFile, resetDirectory));\n } else {\n machines.add(new LinuxMachine(e, settings, machineParameters, netarchiveSuiteFileName, logPropFile, securityPolicyFile, databaseFile, resetDirectory));\n }\n }\n}\n"
|
"public boolean hasNext() {\n if (next != null)\n return true;\n SootClass currentClass = current.getDeclaringClass();\n while (true) {\n SootClass superClass = currentClass.getSuperclassUnsafe();\n if (superClass == null)\n break;\n SootMethod m = superClass.getMethodUnsafe(sigClinit);\n if (m != null) {\n next = m;\n current = m;\n return true;\n }\n currentClass = superClass;\n }\n}\n"
|
"public void bindView(View view, final Context context, Cursor cursor) {\n final ViewHolder viewHolder = (ViewHolder) view.getTag();\n QBDialog dialog = DatabaseManager.getDialogFromCursor(cursor);\n if (dialog.getType().equals(QBDialogType.PRIVATE)) {\n int occupantId = ChatUtils.getOccupantIdFromList(dialog.getOccupants());\n Friend occupant = getOccupantById(occupantId);\n viewHolder.nameTextView.setText(occupant.getFullname());\n viewHolder.userCountTextView.setVisibility(View.GONE);\n displayAvatarImage(getAvatarUrlForFriend(occupant), viewHolder.avatarImageView);\n } else {\n viewHolder.nameTextView.setText(dialog.getName());\n viewHolder.userCountTextView.setVisibility(View.VISIBLE);\n viewHolder.userCountTextView.setText(dialog.getOccupants().size() + Consts.EMPTY_STRING);\n viewHolder.avatarImageView.setImageResource(R.drawable.placeholder_group);\n }\n if (dialog.getUnreadMessageCount() > Consts.ZERO_INT_VALUE) {\n viewHolder.unreadMessagesTextView.setText(dialog.getUnreadMessageCount() + Consts.EMPTY_STRING);\n viewHolder.unreadMessagesTextView.setVisibility(View.VISIBLE);\n } else {\n viewHolder.unreadMessagesTextView.setVisibility(View.GONE);\n }\n viewHolder.lastMessageTextView.setText(dialog.getLastMessage());\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n if (A.getMain() == null || MainActivity.selectedFile == null || MainActivity.cartridgeFile == null) {\n finish();\n return;\n }\n setContentView(R.layout.layout_details);\n TextView tvName = (TextView) findViewById(R.id.layoutDetailsTextViewName);\n tvName.setText(MainActivity.cartridgeFile.name);\n TextView tvState = (TextView) findViewById(R.id.layoutDetailsTextViewState);\n tvState.setText(getString(R.string.author) + \"String_Node_Str\" + MainActivity.cartridgeFile.author);\n TextView tvDescription = (TextView) findViewById(R.id.layoutDetailsTextViewDescription);\n tvDescription.setText(UtilsGUI.simpleHtml(MainActivity.cartridgeFile.description));\n ImageView ivImage = (ImageView) findViewById(R.id.layoutDetailsImageViewImage);\n try {\n byte[] is = MainActivity.cartridgeFile.getFile(MainActivity.cartridgeFile.splashId);\n Bitmap i = BitmapFactory.decodeByteArray(is, 0, is.length);\n MainActivity.setBitmapToImageView(i, ivImage);\n } catch (Exception e) {\n }\n TextView tvText = (TextView) findViewById(R.id.layoutDetailsTextViewImageText);\n tvText.setVisibility(View.GONE);\n TextView tvDistance = (TextView) findViewById(R.id.layoutDetailsTextViewDistance);\n Location loc = new Location(TAG);\n loc.setLatitude(MainActivity.cartridgeFile.latitude);\n loc.setLongitude(MainActivity.cartridgeFile.longitude);\n String buff = getString(R.string.distance) + \"String_Node_Str\" + \"String_Node_Str\" + UtilsFormat.formatDistance(LocationState.getLocation().distanceTo(loc), false) + \"String_Node_Str\" + \"String_Node_Str\" + getString(R.string.latitude) + \"String_Node_Str\" + UtilsFormat.formatLatitude(MainActivity.cartridgeFile.latitude) + \"String_Node_Str\" + getString(R.string.longitude) + \"String_Node_Str\" + UtilsFormat.formatLatitude(MainActivity.cartridgeFile.longitude);\n tvDistance.setText(Html.fromHtml(buff));\n CustomDialog.setBottom(this, getString(R.string.start), new CustomDialog.OnClickListener() {\n public boolean onClick(CustomDialog dialog, View v, int btn) {\n CartridgeDetailsActivity.this.finish();\n MainActivity.startSelectedCartridge(false);\n return true;\n }\n }, null, null, getString(R.string.navigate), new CustomDialog.OnClickListener() {\n public boolean onClick(CustomDialog dialog, View v, int btn) {\n Location loc = new Location(TAG);\n loc.setLatitude(MainActivity.cartridgeFile.latitude);\n loc.setLongitude(MainActivity.cartridgeFile.longitude);\n Guide guide = new Guide(MainActivity.cartridgeFile.name, loc);\n A.getGuidingContent().guideStart(guide);\n MainActivity.callGudingScreen(CartridgeDetailsActivity.this);\n CartridgeDetailsActivity.this.finish();\n return true;\n }\n });\n}\n"
|
"public void updateSettingForChannelAndType(Channel channel, Type type, String settingName, boolean newValue, long blogId) {\n String typeName = type.toString();\n try {\n switch(channel) {\n case BLOGS:\n JSONObject blogJson = getBlogSettings().get(blogId);\n if (blogJson != null) {\n JSONObject blogSetting = JSONUtils.queryJSON(blogJson, typeName, new JSONObject());\n blogSetting.put(settingName, newValue);\n blogJson.put(typeName, blogSetting);\n getBlogSettings().put(blogId, blogJson);\n }\n break;\n case OTHER:\n JSONObject otherSetting = JSONUtils.queryJSON(getOtherSettings(), typeName, new JSONObject());\n otherSetting.put(settingName, newValue);\n getOtherSettings().put(typeName, otherSetting);\n break;\n case DOTCOM:\n getDotcomSettings().put(settingName, newValue);\n }\n } catch (JSONException e) {\n AppLog.e(AppLog.T.NOTIFS, \"String_Node_Str\");\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.