query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Remove a function a given entry point. | public void removeFunction(Address entryPoint); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removeFunction(int i);",
"public void removeFunction(Function function) {\n removeFunction(function.getFullName());\n }",
"FunctionLibraryDefinition<T> unregisterFunction(String functionName);",
"public void removeFunction(String fullName) {\n Preconditions.checkState(!registered);\n Function function = getFunctionByFullName(fullName);\n Preconditions.checkArgument(function != null);\n String functionNameInLowerCase = Ascii.toLowerCase(function.getName());\n Preconditions.checkArgument(customFunctions.containsKey(functionNameInLowerCase));\n customFunctions.remove(functionNameInLowerCase);\n if (!function.getOptions().getAliasName().isEmpty()) {\n customFunctions.remove(Ascii.toLowerCase(function.getOptions().getAliasName()));\n }\n removeFunctionFromFullNameMap(function);\n }",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"@Override\n protected void remover(Funcionario funcionario) {\n\n }",
"public void remove () {}",
"Object remove();",
"public void removed(IExtensionPoint[] extensionPoints) {\r\n\r\n\t\t// Do nothing\r\n\t}",
"public boolean removePoint(Point p);",
"void remove();",
"void remove();",
"void remove();",
"void remove();",
"void remove();",
"@Override\r\n public void removerFuncionario(long id) throws Exception {\n rnFuncionario.remover(id);\r\n }",
"public Object remove();",
"public void removePoint(Point2D p);",
"public void remove(GPoint point) {\n\t\tpoints.remove(point);\n\t}",
"void removeFlight(Flight flight);",
"public void removePoint(int line, int point) {\n\t\tif (this.aggregationMethod == AggregationMethod.ALL) {\n\t\t\tlines.get(line).removePointFromAll(point);\n\t\t} else {\n\t\t\tlines.get(line).removePoint(point);\n\t\t}\n\t}",
"private void remove(String paramString) {\n }",
"static public void removeEntry(Entry entry){ getEntryList().removeEntry(entry); }",
"public void deleteFunctionRequirement(final Field fReqToDelete) {\n\t\tif (_functionReq.contains(fReqToDelete)) {\n\t\t\t_functionReq.removeChild(fReqToDelete);\n\t\t}\n\t}",
"public void remove( IAnswer answerToRemove );",
"boolean removeObject(PointLatLng point, String id);",
"void dropFunction(ObjectPath functionPath, boolean ignoreIfNotExists)\n throws FunctionNotExistException, CatalogException;",
"Feature removeFeature(int index);",
"@Override\n\tpublic int delRFunc(int roleid) throws Exception {\n\t\treturn froleMapper.delRFunc(roleid);\n\t}",
"void removeEntry(K key);",
"public Function getFunctionAt(Address entryPoint);",
"public void entryRemoved (TudeySceneModel.Entry oentry)\n {\n // nada\n }",
"public void removeBinding(String func) {\n synchronized (BlitzPlugin.class) {\n if (this.mJsFuncTable.containsKey(func)) {\n this.mJsFuncTable.remove(func);\n BlitzPlugin._removeBindingJs(func);\n }\n }\n }",
"int deleteByExample(FunctionInfoExample example);",
"boolean removeFeature(Feature feature);",
"public Point2D removePoint(int i);",
"public void remove() {\r\n //\r\n }",
"public boolean remove(Predicate<String> predicate);",
"protected abstract void remove(E entry);",
"void remove(int idx);",
"public void removeFromRateBookCalcRoutines(entity.RateBookCalcRoutine element);",
"public void remove(int index) {\n\t\tpoints.remove(index);\n\t}",
"int remove(int idx);",
"public void remove ( ) {\n\t\texecute ( handle -> handle.remove ( ) );\n\t}",
"public E remove();",
"public E remove();",
"public PointF remove(int index)\n {\n flushCache();\n return points.remove(index);\n }",
"public void remove(){\n }",
"Entry<Key, Value> remove(Entry<Key, Value> entry);",
"void remove(int id);",
"void remove(String name);",
"void remove(String name);",
"public static void remove(String id) {\r\n\t\tinvocations.remove(id);\r\n\t}",
"public void remove() {\n\t}",
"public void remove() {\n\t}",
"@Override\n\tpublic void remove(MainFrameUpdater mfu) {\n\t\t\n\t}",
"public void remove(){\r\n // Does Nothing\r\n }",
"void remove(String aKey);",
"public void remove(String arg0) {\n\t\t\n\t}",
"public T remove (T element);",
"private DictRemoveFunction() {\n functionDefinition = new FunctionDefinitionBuilder().setName(\"dict.remove\").setReturnType(DataType.DICTIONARY)\n .addParameter(\"__dict\", DataType.DICTIONARY)\n .addListVarargsParameter(\"__keys\").toFunctionDefinition();\n }",
"public boolean remove(T anEntry);",
"public T remove(Object entry) {\n return null;\n }",
"public void remove(String name);",
"public void removePerson(Person p);",
"public void remove(T element);",
"void remove(String name) throws Exception;",
"void removeConsumer(Consumer consumer);",
"public void removeByTodoDouble(double todoDouble);",
"void remove (int offset, int size);",
"public static final SourceModel.Expr executionContext_removeTracedFunction(SourceModel.Expr executionContext, SourceModel.Expr tracedFunction) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.executionContext_removeTracedFunction), executionContext, tracedFunction});\n\t\t}",
"void remove(int index);",
"void remove(int index);",
"void remove(int index);",
"void remove(int index);",
"public void removeRafProcess(RafProcess rafProcess);",
"void remove(Price Price);",
"public abstract void removeCreature(Point p);",
"public void removeProvider(EvaluatorProvider provider) {\n\t\tregistry.remove(provider);\n\t}",
"@Override\n\tpublic void remove(String identifier) {\n\t}",
"V remove(K key);",
"V remove(K key);",
"V remove(K key);",
"@Override\r\n\tpublic ExecutedFunctionsProgramPoint addExecutedFuncsProgramPoint(\r\n\t\t\tString name, String lineNo) {\n\t\treturn null;\r\n\t}",
"public void remove(int index);",
"T remove(T target);",
"public final void remove () {\r\n }",
"boolean remove(String name);",
"public boolean remove(T element, Point2D pos);",
"Object removeTemp(String name);",
"void remove(String key);",
"void remove(String key);",
"void remove(String key);",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"public void remove() {\n\t }"
] | [
"0.6720019",
"0.6594628",
"0.61288637",
"0.59735924",
"0.5964598",
"0.5964598",
"0.5964598",
"0.5964598",
"0.5964598",
"0.59431064",
"0.59021944",
"0.58828247",
"0.5858579",
"0.5836126",
"0.5831619",
"0.5831619",
"0.5831619",
"0.5831619",
"0.5831619",
"0.577896",
"0.5762966",
"0.57564944",
"0.5742389",
"0.5622391",
"0.5589872",
"0.55892867",
"0.5563806",
"0.55137783",
"0.5512939",
"0.55070597",
"0.5475204",
"0.54653335",
"0.5463612",
"0.54599017",
"0.54521966",
"0.54495126",
"0.5444255",
"0.5438832",
"0.5436735",
"0.542749",
"0.54140985",
"0.541312",
"0.5393496",
"0.5391572",
"0.5381101",
"0.5380827",
"0.5360556",
"0.5358685",
"0.53585064",
"0.53585064",
"0.5340933",
"0.5339454",
"0.53298277",
"0.53284776",
"0.5326051",
"0.5326051",
"0.5325533",
"0.5321964",
"0.5321964",
"0.53219146",
"0.5319769",
"0.5313872",
"0.52935714",
"0.5285718",
"0.5285258",
"0.5285085",
"0.52828306",
"0.52824455",
"0.527085",
"0.5262993",
"0.52584493",
"0.5251337",
"0.5250084",
"0.524308",
"0.52348626",
"0.523402",
"0.523402",
"0.523402",
"0.523402",
"0.52308196",
"0.5229451",
"0.52246",
"0.5219225",
"0.5215497",
"0.5214281",
"0.5214281",
"0.5214281",
"0.52134997",
"0.5212686",
"0.5202451",
"0.52009636",
"0.51972795",
"0.5194624",
"0.5194483",
"0.5194122",
"0.5194122",
"0.5194122",
"0.5192359",
"0.5192359",
"0.5192359"
] | 0.8835236 | 0 |
Get a function with a given entry point. | public Function getFunctionAt(Address entryPoint); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Function getFunction();",
"T getFunction(String functionName) throws IllegalArgumentException;",
"public abstract @Nullable Function getFunction(@NotNull String functionName);",
"public Function getFunctionContaining(Address addr);",
"public Function lookup(String functionName) {\n\t\tObject func = functions.get(functionName);\n\t\tif (func == null) {\n\t\t\tthrow new IllegalArgumentException(functionName);\n\t\t}\n\t\treturn (Function) func;\n\t}",
"public final DepFunction getFunction(String functionName) {\n\t\treturn this.functionMap.get(functionName);\n\t}",
"public abstract AbstractFunction getFunction(String name) throws BadAlloc;",
"String getFunctionName();",
"public Function getFunction(final View view) {\n Preconditions.checkNotNull(view, \"Error: View argument can not be null\");\n\n if (!m_views.contains(view)) {\n throw new IllegalArgumentException(\"Error: View is not part of this module\");\n }\n\n if (view.getType() != ViewType.Native) {\n throw new IllegalArgumentException(\"Error: View is not a native view\");\n }\n\n return m_functionMap.get(m_module.getContent().getViewContainer().getFunction(view.getNative()));\n }",
"public Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;",
"FunctionExtract createFunctionExtract();",
"EntryPointResult evaluate(Object data, String entryPointName);",
"public void removeFunction(Address entryPoint);",
"String getFinalFunc();",
"public FunctionInfo getFunction(String name) {\n/* 251 */ if (this.functions == null || this.functions.length == 0) {\n/* 252 */ System.err.println(\"No functions\");\n/* 253 */ return null;\n/* */ } \n/* */ \n/* 256 */ for (int i = 0; i < this.functions.length; i++) {\n/* 257 */ if (this.functions[i].getName().equals(name)) {\n/* 258 */ return this.functions[i];\n/* */ }\n/* */ } \n/* 261 */ return null;\n/* */ }",
"String getInizializedFunctionName();",
"public Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;",
"public String getEntrypoint() {\n return entrypoint;\n }",
"Function createFunction();",
"public String getEntryPoint() {\n return entryPoint;\n }",
"FunctionCall getFc();",
"@Override\r\n\tpublic Function getFunctionById(int id) {\n\t\treturn getHibernateTemplate().get(Function.class, id);\r\n\t}",
"@Override\r\n public MachineFunction getFunction (String functionName) {\r\n MachineFunction mf = super.getFunction(functionName);\r\n \r\n // Check to see if the function is a lifted let variable function.\r\n if (mf == null) {\r\n mf = liftedFunctionMap.get(functionName);\r\n }\r\n return mf;\r\n }",
"EntryPoint createEntryPoint();",
"public Function getFunction()\n\t{\n\t\treturn function;\n\t}",
"FunDef getFunDef();",
"@Override\r\n public MachineFunction getFunction (QualifiedName functionName) {\r\n MachineFunction mf = super.getFunction(functionName);\r\n \r\n // Check to see if the function is a lifted let variable function.\r\n if (mf == null && functionName.getModuleName().equals(getName())) {\r\n mf = liftedFunctionMap.get(functionName.getUnqualifiedName());\r\n }\r\n\r\n return mf;\r\n }",
"@Override\r\n\tpublic ExecutedFunctionsProgramPoint addExecutedFuncsProgramPoint(\r\n\t\t\tString name, String lineNo) {\n\t\treturn null;\r\n\t}",
"public interface FunctionProvider {\n\n <T, R> Function<T, R> get(URI identifier, Class<T> inputType, Class<R> returnType) throws FunctionResolutionException;\n\n <T, R> Function<T, R> get(String identifier, Class<T> inputType, Class<R> returnType) throws FunctionResolutionException;\n}",
"CatalogFunction getFunction(ObjectPath functionPath)\n throws FunctionNotExistException, CatalogException;",
"public ExpressionFunction getFunction(String name) { return wrappedSerializationContext.getFunction(name); }",
"private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }",
"private static INaviFunction getFunctionToInline(final JFrame parent,\n final IViewContainer viewContainer, final INaviFunction function,\n final int forwarderModuleId, final IAddress forwarderAddress) {\n if (forwarderAddress == null) {\n return function;\n } else {\n final IDatabase database = viewContainer.getDatabase();\n\n final INaviModule module = database.getContent().getModule(forwarderModuleId);\n\n if (!viewContainer.containsModule(module)) {\n CMessageBox.showInformation(parent, String\n .format(\"You are trying to inline an external function into a module view. \"\n + \"This is not possible.\\n\"\n + \"To inline external functions it is necessary to create projects.\"));\n\n return null;\n }\n\n if (!module.isLoaded()) {\n try {\n module.load();\n } catch (final CouldntLoadDataException | LoadCancelledException e) {\n CUtilityFunctions.logException(e);\n return null;\n }\n }\n\n return module.getContent().getFunctionContainer().getFunction(forwarderAddress);\n }\n }",
"IFunctionLibrary getFunctionLibrary();",
"public interface EntryPoint extends PrioritizedExtension, Startable, Stoppable {\n enum ContextEntries {\n ARGS,\n KERNEL, // may not always exist\n ENTRY_POINTS,\n RUNNING_ENTRY_POINTS,\n ENTRY_POINTS_TEMP,\n KERNEL_EXECUTOR_SERVICE,\n ENTRY_POINT_REGISTRY;\n }\n\n default boolean requiresKernel() {\n return false;\n }\n\n Logger getLogger();\n\n default void initialize(Map<ContextEntries, Object> context) {}\n\n default void finalize(Map<ContextEntries, Object> context) {}\n\n default void start() {\n getLogger().log(Level.INFO, \"entry point starting...\");\n }\n\n default void stop() {\n getLogger().log(Level.INFO, \"entry point stopping...\");\n }\n\n default <T> T getService(Class<T> type) {\n throw new UnsupportedOperationException(\"Empty Entry Point contains no services\");\n }\n\n default <T> boolean exports(Class<T> type) {\n return false;\n }\n\n static Callable<EntryPoint> wrap(EntryPoint entryPoint, Map<ContextEntries, Object> context) {\n return new WrappedEntryPointCallable(entryPoint, context);\n }\n\n default void run(Map<ContextEntries, Object> ctx) {}\n\n Options<?> getOptions();\n}",
"static public interface FunctionHandler\r\n {\r\n public double evaluateFunction(String nam, ArgParser args) throws ArithmeticException;\r\n }",
"abstract Function get(Object arg);",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 194,\n FQN=\"llvm::Module::getFunction\", NM=\"_ZNK4llvm6Module11getFunctionENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZNK4llvm6Module11getFunctionENS_9StringRefE\")\n //</editor-fold>\n public Function /*P*/ getFunction(StringRef Name) /*const*/ {\n return dyn_cast_or_null_Function(getNamedValue(new StringRef(Name)));\n }",
"protected abstract String getFunctionName();",
"public static void main(String[] args) {\n FunctionFactory<Integer, Integer> functionFactory = new FunctionFactory<>();\n // 1. add simple functions \"square\", \"increment\", \"decrement\", \"negative\"\n // 2. get each function by name, and apply to argument 5, print a result (should be 25, 6, 4,-5 accordingly)\n // 3. add simple function \"abs\" using method reference (use class Math)\n // 4. add try/catch block, catch InvalidFunctionNameException and print some error message to the console\n // 5. try to get function with invalid name\n\n functionFactory.addFunction(\"square\", n -> n * n);\n functionFactory.addFunction(\"abs\", Math::abs);\n\n functionFactory.getFunction(\"square\").apply(5);\n try{\n functionFactory.getFunction(\"abs\").apply(5);\n }catch (InvalidFunctionNameException e){\n System.out.println(e.getMessage());\n }\n\n\n\n\n }",
"EntryPointResult evaluate(Object data, String entryPointName, EvaluationConfig evaluationConfig);",
"@Override\r\n\tpublic FuncCallProgramPoint addFuncCallProgramPoint(String name,\r\n\t\t\tString lineNo) {\n\t\treturn null;\r\n\t}",
"@FunctionalInterface\n public interface MainMethod {\n void doMain(String... args) throws Exception;\n }",
"FunCall createFunCall();",
"public Function getStaticMethod(int signature)\r\n\t{\r\n\t\t// search own methods:\r\n\t\tfor (Function fn : staticMethods)\r\n\t\t{\r\n\t\t\tif (fn.signature == signature)\r\n\t\t\t\treturn fn;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public FunctionDefinitionNode lookupFunction(final String functionName) {\n if (isLocalFunction(functionName)) {\n return this.userDefinedFunctions.get(functionName);\n } else {\n if (this.parent != null) {\n return this.parent.lookupFunction(functionName);\n } else {\n throw new InterpreterException(\"Function \" + functionName + \" is not defined.\");\n }\n }\n }",
"@FunctionalInterface\npublic interface ZoneViewFunction {\n /**\n * Get the zone view for a zone.\n * @param zone\n * @param gameObjectViewFunction\n * @return\n */\n ZoneView getZoneView(Zone zone, GameObjectViewFunction gameObjectViewFunction);\n}",
"FunctionAnalytical createFunctionAnalytical();",
"public final EObject entryRuleFunction() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleFunction = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:420:2: (iv_ruleFunction= ruleFunction EOF )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:421:2: iv_ruleFunction= ruleFunction EOF\n {\n newCompositeNode(grammarAccess.getFunctionRule()); \n pushFollow(FOLLOW_ruleFunction_in_entryRuleFunction773);\n iv_ruleFunction=ruleFunction();\n\n state._fsp--;\n\n current =iv_ruleFunction; \n match(input,EOF,FOLLOW_EOF_in_entryRuleFunction783); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"String getDefaultFunctionClass();",
"String getSFunc();",
"public Expression getFunction()\n\t{\n\t\treturn function;\n\t}",
"IfaceSpecial getCallSpecial(IfaceProgramPoint pt,IfaceMethod fm);",
"static Identifier makeFunction(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TOP_LEVEL_FUNCTION, name);\r\n }\r\n }",
"public GrpcFunctionHandle getFunctionHandle(int executableID) {\n\t\t/* get GrpcFunctionHandle by executableID */\n\t\tngLog.printLog(\n\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL, \n\t\t\tNgLog.LOGLEVEL_DEBUG,\n\t\t\tthis,\n\t\t\t\"NgGrpcClient#getFunctionHandle()\");\n\t\t\n\t\t/* search target in list */\n\t\tfor (int i = 0; i < handleList.size(); i++) {\n\t\t\tNgGrpcFunctionHandle handle = null;\n\t\t\ttry {\n\t\t\t\thandle = (NgGrpcFunctionHandle) handleList.get(i);\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\t/* nothing will be done */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (handle.getExecutableID() == executableID) {\n\t\t\t\t/* found */\n\t\t\t\tngLog.printLog(\n\t\t\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL,\n\t\t\t\t\tNgLog.LOGLEVEL_INFO,\n\t\t\t\t\tthis,\n\t\t\t\t\t\"NgGrpcClient#getFunctionHandle(): found target.\");\n\t\t\t\treturn handle;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* not found */\n\t\tngLog.printLog(\n\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL,\n\t\t\tNgLog.LOGLEVEL_INFO,\n\t\t\tthis,\n\t\t\t\"NgGrpcClient#getFunctionHandle(): not found target.\");\n\t\treturn null;\n\t}",
"public interface IEntryPointService {\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic String getPath();\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic Class<? extends EntryPoint> getEntryPointClass();\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic Map<String, String> getProperties();\n}",
"@Override\r\n\tpublic String getFunc() {\n\t\treturn null;\r\n\t}",
"public CompiledFunctionDefinition getFunction() {\n return _function;\n }",
"private Func funcFromNum(int funcNum) {\n Func func = null;\n switch (funcNum) {\n case 0:\t\n func = new Func() {\n public double f(double d) {\n return d == Double.POSITIVE_INFINITY ? 0.0 : 1.0;\n }\t\t\t\n };\t\n break;\n case 1:\n func = new Func() {\n public double f(double d) {\n return d == Double.POSITIVE_INFINITY ? 0.0 : 1.0 + 1.0 / d;\n }\t\t\t\n };\n break;\n case 2:\n func = new Func() {\n public double f(double d) {\n return d == Double.POSITIVE_INFINITY ? 0.0 : 1.0 + Math.sqrt(d);\n }\t\t\t\n };\n break;\n }\n return func;\n }",
"public PartnerFunction findPartnerFunction(Long partnerFunctionUid)\n throws FindEntityException, SystemException, RemoteException;",
"@Override\n public T findByMainFunctionId(String mainFunctionId) {\n Specification<T> specification = (root, criteriaQuery, criteriaBuilder) -> criteriaBuilder.equal(root.get(\"mainFunctionId\"), mainFunctionId);\n return this.findOne(specification);\n }",
"@FunctionalInterface\npublic interface MyFunc {\n\n public String getValue(String str);\n}",
"FunctionArgument getRef();",
"public interface Function {\n /**\n * Get the name of this function.\n *\n * @return The name of the function.\n */\n String getName();\n\n /**\n * Execute this function.\n */\n void execute();\n}",
"Object executeRVMFunction(String uid_func, IValue[] posArgs, Map<String,IValue> kwArgs){\n\t\t// Assumption here is that the function called is not a nested one and does not use global variables\n\t\tFunction func = functionStore[functionMap.get(uid_func)];\n\t\treturn executeRVMFunction(func, posArgs, kwArgs);\n\t}",
"public boolean addFunction(Accessibility pPAccess, SubRoutine pExec, MoreData pMoreData);",
"java.util.concurrent.Future<GetSolFunctionInstanceResult> getSolFunctionInstanceAsync(GetSolFunctionInstanceRequest getSolFunctionInstanceRequest);",
"ProgFunction getProgFunction() {\n\t\treturn func;\n\t}",
"String getFitnessFunction();",
"public Prototype functionLookup(QName name, int arity)\n {\n Function fun = functionLookup(name);\n if (fun == null)\n return null;\n for(Prototype proto : fun.getProtos()) {\n if(proto.qname == name && proto.accepts(arity))\n return proto;\n }\n return null;\n }",
"public static CallSite metafactory(MethodHandles.Lookup caller, String invokedName,\n MethodType invokedType, MethodHandles.Lookup front, String dummy) throws ReflectiveOperationException {\n // System.out.println(\"metafactory : caller = [\" + caller + \"], invokedName = [\" + invokedName + \"], invokedType = [\" + invokedType + \"], front = [\" + front + \"], dummy = [\" + dummy + \"]\");\n List<Class<?>> params = invokedType.parameterList();\n if (params.isEmpty()) {\n throw new AssertionError(\"Missing dynamic parameters!\");\n }\n MethodHandle res = /*front*/caller.findStatic(RT.class, invokedName, invokedType);\n return new ConstantCallSite(res);\n }",
"FeatureCall getFec();",
"public static JSqFunctionInfo sq_getfunctioninfo(JSqVM v, int idx) {\r\n\t\tJSqFunctionInfo res = new JSqFunctionInfo();\r\n\t\tlong upid = sq_getfunctioninfo_native(v.m_nativeHandle, idx, res);\r\n\t\tres.m_funcid = new JSqUserPointer(upid);\r\n\t\treturn res;\r\n\t}",
"String getCaller();",
"public FunctionIterator getFunctions(AddressSetView asv, boolean forward);",
"public FunctionIterator getExternalFunctions();",
"public final EObject entryRuleFeatureCall() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleFeatureCall = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4798:2: (iv_ruleFeatureCall= ruleFeatureCall EOF )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4799:2: iv_ruleFeatureCall= ruleFeatureCall EOF\n {\n currentNode = createCompositeNode(grammarAccess.getFeatureCallRule(), currentNode); \n pushFollow(FOLLOW_ruleFeatureCall_in_entryRuleFeatureCall8369);\n iv_ruleFeatureCall=ruleFeatureCall();\n _fsp--;\n\n current =iv_ruleFeatureCall; \n match(input,EOF,FOLLOW_EOF_in_entryRuleFeatureCall8379); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"OUT apply(IN argument);",
"<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;",
"org.globus.swift.language.Function addNewFunction();",
"public static native Fts5ExtensionApi getInstance();",
"private SAMLEntryPoint getSamlEntryPoint(SAMLContextProviderImpl contextProvider, SAMLProcessorImpl processor, CachingMetadataManager metadata) throws Exception {\n\t\tSAMLEntryPoint samlEntryPoint = new SAMLEntryPoint();\n\t\tsamlEntryPoint.setMetadata(metadata);\n\t\tsamlEntryPoint.setDefaultProfileOptions(getDefaultWebSSOProfileOptions());\n\t\tsamlEntryPoint.setWebSSOprofile(getWebSSOprofile(processor, metadata));\n\t\tsamlEntryPoint.setWebSSOprofileECP(getEcpprofile(processor, metadata));\n\t\tsamlEntryPoint.setSamlLogger(getSamlLogger());\n\t\tsamlEntryPoint.setContextProvider(contextProvider);\n\t\tsamlEntryPoint.setSamlDiscovery(getSamlIDPDiscovery());\n\n\t\tsamlEntryPoint.afterPropertiesSet();\n\t\treturn samlEntryPoint;\n\t}",
"public Object\n call() throws Exception { \n final ConstArray<?> argv;\n try {\n argv = deserialize(m,\n ConstArray.array(lambda.getGenericParameterTypes()));\n } catch (final BadSyntax e) {\n /*\n * strip out the parsing information to avoid leaking\n * information to the application layer\n */ \n throw (Exception)e.getCause();\n }\n \n // AUDIT: call to untrusted application code\n final Object r = Reflection.invoke(bubble(lambda), target,\n argv.toArray(new Object[argv.length()]));\n return Fulfilled.isInstance(r) ? ((Promise<?>)r).call() : r;\n }",
"UserFunction getUserFunctions(int index);",
"static Func getInstance(Stats stat)\n\t\t{\n\t\t\tint pos = stat.ordinal();\n\n\t\t\tif (_instancies[pos] == null)\n\t\t\t{\n\t\t\t\t_instancies[pos] = new FuncMultRegenResting(stat);\n\t\t\t}\n\n\t\t\treturn _instancies[pos];\n\t\t}",
"protected final <T> T getLocalCache(CacheKeyMain<T> key, Callable<T> caller){\n try {\n return key.cast(spanMainCache.get(key, caller));\n } catch (ExecutionException e) {\n throw new RuntimeException(e.getCause());\n }\n }",
"static KeyExtractor.Factory forSingleMember(Function<Class<?>, Member> keyLookupFn) {\n Objects.requireNonNull(keyLookupFn, \"keyLookupFn\");\n return entityType -> new KeyExtractors.SingleMember(entityType, keyLookupFn.apply(entityType));\n }",
"boolean hasFunction(String functionName);",
"<T> T get(String key, Callable<? extends T> valueLoader);",
"int main()\n{\n int a;\n cin>>a;\n cout<<func(a);\n}",
"public IFunctionAdaptor getFunctionAdaptorImpl()\n\t{\n\t\treturn functionAdaptorImpl;\n\t}",
"public Node function()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.IDENTIFIER)\r\n\t\t{\r\n\t\t\tString name = lexer.getString();\r\n\t\t\tif(lexer.getToken()==Lexer.Token.LEFT_BRACKETS)\r\n\t\t\t{\r\n\t\t\t\tNode exp = expression();\r\n\t\t\t\tif(exp!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(lexer.getToken()==Lexer.Token.RIGHT_BRACKETS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(name.equals(\"sin\")) return new Sin(exp);\r\n\t\t\t\t\t\tif(name.equals(\"cos\")) return new Cos(exp);\r\n\t\t\t\t\t\tif(name.equals(\"tan\")) return new Tan(exp);\r\n\t\t\t\t\t\tif(name.equals(\"log\")) return new Log(exp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn null;\r\n\t}",
"public int f(int x, int y) {\n switch (function_id) {\n case 1:\n return x + y;\n case 2:\n return x * y;\n default:\n throw new RuntimeException(\"Not Implement\");\n }\n }",
"public int getFunction() {\n\t\treturn var;\n\t}",
"public static void main(String[] args){\t \n\t FunctionTest ft = ()-> System.out.println(\"Hola Mundo\");\n ft.saludar();\n\t}",
"public static <T> Function<T, Boolean> asFunction(Predicate<T> predicate) {\n\t\treturn predicate::test;\n\t}",
"public interface FunctionEvaluator {\n\t/*\n\t * Evaluate the given function if possible. Otherwise should return null.\n\t */\n\tpublic MathObject evaluate(Function input);\n}",
"@Override\n\tpublic Mfunction getById(Long id) {\n\t\treturn mfunctionDao.getById(id);\n\t}",
"TblBTSSysFunctionDO selectByPrimaryKey(String funcId);",
"public final EObject entryRuleEntrypoint() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleEntrypoint = null;\r\n\r\n\r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1213:2: (iv_ruleEntrypoint= ruleEntrypoint EOF )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1214:2: iv_ruleEntrypoint= ruleEntrypoint EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getEntrypointRule()); \r\n }\r\n pushFollow(FOLLOW_ruleEntrypoint_in_entryRuleEntrypoint2571);\r\n iv_ruleEntrypoint=ruleEntrypoint();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleEntrypoint; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleEntrypoint2581); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }"
] | [
"0.64668787",
"0.6388804",
"0.61625946",
"0.6118455",
"0.5725489",
"0.572476",
"0.5654485",
"0.5632495",
"0.5630257",
"0.55936706",
"0.5591986",
"0.5552564",
"0.5541692",
"0.5518687",
"0.5506871",
"0.54619956",
"0.5419243",
"0.53613955",
"0.5339716",
"0.5297395",
"0.52972114",
"0.5291173",
"0.52652824",
"0.52492017",
"0.52168393",
"0.51970696",
"0.51868045",
"0.518528",
"0.517892",
"0.51768744",
"0.5176297",
"0.51737523",
"0.51622266",
"0.5153642",
"0.5098888",
"0.5094852",
"0.50261366",
"0.50243354",
"0.5014043",
"0.4996261",
"0.49617484",
"0.49389637",
"0.49374175",
"0.48673964",
"0.48575616",
"0.48142973",
"0.4804214",
"0.48036504",
"0.4757833",
"0.47506025",
"0.47391352",
"0.4709137",
"0.47048903",
"0.46966577",
"0.469316",
"0.46872735",
"0.4679745",
"0.46655813",
"0.4644891",
"0.46368247",
"0.46209672",
"0.4579242",
"0.45754933",
"0.4561258",
"0.4560493",
"0.45458624",
"0.454071",
"0.45337552",
"0.45226693",
"0.45223507",
"0.45038077",
"0.4502988",
"0.44897914",
"0.44748303",
"0.4474125",
"0.4466979",
"0.44586056",
"0.44548342",
"0.44516864",
"0.4451408",
"0.44479233",
"0.44368798",
"0.4432785",
"0.44263956",
"0.44235915",
"0.4421782",
"0.44196838",
"0.4413002",
"0.44034842",
"0.44029796",
"0.44026908",
"0.4392339",
"0.4391351",
"0.43912727",
"0.4388659",
"0.43744",
"0.43697765",
"0.435913",
"0.43584776",
"0.4356228"
] | 0.80902565 | 0 |
Returns a list of all global functions with the given name. | public List<Function> getGlobalFunctions(String name); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Function> getFunctions(String namespace, String name);",
"public Set<String> getRegisteredFunctions();",
"public Map<String, Function> getGlobalFnMap() {\n return getGlobalFnMap(DEFAULT_LOCALE);\n }",
"public Collection<IFunction> getAllFunctions()\r\n\t{\r\n\t\treturn expressionRegistry.getAllFunctions();\r\n\t}",
"public String[] getNames() {\n\t\tString[] names = new String[functions.size()];\n\t\tint index = 0;\n\t\tfor (Enumeration en = functions.keys(); en.hasMoreElements(); index++) {\n\t\t\tnames[index] = (String) en.nextElement();\n\t\t}\n\t\treturn names;\n\t}",
"public List<CALFunction> getFunctions() {\n List<CALFunction> result = new ArrayList<>(functionsObject.functions.values());\n Collections.sort(result, new Comparator<CALFunction>() {\n public int compare(CALFunction f1, CALFunction f2) {\n return f1.toString().compareTo(f2.toString());\n }\n });\n return result;\n }",
"public final List<DepFunction> getFunctions() {\n\t\treturn new LinkedList<>(this.functionMap.values());\n\t}",
"static public Object[] getFuncionesName() {\n if (funcionesName == null) {\n addFuncionesName();\n }\n return funcionesName.toArray();\n\n }",
"public String getFunctions();",
"public Object getGlobal(String name) {\n return globals.get(name);\n }",
"public List<Function> getFunctions(){\n\t\t\n\t\treturn null;\n\t}",
"public List<Identifier> getGlobalVars(){\n final List<Identifier> globs = new ArrayList<>();\n\n globalVariables.keySet().stream()\n .map(x -> new Identifier(Scope.GLOBAL, Type.VARIABLE, x, globalVariables.get(x)))\n .forEach(globs::add);\n\n return globs;\n }",
"private Map<String, Object> collectGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n MethodLibrary.addBindingsToBuilder(envBuilder);\n Runtime.addConstantsToBuilder(envBuilder);\n return envBuilder.build();\n }",
"@Override\n public List<Function> getFunctions() {\n if (!isLoaded()) {\n throw new IllegalStateException(\"Error: The module is not loaded\");\n }\n\n return new ArrayList<Function>(m_functions);\n }",
"protected Set<AeScriptFuncDef> findFunctions() {\r\n AeXPathFunctionNodeVisitor visitor = new AeXPathFunctionNodeVisitor();\r\n getXPathAST().visitAll(visitor);\r\n return visitor.getFunctions();\r\n }",
"@Override\r\n\tpublic List<Function> getFunctionByModulesAndName(Modules modules, String name) {\n\t\tString hql = \"from Function f where f.modules.name=? and f.name =?\";\r\n\t\treturn (List<Function>) getHibernateTemplate().find(hql, modules, name);\r\n\t}",
"protected List<String> getFunctionAliases(Function f) {\n List<String> ret = new ArrayList<String>();\n\n for (String curF : callMap.keySet()) {\n for (Function curFunc : callMap.get(curF)) {\n if(curFunc.getName().equals(f.getName())) {\n ret.add(curF);\n break;\n }\n }\n }\n\n return ret;\n }",
"org.globus.swift.language.Function[] getFunctionArray();",
"public List getStaticImports(String name)\n {\n List l = (List) staticImports.get(name);\n if (l == null)\n l = Collections.EMPTY_LIST;\n return l;\n }",
"@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(String groupName\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+groupName+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}",
"public static Set<Symbol> getGlobalSymbols(Traversable t) {\n while (true) {\n if (t instanceof TranslationUnit) {\n break;\n }\n t = t.getParent();\n }\n TranslationUnit t_unit = (TranslationUnit)t;\n return getVariableSymbols(t_unit);\n }",
"public FunctionInfo[] getFunctions() {\n/* 236 */ return this.functions;\n/* */ }",
"public static List<String> getFunctions(String toAppend) {\n return appendAll(FUNCTIONS, toAppend);\n }",
"public List<Dim> getGlobals(){\n\t\t\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<Function> getAllFunction() {\n\t\tString hql = \"from Function\";\r\n\t\treturn (List<Function>) getHibernateTemplate().find(hql);\r\n\t}",
"public Map<String, Object> getGlobals() {\n return globals;\n }",
"static public List<GlobalSimilarityNode> getFunciones() {\n if (funciones == null) {\n addFunciones();\n }\n return funciones;\n }",
"public FunctionInfo getFunction(String name) {\n/* 251 */ if (this.functions == null || this.functions.length == 0) {\n/* 252 */ System.err.println(\"No functions\");\n/* 253 */ return null;\n/* */ } \n/* */ \n/* 256 */ for (int i = 0; i < this.functions.length; i++) {\n/* 257 */ if (this.functions[i].getName().equals(name)) {\n/* 258 */ return this.functions[i];\n/* */ }\n/* */ } \n/* 261 */ return null;\n/* */ }",
"java.util.List<org.mojolang.mojo.lang.FuncDecl> \n getMethodsList();",
"private static void addFuncionesName() {\n\n funcionesName = new ArrayList<String>();\n if (funciones == null) {\n addFunciones();\n }\n Iterator it = funciones.iterator();\n while (it.hasNext()) {\n funcionesName.add(((GlobalSimilarityNode) it.next()).getName());\n }\n }",
"public List<?> getAllFuncs() throws DataAccessException {\n\t\treturn (List<?>) mapper.getAllFuncs();\r\n\t}",
"Iterable<String> getRegisteredNames();",
"java.util.List<UserFunction>\n getUserFunctionsList();",
"java.util.List<AggregateFunction>\n getAggregateFunctionsList();",
"@Override\n\tpublic Map<String, FREFunction> getFunctions() \n\t{\n\t\tLog.d(TAG, \"Registering Extension Functions\");\n\t\tMap<String, FREFunction> functionMap = new HashMap<String, FREFunction>();\n\t\tfunctionMap.put(\"isInstalled\", new IsInstalledFunction());\n\t\tfunctionMap.put(\"shareText\", new ShareTextFunction());\n\t\tfunctionMap.put(\"shareImage\", new ShareImageFunction());\n\t\t// add other functions here\n\t\treturn functionMap;\t\n\t}",
"@Override\n\tpublic List<Function> findAll() {\n\t\treturn functionDao.findAll();\n\t}",
"public Map<String, Object> getGlobals() {\n return Collections.unmodifiableMap(globals);\n }",
"public ImmutableMap<String, Object> getExportedGlobals() {\n ImmutableMap.Builder<String, Object> result = new ImmutableMap.Builder<>();\n for (Map.Entry<String, Object> entry : globals.entrySet()) {\n if (exportedGlobals.contains(entry.getKey())) {\n result.put(entry);\n }\n }\n return result.build();\n }",
"public boolean containFunction(String name) {\n\t\tif (!global.containFunction(name)) {\r\n\t\t\treturn this.fnMap.containsKey(name);\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}",
"public FunctionIterator getExternalFunctions();",
"public Map<String, String> getFuncNameMap() {\n\t\treturn funcNameMap;\n\t}",
"List<String> listFunctions(String dbName) throws DatabaseNotExistException, CatalogException;",
"@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();",
"private Function[] getFunctionObjects() throws Exception{\n String[] sFunctions = getStringProperty(ParameterList.FUNCTION_LIST, false).split(\",\");\n ArrayList<Function> functionArray = new ArrayList<Function>();\n \n for(String str : sFunctions){\n try{\n str = str.trim();\n Class<?> function = Class.forName(str);\n functionArray.add((Function)function.newInstance());\n }\n catch(ClassNotFoundException e){\n throw new ClassNotFoundException(\"Error loading the function set. Class \" + str + \" not found\", e);\n }\n }\n \n return functionArray.toArray(new Function[functionArray.size()]);\n }",
"public List<SearchableInfo> getSearchablesInGlobalSearch() {\n return getSearchables(UserHandle.getCallingUserId()).getSearchablesInGlobalSearchList();\n }",
"@Override\n public Set<String> getNames() {\n // TODO(adonovan): for now, the resolver treats all predeclared/universe\n // and global names as one bucket (Scope.PREDECLARED). Fix that.\n // TODO(adonovan): opt: change the resolver to request names on\n // demand to avoid all this set copying.\n HashSet<String> names = new HashSet<>();\n for (Map.Entry<String, Object> bind : getTransitiveBindings().entrySet()) {\n if (bind.getValue() instanceof FlagGuardedValue) {\n continue; // disabled\n }\n names.add(bind.getKey());\n }\n return names;\n }",
"void clearFunctionGroupInfo (String name) {\r\n functionNameToFunctionGroup.remove(name);\r\n }",
"private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }",
"GlobalsType getGlobals();",
"List<Defines> getDefines();",
"public static HashMap<String, Integer> scanForFunctions(Document doc, String filename) {\n\n long startTime = System.currentTimeMillis();\n // grab all function nodes\n NodeList list = doc.getElementsByTagName(\"call\");\n\n // get map of all the unsafeCommands to check against\n HashMap<String, Integer> unsafeCommandsMap = getMethodMap(filename);\n\n // loop through functions and find the name of the function\n for (int i = 0; i < list.getLength(); i++) {\n\n // Grab all the children of the current function call\n NodeList childrenNodesCall = list.item(i).getChildNodes();\n\n // loop through the children trying to grab their names\n for (int k = 0; k < childrenNodesCall.getLength(); k++) {\n\n // temp for the current child node\n Node currNode = childrenNodesCall.item(k);\n\n // temp for the current child node tag name\n String currNodeName = currNode.getNodeName();\n\n // temp for the current child node text content\n String currMethodName = currNode.getTextContent();\n // if the current node is the name tag and the function is unsafe put it into the map\n if (currNodeName.equals(\"name\") && unsafeCommandsMap.containsKey(currMethodName)/* && !wrappedWithIf.contains(currNode)*/) {\n\n int currValue = unsafeCommandsMap.get(currMethodName);\n unsafeCommandsMap.put(currMethodName, currValue + 1);\n }\n }\n\n }\n return unsafeCommandsMap;\n }",
"FunctionGroupInfo getFunctionGroupInfo (QualifiedName functionName) {\r\n MachineFunction mf = getFunction(functionName);\r\n if (mf != null) {\r\n return getFunctionGroupInfo(mf);\r\n } \r\n \r\n if (functionName.getModuleName().equals(getName())) {\r\n return functionNameToFunctionGroup.get(functionName.getUnqualifiedName());\r\n }\r\n return null;\r\n }",
"@VisibleForTesting\n public ImmutableCollection<String> getDefines() {\n return ccCompilationContext.getDefines();\n }",
"public Object[] visibaleRefencesMatchingFunctionType(final EObject ctx, final ExpressionVariable fd) {\n final HashSet<ExpressionVariable> exprVars = FunctionValidatorUtil.allInscopeExpressionVariables(ctx);\n final Predicate<ExpressionVariable> _function = (ExpressionVariable e) -> {\n return (e.getName().equals(fd.getName()) && FunctionValidatorUtil.isGlobalFuncType(e));\n };\n final Object[] funcArray = exprVars.stream().filter(_function).toArray();\n return funcArray;\n }",
"public MathFunction[] getFunctions() {\n return func.clone ();\n }",
"@Override\n\tpublic Map<String, FREFunction> getFunctions() {\n\t\tMap<String,FREFunction> functions = new HashMap<String, FREFunction>();\n\t\tfunctions.put(RegisterPushFunction.TAG, new RegisterPushFunction());\n\t\tfunctions.put(UnRegisterPushFunction.TAG, new UnRegisterPushFunction());\n\t\tfunctions.put(DeleteTagFunction.TAG, new DeleteTagFunction());\n\t\tfunctions.put(SetTagFunction.TAG, new SetTagFunction());\n\t\tfunctions.put(AddLocalNotificationFunction.TAG,new AddLocalNotificationFunction());\n\t\tfunctions.put(ClearLocalNotificationFunction.TAG,new ClearLocalNotificationFunction());\n\t\treturn functions;\n\t}",
"public List<GlobalStateDataControl> getGlobalStates( ) {\r\n\r\n return globalStatesDataControlList;\r\n }",
"Iterable<T> getFunctions();",
"public java.util.List<AggregateFunction> getAggregateFunctionsList() {\n if (aggregateFunctionsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(aggregateFunctions_);\n } else {\n return aggregateFunctionsBuilder_.getMessageList();\n }\n }",
"public java.util.List<UserFunction> getUserFunctionsList() {\n if (userFunctionsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(userFunctions_);\n } else {\n return userFunctionsBuilder_.getMessageList();\n }\n }",
"public String[] getLocalNames() {\r\n\t\treturn names.toArray(new String[0]);\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic static ArrayList<String> listObjects(String name){\n\t\tRegistryInterface stub = null;\n\t\ttry{\n\t\t\tstub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t}catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn (ArrayList<String>)stub.listObjects(name);\n\t\t\t\n\t}",
"@Override\n\tpublic List<AuthFunction> findAll() {\n\t\treturn authFunctionDao.findAll();\n\t}",
"public Symbol findEntryGlobal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}",
"public Map<String, Object> getBzlGlobals() {\n return bzlGlobals;\n }",
"@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}",
"private List<Command> getCommands(String name) {\r\n\t\tList<Command> result = new ArrayList<>();\r\n\t\tfor (Command command : commands) {\r\n\t\t\tif (command.name().equals(name) || command.aliases().contains(name)) {\r\n\t\t\t\tresult.add(command);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (LearnedCommand command : learnedCommands) {\r\n\t\t\tif (command.name().equals(name) || command.aliases().contains(name)) {\r\n\t\t\t\tresult.add(command);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public List<Macrodef> getLocalMacrodefs()\n {\n return localMacrodefs;\n }",
"public Object[] getGlobalResourceList() {\n return this.getList(AbstractGIS.INQUIRY_GLOBAL_RESOURCE_LIST);\n }",
"public Set<ScopeEventListener> getScopeRegistrationListeners();",
"public ListFunctionsResult listFunctions() throws AmazonServiceException, AmazonClientException {\n return listFunctions(new ListFunctionsRequest());\n }",
"public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}",
"String getFunctionName();",
"List<String> getSystemPackages();",
"public static Set<DockingActionIf> getActionsByName(Tool tool, String name) {\n\n\t\tSet<DockingActionIf> result = new HashSet<>();\n\n\t\tSet<DockingActionIf> toolActions = tool.getAllActions();\n\t\tfor (DockingActionIf action : toolActions) {\n\t\t\tif (action.getName().equals(name)) {\n\t\t\t\tresult.add(action);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private HashSet < Symbol > getUsedSymbols ()\n {\n HashSet < Symbol > symbols = new HashSet < Symbol > ();\n for ( LeafNode l : this.regexNode.getTokenNodes () )\n {\n if ( l instanceof TokenNode )\n {\n TokenNode t = ( TokenNode ) l;\n symbols.add ( new DefaultSymbol ( t.getName () ) );\n }\n }\n return symbols;\n }",
"@Override\n public List<String> call() {\n List<String> nameList = null;\n nameList = doScan(basePackage, new ArrayList<>());\n\n return nameList;\n }",
"public java.util.List<AggregateFunction.Builder>\n getAggregateFunctionsBuilderList() {\n return getAggregateFunctionsFieldBuilder().getBuilderList();\n }",
"@Override\r\n\tpublic List<Function> getFunctionByModulesByPager(Modules modules, PagerUtil pager) {\n\t\tString hql = \"from Function f where f.modules.name=? \";\r\n\t\treturn getListByPage(hql, pager, modules.getName());\r\n\t}",
"public boolean isGlobal();",
"public Set<String> getEnteringFunctionNames() {\n Set<String> results = new HashSet<>();\n Set<CFANode> visited = new HashSet<>();\n Queue<CFANode> waitlist = new ArrayDeque<>();\n waitlist.offer(this);\n while (!waitlist.isEmpty()) {\n CFANode current = waitlist.poll();\n if (visited.add(current)) {\n if (current.getFunctionName()\n .equals(CFASingleLoopTransformation.ARTIFICIAL_PROGRAM_COUNTER_FUNCTION_NAME)) {\n waitlist.addAll(CFAUtils.allPredecessorsOf(current).toList());\n } else {\n results.add(current.getFunctionName());\n }\n }\n }\n return results;\n }",
"public static boolean isLibFunction(String name) {\n return name.equals(\"_xi_alloc\") || name.equals(\"_xi_out_of_bounds\");\n }",
"@Override\r\n\tpublic List<Modules> getModulesByName(String name) {\n\t\tString hql = \"from Modules m where m.name =?\";\r\n\t\treturn (List<Modules>) getHibernateTemplate().find(hql, name);\r\n\r\n\t}",
"public List<T> getAll(String name) {\n\t\tList<T> result = new ArrayList<T>();\n\t\tint sz = size();\n\t\tfor (int i = 0; i < sz; i++) {\n\t\t\tString n = getName(i);\n\t\t\tif (name == n || (name != null && name.equals(n))) {\n\t\t\t\tresult.add(getVal(i));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"static List<Pair<String, LinkedList<String>>> getAllTraceForPackage(@NonNull String packageName) {\n final StackTraceElement[] ste = Thread.currentThread().getStackTrace();\n final LinkedList<Pair<String, LinkedList<String>>> packageCalls = new LinkedList<>();\n\n for (int index = ste.length - 1; index >= 0; --index) {\n if (ste[index].getClassName().contains(packageName)) {\n final boolean isAnonymousClass = ste[index].getClassName().contains(\"$\");\n final String className = getClassNameFromFileName(ste[index].getFileName());\n String methodName = ste[index].getMethodName() + \"()\";\n\n if (methodName.contains(\"access$\")) {\n // Those are compiler generated methods used for accessing members of a (host)\n // class from an anon class. We are not interested in displaying them\n continue;\n }\n\n if (packageCalls.size() > 0) {\n if (className.equals(packageCalls.getLast().first)) {\n if (!isAnonymousClass) {\n // add a second method to the same class then continue\n packageCalls.getLast().second.add(methodName);\n\n } else {\n final String callingMethodName = packageCalls.getLast().second.removeLast();\n methodName = String.format(Locale.UK, \"%s <- %s#%s\", methodName, packageCalls.getLast().first, callingMethodName);\n packageCalls.getLast().second.add(methodName);\n }\n continue;\n }\n }\n\n if (!isAnonymousClass) {\n final LinkedList<String> methodCalls = new LinkedList<>();\n methodCalls.add(ste[index].getMethodName());\n\n packageCalls.add(new Pair<>(className, methodCalls));\n } else {\n StringBuilder callingMethodsName = new StringBuilder();\n for (String methodCall : packageCalls.getLast().second) {\n callingMethodsName.append('#').append(methodCall);\n }\n methodName = String.format(Locale.UK, \"%s <- %s%s()\", methodName, packageCalls.getLast().first, callingMethodsName.toString());\n packageCalls.removeLast();\n packageCalls.getLast().second.add(methodName);\n }\n }\n }\n\n return packageCalls;\n }",
"public static boolean isFunction(String name) {\n return isNonLibFunction(name) || isLibFunction(name);\n }",
"public static final Locale[] getAvailableLocales(String baseName, ClassLoader loader)\n/* */ {\n/* 448 */ return getAvailEntry(baseName, loader).getLocaleList();\n/* */ }",
"public java.util.List<UserFunction.Builder>\n getUserFunctionsBuilderList() {\n return getUserFunctionsFieldBuilder().getBuilderList();\n }",
"public List<Identifier> getLocals(Function f){\n Map<String, Integer> variableScope = localVariableScopes.get(f);\n \n List<Identifier> locals = variableScope\n .keySet()\n .stream()\n .map(x -> new Identifier(Scope.LOCAL, Type.VARIABLE, x, variableScope.get(x).toString()))\n .collect(Collectors.toList());\n\n return locals;\n }",
"static Method[] getAllDeclaredMethods(String testsClassName) {\n\n Class<?> testsClazz = getClassObject(testsClassName);\n\n //Get all methods from file\n Method[] methods = testsClazz.getDeclaredMethods();\n\n\n if (methods.length != 0) {\n return methods;\n } else {\n log.error(\"В классе {} нет ни одного метода !\", testsClazz);\n return new Method[0];\n }\n\n\n }",
"public static ArrayList<GlobalHeader> GetGlobals(Path fileName) {\n ArrayList<GlobalHeader> AssList = new ArrayList<>();\n int commsNumber;\n try {\n\n Document doc = getDocument(fileName);\n\n NodeList ctrlList = doc.getElementsByTagName( \"commsController\" );\n for (int ctrlLoopCnt = 0; ctrlLoopCnt < ctrlList.getLength(); ctrlLoopCnt++) {\n Node ctrlNode = ctrlList.item( ctrlLoopCnt );\n if (ctrlNode.getNodeType() == Node.ELEMENT_NODE) {\n Element ctrlElement = (Element) ctrlNode;\n commsNumber = Integer.parseInt( ctrlElement.getAttribute( \"address\" ) );\n\n NodeList globalTableNodeList = ctrlNode.getChildNodes();\n\n for (int globalTableNodeCnt = 0; globalTableNodeCnt < globalTableNodeList.getLength(); globalTableNodeCnt++) {\n Node globalTableNode = globalTableNodeList.item( globalTableNodeCnt );\n if (globalTableNode.getNodeType() == Node.ELEMENT_NODE) {\n int dotNetNo;\n int number = 0;\n String name;\n int servicePeriod;\n String pointType;\n int id;\n int hasModule;\n int runBurstLength;\n\n NodeList globalList = globalTableNode.getChildNodes();\n for (int globalNodeCount = 0; globalNodeCount < globalList.getLength(); globalNodeCount++) {\n Node globalNode = globalList.item( globalNodeCount );\n if (globalNode.getNodeType() == Node.ELEMENT_NODE) {\n\n Element globalElement = (Element) globalNode;\n dotNetNo = commsNumber;\n if (!globalTableNode.getNodeName().equals( \"temporary\" )) {\n number = Integer.parseInt( globalElement.getAttribute( \"number\" ) );\n }\n name = globalElement.getAttribute( \"name\" );\n servicePeriod = Integer.parseInt( globalElement.getAttribute( \"servicePeriod\" ) );\n pointType = globalElement.getAttribute( \"pointType\" );\n id = Integer.parseInt( globalElement.getAttribute( \"id\" ) );\n hasModule = Integer.parseInt( globalElement.getAttribute( \"hasModule\" ) );\n\n if (globalTableNode.getNodeName().equals( \"local\" )) {\n GlobalLocal Glocals = new GlobalLocal();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n Glocals.setDefaultValue( Double.parseDouble( globalElement.getElementsByTagName( \"defaultValue\" ).item( 0 ).getTextContent() ) );\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n if (globalSubNode.getNodeName().contentEquals( \"source\" )) {\n String fieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.source.setFieldControllerAddress( Integer.parseInt( fieldCtrlAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.source.setPointAddress( Integer.parseInt( pointAddress ) );\n\n if (((Element) globalSubNode).hasAttribute( \"ScheduleOnTimePointAddress\" )) {\n String schedOnTimePointAddress = ((Element) globalSubNode).getAttributeNode( \"ScheduleOnTimePointAddress\" ).getValue();\n Glocals.source.setScheduleOnTimePointAddress( Integer.parseInt( schedOnTimePointAddress ) );\n }\n if (((Element) globalSubNode).hasAttribute( \"ScheduleOffTimePointAddress\" )) {\n String scheduleOffTimePointAddress = ((Element) globalSubNode).getAttributeNode( \"ScheduleOffTimePointAddress\" ).getValue();\n Glocals.source.setScheduleOffTimePointAddress( Integer.parseInt( scheduleOffTimePointAddress ) );\n }\n }\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"destination\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.destination.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.destination.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"broadcast\" )) {\n String destFieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"destinationFieldControllers\" ).getValue();\n Glocals.broadcast.setDestinationFieldControllers( destFieldCtrlAddress );\n }\n }\n AssList.add( Glocals );\n }\n\n if (globalTableNode.getNodeName().equals( \"wideDestination\" )) {\n GlobalWideDestination Glocals = new GlobalWideDestination();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n Glocals.setDefaultValue( Double.parseDouble( globalElement.getElementsByTagName( \"defaultValue\" ).item( 0 ).getTextContent() ) );\n Glocals.setConnectionNumber( Integer.parseInt( globalElement.getElementsByTagName( \"wideConnectionNumber\" ).item( 0 ).getTextContent() ) );\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n\n if (globalSubNode.getNodeName().contentEquals( \"destination\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.destination.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.destination.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"broadcast\" )) {\n String destFieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"destinationFieldControllers\" ).getValue();\n Glocals.broadcast.setDestinationFieldControllers( destFieldCtrlAddress );\n }\n }\n }\n AssList.add( Glocals );\n }\n\n if (globalTableNode.getNodeName().equals( \"wideSource\" )) {\n GlobalWideSource Glocals = new GlobalWideSource();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n Glocals.setDefaultValue( Double.parseDouble( globalElement.getElementsByTagName( \"defaultValue\" ).item( 0 ).getTextContent() ) );\n Glocals.setConnectionNumber( Integer.parseInt( globalElement.getElementsByTagName( \"wideConnectionNumber\" ).item( 0 ).getTextContent() ) );\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n\n if (globalSubNode.getNodeName().contentEquals( \"source\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.source.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.source.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n }\n }\n AssList.add( Glocals );\n }\n\n if (globalTableNode.getNodeName().equals( \"temporary\" )) {\n GlobalTemporary Glocals = new GlobalTemporary();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n Glocals.setDefaultValue( Double.parseDouble( globalElement.getElementsByTagName( \"defaultValue\" ).item( 0 ).getTextContent() ) );\n runBurstLength = Integer.parseInt( globalElement.getAttribute( \"RunBurstLength\" ) );\n Glocals.setRunBurstLength( runBurstLength);\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n if (globalSubNode.getNodeName().contentEquals( \"source\" )) {\n String fieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.source.setFieldControllerAddress( Integer.parseInt( fieldCtrlAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.source.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"destination\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.destination.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.destination.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"default\" )) {\n Double max = Double.parseDouble(globalElement.getElementsByTagName( \"maximumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setMaxAddresses(max);\n Double min = Double.parseDouble(globalElement.getElementsByTagName( \"minimumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setMinAddresses(min);\n Double sum = Double.parseDouble(globalElement.getElementsByTagName( \"sumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setSumAddresses(sum);\n Double average = Double.parseDouble(globalElement.getElementsByTagName( \"averageValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setAverageAddresses(average);\n }\n\n }\n AssList.add( Glocals );\n }\n\n if (globalTableNode.getNodeName().equals( \"smart\" )) {\n GlobalSmart Glocals = new GlobalSmart();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n runBurstLength = Integer.parseInt( globalElement.getAttribute( \"RunBurstLength\" ) );\n Glocals.setRunBurstLength( runBurstLength);\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n if (globalSubNode.getNodeName().contentEquals( \"source\" )) {\n String fieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.source.setFieldControllerAddress( Integer.parseInt( fieldCtrlAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.source.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"destination\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.destination.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.destination.setPointAddress( Integer.parseInt( pointAddress ) );\n\n int max = Integer.parseInt(globalElement.getElementsByTagName( \"maximumAddress\" ).item( 0 ).getTextContent() );\n Glocals.destination.setMaxAddresses(max);\n int min = Integer.parseInt(globalElement.getElementsByTagName( \"minimumAddress\" ).item( 0 ).getTextContent() );\n Glocals.destination.setMinAddresses(min);\n int sum = Integer.parseInt(globalElement.getElementsByTagName( \"sumAddress\" ).item( 0 ).getTextContent() );\n Glocals.destination.setSumAddresses(sum);\n int average = Integer.parseInt(globalElement.getElementsByTagName( \"averageAddress\" ).item( 0 ).getTextContent() );\n Glocals.destination.setAverageAddresses(average);\n\n\n\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"default\" )) {\n Double max = Double.parseDouble(globalElement.getElementsByTagName( \"maximumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setMaxAddresses(max);\n Double min = Double.parseDouble(globalElement.getElementsByTagName( \"minimumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setMinAddresses(min);\n Double sum = Double.parseDouble(globalElement.getElementsByTagName( \"sumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setSumAddresses(sum);\n Double average = Double.parseDouble(globalElement.getElementsByTagName( \"averageValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setAverageAddresses(average);\n }\n }\n AssList.add( Glocals );\n }\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return AssList;\n }",
"public static synchronized String[] getModeNames() {\n\n\tString names[] = new String[registryModes.size()];\n\n\tint i = 0;\n\n for (Enumeration e = registryModes.keys(); e.hasMoreElements();) {\n CaselessStringKey key = (CaselessStringKey)e.nextElement();\n\n\t names[i++] = key.getName();\n\t}\n\n\tif (i <= 0)\n\t return null;\n\n\treturn names;\n }",
"@Override\n public java.util.List<UserFunction> getUserFunctionsList() {\n return userFunctions_;\n }",
"public List getStaticWildcardImports()\n {\n return staticWildcardImports;\n }",
"public Map<String, ?> getAll() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n return sharedPreferences.getAll();\r\n }",
"public static Map<String, String> filterGlobalTypes(final String packageName,\n final Imports imports,\n final Map<String, String> packageGlobalTypes) {\n final Map<String, String> scopedGlobalTypes = new HashMap<String, String>();\n for (Map.Entry<String, String> e : packageGlobalTypes.entrySet()) {\n final String globalQualifiedType = e.getValue();\n final String globalPackageName = getPackageName(globalQualifiedType);\n final String globalTypeName = getTypeName(globalQualifiedType);\n\n if (globalPackageName.equals(packageName) || isImported(globalQualifiedType,\n imports)) {\n scopedGlobalTypes.put(e.getKey(),\n globalTypeName);\n }\n }\n return scopedGlobalTypes;\n }",
"public Map getKeyMethodMap() {\r\n\t\tMap map = new HashMap();\r\n\r\n\t\tString pkg = this.getClass().getPackage().getName();\r\n\t\tResourceBundle methods = ResourceBundle.getBundle(pkg\r\n\t\t\t\t+ \".LookupMethods\");\r\n\r\n\t\tEnumeration keys = methods.getKeys();\r\n\r\n\t\twhile (keys.hasMoreElements()) {\r\n\t\t\tString key = (String) keys.nextElement();\r\n\t\t\tmap.put(key, methods.getString(key));\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}",
"public Set<OntologyScope> getRegisteredScopes();",
"public String[] getAllThemeNames() {\n\tjava.util.List names = resources.getStringList(\"themelist\");\n\treturn (String[]) names.toArray(new String[names.size()]);\n }",
"List<Method> getAllMethods();"
] | [
"0.71702445",
"0.6170366",
"0.6026774",
"0.5991742",
"0.58425844",
"0.5712147",
"0.5616539",
"0.55696774",
"0.5567121",
"0.55659324",
"0.55390996",
"0.5525468",
"0.55182654",
"0.5456558",
"0.53740776",
"0.53434414",
"0.5341076",
"0.5338106",
"0.5333766",
"0.53297406",
"0.532974",
"0.5298461",
"0.5297749",
"0.52909136",
"0.526919",
"0.5254063",
"0.5241865",
"0.52339584",
"0.51879936",
"0.5157848",
"0.51280147",
"0.5107773",
"0.5097389",
"0.50655055",
"0.5060411",
"0.5044101",
"0.5032435",
"0.5009785",
"0.4913131",
"0.4910577",
"0.49084362",
"0.48926547",
"0.48917675",
"0.48841786",
"0.48771954",
"0.48698065",
"0.48549214",
"0.48423824",
"0.48384023",
"0.48226383",
"0.47811094",
"0.47782376",
"0.47569463",
"0.47554588",
"0.47544128",
"0.47491604",
"0.47477576",
"0.4743136",
"0.47399783",
"0.4725547",
"0.472527",
"0.47248712",
"0.47054628",
"0.4660942",
"0.46411553",
"0.46362305",
"0.46295285",
"0.4608763",
"0.46045023",
"0.457909",
"0.45786083",
"0.45714143",
"0.4565617",
"0.45633766",
"0.45618972",
"0.45612082",
"0.45537496",
"0.45504025",
"0.45463783",
"0.45456472",
"0.4526072",
"0.45219555",
"0.452111",
"0.45195717",
"0.4517977",
"0.4511849",
"0.45112595",
"0.450202",
"0.45002946",
"0.4491114",
"0.44834796",
"0.44824302",
"0.4468905",
"0.4467338",
"0.44600356",
"0.44562078",
"0.44535214",
"0.44504791",
"0.44483566",
"0.4448056"
] | 0.91487396 | 0 |
Returns a list of all functions with the given name in the given namespace. | public List<Function> getFunctions(String namespace, String name); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Function> getGlobalFunctions(String name);",
"@Override\r\n\tpublic List<Function> getFunctionByModulesAndName(Modules modules, String name) {\n\t\tString hql = \"from Function f where f.modules.name=? and f.name =?\";\r\n\t\treturn (List<Function>) getHibernateTemplate().find(hql, modules, name);\r\n\t}",
"@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(String groupName\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+groupName+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}",
"public List<CALFunction> getFunctions() {\n List<CALFunction> result = new ArrayList<>(functionsObject.functions.values());\n Collections.sort(result, new Comparator<CALFunction>() {\n public int compare(CALFunction f1, CALFunction f2) {\n return f1.toString().compareTo(f2.toString());\n }\n });\n return result;\n }",
"List<String> listFunctions(String dbName) throws DatabaseNotExistException, CatalogException;",
"public Collection<IFunction> getAllFunctions()\r\n\t{\r\n\t\treturn expressionRegistry.getAllFunctions();\r\n\t}",
"protected Set<AeScriptFuncDef> findFunctions() {\r\n AeXPathFunctionNodeVisitor visitor = new AeXPathFunctionNodeVisitor();\r\n getXPathAST().visitAll(visitor);\r\n return visitor.getFunctions();\r\n }",
"public String getFunctions();",
"public Set<String> getRegisteredFunctions();",
"public String[] getNames() {\n\t\tString[] names = new String[functions.size()];\n\t\tint index = 0;\n\t\tfor (Enumeration en = functions.keys(); en.hasMoreElements(); index++) {\n\t\t\tnames[index] = (String) en.nextElement();\n\t\t}\n\t\treturn names;\n\t}",
"public FunctionInfo getFunction(String name) {\n/* 251 */ if (this.functions == null || this.functions.length == 0) {\n/* 252 */ System.err.println(\"No functions\");\n/* 253 */ return null;\n/* */ } \n/* */ \n/* 256 */ for (int i = 0; i < this.functions.length; i++) {\n/* 257 */ if (this.functions[i].getName().equals(name)) {\n/* 258 */ return this.functions[i];\n/* */ }\n/* */ } \n/* 261 */ return null;\n/* */ }",
"Namespaces namespaces();",
"java.util.List<AggregateFunction>\n getAggregateFunctionsList();",
"@Override\r\n\tpublic List<Function> getAllFunction() {\n\t\tString hql = \"from Function\";\r\n\t\treturn (List<Function>) getHibernateTemplate().find(hql);\r\n\t}",
"public static List<String> getFunctions(String toAppend) {\n return appendAll(FUNCTIONS, toAppend);\n }",
"static public Object[] getFuncionesName() {\n if (funcionesName == null) {\n addFuncionesName();\n }\n return funcionesName.toArray();\n\n }",
"@Override\n\tpublic List<Function> findAll() {\n\t\treturn functionDao.findAll();\n\t}",
"java.util.List<org.mojolang.mojo.lang.FuncDecl> \n getMethodsList();",
"java.util.List<UserFunction>\n getUserFunctionsList();",
"@Beta(Beta.SinceVersion.V1_7_0)\n PagedList<EventHubNamespaceAuthorizationRule> listByNamespace(String resourceGroupName, String namespaceName);",
"Iterable<T> getFunctions();",
"public final List<DepFunction> getFunctions() {\n\t\treturn new LinkedList<>(this.functionMap.values());\n\t}",
"@Override\r\n\tpublic List<Function> getFunctionByModulesByPager(Modules modules, PagerUtil pager) {\n\t\tString hql = \"from Function f where f.modules.name=? \";\r\n\t\treturn getListByPage(hql, pager, modules.getName());\r\n\t}",
"public List<Function> getFunctions(){\n\t\t\n\t\treturn null;\n\t}",
"public List<Element> getElements(String localname, String namespace) throws Exception { \r\n \r\n // Try the SOAP Body first \r\n Element bodyElement = SecUtil.findBodyElement(doc); \r\n \r\n if (SecConstants.ELEM_BODY.equals(localname) && \r\n \r\n bodyElement.getNamespaceURI().equals(namespace)) { \r\n return Collections.singletonList(bodyElement); \r\n \r\n } \r\n \r\n return SecUtil.findElements(doc.getDocumentElement(), localname, namespace); \r\n \r\n }",
"@Beta(Beta.SinceVersion.V1_7_0)\n Observable<EventHubNamespaceAuthorizationRule> listByNamespaceAsync(String resourceGroupName, String namespaceName);",
"public String getAllBindingNamespaceDeclarations() \t \n { \t \n return BindingExpression.getNamespaceDeclarations(getAllBindingNamespaces()); \t \n }",
"private Function[] getFunctionObjects() throws Exception{\n String[] sFunctions = getStringProperty(ParameterList.FUNCTION_LIST, false).split(\",\");\n ArrayList<Function> functionArray = new ArrayList<Function>();\n \n for(String str : sFunctions){\n try{\n str = str.trim();\n Class<?> function = Class.forName(str);\n functionArray.add((Function)function.newInstance());\n }\n catch(ClassNotFoundException e){\n throw new ClassNotFoundException(\"Error loading the function set. Class \" + str + \" not found\", e);\n }\n }\n \n return functionArray.toArray(new Function[functionArray.size()]);\n }",
"org.globus.swift.language.Function[] getFunctionArray();",
"public boolean hasNamespace(final String namespace) {\n return rpcMethods.keySet().stream()\n .anyMatch(key -> key.toUpperCase().startsWith(namespace.toUpperCase()));\n }",
"static List<Pair<String, LinkedList<String>>> getAllTraceForPackage(@NonNull String packageName) {\n final StackTraceElement[] ste = Thread.currentThread().getStackTrace();\n final LinkedList<Pair<String, LinkedList<String>>> packageCalls = new LinkedList<>();\n\n for (int index = ste.length - 1; index >= 0; --index) {\n if (ste[index].getClassName().contains(packageName)) {\n final boolean isAnonymousClass = ste[index].getClassName().contains(\"$\");\n final String className = getClassNameFromFileName(ste[index].getFileName());\n String methodName = ste[index].getMethodName() + \"()\";\n\n if (methodName.contains(\"access$\")) {\n // Those are compiler generated methods used for accessing members of a (host)\n // class from an anon class. We are not interested in displaying them\n continue;\n }\n\n if (packageCalls.size() > 0) {\n if (className.equals(packageCalls.getLast().first)) {\n if (!isAnonymousClass) {\n // add a second method to the same class then continue\n packageCalls.getLast().second.add(methodName);\n\n } else {\n final String callingMethodName = packageCalls.getLast().second.removeLast();\n methodName = String.format(Locale.UK, \"%s <- %s#%s\", methodName, packageCalls.getLast().first, callingMethodName);\n packageCalls.getLast().second.add(methodName);\n }\n continue;\n }\n }\n\n if (!isAnonymousClass) {\n final LinkedList<String> methodCalls = new LinkedList<>();\n methodCalls.add(ste[index].getMethodName());\n\n packageCalls.add(new Pair<>(className, methodCalls));\n } else {\n StringBuilder callingMethodsName = new StringBuilder();\n for (String methodCall : packageCalls.getLast().second) {\n callingMethodsName.append('#').append(methodCall);\n }\n methodName = String.format(Locale.UK, \"%s <- %s%s()\", methodName, packageCalls.getLast().first, callingMethodsName.toString());\n packageCalls.removeLast();\n packageCalls.getLast().second.add(methodName);\n }\n }\n }\n\n return packageCalls;\n }",
"private static void addFuncionesName() {\n\n funcionesName = new ArrayList<String>();\n if (funciones == null) {\n addFunciones();\n }\n Iterator it = funciones.iterator();\n while (it.hasNext()) {\n funcionesName.add(((GlobalSimilarityNode) it.next()).getName());\n }\n }",
"public ListFunctionsResult listFunctions() throws AmazonServiceException, AmazonClientException {\n return listFunctions(new ListFunctionsRequest());\n }",
"public CinemaFunction getFunctionsbyCinemaAndDateAndHour(String name, String date, String moviename) throws CinemaPersistenceException, CinemaException {\n\t\t\n\t\ttry {\n\t\t\treturn cps.getFunctionsbyCinemaAndDateAndHour(name, date, moviename);\n\t\t} catch (CinemaException e) {\n\t\t\tthrow new CinemaException(\"The given name does not exit\");}\n\t}",
"public FunctionInfo[] getFunctions() {\n/* 236 */ return this.functions;\n/* */ }",
"private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }",
"protected List<String> getFunctionAliases(Function f) {\n List<String> ret = new ArrayList<String>();\n\n for (String curF : callMap.keySet()) {\n for (Function curFunc : callMap.get(curF)) {\n if(curFunc.getName().equals(f.getName())) {\n ret.add(curF);\n break;\n }\n }\n }\n\n return ret;\n }",
"public List<Funcionario> findAll() {\r\n\t\tList<Funcionario> result = new ArrayList<Funcionario>();\r\n\t\tPreparedStatement prepStmt = null;\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = jdbcUtil.getConnection();\r\n\t\t\tprepStmt = con.prepareStatement(\"SELECT * FROM Funcionario ORDER BY nome ASC\");\r\n\t\t\tResultSet rs = prepStmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tlong id = rs.getLong(\"id_funcionario\");\r\n\t\t\t\tString nome = rs.getString(\"nome\");\r\n\t\t\t\tDate nascimento = rs.getDate(\"nascimento\");\r\n\t\t\t\tString lotacao = rs.getString(\"lotacao\");\r\n\t\t\t\tresult.add(new Funcionario(id, nome, nascimento, lotacao));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new EscolaException(ErrorMessage.FUNCIONARIO_005, e);\r\n\t\t} finally {\r\n\t\t\tcloseStatement(prepStmt);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic List<AuthFunction> findAll() {\n\t\treturn authFunctionDao.findAll();\n\t}",
"@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P, BrowserType.IE_9P})\r\n @JsArray(Node.class)\r\n @FactoryFunc\r\n\t@Function NodeList getElementsByTagNameNS(String namespaceURI, String localName);",
"public FunctionIterator getFunctions(Address start, boolean forward);",
"void visit(Namespace namespace);",
"public String[] getMethods(String url) throws RemoteException{\n\t\ttry{\n\t\t//reading wsdl here...\n String wsdlFile = url+\"?wsdl\";\n \n WSDLParser parser = new WSDLParser(wsdlFile);\n\t\treturn parser.getAllMethodNames();\n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(e.getMessage());\t\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n public List<Function> getFunctions() {\n if (!isLoaded()) {\n throw new IllegalStateException(\"Error: The module is not loaded\");\n }\n\n return new ArrayList<Function>(m_functions);\n }",
"public static HashMap<String, Integer> scanForFunctions(Document doc, String filename) {\n\n long startTime = System.currentTimeMillis();\n // grab all function nodes\n NodeList list = doc.getElementsByTagName(\"call\");\n\n // get map of all the unsafeCommands to check against\n HashMap<String, Integer> unsafeCommandsMap = getMethodMap(filename);\n\n // loop through functions and find the name of the function\n for (int i = 0; i < list.getLength(); i++) {\n\n // Grab all the children of the current function call\n NodeList childrenNodesCall = list.item(i).getChildNodes();\n\n // loop through the children trying to grab their names\n for (int k = 0; k < childrenNodesCall.getLength(); k++) {\n\n // temp for the current child node\n Node currNode = childrenNodesCall.item(k);\n\n // temp for the current child node tag name\n String currNodeName = currNode.getNodeName();\n\n // temp for the current child node text content\n String currMethodName = currNode.getTextContent();\n // if the current node is the name tag and the function is unsafe put it into the map\n if (currNodeName.equals(\"name\") && unsafeCommandsMap.containsKey(currMethodName)/* && !wrappedWithIf.contains(currNode)*/) {\n\n int currValue = unsafeCommandsMap.get(currMethodName);\n unsafeCommandsMap.put(currMethodName, currValue + 1);\n }\n }\n\n }\n return unsafeCommandsMap;\n }",
"public FunctionIterator getExternalFunctions();",
"public List<?> getAllFuncs() throws DataAccessException {\n\t\treturn (List<?>) mapper.getAllFuncs();\r\n\t}",
"static Method[] getAllDeclaredMethods(String testsClassName) {\n\n Class<?> testsClazz = getClassObject(testsClassName);\n\n //Get all methods from file\n Method[] methods = testsClazz.getDeclaredMethods();\n\n\n if (methods.length != 0) {\n return methods;\n } else {\n log.error(\"В классе {} нет ни одного метода !\", testsClazz);\n return new Method[0];\n }\n\n\n }",
"public MathFunction[] getFunctions() {\n return func.clone ();\n }",
"static public List<GlobalSimilarityNode> getFunciones() {\n if (funciones == null) {\n addFunciones();\n }\n return funciones;\n }",
"public Object[] visibaleRefencesMatchingFunctionType(final EObject ctx, final ExpressionVariable fd) {\n final HashSet<ExpressionVariable> exprVars = FunctionValidatorUtil.allInscopeExpressionVariables(ctx);\n final Predicate<ExpressionVariable> _function = (ExpressionVariable e) -> {\n return (e.getName().equals(fd.getName()) && FunctionValidatorUtil.isGlobalFuncType(e));\n };\n final Object[] funcArray = exprVars.stream().filter(_function).toArray();\n return funcArray;\n }",
"FunctionGroupInfo getFunctionGroupInfo (QualifiedName functionName) {\r\n MachineFunction mf = getFunction(functionName);\r\n if (mf != null) {\r\n return getFunctionGroupInfo(mf);\r\n } \r\n \r\n if (functionName.getModuleName().equals(getName())) {\r\n return functionNameToFunctionGroup.get(functionName.getUnqualifiedName());\r\n }\r\n return null;\r\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic static ArrayList<String> listObjects(String name){\n\t\tRegistryInterface stub = null;\n\t\ttry{\n\t\t\tstub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t}catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn (ArrayList<String>)stub.listObjects(name);\n\t\t\t\n\t}",
"public static Set<DockingActionIf> getActionsByName(Tool tool, String name) {\n\n\t\tSet<DockingActionIf> result = new HashSet<>();\n\n\t\tSet<DockingActionIf> toolActions = tool.getAllActions();\n\t\tfor (DockingActionIf action : toolActions) {\n\t\t\tif (action.getName().equals(name)) {\n\t\t\t\tresult.add(action);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"Iterable<String> getRegisteredNames();",
"@Override\n public List<String> call() {\n List<String> nameList = null;\n nameList = doScan(basePackage, new ArrayList<>());\n\n return nameList;\n }",
"public FunctionIterator getFunctions(AddressSetView asv, boolean forward);",
"String getFunctionName();",
"public java.util.List<AggregateFunction> getAggregateFunctionsList() {\n if (aggregateFunctionsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(aggregateFunctions_);\n } else {\n return aggregateFunctionsBuilder_.getMessageList();\n }\n }",
"@Override\n\tpublic Symbol getNamespaceSymbol(String name, Namespace namespace) {\n\t\treturn symbolManager.namespaces().getChildNamed(name, assertTraceNamespace(namespace));\n\t}",
"private static List<String> getFunctionNamesIn(String[] functionsNames) {\n return Arrays.stream(functionsNames)\n .filter(fileName -> !fileName.contains(\"$1\"))\n .map(fileName -> fileName.replace(\".class\", \"\"))\n .collect(Collectors.toList());\n }",
"UserFunction getUserFunctions(int index);",
"@Override\n\tpublic ResultSet getFunctions(String catalog, String schemaPattern,\n\t\t\tString functionNamePattern) throws SQLException {\n\t\treturn null;\n\t}",
"public ArrayList getNamespaces() {\n return m_namespaces;\n }",
"org.mojolang.mojo.lang.FuncDecl getMethods(int index);",
"private static void filter(List<String> names, Predicate functionExpression) {\n\t\tnames.forEach(x -> {\n\t\t\tif (functionExpression.test(x)) {\n\t\t\t\tSystem.out.println(\"Name - \" + x);\n\t\t\t}\n\t\t});\n\n\t}",
"@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}",
"public boolean containFunction(String name) {\n\t\tif (!global.containFunction(name)) {\r\n\t\t\treturn this.fnMap.containsKey(name);\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}",
"public List<Funcionario> readAll() {\r\n\t\t\tConnection con = ConnectionFactory.getConnection();\r\n\t\t\tPreparedStatement stmt = null;\r\n\t\t\tResultSet rs = null;\r\n\r\n\t\t\tString sql = \" select * from funcionario\";\r\n\t\t\tList<Funcionario> funcionarios = new ArrayList<Funcionario>();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstmt = con.prepareStatement(sql);\r\n\t\t\t\trs = stmt.executeQuery();\r\n\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tFuncionario func = new Funcionario();\r\n\t\t\t\t\tfunc.setCodigo(rs.getString(\"Codigo\"));\r\n\t\t\t\t\tfunc.setCargo(rs.getString(\"Cargo\"));\r\n\t\t\t\t\tfunc.setNome(rs.getString(\"Nome\"));\r\n\t\t\t\t\tfunc.setCpf(rs.getString(\"Cpf\"));\r\n\t\t\t\t\tfunc.setEndereco(rs.getString(\"Endereco\"));\r\n\t\t\t\t\tfunc.setCidade(rs.getString(\"Cidade\"));\r\n\t\t\t\t\tfunc.setEstado(rs.getString(\"Estado\"));\r\n\t\t\t\t\tfunc.setTelefone(rs.getString(\"Telefone\"));\r\n\t\t\t\t\tfunc.setEmail(rs.getString(\"Email\"));\r\n\r\n\r\n\t\t\t\t\tfuncionarios.add(func);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} \r\n\t\t\tcatch (SQLException e) { e.printStackTrace();\r\n\t\t\t\tSystem.out.println(\"Erro ao tentar ler tabela funcionario\");\r\n\t\t\t} finally {\r\n\t\t\t\tConnectionFactory.closeConnection(con, stmt);\r\n\t\t\t}\r\n\r\n\t\t\treturn funcionarios;\r\n\t\t}",
"public static PSDatabaseFunctionDef[] getDatabaseFunctions(\n PSCataloger cataloger, String datasource)\n throws PSServerException,PSAuthenticationFailedException,\n PSAuthorizationException, IOException\n {\n if (cataloger == null)\n throw new IllegalArgumentException(\"cataloger may not be null\");\n\n if (datasource == null)\n datasource = \"\";\n\n PSDatabaseFunctionDef[] dbFuncDefs = null;\n\n // create the properties\n Properties req = new Properties();\n\n req.put(REQ_CATEGORY_KEY, REQ_CATEGORY_VALUE);\n req.put(REQ_TYPE_KEY, REQ_TYPE_VALUE);\n req.put(DATASOURCE_KEY, datasource);\n\n // perform the catalog request\n Document doc = null;\n try\n {\n doc = cataloger.catalog(req);\n }\n catch (IllegalArgumentException e)\n {\n throw new PSServerException(e);\n }\n\n /* store the database functions in a list.\n * The returned XML tree contains the standard root node\n * (which we can ignore) then each database function\n * (where each database function is a child of the root, but siblings to\n * each other). To walk the tree we can get the root node\n * create a walker for it. We can get the first child to get\n * the first extension then iterate siblings to get\n * all subsequent extensions.\n */\n Element root = doc.getDocumentElement();\n if (root != null)\n {\n List list = new ArrayList();\n PSXmlTreeWalker walker = new PSXmlTreeWalker(doc);\n int firstFlags = PSXmlTreeWalker.GET_NEXT_ALLOW_CHILDREN |\n PSXmlTreeWalker.GET_NEXT_RESET_CURRENT;\n int nextFlags = PSXmlTreeWalker.GET_NEXT_ALLOW_SIBLINGS |\n PSXmlTreeWalker.GET_NEXT_RESET_CURRENT;\n\n Element el = walker.getNextElement(\n PSDatabaseFunctionDef.getNodeName(), firstFlags);\n while (el != null)\n {\n try\n {\n list.add(new PSDatabaseFunctionDef(\n PSDatabaseFunctionManager.FUNCTION_TYPE_SYSTEM, el, true));\n el = walker.getNextElement(\n PSDatabaseFunctionDef.getNodeName(), nextFlags);\n }\n catch (Exception ex)\n {\n throw new PSServerException(ex);\n }\n }\n\n // and convert the list to an array\n final int size = list.size();\n dbFuncDefs = new PSDatabaseFunctionDef[size];\n list.toArray(dbFuncDefs);\n }\n else\n {\n // create an empty one\n dbFuncDefs = new PSDatabaseFunctionDef[0];\n }\n\n return dbFuncDefs;\n }",
"boolean isNamespaceRunning(String namespace);",
"public Function lookup(String functionName) {\n\t\tObject func = functions.get(functionName);\n\t\tif (func == null) {\n\t\t\tthrow new IllegalArgumentException(functionName);\n\t\t}\n\t\treturn (Function) func;\n\t}",
"public List<IMethod> getMethods();",
"public List<IMethod> getMethods();",
"public static boolean isFunction(String name) {\n return isNonLibFunction(name) || isLibFunction(name);\n }",
"public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n for (QName qName : serviceQnames) {\n serviceNames.add(qName.getLocalPart());\n }\n return serviceNames;\n }",
"org.globus.swift.language.Function getFunctionArray(int i);",
"private static void loadFunctions(List<String> cleanFunctionNames, String functionsPackageName) {\n for (String functionName : cleanFunctionNames) {\n String classPath = functionsPackageName + \".\" + functionName;\n\n try {\n Class[] params = {};\n\n Callable callable = (Callable) Class.forName(classPath).getDeclaredConstructor(params).newInstance();\n\n FunctionLoader.callable.put(functionName.toLowerCase(), callable);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }",
"public List<T> getAll(String name) {\n\t\tList<T> result = new ArrayList<T>();\n\t\tint sz = size();\n\t\tfor (int i = 0; i < sz; i++) {\n\t\t\tString n = getName(i);\n\t\t\tif (name == n || (name != null && name.equals(n))) {\n\t\t\t\tresult.add(getVal(i));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private List<Command> getCommands(String name) {\r\n\t\tList<Command> result = new ArrayList<>();\r\n\t\tfor (Command command : commands) {\r\n\t\t\tif (command.name().equals(name) || command.aliases().contains(name)) {\r\n\t\t\t\tresult.add(command);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (LearnedCommand command : learnedCommands) {\r\n\t\t\tif (command.name().equals(name) || command.aliases().contains(name)) {\r\n\t\t\t\tresult.add(command);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"List<IFunctions> getChildren();",
"public List<SubscriptionEventType> getNamespaceSubscriptions(String baseNS, String userId)\n\t\t\tthrows RepositoryException {\n\t\tList<SubscriptionEventType> eventTypes = new ArrayList<>();\n\t\t\n\t\tif ((userId != null) && !userId.equals( UserPrincipal.ANONYMOUS_USER_ID )) {\n\t\t\tSubscriptionList subscriptions = getNamespaceSubscriptions( baseNS );\n\t\t\t\n\t\t\tfor (Subscription subscription : subscriptions.getSubscription()) {\n\t\t\t\tif (subscription.getUser().contains( userId )) {\n\t\t\t\t\teventTypes.add( subscription.getEventType() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn eventTypes;\n\t}",
"@Override\n\tpublic Map<String, FREFunction> getFunctions() \n\t{\n\t\tLog.d(TAG, \"Registering Extension Functions\");\n\t\tMap<String, FREFunction> functionMap = new HashMap<String, FREFunction>();\n\t\tfunctionMap.put(\"isInstalled\", new IsInstalledFunction());\n\t\tfunctionMap.put(\"shareText\", new ShareTextFunction());\n\t\tfunctionMap.put(\"shareImage\", new ShareImageFunction());\n\t\t// add other functions here\n\t\treturn functionMap;\t\n\t}",
"@FactoryFunc\r\n @JsArray(Node.class)\r\n\t@Function NodeList getElementsByTagName(String tagname);",
"public java.util.List<UserFunction> getUserFunctionsList() {\n if (userFunctionsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(userFunctions_);\n } else {\n return userFunctionsBuilder_.getMessageList();\n }\n }",
"@Override\n public List<SqlFunction> listFunctions(ExecutionContext context) {\n List<SqlFunction> udfs = new ArrayList<>();\n udfs.add(new SamzaSqlUdfDisplayInfo(\"RegexMatch\", \"Matches the string to the regex\",\n Arrays.asList(SqlFieldSchema.createPrimitiveSchema(SamzaSqlFieldType.STRING, false, false),\n SqlFieldSchema.createPrimitiveSchema(SamzaSqlFieldType.STRING, false, false)),\n SqlFieldSchema.createPrimitiveSchema(SamzaSqlFieldType.BOOLEAN, false, false)));\n\n return udfs;\n }",
"public Map<Integer, String> getAllBindingNamespaces()\n {\n Map<Integer, String> allNs = new HashMap<Integer, String>();\n \n for (BindingExpression be : bindingExpressions)\n {\n if (be.getNamespaces() != null)\n {\n allNs.putAll(be.getNamespaces());\n }\n }\n \n return allNs;\n }",
"public String[] getValues(String expression, Map<String, String> namespaces) {\n return getNodes(expression, namespaces, String.class);\n }",
"List<Method> getAllMethods();",
"public List<CinemaFunction> getFuntionbyNumberofSeats(String cinName, int sillas, String date)\n\t\t\tthrows CinemaException, CinemaPersistenceException, FilterException {\n\t\treturn cfs.getFunctionsbySeats(cinName, sillas, date, cps);\n\t}",
"private List<Namespace> namespaces() {\n\t\tList<Namespace> namespaces = new ArrayList<>();\n\t\tfor (OwnerTraceData ancestor = data; ancestor != null; ancestor = ancestor.parent) {\n\t\t\tNamespace ns = new Namespace();\n\t\t\tns.data = ancestor;\n\t\t\tnamespaces.add(ns);\n\t\t}\n\t\tCollections.reverse(namespaces);\n\t\tObject2IntMap<String> numbering = new Object2IntOpenHashMap<>(namespaces.size());\n\t\tfor (Namespace ns : namespaces) {\n\t\t\t/*\n\t\t\t * Make a copy since the alias could be changed in another thread (unlikely but possible).\n\t\t\t */\n\t\t\tString alias = ns.data.alias;\n\t\t\tif (!numbering.containsKey(alias)) {\n\t\t\t\tns.name = alias;\n\t\t\t\tnumbering.put(alias, 2);\n\t\t\t} else {\n\t\t\t\tint number = numbering.getInt(alias);\n\t\t\t\tns.name = alias + number;\n\t\t\t\tnumbering.put(alias, number + 1);\n\t\t\t}\n\t\t}\n\t\treturn namespaces;\n\t}",
"String getImportedNamespace();",
"java.util.List<? extends AggregateFunctionOrBuilder>\n getAggregateFunctionsOrBuilderList();",
"@Override\r\n\tpublic List<Modules> getModulesByName(String name) {\n\t\tString hql = \"from Modules m where m.name =?\";\r\n\t\treturn (List<Modules>) getHibernateTemplate().find(hql, name);\r\n\r\n\t}",
"@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();",
"Collection<String> names();",
"public List<Service> list(String name){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \tcriteria.add(Restrictions.like(\"name\",\"%\"+name+\"%\"));\r\n \treturn criteria.list();\r\n }",
"@Override\n\tpublic void clearAndAddFunctionsNamesToListBox() {\n\t\tif (funcNameListBox != null) {\n\t\t\tfuncNameListBox.clear();\n\t\t\t//sort functions\n\t\t\tviewFunctions = sortFunctionNames(viewFunctions);\n\t\t\tfor (CQLFunctions func : viewFunctions) {\n\t\t\t\tfuncNameListBox.addItem(func.getFunctionName(), func.getId());\n\t\t\t}\n\t\t\t// Set tooltips for each element in listbox\n\t\t\tSelectElement selectElement = SelectElement.as(funcNameListBox.getElement());\n\t\t\tcom.google.gwt.dom.client.NodeList<OptionElement> options = selectElement.getOptions();\n\t\t\tfor (int i = 0; i < options.getLength(); i++) {\n\t\t\t\tString title = options.getItem(i).getText();\n\t\t\t\tOptionElement optionElement = options.getItem(i);\n\t\t\t\toptionElement.setTitle(title);\n\t\t\t}\n\t\t}\n\t}",
"java.util.List<? extends UserFunctionOrBuilder>\n getUserFunctionsOrBuilderList();",
"public abstract List<Component> getComponentsByName(String name);"
] | [
"0.7295581",
"0.5797016",
"0.5666544",
"0.553504",
"0.5513107",
"0.54765874",
"0.5384894",
"0.5337299",
"0.53034097",
"0.52105004",
"0.5185172",
"0.5173609",
"0.5168023",
"0.5123526",
"0.5117528",
"0.5104031",
"0.50689363",
"0.5064622",
"0.5054711",
"0.50454205",
"0.49957317",
"0.4994883",
"0.499368",
"0.49573407",
"0.4931847",
"0.4863375",
"0.48518267",
"0.48153007",
"0.48060727",
"0.47947654",
"0.47920534",
"0.4777689",
"0.47688347",
"0.474681",
"0.4724952",
"0.47216755",
"0.4718637",
"0.47142226",
"0.47138864",
"0.46646595",
"0.46336514",
"0.46310368",
"0.46252996",
"0.46183914",
"0.4604439",
"0.45443633",
"0.4536426",
"0.450799",
"0.45070913",
"0.45032987",
"0.4498894",
"0.44822764",
"0.448172",
"0.44789377",
"0.44767937",
"0.44717234",
"0.44681764",
"0.4467009",
"0.44596836",
"0.4427025",
"0.44190982",
"0.44108495",
"0.43869218",
"0.43802193",
"0.43796015",
"0.43652865",
"0.43483812",
"0.4346752",
"0.43308592",
"0.43256804",
"0.4323361",
"0.43158263",
"0.43117702",
"0.43117702",
"0.4308846",
"0.42913485",
"0.42903095",
"0.42880797",
"0.42816237",
"0.42785144",
"0.42699444",
"0.4267968",
"0.42678657",
"0.42592442",
"0.42563266",
"0.42549816",
"0.42533287",
"0.42485917",
"0.4246841",
"0.4234098",
"0.42254338",
"0.42211223",
"0.42151043",
"0.42067847",
"0.42033714",
"0.4202659",
"0.42006373",
"0.4192889",
"0.4173047",
"0.41691515"
] | 0.90032303 | 0 |
Get a function containing an address. | public Function getFunctionContaining(Address addr); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Function getFunctionAt(Address entryPoint);",
"public Function lookup(String functionName) {\n\t\tObject func = functions.get(functionName);\n\t\tif (func == null) {\n\t\t\tthrow new IllegalArgumentException(functionName);\n\t\t}\n\t\treturn (Function) func;\n\t}",
"T getFunction(String functionName) throws IllegalArgumentException;",
"public abstract @Nullable Function getFunction(@NotNull String functionName);",
"public abstract AbstractFunction getFunction(String name) throws BadAlloc;",
"public Function getFunction();",
"public final DepFunction getFunction(String functionName) {\n\t\treturn this.functionMap.get(functionName);\n\t}",
"AddressI getAddress();",
"public boolean isInFunction(Address addr);",
"public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}",
"public FunctionDefinitionNode lookupFunction(final String functionName) {\n if (isLocalFunction(functionName)) {\n return this.userDefinedFunctions.get(functionName);\n } else {\n if (this.parent != null) {\n return this.parent.lookupFunction(functionName);\n } else {\n throw new InterpreterException(\"Function \" + functionName + \" is not defined.\");\n }\n }\n }",
"public FunctionInfo getFunction(String name) {\n/* 251 */ if (this.functions == null || this.functions.length == 0) {\n/* 252 */ System.err.println(\"No functions\");\n/* 253 */ return null;\n/* */ } \n/* */ \n/* 256 */ for (int i = 0; i < this.functions.length; i++) {\n/* 257 */ if (this.functions[i].getName().equals(name)) {\n/* 258 */ return this.functions[i];\n/* */ }\n/* */ } \n/* 261 */ return null;\n/* */ }",
"int getAddr();",
"public InternetAddress getFromAddress();",
"String getAddress(int type);",
"Optional<MemoryAddress> lookup(String name);",
"String getAddress( String filename, String generator);",
"String getAddress();",
"String getAddress();",
"public Instruction getInstructionContaining(Address addr);",
"@Override\r\n public MachineFunction getFunction (String functionName) {\r\n MachineFunction mf = super.getFunction(functionName);\r\n \r\n // Check to see if the function is a lifted let variable function.\r\n if (mf == null) {\r\n mf = liftedFunctionMap.get(functionName);\r\n }\r\n return mf;\r\n }",
"private Expression addressOf (Expression expression) {\n return expression;\n }",
"AddressFactory getAddressFactory() {\n\t\treturn addrMap.getAddressFactory();\n\t}",
"String getAddr();",
"InetAddress getAddress();",
"InetAddress getAddress();",
"private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }",
"public Function getFunction(final View view) {\n Preconditions.checkNotNull(view, \"Error: View argument can not be null\");\n\n if (!m_views.contains(view)) {\n throw new IllegalArgumentException(\"Error: View is not part of this module\");\n }\n\n if (view.getType() != ViewType.Native) {\n throw new IllegalArgumentException(\"Error: View is not a native view\");\n }\n\n return m_functionMap.get(m_module.getContent().getViewContainer().getFunction(view.getNative()));\n }",
"@Override\r\n public MachineFunction getFunction (QualifiedName functionName) {\r\n MachineFunction mf = super.getFunction(functionName);\r\n \r\n // Check to see if the function is a lifted let variable function.\r\n if (mf == null && functionName.getModuleName().equals(getName())) {\r\n mf = liftedFunctionMap.get(functionName.getUnqualifiedName());\r\n }\r\n\r\n return mf;\r\n }",
"public ExpressionFunction getFunction(String name) { return wrappedSerializationContext.getFunction(name); }",
"public Function getFunction()\n\t{\n\t\treturn function;\n\t}",
"public Instruction getInstructionAt(Address addr);",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"public Friend findFriend(Address addr);",
"long getAddress(ByteBuffer buffer);",
"public Prototype functionLookup(QName name, int arity)\n {\n Function fun = functionLookup(name);\n if (fun == null)\n return null;\n for(Prototype proto : fun.getProtos()) {\n if(proto.qname == name && proto.accepts(arity))\n return proto;\n }\n return null;\n }",
"public Call getCallByRemoteAddress2(Address remoteAddress);",
"Function createFunction();",
"MessageAddress getMessageAddress();",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 194,\n FQN=\"llvm::Module::getFunction\", NM=\"_ZNK4llvm6Module11getFunctionENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZNK4llvm6Module11getFunctionENS_9StringRefE\")\n //</editor-fold>\n public Function /*P*/ getFunction(StringRef Name) /*const*/ {\n return dyn_cast_or_null_Function(getNamedValue(new StringRef(Name)));\n }",
"@Override\r\n\tpublic Function getFunctionById(int id) {\n\t\treturn getHibernateTemplate().get(Function.class, id);\r\n\t}",
"SocketAddress socketAddress();",
"public DexlibAbstractInstruction instructionAtAddress(int address) {\n DexlibAbstractInstruction i = null;\n while (i == null && address >= 0) {\n // catch addresses can be in the middlde of last instruction. Ex. in\n // com.letang.ldzja.en.apk:\n //\n // 042c46: 7020 2a15 0100 |008f: invoke-direct {v1, v0},\n // Ljavax/mi...\n // 042c4c: 2701 |0092: throw v1\n // catches : 4\n // <any> -> 0x0065\n // 0x0069 - 0x0093\n //\n // SA, 14.05.2014: We originally scanned only two code units back.\n // This is not sufficient\n // if we e.g., have a wide constant and the line number in the debug\n // sections points to\n // some address the middle.\n i = instructionAtAddress.get(address);\n address--;\n }\n return i;\n }",
"private static INaviFunction getFunctionToInline(final JFrame parent,\n final IViewContainer viewContainer, final INaviFunction function,\n final int forwarderModuleId, final IAddress forwarderAddress) {\n if (forwarderAddress == null) {\n return function;\n } else {\n final IDatabase database = viewContainer.getDatabase();\n\n final INaviModule module = database.getContent().getModule(forwarderModuleId);\n\n if (!viewContainer.containsModule(module)) {\n CMessageBox.showInformation(parent, String\n .format(\"You are trying to inline an external function into a module view. \"\n + \"This is not possible.\\n\"\n + \"To inline external functions it is necessary to create projects.\"));\n\n return null;\n }\n\n if (!module.isLoaded()) {\n try {\n module.load();\n } catch (final CouldntLoadDataException | LoadCancelledException e) {\n CUtilityFunctions.logException(e);\n return null;\n }\n }\n\n return module.getContent().getFunctionContainer().getFunction(forwarderAddress);\n }\n }",
"public Function createFunction(String name, Address entryPoint, AddressSetView body,\n\t\t\tSourceType source) throws InvalidInputException, OverlappingFunctionException;",
"public java.lang.String getFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public Call getCallByRemoteAddress(String remoteAddress);",
"public int getReturnAddressOffset();",
"public String getExternalAddress();",
"public org.apache.xmlbeans.XmlString xgetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMADDRESS$6, 0);\n return target;\n }\n }",
"FunctionExtract createFunctionExtract();",
"Address createAddress();",
"public Data getDataAt(Address addr);",
"@Nullable\n @Generated\n @Selector(\"localAddress\")\n public native String localAddress();",
"public interface FunctionProvider {\n\n <T, R> Function<T, R> get(URI identifier, Class<T> inputType, Class<R> returnType) throws FunctionResolutionException;\n\n <T, R> Function<T, R> get(String identifier, Class<T> inputType, Class<R> returnType) throws FunctionResolutionException;\n}",
"Rule Function() {\n // Push 1 FunctionNode onto the value stack\n StringVar functionName = new StringVar(\"\");\n return Sequence(\n Optional(\"oneway \"),\n FunctionType(),\n Identifier(),\n actions.pop(),\n ACTION(functionName.set(match())),\n \"( \",\n ZeroOrMore(Field()),\n \") \",\n Optional(Throws()),\n Optional(ListSeparator()),\n push(new IdentifierNode(functionName.get())),\n actions.pushFunctionNode());\n }",
"String getFunctionName();",
"public Expression getFunction()\n\t{\n\t\treturn function;\n\t}",
"public Data getDataContaining(Address addr);",
"IFunctionLibrary getFunctionLibrary();",
"public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;",
"public String getAddress();",
"public Data getDefinedDataContaining(Address addr);",
"public FunctionIterator getFunctions(AddressSetView asv, boolean forward);",
"<O> N getNode(Function<N, O> map, O value);",
"CatalogFunction getFunction(ObjectPath functionPath)\n throws FunctionNotExistException, CatalogException;",
"SocketAddress getLocalAddress();",
"FunctionArgument getRef();",
"public void removeFunction(Address entryPoint);",
"public Call inviteAddress(Address addr);",
"public GrpcFunctionHandle getFunctionHandle(int executableID) {\n\t\t/* get GrpcFunctionHandle by executableID */\n\t\tngLog.printLog(\n\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL, \n\t\t\tNgLog.LOGLEVEL_DEBUG,\n\t\t\tthis,\n\t\t\t\"NgGrpcClient#getFunctionHandle()\");\n\t\t\n\t\t/* search target in list */\n\t\tfor (int i = 0; i < handleList.size(); i++) {\n\t\t\tNgGrpcFunctionHandle handle = null;\n\t\t\ttry {\n\t\t\t\thandle = (NgGrpcFunctionHandle) handleList.get(i);\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\t/* nothing will be done */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (handle.getExecutableID() == executableID) {\n\t\t\t\t/* found */\n\t\t\t\tngLog.printLog(\n\t\t\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL,\n\t\t\t\t\tNgLog.LOGLEVEL_INFO,\n\t\t\t\t\tthis,\n\t\t\t\t\t\"NgGrpcClient#getFunctionHandle(): found target.\");\n\t\t\t\treturn handle;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* not found */\n\t\tngLog.printLog(\n\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL,\n\t\t\tNgLog.LOGLEVEL_INFO,\n\t\t\tthis,\n\t\t\t\"NgGrpcClient#getFunctionHandle(): not found target.\");\n\t\treturn null;\n\t}",
"public String getInternalAddress();",
"public Data getDefinedDataAt(Address addr);",
"<O> E getEdge(Function<E, O> map, O value);",
"public Instruction getInstructionAfter(Address addr);",
"public Function createFunction(String name, Namespace nameSpace, Address entryPoint,\n\t\t\tAddressSetView body, SourceType source)\n\t\t\tthrows InvalidInputException, OverlappingFunctionException;",
"public Address getCurrentCallRemoteAddress();",
"public Friend createFriendWithAddress(String address);",
"public FunctionIterator getFunctions(Address start, boolean forward);",
"public Address createAddress(String address);",
"public CodeUnit getCodeUnitContaining(Address addr);",
"Address self();",
"public P2PUser getUser(NAddress address);",
"public Node function()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.IDENTIFIER)\r\n\t\t{\r\n\t\t\tString name = lexer.getString();\r\n\t\t\tif(lexer.getToken()==Lexer.Token.LEFT_BRACKETS)\r\n\t\t\t{\r\n\t\t\t\tNode exp = expression();\r\n\t\t\t\tif(exp!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(lexer.getToken()==Lexer.Token.RIGHT_BRACKETS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(name.equals(\"sin\")) return new Sin(exp);\r\n\t\t\t\t\t\tif(name.equals(\"cos\")) return new Cos(exp);\r\n\t\t\t\t\t\tif(name.equals(\"tan\")) return new Tan(exp);\r\n\t\t\t\t\t\tif(name.equals(\"log\")) return new Log(exp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn null;\r\n\t}",
"FunCall createFunCall();",
"String resolve(String placeholder, AddressTemplate template);",
"public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }",
"java.lang.String getDelegatorAddress();",
"java.lang.String getDelegatorAddress();",
"public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }",
"public @Nullable Op getOp(int address) {\n return getTemplateNode(address).getOp();\n }",
"abstract public Address createAddress(String addr);",
"public CompiledFunctionDefinition getFunction() {\n return _function;\n }",
"private Func funcFromNum(int funcNum) {\n Func func = null;\n switch (funcNum) {\n case 0:\t\n func = new Func() {\n public double f(double d) {\n return d == Double.POSITIVE_INFINITY ? 0.0 : 1.0;\n }\t\t\t\n };\t\n break;\n case 1:\n func = new Func() {\n public double f(double d) {\n return d == Double.POSITIVE_INFINITY ? 0.0 : 1.0 + 1.0 / d;\n }\t\t\t\n };\n break;\n case 2:\n func = new Func() {\n public double f(double d) {\n return d == Double.POSITIVE_INFINITY ? 0.0 : 1.0 + Math.sqrt(d);\n }\t\t\t\n };\n break;\n }\n return func;\n }",
"protected Lookup lookupOrCache(String pluginName, String functionName, int argsNumber, Object targetOrClass) {\n Function function = getFunction(pluginName, functionName);\n if (function != null && function.hasImplementation(argsNumber)) {\n return new Lookup(function);\n }\n\n // NOTE: even if the plugin has already been cached, if we can't find the requested function (either at\n // all or having a corresponding implementation for the provided arity, we re-cache the whole plugin in\n // case the plugin list or object reference has dynamically changed over the course of the program.\n return lookupAndCache(pluginName, functionName, argsNumber, targetOrClass);\n }"
] | [
"0.759627",
"0.6322415",
"0.61935866",
"0.6058632",
"0.5974404",
"0.58960927",
"0.58090484",
"0.5763247",
"0.56204695",
"0.55569834",
"0.55031896",
"0.5465334",
"0.541705",
"0.53210276",
"0.53099346",
"0.52932686",
"0.5288439",
"0.5278387",
"0.5278387",
"0.52559763",
"0.5252003",
"0.5223347",
"0.52185404",
"0.52144784",
"0.52142423",
"0.52142423",
"0.5206201",
"0.52034914",
"0.5183017",
"0.51799875",
"0.51468897",
"0.51418453",
"0.51359594",
"0.51359594",
"0.51359594",
"0.51359594",
"0.51359594",
"0.51359594",
"0.5131863",
"0.5131396",
"0.5127272",
"0.5083185",
"0.5082378",
"0.50797665",
"0.50326574",
"0.5010046",
"0.5004301",
"0.4959943",
"0.49540865",
"0.49377218",
"0.49287403",
"0.48972428",
"0.48722684",
"0.48583135",
"0.48493487",
"0.4840966",
"0.4838416",
"0.48373812",
"0.481259",
"0.4805381",
"0.47840595",
"0.47767356",
"0.47755414",
"0.4757341",
"0.47502583",
"0.47488043",
"0.47460896",
"0.47413394",
"0.47406262",
"0.47251105",
"0.47146848",
"0.47049204",
"0.46983162",
"0.46970576",
"0.4694733",
"0.4690019",
"0.4683494",
"0.46794236",
"0.46720943",
"0.46686578",
"0.46615082",
"0.4634192",
"0.46308222",
"0.4628845",
"0.45979807",
"0.45764217",
"0.45702648",
"0.45652205",
"0.45651445",
"0.45649338",
"0.4562786",
"0.45563406",
"0.4534899",
"0.4534899",
"0.45217204",
"0.45073852",
"0.45071438",
"0.44993317",
"0.4495483",
"0.44929373"
] | 0.83071667 | 0 |
Get an iterator over all external functions | public FunctionIterator getExternalFunctions(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Iterable<T> getFunctions();",
"public FunctionIterator getFunctions(Address start, boolean forward);",
"public FunctionIterator getFunctions(boolean forward);",
"@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }",
"public FunctionIterator getFunctions(AddressSetView asv, boolean forward);",
"public Iterator<QName> iterateExternalVariables() {\n final Iterator varIterator = env.iterateExternalVariables();\n return new Iterator<QName>() {\n public boolean hasNext() {\n return varIterator.hasNext();\n }\n\n public QName next() {\n return new QName(((XPathVariable) varIterator.next()).getVariableQName());\n }\n\n public void remove() {\n throw new UnsupportedOperationException(\"remove\");\n }\n };\n }",
"public java.util.Iterator iteratorSupplier()\n // -end- 335C0D7A02E4 get_all_head327A646F00E6 \"Dependency::iteratorSupplier\"\n ;",
"public Iterator<? extends ICodeBase> auxCodeBaseIterator();",
"private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }",
"public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }",
"public Iterator<T> getIterator();",
"private static void iterator() {\n\t\t\r\n\t}",
"public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }",
"@Override\n @ApiStatus.Experimental\n public final @NotNull Iterator<@Nullable T> iterator() {\n List<T> result = cachedExtensions;\n return result == null ? createIterator() : result.iterator();\n }",
"public Collection<IFunction> getAllFunctions()\r\n\t{\r\n\t\treturn expressionRegistry.getAllFunctions();\r\n\t}",
"Iterator<T> iterator();",
"public Iterator<String> iterator();",
"public final Iterable getChainingIterator() {\n\t// TODO: Implemente the chaining iterator and add generic type to Iterable. I suppose it is this class.\n\tthrow new IllegalAccessError(\"Not implemented yet\");\n }",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public DoublyLinkedListIterator<T> dllIterator() {\n return new DLLIterator();\n }",
"public List<Function> getGlobalFunctions(String name);",
"public T iterator();",
"public Iterator<Type> iterator();",
"Iterator<Entry<String, Var>> getIterator() {\n\t\treturn iter;\n\t}",
"Iterator actionListeners();",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"public java.util.Iterator iteratorClient()\n // -end- 33FFE57B03B3 get_all_head327A646F00E6 \"Dependency::iteratorClient\"\n ;",
"public FunctionInfo[] getFunctions() {\n/* 236 */ return this.functions;\n/* */ }",
"public Iterator<? extends ICodeBase> appCodeBaseIterator();",
"Iterator<E> iterator();",
"Iterator<E> iterator();",
"public static final Iterator<ClientSidedTest> getRegisteredTests() {\n return TESTS.iterator();\n }",
"public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }",
"public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }",
"public Collection<AbstractReaderPlugin> getReaders();",
"protected Set<AeScriptFuncDef> findFunctions() {\r\n AeXPathFunctionNodeVisitor visitor = new AeXPathFunctionNodeVisitor();\r\n getXPathAST().visitAll(visitor);\r\n return visitor.getFunctions();\r\n }",
"@VTID(14)\n java.util.Iterator<Com4jObject> iterator();",
"IteratorExp createIteratorExp();",
"public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }",
"public Iterable<M> iterateAll();",
"public final List<DepFunction> getFunctions() {\n\t\treturn new LinkedList<>(this.functionMap.values());\n\t}",
"private Function[] getFunctionObjects() throws Exception{\n String[] sFunctions = getStringProperty(ParameterList.FUNCTION_LIST, false).split(\",\");\n ArrayList<Function> functionArray = new ArrayList<Function>();\n \n for(String str : sFunctions){\n try{\n str = str.trim();\n Class<?> function = Class.forName(str);\n functionArray.add((Function)function.newInstance());\n }\n catch(ClassNotFoundException e){\n throw new ClassNotFoundException(\"Error loading the function set. Class \" + str + \" not found\", e);\n }\n }\n \n return functionArray.toArray(new Function[functionArray.size()]);\n }",
"@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic Iterator<InJarResourceImpl> iterator() {\n\t\t\treturn (Iterator<InJarResourceImpl>) getJarResourceImpl().getContents().iterator();\n\t\t}",
"public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }",
"public List<Function> getFunctions(String namespace, String name);",
"public Iterator<String> getKeywords() {\n/* 364 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test\n public void iterator() {\n }",
"public Iterator<T> iterator() {\r\n return byGenerations();\r\n }",
"org.globus.swift.language.Function[] getFunctionArray();",
"Iterator features();",
"public UnmodifiableIterator<K> iterator() {\n return mo8403b().iterator();\n }",
"public List<Function> getFunctions(){\n\t\t\n\t\treturn null;\n\t}",
"org.globus.swift.language.Function getFunctionArray(int i);",
"private void testExternalIteration1() {\n\t\tfor(Movie m: movies){\n//\t\t\tSystem.out.println(\"Inside external iteration\");\n\t\t\tif(m.isClassic()){\n\t\t\t\ttop2Classics.add(m);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Top 2 classics (Ext Iteration): \" + top2Classics);\n\t}",
"Iterator<K> iterator();",
"public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }",
"@Override\n public List<Function> getFunctions() {\n if (!isLoaded()) {\n throw new IllegalStateException(\"Error: The module is not loaded\");\n }\n\n return new ArrayList<Function>(m_functions);\n }",
"public Set<String> getEnteringFunctionNames() {\n Set<String> results = new HashSet<>();\n Set<CFANode> visited = new HashSet<>();\n Queue<CFANode> waitlist = new ArrayDeque<>();\n waitlist.offer(this);\n while (!waitlist.isEmpty()) {\n CFANode current = waitlist.poll();\n if (visited.add(current)) {\n if (current.getFunctionName()\n .equals(CFASingleLoopTransformation.ARTIFICIAL_PROGRAM_COUNTER_FUNCTION_NAME)) {\n waitlist.addAll(CFAUtils.allPredecessorsOf(current).toList());\n } else {\n results.add(current.getFunctionName());\n }\n }\n }\n return results;\n }",
"Iterator<IntFloatEntry> iterator();",
"@VTID(11)\r\n java.util.Iterator<Com4jObject> iterator();",
"public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}",
"public Iterator getIterator() {\n return myElements.iterator();\n }",
"public InstructionIterator getInstructions(Address addr, boolean forward);",
"public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }",
"public Iterator iterator() {\n\n return new EnumerationIterator(elements.keys());\n }",
"public Iterator<Object[]> getIterator()\n\t{\n\t\tinit();\n\t\t\n\t\treturn new SimpleIterator();\n\t}",
"public abstract Iterator<C17883a<E>> mo45843b();",
"public ListIterator<T> getAllByRowsIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}",
"Iterable<CtElement> asIterable();",
"public Set<String> getRegisteredFunctions();",
"public Iterator<IPessoa> getAtores();",
"public String getFunctions();",
"public interface Iterable<T> {\n Iterator<T> getIterator();\n}",
"public ListIterator<T> listIterator() { return new DLLListIterator(); }",
"public CodeUnitIterator getCodeUnits(Address addr, boolean forward);",
"public abstract AbstractObjectIterator<LocalAbstractObject> getAllObjects();",
"public abstract TreeIter<T> iterator();",
"public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }",
"public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }",
"public Iterator<String> iterator() {\n return strings.iterator();\n }",
"public ListIterator<T> listIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}",
"public CodeUnitIterator getCodeUnits(boolean forward);",
"public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}",
"public Iterator getIterator() {\n\t\t\n\t\treturn blocks.iterator();\n\t\t\n\t}",
"public Iterator<S> iterator() {\n\t\t// ..\n\t\treturn null;\n\t}",
"public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }",
"public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}",
"public abstract Iterator<E> createIterator();",
"@DISPID(-4)\n @PropGet\n java.util.Iterator<Com4jObject> iterator();",
"public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}",
"public Iterator<E> elementIterator() {\n return new EnumMultiset<E>.Itr<E>() {\n /* access modifiers changed from: package-private */\n public E output(int i) {\n return EnumMultiset.this.enumConstants[i];\n }\n };\n }",
"public Iterator iterator()\n {\n // optimization\n if (OldOldCache.this.isEmpty())\n {\n return NullImplementation.getIterator();\n }\n\n // complete entry set iterator\n Iterator iter = instantiateIterator();\n\n // filter to get rid of expired objects\n Filter filter = new Filter()\n {\n public boolean evaluate(Object o)\n {\n Entry entry = (Entry) o;\n boolean fExpired = entry.isExpired();\n if (fExpired)\n {\n OldOldCache.this.removeExpired(entry, true);\n }\n return !fExpired;\n }\n };\n\n return new FilterEnumerator(iter, filter);\n }",
"public /*@ non_null @*/ JMLIterator<E> iterator() {\n return new JMLEnumerationToIterator<E>(elements());\n }",
"public Iterator getIterator() {\n/* 87 */ return this.iterator;\n/* */ }",
"@FunctionalInterface\npublic interface FoldImplementation {\n void main(String[] args);\n}"
] | [
"0.7163787",
"0.6714686",
"0.66516685",
"0.6488659",
"0.6420354",
"0.61485565",
"0.59495175",
"0.5806332",
"0.57899225",
"0.56836265",
"0.5651981",
"0.5644702",
"0.56136173",
"0.5582062",
"0.55265266",
"0.55215305",
"0.55072415",
"0.55069023",
"0.5475894",
"0.5475894",
"0.5475894",
"0.5475894",
"0.5463138",
"0.5461704",
"0.5449318",
"0.54416406",
"0.54412955",
"0.54410493",
"0.54206204",
"0.54206204",
"0.54206204",
"0.5400597",
"0.5376394",
"0.5337629",
"0.5323997",
"0.5323997",
"0.5308683",
"0.52863765",
"0.5285686",
"0.52643156",
"0.5260149",
"0.5254647",
"0.5245383",
"0.5232723",
"0.5225428",
"0.5219163",
"0.52181435",
"0.5208568",
"0.5206271",
"0.52036124",
"0.520027",
"0.5190914",
"0.5190301",
"0.5179281",
"0.51760465",
"0.5160288",
"0.5158403",
"0.5148218",
"0.5136444",
"0.51343113",
"0.51273364",
"0.51151294",
"0.50963056",
"0.5092154",
"0.5092104",
"0.5091237",
"0.5087981",
"0.5071925",
"0.5059385",
"0.5030148",
"0.5028007",
"0.5025292",
"0.5022976",
"0.5018261",
"0.5010938",
"0.50082034",
"0.49951792",
"0.49889147",
"0.49810973",
"0.49800548",
"0.4968897",
"0.49687332",
"0.4965277",
"0.49652565",
"0.49535784",
"0.4944009",
"0.49420315",
"0.49322668",
"0.49216715",
"0.49147677",
"0.49138132",
"0.49036893",
"0.48991412",
"0.48968437",
"0.48907375",
"0.4890437",
"0.48823524",
"0.48776853",
"0.48758963",
"0.48736286"
] | 0.8524908 | 0 |
Get an iterator over all functions | public FunctionIterator getFunctions(boolean forward); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Iterable<T> getFunctions();",
"public FunctionIterator getExternalFunctions();",
"public FunctionIterator getFunctions(Address start, boolean forward);",
"@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }",
"public FunctionIterator getFunctions(AddressSetView asv, boolean forward);",
"private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }",
"public Collection<IFunction> getAllFunctions()\r\n\t{\r\n\t\treturn expressionRegistry.getAllFunctions();\r\n\t}",
"public T iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"Iterator<T> iterator();",
"public Iterator<Type> iterator();",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"Iterator actionListeners();",
"public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }",
"public Iterable<M> iterateAll();",
"public Iterator<String> iterator();",
"public Iterator<T> getIterator();",
"Iterator<E> iterator();",
"Iterator<E> iterator();",
"public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }",
"public Iterator<T> iterator() {\r\n return byGenerations();\r\n }",
"Iterator features();",
"private static void iterator() {\n\t\t\r\n\t}",
"Iterator<K> iterator();",
"protected Set<AeScriptFuncDef> findFunctions() {\r\n AeXPathFunctionNodeVisitor visitor = new AeXPathFunctionNodeVisitor();\r\n getXPathAST().visitAll(visitor);\r\n return visitor.getFunctions();\r\n }",
"public java.util.Iterator iteratorSupplier()\n // -end- 335C0D7A02E4 get_all_head327A646F00E6 \"Dependency::iteratorSupplier\"\n ;",
"public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }",
"public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }",
"@Override\n public Iterator<T> iterator() {\n return forwardIterator();\n }",
"public final List<DepFunction> getFunctions() {\n\t\treturn new LinkedList<>(this.functionMap.values());\n\t}",
"public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }",
"public FunctionInfo[] getFunctions() {\n/* 236 */ return this.functions;\n/* */ }",
"public Iterator<IPessoa> getAtores();",
"@Override\n @ApiStatus.Experimental\n public final @NotNull Iterator<@Nullable T> iterator() {\n List<T> result = cachedExtensions;\n return result == null ? createIterator() : result.iterator();\n }",
"@Override\n\tpublic Iterator<Statement> iterator() {\n\t\treturn iterator(null, null, null);\n\t}",
"public abstract TreeIter<T> iterator();",
"public Iterator<E> iterator() {\n\t\treturn new Itr();\n\t}",
"@Override\n\tpublic List<Function> findAll() {\n\t\treturn functionDao.findAll();\n\t}",
"public Vector<BasicSet> AllClosure(){\r\n\r\n\t\tVector<BasicSet> fermes=new Vector<BasicSet>();\r\n\t\tboolean success=false;\r\n\t\tint i=0;\r\n\t\t//BasicSet b=new BasicSet();\r\n\t\tfermes.add(FirstClosure());\r\n\t\tBasicSet attributs=new BasicSet();\r\n\t\tattributs.addAll(context.getAttributes());\r\n\t\twhile(success==false){\r\n\t\t\t//System.out.println(\"fermeeees iiii \"+fermes.get(i));\r\n\t\t\tBasicSet clone=(BasicSet) fermes.get(i).clone();\r\n\t\t\tfermes.add(NextClosure(attributs,clone));\r\n\t\t\t//System.out.println(\"fermeeees \"+fermes);\t\r\n\t\t\tif(fermes.lastElement().size()==context.getAttributeCount()){\r\n\t\t\t\tsuccess=true;\r\n\t\t\t\t//System.out.println(\"iiiii \"+i);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn fermes;\r\n\t}",
"public MathFunction[] getFunctions() {\n return func.clone ();\n }",
"public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }",
"public final Iterable getChainingIterator() {\n\t// TODO: Implemente the chaining iterator and add generic type to Iterable. I suppose it is this class.\n\tthrow new IllegalAccessError(\"Not implemented yet\");\n }",
"public Iterator<S> iterator() {\n\t\t// ..\n\t\treturn null;\n\t}",
"public List<Function> getFunctions(){\n\t\t\n\t\treturn null;\n\t}",
"public List<Function> getFunctions(String namespace, String name);",
"public static <E, F> Iterable<F> apply(Iterable<? extends E> iter, Function<? super E, ? extends F> f) {\r\n \treturn apply(f, iter);\n }",
"IteratorExp createIteratorExp();",
"Iterator<Entry<String, Var>> getIterator() {\n\t\treturn iter;\n\t}",
"public ListIterator<T> getAllByRowsIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}",
"public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }",
"public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}",
"Iterator<IntFloatEntry> iterator();",
"public InstructionIterator getInstructions(Address addr, boolean forward);",
"@Override\r\n\tpublic List<Function> getAllFunction() {\n\t\tString hql = \"from Function\";\r\n\t\treturn (List<Function>) getHibernateTemplate().find(hql);\r\n\t}",
"@Override\r\n\tpublic Iterator<K> iterator() {\n\t\treturn keys.iterator();\r\n\t}",
"public ListIterator<T> getAllByColumnsIterator() {\n\t\tAllByColumnsIterator it = new AllByColumnsIterator();\n\t\treturn it;\n\t}",
"public Iterator iterator() {\n\n return new EnumerationIterator(elements.keys());\n }",
"public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}",
"@Override\n @Nonnull Iterator<T> iterator();",
"@Override\n Iterator<T> iterator();",
"public Iterator<V> iterator()\n {\n return new Iterator<V>()\n {\n public boolean hasNext()\n {\n // STUB\n return false;\n } // hasNext()\n\n public V next()\n {\n // STUB\n return null;\n } // next()\n\n public void remove()\n throws UnsupportedOperationException\n {\n throw new UnsupportedOperationException();\n } // remove()\n }; // new Iterator<V>\n }",
"public void iterateEventList();",
"public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }",
"public String getFunctions();",
"@Override\r\n Iterator<E> iterator();",
"public UnmodifiableIterator<K> iterator() {\n return mo8403b().iterator();\n }",
"public ListIterator<T> listIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}",
"public InstructionIterator getInstructions(boolean forward);",
"void iterate(FnIntFloatToVoid function);",
"public Iterator<X> iterator() {\n return map.keySet().iterator();\n }",
"@Test\n public void iterator() {\n }",
"public static Function<Integer, Integer> getIterator(Function<Integer, Integer> func, int times) {\n\n return func;\n }",
"public Iterator getIterator() {\n return myElements.iterator();\n }",
"public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }",
"org.globus.swift.language.Function getFunctionArray(int i);",
"public abstract Iterator<E> createIterator();",
"public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }",
"org.globus.swift.language.Function[] getFunctionArray();",
"@Override\n\tpublic Iterator<Forme> iterator() {\n\t\treturn this.formes.iterator();\n\t}",
"private Function[] getFunctionObjects() throws Exception{\n String[] sFunctions = getStringProperty(ParameterList.FUNCTION_LIST, false).split(\",\");\n ArrayList<Function> functionArray = new ArrayList<Function>();\n \n for(String str : sFunctions){\n try{\n str = str.trim();\n Class<?> function = Class.forName(str);\n functionArray.add((Function)function.newInstance());\n }\n catch(ClassNotFoundException e){\n throw new ClassNotFoundException(\"Error loading the function set. Class \" + str + \" not found\", e);\n }\n }\n \n return functionArray.toArray(new Function[functionArray.size()]);\n }",
"public Set<String> getRegisteredFunctions();",
"public Iterator<K> iterator() {\n Set keySet = RBT.keySet();\n Iterator itr = keySet.iterator();\n return itr;\n }",
"public Iterator<String> iterator() {\n return strings.iterator();\n }",
"public Iterator<E> iterator()\n {\n return stack.iterator();\n }",
"public Iterator iterator () {\n return new MyIterator (first);\n }",
"public static Iterable<Node> iterableOf(@Nonnull final NamedNodeMap namedNodeMap) {\n\t\treturn () -> new NamedNodeMapIterator(namedNodeMap);\n\t}",
"@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }",
"public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }",
"public interface Iterable<T> {\n Iterator<T> getIterator();\n}",
"public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}",
"<C, PM> IteratorExp<C, PM> createIteratorExp();",
"public List<Function> getGlobalFunctions(String name);",
"public zzeiu iterator() {\n return new zzeio(this);\n }",
"public Iterator<Feature> featureIterator(){\n\t\treturn indexByFeature.keySet().iterator();\n\t}",
"public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}"
] | [
"0.8382948",
"0.7591398",
"0.7537458",
"0.7232473",
"0.7115265",
"0.65699506",
"0.6395531",
"0.63622093",
"0.631801",
"0.631801",
"0.631801",
"0.631801",
"0.6276612",
"0.62704754",
"0.62559",
"0.62559",
"0.62559",
"0.6233287",
"0.6190067",
"0.6177283",
"0.61465067",
"0.61349964",
"0.61016685",
"0.61016685",
"0.6074804",
"0.6041885",
"0.60134023",
"0.58976454",
"0.58416086",
"0.58325744",
"0.5828904",
"0.5809676",
"0.57747936",
"0.5747475",
"0.5715564",
"0.5705399",
"0.5699612",
"0.5697533",
"0.56821555",
"0.5677139",
"0.5676261",
"0.5672883",
"0.56644475",
"0.56589764",
"0.5654865",
"0.5644595",
"0.56407654",
"0.56312776",
"0.5624942",
"0.5623723",
"0.5619651",
"0.5617919",
"0.560204",
"0.5595178",
"0.5588935",
"0.55773246",
"0.5563518",
"0.55595404",
"0.55424285",
"0.5525501",
"0.55184823",
"0.54968405",
"0.54949284",
"0.5493688",
"0.5493082",
"0.5491609",
"0.54862547",
"0.5482532",
"0.5475049",
"0.54629296",
"0.5462656",
"0.54510385",
"0.5450997",
"0.54471844",
"0.54438406",
"0.5443647",
"0.5436689",
"0.54255635",
"0.5415671",
"0.5413162",
"0.54052687",
"0.53938335",
"0.5379002",
"0.5376995",
"0.53769857",
"0.53740984",
"0.5372073",
"0.5370564",
"0.53687143",
"0.5358783",
"0.5353825",
"0.53521067",
"0.5350492",
"0.5348479",
"0.53482807",
"0.53405315",
"0.53402305",
"0.5331525",
"0.5327858",
"0.5327529"
] | 0.7644827 | 1 |
Get an iterator over all functions starting at address | public FunctionIterator getFunctions(Address start, boolean forward); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FunctionIterator getFunctions(AddressSetView asv, boolean forward);",
"public InstructionIterator getInstructions(Address addr, boolean forward);",
"public FunctionIterator getFunctions(boolean forward);",
"public FunctionIterator getExternalFunctions();",
"public Function getFunctionContaining(Address addr);",
"Iterable<T> getFunctions();",
"public CodeUnitIterator getCodeUnits(Address addr, boolean forward);",
"public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);",
"@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }",
"public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);",
"public Function getFunctionAt(Address entryPoint);",
"public DataIterator getDefinedData(Address addr, boolean forward);",
"public DataIterator getData(Address addr, boolean forward);",
"public InstructionIterator getInstructions(boolean forward);",
"public T iterator();",
"public boolean isInFunction(Address addr);",
"public FunctionInfo[] getFunctions() {\n/* 236 */ return this.functions;\n/* */ }",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"public Iterator<Type> iterator();",
"org.globus.swift.language.Function getFunctionArray(int i);",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public List<Function> getFunctions(String namespace, String name);",
"Iterator<T> iterator();",
"protected Set<AeScriptFuncDef> findFunctions() {\r\n AeXPathFunctionNodeVisitor visitor = new AeXPathFunctionNodeVisitor();\r\n getXPathAST().visitAll(visitor);\r\n return visitor.getFunctions();\r\n }",
"public java.util.Iterator iteratorSupplier()\n // -end- 335C0D7A02E4 get_all_head327A646F00E6 \"Dependency::iteratorSupplier\"\n ;",
"public Iterator<String> iterator();",
"public Iterator<IPessoa> getAtores();",
"Iterator<E> iterator();",
"Iterator<E> iterator();",
"public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);",
"UserFunction getUserFunctions(int index);",
"public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);",
"private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }",
"public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }",
"public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }",
"public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }",
"Iterator actionListeners();",
"public Set<String> getEnteringFunctionNames() {\n Set<String> results = new HashSet<>();\n Set<CFANode> visited = new HashSet<>();\n Queue<CFANode> waitlist = new ArrayDeque<>();\n waitlist.offer(this);\n while (!waitlist.isEmpty()) {\n CFANode current = waitlist.poll();\n if (visited.add(current)) {\n if (current.getFunctionName()\n .equals(CFASingleLoopTransformation.ARTIFICIAL_PROGRAM_COUNTER_FUNCTION_NAME)) {\n waitlist.addAll(CFAUtils.allPredecessorsOf(current).toList());\n } else {\n results.add(current.getFunctionName());\n }\n }\n }\n return results;\n }",
"private static void iterator() {\n\t\t\r\n\t}",
"public CodeUnitIterator getCodeUnitIterator(String property, AddressSetView addrSet,\n\t\t\tboolean forward);",
"BooleanIterator iterator(int startIndex);",
"public Iterator getPrefixes(String uri) {\n throw new UnsupportedOperationException();\n }",
"public final List<DepFunction> getFunctions() {\n\t\treturn new LinkedList<>(this.functionMap.values());\n\t}",
"@Override\n\tpublic List<Function> findAll() {\n\t\treturn functionDao.findAll();\n\t}",
"public List<Function> getGlobalFunctions(String name);",
"@Override\n public Iterator<T> iterator() {\n return forwardIterator();\n }",
"public Collection<IFunction> getAllFunctions()\r\n\t{\r\n\t\treturn expressionRegistry.getAllFunctions();\r\n\t}",
"Iterator features();",
"public Iterator<Range> iterator(ValueMapper mapper) {\n return new Trie2Iterator(mapper);\n }",
"public static Function<Integer, Integer> getIterator(Function<Integer, Integer> func, int times) {\n\n return func;\n }",
"public DataIterator getData(AddressSetView addrSet, boolean forward);",
"org.globus.swift.language.Function[] getFunctionArray();",
"public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);",
"public Iterator<T> getIterator();",
"IteratorExp createIteratorExp();",
"@Override\r\n\tpublic List<Function> getAllFunction() {\n\t\tString hql = \"from Function\";\r\n\t\treturn (List<Function>) getHibernateTemplate().find(hql);\r\n\t}",
"public Iterator iterator () {\n return new MyIterator (first);\n }",
"@Override\n\tpublic Iterator<StackType> iterator();",
"public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}",
"public Iterator<? extends ICodeBase> auxCodeBaseIterator();",
"public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}",
"public Call<ExpResult<List<DelegationInfo>>> getDelegations(MinterAddress address) {\n checkNotNull(address, \"Address can't be null\");\n\n return getInstantService().getDelegationsForAddress(address.toString(), 1);\n }",
"public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }",
"Iterator<K> iterator();",
"public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }",
"@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }",
"Iterator<IntFloatEntry> iterator();",
"public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }",
"private Address getNextAddress(Address addr) {\n\n\t\tInstruction instr = listing.getInstructionAfter(addr);\n\t\tAddress instrAddr = instr != null ? instr.getMinAddress() : null;\n\n\t\treturn instrAddr;\n// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS\n\n// Data data = getDefinedDataAfter(addr);\n// Address dataAddr = data != null ? data.getMinAddress() : null;\n// \n// if (instrAddr != null) {\n// \tif (dataAddr != null) {\n// \t\treturn (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;\n// \t}\n// \telse {\n// \t\treturn instrAddr;\n// \t}\n// }\n// return dataAddr;\n\t}",
"private Function[] getFunctionObjects() throws Exception{\n String[] sFunctions = getStringProperty(ParameterList.FUNCTION_LIST, false).split(\",\");\n ArrayList<Function> functionArray = new ArrayList<Function>();\n \n for(String str : sFunctions){\n try{\n str = str.trim();\n Class<?> function = Class.forName(str);\n functionArray.add((Function)function.newInstance());\n }\n catch(ClassNotFoundException e){\n throw new ClassNotFoundException(\"Error loading the function set. Class \" + str + \" not found\", e);\n }\n }\n \n return functionArray.toArray(new Function[functionArray.size()]);\n }",
"public Instruction getInstructionContaining(Address addr);",
"public LazyFlatteningIterator(Iterator<S> src, Fn1<S,Iterable<T>> mapFn) {\r\n this.sourceIterator = src;\r\n this.mapFn = mapFn;\r\n advance();\r\n }",
"public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }",
"public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}",
"Iterator<TrieEntry<T, U>> trieIterator();",
"public CodeUnitIterator getCodeUnitIterator(String property, boolean forward);",
"public Iterator<T> iterator() {\r\n return byGenerations();\r\n }",
"@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}",
"public Iterator<?> xpathIterator(Collection<?> collection, String query) {\n JXPathContext pathContext = JXPathContext.newContext(collection);\n Iterator<?> result = null;\n try {\n result = pathContext.iteratePointers(query);\n } catch (JXPathNotFoundException e) {\n logger.log(Level.WARNING, \"JXPath exception: {0}\", e.getMessage());\n }\n return result;\n }",
"public static final Iterator map(final Iterator it, final Function fn) {\n return new Iterator() {\n\n public final boolean hasNext() {\n return it.hasNext();\n }\n\n public final Object next() {\n return fn.fn(it.next());\n }\n\n public final void remove() {\n throw new RuntimeException(\"Not implemented\");\n }\n\n };\n }",
"public Iterator<E> iterator()\n {\n return stack.iterator();\n }",
"public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }",
"public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }",
"public Iterator<T> getPageElements();",
"public abstract Iterator<C17883a<E>> mo45843b();",
"Iterable<Callable<?>> getCommands(Class<? extends Annotation> transition);",
"protected List<String> getFunctionAliases(Function f) {\n List<String> ret = new ArrayList<String>();\n\n for (String curF : callMap.keySet()) {\n for (Function curFunc : callMap.get(curF)) {\n if(curFunc.getName().equals(f.getName())) {\n ret.add(curF);\n break;\n }\n }\n }\n\n return ret;\n }",
"public String getFunctions();",
"public Iterator<? extends ICodeBase> appCodeBaseIterator();",
"public Iterator<Feature> featureIterator(){\n\t\treturn indexByFeature.keySet().iterator();\n\t}",
"public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}",
"public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }",
"void next();",
"public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }",
"public IFunctionPattern[] getPatterns();"
] | [
"0.73460495",
"0.6920619",
"0.6694628",
"0.6571473",
"0.6320805",
"0.63079184",
"0.59914494",
"0.5950222",
"0.5920249",
"0.5765454",
"0.56353307",
"0.5517562",
"0.54963",
"0.54347813",
"0.52954346",
"0.52709204",
"0.5180159",
"0.5177657",
"0.5177657",
"0.5177657",
"0.51637477",
"0.5156916",
"0.51494324",
"0.51494324",
"0.51494324",
"0.51494324",
"0.51484054",
"0.5147651",
"0.5135073",
"0.51321495",
"0.5130177",
"0.51009536",
"0.5100228",
"0.5100228",
"0.5094681",
"0.50946164",
"0.5015513",
"0.50149286",
"0.4995211",
"0.49776614",
"0.4966999",
"0.49571735",
"0.49313208",
"0.4930084",
"0.49230534",
"0.4904272",
"0.4897725",
"0.48868155",
"0.48866788",
"0.4883479",
"0.4876295",
"0.48641804",
"0.4859988",
"0.4854145",
"0.48193127",
"0.48035094",
"0.47960898",
"0.47897142",
"0.47808743",
"0.47692108",
"0.4766335",
"0.4757773",
"0.47555506",
"0.4754901",
"0.47366711",
"0.47339383",
"0.4723017",
"0.4713111",
"0.46947634",
"0.469382",
"0.46867764",
"0.46813425",
"0.46628332",
"0.46625984",
"0.46621007",
"0.46579805",
"0.46513206",
"0.46384802",
"0.46315426",
"0.46294618",
"0.4627542",
"0.46273592",
"0.46273103",
"0.4616057",
"0.4612735",
"0.46046624",
"0.4601533",
"0.45999217",
"0.459905",
"0.4598093",
"0.4593277",
"0.4592773",
"0.4589772",
"0.45886144",
"0.45839947",
"0.45825696",
"0.4581512",
"0.4578807",
"0.45771128",
"0.4575924"
] | 0.8014393 | 0 |
Get an iterator over all functions with entry points in the address set. | public FunctionIterator getFunctions(AddressSetView asv, boolean forward); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FunctionIterator getFunctions(Address start, boolean forward);",
"public FunctionIterator getExternalFunctions();",
"Iterable<T> getFunctions();",
"public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);",
"public FunctionIterator getFunctions(boolean forward);",
"public InstructionIterator getInstructions(Address addr, boolean forward);",
"private IterableSet<AugmentedStmt> get_EntryPoint(IterableSet<AugmentedStmt> nodeList) {\n IterableSet<AugmentedStmt> entryPoints = new IterableSet<AugmentedStmt>();\n\n for (AugmentedStmt as : nodeList) {\n for (AugmentedStmt po : as.cpreds) {\n if (nodeList.contains(po) == false) {\n entryPoints.add(as);\n break;\n }\n }\n }\n\n return entryPoints;\n }",
"@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }",
"public Function getFunctionAt(Address entryPoint);",
"public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}",
"protected Set<AeScriptFuncDef> findFunctions() {\r\n AeXPathFunctionNodeVisitor visitor = new AeXPathFunctionNodeVisitor();\r\n getXPathAST().visitAll(visitor);\r\n return visitor.getFunctions();\r\n }",
"public Set<String> getEnteringFunctionNames() {\n Set<String> results = new HashSet<>();\n Set<CFANode> visited = new HashSet<>();\n Queue<CFANode> waitlist = new ArrayDeque<>();\n waitlist.offer(this);\n while (!waitlist.isEmpty()) {\n CFANode current = waitlist.poll();\n if (visited.add(current)) {\n if (current.getFunctionName()\n .equals(CFASingleLoopTransformation.ARTIFICIAL_PROGRAM_COUNTER_FUNCTION_NAME)) {\n waitlist.addAll(CFAUtils.allPredecessorsOf(current).toList());\n } else {\n results.add(current.getFunctionName());\n }\n }\n }\n return results;\n }",
"public Function getFunctionContaining(Address addr);",
"public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);",
"public FunctionInfo[] getFunctions() {\n/* 236 */ return this.functions;\n/* */ }",
"public Set<String> getRegisteredFunctions();",
"public Set<AddressEntry> getEntry() {\n return entrySet;\n }",
"public CodeUnitIterator getCodeUnits(AddressSetView addrSet, boolean forward);",
"@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic Iterable<Entry<K, V>> entrySet() {\n\t/* TCJ\n\t * Iterates through potentially entire collection: O(n)\n\t */\n\t\treturn snapShot(0, null);\n\t}",
"public DataIterator getDefinedData(AddressSetView addrSet, boolean forward);",
"public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }",
"public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }",
"public final List<DepFunction> getFunctions() {\n\t\treturn new LinkedList<>(this.functionMap.values());\n\t}",
"@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }",
"@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}",
"public Collection<IFunction> getAllFunctions()\r\n\t{\r\n\t\treturn expressionRegistry.getAllFunctions();\r\n\t}",
"Iterator<Entry<String, Var>> getIterator() {\n\t\treturn iter;\n\t}",
"public java.util.Iterator iteratorSupplier()\n // -end- 335C0D7A02E4 get_all_head327A646F00E6 \"Dependency::iteratorSupplier\"\n ;",
"public Map<CeloContract, String> allAddresses() {\n for (CeloContract contract : CeloContract.values()) {\n this.addressFor(contract);\n }\n return cache;\n }",
"public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\tSet<Entry<K, V>> entrySet = map.entrySet();\n\t\tListSet<Entry<K, V>> listSet = new ListSet<Map.Entry<K,V>>();\n\t\tfor (K key : keys) {\n\t\t\t\n\t\t\tfor (Entry<K, V> entry : entrySet) {\n\t\t\t\tif (entry.getKey().equals(key)) {\n\t\t\t\t\tlistSet.add(entry);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn listSet;\n\t}",
"public Iterable<Entry<K, V>> entries();",
"public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }",
"public Vector<BasicSet> AllClosure(){\r\n\r\n\t\tVector<BasicSet> fermes=new Vector<BasicSet>();\r\n\t\tboolean success=false;\r\n\t\tint i=0;\r\n\t\t//BasicSet b=new BasicSet();\r\n\t\tfermes.add(FirstClosure());\r\n\t\tBasicSet attributs=new BasicSet();\r\n\t\tattributs.addAll(context.getAttributes());\r\n\t\twhile(success==false){\r\n\t\t\t//System.out.println(\"fermeeees iiii \"+fermes.get(i));\r\n\t\t\tBasicSet clone=(BasicSet) fermes.get(i).clone();\r\n\t\t\tfermes.add(NextClosure(attributs,clone));\r\n\t\t\t//System.out.println(\"fermeeees \"+fermes);\t\r\n\t\t\tif(fermes.lastElement().size()==context.getAttributeCount()){\r\n\t\t\t\tsuccess=true;\r\n\t\t\t\t//System.out.println(\"iiiii \"+i);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn fermes;\r\n\t}",
"public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }",
"public Iterator<? extends ICodeBase> appCodeBaseIterator();",
"@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new SetIterator();\n }",
"public List<Address> getWatchedAddresses() {\n try {\n List<Address> addresses = new LinkedList<Address>();\n for (Script script : watchedScripts)\n if (script.isSentToAddress())\n addresses.add(script.getToAddress(params));\n return addresses;\n } finally {\n }\n }",
"public CodeUnitIterator getCodeUnits(Address addr, boolean forward);",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleConcurrentHashMap.entrySet()\");\n return mMap.entrySet();\n }",
"public Function[] getFunctionSet() {\n Function[] copyFunctionSet = new Function[functionSet.length];\n for(int i = 0; i < functionSet.length; i++){\n copyFunctionSet[i] = functionSet[i].softClone();\n }\n return copyFunctionSet;\n }",
"private Iterator getEntries(){\r\n\t\tSet entries = items.entrySet();\r\n\t\treturn entries.iterator();\r\n\t}",
"public Set<Map.Entry<Integer, String>> entrySet() {\n return Collections.unmodifiableSet(getMacrosses().entrySet());\n }",
"public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }",
"@Override\r\n\tpublic Iterator<GIS_layer> iterator() {\n\t\treturn set.iterator();\r\n\t}",
"public Set entrySet() {\n\treturn new EntrySet(map.entrySet());\n }",
"public native IterableIterator<Tuple<K, V>> entries();",
"public List<Function> getFunctions(){\n\t\t\n\t\treturn null;\n\t}",
"public Iterator<X> iterator() {\n return map.keySet().iterator();\n }",
"public abstract Set<Map.Entry<K, V>> entrySet();",
"public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }",
"public Iterator getBindings() {\r\n\t\treturn bindings == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(bindings.values());\r\n\t}",
"public UMOEntryPointResolverSet getEntryPointResolverSet()\n {\n return entryPointResolverSet;\n }",
"public Collection<String> getPredicates() {\n HashSet<String> fullURISet = new HashSet<>();\n StmtIterator si = model.listStatements();\n while (si.hasNext()) {\n fullURISet.add(si.nextStatement().getPredicate().toString());\n }\n return fullURISet;\n }",
"public Iterator<GPoint> iterator() {\n\t\treturn points.iterator();\n\t}",
"public List<Function> getGlobalFunctions(String name);",
"@Override\n public Set<Map.Entry<String, T>> entrySet() {\n Set<Map.Entry<String, T>> entrySet = new TreeSet<>();\n for (Map.Entry<String, Map.Entry<String, T>> v : entries.entrySet()) {\n entrySet.add(new Entry<>(v));\n }\n return entrySet;\n }",
"public Set entrySet() {\n return map.entrySet();\n }",
"public Iterable<Entry<K, V>> entrySet() {\n ArrayList<Entry<K, V>> buffer = new ArrayList<>();\n for (int h = 0; h < capacity; h++)\n if (!isAvailable(h)) buffer.add(table[h]);\n return buffer;\n }",
"public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }",
"public Iterator iterator() {\n\t\treturn map.keySet().iterator();\n\t}",
"public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }",
"public InstructionIterator getInstructions(boolean forward);",
"private Set<Map.Entry<String, Integer>> getEndpointFrequencyEntrySet() {\n return endpointVisitFrequency.entrySet();\n }",
"private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }",
"Set<URI> fetchAllUris(ServicePath service);",
"public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleHashMap.entrySet()\");\n return mMap.entrySet();\n }",
"@Override\n public Set<Map.Entry<K, V>> entrySet() {\n return new EntrySet();\n }",
"@Override\n @ApiStatus.Experimental\n public final @NotNull Iterator<@Nullable T> iterator() {\n List<T> result = cachedExtensions;\n return result == null ? createIterator() : result.iterator();\n }",
"public final Iterator<Initializer> getStatefulEventIterator()\n {\n return statefulEventInitializers.iterator();\n }",
"public final String[] getEntryPoints() {\n return mEntryPoints;\n }",
"public Iterator reachable() {\n Set s = SortedArraySet.FACTORY.makeSet(HashCodeComparator.INSTANCE);\n s.add(IdentityHashCodeWrapper.create(this));\n this.reachable(s);\n return new FilterIterator(s.iterator(), filter);\n }",
"public List<Address> getAddresses()\n\t{\n\t\treturn getAddresses( getSession().getSessionContext() );\n\t}",
"public DataIterator getDefinedData(Address addr, boolean forward);",
"public Iterator<Feature> featureIterator(){\n\t\treturn indexByFeature.keySet().iterator();\n\t}",
"public Set<java.util.Map.Entry<E, V>> entrySet() {\n\t\treturn null;\r\n\t}",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleTreeMap.entrySet()\");\n return mMap.entrySet();\n }",
"public static Set<Symbol> getAccessedSymbols(Traversable t) {\n Set<Symbol> ret = new HashSet<Symbol>();\n if (t == null) {\n return ret;\n }\n DFIterator<Identifier> iter =\n new DFIterator<Identifier>(t, Identifier.class);\n while (iter.hasNext()) {\n Symbol symbol = iter.next().getSymbol();\n if (symbol != null) {\n ret.add(symbol);\n }\n }\n return ret;\n }",
"Iterator<IntFloatEntry> iterator();",
"public DataIterator getData(AddressSetView addrSet, boolean forward);",
"public LookupLocator[] getLookupLocators() throws RemoteException {\n\t\treturn disco.getLocators();\n\t}",
"public boolean isInFunction(Address addr);",
"@Override\n public Set<Map.Entry<Integer,String>> entrySet() {\n return IntStream.range(0, size)\n .mapToObj(Entry::new)\n .collect(Collectors\n .toCollection(LinkedHashSet::new));\n }",
"public static synchronized Set<Map.Entry<Class<?>, String>> entrySet() {\n\t\treturn ClassRegistry.dictionary.entrySet();\n\t}",
"private void visitAdditionalEntrypoints() {\n\tLinkedHashSet<jq_Class> extraClasses = new LinkedHashSet<jq_Class>();\n\tfor(jq_Method m: publicMethods) {\n\t extraClasses.add(m.getDeclaringClass());\n\t}\n\t\n\tfor(jq_Class cl: extraClasses) {\n\t visitClass(cl);\n\t\t\tjq_Method ctor = cl.getInitializer(new jq_NameAndDesc(\"<init>\", \"()V\"));\n\t\t\tif (ctor != null)\n\t\t\t\tvisitMethod(ctor);\n\t}\n\n\tfor(jq_Method m: publicMethods) {\n\t visitMethod(m);\n\t}\n }",
"public List<Address> getAllAddresses() throws BackendException;",
"public Iterator<Map.Entry<String, AbstractNode>> getPairIterator()\n\t{\n\t\treturn pairs.entrySet().iterator();\n\t}",
"@Override\n\tpublic List<Function> findAll() {\n\t\treturn functionDao.findAll();\n\t}",
"public static Set<Symbol> getLocalSymbols(Traversable t) {\n Set<Symbol> ret = new LinkedHashSet<Symbol>();\n if (t == null) {\n return ret;\n }\n DFIterator<SymbolTable> iter =\n new DFIterator<SymbolTable>(t, SymbolTable.class);\n while (iter.hasNext()) {\n ret.addAll(getSymbols(iter.next()));\n }\n return ret;\n }",
"public Set<Map.Entry<String, Collection<V>>> entrySet() {\n return map.entrySet();\n }",
"public List<Function> getFunctions(String namespace, String name);",
"public Iterator nodeIterator() { return nodes.keySet().iterator(); }",
"public Iterable<Origin> origins() {\n return backendServices.stream()\n .map(BackendService::origins)\n .flatMap(Collection::stream)\n .collect(toList());\n }",
"Iterator<TrieEntry<T, U>> trieIterator();",
"public Set<Entry<K, V>> entrySet() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}",
"public T iterator();",
"public Object[] entrySet() {\n MyStack<Object> result = new MyStack<>();\n\n for (Object entry : this.table) {\n if (entry != null) {\n Entry<K, V> current = (Entry<K, V>) entry;\n\n while (current.hasNext()) {\n result.push(current);\n current = current.getNext();\n }\n result.push(current);\n }\n }\n return result.toArray();\n }",
"Iterator<E> iterator();"
] | [
"0.69344354",
"0.6511227",
"0.63035804",
"0.6160314",
"0.60905313",
"0.59305465",
"0.5861004",
"0.5516294",
"0.54979575",
"0.54526687",
"0.54423046",
"0.54304576",
"0.5348388",
"0.53103995",
"0.5261204",
"0.52553236",
"0.5231671",
"0.52249575",
"0.5223172",
"0.5217217",
"0.5210265",
"0.5197074",
"0.5176344",
"0.51735866",
"0.51623625",
"0.5141418",
"0.5123564",
"0.51020163",
"0.5101141",
"0.5088241",
"0.5085294",
"0.50749075",
"0.5074114",
"0.5065862",
"0.504222",
"0.5023967",
"0.5016373",
"0.5009987",
"0.5008897",
"0.50081843",
"0.50028765",
"0.49742252",
"0.49705017",
"0.49701402",
"0.49689102",
"0.493708",
"0.49364072",
"0.49316597",
"0.49289697",
"0.4926099",
"0.49227262",
"0.49058774",
"0.49041143",
"0.48914763",
"0.4872817",
"0.48704463",
"0.4868405",
"0.48664305",
"0.48656994",
"0.48524886",
"0.48520768",
"0.48505512",
"0.48476323",
"0.48430306",
"0.4838528",
"0.4831371",
"0.4823047",
"0.4814928",
"0.4814557",
"0.48101455",
"0.4808114",
"0.480688",
"0.4806695",
"0.47968137",
"0.47930875",
"0.47924197",
"0.47850588",
"0.47800058",
"0.47789383",
"0.477842",
"0.47742757",
"0.47729543",
"0.47724482",
"0.47702563",
"0.47540998",
"0.4746372",
"0.47418126",
"0.47375414",
"0.47350946",
"0.4733815",
"0.47301656",
"0.47275025",
"0.47194958",
"0.47091568",
"0.47043717",
"0.46937054",
"0.46874997",
"0.46873423",
"0.46872565",
"0.46869364"
] | 0.72397155 | 0 |
Check if an address is contained in a function | public boolean isInFunction(Address addr); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Function getFunctionContaining(Address addr);",
"boolean hasFunction(String functionName);",
"boolean hasAddress();",
"boolean hasAddress();",
"boolean hasHasAddress();",
"public boolean containFunction(String name) {\n\t\tif (!global.containFunction(name)) {\r\n\t\t\treturn this.fnMap.containsKey(name);\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}",
"public abstract boolean isInCallingProcedure(SDGNode n);",
"public boolean isInFunction(){\n if (findEnclosingFunction() != null){\n return true;\n }\n return isFunction;\n }",
"boolean isAddressOf(int addr) {\n return addr == mAddress;\n }",
"boolean hasAddressList();",
"static public boolean containsCall(String module) throws Exception, Error\n {\n Pattern pattern = Pattern.compile(\"call\\\\{.*?\\\\}\");\n Matcher matcher = pattern.matcher(module);\n if(matcher.find()) return true;\n else return false;\n }",
"abstract void checkWhetherFunction(int nParamsUsed, SyntaxUnit use);",
"public boolean containsAddress(String address)\n {\n boolean hasAddr = false;\n //Scan addresses for this address\n address = Numeric.cleanHexPrefix(address);\n for (String thisAddr : addresses)\n {\n if (thisAddr != null && thisAddr.contains(address))\n {\n hasAddr = true;\n break;\n }\n }\n\n return hasAddr;\n }",
"public boolean containsAddress(String address) {\n\t\treturn tseqnums.containsKey(address);\n\t}",
"boolean hasQueryAddress();",
"private static boolean isFunctionCall(CFAEdge pCfaEdge, String pExpectedFunctionName) {\n if (!(pCfaEdge instanceof AStatementEdge)) {\n return false;\n }\n AStatement statement = ((AStatementEdge) pCfaEdge).getStatement();\n if (!(statement instanceof AFunctionCall)) {\n return false;\n }\n AExpression callee =\n ((AFunctionCall) statement).getFunctionCallExpression().getFunctionNameExpression();\n if (!(callee instanceof AIdExpression)) {\n return false;\n }\n String functionName = ((AIdExpression) callee).getName();\n return functionName.equals(pExpectedFunctionName);\n }",
"boolean hasFrom();",
"public Function getFunctionAt(Address entryPoint);",
"boolean canPlaceRobber(HexLocation hexLoc);",
"public Instruction getInstructionContaining(Address addr);",
"boolean hasProcedure(String procedureName) throws Exception;",
"protected boolean containsAddress(InetAddress address) {\n\t\ttry {\n\t\t\tPreparedStatement pstmt = this.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\tthis.agent.getDatabaseManager().selectByAddress);\n\t\t\tif (address==null) pstmt.setString(1, \"localhost\");\n\t\t\telse pstmt.setString(1, NetworkManager.addressToString(address));\n\t ResultSet rs = pstmt.executeQuery();\n\t return !(rs.isClosed());\n\t\t} catch (SQLException e) {\n \tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to check if address %s is in the database\\n\",address), e);\n\t\t}\n\t\treturn true; // Pas accessible\n\t}",
"abstract boolean hasFunctionSelfArgument(Object definedOn);",
"boolean hasLocation();",
"boolean hasLocation();",
"public boolean\n hasCall()\n {\n //##62 return hasCallInSubp;\n if (fCallCount > 0)\n return true;\n else\n return false;\n }",
"public static boolean contains(FunctionCall fcall) {\n return (ThirdPartyLibrary.modIdxMap.get(fcall.getName().toString()) != null);\n }",
"protected int isExternByAddress(String address) {\n\t\ttry {\n\t\t\tPreparedStatement pstmt = \n\t\t\t\t\tthis.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\t\t\tthis.agent.getDatabaseManager().selectByAddress);\n\t pstmt.setString(1,address);\n\t ResultSet rs = pstmt.executeQuery();\n\t return rs.getInt(\"isExtern\");\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get isExtern of address %s in the database\\n\",address), e);\n\t\t}\n return 0; // Pas accessible\n\t}",
"public boolean containsFunction(String functions, String function) {\n if (this.mBridge.mHandler != null) {\n return this.mBridge.mHandler.containsFunction(functions, function);\n }\n return false;\n }",
"protected boolean isFunction( String word )\r\n\t{\r\n\t\treturn m_listFunctions.contains(word);\r\n\t}",
"public static boolean AnyFunctionTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AnyFunctionTest\")) return false;\n if (!nextTokenIs(b, K_FUNCTION)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, ANY_FUNCTION_TEST, null);\n r = consumeTokens(b, 3, K_FUNCTION, L_PAR, STAR_SIGN, R_PAR);\n p = r; // pin = 3\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"boolean hasBitcoinAddress();",
"private boolean canFindLocationAddress(){\n\n Geocoder geo = new Geocoder(this);\n\n //Get address provided for location as Address object\n try{\n List<Address> foundAddresses = geo.getFromLocationName(location.getAddress(),1);\n //Return true if an address is found\n return (foundAddresses.size() == 1);\n }\n catch(IOException e){\n e.printStackTrace();\n return false;\n }\n\n }",
"boolean hasCoordinates();",
"boolean hasCoordinates();",
"boolean hasCoordinates();",
"private boolean isFunction(Tip t, Tip expectedRet) {\n\t\tif (t instanceof Funkcija) {\n\t\t\tFunkcija buff = (Funkcija) t;\n\t\t\tif (buff.primitiv.equals(expectedRet.primitiv)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"boolean hasResponseAddress();",
"public abstract boolean containsPoint(int x, int y);",
"boolean hasFunctionApproximation();",
"private static boolean isLocalVariableForFunction(String scopedVarName, String function) {\n return scopedVarName.startsWith(function + \"::\");\n }",
"boolean hasIsPartOf();",
"boolean hasInvoke();",
"public boolean isChildOf(Xcode opcode) {\n Xnode crt = this;\n while(crt != null) {\n if(crt.ancestor().opcode() == opcode) {\n return true;\n }\n // Stop searching when FfunctionDefinition is reached\n if(crt.ancestor().opcode() == Xcode.F_FUNCTION_DEFINITION) {\n return false;\n }\n crt = crt.ancestor();\n }\n return false;\n }",
"boolean isCallableAccess();",
"boolean hasSymbol();",
"boolean hasSymbol();",
"boolean hasAuvLoc();",
"boolean hasCode();",
"boolean hasCode();",
"boolean hasCode();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"boolean hasX();",
"public boolean hasPositionCall() {\n if (_left.hasPositionCall()) return true;\n if (_right.hasPositionCall()) return true;\n return false;\n }",
"boolean hasMethodName();",
"boolean hasMethodName();",
"boolean hasMethodName();",
"public boolean isUndefined(Address start, Address end);",
"public static boolean isMethodInStack(String methodName) {\n\t\tStackTraceElement stackTraceElements[] = (new Throwable()).getStackTrace();\n\t\tfor (int i = 0; i < stackTraceElements.length; i++) {\n\t\t\tif (stackTraceElements[i].toString().contains(methodName)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public Boolean boundaryCheck(int addr) {\r\n\t\t// Make sure address is less than LIMIT and SP, and greater than base\r\n\t\tif (addr < getLIM() && addr < getSP() && addr >= getBASE()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tm_TH.interruptIllegalMemoryAccess(addr);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static boolean is_callable(String _name) {\n\t\treturn false;\n\t}",
"boolean hasA();",
"boolean isLocator();",
"private boolean matches(Opcode opcode) {\n List<Integer> opcodeResult = opcode.perform(instruction.getA(), instruction.getB(), instruction.getC(), registersBefore);\n return registersAfter.equals(opcodeResult);\n }",
"public boolean contains(Point p);",
"public static boolean isLibFunction(String name) {\n return name.equals(\"_xi_alloc\") || name.equals(\"_xi_out_of_bounds\");\n }",
"public boolean existsAddress(byte ip[])\n {\n try\n {\n return (resolve(ip)!=null); \n }\n catch (UnknownHostException e)\n {\n return false; \n }\n }",
"boolean isBlacklisted(String functionIdentifier, FunctionParameters functionParameters);",
"boolean hasMethod();",
"boolean hasMethod();",
"boolean hasMethod();",
"boolean hasIp();",
"boolean hasIp();",
"boolean hasIp();",
"boolean hasIp();",
"boolean hasOffset();",
"boolean functionExists(ObjectPath functionPath) throws CatalogException;",
"public boolean isSetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMADDRESS$6) != 0;\n }\n }",
"protected boolean isAddressInRange(String range, String address) \r\n\t\t\tthrows ServletException {\r\n\t\t\r\n\t\tString network;\r\n\t\tString mask;\r\n\t\t\r\n\t\tint slashPos = range.indexOf('/');\r\n\t\tif (slashPos == -1) {\r\n\t\t\tnetwork = range;\r\n\t\t\tmask = \"255.255.255.255\";\r\n\t\t} else {\r\n\t\t\tnetwork = range.substring(0, slashPos);\r\n\t\t\tmask = range.substring(slashPos + 1);\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tbyte[] netBytes = InetAddress.getByName(network).getAddress();\r\n\t\t\tbyte[] maskBytes = InetAddress.getByName(mask).getAddress();\r\n\t\t\tbyte[] addrBytes = InetAddress.getByName(address).getAddress();\r\n\t\t\tfor (int i = 0; i < netBytes.length; i++) {\r\n\t\t\t\tif ((netBytes[i] & maskBytes[i]) != (addrBytes[i] & maskBytes[i]))\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (UnknownHostException e) {\r\n\t\t\t// Should never happen, because we work with raw IP addresses, not\r\n\t\t\t// with host names.\r\n\t\t\tthrow new ServletException(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public boolean under(Class clazz, String methodName) {\n\t\treturn stackTrace.indexOf(clazz.getName() + \".\" + methodName + \"(\") != -1;\n\t}",
"boolean hasPosition();",
"boolean hasPosition();",
"boolean hasPosition();",
"boolean hasPosition();"
] | [
"0.7483668",
"0.70026076",
"0.6989673",
"0.6989673",
"0.6833319",
"0.66863537",
"0.65473104",
"0.65459836",
"0.64727676",
"0.60913473",
"0.6026423",
"0.5988574",
"0.5947679",
"0.5933962",
"0.5930364",
"0.587047",
"0.5786508",
"0.57440066",
"0.5703372",
"0.56940424",
"0.56885004",
"0.5670295",
"0.56520617",
"0.5637324",
"0.5637324",
"0.5606762",
"0.5605878",
"0.5603815",
"0.5590244",
"0.55718386",
"0.5571164",
"0.55457723",
"0.5530389",
"0.5527198",
"0.5527198",
"0.5527198",
"0.5522192",
"0.5494909",
"0.5483705",
"0.5477453",
"0.546489",
"0.54500234",
"0.5433543",
"0.54278666",
"0.542056",
"0.5416751",
"0.5416751",
"0.5413709",
"0.5406219",
"0.5406219",
"0.5406219",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.54015106",
"0.5401131",
"0.539853",
"0.539853",
"0.539853",
"0.5398407",
"0.53936774",
"0.53934836",
"0.5376921",
"0.537126",
"0.5338223",
"0.53342074",
"0.53321445",
"0.53280014",
"0.532678",
"0.5308898",
"0.52924836",
"0.52924836",
"0.52924836",
"0.52848035",
"0.52848035",
"0.52848035",
"0.52848035",
"0.52734506",
"0.5261889",
"0.52611244",
"0.52568704",
"0.5250456",
"0.52436686",
"0.52436686",
"0.52436686",
"0.52436686"
] | 0.8957629 | 0 |
Get the comment history for comments at the given address. | public CommentHistory[] getCommentHistory(Address addr, int commentType); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CallLog[] getCallHistoryForAddress(Address addr);",
"public List<AddressHistory> listAddressHistory(Long address)\n {\n \n @SuppressWarnings(\"unchecked\")\n List<AddressHistory> result = this.sessionFactory.getCurrentSession().createQuery(\"from AddressHistory as addressHistory where addressHistory.addressId = ? order by addressHistory.id asc\").setLong(0, address).list();\n\n return result;\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressWithDeliverability[] getAddressHistoryArray();",
"public String getComment(int commentType, Address address);",
"public List<Order> getOrderHistory();",
"public IssueHistory addHistory(String p_reportedBy, String p_commentText)\n {\n IssueHistory ih = new IssueHistoryImpl(this, p_reportedBy,\n p_commentText);\n // just add to the end of the list - the list will\n // be sorted when history is retrieved.\n m_issueHistory.add(ih);\n return ih;\n }",
"PagingLoadResult<GWTJahiaContentHistoryEntry> getContentHistory(String nodeIdentifier, int offset, int limit) throws GWTJahiaServiceException;",
"List<Order> getHistoryOrders(HistoryOrderRequest orderRequest);",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressWithDeliverability getAddressHistoryArray(int i);",
"public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}",
"@Override\r\n\tpublic List<Comment> findAllComment() {\n\t\treturn commentDao.findAllComment();\r\n\t}",
"public List<Comment> getComments() {\n fetchComments();\n return Collections.unmodifiableList(comments);\n }",
"List<Comment> getCommentsOfProject(int projectId) throws SQLException;",
"public List<Board> getCommentList(String boardUpper) throws SQLException {\n\t\treturn dao.getCommentList(boardUpper);\n\t}",
"@GET(\"V2/eshopping/order/statusHistories/{orderId}\")\n Observable<List<OrderStatus>> getOrderStatusComment(@Path(\"orderId\") Long orderId);",
"public synchronized Map<String, Long> getHistory() {\r\n return settings.getMap(HISTORY_SETTING);\r\n }",
"List<Comment> findAll();",
"public List<Comment> getComments(String query) throws UnsupportedEncodingException, SSOException{\n String fields = \"name,description,content,cat,source,title,relid,reltype,state,createdby,updateddate,rating\";\n\t\t\n List<AssetInfo> assetinfoList = search(wcs.getCsSiteName(), \"FW_Comment\", query, fields, null, null, null, null).getAssetinfos();\n List<Comment> assets = null;\n \n \n if(assetinfoList!= null && assetinfoList.size()>0){\n \tassets = new ArrayList<Comment>();\n\t for(AssetInfo info : assetinfoList){\n\t \t\n\t \t\t\n\t \t\n\t \tString relid = Mapper.getField(\"relid\",info.getFieldinfos());\n\t \tString reltype = Mapper.getField(\"reltype\",info.getFieldinfos());\n\n\n\t \tComment a = new Comment();\n\t \ta.setId(info.getId().split(\":\")[1]);\n\t \ta.setDescription(Mapper.getField(\"description\",info.getFieldinfos()) );\n\t \ta.setName(Mapper.getField(\"name\",info.getFieldinfos()) );\n\t \ta.setTitle(Mapper.getField(\"title\",info.getFieldinfos()) );\n\t \ta.setContent(Mapper.getField(\"content\",info.getFieldinfos()) );\n\t \ta.setState(Mapper.getField(\"state\",info.getFieldinfos()) );\n\t \ta.setRating(Mapper.getField(\"rating\",info.getFieldinfos()) );\t\t \t\n\t \ta.setRelid(relid);\n\t \ta.setReltype(reltype);\n\n\t \ta.setCreatedby(Mapper.getField(\"createdby\",info.getFieldinfos()) );\n\t \ta.setCreateddate(Mapper.getField(\"updateddate\",info.getFieldinfos()) );\n\n\n\t \tassets.add(a);\n\t }\n }\n \n return assets;\t\t\n\t}",
"public String getHistory () {\r\n\t\treturn history;\r\n\t}",
"public String getHistory () {\r\n\t\treturn history;\r\n\t}",
"public TradeHistoryReq address(String address) {\n this.address = address;\n return this;\n }",
"public List<CommentsEntity> getAllComments(){\n\t\tfinal List<CommentsEntity> comments = entityManager.createQuery(\"SELECT comments FROM CommentsEntity comments\", CommentsEntity.class)\n\t\t\t\t.getResultList();\n\t\tSystem.out.println(\"[REPO] Found comments query success\");\n\t\treturn comments;\n\t}",
"public String getHistory () {\n\t\treturn history;\n\t}",
"public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address) {\n return getAddressData(address.toString());\n }",
"@Override\n\tpublic Collection<Comment> getAllComments() {\n\t\treturn commentMap.values();\n\t}",
"private void printBrowsingHistory()\r\n\t{\r\n\t\tQueue temp = new Queue(SIZE);\r\n\t\tObject element;\r\n\t\t\r\n\t\tSystem.out.println(\"\\nBrowsing History (Oldest to Most Recent):\");\r\n\t\tfor (int i = 0; i < queueCount; i++)\r\n\t\t{\r\n\t\t\telement = rChronological.dequeue();\t\t\t\t//dequeue first element to the variable element\r\n\t\t\tSystem.out.println(element);\t\t\t\t\t//print out the value of element (the URL)\r\n\t\t\ttemp.enqueue(element);\t\t\t\t\t\t\t//enqueue element to a temporary queue\r\n\t\t}\r\n\t\tfor (int i = 0; i < queueCount; i++)\r\n\t\t\trChronological.enqueue(temp.dequeue());\t\t\t//put all elements in temp back to the original queue\r\n\t}",
"@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}",
"@GET\n @ApiOperation(\"Get process status history\")\n @javax.ws.rs.Path(\"/{instanceId}/history\")\n @Produces(MediaType.APPLICATION_JSON)\n @WithTimer\n public List<ProcessStatusHistoryEntry> getStatusHistory(@ApiParam @PathParam(\"instanceId\") UUID instanceId) throws IOException {\n ProcessKey pk = assertKey(instanceId);\n return queueDao.getStatusHistory(pk);\n }",
"public List<BlogComment> getCommentsByPost(Long id);",
"public List<Booking> getHistoryBookings(int phone) {\n\n Customer customer = _repo.getCustomer(phone);\n if (customer != null)\n return customer.getBookings();\n return null;\n }",
"@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}",
"@NonNull\n Single<List<HistoryItem>> getAllBookmarks();",
"public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }",
"public CustomerOrderHistory getCustomerOrderHistoryByOrderHistoryId(String ordhistid) {\n\t\treturn null;\r\n\t}",
"@Transactional(value = Transactional.TxType.MANDATORY)\n public RubricHistory getHistory(Long projectId) {\n RubricHistoryLinker linker = rubricHistoryLinkerRepository.findById(projectId).orElse(null);\n return getRubricHistoryFromLinker(linker);\n }",
"private FileHandle getChannelForAddress(long address) {\n return channelMap.computeIfAbsent(address / 10000, a -> {\n String filePath = logDir + a.toString();\n try {\n FileChannel fc = FileChannel.open(FileSystems.getDefault().getPath(filePath),\n EnumSet.of(StandardOpenOption.READ, StandardOpenOption.WRITE,\n StandardOpenOption.CREATE, StandardOpenOption.SPARSE));\n\n AtomicLong fp = new AtomicLong();\n writeHeader(fc, fp, 1, 0);\n log.info(\"Opened new log file at {}\", filePath);\n FileHandle fh = new FileHandle(fp, fc);\n // The first time we open a file we should read to the end, to load the\n // map of entries we already have.\n readEntry(fh, -1);\n return fh;\n } catch (IOException e) {\n log.error(\"Error opening file {}\", a, e);\n throw new RuntimeException(e);\n }\n });\n }",
"public List<Bugcomment> getComments(int userId) {\n\t\t\t\t\treturn null;\n\t\t\t\t}",
"List<Comment> findCommentsToLifeHack(long id) throws DaoException;",
"TrackerHistory getTrackerHistory(final Integer id);",
"public List<CommentInfo> getComments() {\n \treturn this.comments;\n }",
"public List<Address> listAddress()\n {\n @SuppressWarnings(\"unchecked\")\n List<Address> result = this.sessionFactory.getCurrentSession().createQuery(\"from AddressImpl as address order by address.id asc\").list();\n\n return result;\n }",
"public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }",
"public static List<CLRequestHistory> query(Connection connection) {\n ResultSet rs = null;\n Statement statement = null;\n try {\n final String query = String.format(QUERY, \"*\", \"\");\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n List<CLRequestHistory> list = new ArrayList<>();\n while (rs.next()) {\n final int cl = rs.getInt(Columns.CL);\n final Timestamp ts = rs.getTimestamp(Columns.TIMESTAMP);\n final int state = rs.getInt(Columns.STATE);\n\n list.add(new CLRequestHistory(cl, ts, state));\n }\n return list;\n } catch (SQLException e) {\n Utils.say(\"Not able to query anything\");\n } finally {\n try {\n if (rs != null)\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n try {\n if (statement != null)\n statement.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return null;\n }",
"@Override\n\tpublic List<CommentDTO> findAll() {\n\t\tList<Comment> comments = commentRepository.findAllByOrderByDateDesc();\n\t\tif(comments != null) {\n\t\t\tList<CommentDTO> commentsDTO = new ArrayList<>();\n\t\t\tfor(Comment comment : comments) {\n\t\t\t\tCommentDTO commentDTO = new CommentDTO(comment);\n\t\t\t\tUserDTO userDTO = new UserDTO(comment.getUser());\n\t\t\t\tcommentDTO.setUserDTO(userDTO);\n\t\t\t\tcommentsDTO.add(commentDTO);\n\t\t\t}\n\t\t\treturn commentsDTO;\n\t\t}\n\t\treturn null;\n\t}",
"private void bindOrderStatusHistoryComment() {\n StringBuilder commentHistory = new StringBuilder();\n for (int index = 0; index < orderDetail.getStatusHistories().size(); index++) {\n StatusHistory statusHistory = orderDetail.getStatusHistories().get(index);\n if (statusHistory.getIsVisibleOnFront() == 1) {\n commentHistory.append(statusHistory.getCreatedAt()).append(\": \").append(statusHistory.getComment());\n if (index < orderDetail.getStatusHistories().size() - 1) {\n commentHistory.append(\"\\n\");\n }\n }\n }\n if (!commentHistory.toString().isEmpty()) {\n txtOrderComment.setVisibility(View.VISIBLE);\n txtOrderComment.setText(commentHistory.toString());\n }\n }",
"private static ArrayList<String> fetchHistory() {\n\t\tScanner s;\n\t\tint count = 0;\n\t\tArrayList<String> historyList = new ArrayList<String>();\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"History.txt\"));\n\t\t\twhile (s.hasNext()) {\n\t\t\t\thistoryList.add(s.next());\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"Number of converted urls fetched: \" + count);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn historyList;\n\t}",
"Iterable<Comment> findByAuthorId(int authorId);",
"TrackerComments getTrackerComments(final Integer id);",
"public String getHistoryData(long fromTime) {\r\n\t\t\r\n\t\tVector history = dataStorage.getHistory(fromTime);\r\n\t\tif (history== null || history.isEmpty())\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tDocument serviceDoc = createXMLDocumentStructure();\r\n\t\tElement root = serviceDoc.getDocumentElement();\r\n\r\n\t\t// Add the <HistoryList> tag\r\n\t\tElement historyListElement = serviceDoc.createElement(\"HistoryList\");\r\n\t\tIterator i = history.iterator();\r\n\t\twhile (i.hasNext())\r\n\t\t{\r\n\t\t\tAddressLocation al = (AddressLocation)i.next();\r\n\t\t\tElement historyElement = serviceDoc.createElement(\"History\");\r\n\t\t\thistoryElement.setAttribute(\"latitude\",\r\n\t\t\t\t\tnew Double(al.latitude).toString());\r\n\t\t\thistoryElement.setAttribute(\"longitude\", new Double(\r\n\t\t\t\t\tal.longitude).toString());\r\n\t\t\thistoryElement.setAttribute(\"timestamp\", new Long(\r\n\t\t\t\t\tal.time).toString());\r\n\t\t\thistoryListElement.appendChild(historyElement);\r\n\t\t}\r\n\t\troot.appendChild(historyListElement);\r\n\t\treturn write(serviceDoc);\r\n\t}",
"@Override\n @Cacheable(\"application-cache\")\n public List<Comment> getAll() {\n Session session = sessionFactory.getCurrentSession();\n return session.createQuery(\"SELECT a FROM Comment a\", Comment.class).getResultList();\n }",
"public List<CommentEntity> listComment(int page, int size) {\n\t\treturn queryPage(page,size);\n\t}",
"public CommentView getComment(String commentHandle) throws SQLException {\n CommentView comment = commentDao.queryForId(commentHandle);\n\n if (comment == null) {\n throw new SQLException(\"comment \" + commentHandle + \" not found in cache\");\n }\n\n return comment;\n }",
"void removeAddressHistory(int i);",
"public List<Comment> getComments() {\n return this.comments;\n }",
"public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }",
"public List<Order> getOrderHistory(Customer customer) throws ExecutionException, InterruptedException {\n\n List<Order> orderList = new ArrayList<>();\n\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n Future<List<Order>> futures = executorService.submit(new getOrderHistory(customer));\n executorService.shutdown();\n\n if (futures.get() != null) {\n orderList = futures.get();\n }\n\n\n return orderList;\n }",
"@Override\n public List<Comment> getCommentsByUser(Long userId ) {\n return userDao.getCommentByUser(userId);\n }",
"public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }",
"List<RequestHistory> getQueries() throws RemoteException;",
"public AddressIterator getCommentAddressIterator(int commentType, AddressSetView addrSet,\n\t\t\tboolean forward);",
"@Override\n public void onCommentsReceived(String comment, String URL) {\n\n }",
"@Override\n public List<NutricionistComment> findAllComments() {\n return nutricionistCommentDAO.findAllComments();\n }",
"public List<Comment> getAllComments(int postID) {\n \n List<Comment> comments = new ArrayList<>();\n\n try {\n \n //Sorted in desc order of postID to make the most recent comment come to the top\n PreparedStatement statement = connection.prepareStatement(\"SELECT * FROM Comment WHERE postID = ? ORDER BY commentID DESC;\");\n statement.setInt(1, postID);\n ResultSet results = statement.executeQuery();\n\n while (results.next()) {\n\n // For all results create a new comment object and add into list to be returned\n Comment comment = new Comment();\n comment.setCommentBody(results.getString(\"commentBody\"));\n comment.setCommentID(results.getInt(\"commentID\"));\n comment.setPostID(postID);\n comment.setUserEmail(results.getString(\"email\"));\n \n\n PreparedStatement newStatement = connection.prepareStatement(\"SELECT * FROM user WHERE email = ?;\");\n newStatement.setString(1, comment.getUserEmail());\n ResultSet newResults = newStatement.executeQuery();\n\n while (newResults.next()) {\n comment.setOwnerProfileImage(newResults.getString(\"profileImageURL\"));\n comment.setOwner(newResults.getString(\"firstName\") + \" \" + newResults.getString(\"lastName\"));\n }\n\n comments.add(comment);\n\n }\n\n } catch (SQLException e) {\n System.out.println(e);\n }\n\n return comments;\n }",
"private static void readHistoryData()\n throws FileNotFoundException {\n File file = new File(HISTORY_FILE_PATH);\n Scanner scanner = new Scanner(file); // create a Scanner using the File as the source\n StringBuilder message = new StringBuilder();\n int index = 1;\n while (scanner.hasNext()) {\n String line = scanner.nextLine();\n message.append(\"\\n\\t\" + index + \". \" + line);\n index++;\n }\n scanner.close();\n\n history = message.toString();\n }",
"public List<ReturnComment> getComments() {\n return (List<ReturnComment>) get(\"comments\");\n }",
"public Entry getData(int address){\n\t\tint bank = address % numOfbank;\n\t\tif (contentInBank.get(bank) != null) {\n\t\t\tEntry d =contentInBank.get(bank).get(address);\n\t\t\tlogger.debug(\"memory \"+d.type+\" retrieval, bank:\" + bank +\", address:\"+ address);\n\t\t\treturn d;\n\t\t}\n\t\treturn null;\n\t}",
"@GetMapping(value= \"/comment/\")\n\tpublic List<Comment> getAll() {\n\t\tlogger.debug(\"Getting all comments.\");\n\t\treturn service.getAllComments();\n\t}",
"public AddressIterator getCommentAddressIterator(AddressSetView addrSet, boolean forward);",
"@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"public List<CommentDTO> getComments() {\n\t\treturn comments;\n\t}",
"public Call<ExpResult<List<DelegationInfo>>> getDelegations(MinterAddress address) {\n checkNotNull(address, \"Address can't be null\");\n\n return getInstantService().getDelegationsForAddress(address.toString(), 1);\n }",
"public String getDepositHistory(String currency) {\n\n\t\tString method = \"getdeposithistory\";\n\n\t\tif(currency.equals(\"\"))\n\n\t\t\treturn getJson(API_VERSION, ACCOUNT, method);\n\n\t\treturn getJson(API_VERSION, ACCOUNT, method, returnCorrectMap(\"currency\", currency));\n\t}",
"public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}",
"@Override\n\tpublic List<Comment> findCommentbybookId(String bookId) {\n\t\treturn commentDao.findCommentbybookId(bookId);\n\t}",
"@GetMapping(\"/getOrderHistory\")\n\tpublic ResponseEntity<List<Order>> getOrderHistoryWithOrderId(@RequestParam int orderId) {\n\t\treturn new ResponseEntity<>(dataFetchService.getOrderHistoryWithOrderId(orderId), HttpStatus.OK);\n\t}",
"public List<CommentBean> process(String url) {\n \t \t\n \tList<CommentBean> comments = new ArrayList<>();\n \t\n \ttry {\n \n\t YouTube youtubeService = getService();\n\t YouTube.CommentThreads.List request = youtubeService.commentThreads().list(\"snippet,replies\");\n\t String video_id = getVideoId(url);\n\t if(video_id == null) {\n\t \treturn null;\n\t }\n\t CommentThreadListResponse response = request.setKey(DEVELOPER_KEY).setVideoId(video_id).setOrder(\"time\").execute(); \n\t \n\t String nextpage = response.getNextPageToken();\n\t \t \t \n\t for(CommentThread t: response.getItems()) {\n\t \tCommentBean cb = new CommentBean();\n\t \tString name = t.getSnippet().getTopLevelComment().getSnippet().getAuthorDisplayName();\n\t \tString comment = utilities.cleanHTML(t.getSnippet().getTopLevelComment().getSnippet().getTextDisplay()); \n\t \tString date = t.getSnippet().getTopLevelComment().getSnippet().getUpdatedAt().toString(); \n\t \tLong rating = t.getSnippet().getTopLevelComment().getSnippet().getLikeCount();\n\t \tcb.setName(name);\n\t \tcb.setComment(comment);\n\t \tcb.setDate(date);\n\t \tcb.setRating(rating.toString());\n\t \tcomments.add(cb); \t\n\t \t \t\n\t \t \t\n\t }\n\t while(nextpage != null) {\n\t \trequest = youtubeService.commentThreads().list(\"snippet,replies\");\n\t \tresponse = request.setKey(DEVELOPER_KEY).setVideoId(getVideoId(url)).setPageToken(nextpage).execute();\n\t \t\n\t \tnextpage = response.getNextPageToken();\n\t \t for(CommentThread t: response.getItems()) {\n\t \t\tCommentBean cb = new CommentBean();\n\t \t\tString name = t.getSnippet().getTopLevelComment().getSnippet().getAuthorDisplayName();\n\t \tString comment = utilities.cleanHTML(t.getSnippet().getTopLevelComment().getSnippet().getTextDisplay()); \n\t \tString date = t.getSnippet().getTopLevelComment().getSnippet().getUpdatedAt().toString();\n\t \tString rating = String.valueOf(t.getSnippet().getTopLevelComment().getSnippet().getLikeCount()); \n\t \tcb.setName(name);\n\t \tcb.setComment(comment);\n\t \tcb.setDate(date);\n\t \tcb.setRating(rating.toString());\n\t \tSystem.out.println(\"comments: \" + comment);\n\t \tcomments.add(cb);\n\t \t\n//\t \tif(comments.size() == 500) {\n//\t \t\tnextpage = null;\n//\t \t}\n\t \t\t \t\n\t }\n\t \t\n\t \t\n\t }\n \t}\n \tcatch(Exception e) { \t\t\n \t\te.printStackTrace();\n \t\treturn null;\n \t}\n \tSystem.out.println(\"task completed!\");\n \n \treturn comments;\n \t\n }",
"public com.google.protobuf.ByteString\n getCommentsBytes() {\n java.lang.Object ref = comments_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n comments_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"List<UserContent> findContentHistory(\n\t\t\t@Param(\"contentUid\") long contentUid\n\t\t\t);",
"@Override\n public List<Number> getRevisionHistory(Long id) {\n return null;\n }",
"public List<Comment> getLastCommentsByCategory(String category);",
"@Override\n public List<Comments> getAllComments() throws Exception {\n Query query = entityManager.createQuery(\"SELECT c FROM Comments c\", Comments.class);\n return query.getResultList();\n }",
"public com.google.protobuf.ByteString\n getCommentsBytes() {\n java.lang.Object ref = comments_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n comments_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"public List getAccessRequestHistoryExternal() {\n List sortedList = new ArrayList(getAccessRequestHistory());\n Collections.sort(sortedList);\n return Collections.unmodifiableList(sortedList);\n }",
"public List<CapComments> getCapComments() {\n \t\t\t\tList<CapComments> cap=(List<CapComments>) commentRepo.findAll();\r\n \t\t\t\tCollections.reverse(cap);\r\n \t\t\t\treturn cap;\r\n \t\t\t}",
"public List<UrlAddress> searchDBUrl() {\n log.info(new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(new Date()) + \"find all url address\");\n List<UrlAddress> all = urlRepository.findAll();\n return all;\n }",
"public List<Comment> getAllComments(long messageId){\n\t\tMap<Long, Comment> comments = messages.get(messageId).getComments();\n\t\treturn new ArrayList<Comment>(comments.values());\n\t\t\n\t}",
"public void setAddress(java.lang.String address) {\n\t\t_dmHistoryMaritime.setAddress(address);\n\t}",
"@RequestMapping(\"/comments\")\n public List<CommentDTO> getAllComments() {\n return commentService.getAllComments();\n }",
"@Override\n\tpublic List<Comment> findCommentbyuserId(String userId) {\n\t\treturn commentDao.findCommentbyuserId(userId);\n\t}",
"@RequestMapping(\"/comment\")\n public List<Comment> gettAllComments() {\n return commentService.getAllComments();\n }",
"protected List<CommentDocument> getCommentsByRef(HttpServletRequest servletRequest, String documentId, int limit) throws RepositoryException, QueryException {\r\n if (documentId == null) {\r\n return null;\r\n }\r\n \r\n //Get the references to the context and the query manager\r\n HstRequestContext requestContext = getRequestContext(servletRequest);\r\n HstQueryManager hstQueryManager = getHstQueryManager(requestContext.getSession(), requestContext);\r\n\r\n //Determine search base\r\n String mountContentPath = requestContext.getResolvedMount().getMount().getContentPath();\r\n Node mountContentNode = requestContext.getSession().getRootNode().getNode(PathUtils.normalizePath(mountContentPath));\r\n\r\n //Create and execute query\r\n @SuppressWarnings(\"unchecked\")\r\n\t\tHstQuery hstQuery = hstQueryManager.createQuery(mountContentNode, CommentDocument.class);\r\n Filter filter = hstQuery.createFilter();\r\n filter.addEqualTo(\"website:reference/@hippo:docbase\", documentId.toLowerCase());\r\n hstQuery.setFilter(filter);\r\n if (limit > 0) {\r\n hstQuery.setLimit(limit);\r\n }\r\n\r\n HstQueryResult result = hstQuery.execute();\r\n \r\n if (result.getSize() == 0) {\r\n return Collections.emptyList();\r\n }\r\n \r\n //Read results\r\n List<CommentDocument> comments = new ArrayList<CommentDocument>(result.getSize());\r\n HippoBeanIterator iterator = result.getHippoBeans();\r\n\r\n while (iterator.hasNext()) {\r\n //Get all incoming comment links\r\n CommentDocument comment = (CommentDocument) iterator.nextHippoBean();\r\n\r\n if (comment != null) {\r\n comments.add(comment);\r\n }\r\n }\r\n\r\n return comments;\r\n }",
"@Override\r\n\tpublic List<Comment> getAllComment(Integer page, Integer limit) {\n\t\treturn commentDao.getAllComment(page,limit);\r\n\t}",
"@Override\n public List<History> getHistories(Long id) {\n return historyRepository.findByProposalIdOrderByCreatedDateDesc(id);\n }",
"java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();",
"public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }",
"public java.lang.String getAddress() {\n\t\treturn _dmHistoryMaritime.getAddress();\n\t}",
"List<OFPortMod> getHistory(DatapathId dpid, OFPort port) throws PortModException;",
"public String getOrderHistory() {\n\n\t\treturn getOrderHistory(\"\");\n\t}",
"public String[] getComments() {\n return comments;\n }"
] | [
"0.70034915",
"0.6818646",
"0.5388932",
"0.5380824",
"0.5345302",
"0.5233981",
"0.5228629",
"0.5182803",
"0.51686233",
"0.5146198",
"0.5119537",
"0.50930864",
"0.50824785",
"0.5045205",
"0.50375193",
"0.500317",
"0.49928635",
"0.4968424",
"0.49680132",
"0.49680132",
"0.49479648",
"0.4932448",
"0.49310425",
"0.4924971",
"0.48713303",
"0.4866252",
"0.4863355",
"0.48504138",
"0.48221225",
"0.48184207",
"0.48047063",
"0.47991857",
"0.47949654",
"0.47911435",
"0.4787958",
"0.47858804",
"0.47759098",
"0.47671822",
"0.47651702",
"0.4765074",
"0.47461352",
"0.4744672",
"0.47425112",
"0.4738298",
"0.47279447",
"0.4727743",
"0.4724888",
"0.47093973",
"0.47084856",
"0.4705032",
"0.47034034",
"0.46967244",
"0.46899265",
"0.46862236",
"0.46825126",
"0.46788746",
"0.46788654",
"0.46735802",
"0.4673184",
"0.46674103",
"0.46650165",
"0.46546817",
"0.46361387",
"0.46327975",
"0.4631601",
"0.46313933",
"0.462686",
"0.462538",
"0.46182117",
"0.45955932",
"0.4592931",
"0.459081",
"0.45906302",
"0.45898637",
"0.45847896",
"0.45804128",
"0.4578297",
"0.45780483",
"0.45740205",
"0.45685107",
"0.45650762",
"0.45626545",
"0.45614347",
"0.45598516",
"0.4552949",
"0.45483333",
"0.454814",
"0.45416737",
"0.45406333",
"0.45357865",
"0.45333824",
"0.45286956",
"0.452726",
"0.45148283",
"0.45078358",
"0.45063007",
"0.45030463",
"0.4502548",
"0.44770285",
"0.44751948"
] | 0.8081521 | 0 |
Constructs a new DcsManifestationFile with no state. | protected JsManifestationFile() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Manifest() {}",
"public AncFile() {\n }",
"private FileEntry() {\n // intentionally empty\n }",
"private FileUtility() {\r\n\t}",
"public File() {\n\t\tthis.name = \"\";\n\t\tthis.data = \"\";\n\t\tthis.creationTime = 0;\n\t}",
"public static AddressableDataFile getEmptyImmutableDataFile() {\n return new EmptyDataFile();\n }",
"protected FileDepositorImpl() {\n\t}",
"public BccManifest() {\n this(DSL.name(\"bcc_manifest\"), null);\n }",
"public FileObject() {\n\t}",
"public FileCreator() {\r\n initComponents();\r\n }",
"public File() {\n }",
"public JarBuilder(File outFile) throws FileNotFoundException, IOException\n\t{\n\t\tmanifest = new Manifest();\n\t\tmanifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, VER_1_0);\n\t\tjarStream = new JarOutputStream(new FileOutputStream(outFile));\n\t\tentryList = new ArrayList<String>();\n\t}",
"Manifest createManifest();",
"public FileDicomBaseInner() {}",
"public AnalysisDef() {}",
"public DirectoryModel() {\r\n\tthis(null);\r\n }",
"private FileUtil() {\n \t\tsuper();\n \t}",
"public FileObjectFactory() {\n }",
"public SplitFile() {\n\t}",
"public File_Delet() {\n\t\tsuper();\n\t}",
"public BrihaspatiProFile() {\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"private FileUtils()\n {\n // Nothing to do.\n }",
"public FileNode() {\n\t}",
"public Directory() {\n files = new ArrayList<VipeFile>();\n sectors = new int[600];\n }",
"private XmlFactory() {\r\n /* no-op */\r\n }",
"private NaturePackage() {}",
"private FileManager() {}",
"public FileUtility()\n {\n }",
"private NoOpCompactor(SegmentStorageSystem storage) {\n super(storage);\n }",
"public FileManager() {\n\t\t\n\t}",
"public BccManifest(Name alias) {\n this(alias, BCC_MANIFEST);\n }",
"public WorkDataFile()\n\t{\n\t\tsuper();\n\t}",
"public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}",
"public XmlAdaptedDistributor() {}",
"public InventarioFile(){\r\n \r\n }",
"public LdifFile()\n {\n }",
"private Manifest getManifest() {\n Manifest manifest = new Manifest();\n Attributes attributes = manifest.getMainAttributes();\n attributes.put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n attributes.put(Attributes.Name.IMPLEMENTATION_VENDOR, \"Balahnin Sergey\");\n return manifest;\n }",
"public Designation()\n\t{//Default Constructor...\n\n\t\tf_Designation = \"\";\n\n\t}",
"@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\tXMLUtils xml = new XMLUtils();\r\n\t\t\t\tConfigBean cfg = xml.getconfigXML();\r\n\t\t\t\tFile f = new File(cfg.getFilepath());\r\n\t\t\t\tFile fs[];\r\n\t\t\t\tif (f.exists() && f.isFile()) {\r\n\t\t\t\t\tfs = f.getParentFile().listFiles();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfs = f.listFiles();\r\n\t\t\t\t}\r\n\t\t\t\tif (fs != null) {\r\n\t\t\t\t\tfor (File of : fs) {\r\n\t\t\t\t\t\tif(MainFrame.getInstance().getManual().isSelected()){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (of.isFile()) {\r\n\t\t\t\t\t\t\tMainFrame.getInstance().getProcess().start(of);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"protected FileSystem() {\n\t}",
"private SimpleAttachment() {\n }",
"private FileUtils() {\n }",
"private FileUtils() {\n }",
"public Analysis() {\n this(\"analysis\", null);\n }",
"public FileDecoder() {\n pathSB = new StringBuilder(100);\n }",
"private DescriptorBuilder() {\n // empty\n \n // NOTE: No tracing is performed, since this constructor is never used\n }",
"public ModelSourceFile() {\n\t\t\n\t}",
"public MailcapFile() {\n/* 113 */ if (LogSupport.isLoggable()) {\n/* 114 */ LogSupport.log(\"new MailcapFile: default\");\n/* */ }\n/* */ }",
"private FileValidationReport createFileNotAccessibleReport() {\n\t\tFileValidationReport fileValRep = new FileValidationReport();\n\t\tfileValRep.setValidationOutcome(ValidationOutcome.NOT_VALID);\n\t\tfileValRep.setFitsExecutionOutcome(ExecutionOutcome.DID_NOT_RUN);\n\t\tfileValRep.setVeraPdfExecutionOutcome(ExecutionOutcome.DID_NOT_RUN);\n\t\tfileValRep.getErrorMessages().add(\"File can not be accessed\");\n\t\treturn fileValRep;\n\t}",
"private FileUtil() {}",
"@Override\n public void construct() throws IOException {\n \n }",
"public D() {}",
"public FileBean() {}",
"private GraphFileManager() {\n\t}",
"@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }",
"public FileServ() {\n\t\tsuper();\n\t}",
"public PSRelation()\n {\n }",
"public Builder clearFileName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n fileName_ = getDefaultInstance().getFileName();\n onChanged();\n return this;\n }",
"protected FileDescriptor getFileDescriptor() {\n return new FileDescriptor(); // constructor creates invalid fd\n }",
"private XmlStreamFactory()\n {\n /*\n * nothing to do\n */\n }",
"private ControlloFile() {\n\t}",
"public CompactSerializable() {\n }",
"public BccManifest(String alias) {\n this(DSL.name(alias), BCC_MANIFEST);\n }",
"public CvFile() {\n }",
"public final static void createNullFile(String nFile) {\r\n File file = new File(nFile);\r\n try {\r\n if (!file.exists())\r\n file.createNewFile();\r\n }\r\n catch (IOException ex) {\r\n }\r\n }",
"public void init() {\n File file = new File(FILE);\n if (!file.exists()) {\n File file2 = new File(file.getParent());\n if (!file2.exists()) {\n file2.mkdirs();\n }\n }\n if (this.accessFile == null) {\n try {\n this.accessFile = new RandomAccessFile(FILE, \"rw\");\n } catch (FileNotFoundException unused) {\n }\n }\n }",
"public SegmentFile(File file)\n\t\t\tthrows NullPointerException {\n\t\t\n\t\tthis(file, false);\n\t}",
"public Builder clearFileName() {\n bitField0_ = (bitField0_ & ~0x00000001);\n fileName_ = getDefaultInstance().getFileName();\n onChanged();\n return this;\n }",
"public CSSTidier() {\n\t}",
"public FileDicomInner(final String fName, final String fDir) throws IOException {\r\n fileName = fName;\r\n fileDir = fDir;\r\n\r\n try {\r\n fileHeader = new File(fileDir + fileName);\r\n\r\n if (fileHeader == null) {\r\n throw new FileNotFoundException();\r\n }\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ex) {}\r\n }\r\n\r\n try {\r\n raFile = new RandomAccessFile(fileHeader, \"rw\");\r\n } catch (final IOException e) {\r\n raFile = new RandomAccessFile(fileHeader, \"r\");\r\n }\r\n\r\n fileInfo = new FileInfoDicom(fileName, fileDir, FileUtility.DICOM);\r\n fileInfo.setEndianess(FileDicomBaseInner.LITTLE_ENDIAN);\r\n rawFile = new FileRaw(fileInfo.getFileName(), fileInfo.getFileDirectory(), fileInfo, FileBase.READ);\r\n } catch (final NullPointerException npe) {\r\n npe.printStackTrace();\r\n } catch (final OutOfMemoryError e) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom constructor.\");\r\n throw new IOException();\r\n }\r\n }",
"public ActionFile() {\n }",
"public Builder clearFile() {\n\n file_ = getDefaultInstance().getFile();\n onChanged();\n return this;\n }",
"public PSMatrixFilesMeta() {\r\n this(-1, new ConcurrentSkipListMap<Integer, MatrixPartitionMeta>());\r\n }",
"private SolutionsPackage() {}",
"public DistributionPolicyInternal() {}",
"public BackupFSArchiveCopy() {\n super();\n }",
"public DataIO() throws IOException {\n if (!QuizFile.isFile())\n QuizFile.createNewFile();\n }",
"private FileIDDictionary() {\n }",
"public StructureCustom(){\r\n\t\tsetMonotonicity(Monotonicity.DECREASING);\r\n\t}",
"public PackageDescriptor(String filename, ClassLoader classLoader, String groupUuid, ImportMode importMode) {\n this.filename = filename;\n this.classLoader = classLoader;\n this.groupUuid = groupUuid;\n this.importMode = importMode;\n }",
"private SerializerFactory() {\n // do nothing\n }",
"public FilePane() {\n this(null);\n }",
"private ShifuFileUtils() {\n }",
"public ArcadeDrivetrain build() {\n verify();\n return new ArcadeDrivetrain(this);\n }",
"@SuppressWarnings(\"unused\")\n private HsmFileSystemInfo() {\n this((String) null);\n }",
"private DeploymentFactoryInstaller() {\n }",
"public C23317d() {\n }",
"private StreamFactory()\n {\n /*\n * nothing to do\n */\n }",
"public AttributeDescriptorDTO()\n\t{\n\t\tsuper();\n\t}",
"public FilePlugin()\n {\n super();\n \n //create the data directory if it doesn't exist\n File dataDir = new File(FilenameUtils.dataDir);\n if(!dataDir.exists()) FilePersistenceUtils.makeDirs(dataDir);\n }",
"public Package() {\n }",
"Object create(File file) throws IOException, SAXException, ParserConfigurationException;",
"public KafkaManagedFileToProcess build() { return new KafkaManagedFileToProcess(this); }",
"public FileName() {\n setFile(null);\n }",
"public ArchiveInfo() {\n\t}",
"public Builder clearFileName() {\n \n fileName_ = getDefaultInstance().getFileName();\n onChanged();\n return this;\n }",
"public Builder clearFileName() {\n \n fileName_ = getDefaultInstance().getFileName();\n onChanged();\n return this;\n }",
"public Builder clearFileName() {\n \n fileName_ = getDefaultInstance().getFileName();\n onChanged();\n return this;\n }",
"public Builder clearFileName() {\n \n fileName_ = getDefaultInstance().getFileName();\n onChanged();\n return this;\n }"
] | [
"0.6101728",
"0.5846989",
"0.5757598",
"0.56810266",
"0.56287616",
"0.54921806",
"0.54831606",
"0.5483145",
"0.5455727",
"0.54460883",
"0.5433218",
"0.53591496",
"0.5340758",
"0.53332204",
"0.5331518",
"0.53255695",
"0.52845114",
"0.52691776",
"0.5238815",
"0.5236967",
"0.52240956",
"0.52089226",
"0.52049583",
"0.51969904",
"0.5134333",
"0.51278776",
"0.5125637",
"0.5118659",
"0.5117028",
"0.5114256",
"0.5112415",
"0.50968766",
"0.50724083",
"0.5058291",
"0.5054199",
"0.50510126",
"0.5046213",
"0.5040004",
"0.50359184",
"0.50358117",
"0.5032409",
"0.50291854",
"0.50243443",
"0.50243443",
"0.5022555",
"0.50186664",
"0.50101817",
"0.49763545",
"0.49483714",
"0.49468136",
"0.4942414",
"0.49351785",
"0.49311194",
"0.49302787",
"0.49253172",
"0.49180695",
"0.49175802",
"0.49136755",
"0.4903992",
"0.4901294",
"0.48817387",
"0.48786822",
"0.4870981",
"0.48706004",
"0.4861793",
"0.48591232",
"0.48588902",
"0.4848031",
"0.48468536",
"0.48463315",
"0.4840533",
"0.4837545",
"0.48268968",
"0.48224315",
"0.48213136",
"0.48077506",
"0.48026258",
"0.4802042",
"0.48003882",
"0.47986257",
"0.47945133",
"0.47933352",
"0.47863305",
"0.4782089",
"0.4781433",
"0.47652438",
"0.4764141",
"0.47620767",
"0.4755325",
"0.47534898",
"0.47525474",
"0.4749454",
"0.47476485",
"0.47437838",
"0.47427845",
"0.47417372",
"0.47368333",
"0.47368333",
"0.47368333",
"0.47368333"
] | 0.5590115 | 5 |
The path for the manifestation file | public String getPath() {
return getString("path");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }",
"public File getManifestFile() {\r\n\t\treturn manifestFile;\r\n\t}",
"Path getModBookFilePath();",
"Path getManageMeFilePath();",
"public String getApplicationPath()\n {\n return getApplicationPath(false);\n }",
"private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"public String getResourcePath();",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"private String getDesignPath() {\n Class<?> clazz = getClass();\n String designFilePath = null;\n if (clazz.getAnnotation(DeclarativeUI.class).absolutePath()) {\n designFilePath = \"\";\n } else {\n // This is rather nasty.. but it works well enough for now.\n String userDir = System.getProperty(\"user.dir\");\n designFilePath = userDir + \"/uitest/src/\"\n + clazz.getPackage().getName().replace('.', '/') + \"/\";\n }\n\n String designFileName = clazz.getAnnotation(DeclarativeUI.class)\n .value();\n\n return designFilePath + designFileName;\n }",
"Path getMainCatalogueFilePath();",
"public String getResourcePath() {\n return appPathField.getText().trim();\n }",
"java.lang.String getManifestUrl();",
"public String getJarLocation();",
"public String getPath() {\n\t\treturn file.getPath();\n\t}",
"static File getDistributionInstallationFolder() {\n return ProcessRunnerImpl.getDistRootPath();\n }",
"String getApplicationContextPath();",
"String getFilepath();",
"public String getLocationPath();",
"public String getAbsPath();",
"public static String getHelpContentFilePath() {\n\t\tFile jarPath = SX3Manager.getInstance().getInstallLocation();\n\t\tString sx3helpContentPath = jarPath.getParentFile().getAbsolutePath() + \"/SX3_CONFIGURATION_HELP_CONTENT.json\";\n\t\treturn sx3helpContentPath;\n\t}",
"public String getAppPathname();",
"public String resolvePath();",
"public String getPathToJarFolder(){\n Class cls = ReadWriteFiles.class;\r\n ProtectionDomain domain = cls.getProtectionDomain();\r\n CodeSource source = domain.getCodeSource();\r\n URL url = source.getLocation();\r\n try {\r\n URI uri = url.toURI();\r\n path = uri.getPath();\r\n \r\n // get path without the jar\r\n String[] pathSplitArray = path.split(\"/\");\r\n path = \"\";\r\n for(int i = 0; i < pathSplitArray.length-1;i++){\r\n path += pathSplitArray[i] + \"/\";\r\n }\r\n \r\n return path;\r\n \r\n } catch (URISyntaxException ex) {\r\n LoggingAspect.afterThrown(ex);\r\n return null;\r\n }\r\n }",
"@NotNull\n @ApiModelProperty(example = \"y1234456789c\", required = true, value = \"The info file is an python file containing the package metadata.\")\n public String getManifestFile() {\n return manifestFile;\n }",
"protected abstract String getResourcePath();",
"Path getBookingSystemFilePath();",
"public String getClassPath();",
"public static String getComplaintAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t}",
"public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}",
"@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }",
"private static String getJarFilePath() throws URISyntaxException, UnsupportedEncodingException {\n\n\t\tFile jarFile;\n\n\t\t// if (codeSource.getLocation() != null) {\n\t\t// jarFile = new File(codeSource.getLocation().toURI());\n\t\t// } else {\n\t\tString path = ConfigurationLocator.class.getResource(ConfigurationLocator.class.getSimpleName() + \".class\")\n\t\t\t\t.getPath();\n\t\tString jarFilePath = path.substring(path.indexOf(\":\") + 1, path.indexOf(\"!\"));\n\t\tjarFilePath = URLDecoder.decode(jarFilePath, \"UTF-8\");\n\t\tjarFile = new File(jarFilePath);\n\t\t// }\n\t\treturn jarFile.getParentFile().getAbsolutePath();\n\t}",
"public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}",
"public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }",
"protected String path() {\n return path(getName());\n }",
"private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }",
"public String getPath() {\n\t\treturn pfDir.getPath();\n\t}",
"public String getAssetDirectory() {\n return String.format(\"plugin-webapp/%s\", getId());\n }",
"public String getFullPath()\n {\n return( fullPath );\n }",
"private URL getManifestUrl() {\n\n\t\treturn new URL(VERSION_MANIFEST_URL.replace(\"%s\", \"1.7.2\"));\n\t}",
"abstract public String getRingResourcesDir();",
"@Override\n public String getApplicationDirectory() {\n return Comm.getAppHost().getAppLogDirPath();\n }",
"public final String getPath()\n {\n return path;\n }",
"public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}",
"@Nullable String getPath();",
"Path getAppointmentScheduleFilePath();",
"java.lang.String getFilePath();",
"@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }",
"private String setFileDestinationPath(){\n String filePathEnvironment = Environment.getExternalStorageDirectory().getAbsolutePath();\n Log.d(TAG, \"Full path edited \" + filePathEnvironment + \"/earwormfix/\" + generatedFilename + EXTENSION_JPG);\n return filePathEnvironment+ \"/earwormfix/\" + generatedFilename + EXTENSION_JPG;\n }",
"@Override\n\tpublic java.lang.String getSrcPath() {\n\t\treturn _scienceApp.getSrcPath();\n\t}",
"File getOsmdroidPath();",
"public abstract String getFullPath();",
"String getFullWorkfileName();",
"static File getAppDir(String app) {\n return Minecraft.a(app);\n }",
"public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"@Override\n\tpublic java.lang.String getBinPath() {\n\t\treturn _scienceApp.getBinPath();\n\t}",
"private static String getResourcePath(String resPath) {\n URL resource = XmlReaderUtils.class.getClassLoader().getResource(resPath);\n Assert.assertNotNull(\"Could not open the resource \" + resPath, resource);\n return resource.getFile();\n }",
"public abstract String getPath();",
"public abstract String getPath();",
"File getExecutable();",
"Path getVendorManagerFilePath();",
"public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }",
"public Path getSimulationLocation() {\n return FileManager.getSimulationDirectory(name);\n }",
"private String createScreenshotFilePath() {\n String fileName = new SimpleDateFormat(FILE_NAME_FORMAT).format(new Date());\n String filePath = MainMenu.PUBLIC_EXTERNAL_PICTURES_ORION_PATH + fileName;\n return filePath;\n }",
"public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"public static String getEmailAttachmentsPath() {\n\t\t//return \"d:\\\\PBC\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace\";\n\t\t\n\t}",
"public String getResourcePath() {\n return BARDConstants.API_BASE + \"/biology/\" + serial;\n }",
"public String path() {\n return filesystem().pathString(path);\n }",
"public static String setConfigPath(String propertFileName ) {\n String propFilePath;\n\n propFilePath = \"src\" + File.separator + \"main\" + File.separator\n + \"resources\" + File.separator + propertFileName;\n return propFilePath;\n }",
"String path(Configuration configuration);",
"public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"String getExternalPath(String path);",
"public File getLocalAnnotationDir() throws IOException {\n\t\t\treturn new File(System.getProperty(\"user.home\") + \"/.chipster/annotations\");\n\t\t}",
"public static final String makePath(String resource) {\n return BEAKED_ASSETS_FOLDER + \"/\" + resource;\n }",
"String getInstallRoot();",
"File getLauncherDir() {\n return launcherDir;\n }",
"public String getFilePath() {\n return getString(CommandProperties.FILE_PATH);\n }",
"public String getPath(Context ctx)\n {\n return Environment.getExternalStorageDirectory() + \"/\" + ctx.getApplicationInfo().packageName.replaceAll(\"\\\\.\", \"\") + \"/\";\n }",
"@Override\n\tpublic String toString() {\n\t\treturn getFullPath();\n\t}",
"public String getResourceLocation() {\n return resourceLocation;\n }",
"public String getPath()\n {\n return path;\n }",
"public String getPath()\n {\n return path;\n }",
"public String getPathToDefinitionFiles() {\n\treturn msPathToDefinitionFiles;\n }",
"public String getPathToSyncDir() {\n return properties.getProperty(PATH_TO_SYNC_DIR);\n }",
"@DISPID(35)\r\n\t// = 0x23. The runtime will prefer the VTID if present\r\n\t@VTID(40)\r\n\tjava.lang.String fullPath();",
"public String getFileDirectory() {\n String storedDirectory = settings.get(\"fileDirectory\");\n \n // Default to the program files\n if (storedDirectory == null) {\n storedDirectory = System.getenv(\"ProgramFiles\");\n }\n \n return storedDirectory;\n }",
"private static File getAspectWorkspace() {\n try {\n URL url = Platform.getBundle(Activator.PLUGIN_ID).getEntry(\"resources\");\n URL resolved = FileLocator.resolve(url);\n return new File(resolved.getPath());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"abstract File getResourceDirectory();",
"private static String getDBPath() {\r\n\t\ttry {\r\n\t\t\tString path = Consts.class.getProtectionDomain().getCodeSource().getLocation().getPath();\r\n\t\t\tString decoded = URLDecoder.decode(path, \"UTF-8\");\r\n\t\t\tif (decoded.contains(\".jar\")) {\r\n\t\t\t\tdecoded = decoded.substring(0, decoded.lastIndexOf('/'));\r\n\t\t\t\treturn decoded + \"/database/ManageElectDB.accdb\";\r\n\t\t\t} else {\r\n\t\t\t\tdecoded = decoded.substring(0, decoded.lastIndexOf(\"bin/\"));\r\n\t\t\t\treturn decoded + \"src/entity/ManageElectDB.accdb\";\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@ApiModelProperty(required = true, value = \"The absolute path to the file/folder.\")\n public String getPath() {\n return path;\n }",
"public static String getAppPath(Context context) {\n File dir = new File(android.os.Environment.getExternalStorageDirectory()\n + File.separator\n + context.getResources().getString(R.string.app_name)\n + File.separator);\n return dir.getPath() + File.separator;\n }",
"public String getPath() {\r\n return path;\r\n }",
"public String getPath() {\r\n return path;\r\n }",
"String getAnnotationFile() {\n File imgFile = photos[fileIndex];\n String parentDir = imgFile.getParent();\n String fileName = imgFile.getName();\n String annotationName = fileName.replace(fileName.substring(fileName.lastIndexOf('.') + 1), \"xml\");\n File annotationDir = new File(parentDir.replace(\"images\", \"annotations\"));\n if (!annotationDir.exists()) {\n annotationDir.mkdirs();//create dir if none\n }\n return annotationDir.getAbsolutePath() + File.separator + annotationName;\n }"
] | [
"0.66575867",
"0.6508962",
"0.6416296",
"0.63786113",
"0.63619184",
"0.62780637",
"0.6271307",
"0.6271307",
"0.6271307",
"0.6271307",
"0.6271307",
"0.62284285",
"0.6210747",
"0.6210747",
"0.6210747",
"0.621",
"0.62022114",
"0.6194666",
"0.61347574",
"0.612512",
"0.60774326",
"0.6074699",
"0.60641825",
"0.60384756",
"0.60132354",
"0.60107446",
"0.5990086",
"0.59583807",
"0.59196174",
"0.5918755",
"0.59083253",
"0.5903431",
"0.5900222",
"0.58829844",
"0.58620214",
"0.5854505",
"0.5824129",
"0.57993215",
"0.57853955",
"0.5767125",
"0.5757288",
"0.5756409",
"0.5753325",
"0.5740001",
"0.5733981",
"0.5713975",
"0.5703165",
"0.56964904",
"0.5691916",
"0.56893283",
"0.56842685",
"0.5681448",
"0.5669984",
"0.56625044",
"0.5652389",
"0.5652338",
"0.564973",
"0.56424433",
"0.5632842",
"0.56292444",
"0.5629073",
"0.5614424",
"0.5612449",
"0.56070876",
"0.56070876",
"0.56029725",
"0.5600426",
"0.5598319",
"0.5596903",
"0.55967575",
"0.5588649",
"0.5586807",
"0.55861074",
"0.5585487",
"0.55853564",
"0.55806285",
"0.5580321",
"0.5554671",
"0.5549664",
"0.55465364",
"0.55444646",
"0.55367804",
"0.5522357",
"0.5516051",
"0.5513304",
"0.5512209",
"0.55086243",
"0.55081564",
"0.55081564",
"0.54994494",
"0.5491564",
"0.5491104",
"0.54910076",
"0.54876536",
"0.54851764",
"0.5484839",
"0.5477885",
"0.54754096",
"0.5474821",
"0.5474821",
"0.5467493"
] | 0.0 | -1 |
helper method to interact with the user to get values for the size of the row | public double getValueFromUser(String message, boolean absolute) {
String strValue = JOptionPane.showInputDialog(message);
double value = -100;
try {
value = Double.parseDouble(strValue);
} catch (NumberFormatException e) {
// NUCLEUSINT-281
return -1;
} catch (NullPointerException e) {
// NUCLEUSINT-281
return -1;
}
if (absolute) {
if (value < InterfaceGuidelines.MINIMUM_SIZE)
value = InterfaceGuidelines.MINIMUM_SIZE;
if (cellForEditing.getCellY() == 0) {
if (value < InterfaceGuidelines.MARGIN_TOP)
value = InterfaceGuidelines.MARGIN_TOP;
}
} else {
if (value < 1)
value = 1;
if (value > 99)
value = 99;
}
return value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getSetSize(){ return Integer.parseInt(setSize.getText()); }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\r\n\t\tboolean colum = false;\r\n\r\n\t\tString actionCommand = e.getActionCommand();\r\n\t\t\r\n\t\tif (actionCommand.equals(\"PERCENTUAL\")) {\r\n\t\t\t/** percentual size handling - reads value from User with a Input dialog, entered value is divided by 100 to get the right percentual size */\r\n\t\t\tdouble sizeValue = getValueFromUser(MEASUREMENT_DESCRIPTIONS.MESSAGE_INPUT_DIALOG_PERCENTUAL, false);\r\n\t\t\t//FIX NUCLEUSINT-281 if invalid value, nothing is done\r\n\t\t\tif (sizeValue != -1) {\r\n\t\t\t\tsizeValue = sizeValue / 100.0;\r\n\t\t\t\ttableLayoutUtil.modifyTableLayoutSizes(sizeValue, colum, cellForEditing, true);\r\n\t\t\t}\r\n\t\t} else if (actionCommand.equals(\"ABSOLUTE\")) {\r\n\t\t\t/** absolute size, reading the value from the user */\r\n\t\t\tdouble sizeValue = getValueFromUser(MEASUREMENT_DESCRIPTIONS.MESSAGE_INPUT_DIALOG_ABSOLUTE, true);\r\n\t\t\t//FIX NUCLEUSINT-281 if invalid value, nothing is done\r\n\t\t\tif (sizeValue != -1)\r\n\t\t\t\ttableLayoutUtil.modifyTableLayoutSizes(sizeValue, colum, cellForEditing, true);\r\n\t\t} else if (actionCommand.equals(\"MINIMUM\")) {\r\n\t\t\t/** sets minimum size, is only active if a component was found in this row */\r\n\t\t\ttableLayoutUtil.modifyTableLayoutSizes(TableLayout.MINIMUM, colum, cellForEditing, true);\r\n\t\t} else if (actionCommand.equals(\"PREFERRED\")) {\r\n\t\t\t/** sets preferred size, is only active if a component was found in this row */\r\n\t\t\ttableLayoutUtil.modifyTableLayoutSizes(TableLayout.PREFERRED, colum, cellForEditing, true);\r\n\t\t} else if (actionCommand.equals(\"FILL\")) {\r\n\t\t\t/** sets the relative size fill, uses all the rest space that is not filled by absolute size */\r\n\t\t\ttableLayoutUtil.modifyTableLayoutSizes(TableLayout.FILL, colum, cellForEditing, true);\r\n\t\t} else if (actionCommand.equals(\"ADDBOTTOM\")) {\r\n\t\t\t/** adds a new row below the active row - uses a default value for size. commented out getting the value from the user, other way is quicker */\r\n\t\t\tdouble sizeValue = InterfaceGuidelines.DEFAULT_ROW_HEIGHT;\r\n\t\t\t// double sizeValue = getValueFromUser(CHANGE_SIZE_ROW_POPUP.MESSAGE_INPUT_DIALOG_ENTER_HEIGHT, true);\r\n\t\t\tcellForEditing.setCellHeight(sizeValue);\r\n\t\t\t/** adjustment so adding a row will be under the selected cell */\r\n\t\t\tif (tableLayoutUtil.getNumRows() > 0)\r\n\t\t\t\tcellForEditing.setCellY(cellForEditing.getCellY() + 1);\r\n\t\t\ttableLayoutUtil.addRow(cellForEditing);\r\n\t\t}else if (actionCommand.equals(\"ADDMULTIPLEBOTTOM\")) {\r\n\t\t\t//NUCLEUSINT-966\r\n\t\t\tString count = JOptionPane.showInputDialog(CHANGE_SIZE_ROW_POPUP.MESSAGE_INPUT_DIALOG_AMOUNT_ROWS, 2);\r\n\t\t\tif (count != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tInteger amount = Integer.parseInt(count);\r\n\t\t\t\t\tfor( int i = 0; i < amount; i++) {\r\n\t\t\t\t\t\tactionPerformed(new ActionEvent(e.getSource(), e.getID(), \"ADDBOTTOM\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (NumberFormatException e1) {\r\n\t\t\t\t\t//nothing to do\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (actionCommand.equals(\"ADDTOP\")) {\r\n\t\t\t/** adds a new row over the active row - uses a default value for size. commented out getting the value from the user, other way is quicker */\r\n\t\t\tdouble sizeValue = InterfaceGuidelines.DEFAULT_ROW_HEIGHT;\r\n\t\t\t// double sizeValue = getValueFromUser(CHANGE_SIZE_ROW_POPUP.MESSAGE_INPUT_DIALOG_ENTER_HEIGHT, true);\r\n\t\t\tcellForEditing.setCellHeight(sizeValue);\r\n\t\t\ttableLayoutUtil.addRow(cellForEditing);\r\n\t\t} else if (actionCommand.equals(\"ADDMULTIPLETOP\")) {\r\n\t\t\t//NUCLEUSINT-966\r\n\t\t\tString count = JOptionPane.showInputDialog(\r\n\t\t\t\tCHANGE_SIZE_ROW_POPUP.MESSAGE_INPUT_DIALOG_AMOUNT_ROWS, 2);\r\n\t\t\tif(count != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tInteger amount = Integer.parseInt(count);\r\n\t\t\t\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\t\t\t\tactionPerformed(new ActionEvent(e.getSource(), e.getID(), \"ADDTOP\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch(NumberFormatException e1) {\r\n\t\t\t\t\t// nothing to do\n\t\t\t\t\tLOG.debug(\"actionPerformed: \" + e1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (actionCommand.equals(\"DELETE\")) {\r\n\t\t\t/** delete the active row - is only possible if the row does not contain any component */\r\n\t\t\ttableLayoutUtil.delRow(cellForEditing);\r\n\t\t} else if (actionCommand.equals(\"ADDBORDER\")) {\r\n\t\t\t/** \"shortcut\" to add a new border below, used for creating standardborders */\r\n\t\t\tcellForEditing.setCellHeight(InterfaceGuidelines.MARGIN_BOTTOM);\r\n\t\t\t/** adjustment so adding a row will be under the selected cell */\r\n\t\t\tif (tableLayoutUtil.getNumRows() > 0)\r\n\t\t\t\tcellForEditing.setCellY(cellForEditing.getCellY() + 1);\r\n\t\t\ttableLayoutUtil.addRow(cellForEditing);\r\n\t\t} else if (actionCommand.equals(\"ADDROWBORDER\")) {\r\n\t\t\t//NUCLEUSINT-966\r\n\t\t\t/** \"shortcut\" to add a new border below, used for creating standardborders */\r\n\t\t\tcellForEditing.setCellHeight(InterfaceGuidelines.MARGIN_BETWEEN);\r\n\t\t\t/** adjustment so adding a row will be under the selected cell */\r\n\t\t\tif (tableLayoutUtil.getNumRows() > 0)\r\n\t\t\t\tcellForEditing.setCellY(cellForEditing.getCellY() + 1);\r\n\t\t\ttableLayoutUtil.addRow(cellForEditing);\r\n\t\t}\r\n\t}",
"public int askSize(String sizeName, int min, int max, String titel);",
"private void inputGridSize() {\n \ttest = new TextField();\n \ttest.setPrefSize(BUTTON_SIZE, TEXT_INPUT_BAR_HEIGHT);\n \tstartScreen.add(test, 2, 2);\n }",
"private void createGridSizeButton() {\n\t\tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tinputGridSize();}\n };\n \tcreateGenericButton(2, 1, myResources.getString(\"userinput\"), eventHandler);\n }",
"public int promptSIZE(){\n\t\tString strlen = JOptionPane.showInputDialog(frame, \"Input the integral size of the board (5~19)\", \"Message Board\", JOptionPane.QUESTION_MESSAGE);\n\t\tint intLen = 0;\n\t\t\n\t\ttry{\n\t\t\tintLen = Integer.parseInt(strlen);\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showMessageDialog(frame, \"Input should be in integral format\");\n\t\t\treturn promptSIZE();\n\t\t}\n\t\t\n\t\tif(intLen<5 || intLen>19){\n\t\t\tJOptionPane.showMessageDialog(frame, \"Input should be 5~19\");\n\t\t\treturn promptSIZE();\n\t\t}\n\t\t\n\t\treturn intLen;\n\t}",
"private static int getRowsOrColumns(boolean rows) {\n int n;\n do {\n if (rows) {\n System.out.print(\"Enter number of rows (> 0): \");\n } else {\n System.out.print(\"Enter number of columns (> 0): \");\n }\n n = IO.readInt();\n } while (n <= 0);\n return n;\n }",
"int maxRowSize();",
"public int[] takeShots(){\n ui.printToUser(\"Please enter the row value\");\n int row = Integer.parseInt(String.valueOf(ui.readFromUser().charAt(0)));\n ui.printToUser(\"Please enter the column value\");\n int column = Integer.parseInt(String.valueOf(ui.readFromUser().charAt(0)));\n return new int[]{row, column};\n }",
"public static void boardSize() {\n\t\tString boardSizeInput = JOptionPane\n\t\t\t\t.showInputDialog(\"Please enter a number greater than 2 for the n x n game board size: \");\n\n\t\tif (boardSizeInput == null) {\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\twhile (Integer.parseInt(boardSizeInput) < 3) {\n\t\t\tboardSizeInput = JOptionPane.showInputDialog(\n\t\t\t\t\t\"Invalid input! Please enter a number greater than 2 for the n x n game board size: \");\n\n\t\t\tif (boardSizeInput == null) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\n\t\tsize = Integer.parseInt(boardSizeInput);\n\t}",
"public int getSelectionSize();",
"public static int getUserInput(){\r\n String input;\r\n Integer selection;\r\n while(true){\r\n try {\r\n input = JOptionPane.showInputDialog(null, \"Please enter the desired side size or press cancel for default size,\\n\"\r\n + \"you should enter a valid integer between 3 and 100.\");\r\n if (input == null) {\r\n selection = DEFAULT_SIZE;\r\n }\r\n else {\r\n selection = Integer.parseInt(input);\r\n if (selection > UPPER_BOUND) selection = UPPER_BOUND;\r\n else if (selection < LOWER_BOUND) selection = LOWER_BOUND;\r\n }\r\n break;\r\n }\r\n catch (NumberFormatException e){\r\n continue;\r\n }\r\n }\r\n return selection;\r\n \r\n }",
"public int getSize() {\n return rows * cols;\n }",
"public int[] askNewSizes(int min, int max, String titel);",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n String newMxCharsToOutput = JOptionPane.showInputDialog(GlobalValues.myGEdit, \"Controls max chars to display\",GlobalValues.mxLenToDisplay );\r\n GlobalValues.mxLenToDisplay = Integer.valueOf(newMxCharsToOutput);\r\n }",
"public long getInputSize()\r\n\t{\r\n\t return inputSize;\r\n\t}",
"private int getWidth(ActionEvent event) {\n JComboBox box = (JComboBox) event.getSource();\n return GuiUtils.getBoxValue(box);\n }",
"public int getRowSize() {\n \t\treturn this.rows;\n \t}",
"@Override\n public int getNumRows(){\n return HEIGHT;\n }",
"public static void main_getSize(){\n\n System.out.println(table.size());\n\n }",
"public Integer getLength(Menu row){\r\n \treturn row.getIdmenu().length();\r\n }",
"public int getCellSize(){\n return cellSize;\n }",
"public abstract int getNumberOfColumnsInCurrentRow();",
"public int getSize(){\n\treturn Cells.size();\n }",
"public int size() {\n return numberOfRows();\n }",
"int getInputsCount();",
"int getInputsCount();",
"int getInputsCount();",
"private int numRows(){\n return attrTable.getModel().getRowCount();\n }",
"public int[] getInputSize() {\n return inputSize;\n }",
"@Override\r\n\tpublic int getRowCount() {\n\t\t\r\n\t\treturn variableData.size();\r\n\t}",
"public abstract boolean currentSizeVSCageSize(int row, int col);",
"private int size() {\n\treturn matrix.length; //# of rows\n }",
"public abstract int getNumRows();",
"public int getRowCount()\r\n {\r\n return height;\r\n }",
"private int numCols(){\n return attrTable.getModel().getColumnCount();\n }",
"public int getSize(){\n return this.node.getValues().size();\n }",
"public int getParameterSize();",
"int getRows();",
"int getRows();",
"@Override\r\n\tpublic int getSize() {\n\t\treturn gridSize;\r\n\t}",
"public int getRows();",
"public int getRows();",
"@Override\r\n\tpublic int getRowCount() {\n\t\treturn 25;\r\n\t}",
"double getRowCount();",
"public int getNumRows() { return numRows; }",
"public abstract int getNumOfRows();",
"public int getRowCount() {\n\t\t\t\treturn valores.size();\n\t\t\t}",
"static void gatherInfo() {\n Scanner keyboard = new Scanner(System.in);\n System.out.print(\"Enter the type of measurement (inches, feet, etc.). >> \");\n measurementType = keyboard.nextLine();\n System.out.print(\"Enter the rectangle width. >> \");\n height = keyboard.nextDouble();\n System.out.print(\"Enter the rectangle height. >> \");\n width = keyboard.nextDouble();\n }",
"@Override\n public int getNumCols(){ return WIDTH; }",
"public int getAutoSize() {\n return option >> 1 & 3;\n }",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"public int getCellSize()\n {\n return cellSize;\n }",
"public int getRowCount() {\r\n //return outputs.length;\r\n return NUM_ROW;\r\n }",
"public void showInputs() {\n\t\tCIVLTable tbl_inputTable = (CIVLTable) getComponentByName(\"tbl_inputTable\");\n\t\tDefaultTableModel inputModel = (DefaultTableModel) tbl_inputTable\n\t\t\t\t.getModel();\n\n\t\tif (inputModel.getRowCount() != 0) {\n\t\t\tinputModel.setRowCount(0);\n\t\t\ttbl_inputTable.clearSelection();\n\t\t}\n\n\t\t// GMCSection gmcs = currConfig.getGmcConfig().getAnonymousSection();\n\t\tArrayList<CIVL_Input> inputList = currConfig.getInputs();\n\t\tfor (int i = 0; i < inputList.size(); i++) {\n\t\t\tCIVL_Input input = inputList.get(i);\n\t\t\tinputModel.addRow(new Object[] { input.getName(), input.getType(),\n\t\t\t\t\tinput.getValue(), input.getInitializer() });\n\t\t}\n\n\t}",
"public String getSizeTextField(){\n\t\treturn textField.getText();\n\t}",
"int getItemSize();",
"public abstract int getModelRowCount();",
"public abstract int rows();",
"public static byte getRowSize() {\n return ROW_SIZE;\n }",
"public abstract int getNumColumns();",
"int tableSize();",
"@Override\n public int getRowCount() {\n if (menuItems.size() > 0) {\n return menuItems.size() + 2;\n } else {\n return menuItems.size();\n }\n }",
"public int getRowCount();",
"int getCurrentSize();",
"int getColumnCount();",
"int getColumnCount();",
"private void cbxSizeActionPerformed(java.awt.event.ActionEvent evt) {\n\n String size = (String) cbxSize.getSelectedItem();\n if (size.contains(\"4\")) {\n panelSize = 4;\n } else if (size.contains(\"5\")) {\n panelSize = 5;\n } else {\n panelSize = 3;\n }\n initPanel();\n }",
"int getCellsCount();",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\treadValues();\n\t\tcontroller.setValues(array, leftCol, bottomRow);\n\t\tif (e.getSource() == btnReadRow) {\n\t\t\tcontroller.readRow(Integer.parseInt(tfRow.getText()));\n\t\t} else if (e.getSource() == btnPrintRow) {\n\t\t\tcontroller.printRow(Integer.parseInt(tfRow.getText()));\n\t\t} else if (e.getSource() == btnReadCol) {\n\t\t\tcontroller.readCol(Integer.parseInt(tfCol.getText()));\n\t\t} else if (e.getSource() == btnPrintCol) {\n\t\t\tcontroller.printCol(Integer.parseInt(tfCol.getText()));\n\t\t}\n\n\t}",
"public int size() {\r\n return cells.size();\r\n }",
"public void setSize() {\r\n\t\tif (intScanner.hasNextInt()) {\r\n\t\t\tint trySize = intScanner.nextInt();\r\n\t\t\tif (trySize > 0) {\r\n\t\t\t\tsize = trySize;\r\n\t\t\t\tSystem.out.println(\"The size will be \" + size);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Please use a number greater than zero.\");\r\n\t\t\t\tsetSize();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Please use a number.\");\r\n\t\t\tintScanner.next();\r\n\t\t\tsetSize();\r\n\t\t}\r\n\t}",
"public static int size() {\n return cells.size();\n }",
"@Test\r\n public void Test007TakeUserInputInValidRowColumn()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"2 1 20 20 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[2][1] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }",
"int getColumns();",
"int getColumns();",
"public int parseMapSize() {\n\t\t// TODO Auto-generated method stub\n\t\tint size = -1;\n\t\tboolean isValid = false;\n\t\twhile(!isValid) {\n\t\t\tSystem.out.println(\"Please enter size of board (4-20)\");\n\t\t\t size = parseInt();\n\t\t\t if(size >= 4 && size < 21) {\n\t\t\t\t isValid = true;\n\t\t\t } else {\n\t\t\t\t System.out.println(ConsoleColors.RED + \"Size of board should be between 4 and 20.\" + ConsoleColors.RESET);\n\t\t\t }\n\t\t}\n\t\treturn size;\n\t}",
"public static void main(String[] args) {\n \r\n UIManager.put(\"OptionPane.minimumSize\", new Dimension(150, 150));\r\n \r\n Scanner input = new Scanner(System.in);\r\n System.out.print(\"Enter five digits number: \");\r\n number = input.next();\r\n\r\n if (number.length() != 5) {\r\n System.out.println(\"Number most be five digits! \");\r\n System.out.print(\"Enter five digits number: \");\r\n number = input.next();\r\n }\r\n firstDigit = number.charAt(0);\r\n secondDigit = number.charAt(1);\r\n thirdDigit = number.charAt(2);\r\n fouthDigit = number.charAt(3);\r\n fifthDigit = number.charAt(4);\r\n\r\n //JOptionPane.showMessageDialog(null, firstDigit + \"\\t\\t\\t\" + secondDigit + \"\\t\\t\\t\" + thirdDigit + \"\\t\\t\\t\" + fouthDigit + \"\\t\\t\\t\" + fifthDigit);\r\n System.out.println(\"input of \" + number + \" will display \" + firstDigit + \"\\t\" + secondDigit + \"\\t\" + thirdDigit + \"\\t\" + fouthDigit + \"\\t\" + fifthDigit);\r\n }",
"public void writeSize(int rowNum, int columnNum, int size){\n row = sheet.createRow(rowNum);\n cell = row.createCell(columnNum);\n cell.setCellValue(size);\n }",
"@Override\n\tpublic int getRowCount() {\n\t\treturn values.size();\n\t}",
"@Override\n public int getCount() {\n return jArrayQty.length();\n }",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\t// The input should have been accepted even if there are extra white spaces at the end\r\n\t\t\t// but it would complicate the codes to get rid of the spaces at the end of the input string\r\n\t\t\t// so if there are more than one white space at the end of the input string,\r\n\t\t\t// which would cause an exception later on when the input string got split by \" \"\r\n\t\t\t// so the program will just ask for another input when the input is in the wrong format\r\n\t\t\t// and detailed instruction is given at the top of the GUI\r\n\t\t\tinstr.setText(\"Input the size of array, and then input the elements of the array, separated by a single white space, and ended with no more than one white space.\");\r\n\t\t\tdefaultVar(canvas);\r\n\t\t\tJFrame frame = new JFrame(\"User's input of the array\");\r\n\t\t\t// Prompt the user to enter the input the size and data of the array \r\n\t\t\tString arrSizeString = JOptionPane.showInputDialog(frame, \"What's the size of this array?\");\r\n\t\t\tif (arrSizeString != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint arrSize = Integer.parseInt(arrSizeString);\r\n\t\t\t\t\twhile (arrSize > 10) {\r\n\t\t\t\t\t\tToolkit.getDefaultToolkit().beep();\r\n\t\t\t\t\t\tarrSize = Integer.parseInt(JOptionPane.showInputDialog(frame, \r\n\t\t\t\t\t\t\t\t \"For demo purpose, array size can't be bigger than 10. Please input the data again!\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString arrData = JOptionPane.showInputDialog(frame, \"List the elements of array separated by whitespace.\");\r\n\t\t\t\t\tif (arrData != null && !arrData.equals(\"\")) {\r\n\t\t\t\t\t\twhile (!isInRightFormat(arrData)) {\r\n\t\t\t\t\t\t\tarrData = JOptionPane.showInputDialog(frame, \"Elements of array need to be separated by whitespace and be integers. Please re-try.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (arrData != null) {\r\n\t\t\t\t\t\t\tString[] elements = arrData.split(\" \");\r\n\t\t\t\t\t\t\tif (elements.length != arrSize) {\r\n\t\t\t\t\t\t\t\t// Here when the resulting number of elements doesn't match the size of array that has been assigned\r\n\t\t\t\t\t\t\t\t// The program should have been able to ask the user to re-enter a different input\r\n\t\t\t\t\t\t\t\t// However, it takes a lot of steps to test whether an input actually qualifies the requirements\r\n\t\t\t\t\t\t\t\t// Hence, the program will just output a warning and ask the user to re-click the button to enter another input\r\n\t\t\t\t\t\t\t\t// This will simplify the codes, but I am aware that for the user experience, \r\n\t\t\t\t\t\t\t\t// it would be more effective if the user doesn't have to re-click at this point\r\n\t\t\t\t\t\t\t\tToolkit.getDefaultToolkit().beep();\r\n\t\t\t\t\t\t\t\t// Warning\r\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(frame,\r\n\t\t\t\t\t\t\t\t\t\t\"Wrong size of array. Please re-click the button.\",\r\n\t\t\t\t\t\t\t\t\t\t\"Input Warning\",\r\n\t\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t\t\t} else if (arrData.split(\" \") != null) {\r\n\t\t\t\t\t\t\t\telements = arrData.split(\" \");\r\n\t\t\t\t\t\t\t\tcanvas.arr = new int[arrSize];\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < elements.length; i++) {\r\n\t\t\t\t\t\t\t\t\tcanvas.arr[i] = Integer.parseInt(elements[i]);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcanvas.repaint();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(NumberFormatException error) {\t\r\n\t\t\t\t\tJFrame frame2 = new JFrame(\"\");\r\n\t\t\t\t\t// Warning\r\n\t\t\t\t\tJOptionPane.showMessageDialog(frame2,\r\n\t\t\t\t\t\t\t\"Input size is not a valid number\",\r\n\t\t\t\t\t\t\t\"Input Warning\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}",
"public int getRowCount()\n {\n return getModel().getSize();\n }",
"private int getInsertSize() {\r\n\t\tfinal int DEFAULT = 0;\r\n\r\n\t\ttry {\r\n\t\t\treturn Integer.valueOf(txtInsertSize.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\ttxtInsertSize.setText(String.valueOf(DEFAULT));\r\n\t\t\treturn DEFAULT;\r\n\t\t}\r\n\t}",
"int[] takeNumberFromUser() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter size of numbers\");\n\t\tint size = scan.nextInt();\n\t\tint[] input = new int[size];\n\t\tfor (int index = 0; index < input.length; index++) {\t\t//taking array element as input on console\n\t\t\tinput[index] = scan.nextInt();\n\t\t}\n\t\tscan.close();\n\t\treturn input; // returning input array\n\t}",
"public int getNrow(){\r\n \treturn this.nrow;\r\n \t}",
"public abstract int numColumns();",
"public int getRowCount() {\r\n return pvValues.length;\r\n }",
"public int numRows() {\n\t /*return the number of rows in the field*/\n return row; \n }",
"private void actionModifySize() {\n CSizePanel csizePanel = new CSizePanel(layoutPanel.getLayoutSize(),\n false);\n int result = JOptionPane.showConfirmDialog(this, csizePanel,\n \"Modify layout size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n int sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX].getText());\n int sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY].getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n RepType rtype = RepType.CLEAR;\n if (csizePanel.newButton.isSelected()) {\n rtype = RepType.CLEAR;\n } else if (csizePanel.rptButton.isSelected()) {\n rtype = RepType.REPEAT;\n } else if (csizePanel.altButton.isSelected()) {\n rtype = RepType.ALT;\n }\n\n changeLayoutSize(new Dimension(sizeX, sizeY), rtype);\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \" + LayoutPanel.minXCells\n + \" and \" + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException ne) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n }\n }",
"public int getNumberOfInputs()\n {\n return numberOfInputs;\n }",
"private int inputNumPlayers() {\n\t\t\t// set up dialog box\n\t\t\tString[] options = {\"OK\"};\n\t\t\tJPanel panel = new JPanel(new GridLayout(0, 1));\n\t\t\tJLabel lbl = new JLabel(\"How many players? (2-6)\");\n\t\t\tJTextField txt = new JTextField(10);\n\t\t\tpanel.add(lbl);\n\t\t\tpanel.add(txt);\n\t\t\t\n\t\t\t// show dialog box\n\t\t\tJOptionPane.showOptionDialog(frame, panel, \"# Players\",\n\t\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options , options[0]);\n\t\t\tString numPlayersResponse = txt.getText();\n\t\t\t\n\t\t\t// determine input validity\n\t\t\tint numPlayers = 0;\n\t\t\ttry{\n\t\t\t\tnumPlayers = Integer.parseInt(numPlayersResponse);\n\t\t\t\t// check for out of bounds number\n\t\t\t\twhile(numPlayers < 2 || numPlayers > 6){\n\t\t\t\t\tpanel.remove(lbl);\n\t\t\t\t\ttxt.setText(\"\");\n\t\t\t\t\tlbl = new JLabel(\"Invalid number. Must be 2-6 players.\");\n\t\t\t\t\tpanel.add(lbl);\n\t\t\t\t\tJOptionPane.showOptionDialog(frame, panel, \"# Players\",\n\t\t\t\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options , options[0]);\n\t\t\t\t\tnumPlayersResponse = txt.getText();\n\t\t\t\t\tnumPlayers = Integer.parseInt(numPlayersResponse);\n\t\t\t\t}\n\t\t\t} catch(NumberFormatException e){\n\t\t\t\t// player entered nothing or a non-numeric string\n\t\t\t\treturn inputNumPlayers();\n\t\t\t}\n\t\t\treturn numPlayers;\n\t\t}",
"protected void populateDynamicCells(int resultsRow) {\n }",
"public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}",
"public int getSize() {\n\t\treturn grid.length;\n\t}"
] | [
"0.6416222",
"0.63330644",
"0.61625016",
"0.6147217",
"0.6142652",
"0.60581404",
"0.60528666",
"0.6005924",
"0.5953978",
"0.5928629",
"0.58307034",
"0.58106047",
"0.576469",
"0.5691995",
"0.5642126",
"0.56246436",
"0.5587525",
"0.5579411",
"0.5575179",
"0.55599105",
"0.55585974",
"0.5509162",
"0.5502413",
"0.5493653",
"0.5477088",
"0.545167",
"0.545167",
"0.545167",
"0.54470897",
"0.543741",
"0.5431894",
"0.5395598",
"0.5381742",
"0.53813976",
"0.53754556",
"0.53639245",
"0.5363693",
"0.5359522",
"0.5335841",
"0.5335841",
"0.533211",
"0.53267086",
"0.53267086",
"0.53254414",
"0.5321364",
"0.5314799",
"0.5314317",
"0.53138286",
"0.530646",
"0.5296518",
"0.52934587",
"0.52930236",
"0.52930236",
"0.52930236",
"0.52930236",
"0.52930236",
"0.52930236",
"0.52930236",
"0.5292357",
"0.5285847",
"0.52846646",
"0.52835435",
"0.52543724",
"0.52528757",
"0.52467775",
"0.52390957",
"0.5237467",
"0.52333874",
"0.52260685",
"0.521929",
"0.5218915",
"0.5211309",
"0.5211309",
"0.52073205",
"0.5196827",
"0.51957536",
"0.5195314",
"0.51931846",
"0.5191965",
"0.5186697",
"0.51850027",
"0.51850027",
"0.5179894",
"0.51713246",
"0.51671165",
"0.51574916",
"0.51553077",
"0.5155193",
"0.51487684",
"0.5148352",
"0.51464146",
"0.5142659",
"0.51397073",
"0.51216733",
"0.5121548",
"0.5119692",
"0.51138127",
"0.5112209",
"0.51096183",
"0.5104351",
"0.5102359"
] | 0.0 | -1 |
method that displays the popup menu+ called on right click when in range | public void showChangeSizeMeasurementPopupForRows(LayoutCell cellForEditing) {
this.cellForEditing = cellForEditing;
enablePreferredAndMinimumIfComponentAvaible();
enableDeleteIfNoItemContained();
Point loc = getContainer().getMousePosition().getLocation();
changeSizeMeasurementPopupRow.show(getContainer(), loc.x, loc.y);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void rightClick(MouseEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\tpublic void rightClick(MouseEvent e) {\n\n\t}",
"private void createPopupMenu()\r\n\t{\r\n\t\tfinal Camera camera = SrvHal.getCamera();\r\n\t\tfinal PopupMenu menu = new PopupMenu();\r\n\t\tfinal MenuItem setColour = new MenuItem(\"Set colour to selected bin\");\r\n\r\n\t\tsetColour.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tcamera.getDetector().updateColourBinFromCoords();\r\n\t\t\t\tcamera.getDetector().setSampleLock(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenu.add(setColour);\r\n\r\n\t\tfinal Component canvas = this;\r\n\t\tadd(menu);\r\n\t\taddMouseListener(new MouseAdapter()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e)\r\n\t\t\t{\r\n\t\t\t\t// show the context menu when right-click detected within image bounds\r\n\t\t\t\tif (e.getButton() == MouseEvent.BUTTON3)\r\n\t\t\t\t{\r\n\t\t\t\t\tint x = e.getX();\r\n\t\t\t\t\tint y = e.getY();\r\n\t\t\t\t\tRectangle bounds = getOffsetBounds();\r\n\t\t\t\t\tif (bounds.contains(x, y))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcamera.getDetector().setSampleLock(true);\r\n\t\t\t\t\t\tmenu.show(canvas, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"@Override\r\n \tpublic void mousePressed(MouseEvent e)\r\n \t{\r\n\t if (showDebug && e.isPopupTrigger()) {\r\n\t rightClickMenu.show(e.getComponent(),\r\n\t e.getX(), e.getY());\r\n\t }\r\n \t}",
"@Override\r\n \tpublic void mouseReleased(MouseEvent e)\r\n \t{\r\n\t if (showDebug && e.isPopupTrigger()) {\r\n\t rightClickMenu.show(e.getComponent(),\r\n\t e.getX(), e.getY());\r\n\t }\r\n \t}",
"private Menu createPopupMenu() {\n\t\tMenu popUpMenu = new Menu(parent.getShell(), SWT.POP_UP);\n\n\t\t/**\n\t\t * Adds a listener to handle enabling and disabling\n\t\t * some items in the Edit submenu.\n\t\t */\n\t\tpopUpMenu.addMenuListener(new MenuAdapter() {\n\t\t\t@Override\n public void menuShown(MenuEvent e) {\n\t\t\t\tMenu menu = (Menu) e.widget;\n\t\t\t\tMenuItem[] items = menu.getItems();\n\t\t\t\tint rowIndex = table.getSelectionIndex();\n\t\t\t\tint columnIndex = cursor.getColumn();\n\t\t\t\tint tableSize = table.getBufferSize();\n\t\t\t\tHexTablePointer p1 = new HexTablePointer(rowIndex, columnIndex - 1);\n\n\t\t\t\tboolean isOffsetColumn = columnIndex == 0;\n\t\t\t\tboolean isCharacterColumn = columnIndex == HexEditorConstants.TABLE_NUM_COLUMNS - 1;\n\t\t\t\tboolean endOfBuffer = p1.getOffset() >= tableSize;\n\t\t\t\tboolean readonly = hexEditor.isReadOnly();\n\n\t\t\t\tboolean enableInsert = !isOffsetColumn && !isCharacterColumn && !endOfBuffer && !readonly;\n\t\t\t\tboolean enableDelete = !isOffsetColumn && !isCharacterColumn && !endOfBuffer && !readonly;\n\t\t\t\tboolean enableAppend = !readonly;\n\n\t\t\t\titems[0].setEnabled(enableInsert); // insert\n\t\t\t\titems[1].setEnabled(enableAppend); // append\n\t\t\t\t//--- separator ---\n\t\t\t\titems[3].setEnabled(canUndo());\n\t\t\t\titems[4].setEnabled(canRedo());\n\t\t\t\t//--- separator ---\n\t\t\t\titems[8].setEnabled(canPaste()); // paste\n\t\t\t\titems[9].setEnabled(enableDelete); // delete\n\t\t\t\t// --- separator ---\n\t\t\t\titems[11].setEnabled(true); // goto\n\t\t\t\t// --- separator ---\n\t\t\t\titems[13].setEnabled(true); // about\n\t\t\t} // menuShown()\n\t\t});\n\n\n\t\t//\n\t\t// \"Insert\" menu item\n\t\t//\n\t\tMenuItem item = new MenuItem(popUpMenu, SWT.PUSH/*SWT.CASCADE*/);\n\t\titem.setText(Messages.HexEditorControl_37);\n\t\titem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\tpopupMenuInsertData(table.getSelectionIndex(), cursor.getColumn());\n\t\t\t}\n\t\t});\n\n\t\t//\n\t\t// \"Append\" menu item\n\t\t//\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH/*SWT.CASCADE*/);\n\t\titem.setText(Messages.HexEditorControl_38);\n\t\titem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\tpopupMenuAppendData();\n\t\t\t}\n\t\t});\n\n\t\t//\n\t\t// Separator\n\t\t//\n\t\tnew MenuItem(popUpMenu, SWT.SEPARATOR);\n\n\t\t//\n\t\t// \"Undo\" and \"Redo\" menu item\n\t\t//\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH/*SWT.CASCADE*/);\n\t\titem.setText(Messages.HexEditorControl_39);\n\t\titem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\thexEditor.undo();\n\t\t\t}\n\t\t});\n\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH/*SWT.CASCADE*/);\n\t\titem.setText(Messages.HexEditorControl_40);\n\t\titem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\thexEditor.redo();\n\t\t\t}\n\t\t});\n\t\t//\n\t\t// Separator\n\t\t//\n\t\tnew MenuItem(popUpMenu, SWT.SEPARATOR);\n\n\t\tListener copyPasteListener = new Listener() {\n\t\t\t@Override\n public void handleEvent(Event event) {\n\t\t\t\thexEditor.getEditorSite().getActionBars().getGlobalActionHandler(\n\t\t\t\t (String) event.widget.getData()).run();\n\t\t\t}\n\t\t};\n\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH);\n\t\titem.setText(Messages.HexEditorControl_41);\n\t\titem.setData(ActionFactory.CUT.getId());\n\t\titem.addListener(SWT.Selection, copyPasteListener);\n\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH);\n\t\titem.setText(Messages.HexEditorControl_42);\n\t\titem.setData(ActionFactory.COPY.getId());\n\t\titem.addListener(SWT.Selection, copyPasteListener);\n\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH);\n\t\titem.setText(Messages.HexEditorControl_43);\n\t\titem.setData(ActionFactory.PASTE.getId());\n\t\titem.addListener(SWT.Selection, copyPasteListener);\n\n\t\t//\n\t\t// \"Delete\" menu item\n\t\t//\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH/*SWT.CASCADE*/);\n\t\titem.setText(Messages.HexEditorControl_44);\n\t\titem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\tpopupMenuDeleteData(table.getSelectionIndex(), cursor.getColumn());\n\t\t\t}\n\t\t});\n\n\t\t//\n\t\t// Separator\n\t\t//\n\t\tnew MenuItem(popUpMenu, SWT.SEPARATOR);\n\n\t\t//\n\t\t// \"Goto...\" menu item\n\t\t//\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH/*SWT.CASCADE*/);\n\t\titem.setText(Messages.HexEditorControl_45);\n\t\titem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\tpopupMenuGoto();\n\t\t\t}\n\t\t});\n\n\t\t//\n\t\t// Separator\n\t\t//\n\t\tnew MenuItem(popUpMenu, SWT.SEPARATOR);\n\n\t\t//\n\t\t// \"About\" menu item\n\t\t//\n\t\titem = new MenuItem(popUpMenu, SWT.PUSH/*SWT.NULL*/);\n\t\titem.setText(Messages.HexEditorControl_46);\n\t\titem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\tpopupMenuAbout();\n\t\t\t}\n\t\t});\n\n\t\treturn popUpMenu;\n\t}",
"@Override\n\tpublic void RightButtonClick() {\n\t\t\n\t}",
"@Override\n\tpublic void RightButtonClick() {\n\t\t\n\t}",
"public void onSourceRightClick(DefaultPopupManager manager) {\r\n }",
"@Override\n public void showContextMenu()\n {\n showContextMenu(selection, View.SELECTION);\n }",
"@Override\n\t\t\tpublic void onRightClick() {\n\t\t\t}",
"protected void enablePopupMenu()\n {\n if(viewer.getEditScriptMode())\n newAction.setEnabled(false);\n else\n newAction.setEnabled(true);\n\n FieldActorDescriptor[] selectedActors = getHighlightedActors();\n if(selectedActors.length == 0)\n {\n editAction.setEnabled(false);\n removeAction.setEnabled(false);\n selectAction.setEnabled(false);\n viewAction.setEnabled(false);\n }\n else if(selectedActors.length == 1)\n {\n editAction.setEnabled(true);\n\n if(viewer.getEditScriptMode())\n removeAction.setEnabled(false);\n else\n removeAction.setEnabled(true);\n\n if(selectedActors[0].selected)\n selectAction.setEnabled(false);\n else\n selectAction.setEnabled(true);\n\n viewAction.setEnabled(true);\n }\n else\n {\n if(sameActorTypes(selectedActors))\n editAction.setEnabled(true);\n else\n editAction.setEnabled(false);\n\n if(viewer.getEditScriptMode())\n removeAction.setEnabled(false);\n else\n removeAction.setEnabled(true);\n\n selectAction.setEnabled(false);\n\n viewAction.setEnabled(false);\n }\n }",
"@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tsuper.mouseClicked(e);\r\n\t\t\tif(e.isPopupTrigger()){\r\n\t\t\t\tdoClick(e);\r\n\t\t\t\tjPopupMenu.show((Component)e.getSource(), e.getX(), e.getY());\r\n\t\t\t}\r\n\t\t}",
"@Override\n protected void hookContextMenu() {\n\n }",
"public void show() {\n int width = mEditor.getWidth();\n RectF leftHandleRect = mEditor.getLeftHandleRect();\n RectF rightHandleRect = mEditor.getRightHandleRect();\n\n // when right handle goes below visible area, it rect becomes empty. so this feature (or bug) used to calculate popup location\n // if we can not use this,\n // alternative method can be implemented using mMaximumTop\n // @TODO implement a proper way to calculate popup position\n if (rightHandleRect.isEmpty()) {\n rightHandleRect.top = mMaximumTop;\n rightHandleRect.left = width;\n rightHandleRect.bottom = mMaximumTop;\n rightHandleRect.right = width;\n }\n\n float handleHeight = leftHandleRect.height();\n selectionRect.top = Math.min(leftHandleRect.top, rightHandleRect.top);\n selectionRect.bottom = Math.max(leftHandleRect.bottom, rightHandleRect.bottom);\n selectionRect.left = Math.min(leftHandleRect.left, rightHandleRect.left);\n selectionRect.right = Math.max(leftHandleRect.right, rightHandleRect.right);\n\n // prevent drawing popup over the keyboard\n /*if (selectionRect.bottom > mMaximumTop - popHeightPx) {\n selectionRect.bottom -= popHeightPx;\n }*/\n\n if (mLeft > width - getWidth()) {\n mLeft = width - getWidth();\n }\n int height = mEditor.getHeight();\n if (mTop > height - getHeight()) {\n mTop = height - getHeight();\n }\n if (mTop < 0) {\n mTop = 0;\n }\n if (mLeft < 0) {\n mLeft = 0;\n }\n mEditor.getLocationInWindow(mLocation);\n boolean topCovered = mLocation[1] > selectionRect.top - textSizePx - popHeightPx - handleHeight;\n\n if (topCovered) {\n mTop = (int) (selectionRect.bottom + (handleHeight));\n } else {\n mTop = (int) (selectionRect.top - textSizePx - popHeightPx - handleHeight);\n }\n if (isShowing()) {\n update(mLocation[0] + mLeft, mLocation[1] + mTop, getWidth(), getHeight());\n return;\n }\n super.showAtLocation(mEditor,\n Gravity.START | Gravity.TOP,\n mLocation[0] + mLeft, mLocation[1] + mTop);\n }",
"@Override public void mouseClicked( final MouseEvent e )\r\n {\n if( e.isPopupTrigger() == true || e.getButton() == MouseEvent.BUTTON3 )\r\n { // mouse listener only added if row class supports JPopupMenuProvidable\r\n final JTable table = getJTable();\r\n final int row = table.rowAtPoint( e.getPoint() ); // did test, view->model xlation not needed\r\n if( row > -1 ) table.setRowSelectionInterval( row, row );\r\n\r\n final R rowObject = getSingleSelection();\r\n if( rowObject != null )\r\n {\r\n final JPopupMenu jpm = ((JPopupMenuProvidable)rowObject).provideJPopupMenu();\r\n if( jpm != null )\r\n {\r\n jpm.show( table, e.getX(), e.getY() );\r\n }\r\n }\r\n // else in table but below rows, i.e. no-man's land\r\n }\r\n }",
"protected ViewerPopupMenu createPopupMenu()\n {\n ViewerPopupMenu menu = super.createPopupMenu();\n\n viewAction = new ViewerAction(this, \"View\", \"view\",\n \"View Dofs\",\n \"View the dofs of an Actor in table form.\",\n null, null, \"Ctrl-V\", null, \"false\");\n\n menu.addSeparator();\n menu.add(viewAction);\n\n return menu;\n }",
"void clickAmFromMenu();",
"private void showPopupMenu(MouseEvent event) {\n boolean isPointClick = drawnX1.equals(drawnX2) && drawnY1.equals(drawnY2);\n\n\n miEditStaircaseGroup.setEnabled(false);\n\n\n if (isPointClick) {\n miAddRoom.setEnabled(false);\n miAddLink.setEnabled(false);\n miAddStaircase.setEnabled(false);\n if (current.selected() != null && !current.selected().isEmpty()) {\n miRemoveSelection.setEnabled(true);\n miRenameArea.setEnabled(true);\n }\n if (current.selected().size() > 1) {\n miRenameArea.setEnabled(false);\n }\n if (current.isGroupCreatePossible()) {\n miCreateGroup.setEnabled(true);\n } else {\n miCreateGroup.setEnabled(false);\n }\n if (current.isGroupRemovePossible()) {\n miRemoveGroup.setEnabled(true);\n } else {\n miRemoveGroup.setEnabled(false);\n }\n if (this.hoveringOverStaircaseId != null) miEditStaircaseGroup.setEnabled(true);\n } else {\n miAddRoom.setEnabled(true);\n miAddLink.setEnabled(true);\n miAddStaircase.setEnabled(true);\n miRemoveSelection.setEnabled(false);\n miRenameArea.setEnabled(false);\n miCreateGroup.setEnabled(false);\n miRemoveGroup.setEnabled(false);\n }\n\n //update the floors\n mSwitchToFloor.removeAll();\n floorItems = null;\n ButtonGroup group = new ButtonGroup();\n if (Database.getInstance().getNumberOfFloors() > 0)\n\n {\n floorItems = new HashSet<JRadioButtonMenuItem>();\n for (int i = 0; i < current.numberOfFloors(); ++i) {\n JRadioButtonMenuItem item = new JRadioButtonMenuItem(\"Floor #\" + i);\n item.addActionListener(this);\n mSwitchToFloor.add(item);\n\n floorItems.add(item);\n group.add(item);\n }\n mSwitchToFloor.setEnabled(true);\n\n } else\n\n {\n mSwitchToFloor.setEnabled(false);\n }\n\n\n popupMenu.show(event.getComponent(), drawnX2, drawnY2);\n }",
"@Override\n\tpublic void leftClick(MouseEvent e) {\n\n\t}",
"abstract void onRightClick(int x, int y, boolean down);",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"void cellMenuAction(Cell cell, String action);",
"public void triggerPopup();",
"void onMenuItemClicked();",
"@Override\n\t\tpublic void popupMenuWillBecomeVisible(PopupMenuEvent e) {\n\n\t\t}",
"private void openAddRoutePopupMenu() {\r\n PopupMenu menu = new PopupMenu(this, findViewById(R.id.route_list));\r\n for (Sight s : this.manager.getAllSights()){\r\n menu.getMenu().add(Menu.NONE, s.getId(), Menu.NONE, s.toString());\r\n }\r\n menu.getMenu().add(Menu.NONE, R.id.configure_sight_list_cancel_context_menu, Menu.NONE, getApplicationContext().getString(R.string.cancel));\r\n menu.setOnMenuItemClickListener(this);\r\n menu.show();\r\n }",
"public void popupMenuGoto() {\n\t\tint rowIndex = table.getSelectionIndex();\n\t\tint columnIndex = cursor.getColumn();\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tGotoDialog gotoDialog = new GotoDialog(parent.getShell(), rowIndex, columnIndex);\n\t\tif (gotoDialog.open() != Window.OK)\n\t\t\treturn;\n\t\tHexTablePointer p = gotoDialog.getNewPosition();\n\n\t\tif (p == null) {\n\t\t\t//\n\t\t\t// Error calculating new position - do nothing\n\t\t\t//\n\t\t\treturn;\n\t\t} // if\n\n\t\tif (p.getRowIndex() < 0 || p.getColumnIndex() < 0) {\n\t\t\tMessageDialog.openError(parent.getShell(), HexEditorConstants.DIALOG_TITLE_ERROR, Messages.HexEditorControl_49);\n\t\t\tcursor.setSelection(0, 1);\n\t\t\tcursor.redraw();\n\t\t\ttable.setSelection(0);\n\t\t\t//\n\t\t\t// Update the status panel\n\t\t\t//\n\t\t\tupdateStatusPanel();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tcursor.setSelection(p.getRowIndex(), p.getColumnIndex() + 1);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tint numRows = table.getItemCount();\n\t\t\tint lastRowIndex = (numRows > 0) ? (numRows - 1) : numRows;\n\t\t\tMessageDialog.openError(parent.getShell(), HexEditorConstants.DIALOG_TITLE_ERROR, \"Address is out of range!\");\n\t\t\tint lastColumnIndex = table.getBufferSize() % HexEditorConstants.TABLE_NUM_DATA_COLUMNS;\n\t\t\tcursor.setSelection(lastRowIndex, lastColumnIndex + 1);\n\t\t\tcursor.redraw();\n\t\t\ttable.setSelection(lastRowIndex);\n\t\t\t//\n\t\t\t// Update the status panel\n\t\t\t//\n\t\t\tupdateStatusPanel();\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t// Place the cursor where was calculated\n\t\t//\n\t\tcursor.setSelection(p.getRowIndex(), p.getColumnIndex() + 1);\n\t\tcursor.redraw();\n\t\ttable.setSelection(p.getRowIndex());\n\n\t\t//\n\t\t// Update the status panel\n\t\t//\n\t\tupdateStatusPanel();\n\t}",
"@Override\r\n public void mousePressed(final MouseEvent e) {\n if (SwingUtilities.isRightMouseButton(e)) {\r\n // Find Cell in Model Coordinates\r\n Object cell = GraphComponent.this.getFirstCellForLocation(e.getX(), e.getY());\r\n // Create PopupMenu for the Cell\r\n JPopupMenu menu = createPopupMenu(e.getPoint(), cell);\r\n // Display PopupMenu\r\n menu.show(GraphComponent.this, e.getX(), e.getY());\r\n // Else if in ConnectMode and Remembered Port is Valid\r\n } else if (port != null && GraphComponent.this.isPortsVisible()) {\r\n // Remember Start Location\r\n startPoint = GraphComponent.this.toScreen(port.getLocation());\r\n // Remember First Port\r\n startPort = port;\r\n } else {\r\n super.mousePressed(e);\r\n }\r\n }",
"@Override\n\t\t\tpublic void onClickedPopup(int arg0) {\n\t\t\t\t\n\t\t\t}",
"private void resourceActionWindow (ButtonImage button){\n JPopupMenu depositList = new JPopupMenu(\"Deposits\");\n DepositMenu subMenu = new DepositMenu(gui, \"Send to\", selectedResource, Command.SEND_DEPOSIT_ID, 0);\n depositList.add(subMenu);\n button.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent e) {\n depositList.show(button , e.getX(), e.getY());\n }\n });\n }",
"public void menuItemClicked( Menu2DEvent e );",
"private void openContextMenu(MouseEvent e) {\n if (e.isPopupTrigger()) {\n User user = getUser(e);\n if (user != null) {\n UserContextMenu m = new UserContextMenu(user, contextMenuListener);\n m.show(this, e.getX(), e.getY());\n }\n }\n }",
"@Override\n public void mouseClicked(final MouseEvent event) {\n if (event.getClickCount() == 1 && SwingUtilities.isLeftMouseButton(event) && event.getComponent().isEnabled()) {\n\n JPopupMenu menu = new JPopupMenu();\n menu.add(new ShowAllResourcesAction(contentSearcher,searchText));\n menu.add(new ShowCheckedoutResourcesAction(contentSearcher,searchText));\n menu.add(new ShowForeignCheckoutResourcesAction(contentSearcher,searchText));\n menu.show(event.getComponent(), event.getX(), event.getY());\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.setMouseClick(true);\n\t\t\t}",
"void clickFmFromMenu();",
"public void mouseClicked(MouseEvent me) {\n\t\t\t\trow_position = jTable2.rowAtPoint(me.getPoint());\n\t\t\t\tcolumn_position = jTable2.columnAtPoint(me.getPoint());\n\t\t\t\tif (SwingUtilities.isRightMouseButton(me)) {\n\t\t\t\t\tpop.show(me.getComponent(), me.getX(), me.getY());\n\t\t\t\t}\n\n\t\t\t}",
"@Override\n public boolean onItemLongClick(AdapterView<?> arg0, View view,\n int pos, long id) {\n\n showPopupMenu(view, pos, id);\n\n return true;\n }",
"private void createContextMenu(Event event) {\r\n\t\tif (event.button == 3) {\r\n\t\t\tControl control = (Control) event.widget;\r\n\t\t\tPoint absoluteLoc = control.toDisplay(event.x, event.y);\r\n\t\t\twhile (control != null && control.getMenu() == null) {\r\n\t\t\t\tcontrol = control.getParent();\r\n\t\t\t}\r\n\t\t\tif (control != null) {\r\n\t\t\t\tcontrol.getMenu().setLocation(absoluteLoc);\r\n\t\t\t\tcontrol.getMenu().setVisible(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t\tpublic void open() {\n\t\t\tRange range = positionRangeTo.getRanges().get(0);\n\t\t\tUIHelper.selectAndReveal(new File(range.getFile()), range.getFrom(), range.getTo() - range.getFrom());\n\t\t}",
"public void createPopupMenu() {\n\t\tJPopupMenu popup = new JPopupMenu();\r\n\t\tmenuItem = new JMenuItem(\"刷新频道\");\r\n\t\tmenuItem.addActionListener(this);\r\n\t\tpopup.add(menuItem);\r\n\r\n\t\thideMenuItem = new JMenuItem(\"隐藏公共频道\");\r\n\t\thideMenuItem.addActionListener(this);\r\n\t\tpopup.add(hideMenuItem);\r\n\t\t// Add listener to the text area so the popup menu can come up.\r\n\t\tMouseListener popupListener = new PopupListener(popup);\r\n\t\tcommonArea.addMouseListener(popupListener);\r\n\t\tmyMsgArea.addMouseListener(popupListener);\r\n\t}",
"void onRightClick(double mouseX, double mouseY);",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e)\r\n\t\t\t{\n\t\t\t\tif (e.getButton() == MouseEvent.BUTTON3)\r\n\t\t\t\t{\r\n\t\t\t\t\tint x = e.getX();\r\n\t\t\t\t\tint y = e.getY();\r\n\t\t\t\t\tRectangle bounds = getOffsetBounds();\r\n\t\t\t\t\tif (bounds.contains(x, y))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcamera.getDetector().setSampleLock(true);\r\n\t\t\t\t\t\tmenu.show(canvas, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onDialogMenuPressed() {\n\r\n\t\t\t\t}",
"@Override\r\n\t\tpublic void popupMenuWillBecomeInvisible(PopupMenuEvent arg0) {\n\t\t\t\r\n\t\t}",
"protected void contextMenuAboutToShow(IMenuManager menuManager) {\n IDocument doc = textViewer.getDocument();\n if (doc == null) {\n return;\n }\n\n menuManager\n .add(globalActions.get(ActionFactory.COPY.getId()));\n menuManager.add(globalActions.get(ActionFactory.SELECT_ALL\n .getId()));\n\n menuManager.add(new Separator(\"FIND\")); //$NON-NLS-1$\n menuManager\n .add(globalActions.get(ActionFactory.FIND.getId()));\n\n menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));\n }",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"@Override\n public boolean onItemLongClick(AdapterView<?> arg0, View view,\n int pos, long id) {\n\n showPagePopupMenu(view, pos, id);\n\n return true;\n }",
"public AccessibleRole getAccessibleRole()\n/* */ {\n/* 236 */ return AccessibleRole.POPUP_MENU;\n/* */ }",
"void jMenu1_actionPerformed(ActionEvent e) {\n\r\n cutMenuItem.setEnabled(false);\r\n\r\n\r\n }",
"private void popupModify2te() {\n\t\tRolle rolle = (Rolle) this;\n\t\taufzugschacht.mainFrameShowOptionsFrame(rolle.getRolle2teUmschlingung(), true);\n\t}",
"void handlePopupMenu(JPopupMenu menu,MouseEvent evt)\n{\n long time = getRelevantTime(evt);\n\n BicexEvaluationContext ctx = for_bubble.getExecution().getCurrentContext();\n if (ctx == null) return;\n\n if (ctx.getInnerContexts() != null) {\n for (BicexEvaluationContext sctx : ctx.getInnerContexts()) {\n\t if (sctx.getStartTime() <= time && sctx.getEndTime() >= time) {\n\t menu.add(for_bubble.getContextAction(\"Go to \" + sctx.getShortName(),sctx));\n\t break;\n\t }\n }\n }\n\n BicexValue bv = for_bubble.getExecution().getCurrentContext().getValues().get(\"*LINE*\");\n List<Integer> times = bv.getTimeChanges();\n long now = for_bubble.getExecution().getCurrentTime();\n long prev = -1;\n long next = -1;\n long cur = -1;\n for (Integer t : times) {\n if (t <= now) {\n\t prev = cur;\n\t cur = t;\n }\n else if (next < 0) {\n\t next = t;\n\t break;\n }\n }\n\n if (prev > 0) menu.add(for_bubble.getTimeAction(\"Go To Previous Line\",prev+1));\n if (next > 0) menu.add(for_bubble.getTimeAction(\"Go To Next Line\",next+1));\n}",
"public static void rightClick() {\r\n\t\tMinecraftForge.EVENT_BUS.register(playerUtil);\r\n\t}",
"public void doCut()\n {\n bothToolClicked(map.selectedHexesIterator(), true);\n }",
"private void popupModify() {\n\t\tboolean doNotShow = false;\n\t\tif (this instanceof Umlenkrolle && ((Umlenkrolle) this).isFree()) {\n\t\t\tdoNotShow = true;\n\t\t} else if (this instanceof DoppelUmlenkrolle) {\n\t\t\tdoNotShow = true;\n\t\t}\n\t\taufzugschacht.mainFrameShowOptionsFrame(this, doNotShow);\n\t}",
"private void showPopup(MouseEvent e) {\n if (e.isPopupTrigger()) {\n jPopupMenu1.show(e.getComponent(), e.getX(), e.getY());\n }\n }",
"private void showActionOverflowMenu() {\n try {\n ViewConfiguration config = ViewConfiguration.get(this);\n Field menuKeyField = ViewConfiguration.class.getDeclaredField(\"sHasPermanentMenuKey\");\n if (menuKeyField != null) {\n menuKeyField.setAccessible(true);\n menuKeyField.setBoolean(config, false);\n }\n } catch (Exception e) {\n Log.d(TAG, e.getLocalizedMessage());\n }\n }",
"@Override\n public void contextMenuOpened(ObservableList<GUITemplate> selected) {\n }",
"@Override\n protected void handleMousePress(MouseEvent event){\n if(!event.isShiftDown()){\n super.handleMousePress(event);\n if(event.getClickCount() == 2 && event.getButton().equals(MouseButton.PRIMARY)){\n openEditDialog();\n }\n else if(event.getButton() == MouseButton.SECONDARY){\n getElementSpecificContextMenu().show(this, event.getScreenX(), event.getScreenY());\n }\n else if(left.contains(event.getX(), event.getY())){\n left.handleMousePress(event);\n }\n else if(right.contains(event.getX(), event.getY())){\n right.handleMousePress(event);\n }\n else{\n mouseDelta = event.getX() - getX();\n dragBounds = mutableSegmentController.getBounds(event.getX());\n }\n event.consume();\n }\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"protected void createContextMenu() {\n\t\t// TODO : XML Editor 에서 Query Editor 관련 Action 삭제~~\n\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\"); //$NON-NLS-1$\n\t\tcontextMenu.add(new Separator(\"additions\")); //$NON-NLS-1$\n\t\tcontextMenu.setRemoveAllWhenShown(true);\n\t\tcontextMenu.addMenuListener(new NodeActionMenuListener());\n\t\tMenu menu = contextMenu.createContextMenu(getControl());\n\t\tgetControl().setMenu(menu);\n\t\t// makeActions();\n\t\t// hookSingleClickAction();\n\n\t}",
"public void cursorHome();",
"@Override\n\tpublic void LeftButtonClick() {\n\t\t\n\t}",
"public void printMenu()\n {\n String menu = (\"------------- Menu -------------\\nDisplay collection\\nCheck out materials\\nQuit\\n--------------------------------\\nPlease click one of the buttons to the right\");\n jTextPane1.setText(menu);\n jButton1.enableInputMethods(true);\n jButton2.enableInputMethods(true);\n jButton3.enableInputMethods(true);\n jButton4.enableInputMethods(false);\n }",
"public void mousePressed(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n if(menu.isTopLevelMenu()) {\n if(menu.isSelected()) {\n manager.clearSelectedPath();\n } else {\n Container cnt = menu.getParent();\n if(cnt != null && cnt instanceof JMenuBar) {\n MenuElement me[] = new MenuElement[2];\n me[0]=(MenuElement)cnt;\n me[1]=menu;\n manager.setSelectedPath(me); } } }\n MenuElement selectedPath[] = manager.getSelectedPath();\n if (selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] != menu.getPopupMenu()) {\n if(menu.isTopLevelMenu() || \n menu.getDelay() == 0) {\n appendPath(selectedPath, menu.getPopupMenu());\n } else {\n setupPostTimer(menu); } } }",
"public abstract void clickHelp(FloodItWorld w, ACell topLeft);",
"@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tif(e.isPopupTrigger())\n\t\t\t\t{\n\t\t\t\t\tpopup.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t}\n\t\t\t}",
"public abstract void onRightButtonClick();",
"@objid (\"491bee9e-12dd-11e2-8549-001ec947c8cc\")\n private static void createMenuEntriesForAction(IModule module, MMenu moduleMenu, MPart view) {\n Map<String, MMenu> slotMap = new HashMap<>();\n \n // ask module for its IModuleAction that should be inserted into the\n // contextual menu and for each of them\n for (IModuleAction action : module.getActions(ActionLocation.contextualpopup)) {\n // Create the MHandler and MHandledItem for this action.\n \n // MCommand\n MCommand command = ModuleCommandsRegistry.getCommand(module, action);\n \n // MHandler\n final MHandler handler = createAndActivateHandler(command, module, action, view);\n \n // MHandledItem\n MHandledMenuItem item = createAndInsertItem(moduleMenu, action, slotMap);\n // Bind to command\n item.setCommand(command);\n \n Expression visWhen = new IsVisibleExpression(handler.getObject(), item);\n MCoreExpression isVisibleWhenExpression = MUiFactory.INSTANCE.createCoreExpression();\n isVisibleWhenExpression.setCoreExpressionId(\"programmatic.value\");\n isVisibleWhenExpression.setCoreExpression(visWhen);\n \n item.setVisibleWhen(isVisibleWhenExpression);\n }\n }",
"protected JPopupMenu createPopupMenu()\r\n {\r\n\r\n // Setup menu Items String values that are shared\r\n setSharedMenuItemStrings();\r\n // Add\tall the Horizontal elements\r\n JPopupMenu result = null;\r\n\r\n JMenu insertRows =\r\n HGMenuItem.makeMenu(\r\n getString(\"WatchListTableModule.edit_menu.view_insert_row_text\"),\r\n 'I',\r\n new Object[] { insertBeforeCmd, insertAfterCmd },\r\n actionTrigger);\r\n\r\n result =\r\n HGMenuItem.makePopupMenu(\r\n new Object[] {\r\n viewOptionChainCmd,\r\n null,\r\n viewHistoricChartCmd,\r\n null,\r\n insertRows,\r\n deleteRowCmd,\r\n null,\r\n addNewWatchListCmd,\r\n deleteWatchListCmd,\r\n renameListCmd,\r\n null,\r\n printListCmd },\r\n actionTrigger);\r\n\r\n // Set the Alignment and return the MenuBar\r\n result.setAlignmentX(JMenuBar.LEFT_ALIGNMENT);\r\n return result;\r\n }",
"@Override\n protected void onCreateContextMenu(ContextMenu menu) {\n super.onCreateContextMenu(menu);\n }",
"public void openMenu() {\r\n\t\tmenu.click();\r\n\t}",
"private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"public abstract JSFunctionDefinition createShowMenuEventFunction();",
"void openMenuOptions(Gadget gadget, final Element referenceElement);",
"@Override\n public boolean onMenuItemClick(MenuItem item) {\n Block_Dialog();\n return false;\n }",
"private void mouseCommonCode(MouseEvent e) {\n final Object o = e.getSource();\n if (!(o instanceof Cell)) {\n setSelectedCell(null, true);\n return;\n }\n\n final Cell c = (Cell)o;\n if (c.getIgnoreFocus())\n return;\n\n setSelectedCell(c, true);\n folderList.get(currentFolder).repaint();\n\n if (e.isPopupTrigger()) {\n final JPopupMenu menu = c.getPopupMenu();\n menu.show(e.getComponent(), e.getX(), e.getY());\n }\n }",
"protected void createPopupMenu() {\n\t\tJPopupMenu popup = new JPopupMenu();\n\t\tJMenuItem menuItem = new JMenuItem(\"Clear\");\n\t\tmenuItem.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tclear();\n\t\t\t}\n\t\t});\n\t\tpopup.add(menuItem);\n\t\ttextArea.addMouseListener(new PopupShower(popup));\n\t}",
"protected void showSystemMenu() {\n windowMenu.doClick(0);\n }",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"private void printEditMenu(){\n System.out.println(\"fh - Flip horizontal \\n fv - Flip vertical \\n sl - Slide left \\n sr - Slide right \\n su - Slide up \\n sd - Slide down \\n nr - Slide number right. Currently=\" + numberRight + \"\\n nl - Slide number left. Currently=\" + numberLeft + \"\\n nd - Slide number down. Currently=\" + numberDown + \"\\n nu - Slide number up. Currently=\" + numberUp + \"\\n r - Repeat last operation (Default slide left) \\n q - Quit (Return to main menu)\");\n }",
"void populateCellMenu(Cell cell, List<String> actions);",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_point_viewer, menu);\n return true;\n }",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tif (SwingUtilities.isRightMouseButton(e)) {\n\n\t\t\t\t\tList<Object> idList = imagePanel.getSelectedIds();\n\t\t\t\t\tif (idList == null || idList.size() == 0) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinal int index = (Integer) idList.get(0);\n\t\t\t\t\t\n\t\t\t\t\tJPopupMenu menu = new JPopupMenu();\n\t\t\t\t\tmenu.add(new JMenuItem(new AbstractAction() {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tputValue(NAME, \"New Bounded Map\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\t\t\t// TODO: Combine this code with the code for unbounded\n\t\t\t\t\t\t\tAsset asset = ((ImageFileImagePanelModel)imagePanel.getModel()).getAsset(index);\n\t\t\t\t\t\t\tif (!AssetManager.hasAsset(asset)) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAssetManager.putAsset(asset);\n\t\t\t\t\t\t\t\tMapTool.serverCommand().putAsset(asset);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tZone zone = new Zone(asset.getId());\n\t\t\t\t\t\t\tzone.setType(Zone.Type.MAP);\n\t\t\t\t\t\t\t\n\t\t MapTool.addZone(zone);\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t\tmenu.add(new JMenuItem(new AbstractAction() {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tputValue(NAME, \"New Unbounded Map\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\t\t\tAsset asset = ((ImageFileImagePanelModel)imagePanel.getModel()).getAsset(index);\n\t\t\t\t\t\t\tif (!AssetManager.hasAsset(asset)) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAssetManager.putAsset(asset);\n\t\t\t\t\t\t\t\tMapTool.serverCommand().putAsset(asset);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tZone zone = new Zone(asset.getId());\n\t\t\t\t\t\t\tzone.setType(Zone.Type.INFINITE);\n\t\t\t\t\t\t\t\n\t\t MapTool.addZone(zone);\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t\t\n\t\t\t\t\tmenu.show(imagePanel, e.getX(), e.getY());\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.getPopupMenu().show(menu, menu.getX()+menu.getWidth(), menu.getHeight());\n\t\t\t\tui_ShowAnimal6 animal6 = new ui_ShowAnimal6();\n\t\t\t\tsplitPane.setRightComponent(panel_1.add(animal6.getContentPane()));\n\t\t\t}",
"public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {\n \t\t\t\t\n \t\t\t}",
"public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }"
] | [
"0.71310145",
"0.7117807",
"0.6758736",
"0.66931534",
"0.6552803",
"0.63715065",
"0.6370748",
"0.6370748",
"0.6338225",
"0.63248825",
"0.628931",
"0.62824833",
"0.62170243",
"0.6141271",
"0.6029347",
"0.60161847",
"0.6009777",
"0.5970271",
"0.5954186",
"0.59535265",
"0.5929169",
"0.59274656",
"0.5926833",
"0.59177697",
"0.59144837",
"0.5898523",
"0.58959836",
"0.5870167",
"0.58130145",
"0.58115077",
"0.5810355",
"0.58087236",
"0.5801334",
"0.57854956",
"0.5775299",
"0.5771552",
"0.57670796",
"0.5756626",
"0.57465863",
"0.5744093",
"0.5731912",
"0.5713647",
"0.5712005",
"0.57084596",
"0.57045686",
"0.5703612",
"0.5701506",
"0.569777",
"0.569408",
"0.5689759",
"0.56897044",
"0.5675815",
"0.567282",
"0.5666542",
"0.5665889",
"0.5647288",
"0.56390053",
"0.5637578",
"0.5637571",
"0.56370205",
"0.5636756",
"0.5632907",
"0.56321514",
"0.562357",
"0.5622428",
"0.561931",
"0.56189173",
"0.5614356",
"0.56130254",
"0.56117105",
"0.5605211",
"0.56037396",
"0.5599174",
"0.5597748",
"0.5596104",
"0.5578818",
"0.55783606",
"0.55773693",
"0.5574342",
"0.5574233",
"0.5573818",
"0.55660427",
"0.5562398",
"0.5559169",
"0.5548978",
"0.5548978",
"0.5548978",
"0.5548978",
"0.5548978",
"0.5548978",
"0.5548978",
"0.5548978",
"0.5548978",
"0.5548978",
"0.55454206",
"0.5545354",
"0.55446017",
"0.5542047",
"0.5538215",
"0.5535319",
"0.55350953"
] | 0.0 | -1 |
checks if a component is in this row. there is no sense to enable minimum or preferred size if there is no component inside. | private void enablePreferredAndMinimumIfComponentAvaible() {
boolean itemInRow = tableLayoutUtil.containesItemInRow(cellForEditing.getCellY());
JMenuItem temp;
for (int i = 0; i < changeSizeMeasurementPopupRow.getComponentCount(); i++) {
Component c = changeSizeMeasurementPopupRow.getComponent(i);
if (c instanceof JMenuItem) {
temp = (JMenuItem) changeSizeMeasurementPopupRow.getComponent(i);
if (itemInRow) {
if (temp.getActionCommand().equals("PREFERRED") || temp.getActionCommand().equals("MINIMUM")) {
temp.setEnabled(true);
}
} else if (temp.getActionCommand().equals("PREFERRED") || temp.getActionCommand().equals("MINIMUM")) {
temp.setEnabled(false);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasRowLayout();",
"boolean hasGridLayout();",
"private boolean isFull(){\n return cellSize == Max;\n }",
"public abstract boolean currentSizeVSCageSize(int row, int col);",
"boolean hasGrid();",
"protected boolean calculateSize()\n\t{\n\t\tp_height = 0;\n\t\tfor (int r = 0; r < m_rows; r++)\n\t\t{\n\t\t\tp_height += m_rowHeight[r];\n\t\t\tif (m_rowHeight[r] > 0)\n\t\t\t\tp_height += m_rowGap;\n\t\t}\n\t\tp_height -= m_rowGap;\t//\tremove last\n\t\tp_width = 0;\n\t\tfor (int c = 0; c < m_cols; c++)\n\t\t{\n\t\t\tp_width += m_colWidth[c];\n\t\t\tif (m_colWidth[c] > 0)\n\t\t\t\tp_width += m_colGap;\n\t\t}\n\t\tp_width -= m_colGap;\t\t//\tremove last\n\t\treturn true;\n\t}",
"public Boolean isSizeFlexEligible() {\n return this.sizeFlexEligible;\n }",
"public boolean hasChildComponent(Widget component) {\n return locationToWidget.containsValue(component);\n }",
"@Override\n public boolean isValid() {\n return getComponent().manager.getSelectedNodes().length == 1;\n }",
"public boolean isMinHeightSet() { return get(\"MinHeight\")!=null; }",
"@Override\n public boolean isInBounds(int row, int col) {\n return row >= 0 && row < grid.length && col >= 0 && col < grid[0].length;\n }",
"boolean hasColumnLayout();",
"public boolean isMinWidthSet() { return get(\"MinWidth\")!=null; }",
"public boolean validateFullBounds() {\n\t\tcomparisonBounds = getUnionOfChildrenBounds(comparisonBounds);\n\t\n\t\tif (!cachedChildBounds.equals(comparisonBounds)) {\n\t\t\tsetPaintInvalid(true);\n\t\t}\n\t\treturn super.validateFullBounds();\t\n\t}",
"public boolean validateFullBounds() {\n\t\tcomparisonBounds = getUnionOfChildrenBounds(comparisonBounds);\n\t\n\t\tif (!cachedChildBounds.equals(comparisonBounds)) {\n\t\t\tsetPaintInvalid(true);\n\t\t}\n\t\treturn super.validateFullBounds();\t\n\t}",
"public Boolean getSizeFlexEligible() {\n return this.sizeFlexEligible;\n }",
"@Override\n\tpublic boolean containsSlots() {\n\t\treturn !labelTemplate.getSlots().isEmpty() || !valueTemplate.getSlots().isEmpty();\n\t}",
"public final boolean isChildrenLayoutNecessary() {\n return isStatusBitsNonZero(CHILDREN_LAYOUT_NECESSARY_BIT);\n }",
"private boolean isRowFull(int row) {\n int numBlocks = 0;\n\n for (int col = 0; col < 10; col++) {\n if (isCellOccupied(row, col)) {\n numBlocks++;\n }\n }\n\n return numBlocks == 10;\n }",
"private boolean isRowValid(int row) {\n String name = (String) ((Vector) getTableModel().getDataVector().get(row)).get(0);\n int count = 0;\n count = ((Vector<Vector>) getTableModel().getDataVector())\n .stream()\n .filter(v -> v.get(0).equals(name))\n .map(i -> 1)\n .reduce(count, Integer::sum);\n if (count != 1) {\n return false;\n }\n return constantsProperty.isValid();\n }",
"private boolean tooSmallforThisPaddock(PaddockCoordinates coor) {\n return ((coor.getX() + coor.getWidth() > this.width)\n || (coor.getY() + coor.getHeight() > this.height));\n }",
"public boolean isValidHorizontal(Square curB, Square preB) {\n \n value = true;\n \n int xdistance = curB.getRow1() - preB.getRow1();\n int ydistance = curB.getCol1() - preB.getCol1();\n int i1;\n \n if ((ydistance < 0) && (xdistance == 0)) {\n for (i1 = curB.getCol1(); i1 < preB.getCol1(); i1 += 1) {\n if (Board.squares[preB.getRow1()][i1].isOccupied()) {\n value = false;\n }\n }\n } else if ((ydistance > 0) && (xdistance == 0)) {\n for (i1 = preB.getCol1(); i1 < curB.getCol1(); i1 += 1) {\n if (Board.squares[preB.getRow1()][i1].isOccupied()) {\n value = false;\n }\n }\n }\n return value;\n }",
"protected boolean isFullyContained(Widget widget) {\r\n // Calling getPreferredBounds forces the bounds to be calculated if it\r\n // has not already been calculated. For example when the Widget was\r\n // just created and therefore has not had a chance to be displayed.\r\n Rectangle area = widget.getClientArea();\r\n\r\n boolean retVal = false;\r\n if (area != null) {\r\n Rectangle sceneArea = widget.convertLocalToScene(area);\r\n\r\n Rectangle localArea = scene.convertSceneToLocal(sceneArea);\r\n Rectangle myArea = scene.getClientArea();\r\n retVal = myArea.contains(localArea);\r\n }\r\n\r\n return retVal;\r\n }",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasWidth();",
"boolean hasWidth();",
"boolean hasWidth();",
"boolean hasDimension();",
"@java.lang.Override\n public boolean hasWidth() {\n return instance.hasWidth();\n }",
"protected boolean isSizeable() {\r\n return sizeable;\r\n }",
"static boolean canAddComponentToContainer(IDisplayModel displayModel,\r\n\t\t\t\tIComponent component, IContainer container, boolean forPalette, StatusHolder holder) {\r\n\t\t\r\n\t\tStatusBuilder builder = new StatusBuilder(ComponentSystemPlugin.getDefault());\r\n\t\tIAttributes attr = (IAttributes) component.getAdapter(IAttributes.class);\r\n\t\tif (attr == null) {\r\n\t\t\tif (holder != null) {\r\n\t\t\t\tString fmt = Messages.getString(\"Utilities.NoAttributesAdapterError\"); //$NON-NLS-1$\r\n\t\t\t\tObject params[] = {component.getId()};\r\n\t\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t\t\tholder.setStatus(builder.createStatus(\"\", null)); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean isLayoutObject = attr.getBooleanAttribute(CommonAttributes.IS_LAYOUT_OBJECT, false);\r\n\t\tboolean isTopLevelOnly = attr.getBooleanAttribute(CommonAttributes.IS_TOP_LEVEL_ONLY_LAYOUT_OBJECT, false);\r\n\t\tboolean isExclusiveChild = attr.getBooleanAttribute(CommonAttributes.IS_EXCLUSIVE_CHILD_LAYOUT_OBJECT, false);\r\n\r\n\t\tIComponentInstance parentInstance = Utilities.getComponentInstance(container.getEObject());\r\n\t\tIAttributes parentAttributes = (IAttributes) parentInstance.getComponent().getAdapter(IAttributes.class);\r\n\t\tboolean parentIsTopLevelContentContainer = \r\n\t\t\tparentAttributes.getBooleanAttribute(CommonAttributes.IS_TOP_LEVEL_CONTENT_CONTAINER, false);\r\n\t\tEObject[] potentialSiblings = getLayoutChildren(parentInstance);\r\n\t\t\r\n\t\tboolean currentExclusiveChildError = false;\r\n\t\tif (!forPalette)\r\n\t\t\tcurrentExclusiveChildError = isLayoutObject && containsExclusiveChild(potentialSiblings);\r\n\t\tif (currentExclusiveChildError && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.CurrentExclusiveChildError\"); //$NON-NLS-1$\r\n\t\t\tIComponentInstance containerInstance = \r\n\t\t\t\t(IComponentInstance) EcoreUtil.getRegisteredAdapter(container.getEObject(), IComponentInstance.class);\r\n\t\t\tObject params[] = {containerInstance.getName()};\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t}\r\n\t\t\r\n\t\tboolean topLevelOnlyError = isTopLevelOnly && !parentIsTopLevelContentContainer;\r\n\t\tif (topLevelOnlyError && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.TopLevelOnlyError\"); //$NON-NLS-1$\r\n\t\t\tObject params[] = {component.getFriendlyName()};\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t}\r\n\t\t\r\n\t\tboolean exclusiveChildSiblingsError = false;\r\n\t\tif (!forPalette)\r\n\t\t\texclusiveChildSiblingsError = isExclusiveChild && (potentialSiblings != null); \r\n\t\tif (exclusiveChildSiblingsError && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.ExclusiveChildSiblingsError\"); //$NON-NLS-1$\r\n\t\t\tObject params[] = {component.getFriendlyName()};\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t}\r\n\t\t\r\n\t\tboolean result = !currentExclusiveChildError &&\r\n\t\t\t\t\t\t\t!topLevelOnlyError &&\r\n\t\t\t\t\t\t\t!exclusiveChildSiblingsError;\r\n\t\t\r\n\t\t\r\n\t\tif (!result && (holder != null)) {\r\n\t\t\tIComponentInstance containerInstance = (IComponentInstance) EcoreUtil\r\n\t\t\t.getRegisteredAdapter(container.getEObject(), IComponentInstance.class);\r\n\t\t\tObject params[] = { component.getFriendlyName(), containerInstance.getName() };\r\n\t\t\tholder.setStatus(builder.createMultiStatus(Messages.getString(\"Utilities.CantAddObjectError\"), params)); //$NON-NLS-1$\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public boolean hasSize() {\n return sizeBuilder_ != null || size_ != null;\n }",
"public boolean hasSize() {\n return sizeBuilder_ != null || size_ != null;\n }",
"public boolean isValid(int row, int col) {\r\n return row < this.arrangement[0].length && col < this.arrangement.length\r\n && row >= 0 && col >= 0;\r\n }",
"private boolean isEmpty(){\n return cellSize == 0;\n }",
"private boolean rowOkay(int row, int column) throws Exception {\n var clue = puzzle.getRowClue(row);\n var filledGroups = searchBoard.getFilledGroups(row, TraversalType.ROW);\n if(filledGroups.size() > clue.size()) {\n return false;\n }\n int availableSquares = puzzle.getColumns()-column-1;\n int tilesRequired;\n if(filledGroups.size() == 0) {\n tilesRequired = clue.size()-1;\n for(int s : clue) {\n tilesRequired += s;\n }\n } else {\n int index = filledGroups.size()-1;\n for(int i = 0; i < index; ++i) {\n if(!filledGroups.get(i).equals(clue.get(i))) {\n return false;\n }\n }\n if(filledGroups.get(index) > clue.get(index)) {\n return false;\n }\n if(searchBoard.getState(row, column) == CellState.EMPTY && !filledGroups.get(index).equals(clue.get(index))) {\n return false;\n }\n tilesRequired = clue.get(index)-filledGroups.get(index);\n tilesRequired += clue.size()-filledGroups.size();\n if(searchBoard.getState(row, column) == CellState.EMPTY) {\n --tilesRequired;\n }\n for(int i = index+1; i < clue.size(); ++i) {\n tilesRequired += clue.get(i);\n }\n }\n return availableSquares >= tilesRequired;\n }",
"boolean hasRow();",
"private boolean isInGrid(int row, int col) {\n return (row >= 1 && row <= size) && (col >= 1 && col <= size);\n }",
"public boolean hasComponent(int line, int column) {\n if (line >= lines || line < 0 || column >= columns || column < 0)\n return false;\n\n return components[line][column] != null;\n }",
"public boolean isGridAvail(Entity subject, int x, int y) {\n \t// Don't bother checking beyond the bounds\n \tif (y < 0 || y >= this.height || x < 0 || x >= this.width) {\n \t\treturn false;\n \t}\n \tArrayList<Entity> entitiesOnGrid = checkGrid(x, y);\n \tfor (Entity e : entitiesOnGrid) {\n \tif (e != null) {\n \t\tif (e instanceof Boulder) {\n \t\treturn (((Boulder) e).isBlocking(subject, x, y) ? false : true);\n \t} else if (e.isBlocking(subject)) { // only returns if the entity is blocking, otherwise check again\n \t\t// in case the next entity on same grid is blocking\n \t\t\treturn false;\n \t\t} \n \t} \n \t}\n \t// looked at all the entities on the grid and none are blocking \n \treturn true;\n }",
"public boolean checkCombo(int pointsInRow) {\t\t\r\n\t\tfor(int i : this.comboScores) {\r\n\t\t\tif(i == pointsInRow) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}",
"public boolean isEntityTooSmall(Entity e)\n {\n double expandScale = 1.0;\n if(e instanceof Player) //if e is player, it will make the icon bigger\n {\n expandScale *= playerIconScale;\n }\n\n double entityMapWidth = scale * expandScale * e.getEntityWidth();\n double entityMapHeight = scale * expandScale * e.getEntityHeight();\n double area = 0.5 * entityMapWidth * entityMapHeight;\n\n return area<MIN_PLAYER_AREA ;\n }",
"private boolean inBounds(int row, int col){\n if (row > -1 && row < 120 && col > -1 && col < 160)\n return true;\n return false;\n }",
"public boolean isFull() {\n\t\treturn super.size() == CAPACITY;\n\t}",
"public boolean hasUlRowQty()\r\n {\r\n return this._has_ulRowQty;\r\n }",
"protected boolean isComponent( Object value, String component ) {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;\n treeInfo nodeInfo = (treeInfo)(node.getUserObject());\n\n if(component==\"Root\") {\n if((nodeInfo.view).equals(xmlhandler.elementCompanyProfile(\"name\"))) {\n return true;\n }\n return false;\n }\n else {\n if((nodeInfo.view).equals(component)) {\n return true;\n }\n return false;\n }\n }",
"public final boolean containsRow(int index) {\n /**\n * When scrolling with mouse wheel, some row are present but will not be\n * lay out. Thus we only consider the row with children as really\n * available.\n */\n for (Object obj : getFlow().getCells()) {\n if (((TableRow2) obj).getIndex() == index && !((TableRow2) obj).getChildrenUnmodifiable().isEmpty())\n return true;\n }\n return false;\n }",
"private boolean boardIsFull() {\n int numberOfFieldsOnBoard = boardSize * boardSize;\n return (numberOfFieldsOnBoard == this.numberOfOccupiedFields);\n }",
"protected boolean isOccupied(int row, int column){\n return (!ships[row][column].getShipType().equals(\"empty\"));\n }",
"@Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M le decimos que no seran editables los componetnes\r\n return false;\r\n }",
"private boolean inBounds(int deltaRow, int deltaCol) {\n boolean row = false;\n boolean col = false;\n\n if (lastPlacedRow + deltaRow < NUM_ROWS && lastPlacedRow + deltaRow >= 0) {\n row = true;\n }\n if (lastPlacedCol + deltaCol < NUM_COLS && lastPlacedCol + deltaCol >= 0) {\n col = true;\n }\n\n return row && col;\n }",
"public static boolean shouldRenderChildren(UIComponent component) {\n for (int i = 0; i < component.getChildCount(); i++) {\n if (component.getChildren().get(i).isRendered()) {\n return true;\n }\n }\n\n return false;\n }",
"public boolean isFull(int row, int col) {\n validate(row, col);\n return isOpen(row, col) &&\n (gridGraphVirtualTop.find(virtualTopGridIndex) == gridGraphVirtualTop.find(convertRowColToIndex(row, col)));\n }",
"public boolean isTotallyOnGrid() {\n\t\t\tfor(int i=0; i<4; i++) {\n\t\t\t\tif(position.y + i >= 0)\n\t\t\t\t\treturn true; //everything from here down is on grid\n\t\t\t\t// this row is above grid so look for non-empty squares\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tif(squares[i][j])\n\t\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tSystem.err.println(\"TetrisPiece.isTotallyOnGrid internal error\");\n\t\t\treturn false;\n\t\t}",
"public boolean hasCompositeStructure() {\n return (getStructureType() == EquipmentType.T_STRUCTURE_COMPOSITE);\n }",
"static boolean requiresContainmentQuery(IComponent component, IContainer container, StatusHolder holder) {\r\n\t\tStatusBuilder builder = new StatusBuilder(ComponentSystemPlugin.getDefault());\r\n\t\tIAttributes attr = (IAttributes) component.getAdapter(IAttributes.class);\r\n\t\tif (attr == null) {\r\n\t\t\tif (holder != null) {\r\n\t\t\t\tString fmt = Messages.getString(\"Utilities.NoAttributesAdapterError\"); //$NON-NLS-1$\r\n\t\t\t\tObject params[] = {component.getId()};\r\n\t\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t\t\tholder.setStatus(builder.createStatus(\"\", null)); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean isNeverAddComponent = attr.getBooleanAttribute(CommonAttributes.NEVER_ADD_COMPONENT, false);\r\n\t\t\r\n\t\tif (isNeverAddComponent && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.NeverAddError\"); //$NON-NLS-1$\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, null);\r\n\t\t}\r\n\r\n\t\tif (isNeverAddComponent && (holder != null)) {\r\n\t\t\tIComponentInstance containerInstance = (IComponentInstance) EcoreUtil\r\n\t\t\t.getRegisteredAdapter(container.getEObject(), IComponentInstance.class);\r\n\t\t\tObject params[] = { component.getFriendlyName(), containerInstance.getName() };\r\n\t\t\tholder.setStatus(builder.createMultiStatus(Messages.getString(\"Utilities.CantAddObjectError\"), params)); //$NON-NLS-1$\r\n\t\t}\r\n\t\treturn isNeverAddComponent;\r\n\t}",
"public boolean hasComponent(@Entity int entity) {\n return nHasComponent(mNativeObject, entity);\n }",
"private boolean cell_in_bounds(int row, int col) {\n return row >= 0\n && row < rowsCount\n && col >= 0\n && col < colsCount;\n }",
"public boolean isLayoutNeeded() {\n return this.mLayoutNeeded;\n }",
"private boolean ifTooEmpty() {\n if (items.length <= 8) {\n return false;\n }\n float efficiency = (float) size / (float) items.length;\n return efficiency < 0.25;\n }",
"@Override\n\tpublic boolean outOfBounds() {\n\t\treturn this.getY() < 0;\n\t}",
"@Override\r\n\t\t\tpublic boolean isFull() {\r\n\t\t\t\tfor(int row = 0; row +1< 6; row++) {\r\n\t\t\t\t\tfor(int col = 0; col < 7; col++) {\r\n\t\t\t\t\t\tString brick = board[row][col].getText().trim();\r\n\t\t\t\t\t\tif(brick.isEmpty()){\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}",
"public boolean minSize(){\n\t\tboolean result; \n\t\tif(keys.size() < (MAXKEYS/2) -1){\n\t\t\tresult = true;\n\t\t}\n\t\telse{ \n\t\t\tresult = false;\n\t\t}\n\t\treturn result;\n\t}",
"private boolean isValid(int row, int col) {\n if (row < 1 || row > this.side || col < 1 || col > this.side)\n return false;\n return true;\n }",
"boolean hasTotalSize();",
"public void checkComponent() {\r\n Component component = ViewToEntityConverter.view2Model(view);\r\n validate(component);\r\n }",
"boolean hasInputConstraints();",
"public boolean isValidateRoot() {\n\tComponent parent = getParent();\n\tif (parent instanceof JViewport) {\n\t return false;\n\t}\n return true;\n }",
"public boolean isValidSetup() {\n\t\tif(!rowCheck())\n\t\t\treturn false;\n\t\tif(!columnCheck())\n\t\t\treturn false;\n\t\tif(!subGridCheck())\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"private boolean inBounds(int row, int col)\n {\n return ((row >= 0) && (row < NUM_ROWS) &&\n (col >= 0) && (col < NUM_COLS)); \n }",
"public boolean getCapacity() {\n\t\treturn true;\n\t\t// get information about the room and determine if we are above capacity. \n\t}",
"@java.lang.Override\n public boolean hasSize() {\n return size_ != null;\n }",
"@java.lang.Override\n public boolean hasSize() {\n return size_ != null;\n }",
"boolean isIncludeBounds();",
"@java.lang.Override\n public boolean hasRect() {\n return instance.hasRect();\n }",
"private static int isValidSubmarine(@NotNull HashSet<Index> connectedComponent) {\n // the component should contain at least two elements (indices)\n if (connectedComponent.size() < 2) {\n return 0;\n }\n // find the edges of the component to check if it is a rectangle\n // Credit to stackoverflow\n int rightEdge = Collections.max(connectedComponent, Comparator.comparingInt(Index::getColumn)).getColumn();\n int leftEdge = Collections.min(connectedComponent, Comparator.comparingInt(Index::getColumn)).getColumn();\n int bottomEdge = Collections.max(connectedComponent, Comparator.comparingInt(Index::getRow)).getRow();\n int topEdge = Collections.min(connectedComponent, Comparator.comparingInt(Index::getRow)).getRow();\n\n // calculate the number of expected element of the rectangle\n int numOfExpectedElements = (rightEdge - leftEdge + 1) * (bottomEdge - topEdge + 1);\n\n // If the expected number of element equals to number of the element in the component (size)\n // so its a valid submarine\n if (connectedComponent.size() == numOfExpectedElements) {\n return 1;\n }\n return 0;\n }",
"protected boolean isHorizontal() {\n\t\treturn true;\n\t}",
"public boolean isFull(int row, int col) {\n return false;\n }",
"boolean hasCapacity();",
"public boolean isInside(Square cell) {\n\t\treturn (cell.getRow()>=0 && cell.getRow()<getRows() && cell.getColumn()>=0 && cell.getColumn()<getColumns());\n\t}",
"public boolean canBecombo(){\n \treturn super.getPrice() <4;\n }",
"private void validate(int row, int col) {\n if (!isInGrid(row, col)) {\n throw new IllegalArgumentException(\"Row : \" + row + \" Col : \" + col + \" is not in percolation(\" + size + \")\");\n }\n }",
"public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean hasComponent(Class<? extends Component> componentType);",
"private boolean isParentContent(List<String> row) {\n\t\tif(!row.get(4).isEmpty()&&row.get(5).isEmpty()&&!row.get(6).isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasOrderSize();",
"protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}",
"boolean hasHeight();",
"boolean hasHeight();",
"boolean hasHeight();",
"public abstract boolean checkIfCellHasValue(int row, int col);",
"@Test\r\n\tpublic void testCheckRows() {\n\t\tGrid g = new Grid();\r\n\t\t// full bottom row\r\n\t\tfor (int col = 0; col < Grid.WIDTH; col++) {\r\n\t\t\tg.set(Grid.HEIGHT - 1, col, Color.GREEN);\r\n\t\t}\r\n\t\t// add two squares above the bottom row\r\n\t\tg.set(Grid.HEIGHT - 2, 3, Color.RED);\r\n\t\tg.set(Grid.HEIGHT - 3, 3, Color.RED);\r\n\t\t// remove the full row\r\n\t\tg.checkRows();\r\n\t\t// check that the grid has been updated correctly\r\n\t\tfor (int row = 0; row < Grid.HEIGHT; row++) {\r\n\t\t\tfor (int col = 0; col < Grid.WIDTH; col++) {\r\n\t\t\t\t// check the square at (row,col)\r\n\t\t\t\t// must have: (18,3) and (19,3) set\r\n\t\t\t\t// and all of the others not set\r\n\t\t\t\tif ((row == 18 || row == 19) && col == 3) {\r\n\t\t\t\t\tassertTrue(g.isSet(row, col));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tassertFalse(g.isSet(row, col));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean setSize(Size size, boolean force) {\n// if (!force) {\n// Entity intersectsWith = location.getWorld().intersects(this, Util.getRectangle(getLocation(), size));\n//\n// if (intersectsWith != null) {\n// boolean left = intersectsWith.getLocation().getX() + intersectsWith.getSize().getWidth() <= getLocation().getX();\n// boolean right = intersectsWith.getLocation().getX() <= getLocation().getX() + size.getWidth();\n// boolean top = intersectsWith.getLocation().getY() <= getLocation().getY() + size.getHeight() && intersectsWith.getLocation().getY() > getLocation().getY();\n//\n//// if (top && !left && !right)\n//// return false;\n//\n// Location moveTo = null;\n//\n// if (left)\n// moveTo = new Location(getWorld(), intersectsWith.getLocation().getX() + intersectsWith.getSize().getWidth() + size.getWidth(), getLocation().getY());\n// if (right)\n// moveTo = new Location(getWorld(), intersectsWith.getLocation().getX() - size.getWidth() - 1, getLocation().getY());\n// if (top) {\n// this.size.setHeight(intersectsWith.getLocation().getY() - this.location.getY());\n// System.out.println(this.size.getHeight());\n//// return false;\n// }\n//\n// if (moveTo != null) {\n// Entity intersects = location.getWorld().intersects(this, Util.getRectangle(moveTo, size));\n//\n// if (intersects == null && this.location.asVector().distance(moveTo.asVector()) < 15)\n// this.location = moveTo;\n// else return false;\n// }\n// }\n// }\n\n if (interactingWithX != null || interactingWithY != null) {\n boolean left = interactingWithX != null && interactingWithX.getLocation().getX() + interactingWithX.size.width <= getLocation().getX();\n boolean right = interactingWithX != null && interactingWithX.getLocation().getX() <= getLocation().getX() + size.width;\n boolean top = interactingWithY != null && (interactingWithY.getLocation().getY() <= getLocation().getY() + size.height && interactingWithY.getLocation().getY() > getLocation().getY());\n\n// if (top && !left && !right)\n// return false;\n\n Location moveTo = null;\n\n if (left)\n moveTo = new Location(getWorld(), interactingWithX.getLocation().getX() + interactingWithX.size.width + size.width, getLocation().getY());\n if (right)\n moveTo = new Location(getWorld(), interactingWithX.getLocation().getX() - size.width - 1, getLocation().getY());\n if (top) {\n this.size.height = interactingWithY.getLocation().getY() - this.location.getY();\n System.out.println(this.size.height);\n// return false;\n }\n\n if (moveTo != null) {\n Entity intersects = location.getWorld().intersects(this, Util.getRectangle(moveTo, size));\n\n if (intersects == null && this.location.asVector().distance(moveTo.asVector()) < 15)\n this.location = moveTo;\n else return false;\n }\n }\n\n this.size = size;\n return true;\n }",
"public boolean needUnits(){\n\t\tif(units.size() >= maxUnits){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean\n\tvalidComponent( int i ) \n\t{\n\t\treturn( i >= 0 && i < 3 );\n\t}",
"public abstract boolean isOneCell();",
"public boolean isSetSwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SWCELL$20) != 0;\n }\n }"
] | [
"0.68351734",
"0.6379113",
"0.61516184",
"0.6089391",
"0.6050621",
"0.5925137",
"0.59206754",
"0.59071183",
"0.57500035",
"0.574497",
"0.572121",
"0.5716107",
"0.56960523",
"0.5681437",
"0.5681437",
"0.5642308",
"0.5626735",
"0.5622017",
"0.56104",
"0.5600077",
"0.5504543",
"0.5485026",
"0.5482469",
"0.54792905",
"0.54792905",
"0.54792905",
"0.54792905",
"0.5471852",
"0.5471852",
"0.5471852",
"0.54513234",
"0.54311895",
"0.5429912",
"0.541371",
"0.54090995",
"0.54090995",
"0.5396683",
"0.5389901",
"0.5376879",
"0.5355037",
"0.5349685",
"0.53214467",
"0.531693",
"0.5312301",
"0.53116006",
"0.53042364",
"0.53020495",
"0.5288511",
"0.52867955",
"0.5280858",
"0.5279245",
"0.5275206",
"0.52706784",
"0.5270001",
"0.5256082",
"0.52559876",
"0.5251671",
"0.524714",
"0.52467555",
"0.52369577",
"0.5233453",
"0.5229136",
"0.52218676",
"0.5203014",
"0.5179216",
"0.5171877",
"0.517136",
"0.5165165",
"0.5156657",
"0.51544887",
"0.5149281",
"0.51473117",
"0.51389974",
"0.5137075",
"0.51314145",
"0.51314145",
"0.51304615",
"0.5124365",
"0.5120681",
"0.5119544",
"0.51162314",
"0.51158243",
"0.51096696",
"0.5105922",
"0.51049644",
"0.5098961",
"0.5095583",
"0.5093877",
"0.5093181",
"0.5091996",
"0.5090955",
"0.5090955",
"0.5090955",
"0.5090828",
"0.50889343",
"0.50831836",
"0.5072488",
"0.50697756",
"0.5062957",
"0.50550663"
] | 0.62754625 | 2 |
the action listener that deals with the selected popup menu type | @Override
public void actionPerformed(ActionEvent e) {
boolean colum = false;
String actionCommand = e.getActionCommand();
if (actionCommand.equals("PERCENTUAL")) {
/** percentual size handling - reads value from User with a Input dialog, entered value is divided by 100 to get the right percentual size */
double sizeValue = getValueFromUser(MEASUREMENT_DESCRIPTIONS.MESSAGE_INPUT_DIALOG_PERCENTUAL, false);
//FIX NUCLEUSINT-281 if invalid value, nothing is done
if (sizeValue != -1) {
sizeValue = sizeValue / 100.0;
tableLayoutUtil.modifyTableLayoutSizes(sizeValue, colum, cellForEditing, true);
}
} else if (actionCommand.equals("ABSOLUTE")) {
/** absolute size, reading the value from the user */
double sizeValue = getValueFromUser(MEASUREMENT_DESCRIPTIONS.MESSAGE_INPUT_DIALOG_ABSOLUTE, true);
//FIX NUCLEUSINT-281 if invalid value, nothing is done
if (sizeValue != -1)
tableLayoutUtil.modifyTableLayoutSizes(sizeValue, colum, cellForEditing, true);
} else if (actionCommand.equals("MINIMUM")) {
/** sets minimum size, is only active if a component was found in this row */
tableLayoutUtil.modifyTableLayoutSizes(TableLayout.MINIMUM, colum, cellForEditing, true);
} else if (actionCommand.equals("PREFERRED")) {
/** sets preferred size, is only active if a component was found in this row */
tableLayoutUtil.modifyTableLayoutSizes(TableLayout.PREFERRED, colum, cellForEditing, true);
} else if (actionCommand.equals("FILL")) {
/** sets the relative size fill, uses all the rest space that is not filled by absolute size */
tableLayoutUtil.modifyTableLayoutSizes(TableLayout.FILL, colum, cellForEditing, true);
} else if (actionCommand.equals("ADDBOTTOM")) {
/** adds a new row below the active row - uses a default value for size. commented out getting the value from the user, other way is quicker */
double sizeValue = InterfaceGuidelines.DEFAULT_ROW_HEIGHT;
// double sizeValue = getValueFromUser(CHANGE_SIZE_ROW_POPUP.MESSAGE_INPUT_DIALOG_ENTER_HEIGHT, true);
cellForEditing.setCellHeight(sizeValue);
/** adjustment so adding a row will be under the selected cell */
if (tableLayoutUtil.getNumRows() > 0)
cellForEditing.setCellY(cellForEditing.getCellY() + 1);
tableLayoutUtil.addRow(cellForEditing);
}else if (actionCommand.equals("ADDMULTIPLEBOTTOM")) {
//NUCLEUSINT-966
String count = JOptionPane.showInputDialog(CHANGE_SIZE_ROW_POPUP.MESSAGE_INPUT_DIALOG_AMOUNT_ROWS, 2);
if (count != null) {
try {
Integer amount = Integer.parseInt(count);
for( int i = 0; i < amount; i++) {
actionPerformed(new ActionEvent(e.getSource(), e.getID(), "ADDBOTTOM"));
}
} catch (NumberFormatException e1) {
//nothing to do
}
}
} else if (actionCommand.equals("ADDTOP")) {
/** adds a new row over the active row - uses a default value for size. commented out getting the value from the user, other way is quicker */
double sizeValue = InterfaceGuidelines.DEFAULT_ROW_HEIGHT;
// double sizeValue = getValueFromUser(CHANGE_SIZE_ROW_POPUP.MESSAGE_INPUT_DIALOG_ENTER_HEIGHT, true);
cellForEditing.setCellHeight(sizeValue);
tableLayoutUtil.addRow(cellForEditing);
} else if (actionCommand.equals("ADDMULTIPLETOP")) {
//NUCLEUSINT-966
String count = JOptionPane.showInputDialog(
CHANGE_SIZE_ROW_POPUP.MESSAGE_INPUT_DIALOG_AMOUNT_ROWS, 2);
if(count != null) {
try {
Integer amount = Integer.parseInt(count);
for(int i = 0; i < amount; i++) {
actionPerformed(new ActionEvent(e.getSource(), e.getID(), "ADDTOP"));
}
}
catch(NumberFormatException e1) {
// nothing to do
LOG.debug("actionPerformed: " + e1);
}
}
} else if (actionCommand.equals("DELETE")) {
/** delete the active row - is only possible if the row does not contain any component */
tableLayoutUtil.delRow(cellForEditing);
} else if (actionCommand.equals("ADDBORDER")) {
/** "shortcut" to add a new border below, used for creating standardborders */
cellForEditing.setCellHeight(InterfaceGuidelines.MARGIN_BOTTOM);
/** adjustment so adding a row will be under the selected cell */
if (tableLayoutUtil.getNumRows() > 0)
cellForEditing.setCellY(cellForEditing.getCellY() + 1);
tableLayoutUtil.addRow(cellForEditing);
} else if (actionCommand.equals("ADDROWBORDER")) {
//NUCLEUSINT-966
/** "shortcut" to add a new border below, used for creating standardborders */
cellForEditing.setCellHeight(InterfaceGuidelines.MARGIN_BETWEEN);
/** adjustment so adding a row will be under the selected cell */
if (tableLayoutUtil.getNumRows() > 0)
cellForEditing.setCellY(cellForEditing.getCellY() + 1);
tableLayoutUtil.addRow(cellForEditing);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}",
"@Override\n\t\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\t\tcase R.id.popup_reInfo:\n\t\t\t\t\t\t\tmainAct.ResetInfo(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_upload:\n\t\t\t\t\t\t\tmainAct.addImage(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_del:\n\t\t\t\t\t\t\tmainAct.delete(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tguiManager.getGameController().processMenuInput(MENU_ITEM.MNU_LEVEL_CHOOSE);\n\t\t\t\t}",
"public void actionPerformed(ActionEvent e) {\r\n\r\n JMenuItem menuItem = (JMenuItem) e.getSource();\r\n String itemText = menuItem.getName();\r\n\r\n if (itemText.equalsIgnoreCase(\"save\")) {\r\n\r\n } else if (itemText.equalsIgnoreCase(\"print\")) {\r\n\r\n } else if (itemText.equalsIgnoreCase(\"close\")) {\r\n\r\n this.parentWindow.setVisible(false);\r\n this.parentWindow.dispose();\r\n\r\n }\r\n }",
"void onMenuItemClicked();",
"@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(mContext, holder.tv_option_menu);\n //inflating menu from xml resource\n popup.inflate(R.menu.menu_options);\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu1:\n shareStories(headlinesList.get(position).getUrl());\n return true;\n case R.id.menu2:\n //handle menu2 click\n db.insertNote(headlinesList.get(position));\n return true;\n default:\n return false;\n }\n }\n });\n //displaying the popup\n popup.show();\n\n }",
"@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(context, holder.threeDots);\n popup.inflate(R.menu.popup_menu_options_edit_flashcard);\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.popupDelete:\n\n flashcardActivity.handleDeleteClick(p);\n break;\n\n case R.id.popupEdit:\n\n flashcardActivity.handleRenameClick(p);\n break;\n\n }\n return false;\n }\n });\n popup.show();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tPopupMenu popup = new PopupMenu(context, v);\n\t\t\t\tMenuInflater inflater = popup.getMenuInflater();\n\t\t\t\tMenu menu = popup.getMenu();\n\n\t\t\t\tinflater.inflate(R.menu.popupmenu, menu);\n\t\t\t\t// popup.inflate(R.menu.popupmenutestmenu);\n\t\t\t\tpopup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\t\tcase R.id.popup_reInfo:\n\t\t\t\t\t\t\tmainAct.ResetInfo(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_upload:\n\t\t\t\t\t\t\tmainAct.addImage(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_del:\n\t\t\t\t\t\t\tmainAct.delete(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopup.show();\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onDialogMenuPressed() {\n\r\n\t\t\t\t}",
"@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(context, holder.textViewOptions);\n //inflating menu from xml resource\n popup.inflate(R.menu.latest_menu);\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_report:\n //handle menu1 click\n Toast.makeText(context, \"report success\", Toast.LENGTH_SHORT).show();\n return true;\n\n case R.id.action_comment:\n //handle menu1 click\n Toast.makeText(context, \"\", Toast.LENGTH_SHORT).show();\n\n return true;\n\n\n default:\n return false;\n }\n }\n });\n //displaying the popup\n popup.show();\n\n }",
"@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(mCtx, holder.buttonViewOption);\n //inflating menu from xml resource\n popup.inflate(R.menu.option_menu_for_blood_post_notification);\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu1:\n //handle menu1 click\n break;\n case R.id.menu2:\n //handle menu2 click\n break;\n }\n return false;\n }\n });\n //displaying the popup\n popup.show();\n\n }",
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"@SuppressLint(\"RestrictedApi\")\n private void onGameSettingClicked() {\n PopupMenu popup = new PopupMenu(this, this.mGameSetting);\n popup.getMenuInflater().inflate(R.menu.game_setting_menu, popup.getMenu());\n\n popup.setOnMenuItemClickListener(item -> {\n switch (item.getItemId()){\n case R.id.game_setting_sync:\n Toast.makeText(this, \"Game sync successfully \", Toast.LENGTH_SHORT).show();\n break;\n case R.id.game_setting_add_players:\n Intent intent = new Intent(this, Players.class);\n startActivity(intent);\n break;\n case R.id.game_signIn:\n Toast.makeText(this, \"Sign in successfully ! \", Toast.LENGTH_SHORT).show();\n break;\n }\n\n return true;\n });\n\n MenuPopupHelper menuHelper = new MenuPopupHelper(this, (MenuBuilder) popup.getMenu(), this.mGameSetting);\n menuHelper.setForceShowIcon(true);\n menuHelper.show();\n }",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tif (evt.getSource() == jMenuItem7) {\n\t\t\t\t\tSystem.out.println(\"Selected: \"\n\t\t\t\t+ evt.getActionCommand());\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t\t.getComponents()[0]).setMode(2);\n\t\t\t\t}\n\t\t\t}",
"public void menuClicked(MenuItem menuItemSelected);",
"abstract public boolean cabOnMenuItemClicked(ActionMode mode, MenuItem item);",
"@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n return true;\n }",
"@Override\n public void onClick(View v) {\n popup.setOnMenuItemClickListener (new PopupMenu.OnMenuItemClickListener () {\n public boolean onMenuItemClick(MenuItem item) {\n GlobalVariables.indexCityChosen = GlobalVariables.popUpIDToCityIndex.get (item.getItemId ());\n GlobalVariables.CURRENT_CITY_NAME = item.getTitle ().toString ();\n if (GlobalVariables.CITY_GPS != null &&\n item.getTitle ().equals (GlobalVariables.CITY_GPS) &&\n GPSMethods.getCityIndexFromName (GlobalVariables.CITY_GPS) >= 0) {\n currentCityButton.setText (item.getTitle () + \"(GPS)\");\n } else {\n currentCityButton.setText (item.getTitle ());\n }\n ArrayList<EventInfo> tempEventsList =\n FilterMethods.filterByCityAndFilterName (\n GlobalVariables.namesCity[GlobalVariables.indexCityChosen],\n GlobalVariables.CURRENT_FILTER_NAME,\n GlobalVariables.CURRENT_SUB_FILTER,\n GlobalVariables.CURRENT_DATE_FILTER,\n GlobalVariables.CURRENT_PRICE_FILTER,\n GlobalVariables.ALL_EVENTS_DATA);\n filtered_events_data.clear ();\n filtered_events_data.addAll (tempEventsList);\n eventsListAdapter.notifyDataSetChanged ();\n GlobalVariables.USER_CHOSEN_CITY_MANUALLY = true;\n return true;\n }\n });\n popup.show ();//showing popup menu\n }",
"void clickFmFromMenu();",
"public void menuItemClicked( Menu2DEvent e );",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tif (evt.getSource() == jMenuItem6) {\n\t\t\t\t\tSystem.out.println(\"Selected: \"\n\t\t\t\t+ evt.getActionCommand());\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t\t.getComponents()[0]).setMode(1);\n\t\t\t\t}\n\t\t\t}",
"private void onMenuClickCNF() {\r\n\t\tswitchMainPanelTo(CARDTYPE_CREATENEWFILE);\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttxtCNFName.grabFocus();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings2) {\r\n\r\n //\"po co kalibracja?\"\r\n Intent intentKalInfo = new Intent(Main2Activity.this,PopUp2.class);\r\n startActivity(intentKalInfo);\r\n\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"private void handleMouseEvent(MouseEvent me) {\n JTree tree = viewer.getCurrentTree();\n \n if (tree.getSelectionCount() == 0) {\n return;\n } else if (tree.getSelectionCount() > 1) {\n // Multiple selections.\n multipleSelMenu.show(me.getComponent(), me.getX(), me.getY());\n } else {\n // Single selection, detects the node type and shows\n // the corresponding popup menu.\n Object node = viewer.getSelectedNode();\n \n if (node instanceof Project) {\n projectMenu.show(me.getComponent(), me.getX(), me.getY());\n } else if (node instanceof ProjectDirectory) {\n dirMenu.show(me.getComponent(), me.getX(), me.getY());\n } else if (node instanceof ProjectFile) {\n fileMenu.show(me.getComponent(), me.getX(), me.getY());\n }\n }\n }",
"@Override\n public boolean onPrepareActionMode(final ActionMode mode, Menu menu) {\n isEnable = true;\n //create method\n clickItem(holder);\n //set observer on to get text method\n mainViewModel.getSelectedLiveData().observe((LifecycleOwner) activity,\n new Observer<String>() {\n @Override\n public void onChanged(String s) {\n //when text change\n //set text on action mode title\n mode.setTitle(String.format(\"%s %s %s\",context.getResources()\n .getString(R.string.selected),s ,\n context.getResources().getString(R.string.item) ));\n }\n });\n return true;\n }",
"@Override\n public boolean onPrepareActionMode(ActionMode mode, Menu menu) {\n// if (mSelectedItem==1) {\n// MenuInflater inflater = mode.getMenuInflater();\n// inflater.inflate(R.menu.geo, menu);\n// }\n return true; // Return false if nothing is done\n }",
"protected abstract PopupMenuHelper createActionMenuHelper();",
"public void onSourceRightClick(DefaultPopupManager manager) {\r\n }",
"@Override\n\t\t\tpublic void onClickedPopup(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n //Implement action listener on the menu buttons\n int itemId = item.getItemId();\n\n //Choose the appropriate action menu based on the button selected\n switch (itemId) {\n case R.id.action_open_save_list:\n openSaveList();\n break;\n case R.id.action_settings:\n openAppSettings();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public void onClick(View v) {\n PopupMenu popup = new PopupMenu(MainActivity.this, frameLayoutCategories);\n\n for (int i = 0; i < categories.length; i++){\n popup.getMenu().add(0, i, 0, categories[i]);\n\n }\n\n //Inflating the Popup using xml file\n popup.getMenuInflater().inflate(R.menu.poupup_menu_categories, popup.getMenu());\n\n //registering popup with OnMenuItemClickListener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n public boolean onMenuItemClick(MenuItem item) {\n ((TextView)findViewById(R.id.textViewCategory)).setText(\"Category: \" + item.getTitle());\n item.setChecked(true);\n currentCategoryID = item.getItemId();\n multipleChoiceQuestion (categories[currentCategoryID], jeopardyMode);\n\n return true;\n }\n });\n\n\n\n popup.show();//showing popup menu\n }",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tpopup.show(mainpanel , 660, 40);\r\n\t\t\t}",
"public void onSelectFunction$mnu(Event event) {\r\n\r\n\t\tOperacion operacion = (Operacion) event.getData();\r\n\t\t\r\n\t\t\r\n\t\tif (operacion != null) {\r\n\t\t\t\r\n//\t\t\tObject actual = page.getVariable(\"actual\");\r\n\t\t\t\r\n\t\t\tObject actual = getPage().getAttribute(\"actual\");\r\n\t\t\t\r\n\t\t\tGenericList list = (GenericList)self;\r\n\t\t\t\r\n\t\t\tif (actual != null) {\r\n\t\t\t\t\r\n\t\t\t\talert(list.getDialog());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t}",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}",
"@Override\n public void onClick(final View view) {\n PopupMenu popupMenu = new PopupMenu(getBaseContext(), view);\n popupMenu.getMenuInflater().inflate(R.menu.popup_menu,popupMenu.getMenu());\n popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem menuItem) {\n Snackbar.make(view, menuItem.getTitle()+\" is selected\",Snackbar.LENGTH_SHORT).show();\n return true;\n }\n });\n popupMenu.show();\n }",
"@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(view.getContext(), holder.mOptionsView);\n //inflating menu from xml resource\n popup.inflate(R.menu.character_listitem);\n\n //if the Character is not part of a Game, hide the option\n if(TextUtils.isEmpty(holder.mItem.getGame())) {\n popup.getMenu().findItem(R.id.action_remove_from_game).setVisible(false);\n }\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_open:\n openCharacterView(holder.mView.getContext(), holder.mItem);\n break;\n case R.id.action_rename:\n renameCharacter(holder.mView.getContext(), holder.mItem);\n break;\n case R.id.action_duplicate:\n Toast.makeText(holder.mView.getContext(), \"Function not implemented yet.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.action_remove_from_game:\n removeCharacterFromGame(holder.mView.getContext(), holder.mItem);\n break;\n case R.id.action_delete:\n deleteCharacter(holder.mView.getContext(), holder.mItem);\n break;\n }\n return false;\n }\n });\n //displaying the popup\n popup.show();\n\n }",
"@Override\n public void actionPerformed(ActionEvent event) {\n String buttonName = ((JMenuItem) event.getSource()).getText();\n if (buttonName.equals(\"About\")) {\n aboutHandler();\n } else if (buttonName.equals(\"New game/restart\")) {\n restartHandler();\n } else if (buttonName.equals(\"Toggle game log\")) {\n toggleGameLogHandler();\n } else if (buttonName.equals(\"Exit\")) {\n exitHandler();\n } else {\n toggleGraveyardHandler();\n }\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\r\n\t\tObject source = e.getSource();\r\n\t\tif (source == easy) {\r\n\t\t\tnavi.changeMode(NewApp.easy);\r\n\t\t} else if (source == medium) {\r\n\t\t\tnavi.changeMode(NewApp.medium);\r\n\t\t} else if (source == hard) {\r\n\t\t\tnavi.changeMode(NewApp.hard);\r\n\t\t} else if (source == quit) {\r\n\t\t\tSystem.exit(0);\r\n\t\t} else if (source == settings) {\r\n\t\t\tnavi.changeMode(NewApp.settings);\r\n\t\t} else if (source == help) {\r\n\t\t\tnavi.changeMode(NewApp.help);\r\n\t\t} else if (source == funky){\r\n\t\t\tnavi.changeMode(NewApp.funky);\r\n\t\t}\r\n\t}",
"@Override\n public void onClick(View v) {\n popupMenu.showLocation(R.id.iv_menu);\n popupMenu.setOnItemClickListener(new com.view.PopupMenu.OnItemClickListener() {\n\n @Override\n public void onClick(PopupMenu.MENUITEM item, String str) {\n if (item == PopupMenu.MENUITEM.ITEM1) {\n readerIOHandler.removeCallbacks(readerIORunnable);\n Intent aboutIntent = new Intent(MainActivity.this, AboutInfoActivity.class);\n if (aboutIntent != null) startActivity(aboutIntent);\n } else if (item ==PopupMenu.MENUITEM.ITEM2) {\n Log.e(\"debug\", \"biiiiiiiiiiiiiiiiiiiiiiiiiiiin\");\n if (str.equals(\"English\")) {\n PreferenceUtil.commitString(\"language\", \"en\");\n Log.e(\"debug\", \"biiiiiiiiiiiiiiiiiiiiiiiiiiiin + english\");\n } else if (str.equals(\"中文\")) {\n PreferenceUtil.commitString(\"language\", \"zh\");\n Log.e(\"debug\", \"中文\");\n }\n Intent intent = new Intent(MainActivity.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n MainActivity.this.startActivity(intent);\n\n }\n }\n });\n }",
"public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }",
"@Override\n\t\tpublic void popupMenuWillBecomeVisible(PopupMenuEvent e) {\n\n\t\t}",
"public void handleSmartPopup(int type) {\n if(type == 2 && itemFocused != UISettings.RENAMETEXTBOX)\n return;\n iCustomPopup.handleSmartPopup(type);\n }",
"@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(Settings.this, view);\n //Inflating the Popup using xml file\n popup.getMenuInflater().inflate(R.menu.langmenu, popup.getMenu());\n\n //registering popup with OnMenuItemClickListener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n public boolean onMenuItemClick(MenuItem item) {\n if (item.getItemId()==R.id.one)\n {\n Constants.ChangeLang( \"ar\", Settings.this);\n Intent intent = new Intent(getApplicationContext(), SplachScreen.class);\n //In API level 11 or greater, use FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_NEW_TASK flag on Intent to clear all the activity stack.\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }else if (item.getItemId()==R.id.two)\n {\n Constants.ChangeLang( \"en\", Settings.this);\n Intent intent = new Intent(getApplicationContext(), SplachScreen.class);\n //In API level 11 or greater, use FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_NEW_TASK flag on Intent to clear all the activity stack.\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }\n return true;\n }\n });\n\n popup.show();//showing popup menu\n }",
"public void actionPerformed(ActionEvent e)\n\t{\n\t\tJMenuItem mi = (JMenuItem) e.getSource();\n\t\tif (mi.equals(itemNew))\n\t\t\tnewProject();\n\t\tif (mi.equals(itemOpen))\n\t\t\topenProject();\n\t\tif (mi.equals(itemClose))\n\t\t\tcloseFrame();\n\t}",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tsuper.mouseClicked(e);\r\n\t\t\tif(e.isPopupTrigger()){\r\n\t\t\t\tdoClick(e);\r\n\t\t\t\tjPopupMenu.show((Component)e.getSource(), e.getX(), e.getY());\r\n\t\t\t}\r\n\t\t}",
"@Override\r\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\r\n // TODO Auto-generated method stub\r\n return false;\r\n }",
"private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_settings) {\n return true;\n }\n if (R.id.action_add == id && mSelectedItem == 1) {\n return mFencesFragment.onOptionsItemSelected(item);\n } else if (R.id.action_add == id && mSelectedItem == 2) {\n return mTargetsFragment.onOptionsItemSelected(item);\n }\n return super.onOptionsItemSelected(item);\n }",
"public void menuSelected (MenuEvent event) {\n TreeEditorPanel panel = (TreeEditorPanel)SwingUtilities.getAncestorOfClass(\n TreeEditorPanel.class, getFocusOwner());\n if (panel != null) {\n edit.getItem(CUT_INDEX).setAction(panel.getCutAction());\n edit.getItem(CUT_INDEX + 1).setAction(panel.getCopyAction());\n edit.getItem(CUT_INDEX + 2).setAction(panel.getPasteAction());\n edit.getItem(CUT_INDEX + 3).setAction(panel.getDeleteAction());\n } else {\n restoreActions();\n }\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == info) {\r\n\t\t\t\t\tmenu.setVisible(false);\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\t\t\"Dies ist eine Uhr mit einstellbaren Wecker\\nVersion 1.0\");\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n super.onOptionsItemSelected(item);\n\n int id = item.getItemId();\n Log.d(\"menu check\",\"clicked: \"+id);\n Log.d(\"menu check\",\"doc id: \"+R.id.doc);\n Log.d(\"menu check\",\"stat id:\"+R.id.stat);\n //noinspection SimplifiableIfStatement\n switch(id){\n case R.id.doc: {\n startActivity(new Intent(BasicInfo.this, Doctor.class));\n finish();\n break;\n }\n case R.id.stat: {\n startActivity(new Intent(BasicInfo.this, LastStatus.class));\n break;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e)\n\t{\n\t\t// Handle The Various Menu Item Actions\n\t\tswitch (e.getActionCommand())\n\t\t{\n\t\t\t// File Menu Options\n\t\t\tcase \"New Window\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'File' > 'New Window'\");\n\n\t\t\t\t// Remove Action Listener's From Old Window Menu Bar And Close The Window\n\t\t\t\tNEW_WINDOW.removeActionListener(this);\n\t\t\t\tCLOSE.removeActionListener(this);\n\t\t\t\tUNDO.removeActionListener(this);\n\t\t\t\tREDO.removeActionListener(this);\n\t\t\t\tINSTRUCTIONS.removeActionListener(this);\n\t\t\t\tABOUT.removeActionListener(this);\n\t\t\t\tDEBUG.removeActionListener(this);\n\t\t\t\tWindow.close();\n\n\t\t\t\t// Call Main In The Launcher Class To Run A New Paint Window On The Event-Dispatch Thread\n\t\t\t\tLauncher.main(null);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"Close\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'File' > 'Close'\");\n\n\t\t\t\t// Close The Paint Application Window And Quit The Application\n\t\t\t\tWindow.close();\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Edit Menu Options\n\t\t\tcase \"Undo\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'Edit' > 'Undo'\");\n\n\t\t\t\t// Call The Undo Function In The Window Class\n\t\t\t\tWindow.undo();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"Redo\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'Edit' > 'Redo'\");\n\n\t\t\t\t// Call The Redo Function In The Window Class\n\t\t\t\tWindow.redo();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Help Menu Options\n\t\t\tcase \"Instructions\":\n\t\t\tcase \"About\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'Help' > '\" + e.getActionCommand() + \"'\");\n\n\t\t\t\t// Call The Show Help Function In The Window Class\n\t\t\t\tWindow.showHelp(e);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"Debug\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'Help' > 'Debug'\");\n\n\t\t\t\t// Call The Debug Function In The Window Class\n\t\t\t\tWindow.debug();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\t// Print The Un-Recognized Menu Item That Was Selected\n\t\t\t\tSystem.out.println(e.getActionCommand());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void menuClick(ActionEvent e) {\r\n\t\tswitch (e.getActionCommand()) {\r\n\t\tcase \"Save Game\":\r\n\t\t\ttry {\r\n\t\t\t\tsaveGame();\r\n\t\t\t} catch (FileNotFoundException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase \"Load Game\":\r\n\t\t\tloadGame();\r\n\t\t\tbreak;\r\n\t\tcase \"New Game\":\r\n\t\t\tint confirm = JOptionPane\r\n\t\t\t\t\t.showConfirmDialog(gameView, \"Are You Sure You Want\\n To Start a New Game?\", \"Confirm New Game\", JOptionPane.YES_NO_OPTION);\r\n\t\t\tif (confirm == 0) {\r\n\t\t\t\tgameBoard = new GameBoardModel(false, false);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"private void resourceActionWindow (ButtonImage button){\n JPopupMenu depositList = new JPopupMenu(\"Deposits\");\n DepositMenu subMenu = new DepositMenu(gui, \"Send to\", selectedResource, Command.SEND_DEPOSIT_ID, 0);\n depositList.add(subMenu);\n button.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent e) {\n depositList.show(button , e.getX(), e.getY());\n }\n });\n }",
"public void actionPerformed(ActionEvent ae) {\r\n JDesktopPane desktop = mdiForm.getDeskTopPane();\r\n Object menuItem = ae.getSource();\r\n try {\r\n if (menuItem.equals(exit)) {\r\n showExit();\r\n } else if (menuItem.equals(unitHierarchy)) {\r\n showUnitHierarchy();\r\n } else if (menuItem.equals(rolodex)) {\r\n showRolodex();\r\n } else if (menuItem.equals(sponsor)) {\r\n showSponsor();\r\n } else if (menuItem.equals(proposalDevelopment)) {\r\n showProposalDevelopment();\r\n } else if (menuItem.equals(personnal)) {\r\n showDepartmentalPerson();\r\n \r\n /*Added Icons are Committe,Protocol,Shedule - Chandrashekar*/\r\n /* JM 05-02-2013\r\n }else if(menuItem.equals(irbProtocol)){\r\n showIRBProtocol();\r\n }else if(menuItem.equals(schedule)){\r\n showSchedule();\r\n }else if (menuItem.equals(committee)){\r\n showCommittee();\r\n */\r\n }else if( menuItem.equals( cascade ) ){\r\n DesktopUtils.cascadeAll( desktop );\r\n }else if( menuItem.equals( tileHorizontal ) ){\r\n DesktopUtils.tileHorizontal( desktop );\r\n }else if( menuItem.equals( tileVertical ) ){\r\n DesktopUtils.tileVertical( desktop );\r\n }else if( menuItem.equals( layer ) ){\r\n DesktopUtils.layer( desktop );\r\n }\r\n else if(menuItem.equals(users)) {\r\n showUserMaintenance();\r\n }\r\n else if(menuItem.equals(map)) {\r\n showMaps(); //Added by Shiji to display the Map Maintainance window\r\n }\r\n /* JM 05-02-2013\r\n else if(menuItem.equals(irbProtocolSubmission)){\r\n showIRBSubmissionDetails();\r\n }//Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n else if(menuItem.equals(iacucProtocol)){\r\n showIACUCProtocol();\r\n }\r\n else if(menuItem.equals(iacucProtocolSubmission)){\r\n showIACUCSubmissionDetails();\r\n } */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n else if(menuItem.equals(inbox)){\r\n showInboxDetails();\r\n }else if(menuItem.equals(awards)) {\r\n showAwards();\r\n }else if(menuItem.equals(proposal)){\r\n showProposal();\r\n }else if(menuItem.equals(negotiations)){\r\n showNegotiation();\r\n }else if(menuItem.equals(subContract)){\r\n showSubcontract();\r\n }else if(menuItem.equals(buisnessRules)){\r\n showBusinessRules();\r\n }\r\n /* JM 4-25-2016 added Contact Coeus Help button */\r\n\t else if(menuItem.equals(contactCoeusHelp)){\r\n\t \tToolFunctions tools = new ToolFunctions();\r\n\t \ttools.contactCoeusHelp();\r\n\t }\r\n\t /* JM END */\r\n }\r\n catch(Exception e) {\r\n //Commented by Ajay - Modification done for Exception Handling \r\n //Since the Code was changed in AppletServletCommunicator to \r\n //show Server down message, the below code is commented.\r\n \r\n //CoeusOptionPane.showInfoDialog(e.getMessage());\r\n \r\n //Added to display Stack Trace\r\n e.printStackTrace();\r\n }\r\n \r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case R.id.action_exit:\n System.exit(0);\n break;\n case R.id.action_2players:\n Intent mainActivity = new Intent(this, TwoPlayersActivity.class);\n startActivity(mainActivity);\n break;\n case R.id.action_about:\n showPopUpWindow();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\tswitch (item.getItemId()) {\r\n\t\t\tcase R.id.menu_panico:\r\n\t\t\t\tws.Panico();\r\n\t\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tif (evt.getSource() == jMenuItem3) {\n\t\t\t\t\tSystem.out.println(\"Selected: \"\n\t\t\t\t+ evt.getActionCommand());\n\t\t\t\t((Echiquier) panelChess\n\t\t\t\t.getComponents()[0]).setUci(\n\t\t\t\tnew CommunicationUCI(\"src\\\\moteurs\\\\\"\n\t\t\t\t+ \"Rybkav2.3.exe\"),\n\t\t\t\tnew CommunicationUCI(\"src\\\\moteurs\\\\\"\n\t\t\t\t+ \"Rybka v2.3.2a.mp.w32.exe\"));\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\n\t\t\tcase 1:\n\t\t\t\t//Toast msg = Toast.makeText(orgDetails.this, \"Menu 1\", Toast.LENGTH_LONG);\n\t\t\t\t//msg.show();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}",
"public void actionPerformed(ActionEvent e)\r\n\t{\t// see which menu item was clicked\r\n\t\tif(e.getSource() == displayMenu)\r\n\t\t\tdisplayMessage();\r\n\t \tif(e.getSource() == clearMenu)\r\n \t\tclearMessage(); \r\n\t \tif(e.getSource() == closeMenu)\r\n \t \tshutDown(); \r\n\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Contabilidade m3= new Menu_Contabilidade();\r\n \r\n }",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tif (evt.getSource() == jMenuItem9) {\n\t\t\t\t\tSystem.out.println(\"Selected: \"\n\t\t\t\t+ evt.getActionCommand());\n\t\t\t\t\t/*\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t.getComponents()[0])\n\t\t\t\t\t.setLightColor(Color.black);*/\n\t\t\t\t}\n\t\t\t}",
"void clickAmFromMenu();",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"@Override\n \tpublic boolean onOptionsItemSelected(MenuItem item) {\n \t\tswitch (item.getItemId()) {\n \n \t\t/* category */\n \t\tcase R.id.menuRegion:\n \t\t\tCategoryDialog diag = new CategoryDialog();\n \t\t\tdiag.setListener(this);\n \t\t\tdiag.show(getFragmentManager(), \"\");\n \t\t\tbreak;\n \n \t\t/* contact */\n \t\tcase R.id.menuContact:\n \t\t\tIntent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(\n \t\t\t\t\t\"mailto\", \"[email protected]\", null));\n \t\t\tstartActivity(Intent.createChooser(intent,\n \t\t\t\t\tgetString(R.string.messageEMail)));\n \t\t\tbreak;\n \t\t}\n \n \t\treturn super.onOptionsItemSelected(item);\n \t}",
"@Override\n public void onClick(View v) {\n OverflowPopupMenu popupMenu = new OverflowPopupMenu(mContext, v);\n //Inflating the Popup using xml file\n popupMenu.getMenuInflater().inflate(R.menu.overflow_menu_noprint, popupMenu.getMenu());\n //Creating class that extends OnMenuItemClickListener\n PopupListenerBuilder listenerBuilder = null;\n try {\n listenerBuilder = new PopupListenerBuilder(mContext, v, mElement)\n .setClassesForIntent(\n \"com.mcteam.gestapp.Moduli.Amministrazione.PrimaNotaCassa.VisualElimCassaActivity\",\n \"com.mcteam.gestapp.Moduli.Amministrazione.PrimaNotaCassa.NuovoModifCassaActivity\",\n null)\n .setConstForIntent(Constants.NOTA_CASSA)\n .setExtraParamIntent(Constants.VISUAL_ELIMINA, false)\n .setConstActivityResult(Constants.NOTA_DELETE, Constants.NOTA_EDIT, null);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n //registering popup with OnMenuItemClickListener\n popupMenu.setOnMenuItemClickListener(listenerBuilder);\n //Forza le icone a mostrarsi\n popupMenu.forceIconToShow();\n //Mostra il Popup\n popupMenu.show();\n\n /*PopupMenu popupMenu = new PopupMenu(mContext, v){\n\n @Override\n public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item){\n switch (item.getItemId()){\n case R.id.menu_action_elimina:\n Intent eliminaIntent = new Intent(mContext, VisualElimCassaActivity.class);\n eliminaIntent.putExtra(Constants.NOTA_CASSA, mElement);\n eliminaIntent.putExtra(Constants.VISUAL_ELIMINA, false);\n //eliminaIntent.putExtra(\"actualUser\", mUser);\n ((Activity)mContext).startActivityForResult(eliminaIntent, Constants.NOTA_DELETE);\n return true;\n case R.id.menu_action_modifica:\n Intent modificaIntent = new Intent(mContext, NuovoModifCassaActivity.class);\n modificaIntent.putExtra(Constants.NOTA_CASSA, mElement);\n //modificaIntent.putExtra(\"actualUser\", mUser);\n ((Activity)mContext).startActivityForResult(modificaIntent, Constants.NOTA_EDIT);\n return true;\n default:\n return super.onMenuItemSelected(menu, item);\n }\n\n }\n };\n popupMenu.inflate(R.menu.overflow_menu_noprint);\n\n //Force icons to show\n Object menuHelper;\n Class[] argTypes;\n try {\n Field fMenuHelper = PopupMenu.class.getDeclaredField(\"mPopup\");\n fMenuHelper.setAccessible(true);\n menuHelper = fMenuHelper.get(popupMenu);\n argTypes = new Class[] {boolean.class};\n menuHelper.getClass().getDeclaredMethod(\"setForceShowIcon\", argTypes).invoke(menuHelper, true);\n\n } catch (Exception e) {\n e.printStackTrace();\n popupMenu.show();\n return;\n }\n popupMenu.show();*/\n }",
"public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }",
"void viewThemeMenuItemActionPerformed(java.awt.event.ActionEvent evt) {\n\t}",
"public void popMenu() {\r\n\t\tthis.menu = new JPopupMenu();\r\n\t\tmenu.setLocation(jf.getLocation());\r\n\t\tthis.beenden = new JMenuItem(\"Beenden\");\r\n\t\tthis.info = new JMenuItem(\"Info\");\r\n\t\tmenu.add(beenden);\r\n\t\tbeenden.addActionListener(new ActionListener() {\r\n\t\t\t// vergleicht ob gleiches Objekt, bei ActionEvent fuer Beenden\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == beenden) {\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tmenu.add(info);\r\n\t\tinfo.addActionListener(new ActionListener() {\r\n\t\t\t//vergleicht ob gleiches Objekt, ActionEvent fuer Info\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == info) {\r\n\t\t\t\t\tmenu.setVisible(false);\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\t\t\"Dies ist eine Uhr mit einstellbaren Wecker\\nVersion 1.0\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tmenu.setVisible(true);\r\n\t}",
"public void createActions(IMenuManager manager)\r\n\t{\r\n\t\tEditPart ep = main.getViewer().findObjectAt(clickLocation);\r\n\r\n\t\tif (ep instanceof RootEditPart)\r\n\t\t{\r\n\t\t\t// GRAPH POPUP\r\n\r\n\t\t\tboolean sif = false;\r\n\t\t\tboolean tcgasif = false;\r\n\t\t\tboolean basicsif = false;\r\n\t\t\tObject o = ((ChsRootEditPart) ep.getChildren().get(0)).getModel();\r\n\t\t\tif (o instanceof BasicSIFGraph || o instanceof org.gvt.model.sifl3.SIFGraph)\r\n\t\t\t{\r\n\t\t\t\tsif = true;\r\n\t\t\t\tbasicsif = o instanceof BasicSIFGraph;\r\n\r\n\t\t\t\ttcgasif = TCGASIFAction.okToRun(main, false);\r\n\t\t\t}\r\n\r\n\t\t\tif (tcgasif)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new ShowMutexGroupsAction(main));\r\n\t\t\t\tmanager.add(new HighlightTCGACaseAction(main));\r\n\t\t\t\tmanager.add(new UpdateTCGASIFForACaseAction(main));\r\n\t\t\t\tmanager.add(new LoadTCGASpecificReactionsAction(main));\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tif (basicsif)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new ShowFormatSeriesAction(main));\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tif (sif)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new ShowDruggableAction(main));\r\n\t\t\t\tmanager.add(new HighlightCOSMICGenesActions(main));\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tClosePathwayAction action = new ClosePathwayAction(main);\r\n\t\t\tif (sif) action.setText(\"Close Graph\");\r\n\t\t\tmanager.add(action);\r\n\r\n\t\t\tif (!sif)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new DuplicatePathwayAction(main));\r\n\t\t\t\tmanager.add(new DeletePathwayAction(main));\r\n\t\t\t\tmanager.add(new UpdatePathwayAction(main, false));\r\n\t\t\t}\r\n\t\t\tmanager.add(new Separator());\r\n\r\n\t\t\tif (ChisioMain.cBioPortalAccessor != null)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new FetchFromCBioPortalAction(main,\r\n\t\t\t\t\tFetchFromCBioPortalAction.CURRENT_STUDY));\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tmanager.add(new ZoomAction(main, 1, null));//clickLocation));\r\n\t\t\tmanager.add(new ZoomAction(main, -1, null));//clickLocation));\r\n\t\t\tmanager.add(new Separator());\r\n\t\t\tmanager.add(new RemoveHighlightsAction(main));\r\n\t\t\tmanager.add(new InspectorAction(main, true));\r\n\t\t\tmanager.add(new Separator());\r\n\t\t\tmanager.add(new LayoutInspectorAction(main));\r\n\t\t\tmain.getViewer().select(ep);\r\n\t\t}\r\n\t\telse if (ep instanceof NodeEditPart)\r\n\t\t{\r\n\t\t\t// NODE-COMPOUND POPUP\r\n\r\n\t\t\tObject o = ep.getModel();\r\n\t\t\tif ((o instanceof BasicSIFGroup && !((BasicSIFGroup) o).getMediators().isEmpty()) ||\r\n\t\t\t\t(o instanceof SIFGroup && !((SIFGroup) o).getMediators().isEmpty()))\r\n\t\t\t{\r\n\t\t\t\tQueryPCGetAction query = new QueryPCGetAction(main, true, QueryPCAction.QueryLocation.PC_MECH);\r\n\t\t\t\tquery.setText(\"Detailed View\");\r\n\t\t\t\tmanager.add(query);\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tExperimentData data = DataLegendAction.getData((NodeModel) o, main);\r\n\t\t\tif (data != null)\r\n\t\t\t\tmanager.add(new DataLegendAction(main, data));\r\n\r\n\t\t\tmanager.add(new HighlightSelectedAction(main));\r\n\t\t\tmanager.add(new RemoveHighlightFromSelectedAction(main));\r\n\t\t\tmanager.add(new DeleteAction(main));\r\n\t\t\tmanager.add(new InspectorAction(main, false));\r\n\t\t\tmanager.add(new Separator());\r\n\r\n\t\t\tMenuManager localQueryMenu = new MenuManager(\"&Local Query\");\r\n\t\t\tlocalQueryMenu.add(new LocalNeighborhoodQueryAction(main, true));\r\n\t\t\tlocalQueryMenu.add(new LocalGoIQueryAction(main, true));\r\n\t\t\tlocalQueryMenu.add(new LocalCommonStreamQueryAction(main, true));\r\n\t\t\tmanager.add(localQueryMenu);\r\n\r\n\t\t\tMenuManager pcQueryMenu = new MenuManager(\"&Pathway Commons Query (Level 3)\");\r\n\t\t\tMenuManager neighMenu = new MenuManager(\"&Neighborhood\");\r\n\t\t\tneighMenu.add(new QueryPCNeighborsAction(main, false, true, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tneighMenu.add(new QueryPCNeighborsAction(main, true, false, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tneighMenu.add(new QueryPCNeighborsAction(main, true, true, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tpcQueryMenu.add(neighMenu);\r\n\t\t\tpcQueryMenu.add(new QueryPCPathsBetweenAction(main, true, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tMenuManager commStreamMenu = new MenuManager(\"&Common Stream\");\r\n\t\t\tcommStreamMenu.add(new QueryPCCommonStreamAction(main, true, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tcommStreamMenu.add(new QueryPCCommonStreamAction(main, false, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tpcQueryMenu.add(commStreamMenu);\r\n manager.add(pcQueryMenu);\r\n\r\n NodeEditPart nep = (NodeEditPart) ep;\r\n Object model = nep.getModel();\r\n CBioPortalAccessor portalAccessor = ChisioMain.cBioPortalAccessor;\r\n\r\n if( (model instanceof Actor || model instanceof BasicSIFNode || model instanceof SIFNode)\r\n && main.hasExperimentData(ExperimentData.CBIOPORTAL_ALTERATION_DATA)\r\n && portalAccessor != null\r\n && !portalAccessor.getCurrentGeneticProfiles().isEmpty() )\r\n {\r\n manager.add(new Separator());\r\n manager.add(new CBioPortalDataStatisticsAction(main));\r\n }\r\n }\r\n\t\telse if (ep instanceof ChsEdgeEditPart)\r\n\t\t{\r\n\t\t\t// EDGE POPUP\r\n\r\n\t\t\tObject o = ep.getModel();\r\n\t\t\tif (o instanceof BasicSIFEdge || o instanceof SIFEdge)\r\n\t\t\t{\r\n\t\t\t\tQueryPCGetAction query = new QueryPCGetAction(main, true, QueryPCAction.QueryLocation.PC_MECH);\r\n\t\t\t\tquery.setText(\"Detailed View\");\r\n\t\t\t\tmanager.add(query);\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tmanager.add(new HighlightSelectedAction(main));\r\n\t\t\tmanager.add(new RemoveHighlightFromSelectedAction(main));\r\n\t\t\tmanager.add(new DeleteAction(main));\r\n\t\t\tmanager.add(new InspectorAction(main, false));\r\n\t\t}\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n for (String t : type) {\n startActivity(ExerciseSettingsActivity.exerciseSettingsIntent(this, t));\n }\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onMenuItemSelected(int featureId, MenuItem item) {\n int lSelectedItemID = item.getItemId(); // 액션 메뉴 아이디 확인함.\n if(lSelectedItemID == R.id.action_example){\n // To-do something\n }\n return super.onMenuItemSelected(featureId, item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_Customize) {\n Intent I = new Intent(\"com.example.Scott.concessionstand.Customize\");\n startActivity(I);\n\n int numInList = grid.getChildCount();\n\n eNum.putInt(\"numInList\", numInList);\n eNum.commit();\n\n //finish();\n return true;\n }\n\n if (id == R.id.action_dailyTotal) {\n Intent I2 = new Intent(\"com.example.Scott.concessionstand.DailyTotals\");\n startActivity(I2);\n //finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"public void actionPerformed(ActionEvent e)\n\t{\n\t\tJMenu menuOfEventTrigger = Application.frame.getJMenuBar().getMenu(1);\n\t\t\n\t\tif (e.getSource() == menuOfEventTrigger.getItem(0))\n\t\t\tLectureManager.goToFirstPage();\n\t\telse if (e.getSource() == menuOfEventTrigger.getItem(1))\n\t\t\tLectureManager.goToLastPage();\n\t\telse if (e.getSource() == menuOfEventTrigger.getItem(2))\n\t\t{\n\t\t\tApplication.dialogLabel.setText(DialogLabelText.changeLectureMessage);\n\t\t\t\n\t\t\tbyte selectedButton = (byte)\n\t\t\t\t\t(JOptionPane.showConfirmDialog(null, Application.dialogLabel, \"Change Lecture\",\n\t\t\t\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE));\n\t\t\t\n\t\t\tif (selectedButton == JOptionPane.YES_OPTION)\n\t\t\t{\n\t\t\t\tApplication.frame.setJMenuBar(Application.centralProgramMenuBar);\n\t\t\t\t\n\t\t\t\tCardLayout mainPanelLayout = (CardLayout)(Application.mainPanel.getLayout());\n\t\t\t\tApplication.currentPanelName = Application.LECTURE_SELECT_NAME;\n\t\t\t\tmainPanelLayout.show(Application.mainPanel, Application.currentPanelName);\n\t\t\t}\n\t\t}\n\t\t// When the user clicks on the button to quit Lecture Mode.\n\t\telse if (e.getSource() == menuOfEventTrigger.getItem(3))\n\t\t{\n\t\t\tApplication.dialogLabel.setText(DialogLabelText.quitLectureModeMessage);\n\t\t\t\n\t\t\tbyte selectedButton = (byte)\n\t\t\t\t\t(JOptionPane.showConfirmDialog(null, Application.dialogLabel, \"Quit Lecture Mode\",\n\t\t\t\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE));\n\t\t\t\n\t\t\tif (selectedButton == JOptionPane.YES_OPTION)\n\t\t\t{\n\t\t\t\tApplication.frame.setJMenuBar(Application.centralProgramMenuBar);\n\t\t\t\t\n\t\t\t\tApplication.restartMainMenuThread();\n\t\t\t\t\n\t\t\t\tCardLayout mainPanelLayout = (CardLayout)(Application.mainPanel.getLayout());\n\t\t\t\tApplication.currentPanelName = Application.MAIN_MENU_NAME;\n\t\t\t\tmainPanelLayout.show(Application.mainPanel, Application.currentPanelName);\n\t\t\t}\n\t\t}\n\t}",
"public void actionPerformed (ActionEvent press){\r\n\t\t\tif(press.getSource() == sushimenu){\r\n\t\t\r\n\t\t\tnew rollMenu();\r\n\t\t}else if(press.getSource() == meatmenu){\r\n\t\t\t\r\n\t\t\tnew meatMenu();\r\n\t\t}else if(press.getSource() == soupsaladmenu){\r\n\t\t\t\r\n\t\t\tnew saladMenu();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_refresh) {\n refreshData();\n } else if (id == R.id.action_filter) {\n popUpView(v);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tif (evt.getSource() == jMenuItem4) {\n\t\t\t\t\tSystem.out.println(\"Selected: \"\n\t\t\t\t+ evt.getActionCommand());\n\t\t\t\t((Echiquier) panelChess\n\t\t\t\t.getComponents()[0]).setUci(\n\t\t\t\tnew CommunicationUCI(\"src\\\\moteurs\\\\\"\n\t\t\t\t+ \"Rybka v2.3.2a.mp.w32.exe\"),\n\t\t\t\tnew CommunicationUCI(\"src\\\\moteurs\\\\\"\n\t\t\t\t+ \"Rybkav2.3.exe\"));\n\t\t\t\t}\n\t\t\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n \tswitch (item.getItemId()) {\n\t\tcase R.id.menu_principla_mapas:\n\t\t\tToast.makeText(this, \"Soy el menu de mapas\", Toast.LENGTH_LONG).show();\n\t\t\treturn true;\n\t\tcase R.id.menu_principla_call:\n\t\t\tmakeCall(null);\n\t\t\treturn true;\n\t\tcase R.id.menu_principla_foto:\n\t\t\ttakePhoto(null);\n\t\t\treturn true;\n\t\tcase R.id.menu_principla_4:\n\t\t\tlanzarNotificacion(null);\n\t\t\treturn true;\n\t\tcase R.id.menu_principla_5:\n\t\t\tToast.makeText(this, \"Soy el menu 5\", Toast.LENGTH_LONG).show();\n\t\t\treturn true;\n\t\tcase R.id.menu_contextual_principal5_1:\n\t\t\tshowDialog(DLG_LIST);\n\t\t\treturn true;\n\t\tcase R.id.menu_contextual_principal5_2:\n\t\t\tshowDialog(DLG_LIST_SELECT);\n\t\t\treturn true;\n\t\tcase R.id.menu_principla_6:\n\t\t\tshowDialog(DLG_BUTTONS);\n\t\t\treturn true;\n\t\tcase R.id.menu_principla_7:\n\t\t\tshowDialog(DLG_PROGRESSBAR);\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent action) {\n\t\t\t\t\tDishDetails.OpenWindow(null);\n\t\t\t\t}",
"String getAction();",
"String getAction();",
"@Override\n public boolean onMenuItemClick(MenuItem item) {\n Block_Dialog();\n return false;\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tLevel chosenLevel = Level.valueOf(e.getActionCommand());\n\t\t\t\tif (chosenLevel != null)\n\t\t\t\t{\n\t\t\t\t\tgetGameManager().popGameMode();\n\t\t\t\t\tgetGameManager().loadLevel(chosenLevel.getLevelDefPath());\n\t\t\t\t\tgetGameManager().pushGameMode(IngameMode.ID);\n\t\t\t\t}\n\t\t\t}",
"@OnClick(R.id.converter_sale_or_purchase_cv)\n public void chooseAction() {\n mDialog = new DialogList(mContext,\n mActionDialogTitle, mListForActionDialog, null,\n new RecyclerViewAdapterDialogList.OnItemClickListener() {\n @Override\n public void onClick(int position) {\n if (position == 0) {\n mAction = ConstantsManager.CONVERTER_ACTION_PURCHASE;\n } else {\n mAction = ConstantsManager.CONVERTER_ACTION_SALE;\n }\n mPreferenceManager.setConverterAction(mAction);\n mDialog.getDialog().dismiss();\n setLang();\n }\n });\n ((ImageView) mDialog.getDialog().getWindow().findViewById(R.id.dialog_list_done))\n .setImageResource(R.drawable.ic_tr);\n mDialog.getDialog().getWindow().findViewById(R.id.dialog_list_done)\n .setBackground(getResources().getDrawable(R.drawable.ic_tr));\n }",
"public void selected(String action);",
"public void onLoadMenuMyFavoritesSelected();",
"public void getPopup() {\n\t\t\tglobal.btnClick(popup);\n\t\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t\tString choice=menu.getSelectedItem().toString();\n\t\n\t\t///disposing the frame after the topic is selected\n\t\tif(choice==\"Cryptography\") {\n\t\t\tframe.dispose();\n\t\t\tnew TopicOne();\n\t\t}\n\t\telse {\n\t\t\tframe.dispose();\n\t\t\tnew TopicTwo();\n\t\t}\n\t}",
"private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n \tIntent intent;\n switch (item.getItemId()) {\n case R.id.action_add:\n \tswitch (currentTabSection) {\n\t\t\t\t\tcase PLAYER_TAB:\n\t\t\t\t\t\tintent = new Intent(this,PlayerActivity.class);\n\t\t\t\t \tintent.putExtra(MainActivity.EXTRA_TYPE, MainActivity.EXTRA_TYPE_NEW);\n\t\t\t\t \tstartActivity(intent);\n\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\tcase GAME_TAB:\n\t\t\t\t\t\tintent = new Intent(this,GameActivity.class);\n\t\t\t\t \tintent.putExtra(MainActivity.EXTRA_TYPE, MainActivity.EXTRA_TYPE_NEW);\n\t\t\t\t \tstartActivity(intent);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tintent = new Intent(this,PlayerActivity.class);\n\t\t\t\t \tintent.putExtra(MainActivity.EXTRA_TYPE, MainActivity.EXTRA_TYPE_NEW);\n\t\t\t\t \tstartActivity(intent);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n \t\n return true;\n \n case R.id.action_settings:\n \t\n \t// Simply start the SettingsActivity\n \tintent = new Intent(this,SettingsActivity.class);\n \tthis.startActivityForResult(intent, MainActivity.SETTINGS_REQUEST_CODE);\n \treturn true;\n \t\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"public void actionPerformed(java.awt.event.ActionEvent evt) {\n if (evt.getSource() == iconchoose) {\n MacOptionsPanel.this.iconchooseActionPerformed(evt);\n }\n }",
"void cellMenuAction(Cell cell, String action);",
"@FXML\n\tpublic void handleMenu(){\n\t\tFile file2 = mainApp.getProspectFilePath();\n if (file2 != null) {\n mainApp.saveProspectDataToFile(file2);}\n\t\tmainApp.showMenuPrincipale();\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu_replay:\n Intent intent = new Intent(Emails_DetailsActivity.this,\n Email_Replay_Activity.class);\n startActivity(intent);\n\n break;\n case R.id.menu_forword:\n Intent intent1 = new Intent(Emails_DetailsActivity.this,\n Email_Forword_Activity.class);\n startActivity(intent1);\n break;\n case android.R.id.home:\n this.finish();\n break;\n case R.id.menu_block:\n Block_Dialog();\n break;\n default:\n break;\n }\n return super.onOptionsItemSelected(item);\n }"
] | [
"0.7188306",
"0.68282586",
"0.66979116",
"0.6692495",
"0.6624689",
"0.66197735",
"0.66016066",
"0.6589744",
"0.657757",
"0.65525436",
"0.652883",
"0.6525212",
"0.6516384",
"0.6479453",
"0.6436048",
"0.64131117",
"0.6408108",
"0.6399261",
"0.63929296",
"0.63638675",
"0.6363359",
"0.63435006",
"0.6342649",
"0.6325207",
"0.63075036",
"0.63022214",
"0.62973374",
"0.6292065",
"0.6288272",
"0.6288052",
"0.6285041",
"0.62773126",
"0.62753975",
"0.627255",
"0.62514997",
"0.6243382",
"0.62412316",
"0.6219972",
"0.62169605",
"0.62163717",
"0.62093335",
"0.6205991",
"0.6205273",
"0.6200568",
"0.61950374",
"0.6186797",
"0.61844206",
"0.6164743",
"0.6159306",
"0.6157487",
"0.6157126",
"0.6151134",
"0.61486757",
"0.61429477",
"0.6137225",
"0.6135481",
"0.6134374",
"0.61317736",
"0.61309",
"0.6119973",
"0.61169314",
"0.61126566",
"0.61069053",
"0.61055964",
"0.6102183",
"0.61010075",
"0.6094457",
"0.6092877",
"0.6089896",
"0.60854053",
"0.6085063",
"0.60800403",
"0.60781276",
"0.60769904",
"0.60752726",
"0.60735184",
"0.6071014",
"0.6060768",
"0.60515285",
"0.60515285",
"0.60515285",
"0.60515285",
"0.6050307",
"0.6046975",
"0.60440207",
"0.60418606",
"0.6040922",
"0.6040922",
"0.60390913",
"0.60389644",
"0.60386974",
"0.6037437",
"0.60311526",
"0.60307604",
"0.603046",
"0.602602",
"0.6025531",
"0.6016247",
"0.6007034",
"0.60042983",
"0.6003445"
] | 0.0 | -1 |
draws the box around the row that could be modified does the highlighting job | public void drawModifyingBox(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
int x = -1;
int y = -1;
int width = -1;
int height = -1;
int highlightboxwidth = 0;
int highlightboxheight = 0;
/** getting the needed informations of the real pixel size of this row */
LayoutCell current = tableLayoutUtil.getCurrentLayoutCell();
if (current != null) {
x = 0;
y = current.getCellDimensions().y;
height = current.getCellDimensions().height;
width = InterfaceGuidelines.MARGIN_LEFT;
highlightboxheight = height;
highlightboxwidth = tableLayoutUtil.getCalculatedLayoutWidth();
}
/** drawing a filled box on the left side as "active indicator" */
g2d.setColor(Color.GRAY);
g2d.fillRect(x, y, width, height);
/** highlight the row */
g2d.setColor(Color.GRAY);
BasicStroke stroke = new BasicStroke(1.0f);
g2d.setStroke(stroke);
g2d.drawRect(x, y, highlightboxwidth, highlightboxheight);
schraffiertesRechteckZeichnen(g2d, x, y, highlightboxwidth, highlightboxheight);
/** drawing the row number on the gray box */
g2d.setColor(Color.WHITE);
g2d.setFont(new Font("SansSerif", Font.BOLD, 10));
String info = current.getCellY() + "";
FontMetrics metrics = g2d.getFontMetrics();
int fontHeight = metrics.getHeight();
g2d.drawString(info, 1, ((height) / 2) + y + (fontHeight / 2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void highlight(Graphics g) {\n\t\tg.setColor(Color.CYAN);\n\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\tg.setColor(Color.BLACK);\n\t\tg.drawRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t}",
"public void highlightTile() {\n\t\tclearHighlightTile();\n\t\trectangle.setStrokeType(StrokeType.INSIDE);\n\t\trectangle.setStrokeWidth(2.0);\n\t\trectangle.setStroke(Color.RED);\n\t}",
"@Override\n\tvoid draw(Graphics g) {\n\t\tg.setColor(needsHighlight() ? selectColor : Color.GRAY);\n\t\tsetBbox(x, y, x2, y2);\n\t\tif (x < x2 && y < y2)\n\t\t\tg.fillRect(x, y, x2 - x, y2 - y);\n\t\telse if (x > x2 && y < y2)\n\t\t\tg.fillRect(x2, y, x - x2, y2 - y);\n\t\telse if (x < x2 && y > y2)\n\t\t\tg.fillRect(x, y2, x2 - x, y - y2);\n\t\telse\n\t\t\tg.fillRect(x2, y2, x - x2, y - y2);\n\t}",
"public void highlight(){\n myRectangle.setFill(HIGHLIGHT);\n }",
"void highlightCheckSquare(boolean highlight, Button button, int row, int column, CenterPiece piece);",
"void highlightSquare(boolean highlight, Button button, int row, int column, ChessPiece piece);",
"private void paint(Graphics g, boolean clicked, boolean highlight) {\n\t\t\tif (!(pixx > 0 && pixx < getWidth() && pixy > 0 && pixy < getHeight()))\n\t\t\t\treturn;\n\t\t\tint raddif = clicked ? 10 : (highlight ? CIRCLERAD * 2 / 3 : 0);\n\t\t\tint diadif = raddif * 2;\n\t\t\tg.fillOval(pixx - CIRCLERAD - raddif, pixy - CIRCLERAD - raddif, CIRCLEDIA + diadif, CIRCLEDIA + diadif);\n\n\t\t\t// drawing the box\n\t\t\tString toDraw = valx + \", \" + valy;\n\t\t\tint boxw = toDraw.length() * (xoffset - 1) + 8;\n\t\t\tint boxh = yoffset + 6;\n\t\t\tg.clearRect(pixx + 7, pixy - 10 - yoffset, boxw, boxh);\n\t\t\tg.drawRect(pixx + 7, pixy - 10 - yoffset, boxw, boxh);\n\t\t\tg.drawString(toDraw, pixx + 10, pixy - 10);\n\t\t}",
"public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }",
"@Override\n public void mouseEntered(MouseEvent evt) {\n Cell cell = (Cell) evt.getSource();\n preActionColor = cell.getBackground();\n\n // Highlight Valid Cells\n for (Cell aCell : view.getGamePanel().getViewCellList()) {\n if (cell.getPosition().getRow() == aCell.getPosition().getRow()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n if (cell.getPosition().getColumn() == aCell.getPosition().getColumn()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n if (cell.getPosition().getSubgrid() == aCell.getPosition().getSubgrid()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n }\n\n cell.setBackground(APP_GREEN);\n }",
"private void drawBackground() {\n g2.setColor(SquareRenderer.BLANK_CELL_COLOR);\n g2.fillRect(BORDER_SIZE, BORDER_SIZE, BOARD_SIZE, BOARD_SIZE);\n }",
"@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\n\t\t\t\t\ttableTransactions.setSelectionForeground(Color.WHITE);\n\t\t\t\t}",
"@Override \r\n public void setUI(TableUI ui) \r\n {\n super.setUI(new BasicTableUI(){ \r\n public void paint(Graphics g, JComponent c) { \r\n Rectangle r=g.getClipBounds(); \r\n int firstRow=table.rowAtPoint(new Point(0,r.y)); \r\n int lastRow=table.rowAtPoint(new Point(0,r.y+r.height)); \r\n // -1 is a flag that the ending point is outside the table \r\n if (lastRow<0) \r\n lastRow=table.getRowCount()-1; \r\n for (int i=firstRow; i<=lastRow; i++) \r\n paintRow(i,g); \r\n } \r\n private void paintRow(int row, Graphics g) \r\n { \r\n Rectangle r=g.getClipBounds(); \r\n for (int i=0; i<table.getColumnCount();i++) \r\n { \r\n Rectangle r1=table.getCellRect(row,i,true); \r\n if (r1.intersects(r)) // at least a part is visible \r\n { \r\n int sk=i;//((CTable)table).map.visibleCell(red,i); \r\n paintCell(row,sk,g,r1); \r\n // increment the column counter \r\n //i+=((CTable)table).map.span(row,sk)-1; \r\n //i++; \r\n } \r\n } \r\n } \r\n private void paintCell(int row, int column, Graphics g,Rectangle area) \r\n { \r\n int verticalMargin = table.getRowMargin(); \r\n int horizontalMargin = table.getColumnModel().getColumnMargin(); \r\n \r\n Color c = g.getColor(); \r\n g.setColor(table.getGridColor()); \r\n g.drawRect(area.x,area.y,area.width-1,area.height-1); \r\n g.setColor(c); \r\n \r\n area.setBounds(area.x + horizontalMargin/2, \r\n area.y + verticalMargin/2, \r\n area.width - horizontalMargin, \r\n area.height - verticalMargin); \r\n \r\n if (table.isEditing() && table.getEditingRow()==row && \r\n table.getEditingColumn()==column) \r\n { \r\n Component component = table.getEditorComponent(); \r\n component.setBounds(area); \r\n component.validate(); \r\n } \r\n else \r\n { \r\n TableCellRenderer renderer = table.getCellRenderer(row, column); \r\n Component component = table.prepareRenderer(renderer, row, column); \r\n if (component.getParent() == null) \r\n rendererPane.add(component); \r\n rendererPane.paintComponent(g, component, table, area.x, area.y, \r\n area.width, area.height, true); \r\n } \r\n } \r\n }); \r\n }",
"private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}",
"public void drawScale()\n\t{\n\tint sw=150;\n\tint sh=10;\n\tint x=width-sw-15;\n\tint y=(int)(END_Y+sh*0.5);\n\tscaleBox=new Rectangle2D.Float(x, y, sw, sh);\n\tstrokeWeight(1);\n\t\n\tCell hc=null;\n\tCell finalhc=null;\n\tfor(int i=0;i<hoveredCells.size();i++)\n\t\t{\n\t\thc=hoveredCells.get(i);\n\t\tif(hc.level==min(levelThreshold, minHoveredLevel))\n\t\t\tfinalhc=hc;\n\t\t}\n\thc=finalhc;\n\t\n\tboolean refDrawn=false;\n\tdouble jump0=(255-(0/(float)sw)*255);\n\tdouble jump1=(255-(0/(float)sw)*255);\n\tdouble jump=Math.ceil(jump1-jump0)+2;\n\t\n\tfor(int i=0;i<sw;i++)\n\t\t{\n\t\tint h=0;\n\t\tboolean drawReference=false;\n\t\tswitch(COLOR_MODE)\n\t\t\t{\n\t\t\tcase COLOR_EXPRESSION:\n\t\t\t\tif(i>sw*0.5)\n\t\t\t\t\t{\n\t\t\t\t\th=(int)Math.round(255-((i-sw*0.5)/(sw*0.5)*255));\n\t\t\t\t\tstroke(255,h,h);\n\t\t\t\t\tif(hc!=null && hc.color.get(selectedCol).getRed()==255 && Math.abs(hc.color.get(selectedCol).getBlue()-h)<=jump)\n\t\t\t\t\t\tdrawReference=true;\n\t\t\t\t\t}\n\t\t\t\telse\t\n\t\t\t\t\t{\n\t\t\t\t\th=(int)Math.round(255-(Math.abs(i-sw*0.5)/Math.abs(sw*0.5))*255);\n\t\t\t\t\tstroke(h,h,255);\n\t\t\t\t\tif(hc!=null && hc.color.get(selectedCol).getBlue()==255 && Math.abs(hc.color.get(selectedCol).getRed()-h)<=jump)\n\t\t\t\t\t\tdrawReference=true;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase COLOR_DEVIATION:\n\t\t\t\th=(int)Math.round(255-(i/(float)sw)*255);\n\t\t\t\tstroke(h,255,h);\n\t\t\t\tif(hc!=null && Math.abs(hc.color.get(selectedCol).getBlue()-h)<=jump)\n\t\t\t\t\tdrawReference=true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tline(x+i,y,x+i,y+sh);\n\t\tif(drawReference && !refDrawn)\n\t\t\t{\n\t\t\tstroke(0);\n\t\t\tline(x+i, y-2, x+i, y+sh+2);\n\t\t\trefDrawn=true;\n\t\t\t}\n\t\t}\n\tstroke(200,200,200);\n\tnoFill();\n\trect(x-1,y-1,sw+1,sh+1);\n\t\n\t//Draw legend\n\ttextAlign(CENTER, TOP);\n\tfill(200);\n\tline(x,y+sh,x,y+sh+2);\n\tif(whiteValue==MEAN)\ttext(\"min\", x, y+sh+3);\n\telse if(whiteValue==MEDIAN)\ttext(\"0\", x, y+sh+3);\n\tline((int)(x+sw*0.5),y+sh,(int)(x+sw*0.5),y+sh+2);\n\tif(whiteValue==MEAN)\t\t\n\t\t{\n\t\ttext(\"avg\", (int)(x+sw*0.5), y+sh+3);\n\t\ttext(\"(\"+expData.average+\")\", (int)(x+sw*0.5), y+sh+6);\n\t\t\n\t\t}\n\telse if(whiteValue==MEDIAN)\ttext(\"50\", (int)(x+sw*0.5), y+sh+3);\n\t\n\tline(x+sw-1,y+sh,x+sw-1,y+sh+2);\n\tif(whiteValue==MEAN)\t\ttext(\"max\", x+sw-1, y+sh+3);\n\telse if(whiteValue==MEDIAN)\ttext(\"100\", x+sw-1, y+sh+3);\n\t\n\t//line((int)(x+sw*0.25),y+sh,(int)(x+sw*0.25),y+sh+1);\n\t//line((int)(x+sw*0.75),y+sh,(int)(x+sw*0.75),y+sh+1);\n\tline((int)(x+sw*0.1),y+sh,(int)(x+sw*0.1),y+sh+1);\n\tline((int)(x+sw*0.2),y+sh,(int)(x+sw*0.2),y+sh+1);\n\tline((int)(x+sw*0.3),y+sh,(int)(x+sw*0.3),y+sh+1);\n\tline((int)(x+sw*0.4),y+sh,(int)(x+sw*0.4),y+sh+1);\n\tline((int)(x+sw*0.6),y+sh,(int)(x+sw*0.6),y+sh+1);\n\tline((int)(x+sw*0.7),y+sh,(int)(x+sw*0.7),y+sh+1);\n\tline((int)(x+sw*0.8),y+sh,(int)(x+sw*0.8),y+sh+1);\n\tline((int)(x+sw*0.9),y+sh,(int)(x+sw*0.9),y+sh+1);\n\tnoStroke();\n\t}",
"private static void highlight(Graphics2D g, int x, int y, int startX){\r\n g.setColor(Color.RED);\r\n g.fillRect(startX * x + 1, startX * y + 1, startX - 1, startX - 1);\r\n }",
"@Override\n public void mouseExited(MouseEvent evt) {\n Cell cell = (Cell) evt.getSource();\n\n // Restore Color\n for (Cell aCell : view.getGamePanel().getViewCellList()) {\n if (aCell.isLocked()) {\n aCell.setBackground(BKGD_DARK_GRAY);\n } else {\n aCell.setBackground(BKGD_LIGHT_GRAY);\n }\n }\n\n cell.setBackground(preActionColor);\n }",
"public void updateSelection()\n {\n \trectForSelection.setRect(rettangoloX,rettangoloY,larghezza,altezza);\n \trectSelTopLeft.setRect(rettangoloX-3,rettangoloY-3,6,6);\n \trectSelBottomLeft.setRect(rettangoloX-3,rettangoloY+altezza-3,6,6);\n \trectSelTopRight.setRect(rettangoloX+larghezza-3,rettangoloY-3,6,6);\n \trectSelBottomRight.setRect(rettangoloX+larghezza-3,rettangoloY+altezza-3,6,6);\n }",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tActionCell.this.setBackground(new Color(.35f, .58f, .92f));\n\t\t\t}",
"public JAnnotationCheckBox(){\n super();\n this.setOpaque(true);\n /*//this.setVerticalTextPosition(0);\n selectionBorderColor = UIManager.getColor(\"Tree.selectionBorderColor\");\n selectionForeground = UIManager.getColor(\"Tree.selectionForeground\");\n selectionBackground = UIManager.getColor(\"Tree.selectionBackground\");\n textForeground = UIManager.getColor(\"Tree.textForeground\");\n textBackground = UIManager.getColor(\"Tree.textBackground\");\n\n if (isHighlighted){\n\n this.setForeground(selectionForeground);\n this.setBackground(selectionBackground);\n } else {\n this.setForeground(textForeground);\n this.setBackground(textBackground);\n }*/\n\n }",
"@Override\n public void paintComponent(Graphics g) {\n if (!(drawStripes = isOpaque())) {\n super.paintComponent(g);\n return;\n }\n\n // Paint zebra background stripes\n// updateZebraColors();\n final Insets insets = getInsets();\n final int w = getWidth() - insets.left - insets.right;\n final int h = getHeight() - insets.top - insets.bottom;\n final int x = insets.left;\n int y = insets.top;\n int nRows = 0;\n int startRow = 0;\n int height = getRowHeight();\n if (height > 0) {\n nRows = h / height;\n } else {\n // Paint non-uniform height rows first\n final int nItems = getRowCount();\n height = 17; // A default for empty trees\n for (int i = 0; i < nItems; i++, y += height) {\n height = getRowBounds(i).height;\n g.setColor(rowColors[i & 1]);\n g.fillRect(x, y, w, height);\n }\n // Use last row height for remainder of tree area\n nRows = nItems + (insets.top + h - y) / height;\n startRow = nItems;\n }\n\n for (int i = startRow; i < nRows; i++, y += height) {\n g.setColor(rowColors[i & 1]);\n g.fillRect(x, y, w, height);\n }\n\n final int remainder = insets.top + h - y;\n if (remainder > 0) {\n g.setColor(rowColors[nRows & 1]);\n g.fillRect(x, y, w, remainder);\n }\n\n // Paint component\n setOpaque(false);\n super.paintComponent(g);\n setOpaque(true);\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n if (e.getButton() == MouseEvent.BUTTON3) {\n int rowUnderMouse = getTable().rowAtPoint(e.getPoint());\n// if (rowUnderMouse != -1 && !getTable().isRowSelected(rowUnderMouse)) {\n// selected = rowUnderMouse;\n// }\n selected = rowUnderMouse;\n }\n }",
"private void paintBox(Graphics g, TextInBox textInBox) {\n g.setColor(BOX_COLOR);\n Rectangle2D.Double box = getBoundsOfNode(textInBox);\n g.fillRoundRect((int) box.x, (int) box.y, (int) box.width - 1,\n (int) box.height - 1, ARC_SIZE, ARC_SIZE);\n g.setColor(BORDER_COLOR);\n g.drawRoundRect((int) box.x, (int) box.y, (int) box.width - 1,\n (int) box.height - 1, ARC_SIZE, ARC_SIZE);\n\n // draw the text on top of the box (possibly multiple lines)\n g.setColor(TEXT_COLOR);\n String[] lines = textInBox.text.split(\"\\n\");\n FontMetrics m = getFontMetrics(getFont());\n int x = (int) box.x + ARC_SIZE / 2;\n int y = (int) box.y + m.getAscent() + m.getLeading() + 1;\n for (int i = 0; i < lines.length; i++) {\n g.drawString(lines[i], x, y);\n y += m.getHeight();\n }\n }",
"private void drawBox(Graphics2D g2d, int y, int wid, int hei) {\n g2d.setColor(Dark_Gray);\n Triangle triangle1 = new Triangle(new Point(wid / 3, y), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle1.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle2 = new Triangle(new Point(2 * wid / 3, y + hei / 10), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid / 3, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10 - 8));\n triangle3.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle4 = new Triangle(new Point(2 * wid / 3, y), new Point(2 * wid / 3 - 8, y), new Point(2 * wid / 3 - 8, y + 8));\n triangle4.fill(g2d);\n g2d.setColor(Color.BLACK);\n g2d.fillRect(wid / 3 + 4, y + 4, wid / 3 - 8, hei / 10 - 8);\n }",
"void testDrawRow(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.indexHelp(0, 0).drawRow(2),\r\n new BesideImage(this.game2.indexHelp(0, 0).drawCell(2),\r\n this.game2.indexHelp(0, 0).right.drawRow(2)));\r\n\r\n t.checkExpect(this.game3.indexHelp(0, 0).drawRow(3),\r\n new BesideImage(this.game3.indexHelp(0, 0).drawCell(3),\r\n this.game3.indexHelp(0, 0).right.drawRow(3)));\r\n\r\n t.checkExpect(this.game5.indexHelp(0, 0).drawRow(4),\r\n new BesideImage(this.game5.indexHelp(0, 0).drawCell(4),\r\n this.game5.indexHelp(0, 0).right.drawRow(4)));\r\n t.checkExpect(this.game2.indexHelp(-1, -1).drawRow(3), new EmptyImage());\r\n }",
"public void paint() {\n for (int row = 0; row < ROWS; ++row) {\n for (int col = 0; col < COLS; ++col) {\n cells[row][col].paint();\n if (col < COLS - 1) System.out.print(\"|\");\n }\n System.out.println();\n if (row < ROWS - 1) {\n System.out.println(\"-----------\");\n }\n }\n }",
"@Override\n\tpublic void mousePressed(MouseEvent arg0) {\n\t\tint x = arg0.getX() / 20;\n\t\tint y = arg0.getY() / 20;\n\t\tGraphics g = this.getGraphics();\n\t\tg.setColor(Color.black);\n\t\tg.fillRect(x * 20, y * 20, 20, 20);\n\t\tg.setColor(Color.gray);\n\t\tg.drawRect(x * 20, y * 20, 20, 20);\n\t\t// System.out.println(\"x: \" + x + \" y: \" + y);\n\t\tthis.selected.add(y * 64 + x);\n\n\t}",
"private void highlight(final CellView cellView) {\r\n if (cellView != null) {\r\n highlight.setBounds(getHighlightBounds(cellView));\r\n if (highlight.getParent() == null) {\r\n GraphComponent.this.add(highlight);\r\n highlight.setVisible(true);\r\n }\r\n } else {\r\n if (highlight.getParent() != null) {\r\n highlight.setVisible(false);\r\n highlight.getParent().remove(highlight);\r\n }\r\n }\r\n }",
"private void stateChanged() {\n\t\tfor (Row r : containingRows) {\n\t\t\tr.selectSquare(this);\n\t\t}\n\t}",
"private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }",
"public void mouseExited(MouseEvent e) {\n if (isDraging){// ger fal kardane khanehaye drag shode ba raftane dobare ruye Anha\n setNotCopying();\n if(mlpp1<mlp1){// baraye raftan be paein\n for(int p=mlpp1;p<=mlp1; p++){\n if(mlpp2<mlp2)// baraye raftan be paein samte rast\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye raftan be pain samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane raftan be paein\n if(mlpp1>mlp1){// baraye raftan be bala\n for(int p=mlpp1;p>=mlp1; p--){\n if(mlpp2<mlp2)// baraye raftan be bala samte rast\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye raftan be bala samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane harekat be bala.\n if(mlpp2<mlp2)// baraye raftan be rast\n for(int k=mlpp2 ; k<=mlp2;k++){\n jtf[mlpp1][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye harekat be chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[mlpp1][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane geyre fa'al kardane khane haye drag shode\n if(e.getSource()==jtf[mlp1][mlp2]) // agar az samte paein az khane sabz kharej shod-\n if(jtf[mlp1][mlp2].getBackground()==Color.green)//- range an bayad be abi tabdil shawad.\n jtf[mlp1][mlp2].setBackground(Color.blue);\n }",
"@Override\n public void normalCell() {\n gCell.setFill(Color.BLACK);\n }",
"public void onRowMajorFillButtonClick()\n {\n for ( int row = 0; row < theGrid.numRows(); row++ )\n {\n for ( int column = 0; column < theGrid.numCols(); column++ )\n {\n placeColorBlock(row, column);\n }\n }\n }",
"@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\tdrawRectangle(selectionCanvas);\n\n\t\t\t\tcurrentMouseBox.setEndx(event.getX());\n\t\t\t\tcurrentMouseBox.setEndy(event.getY());\n\t\t\t}",
"@Override\r\n\tpublic void drawCell(Graphics2D g2) {\n\t\tAffineTransform original = g2.getTransform();\r\n\t\t\r\n\t\tg2.translate(pos.x,pos.y);\r\n\t\tif(scale<=0) {\r\n\t\t\tscale=0;\r\n\t\t}\r\n\t\t\r\n\t\tif(scale>=1) {\r\n\t\t\tscale=1;\r\n\t\t}\r\n\t\tg2.scale(scale, scale);\r\n\t\t\r\n\t\tAffineTransform point = g2.getTransform();\r\n\t\t\r\n\t\thitBox = outline.createTransformedArea(point);\r\n\t\t\r\n\t\tg2.setColor(new Color(232,65,143));\r\n\t\tif(passable) g2.setColor(new Color(70,59,71));\r\n\t\tg2.fill(cellBody);\r\n\t\t\r\n\t\tg2.setTransform(original);\r\n\t\t\r\n\t}",
"protected void setBoxBackground() { Console.setBackground(Console.RED); }",
"public abstract WorldImage drawRow(int blocks);",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }",
"@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }",
"@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }",
"@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif (i >= size)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"insertion sort terminated\");\n\t\t\t\t\ttimer.stop();\n\t\t\t\t\tbox.setColorRange(0, box.getNumber() - 1, END_COLOR);\n\t\t\t\t\tpaintBox();\n\t\t\t\t}\n\t\t\t\t// Step one find a suitable index where to place the current rectangle\n\t\t\t\telse if (codeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\tcurrRect.setColor(FOCUS_COLOR1);\n\t\t\t\t\tRectangle scanRect;\n\t\t\t\t\tfor (k = i - 1; k >= 0; k--)\n\t\t\t\t\t{\n\t\t\t\t\t\tscanRect = box.getRectangle(k);\n\t\t\t\t\t\tscanRect.setColor(FOCUS_COLOR2);\n\t\t\t\t\t\tif (scanRect.getData() > currRect.getData())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// getting the index of first rectangle to move to the left\n\t\t\t\t\tindex = i - 1;\n\t\t\t\t\tcodeFlag = 0;\n\t\t\t\t\tdownFlag = 1;\n\t\t\t\t\tcurrentDownCount = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//moving the current rectangle down\n\t\t\t\telse if (downFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tbox.addOffsetRectangle(i, 0, YCHANGE);\n\t\t\t\t\tpaintBox();\n\t\t\t\t\tcurrentDownCount += YCHANGE;\n\t\t\t\t\tif (currentDownCount >= DOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tint excess = currentDownCount - DOWN;\n\t\t\t\t\t\tbox.addOffsetRectangle(i, 0, -excess);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tdownFlag = 0;\n\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// moving the block of rectangle to the left\n\t\t\t\telse if (rightBlockFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tif (index <= k)\n\t\t\t\t\t{\n\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\tleftFlag = 1;\n\t\t\t\t\t\tcurrentLeftCount = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\trightFlag = 1;\n\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// moving each rectangle of the block to the right\n\t\t\t\telse if (rightFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tbox.addOffsetRectangle(index, XCHANGE, 0);\n\t\t\t\t\tpaintBox();\n\t\t\t\t\tindexRightCount += XCHANGE;\n\t\t\t\t\t\n\t\t\t\t\tif (indexRightCount >= width)\n\t\t\t\t\t{\n\t\t\t\t\t\tint excess = indexRightCount - width;\n\t\t\t\t\t\tbox.addOffsetRectangle(index, -excess, 0);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\trightFlag = 0;\n\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\tindex--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// moving the current rectangle to the left\n\t\t\t\telse if (leftFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tbox.addOffsetRectangle(i, -XCHANGE, 0);\n\t\t\t\t\tcurrentLeftCount += XCHANGE;\n\t\t\t\t\tpaintBox();\n\t\t\t\t\tif (currentLeftCount >= width * (i - 1 - k))\n\t\t\t\t\t{\n\t\t\t\t\t\tint excess = currentLeftCount - width * (i - 1 - k);\n\t\t\t\t\t\tbox.addOffsetRectangle(i, excess, 0);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tleftFlag = 0;\n\t\t\t\t\t\tupFlag = 1;\n\t\t\t\t\t\tcurrentUpCount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// moving the current rectangle up\n\t\t\t\telse if (upFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tbox.addOffsetRectangle(i, 0, -YCHANGE);\n\t\t\t\t\tcurrentUpCount += YCHANGE;\n\t\t\t\t\tpaintBox();\n\t\t\t\t\tif (currentUpCount >= DOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tint excess = currentUpCount - DOWN;\n\t\t\t\t\t\tbox.addOffsetRectangle(i, 0, excess);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Reflecting the changes internally\n\t\t\t\t\t\t\n\t\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\t\tcurrRect.setColor(FOCUS_COLOR2);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tRectangle scanRect;\n\t\t\t\t\t\tint t;\n\t\t\t\t\t\tfor (t = i - 1; t >= 0; t--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscanRect = box.getRectangle(t);\n\t\t\t\t\t\t\tif (scanRect.getData() > currRect.getData())\n\t\t\t\t\t\t\t\tbox.setRectangle(box.getRectangle(t), t + 1);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbox.setRectangle(currRect, t + 1);\n\t\t\t\t\t\tdelayFlag1 = 1;\n\t\t\t\t\t\tupFlag = 0;\n\t\t\t\t\t\tdelay1 = 0;\n\t\t\t\t\t\tupFlag = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (delayFlag1 == 1)\n\t\t\t\t{\n\t\t\t\t\tdelay1++;\n\t\t\t\t\tif (delay1 >= DELAY)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayFlag1 = 0;\n\t\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }",
"public synchronized void highlight(Parent pane) {\n if (this.parent != null && !boxes.isEmpty()) {\n clear();\n }\n\n this.parent = pane;\n\n ArrayList<Rectangle> allRectangles = new ArrayList<>(processAllTextNodes(pane));\n\n allRectangles.addAll(processCodeAreas(parent));\n\n JFXUtilities.runInFXAndWait(()-> getParentChildren(pane).addAll(allRectangles));\n }",
"public abstract Rect getRectForNodeHighlight();",
"private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }",
"public void clearHighlightTile() {\n\t\tfor(int i = 0;i < 8;i++) {\n\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\tif(rect.getStrokeType() == StrokeType.INSIDE){\n\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\trect.setStroke(Color.TRANSPARENT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private TextBox drawMatch(TextBox boxBlue, TextBox boxRed, Group group, int level) {\n\n //BoxBlue\n double beginXBlue = boxBlue.getLayoutX();\n double beginYBlue = boxBlue.getLayoutY();\n //BoxRed\n double beginXRed = boxRed.getLayoutX();\n double beginYRed = boxRed.getLayoutY();\n //LineBlue Horizontale\n double beginXLineHBlue = beginXBlue + widthRectangle;\n double beginYLineHBlue = beginYBlue + heightRectangle;\n double endXLineHBlue = beginXLineHBlue + spaceBetweenMatch;\n double endYLineHBlue = beginYBlue + heightRectangle;\n //LineBlue Verticale\n double beginXLineVBlue = endXLineHBlue;\n double beginYLineVBlue = beginYLineHBlue;\n double endXLineVBlue = endXLineHBlue;\n double endYLineVBlue = ((beginYRed - endYLineHBlue) / 2) + endYLineHBlue - (heightRectangle / 2);\n\n //LineRed Horizontale\n double beginXLineHRed = beginXRed + widthRectangle;\n double beginYLineHRed = beginYRed;\n double endXLineHRed = beginXLineHRed + spaceBetweenMatch;\n double endYLineHRed = beginYRed;\n //LineRed Verticale\n double beginXLineVRed = endXLineHRed;\n double beginYLineVRed = endYLineHRed;\n double endXLineVRed = endXLineHRed;\n double endYLineVRed = endYLineVBlue + heightRectangle;\n\n double beginXResultat = endXLineHBlue;\n double beginYResultat = endYLineVBlue;\n\n Color colorResultat = Color.color(1.0, 1.0, 0.0, 0.5);\n if (level % 2 == 0) {\n colorResultat = Color.color(0.0, 1.0, 1.0, 0.5);\n }\n\n Line lineBlueH = drawLine(beginXLineHBlue, beginYLineHBlue , endXLineHBlue, endYLineHBlue);\n Line lineBlueV = drawLine(beginXLineVBlue, beginYLineVBlue , endXLineVBlue, endYLineVBlue);\n\n Line lineRedH = drawLine(beginXLineHRed, beginYLineHRed , endXLineHRed, endYLineHRed);\n Line lineRedV = drawLine(beginXLineVRed, beginYLineVRed , endXLineVRed, endYLineVRed);\n\n TextBox victoryBox = createTextBox(new ParticipantBean(\"\", \"\"), beginXResultat, beginYResultat, colorResultat);\n TextBox defaitBox = new TextBox(new ParticipantBean(\"\", \"\"), widthRectangle, heightRectangle, colorResultat);\n\n group.getChildren().addAll(victoryBox, lineBlueH, lineRedH, lineBlueV, lineRedV);\n\n TextBoxListner textBoxListner = new TextBoxListner(boxBlue, boxRed, victoryBox, defaitBox);\n boxBlue.setListner(textBoxListner);\n boxRed.setListner(textBoxListner);\n\n return victoryBox;\n }",
"@Override\n public void redCell() {\n gCell.setFill(Color.ORANGERED);\n }",
"private void initHighlightLines()\r\n\t{\t\t\r\n\t\tfofHighlightRect = lang.newRect(new Offset(-2, -2, \"sourceCode\", AnimalScript.DIRECTION_NW), new Offset(2, 13*21, \"sourceCode\", AnimalScript.DIRECTION_NE), \"fofHighlightRect\", null, fofSourceCodeHighlightRect);\r\n\t\taddAdjHighlightRect = lang.newRect(new Offset(0, 5, \"fofHighlightRect\", AnimalScript.DIRECTION_SW), new Offset(2, 2, \"sourceCode\", AnimalScript.DIRECTION_SE), \"addAdjHighlightRect\", null, addAdjSourceCodeHighlightRect);\r\n\t\t\r\n\t\tfofHighlightRect.hide();\r\n\t\taddAdjHighlightRect.hide();\r\n\t}",
"public void drawBox( Graphics window, Color i, int x, int y )\n\t{\n\t\twindow.setColor(i);\n\t\twindow.fillRect(x,y,100,100);\n\t\t// this code \"erases\" the center of the box by painting over it in white\n\t\twindow.setColor(Color.WHITE);\n\t\twindow.fillRect(x+10,y+10,80,80);\n\t}",
"public void paint () {\n\t\tPaint.clear();\n\t\t\n\t\tPaint.setColor(Color.WHITE);\n\t\tPaint.fillRect(0,0,numcols_ * cellsize_,numrows_ * cellsize_);\n\t\tPaint.setColor(Color.GRAY);\n\t\tPaint.drawRect(0,0,numcols_ * cellsize_ - 1,numrows_ * cellsize_ - 1);\n\n\t\tfor ( int row = 0 ; row < numrows_ ; row++ ) {\n\t\t\tfor ( int col = 0 ; col < numcols_ ; col++ ) {\n\t\t\t\tint x = col * cellsize_;\n\t\t\t\tint y = row * cellsize_;\n\n\t\t\t\tThing thing = at(row,col);\n\t\t\t\tif ( thing != null ) {\n\t\t\t\t\tthing.paint(x,y,cellsize_,cellsize_);\n\t\t\t\t}\n\t\t\t\tPaint.setColor(Color.GRAY);\n\t\t\t\tPaint.drawRect(x,y,cellsize_,cellsize_);\n\t\t\t}\n\t\t}\n\n\t}",
"@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }",
"public void mouseClicked(MouseEvent e)\r\n {\n if (selectedSquare != null)\r\n {\r\n if (selectedSquare.getIsBlank())\r\n {\r\n selectedSquare.setBackground(Color.BLACK);\r\n }\r\n else\r\n {\r\n selectedSquare.setBackground(Color.WHITE);\r\n }\r\n\r\n if (selectedWord != null)\r\n {\r\n selectedWord.setIsSelected(false);\r\n }\r\n }\r\n\r\n requestFocus(); //give focus to the grid to capture key strokes\r\n Square sq = (Square) e.getSource();\r\n selectedSquare = sq;\r\n\r\n if (doSelectStart)\r\n {\r\n sq.setBackground(Color.WHITE);\r\n sq.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n sq.setIsBlank(false);\r\n startSquare = sq;\r\n startSquare.setBackground(Color.BLUE);\r\n startSquare.setResetColour(Color.BLUE);\r\n doSelectStart = false;\r\n doSelectEnd = true;\r\n }\r\n else if (doSelectEnd)\r\n {\r\n //check that this square is in line with the first\r\n if (sq.getX() != startSquare.getX() &&\r\n sq.getY() != startSquare.getY())\r\n {\r\n JOptionPane.showMessageDialog(null,\r\n \"Words must be horizontal or vertical only\");\r\n }\r\n else if (sq.getX() < startSquare.getX() ||\r\n sq.getY() < startSquare.getY())\r\n {\r\n JOptionPane.showMessageDialog(null,\r\n \"The last square of the word must not come before the first square of the word.\");\r\n }\r\n else\r\n {\r\n sq.setBackground(Color.WHITE);\r\n sq.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n sq.setIsBlank(false);\r\n endSquare = sq;\r\n startSquare.setBackground(Color.WHITE);\r\n startSquare.setResetColour(Color.WHITE);\r\n doSelectEnd = false;\r\n CreateWord();\r\n selectedWord = selectedSquare.getNextWord();\r\n if (selectedWord != null) selectedWord.setIsSelected(true);\r\n repopulateWords();\r\n }\r\n }\r\n else\r\n {\r\n selectedWord = selectedSquare.getNextWord();\r\n if (selectedWord != null) selectedWord.setIsSelected(true);\r\n repopulateWords();\r\n }\r\n }",
"public void draw(Graphics g) {\n g.setColor(needsHighlight() ? selectColor : Color.GRAY);\n setBbox(x1, y1, x2, y2);\n g.setLineDash(16, 6);\n if (x1 < x2 && y1 < y2) {\n g.drawRect(x1, y1, x2 - x1, y2 - y1);\n } else if (x1 > x2 && y1 < y2) {\n g.drawRect(x2, y1, x1 - x2, y2 - y1);\n } else if (x1 < x2 && y1 > y2) {\n g.drawRect(x1, y2, x2 - x1, y1 - y2);\n } else {\n g.drawRect(x2, y2, x1 - x2, y1 - y2);\n }\n g.setLineDash(0, 0);\n }",
"@Override\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\ttbls[innerI].setOpaque(false);\n\t\t\t\t\ttbls[innerI].repaint();\n\t\t\t\t}",
"public void highlightTile(ArrayList<Position> positions) {\n\t\thighlightTile();\n\t\tfor(Position p : positions) {\n\t\t\tfor(int i = 0;i < 8;i++) {\n\t\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\t\tif(p.getX() == i && p.getY() == j){\n\t\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\t\trect.setStrokeWidth(2.0);\n\t\t\t\t\t\trect.setStroke(Color.RED);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic Component prepareRenderer(TableCellRenderer renderer, int row, int column)\n\t{\n Component c = super.prepareRenderer(renderer, row, column);\n if (!c.getBackground().equals(getSelectionBackground()))\n {\n String type = (String)getModel().getValueAt(row, column);\n //if this value is not in the known data file\n if(session.isMispelled(type, column-1))\n {\n \t session.markCellAsMispelled(row, column);\n \t c.setBackground(Color.RED);\n \t c.addMouseListener(rightClickListener);\n }\n \n else\n {\n \t session.markCellAsNotMispelled(row, column);\n \t c.setBackground(Color.WHITE);\n \t c.removeMouseListener(rightClickListener);\n }\n }\n return c;\n\t}",
"private void handleMouseHover(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n if (!alive) {\n cell.setFill(Color.LIGHTGRAY);\n } else {\n cell.setFill(Color.DARKGRAY);\n }\n }\n }",
"public void paint(final Graphics g) {\n Rectangle r = TextUtils.getEditorRect(component);\n for (int i = 0; i < highlights.size(); i++) {\n HighlightImpl hElem = highlights.getElem(i);\n int start = hElem.getStartOffset();\n int end = hElem.getEndOffset();\n if (hElem.needSimplePaint()) {\n hElem.getPainter().paint(g, start, end, r, component);\n }\n }\n }",
"private void paintTable()\r\n\t{\r\n\t\tfor(int i=0;i<100;++i)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<100;++j)\r\n\t\t\t{\r\n\t\t\t\tif(game.checkCell(i,j)==true)\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.black);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void selectedCellChanged(int row, int col)\n\t{\n\t\tshapes.remove(1);\n\t\t\n\t\tshapes.add(new DrawingRect(new Rectangle2D.Double(\n\t\t\t\tbs.getBatchInfo().getFields().get(bs.getCellSelectedColumn()).getXCoordinate(),\n\t\t\t\tbs.getBatchInfo().getFirstYCoordinate() + bs.getBatchInfo().getRecordHeight()\n\t\t\t\t\t* (bs.getCellSelectedRow()),\n\t\t\t\t\n\t\t\t\t//same\n\t\t\t\tbs.getBatchInfo().getFields().get(bs.getCellSelectedColumn()).getWidth(),\n\t\t\t\t//same\n\t\t\t\tbs.getBatchInfo().getRecordHeight()), \n\t\t\t\tcolor));\n\t\t\n\t\tthis.repaint();\n\t}",
"private static void paintRectangleWithHighlightColour(Graphics2D g2d,\n\t\t\tint width, int height) {\n\t\tGeneralPath path = new GeneralPath();\n\t\tpath.moveTo(0, 0);\n\t\tpath.lineTo(width - 1, 0);\n\t\tpath.lineTo(width - 1, height - 1);\n\t\tpath.lineTo(0, height - 1);\n\t\tpath.closePath();\n\n\t\tPaint oldPaint = g2d.getPaint();\n\t\tStroke oldStroke = g2d.getStroke();\n\n\t\tColor c = UIManager.getColor(\"textHighlight\");\n\n\t\tg2d.setStroke(new BasicStroke(2, BasicStroke.CAP_BUTT,\n\t\t\t\tBasicStroke.JOIN_MITER));\n\t\tg2d.setPaint(c);\n\t\tg2d.draw(path);\n\n\t\tColor alpha = new Color(c.getRed(), c.getGreen(), c.getBlue(), 50);\n\t\tg2d.setPaint(alpha);\n\t\tg2d.fill(path);\n\n\t\tg2d.setPaint(oldPaint);\n\t\tg2d.setStroke(oldStroke);\n\n\t}",
"public void highlightStop() {\n actualFillColor = new Color(0, 0, 0, 150);\n repaint();\n revalidate();\n }",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}",
"@Override\n protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 15, 50);\n }",
"public void PRCRender() {\n if(rollOver) {\n object.getStyle().setFillColorFloat(20);\n } else if(dragging) {\n object.getStyle().setFillColorFloat(5);\n } else {\n object.style.setFillColorFloat(100);\n }\n object.render();\n }",
"public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {\n modifiedEditor.paintValue (gfx, box);\n }",
"private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n //TestInfo.testWriteLn(\"Plain Text: \" + text);\n text = processEscapeChars(text);\n //TestInfo.testWriteLn(\"Escape Text: \" + text);\n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }",
"@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }",
"private void repaintRow(int index, boolean value){\n\t\ttry{\n\t\t\tView temp=PollSelectionTable.this.getChildAt(index);\n\t\t\tCheckBox cbTemp=(CheckBox)temp.findViewById(R.id.chk);\n\t\t\tTextView txtTemp=(TextView)temp.findViewById(R.id.txtChoice);\n\t\t\tcbTemp.setChecked(value);\n\t\t\ttxtTemp.setTextColor(value?getResources().getColor(R.color.green_slider):getResources().getColor(R.color.gray));\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void paintCursor() {\r\n }",
"public void paint(Graphics pane) {\r\n\t\tfinal int DELTA = 2; // The offset within the box/frame\r\n\r\n\t\tpane.setColor(Color.black); // Drawing the box/frame of the element\r\n\t\tpane.drawRect(x, y, WIDTH, HEIGHT);\r\n\r\n\t\tpane.setColor(color); // and the inside of the element\r\n\t\tpane.fill3DRect(x + DELTA, y + DELTA, WIDTH - 2 * DELTA + 1, HEIGHT - 2\r\n\t\t\t\t* DELTA + 1, hilite);\r\n\t}",
"@Override\n public void mousePressed(MouseEvent arg0) {\n yourBoardPanel[xx][yy].setBackground(new Color(175, 175, 0));\n }",
"public void rowChecked(){\n\t\tint numRows = 0;\n\t\tboolean full;\n\t\tint row = well[0].length - 2;\n\t\twhile(!emptyRow(row)){\n\t\t\tfull = true;\n\t\t\tfor(int i = 0; i < well.length; i++){\n\t\t\t\tif(well[i][row] == Color.WHITE)\n\t\t\t\t\tfull = false;\n\t\t\t}\n\t\t\tif(full){\n\t\t\t\tdeleteRow(row);\n\t\t\t\tnumRows++;\n\t\t\t}\n\t\t\telse row--;\n\t\t}\n\t\tswitch(numRows){\n\t\t\tcase 0: break;\n\t\t\tcase 1: score += 100; break;\n\t\t\tcase 2: score += 200; break;\n\t\t\tcase 3: score += 400; break;\n\t\t\tcase 4: score += 800; break;\n\t\t\tcase 5: score += 1600; break;\n\t\t}\n\t}",
"private void drawBox(Graphics2D g)\n\t{\n\t\t// Resize values with magic numbers\n\t\tLine2D.Double line = new Line2D.Double();\n\t\tStroke drawingStroke = new BasicStroke(3, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);\t\t\n\t\tg.setStroke(drawingStroke);\n\t\tmidBoxWidth = super.getWidth() - 234;\n\t\tmidBoxHeight = super.getHeight() - 55;\n\t\tORIGIN_X = MID_BOX_X + AXIS_X_GAP;\n\t\tORIGIN_Y = MID_BOX_Y + midBoxHeight - AXIS_X_GAP;\n\n\t\t/**\n\t\t * Super hard coded for now \n\t\t */\n\n\t\t// White background\n\t\tRectangle2D middle = new Rectangle2D.Double(MID_BOX_X, MID_BOX_Y, midBoxWidth, midBoxHeight);\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fill(middle);\n\t\t// Drawing borders\n\t\tg.setColor(Color.black);\n\t\t// Top\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y, MID_BOX_X + midBoxWidth, MID_BOX_Y);\n\t\tg.draw(line);\n\t\t// Left\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y, MID_BOX_X, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\t\t// Bottom\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y + midBoxHeight, MID_BOX_X + midBoxWidth, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\t\t// Right\n\t\tline.setLine(MID_BOX_X + midBoxWidth, MID_BOX_Y, MID_BOX_X + midBoxWidth, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\n\t\t// Drawing Axes\n\t\tdrawingStroke = new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND);\n\t\tg.setStroke(drawingStroke);\n\t\t// Y-axis\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + midBoxHeight - AXIS_Y_GAP/2);\n\t\tg.draw(line);\t\n\n\t\t// Arrow Tip\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP + 10, MID_BOX_Y + AXIS_Y_GAP/2 + 15);\n\t\tg.draw(line);\t\t\t\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP - 10, MID_BOX_Y + AXIS_Y_GAP/2 + 15);\n\t\tg.draw(line);\t\n\n\t\t// X-axis\n\t\tline.setLine(MID_BOX_X + AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP);\n\t\tg.draw(line);\n\t\t// Arrow tip\n\t\tline.setLine(MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2 - 15, MID_BOX_Y + midBoxHeight - AXIS_X_GAP + 10);\n\t\tg.draw(line);\t\t\t\n\t\tline.setLine(MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2 - 15, MID_BOX_Y + midBoxHeight - AXIS_X_GAP - 10);\n\t\tg.draw(line);\t\n\n\t\tnew BasicStroke(2, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);\n\t\tg.setStroke(drawingStroke);\n\n\t\t// Axis labels\n\t\tg.setColor(Color.black);\n\t\tg.rotate(Math.toRadians(-90));\n\n\t\t// Magic numbers - even I don't know what they are but they somehow centres the text\n\t\tswitch (graph) {\n\t\tcase ARRIVAL: {\n\t\t\tg.drawString(\"Total arrivals per interval (cars)\", -midBoxHeight/2 - 80, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tcase MAX_QUEUE_TIME: {\n\t\t\tg.drawString(\"Max Queue Time (seconds)\", -midBoxHeight/2 - 70, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tcase AVG_QUEUE_TIME: {\n\t\t\tg.drawString(\"Average Queue Time (seconds)\", -midBoxHeight/2 - 80, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tg.rotate(Math.toRadians(90));\n\t\tg.drawString(\"Time Interval (minutes)\", MID_BOX_X + midBoxWidth/2 - 50, MID_BOX_Y + midBoxHeight - AXIS_Y_GAP/2 + 18);\n\t}",
"@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"private void drawSelectedTextBackground(Canvas canvas,float offsetX,int color){\n int startLine = mCursor.getLeftLine();\n int endLine = mCursor.getRightLine();\n int leftLine = startLine;\n int rightLine = endLine;\n if(startLine < getFirstVisibleLine()) {\n startLine = getFirstVisibleLine();\n }\n if(endLine > getLastVisibleLine()) {\n endLine = getLastVisibleLine();\n }\n if(startLine < 0) {\n startLine = 0;\n }\n if(endLine > getLineCount()) {\n endLine = getLineCount() - 1;\n }\n for(int line = startLine;line <= endLine;line++){\n int start = 0,end = getText().getColumnCount(line);\n if(line == leftLine){\n start = mCursor.getLeftColumn();\n }\n if(line == rightLine){\n end = mCursor.getRightColumn();\n }\n mRect.top = getLineTop(line) - getOffsetY();\n mRect.bottom = mRect.top + getLineHeight();\n prepareLine(line);\n mRect.left = offsetX + measureText(mChars,0,start);\n mRect.right = mRect.left + measureText(mChars,start,end - start) + mDpUnit * 3;\n drawColor(canvas,color,mRect);\n }\n }",
"private void refresh(int width, int height) {\n Integer numUnexposed = mainField.numUnexposed();\n nonminesLabel.setText(numUnexposed.toString());\n Integer numMarked = mainField.numMarked();\n if (numMarked < 0) {\n cellsUnmarked.setText(\"Too Many Marked!\");\n }\n else {\n cellsUnmarked.setText(numMarked.toString());\n }\n // iterate through all the buttons and update the text if it's an exposed cell\n for (int i = 0;i < width;i++) {\n for (int j = 0;j < height;j++) {\n int cellState = mainField.getCellState(i,j);\n if (cellState == mainField.EXPOSED) {\n Integer numValue = mainField.getValue(i,j);\n if (numValue == -1) {\n btArray[i][j].setText(\"B\");\n btArray[i][j].setStyle(\"-fx-background-color: #FF0000;\");\n }\n else if (numValue == 0) {\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n else {\n btArray[i][j].setText(numValue.toString());\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n }\n }\n }\n }",
"protected void attemptGridPaintSelection() {\n/* 314 */ Color c = JColorChooser.showDialog(this, localizationResources.getString(\"Grid_Color\"), Color.blue);\n/* */ \n/* 316 */ if (c != null) {\n/* 317 */ this.gridPaintSample.setPaint(c);\n/* */ }\n/* */ }",
"default void highlight()\n {\n JavascriptExecutor executor = (JavascriptExecutor) environment().getDriver();\n\n executor\n .executeScript(\"arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;'); \"\n + \"arguments[0].setAttribute('highlighted', 'true')\", element());\n }",
"public void removeHighlight() {\n if (highlightWord == null) {\r\n return;\r\n }\r\n \r\n for (int i = 0; i < highlightWord.length(); i++) {\r\n if (hightlightDir == Ranker.RIGHT) {\r\n cells[highlightX][highlightY + i].highlight((char) 0);\r\n } else {\r\n cells[highlightX + i][highlightY].highlight((char) 0);\r\n }\r\n }\r\n repaint();\r\n }",
"public void lightMyPawns() {\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n Cell cell = table.getTableCell(i, j);\n if (cell.getPawn() != null && cell.getPawn().getIdGamer() == getID() && cell.getPawn().getICanPlay()) {\n bt[i][j].setStyle(\"-fx-border-color:red\");\n bt[i][j].setOnMouseEntered(e -> {\n Button button;\n button = (Button) e.getSource();\n int x = GridPane.getRowIndex(button);\n int y = GridPane.getColumnIndex(button);\n bt[x][y].setStyle(\"-fx-border-color:yellow\");\n });\n bt[i][j].setOnMouseExited(e -> {\n Button button;\n button = (Button) e.getSource();\n int x = GridPane.getRowIndex(button);\n int y = GridPane.getColumnIndex(button);\n bt[x][y].setStyle(\"-fx-border-color:red\");\n });\n bt[i][j].setDisable(false);\n bt[i][j].setOnAction(e -> {\n Button bOne;\n bOne = (Button) e.getSource();\n int x = GridPane.getRowIndex(bOne);\n int y = GridPane.getColumnIndex(bOne);\n for (int i1 = 0; i1 < 5; i1++) {\n for (int j1 = 0; j1 < 5; j1++) {\n Cell cell1 = table.getTableCell(i1, j1);\n if (cell1.getPawn() != null && cell1.getPawn().getIdGamer() == getID()) {\n if (i1 == x && j1 == y) {\n bt[i1][j1].setStyle(\"-fx-border-color:red\");\n bt[i1][j1].setDisable(true);\n\n } else {\n bt[i1][j1].setStyle(\"-fx-border-color:transparent\");\n bt[i1][j1].setDisable(true);\n }\n }\n }\n }\n\n System.out.print(\"***Id pedina: \" + table.getTableCell(x, y).getPawn().getIdPawn());\n System.out.println(\"\\tId Giocatore: \" + table.getTableCell(x, y).getPawn().getIdGamer() + \"***\\n\");\n currentMove.setIdPawn(table.getTableCell(x, y).getPawn().getIdPawn());\n currentPawn = currentMove.getIdPawn();\n lightAvailable(table.getTableCell(x, y), bOne);\n });\n }\n }\n }\n }",
"protected abstract void paintSelection(Graphics2D g);",
"@Override\r\n\tprotected void draw() {\n\t\tgoodCabbage = new Oval(center.x - CABBAGE_RADIUS, center.y\r\n\t\t\t\t- CABBAGE_RADIUS, 2 * CABBAGE_RADIUS, 2 * CABBAGE_RADIUS,\r\n\t\t\t\tColor.red, true);\r\n\t\twindow.add(goodCabbage);\r\n\t}",
"public void drawCell()\n {\n // if mouse is not inside tile area dont draw anything\n if(showHover)\n {\n noStroke();\n \n rect(firstCellPosition[0]+hover[0]*cellSize,firstCellPosition[1]+hover[1]*cellSize,cellSize-1,cellSize-1);\n \n if(brushSize == 1)\n {\n if(!pattern[hover[0]][hover[1]])\n {\n pattern[hover[0]][hover[1]] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]][hover[1]] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+hover[0]*cellSize,firstCellPosition[1]+hover[1]*cellSize,cellSize-1,cellSize-1);\n }\n if(brushSize == 2)\n {\n for(int i = 0; i < 2; i++)\n {\n for(int j = 0; j < 2; j++)\n {\n if(hover[0]+i < xCells && hover[1]+j < yCells)\n {\n if(!pattern[hover[0]+i][hover[1]+j])\n {\n pattern[hover[0]+i][hover[1]+j] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]+i][hover[1]+j] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+(hover[0]+i)*cellSize,firstCellPosition[1]+(hover[1]+j)*cellSize,cellSize-1,cellSize-1);\n }\n }\n }\n }\n if(brushSize == 3)\n {\n for(int i = -1; i < 2; i++)\n {\n for(int j = -1; j < 2; j++)\n {\n if(hover[0]+i < xCells && hover[1]+j < yCells &&\n hover[0]+i >= 0 && hover[1]+j >= 0 )\n {\n if(!pattern[hover[0]+i][hover[1]+j])\n {\n pattern[hover[0]+i][hover[1]+j] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]+i][hover[1]+j] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+(hover[0]+i)*cellSize,firstCellPosition[1]+(hover[1]+j)*cellSize,cellSize-1,cellSize-1);\n }\n }\n }\n }\n }\n }",
"public void paint(Graphics g) {\n\t Dimension size = getSize();\n\n\t // Then the icon.\n\t if(editingIcon != null) {\n\t\tint yLoc = Math.max(0, (getSize().height -\n\t\t\t\t\t editingIcon.getIconHeight()) / 2);\n\n\t\teditingIcon.paintIcon(this, g, 0, yLoc);\n\t }\n\n\t // Border selection color\n\t Color background = getBorderSelectionColor();\n\t if(background != null) {\n\t\tg.setColor(background);\n\t\tg.drawRect(0, 0, size.width - 1, size.height - 1);\n\t }\n\t super.paint(g);\n\t}",
"public void mouseClicked(MouseEvent e) {\n if(e.getSource()==jtf[mlp1][mlp2]){\n if(!e.isControlDown()){\n if(e.getSource()!=jtf[txp1][txp2] || !isEditing)\n for(int i=0; i<30; i++)\n for(int j=0; j<26; j++){\n jtf[i][j].setEnabled(false);\n setNotEdit();\n setNotSelected();\n jtf[i][j].setBackground(Color.white);\n cellSelCounter=1;\n }\n if(e.getClickCount()==3){ // dar surati ke sebar-\n jtf[mlp1][mlp2].grabFocus(); // -click shawad, matne dakhele-\n jtf[mlp1][mlp2].setEnabled(true); // -khaneye excel, entekhab mishawad.\n jtf[mlp1][mlp2].setBackground(Color.yellow);\n jtf[mlp1][mlp2].select(0, 20);\n setEdit();\n setNotSelected();\n setNotSaved();\n setTxp(mlp1, mlp2);\n }// payane if(e.getClickCount()==3).\n if(e.getClickCount()==2){ // dar surate DoubleClick-\n jtf[mlp1][mlp2].grabFocus(); // -khaneye morede nazar-\n jtf[mlp1][mlp2].setEnabled(true); // -gabele neweshtan mishawad-\n jtf[mlp1][mlp2].setBackground(Color.yellow);// -range an zard mishawad.\n setEdit();\n setNotSelected();\n setNotSaved();\n setTxp(mlp1, mlp2); // alamat gozari mishawad.\n }// payane if(e.getClickCount()==2).\n if(e.getClickCount()==1){\n if(jtf[mlp1][mlp2].getBackground()!=Color.yellow){\n jtf[mlp1][mlp2].setBackground(Color.blue);\n setSelected();\n setNotEdit();\n }\n }\n }// payane if(!e.isControlDown()).\n }// payane if marbut be Khane haye Excel.\n if(e.getSource()==jmEdit) // agar bar rue menuye Edit click shawad-\n jmEdit.grabFocus(); // -angah Focus ra dar ekhtiyar migirad.\n if(e.getSource()==jmFunction) // agar bar rue menuye Function click shawad-\n jmFunction.grabFocus(); // -angah Focus ra dar ekhtiyar migirad.\n if(e.getSource()==jmFile) // agar bar rue menuye File click shawad-\n jmFile.grabFocus(); // -angah Focus ra dar ekhtiyar migirad.\n }",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"public void mousePressed(MouseEvent e) {\n setMlPresingPoit(mlp1, mlp2);// awalin khaneye entekhab shode jahate Draging , moshakhas mishawad.\n setTextMousePoint(e.getX(), e.getY());// mahale neshanegare mouse moshakhas mishawad.\n if(e.getSource()==jtf[mlp1][mlp2]){\n if(e.getButton()== e.BUTTON3)// jahate tashkhide click rast wa chap\n isRightClick();\n else\n isNotRightClick();\n if(!e.isControlDown()) // agar kelide Control paein nabashad-\n if(e.getSource()!=jtf[txp1][txp2] || !isEditing)//- khaneha geyre fa'al mishawand\n for(int i=0; i<30; i++)\n for(int j=0; j<26; j++){\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);\n cellSelCounter=1;\n }\n if(jtf[mlp1][mlp2].getBackground()!=Color.yellow){\n jtf[mlp1][mlp2].setBackground(Color.blue);\n setSelected();\n ++cellSelCounter;\n jp.grabFocus();// focus dar ekhtiyare Panel barname garar migirad.\n }\n if(jtf[txp1][txp2].getBackground()==Color.yellow && e.getSource()!=jtf[txp1][txp2]){// kaneye darhale neweshtan, abi mishawad\n jtf[txp1][txp2].setBackground(Color.blue);\n jtf[txp1][txp2].setEnabled(false);\n setNotEdit();\n setSelected();\n }\n }// payane press baraye khanehaye Excel\n }",
"public void highlightSquare(int row, int col)\n\t{\n\t\t/* nothing to highlight if there is no piece */\n\t\tif (!hasPiece(row, col)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* find our piece and corresponding button */\n\t\tJButton button = m_buttons[row][col];\n\t\tChessPiece piece = m_pieces[row][col];\n\t\t\n\t\t/* track our first click */\n\t\tm_rowFocused = row;\n\t\tm_colFocused = col;\n\t\t\n\t\t/* highlight the square */\n\t\tm_display.highlightSquare(true, button, piece, row, col);\n\t}",
"@Override\n protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)\n {\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(CHEST_GUI_TEXTURE);\n int i = (this.width - this.xSize) / 2;\n int j = (this.height - this.ySize) / 2;\n this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.inventoryRows * 18 + 17);\n this.drawTexturedModalRect(i, j + this.inventoryRows * 18 + 17, 0, 126, this.xSize, 96);\n }",
"boolean checkBorders();",
"@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tTable.table.clearSelection();\r\n\t\t\t\t\t\t\tTable.table.repaint();//ÎÍ ÌÅÍß ÍÀÏÐßÃÀÅÒ: ÒÎËÜÊÎ ÒÝÉÁË ÐÅÑÅÒÈÒ\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}",
"private void drawTable(int selected){\n\t\ttlCategories.removeAllViews();\n\t\tTableRow.LayoutParams rowParams=new TableRow.LayoutParams \n\t\t\t\t(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT);\n\t\t\n\t\tfor(int i = 0; i<4; i++){\n\t\t\tTableRow tr = new TableRow(getApplicationContext());\n\t\t\ttr.setLayoutParams(rowParams);\n\t\t\ttr.setTag(2); \n\t\t\tfor(int j = 0; j<4; j++ ){ \n\t\t\t\tView v = mCatAdapter.getView(i*4+j + 1, null, tr);\n\t\t\t\tv.setTag(i*4+j);\n\t\t\t\tv.setOnClickListener(this);\n\t\t\t\ttr.addView(v);\n\t\t\t\tif( i*4+j+1 == selected) onClick(v);\n\t\t\t}\n\t\t\ttlCategories.addView(tr);\n\t\t}\n\t}",
"public void highlightEnemy(int i, boolean clear) {\n\n if(clear)\n clearBorders();\n\n switch(i) {\n\n case 1:\n findViewById(R.id.eslot1).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 2:\n findViewById(R.id.eslot2).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 3:\n findViewById(R.id.eslot3).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 4:\n findViewById(R.id.eslot4).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n }\n\n findViewById(R.id.eslot1).refreshDrawableState();\n findViewById(R.id.eslot2).refreshDrawableState();\n findViewById(R.id.eslot3).refreshDrawableState();\n findViewById(R.id.eslot4).refreshDrawableState();\n }",
"public void prepareToPlaceOnCurrentRow(Box box) {\n\t\tbox.y = getCurrentY();\n\t\tbox.x = getCurrentX();\n\t}",
"void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}",
"@Override\n public void run() {\n\t\t\t\t\ttable.getDisplay().timerExec(100, new Runnable() {\n\t\t\t\t\t\t@Override\n public void run() {\n//\t\t\t\t\t\t\tfindText.setBackground(PropertyChangeListener.getColor(found == null && matchCount == 0 ? new RGB(255, 0, 0) : new RGB(255, 255, 255)));\n\t\t\t\t\t\t\tif (!wrapped)\n\t\t\t\t\t\t\t\thexEditor.getEditorSite().getActionBars().getStatusLineManager().setMessage(found == null && matchCount == 0 ? Messages.HexEditorControl_7 : matchCount > 0 ? Messages.HexEditorControl_8 + matchCount + Messages.HexEditorControl_9 : null);\n\t\t\t\t\t\t\tupdateStatusPanel();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}"
] | [
"0.6679546",
"0.66247547",
"0.6447805",
"0.6399579",
"0.617257",
"0.61662006",
"0.6115329",
"0.60909414",
"0.6059313",
"0.5963306",
"0.5956778",
"0.59453166",
"0.5925653",
"0.589943",
"0.58719873",
"0.5864349",
"0.58424705",
"0.5838357",
"0.58262646",
"0.5823637",
"0.58202183",
"0.5774364",
"0.5757566",
"0.5755954",
"0.5735926",
"0.5731506",
"0.5728277",
"0.572074",
"0.57159597",
"0.5714411",
"0.5661336",
"0.5659869",
"0.5656417",
"0.56343186",
"0.5623308",
"0.56169224",
"0.56153893",
"0.5580509",
"0.5580509",
"0.5580509",
"0.5580509",
"0.5579451",
"0.5569507",
"0.556636",
"0.55646616",
"0.55641204",
"0.55351734",
"0.55346435",
"0.5531168",
"0.55142224",
"0.5512481",
"0.5510994",
"0.5506424",
"0.54980206",
"0.54973507",
"0.5495703",
"0.5493545",
"0.5484789",
"0.5483192",
"0.54796296",
"0.5475206",
"0.5461586",
"0.545179",
"0.54496884",
"0.54476005",
"0.54412484",
"0.5440261",
"0.54336214",
"0.54247946",
"0.5422046",
"0.54212016",
"0.5418071",
"0.5414689",
"0.540599",
"0.54026526",
"0.53985065",
"0.53937405",
"0.53906256",
"0.53899354",
"0.5388647",
"0.5381",
"0.5380453",
"0.53757477",
"0.5370279",
"0.53701645",
"0.53486556",
"0.53467834",
"0.5345234",
"0.5333838",
"0.53337514",
"0.53291553",
"0.5329093",
"0.5324123",
"0.53230774",
"0.53202766",
"0.5314571",
"0.5308571",
"0.53070825",
"0.53033936",
"0.5292763"
] | 0.80034155 | 0 |
TODO Autogenerated method stub | @Override
public String getURLPath() {
return AMConstants.URL_SF_CASE_CREATE_CONSUMER_FEEDBACK;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
any of a number of agenda strategies for integrated parsing | public interface IPAgenda {
public void addState(IPState state);
public IPState getState();
public boolean isEmpty();
public boolean addAll(Collection<? extends IPState> list);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected List<IElementParser<ActImpl>> createParserList() {\n List<IElementParser<ActImpl>> result = new ArrayList<>();\n result.add(new SubElementManeuverGroupsParser());\n result.add(new SubElementStartTriggerParser());\n result.add(new SubElementStopTriggerParser());\n return result;\n }",
"public IStrategy parse() {\n this.state = ProcessState.INIT;\n int count = 0;\n while (count < this.result.size()) {\n switch (this.state) {\n case INIT:\n count = processInit(count);\n break;\n case WAIT_STRATEGY_NAME:\n count = processStrategyName(count);\n break;\n case WAIT_STOCK_LIST:\n count = processStockList(count);\n break;\n case WAIT_STOCK:\n count = processStock(count);\n break;\n case WAIT_SYMBOL:\n count = processStockSymbol(count);\n break;\n case WAIT_WEIGHT:\n count = processStockWeight(count);\n break;\n case WAIT_BEGIN_DATE:\n count = processBeginDate(count);\n break;\n case WAIT_END_DATE:\n count = processEndDate(count);\n break;\n case WAIT_AMOUNT:\n count = processAmount(count);\n break;\n case WAIT_DAY:\n count = processDay(count);\n break;\n case END:\n count = processEnd(count);\n break;\n default:\n break;\n }\n }\n return this.strategy;\n }",
"public void parse() {\n if (commandSeparate.length == 1) {\n parseTaskType();\n } else if (commandSeparate.length == 2) {\n parseTaskType();\n index = commandSeparate[1];\n taskName = commandSeparate[1];\n } else {\n parseTaskType();\n parseTaskName();\n parseTaskDate();\n }\n }",
"public interface PatternAggregateService {\n void parse();\n}",
"public ParsedInput.ParsedInputBuilder process() throws IllegalCommandArgumentException {\n start = 1; // For recording starting index of the name currently being checked\n index = wordsOfInput.length; // (Last index of task name - 1) currently being checked\n tpsIndex = wordsOfInput.length; // Latest index of tag/priority/subtask inputs\n \n for (int i = 0; i < wordsOfInput.length; i++) {\n if (wordsOfInput[i].toLowerCase().matches(Constants.DATE_START_PREPOSITION)) {\n \n // Checks for format of {startDate}. If doesn't exist, ignore.\n if (i < wordsOfInput.length-1 && wordsOfInput[i+1].toLowerCase().matches(datePattern)) {\n \n containsStartDate = true;\n index = tpsIndex > i ? i : tpsIndex ;\n startDate = wordsOfInput[i+1];\n \n // startDate {startTime}\n if (i < wordsOfInput.length-2 && wordsOfInput[i+2].toLowerCase().matches(timePattern)) {\n containsStartTime = true;\n startTime = wordsOfInput[i+2];\n } else if (i < wordsOfInput.length-2 \n && !wordsOfInput[i+2].toLowerCase().matches(timePattern)\n && !wordsOfInput[i+2].matches(Constants.DATE_END_PREPOSITION) \n && !wordsOfInput[i+2].equals(\";\") && !wordsOfInput[i+2].matches(Constants.PREFIXES)){\n throw new IllegalCommandArgumentException(Constants.FEEDBACK_INVALID_STARTTIME,\n Constants.CommandParam.DATETIME); \n }\n\n \n // startDate {endDate}\n if (i < wordsOfInput.length-3 && \n wordsOfInput[i+2].toLowerCase().matches(Constants.DATE_END_PREPOSITION)) {\n if (wordsOfInput[i+3].toLowerCase().matches(datePattern)) {\n containsEndDate = true;\n endDate = wordsOfInput[i+3];\n } else {\n throw new IllegalCommandArgumentException(Constants.FEEDBACK_INVALID_ENDDATE,\n Constants.CommandParam.DATETIME); \n }\n } \n \n if (containsStartDate && containsStartTime && i < wordsOfInput.length-4 && \n wordsOfInput[i+3].toLowerCase().matches(Constants.DATE_END_PREPOSITION)) {\n \n if (wordsOfInput[i+4].toLowerCase().toLowerCase().matches(timePattern)) {\n \n // startDate startTime {endTime}\n containsEndTime = true;\n endTime = wordsOfInput[i+4];\n \n } else if (wordsOfInput[i+4].toLowerCase().matches(datePattern)) {\n \n // startDate startTime {endDate} endTime\n containsEndDate = true;\n endDate = wordsOfInput[i+4];\n \n // startDate startTime endDate {endTime}\n checkForEndTimeInput(i+5);\n \n } else {\n throw new IllegalCommandArgumentException(Constants.FEEDBACK_INVALID_ENDDATETIME,\n Constants.CommandParam.DATETIME); \n } \n \n } \n } else if (i < wordsOfInput.length-1 && \n wordsOfInput[i+1].toLowerCase().matches(timePattern)) {\n \n // Checks for format of {startTime}. If doesn't exist, ignore.\n containsStartTime = true;\n index = tpsIndex > i ? i : tpsIndex ;\n startTime = wordsOfInput[i+1];\n \n // startTime {endTime}\n if (i < wordsOfInput.length - 3 && \n wordsOfInput[i+2].toLowerCase().matches(Constants.DATE_END_PREPOSITION)) {\n checkForEndTimeInput(i+3);\n }\n \n } else if (i < wordsOfInput.length-1 && \n wordsOfInput[i+1].toLowerCase().matches(Constants.DAYS + \"|today|tdy|tomorrow|tmr\")) {\n lookUpNextDay(i);\n \n } else if (i < wordsOfInput.length-1 && wordsOfInput[i+1].toLowerCase().equals(\"next\")) { \n lookUpNextDate(i);\n }\n }\n \n checkForPriority(i);\n checkForProject(i);\n checkForTag(i);\n checkForSubtask(i);\n checkForBatchAdding(i);\n \n }\n \n extractLastTaskName();\n \n formatDateTime();\n DateTime dateTime = createDateTime();\n \n return builder.name(names).dateTime(dateTime).tag(tags);\n }",
"abstract protected Parser createSACParser();",
"protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }",
"public interface SubtitleParser {\n public SubtitleObject parse(InputStream is) throws IOException, SubtitleParsingException;\n public SubtitleObject parse(InputStream is, boolean strict, boolean withHours) throws IOException, SubtitleParsingException;\n}",
"public interface TextSchemaParser {\n\n /**\n * This method should only be called by a TextParseTask class. Don't use this\n * directly in your code. Use a TextParseTask instead.\n * <p>\n * Sends line parse events to the supplied lineEventListener while parsing.\n *\n * @param lineConsumer The line consumer which will receive events for each parsed line.\n * @param errorConsumer The error consumer that will receive events for each error.\n * @return Number of lines parsed\n * @throws IOException If there is an error reading from the input reader.\n */\n long parse(Consumer<Line> lineConsumer, Consumer<JSaParException> errorConsumer) throws IOException;\n\n /**\n * This method should only be called by a TextParseTask class. Don't use this\n * directly in your code. Use a TextParseTask instead.\n * <p>\n * Returns a stream of lines that are lazily populated by lines when pulled from the stream.\n * @param errorConsumer The error consumer that will receive events for each error.\n * @return a stream of lines that are lazily populated by lines when pulled from the stream.\n * @since 2.3\n * @throws IOException If there is an error reading from the input reader.\n */\n Stream<Line> stream(Consumer<JSaParException> errorConsumer) throws IOException;\n\n\n /**\n * Internal method to create a schema parser using this schema.\n * @param schema The schema to create a parser for.\n * @param reader The reader to use for the parser.\n * @param parseConfig Current parse configuration.\n * @return Create a schema based text parser. *\n */\n static TextSchemaParser ofSchema(Schema<? extends SchemaLine<? extends SchemaCell>> schema, Reader reader, TextParseConfig parseConfig) {\n if (schema instanceof CsvSchema)\n return new CsvParser(reader, (CsvSchema) schema, parseConfig);\n if (schema instanceof FixedWidthSchema)\n return new FixedWidthParser(reader, (FixedWidthSchema) schema, parseConfig);\n throw new IllegalArgumentException(\"Unsupported schema type: \" + schema.getClass() + \" while parsing.\");\n }\n}",
"public final f a() {\n String a2;\n while (this.a.next() != 1) {\n try {\n if (this.a.getEventType() == 2) {\n if (this.a.getName().equals(\"splits\")) {\n while (this.a.next() != 3) {\n if (this.a.getEventType() == 2) {\n if (!this.a.getName().equals(\"module\") || (a2 = a(\"name\")) == null) {\n b();\n } else {\n while (this.a.next() != 3) {\n if (this.a.getEventType() == 2) {\n if (this.a.getName().equals(\"language\")) {\n while (this.a.next() != 3) {\n if (this.a.getEventType() == 2) {\n if (this.a.getName().equals(\"entry\")) {\n String a3 = a(\"key\");\n String a4 = a(\"split\");\n b();\n if (!(a3 == null || a4 == null)) {\n this.b.a(a2, a3, a4);\n }\n } else {\n b();\n }\n }\n }\n } else {\n b();\n }\n }\n }\n }\n }\n }\n } else {\n b();\n }\n }\n } catch (IOException | IllegalStateException | XmlPullParserException e) {\n Log.e(\"SplitInstall\", \"Error while parsing splits.xml\", e);\n return null;\n }\n }\n return this.b.a();\n }",
"void parse(String[] args);",
"public interface IAgenda {\n /*\n Date date = new Date();\n String event = \"\";\n */\n\n abstract String getContent();\n\n }",
"public static void init(String tell){\n String[] sentences = tell.split(\";\");\n\tfor (int i=0;i<sentences.length;i++){\n \n\t\tif (!sentences[i].contains(\"=>\")) \n\t\t\t// add facts to be processed\n\t\t\tagenda.add(sentences[i]);\n\t\telse{\n\t\t\t// add sentences\n\t\t\tclauses.add(sentences[i]);\n\t\t\tcount.add(sentences[i].split(\"&\").length);\n\t\t\t}\n\t}\n}",
"@Override\n\tpublic Document parse(final CharSequence content) {\n\t\tfinal LagartoParser lagartoParser = new LagartoParser(config.parserConfig, content);\n\t\treturn parseWithLagarto(lagartoParser);\n\t}",
"protected abstract void parse(final ArrayList<Command> cmds) throws QueryException;",
"SAPL parse(String saplDefinition);",
"public void parse() {\n }",
"public interface IArgsParser {\r\n\tvoid parse(String [] aParams, Iterable<IArgument> args);\r\n}",
"private static void parse(String[] command, Player p, RoomManager rm, ItemManager im, ArrayList<Item> a, Bear bear) {\n\t\t\t\n\t\tif(command.length == 2) {\t\t\t\n\t\t\tswitch(command[0]) {\n\t\t\tcase \"go\":\t\t\t\t\n\t\t\t\tswitch(command[1]) {\n\t\t\t\tcase \"clearing\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"bears\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[1]);\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"grotto\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"cave\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[3]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"storage\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[5]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"passageway\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[7]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"outside\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"tunnel\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[3]);\n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"enter\":\n\t\t\t\t\n\t\t\t\tif(hasItem(a,im,1)) {\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[8]);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\nIt seems something magical is required to travel through this portal.\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"swim\":\t\t\t\n\t\t\t\tswitch(command[1]) {\n\t\t\t\t\n\t\t\t\t// sets description depending on which way you enter the rooms\n\t\t\t\tcase \"pond\":\n\t\t\t\t\t\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[7]);\t\t\t\t\n\t\t\t\t\trm.rooms[7].setShortDesc(\"swimming in the pond, you found a small cave entrance underwater and explore it\\n\");\n\t\t\t\t\trm.rooms[7].setLongDesc(\"Upon entering the cave from the tunnel in the pond, you enter a small room \\ninside of a larger cave complex.\"\n\t\t\t\t\t\t\t+ \" You can see a larger cavern through a tunnel off \\nthe left as well as the remains of a fire. \\n\"\n\t\t\t\t\t\t\t+ \"\\ngo through tunnel\\n\"\n\t\t\t\t\t\t\t+ \"swim in water\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"water\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[2]);\n\t\t\t\t\trm.rooms[7].setShortDesc(\"As you come to the end of the passageway, you find yourself in a small room\\n\");\n\t\t\t\t\trm.rooms[7].setLongDesc(\"You enter into the small room from the passageway leading away from the cavern.\"\n\t\t\t\t\t\t\t+ \" In front \\nof you is what appears to be the remains of a fire pit, and to your right is a a pool of water \\n\"\n\t\t\t\t\t\t\t+ \"\\ngo through tunnel\\n\"\n\t\t\t\t\t\t\t+ \"swim in water\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"climb\":\n\t\t\t\t\n\t\t\t\t// Separate key words to denote traveling direction in certain rooms\n\t\t\t\tswitch(command[1]) {\n\t\t\t\tcase \"down\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[3]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"plateau\":\n\t\t\t\t\tp.setCurrentRoom(rm.rooms[4]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"sit\":\n\t\t\t\t\n\t\t\t\t// victory condition / if you gave bear a fish, you dont die\n\t\t\t\tif(bear.getHungry()){\n\t\t\t\t\tSystem.out.println(\"\\nYou have died.\");\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\nThe bears sit next to you as they eat the fish.\\n\");\n\t\t\t\t\tSystem.out.println(\"You have won the game and befriended the bears!\\n\");\n\t\t\t\t}\n\t\t\t\tb = false;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"give\":\n\t\t\t\t\n\t\t\t\t// make bear not hungry\n\t\t\t\tbear.setHungry(false);\n\t\t\t\tbear.setFriendly(true);\n\t\t\t\tremoveItem(a,im);\n\t\t\t\trm.rooms[1].setLongDesc(\"the Mama Bear feasts upon the fish as her cubs approach you to play.\"\n\t\t\t\t\t\t+ \"\\n\\nsit and play\\n\"\n\t\t\t\t\t\t+ \"go towards grotto\"\n\t\t\t\t\t\t+ \"\");\n\t\t\t\tbreak;\n\t\t\tcase \"use\":\t\t\t\t\n\t\t\t\tfish(a,im);\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"check\":\n\t\t\t\tprintInventory(im, a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"craft\":\n\t\t\t\tcraftItem(a,im,4,5,6);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"open\":\n\t\t\t\tswitch(command[1]) {\n\t\t\t\t\tcase \"basket\":\n\t\t\t\t\t\ta.add(im.allItems[4]);\n\t\t\t\t\t\tSystem.out.println(im.allItems[4].getLongDesc());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"cabinet\":\n\t\t\t\t\t\ta.add(im.allItems[5]);\n\t\t\t\t\t\tSystem.out.println(im.allItems[5].getLongDesc());\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// exit clause\n\t\t\tcase \"teleport\":\n\t\t\t\tb = false;\t\n\t\t\t\tbreak;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// goodbye statement\n\t\t\tif(b == false) {\n\t\t\t\tSystem.out.println(\"Fare thee well, Traveler\");\n\t\t\t} else {\n\t\t\t\tprintRoom(p, a, im, rm);\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"please enter a valid command.\");\n\t\t}\n\t}",
"private boolean parseSome()\n throws SAXException, IOException, IllegalAccessException,\n java.lang.reflect.InvocationTargetException\n {\n if(fConfigSetInput!=null)\n {\n Object ret=(Boolean)(fConfigParse.invoke(fPullParserConfig,parmsfalse));\n return ((Boolean)ret).booleanValue();\n }\n else\n {\n Object ret=fParseSome.invoke(fIncrementalParser,noparms);\n return ((Boolean)ret).booleanValue();\n }\n }",
"public void parseFunctions(){\n\t\t\n\t}",
"void parse();",
"public Set<ContextualActivity> read() {\n Set<ContextualActivity> defaultActivities = new HashSet<ContextualActivity>();\n try {\n\n Scanner s = new Scanner(input);\n while (s.hasNextLine()) {\n // verb, noun, locations, times, duration\n String infos[] = (s.nextLine()).split(\",\");\n\n Set<String> locations = new HashSet<String>();\n Collections.addAll(locations, infos[2].split(Cons.ENTRY_SEPARATOR_REG));\n\n Set<TimeOfDay> times = new HashSet<TimeOfDay>();\n for (String tm : infos[3].split(Cons.ENTRY_SEPARATOR_REG)) {\n try {\n times.add(TimeOfDay.valueOf(tm.toUpperCase()));\n }\n catch (Exception e){\n }\n }\n\n defaultActivities.add(new DefaultActivity(infos[0], infos[1], locations, times, infos[4]));\n }\n\n return defaultActivities;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return defaultActivities;\n }",
"protected void parseElements(XmlElement processElement) {\n\n parseStartEvents(processElement);\n parseActivities(processElement);\n parseEndEvents(processElement);\n parseSequenceFlow(processElement);\n }",
"public void parse(){\n\t\t//Read next line in content; timestamp++\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(instructionfile))) {\n\t\t String line;\n\t\t while ((line = br.readLine()) != null) {\n\t\t \t//divide the line by semicolons\n\t\t \tString[] lineParts = line.split(\";\");\n\t\t \tfor(String aPart: lineParts){\n\t\t\t \tSystem.out.println(\"Parser:\"+aPart);\n\n\t\t\t \t// process the partial line.\n\t\t\t \tString[] commands = parseNextInstruction(aPart);\n\t\t\t \tif(commands!=null){\n\t\t\t\t\t\t\n\t\t\t \t\t//For each instruction in line: TransactionManager.processOperation()\n\t\t\t \t\ttm.processOperation(commands, currentTimestamp);\n\t\t\t \t}\n\t\t \t}\n\t\t \t//Every new line, time stamp increases\n\t \t\tcurrentTimestamp++;\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override ASTSeq parse_impl(Exec E) {\n try {\n if (!E.skipWS().hasNext()) throw new IllegalArgumentException(\"End of input unexpected. Badly formed AST. Missing `from` argument.\");\n _from = E.nextDbl();\n } catch (ClassCastException e) {\n e.printStackTrace();\n throw new IllegalArgumentException(\"Argument `from` expected to be a number.\");\n }\n // Get the to\n try {\n if (!E.skipWS().hasNext()) throw new IllegalArgumentException(\"End of input unexpected. Badly formed AST. Missing `to` argument.\");\n _to = E.nextDbl();\n } catch (ClassCastException e) {\n e.printStackTrace();\n throw new IllegalArgumentException(\"Argument `to` expected to be a number.\");\n }\n // Get the by\n try {\n if (!E.skipWS().hasNext()) throw new IllegalArgumentException(\"End of input unexpected. Badly formed AST. Missing `by` argument.\");\n _by = E.nextDbl();\n } catch (ClassCastException e) {\n e.printStackTrace();\n throw new IllegalArgumentException(\"Argument `by` expected to be a number.\");\n }\n\n if( _from >= _to ) throw new IllegalArgumentException(\"`from` >= `to`: \" + _from + \">=\" + _to);\n if( _by <= 0 ) throw new IllegalArgumentException(\"`by` must be >0: \" + _by + \" <=0\");\n\n E.eatEnd(); // eat the ending ')'\n // Finish the rest\n ASTSeq res = (ASTSeq) clone();\n res._asts = new AST[]{}; // in reverse order so they appear correctly on the stack.\n return res;\n }",
"private FiniteAutomaton parseE() {\n\n\t\tFiniteAutomaton t = parseT();\n\n\t\tint c = peek();\n\n\t\tif (c >= 0 && c != ')' && c != '|') {\n\t\t\t// concatenation\n\n\t\t\tFiniteAutomaton e = parseE();\n\n\t\t\t// create result automaton\n\t\t\tFiniteAutomaton result = new FiniteAutomaton();\n\t\t\tresult.addAll(t);\n\t\t\tresult.addAll(e);\n\n\t\t\t// create ε-transition connecting e's accepting state to r's start state\n\t\t\tresult.createTransition(t.getUniqueAcceptingState(), e.getStartState(), FiniteAutomaton.EPSILON);\n\t\t\tt.getUniqueAcceptingState().setAccepting(false);\n\t\t\te.getStartState().setStart(false);\n\n\t\t\t// done\n\t\t\treturn check(result);\n\t\t}\n\n\t\treturn t;\n\t}",
"static void perform_ana(String passed){\n\t\tint type = type_of_ana(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tana_with_reg(passed);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tana_with_mem(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"public interface RecursiveDescentParser\n{\n\n /**\n * Parses a regular expression and returns an NFA that describes that regular expression.\n * @return an NFA describing the regular expression that was parsed\n * @throws ParseException\n */\n public NFA parse() throws ParseException;\n\n}",
"public interface EventParser {\n\n\t/**\n\t * Parses the given String for XML to extract the parameter and assign them\n\t * to the members.\n\t * \n\t * @param xml\n\t * XML-Content\n\t * @return List of logging events\n\t * @throws ParseException\n\t * if fails to parse\n\t */\n\tList<LoggingEvent> parse(String xml) throws ParseException;\n\n\t/**\n\t * Parses the given input stream for XML to extract the parameter and assign\n\t * them to the members.\n\t * \n\t * @param is\n\t * XML Content\n\t * @return List of logging events\n\t * @throws ParseException\n\t * if fails to parse\n\t */\n\tList<LoggingEvent> parse(InputStream is) throws ParseException;\n\n\t/**\n\t * Get header of the event list.\n\t * \n\t * @return the header\n\t */\n\tString getResponseHeader();\n\n\t/**\n\t * Get the response for given events back to log4js.\n\t * \n\t * @param state\n\t * state of logging.\n\t * @param message\n\t * possible error message\n\t * @param throwable\n\t * possible exception\n\t * @return the message for response.\n\t */\n\tString getResponse(String state, String message, Throwable throwable);\n\n}",
"public interface CommandLineParser {\n\n CommandLine parse(Options options, String[] arguments) throws ParseException;\n CommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException;\n\n}",
"protected void parseActivities(XmlElement parentElement) {\n\n for (XmlElement activityElement : parentElement.getElements()) {\n\n if ((\"exclusiveGateway\").equals(activityElement.getTagName())) {\n parseXorGateway(activityElement);\n\n } else if ((\"eventBasedGateway\").equals(activityElement.getTagName())) {\n parseEventBasedXorGateway(activityElement);\n\n } else if ((\"parallelGateway\").equals(activityElement.getTagName())) {\n parseParallelGateway(activityElement);\n\n // } else if ((\"scriptTask\").equals(activityElement.getTagName())) {\n // parseScriptTask(activityElement);\n //\n } else if (\"serviceTask\".equals(activityElement.getTagName())) {\n parseServiceTask(activityElement);\n\n // } else if (activityElement.getTagName().equals(\"businessRuleTask\")) {\n // parseBusinessRuleTask(activityElement);\n //\n } else if ((\"task\").equals(activityElement.getTagName())) {\n parseTask(activityElement);\n //\n // } else if (activityElement.getTagName().equals(\"manualTask\")) {\n // parseManualTask(activityElement);\n //\n } else if ((\"userTask\").equals(activityElement.getTagName())) {\n parseUserTask(activityElement);\n //\n // } else if (activityElement.getTagName().equals(\"sendTask\")) {\n // parseSendTask(activityElement);\n //\n // } else if (activityElement.getTagName().equals(\"receiveTask\")) {\n // parseReceiveTask(activityElement);\n //\n // } else if (activityElement.getTagName().equals(\"subProcess\")) {\n // parseSubProcess(activityElement);\n //\n // } else if (activityElement.getTagName().equals(\"callActivity\")) {\n // parseCallActivity(activityElement);\n //\n } else if ((\"intermediateCatchEvent\").equals(activityElement.getTagName())) {\n parseIntermediateCatchEvent(activityElement);\n\n } else if ((\"intermediateThrowEvent\").equals(activityElement.getTagName())) {\n parseIntermediateThrowEvent(activityElement);\n\n } else if ((\"adHocSubProcess\").equals(activityElement.getTagName())\n || (\"complexGateway\").equals(activityElement.getTagName())\n // || (\"eventBasedGateway\").equals(activityElement.getTagName())\n || (\"transaction\").equals(activityElement.getTagName())\n || (\"callActivity\").equals(activityElement.getTagName())\n // || (\"intermediateCatchEvent\").equals(activityElement.getTagName())\n || (\"subProcess\").equals(activityElement.getTagName())\n || (\"receiveTask\").equals(activityElement.getTagName())\n || (\"sendTask\").equals(activityElement.getTagName())) {\n getProblemLogger().addWarning(\"Ignoring unsupported activity type\", activityElement);\n }\n }\n\n // Parse stuff common to activities above, e.g. something like markers\n // if (activity != null) {\n // parseMultiInstanceLoopCharacteristics(activityElement, activity);\n // }\n }",
"static void perform_ora(String passed){\n\t\tint type = type_of_ora(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tora_with_reg(passed);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tora_with_mem(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"private void performSmartParsing(String command, ArrayList<Parameter> parameters) {\n\t\tif (command.contains(SMART_PARSING_DATE_INDICATOR)) {\n\n\t\t\tString[] strArr = command.split(REGEX_ATSIGN);\n\t\t\t// use the first at, which the content is at [1]\n\t\t\t// try to find @ if there is any\n\t\t\tString[] strArr2;\n\t\t\tif (strArr.length > 1) {\n\t\t\t\tstrArr2 = strArr[1].split(REGEX_INVERTED_SLASH);\n\n\t\t\t\tif (ParserFacade.getInstance().containMultiDate(strArr2[0].trim())) {\n\t\t\t\t\tparameters.add(new Parameter(Parameter.START_END_DATE_ARGUMENT_TYPE, strArr2[0].trim()));\n\t\t\t\t} else {\n\t\t\t\t\tparameters.add(new Parameter(Parameter.END_DATE_ARGUMENT_TYPE, strArr2[0].trim()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}",
"void parse(String[] args) throws Exception;",
"private static Task createTask(String line) throws DukeException {\n String type=line.split(\"]\")[0];\n String isDone=line.split(\"]\")[1];\n String detail=line.split(\"]\")[2];\n if(type.contains(\"T\")){\n if(isDone.contains(\"✘\")){\n return new ToDo(detail.substring(1),false);\n }else if(isDone.contains(\"✓\")){\n return new ToDo(detail.substring(1),true);\n }\n\n }\n if(type.contains(\"D\")) {\n if (isDone.contains(\"✘\")) {\n int dividerPosition = detail.indexOf(\"do by:\");\n String itemName = detail.substring(0, dividerPosition);\n String itemName1 = detail.substring(dividerPosition,detail.length());\n String itemName2 = itemName1.replace(\"do by:\", \"\");\n return new Deadline(itemName, DeadlineCommand.convertDeadline(itemName2));\n } else if (isDone.contains(\"✓\")) {\n int dividerPosition = detail.indexOf(\"do by:\");\n String itemName = detail.substring(0, dividerPosition);\n String itemName1 = detail.substring(dividerPosition,detail.length());\n String itemName2 = itemName1.replace(\"do by:\", \"\");\n return new Deadline(itemName, DeadlineCommand.convertDeadline(itemName2));\n }\n }\n if(type.contains(\"E\")){\n if (isDone.contains(\"✘\")) {\n int dividerPosition = detail.indexOf(\"at:\");\n String itemName = detail.substring(0, dividerPosition);\n String itemName1 = detail.substring(dividerPosition,detail.length());\n String itemName2 = itemName1.replace(\"at:\", \"\");\n return new Event(itemName, EventCommand.convertEvent(itemName2));\n } else if (isDone.contains(\"✓\")) {\n int dividerPosition = detail.indexOf(\"at:\");\n String itemName = detail.substring(0, dividerPosition);\n String itemName1 = detail.substring(dividerPosition,detail.length());\n String itemName2 = itemName1.replace(\"at:\", \"\");\n return new Event(itemName, EventCommand.convertEvent(itemName2));\n }\n }\n\n else{\n throw new DukeException(\"☹ OOPS!!! Missing type element for CREATE TASK\");\n }\n return new ToDo();\n }",
"@Override\n public void parse(String sentence) {\n String[] tmp = sentence.split(DELIM);\n if (tmp.length > 5) {\n try {\n\n Date btTime = timeFormatter.parse(tmp[1]);\n\n // Timezone code\n /*\n * int timeZone = parseStringToInt(tmp[5]); int\n * offSetMinutes; if (timeZone < 0) { offSetMinutes =\n * timeZone*60 - parseStringToInt(tmp[6]); } else {\n * offSetMinutes = timeZone*60 + parseStringToInt(tmp[6]); }\n * TimeZone myGPSTimezone = TimeZone.getTimeZone(\"UTC\");\n * myGPSTimezone.setRawOffset(offSetMinutes*60*1000);\n */\n GPSCalendar.setTimeInMillis(btTime.getTime());\n GPSCalendar.set(parseStringToInt(tmp[4]), parseStringToInt(tmp[3]),\n parseStringToInt(tmp[2]));\n\n updateTimeStamp(GPSCalendar.getTimeInMillis());\n if (!\"A\".equals(tmp[6])) {\n return;\n }\n } catch (ParseException e) {\n Log.e(TAG, \"Could not parse: \" + tmp[1]);\n return;\n }\n }\n }",
"@Override\n protected void parse() throws ASpellParserException {\n strategyData = expect(StrategyData.class);\n }",
"public void parseSubs(){\n\t\t\n\t\t\n\t}",
"public abstract ArgumentParser makeParser();",
"public abstract List<EventRule> getEventRulesOfSentence();",
"private interface ParseInterface {\n public void parse(String sentence);\n }",
"public static ArrayList<Task> parse(String toParse) {\n ArrayList<Task> result = new ArrayList<>();\n Scanner ps = new Scanner(toParse); // passes whole file into the scanner\n while (ps.hasNextLine()) {\n String nLine = ps.nextLine(); // parse one line at a time\n int ref = 3; // reference point\n char taskType = nLine.charAt(ref);\n switch (taskType) {\n case 'T':\n parseTodo(ref, nLine, result);\n break;\n case 'D':\n parseDeadline(ref, nLine, result);\n break;\n case 'E':\n parseEvent(ref, nLine, result);\n break;\n default:\n System.out.println(\"Unknown input\");\n break;\n }\n }\n return result;\n }",
"private FiniteAutomaton parseT() {\n\t\t\n\t\tFiniteAutomaton f = parseF();\n\t\t\n\t\tint c = peek();\n\t\tif (c >= 0 && (c == '*' || c == '+')) {\n\t\t\t// repetition\n\t\t\texpect((char) c); // consume the * or +\n\n\t\t\t// Create result NFA with new start and accepting states\n\t\t\tFiniteAutomaton result = new FiniteAutomaton();\n\t\t\tState start = result.createState();\n\t\t\tstart.setStart(true);\n\t\t\tState accepting = result.createState();\n\t\t\taccepting.setAccepting(true);\n\n\t\t\t// add ε-transitions from\n\t\t\t// - start to accepting (only for '*', not for '+') and,\n\t\t\t// - accepting to start state (both '*' and '+')\n\t\t\t// This allows 0 or more repetitions for '*', and 1 or more\n\t\t\t// repetitions for '+'.\n\t\t\t\n\t\t\tif (c == '*') {\n\t\t\t\tresult.createTransition(start, accepting, FiniteAutomaton.EPSILON);\n\t\t\t}\n\t\t\tresult.createTransition(accepting, start, FiniteAutomaton.EPSILON);\n\n\t\t\t// add states from orig NFA\n\t\t\tresult.addAll(f);\n\n\t\t\t// add ε-transition from the new start state to the old start state\n\t\t\tresult.createTransition(start, f.getStartState(), FiniteAutomaton.EPSILON);\n\t\t\tf.getStartState().setStart(false);\n\n\t\t\t// add ε-transition from the old accepting state to the new accepting state\n\t\t\tresult.createTransition(f.getUniqueAcceptingState(), accepting, FiniteAutomaton.EPSILON);\n\t\t\tf.getUniqueAcceptingState().setAccepting(false);\n\n\t\t\t// done\n\t\t\treturn check(result);\n\t\t} else if (c >= 0 && c == '?') {\n\t\t\texpect('?');\n\t\t\t\n\t\t\t// Create new start and accepting states, connected to/from\n\t\t\t// the original start and accepting states, and create an\n\t\t\t// epsilon transition from the new start state to the new\n\t\t\t// accepting state (allowing 0 occurrences of strings accepted\n\t\t\t// by the original FA.)\n\t\t\tState start = f.getStartState();\n\t\t\tState accept = f.getUniqueAcceptingState();\n\t\t\tState newStart = f.createState();\n\t\t\tState newAccept = f.createState();\n\t\t\tf.createTransition(newStart, start, FiniteAutomaton.EPSILON); // allow 1 occurrence\n\t\t\tf.createTransition(accept, newAccept, FiniteAutomaton.EPSILON); // as above\n\t\t\tstart.setStart(false);\n\t\t\tnewStart.setStart(true);\n\t\t\taccept.setAccepting(false);\n\t\t\tnewAccept.setAccepting(true);\n\t\t\tf.createTransition(newStart, newAccept, FiniteAutomaton.EPSILON); // allow 0 occurrences\n\t\t\t\n\t\t\treturn f;\n\t\t}\n\t\t\n\t\t// No operator (*+?) was applied, so just return whatever parseF() returned\n\t\treturn f;\n\t}",
"public void parse(String eingabe){\n\t\t\n\t\tassert(!eingabe.equals(\"\"));\n\t\t\n\t\tint linebreaks = eingabe.length() - eingabe.replace(\"\\n\", \"\").length(); \t// Number of line breaks \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Used to check command entry\n\t\tcommandStrings = eingabe.split(\"\\n\");\t\t\t\t\t\t\t\t\t//Splits eingabe into seperate commands\n\t\tString command = commandStrings[commandStrings.length-1];\t\t\t\t\t//Gets the latest entry\n\t\tMatcher m = pattern.matcher(command);\n\t\tif(linebreaks == commandStrings.length) {\n\t\t\tSystem.out.println(command);\n\t\t\tassert(!command.equals(\"\"));\n\t\t\tif(command.contains(\"right\"))\n\t\t\t\tcreateMoveCommand(m, \"right\");\n\t\t\telse if(command.contains(\"left\"))\n\t\t\t\tcreateMoveCommand(m, \"left\");\n\t\t\telse if(command.contains(\"up\"))\n\t\t\t\tcreateMoveCommand(m, \"up\");\n\t\t\telse if(command.contains(\"down\"))\n\t\t\t\tcreateMoveCommand(m, \"down\");\n\t\t\telse if(command.contains(\"diagonal\"))\n\t\t\t\tcreateDiagonalCommand(command);\n\t\t}\n\t\t\n\t\tassert(invariant());\n\t}",
"public interface Parser {\n\n ParsedObject[] parse();\n}",
"private void parse() throws IOException {\r\n\t\tClassLoader cl = getClass().getClassLoader();\r\n\t\tFile file = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t\tFile file2 = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t FileReader fr = new FileReader(file);\r\n\t FileReader fr2 = new FileReader(file2);\r\n\t\tin=new BufferedReader(fr);\r\n\t\tin2=new BufferedReader(fr2);\r\n\t\tString line;\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) parseTerm();\r\n\t\t}\r\n\t\tin.close();\r\n\t\tfr.close();\r\n\t\t\r\n\t\t//terms.printTerms();\r\n\t\tbuffer=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) createEdges();\r\n\t\t}\r\n\t\tin2.close();\r\n\t\tfr2.close();\r\n\t\tLOGGER.info(\"Finished Building DAGs!\");\r\n\t\t\r\n\t}",
"@Override ASTRunif parse_impl(Exec E) {\n AST ary = E.parse();\n // parse the seed\n _seed = (long) E.parse().treeWalk(new Env(new HashSet<Key>())).popDbl();\n E.eatEnd(); // eat the ending ')'\n ASTRunif res = (ASTRunif) clone();\n res._asts = new AST[]{ary};\n return res;\n }",
"public interface TextParserService {\n\n public Optional<String> parseStringToHtml(String input) throws TextParsingException;\n\n public Optional<String> parseStringToHtml(String input, int limit) throws TextParsingException;\n\n\n}",
"public void Mini_Parser(){\n Lista_ER Nuevo=null;\n String Nombre=\"\";\n String Contenido=\"\";\n ArrayList<String> tem = new ArrayList<String>();\n //este boleano sirve para concatenar la expresion regular\n int Estado=0;\n for (int x = 0; x < L_Tokens.size(); x++) {\n switch(Estado){\n //ESTADO 0\n case 0:\n //Conjuntos\n if(L_Tokens.get(x).getLexema().equals(\"CONJ\")){\n if(L_Tokens.get(x+1).getLexema().equals(\":\")){\n if(L_Tokens.get(x+2).getDescripcion().equals(\"Identificador\")){\n //Son conjuntos \n Nombre=L_Tokens.get(x+2).getLexema();\n Estado=1;\n x=x+4;\n }\n }\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n //pasaa estado de expresion regular\n Nombre=L_Tokens.get(x).getLexema();\n Estado=2;\n }\n break;\n \n case 1:\n //ESTADO 1\n //Concatena los conjuntos\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Digito\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n for(int i=6;i<=37;i++){\n if(L_Tokens.get(x).getID()==i){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n }\n //conjunto sin llaves\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n if(L_Tokens.get(x-1).getLexema().equals(\",\")){\n }else{\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n Estado=0;\n Contenido=\"\";\n\n }\n }else{\n Contenido+=L_Tokens.get(x).getLexema();\n }\n \n\n break;\n case 2:\n //ESTADO 2\n if(L_Tokens.get(x).getLexema().equals(\"-\")){\n if(L_Tokens.get(x+1).getLexema().equals(\">\")){\n //se mira que es expresion regular\n \n Lista_ER nuevo=new Lista_ER(L_Tokens.get(x-1).getLexema());\n Nuevo=nuevo;\n L_Tokens_ER.add(nuevo);\n x++;\n Estado=3;\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\":\")){\n //se mira que es lexema\n Estado=4;\n }\n break;\n case 3: \n //ESTADO 3\n //Concatenacion de Expresion Regular\n \n //System.out.println(\"---------------------------------\"+ L_Tokens.get(x).getLexema());\n if(L_Tokens.get(x).getDescripcion().equals(\"Punto\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Barra Vetical\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Interrogacion\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Asterisco\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Signo Mas\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Lexema de Entrada\")){ \n String tem1='\"'+L_Tokens.get(x).getLexema()+'\"';\n Nuevo.setER(tem1);\n \n }\n if(L_Tokens.get(x).getLexema().equals(\"{\")){ \n String tem1=\"\";\n if(L_Tokens.get(x+2).getLexema().equals(\"}\")){\n tem1=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n Nuevo.setER(tem1);\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n Estado=0;\n }\n break;\n case 4:\n// System.out.println(L_Tokens.get(x).getLexema());\n Contenido=L_Tokens.get(x+1).getLexema();\n L_Tokens_Lex.add(new Lista_LexemasE(L_Tokens.get(x-2).getLexema(), Contenido));\n Estado=0;\n \n break;\n }//fin switch\n }//Fin for\n }",
"protected boolean switchToNext()\n {\n if (_nextParserIndex < _parsers.length) {\n delegate = _parsers[_nextParserIndex++];\n return true;\n }\n return false;\n }",
"void acceptAngel(Angel angel);",
"public void getParsed(String text) {\n\t\tAnnotation document = new Annotation(text);\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document);\n\t\tsentences = document.get(SentencesAnnotation.class);\n\t\tsentIt = sentences.iterator();\n\t}",
"public interface AlignmentResolver {\n\n AlignmentType getAlignment(Sun sun, List<Planet> planets, int days);\n\n}",
"public static void main(String[] args) throws Exception {\n Boolean end = false;\n ArrayList<Room> rooms = new ArrayList<Room>();\n ArrayList<Meeting> meetings = new ArrayList<Meeting>();\n initializeLog();\n\n // To perform operations on RoomSchedular by selecting a case\n while (!end) {\n switch (mainMenu()) {\n case 1:\n logger.info(addRoom(rooms));\n break;\n case 2:\n logger.info(removeRoom(rooms));\n break;\n case 3:\n logger.info(scheduleRoom(rooms));\n break;\n case 4:\n logger.info(listSchedule(rooms));\n break;\n case 5:\n logger.info(listRooms(rooms));\n break;\n case 6:\n logger.info(saveRoomJSON(rooms));\n break;\n case 7:\n logger.info(saveScheduleJSON(rooms));\n break;\n case 8:\n // here i changed room to meeting because in method it is given\n // meeting\n logger.info(saveMeetingJSON(meetings));\n\n break;\n case 9:\n\n logger.info(importRoomJSON());\n\n break;\n case 10:\n logger.info(importScheduleJSON());\n break;\n case 11:\n logger.info(importMeetingJSON());\n break;\n\n default:\n logger.info(\"Invalid case selection\");\n break;\n }\n\n }\n\n }",
"public interface Parseable\n{\n\n /**\n * Returns a new {@link GTIParser}.\n * \n * @param gtiScanner The input {@link GTIScanner}.\n * @return A new {@link GTIParser}.\n * @see Parseable#newParser(GTIScanner)\n */\n public GTIParser newParser ( GTIScanner gtiScanner );\n\n\n /**\n * Returns a new {@link GTIParser}.\n * \n * @param pText The input {@link String}.\n * @return A new {@link GTIParser}.\n * @see Parseable#newParser(String)\n */\n public GTIParser newParser ( String pText );\n\n\n /**\n * Returns a new {@link GTIScanner}.\n * \n * @param text The input {@link String}.\n * @return A new {@link GTIScanner}.\n * @see Parseable#newScanner(String)\n */\n public GTIScanner newScanner ( String text );\n}",
"public interface Parser<T> {\n T parse(String source) throws JAXBException;\n\n\n List<String> groupContent(String content);\n\n}",
"private TraceParser genParser() throws ParseException {\n TraceParser parser = new TraceParser();\n parser.addRegex(\"^(?<VTIME>)(?<TYPE>)$\");\n parser.addPartitionsSeparator(\"^--$\");\n return parser;\n }",
"private static Command parseDate(String content) {\r\n\t\tDate startDate, endDate;\r\n\t\tArrayList<String> sensitiveWord = new ArrayList<>(Arrays.asList(DATE));\r\n\t\tString description = \"\", patstring = \"\\\"(.*)\\\"\", strPattern = \"\", matPattern;\r\n\t\tString[] noPatList, leftConList;\r\n\t\tPattern pat = Pattern.compile(patstring);\r\n\t\tMatcher mat = pat.matcher(content);\r\n\t\tboolean find = mat.find();\r\n\t\t// if description indicated by user,\r\n\t\t// remove it and extract the time\r\n\t\tif (find) {\r\n\t\t\tstrPattern = mat.group(0).replaceAll(\"\\\"\", \"\");\r\n\t\t\tcontent = content.replace(strPattern, \"\");\r\n\r\n\t\t}\r\n\r\n\t\tArrayList<Date> date = DateGUIparser.getListDate(content);\r\n\t\tif (!date.isEmpty()) {\r\n\t\t\tif (find) {\r\n\t\t\t\tdescription = strPattern;\r\n\t\t\t} else {\r\n\t\t\t\tmatPattern = DateGUIparser.getMatchInput(content);\r\n\t\t\t\tnoPatList = content.split(matPattern);\r\n\t\t\t\tleftConList = noPatList[0].split(\" \");\r\n\t\t\t\tArrayList<String> wordList = new ArrayList<>(Arrays.asList(leftConList));\r\n\t\t\t\tif (!sensitiveWord.contains(matPattern)) {\r\n\t\t\t\t\twordList.remove(wordList.size() - 1);\r\n\t\t\t\t}\r\n\t\t\t\tfor (String str : wordList) {\r\n\t\t\t\t\tdescription += str + \" \";\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 1; i < noPatList.length; i++) {\r\n\t\t\t\t\tdescription = description + noPatList[i] + \" \";\r\n\t\t\t\t}\r\n\t\t\t\tdescription = description.trim();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// 1 date(as a deadline)\r\n\t\tif (date.size() == 1) {\r\n\t\t\treturn new CommandAdd(description, date.get(0));\r\n\t\t}\r\n\t\t// 2 dates(as start time and end time)\r\n\t\tif (date.size() == 2) {\r\n\t\t\tstartDate = date.get(0);\r\n\t\t\tendDate = date.get(1);\r\n\t\t\tif (startDate.compareTo(endDate) < 0) {\r\n\t\t\t\treturn new CommandAdd(description, date.get(0), date.get(1));\r\n\t\t\t} else {\r\n\t\t\t\tthrow new InvalidDateOrderException();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// 3 or more dates(will be a exception)\r\n\t\tif (date.size() > 2) {\r\n\t\t\tthrow new MultipleDatesException(date.size());\r\n\t\t}\r\n\t\tif (find) {\r\n\t\t\tdescription = strPattern;\r\n\t\t} else {\r\n\t\t\tdescription = content;\r\n\t\t}\r\n\t\tif (description.trim().equals(\"\")) {\r\n\t\t\tthrow new EmptyDescriptionException();\r\n\t\t}\r\n\t\tCommandAddLogger.log(Level.INFO, \"successful add\");\r\n\t\treturn new CommandAdd(description);\r\n\t}",
"public static void main(String[] args) throws IOException {\n int activeThreshold = 300;\n //Activity.selectActive(\"st\", 6, activeThreshold);\n //Activity.selectActive(\"ri\", 6, activeThreshold);\n //Activity.selectActive(\"dw\", 9, activeThreshold);\n\n //Interaction.analysis(\"st\", 6);\n //Interaction.analysis(\"ri\", 6);\n\n //BehaviourIndicators.analysis(\"st\", 6);\n //BehaviourIndicators.analysis(\"ri\", 6);\n //BehaviourIndicators.analysis(\"dw\", 9);\n\n Engagement.analysis(\"st\",6);\n Engagement.analysis(\"ri\",6);\n //todo the data files for DW have to be adjusted to the ones of the other two to be able to run it\n //Engagement.analysis(\"dw\",9);\n\n //Motivation.analysis(\"ri\", 6);\n //Motivation.analysis(\"st\", 6);\n }",
"protected void parseStartEvents(XmlElement parentXmlElement) {\n\n List<XmlElement> startEventXmlElements = parentXmlElement.getElements(\"startEvent\");\n\n if (startEventXmlElements.size() > 1) {\n\n getProblemLogger().addError(\"Multiple start events are currently not supported\", parentXmlElement);\n } else if (startEventXmlElements.size() > 0) {\n\n XmlElement startEventXmlElement = startEventXmlElements.get(0);\n\n Node startEventNode = BpmnNodeFactory.createBpmnStartEventNode(processBuilder);\n\n parseGeneralInformation(startEventXmlElement, startEventNode);\n\n getNodeXmlIdTable().put((String) startEventNode.getAttribute(\"idXml\"), startEventNode);\n\n // We should think about forms for the startEvent\n // Maybe we can implement that as startTrigger\n // Example:\n // StartFormHandler startFormHandler = new StartFormHandler();\n // String startFormHandlerClassName = startEventElement.attributeNS(BpmnXmlParser.JODA_ENGINE_EXTENSIONS_NS,\n // \"formHandlerClass\");\n\n // Doing some afterwork\n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseStartEvent(startEventXmlElement, startEventNode, processBuilder);\n }\n }\n }",
"private void createAdapters() {\n // Available quests for a Neutral hero\n adapterAvailableNeutral = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, false);\n query.whereDoesNotMatchKeyInQuery(QuestApp.ACCEPTEDBY_KEY, QuestApp.OBJECTID_KEY, ParseUser.getQuery());\n return query;\n }\n });\n\n // Available quests for a Good hero\n adapterAvailableGood = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, false);\n query.whereEqualTo(QuestApp.ALIGNMENT_KEY, 0);\n query.whereDoesNotMatchKeyInQuery(QuestApp.ACCEPTEDBY_KEY, QuestApp.OBJECTID_KEY, ParseUser.getQuery());\n return query;\n }\n });\n\n // Available quests for an Evil hero\n adapterAvailableEvil = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, false);\n query.whereEqualTo(QuestApp.ALIGNMENT_KEY, 2);\n query.whereDoesNotMatchKeyInQuery(QuestApp.ACCEPTEDBY_KEY, QuestApp.OBJECTID_KEY, ParseUser.getQuery());\n return query;\n }\n });\n\n // Quests accepted by user\n adapterAccepted = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, false);\n query.whereEqualTo(QuestApp.ACCEPTEDBY_KEY, user);\n return query;\n }\n });\n\n // Quests completed by user\n adapterCompleted = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, true);\n query.whereEqualTo(QuestApp.ACCEPTEDBY_KEY, user);\n return query;\n }\n });\n }",
"@Override\n\tpublic ATN createATN() {\n\t\tSet<String> modes = ((LexerGrammar) g).modes.keySet();\n\t\tfor (String modeName : modes) {\n\t\t\t// create s0, start state; implied Tokens rule node\n\t\t\tTokensStartState startState =\n\t\t\t\tnewState(TokensStartState.class, null);\n\t\t\tatn.modeNameToStartState.put(modeName, startState);\n\t\t\tatn.modeToStartState.add(startState);\n\t\t\tatn.defineDecisionState(startState);\n\t\t}\n\n\t\t// INIT ACTION, RULE->TOKEN_TYPE MAP\n\t\tatn.ruleToTokenType = new int[g.rules.size()];\n\t\tfor (Rule r : g.rules.values()) {\n\t\t\tatn.ruleToTokenType[r.index] = g.getTokenType(r.name);\n\t\t}\n\n\t\t// CREATE ATN FOR EACH RULE\n\t\t_createATN(g.rules.values());\n\n\t\tatn.lexerActions = new LexerAction[indexToActionMap.size()];\n\t\tfor (Map.Entry<Integer, LexerAction> entry : indexToActionMap.entrySet()) {\n\t\t\tatn.lexerActions[entry.getKey()] = entry.getValue();\n\t\t}\n\n\t\t// LINK MODE START STATE TO EACH TOKEN RULE\n\t\tfor (String modeName : modes) {\n\t\t\tList<Rule> rules = ((LexerGrammar)g).modes.get(modeName);\n\t\t\tTokensStartState startState = atn.modeNameToStartState.get(modeName);\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tif ( !r.isFragment() ) {\n\t\t\t\t\tRuleStartState s = atn.ruleToStartState[r.index];\n\t\t\t\t\tepsilon(startState, s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tATNOptimizer.optimize(g, atn);\n\t\tcheckEpsilonClosure();\n\t\treturn atn;\n\t}",
"private Parser[] getParsers() {\n return new Parser[]{new OpenDocumentParser()};\n }",
"protected void startCfgElement(String qName, Attributes attributes) throws SAXException {\n\t\tif (CONFIG_ROOT_ELMT.equals(qName)) {\n\t\t\tif (streamsConfigData.isStreamsAvailable()) {\n\t\t\t\tthrow new SAXParseException(StreamsResources.getStringFormatted(StreamsResources.RESOURCE_BUNDLE_NAME,\n\t\t\t\t\t\t\"ConfigParserHandler.multiple.elements\", qName), currParseLocation);\n\t\t\t}\n\t\t} else if (PROPERTY_ELMT.equals(qName)) {\n\t\t\tprocessProperty(attributes);\n\t\t} else if (FIELD_ELMT.equals(qName)) {\n\t\t\tprocessField(attributes);\n\t\t} else if (FIELD_LOC_ELMT.equals(qName)) {\n\t\t\tprocessFieldLocator(attributes);\n\t\t} else if (FIELD_MAP_ELMT.equals(qName)) {\n\t\t\tprocessFieldMap(attributes);\n\t\t} else if (PARSER_REF_ELMT.equals(qName)) {\n\t\t\tprocessParserRef(attributes);\n\t\t} else if (PARSER_ELMT.equals(qName)) {\n\t\t\tprocessParser(attributes);\n\t\t} else if (STREAM_ELMT.equals(qName)) {\n\t\t\tprocessStream(attributes);\n\t\t} else if (FILTER_ELMT.equals(qName)) {\n\t\t\tprocessFilter(attributes);\n\t\t} else if (VALUE_ELMT.equals(qName)) {\n\t\t\tprocessValue(attributes);\n\t\t} else if (EXPRESSION_ELMT.equals(qName)) {\n\t\t\tprocessFilterExpression(attributes);\n\t\t} else if (TNT4J_PROPERTIES_ELMT.equals(qName)) {\n\t\t\tprocessTNT4JProperties(attributes);\n\t\t} else if (REF_ELMT.equals(qName)) {\n\t\t\tprocessReference(attributes);\n\t\t} else if (JAVA_OBJ_ELMT.equals(qName)) {\n\t\t\tprocessJavaObject(attributes);\n\t\t} else if (PARAM_ELMT.equals(qName)) {\n\t\t\tprocessParam(attributes);\n\t\t} else if (FIELD_TRANSFORM_ELMT.equals(qName)) {\n\t\t\tprocessFieldTransform(attributes);\n\t\t} else if (EMBEDDED_ACTIVITY_ELMT.equals(qName)) {\n\t\t\tprocessEmbeddedActivity(attributes);\n\t\t} else if (CACHE_ELMT.equals(qName)) {\n\t\t\tprocessCache(attributes);\n\t\t} else if (CACHE_ENTRY_ELMT.equals(qName)) {\n\t\t\tprocessCacheEntry(attributes);\n\t\t} else if (CACHE_KEY_ELMT.equals(qName)) {\n\t\t\tprocessKey(attributes);\n\t\t} else if (FIELD_MAP_REF_ELMT.equals(qName)) {\n\t\t\tprocessFieldMapReference(attributes);\n\t\t} else if (RESOURCE_REF_ELMT.equals(qName)) {\n\t\t\tprocessResourceReference(attributes);\n\t\t} else if (CACHE_DEFAULT_VALUE_ELMT.equals(qName)) {\n\t\t\tprocessDefault(attributes);\n\t\t} else if (MATCH_EXP_ELMT.equals(qName)) {\n\t\t\tprocessMatchExpression(attributes);\n\t\t} else {\n\t\t\tthrow new SAXParseException(StreamsResources.getStringFormatted(StreamsResources.RESOURCE_BUNDLE_NAME,\n\t\t\t\t\t\"ConfigParserHandler.unknown.tag\", qName), currParseLocation);\n\t\t}\n\t}",
"public static AppointmentCommand parse(String fullCommand) throws HappyPillsException {\n String[] userCommand = fullCommand.trim().split(\" \", 3);\n\n if (userCommand[0].equalsIgnoreCase(\"add\")) {\n return parseAddCommand(userCommand[2]);\n } else if (userCommand[0].equalsIgnoreCase(\"edit\")) {\n String[] detailedCommand = userCommand[2].trim().split(\" \", 3);\n if (detailedCommand.length == 3) {\n return new EditAppointmentCommand(detailedCommand[0].trim(), detailedCommand[1].trim(),\n detailedCommand[2]);\n } else {\n throw new HappyPillsException(TextUi.incompleteCommandString(\" help edit appt\"));\n }\n } else if (userCommand[0].equalsIgnoreCase(\"done\")) {\n String [] detailedCommand = userCommand[2].trim().split(\" \",2);\n if (detailedCommand.length == 2) {\n return new DoneAppointmentCommand(detailedCommand[0].trim(),detailedCommand[1].trim());\n } else {\n throw new HappyPillsException(TextUi.incompleteCommandString(\" help done appt\"));\n }\n } else if (userCommand[0].equalsIgnoreCase(\"list\")) {\n return new ListAppointmentCommand();\n } else if (userCommand[0].equalsIgnoreCase(\"delete\")) {\n String [] detailedCommand = userCommand[2].trim().split(\" \",2);\n if (detailedCommand.length == 2) {\n return new DeleteAppointmentCommand(detailedCommand[0].trim(), detailedCommand[1].trim());\n } else {\n throw new HappyPillsException(TextUi.incompleteCommandString(\" help delete appt\"));\n }\n } else if (userCommand[0].equalsIgnoreCase(\"find\")) {\n return new FindAppointmentCommand(userCommand[2]);\n } else {\n throw new HappyPillsException(TextUi.printIncorrectCommand(userCommand[0]));\n }\n }",
"void initGrammarEvents() {\n\tg0.addProduction(new com.siemens.ct.exi.grammars.event.StartDocument(), g1);\n\tg1.addProduction(globalSE59, g2);\n\tg1.addProduction(globalSE62, g2);\n\tg1.addProduction(globalSE64, g2);\n\tg1.addProduction(globalSE66, g2);\n\tg1.addProduction(globalSE73, g2);\n\tg1.addProduction(globalSE75, g2);\n\tg1.addProduction(globalSE76, g2);\n\tg1.addProduction(globalSE78, g2);\n\tg1.addProduction(globalSE80, g2);\n\tg1.addProduction(globalSE82, g2);\n\tg1.addProduction(globalSE85, g2);\n\tg1.addProduction(globalSE91, g2);\n\tg1.addProduction(globalSE93, g2);\n\tg1.addProduction(globalSE95, g2);\n\tg1.addProduction(globalSE97, g2);\n\tg1.addProduction(globalSE101, g2);\n\tg1.addProduction(globalSE102, g2);\n\tg1.addProduction(globalSE104, g2);\n\tg1.addProduction(globalSE106, g2);\n\tg1.addProduction(globalSE109, g2);\n\tg1.addProduction(globalSE111, g2);\n\tg1.addProduction(globalSE113, g2);\n\tg1.addProduction(globalSE115, g2);\n\tg1.addProduction(globalSE119, g2);\n\tg1.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g2);\n\tg2.addProduction(new com.siemens.ct.exi.grammars.event.EndDocument(), g68);\n\tg3.addProduction(new com.siemens.ct.exi.grammars.event.StartDocument(), g4);\n\tg4.addProduction(globalSE59, g4);\n\tg4.addProduction(globalSE62, g4);\n\tg4.addProduction(globalSE64, g4);\n\tg4.addProduction(globalSE66, g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc68, g7), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc69, g7), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc70, g27), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc72, g7), g4);\n\tg4.addProduction(globalSE73, g4);\n\tg4.addProduction(globalSE75, g4);\n\tg4.addProduction(globalSE76, g4);\n\tg4.addProduction(globalSE78, g4);\n\tg4.addProduction(globalSE80, g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc81, g7), g4);\n\tg4.addProduction(globalSE82, g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc84, g7), g4);\n\tg4.addProduction(globalSE85, g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc87, g18), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc88, g18), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc89, g7), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc90, g7), g4);\n\tg4.addProduction(globalSE91, g4);\n\tg4.addProduction(globalSE93, g4);\n\tg4.addProduction(globalSE95, g4);\n\tg4.addProduction(globalSE97, g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc99, g18), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc100, g7), g4);\n\tg4.addProduction(globalSE101, g4);\n\tg4.addProduction(globalSE102, g4);\n\tg4.addProduction(globalSE104, g4);\n\tg4.addProduction(globalSE106, g4);\n\tg4.addProduction(globalSE109, g4);\n\tg4.addProduction(globalSE111, g4);\n\tg4.addProduction(globalSE113, g4);\n\tg4.addProduction(globalSE115, g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc117, g18), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc118, g18), g4);\n\tg4.addProduction(globalSE119, g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc121, g9), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc122, g16), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc124, g18), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc125, g17), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc126, g9), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc127, g9), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc128, g7), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g4);\n\tg4.addProduction(new com.siemens.ct.exi.grammars.event.EndDocument(), g68);\n\tg5.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc0, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g49);\n\tg6.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc84, g7), g71);\n\tg6.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc69, g7), g73);\n\tg6.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc128, g7), g74);\n\tg7.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BinaryBase64Datatype(qnc61)), g69);\n\tg8.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g50);\n\tg8.addProduction(globalSE75, g79);\n\tg8.addProduction(globalSE76, g79);\n\tg8.addProduction(globalSE95, g79);\n\tg8.addProduction(globalSE119, g79);\n\tg8.addProduction(globalSE85, g79);\n\tg8.addProduction(globalSE97, g79);\n\tg8.addProduction(globalSE80, g79);\n\tg8.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g79);\n\tg8.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g99);\n\tg9.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.StringDatatype(qnc52)), g69);\n\tg10.addProduction(globalSE62, g80);\n\tg10.addProduction(globalSE91, g80);\n\tg10.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g80);\n\tg10.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g83);\n\tg11.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc81, g7), g81);\n\tg12.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc5, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g51);\n\tg12.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc6, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g52);\n\tg12.addProduction(globalSE115, g69);\n\tg12.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg13.addProduction(globalSE113, g85);\n\tg14.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc0, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g53);\n\tg15.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc122, g16), g91);\n\tg15.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc124, g18), g91);\n\tg15.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc126, g9), g91);\n\tg15.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc118, g18), g91);\n\tg15.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc117, g18), g91);\n\tg15.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g91);\n\tg16.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc121, g9), g88);\n\tg17.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.IntegerDatatype(qnc43)), g69);\n\tg18.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BinaryBase64Datatype(qnc27)), g69);\n\tg19.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc87, g18), g93);\n\tg19.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc88, g18), g94);\n\tg20.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc99, g18), g96);\n\tg21.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g54);\n\tg21.addProduction(globalSE93, g103);\n\tg22.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g55);\n\tg22.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc5, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g56);\n\tg22.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc6, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g57);\n\tg22.addProduction(globalSE115, g100);\n\tg22.addProduction(globalSE64, g101);\n\tg23.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc1, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g58);\n\tg23.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g59);\n\tg23.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc3, new com.siemens.ct.exi.datatype.StringDatatype(qnc52)), g49);\n\tg23.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg23.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg23.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g67);\n\tg24.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g60);\n\tg24.addProduction(globalSE111, g108);\n\tg25.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g61);\n\tg25.addProduction(globalSE59, g105);\n\tg26.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc0, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g62);\n\tg27.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.IntegerDatatype(qnc71)), g69);\n\tg28.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g63);\n\tg28.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BinaryBase64Datatype(qnc27)), g69);\n\tg29.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g64);\n\tg29.addProduction(globalSE106, g113);\n\tg30.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g65);\n\tg30.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc4, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g66);\n\tg31.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.ListDatatype(new com.siemens.ct.exi.datatype.StringDatatype(qnc14), qnc13)), g69);\n\tg32.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.StringDatatype(qnc14)), g69);\n\tg33.addProduction(new com.siemens.ct.exi.grammars.event.AttributeGeneric(), g33);\n\tg33.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg33.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg33.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g67);\n\tg34.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BooleanDatatype(qnc28)), g69);\n\tg35.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.NBitUnsignedIntegerDatatype(com.siemens.ct.exi.values.IntegerValue.valueOf(-128), com.siemens.ct.exi.values.IntegerValue.valueOf(127), qnc29)), g69);\n\tg36.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.date, qnc30)), g69);\n\tg37.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.dateTime, qnc31)), g69);\n\tg38.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DecimalDatatype(qnc32)), g69);\n\tg39.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.FloatDatatype(qnc33)), g69);\n\tg40.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gDay, qnc36)), g69);\n\tg41.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gMonth, qnc37)), g69);\n\tg42.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gMonthDay, qnc38)), g69);\n\tg43.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gYear, qnc39)), g69);\n\tg44.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gYearMonth, qnc40)), g69);\n\tg45.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BinaryHexDatatype(qnc41)), g69);\n\tg46.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.UnsignedIntegerDatatype(qnc47)), g69);\n\tg47.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.time, qnc53)), g69);\n\tg48.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.NBitUnsignedIntegerDatatype(com.siemens.ct.exi.values.IntegerValue.valueOf(0), com.siemens.ct.exi.values.IntegerValue.valueOf(255), qnc55)), g69);\n\tg49.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg49.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg49.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g67);\n\tg50.addProduction(globalSE75, g79);\n\tg50.addProduction(globalSE76, g79);\n\tg50.addProduction(globalSE95, g79);\n\tg50.addProduction(globalSE119, g79);\n\tg50.addProduction(globalSE85, g79);\n\tg50.addProduction(globalSE97, g79);\n\tg50.addProduction(globalSE80, g79);\n\tg50.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g79);\n\tg50.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g99);\n\tg51.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc6, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g52);\n\tg51.addProduction(globalSE115, g69);\n\tg51.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg52.addProduction(globalSE115, g69);\n\tg52.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg53.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc127, g9), g84);\n\tg53.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g84);\n\tg53.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg53.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g84);\n\tg54.addProduction(globalSE93, g103);\n\tg55.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc5, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g56);\n\tg55.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc6, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g57);\n\tg55.addProduction(globalSE115, g100);\n\tg55.addProduction(globalSE64, g101);\n\tg56.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc6, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g57);\n\tg56.addProduction(globalSE115, g100);\n\tg56.addProduction(globalSE64, g101);\n\tg57.addProduction(globalSE115, g100);\n\tg57.addProduction(globalSE64, g101);\n\tg58.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc2, new com.siemens.ct.exi.datatype.StringDatatype(qnc15)), g59);\n\tg58.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc3, new com.siemens.ct.exi.datatype.StringDatatype(qnc52)), g49);\n\tg58.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg58.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg58.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g67);\n\tg59.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc3, new com.siemens.ct.exi.datatype.StringDatatype(qnc52)), g49);\n\tg59.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg59.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg59.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g67);\n\tg60.addProduction(globalSE111, g108);\n\tg61.addProduction(globalSE59, g105);\n\tg62.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc70, g27), g67);\n\tg62.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg62.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg62.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g106);\n\tg63.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BinaryBase64Datatype(qnc27)), g69);\n\tg64.addProduction(globalSE106, g113);\n\tg65.addProduction(new com.siemens.ct.exi.grammars.event.Attribute(qnc4, new com.siemens.ct.exi.datatype.StringDatatype(qnc26)), g66);\n\tg66.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg66.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g112);\n\tg67.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg67.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg67.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g67);\n\tg69.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg70.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BinaryBase64Datatype(qnc61)), g69);\n\tg71.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc90, g7), g72);\n\tg72.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc69, g7), g73);\n\tg72.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc128, g7), g74);\n\tg73.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc128, g7), g74);\n\tg74.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc72, g7), g75);\n\tg74.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc100, g7), g76);\n\tg74.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg75.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc100, g7), g76);\n\tg75.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg76.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc89, g7), g69);\n\tg77.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc84, g7), g71);\n\tg77.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc69, g7), g73);\n\tg77.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc128, g7), g74);\n\tg78.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.StringDatatype(qnc52)), g69);\n\tg79.addProduction(globalSE75, g79);\n\tg79.addProduction(globalSE76, g79);\n\tg79.addProduction(globalSE95, g79);\n\tg79.addProduction(globalSE119, g79);\n\tg79.addProduction(globalSE85, g79);\n\tg79.addProduction(globalSE97, g79);\n\tg79.addProduction(globalSE80, g79);\n\tg79.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g79);\n\tg79.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg79.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g79);\n\tg80.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg80.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g80);\n\tg81.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc68, g7), g69);\n\tg82.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc81, g7), g81);\n\tg83.addProduction(globalSE62, g80);\n\tg83.addProduction(globalSE91, g80);\n\tg83.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g80);\n\tg83.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g83);\n\tg84.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc127, g9), g84);\n\tg84.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g84);\n\tg84.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg84.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g84);\n\tg85.addProduction(globalSE113, g85);\n\tg85.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg86.addProduction(globalSE113, g85);\n\tg87.addProduction(globalSE115, g69);\n\tg87.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg88.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc125, g17), g69);\n\tg89.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.IntegerDatatype(qnc43)), g69);\n\tg90.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc121, g9), g88);\n\tg91.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc122, g16), g91);\n\tg91.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc124, g18), g91);\n\tg91.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc126, g9), g91);\n\tg91.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc118, g18), g91);\n\tg91.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc117, g18), g91);\n\tg91.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g91);\n\tg91.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg92.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc122, g16), g91);\n\tg92.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc124, g18), g91);\n\tg92.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc126, g9), g91);\n\tg92.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc118, g18), g91);\n\tg92.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc117, g18), g91);\n\tg92.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g91);\n\tg93.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc88, g18), g94);\n\tg93.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g94);\n\tg93.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg94.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g94);\n\tg94.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg95.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc87, g18), g93);\n\tg95.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc88, g18), g94);\n\tg96.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc99, g18), g96);\n\tg96.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g97);\n\tg96.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg97.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc99, g18), g96);\n\tg97.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg98.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc99, g18), g96);\n\tg99.addProduction(globalSE75, g79);\n\tg99.addProduction(globalSE76, g79);\n\tg99.addProduction(globalSE95, g79);\n\tg99.addProduction(globalSE119, g79);\n\tg99.addProduction(globalSE85, g79);\n\tg99.addProduction(globalSE97, g79);\n\tg99.addProduction(globalSE80, g79);\n\tg99.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g79);\n\tg99.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g99);\n\tg100.addProduction(globalSE64, g101);\n\tg101.addProduction(globalSE66, g69);\n\tg102.addProduction(globalSE115, g100);\n\tg102.addProduction(globalSE64, g101);\n\tg103.addProduction(globalSE93, g103);\n\tg103.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg104.addProduction(globalSE93, g103);\n\tg105.addProduction(globalSE102, g104);\n\tg106.addProduction(new com.siemens.ct.exi.grammars.event.StartElement(qnc70, g27), g67);\n\tg106.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg106.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg106.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g106);\n\tg107.addProduction(globalSE59, g105);\n\tg108.addProduction(globalSE109, g109);\n\tg109.addProduction(globalSE73, g110);\n\tg109.addProduction(globalSE82, g110);\n\tg109.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg110.addProduction(globalSE82, g110);\n\tg110.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg111.addProduction(globalSE111, g108);\n\tg112.addProduction(new com.siemens.ct.exi.grammars.event.StartElementGeneric(), g67);\n\tg112.addProduction(new com.siemens.ct.exi.grammars.event.CharactersGeneric(), g112);\n\tg113.addProduction(globalSE106, g113);\n\tg113.addProduction(new com.siemens.ct.exi.grammars.event.EndElement(), g68);\n\tg114.addProduction(globalSE106, g113);\n\tg115.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.ListDatatype(new com.siemens.ct.exi.datatype.StringDatatype(qnc14), qnc13)), g69);\n\tg116.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BooleanDatatype(qnc28)), g69);\n\tg117.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.NBitUnsignedIntegerDatatype(com.siemens.ct.exi.values.IntegerValue.valueOf(-128), com.siemens.ct.exi.values.IntegerValue.valueOf(127), qnc29)), g69);\n\tg118.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.date, qnc30)), g69);\n\tg119.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.dateTime, qnc31)), g69);\n\tg120.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DecimalDatatype(qnc32)), g69);\n\tg121.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.FloatDatatype(qnc33)), g69);\n\tg122.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gDay, qnc36)), g69);\n\tg123.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gMonth, qnc37)), g69);\n\tg124.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gMonthDay, qnc38)), g69);\n\tg125.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gYear, qnc39)), g69);\n\tg126.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.gYearMonth, qnc40)), g69);\n\tg127.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.BinaryHexDatatype(qnc41)), g69);\n\tg128.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.UnsignedIntegerDatatype(qnc47)), g69);\n\tg129.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.DatetimeDatatype(com.siemens.ct.exi.types.DateTimeType.time, qnc53)), g69);\n\tg130.addProduction(new com.siemens.ct.exi.grammars.event.Characters(new com.siemens.ct.exi.datatype.NBitUnsignedIntegerDatatype(com.siemens.ct.exi.values.IntegerValue.valueOf(0), com.siemens.ct.exi.values.IntegerValue.valueOf(255), qnc55)), g69);\n\t/* END Grammar Events ----- */\n\n\t}",
"public void interpret()\n\t{\t\n\t\t// Setup all the common properties derived from task definitions for all partition types.\n\t\tIRule rule = getRule();\n\t\t\n\t\tTask task = (Task) rule.getTaskMap().get(TaskType.SRC_PATH);\n\n\t\tMatchProperties match = (MatchProperties)task.getMatchProperties();\n\t\t\n\t\tthis.setMatchingAttributeName(match.getAttributeName());\n\t\tthis.setAttributeMatchType(match.getType());\n\t\t\n\t\tif (match.getType() == TaskMatchType.EXPR)\n\t\t{\n\t\t\tthis.setMatchingAttributeValue(match.getAttributeValue());\n\t\t\tthis.setAttributeMatchExpression(match.getExprType());\n\t\t}\n\t\telse if (match.getType() == TaskMatchType.REGEX)\n\t\t{\n\t\t\tthis.setAttributeMatchRegexPattern(match.getPattern());\n\t\t}\n\t\t\n\t\tif (match.getType() == TaskMatchType.EXPR)\n\t\t{\n\t\t\t// \"//body/div/p[starts-with(@class,'HeadingProcessName ')]\"\t\t\t\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(task.getSource());\n\t\t\tswitch (match.getExprType())\n\t\t\t{\n\t\t\tcase STARTS_WITH:\n\t\t\tcase CONTAINS:\n\t\t\t\tsb.append(\"[\");\n\t\t\t\tsb.append(match.getExprTypeAsString());\n\t\t\t\tsb.append(\"(@\");\n\t\t\t\tsb.append(match.getAttributeName());\n\t\t\t\tsb.append(\",'\");\n\t\t\t\tsb.append(match.getAttributeValue());\n\t\t\t\tsb.append(\"')]\");\n\t\t\t\tsetMatchingElementXPath(sb.toString());\n\t\t\t\tbreak;\n\t\t\tcase NOT_SET:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t\telse if (match.getType() == TaskMatchType.REGEX)\n\t\t{\n\t\t\t// \"//body/div/p[matches(@class,'{pattern}')]\"\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(task.getSource());\n\t\t\tsb.append(\"[\");\n\t\t\tsb.append(\"matches\");\n\t\t\tsb.append(\"(@\");\n\t\t\tsb.append(match.getAttributeName());\n\t\t\tsb.append(\",'\");\n\t\t\tsb.append(match.getPattern());\n\t\t\tsb.append(\"')]\");\n\t\t\tsetMatchingElementXPath(sb.toString());\n\t\t}\n\t\t\n\t\t// Process the title match properties. This is an optional directive.\n\t\tif (rule.getTaskMap().containsKey(TaskType.SRC_TEXT_MATCH))\n\t\t{\n\t\t\ttask = (Task) rule.getTaskMap().get(TaskType.SRC_TEXT_MATCH);\n\t\t\t\n\t\t\tmatch = (MatchProperties)task.getMatchProperties();\n\t\t\t\n\t\t\tif (match != null)\n\t\t\t{\n\t\t\t\tthis.setTitleNameMatchCondition(true);\t\t\t\t\n\t\t\t\tthis.setTitleNameMatchType(match.getType());\n\t\t\t\t\n\t\t\t\tif (match.getType() == TaskMatchType.EXPR)\n\t\t\t\t{\n\t\t\t\t\tthis.setTitleNameMatchExprType(match.getExprType());\n\t\t\t\t\tthis.setTitleNameMatchExprValue(match.getExprValue());\n\t\t\t\t}\n\t\t\t\telse if (match.getType() == TaskMatchType.REGEX)\n\t\t\t\t{\n\t\t\t\t\tthis.setTitleNameMatchRegexPattern(match.getPattern());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tthis.setTitleNameMatchCondition(false);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Process the title replace regex properties. This is an optional directive.\n\t\tif (rule.getTaskMap().containsKey(TaskType.TARGET_NAME))\n\t\t{\n\t\t\ttask = (Task) rule.getTaskMap().get(TaskType.TARGET_NAME);\n\t\t\tmatch = (MatchProperties)task.getMatchProperties();\n\t\t\tif (match != null && match.getPattern() != null && match.getReplaceWith() != null)\n\t\t\t{\n\t\t\t\tthis.setTitleNameReplaceCondition(true);\n\t\t\t\tthis.setTitleNameReplaceRegexPattern(match.getPattern());\n\t\t\t\tthis.setTitleNameReplaceWithRegexPattern(match.getReplaceWith());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Process the partition options\n\t\tif (rule.getTaskMap().containsKey(TaskType.PARTITION_OPTIONS))\n\t\t{\n\t\t\ttask = (Task) rule.getTaskMap().get(TaskType.PARTITION_OPTIONS);\n\t\t\tif (task.getKeepIntroNodes())\n\t\t\t\tthis.setKeepFirstElements(task.getKeepIntroNodes());\n\t\t\tif (task.getIntroPartitionTitle() != null)\n\t\t\t\tthis.setIntroPartitionTitle(task.getIntroPartitionTitle());\n\t\t}\n\n\t}",
"public interface LLkGrammarAnalyzer extends GrammarAnalyzer {\n\n\n public boolean deterministic(AlternativeBlock blk);\n\n public boolean deterministic(OneOrMoreBlock blk);\n\n public boolean deterministic(ZeroOrMoreBlock blk);\n\n public Lookahead FOLLOW(int k, RuleEndElement end);\n\n public Lookahead look(int k, ActionElement action);\n\n public Lookahead look(int k, AlternativeBlock blk);\n\n public Lookahead look(int k, BlockEndElement end);\n\n public Lookahead look(int k, CharLiteralElement atom);\n\n public Lookahead look(int k, CharRangeElement end);\n\n public Lookahead look(int k, GrammarAtom atom);\n\n public Lookahead look(int k, OneOrMoreBlock blk);\n\n public Lookahead look(int k, RuleBlock blk);\n\n public Lookahead look(int k, RuleEndElement end);\n\n public Lookahead look(int k, RuleRefElement rr);\n\n public Lookahead look(int k, StringLiteralElement atom);\n\n public Lookahead look(int k, SynPredBlock blk);\n\n public Lookahead look(int k, TokenRangeElement end);\n\n public Lookahead look(int k, TreeElement end);\n\n public Lookahead look(int k, WildcardElement wc);\n\n public Lookahead look(int k, ZeroOrMoreBlock blk);\n\n public Lookahead look(int k, String rule);\n\n public void setGrammar(Grammar g);\n\n public boolean subruleCanBeInverted(AlternativeBlock blk, boolean forLexer);\n}",
"private void getAlarmStrategies(Handler handler) {\n new LoadDefaultAlarmStrategies(handler).execute();\n new LoadCustomAlarmStrategies(handler).execute();\n }",
"protected void parseTask(XmlElement taskXmlElement) {\n\n Node taskNode = processBuilder.getNodeBuilder().setIncomingBehaviour(new SimpleJoinBehaviour())\n .setOutgoingBehaviour(new TakeAllSplitBehaviour())\n .setActivityBehavior(new AutomatedDummyActivity(\"Doing something\")).buildNode();\n\n parseGeneralInformation(taskXmlElement, taskNode);\n getNodeXmlIdTable().put((String) taskNode.getAttribute(\"idXml\"), taskNode);\n\n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseTask(taskXmlElement, taskNode, processBuilder);\n }\n }",
"public interface Parser {\n\n}",
"@Override\n \t\t\tpublic void done(List<ParseObject> arg0, com.parse.ParseException arg1) {\n \t\t\t\tif (arg1 == null) {\n \t\t\t\t\tif (!arg0.isEmpty()) {\n \t\t\t\t\t\tfor (int i = 0; i < arg0.size(); i++) {\n \t\t\t\t\t\t\tParseObject row=arg0.get(i);\n \t\t\t\t\t\t\tif(row.getString(\"type\").equals(\"Schedule\")){\n \t\t\t\t\t\t\t\taddMarkerSchedule(row.getString(\"name\"), row.getDouble(\"latitude\"), row.getDouble(\"longitude\"), row.getString(\"type\"));\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tif(row.getString(\"type\").equals(\"To Do\")){\n \t\t\t\t\t\t\t\taddMarkerTodo(row.getString(\"name\"), row.getDouble(\"latitude\"), row.getDouble(\"longitude\"), row.getString(\"type\"));\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tif(row.getString(\"type\").equals(\"Meet\")){\n \t\t\t\t\t\t\t\taddMarkerMeet(row.getString(\"name\"), row.getDouble(\"latitude\"), row.getDouble(\"longitude\"), row.getString(\"type\"));\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}",
"private static void parseToBuilder(DateTimeFormatterBuilder builder, String pattern) {\n int length = pattern.length();\n int[] indexRef = new int[1];\n\n for (int i=0; i<length; i++) {\n indexRef[0] = i;\n String token = parseToken(pattern, indexRef);\n i = indexRef[0];\n\n int tokenLen = token.length();\n if (tokenLen == 0) {\n break;\n }\n char c = token.charAt(0);\n\n if (c == '%' && token.charAt(1) != '%') {\n c = token.charAt(1);\n switch(c) {\n case 'a':\n builder.appendDayOfWeekShortText();\n break;\n case 'A':\n builder.appendDayOfWeekText();\n break;\n case 'b':\n case 'h':\n builder.appendMonthOfYearShortText();\n break;\n case 'B':\n builder.appendMonthOfYearText();\n break;\n case 'c':\n builder.appendDayOfWeekShortText();\n builder.appendLiteral(' ');\n builder.appendMonthOfYearShortText();\n builder.appendLiteral(' ');\n builder.appendDayOfMonth(2);\n builder.appendLiteral(' ');\n builder.appendHourOfDay(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n builder.appendLiteral(':');\n builder.appendSecondOfMinute(2);\n builder.appendLiteral(' ');\n builder.appendYear(4,4);\n break;\n case 'C':\n builder.appendCenturyOfEra(1,2);\n break;\n case 'd':\n builder.appendDayOfMonth(2);\n break;\n case 'D':\n builder.appendMonthOfYear(2);\n builder.appendLiteral('/');\n builder.appendDayOfMonth(2);\n builder.appendLiteral('/');\n builder.appendTwoDigitYear(2019);\n break;\n case 'e':\n builder.appendOptional(DateTimeFormat.forPattern(\"' '\").getParser());\n builder.appendDayOfMonth(2);\n break;\n case 'F':\n builder.appendYear(4,4);\n builder.appendLiteral('-');\n builder.appendMonthOfYear(2);\n builder.appendLiteral('-');\n builder.appendDayOfMonth(2);\n break;\n case 'g':\n case 'G':\n break; //for output only, accepted and ignored for input\n case 'H':\n builder.appendHourOfDay(2);\n break;\n case 'I':\n builder.appendClockhourOfHalfday(2);\n break;\n case 'j':\n builder.appendDayOfYear(3);\n break;\n case 'k':\n builder.appendOptional(DateTimeFormat.forPattern(\"' '\").getParser());\n builder.appendHourOfDay(2);\n break;\n case 'l':\n builder.appendOptional(DateTimeFormat.forPattern(\"' '\").getParser());\n builder.appendClockhourOfHalfday(2);\n break;\n case 'm':\n builder.appendMonthOfYear(2);\n break;\n case 'M':\n builder.appendMinuteOfHour(2);\n break;\n case 'n':\n break;\n case 'p':\n builder.appendHalfdayOfDayText();\n break;\n case 'r':\n builder.appendClockhourOfHalfday(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n builder.appendLiteral(':');\n builder.appendSecondOfMinute(2);\n builder.appendLiteral(' ');\n builder.appendHalfdayOfDayText();\n break;\n case 'R':\n builder.appendHourOfDay(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n break;\n case 'S':\n builder.appendSecondOfMinute(2);\n break;\n case 't':\n break;\n case 'T':\n builder.appendHourOfDay(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n builder.appendLiteral(':');\n builder.appendSecondOfMinute(2);\n break;\n/* case 'U': //FIXME Joda does not support US week start (Sun), this will be wrong\n builder.appendWeekOfYear(2);\n break;\n case 'u':\n builder.appendDayOfWeek(1);\n break;*/\n case 'V':\n break; //accepted and ignored\n/* case 'w': //FIXME Joda does not support US week start (Sun), this will be wrong\n builder.appendDayOfWeek(1);\n break;\n case 'W':\n builder.appendWeekOfYear(2);\n break;*/\n case 'x':\n builder.appendTwoDigitYear(2019);\n builder.appendLiteral('/');\n builder.appendMonthOfYear(2);\n builder.appendLiteral('/');\n builder.appendDayOfMonth(2);\n break;\n/* case 'X': //Results differ between OSX and Linux\n builder.appendHourOfDay(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n builder.appendLiteral(':');\n builder.appendSecondOfMinute(2);\n break;*/\n case 'y': //POSIX 2004 & 2008 says 69-99 -> 1900s, 00-68 -> 2000s\n builder.appendTwoDigitYear(2019);\n break;\n case 'Y':\n builder.appendYear(4,4);\n break;\n case 'z':\n builder.appendTimeZoneOffset(null, \"z\", false, 2, 2);\n break;\n case 'Z':\n break; //for output only, accepted and ignored for input\n default: // No match, ignore\n builder.appendLiteral('\\'');\n builder.appendLiteral(token);\n throw new IllegalArgumentException(token + \"is not acceptted as a parse token, treating as a literal\");\n }\n } else {\n if (c == '\\'') {\n String sub = token.substring(1);\n if (sub.length() > 0) {\n // Create copy of sub since otherwise the temporary quoted\n // string would still be referenced internally.\n builder.appendLiteral(new String(sub));\n }\n } else throw new IllegalArgumentException(\"Unexpected token encountered parsing format string:\" + c);\n }\n }\n }",
"public NFA parse() throws ParseException;",
"private void parseOpcode(final List<Action> actions) throws AssemblerException\n {\n final FileLocation opfl = this.getFileLocation();\n final String opcs = this.getStringValue();\n final HashMap<AddressingMode, Opcode> opcm = Opcodes.BY_NAME_MAPPED.get(opcs);\n this.consume();\n\n final int actionsBefore = actions.size();\n\n // Is next token unrelated?\n AddressingMode addrMode = null;\n if (this.peek().getType() == Token.Type.IMMEDIATE)\n {\n addrMode = AddressingMode.IMMEDIATE;\n this.consume();\n }\n else if (opcm.size() == 1 && opcm.containsKey(AddressingMode.RELATIVE))\n {\n addrMode = AddressingMode.RELATIVE;\n }\n else\n {\n boolean nextUnrelated = false;\n switch (this.peek().getType())\n {\n case OPCODE:\n case LABEL:\n case SUB_LABEL:\n case META:\n case EOF:\n case STRING:\n case SCR_STRING:\n nextUnrelated = true;\n break;\n case PC:\n case WORD:\n case SUB_WORD:\n nextUnrelated = this.peek(1).getType() == Token.Type.ASSIGN;\n break;\n default:\n break;\n }\n if (nextUnrelated)\n {\n addrMode = AddressingMode.IMPLIED;\n }\n }\n\n if (addrMode != null) // Implied, Immediate\n {\n final Opcode opc = opcm.get(addrMode);\n if (opc == null)\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode\");\n }\n switch (addrMode)\n {\n case IMMEDIATE:\n case RELATIVE:\n actions.addAll(this.parseExpression());\n actions.add(new AssembleOpcodeAction(opfl, opc));\n break;\n case IMPLIED:\n actions.add(new AssembleOpcodeAction(opfl, opc));\n break;\n default:\n throw new AssemblerException(opfl, \"Internal error, uncatched addressing mode: \" + addrMode);\n }\n }\n else\n {\n // Check for indirect modes\n if (this.peek().getType() == Type.BRACE_OPEN)\n {\n this.consume();\n actions.addAll(this.parseExpression());\n if (this.peek().getType() == Token.Type.COMMA)\n {\n this.consume();\n if (this.peek().getType() != Token.Type.WORD || !this.peek().getStringValue().equals(\"X\"))\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode, ',X' expected\");\n }\n this.consume();\n if (this.peek().getType() != Token.Type.BRACE_CLOSE)\n {\n throw new AssemblerException(this.getFileLocation(), \"')' expected\");\n }\n this.consume();\n addrMode = AddressingMode.INDIRECT_INDEXED;\n }\n else if (this.peek().getType() == Token.Type.BRACE_CLOSE)\n {\n this.consume();\n if (this.peek().getType() == Token.Type.COMMA)\n {\n this.consume();\n if (this.peek().getType() != Token.Type.WORD || !this.peek().getStringValue().equals(\"Y\"))\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode, 'Y' expected\");\n }\n this.consume();\n addrMode = AddressingMode.INDEXED_INDIRECT;\n }\n else\n {\n addrMode = AddressingMode.INDIRECT;\n }\n }\n else\n {\n throw new AssemblerException(this.getFileLocation(), \"Syntax error\");\n }\n final Opcode opc = opcm.get(addrMode);\n if (opc == null)\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode\");\n }\n actions.add(new AssembleOpcodeAction(opfl, opc));\n }\n else\n {\n final List<Action> expr = this.parseExpression();\n actions.addAll(expr);\n final Long exprValue = this.evaluateStaticExpression(expr);\n final int width = exprValue == null ? 0 : ((exprValue.longValue() & 0xffff) < 256 ? 1 : 2);\n final int index;\n if (this.peek().getType() == Token.Type.COMMA)\n {\n this.consume();\n if (this.peek().getType() == Token.Type.WORD && this.peek().getStringValue().equals(\"Y\"))\n {\n index = 2;\n }\n else if (this.peek().getType() == Token.Type.WORD && this.peek().getStringValue().equals(\"X\"))\n {\n index = 1;\n }\n else\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode, 'X' or 'Y' expected\");\n }\n this.consume();\n }\n else\n {\n index = 0;\n }\n\n int mask = 0;\n switch (index)\n {\n case 0:\n mask = (opcm.containsKey(AddressingMode.ZEROPAGE) ? 1 : 0)\n | (opcm.containsKey(AddressingMode.ABSOLUTE) ? 2 : 0);\n break;\n case 1:\n mask = (opcm.containsKey(AddressingMode.ZEROPAGE_X) ? 1 : 0)\n | (opcm.containsKey(AddressingMode.ABSOLUTE_X) ? 2 : 0);\n break;\n case 2:\n mask = (opcm.containsKey(AddressingMode.ZEROPAGE_Y) ? 1 : 0)\n | (opcm.containsKey(AddressingMode.ABSOLUTE_Y) ? 2 : 0);\n break;\n }\n if (mask == 0)\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode\");\n }\n\n switch (width)\n {\n case 0:\n if (mask == 3)\n {\n switch (index)\n {\n case 0:\n actions.add(new AssembleOpcodeAction(opfl, opcs, WidthType.ABSOLUTE));\n break;\n case 1:\n actions.add(new AssembleOpcodeAction(opfl, opcs, WidthType.ABSOLUTE_X));\n break;\n case 2:\n actions.add(new AssembleOpcodeAction(opfl, opcs, WidthType.ABSOLUTE_Y));\n break;\n }\n }\n else\n {\n switch (index)\n {\n case 0:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE : AddressingMode.ABSOLUTE;\n break;\n case 1:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE_X : AddressingMode.ABSOLUTE_X;\n break;\n case 2:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE_Y : AddressingMode.ABSOLUTE_Y;\n break;\n }\n actions.add(new AssembleOpcodeAction(opfl, opcm.get(addrMode)));\n }\n break;\n case 1:\n switch (index)\n {\n case 0:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE : AddressingMode.ABSOLUTE;\n break;\n case 1:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE_X : AddressingMode.ABSOLUTE_X;\n break;\n case 2:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE_Y : AddressingMode.ABSOLUTE_Y;\n break;\n }\n actions.add(new AssembleOpcodeAction(opfl, opcm.get(addrMode)));\n break;\n case 2:\n switch (index)\n {\n case 0:\n addrMode = AddressingMode.ABSOLUTE;\n break;\n case 1:\n addrMode = AddressingMode.ABSOLUTE_X;\n break;\n case 2:\n addrMode = AddressingMode.ABSOLUTE_Y;\n break;\n }\n if (addrMode == null || !opcm.containsKey(addrMode))\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode\");\n }\n actions.add(new AssembleOpcodeAction(opfl, opcm.get(addrMode)));\n break;\n }\n }\n }\n // TODO ... *sigh*\n if (actionsBefore == actions.size())\n {\n throw new AssemblerException(opfl, \"Internal error, no opcode action written\");\n }\n }",
"public static PatternInterface addOrnament(Pattern ornament, Note baseNote, double longestOrnamentDuration){\r\n \tPatternInvestigator investigator = new PatternInvestigator();\r\n \tMusicStringParser stringParser = new MusicStringParser();\r\n \t\r\n \tstringParser.addParserListener(investigator);\r\n \tstringParser.parse(ornament);\r\n \t\r\n \tdouble longestDuration = investigator.getLongestDecimalDuration();\r\n \tdouble durationChange = longestOrnamentDuration / longestDuration;\r\n \t\r\n \tDurationPatternTransformer transformer = new DurationPatternTransformer(durationChange);\r\n \t\r\n \tPatternInterface result = transformer.transform(ornament);\r\n \t\r\n \tstringParser.removeParserListener(investigator);\r\n \tinvestigator = new PatternInvestigator();\r\n \tstringParser.addParserListener(investigator);\r\n \tstringParser.parse(result);\r\n \t\r\n \tif(investigator.getTotalDecimalDuration() < baseNote.getDecimalDuration()){\r\n \t\tdouble remainingDuration = baseNote.getDecimalDuration() - investigator.getTotalDecimalDuration();\r\n \t\tbaseNote.setDecimalDuration(remainingDuration);\r\n \t\tresult.add(baseNote.getMusicString());\r\n \t\treturn result;\r\n \t} else {\r\n \t\treturn new Pattern(baseNote.getMusicString());\r\n \t}\r\n }",
"@Override\n\tpublic Document parse(final char[] content) {\n\t\tfinal LagartoParser lagartoParser = new LagartoParser(config.parserConfig, content);\n\t\treturn parseWithLagarto(lagartoParser);\n\t}",
"public void run()\n {\n yyparse();\n }",
"abstract boolean parse ();",
"public interface Animalable {\n public enum AnimalClass {\n VERTEBRATE,\n INVERTEBRATE\n }\n\n public enum AnimalSubClass{\n REPTILE,\n FISH,\n AMPHIBIAN,\n BIRD,\n MAMMAL\n }\n\n public interface AnimalOrders {\n enum MammalOrders implements AnimalOrders {\n RODENTIA,\n CHIROPTERA,\n INSECTIVORA,\n MARSUPIALIA,\n CARNIVORA,\n PRIMATES,\n ARTIODACTYLA,\n CETACEA,\n LAGOMORPHA,\n PINNIPEDIA,\n EDENTATA,\n PERRISSODACTYLA,\n PROBOSCIDEA\n }\n enum BirdOrders implements AnimalOrders {\n STRUTHIONIFORMES,\n CRACIFORMES,\n GALLIFORMES,\n ANSERIFORMES,\n TURNICIFORMES,\n PICIFORMES,\n GALBULIFORMES,\n BUCEROTIFORMES,\n UPUPIFORMES,\n TROGONIFORMES,\n CORACIIFORMES,\n COLIIFORMES,\n CUCULIFORMES,\n PSITTACIFORMES,\n APODIFORMES,\n TROCHILIFORMES,\n MUSOPHAGIFORMES,\n STRIGIFORMES,\n COLUMBIFORMES,\n GRUIFORMES,\n CICONIIFORMES\n }\n\n enum ReptilOrders implements AnimalOrders{\n RHYNCOCEPHALIA,\n SQUAMATA,\n CHELONIA,\n CROCODILIA\n }\n\n enum FishOrders implements AnimalOrders {\n PREHISTORIC,\n BONY,\n CARTILAGINOUS,\n JAWLESS\n }\n\n enum AmphibianOrders implements AnimalOrders {\n ANURA,\n URODELA,\n APODA\n }\n }\n\n public enum Motion{\n SWIM,\n CRAWL,\n CLIMB,\n RUN,\n WALK,\n JUMP,\n FLY,\n DIG\n }\n\n public enum FeedingBehaviour {\n AUTOTROPH,\n CARNIVORE,\n ERGIVORE,\n HERBIVORE,\n OMNIVORE,\n SCAVENGER,\n INSECTIVORE\n }\n\n public enum Media {\n AIR,\n EARTH,\n WATER\n }\n\n public enum Sex {\n MALE,\n FEMALE,\n HERMAPHRODITE\n }\n\n public AnimalClass getMyClass();\n public void setMyClass(AnimalClass animalClass);\n\n public AnimalSubClass getMySubClass();\n public void setMySubClass(AnimalSubClass animalSubClass);\n\n public AnimalOrders getMyOrder();\n public void setMyOrder(AnimalOrders myOrder);\n\n public FeedingBehaviour getMyFeedingBehaviour();\n public void setMyFeedingBehaviour(FeedingBehaviour myConsumption);\n\n public ArrayList<Media> getMyMedia();\n public void addMedia(Media aMedia);\n\n public ArrayList<Motion> getMyMotion();\n public void addMotion(Motion aMotion);\n\n public String getName();\n public void setName(String name);\n\n public String getCommonName();\n public void setCommonName(String commonName);\n\n public String getScientificName();\n public void setScientificName(String scientificName);\n\n public Boolean amIHazardous();\n public void setHazardous(boolean hazardous);\n\n public Sex getMySex();\n public void setMySex(Sex aSex);\n\n public Timestamp getLastTimeFed();\n public void feedMe(Timestamp aTime, Edible food);\n\n public int getFeedingPeriod();\n public void setFeedingPeriod(int every);\n\n public boolean timeToFeed();\n\n public int howFullIsMyBelly();\n\n public boolean isAdult();\n\n public void setAsAdult();\n\n public void setAsBaby();\n\n\n\n\n}",
"public abstract void parse() throws IOException;",
"public void endParsing();",
"public interface AsgStrategy {\n void apply(AsgQuery query, AsgStrategyContext context);\n}",
"public interface ParticleVisitor {\r\n\t/** Invoked for an empty type.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid emptyType(ComplexTypeSG type) throws SAXException;\r\n\t/** Invoked for a complex type with simple content.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid simpleContent(ComplexTypeSG type) throws SAXException;\r\n\t/** Invoked to begin a sequence.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid startSequence(GroupSG group) throws SAXException;\r\n\t/** Invoked to end a sequence.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid endSequence(GroupSG group) throws SAXException;\r\n\t/** Invoked to start a choice group.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid startChoice(GroupSG group) throws SAXException;\r\n\t/** Invoked to end a choice group.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid endChoice(GroupSG group) throws SAXException;\r\n\t/** Invoked to start an all group.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid startAll(GroupSG group) throws SAXException;\r\n\t/** Invoked to end an all group.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid endAll(GroupSG group) throws SAXException;\r\n\t/** Invoked to start a complex content types\r\n\t * content.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid startComplexContent(ComplexTypeSG type) throws SAXException;\r\n\t/** Invoked to end a complex content types content.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid endComplexContent(ComplexTypeSG type) throws SAXException;\r\n\t/** Invoked to process an element with simple type.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid simpleElementParticle(GroupSG pGroup,ParticleSG particle) throws SAXException;\r\n\t/** Invoked to process an element with complex type.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid complexElementParticle(GroupSG pGroup, ParticleSG particle) throws SAXException;\r\n\t/** Invoked to process a wildcard particle.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid wildcardParticle(ParticleSG particle) throws SAXException;\r\n}",
"public ExpressionPart parseExpressions (String[] exp, QBParser parser) {\n\t\texp = fixArray(exp);\n\t//\tSystem.out.println(\"EXPS: \" + Arrays.toString(exp));\n\t\tif(exp[0].startsWith(\"if\")){\n\t\t\tif( (exp[0].length() > 2 && !Character.isLetterOrDigit( exp[0].charAt(2) )) || exp[0].length() == 2){\n\t\t\t\tString name = ExpressionPuller.pullIfThenElse(exp, parser.getCurrentCompilingNamespace());\n\t\t\t\texp = new String[]{name};\n\t\t\t}\n\t\t}\n\t\t\n//\t\tif(exp[0].equals(\"if\")){\n//\t\t\tint thenIdx = MArrays.indexOf(exp, \"then\");\n//\t\t\tString ifPart = MArrays.concat(exp, 1, thenIdx-1);\n//\t\t\t\n//\t\t\tint elseIdx = MArrays.indexOf(exp, \"else\");\n//\t\t\tString thenPart = MArrays.concat(exp, thenIdx+1, elseIdx-thenIdx-1);\n//\t\t\t\n//\t\t\tString elsePart = MArrays.concat(exp, elseIdx+1);\n//\t\t\t\n//\t\t\tExpressionPart ifExpPart = parseExpressions(ifPart);\n//\t\t\tExpressionPart thenExpPart = parseExpressions(thenPart);\n//\t\t\tExpressionPart elseExpPart = parseExpressions(elsePart);\n//\t\t\t\n//\t\t\tExpressionPart totalIf = ExpressionPart.makePrimaryExpressionPart(null, \"if\", new ExpressionPart[]{ifExpPart});\n//\t\t\tExpressionPart totalThen = ExpressionPart.makePrimaryExpressionPart(totalIf, \"then\", new ExpressionPart[]{thenExpPart});\n//\t\t\tExpressionPart total = ExpressionPart.makePrimaryExpressionPart(totalThen, \"else\", new ExpressionPart[]{elseExpPart});\n//\t\t\n//\t\t\treturn total;\n//\t\t}\n\t\t\n\n\t\t// Go though all of the operators in order from their respective order of operations.\n\t\tfor( String[] ops : operators() ){\n\t\t\t\n\t\t\tint idx = -1;\n\t\t\t// Some operators have the same precedence, so we need to deal with that\n\t\t\tfor( String op : ops ) {\n\t\t\t\tidx = Math.max(idx, MArrays.lastIndexOf(exp, op));\n\t\t\t}\n\t\t\t\n\t\t\t// if we found one of these opeartors, then we\n\t\t\t// need to deal with it.\n\t\t\tif( idx != -1 ){\n\t\t\t\t// get the function (thats easy, it is what we just found)\n\t\t\t\tString function = exp[idx];\n\t\t\t\t\n\t\t\t\t// get all stuff before and after this point\n\t\t\t\t// the first is the caller and the second is the\n\t\t\t\t// argument believe me it works because\n\t\t\t\t// 3 * 4 / 6 + 1 * 2 - 3 ^ 2 * 2 = (3 * 4 / 6 + 1 * 2) - (3 ^ 2 * 2)\n\t\t\t\tString[] before = Arrays.copyOfRange(exp, 0, idx);\n\t\t\t\tString[] after = Arrays.copyOfRange(exp, idx + 1, exp.length);\n\t\t\t\t\n\t\t\t\t// now, using recursion we make the expression parts out of them\n\t\t\t\tExpressionPart part1 = parseExpressions( before, parser );\n\t\t\t\tExpressionPart part2 = parseExpressions( after, parser );\n\t\t\t\t\n\t\t\t\tif(function.equals(\"->\")){\n\t\t\t\t\tExpressionPart tmp = part1;\n\t\t\t\t\tpart1 = part2;\n\t\t\t\t\tpart2 = tmp;\n\t\t\t\t}\n\t\t\t\t// now put the whole thing together, and you now have a mess\n\t\t\t\treturn ExpressionPart.makePrimaryExpressionPart(part1, function, new ExpressionPart[]{part2} );\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// If there are no more \"Binary Functions\"\n\t\t// what is left must be grouped or it must be a function\n\t\tif( exp.length == 1 ){\n\t\t\tString str = exp[0];\n\t\t\tif( completelySurrounded(str) ){\n\t\t\t\tString middle = str.substring(1, str.length() - 1);\n\t\t\t\treturn parseExpressions(middle);\n\t\t\t}\n\t\t\t// This must then be a function\n\t\t\telse if(str.endsWith(\")\")){\n\t\t\t\t\n\t\t\t\t// this function will get the last index of a dot ('.') that is outside parenthesis\n\t\t\t\t// the dot is used to determine if the function is being called by an object\n\t\t\t\tint dotIdx = lastDotIndex(str);\n\t\t\t\t\n\t\t\t\t// now we find the index that the arguments start on\n\t\t\t\tint idx = str.indexOf('(',dotIdx);\n\t\t\t\t\n\t\t\t\t// check to make sure there is one.\n\t\t\t\tif( idx < 0 ){\n\t\t\t\t\tthrow new RuntimeException(\"Expected '('\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from here it is pretty straight forward to get the function,\n\t\t\t\t// caller and parameters.\n\t\t\t\tString function = str.substring(0, idx);\n\t\t\t\tString args = str.substring(idx + 1, str.length() - 1);\n\t\t\t\tString caller = null;\n\t\t\t\t\n\t\t\t\t// if there is not dot, then there is no caller and the function is global\n\t\t\t\tif( dotIdx >= 0 ){\n\t\t\t\t\tcaller = function.substring( 0, dotIdx );\n\t\t\t\t\tfunction = function.substring( dotIdx + 1 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// now use recursion to build the parts and make a new part.\n\t\t\t\tExpressionPart part1 = caller !=null ? parseExpressions(caller) : null;\n\t\t\t\tExpressionPart[] parts = parseParams(args);\n\t\t\t\t\n\t\t\t\treturn ExpressionPart.makePrimaryExpressionPart(part1, function, parts);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\t// This is the base case, the very bottom of the ladder, this is where all\n\t\t\t\t// that is left is some entity that has no function.\n\t\t\t\treturn ExpressionPart.makeExpressionPart(exp[0]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new RuntimeException(\"Syntax Error\");\n\t}",
"public static Appointment parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n Appointment object =\n new Appointment();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"Appointment\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (Appointment)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"OrderID\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n throw new org.apache.axis2.databinding.ADBException(\"The element: \"+\"OrderID\" +\" cannot be null\");\n }\n \n\n java.lang.String content = reader.getElementText();\n \n object.setOrderID(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"Date\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n throw new org.apache.axis2.databinding.ADBException(\"The element: \"+\"Date\" +\" cannot be null\");\n }\n \n\n java.lang.String content = reader.getElementText();\n \n object.setDate(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(content));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"private void processCommands(String[] args) {\n int current = 0; //a running total of the parts added to a\n // command\n for (String part : args) {\n command += part;\n if ((part.equals(\";\")) || (part.equals(\"&\"))) { //if it is a delimiter\n if (part.equals(\";\")) { //sequential\n executeSequentially();\n } else { //concurrent\n executeConcurrently();\n }\n } else { //not a delimiter\n if ((current == args.length - 1)) { //contains no delimter in the\n // command (for single commands and the last of a series of\n // commands)\n executeSequentially();//runs as a sequential command\n } else { //not a delmiter and not the end of the commands\n command += \" \"; //add the part to command\n }\n }\n current++;\n }\n }",
"private void parse(final Chain<Bunny, Lexi> b) {\n\t\tfor (boolean again = true; again;) {\n\t\t\tagain = false;\n\t\t\tfinal List<Lexi> directives = new ArrayList<>();\n\t\t\tfinal List<Matcher> matchers = new ArrayList<>();\n\t\t\tfinal List<Anchor> anchors = new ArrayList<>();\n\t\t\tfinal List<Anchor> satiatedAnchors = new ArrayList<>();\n\t\t\tb.printChain();\n\t\t\tfor (final Chain<Bunny, Lexi>.Node node : b) {\n\t\t\t\tif (node.get() instanceof Lexi) {\n\t\t\t\t\tdirectives.add((Lexi) node.get());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (node.get() instanceof TriviaBunny) {\n\t\t\t\t\tfeedTrivia(matchers, node.get());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!(node.get() instanceof TriviaBunny))\n\t\t\t\t\tstartNewMatchers(b, directives, matchers, anchors, node);\n\t\t\t\tfinal List<Matcher> satiatedMatchers = feedAndGetSatiated(matchers, node);\n\t\t\t\tsatiatedAnchors.addAll(azListAnchor(feedAndGetSatiated(anchors, node)));\n\t\t\t\tfor (final Anchor a : satiatedAnchors)\n\t\t\t\t\tif (matchers.stream().filter(m -> m.lexi == a.lexi && m.startsBeforeOrTogether(a)).count() == 0)\n\t\t\t\t\t\ta.explode();\n\t\t\t\tif (!satiatedMatchers.isEmpty()) {\n\t\t\t\t\tapplyLexi(getRuller(satiatedMatchers));\n\t\t\t\t\tagain = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!again && !satiatedAnchors.isEmpty())\n\t\t\t\tsatiatedAnchors.get(0).explode();\n\t\t}\n\t}",
"public interface IterativeWikiDumpParser {\n\n public abstract WikiRevision readNextWikiDumpRevision();\n\n public abstract boolean reachedEnd();\n\n}",
"@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void process(JCas jcas) throws AnalysisEngineProcessException {\n\t\t@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t\tAnnotationIndex<Annotation> sentIndex = jcas\n\t\t\t\t.getAnnotationIndex(Sentence.type);\n\t\tAnnotationIndex<Annotation> timeIndex = jcas\n\t\t\t\t.getAnnotationIndex(Timex3.type);\n\t\tAnnotationIndex<Annotation> tokenIndex = jcas\n\t\t\t\t.getAnnotationIndex(Token.type);\n\n\t\tboolean addTimespan = false;\n\n\t\t// for every sentence\n\t\tfor (Annotation an : sentIndex) {\n\t\t\tSentence sent = (Sentence) an;\n\t\t\tint sentBegin = sent.getBegin();\n\t\t\tint sentEnd = sent.getEnd();\n\n\t\t\tFSIterator<Annotation> timeIter = timeIndex.subiterator(sent);\n\t\t\t// save begins and ends of all timex tokens adjust index to sentence\n\t\t\tArrayList<Integer> begins = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> ends = new ArrayList<Integer>();\n\t\t\tArrayList<Timex3> timexs = new ArrayList<Timex3>();\n\t\t\t// get all timex annot. that are no durations like 6 minutes\n\t\t\twhile (timeIter.hasNext()) {\n\t\t\t\tTimex3 time = (Timex3) timeIter.next();\n\t\t\t\tif (!time.getTimexType().equals(\"DURATION\")) {\n\t\t\t\t\ttimexs.add(time);\n\t\t\t\t\t// begins.add(time.getBegin());// - sentBegin);\n\t\t\t\t\t// ends.add(time.getEnd());// - sentBegin);\n\n\t\t\t\t}\n\t\t\t\t// //System.out.println(sent.getCoveredText());\n\t\t\t}\n\n\t\t\t// if at least 2 found check text between timex expressions\n\t\t\tint timexCount = timexs.size();\n\t\t\tint interval;\n\t\t\tint begin1, end1, begin2, end2;\n\t\t\tif (timexCount >= 2) {\n\t\t\t\t// TODO change if direct access to sents of jcas per id is\n\t\t\t\t// possible\n\t\t\t\tString docText = jcas.getDocumentText(); // .getCoveredText();\n\t\t\t\tfor (int i = 0; i < timexCount - 1; i++) {\n\t\t\t\t\t// get postitons of timexs and scale to sentence\n\t\t\t\t\tbegin1 = timexs.get(i).getBegin() - sentBegin;\n\t\t\t\t\tbegin2 = timexs.get(i + 1).getBegin() - sentBegin;\n\t\t\t\t\t;\n\t\t\t\t\tend1 = timexs.get(i).getEnd() - sentBegin;\n\t\t\t\t\t;\n\t\t\t\t\tend2 = timexs.get(i + 1).getEnd() - sentBegin;\n\t\t\t\t\t;\n\t\t\t\t\t// //System.out.println(begins.get(i) + \" \" + ends.get(i +\n\t\t\t\t\t// 1) + \" \" +\n\t\t\t\t\t// sentBegin + \" \"+ sent.getEnd());\n\t\t\t\t\t// interval = begins.get(i + 1) - ends.get(i);\n\t\t\t\t\t// only cut text if interval under max length\n\t\t\t\t\tinterval = begin2 - end1;\n\t\t\t\t\tif (interval < 10 && interval > 0) {\n\t\t\t\t\t\tString sentText = sent.getCoveredText();\n\t\t\t\t\t\t// String betweenText = docText.substring(ends.get(i),\n\t\t\t\t\t\t// begins.get(i\n\t\t\t\t\t\t// + 1));\n\t\t\t\t\t\t// get text between timex expr. and removes surrounding\n\t\t\t\t\t\t// whitespace\n\t\t\t\t\t\t// String betweenText = docText.substring(end1,\n\t\t\t\t\t\t// begin2).trim();\n\t\t\t\t\t\tString betweenText = sentText.substring(end1, begin2)\n\t\t\t\t\t\t\t\t.trim();\n\n\t\t\t\t\t\t// System.out.println(betweenText);\n\t\t\t\t\t\t// String output = \"\";\n\t\t\t\t\t\t// output += \"|#\" + betweenText + \"#\" +\n\t\t\t\t\t\t// sentText.substring(begin1, end2) + \" ##\"\n\t\t\t\t\t\t// + sentText.substring(begin1, end1) + \"|\" +\n\t\t\t\t\t\t// sentText.substring(begin2, end2) + \"||\";\n\t\t\t\t\t\t// TODO make check nicer not or but set\n\t\t\t\t\t\tif (betweenText.equals(\"-\") || betweenText.equals(\"to\")\n\t\t\t\t\t\t\t\t|| betweenText.equals(\"through\")) {\n\t\t\t\t\t\t\taddTimespan = true;\n\t\t\t\t\t\t\t// System.out.println(\"Found to or - \");\n\t\t\t\t\t\t} else if (betweenText.equals(\"and\")) {\n\t\t\t\t\t\t\t// for 'and' check if 'between' is before first\n\t\t\t\t\t\t\t// timex\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t// System.out.println((begin1 - 8));\n\t\t\t\t\t\t\t\tif (begin1 - 8 >= 0) {\n\t\t\t\t\t\t\t\t\tString preText = sentText\n\t\t\t\t\t\t\t\t\t\t\t.substring(begin1 - 8, begin1)\n\t\t\t\t\t\t\t\t\t\t\t.trim().toLowerCase();\n\t\t\t\t\t\t\t\t\t// System.out.println(\"Pre: \" + preText);\n\t\t\t\t\t\t\t\t\tif (preText.equals(\"between\")) {\n\t\t\t\t\t\t\t\t\t\taddTimespan = true;\n\t\t\t\t\t\t\t\t\t\t// System.out.println(\"Found between and\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// System.out.println(\"not Found and: \"\n\t\t\t\t\t\t\t\t\t\t// + preText);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// System.err.println(\"Cut error\" +\n\t\t\t\t\t\t\t\t// sent.getCoveredText());\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// add new annotation\n\t\t\t\t\t\tif (addTimespan) {\n\t\t\t\t\t\t\tTimespan timespan = new Timespan(jcas);\n\t\t\t\t\t\t\t// set text span\n\t\t\t\t\t\t\ttimespan.setBegin(timexs.get(i).getBegin());\n\t\t\t\t\t\t\ttimespan.setEnd(timexs.get(i + 1).getEnd());\n\t\t\t\t\t\t\t// set times\n\t\t\t\t\t\t\ttimespan.setStartTime(timexs.get(i));\n\t\t\t\t\t\t\ttimespan.setEndTime(timexs.get(i + 1));\n\t\t\t\t\t\t\t// System.out.println(\"ADDED\");\n\t\t\t\t\t\t\ttimespan.addToIndexes(jcas);\n\t\t\t\t\t\t\t// remove timex annotations form jcas\n\t\t\t\t\t\t\ttimexs.get(i).removeFromIndexes(jcas);\n\t\t\t\t\t\t\ttimexs.get(i + 1).removeFromIndexes(jcas);\n\t\t\t\t\t\t\taddTimespan = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// output += sentText;\n\t\t\t\t\t\t// System.out.println(output.replace(\"\\n\", \" \"));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}",
"static void parseIt() {\n try {\n long start = System.nanoTime();\n int[] modes = {DET_MODE, SUM_MODE, DOUBLES_MODE};\n String[] filePaths = {\"\\\\catalogue_products.xml\", \"\\\\products_to_categories.xml\", \"\\\\doubles.xml\"};\n HashMap<String, String[]> update = buildUpdateMap(remainderFile);\n window.putLog(\"-------------------------------------\\n\" + updateNodes(offerNodes, update) +\n \"\\nФайлы для загрузки:\");\n for (int i = 0; i < filePaths.length; i++) {\n // Define location for output file\n File outputFile = new File(workingDirectory.getParent() + filePaths[i]);\n pushDocumentToFile(outputFile, modes[i]);\n printFileInfo(outputFile);\n }\n window.putLog(\"-------------------------------------\\nВсего обработано уникальных записей: \" +\n offerNodes.size());\n long time = (System.nanoTime() - start) / 1000000;\n window.putLog(\"Завершено без ошибок за \" + time + \" мс.\");\n offerNodes = null;\n //window.workshop.setParseButtonDisabled();\n } catch (TransformerException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \" (\" + e.getException() + \")\\n\\t\" + e.getMessageAndLocation()));\n } catch (ParserConfigurationException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getLocalizedMessage()));\n } catch (SAXException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(\"SAXexception: \" + e.getMessage()));\n\n } catch (IOException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getMessage() + \". \" + e.getStackTrace()[0]));\n }\n }",
"public interface ChronoParser<T> {\n\n //~ Methoden ----------------------------------------------------------\n\n /**\n * <p>Interpretes given text starting at the position defined in\n * parse-log. </p>\n *\n * <p>Implementation note: Any implementation will parse the text first\n * at the position {@code status.getPosition()} and then set the new\n * position in the parse log if successful. In case of error the\n * error index in the parse log will be updated instead. </p>\n *\n * @param text text to be parsed\n * @param status parser information (always as new instance)\n * @param attributes control attributes\n * @return result or {@code null} if parsing does not work\n * @throws IndexOutOfBoundsException if the start position is at end of\n * text or even behind\n */\n /*[deutsch]\n * <p>Interpretiert den angegebenen Text ab der angegebenen Position. </p>\n *\n * <p>Implementierungshinweis: Eine Implementierung wird den Text erst\n * ab der angegebenen Position {@code status.getPosition()} auswerten und\n * dann in der Statusinformation nach einer erfolgreichen Interpretierung\n * die aktuelle Position neu setzen oder im Fehlerfall den Fehlerindex auf\n * die fehlerhafte Stelle im Text setzen. </p>\n *\n * @param text text to be parsed\n * @param status parser information (always as new instance)\n * @param attributes control attributes\n * @return result or {@code null} if parsing does not work\n * @throws IndexOutOfBoundsException if the start position is at end of\n * text or even behind\n */\n T parse(\n CharSequence text,\n ParseLog status,\n AttributeQuery attributes\n );\n\n}",
"public interface BlastParser {\n\n\t/**\n\t * Parses the blast output. \n\t * @param output\n\t */\n\tpublic void parseBlastOutput(String output) ;\n\t\n}",
"public interface ParserCombinator<T> extends Parser<Result<T>> {\n\n /**\n * Builds a new alternating parser from {@code this} and given parser. The new parser parses with\n * either {@code this} or the given parser, which ever first succeeds. If neither succeeds, input\n * is rejected. Multiple {@code or} calls can be chained for more alternatives (e.g. {@code\n * string(\"A\").or(string(\"B\")).or(string(\"C\"))}.\n *\n * @param or alternative parser\n * @return new parser combinator that accepts inputs either by {@code this} or given parser.\n */\n default ParserCombinator<T> or(ParserCombinator<T> or) {\n return new ParserCombinatorOr<>(this, or);\n }\n\n /**\n * Builds a new parser combinator for parsing sequences. After successful parse, parser returns\n * pair of results where the first element is parsed by {@code this} and the second element by\n * {@code next} parser. For example {@code string(\"foo\").next(string(\"bar\"))} would accept {@code\n * \"foobar\"} and produce {@code (\"foo\", \"bar\")}.\n *\n * @param next next parser in the sequence\n * @param <R> type of the value accepted by next parser\n * @return new parser combinator that accepts inputs applying first {@code this} then {@code next}\n * parser\n */\n default <R> ParserCombinator<Pair<T, R>> next(ParserCombinator<R> next) {\n return new ParserCombinatorNext<>(this, next);\n }\n\n /**\n * Builds a new parser combinator that first applies {@code this} parser then {@code skip} parser\n * returning results only from the first parser. For example {@code\n * string(\"foo\").skip(string(\"bar\"))} would consume {@code \"foobar\"} and return {@code \"foo\"}.\n *\n * @param skip parser that ignores parse results\n * @return new parser combinator that accepts inputs applying first {@code this} then {@code skip}\n * parser returning results only from {@code this}.\n */\n default ParserCombinator<T> skip(ParserCombinator<?> skip) {\n return new ParserCombinatorSkip<>(this, skip);\n }\n\n /**\n * Builds a new parser combinator applies {@code this} parser repeatedly zero to N times returning\n * results in list. For example {@code string(\"foo\").many()} would parse {@code \"foofoo\"} by\n * returning {@code [\"foo\", \"foo\"]}\n *\n * @return new parser combinator that accepts inputs applying {@code this} parser as many times as\n * possible.\n */\n default ParserCombinator<List<T>> many() {\n return new ParserCombinatorMany<>(this);\n }\n\n /**\n * Builds a new parser combinator applies {@code this} parser repeatedly zero to N times by using\n * given parser as a separator. Results are returned in a list. For example {@code\n * string(\"foo\").many(string(\";\"))} would parse {@code \"foo;foo;foo\"} by returning {@code [\"foo\",\n * \"foo\", \"foo\"]}\n *\n * @param separator parser for parsing separator\n * @return new parser combinator that accepts inputs applying {@code this} parser as many times as\n * possible.\n */\n default ParserCombinator<List<T>> many(ParserCombinator<?> separator) {\n return new ParserCombinatorManyWithSeparator<>(this, separator);\n }\n\n /**\n * Builds a new parser combinator applies {@code this} parser repeatedly zero or one time. For\n * example {@code string(\"foo\").optional().next(string(\"bar\"))} would parse {@code \"foobar\"} by\n * returning {@code (Optional[\"foo\"], \"bar\")}, and {@code \"bar\"} by returning {@code\n * (Optional.empty, \"bar\")}.\n *\n * @return new parser combinator that accepts inputs applying {@code this} parser as many times as\n * possible.\n */\n default ParserCombinator<Optional<T>> optional() {\n return new ParserCombinatorOptional<>(this);\n }\n\n /**\n * Builds a new parser combinator that maps parse results with given function. Can be used for\n * transforming parsed values to something more useful, e.g. {@code regex(\"[0-9]+\").map(value ->\n * Integer.parseInt(value));}\n *\n * @param mapping function that maps parse result\n * @param <R> type of the target value\n * @return new parser that maps result\n */\n default <R> ParserCombinator<R> map(Function<T, R> mapping) {\n return new ParserCombinatorMap<>(this, mapping);\n }\n\n /**\n * Closes this {@code ParserCombinator} and returns a new plain {@code Parser}. New parser expects\n * input to be fully consumed. Returned parser throws a {@code ParseException} on failed parse.\n *\n * @return Parser based on this {@code ParserCombinator}\n */\n default Parser<T> end() {\n return new ParserCombinatorEnd<>(this);\n }\n\n}",
"@Override\n public void startElement(String namespaceURI, String lName,\n String qName, Attributes attrs) throws SAXException {\n switch (qName) {\n case \"category\":\n String catName = attrs.getValue(NAME);\n String catId = attrs.getValue(ID);\n Category.Location location = YES.equals(attrs.getValue(EXTERNAL)) ?\n Category.Location.EXTERNAL : Category.Location.INTERNAL;\n boolean onByDefault = !OFF.equals(attrs.getValue(DEFAULT));\n String tabName = attrs.getValue(TABNAME);\n category = new Category(catId != null ? new CategoryId(catId) : null, catName, location, onByDefault, tabName);\n if (attrs.getValue(TYPE) != null) {\n categoryIssueType = attrs.getValue(TYPE);\n }\n if (attrs.getValue(\"tags\") != null) {\n categoryTags.addAll(Arrays.asList(attrs.getValue(\"tags\").split(\" \")));\n }\n break;\n case \"rules\":\n String languageStr = attrs.getValue(\"lang\");\n idPrefix = attrs.getValue(\"idprefix\");\n language = Languages.getLanguageForShortCode(languageStr);\n break;\n case \"regexp\":\n inRegex = true;\n regexMode = \"exact\".equals(attrs.getValue(\"type\")) ? RegexpMode.EXACT : RegexpMode.SMART;\n regexCaseSensitive = attrs.getValue(CASE_SENSITIVE) != null && YES.equals(attrs.getValue(CASE_SENSITIVE));\n regexpMark = attrs.getValue(MARK) != null ? Integer.parseInt(attrs.getValue(MARK)) : 0;\n break;\n case RULE:\n regex = new StringBuilder();\n inRule = true;\n shortMessage = new StringBuilder();\n message = new StringBuilder();\n suggestionsOutMsg = new StringBuilder();\n url = new StringBuilder();\n id = attrs.getValue(ID);\n name = attrs.getValue(NAME);\n if (inRuleGroup) {\n subId++;\n if (id == null) {\n id = ruleGroupId;\n }\n if (name == null) {\n name = ruleGroupDescription;\n }\n }\n if (id == null && !relaxedMode) {\n throw new RuntimeException(\"id is null for rule with name '\" + name + \"'\");\n }\n id = idPrefix != null ? idPrefix + id : id;\n\n if (inRuleGroup && ruleGroupDefaultOff && attrs.getValue(DEFAULT) != null) {\n throw new RuntimeException(\"Rule group \" + ruleGroupId + \" is off by default, thus rule \" + id + \" cannot specify 'default=...'\");\n }\n if (inRuleGroup && ruleGroupDefaultTempOff && attrs.getValue(DEFAULT) != null) {\n throw new RuntimeException(\"Rule group \" + ruleGroupId + \" is off by default, thus rule \" + id + \" cannot specify 'default=...'\");\n }\n if (inRuleGroup && ruleGroupDefaultOff) {\n defaultOff = true;\n } else if (inRuleGroup && ruleGroupDefaultTempOff) {\n defaultTempOff = true;\n } else {\n defaultOff = OFF.equals(attrs.getValue(DEFAULT));\n defaultTempOff = TEMP_OFF.equals(attrs.getValue(DEFAULT));\n }\n\n correctExamples = new ArrayList<>();\n incorrectExamples = new ArrayList<>();\n errorTriggeringExamples = new ArrayList<>();\n suggestionMatches.clear();\n suggestionMatchesOutMsg.clear();\n if (attrs.getValue(TYPE) != null) {\n ruleIssueType = attrs.getValue(TYPE);\n }\n isRuleSuppressMisspelled = false;\n if (attrs.getValue(\"tags\") != null) {\n ruleTags.addAll(Arrays.asList(attrs.getValue(\"tags\").split(\" \")));\n }\n break;\n case PATTERN:\n startPattern(attrs);\n tokenCountForMarker = 0;\n interpretPosTagsPreDisambiguation = YES.equals(attrs.getValue(RAW_TAG));\n break;\n case ANTIPATTERN:\n inAntiPattern = true;\n antiPatternCounter++;\n caseSensitive = YES.equals(attrs.getValue(CASE_SENSITIVE));\n tokenCounter = 0;\n tokenCountForMarker = 0;\n break;\n case AND:\n inAndGroup = true;\n tokenCountForMarker++;\n break;\n case OR:\n inOrGroup = true;\n tokenCountForMarker++;\n break;\n case UNIFY:\n inUnification = true;\n uniNegation = YES.equals(attrs.getValue(NEGATE));\n break;\n case UNIFY_IGNORE:\n inUnificationNeutral = true;\n break;\n case FEATURE:\n uFeature = attrs.getValue(ID);\n break;\n case TYPE:\n uType = attrs.getValue(ID);\n uTypeList.add(uType);\n break;\n case TOKEN:\n setToken(attrs);\n if (!inAndGroup && !inOrGroup) {\n tokenCountForMarker++;\n }\n break;\n case EXCEPTION:\n setExceptions(attrs);\n break;\n case EXAMPLE:\n String typeVal = attrs.getValue(TYPE);\n if (\"incorrect\".equals(typeVal) || attrs.getValue(\"correction\") != null) {\n inIncorrectExample = true;\n incorrectExample = new StringBuilder();\n exampleCorrection = new StringBuilder();\n if (attrs.getValue(\"correction\") != null) {\n exampleCorrection.append(attrs.getValue(\"correction\"));\n }\n } else if (\"triggers_error\".equals(typeVal)) {\n inErrorTriggerExample = true;\n errorTriggerExample = new StringBuilder();\n } else {\n // no attribute implies the sentence is a correct example\n inCorrectExample = true;\n correctExample = new StringBuilder();\n }\n break;\n case \"filter\":\n filterClassName = attrs.getValue(\"class\");\n filterArgs = attrs.getValue(\"args\");\n break;\n case MESSAGE:\n inMessage = true;\n inSuggestion = false;\n message = new StringBuilder();\n isRuleSuppressMisspelled = YES.equals(attrs.getValue(\"suppress_misspelled\"));\n if (isRuleSuppressMisspelled) {\n message.append(PLEASE_SPELL_ME);\n } \n break;\n case SUGGESTION:\n String strToAppend = \"<suggestion>\";\n isSuggestionSupressMisspelled = YES.equals(attrs.getValue(\"suppress_misspelled\"));\n if (isSuggestionSupressMisspelled || isRuleSuppressMisspelled) {\n strToAppend = strToAppend + PLEASE_SPELL_ME;\n }\n if (inMessage) {\n message.append(strToAppend);\n } else { // suggestions outside message\n suggestionsOutMsg.append(strToAppend);\n }\n inSuggestion = true;\n break;\n case \"short\":\n if (inRule) {\n inShortMessage = true;\n shortMessage = new StringBuilder();\n } else {\n inShortMessageForRuleGroup = true;\n shortMessageForRuleGroup = new StringBuilder();\n }\n break;\n case \"url\":\n if (inRule) {\n inUrl = true;\n url = new StringBuilder();\n } else {\n inUrlForRuleGroup = true;\n urlForRuleGroup = new StringBuilder();\n }\n break;\n case RULEGROUP:\n ruleGroupId = attrs.getValue(ID);\n ruleGroupDescription = attrs.getValue(NAME);\n ruleGroupDefaultOff = OFF.equals(attrs.getValue(DEFAULT));\n ruleGroupDefaultTempOff = TEMP_OFF.equals(attrs.getValue(DEFAULT));\n urlForRuleGroup = new StringBuilder();\n shortMessageForRuleGroup = new StringBuilder();\n inRuleGroup = true;\n subId = 0;\n if (attrs.getValue(TYPE) != null) {\n ruleGroupIssueType = attrs.getValue(TYPE);\n }\n if (attrs.getValue(\"tags\") != null) {\n ruleGroupTags.addAll(Arrays.asList(attrs.getValue(\"tags\").split(\" \")));\n }\n break;\n case MATCH:\n setMatchElement(attrs, inSuggestion && (isSuggestionSupressMisspelled || isRuleSuppressMisspelled));\n break;\n case MARKER:\n if (inIncorrectExample) {\n incorrectExample.append(MARKER_TAG);\n } else if (inCorrectExample) {\n correctExample.append(MARKER_TAG);\n } else if (inErrorTriggerExample) {\n errorTriggerExample.append(MARKER_TAG);\n } else if (inPattern || inAntiPattern) {\n startPos = tokenCounter;\n inMarker = true;\n }\n break;\n case UNIFICATION:\n uFeature = attrs.getValue(\"feature\");\n inUnificationDef = true;\n break;\n case \"equivalence\":\n uType = attrs.getValue(TYPE);\n break;\n case PHRASES:\n inPhrases = true;\n break;\n case \"includephrases\":\n break;\n case \"phrase\":\n if (inPhrases) {\n phraseId = attrs.getValue(ID);\n }\n break;\n case \"phraseref\":\n if (attrs.getValue(\"idref\") != null) {\n preparePhrase(attrs);\n tokenCountForMarker++;\n }\n break;\n }\n }",
"public interface ResponseParser {\r\n\t\r\n\tList<Place> parseSearchResponse(String rawJson) throws Exception;\r\n\t\r\n\tList<Place> parseFilteredSearchResponse(String rawJson) throws Exception;\r\n\r\n}",
"public void process(ESLParser.UnprocessedMatchEvent ume) {\r\n\t\tESL.Match match = new ESL.Match();\r\n\t\tmatch.policy = ume.policy;\r\n\t\tmatch.evtName = ume.event.name;\r\n\t\tmatch.cexprs = new ESL.CExpr[ume.cexprs.size()];\r\n\t\tif (ume.ablock != null) {\r\n\t\t\tString abstr = ume.ablock.str.trim();\r\n\t\t\tif (!abstr.endsWith(\";\")) {\r\n\t\t\t\tabstr += \";\";\r\n\t\t\t}\r\n\t\t\tmatch.ablock = new ESL.CExpr(abstr);\r\n\r\n\t\t}\r\n\t\tfor (int i = 0; i < match.cexprs.length; ++i) {\r\n\t\t\tmatch.cexprs[i] =\r\n\t\t\t\tnew ESL.CExpr(((Tokenizer.Token) ume.cexprs.get(i)).str);\r\n\t\t}\r\n\t\tmatch.argrules = new ESL.Rule[ume.args.size()];\r\n\t\tfor (int i = 0; i < match.argrules.length; ++i) {\r\n\t\t\tTokenizer.Token tok = (Tokenizer.Token) ume.args.get(i);\r\n\t\t\tEDL.Type declaredtype = ume.event.args[i].type;\r\n\r\n\t\t\tif (tok.type == TOK_STRING) {\r\n\t\t\t\t//\tassume regex\r\n\t\t\t\tmatch.argrules[i] = new ESL.RegexRule(tok.str, false);\r\n\t\t\t} else if (tok.type == TOK_IDENT) {\r\n\t\t\t\tEDL.Type expectedtype = edl.getType(tok.str);\r\n\r\n\t\t\t\tif (expectedtype != null) {\r\n\t\t\t\t\t// expectedtype better be a subtype of the\r\n\t\t\t\t\t// declaredtype\r\n\t\t\t\t\tif (!EDL.isSubtype(declaredtype, expectedtype)) {\r\n\t\t\t\t\t\tthrow new ESLSemanticError(\r\n\t\t\t\t\t\t\t\"type \"\r\n\t\t\t\t\t\t\t\t+ expectedtype.getName()\r\n\t\t\t\t\t\t\t\t+ \" is not of type \"\r\n\t\t\t\t\t\t\t\t+ declaredtype.getName());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// do an instanceof type check\r\n\t\t\t\t\tmatch.argrules[i] = new ESL.TypeRule(expectedtype);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// maybe its a variable\r\n\t\t\t\t\tESL.VarDecl var = (ESL.VarDecl) esl.vars.get(tok.str);\r\n\t\t\t\t\tif (var != null) {\r\n\t\t\t\t\t\tif (EDL.isSubtype(var.type.getEDL().typeString, var.type)) {\r\n\t\t\t\t\t\t\tmatch.argrules[i] =\r\n\t\t\t\t\t\t\t\tnew ESL.RegexRule(var.name, true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthrow new ESLSemanticError(\r\n\t\t\t\t\t\t\t\t\"don't (yet) know how to match type \"\r\n\t\t\t\t\t\t\t\t\t+ var.type.getName());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// TODO: maybe this could be legal in some circumstance?\r\n\t\t\t\t\t\tthrow new ESLSemanticError(\r\n\t\t\t\t\t\t\t\"unknown type or variable\" + tok.str);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Unknown token \" + tok);\r\n\t\t\t\tmatch.argrules[i] = new ESL.TrueRule();\r\n\t\t\t}\r\n\t\t}\r\n\t\tesl.evmap.add(match.evtName, match);\r\n\t}",
"public interface RuntimeServices {\n\n /**\n * Creates a new agent with <i>agName</i> from source\n * <i>agSource</i>, using <i>agClass</i> as agent class (default\n * value is \"jason.asSemantics.Agent\"), <i>archClasses</i> as agent\n * architecture classes,\n * <i>bbPars</i> as the belief base\n * class (default value is \"DefaultBeliefBase\"), <i>stts</i> as\n * Settings (default value is new Settings()), and\n * <i>father</i> is the agent creating this agent (null is none).\n *\n * if no archClasses is informed (null value),\n * if fathers is informed\n * use father's ag archs\n * else\n * use default ag archs (see registerDefaultAgArch)\n *\n * <p> Example: createAgent(\"bob\", \"bob.asl\", \"mypkg.MyAgent\", null, null, null);\n *\n * Returns the name of the agent\n */\n public String createAgent(String agName, String agSource, String agClass, Collection<String> archClasses, ClassParameters bbPars, Settings stts, Agent father) throws Exception;\n\n public String getNewAgentName(String baseName);\n\n /** register a class to be included as new agents archs */\n default public void registerDefaultAgArch(String agArch) {}\n\n default public Collection<String> getDefaultAgArchs() { return new ArrayList<>(); }\n\n /** starts an agent (e.g. create thread for it) */\n public void startAgent(String agName);\n\n /**\n * Clones an agent\n *\n * @param source: the agent used as source for beliefs, plans, ...\n * @param archClassName: agent architectures that will be used\n * @param agName: the name of the clone\n * @return the agent arch created\n * @throws JasonException\n */\n public AgArch clone(Agent source, Collection<String> archClasses, String agName) throws JasonException;\n\n /**\n * Kills the agent named <i>agName</i> as a requested by <i>byAg</i>.\n * Agent.stopAg() method is called before the agent is removed.\n */\n public boolean killAgent(String agName, String byAg, int deadline);\n\n /** Returns a set of all agents' name */\n public Collection<String> getAgentsNames();\n\n /** Gets the number of agents in the MAS. */\n public int getAgentsQty();\n\n /** Stops all MAS (the agents, the environment, the controller, ...) */\n public void stopMAS(int deadline) throws Exception;\n default public void stopMAS() throws Exception { stopMAS(0); }\n\n default public void dfRegister(String agName, String service, String type) {}\n default public void dfDeRegister(String agName, String service, String type) {}\n default public Collection<String> dfSearch(String service, String type) { return new ArrayList<>(); }\n default public void dfSubscribe(String agName, String service, String type) {}\n}"
] | [
"0.53025824",
"0.52785265",
"0.5253144",
"0.5218162",
"0.52098405",
"0.518863",
"0.5158863",
"0.50877297",
"0.50759155",
"0.506764",
"0.50359684",
"0.50129384",
"0.50084037",
"0.50060874",
"0.49978834",
"0.49970675",
"0.49771532",
"0.49677414",
"0.49669164",
"0.49525198",
"0.49524856",
"0.49484542",
"0.48965347",
"0.48963788",
"0.4896152",
"0.48917928",
"0.48900148",
"0.48895288",
"0.48878834",
"0.4871105",
"0.4854833",
"0.48544538",
"0.4847628",
"0.48366717",
"0.48252058",
"0.47927773",
"0.47819814",
"0.47732028",
"0.4771504",
"0.4764227",
"0.4755809",
"0.47412604",
"0.4730691",
"0.4728589",
"0.47268316",
"0.47248304",
"0.4721803",
"0.4715218",
"0.47065258",
"0.46917534",
"0.46845716",
"0.46823904",
"0.46736157",
"0.4662408",
"0.46601114",
"0.46576312",
"0.4647728",
"0.46442276",
"0.46438065",
"0.46405292",
"0.463543",
"0.46318716",
"0.46295804",
"0.4627648",
"0.46270347",
"0.4625786",
"0.4623876",
"0.46225882",
"0.46037048",
"0.4602443",
"0.46019495",
"0.45985177",
"0.45973837",
"0.45916593",
"0.45886385",
"0.45871824",
"0.45761192",
"0.4571091",
"0.45704103",
"0.4568149",
"0.45679167",
"0.456686",
"0.45623782",
"0.45560834",
"0.45480448",
"0.45463797",
"0.45370185",
"0.45335254",
"0.45300105",
"0.45290774",
"0.45231408",
"0.4520036",
"0.451982",
"0.45196095",
"0.45089614",
"0.45087236",
"0.4502652",
"0.45009905",
"0.45000207",
"0.44916776"
] | 0.4682882 | 51 |
TODO Autogenerated method stub | public static void main(String[] args) throws FindFailed {
System.setProperty("webdriver.chrome.driver", "G:\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("http://demo.automationtesting.in/");
driver.manage().window().maximize();
String inputFilePath = "C:\\Users\\maddi\\Desktop\\Selenium\\Sikuli_Images\\";
Screen s = new Screen();
Pattern SkipLogin = new Pattern(inputFilePath + "Skip_Sign_In.PNG");
s.click(SkipLogin);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
System.out.println(startOfBattleHP); System.out.println(endOfBattleHP); System.out.println(goldReward); System.out.println(name); System.out.println(relic); System.out.println(card); | @SpirePrefixPatch
public static void addReward(AbstractDungeon _instance, SaveFile saveFile) {
if (startOfBattleHP != 0 && endOfBattleHP != 0 && startOfBattleHP - endOfBattleHP >= 0) {
if (isElite) {
eliteEncounters.add(new ReversalRewardItem(startOfBattleHP - endOfBattleHP, relic, 0, null, name));
}
if (isNormal) {
normalEncounters.add(new ReversalRewardItem(startOfBattleHP - endOfBattleHP, null, goldReward, card, name));
}
}
Reset();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printCards()\n {\n System.out.println(\"Your Card \" + playerCard.toString() + \" and the Computer Card \" + computerCard.toString());\n }",
"public void printCard() {\r\n String print = \"[\";\r\n for (Card card : cards) {\r\n print += card.toString();\r\n print += \",\";\r\n }\r\n\r\n print = print.substring(0, print.length() - 1);\r\n print += \"]\";\r\n print += \" Score = \";\r\n print += score();\r\n\r\n System.out.println(print);\r\n }",
"public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }",
"protected String printCard(){\r\n return ranks[rank] + \" of \" + suits[suit];\r\n }",
"@Override\r\n//displays the property of defensive players to console\r\npublic String toString() {\r\n\t\r\n\tdouble feet = getHeight()/12;\r\n\tdouble inches = getHeight()%12;\r\n\t\r\n\treturn \"\\n\" + \"\\nDefensive Player: \\n\" + getName() \r\n\t+ \"\\nCollege: \" + getCollege() \r\n\t+ \"\\nHighschool: \" + getHighschool() \r\n\t+ \"\\nAge: \" + getAge() \r\n\t+ \"\\nWeight: \" + getWeight() \r\n\t+ \"\\nHeight: \" + feet + \" ft\" + \" \" + inches + \" in\" \r\n\t+ \"\\nTeam Number: \" + getNumber() \r\n\t+ \"\\nExperience: \" + getExperience()\r\n\t+ \"\\nTeam: \" + getTeam() \r\n\t+ \"\\nPosition: \" +getPosition() \r\n\t+ \"\\nTackles : \" + getTackles() \r\n\t+ \"\\nSacks: \" +getSacks() \r\n\t+ \"\\nInterceptions: \" + getInterceptions();\r\n}",
"public void printHand() {\r\n System.out.printf(\"%s's cards:\\n\", name);\r\n for (int n = 0; n < numOfCards; n++) {\r\n System.out.printf(\" %s\\n\", hand[n].toString());\r\n }\r\n }",
"public void printCurrentBattlers() {\n //System.out.println(\"Char hp: \" + character.getCurrHP());\n System.out.printf(\"battle Allies: \");\n for (MovingEntity e: battleAllies) {\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n\n System.out.printf(\"battle Enemies: \");\n for (MovingEntity e: battleEnemies) {\n if (e.getBattleBehaviour() instanceof ZombieBattleBehaviour) {\n System.out.printf(\"Z\");\n }\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n }",
"void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }",
"public String toString(){\r\n return getName() + \": \" + this.currHP + \" hp, \" + this.minAtk + \" - \" + this.maxAtk +\r\n \" atk\";\r\n }",
"public void outputStats (){\n System.out.println(\"Your sorcerer's stats:\");\n System.out.println(\"HP = \" + hp);\n System.out.println(\"Mana = \" + mana);\n System.out.println(\"Strength = \" + strength);\n System.out.println(\"Vitality = \" + vitality);\n System.out.println(\"Energy = \" + energy);\n }",
"public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }",
"private void print() {\r\n // Print number of survivors and zombies\r\n System.out.println(\"We have \" + survivors.length + \" survivors trying to make it to safety (\" + childNum\r\n + \" children, \" + teacherNum + \" teachers, \" + soldierNum + \" soldiers)\");\r\n System.out.println(\"But there are \" + zombies.length + \" zombies waiting for them (\" + cInfectedNum\r\n + \" common infected, \" + tankNum + \" tanks)\");\r\n }",
"private static void displayPlayerStats(Object[] stats, String[] helmetSlot, String[] chestSlot, String[] weaponSlot, String[] glovesSlot, String[] bootsSlot){\r\n System.out.println(\"Name: \" + stats[0]);\r\n System.out.println(\"Level: \" + stats[1]);\r\n System.out.println(\"Experience: \" + stats[2]);\r\n System.out.println(\"HP: \" + stats[3] + \"/\" + stats[4]);\r\n System.out.println(\"MP: \" + stats[5] + \"/\" + stats[6]);\r\n System.out.println(\"Attack: \" + stats[7]);\r\n System.out.println(\"Defense: \" + stats[8]);\r\n System.out.println(\"Strength: \" + stats[9]);\r\n System.out.println(\"Intelligence: \" + stats[10]);\r\n System.out.println(\"Vitality: \" + stats[11]);\r\n System.out.println(\"Stat Points Available: \" + stats[12]);\r\n System.out.println(\"Gold: \" + stats[13]);\r\n System.out.println(\"Helmet: [\" + helmetSlot[0] + \"]\" + \"{\" + getItemRarity(helmetSlot) + \"}\");\r\n System.out.println(\"Chest Plate: [\" + chestSlot[0] + \"]\" + \"{\" + getItemRarity(chestSlot) + \"}\");\r\n System.out.println(\"Gloves: [\" + glovesSlot[0] + \"]\" + \"{\" + getItemRarity(glovesSlot) + \"}\");\r\n System.out.println(\"Boots: [\" + bootsSlot[0] + \"]\" + \"{\" + getItemRarity(bootsSlot) + \"}\");\r\n System.out.println(\"Weapon: [\" + weaponSlot[0] + \"]\" + \"{\" + getItemRarity(weaponSlot) + \"}\");\r\n }",
"public void printPermitCards(Player player);",
"public void printPoliticCards(Player player);",
"public void printHand(){\n\t\tSystem.out.println(name + \"'s hand:\");\n\t\tfor(int i=0; i<hand.size(); i++){\n\t\t\tSystem.out.print(i+1 + \".\\t\");\n\t\t\thand.get(i).printCard();\n\t\t}\n\t}",
"public void printMyCards() {\n System.out.print(String.format(\"%c[%d;%dfPlayer : %s\", escCode, 29, 1, getName()));// print the name\n ArrayList<Card> myCards = getMyCards();\n Iterator<Card> it = myCards.iterator();\n\n for (int i = 1; it.hasNext(); i++) { // print the cards in order\n Card tempCard = it.next();\n int x = 30;\n if (i > 10) {\n x = 40;// to go to the next line\n }\n System.out.printf(\"%c[0m\", escCode);\n tempCard.visiblePrint(x, i, \"\", i);\n System.out.printf(\"%c[0m\", escCode);\n }\n }",
"public String toString(){\n return \"Hand: \" + cards; \n }",
"void printBattle(ConsolePrinter printer);",
"public static void display(){\n \n //create an array : Remember positions\n //wheat= 0\n //Land = 1 \n //Population = 2\n \n String[] items = {\"Wheat\", \"Land\", \"Population\"};\n \n \n // call the crops object \n Crops theCrops = Game.getCrop();\n \n //get wheat\n int wheat = theCrops.getWheatInStore();\n \n //get land (acres)\n int acres = theCrops.getAcres();\n \n //get population \n \n int population = theCrops.getPopulation();\n \n //print results \n \n System.out.println(\"\\nInventory List:\");\n //wheat \n System.out.println(\"Wheat in Store:\" + wheat + \" bushels of \" + items[0]);\n //acres\n System.out.println(\"Acres of Land owned:\" + acres + \" acres of \" + items[1]);\n \n //population\n System.out.println(\"Current population:\" + population + \" people in the \" + items[2]);\n \n \n \n }",
"public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }",
"public void displayPrize()\n {\n System.out.println(name + \", Worth: $\" + worth + \n \", Cost: $\" + cost);\n }",
"public String showHp()\r\n {\r\n return \" \"+this.hp;\r\n }",
"void printStats();",
"public String toString() {\r\n\t\treturn name + \" @\" + worth; \r\n\t}",
"public void displayAllInfo(){\nSystem.out.println(\"Dimensions of the room - length in feet : \" + room.getLengthInFeet() + \" width in feet :\" + room.getWidthInFeet());\nSystem.out.println(\"Price per square foot :\" + pricePerSquareFoot);\nSystem.out.println(\"Total Cost :\" + calculateTotalCost());\n}",
"public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }",
"private void doSomething(){\n System.out.println(\"Robodromo \" + theRobodrome.getName() +\n \"\\nrighe e colonne, \" + this.theRobodrome.getRowCount() +\n \", \" + this.theRobodrome.getColumnCount());\n System.out.println(theTraining.getDeck());\n }",
"public void print_Deck() {\n for(int i = 0; i<52; i++) {\n System.out.println(deck.get(i));\n }\n }",
"private void printDeck() {\n for (int i = 0; i < deck.length; i++) {\n System.out.println(deck[i]);\n }\n\n }",
"public void printOut(){\n\t\tSystem.out.println(\"iD: \" + this.getiD());\n\t\tSystem.out.println(\"Titel: \" + this.getTitel());\n\t\tSystem.out.println(\"Produktionsland: \" + this.getProduktionsLand());\n\t\tSystem.out.println(\"Filmlaenge: \" + this.getFilmLaenge());\n\t\tSystem.out.println(\"Originalsprache: \" + this.getOriginalSprache());\n\t\tSystem.out.println(\"Erscheinungsjahr: \" + this.getErscheinungsJahr());\n\t\tSystem.out.println(\"Altersfreigabe: \" + this.getAltersFreigabe());\n\t\tif(this.kameraHauptperson != null) {\n\t\t\tSystem.out.println( \"Kameraperson: \" + this.getKameraHauptperson().toString() );\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println( \"Keine Kameraperson vorhanden \");\n\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tif ( this.listFilmGenre != null) {\n\t\t\tfor( FilmGenre filmGenre: this.listFilmGenre ){\n\t\t\t\tSystem.out.println(\"Filmgenre: \" + filmGenre);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person darsteller: this.listDarsteller ){\n\t\t\tSystem.out.println(\"Darsteller: \" + darsteller);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person synchronSpr: this.listSynchronsprecher ){\n\t\t\tSystem.out.println(\"synchro: \" + synchronSpr);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person regi: this.listRegisseure ){\n\t\t\tSystem.out.println(\"regi: \" + regi);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Musikstueck mstk: this.listMusickstuecke ){\n\t\t\tSystem.out.println(\"Musikstueck: \" + mstk);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tSystem.out.println(\"Datentraeger: \" + this.getDatentraeger());\n\t\tSystem.out.println(\"----------------------------\");\n\t}",
"public void playerDetailedInfo(Player p){\n System.out.println(\"Indicator: \" + indicator + \"\\nJoker: \"+joker);\n System.out.println(\"Winner: Player\" + p.getPlayerNo());\n System.out.println(\"Tile size: \" + p.getTiles().size());\n System.out.println(\"Joker count: \" + p.getJokerCount());\n System.out.println(\"Double score: \" + p.getDoubleCount()*2);\n System.out.println(\"All tiles in ascending order:\\t\" + p.getTiles());\n System.out.println(\"Clustered according to number: \\t\" + p.getNoClus());\n System.out.println(\"Total number clustering score: \" + p.totalNoClustering());\n System.out.println(\"Clustered according to color: \\t\" + p.getColClus());\n System.out.println(\"Total color clustering score: \" + p.totalColCluster());\n System.out.println(\"Final score of Player\"+p.getPlayerNo()+\": \" + p.getPlayerScore());\n }",
"@Override\n public String toString() {\n String title = \"\\n#\" + mokedexNo + \" \" + name + \"\\n\";\n StringBuffer outputBuffer = new StringBuffer(title.length());\n for (int i = 0; i < title.length(); i++){\n outputBuffer.append(\"-\");\n }\n String header = outputBuffer.toString();\n String levelStats = \"\\nLevel: \" + level;\n String hpStats = \"\\nHP: \" + hp;\n String attStats = \"\\nAttack: \" + attack;\n String defStats = \"\\nDefense: \" + defense;\n String cpStats = \"\\nCP: \" + cp;\n return title + header + levelStats + hpStats + attStats + defStats + cpStats + \"\\n\";\n }",
"public void displayGame()\n { \n System.out.println(\"\\n-------------------------------------------\\n\");\n for(int i=3;i>=0;i--)\n {\n if(foundationPile[i].isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(foundationPile[i].peek());\n }\n System.out.println();\n for(int i=6;i>=0;i--)\n {\n for(int j=0;j<tableauHidden[i].size();j++)\n System.out.print(\"X\");\n System.out.println(tableauVisible[i]);\n }\n System.out.println();\n if(waste.isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(waste.peek());\n if(deck.isEmpty())\n System.out.println(\"[O]\");\n else System.out.println(\"[X]\");\n }",
"void putdata()\n {\n System.out.printf(\"\\nCD Title \\\"%s\\\", is of %d minutes length and of %d rupees.\",title,length,price);\n }",
"public void displayStats(int lowAttack, int medAttack, int highAttack)\n\t{\n\t\tSystem.out.println (\"Summary of Combat\");\n\t\tSystem.out.println (\"Total Hits Overall: \" + numHits + \" Total Blocks Overall: \" + numBlocks);\n\t\tSystem.out.println (\"Attacker Proportions: \" + \"Low \" + lowAttack + \"% \" + \"Medium \" +\n\t\t\t\t\t\t\tmedAttack + \"% \" + \"High \" + highAttack + \"% \");\n\t\tSystem.out.print (\"Defender Proportions: \" + \"Low \");\n\t\tSystem.out.printf(\"%.2f\", (lowBlocks * 100)/(count+1));\n\t\tSystem.out.print(\"% \" + \"Medium \"); \n\t\tSystem.out.printf(\"%.2f\", ((medBlocks*100)/(count+1)));\n\t\tSystem.out.print(\"% \" + \"High \");\n\t\tSystem.out.printf(\"%.2f\", ((highBlocks*100)/(count+1)));\n\t\tSystem.out.println(\"% \");\t\t\n\t\n\t}",
"@Override\n\tpublic String toString(){\n\t\treturn \"\" + lives + \", \" + score + \", \" + brainX + \", \" + brainY + \", \" + zombieX;\n\t}",
"public void toStrings() {\n String output = \"\";\n output += \"Gen Price: $\" + genPrice + \"0\"+ \"\\n\";\n output += \"Bronze Price: $\" + bronzePrice +\"0\"+ \"\\n\";\n output += \"Silver Price: $\" + silverPrice +\"0\"+ \"\\n\";\n output += \"Gold Price: $\" + goldPrice +\"0\"+ \"\\n\";\n output += \"Vip Price: $\" + vipPrice +\"0\"+ \"\\n\";\n System.out.println(output);\n }",
"void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}",
"public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}",
"private void displayChampionshipDetails()\n {\n displayLine();\n System.out.println(\"########Formula 9131 Championship Details########\");\n displayLine();\n System.out.println(getDrivers().getChampionshipDetails());\n }",
"void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[index].getName() + this.cardsInDeck[index].getColor() + \",\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}",
"public String toString()\n {\n return value + \" \" + suit;\n }",
"public void stats() {\n\t\tSystem.out.println(\"The score is: \" + score \n\t\t\t\t+ \"\\nNumber of Astronauts rescused: \" + rescuedAstronauts \n\t\t\t\t+ \"\\nNumber of Astronauts roaming: \" + roamingAstronauts\n\t\t\t\t+ \"\\nNumber of Aliens rescued: \" + rescuedAliens\n\t\t\t\t+ \"\\nNumber of Aliens roaming: \" + roamingAliens);\n\t}",
"public void showCards() {\n\t\tfor(int i=0;i<cards.size();i++) {\n\t\t\tSystem.out.println(cards.get(i).toString());\n\t\t}\n\t}",
"public void print() {\n System.out.print(\"[ \" + value + \":\" + numSides + \" ]\");\n }",
"public static void main(String[] args) {\n\n // Variable type rank\n Rank highCard;\n Rank faceCard;\n Rank card1;\n Rank card2;\n\n // Value of card 1\n int card1Val;\n\n // Value of card 2\n int card2Val;\n\n // Assign the value to the variable\n highCard = Rank.ace;\n faceCard = Rank.jack;\n card1 = Rank.king;\n card2 = Rank.queen;\n\n // Get the ordinal value of card 1 and card 2\n card1Val = card1.ordinal();\n card2Val = card2.ordinal();\n\n // Print out the result\n System.out.println(\"A blackjack hand: \" + highCard.name() \n + \" and \" + faceCard.name());\n System.out.println();\n System.out.println(\"A two card hand: \" + card1Val + \" and \" + card2Val);\n System.out.println();\n System.out.println(\"Hand value: \" + (card1Val + card2Val));\n }",
"public void roar() {\n System.out.print(name + \", age \" + getAge() + \", says: Roar!\");\n }",
"public void printAssistants(Player player);",
"public void showHand(){\n System.out.println(this.hand.toString());\n }",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"public void printAll(){\n\t\tSystem.out.println(\"Single hits: \" + sin);\n\t\tSystem.out.println(\"Double hits: \" + doub);\n\t\tSystem.out.println(\"Triple hits: \" + trip);\n\t\tSystem.out.println(\"Homerun: \" + home);\n\t\tSystem.out.println(\"Times at bat: \" + atbat);\n\t\tSystem.out.println(\"Total hits: \" + hits);\n\t\tSystem.out.println(\"Baseball average: \" + average);\n\t}",
"private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }",
"public String toString(){//method of return card number and balance\r\n return \"Card no:\" +number+\" has a balance of: \"+balance; \r\n }",
"public void print() {\n super.print();\r\n System.out.println(\"Hourly Wage: \" + hourlyWage);\r\n System.out.println(\"Hours Per Week: \" + hoursPerWeek);\r\n System.out.println(\"Weeks Per Year: \" + weeksPerYear);\r\n }",
"public void testOnlyPrint()\r\n {\r\n for ( int i =0; i < valid; i++)\r\n {\r\n System.out.println( cards[i] );\r\n }\r\n }",
"private void display(){\n out.println(\"\\n-STOCK EXCHANGE-\");\n out.println(\"Apple - Share Price: \" + game.apple.getSharePrice() + \" [\" + game.apple.top() + \"]\");\n out.println(\"BP - Share Price: \" + game.bp.getSharePrice() + \" [\" + game.bp.top() + \"]\");\n out.println(\"Cisco - Share Price: \" + game.cisco.getSharePrice() + \" [\" + game.cisco.top() + \"]\");\n out.println(\"Dell - Share Price: \" + game.dell.getSharePrice() + \" [\" + game.dell.top() + \"]\");\n out.println(\"Ericsson - Share Price: \" + game.ericsson.getSharePrice() + \" [\" + game.ericsson.top() + \"]\");\n\n out.println(\"\\n-PLAYERS-\");\n// System.out.println(playerList.toString());\n for (Player e : playerList) {\n if (e.equals(player)) {\n out.println(e.toString() + \" (you)\");\n } else {\n out.println(e.toString());\n }\n }\n }",
"public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }",
"public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }",
"public void print() {\n System.out.println(\"Code: \"+this.productCode);\n System.out.println(\"Name: \"+ this.productName);\n System.out.println(\"Price: \"+this.price);\n System.out.println(\"Discount: \"+this.discount+\"%\");\n }",
"public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }",
"public String toString(){\n return name + \"|Pop: \" + pop + \"|Gdp: \" +gdp + \"|Social: \" +social + \"|Living: \" + living;\n }",
"public void printDetailedPlayer(Player player);",
"public void getStatus()\r\n {\r\n //if this person has no weapon or armor, these values are kept\r\n String weaponName = \"bare hands\";\r\n String armorName = \"none\";\r\n int weaponAtk = 0;\r\n int armorDef = 0;\r\n \r\n if (weapon!=null)\r\n {\r\n weaponName = weapon.getName();\r\n weaponAtk = weapon.getRating();\r\n }\r\n if (armor!=null)\r\n {\r\n armorName = armor.getName();\r\n armorDef = armor.getRating();\r\n }\r\n \r\n String itemList = \"\";\r\n for (Thing t : items)\r\n itemList += t.getName() + \", \";\r\n \r\n System.out.println(\"Health: \" + health + \"/\" + maxHealth + \"\\n\" +\r\n \"ATK: \" + attack + \"\\n\" +\r\n \"DEF: \" + defense + \"\\n\" +\r\n \"Weapon: \" + weaponName + \" (\" + weaponAtk + \" ATK\" + \")\" + \"\\n\" +\r\n \"Armor: \" + armorName + \" (\" + armorDef + \" DEF\" + \")\");\r\n }",
"void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }",
"public void displayCards() {\n\t\tSystem.out.println(\"\\n---------- Deck Worker ----------\");\n\t\tfor(Card worker : this.deckWorker) {\n\t\t\tSystem.out.print(worker.toString());\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---------- Deck Building and Machine ----------\");\n\t\tfor(IBuilding building : this.deckBuilding) {\n\t\t\tSystem.out.print(building.toString());\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void print(){\n System.out.println(\"(\"+a.getAbsis()+\"_a,\"+a.getOrdinat()+\"_a)\");\n System.out.println(\"(\"+b.getAbsis()+\"_b,\"+b.getOrdinat()+\"_b)\");\n System.out.println(\"(\"+c.getAbsis()+\"_b,\"+c.getOrdinat()+\"_c)\");\n }",
"public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }",
"public void showBalance(){\n for(Player player: players){\n System.out.println(player + \"'s balance: \" + player.getWallet());\n }\n System.out.println();\n dealer.showProfit();\n System.out.println();\n }",
"public static void main(String[] args) {\n Rank highCard, faceCard, card1, card2;\n\n // Giver variablerne værdier\n highCard = Rank.ACE;\n faceCard = Rank.KING;\n card1 = Rank.FIVE;\n card2 = Rank.TEN;\n\n // Printer en linje hvor highCard og faceCard bliver brugt\n System.out.println(\"A blackjack hand: \" + highCard + \" and \" + faceCard);\n\n // Variabler af typen int\n int card1Val, card2Val, result;\n card1Val = card1.ordinal() + 1;\n card2Val = card2.ordinal() + 1;\n result = card1Val + card2Val;\n\n // Printer 2 linjer med hånden og summen af de 2 kort\n System.out.println(\"A two card hand: \" + card1 + \" and \" + card2);\n System.out.println(\"Hand value: \" + result );\n\n\n }",
"public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public void printAnalysis(){\n System.out.println(\"Product: \" + this.getName());\n System.out.println(\"History: \" + this.history());\n System.out.println(\"Largest amount of product: \" + this.inventoryHistory.maxValue());\n System.out.println(\"Smallest amount of product: \" + this.inventoryHistory.minValue());\n System.out.println(\"Average: \" + this.inventoryHistory.average());\n }",
"void showcards() {\n \tfor(String card: mycards){\n \t\tSystem.out.println(\"My card is \" + card);\n \t\t}\n\t}",
"public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}",
"public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }",
"@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(alcohol);\n\t}",
"public void display()\r\n\t{\r\n\t\tSystem.out.println(\"Dollar: $\"+getAmount());\r\n\t\tSystem.out.println(\"Rupiah: Rp.\"+dollarTorp());\r\n\t}",
"public void printHand(){\n System.out.println();\n for(int i = 1 ; i <= 6; i++){\n for(int j = 0 ; j < hand.size(); j++){\n if(j == hand.size()-1){\n System.out.print(hand.get(j).fullRowString(i));\n }\n else{\n System.out.print(hand.get(j).halfRowString(i));\n }\n }\n System.out.println();\n }\n System.out.println();\n for(int k = 0; k < hand.size() ; k++){\n if(k >= 10){\n System.out.print(\" \" + (k+1) + \" \");\n }\n else{\n System.out.print(\" \" + (k+1) + \" \");\n }\n }\n System.out.println();\n }",
"public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }",
"public void printAllPlayerHands(){\n\t\tfor(int i = 0 ; i < this.players.length; i++){\n\t\t\tplayers[i].printPlayerHand();\t\t \n\t\t}\t\n\t}",
"@Override \r\npublic String toString() { \r\n\treturn String.format(\"Action programmer: %s%n%s: $%,.2f; %s: %,.2f\",\r\n\t\t\tsuper.toString(), \"hourly wage\", getWage(), \r\n\t\t\t\"pieces worked\", getPieces()); }",
"public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}",
"public static void displayStats(ArrayList<String> standings){\n\t\tString[] parts;\n\t\tdouble avg, gamesB; //variables for fucntion calls\n\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\tSystem.out.println(\"Teams: Wins: Loses: Pct: Games Behind:\" );\n\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\tfor(String standing : standings){\n\t\t\tparts = standing.split(\"\\t\");\n\t\t\tavg = getAvg(standing);\n\t\t\tSystem.out.printf(\"%-15s%-8s%-8s%6.2f \\n \", parts[0], parts[1], parts[2], avg);\n\t\t}//end for \n//\t\tSystem.out.println(standings);\n\t}",
"public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}",
"public void printInfo(){\n System.out.println(\" this is my y \"+(y+1)+\" this is my x \"+ X.valueOfInt(x));\n System.out.println(\"i am full: \"+ isFull);\n }",
"public String showFirstRoundCards() {\n String message = \"[ Unknown \";\n message += personHand.get(1) + \" ]\";\n return message;\n }",
"@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }",
"public static void printGame(){\n System.out.println(\"Spielrunde \" + GameController.AKTUELLE_RUNDE);\n System.out.println(GameController.AKTUELLER_SPIELER +\" ist an der Reihe.\");\n System.out.println(\"Er attackiert \" +\n GameController.AKTUELLER_VERTEIDIGER + \" und verursacht \"\n + GameController.SCHADEN +\" Schaden. \");\n System.out.println();\n }",
"public void displayComputerWinnings()\n {\n for(int card = 0; card < computerCardsWon; card++)\n {\n System.out.println(compWinnings[card].toString());\n }\n }",
"public void displayCharacter() {\n System.out.println(\"**************************\");\n System.out.println(p.showDetails());\n System.out.println(\"**************************\"+\"\\n\");\n\n }",
"public String printDetails(){\n System.out.println(\"This is the Title of the book:\");\n return title;\n System.out.println(\"This is the Author of the book:\");\n return author;\n System.out.println(\"This is how many pages there are:\");\n return pages;\n System.out.println(\"This is the Ref Number:\");\n return refNumber;\n \n }",
"public void printDrawCard(PoliticCard card);",
"public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }",
"public static void main(String[] args) {\n\t\tPokemon firstPokemon = new Pokemon(\" P1 Typhlosion \", 1600, \" Fire \" , \" Healthy \" , \"Scratch\" , \"Bite\" , \"Fire Blast\", 300 , 375 , 450);\r\n\t\t Pokemon secondPokemon = new Pokemon(\" P2 Snorlax \", 1300, \" Normal \" , \" Healthy \" , \"Body Slam\" , \"Sleep\" , \"Swallow\", 500 , 100 , 200);\r\n\t\t System.out.println (firstPokemon.name + firstPokemon.health + firstPokemon.type + firstPokemon.status );\r\n\t\t System.out.println (secondPokemon.name + secondPokemon.health + secondPokemon.type + secondPokemon.status );\r\n\t\t Scanner myObj = new Scanner(System.in);\r\n\t\t\r\n\t\t \r\n\t\t System.out.println( \"P1 Turn. Enter number for corresponding attack! \" );\r\n\t\t System.out.println( \" 1(\" + firstPokemon.pAttack1 +\")\"+ \" 2(\" + firstPokemon.pAttack2 +\")\"+ \" 3(\" + firstPokemon.pAttack3 +\")\" );\r\n\t\t String battleCommand = myObj.nextLine();\r\n\t\t System.out.println (battleCommand);\r\n\t\t if (battleCommand.charAt(0) == '1') {\r\n\t\t\t System.out.println (firstPokemon.pAttack1);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '2') {\r\n\t\t\t System.out.println (firstPokemon.pAttack2);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '3') {\r\n\t\t\t System.out.println (firstPokemon.pAttack3);\r\n\t\t }\r\n\t\t else {\r\n\t\t\t System.out.println(\"Please enter the correct number.\");\r\n\t\t\t \r\n\t\t }\r\n\t}",
"public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }",
"public void printCustomerDetails()\r\n {\r\n System.out.println(title + \" \" + firstName + \" \" \r\n + lastName + \"\\n\" +getAddress() \r\n + \"\\nCard Number: \" + cardNumber \r\n + \"\\nPoints available: \" + points);\r\n }",
"public String toString () {\r\n\t\treturn (\"\\nName: \" + this.getName()\r\n\t\t\t\t+\"\\nNationality: \" + this.getCountryName()\t\t\r\n\t\t\t\t+\"\\nAge: \"+ this.dob.playerAge() +\" years old \"+ this.getDob() \r\n\t\t\t\t+\"\\nCurrent team:\" + this.getClubName() \r\n\t\t\t\t+\"\\nPosition: Forward\" \r\n\t\t\t\t+\"\\nGames Played: \" + this.getGamesPlayed()\r\n\t\t\t +\"\\nGoals Scored: \" + this.getGoalsScored()\r\n\t\t +\"\\nGoals Assisted: \" + this.getNumAssists ()\r\n\t\t +\"\\nGoals Shot on Target: \" + this.getShotsOnTarget ()\r\n\t\t\t +\"\\nCautions:\"\r\n\t\t\t\t+\"\\nYellow Cards: \" + this.getNumYellowCards()\r\n\t\t\t\t+\"\\nRed Cards: \" + this.getNumRedCards()\r\n\t\t );\r\n\r\n\t\t}",
"public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }",
"public String toString() \r\n\t{\r\n\t\treturn value + \" \" + rank + \" of \" + suit;\r\n\t}"
] | [
"0.7235743",
"0.6939953",
"0.68861383",
"0.6881676",
"0.6808137",
"0.67896926",
"0.6765484",
"0.6649454",
"0.66393584",
"0.6595895",
"0.6586025",
"0.65539545",
"0.6535293",
"0.65253407",
"0.650433",
"0.65016246",
"0.65011585",
"0.6483436",
"0.6478866",
"0.6474996",
"0.6471633",
"0.6468137",
"0.6445584",
"0.64274234",
"0.64087725",
"0.64003426",
"0.6383033",
"0.6382587",
"0.6356756",
"0.6350293",
"0.63289034",
"0.6325455",
"0.6303805",
"0.6301549",
"0.6290527",
"0.6283499",
"0.62777215",
"0.62714845",
"0.62533724",
"0.62503946",
"0.6241597",
"0.62241155",
"0.62222797",
"0.62182236",
"0.6212206",
"0.62070185",
"0.6197265",
"0.61966056",
"0.61832875",
"0.6176046",
"0.61684257",
"0.6168316",
"0.6167147",
"0.61638767",
"0.61564046",
"0.6149937",
"0.6146177",
"0.61444503",
"0.6143592",
"0.6142886",
"0.61378026",
"0.6122225",
"0.61209744",
"0.6120768",
"0.6118648",
"0.6115189",
"0.6113055",
"0.611",
"0.610656",
"0.6106535",
"0.6103513",
"0.60961145",
"0.60930175",
"0.60890317",
"0.60883015",
"0.6085398",
"0.6081782",
"0.60769",
"0.60722953",
"0.6067037",
"0.60642594",
"0.6063198",
"0.6057025",
"0.60561293",
"0.6054068",
"0.60476243",
"0.6046467",
"0.6045591",
"0.6042942",
"0.6040599",
"0.60392326",
"0.6035101",
"0.6030124",
"0.6026121",
"0.6025804",
"0.6025736",
"0.60226226",
"0.602236",
"0.60223484",
"0.6021383",
"0.6020453"
] | 0.0 | -1 |
A MatchSnippet is a Java object representation of a part of a snippet. | public interface MatchSnippet {
/**
* Identifies whether this run of text in the snippet matches the search criteria or not.
*
* If the text matches the criteria, it will be highlighted.
*
* @return The hightlight value.
*/
boolean isHighlighted();
/**
* Returns the string value of the run of text in this part of the snippet.
* @return The text string.
*/
String getText();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSnippet() {\n return this.snippet;\n }",
"@Override\r\n\tpublic String getMatch() {\n\t\treturn match;\r\n\t}",
"Match getPartialMatch();",
"Match getResultMatch();",
"Match createMatch();",
"String snippet(int line);",
"public abstract Match match();",
"Match getMatches();",
"@Override\n public Match getMatch() {\n return match;\n }",
"void setPartialMatch(Match partialMatch);",
"public DebugRuleElementMatch(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }",
"public boolean canTagSnippet(Session session, Snippet snippet);",
"public boolean canRateSnippet(Session session, Snippet snippet);",
"public void setMatched(String matched) {\r\n\t\tthis.matched = matched;\r\n\t}",
"public Student getStudent(String match);",
"Match getCompleteMatch();",
"public static String getSnippet(String result) {\n String snippet = null;\n String title = null;\n String icon = null;\n String desc = null;\n try {\n JSONObject jsonObject = new JSONObject(result);\n JSONArray movieArray = new JSONArray(jsonObject.get(\"foods\").toString());\n if (movieArray != null && movieArray.length() > 0) {\n JSONObject obj = movieArray.getJSONObject(0);\n JSONObject obj2 = (JSONObject) obj.get(\"pagemap\");\n icon = (new JSONArray(obj2.get(\"cse_thumbnail\").toString()).getJSONObject(0).getString(\"src\"));\n desc = (new JSONArray(obj2.get(\"metatags\").toString()).getJSONObject(0).getString(\"twitter:description\"));\n title = obj.getString(\"title\");\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n snippet = \"NO INFO FOUND\";\n }\n //return snippet;\n return icon;\n }",
"public String getMatched() {\r\n\t\treturn matched;\r\n\t}",
"public void setMatch(OFMatch mt) {\n\t\tthis.match = mt;\r\n\t}",
"@Test\n public void commentMatch() {\n comment.match(\"//hier steht text\\n\");\n assertEquals(comment.getClass(), comment.getToken().getClass());\n }",
"void matchStart();",
"public String getSampleComment();",
"public GrandChildOfStringMatch() {}",
"public void search(String quizID) {\n\t\t\n\t\tthis.getChildren().clear(); // empty the result first\n\t\t\n\t\tArrayList<QuizData> quizList = BrowserData.quizList();\n\n\t\tboolean noMatch = true; // true if no match found\n\t\t\n\t\tfor (int i = 0; i < quizList.size(); i++) {\n\t\t\t\n\t\t\tif(quizID.equals(quizList.get(i).getName())) { // if match found: create a snippet for the quiz and show\n\t\t\t\t\n\t\t\t\tthis.getChildren().add(new QuizSnippet(quizList.get(i)));\n\t\t\t\tnoMatch = false;\n\t\t\t\t\n\t\t\t}\n\t\t \n\t\t}\n\n\t\tif(noMatch) { // if no match found: show \"No match found!\"\n\n\t\t\tText noResult = new Text(\"No match found!\");\n\t\t\tnoResult.setFont(new Font(20));\n\t\t\tthis.getChildren().add(noResult);\n\n\t\t}\n\t\t\n\t}",
"public Snippet visit(DotIdentifier n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t String object = n.identifier.accept(this, argu).expType.getTypeName();\n\t Symbol sym1 = getIdentifier(object, currentBlock, currentClassName);\n\t\t\tString refClass = \"\";\n\t\t\tif(sym1 == null)\n\t\t\t\trefClass = object; // Static reference\n\t\t\telse\n\t\t\t\trefClass = sym1.symbolType.getTypeName(); // Object reference\n\t n.nodeToken.accept(this, argu);\n\t String identifier = n.identifier1.accept(this, argu).expType.getTypeName();\n\t \n\t\t\tSymbol sym2 = getIdentifier(identifier, 0, refClass); \n\t\t\tString toAdd;\n\t\t\t\n\t\t\tif( !classes.containsKey(object)){\n\t\t\tif(!inAsync ){\n\t\t\t\ttPlasmaCode += generateTabs(blockDepth)+generatePlaceCheckCode( \"myUniquePlacePoint\", object);\n\t\t\t}else{\n\t\t\t\ttPlasmaCode += generateTabs(blockDepth)+generatePlaceCheckCode(asyncPoint , object);\n\t\t\t}\n\t\t\t}\n\t\t\treturn new Snippet(\"\", \"\"+object + \".\" + identifier, sym2.symbolType /* Not needed, but kept only as a cross check */, false);\n\t }",
"public Match( ) {\n\n }",
"public Map<String, Match> getReferenceMatches();",
"@Override\n public String toString() {\n return \"NodeMatch{\" +\n \"matched='\" + matched + '\\'' +\n \", value=\" + value +\n \", params=\" + Arrays.toString(params) +\n \", trailingSlashRedirect=\" + trailingSlashRedirect +\n '}';\n }",
"@Override\n public List<MatchSegment> getMatch(final String text)\n {\n final List<String> split = splitNameTypeAndInitialValues(text);\n if (split.size() < 1)\n return List.of();\n\n final List<MatchSegment> segs = new ArrayList<>(split.size());\n\n String name = split.get(0).trim();\n if (name.equals(\"loc://\"))\n { // Just \"loc://\" matches, add \"name\"\n segs.add(MatchSegment.match(name));\n segs.add(MatchSegment.normal(\"name\"));\n }\n else // Show (partial) match between entered name and this proposal\n segs.addAll(super.getMatch(name));\n\n // No type provided?\n if (split.get(1) == null)\n segs.add(MatchSegment.comment(\"<VType>\"));\n else if (type.toLowerCase().indexOf(split.get(1).toLowerCase()) >= 0)\n // Recognize piece of type, accept for full type\n segs.add(MatchSegment.match(\"<\" + type + \">\"));\n else\n // No type entered, would use this proposal's type when accepted\n segs.add(MatchSegment.normal(\"<\" + type + \">\"));\n\n // Add initial values\n final int common = Math.min(split.size()-2, initial_values.length);\n int parm;\n for (parm = 0; parm < common; ++parm)\n {\n final String another = parm < initial_values.length-1 ? \",\" : \")\";\n if (parm == 0)\n segs.add(MatchSegment.match(\"(\" + split.get(parm+2) + another,\n \"(\" + initial_values[parm] + another));\n else\n segs.add(MatchSegment.match(split.get(parm+2) + another,\n initial_values[parm] + another));\n }\n\n // Add remaining init.values as COMMENT\n final StringBuilder buf = new StringBuilder();\n if (parm < initial_values.length)\n {\n if (parm == 0)\n buf.append('(');\n for (/**/; parm<initial_values.length; ++parm)\n {\n buf.append(initial_values[parm]);\n if (parm < initial_values.length-1)\n buf.append(\", \");\n }\n buf.append(')');\n }\n if (buf.length() > 0)\n segs.add(MatchSegment.comment(buf.toString()));\n\n return segs;\n }",
"public Match(String subgraph) {\r\n\t\tsuper();\r\n\t\tthis.subgraph = subgraph;\r\n\t\tthis.variables = new ArrayList<Variable>();\r\n\t}",
"public GrandChildOfStringMatch(GrandChildOfStringMatch entry) {\n super(entry);\n arrayOfShorts = entry.arrayOfShorts;\n }",
"@Override\n public int compareTo(Snippet o) {\n return this.name.compareTo(o.name);\n }",
"public Match(){\n this(-1, null, 0, 0, null, null);\n }",
"public Matcher(List<String> lines, int lineOffset, HashMap<String, List<MatchOffset>> matchMap) {\n this.lines = lines;\n this.lineOffset = lineOffset;\n this.matchMap = matchMap;\n }",
"protected DebugRuleElementMatch() {/* intentionally empty block */}",
"void setCompleteMatch(Match completeMatch);",
"public int getMatchID(){\r\n\t\treturn matchID;\r\n\t}",
"public static void matchMaker()\n {\n \n }",
"public String getMatchType() {\n return getStringProperty(\"MatchType\");\n }",
"public void setMatchID(int id){\r\n\t\tmatchID = id;\r\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,gst.resultFile);\r\n\t\t\t\t\t\t\t\t\t\t}",
"public static ISLMatchPage newInstance(String param1, String param2) {\n ISLMatchPage fragment = new ISLMatchPage();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"private void extractParseWithObjectId(String selected_Object_id) {\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"Match\");\n query.getInBackground(selected_Object_id, new GetCallback<ParseObject>() {\n public void done(ParseObject object, ParseException e) {\n if (e == null) {\n System.out.println(\"Object has been found!!\");\n System.out.println(object.get(\"FromPlayer\"));\n SMA_FromPlayer.setText(object.get(\"FromPlayerToDisp\").toString());\n SMA_ToPlayer.setText(object.get(\"ToPlayerToDisp\").toString());\n SMA_Time.setText(object.get(\"Time\").toString());\n SMA_Location.setText(object.get(\"Location\").toString());\n if (object.get(\"Status\").toString().equals(\"Pending\")) {\n SMA_Label_Pending.setVisibility(View.VISIBLE);\n }\n\n } else {\n System.out.println(\"Object has not been found!!\");\n }\n }\n });\n }",
"private void assertType(String snippet, Class<? extends Object> type) {\n try {\n Lexer lexer = new Lexer(new StringReader(snippet));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getRight().getClass() == type);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }",
"public ParsedPage parse(String src);",
"public void addMatch() {\n totalMatches ++;\n }",
"MatchedTile(int id, int background) {\n this.id = id;\n this.background = background;\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Match)) {\n return false;\n }\n return id != null && id.equals(((Match) o).id);\n }",
"@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}",
"public int match(Phrase phrase) {\n\n\t\t/*\n\t\t * A phrase can have multiple tags to start matching from, for example:\n\t\t * \t\tOutline: {FRACTION/null} {TIME_CHANGE/null}\t\t\tExpecting: \"do something at quarter after\"\n\t\t * \t\tPhrase: \"Do half by homework at quarter after\"\n\t\t * \n\t\t * The matcher will work off of the {FRACTION/half} tag, resulting on zero confidence, as the\n\t\t * following tag is not a TIME_CHANGE tag.\n\t\t * \n\t\t * To combat this, a list is made of all tags in the phrase with the correct starting type (and value if\n\t\t * applicable). For each starting tag, a new List<Tag> is made of it and the tags following, and each of\n\t\t * them are sent to the matcher. The starting tag with the highest confidence is selected as the correct\n\t\t * one, and this confidence is returned, completing the process.\n\t\t */\n\n\t\t// tags in phrase\n\t\tList<Tag> phraseTags = phrase.getTags();\n\n\t\t// find all potential starting tags\n\t\tList<List<Tag>> potentialMatchers = new ArrayList<>();\n\t\tfor (Tag t : phraseTags) {\n\t\t\tTag outlineTag = mandatoryTags.get(0);\n\t\t\tif (tagsMatch(outlineTag, t)) {\n\t\t\t\tint startIndex = phraseTags.indexOf(t);\n\t\t\t\tint endIndex = phraseTags.size();\n\t\t\t\tList<Tag> potentialMatcher = phraseTags.subList(startIndex, endIndex);\n\t\t\t\tpotentialMatchers.add(potentialMatcher);\n\t\t\t}\n\t\t}\n\n\t\tint confidence = 0;\n\n\t\t// check each potential starting tag, keeping the one with the highest confidence\n\t\tfor (List<Tag> potentialMatcher : potentialMatchers) {\n\n\t\t\tint currentConfidence = getConfidence(potentialMatcher);\n\t\t\tif (currentConfidence > confidence)\n\t\t\t\tconfidence = currentConfidence;\n\t\t}\n\n\t\treturn confidence;\n\t}",
"@Override\n public double getMatchTime() {\n return MATCH_DURATION_IN_SECONDS;\n }",
"protected abstract void onMatch(String value, Label end);",
"public interface MatchSet {\n\n\t/**\n\t * @return query that produced the match set\n\t */\n\tpublic ProfileQuery getQuery();\n\t\n\t/**\n\t * @return all matches\n\t */\n\tpublic List<Match> getMatches();\n\n\t/**\n\t * @return all matches with rank\n\t */\n\tpublic List<Match> getMatchesWithRank(int rank);\n\t\n\t/**\n\t * @param rank\n\t * @return all matches <= rank\n\t */\n\tpublic List<Match> getMatchesWithOrBelowRank(int rank);\n\t\n\t/**\n\t * @param matchId\n\t * @return Match with identical matchId\n\t */\n\tpublic Match getMatchesWithId(String matchId);\n\t\n\t/**\n\t * @param createMatch\n\t */\n\tpublic void add(Match match);\n\n\t/**\n\t * sort all matches, best match first\n\t */\n\tpublic void sortMatches();\n\t\n\t/**\n\t * rank sorted matches, best has rank=1, \n\t * identical scores share ranks\n\t */\n\tpublic void rankMatches();\n\t\n\t// TODO - record kb metadata\n\tpublic ExecutionMetadata getExecutionMetadata();\n\tpublic void setExecutionMetadata(ExecutionMetadata executionMetadata);\n\n\tpublic MethodMetadata getMethodMetadata();\n\tpublic void setMethodMetadata(MethodMetadata methodMetadata);\n\n\t/**\n\t * Truncate the match set to the top n hits\n\t * \n\t * @param limit\n\t */\n\tpublic void truncate(int limit);\n\t\n\t/**\n\t * Matches for all reference individuals\n\t * \n\t * This is preserved even after truncation\n\t * \n\t * @return map between match id and match\n\t */\n\tpublic Map<String, Match> getReferenceMatches();\n\t\t\n\tpublic DescriptiveStatistics getScores();\n\n\t/**\n\t * @param background - distribution of scores to compare for significance\n\t */\n\tpublic void calculateMatchSignificance(DescriptiveStatistics background);\n\n\t// TODO - filters\n\t\n}",
"public ArrayList<String> findSimilarStringsLiterals(String s, double score){\n\t\t\n\t\tsetForSuggestions.clear();\n\t\t\n\t\t// ArrayList for match scores\n\t\tArrayList<StringScore> matchesScores = new ArrayList<StringScore>(); \n\t\t\n\t\t// ArrayList for the matches\n\t\tArrayList<String> matches = new ArrayList<String>();\n\t\t\n\t\t// The trimmed string variable\n\t\tString trimmedString;\n\t\t\n\t\t// Check if it's not a literal\n\t\tif(!s.startsWith(\"\\\"\"))\n\t\t\treturn matches;\n\t\t\n\t\t// Extract what's between double quotes\n\t\ttrimmedString = s.substring(s.indexOf(\"\\\"\")+1,\n\t\t\t\ts.indexOf(\"\\\"\", s.indexOf(\"\\\"\")+1)).toLowerCase();\t// Just choose what is between brackets\n\t\t\n\t\t// Find similar literals withing 5 characters\n\t\tint minLength = trimmedString.length() - 2;\n\t\tint maxLength = trimmedString.length() + 3;\n\t\t\n\t\tint minIndex = Integer.MAX_VALUE;\n\t\tint maxIndex = -1;\n\t\t\n\t\t// Determine indices for search in bins\n\t\tfor(int i = 0; i < lengths.size(); ++i){\n\t\t\tif(lengths.get(i) > maxLength) {\n\t\t\t\tmaxIndex = indexes.get(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minLength >= lengths.get(i)) {\n\t\t\t\tminIndex = indexes.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Assign threads to search tasks\n\t\tint indexesPerThread = (maxIndex - minIndex) / (numOfCores - 1);\n\t\t\n\t\t// Arraylist to keep track of threads\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\n\t\t\n\t\tfor(int i = minIndex; i < maxIndex; i += indexesPerThread) {\n\t\t\tthreads.add(new Thread(new SuggestionTask(i, i + indexesPerThread, s, trimmedString, score)));\n\t\t}\n\t\t\n\t\t// Start threads\n\t\tfor(int i = 0; i < threads.size(); ++i) {\n\t\t\tthreads.get(i).start();\n\t\t}\n\t\t\n\t\t// Join threads before continue\n\t\tfor(int i = 0; i < threads.size(); ++i) {\n\t\t\ttry {\n\t\t\t\tthreads.get(i).join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Copy contents of the synchronized list into the matchesScores list\n\t\tfor(StringScore stringScore : setForSuggestions) {\n\t\t\tmatchesScores.add(stringScore);\n\t\t}\n\t\t\n\t\t// Sort the candidate matches based on score and return top 5\n\t\tjava.util.Collections.sort(matchesScores, new StringScoreComparator());\n\t\tfor(int i = 0; i < 5 && i < matchesScores.size(); ++i){\n\t\t\tmatches.add(matchesScores.get(i).getS());\n\t\t}\n\t\treturn matches;\n\t}",
"private Peptide getPeptide(DatabaseMatch match)\r\n\t{\r\n//\t\tString pvID = pre+pepStr+post;\r\n\t\t\r\n\t\tString pepStr = match.getPepSeq();\r\n\t\t\r\n//\t\t/////////\r\n//\t\tSystem.out.println(\"PepStr: \" + pepStr);\r\n//\t\t///////////\r\n\t\t\r\n\t\tPeptide mzidPeptide = pepMap.get(pepStr);\r\n\t\t\r\n//\t\t/////////////\r\n//\t\tedu.ucsd.msjava.msutil.Peptide testPep = aaSet.getPeptide(pepStr);\r\n//\t\tSystem.out.println(testPep);\r\n//\t\tSystem.out.println(pepStr+\"->\"+(mzidPeptide == null ? null : mzidPeptide.getId()));\r\n\t\t/////////////\r\n\t\t\r\n\t\tif(mzidPeptide == null)\r\n\t\t{\r\n\t\t\t// new peptide variant\r\n\t\t\tmzidPeptide = new Peptide();\r\n\t\t\tList<Modification> modList = mzidPeptide.getModification();\r\n\t\t\tedu.ucsd.msjava.msutil.Peptide peptide = aaSet.getPeptide(pepStr); \r\n\t\t\tStringBuffer unmodPepStr = new StringBuffer();\r\n\t\t\tint location = 1;\r\n\t\t\tfor(edu.ucsd.msjava.msutil.AminoAcid aa : peptide)\r\n\t\t\t{\r\n\t\t\t\tLocation loc;\r\n\t\t\t\tif(location == 1)\r\n\t\t\t\t\tloc = Location.N_Term;\r\n\t\t\t\telse if(location == peptide.size())\r\n\t\t\t\t\tloc = Location.C_Term;\r\n\t\t\t\telse\r\n\t\t\t\t\tloc = Location.Anywhere;\r\n\t\t\t\t\r\n\t\t\t\tunmodPepStr.append(aa.getUnmodResidue());\r\n\t\t\t\tif(loc == Location.N_Term || loc == Location.C_Term)\r\n\t\t\t\t{\r\n\t\t\t\t\tList<edu.ucsd.msjava.msutil.Modification> fixedTermMods = apcGen.getTerminalFixedModifications(aa.getUnmodResidue(), loc);\r\n\t\t\t\t\tfor(edu.ucsd.msjava.msutil.Modification fixedMod : fixedTermMods)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tModification mod = new Modification();\r\n\t\t\t\t\t\tif(loc == Location.N_Term)\r\n\t\t\t\t\t\t\tmod.setLocation(location-1);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmod.setLocation(location+1);\r\n\t\t\t\t\t\tmod.setMonoisotopicMassDelta(fixedMod.getAccurateMass());\r\n\t\t\t\t\t\tmod.getCvParam().addAll(apcGen.getSearchModification(fixedMod).getCvParam());\r\n\t\t\t\t\t\tmodList.add(mod);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tList<edu.ucsd.msjava.msutil.Modification> fixedMods = apcGen.getFixedModifications(aa.getUnmodResidue());\r\n\t\t\t\tif(fixedMods != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(edu.ucsd.msjava.msutil.Modification fixedMod : fixedMods)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tModification mod = new Modification();\r\n\t\t\t\t\t\tmod.setLocation(location);\r\n\t\t\t\t\t\tmod.setMonoisotopicMassDelta(fixedMod.getAccurateMass());\r\n\t\t\t\t\t\tmod.getCvParam().addAll(apcGen.getSearchModification(fixedMod).getCvParam());\r\n\t\t\t\t\t\tmodList.add(mod);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(aa.isModified())\r\n\t\t\t\t{\r\n\t\t\t\t\tModification mod = new Modification();\r\n\t\t\t\t\tModifiedAminoAcid modAA = (ModifiedAminoAcid)aa;\r\n\t\t\t\t\tif(location == 1 && modAA.isNTermVariableMod())\r\n\t\t\t\t\t\tmod.setLocation(location-1);\r\n\t\t\t\t\telse if(location == peptide.size() && modAA.isCTermVariableMod())\r\n\t\t\t\t\t\tmod.setLocation(location+1);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmod.setLocation(location);\r\n\t\t\t\t\tmod.setMonoisotopicMassDelta(modAA.getModification().getAccurateMass());\r\n\t\t\t\t\t\r\n\t\t\t\t\tmod.getCvParam().addAll(apcGen.getSearchModification(modAA.getModification()).getCvParam());\r\n\t\t\t\t\tmodList.add(mod);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(modAA.getTargetAA().isModified())\t// aa has two modifications\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tModification mod2 = new Modification();\r\n\t\t\t\t\t\tModifiedAminoAcid modAA2 = (ModifiedAminoAcid)modAA.getTargetAA();\r\n\t\t\t\t\t\tif(location == 1 && modAA2.isNTermVariableMod())\r\n\t\t\t\t\t\t\tmod2.setLocation(location-1);\r\n\t\t\t\t\t\telse if(location == peptide.size() && modAA2.isCTermVariableMod())\r\n\t\t\t\t\t\t\tmod2.setLocation(location+1);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmod2.setLocation(location);\r\n\t\t\t\t\t\tmod2.setMonoisotopicMassDelta(modAA2.getModification().getAccurateMass());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmod2.getCvParam().addAll(apcGen.getSearchModification(modAA2.getModification()).getCvParam());\r\n\t\t\t\t\t\tmodList.add(mod2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tlocation++;\r\n\t\t\t}\r\n\r\n\t\t\tmzidPeptide.setPeptideSequence(unmodPepStr.toString());\r\n\t\t\tpepMap.put(pepStr, mzidPeptide);\r\n\t\t\tmzidPeptide.setId(Constants.pepIDPrefix+pepMap.size());\r\n\t\t\tpeptideList.add(mzidPeptide);\r\n\t\t}\r\n\t\t\r\n\t\treturn mzidPeptide;\r\n\t}",
"@Override\n\tpublic void visit(Matches arg0) {\n\n\t}",
"public boolean canEditSnippet(Session session, Snippet snippet);",
"private Review mapReview(final Record reviewRecord) {\n return new Review(\n reviewRecord.get(\"summary\").asString(),\n reviewRecord.get(\"rating\").asDouble()\n );\n }",
"public String getMatchName() {\r\n\t\treturn mMatchName;\r\n\t}",
"interface Matcher<R extends OWLPropertyRange, F extends R, P extends OWLPropertyExpression<R, P>> {\n boolean isMatch(OWLClassExpression c, P p, R f);\n\n boolean isMatch(OWLClassExpression c, P p, R f, boolean direct);\n\n /** Perform a recursive search, adding nodes that match. If direct is true\n * only add nodes if they have no subs that match\n * \n * @param c\n * class\n * @param p\n * property\n * @param start\n * start\n * @param direct\n * direct\n * @return set of leave nodes */\n NodeSet<F> getLeaves(OWLClassExpression c, P p, R start, boolean direct);\n\n /** Perform a search on the direct subs of start, adding nodes that match. If\n * direct is false then recurse into descendants of start\n * \n * @param c\n * class\n * @param p\n * property\n * @param start\n * start\n * @param direct\n * direct\n * @return set of root nodes */\n NodeSet<F> getRoots(OWLClassExpression c, P p, R start, boolean direct);\n}",
"private void assertSyntax(String snippet) {\n try {\n Lexer lexer = new Lexer(new StringReader(snippet));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n assertNotNull(node);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }",
"boolean isMatch();",
"@Override\n public String parseMatch(InputStream inputStream) {\n\n Stream<HandBallScorePoints> stream = handBallParser.parseHandBallScorePointsStream(\n new BufferedReader(new InputStreamReader(Objects.requireNonNull(inputStream))));\n\n List<HandBallScorePoints> handBallScorePointsList = stream.collect(Collectors.toList());\n\n return this.calculateMatchPoints(handBallScorePointsList);\n }",
"@Override\n\tpublic void visit(Matches arg0) {\n\t\t\n\t}",
"public PlayerMatches(String player1) {\n this.player1 = player1;\n }",
"public void setMatches() {\r\n this.matches++;\r\n\r\n }",
"public ArrayList<Shout> getMatches(Pattern pattern, String text) {\r\n\t\tArrayList<Shout> matches = new ArrayList<Shout>();\r\n\t\tMatcher m = pattern.matcher(text);\r\n//\t\tint match= 0;\r\n\t\twhile(m.find()){\r\n//\t\t\tLog.i(\"FUCKING WORK\", \"a: \" + m.start());\r\n\t\t\tmatches.add(new Shout(Integer.parseInt(m.group(1)), m.group(2), m.group(3)));\r\n//\t\t\tmatch++;\r\n\t\t}\r\n\t\treturn matches;\r\n\t}",
"public static String prettyPrintMatch(IStrategoTerm match) {\n return prettyPrintMatch(match, new StringBuilder()).toString();\n }",
"@Override\n public String toString() {\n return \"QueryMatchIterator{\" +\n \"log=\" + log +\n \", queryService=\" + queryService +\n \", totalResults=\" + totalResults +\n \", step=\" + step +\n \", results=\" + results +\n \", totalOffset=\" + totalOffset +\n \", matchesOffset=\" + matchesOffset +\n '}';\n }",
"public int getSnippetHandle() {\n\t\treturn snippetHandle;\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,sound_cache);\r\n\t\t\t\t\t\t\t\t\t\t}",
"public static Snippet getFromXMLElement(Element item, Language lang) {\n // Get the name, data and description from their individual tags\n String name = item.getElementsByTagName(\"name\").item(0).getTextContent();\n String data = item.getElementsByTagName(\"data\").item(0).getTextContent().trim();\n String description = item.getElementsByTagName(\"description\").item(0).getTextContent();\n\n // The keywords are comma separated. Split them and add them to a set\n String[] keywordsString = item.getElementsByTagName(\"keywords\").item(0).getTextContent().split(\",\");\n for (int i = 0; i < keywordsString.length; i++) {\n keywordsString[i] = keywordsString[i].trim().toLowerCase();\n }\n Set<String> keywords = new HashSet<String>(Arrays.asList(keywordsString));\n // Return this snippet from the data collected from the xml element\n return new Snippet(name, data, description, keywords, lang);\n }",
"private DynamicObject getMatchResult(TruffleObject result, String inputStr) {\n return JSArray.createLazyRegexArray(context, regexResultAccessor.groupCount(result), result, inputStr);\n }",
"public IMatches match(IFrame query) {\n\n\t\treturn processMatches(query, coreMatcher.match(preProcessQuery(query)));\n\t}",
"public final EObject ruleMatch() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_2=null;\r\n Enumerator lv_type_3_0 = null;\r\n\r\n AntlrDatatypeRuleToken lv_loserWins_4_0 = null;\r\n\r\n\r\n\r\n \tenterRule();\r\n\r\n try {\r\n // InternalEsportDsl.g:1639:2: ( ( () otherlv_1= 'Match' otherlv_2= ':' ( (lv_type_3_0= ruleMatchType ) ) ( (lv_loserWins_4_0= ruleEInt ) ) ( ( ruleEString ) ) ( ( ruleEString ) ) ) )\r\n // InternalEsportDsl.g:1640:2: ( () otherlv_1= 'Match' otherlv_2= ':' ( (lv_type_3_0= ruleMatchType ) ) ( (lv_loserWins_4_0= ruleEInt ) ) ( ( ruleEString ) ) ( ( ruleEString ) ) )\r\n {\r\n // InternalEsportDsl.g:1640:2: ( () otherlv_1= 'Match' otherlv_2= ':' ( (lv_type_3_0= ruleMatchType ) ) ( (lv_loserWins_4_0= ruleEInt ) ) ( ( ruleEString ) ) ( ( ruleEString ) ) )\r\n // InternalEsportDsl.g:1641:3: () otherlv_1= 'Match' otherlv_2= ':' ( (lv_type_3_0= ruleMatchType ) ) ( (lv_loserWins_4_0= ruleEInt ) ) ( ( ruleEString ) ) ( ( ruleEString ) )\r\n {\r\n // InternalEsportDsl.g:1641:3: ()\r\n // InternalEsportDsl.g:1642:4: \r\n {\r\n\r\n \t\t\t\tcurrent = forceCreateModelElement(\r\n \t\t\t\t\tgrammarAccess.getMatchAccess().getMatchAction_0(),\r\n \t\t\t\t\tcurrent);\r\n \t\t\t\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,27,FOLLOW_5); \r\n\r\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getMatchAccess().getMatchKeyword_1());\r\n \t\t\r\n otherlv_2=(Token)match(input,12,FOLLOW_29); \r\n\r\n \t\t\tnewLeafNode(otherlv_2, grammarAccess.getMatchAccess().getColonKeyword_2());\r\n \t\t\r\n // InternalEsportDsl.g:1656:3: ( (lv_type_3_0= ruleMatchType ) )\r\n // InternalEsportDsl.g:1657:4: (lv_type_3_0= ruleMatchType )\r\n {\r\n // InternalEsportDsl.g:1657:4: (lv_type_3_0= ruleMatchType )\r\n // InternalEsportDsl.g:1658:5: lv_type_3_0= ruleMatchType\r\n {\r\n\r\n \t\t\t\t\tnewCompositeNode(grammarAccess.getMatchAccess().getTypeMatchTypeEnumRuleCall_3_0());\r\n \t\t\t\t\r\n pushFollow(FOLLOW_11);\r\n lv_type_3_0=ruleMatchType();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getMatchRule());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tset(\r\n \t\t\t\t\t\tcurrent,\r\n \t\t\t\t\t\t\"type\",\r\n \t\t\t\t\t\tlv_type_3_0,\r\n \t\t\t\t\t\t\"org.xtext.example.mydsl1.EsportDsl.MatchType\");\r\n \t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // InternalEsportDsl.g:1675:3: ( (lv_loserWins_4_0= ruleEInt ) )\r\n // InternalEsportDsl.g:1676:4: (lv_loserWins_4_0= ruleEInt )\r\n {\r\n // InternalEsportDsl.g:1676:4: (lv_loserWins_4_0= ruleEInt )\r\n // InternalEsportDsl.g:1677:5: lv_loserWins_4_0= ruleEInt\r\n {\r\n\r\n \t\t\t\t\tnewCompositeNode(grammarAccess.getMatchAccess().getLoserWinsEIntParserRuleCall_4_0());\r\n \t\t\t\t\r\n pushFollow(FOLLOW_4);\r\n lv_loserWins_4_0=ruleEInt();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getMatchRule());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tset(\r\n \t\t\t\t\t\tcurrent,\r\n \t\t\t\t\t\t\"loserWins\",\r\n \t\t\t\t\t\tlv_loserWins_4_0,\r\n \t\t\t\t\t\t\"org.xtext.example.mydsl1.EsportDsl.EInt\");\r\n \t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // InternalEsportDsl.g:1694:3: ( ( ruleEString ) )\r\n // InternalEsportDsl.g:1695:4: ( ruleEString )\r\n {\r\n // InternalEsportDsl.g:1695:4: ( ruleEString )\r\n // InternalEsportDsl.g:1696:5: ruleEString\r\n {\r\n\r\n \t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getMatchRule());\r\n \t\t\t\t\t}\r\n \t\t\t\t\r\n\r\n \t\t\t\t\tnewCompositeNode(grammarAccess.getMatchAccess().getTeamWinnerTeamCrossReference_5_0());\r\n \t\t\t\t\r\n pushFollow(FOLLOW_4);\r\n ruleEString();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // InternalEsportDsl.g:1710:3: ( ( ruleEString ) )\r\n // InternalEsportDsl.g:1711:4: ( ruleEString )\r\n {\r\n // InternalEsportDsl.g:1711:4: ( ruleEString )\r\n // InternalEsportDsl.g:1712:5: ruleEString\r\n {\r\n\r\n \t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getMatchRule());\r\n \t\t\t\t\t}\r\n \t\t\t\t\r\n\r\n \t\t\t\t\tnewCompositeNode(grammarAccess.getMatchAccess().getTeamLoserTeamCrossReference_6_0());\r\n \t\t\t\t\r\n pushFollow(FOLLOW_2);\r\n ruleEString();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n \tleaveRule();\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }",
"public void setRegexMatch(java.lang.Short regexMatch) {\r\n this.regexMatch = regexMatch;\r\n }",
"public String verifyTextByUsingpartialLink(String object, String data) {\n\t\tlogger.debug(\"Verifying the text\");\n\t\ttry {\n\t\t\tString actual = driver.findElement(By.partialLinkText((OR.getProperty(object)))).getText().trim();\n\t\t\tString expected = data.trim();\n\n\t\t\tlogger.debug(\"data\" + data);\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tif (actual.contains(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- text not verified \" + actual + \" -- \" + expected;\n\t\t} catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}",
"public String findAndSnip(final String pattern,\r\n\t\t\tfinal boolean trim, final boolean start) {\r\n\t\treturn findAndSnip(Pattern.compile(Argument.notNull(pattern, \"pattern\")), trim, start);\r\n\t}",
"public SoElement\n\t copyMatchInfo()\n\t {\n//\t #ifdef DEBUG\n\t SoDebugError.post(\"SoLazyElement.copyMatchInfo\",\n\t \"Should never be called\\n\");\n//\t #endif\n\t return null;\n\t }",
"public Snippet visit(NewObject n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t String identifier = n.identifier.accept(this, argu).returnTemp;\n\t n.nodeToken1.accept(this, argu);\n\t this.identifierList = new ArrayList<String>(0);\n\t n.nodeOptional.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t \tString toAdd =\"\";\n\t\t\n\t \t\n\t String ret = \"new \" + identifier + \"(\";\n\t\t\tint i = 0;\n\t\t\tfor(String str : identifierList)\n\t\t\t{\n\t\t\t\tif(i==0)\n\t\t\t\t\tret += str;\n\t\t\t\telse\n\t\t\t\t\tret += \", \" + str;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\tif(!classes.containsKey(classToAddToGlobalHash)){\n\t\t\tif(!inAsync){\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=\"myUniquePlacePoint\"+\"\";\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=asyncPoint+\"\";\n\t\t\t}\n\t\t\t}\n\t\t\tret += toAdd+\")\";\n\t\t\t\n\t\t\t\n\t\t\t toAdd =\"\";\n\t\t\tif(identifierToAddToGlobalHash!=\"\"){\n\t\t\t\t//toAdd+= \"if(Prgoram.globalPointerHashMap.containsKey(myUniquePlacePoint)){\\n\";\n\t\t\t\tif(!inAsync){\n\t\t\t\t\t\n\t\t\t\t\ttoAdd+=\"\\nProgram.globalPointerHashMap.get(myUniquePlacePoint).add(\"+identifierToAddToGlobalHash+\".hashCode());\";\n\t\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\ttoAdd+=\"\\nProgram.globalPointerHashMap.get(asyncPoint).add(\"+identifierToAddToGlobalHash+\".hashCode());\";\n\t\t\t\t}\n\t\t\t\t//toAdd+=\"\\nelse{throw new RuntimeException(\\\"Object in wrong place\\\");\\n }\";\n\t\t\t}\n\t\t\t\n\t\t\tSnippet myRet = new Snippet(\"\", ret, new X10Class(identifier), false);\n\t\t\tmyRet.postface += toAdd;\n\t\t\treturn myRet;\n\n\t }",
"public void step2(String theHTML)\n {\n this.messageReceiver2.receiveMessage(targetKeyWords+\":initializing the pattern matcher.....\\n\");\n\t patternMatcher=new PatternMatcher();\n\t\tpatternMatcher.output=messageArea;\n//\t\tpatternMatcher.init(theHTML,\".:;<> !#$%&()=^+*/\\\"@[]{}\\n\\r\");\n\t\tpatternMatcher.init(theHTML);\n\t\tthis.tokens=patternMatcher.getTokens();\n\t\tint i;\n\t\tint l=patternMatcher.sequenceLength;\n//\t\tresultArea.setText(\"contents of this page was tokenized.\\n\");\n }",
"private void printHtmlFragment(MessageBroker msgBroker,\r\n PrintWriter writer,\r\n SearchResultRecord record) throws SearchException {\r\n RecordSnippetWriter snippetWriter = new RecordSnippetWriter(msgBroker, writer);\r\n snippetWriter.setShowTitle(true);\r\n snippetWriter.setShowIcon(true);\r\n snippetWriter.setClipText(true);\r\n snippetWriter.write(record);\r\n}",
"public T casePatternStatement(PatternStatement object) {\n\t\treturn null;\n\t}",
"public java.util.List<PartialMatch> getPartialMatches() {\n return partialMatches;\n }",
"float getMatch();",
"TemplateSubPatternAssociation(ElemTemplate template, StepPattern pattern, String pat) {\n/* 64 */ this.m_pattern = pat;\n/* 65 */ this.m_template = template;\n/* 66 */ this.m_stepPattern = pattern;\n/* 67 */ this.m_targetString = this.m_stepPattern.getTargetString();\n/* 68 */ this.m_wild = this.m_targetString.equals(\"*\");\n/* */ }",
"@Override\n\tprotected void execute(CommandEvent event) {\n\t\tString args = event.getArgs();\n\n\t\t//find the snippet\n\t\tSnippet snippet = SnippetsMorphiaConnection.getDatastore()\n\t\t\t\t.find(Snippet.class) //use the snippets collection\n\t\t\t\t.filter(Filters.eq(\"_id\", args)) //filter so that its only the ones with the correct\n\t\t\t\t.iterator(new FindOptions()\n\t\t\t\t\t\t.limit(1)) //limit to one item\n\t\t\t\t.tryNext(); //get that item\n\n\t\tif (snippet != null) {\n\t\t//print that item\n\t\tevent.reply(snippet.asReply());\n\t\t\n\t\tsnippet.incUses();\n\t\tSnippetsMorphiaConnection.getDatastore().save(snippet);\n\t\t\n\t\t} else {\n\t\t\tevent.reply(\"There exists no snippet with this name\");\n\t\t}\n\t}",
"@Then(\"^User should see review text correctly \\\"([^\\\"]*)\\\"$\")\n\tpublic void user_should_see_review_text_correctly(String reviewmsg) throws Throwable {\n\t\tprofilepage.verifyreviewmessage(reviewmsg);\n\t}",
"void updateMatcher() {\r\n int begin = getPosition();\r\n int end = getText().length();\r\n // System.out.println(begin + \",\" + end);\r\n matcher.reset(getText());\r\n matcher.region(begin, end);\r\n }",
"public abstract Object findPropertyMatchedChild(Object obj, String property, String bench, boolean exactMatch)\n\t throws SAFSObjectNotFoundException;",
"void onMatched(String json);",
"public void setMatched(boolean matched) {\r\n this.matched = matched;\r\n }",
"public boolean containsLiteral(Object literalData);",
"@Test(timeout = 4000)\n public void test119() throws Throwable {\n Object object0 = new Object();\n String string0 = SQLUtil.substituteMarkers(\"OGW_]lsIvSlrZ\", \"<_2\", object0);\n assertEquals(\"OGW_]lsIvSlrZ\", string0);\n }",
"public boolean getMatch() {\n\t\treturn false;\n\t}",
"public abstract List<LocationDto> match_type(SlotDto slot);",
"public T caseLatchedStatement(LatchedStatement object) {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void phraseGrepTest1() throws Exception {\n\t\t// phrase is \"I am forced\"\n\t\tHashSet<String> grepFound = loadGrepResults(\"i+am+forced\");\n\t\tCollection<Page> index = queryTest.query(\"\\\"I am Forced\\\"\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}",
"public static void showMatches(String text, String regex) {\n\t\t// create regex and matcher\n\t\tPattern pattern = Pattern.compile(regex);\n\t\tMatcher matcher = pattern.matcher(text);\n\n\t\t// character array to show where matches are located\n\t\tchar fill = '_';\n\t\tchar[] region = new char[text.length()];\n\t\tArrays.fill(region, fill);\n\n\t\t// used to track current match\n\t\tint index = 0;\n\t\tint count = 0;\n\n\t\t// keep going while found a match in text\n\t\twhile (index < text.length() && matcher.find(index)) {\n\t\t\t// converts count to a character\n\t\t\t// will loop through 0-9 and then A-Z as necessary\n\t\t\tfill = Character.forDigit(count % 36, 36);\n\t\t\tfill = Character.toUpperCase(fill);\n\n\t\t\t// indicate region matched\n\t\t\tArrays.fill(region, matcher.start(), matcher.end(), fill);\n\n\t\t\t// test if matched empty string\n\t\t\tif (matcher.start() == matcher.end()) {\n\t\t\t\t// indicate empty string at location was matched\n\t\t\t\tregion[matcher.start()] = '\\u2024';\n\n\t\t\t\t// move to next position to avoid infinite loop\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// otherwise start looking at end of last match\n\t\t\t\tindex = matcher.end();\n\t\t\t}\n\n\t\t\t// increment count\n\t\t\tcount++;\n\t\t}\n\n\t\t// print original string and matching regions\n\t\tconsole.println(text);\n\t\tconsole.println(region);\n\t}",
"boolean score(String lineItemId, Score score);"
] | [
"0.541383",
"0.4898112",
"0.48102844",
"0.4665504",
"0.4646794",
"0.46387935",
"0.45105392",
"0.4476367",
"0.443839",
"0.44315028",
"0.44099307",
"0.4401427",
"0.43922696",
"0.43302485",
"0.43297035",
"0.430586",
"0.42558149",
"0.42458948",
"0.42198697",
"0.4197188",
"0.4168073",
"0.4143186",
"0.41376048",
"0.4131638",
"0.41218427",
"0.41012615",
"0.40965527",
"0.40941873",
"0.40726942",
"0.4063662",
"0.40580958",
"0.40554023",
"0.40467528",
"0.4037784",
"0.40152478",
"0.4013202",
"0.40052676",
"0.39908418",
"0.39722183",
"0.39665508",
"0.3926882",
"0.39267933",
"0.39227456",
"0.38939703",
"0.38934648",
"0.38779137",
"0.38542455",
"0.38535255",
"0.38472995",
"0.3844504",
"0.3841239",
"0.38230217",
"0.38112226",
"0.3809821",
"0.37940097",
"0.3791133",
"0.37817195",
"0.3781183",
"0.37788868",
"0.3776643",
"0.37744012",
"0.3774289",
"0.37726796",
"0.3767684",
"0.37620562",
"0.3757128",
"0.3755839",
"0.37525052",
"0.37498346",
"0.37469402",
"0.37427413",
"0.37406787",
"0.37335038",
"0.37302744",
"0.37214047",
"0.37207875",
"0.37181592",
"0.37152278",
"0.37142625",
"0.3708165",
"0.37078905",
"0.3707649",
"0.36997703",
"0.36971384",
"0.3696401",
"0.36957267",
"0.36926296",
"0.3689491",
"0.36888272",
"0.36859784",
"0.36845738",
"0.36754626",
"0.3675444",
"0.36695462",
"0.3663131",
"0.3661637",
"0.36585888",
"0.3650814",
"0.36418992",
"0.36402205"
] | 0.74214244 | 0 |
Identifies whether this run of text in the snippet matches the search criteria or not. If the text matches the criteria, it will be highlighted. | boolean isHighlighted(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface MatchSnippet {\n /**\n * Identifies whether this run of text in the snippet matches the search criteria or not.\n *\n * If the text matches the criteria, it will be highlighted.\n *\n * @return The hightlight value.\n */\n boolean isHighlighted();\n\n /**\n * Returns the string value of the run of text in this part of the snippet.\n * @return The text string.\n */\n String getText();\n}",
"private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n //TestInfo.testWriteLn(\"Plain Text: \" + text);\n text = processEscapeChars(text);\n //TestInfo.testWriteLn(\"Escape Text: \" + text);\n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }",
"public boolean getHighlight();",
"public boolean matches(String query, String text) {\n\t\treturn text.contains(query);\n\t}",
"private void doTestStyleWhenSelectionIsInsideText()\n {\n String text = \"123\";\n rta.setHTML(text);\n\n Range range = ((Document) rta.getDocument()).createRange();\n range.setStart(getBody().getFirstChild(), 1);\n range.setEnd(getBody().getFirstChild(), 2);\n select(range);\n\n assertFalse(executable.isExecuted());\n assertTrue(executable.execute(null));\n assertTrue(executable.isExecuted());\n assertEquals(\"1<em>2</em>3\", rta.getHTML().toLowerCase());\n assertTrue(executable.execute(null));\n assertFalse(executable.isExecuted());\n assertEquals(text, rta.getHTML().toLowerCase());\n }",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n String turnToString2 = txt_search.getText();\n\n try {\n\n if(begSearch != -1){\n txt_area.setCaretPosition(begSearch);\n begSearch = txt_area.getText().indexOf(turnToString2,begSearch);\n lbl_search_res.setText(\"\");\n }\n if(begSearch != -1){\n txt_area.getHighlighter().addHighlight(begSearch,begSearch + turnToString2.length(),new DefaultHighlighter.DefaultHighlightPainter(Color.yellow));\n }\n else if (begSearch <= txt_area.getText().length() && begSearch >= 0){\n txt_area.getHighlighter().addHighlight(begSearch,begSearch + turnToString2.length(),new DefaultHighlighter.DefaultHighlightPainter(Color.yellow));\n }\n if(begSearch == -1){\n lbl_search_res.setText(\"Can not found.\");\n }\n begSearch = begSearch + 1;\n\n //System.out.print(\" \"+begSearch);\n\n }\n catch (BadLocationException ex) {\n begSearch = -1;\n }\n\n }",
"public Boolean checkTextPresentInPage(String searchFor){\n waitForPageToLoad();\n return super.checkTextPresentInPage(searchFor);\n }",
"public boolean isTextPresent(final String textPattern);",
"public void run(){\n // If there is not word to recognized or the word is empty then do not recognize it\n if(word == null || word.trim().isEmpty()){\n return;\n }\n\n // Set up the highlighter\n DefaultHighlighter.DefaultHighlightPainter highLighter = FileUtils.getInstance().getHighlighter();\n\n // Highlight words at the exact position\n try{\n textPane.getHighlighter().addHighlight(startPosition, endPosition, highLighter);\n }catch(Exception e){\n e.printStackTrace();\n }\n }",
"public Boolean compare(Highlight theOtherHighlight){\n return myText.equals(theOtherHighlight.getText());\n }",
"private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }",
"private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }",
"private boolean shouldBeHighlighted(Object annotationType) {\n \t\treturn contains(annotationType, fAllowedHighlightAnnotationTypes, fConfiguredHighlightAnnotationTypes);\n \t}",
"public boolean isHighlight() {\r\n\t\treturn _highlight;\r\n\t}",
"boolean hasText();",
"boolean hasText();",
"boolean hasText();",
"boolean hasText();",
"public static String highlightMatchedStrIfFound(String qry, String target, String selector, String cssClass) {\n\n\t\tString kw = \"\";\n\n\t\ttry {\n\t\t\tkw = URLDecoder.decode(qry, \"UTF-8\");\n\t\t\t//System.out.println(\"kw decoded: \"+ kw);\n\t\t}\n\t\tcatch( Exception e){\n\t\t\tSystem.out.println(\"Failed to decode \" + qry);\n\t\t}\n\n\t\tif ( qry.equals(\"*:*\") ) {\n\t\t\treturn target;\n\t\t}\n\t\telse if ( kw.startsWith(\"\\\"\") && kw.endsWith(\"\\\"\") ) {\n\t\t\t// exact phrase search - with double quotes\n\t\t\tkw = kw.replace(\"\\\"\", \"\")\n\t\t\t\t .replace(\"(\", \"\\\\(\")\n\t\t\t\t .replace(\")\", \"\\\\)\");\n\t\t}\n//\t\telse {\n//\t\t\t// non phrase search - split string into words and search using OR\n//\t\t\t// very loose match not using boundry: ie, matches anywhere in string -> less specificity\n//\n//\t\t\tStringBuffer patBuff = new StringBuffer();\n//\t\t\tint count = 0;\n//\t\t\tfor ( String s : kw.split(\" |,\") ){\n//\t\t\t\tcount++;\n//\t\t\t\tif ( count != kw.split(\" \").length ){\n//\t\t\t\t\tpatBuff.append(s+\"|\");\n//\t\t\t\t}\n//\t\t\t\telse {\n//\t\t\t\t\tpatBuff.append(s);\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tkw = patBuff.toString();\n//\t\t}\n\n\t\tkw = kw.replace(\"*\",\"\")\n\t\t\t\t.replace(\"+\", \"\\\\+\");\n\n\t\t//working pattern: vang\\-like|2|\\\\(van|gogh,|Drosophila\\\\)\n\n\t\t// (?im) at the beginning of the regex turns on CASE_INSENSITIVE and MULTILINE modes.\n\t\t// $0 in the replacement string is a placeholder whatever the regex matched in this iteration.\n\t\ttarget = target.replaceAll(\"<(.+)>\", \"<sup>$1</sup>\");\n\n\t\tString result = target.replaceAll(\"(?im)\"+kw, \"<\" + selector + \" class='\" + cssClass + \"'>$0\" + \"</\" + selector + \">\");\n\t\treturn result;\n\t}",
"public String verifyTextUsingContains(String object, String data) {\n\t\tlogger.debug(\"Verifying the text\");\n\t\ttry {\n\n\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\tString actual = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getText().trim();\n\t\t\tString expected = data.trim();\n\n\t\t\tlogger.debug(\"data\" + data);\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tif (actual.contains(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- text not verified \" + actual + \" -- \" + expected;\n\t\t}\n\t\tcatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}",
"private void doTestStyleWhenCaretIsInsideText()\n {\n rta.setHTML(\"ac\");\n\n Range range = ((Document) rta.getDocument()).createRange();\n range.setStart(getBody().getFirstChild(), 1);\n range.collapse(true);\n select(range);\n\n assertFalse(executable.isExecuted());\n assertTrue(executable.execute(null));\n assertTrue(executable.isExecuted());\n insertHTML(\"b\");\n assertTrue(executable.isExecuted());\n assertEquals(\"a<em>b</em>c\", rta.getHTML().toLowerCase());\n assertTrue(executable.execute(null));\n assertFalse(executable.isExecuted());\n assertEquals(\"a<em></em>b<em></em>c\", rta.getHTML().toLowerCase());\n }",
"final void checkMatch(String input,String url,String title)\r\n {\r\n String searchLine=removeHTMLTags(input); // remove html tags before search.\r\n // If the line contains non - HTML text then search it.\r\n\tif(searchLine.length()>0)\r\n\t{\r\n\t if(app.matchCase) // Check if case sensitive search\r\n\t {\r\n\t if(app.matchWord) // Check if attempting to match whole word\r\n\t\t{\r\n\t\t if(searchLine.indexOf(\" \"+textToFind+\" \")!=-1 ||\r\n \t\t (searchLine.indexOf(textToFind)!=-1 && searchLine.length()==textToFind.length()) ||\r\n\t\t\t\t searchLine.indexOf(\" \"+textToFind)!=-1 && textToFind.charAt(textToFind.length()-1)==\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t searchLine.charAt(searchLine.length()-1))\r\n\t\t {\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\t\r\n\t\t }\r\n\t\t}\r\n\t\telse if(searchLine.indexOf(textToFind)!=-1)\r\n\t\t{\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t else\r\n\t {\r\n\t String lower1=searchLine.toLowerCase();\r\n\t\tString lower2=textToFind.toLowerCase();\r\n\t\t// Check if attempting to match the whole word.\r\n\t\tif(app.matchWord)\r\n\t\t{\r\n\t\t if(lower1.indexOf(\" \"+lower2+\" \")!=-1 || \r\n\t\t (lower1.indexOf(lower2)!=-1 && lower1.length()== lower2.length()) ||\r\n\t\t\t (lower1.indexOf(\" \"+lower2)!=-1 && lower2.charAt(lower2.length()-1) == \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t lower1.charAt(lower1.length()-1)))\r\n {\r\n\t\t // Found it display the match\r\n\t\t\tapp.addToList(url,searchLine,title);\r\n\t\t\thitsFound++;\r\n\t\t }\r\n\t\t}\r\n\t\telse if(lower1.indexOf(lower2)!=-1)\r\n\t\t{\r\n\t\t // Found it! Display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t}\r\n }",
"@Override\n public void run() {\n\t\t\t\t\ttable.getDisplay().timerExec(100, new Runnable() {\n\t\t\t\t\t\t@Override\n public void run() {\n//\t\t\t\t\t\t\tfindText.setBackground(PropertyChangeListener.getColor(found == null && matchCount == 0 ? new RGB(255, 0, 0) : new RGB(255, 255, 255)));\n\t\t\t\t\t\t\tif (!wrapped)\n\t\t\t\t\t\t\t\thexEditor.getEditorSite().getActionBars().getStatusLineManager().setMessage(found == null && matchCount == 0 ? Messages.HexEditorControl_7 : matchCount > 0 ? Messages.HexEditorControl_8 + matchCount + Messages.HexEditorControl_9 : null);\n\t\t\t\t\t\t\tupdateStatusPanel();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}",
"public void testStyleWhenSelectionIsInsideText()\n {\n deferTest(new Command()\n {\n public void execute()\n {\n doTestStyleWhenSelectionIsInsideText();\n }\n });\n }",
"abstract void nameHighlight(Spannable name, String matchStr, int color,\r\n int text_color);",
"public boolean containsText(CharSequence s) {\n return content.toString().contains(s);\n }",
"private boolean isContain(String fullText, String searchString) {\n String pattern = \"\\\\b\" + searchString + \"\\\\b\";\n Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE); //make the keyword case insensitive\n Matcher m = p.matcher(fullText);\n return m.find();\n }",
"public void contains(WebDriver driver, String text) {\r\n double start = System.currentTimeMillis();\r\n double res = (System.currentTimeMillis() - start) / 1000;\r\n String result = String.valueOf(res);\r\n if (driver.getPageSource().contains(text)) {\r\n log = \"+\";\r\n PASSED_TEST++;\r\n } else {\r\n log = \"!\";\r\n FAILED_TEST++;\r\n }\r\n resultSource = log + \" [checkPageContains \\\"\" + driver.getPageSource().contains(text) + \"\\\"]\" + \" \" + result + \"\\n\";\r\n resTime += res;\r\n countTESTS++;\r\n }",
"private String keywordFound(){\r\n\t\tString rtn = \"\";\r\n\t\tString tmp = \"\";\r\n\t\tint carr_pos = getCaretPosition();\r\n\t\t//estract part of text for keyword search\r\n\t\ttry { \r\n\t\tif(carr_pos>50)\r\n\t\t\ttmp = doc.getText(carr_pos-50,50);\r\n\t\telse\r\n\t\t\ttmp = doc.getText(0,carr_pos);\r\n\t\t}catch(BadLocationException a){\r\n\t\t\tSystem.out.println(\"exception\");\r\n\t\t\treturn rtn;\r\n\t\t};\r\n\t\t//Start check\r\n\t\tint i = 0;\r\n\t\tif(tmp.length() >= 2)i = tmp.length()-2;\t\r\n\t\twhile(checkOperator(tmp.charAt(i)) && i > 0){\r\n\t\t\trtn += tmp.charAt(i);\r\n\t\t\ti--;\r\n\t\t}\r\n\t\tif(i == 0)rtn += tmp.charAt(i);\t\t\r\n\t\treturn mirrorString(rtn);\r\n\t}",
"private void highlightString(TextView textView, String input) {\n SpannableString spannableString = new SpannableString(textView.getText());\n//Get the previous spans and remove them\n BackgroundColorSpan[] backgroundSpans = spannableString.getSpans(0, spannableString.length(), BackgroundColorSpan.class);\n\n for (BackgroundColorSpan span : backgroundSpans) {\n spannableString.removeSpan(span);\n }\n\n//Search for all occurrences of the keyword in the string\n int indexOfKeyword = spannableString.toString().indexOf(input);\n\n while (indexOfKeyword > 0) {\n //Create a background color span on the keyword\n spannableString.setSpan(new BackgroundColorSpan(Color.YELLOW), indexOfKeyword, indexOfKeyword + input.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //Get the next index of the keyword\n indexOfKeyword = spannableString.toString().indexOf(input, indexOfKeyword + input.length());\n }\n\n//Set the final text on TextView\n textView.setText(spannableString);\n }",
"public boolean searchForWord(String searchWord)\n {\n // Defensive coding. This method should only be used after a successful crawl.\n if(this.htmlDocument == null)\n {\n System.out.println(\"ERROR! Call crawl() before performing analysis on the document\");\n return false;\n }\n System.out.println(\"Searching for the word \" + searchWord + \"...\");\n String bodyText = this.htmlDocument.body().text();\n return bodyText.toLowerCase().contains(searchWord.toLowerCase());\n }",
"public static void printHighlighted(String text) {\n System.out.println(\"*** \" + text + \" ***\");\n }",
"public SearchResult search(String text, String subText);",
"private HBox createStyledText(String searched, String guess, HBox styledText, boolean isIgnoreCase) {\n int index = (isIgnoreCase ? searched.toLowerCase().indexOf(guess.toLowerCase()) : searched.indexOf(guess));\n if (index >= 0) {\n\n String beginString = searched.substring(0, index);\n String highlightedString = (isIgnoreCase ? searched.substring(index, index + guess.length()) : guess);\n String endString = searched.substring(index + guess.length());\n\n final Text begin = new Text(beginString);\n styledText.getChildren().add(begin);\n\n final Text highlighted = new Text(highlightedString);\n highlighted.getStyleClass().add(HIGHLIGHTED_DROPDOWN_CLASS);\n styledText.getChildren().add(highlighted);\n\n final Text end = new Text(endString);\n end.getStyleClass().add(USUAL_DROPDOWN_CLASS);\n styledText.getChildren().add(end);\n\n } else {\n styledText.getChildren().add(new Text(searched));\n }\n return styledText;\n }",
"public boolean hasText(final String elementLocator, final String textPattern);",
"public int doFindText(String find, boolean caseSensitive) {\n int findPosn = sourceCode.getCaretPosition();\n int nextPosn = 0;\n nextPosn = nextIndex(sourceCode.getText(), find, findPosn, caseSensitive);\n if (nextPosn >= 0) {\n sourceCode.requestFocus(); // guarantees visibility of the blue highlight \n sourceCode.setSelectionStart(nextPosn); // position cursor at word start\n sourceCode.setSelectionEnd(nextPosn + find.length());\n sourceCode.setSelectionStart(nextPosn); // position cursor at word start\n return TEXT_FOUND;\n } else {\n return TEXT_NOT_FOUND;\n }\n }",
"String highlightTerm(String term);",
"private PrinterLabel highlightMatch(PrinterLabel label, Printer printer) {\n\t\t/* Matches array Index Reference:\n\t\t * \n\t\t * 0 = Tension\n\t\t * 1 = Compression\n\t\t * 2 = Impact\n\t\t * 3 = vendor\n\t\t * 4 = Range of Mats.\n\t\t * 5 = Tolerance\n\t\t * 6 = Finish\n\t\t */\n\t\tif(printer.getMatches()[0] > 0)\n\t\t{\n\t\t\tlabel.getTension().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[1] > 0)\n\t\t{\n\t\t\tlabel.getCompression().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[2] > 0)\n\t\t{\n\t\t\tlabel.getImpact().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[3] > 0)\n\t\t{\n\t\t\tlabel.getVendor().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[4] > 0)\n\t\t{\n\t\t\tlabel.getMaterials().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[5] > 0)\n\t\t{\n\t\t\tlabel.getTolerance().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[6] > 0)\n\t\t{\n\t\t\tlabel.getFinish().setForeground(highlight);\n\t\t}\n\t\treturn label;\n\t}",
"public boolean isSearchResultTextPresent() throws IOException{\n\t\treturn getObjectFromSelector(\"SearchResult_text\").isDisplayed();\n\n\t}",
"public String verifyTextinInputUsingContains(String object, String data) {\n\t\tlogger.debug(\"Verifying the text in input box\");\n\t\ttry {\n\t\t\tString actual =wait.until(explicitWaitForElement((By.xpath(OR.getProperty(object))))).getAttribute(OR.getProperty(\"ATTRIBUTE_VALUE\"));\n\t\t\tString expected = data;\n\n\t\t\tif (expected.contains(actual) || (actual.contains(expected))) {\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t} else {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" Not matching \";\n\t\t\t}\n\n\t\t} \n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Unable to find input box \" + e.getMessage();\n\n\t\t}\n\t}",
"public boolean isSimple() {\r\n return this.mTextBackgroundColor == 1 && this.mTextSelectionStart == 0 && this.mTextSelectionEnd == 0 && this.mLineCharOffsets == null && this.mLineBaselines == null && this.mHint == null;\r\n }",
"private void performHighlight() {\n final String wordToHighlight;\n if (autoHighlight && !editor.getSelectionModel().hasSelection()) {\n int currentOffset = editor.getCaretModel().getOffset();\n wordToHighlight = BWACUtils.extractWordFrom(editor.getDocument().getText(), currentOffset);\n } else {\n wordToHighlight = null;\n }\n\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n buildHighlighters(wordToHighlight);\n }\n });\n }",
"public boolean hasText(String s) {\n int n = s.length();\n return right - left == n && content.regionMatches(left, s, 0, n);\n }",
"B highlightExpression(String highlightExpression);",
"private boolean selectionFound(JTextPane pane) {\r\n\t\tfinal int selectionStart = pane.getSelectionStart();\r\n\t\tfinal int selectionEnd = pane.getSelectionEnd();\r\n\t\treturn selectionStart != selectionEnd;\r\n\t}",
"public void testStyleWhenCaretIsInsideText()\n {\n deferTest(new Command()\n {\n public void execute()\n {\n doTestStyleWhenCaretIsInsideText();\n }\n });\n }",
"private void checkTextAnnotation(MGraph g, UriRef textAnnotation, String content) {\n Iterator<Triple> selectedTextIterator = g.filter(textAnnotation,\n Properties.ENHANCER_SELECTED_TEXT, null);\n // check if the selected text is added\n assertTrue(selectedTextIterator.hasNext());\n // test if the selected text is part of the TEXT_TO_TEST\n Resource object = selectedTextIterator.next().getObject();\n assertTrue(object instanceof Literal);\n Literal selectedText = (Literal)object;\n object = null;\n assertTrue(content.indexOf(selectedText.getLexicalForm()) >= 0);\n // test if context is added\n //context not present for Zemanta\n// Iterator<Triple> selectionContextIterator = g.filter(textAnnotation,\n// Properties.ENHANCER_SELECTION_CONTEXT, null);\n// assertTrue(selectionContextIterator.hasNext());\n// // test if the selected text is part of the TEXT_TO_TEST\n// object = selectionContextIterator.next().getObject();\n// assertTrue(object instanceof Literal);\n// assertTrue(content.indexOf(((Literal)object).getLexicalForm()) >= 0);\n// object = null;\n //test start/end if present\n Iterator<Triple> startPosIterator = g.filter(textAnnotation,\n ENHANCER_START, null);\n Iterator<Triple> endPosIterator = g.filter(textAnnotation,\n ENHANCER_END, null);\n //start end is optional, but if start is present, that also end needs to be set\n if(startPosIterator.hasNext()){\n Resource resource = startPosIterator.next().getObject();\n //only a single start position is supported\n assertTrue(!startPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral startPosLiteral = (TypedLiteral) resource;\n resource = null;\n int start = LiteralFactory.getInstance().createObject(Integer.class, startPosLiteral);\n startPosLiteral = null;\n //now get the end\n //end must be defined if start is present\n assertTrue(endPosIterator.hasNext());\n resource = endPosIterator.next().getObject();\n //only a single end position is supported\n assertTrue(!endPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral endPosLiteral = (TypedLiteral) resource;\n resource = null;\n int end = LiteralFactory.getInstance().createObject(Integer.class, endPosLiteral);\n endPosLiteral = null;\n //check for equality of the selected text and the text on the selected position in the content\n //System.out.println(\"TA [\"+start+\"|\"+end+\"]\"+selectedText.getLexicalForm()+\"<->\"+content.substring(start,end));\n assertTrue(content.substring(start, end).equals(selectedText.getLexicalForm()));\n } else {\n //if no start position is present, there must also be no end position defined\n assertTrue(!endPosIterator.hasNext());\n }\n }",
"boolean hasHadithText();",
"boolean matches(String medium, CSSCanvas canvas);",
"public static void StringFinder()\n {\n // String to be scanned to find the pattern.\n String TargetString = \"Find me in me this string me, test me\";\n String SearchExpression_literal = \"me\"; // Default Pattern (RegEx ) group\n\n // Create a Pattern object\n Pattern r = Pattern.compile(SearchExpression_literal);\n // Now create matcher object.\n Matcher m = r.matcher(TargetString);\n\n int SearchFindCounter = 0;\n /**\n * Matcher.find() Returns Boolean for every occurrence found\n */\n if (m.find())\n { \n \t System.out.println(\"Match Found\");\n }\n }",
"protected final void searchForText() {\n Logger.debug(\" - search for text\");\n final String searchText = theSearchEdit.getText().toString();\n\n MultiDaoSearchTask task = new MultiDaoSearchTask() {\n @Override\n protected void onSearchCompleted(List<Object> results) {\n adapter.setData(results);\n }\n\n @Override\n protected int getMinSearchTextLength() {\n return 0;\n }\n };\n task.readDaos.add(crDao);\n task.readDaos.add(monsterDao);\n task.readDaos.add(customMonsterDao);\n task.execute(searchText.toUpperCase());\n }",
"private void search() {\n String result = \"<body bgcolor=\\\"black\\\"> \" +\n \"<font color=\\\"#009933\\\"\";\n gs.setQueryString(txtQueury.getText());\n try {\n gsr = gs.doSearch();\n txtCountRes.setText(\"\" + gsr.getEstimatedTotalResultsCount());\n gsre = gsr.getResultElements();\n\n for (int i = 0; i < gsre.length; i++) {\n if (googleTitle.isSelected()) {\n result +=\n \"<font color=\\\"red\\\"><u><b>Title: </u></b><a href=\\\"\" +\n gsre[i].getURL() + \"\\\">\"\n + gsre[i].getTitle() + \"</a><br>\" +\n \"<br><b>URL: \" +\n gsre[i].getHostName() + gsre[i].getURL() +\n \"</b></font><br>\";\n }\n if (googleSummary.isSelected()) {\n result += \"<u><b>Summary: </u></b>\" +\n gsre[i].getSummary() +\n \"<br>\";\n }\n if (googleSnippet.isSelected()) {\n result += \"<u><b>Snippet: </u></b>\" +\n gsre[i].getSnippet() +\n \"<br>\";\n }\n if (googleHostName.isSelected()) {\n result += \"<u><b>Host: </u></b>\" + gsre[i].getHostName() +\n \"<br>\";\n }\n if (googleDirectoryTitle.isSelected()) {\n result += \"<u><b>Directory Title: </u></b>\" +\n gsre[i].getDirectoryTitle() + \"<br>\";\n }\n if (googleCachedSize.isSelected()) {\n result += \"<u><>Cached Size: </u></b>\" +\n gsre[i].getCachedSize() + \"<br>\";\n }\n result += \"<br>\";\n }\n } catch (GoogleSearchFault e) {\n msg(\"Erreur d'exécution \" + e.getMessage(), \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n\n //affichage de la recherche\n editor.setText(result);\n }",
"@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearchResults(text);\n }",
"public boolean isHighlighted() {\n\t\treturn highlighted;\n\t}",
"private String getHighlightQuery(KeywordSearchQuery query, boolean literal_query, QueryResults queryResults, Content content) {\n if (literal_query) {\n //literal, treat as non-regex, non-term component query\n return constructEscapedSolrQuery(query.getQueryString(), literal_query);\n } else {\n //construct a Solr query using aggregated terms to get highlighting\n //the query is executed later on demand\n if (queryResults.getKeywords().size() == 1) {\n //simple case, no need to process subqueries and do special escaping\n Keyword keyword = queryResults.getKeywords().iterator().next();\n return constructEscapedSolrQuery(keyword.getSearchTerm(), literal_query);\n } else {\n //find terms for this content hit\n List<Keyword> hitTerms = new ArrayList<>();\n for (Keyword keyword : queryResults.getKeywords()) {\n for (KeywordHit hit : queryResults.getResults(keyword)) {\n if (hit.getContent().equals(content)) {\n hitTerms.add(keyword);\n break; //go to next term\n }\n }\n }\n\n StringBuilder highlightQuery = new StringBuilder();\n final int lastTerm = hitTerms.size() - 1;\n int curTerm = 0;\n for (Keyword term : hitTerms) {\n //escape subqueries, MAKE SURE they are not escaped again later\n highlightQuery.append(constructEscapedSolrQuery(term.getSearchTerm(), literal_query));\n if (lastTerm != curTerm) {\n highlightQuery.append(\" \"); //acts as OR ||\n }\n\n ++curTerm;\n }\n return highlightQuery.toString();\n }\n }\n }",
"public String verifyText(String object, String data) {\n\t\tlogger.debug(\"Verifying the text\");\n\t\ttry {\n\t\t\t//System.out.println(\"inside verifyText\");\n\t\t\twaitForPageLoad(driver);\n\t\t\tWebElement ele = wait.until(explicitWaitForElement((By.xpath(OR.getProperty(object)))));\n\t\t\tString actual = ele.getText();\n\t\t\tString expected = data.trim();\n\n\t\t\tlogger.debug(\"data\" + data);\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tif (actual.trim().equals(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- text not verified Actual text = \" + actual + \" -- Expected Text = \" + expected + \" \";\n\t\t} \n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}",
"public static boolean TextTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"TextTest\")) return false;\n if (!nextTokenIs(b, K_TEXT)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, TEXT_TEST, null);\n r = consumeTokens(b, 2, K_TEXT, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public boolean isEvalMatching(final String expression, final String textPattern);",
"boolean hasSearchTermView();",
"public Color getHighlight();",
"public boolean search(String word)\n {\n return true;\n }",
"public boolean search(String word) {\n\t\treturn startsWith(word) && cur.isWord == true;\n\t}",
"public String verifyTextByUsingpartialLink(String object, String data) {\n\t\tlogger.debug(\"Verifying the text\");\n\t\ttry {\n\t\t\tString actual = driver.findElement(By.partialLinkText((OR.getProperty(object)))).getText().trim();\n\t\t\tString expected = data.trim();\n\n\t\t\tlogger.debug(\"data\" + data);\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tif (actual.contains(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- text not verified \" + actual + \" -- \" + expected;\n\t\t} catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}",
"public void search(String quizID) {\n\t\t\n\t\tthis.getChildren().clear(); // empty the result first\n\t\t\n\t\tArrayList<QuizData> quizList = BrowserData.quizList();\n\n\t\tboolean noMatch = true; // true if no match found\n\t\t\n\t\tfor (int i = 0; i < quizList.size(); i++) {\n\t\t\t\n\t\t\tif(quizID.equals(quizList.get(i).getName())) { // if match found: create a snippet for the quiz and show\n\t\t\t\t\n\t\t\t\tthis.getChildren().add(new QuizSnippet(quizList.get(i)));\n\t\t\t\tnoMatch = false;\n\t\t\t\t\n\t\t\t}\n\t\t \n\t\t}\n\n\t\tif(noMatch) { // if no match found: show \"No match found!\"\n\n\t\t\tText noResult = new Text(\"No match found!\");\n\t\t\tnoResult.setFont(new Font(20));\n\t\t\tthis.getChildren().add(noResult);\n\n\t\t}\n\t\t\n\t}",
"public static void highlight(Spannable name, String matchStr, boolean isNumber,\r\n int matchOffset,int color, int text_color) {\r\n if(isNumber) {\r\n numHighlight(name, matchStr, matchOffset, color, text_color);\r\n } else {\r\n getHighlighter(name).nameHighlight(name, matchStr, color, text_color);\r\n }\r\n }",
"public boolean verifyPartialText(WebElement ele, String expectedText) {\n\t\ttry {\r\n\t\t\tif(ele.getText().contains(expectedText)) {\r\n\t\t\t\treportSteps(\"Expected text contains the actualText \"+expectedText,\"pass\");\r\n\t\t\t\treturn true;\r\n\t\t\t}else {\r\n\t\t\t\treportSteps(\"Expected text doesn't contain the actualText \"+expectedText,\"fail\");\r\n\t\t\t}\r\n\t\t} catch (WebDriverException e) {\r\n\t\t\tSystem.out.println(\"Unknown exception occured while verifying the Text\");\r\n\t\t} \r\n\t\treturn false;\r\n\t}",
"public void checkAllHeadlinesContainText(String expectedText){\n List<WebElement> articles = this.articleHeadline.findAll();\n for (WebElement article : articles) {\n Assert.stringContains(\"Title check\", expectedText, article.getText());\n }\n }",
"public InputMethodTextRun(@NamedArg(\"text\") String text,\n @NamedArg(\"highlight\") InputMethodHighlight highlight) {\n this.text = text;\n this.highlight = highlight;\n }",
"public void assertTextPresent ( final String text ) {\n try {\n assertTrue( driver.getPageSource().contains( text ) );\n }\n catch ( final Exception e ) {\n fail();\n }\n }",
"private void search(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.clearEditText(0);\n solo.typeText(0, searchTerm);\n }",
"@Override\n public boolean test(Ingredient ingredient) {\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }",
"@Override\n public boolean test(Ingredient ingredient) {\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }",
"public static boolean searchThroughScreens(String search, TestObject Screen, TopLevelTestObject Frame, boolean pattern) {\r\n\r\n\t\tTerminalHelperMethods th = new TerminalHelperMethods();\r\n\t\tboolean more = false;\r\n\t\t\r\n\t\tif (isStringOnScreen(search, Screen, pattern)) {\r\n\t\t\tSystem.out.println(\"String '\"+search+\"' found on screen.\");\r\n\t\t\treturn true;\r\n\t\t} else if (isStringOnScreen(\"More...\", Screen)) {\r\n\t\t\tmore = true;\r\n\t\t\twhile (more) {\r\n\t\t\t\tFrame.inputKeys(\"{ExtPgDn}\");\r\n\t\t\t\tth.wait(2);\r\n\t\t\t\tif (isStringOnScreen(search, Screen, pattern)) {\r\n\t\t\t\t\tSystem.out.println(\"String '\"+search+\"' found on screen.\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tmore = isStringOnScreen(\"More...\", Screen);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tSystem.out.println(\"String '\"+search+\"' not found on screens.\");\r\n\t\treturn false;\r\n\r\n\t}",
"private boolean searchCondition(String searched, String actual) {\n return actual.toLowerCase().contains(searched.toLowerCase());\n }",
"public static Color getTextHighlightColor() {\n return TEXT_HIGHLIGHT;\n }",
"public void assertTextPresent ( final String text ) {\r\n try {\r\n assertTrue( driver.getPageSource().contains( text ) );\r\n }\r\n catch ( final Exception e ) {\r\n fail();\r\n }\r\n }",
"private void highlightArea(FilterBypass fb, String s, int left, int right) {\n String sub = s.substring(left, right);\n //removeHighlights(fb, s, left, right);\n //String whitespace = new String(\" \\n\\r\");\n //println(\"String to update: '\" + s.substring(left, right) + \"'\");\n\n //Todo: make the code check for whitespace OR eof on either side of the string before highlighting it\n //Further optimisation for large inputs: combine all loops into one, and have an if statement to determine color.\n // ie, if there are 17 keywords that should be red, then check if the index found is <17, and if so, color red.\n\n for(int i = 0; i < all.length; i++) {\n highlightGiven(fb, all[i], sub, left, attributeScheme[i+1]);\n }\n\n //Handles comments and string literals.\n //if (dirtyBounds.size() % 2 == 0) \n try {\n for(int i = 0; i < dirtyBounds.size()-1; i+=2) {\n ((StyledDocument)fb.getDocument()).setCharacterAttributes(dirtyBounds.get(i), dirtyBounds.get(i+1)-dirtyBounds.get(i)+1, attributeScheme[10], true);\n }\n } catch (ArrayIndexOutOfBoundsException a) {}\n }",
"public boolean matches(String keyword) {\n\t\tif (keyword.equals(\"CRTE\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean contains(ClangToken t) {\n\t\treturn highlightsByToken.containsKey(getKey(t));\n\t}",
"@Override\n\tprotected void highlightText(int start, int length) {\n\n\t\tsuper.highlightText(start, length);\n\n\t\ttry {\n\t\t\tint end = this.getLength();\n\n\t\t\tString content = this.getText(0, end);\n\n\t\t\t// TODO :: actually use the start and length passed in as arguments!\n\t\t\t// (currently, they are just being ignored...)\n\t\t\tstart = 0;\n\t\t\tend -= 1;\n\n\t\t\tchar lastDelimiter = ' ';\n\n\t\t\twhile (start <= end) {\n\n\t\t\t\t// while we have a delimiter...\n\t\t\t\tchar curChar = content.charAt(start);\n\t\t\t\twhile (isDelimiter(curChar)) {\n\n\t\t\t\t\tlastDelimiter = curChar;\n\n\t\t\t\t\t// ... check for the start of an object\n\t\t\t\t\tif (curChar == '{') {\n\t\t\t\t\t\tstart = highlightObject(content, start, end);\n\n\t\t\t\t\t// ... check for a comment (which starts with a delimiter)\n\t\t\t\t\t} else if (isCommentStart(content, start, end)) {\n\t\t\t\t\t\tstart = highlightComment(content, start, end);\n\n\t\t\t\t\t// ... and check for a quoted string\n\t\t\t\t\t} else if (isStringDelimiter(content.charAt(start))) {\n\n\t\t\t\t\t\t// then let's get that string!\n\t\t\t\t\t\tboolean singleForMultiline = false;\n\t\t\t\t\t\tboolean threeForMultiline = false;\n\t\t\t\t\t\tstart = highlightString(content, start, end, singleForMultiline, threeForMultiline);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// please highlight the delimiter in the process ;)\n\t\t\t\t\t\tif (!Character.isWhitespace(curChar)) {\n\t\t\t\t\t\t\tthis.setCharacterAttributes(start, 1, attrReservedChar, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (start < end) {\n\n\t\t\t\t\t\t// jump forward and try again!\n\t\t\t\t\t\tstart++;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurChar = content.charAt(start);\n\t\t\t\t}\n\n\t\t\t\t// or any other token instead?\n\t\t\t\tstart = highlightOther(content, start, end, lastDelimiter);\n\t\t\t}\n\n\t\t} catch (BadLocationException e) {\n\t\t\t// oops!\n\t\t}\n\t}",
"public static boolean isStringOnScreen(String searchstring, TestObject Screen) {\r\n\r\n\t\tString screenContents = TerminalLookOps.getScreenTextAsString(Screen);\r\n\t\treturn StringOps.findString(searchstring, screenContents);\r\n\r\n\t}",
"@Test\n\tvoid runRegExFoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"S(a|r|g)*on\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(30, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}",
"boolean is(TextStyle style);",
"private void findClubEvent () {\n \n findClubEvent (\n findButton.getText(), \n findText.getText().trim(), \n true);\n \n if (findText.getText().trim().length() == 0) {\n findText.grabFocus();\n statusBar.setStatus(\"Enter a search string\");\n }\n }",
"@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n }",
"@Test\n public void keywordSearchTest() throws InterruptedException {\n SearchNavigation.gotoSearchResultsPage(index,\"\\\"\"+exact_searchTerm+\"\\\"\");\n System.out.println(AssistanceListingSearchPage.title());\n assertEquals(\"Assistance Title does not match with Search term\",AssistanceListingSearchPage.title(), exact_searchTerm);\n }",
"public static boolean isStringOnScreen(String search, TestObject Screen, boolean pattern) {\r\n\r\n\t\tString screenContents = TerminalLookOps.getScreenTextAsString(Screen);\r\n\t\tif (pattern)\r\n\t\t\treturn StringOps.findPattern(search, screenContents);\r\n\t\telse\r\n\t\t\treturn StringOps.findString(search, screenContents);\r\n\t}",
"public String verifyMouseOverText(String object, String data) {\n\t\tlogger.debug(\"verifying Mouseover text\");\n\t\ttry {\n\n\t\t\tboolean flag = false;\n\t\t\tString actual = \"\";\n\t\t\tactual = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getAttribute(OR.getProperty(\"ATTRIBUTE_TITLE\"));\n\t\t\tlogger.debug(\"data\" + data);\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tif (actual.equals(data)) {\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t\tif (flag)\n\t\t\t\treturn Constants.KEYWORD_PASS + \"--- Mouseover text matched\";\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Mouseover text not verified \" + actual + \" -- \" + data;\n\t\t} catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}",
"public boolean isHighlighted() {\n return _isHighlighted;\n }",
"public String verifyTextNotPresentByUsingContains(String object, String data) {\n\t\tlogger.debug(\"Verifying the text\");\n\t\ttry {\n\t\t\tString actual = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getText().trim();\n\t\t\tString expected = data.trim();\n\n\t\t\tlogger.debug(\"data\" + data);\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tif (actual.contains(expected))\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"text present\";\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_PASS + \"text not present\";\n\t\t} catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}",
"@Test\n public void scrollToItem_checkItsText() {\n onView(ViewMatchers.withId(R.id.recycler_view_recipes_main))\n .perform(RecyclerViewActions.scrollToPosition(ITEM_TO_BE_CHECKED));\n\n // Match the text in an item below the fold and check that it's displayed.\n onView(allOf(isDisplayed(), withText(recipes.get(ITEM_TO_BE_CHECKED).getName())))\n .check(matches(isDisplayed()));\n }",
"public boolean matchesTag(int tag) {\n if (super.matchesTag(tag)) {\n return true;\n }\n if (this.mLayout != null) {\n Spanned text = (Spanned) this.mLayout.getText();\n for (RCTRawText span : (RCTRawText[]) text.getSpans(0, text.length(), RCTRawText.class)) {\n if (span.getReactTag() == tag) {\n return true;\n }\n }\n }\n return false;\n }",
"@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }",
"@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }",
"@Override\n public boolean onQueryTextSubmit(String query) {\n\n for (Layer layer : mMapView.getLayers()) {\n if (layer instanceof FeatureLayer) {\n ((FeatureLayer) layer).setSelectionColor(Color.CYAN);\n QueryParameters queryParameters = new QueryParameters();\n queryParameters.setWhere(\"NAME like '%\" + query + \"%'\");\n ((FeatureLayer) layer).selectFeatures(queryParameters, ArcGISFeatureLayer.SELECTION_METHOD.NEW,null);\n }\n }\n\n\n return true;\n }",
"public static void showMatches(String text, String regex) {\n\t\t// create regex and matcher\n\t\tPattern pattern = Pattern.compile(regex);\n\t\tMatcher matcher = pattern.matcher(text);\n\n\t\t// character array to show where matches are located\n\t\tchar fill = '_';\n\t\tchar[] region = new char[text.length()];\n\t\tArrays.fill(region, fill);\n\n\t\t// used to track current match\n\t\tint index = 0;\n\t\tint count = 0;\n\n\t\t// keep going while found a match in text\n\t\twhile (index < text.length() && matcher.find(index)) {\n\t\t\t// converts count to a character\n\t\t\t// will loop through 0-9 and then A-Z as necessary\n\t\t\tfill = Character.forDigit(count % 36, 36);\n\t\t\tfill = Character.toUpperCase(fill);\n\n\t\t\t// indicate region matched\n\t\t\tArrays.fill(region, matcher.start(), matcher.end(), fill);\n\n\t\t\t// test if matched empty string\n\t\t\tif (matcher.start() == matcher.end()) {\n\t\t\t\t// indicate empty string at location was matched\n\t\t\t\tregion[matcher.start()] = '\\u2024';\n\n\t\t\t\t// move to next position to avoid infinite loop\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// otherwise start looking at end of last match\n\t\t\t\tindex = matcher.end();\n\t\t\t}\n\n\t\t\t// increment count\n\t\t\tcount++;\n\t\t}\n\n\t\t// print original string and matching regions\n\t\tconsole.println(text);\n\t\tconsole.println(region);\n\t}",
"public void setHighlight(boolean shouldHighlight) {\n this.setHighlight(shouldHighlight, Color.web(\"green\"));\n }",
"public void searchFunction() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }",
"@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }",
"private void doTestStyleWhenCaretIsAfterText()\n {\n rta.setHTML(\"e\");\n\n Range range = ((Document) rta.getDocument()).createRange();\n range.setStart(getBody().getFirstChild(), 1);\n range.collapse(true);\n select(range);\n\n assertFalse(executable.isExecuted());\n assertTrue(executable.execute(null));\n assertTrue(executable.isExecuted());\n insertHTML(\"f\");\n assertTrue(executable.isExecuted());\n assertEquals(\"e<em>f</em>\", rta.getHTML().toLowerCase());\n assertTrue(executable.execute(null));\n assertFalse(executable.isExecuted());\n assertEquals(\"e<em></em>f<em></em>\", rta.getHTML().toLowerCase());\n }"
] | [
"0.7041049",
"0.58905995",
"0.57591635",
"0.56870925",
"0.5682178",
"0.5656948",
"0.55641216",
"0.55163825",
"0.5508907",
"0.54488754",
"0.5406365",
"0.5379145",
"0.5369355",
"0.5331497",
"0.53126466",
"0.53126466",
"0.53126466",
"0.53126466",
"0.5298435",
"0.5282603",
"0.52324367",
"0.5219713",
"0.5211598",
"0.5206183",
"0.5182154",
"0.515185",
"0.51441437",
"0.51412535",
"0.5128361",
"0.51256186",
"0.51128685",
"0.51064974",
"0.50979555",
"0.50968015",
"0.5088221",
"0.5070062",
"0.50696784",
"0.5063962",
"0.5052964",
"0.50373906",
"0.5026257",
"0.50187254",
"0.5005652",
"0.49987176",
"0.4991814",
"0.4987149",
"0.4982337",
"0.49553773",
"0.4955214",
"0.49394774",
"0.49355596",
"0.4911917",
"0.49009383",
"0.48928383",
"0.48894656",
"0.48854423",
"0.4873222",
"0.48628765",
"0.48600155",
"0.4836367",
"0.48297364",
"0.48166987",
"0.47885388",
"0.47780412",
"0.47772974",
"0.47746742",
"0.47717267",
"0.4760619",
"0.47535592",
"0.47530028",
"0.474486",
"0.474486",
"0.47442237",
"0.47431225",
"0.47304583",
"0.4726844",
"0.47195488",
"0.4719236",
"0.47084197",
"0.4704906",
"0.4702519",
"0.4699447",
"0.4692617",
"0.46833494",
"0.4679412",
"0.46743888",
"0.46742827",
"0.46729144",
"0.4670212",
"0.46615446",
"0.46512043",
"0.46498474",
"0.46489555",
"0.46489555",
"0.46488696",
"0.46432328",
"0.46429515",
"0.46380526",
"0.46368808",
"0.46273628"
] | 0.516358 | 25 |
Returns the string value of the run of text in this part of the snippet. | String getText(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public P getText() {\n return this.slp.getProduction(text);\n }",
"public String getValue() {\n\t\treturn _text;\n\t}",
"public String getText() {\n\t\t\treturn text.get();\n\t\t}",
"public String getText() {\n return text.getText();\n }",
"public final String getText() {\n\t\treturn text;\n\t}",
"public String getText()\n {\n return (this.text);\n }",
"public java.lang.String getText() {\n return text_;\n }",
"public String getText() {\r\n\t\treturn text;\r\n\t}",
"public String getText() {\r\n\t\treturn text;\r\n\t}",
"public final String getText() {\n return text;\n }",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String text() { return text; }",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText() {\n return codeBuilder != null ? codeBuilder.toString() : \"\";\n }",
"public String getText() {\r\n return text;\r\n }",
"public String getText() {\n\t\treturn this.text;\n\t}",
"public String getText() {\n\t\treturn this.text;\n\t}",
"public String getText() {\r\n return text;\r\n }",
"public String getText() {\r\n return text;\r\n }",
"public synchronized String getText() {\n\t\treturn text;\n\t}",
"public String getText(){\r\n\t\treturn text;\r\n\t}",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText()\r\n {\r\n return this.text;\r\n }",
"public String text() {\n\t\treturn text;\n\t}",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\r\n return this.text;\r\n }",
"public String getTextOnPage()\n {\n return mainText.getText();\n }",
"@objid (\"d03ac21a-47cb-44d2-820d-6136f84aa408\")\r\n public String getText() {\r\n return this.text.getText();\r\n }",
"public String getText () {\r\n\t\treturn (String) getStateHelper().eval(PropertyKeys.text);\r\n\t}",
"public String getText() {\n return myText;\n }",
"public java.lang.String getText() {\n \t\treturn text;\n \t}",
"public String text() // left text\n\t{\n\t\treturn this._data.get(\"text\");\n\t}",
"public String getTextContent() {\n\t\treturn ((TextTypeImpl)_text).getStringValue();\n\t}",
"@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn this.token.getActualTextValue() ;\n\t}",
"public java.lang.String getText() {\n return this.text;\n }",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"public String getTextAsString () {\n\t\tString val = null;\n\t\tif(text!=null) {\n\t\t\tText t = text.getText();\n\t\t\tTextLine[] lines = t.getLines();\n\t\t\t\n\t\t\tif(lines.length >0) {\n\t\t\t\tint endline = lines.length - 1;\n\t\t\t\tTextLine lastline = lines[endline];\n\t\t\t\tif(lastline!= null) {\n\t\t\t\t\tint endOffset = lastline.getLength();\n\t\t\t\t\tTextRange tr = new TextRange(new TextLocation(0,0), new TextLocation(endline,endOffset));\n\t\t\t\t\tval = t.getText(tr);\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\treturn val;\n\t}",
"public String getText() {\n if (text == null) {\n return \"NO TEXT IN MEMORY.\";\n }\n return text.getTextPart();\n }",
"protected Text getText() {\n \t\treturn text;\n \t}",
"public String getText() {\n return mTextContainer.getText();\n }",
"public String getText() {\n return str;\n }",
"public java.lang.String getText() {\n return instance.getText();\n }",
"public String getText() {\n\t\treturn new XWPFWordExtractor(document).getText();\n\t}",
"public String getText() {\n StringBuffer textBuffer = new StringBuffer();\n Object obj;\n int segment;\n for (segment = 0; segment < this.TOTALSEGMENTS; segment++) {\n obj = null;\n Method getter = this.getTextGetter(segment);\n try {\n obj = getter.invoke(this, new Object[] {});\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"That segment doesn't exist.\");\n } catch (InvocationTargetException e) { \n throw new RuntimeException(\"Unable to invoke that method..\");\n }\n \n if (obj != null ) {\n String stringToAppend = (String) obj;\n textBuffer.append (stringToAppend);\n // logger.debug (\"Appending a string of length \" + stringToAppend.length());\n }\n }\n // logger.debug(\"getText returned \" + textBuffer.length() + \"chars.\" );\n return textBuffer.toString();\n }",
"public String getText() {\n return mText;\n }",
"public String getText(){\r\n return text;\r\n }",
"public String text() {\r\n return mText;\r\n }",
"public CharSequence getText() {\r\n return text;\r\n }",
"protected Text getText()\r\n\t{\r\n\t\treturn text;\r\n\t}",
"public String getText() {\n\t\tif (isAdjacentTo!=null) {\r\n\t\t\treturn isAdjacentTo.getText();\r\n\t\t} else {\r\n\t\t\tint commentStartIndex = start-offsetToStartOfCommentTextInFile+taskTag.length();\r\n\t\t\tint commentEndIndex = end-offsetToStartOfCommentTextInFile+1;\r\n\t\t\treturn commentText.substring(commentStartIndex,commentEndIndex).trim();\r\n\t\t}\r\n\t}",
"public String getText() {\n\t\treturn loadingInfo.getInnerText();\n\t}",
"public String getScriptText() {\n return scriptText;\n }",
"public native final String text()/*-{\n\t\treturn this.text();\n\t}-*/;",
"public final String yytext() {\n return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);\n }",
"public String getText() {\n if (!this.a_text.isEnabled())\n return null;\n\n return this.a_text.getText();\n }",
"public String getTextValue() {\r\n return _textValue;\r\n }",
"public String getString() {\n\t\treturn renderResult(this._result).trim();\n\t}",
"public String getText() {\n checkWidget();\n int length = OS.GetWindowTextLength(handle);\n if (length == 0)\n return \"\";\n TCHAR buffer = new TCHAR(getCodePage(), length + 1);\n OS.GetWindowText(handle, buffer, length + 1);\n return buffer.toString(0, length);\n }",
"public final String yytext() {\n\t\treturn new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\n\t}",
"public String text();",
"public String getContent() {\r\n \r\n return text;\r\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }",
"public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }"
] | [
"0.71972156",
"0.71211535",
"0.7120801",
"0.6963888",
"0.69350755",
"0.6927809",
"0.69167805",
"0.69150263",
"0.69150263",
"0.6908401",
"0.69060683",
"0.69060683",
"0.69060683",
"0.69060683",
"0.69060683",
"0.69060683",
"0.69034106",
"0.6893904",
"0.6893904",
"0.6893904",
"0.6891905",
"0.68905807",
"0.6886109",
"0.6886109",
"0.68832636",
"0.68832636",
"0.68715954",
"0.68619275",
"0.68613786",
"0.68613786",
"0.68613786",
"0.68613786",
"0.68613786",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856451",
"0.6856214",
"0.6855413",
"0.68362653",
"0.68362653",
"0.68362653",
"0.68362653",
"0.68362653",
"0.68362653",
"0.6831989",
"0.68163735",
"0.6770766",
"0.67683345",
"0.6740283",
"0.6731245",
"0.67077214",
"0.6704591",
"0.6697303",
"0.6691256",
"0.6685098",
"0.6636709",
"0.6636709",
"0.6636709",
"0.6636709",
"0.6636709",
"0.6636709",
"0.6636709",
"0.6636709",
"0.66268647",
"0.66103727",
"0.6607343",
"0.6598535",
"0.6583582",
"0.65818214",
"0.656695",
"0.6545473",
"0.6526419",
"0.65098983",
"0.6508371",
"0.65032816",
"0.64998776",
"0.64362305",
"0.6435607",
"0.6404256",
"0.639872",
"0.6395482",
"0.6388801",
"0.637988",
"0.6375986",
"0.6365073",
"0.6360648",
"0.6357908",
"0.6354991",
"0.6350697",
"0.6350697",
"0.6350697"
] | 0.0 | -1 |
a) Retornar las calorias totales del plato | @Test
void getDishTotalCalories() throws Exception {
String request = "{\"name\": \"Ensalada\", \"ingredients\": [" +
createIngredient("Calabaza", 100) + "," +
createIngredient("Cebolla", 50) +
"]}";
this.mockMvc.perform(
post("/calculate")
.contentType(MediaType.APPLICATION_JSON)
.content(request))
.andDo(print()).andExpect(status().isOk())
.andExpect(content().string(containsString("47")));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void Calculation() {\n\t\tint calStd = jetztStunde + schlafStunde;\n\t\tint calMin = jetztMinute + schlafMinute;\n\n\t\ttotalMin = calMin % 60;\n\t\ttotalStunde = calStd % 24 + calMin / 60;\n\n\t}",
"private int calcTotalTime() {\n\t\tint time = 0;\n\t\tfor (Taxi taxi : taxis) {\n\t\t\ttime += taxi.calcTotalTime();\n\t\t}\n\t\treturn time;\n\t}",
"public void mostrarTotales() { \n // Inicializacion de los atributos en 0\n totalPCs = 0;\n totalLaptops = 0;\n totalDesktops = 0; \n /* Recorrido de la lista de computadores para acumular el precio usar instanceof para comparar el tipo de computador */ \n for (Computador pc : computadores){\n if (pc instanceof PCLaptop) {\n totalLaptops += pc.calcularPrecio(); \n } else if (pc instanceof PCDesktop){\n totalDesktops += pc.calcularPrecio();\n }\n }\n totalPCs = totalLaptops + totalDesktops;\n System.out.println(\"El precio total de los computadores es de \" + totalPCs); \n System.out.println(\"La suma del precio de los Laptops es de \" + totalLaptops); \n System.out.println(\"La suma del precio de los Desktops es de \" + totalDesktops);\n }",
"public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }",
"public void prinRecaudacion()\n {\n System.out.println(\"La cantidad recaudada por la maquina1 es \" + maquina1.getTotal());\n System.out.println(\"La cantidad recaudada por la maquina2 es \" + maquina2.getTotal());\n System.out.println(\"La cantidad total es\" + ( maquina1.getTotal() + maquina2.getTotal()));\n}",
"public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }",
"public void calcularCost() {\r\n cost = 0;\r\n int a = 0;\r\n try {\r\n String r = DataR.toString()+ \" \" + horaR;\r\n String d = DataD.toString()+ \" \" + horaD;\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n Date dateR = simpleDateFormat.parse(r);\r\n Date dateD = simpleDateFormat.parse(d);\r\n a = (int) ((dateD.getTime() - dateR.getTime())/(1000*3600));\r\n \r\n \r\n } catch (ParseException ex) {\r\n Logger.getLogger(Reserva.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(a > 24) {\r\n cost += 15*(a/(24));\r\n a -= (((int)(a/24))*24);\r\n }\r\n if(a%3600 == 0) {\r\n cost += 1;\r\n }\r\n if(a%3600 > 0) {\r\n cost += 1;\r\n }\r\n \r\n }",
"public static void sueldoTotal(int hora, int sueldo){\n int resultado = 0;\r\n if(hora<=40){\r\n resultado = hora*sueldo;\r\n }\r\n if(hora>40 || hora<48){\r\n resultado = (40*sueldo)+(hora-40)*(sueldo*2);\r\n }\r\n if (hora>=48){\r\n resultado =(40*sueldo)+8*(sueldo*2)+(hora-48)*(sueldo*3);\r\n }\r\n System.out.println(\"El sueldo es de \"+ resultado);//Se muestra el sueldo total\r\n \r\n \r\n \r\n }",
"private static void calcularTotal(String[] campos) {\n\t\tif (campos.length == 1)\n\t\t\tSystem.out.println(\"TOTAL de lugares atribuidos: \" + gestor.totalAtribuidos());\n\t\telse {\n\t\t\tint escalao = Integer.valueOf(campos[1]);\n\t\t\tSystem.out.println(\"TOTAL de lugares atribuidos no escalao \" + escalao + \" : \" + gestor.atribuidosNoEscalao(escalao));\n\t\t}\n\t}",
"double getTotal();",
"private void calcCalories()\n\t{\n\t\tif (getIntensity() == 1)\n\t\t{\n\t\t\tbikeCal = 10 * bikeTime; \n\t\t}\n\t\telse if (getIntensity() == 2)\n\t\t{\n\t\t\tbikeCal = 14.3 * bikeTime; \n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null, \"error\");\n\t\t}\n\t}",
"public double obtener_total(){\r\n double total_ventas = precio*unidades;\r\n return total_ventas;\r\n }",
"float getMonatl_kosten();",
"public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}",
"void total() {\r\n t=m1+m2+m3;\r\n per=t/3;\r\n System.out.println(\"total :\"+t);\r\n System.out.println(\"persentage:\"+per);\r\n \r\n \r\n }",
"public Double darTiempoTotal(){\n\t\treturn tiempoComputacionalGrasp+tiempoComputacionalSetCovering;\n\t}",
"public float totalVentas() {\n float total = 0;\n for (int i = 0; i < posicionActual; i++) {\n total += getValorCompra(i); //Recorre el arreglo y suma toda la informacion el el arreglo de los valores en una variable que luego se retorna \n }\n return total;\n }",
"public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }",
"public int tiempoTotal() {\r\n\r\n\t\tint duracionTotal = 0;\r\n\t\tfor (int i = 0; i < misCanciones.size(); i++) {\r\n\t\t\tduracionTotal = duracionTotal + misCanciones.get(i).getDuracionS();\r\n\t\t}\r\n\t\t\r\n\t\treturn duracionTotal;\r\n\r\n\t}",
"public void caltotaltraveltime()\n {\n \t\n \t switch(this.mLegs.size())\n \t {\n \t case 0:\n \t {\n \t\t this.mTravelTime=0;\n \t\t break;\n \t }\n \t case 1:\n \t { \n \t\t this.mTravelTime=this.mLegs.get(0).flighttime();\n \t\t break;\n \t }\n \t case 2:\n \t {\n \t\t Date arrivalt = this.mLegs.get(1).arrivaldate();\n \t\t Date departt = this.mLegs.get(0).departuredate();\n \t\t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t\t this.mTravelTime=diff;\n \t\t break;\n \t }\n \t case 3:\n \t {\n \t Date arrivalt = this.mLegs.get(2).arrivaldate();\n \t Date departt = this.mLegs.get(0).departuredate();\n \t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t this.mTravelTime=diff;\n \t break;\n \t }\n \t }\n }",
"public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }",
"public final void calcular() {\n long dias = Duration.between(retirada, devolucao).toDays();\n valor = veiculo.getModelo().getCategoria().getDiaria().multiply(new BigDecimal(dias));\n }",
"@Override\n public int calculerPerimetre() {\n return (int)(rayon * 2 * Math.PI);\n }",
"public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }",
"private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }",
"private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}",
"public double getEntreLlegadas() {\r\n return 60.0 / frecuencia;\r\n }",
"@Override\n public double calcularValorCompra(ArrayList<Mueble> muebles){\n double total = 0d;\n for (Mueble m : muebles) {\n total+= m.getCantidad()*m.getPrecio();\n }\n return total; \n }",
"public Double getTotal();",
"public boolean calcularTotal() {\r\n double dou_debe = 0;\r\n double dou_haber = 0;\r\n for (int i = 0; i < tab_tabla2.getTotalFilas(); i++) {\r\n try {\r\n if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_debe)) {\r\n dou_debe += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n } else if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_haber)) {\r\n dou_haber += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n eti_suma_debe.setValue(\"TOTAL DEBE : \" + utilitario.getFormatoNumero(dou_debe));\r\n eti_suma_haber.setValue(\"TOTAL HABER : \" + utilitario.getFormatoNumero(dou_haber));\r\n\r\n double dou_diferencia = Double.parseDouble(utilitario.getFormatoNumero(dou_debe)) - Double.parseDouble(utilitario.getFormatoNumero(dou_haber));\r\n eti_suma_diferencia.setValue(\"DIFERENCIA : \" + utilitario.getFormatoNumero(dou_diferencia));\r\n if (dou_diferencia != 0.0) {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold;color:red\");\r\n } else {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold\");\r\n return true;\r\n }\r\n return false;\r\n }",
"public double calcularPortes() {\n\t\tif (this.pulgadas <= 40) {\n\t\t\tif (this.getPrecioBase() > 500)\n\t\t\t\treturn 0;\n\t\t\telse\n\t\t\t\treturn 35;\n\t\t} else\n\t\t\treturn 35 + (this.pulgadas - 40);\n\t}",
"@Override\n\tpublic double calculaTributos() {\n\t\treturn numeroDePacientes * 10;\n\t}",
"public void recomendarTempos() {\n ArrayList iTXCH = new ArrayList(); /// Instancias pre fusion\n ArrayList iTYCH = new ArrayList();\n ArrayList iTZCH = new ArrayList();\n\n ArrayList cenTXCH = new ArrayList(); /// Centroides Tempos tempos ch\n ArrayList cenTYCH = new ArrayList();\n ArrayList cenTZCH = new ArrayList();\n\n ArrayList cenTXDB = new ArrayList(); /// centroide tempos db\n ArrayList cenTYDB = new ArrayList();\n ArrayList cenTZDB = new ArrayList();\n\n ArrayList insTXCH = new ArrayList(); /// Instancias fusion\n ArrayList insTYCH = new ArrayList();\n ArrayList insTZCH = new ArrayList();\n\n ArrayList ppTXCH = new ArrayList(); /// centroide promedio ponderado tempos\n ArrayList ppTYCH = new ArrayList();\n ArrayList ppTZCH = new ArrayList();\n\n ArrayList ppTXDB = new ArrayList(); /// centroide promedio ponderado duracion\n ArrayList ppTYDB = new ArrayList();\n ArrayList ppTZDB = new ArrayList();\n\n ArrayList paTXCH = new ArrayList(); /// centroide promedio aritmetico tempos ch\n ArrayList paTYCH = new ArrayList();\n ArrayList paTZCH = new ArrayList();\n\n ArrayList paTXDB = new ArrayList(); /// centroide promedio artimetico tempos db\n ArrayList paTYDB = new ArrayList();\n ArrayList paTZDB = new ArrayList();\n\n////////////////// TEMPO EN X ////////////////////////////// \n ////////// calinsky - harabaz /////////\n if (txchs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXCH = CExtraer.arrayTempoXCprueba;\n iTXCH = CExtraer.arrayTempoXIprueba;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXCH.setText(cenTXCH.get(iposision).toString());\n }\n\n if (txchs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n ppTXCH = CFusionar.arregloPPTX1;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n\n System.out.println(iposision);\n\n }\n }\n valorTXCH.setText(ppTXCH.get(iposision).toString());\n }\n\n if (txchs == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n paTXCH = CFusionar.arregloPATX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXCH.setText(paTXCH.get(iposision).toString());\n\n }\n\n //////////// davies bouldin //////////////\n if (txdbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXDB = CExtraer.arrayTempoXCprueba;\n iTXCH = CExtraer.arrayTempoXIprueba;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB.setText(cenTXDB.get(iposision).toString());\n }\n\n if (txdbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n ppTXDB = CFusionar.arregloPPTX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB.setText(ppTXDB.get(iposision).toString());\n }\n if (txdbs == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n paTXDB = CFusionar.arregloPATX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXDB.setText(paTXDB.get(iposision).toString());\n\n }\n\n ///////////// TEMPO EN Y //////////// \n //////////// calinsky - harabaz /////////////\n if (tychs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYCH = CExtraer.arrayTempoYCprueba;\n iTYCH = CExtraer.arrayTempoYIprueba;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYCH.setText(cenTYCH.get(iposision).toString());\n }\n\n if (tychs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n ppTYCH = CFusionar.arregloPPTY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH.setText(ppTYCH.get(iposision).toString());\n\n }\n\n if (tychs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n paTYCH = CFusionar.arregloPATY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH.setText(paTYCH.get(iposision).toString());\n }\n /////////// davies - bouldin /////////////\n if (tydbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYDB = CExtraer.arrayTempoYCprueba;\n iTYCH = CExtraer.arrayTempoYIprueba;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYDB.setText(cenTYDB.get(iposision).toString());\n }\n\n if (tydbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n ppTYDB = CFusionar.arregloPPTY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB.setText(ppTYDB.get(iposision).toString());\n }\n if (tydbs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n paTYDB = CFusionar.arregloPATY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB.setText(paTYDB.get(iposision).toString());\n }\n\n ///////////// TEMPO EN Z //////////// \n ///////////// calinsky harabaz ///////////////////\n if (tzchs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZCH = CExtraer.arrayTempoZCprueba;\n iTZCH = CExtraer.arrayTempoZIprueba;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZCH.setText(cenTZCH.get(iposision).toString());\n }\n\n if (tzchs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n ppTZCH = CFusionar.arregloPPTZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH.setText(ppTZCH.get(iposision).toString());\n }\n if (tzchs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n paTZCH = CFusionar.arregloPATZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH.setText(paTZCH.get(iposision).toString());\n }\n\n ///////////// davies bouldin /////////////////// \n if (tzdbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZDB = CExtraer.arrayTempoZCprueba;\n iTZCH = CExtraer.arrayTempoZIprueba;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZDB.setText(cenTZDB.get(iposision).toString());\n }\n\n if (tzdbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n ppTZDB = CFusionar.arregloPPTZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB.setText(ppTZDB.get(iposision).toString());\n }\n //////////\n if (tzdbs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n paTZDB = CFusionar.arregloPATZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB.setText(paTZDB.get(iposision).toString());\n }\n\n }",
"public Calculadora(){\n this.operador1 = 0.0;\n this.operador2 = 0.0;\n this.resultado = 0.0;\n }",
"public void calcularSalario(){\n // 1% do lucro mensal\n double percentagemLucro = 0.01 * lucroMensal;\n // valor fixo igual ao dobro do dos empregados sem especialização, acrescido\n //de um prémio que corresponde a 1% do lucro mensal nas lojas da região.\n setSalario(1600 + percentagemLucro);\n\n }",
"@Override\n\tpublic double calculsalaire() {\n\t\treturn 1500 + nbY*20;\n\t}",
"private void obtenerGastosDiariosMes() {\n\t\t// Obtenemos las fechas actuales inicial y final\n\t\tCalendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n int diaFinalMes = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\tList<Movimiento> movimientos = this.movimientoService.obtenerMovimientosFechaUsuario(idUsuario, LocalDate.of(LocalDate.now().getYear(),LocalDate.now().getMonthValue(),1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDate.of(LocalDate.now().getYear(),LocalDate.now().getMonthValue(), diaFinalMes));\n\t\tList<Double> listaGastos = new ArrayList<Double>();\n\t\tList<String> listaFechas = new ArrayList<String>();\n\t\t\n\t\tDate fechaUtilizadaActual = null;\n\t\tdouble gastoDiario = 0;\n\t\t\n\t\tfor (Iterator iterator = movimientos.iterator(); iterator.hasNext();) {\n\t\t\tMovimiento movimiento = (Movimiento) iterator.next();\n\t\t\tif(fechaUtilizadaActual == null) { //Comprobamos si se acaba de entrar en el bucle para inicializar la fecha del movimiento\n\t\t\t\tfechaUtilizadaActual = movimiento.getFecha();\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Si hemos cambiado de fecha del movimiento se procede a guardar los datos recogidos\n\t\t\tif(!fechaUtilizadaActual.equals(movimiento.getFecha())) {\n\t\t\t\tlistaGastos.add(gastoDiario);\n\t\t\t\tlistaFechas.add(fechaUtilizadaActual.getDate()+\"/\"+Utils.getMonthForInt(fechaUtilizadaActual.getMonth()).substring(0, 3));\n\t\t\t\tgastoDiario = 0; // Reiniciamos el contador del gasto\n\t\t\t\tfechaUtilizadaActual = movimiento.getFecha(); // Almacenemos la fecha del nuevo gasto\n\t\t\t}\n\t\t\t\n\t\t\t// Si el movimiento que se ha realizado es un gasto lo sumamos al contador de gasto\n\t\t\tif(movimiento.getTipo().equals(TipoMovimiento.GASTO)) {\n\t\t\t\tgastoDiario += movimiento.getCantidad();\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Comprobamos si es el ultimo item del iterador y almacenamos sus datos\n\t\t\tif(!iterator.hasNext()) {\n\t\t\t\tlistaGastos.add(gastoDiario);\n\t\t\t\tlistaFechas.add(fechaUtilizadaActual.getDate()+\"/\"+Utils.getMonthForInt(fechaUtilizadaActual.getMonth()).substring(0, 3));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.listadoGastosDiariosDiagrama = new Double[listaGastos.size()];\n\t\tthis.listadoGastosDiariosDiagrama = listaGastos.toArray(this.listadoGastosDiariosDiagrama);\n\t\tthis.fechasDiagrama = new String[listaFechas.size()];\n\t\tthis.fechasDiagrama = listaFechas.toArray(this.fechasDiagrama);\n\t\t\n\t}",
"double getTotalProfit();",
"public void recomendarTemposEM() {\n ArrayList iTXCH = new ArrayList(); /// Instancias pre fusion\n ArrayList iTYCH = new ArrayList();\n ArrayList iTZCH = new ArrayList();\n\n ArrayList cenTXCH = new ArrayList(); /// Centroides Tempos tempos ch\n ArrayList cenTYCH = new ArrayList();\n ArrayList cenTZCH = new ArrayList();\n\n ArrayList cenTXDB = new ArrayList(); /// centroide tempos db\n ArrayList cenTYDB = new ArrayList();\n ArrayList cenTZDB = new ArrayList();\n\n ArrayList insTXCH = new ArrayList(); /// Instancias fusion\n ArrayList insTYCH = new ArrayList();\n ArrayList insTZCH = new ArrayList();\n\n ArrayList ppTXCH = new ArrayList(); /// centroide promedio ponderado tempos\n ArrayList ppTYCH = new ArrayList();\n ArrayList ppTZCH = new ArrayList();\n\n ArrayList ppTXDB = new ArrayList(); /// centroide promedio ponderado duracion\n ArrayList ppTYDB = new ArrayList();\n ArrayList ppTZDB = new ArrayList();\n\n ArrayList paTXCH = new ArrayList(); /// centroide promedio aritmetico tempos ch\n ArrayList paTYCH = new ArrayList();\n ArrayList paTZCH = new ArrayList();\n\n ArrayList paTXDB = new ArrayList(); /// centroide promedio artimetico tempos db\n ArrayList paTYDB = new ArrayList();\n ArrayList paTZDB = new ArrayList();\n\n////////////////// TEMPO EN X ////////////////////////////// \n ////////// calinsky - harabaz /////////\n if (txchsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXCH = CExtraer.arrayTempoXCpruebaEM;\n iTXCH = CExtraer.arrayTempoXIpruebaEM;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXCH2.setText(cenTXCH.get(iposision).toString());\n }\n\n if (txchsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n ppTXCH = CFusionarEM.arregloPPTX1EM;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n\n System.out.println(iposision);\n\n }\n }\n valorTXCH2.setText(ppTXCH.get(iposision).toString());\n }\n\n if (txchsEM == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n paTXCH = CFusionarEM.arregloPATX1EM;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXCH2.setText(paTXCH.get(iposision).toString());\n\n }\n\n //////////// davies bouldin //////////////\n if (txdbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXDB = CExtraer.arrayTempoXCpruebaEM;\n iTXCH = CExtraer.arrayTempoXIpruebaEM;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB2.setText(cenTXDB.get(iposision).toString());\n }\n\n if (txdbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n ppTXDB = CFusionarEM.arregloPPTX1EM;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB2.setText(ppTXDB.get(iposision).toString());\n }\n if (txdbsEM == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n paTXDB = CFusionarEM.arregloPATX1EM;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXDB2.setText(paTXDB.get(iposision).toString());\n\n }\n\n ///////////// TEMPO EN Y //////////// \n //////////// calinsky - harabaz /////////////\n if (tychsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYCH = CExtraer.arrayTempoYCpruebaEM;\n iTYCH = CExtraer.arrayTempoYIpruebaEM;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYCH2.setText(cenTYCH.get(iposision).toString());\n }\n\n if (tychsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n ppTYCH = CFusionarEM.arregloPPTY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH2.setText(ppTYCH.get(iposision).toString());\n\n }\n\n if (tychsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n paTYCH = CFusionarEM.arregloPATY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH2.setText(paTYCH.get(iposision).toString());\n }\n /////////// davies - bouldin /////////////\n if (tydbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYDB = CExtraer.arrayTempoYCpruebaEM;\n iTYCH = CExtraer.arrayTempoYIpruebaEM;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYDB2.setText(cenTYDB.get(iposision).toString());\n }\n\n if (tydbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n ppTYDB = CFusionarEM.arregloPPTY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB2.setText(ppTYDB.get(iposision).toString());\n }\n if (tydbsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n paTYDB = CFusionarEM.arregloPATY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB2.setText(paTYDB.get(iposision).toString());\n }\n\n ///////////// TEMPO EN Z //////////// \n ///////////// calinsky harabaz ///////////////////\n if (tzchsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZCH = CExtraer.arrayTempoZCpruebaEM;\n iTZCH = CExtraer.arrayTempoZIpruebaEM;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZCH2.setText(cenTZCH.get(iposision).toString());\n }\n\n if (tzchsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n ppTZCH = CFusionarEM.arregloPPTZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH2.setText(ppTZCH.get(iposision).toString());\n }\n if (tzchsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n paTZCH = CFusionarEM.arregloPATZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH2.setText(paTZCH.get(iposision).toString());\n }\n\n ///////////// davies bouldin /////////////////// \n if (tzdbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZDB = CExtraer.arrayTempoZCpruebaEM;\n iTZCH = CExtraer.arrayTempoZIpruebaEM;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZDB2.setText(cenTZDB.get(iposision).toString());\n }\n\n if (tzdbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n ppTZDB = CFusionarEM.arregloPPTZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB2.setText(ppTZDB.get(iposision).toString());\n }\n //////////\n if (tzdbsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n paTZDB = CFusionarEM.arregloPATZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB2.setText(paTZDB.get(iposision).toString());\n }\n\n }",
"public void figure() {\r\n Currency nAdv = Currency.Zero;\r\n Currency nLow = Currency.NegativeOne;\r\n Currency nHigh = Currency.Zero;\r\n Currency nTotal = Currency.Zero;\r\n \r\n for(int i = 0; i < dayArray.size(); i++) {\r\n DayG dayG = (DayG) dayArray.get(i);\r\n Currency gross = dayG.getGross();\r\n \r\n nAdv = nAdv.add(gross);\r\n nTotal = nTotal.add(gross);\r\n if(nLow == Currency.NegativeOne || gross.lt(nLow)) {\r\n lowD = dayG;\r\n nLow = gross;\r\n }\r\n if(nHigh.lt(gross)) {\r\n highD = dayG;\r\n nHigh = gross;\r\n }\r\n }\r\n \r\n adverage = nAdv.divide(dayArray.size()).round();\r\n low = nLow.round();\r\n high = nHigh.round();\r\n \r\n //no need to round total, right?\r\n total = nTotal;\r\n }",
"public void caltotalprice(){\n \tthis.mTotalPrice = 0;\n \tif (this.isCoachSeat) {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.coachprice();\n \t\t}\n \t}else {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.firstclassprice();\n \t\t}\n \t}\n }",
"Double getTotalSpent();",
"public void generarTotal(){\n\n\t\tfloat total = 0;\n\n\t\tfor (int con = 0; con < modelo.getRowCount(); con++) {\n\n\t\t\ttotal += (float) tabla.getValueAt(con, 3);\n\t\t\t\n\t\t}\n\n\t\tcampoTotal.setText(formato.format(total));\n\n\t\tlimpiarCampos();\n\n\t}",
"public void calcularTotal() {\n double valor = 0;\n String servico = (String)consultaSelecionada.getSelectedItem().toString();\n switch(servico) {\n case \"Consulta\":\n valor += 100;\n break;\n case \"Limpeza\":\n valor += 130;\n break;\n case \"Clareamento\":\n valor += 450;\n break;\n case \"Aparelho\":\n valor += 100;\n break;\n case \"Raio-x\":\n valor += 80;\n break;\n case \"Cirurgia\":\n valor += 70;\n break;\n }\n Total.setText(String.valueOf(valor));\n }",
"public void calcPrecioTotal() {\n try {\n float result = precioUnidad * Float.parseFloat(unidades.getText().toString());\n prTotal.setText(String.valueOf(result) + \"€\");\n }catch (Exception e){\n prTotal.setText(\"0.0€\");\n }\n }",
"public int getTotalRecaudado()\n {\n return maquina1.getTotal() + maquina2.getTotal();\n }",
"double getTempo();",
"public void calculations(){\n\n int temp_size1 = fight_list.get(0).t1.members.size();\n int[] t1_counter = new int[temp_size1 + 1]; //counter for deaths: 0, 1, 2..., party size.\n float t1_avg = 0; //Average number of deaths.\n\n //We don't need to calculate for t2 right now, because t2 is just monsters.\n //temp_size = fight_list.get(0).t2.members.size();\n //int[] t2_counter = new int[temp_size + 1];\n\n for(FightResult fig : this.fight_list){\n int i = 0;\n while(i != fig.t1_deaths){\n i++;\n }\n t1_counter[i]++;\n t1_avg += fig.t1_deaths;\n }//end for\n\n System.out.println(t1_avg);\n System.out.println(Float.toString(t1_avg/fight_list.size()) + \" / \" + Integer.toString(temp_size1));\n\n String axis = \"# of deaths: \\t\";\n int axis_int = 0;\n String t1_results = \"Happened: \\t\";\n for(int i : t1_counter){\n axis += Integer.toString(axis_int++) + \"\\t\";\n t1_results += Integer.toString(i) + \"\\t\";\n }//end for\n System.out.println(axis);\n System.out.println(t1_results);\n\n float tpk_amount = t1_counter[temp_size1]; //by taking the size, we take the item at the end of the array. In this case, the number where everyone dies.\n tpk_amount = (tpk_amount/fight_list.size())*100;\n System.out.println(\"Probability of TPK: \" + Float.toString(tpk_amount) + \" %.\");\n\n System.out.println(\"\\n--------\\n\");\n }",
"public double calcular_costo() {\n\t\t return 1.3*peso+30 ;\n\t}",
"public float calculate(Ticket t) {\n\t}",
"public void imprimirResultados(){\n System.out.println(\"t (tiempo actual) \"+t);\n \n \n System.out.println(\"\\nGanancia total: $\"+R);\n System.out.println(\"Costos por mercaderia comprada: $\"+C);\n System.out.println(\"Costos por mantenimiento inventario: $\"+H);\n System.out.println(\"Ganancia promeio de la tienda por unidad de tiempo: $\"+(R-C-H)/T);\n \n }",
"@Override\r\n\tpublic int precioTotal() {\n\t\treturn this.precio;\r\n\t}",
"public float montos(){\n\tDefaultTableModel modelo = vc.returnModelo();\r\n\tint numeroFilas=modelo.getRowCount();\r\n\tfloat monto=0;\r\n\t\tif(modelo.getRowCount()!=0){\r\n\t\t\r\n\t\t\tfor (int i = 0; i < numeroFilas; i++) {\r\n\t\t\t\t\r\n\t\t\t\tmonto = monto + Float.valueOf(modelo.getValueAt(i, 5).toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmonto=0;\r\n\t\t}\r\n\t\treturn monto;\r\n\t}",
"public void utilization() {\r\n\t\tfloat fAktuell = this.aktuelleLast;\r\n\t\tfloat fMax = this.raumsonde.getMaxNutzlast();\r\n\t\tfloat prozent = fAktuell / fMax * 100;\r\n\r\n\t\tSystem.out.println(\" \" + fAktuell + \"/\" + fMax + \" (\" + prozent + \"%)\");\r\n\t}",
"public double getTotalManPokok() {\n return this.totalManPokok;\n }",
"@Override\n\tpublic Double calcular(Produto produto) {\n\t\treturn (produto.getValorUnitario()) - (produto.getValorUnitario() * 0.25);\n\t}",
"public float calcularPerimetro(){\n return baseMayor+baseMenor+(medidaLado*2);\n }",
"@Override\n public double salario() {\n return 2600 * 1.10;\n }",
"private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }",
"public double getTotalTime()\n\t{\n\t\tdouble elapsedTime = 0. ;\n\t\tEnumeration<SpItem> children = children() ;\n\t\tSpItem child = null ;\n\t\tboolean hasObsChild = false ;\n\n\t\twhile( children.hasMoreElements() )\n\t\t{\n\t\t\tchild = children.nextElement() ;\n\t\t\tif( child instanceof SpObs )\n\t\t\t{\n\t\t\t\thasObsChild = true ;\n\t\t\t\telapsedTime += (( SpObs )child).getElapsedTime() ;\n\t\t\t}\n\t\t\telse if( child instanceof SpMSB )\n\t\t\t{\n\t\t\t\telapsedTime += (( SpMSB )child).getTotalTime() ;\n\t\t\t}\n\t\t}\n\n\t\t// If there is an Obs child, we should add a slew time as well,\n\t\t// which is just the instrument slew time times the number of\n\t\t// targets. We don't do this if the child is an MSB since this\n\t\t// already adds a slew time\n\t\tdouble slewTime = 0. ;\n\t\tif( hasObsChild )\n\t\t{\n\t\t\tSpInstObsComp inst = SpTreeMan.findInstrument( this ) ;\n\t\t\tif( inst != null )\n\t\t\t\tslewTime = inst.getSlewTime() * size() ;\n\t\t}\n\n\t\t// Get the total number of repeats for each target\n\t\tint totRemaining = 0 ;\n\t\tfor( int i = 0 ; i < size() ; i++ )\n\t\t\ttotRemaining += getRemaining( i ) ;\n\n\t\telapsedTime *= totRemaining ;\n\t\telapsedTime += slewTime ;\n\n\t\treturn elapsedTime ;\n\t}",
"@Override\n public double obtenerVolumen(){\n return (1.0 / 3.0) * c.obtenerArea() * c.obtenerAltura();\n }",
"@Override\n\tpublic double calcularSalario() {\n\n\t\tdouble salario = 0;\n\n\t\tdouble porcentajeAnios = calcularPorcentajePorAntiguedad();\n\t\tporcentajeAnios = this.sueldoBasico* (porcentajeAnios / 100);\n\t\tsalario = this.sueldoBasico + porcentajeAnios;\n\t\treturn salario;\n\t}",
"@Override\n\tpublic double totalSalario() {\n\t\treturn this.precio;\n\t}",
"public void total() {\n\t\t\n\t}",
"@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }",
"@Override\n\tpublic double calcularPrecio() {\n\t\treturn 0;\n\t}",
"public void findavgTime(){\n findWaitingTime(ProcessesNumber, ProcessesNumber.length, BurestTime, WaitingTime, quantum);\n \n // Function to find turn around time \n findTurnAroundTime(ProcessesNumber, ProcessesNumber.length, BurestTime, WaitingTime, TurnaroundTime);\n \n \n System.out.println(\"Processes \" + \" Burst time \" +\n \" Waiting time \" + \" Turn around time\");\n \n \n // around time\n for (int i=0; i<ProcessesNumber.length; i++)\n {\n Total_WaitingTime = Total_WaitingTime + WaitingTime[i];\n Total_TurnaroundTime = Total_TurnaroundTime + TurnaroundTime[i];\n System.out.println(\" \" + (i+1) + \"\\t\\t\" + BurestTime[i] +\"\\t \" +\n WaitingTime[i] +\"\\t\\t \" + TurnaroundTime[i]);\n }\n \n Average_WaitingTime = (float)Total_WaitingTime / (float)ProcessesNumber.length ;\n Average_TurnaroundTime = (float)Total_TurnaroundTime / (float)ProcessesNumber.length ;\n \n System.out.println(\"Average waiting time = \" + (float)Average_WaitingTime);\n System.out.println(\"Average turn around time = \" + (float)Average_TurnaroundTime);\n \n\n//for ( int k = 0; k < ProcessMoved[k].length; k++) {\n// \n// for (int j = 0; j < ProcessMoved.length; j++) {\n//\n// System.out.println(ProcessMoved[j][k]);\n// }\n//\n// }\n \n Gantt_Chart_Pre per = new Gantt_Chart_Pre(ProcessMoved ,endtime ,WaitingTime , TurnaroundTime , Names ,ProcessesNumber ,Total_WaitingTime,Average_WaitingTime,Total_TurnaroundTime,Average_TurnaroundTime);\n per.setTitle(\"Solution !!\");\n per.setSize(1000,700);\n per.setLocationRelativeTo(null);\n per.setVisible(true);\n }",
"public double getTotal (){ \r\n return total;\r\n }",
"double objetosc() {\n return dlugosc * wysokosc * szerokosc; //zwraca obliczenie poza metode\r\n }",
"@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumulado * 0.05) * valor_base);\n resultado += auxilioProcriacao();\n //vale-coxinha\n resultado += 42;\n return resultado;\n }",
"public synchronized double getTotal(){\n float CantidadTotal=0;\n Iterator it = getElementos().iterator();\n while (it.hasNext()) {\n ArticuloVO e = (ArticuloVO)it.next();\n CantidadTotal=CantidadTotal+(e.getCantidad()*e.getPrecio());\n}\n\n \n return CantidadTotal;\n\n }",
"public static double getTotal() throws IOException{\n\t\tPhotovoltaicDao pd = new PhotovoltaicDao();\n\t\tArrayList<Photovoltaic> mdList = pd.selectPhotovoltaic();\n\t\tdouble sum = 0;\n\t\tfor(int iter=0;iter!=mdList.size();iter++)\n\t\t\tsum+=mdList.get(iter).getCurrentGeneration();\n\t\treturn sum;\n\t}",
"public float capacidadeTotal() {\r\n float toneladas = 0;\r\n\r\n for (int i = 0; i < numNavios; i++) {\r\n if (navios[i] instanceof Petroleiro) {\r\n Petroleiro petroleiro = (Petroleiro) navios[i];\r\n toneladas = toneladas + petroleiro.getCapacidadeCarga();\r\n } else if (navios[i] instanceof PortaContentores) {\r\n PortaContentores portaContentores = (PortaContentores) navios[i];\r\n toneladas = toneladas + portaContentores.getMaxContentores() * 10;\r\n }\r\n }\r\n return toneladas;\r\n }",
"public void Millas_M(){\r\n System.out.println(\"Cálcular Metros o Kilometros de Millas Marinas\");\r\n System.out.println(\"Ingrese un valor en Millas Marinas\");\r\n cadena =numero.next(); \r\n valor = metodo.Doble(cadena);\r\n valor = metodo.NegativoD(valor);\r\n totalM = valor * 1852 ;\r\n Millas_KM(totalM);\r\n }",
"public void calcularTotalVentas(FormularioRegistrarCorte formularioRegistrarCorte) {\n Double suma = 0.00;\n try {\n for (int i = 0; i < formularioRegistrarCorte.getTablaEntradas().getRowCount(); i++) {\n suma = suma + (Double.valueOf(formularioRegistrarCorte.getTablaEntradas().getValueAt(i, 2).toString()));\n }\n formularioRegistrarCorte.getTxtTotalVentas().setText(new OperacionesUtiles().formatoDouble(suma));\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular total entradas\");\n\n }\n\n }",
"public int getTotRuptures();",
"public void calculateMMage() {\n\t\t\n\t}",
"public int getTotalTime();",
"public static void main(String[] args) {\n\t\tdouble d = 14/1.6;\r\n\t\tdouble t = (45*60+30)/3600.0;\r\n\t\tdouble s = d/t;\r\n\t\tSystem.out.println(\"the average speed in miles per hour is \"+s);\r\n\t}",
"public double getTotalUnits() {\n int total = 0;\n for(int i = 0; i < courses.size(); i++) {\n // don't count if units are null? idk how defensive I need to be (I choose not to check, units should never be null)\n // TODO: test with System.out\n Course course = courses.get(i);\n //if(!course.getUnits().equals(null))\n total += course.getUnits();\n }\n return total;\n }",
"public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }",
"public int getminutoStamina(){\n return tiempoReal;\n }",
"private void calculateTotalStats() {\n int totHp = calculateHp(baseStats.hp, ivStats.hp, evStats.hp);\n int totAtk = calculateStat(baseStats.atk, ivStats.atk, evStats.atk, natureStats.atk);\n int totDef = calculateStat(baseStats.def, ivStats.def, evStats.def, natureStats.def);\n int totSpAtk = calculateStat(baseStats.spAtk, ivStats.spAtk, evStats.spAtk, natureStats.spAtk);\n int totSpDef = calculateStat(baseStats.spDef, ivStats.spDef, evStats.spDef, natureStats.spDef);\n int totSpd = calculateStat(baseStats.spd, ivStats.spd, evStats.spd, natureStats.spd);\n totalStats = new Stats(totHp, totAtk, totDef, totSpAtk, totSpDef, totSpd);\n combatStats = new Stats(totHp, 0, 0, 0, 0, 0);\n }",
"private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }",
"private double calculeSalaires() {\n return salaireHoraire * heures;\n }",
"public double calcular(){\n double calculo = 1;\n\n for(INodo descendiente : getDescendientes()) {\n calculo *= descendiente.calcular();\n }\n\n return calculo;\n }",
"private double prixTotal() \r\n\t{\r\n\t\tdouble pt = getPrix() ; \r\n\t\t\r\n\t\tfor(Option o : option) \r\n\t\t\tpt += o.getPrix();\t\r\n\t\treturn pt;\r\n\t}",
"public void formatoTiempo() {\n String segundos, minutos, hora;\n\n hora = hrs < 10 ? String.valueOf(\"0\" + hrs) : String.valueOf(hrs);\n\n minutos = min < 10 ? String.valueOf(\"0\" + min) : String.valueOf(min);\n\n jLabel3.setText(hora + \" : \" + minutos + \" \" + tarde);\n }",
"public static void calcularPromedioSemanal() {\n }",
"public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}",
"private static void displayStat() {\n Collection<Zone> zones = Universe.getInstance().getCarte().getCarte().values();\r\n System.out.println(\"Nb de personnes créées : \" + Universe.getInstance().getCarte().getPopulation().size());\r\n\r\n\r\n System.out.println(\"Nb de personnes créées en mer : \" + getPopulationByTile(Zone.Tile.SEA));\r\n System.out.println(\"Nb de personnes créées en plaine : \" + getPopulationByTile(Zone.Tile.EARTH));\r\n System.out.println(\"Nb de personnes créées en foret : \" + getPopulationByTile(Zone.Tile.FOREST));\r\n System.out.println(\"Nb de personnes créées en ville : \" + getPopulationByTile(Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer : \" + getSurfaceByTile(zones, Zone.Tile.SEA));\r\n System.out.println(\"Surface plaine : \" + getSurfaceByTile(zones, Zone.Tile.EARTH));\r\n System.out.println(\"Surface foret : \" + getSurfaceByTile(zones, Zone.Tile.FOREST));\r\n System.out.println(\"Surface ville : \" + getSurfaceByTile(zones, Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Densité mer : \" + new Double(getPopulationByTile(Zone.Tile.SEA) / getSurfaceByTile(zones, Zone.Tile.SEA)));\r\n System.out.println(\"Densité plaine : \" + new Double(getPopulationByTile(Zone.Tile.EARTH)) / new Double(getSurfaceByTile(zones, Zone.Tile.EARTH)));\r\n System.out.println(\"Densité foret : \" + new Double(getPopulationByTile(Zone.Tile.FOREST)) / new Double(getSurfaceByTile(zones, Zone.Tile.FOREST)));\r\n System.out.println(\"Densité ville : \" + new Double(getPopulationByTile(Zone.Tile.TOWN)) / new Double(getSurfaceByTile(zones, Zone.Tile.TOWN)));\r\n\r\n System.out.println(\"---------------\");\r\n System.out.println(\"Surface mer deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n }",
"public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}",
"private void getCal() {\n \t\t\n \t\tif(isnew) {\n \t\t\tString[] parts0, parts1, parts2, parts3, parts4, parts5, parts6;\n \t\t\t\n \t\t\tparts0 = asciiheader[9].split(\"\\t\");\n \t\t\tparts1 = asciiheader[10].split(\"\\t\");\n \t\t\tparts2 = asciiheader[11].split(\"\\t\");\n \t\t\tparts3 = asciiheader[12].split(\"\\t\");\n \t\t\tparts4 = asciiheader[13].split(\"\\t\");\n \t\t\tparts5 = asciiheader[14].split(\"\\t\");\n \t\t\tparts6 = asciiheader[15].split(\"\\t\");\n \t\t\t\n \t\t\tfor(int i = 0; i < 3; i++) {\n \t\t\t\tRGBcal[i] = Float.parseFloat(parts0[i]);\n \t\t\t\tvlam[i] = Float.parseFloat(parts1[i]);\n \t\t\t\tvp[i] = Float.parseFloat(parts2[i]);\n \t\t\t\tmel[i] = Float.parseFloat(parts3[i]);\n \t\t\t\tvmac[i] = Float.parseFloat(parts4[i]);\n \t\t\t\tsmac[i] = Float.parseFloat(parts5[i]);\n \t\t\t\tCLAcal[i] = Float.parseFloat(parts6[i]);\n \t\t\t}\n \t\t\tCLAcal[3] = Float.parseFloat(parts6[3]);\n \t\t\treturn;\n \n \t\t}\n \t\t\n \t\tint temp = 0;\n \t\tint j = 0;\n \t\tString workingDirectory = new String(System.getProperty(\"user.dir\")+ \"\\\\src\\\\data\");\n \t\t\n \t\tString[] s = loadStrings(workingDirectory + \"\\\\Day12_Cal_Values.txt\");\n \t\t\n \n \t\t//Scone/macula\n \t\tfor(int i = 0; i < s[1].length(); i++) {\n \t\t\tif(s[1].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\t//smac[j] = float(s[1].substring(temp, i));\n \t\t\t\t\tsmac[j] = Float.parseFloat(s[1].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tsmac[j] = Float.parseFloat(s[1].substring(temp, s[1].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vlamda/macula\n \t\tfor(int i = 0; i < s[2].length(); i++) {\n \t\t\tif(s[2].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvmac[j] = Float.parseFloat(s[2].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvmac[j] = Float.parseFloat(s[2].substring(temp, s[2].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Melanopsin\n \t\tfor(int i = 0; i < s[3].length(); i++) {\n \t\t\tif(s[3].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tmel[j] = Float.parseFloat(s[3].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t}\n \t\tmel[j] = Float.parseFloat(s[3].substring(temp, s[3].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vprime\n \t\tfor(int i = 0; i < s[4].length(); i++) {\n \t\t\tif(s[4].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvp[j] = Float.parseFloat(s[4].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvp[j] = Float.parseFloat(s[4].substring(temp, s[4].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vlamda\n \t\tfor(int i = 0; i < s[5].length(); i++) {\n \t\t\tif(s[5].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvlam[j] = Float.parseFloat(s[5].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvlam[j] = Float.parseFloat(s[5].substring(temp, s[5].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//CLA\n \t\tfor(int i = 0; i < s[8].length(); i++) {\n \t\t\tif(s[8].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tCLAcal[j] = Float.parseFloat(s[8].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tCLAcal[j] = Float.parseFloat(s[8].substring(temp, s[8].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//RGBcal\n \t\ts = loadStrings(workingDirectory + \"\\\\Day12 RGB Values.txt\");\n \t\tfor(int i = 0; i < s[ID].length(); i++) {\n \t\t\tif(s[ID].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tRGBcal[j] = Float.parseFloat(s[ID].substring(temp, i));\n \t\t\t\t\tj++;\n \t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t}\n \t\tRGBcal[j] = Float.parseFloat(s[ID].substring(temp, s[ID].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \t}",
"public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d * 10 + u * 1;\n //Si es igual se abre.\n if (contrasena == validar) {\n etiResultado.setText(\"Caja Abierta\");\n }\n //Si es menor nos indica que es mas grande\n if (validar < contrasena) {\n etiResultado.setText(\"El número secreto es mayor\");\n }\n //Si es mayot nos indica que es mas pequeño.\n if (validar > contrasena) {\n etiResultado.setText(\"El número secreto es menor\");\n }\n }",
"public void calcularQuinA(){\n sueldoQuinAd = sueldoMensual /2;\n\n }",
"float calcularFinal(){\n return (calif1*0.3f)+(calif2*0.3f)+(calif3*0.4f);// debo agregar la f para que lo tome como float y no como double\r\n }",
"public static Double obtenerPromedioDeLosSalariosDeTodosLosEmpleados( )\r\n\t{\r\n\t\tDouble promedio = 0.0 ;\r\n\t\tfor(Empleado empleado : listaDeEmpleados)\r\n\t\t{\r\n\t\t\tpromedio = promedio + empleado.getSalario();\r\n\t\t}\r\n\t\treturn promedio / listaDeEmpleados.size();\r\n\t}",
"public void calculos() {\n a = a1+a2+a3;\n b = b1+b2+b3;\n c = c1+c2+c3;\n }",
"public double calcularTarifa(){\n\t\treturn TARIFA_BASE * 1.2;\n\t}",
"public void calcularTotalGastos(FormularioRegistrarCorte formularioRegistrarCorte) {\n Double suma = 0.0;\n try {\n for (int i = 0; i < formularioRegistrarCorte.getTablaSlidas().getRowCount(); i++) {\n suma = suma + (Double.valueOf(formularioRegistrarCorte.getTablaSlidas().getValueAt(i, 2).toString()));\n }\n formularioRegistrarCorte.getTxtTotalGastos().setText(new OperacionesUtiles().formatoDouble(suma));\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular total salidas\");\n }\n\n }",
"double getPerimetro();"
] | [
"0.6949974",
"0.67596084",
"0.65750676",
"0.6408796",
"0.6357494",
"0.6315843",
"0.6289674",
"0.62753606",
"0.6257344",
"0.6255903",
"0.6225902",
"0.6196904",
"0.6172092",
"0.6150791",
"0.6140817",
"0.61408144",
"0.61028636",
"0.606953",
"0.6023183",
"0.6020483",
"0.60156494",
"0.5992263",
"0.5989549",
"0.59825844",
"0.59570277",
"0.59494424",
"0.5948689",
"0.59310305",
"0.592772",
"0.58906263",
"0.5885155",
"0.5883014",
"0.58593166",
"0.5851496",
"0.5844775",
"0.5832165",
"0.5830244",
"0.58266616",
"0.5793269",
"0.5785262",
"0.5779537",
"0.5767479",
"0.57554466",
"0.5748073",
"0.5741359",
"0.57402",
"0.57298464",
"0.572878",
"0.57227784",
"0.5721043",
"0.57203794",
"0.571358",
"0.57005465",
"0.56959873",
"0.5691828",
"0.56819665",
"0.5681663",
"0.56775326",
"0.5667776",
"0.56417453",
"0.5640095",
"0.5639006",
"0.5633412",
"0.5632216",
"0.56321377",
"0.5624439",
"0.56226385",
"0.56198335",
"0.56155705",
"0.56105",
"0.5594684",
"0.55877614",
"0.5582301",
"0.5582053",
"0.5576519",
"0.55744916",
"0.5574038",
"0.5571993",
"0.55640304",
"0.5563876",
"0.55617934",
"0.5561089",
"0.5558594",
"0.55570054",
"0.55489516",
"0.55479413",
"0.55478054",
"0.554561",
"0.55409604",
"0.5533617",
"0.5526713",
"0.5525353",
"0.5522694",
"0.55097526",
"0.5506692",
"0.5498458",
"0.5494161",
"0.54896927",
"0.54891104",
"0.5470599",
"0.54663926"
] | 0.0 | -1 |
b) Retornar la calorias de cada ingrediente | @Test
void getDishIngredientsCalories() throws Exception {
String request = "{\"name\": \"Ensalada\", \"ingredients\": [" +
createIngredient("Calabaza", 100) + "," +
createIngredient("Cebolla", 50) +
"]}";
this.mockMvc.perform(
post("/calculate")
.contentType(MediaType.APPLICATION_JSON)
.content(request))
.andDo(print()).andExpect(status().isOk())
.andExpect(jsonPath("$.ingredients[0].calories").value(24))
.andExpect(jsonPath("$.ingredients[1].calories").value(23));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getCalorias() {return calorias;}",
"public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }",
"public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }",
"public void obterDados() {\r\n\r\n\t\tidade = Integer.parseInt(JOptionPane.showInputDialog(\"Informe a idade\"));\r\n\t\taltura = Double.parseDouble(JOptionPane.showInputDialog(\"Informe a altura\"));\r\n\t\tpeso = Double.parseDouble(JOptionPane.showInputDialog(\"Informe o peso\"));\r\n\t\t\r\n\t\tjogCadastrados ++;\r\n totalaltura += altura;\r\n\r\n\t}",
"public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }",
"private void obtenerGastosDiariosMes() {\n\t\t// Obtenemos las fechas actuales inicial y final\n\t\tCalendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n int diaFinalMes = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\tList<Movimiento> movimientos = this.movimientoService.obtenerMovimientosFechaUsuario(idUsuario, LocalDate.of(LocalDate.now().getYear(),LocalDate.now().getMonthValue(),1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDate.of(LocalDate.now().getYear(),LocalDate.now().getMonthValue(), diaFinalMes));\n\t\tList<Double> listaGastos = new ArrayList<Double>();\n\t\tList<String> listaFechas = new ArrayList<String>();\n\t\t\n\t\tDate fechaUtilizadaActual = null;\n\t\tdouble gastoDiario = 0;\n\t\t\n\t\tfor (Iterator iterator = movimientos.iterator(); iterator.hasNext();) {\n\t\t\tMovimiento movimiento = (Movimiento) iterator.next();\n\t\t\tif(fechaUtilizadaActual == null) { //Comprobamos si se acaba de entrar en el bucle para inicializar la fecha del movimiento\n\t\t\t\tfechaUtilizadaActual = movimiento.getFecha();\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Si hemos cambiado de fecha del movimiento se procede a guardar los datos recogidos\n\t\t\tif(!fechaUtilizadaActual.equals(movimiento.getFecha())) {\n\t\t\t\tlistaGastos.add(gastoDiario);\n\t\t\t\tlistaFechas.add(fechaUtilizadaActual.getDate()+\"/\"+Utils.getMonthForInt(fechaUtilizadaActual.getMonth()).substring(0, 3));\n\t\t\t\tgastoDiario = 0; // Reiniciamos el contador del gasto\n\t\t\t\tfechaUtilizadaActual = movimiento.getFecha(); // Almacenemos la fecha del nuevo gasto\n\t\t\t}\n\t\t\t\n\t\t\t// Si el movimiento que se ha realizado es un gasto lo sumamos al contador de gasto\n\t\t\tif(movimiento.getTipo().equals(TipoMovimiento.GASTO)) {\n\t\t\t\tgastoDiario += movimiento.getCantidad();\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Comprobamos si es el ultimo item del iterador y almacenamos sus datos\n\t\t\tif(!iterator.hasNext()) {\n\t\t\t\tlistaGastos.add(gastoDiario);\n\t\t\t\tlistaFechas.add(fechaUtilizadaActual.getDate()+\"/\"+Utils.getMonthForInt(fechaUtilizadaActual.getMonth()).substring(0, 3));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.listadoGastosDiariosDiagrama = new Double[listaGastos.size()];\n\t\tthis.listadoGastosDiariosDiagrama = listaGastos.toArray(this.listadoGastosDiariosDiagrama);\n\t\tthis.fechasDiagrama = new String[listaFechas.size()];\n\t\tthis.fechasDiagrama = listaFechas.toArray(this.fechasDiagrama);\n\t\t\n\t}",
"public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }",
"@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }",
"public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"public static ArrayList<Integer> estadisticageneral() {\n\n\t\tArrayList<Integer> mensaje = new ArrayList<>();\n\n\t\tArrayList<Res> resesAntes = ResCRUD.select();\n\t\tArrayList<Res> resess = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < resesAntes.size(); i++) {\n\t\t\t\n\t\t\tif (resesAntes.get(i).getVivo()==1) {\n\t\t\t\t\n\t\t\t\tresess.add(resesAntes.get(i));\n\t\t\t}\n\t\t}\t\t\n\n\t\tArrayList<Potrero> potrero = PotreroCRUD.select();\n\n\t\tRes res = null;\n\n\t\tint potreros = potrero.size();\n\t\tint reses = resess.size();\n\t\tint hembras = 0;\n\t\tint machos = 0;\n\t\tint ch = 0;\n\t\tint hl = 0;\n\t\tint nv = 0;\n\t\tint vh = 0;\n\t\tint vp = 0;\n\t\tint cm = 0;\n\t\tint ml = 0;\n\t\tint mc = 0;\n\t\tint tp = 0;\n\n\t\tfor (int i = 0; i < resess.size(); i++) {\n\n\t\t\tres = resess.get(i);\n\n\t\t\tif (res.getGenero().equalsIgnoreCase(\"H\")) {\n\t\t\t\thembras++;\n\n\t\t\t\tswitch (res.getTipo()) {\n\n\t\t\t\tcase \"CH\":\n\n\t\t\t\t\tch++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HL\":\n\n\t\t\t\t\thl++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"NV\":\n\n\t\t\t\t\tnv++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"VH\":\n\n\t\t\t\t\tvh++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"VP\":\n\n\t\t\t\t\tvp++;\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (res.getGenero().equalsIgnoreCase(\"M\")) {\n\t\t\t\tmachos++;\n\n\t\t\t\tswitch (res.getTipo()) {\n\n\t\t\t\tcase \"CM\":\n\n\t\t\t\t\tcm++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ML\":\n\n\t\t\t\t\tml++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MC\":\n\n\t\t\t\t\tmc++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"TP\":\n\n\t\t\t\t\ttp++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tmensaje.add(potreros);\n\t\tmensaje.add(reses);\n\t\tmensaje.add(hembras);\n\t\tmensaje.add(machos);\n\t\tmensaje.add(ch);\n\t\tmensaje.add(hl);\n\t\tmensaje.add(nv);\n\t\tmensaje.add(vh);\n\t\tmensaje.add(vp);\n\t\tmensaje.add(cm);\n\t\tmensaje.add(ml);\n\t\tmensaje.add(mc);\n\t\tmensaje.add(tp);\n\n\t\treturn mensaje;\n\t}",
"public long reserva_de_entradas(int identificador_evento, Date fechaevento, Horario[] listahorarios ) throws ParseException {\n fgen.info (\"Identificador del evento\" + identificador_evento);\n fgen.info (\"Fecha del evento\" + fechaevento);\n ArrayList<Horario> horariosReserva = new ArrayList<Horario>();\n for (int i = 0; i < listahorarios.length; i++) {\n \n Horario horario = listahorarios[i];\n fgen.info (\"Horario : \" + horario.getHorario().toString()); \n horariosReserva.add(horario);\n List<Disponibilidad> listadisponibles = listahorarios[i].disponibilidades;\n for (int j = 0; j < listadisponibles.size() ; j++) { \n fgen.info (\" Disponibilidad - Cantidad: \" + listadisponibles.get(j).getCantidad());\n fgen.info (\" Disponibilidad - Precio: \" + listadisponibles.get(j).getPrecio());\n fgen.info (\" Disponibilidad - Sector: \" + listadisponibles.get(j).getSector());\n } \n \n \n } \n //Inicializo o tomo lo que esta en memoria de la lista de reservas\n ListaReservas reservas= new ListaReservas(); \n // busco el evento y que la lista de horarios sea en la que quiero reservar\n ListaEventos eventos = new ListaEventos();\n Calendar c = Calendar.getInstance();\n c.setTime(fechaevento);\n Evento e = eventos.buscarEvento(identificador_evento, c);\n List<Horario> horariosRetornar = new ArrayList<Horario>();\n if(e != null)\n {\n horariosRetornar = e.getHorarios();\n } \n \n if (horariosRetornar != null)\n {\n for (int i = 0; i < horariosRetornar.size(); i++) {\n for (int j = 0; j < listahorarios.length; j++) {\n Date fechaE = horariosRetornar.get(i).getHorario().getTime(); \n Date fechaEventoDate = listahorarios[j].hora.getTime(); \n if(fechaE.equals(fechaEventoDate)) \n { for (int k = 0; k < horariosRetornar.get(i).disponibilidades.size(); k++) {\n for (int l = 0; l < listahorarios[j].disponibilidades.size(); l++) {\n Disponibilidad d= horariosRetornar.get(i).disponibilidades.get(k);\n Disponibilidad r= listahorarios[j].disponibilidades.get(l);\n if (d.cantidad >= r.cantidad && d.sector.equalsIgnoreCase(r.sector) && d.precio==r.precio)\n {\n d.setCantidad(d.cantidad-r.cantidad);\n //Reserva reserv= new Reserva();\n //reservas.contador_Id= reservas.contador_Id +1;\n //reserv.idReserva= reservas.contador_Id;\n //reserv.Estado=1;\n //reserv.idEvento = identificador_evento;\n //reserv.horarios.add(listahorarios[j]);\n //reservas.listaReserva.add(reserv);\n //return reserv.idReserva;\n }\n else if(d.cantidad < r.cantidad && d.sector.equalsIgnoreCase(r.sector) && d.precio==r.precio)\n {\n //Si hay alguna solicitud de de reserva que no se pueda cumplir. Re reorna 0.\n //TODO: Hay que volver para atras las cantidades modificadas.\n return 0;\n }\n \n }\n \n }\n }\n }\n }\n Reserva reserv= new Reserva();\n reservas.contador_Id= reservas.contador_Id +1;\n reserv.idReserva= reservas.contador_Id;\n reserv.Estado=1;\n reserv.idEvento = identificador_evento;\n reserv.horarios = horariosReserva;\n reserv.fechaEvento = c;\n reservas.listaReserva.add(reserv);\n return reserv.idReserva;\n }\n \n return 0;\n }",
"public void zeraEmpates() {\r\n contaEmpates = 0;\r\n }",
"public List<ChamadosAtendidos> contaChamadosAtendidos(int servico) throws SQLException {\r\n\r\n List<ChamadosAtendidos> CAList = new ArrayList<>();\r\n PreparedStatement ps = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? \");\r\n\r\n ps.setInt(1, servico);\r\n ChamadosAtendidos ch = new ChamadosAtendidos();\r\n int contador1 = 0, contador2 = 0, contador3 = 0;\r\n\r\n ResultSet rs = ps.executeQuery();\r\n while (rs.next()) {\r\n contador1++;\r\n }\r\n PreparedStatement ps2 = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? and em_chamado= 4 \");\r\n ps2.setInt(1, servico);\r\n ResultSet rs2 = ps2.executeQuery();\r\n while (rs2.next()) {\r\n contador2++;\r\n }\r\n PreparedStatement ps3 = conn.prepareStatement(\"SELECT Qtde_tentativas FROM `solicitacoes` WHERE servico_id_servico=?\");\r\n ps3.setInt(1, servico);\r\n ResultSet rs3 = ps3.executeQuery();\r\n while (rs3.next()) {\r\n\r\n contador3 = contador3 + rs3.getInt(1);\r\n }\r\n PreparedStatement ps4 = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? and em_chamado= 2 \");\r\n ps4.setInt(1, servico);\r\n\r\n ResultSet rs4 = ps4.executeQuery();\r\n while (rs4.next()) {\r\n\r\n contador3++;\r\n }\r\n ch.setTotalDeChamados(contador1);\r\n ch.setChamadosConcluidos(contador2);\r\n ch.setChamadosRealizados(contador3 + contador2);\r\n CAList.add(ch);\r\n return CAList;\r\n }",
"public void setCalorias(int calorias) {this.calorias = calorias;}",
"@Scheduled(fixedDelay = 86400000)\n\tpublic void contabilizarDiarias() {\n\t\t\n\t\t// Obtem apenas os hospedes que estao no hotel (Data de saida como null)\n\t\tList<Hospede> hospedes = hospedeRepository.obterHospedes();\n\t\t\n\t\tfor(Hospede hospede : hospedes) {\n\t\t\t\n\t\t\t// Verifica se houve alguma cobrança do hospede na data atual\n\t\t\tList<Diaria> diarias = diariaRepository.obterDiariasContabilizadas(LocalDate.now(), hospede.getId());\n\t\t\t\n\t\t\t// Se nao houve nenhuma cobrança ainda, sera contabilizado a cobrança da diaria do hospede\n\t\t\tif(diarias.isEmpty()) {\n\t\t\t\t\n\t\t\t\tCheckIn checkIn = checkInRepository.obterCheckIn(hospede.getId());\n\t\t\t\t\n\t\t\t\tLocalDateTime dataAtual = LocalDateTime.now();\n\t\t\t\t\n\t\t\t\tif(dataAtual.getDayOfWeek() == DayOfWeek.SATURDAY || dataAtual.getDayOfWeek() == DayOfWeek.SUNDAY) { // SABADO OU DOMINGO\n\t\t\t\t\t\n\t\t\t\t\tif(checkIn.getAdicionalVeiculo()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_FINAL_SEMANA + Constantes.ADICIONAL_VEICULO_FINAL_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_FINAL_SEMANA + Constantes.ADICIONAL_VEICULO_FINAL_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_FINAL_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_FINAL_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse { // ALGUM DIA DA SEMANA\n\t\t\t\t\t\n\t\t\t\t\tif(checkIn.getAdicionalVeiculo()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_SEMANA + Constantes.ADICIONAL_VEICULO_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_SEMANA + Constantes.ADICIONAL_VEICULO_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\thospedeRepository.save(hospede);\n\t\t\t\t\n\t\t\t\tcheckInRepository.save(checkIn);\n\t\t\t\t\n\t\t\t\t// REGISTRA QUE O HOSPEDE JA FOI COBRADO NO DIA, EVITA DUPLICIDADE NAS COBRANÇAS\n\t\t\t\tdiariaRepository.save(new Diaria(LocalDate.now(), hospede.getId(), true));\n\t\t\t\t\n\t\t\t\tlog.info(\"DIARIA DO HOSPEDE ID = \" + hospede.getId() + \"FOI CONTABILIZADA!\");\n\t\t\t}\n\t\t}\n\t}",
"public void getGerarEscala(ActionEvent actionEvent) {\n\t\tEventoRepository eventoRep = new EventoRepository(JPAFactory.getEntityManager());\r\n\t\tlistaEvento = eventoRep.buscarEventos(inicio,fim);\r\n\t\t\r\n\t\t//CorEquipesController grupoCores = new CorEquipesController();\r\n\t\tTurmaVoluntarioRepository repository = new TurmaVoluntarioRepository(JPAFactory.getEntityManager());\r\n\t\tList<Voluntario> listaVoluntario = repository.buscarVoluntarioCor(cor);\r\n\t\tList<Voluntario> equipeA = new ArrayList<Voluntario>();\r\n\t\tList<Voluntario> equipeB = new ArrayList<Voluntario>();\r\n\t\tList<Voluntario> listPopulacaoI = new ArrayList<Voluntario>();\t\t\t\r\n\t\tList<Voluntario> escalaA = new ArrayList<Voluntario>();\r\n\t\tList<Voluntario> escalaB = new ArrayList<Voluntario>();\r\n\t\tList<Integer> intervaloSorteio = new ArrayList<Integer>();\r\n\r\n\t\t//Date agora = new Date();\r\n\t\t\r\n\t\tlong tempoIncial = System.currentTimeMillis();\r\n\t\tif(cor!=null) {\t\r\n//\t\t\tFor de verificação para não repetição dos campos sorteados\r\n\t\t\tfor (int i=0; i<listaVoluntario.size(); i++) {\r\n\t\t\t\tintervaloSorteio.add(i);\r\n\t\t\t}\r\n\t\t\t//População inicial\t\r\n\t\t\tfor (int i=0; i<listaVoluntario.size(); i++) {\r\n\t\t\t\tRandom rand = new Random();\r\n\t\t\t\t\r\n\t\t\t\tint posicaoSorteada = rand.nextInt(intervaloSorteio.size());\r\n\t\t\t\t\r\n\r\n\t\t\t\tint conteudoSorteado = intervaloSorteio.get(posicaoSorteada);\r\n\t\t\t\t\r\n\r\n\t\t\t\tlistPopulacaoI.add(listaVoluntario.get(conteudoSorteado));\r\n\r\n\t\t\t\tfor (int j = 0; j<intervaloSorteio.size(); j++) {\r\n\t\t\t\t\tif (conteudoSorteado==intervaloSorteio.get(j)) {\r\n\t\t\t\t\t\tintervaloSorteio.remove(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Gera os pais\r\n\t\t\tfor (int i=0; i<listaVoluntario.size(); i++) {\r\n\t\t\t\tintervaloSorteio.add(i);\r\n\t\t\t}\r\n\t\t\tfor(int k = 0; k<listPopulacaoI.size();k++) {\r\n\t\t\t\tRandom rand = new Random();\r\n\t\t\t\t//vrifica a lista para adicionar na equipe A (pai1)\r\n\t\t\t\tif (intervaloSorteio.isEmpty()) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tint posicaoSorteadaA = rand.nextInt(intervaloSorteio.size());\r\n\t\t\t\t\tint conteudoSorteadoA = intervaloSorteio.get(posicaoSorteadaA);\r\n\t\t\t\t\tequipeA.add(listPopulacaoI.get(conteudoSorteadoA));\r\n\t\t\t\t\tfor (int j = 0; j<intervaloSorteio.size(); j++) {\r\n\t\t\t\t\t\tif (conteudoSorteadoA==intervaloSorteio.get(j)) {\r\n\t\t\t\t\t\t\tintervaloSorteio.remove(j);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//vrifica a lista para adicionar na equipe B (pai2)\r\n\t\t\t\tif(intervaloSorteio.isEmpty()) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tint posicaoSorteadaB = rand.nextInt(intervaloSorteio.size());\r\n\t\t\t\t\tint conteudoSorteadoB = intervaloSorteio.get(posicaoSorteadaB);\r\n\t\t\t\t\tequipeB.add(listPopulacaoI.get(conteudoSorteadoB));\r\n\t\t\t\t\tfor (int j = 0; j<intervaloSorteio.size(); j++) {\r\n\t\t\t\t\t\tif (conteudoSorteadoB==intervaloSorteio.get(j)) {\r\n\t\t\t\t\t\t\tintervaloSorteio.remove(j);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Cruzamento\r\n\t\t\tint tamanhoA = equipeA.size();\r\n\t\t\tint tamanhoB = equipeB.size();\r\n\t\t\tint metadeA = (int) tamanhoA/2;\r\n\t\t\tint metadeB = (int) tamanhoB/2;\r\n\t\t\tfor (int i=0; i<metadeA; i++) {\r\n\t\t\t\tescalaA.add(equipeA.get(i));\r\n\t\t\t}\r\n\t\t\tfor (int i=metadeA; i<tamanhoA; i++) {\r\n\t\t\t\tescalaB.add(equipeA.get(i));\r\n\t\t\t}\r\n\t\t\tfor (int i=0; i<metadeB; i++) {\r\n\t\t\t\tescalaB.add(equipeB.get(i));\r\n\t\t\t}\r\n\t\t\tfor (int i=metadeB; i<tamanhoB; i++) {\r\n\t\t\t\tescalaA.add(equipeB.get(i));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//grava dados na base\r\n\t\t\tint tamanhoEvanto = listaEvento.size();\r\n\t\t\tint metadeTamanhoEv = tamanhoEvanto/2;\r\n\t\t\tfor (int i = 0; i < listaEvento.size(); i ++) {\r\n\t\t\t\tif (listaEvento.get(i).getTipoEvento().getValor().equals(0)) {\r\n\t\t\t\t\tfor(int j = 0; j < equipeA.size(); j++) {\r\n\t\t\t\t\t\tgetEntity().setCorE(cor);\r\n\t\t\t\t\t\tgetEntity().setEvento(listaEvento.get(i));\r\n\t\t\t\t\t\tgetEntity().setVoluntario(equipeA.get(j));\r\n\t\t\t\t\t\tinsert(actionEvent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tfor(int j = 0; j < equipeB.size(); j++) {\r\n\t\t\t\t\t\tgetEntity().setCorE(cor);\r\n\t\t\t\t\t\tgetEntity().setEvento(listaEvento.get(i));\r\n\t\t\t\t\t\tgetEntity().setVoluntario(equipeB.get(j));\r\n\t\t\t\t\t\tinsert(actionEvent);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfor(int j = 0; j < listPopulacaoI.size(); j++) {\r\n\t\t\t\t\t\tgetEntity().setCorE(cor);\r\n\t\t\t\t\t\tgetEntity().setEvento(listaEvento.get(i));\r\n\t\t\t\t\t\tgetEntity().setVoluntario(listPopulacaoI.get(j));\r\n\t\t\t\t\t\tinsert(actionEvent);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Tempo Total %.3f ms%n: \"+(System.currentTimeMillis()-tempoIncial));\r\n\t\tSystem.out.println(listPopulacaoI);\r\n//\t\tlong tempoFinal = System.currentTimeMillis();\r\n//\t\tlong tempoExecucao = tempoFinal-tempoIncial;\r\n\r\n\t\t\r\n\t\t/*System.out.println(\"tempo inicial:\"+tempoIncial);\r\n\t\tSystem.out.println(\"tempo inicial:\"+tempoFinal);\r\n\t\tSystem.out.println(\"Tempo execução do Metodo de gera escala equipe: \"+(tempoFinal-tempoIncial)/1000d);*/\r\n\t}",
"public Calculadora(){\n this.operador1 = 0.0;\n this.operador2 = 0.0;\n this.resultado = 0.0;\n }",
"public final void calcular() {\n long dias = Duration.between(retirada, devolucao).toDays();\n valor = veiculo.getModelo().getCategoria().getDiaria().multiply(new BigDecimal(dias));\n }",
"public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}",
"public void ReservaEfetivadas () {\n Date hoje = new Date ();\n for (int z = 0; z < vecReserva.size(); z++) {\n if (((int) ((((entReserva)vecReserva.elementAt(z)).getDatain().getTime() - (hoje.getTime())) / 86400000L)) == 0){// Reserva será relaizada hj\n if (((entReserva)vecReserva.elementAt(z)).getPagamento().getSituacao() == 0){//Cliente fez todo o pagamento e o quarto será\n vecReservaEfetivadas.add(vecReserva.elementAt(z));\n }\n \n }\n }\n }",
"public void recomendarTempos() {\n ArrayList iTXCH = new ArrayList(); /// Instancias pre fusion\n ArrayList iTYCH = new ArrayList();\n ArrayList iTZCH = new ArrayList();\n\n ArrayList cenTXCH = new ArrayList(); /// Centroides Tempos tempos ch\n ArrayList cenTYCH = new ArrayList();\n ArrayList cenTZCH = new ArrayList();\n\n ArrayList cenTXDB = new ArrayList(); /// centroide tempos db\n ArrayList cenTYDB = new ArrayList();\n ArrayList cenTZDB = new ArrayList();\n\n ArrayList insTXCH = new ArrayList(); /// Instancias fusion\n ArrayList insTYCH = new ArrayList();\n ArrayList insTZCH = new ArrayList();\n\n ArrayList ppTXCH = new ArrayList(); /// centroide promedio ponderado tempos\n ArrayList ppTYCH = new ArrayList();\n ArrayList ppTZCH = new ArrayList();\n\n ArrayList ppTXDB = new ArrayList(); /// centroide promedio ponderado duracion\n ArrayList ppTYDB = new ArrayList();\n ArrayList ppTZDB = new ArrayList();\n\n ArrayList paTXCH = new ArrayList(); /// centroide promedio aritmetico tempos ch\n ArrayList paTYCH = new ArrayList();\n ArrayList paTZCH = new ArrayList();\n\n ArrayList paTXDB = new ArrayList(); /// centroide promedio artimetico tempos db\n ArrayList paTYDB = new ArrayList();\n ArrayList paTZDB = new ArrayList();\n\n////////////////// TEMPO EN X ////////////////////////////// \n ////////// calinsky - harabaz /////////\n if (txchs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXCH = CExtraer.arrayTempoXCprueba;\n iTXCH = CExtraer.arrayTempoXIprueba;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXCH.setText(cenTXCH.get(iposision).toString());\n }\n\n if (txchs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n ppTXCH = CFusionar.arregloPPTX1;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n\n System.out.println(iposision);\n\n }\n }\n valorTXCH.setText(ppTXCH.get(iposision).toString());\n }\n\n if (txchs == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n paTXCH = CFusionar.arregloPATX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXCH.setText(paTXCH.get(iposision).toString());\n\n }\n\n //////////// davies bouldin //////////////\n if (txdbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXDB = CExtraer.arrayTempoXCprueba;\n iTXCH = CExtraer.arrayTempoXIprueba;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB.setText(cenTXDB.get(iposision).toString());\n }\n\n if (txdbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n ppTXDB = CFusionar.arregloPPTX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB.setText(ppTXDB.get(iposision).toString());\n }\n if (txdbs == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n paTXDB = CFusionar.arregloPATX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXDB.setText(paTXDB.get(iposision).toString());\n\n }\n\n ///////////// TEMPO EN Y //////////// \n //////////// calinsky - harabaz /////////////\n if (tychs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYCH = CExtraer.arrayTempoYCprueba;\n iTYCH = CExtraer.arrayTempoYIprueba;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYCH.setText(cenTYCH.get(iposision).toString());\n }\n\n if (tychs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n ppTYCH = CFusionar.arregloPPTY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH.setText(ppTYCH.get(iposision).toString());\n\n }\n\n if (tychs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n paTYCH = CFusionar.arregloPATY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH.setText(paTYCH.get(iposision).toString());\n }\n /////////// davies - bouldin /////////////\n if (tydbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYDB = CExtraer.arrayTempoYCprueba;\n iTYCH = CExtraer.arrayTempoYIprueba;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYDB.setText(cenTYDB.get(iposision).toString());\n }\n\n if (tydbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n ppTYDB = CFusionar.arregloPPTY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB.setText(ppTYDB.get(iposision).toString());\n }\n if (tydbs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n paTYDB = CFusionar.arregloPATY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB.setText(paTYDB.get(iposision).toString());\n }\n\n ///////////// TEMPO EN Z //////////// \n ///////////// calinsky harabaz ///////////////////\n if (tzchs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZCH = CExtraer.arrayTempoZCprueba;\n iTZCH = CExtraer.arrayTempoZIprueba;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZCH.setText(cenTZCH.get(iposision).toString());\n }\n\n if (tzchs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n ppTZCH = CFusionar.arregloPPTZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH.setText(ppTZCH.get(iposision).toString());\n }\n if (tzchs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n paTZCH = CFusionar.arregloPATZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH.setText(paTZCH.get(iposision).toString());\n }\n\n ///////////// davies bouldin /////////////////// \n if (tzdbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZDB = CExtraer.arrayTempoZCprueba;\n iTZCH = CExtraer.arrayTempoZIprueba;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZDB.setText(cenTZDB.get(iposision).toString());\n }\n\n if (tzdbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n ppTZDB = CFusionar.arregloPPTZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB.setText(ppTZDB.get(iposision).toString());\n }\n //////////\n if (tzdbs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n paTZDB = CFusionar.arregloPATZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB.setText(paTZDB.get(iposision).toString());\n }\n\n }",
"private void populaAluno()\n {\n Calendar nasc = Calendar.getInstance();\n nasc.set(Calendar.DAY_OF_MONTH, 24);\n nasc.set(Calendar.MONTH, 03);\n nasc.set(Calendar.YEAR, 1989);\n Aluno c = new Aluno();\n c.setNome(\"Christian \");\n c.setEmail(\"[email protected]\");\n c.setCpf(\"33342523501\");\n c.setAltura(1.76);\n c.setPeso(70);\n c.setSenha(CriptografiaLogic.encriptar(\"r\"));\n c.setRg(\"22233344401\");\n c.setDataNascimento(nasc);\n c.setNumSolicitacao(0);\n alunoDAO.insert(c);\n\n for (int i = 1; i < 500; i++)\n {\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n Aluno a = new Aluno();\n a.setNome(\"Aluno \" + i);\n a.setEmail(\"aluno\" + i + \"@gmail.com\");\n a.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n a.setAltura(NumberLogic.randomDouble(1.60d, 1.99d));\n a.setPeso(NumberLogic.randomInteger(60, 100));\n a.setSenha(CriptografiaLogic.encriptar(\"123\"));\n a.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n a.setDataNascimento(nasc);\n a.setNumSolicitacao(0);\n alunoDAO.insert(a);\n }\n }",
"public void getGerarEscalaGeral(ActionEvent actionEvent) {\n\t\tEventoRepository eventoRep = new EventoRepository(JPAFactory.getEntityManager());\r\n\t\tlistaEvento = eventoRep.buscarEventos(inicio,fim);\r\n\t\t\r\n\t\t//CorEquipesController grupoCores = new CorEquipesController();\r\n\t\tTurmaVoluntarioRepository repository = new TurmaVoluntarioRepository(JPAFactory.getEntityManager());\r\n\t\tList<CorEquipes> listaCorGeral = repository.buscarCorGeral();\r\n\t\tList<Voluntario> listaVoluntarioGeral = repository.buscarVoluntarioGeral();\r\n\t\tList<Voluntario> equipeA = new ArrayList<Voluntario>();\r\n\t\tList<Voluntario> equipeB = new ArrayList<Voluntario>();\r\n\t\tList<Voluntario> listPopulacaoI = new ArrayList<Voluntario>();\t\t\t\r\n\t\tList<Voluntario> escalaA = new ArrayList<Voluntario>();\r\n\t\tList<Voluntario> escalaB = new ArrayList<Voluntario>();\r\n\t\tList<Integer> intervaloSorteio = new ArrayList<Integer>();\r\n\r\n\t//\tFor de verificação para não repetição dos campos sorteados\r\n\t\tfor (int i=0; i<listaVoluntarioGeral.size(); i++) {\r\n\t\t\tintervaloSorteio.add(i);\r\n\t\t}\r\n\t\t//População inicial\t\r\n\t\tfor (int i=0; i<listaVoluntarioGeral.size(); i++) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\t\r\n\t\t\tint posicaoSorteada = rand.nextInt(intervaloSorteio.size());\r\n\t\t\t\r\n\t\t\tint conteudoSorteado = intervaloSorteio.get(posicaoSorteada);\r\n\t\t\t\r\n\t\t\tlistPopulacaoI.add(listaVoluntarioGeral.get(conteudoSorteado));\r\n\t\r\n\t\t\tfor (int j = 0; j<intervaloSorteio.size(); j++) {\r\n\t\t\t\tif (conteudoSorteado==intervaloSorteio.get(j)) {\r\n\t\t\t\t\tintervaloSorteio.remove(j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Gera os pais\r\n\t\tfor (int i=0; i<listaVoluntarioGeral.size(); i++) {\r\n\t\t\tintervaloSorteio.add(i);\r\n\t\t}\r\n\t\tfor(int k = 0; k<listPopulacaoI.size();k++) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\t//vrifica a lista para adicionar na equipe A (pai1)\r\n\t\t\tif (intervaloSorteio.isEmpty()) {\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tint posicaoSorteadaA = rand.nextInt(intervaloSorteio.size());\r\n\t\t\t\tint conteudoSorteadoA = intervaloSorteio.get(posicaoSorteadaA);\r\n\t\t\t\tequipeA.add(listPopulacaoI.get(conteudoSorteadoA));\r\n\t\t\t\tfor (int j = 0; j<intervaloSorteio.size(); j++) {\r\n\t\t\t\t\tif (conteudoSorteadoA==intervaloSorteio.get(j)) {\r\n\t\t\t\t\t\tintervaloSorteio.remove(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//vrifica a lista para adicionar na equipe B (pai2)\r\n\t\t\tif(intervaloSorteio.isEmpty()) {\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tint posicaoSorteadaB = rand.nextInt(intervaloSorteio.size());\r\n\t\t\t\tint conteudoSorteadoB = intervaloSorteio.get(posicaoSorteadaB);\r\n\t\t\t\tequipeB.add(listPopulacaoI.get(conteudoSorteadoB));\r\n\t\t\t\tfor (int j = 0; j<intervaloSorteio.size(); j++) {\r\n\t\t\t\t\tif (conteudoSorteadoB==intervaloSorteio.get(j)) {\r\n\t\t\t\t\t\tintervaloSorteio.remove(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Cruzamento\r\n\t\tint tamanhoA = equipeA.size();\r\n\t\tint tamanhoB = equipeB.size();\r\n\t\tint metadeA = (int) tamanhoA/2;\r\n\t\tint metadeB = (int) tamanhoB/2;\r\n\t\tfor (int i=0; i<metadeA; i++) {\r\n\t\t\tescalaA.add(equipeA.get(i));\r\n\t\t}\r\n\t\tfor (int i=metadeA; i<tamanhoA; i++) {\r\n\t\t\tescalaB.add(equipeA.get(i));\r\n\t\t}\r\n\t\tfor (int i=0; i<metadeB; i++) {\r\n\t\t\tescalaB.add(equipeB.get(i));\r\n\t\t}\r\n\t\tfor (int i=metadeB; i<tamanhoB; i++) {\r\n\t\t\tescalaA.add(equipeB.get(i));\r\n\t\t}\r\n\t\t\r\n\t\t//grava dados na base\r\n\t\tint tamanhoEvanto = listaEvento.size();\r\n\t\tint metadeTamanhoEv = tamanhoEvanto/2;\r\n\t\tfor (int i = 0; i < listaEvento.size(); i ++) {\r\n\t\t\tif (listaEvento.get(i).getTipoEvento().getValor().equals(0)) {\t\r\n\t\t\t\tfor(int j = 0; j < equipeA.size(); j++) {\r\n//\t\t\t\t\tgetEntity().setCorE(listaCorGeral.get(i));\r\n\t\t\t\t\tgetEntity().setEvento(listaEvento.get(i));\r\n\t\t\t\t\tgetEntity().setVoluntario(equipeA.get(j));\r\n\t\t\t\t\tinsert(actionEvent);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t\tfor(int j = 0; j < equipeB.size(); j++) {\r\n//\t\t\t\t\tgetEntity().setCorE(listaCorGeral.get(i));\r\n\t\t\t\t\tgetEntity().setEvento(listaEvento.get(i));\r\n\t\t\t\t\tgetEntity().setVoluntario(equipeB.get(j));\r\n\t\t\t\t\tinsert(actionEvent);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\tfor(int j = 0; j < listPopulacaoI.size(); j++) {\r\n//\t\t\t\t\tgetEntity().setCorE(listaCorGeral.get(i));\r\n\t\t\t\t\tgetEntity().setEvento(listaEvento.get(i));\r\n\t\t\t\t\tgetEntity().setVoluntario(listPopulacaoI.get(j));\r\n\t\t\t\t\tinsert(actionEvent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }",
"public int getFlores(int avenida, int calle);",
"public int getTotalRecaudado()\n {\n return maquina1.getTotal() + maquina2.getTotal();\n }",
"public void recomendarTemposEM() {\n ArrayList iTXCH = new ArrayList(); /// Instancias pre fusion\n ArrayList iTYCH = new ArrayList();\n ArrayList iTZCH = new ArrayList();\n\n ArrayList cenTXCH = new ArrayList(); /// Centroides Tempos tempos ch\n ArrayList cenTYCH = new ArrayList();\n ArrayList cenTZCH = new ArrayList();\n\n ArrayList cenTXDB = new ArrayList(); /// centroide tempos db\n ArrayList cenTYDB = new ArrayList();\n ArrayList cenTZDB = new ArrayList();\n\n ArrayList insTXCH = new ArrayList(); /// Instancias fusion\n ArrayList insTYCH = new ArrayList();\n ArrayList insTZCH = new ArrayList();\n\n ArrayList ppTXCH = new ArrayList(); /// centroide promedio ponderado tempos\n ArrayList ppTYCH = new ArrayList();\n ArrayList ppTZCH = new ArrayList();\n\n ArrayList ppTXDB = new ArrayList(); /// centroide promedio ponderado duracion\n ArrayList ppTYDB = new ArrayList();\n ArrayList ppTZDB = new ArrayList();\n\n ArrayList paTXCH = new ArrayList(); /// centroide promedio aritmetico tempos ch\n ArrayList paTYCH = new ArrayList();\n ArrayList paTZCH = new ArrayList();\n\n ArrayList paTXDB = new ArrayList(); /// centroide promedio artimetico tempos db\n ArrayList paTYDB = new ArrayList();\n ArrayList paTZDB = new ArrayList();\n\n////////////////// TEMPO EN X ////////////////////////////// \n ////////// calinsky - harabaz /////////\n if (txchsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXCH = CExtraer.arrayTempoXCpruebaEM;\n iTXCH = CExtraer.arrayTempoXIpruebaEM;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXCH2.setText(cenTXCH.get(iposision).toString());\n }\n\n if (txchsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n ppTXCH = CFusionarEM.arregloPPTX1EM;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n\n System.out.println(iposision);\n\n }\n }\n valorTXCH2.setText(ppTXCH.get(iposision).toString());\n }\n\n if (txchsEM == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n paTXCH = CFusionarEM.arregloPATX1EM;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXCH2.setText(paTXCH.get(iposision).toString());\n\n }\n\n //////////// davies bouldin //////////////\n if (txdbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXDB = CExtraer.arrayTempoXCpruebaEM;\n iTXCH = CExtraer.arrayTempoXIpruebaEM;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB2.setText(cenTXDB.get(iposision).toString());\n }\n\n if (txdbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n ppTXDB = CFusionarEM.arregloPPTX1EM;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB2.setText(ppTXDB.get(iposision).toString());\n }\n if (txdbsEM == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n paTXDB = CFusionarEM.arregloPATX1EM;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXDB2.setText(paTXDB.get(iposision).toString());\n\n }\n\n ///////////// TEMPO EN Y //////////// \n //////////// calinsky - harabaz /////////////\n if (tychsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYCH = CExtraer.arrayTempoYCpruebaEM;\n iTYCH = CExtraer.arrayTempoYIpruebaEM;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYCH2.setText(cenTYCH.get(iposision).toString());\n }\n\n if (tychsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n ppTYCH = CFusionarEM.arregloPPTY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH2.setText(ppTYCH.get(iposision).toString());\n\n }\n\n if (tychsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n paTYCH = CFusionarEM.arregloPATY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH2.setText(paTYCH.get(iposision).toString());\n }\n /////////// davies - bouldin /////////////\n if (tydbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYDB = CExtraer.arrayTempoYCpruebaEM;\n iTYCH = CExtraer.arrayTempoYIpruebaEM;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYDB2.setText(cenTYDB.get(iposision).toString());\n }\n\n if (tydbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n ppTYDB = CFusionarEM.arregloPPTY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB2.setText(ppTYDB.get(iposision).toString());\n }\n if (tydbsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n paTYDB = CFusionarEM.arregloPATY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB2.setText(paTYDB.get(iposision).toString());\n }\n\n ///////////// TEMPO EN Z //////////// \n ///////////// calinsky harabaz ///////////////////\n if (tzchsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZCH = CExtraer.arrayTempoZCpruebaEM;\n iTZCH = CExtraer.arrayTempoZIpruebaEM;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZCH2.setText(cenTZCH.get(iposision).toString());\n }\n\n if (tzchsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n ppTZCH = CFusionarEM.arregloPPTZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH2.setText(ppTZCH.get(iposision).toString());\n }\n if (tzchsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n paTZCH = CFusionarEM.arregloPATZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH2.setText(paTZCH.get(iposision).toString());\n }\n\n ///////////// davies bouldin /////////////////// \n if (tzdbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZDB = CExtraer.arrayTempoZCpruebaEM;\n iTZCH = CExtraer.arrayTempoZIpruebaEM;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZDB2.setText(cenTZDB.get(iposision).toString());\n }\n\n if (tzdbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n ppTZDB = CFusionarEM.arregloPPTZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB2.setText(ppTZDB.get(iposision).toString());\n }\n //////////\n if (tzdbsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n paTZDB = CFusionarEM.arregloPATZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB2.setText(paTZDB.get(iposision).toString());\n }\n\n }",
"public int getCantidadCalles();",
"public void introducirConsumosHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT * FROM CONSUMO_RESTAURANTE WHERE Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);// mira los consumo de unas fechas\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;\n modelo.addRow(objeto);// mira los consumo de unas fechas\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public void ActualizadorOro(){\n\njavax.swing.Timer ao = new javax.swing.Timer(1000*60, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n\n usuarios = new ArrayList<Usuario>();\n ResultSet rs = st.executeQuery(\"select * from usuarios\");\n while(rs.next()){\n usuarios.add(new Usuario(rs.getString(1), rs.getString(2), rs.getString(3), Integer.parseInt(rs.getString(4)), Integer.parseInt(rs.getString(5)), Integer.parseInt(rs.getString(6)), Integer.parseInt(rs.getString(7))));\n }\n\n //preparamos una consulta que nos lanzara el numero de minas por categoria que tiene cada usuario\n String consulta1 = \"select idEdificio, count(*) from regiones, edificiosregion\"+\n \" where regiones.idRegion=edificiosregion.idRegion\"+\n \" and propietario='\";\n\n String consulta2 = \"' and idEdificio in (1101,1102,1103,1104,1105)\"+\n \" group by idEdificio\";\n\n //recorremos toda la lista sumando el oro, dependiendo del numero de minas que posea\n ResultSet rs2 = null;\n for(Usuario usuario : usuarios){\n rs2 = st.executeQuery(consulta1 + usuario.getNick() + consulta2);\n int oro = 0;\n while(rs2.next()){\n System.out.println(Integer.parseInt(rs2.getString(1)));\n if(Integer.parseInt(rs2.getString(1)) == 1101){\n oro = oro + (rs2.getInt(2) * 100);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1102){\n oro = oro + (rs2.getInt(2) * 150);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1103){\n oro = oro + (rs2.getInt(2) * 300);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1104){\n oro = oro + (rs2.getInt(2) * 800);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1105){\n oro = oro + (rs2.getInt(2) * 2000);\n }\n }\n st.executeQuery(\"UPDATE usuarios SET oro = (SELECT oro+\" + oro + \" FROM usuarios WHERE nick ='\" + usuario.getNick() + \"'\"+\n \") WHERE nick = '\" + usuario.getNick() + \"'\");\n\n }\n st.close();\n rs.close();\n rs2.close();\n conn.close();\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage() + \" Fallo actualizar oro.\");\n }\n\n }\n });\n\n ao.start();\n}",
"public void obtener() {\r\n \t\r\n \tif (raiz!=null)\r\n {\r\n int informacion = raiz.dato;\r\n raiz = raiz.sig;\r\n end = raiz;\r\n System.out.println(\"Obtenemos el dato de la cima: \"+informacion);\r\n }\r\n else\r\n {\r\n System.out.println(\"No hay datos en la pila\");\r\n }\r\n }",
"public void sumar() {\n Acumula.acumulador++;\n }",
"@Override\n\tpublic long getRegantes() {\n\t\treturn model.getRegantes();\n\t}",
"public void mostrarTotales() { \n // Inicializacion de los atributos en 0\n totalPCs = 0;\n totalLaptops = 0;\n totalDesktops = 0; \n /* Recorrido de la lista de computadores para acumular el precio usar instanceof para comparar el tipo de computador */ \n for (Computador pc : computadores){\n if (pc instanceof PCLaptop) {\n totalLaptops += pc.calcularPrecio(); \n } else if (pc instanceof PCDesktop){\n totalDesktops += pc.calcularPrecio();\n }\n }\n totalPCs = totalLaptops + totalDesktops;\n System.out.println(\"El precio total de los computadores es de \" + totalPCs); \n System.out.println(\"La suma del precio de los Laptops es de \" + totalLaptops); \n System.out.println(\"La suma del precio de los Desktops es de \" + totalDesktops);\n }",
"private void Calculation() {\n\t\tint calStd = jetztStunde + schlafStunde;\n\t\tint calMin = jetztMinute + schlafMinute;\n\n\t\ttotalMin = calMin % 60;\n\t\ttotalStunde = calStd % 24 + calMin / 60;\n\n\t}",
"public void afegirPosicio() {\n\t\tfor(int i=0; i<cal.length; ++i){\n\t\t\tcal[i] = new Dia(false);\n\t\t\tfor(int j=0; j<3; ++j) cal[i].getTorns()[j].setPosicio(i);\n\t\t}\n\t}",
"public double getIngresos(){\n return this.ingresos;\n }",
"public Vector listaAsignaturasTotal(String nombre_titulacion)\n {\n try\n { \n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM asignaturatotal \";\n query += \"WHERE tit_nombre='\"+nombre_titulacion+\"' AND activa = 's'\";\n\n //Se crea un vector de asignaturas\n Vector vectorAsignaturas = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n asignatura asignatura = new asignatura();\n\n asignatura.setCodigo(resultado.getString(\"codigo\"));\n asignatura.setTitulo(resultado.getString(\"titulo\"));\n asignatura.setFechaInicio(resultado.getDate(\"fechainicio\"));\n asignatura.setFechaFin(resultado.getDate(\"fechafin\"));\n asignatura.setResponsable(resultado.getString(\"responsable\"));\n asignatura.setEmail(resultado.getString(\"email\"));\n asignatura.setTelefono(resultado.getString(\"telefono\"));\n\n //Se añade la asignatura al vector de asignaturas\n vectorAsignaturas.add(asignatura);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorAsignaturas;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las asignaturas de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }",
"public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];// pago de alojamiento en rango fchas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);\n objeto[3] = resultado.getDate(4);// pago de alojamiento en rango fchas\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();// pago de alojamiento en rango fchas\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"private void calcularOtrosIngresos(Ingreso ingreso)throws Exception{\n\t\tfor(IngresoDetalle ingresoDetalle : ingreso.getListaIngresoDetalle()){\r\n\t\t\tif(ingresoDetalle.getIntPersPersonaGirado().equals(ingreso.getBancoFondo().getIntPersonabancoPk())\r\n\t\t\t&& ingresoDetalle.getBdAjusteDeposito()==null){\r\n\t\t\t\tbdOtrosIngresos = ingresoDetalle.getBdMontoAbono();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void reporteHabitacionMasPopular(TablaModelo modelo){\n ArrayList<ControlVeces> control = new ArrayList<>();\n ControlVeces controlador;\n try {// pago de alojamiento en rango fchas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio, RESERVACION.Id_Habitacion FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Check_In=1;\");\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// pago de alojamiento en rango fchas\n String nombre = Integer.toString(resultado.getInt(6));\n int casilla = numeroObjeto(control,nombre);\n if(casilla>=0){// maneja el resultado// pago de alojamiento en rango fchas\n control.get(casilla).setVeces(control.get(casilla).getVeces()+1);\n }else{// maneja el resultado\n controlador = new ControlVeces(nombre);// pago de alojamiento en rango fchas\n control.add(controlador);\n }\n } // maneja el resultado \n ordenamiento(control);\n int numero = control.size()-1;// el de hasta arriba es el que mas elementos tiene \n String idHabitacionMasPopular = control.get(numero).getNombre();\n this.habitacionPopular= idHabitacionMasPopular;\n introducirDatosHabitacionMasPopular(modelo, idHabitacionMasPopular);\n } catch (SQLException ex) {\n ex.printStackTrace();\n } catch(Exception e){\n \n }\n }",
"public void prinRecaudacion()\n {\n System.out.println(\"La cantidad recaudada por la maquina1 es \" + maquina1.getTotal());\n System.out.println(\"La cantidad recaudada por la maquina2 es \" + maquina2.getTotal());\n System.out.println(\"La cantidad total es\" + ( maquina1.getTotal() + maquina2.getTotal()));\n}",
"private void definirEventos() {\n\t\t\n\t\tbuttonCalcular.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tpainelCentro.removeAll();\n\t\t\t\tpainelCentro.repaint();\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(txtNumero.requestFocusInWindow())\n\t\t\t\t validaNulos(txtNumero, \"Tabuada\");\n\t\t\t\t\n\t\t\t\tif(txtInicial.requestFocusInWindow())\n\t\t\t\t validaNulos(txtInicial, \"Inicial\");\n\t\t\t\t\n\t\t\t\tif(txtFinal.requestFocusInWindow())\n\t\t\t\t validaNulos(txtFinal, \"Final\");\n\n\t\t\t\ttry {\n\t\t\t\t\tInteger.valueOf(txtNumero.getText());\t\t\t\t\n\t\t\t\t} catch (NumberFormatException ex) {\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Valor Tabuada deve ser numerico\");\t\n\t\t\t\t\ttxtNumero.setText(null);\n\t\t\t\t\ttxtNumero.grabFocus();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tInteger.valueOf(txtInicial.getText());\t\t\t\t\n\t\t\t\t} catch (NumberFormatException ex) {\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Valor Inicial deve ser numerico.\");\t\t\n\t\t\t\t\ttxtInicial.grabFocus();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tInteger.valueOf(txtFinal.getText());\n\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Valor Final deve ser numerico\");\n\t\t\t\t\ttxtFinal.grabFocus();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Integer.valueOf(txtFinal.getText()) < Integer.valueOf(txtInicial.getText())) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Valor Inicial maior que final\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tEx01Class classe = new Ex01Class();\n\t\t\t\tList<String> ListaDeValores = classe.listarTabuada(txtNumero.getText(), txtInicial.getText(), txtFinal.getText());\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < ListaDeValores.size(); i++) {\n\t\t\t\t\tJLabel labelNovo = new JLabel();\n\t\t\t\t\tlabelNovo.setText(ListaDeValores.get(i));\n\t\t\t\t\tlabelNovo.setHorizontalAlignment(SwingConstants.LEFT);\n\t\t\t\t\tpainelCentro.add(labelNovo);\t\n\t\t\t\t}\n\t\t\t\tpainelCentro.revalidate();\n\t\t\t}\n\t\t});\n\t}",
"public int obtenerHoraMasAccesos()\n {\n int numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora = 0;\n int horaConElNumeroDeAccesosMaximo = -1;\n\n if(archivoLog.size() >0){\n for(int horaActual=0; horaActual < 24; horaActual++){\n int totalDeAccesosParaHoraActual = 0;\n //Miramos todos los accesos\n for(Acceso acceso :archivoLog){\n if(horaActual == acceso.getHora()){\n totalDeAccesosParaHoraActual++;\n }\n }\n if(numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora<=totalDeAccesosParaHoraActual){\n numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora =totalDeAccesosParaHoraActual;\n horaConElNumeroDeAccesosMaximo = horaActual;\n }\n }\n }\n else{\n System.out.println(\"No hay datos\");\n }\n return horaConElNumeroDeAccesosMaximo;\n }",
"@Override\n\tvoid geraDados() {\n\n\t}",
"public void CobaHitung()\n {\n\n\n PrayTimeCounter prayers = new PrayTimeCounter();\n\n prayers.setTimeFormat(prayers.getTime24());\n prayers.setCalcMethod(prayers.getMWL());\n prayers.setAsrJuristic(prayers.getShafii());\n prayers.setAdjustHighLats(prayers.getAngleBased());\n int[] offsets = {0, 0, 0, 0, 0, 0, 0}; // {Fajr,Sunrise,Dhuhr,Asr,Sunset,Maghrib,Isha}\n prayers.tune(offsets);\n\n Date now = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(now);\n\n ArrayList<String> prayerTimes = prayers.getPrayerTimes(cal,\n Anshitu.getApp().getLatitude(), Anshitu.getApp().getLongitude(), Anshitu.getApp().getTimezone());\n subuh.setText(prayerTimes.get(0));\n terbit.setText(prayerTimes.get(1));\n duhur.setText(prayerTimes.get(2));\n ashar.setText(prayerTimes.get(3));\n maghrib.setText(prayerTimes.get(4));\n isya.setText(prayerTimes.get(prayerTimes.size()-1));\n /*ArrayList<String> prayerNames = prayers.getTimeNames();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerNames);\n jeda.setAdapter(adapter);\n ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerTimes);\n durasi.setAdapter(adapter1);*/\n }",
"public List viewTotalInscritosBD();",
"public void introducirPagosALojamientoClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);// pago de alojamiento en rango fchas\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Dpi_Cliente=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n declaracion.setString(3, dpiCliente);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);// pago de alojamiento en rango fchas\n objeto[3] = resultado.getDate(4);\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public int getAyudantes(){\n return ayudantes; \n }",
"public int getDineroRecaudadoPorMaquina1()\n {\n return maquina1.getTotal();\n }",
"private void populaHorarioAula()\n {\n Calendar hora = Calendar.getInstance();\n hora.set(Calendar.HOUR_OF_DAY, 18);\n hora.set(Calendar.MINUTE, 0);\n HorarioAula h = new HorarioAula(hora, \"Segunda e Quinta\", 1, 3, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Terca e Sexta\", 1, 3, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 15);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 10);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Quarta e Sexta\", 3, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Sexta\", 1, 1, 2);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 19);\n h = new HorarioAula(hora, \"Sexta\", 2, 1, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Segunda\", 3, 6, 4);\n horarioAulaDAO.insert(h);\n\n }",
"public void introducirConsumosHabitacion(TablaModelo modelo,String idHabitacion) {\n int idHabitacionInt = Integer.parseInt(idHabitacion);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Id_Habitacion=?\");\n declaracion.setInt(1, idHabitacionInt);// mira los consumo de unas fechas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[7];// mira los consumo de unas fechas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);// mira los consumo de unas fechas\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}",
"@Override\n public Collection<resumenSemestre> resumenSemestre(int idCurso, int mesApertura, int mesCierre) throws Exception {\n Collection<resumenSemestre> retValue = new ArrayList();\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"select ma.nombremateria, p.idcuestionario as test, \"\n + \"round(avg(p.puntaje),2) as promedio, cue.fechainicio, MONTH(cue.fechacierre) as mes \"\n + \"from puntuaciones p, cuestionario cue, curso cu, materia ma \"\n + \"where cu.idcurso = ma.idcurso and ma.idmateria = cue.idmateria \"\n + \"and cue.idcuestionario = p.idcuestionario and cu.idcurso = ? \"\n + \"and MONTH(cue.fechacierre) >= ? AND MONTH(cue.fechacierre) <= ? and YEAR(cue.fechacierre) = YEAR(NOW())\"\n + \"GROUP by ma.nombremateria, MONTH(cue.fechacierre) ORDER BY ma.nombremateria\");\n pstmt.setInt(1, idCurso );\n pstmt.setInt(2, mesApertura);\n pstmt.setInt(3, mesCierre);\n rs = pstmt.executeQuery();\n while (rs.next()) { \n retValue.add(new resumenSemestre(rs.getString(\"nombremateria\"), rs.getInt(\"test\"), rs.getInt(\"promedio\"), rs.getInt(\"mes\")));\n }\n return retValue;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n\n\n }",
"static int [] GerarAleatorio()\n {\n Random gerar = new Random();\n int [] Aleatorio = new int [pergu]; // Cria um Vetor com o tamanho de quantidade de perguntas\n \n \n int pos1, pos2, auxilio; \n \n for (int i = 0; i < Aleatorio.length; i++) \n {\n Aleatorio[i] = i ; // preenche o vetor\n }\n \n for (int i = 0; i < 1000; i++) //Quantidade de vezes que as perguntas serão embaralhadas \n {\n pos1 = gerar.nextInt(Aleatorio.length);\n pos2 = gerar.nextInt(Aleatorio.length);\n //troca \n auxilio = Aleatorio[pos1]; //guarda o valor da posição 1\n \n Aleatorio [pos1] = Aleatorio[pos2]; //troca o valor de 1 para 2\n Aleatorio[pos2] = auxilio; //troca o valor de 2 para o valor que estava na 1\n }\n \n \n return Aleatorio; \n }",
"public void imprimirResultados(){\n System.out.println(\"t (tiempo actual) \"+t);\n \n \n System.out.println(\"\\nGanancia total: $\"+R);\n System.out.println(\"Costos por mercaderia comprada: $\"+C);\n System.out.println(\"Costos por mantenimiento inventario: $\"+H);\n System.out.println(\"Ganancia promeio de la tienda por unidad de tiempo: $\"+(R-C-H)/T);\n \n }",
"public int getPrecios()\r\n {\r\n for(int i = 0; i < motos.size(); i++)\r\n {\r\n precio_motos += motos.get(i).getCoste();\r\n }\r\n \r\n return precio_motos;\r\n }",
"public void AddNroCitasRealizadas() {\n\t\tthis.NroCitasRealizadas = this.NroCitasRealizadas+1;\n\t}",
"public int getCurrRuptures();",
"public int getCuerdas(){\n\treturn this.cuerdas;\n }",
"public void result() {\n\t\tthis.animais = new ArrayList<Animal>();\n\t\tanimais = relProducaoFacade.relAnimaisPorEntrada(rebanhosMarcados, inicio, fim);\n\t\tcriaGraficoPizza();\t\t\n\t\tinicializaEntradas();\n\t}",
"private int sumaCen(){\n int kasa = 0;\n for(Restauracja r :zamowioneDania){\n kasa+=r.getCena();\n }\n return kasa;\n }",
"public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d * 10 + u * 1;\n //Si es igual se abre.\n if (contrasena == validar) {\n etiResultado.setText(\"Caja Abierta\");\n }\n //Si es menor nos indica que es mas grande\n if (validar < contrasena) {\n etiResultado.setText(\"El número secreto es mayor\");\n }\n //Si es mayot nos indica que es mas pequeño.\n if (validar > contrasena) {\n etiResultado.setText(\"El número secreto es menor\");\n }\n }",
"public Vector listaAsignaturas(String nombre_titulacion)\n {\n try\n {\n Date fechaActual = new Date();\n SimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM asignaturatotal \";\n query += \"WHERE fechainicio <='\" + formato.format(fechaActual) +\"' \";\n query += \"AND fechafin >= '\"+formato.format(fechaActual)+\"' AND tit_nombre='\"+nombre_titulacion+\"' AND activa = 's'\";\n\n //Se crea un vector de asignaturas\n Vector vectorAsignaturas = new Vector();\n\n //Se ejecuta la query \n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n \n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n asignatura asignatura = new asignatura();\n \n asignatura.setCodigo(resultado.getString(\"codigo\"));\n asignatura.setTitulo(resultado.getString(\"titulo\"));\n asignatura.setFechaInicio(resultado.getDate(\"fechainicio\"));\n asignatura.setFechaFin(resultado.getDate(\"fechafin\"));\n asignatura.setResponsable(resultado.getString(\"responsable\"));\n asignatura.setEmail(resultado.getString(\"email\"));\n asignatura.setTelefono(resultado.getString(\"telefono\"));\n \n //Se añade la asignatura al vector de asignaturas\n vectorAsignaturas.add(asignatura);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorAsignaturas;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las asignaturas de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }",
"public ArrayList<Comobox> fontesRendimentos()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_FONTEPAGAMENTO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"REALID\"), rs.getString(\"FONTE\")));\n } \n }\n rs.close();\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }",
"@Override\n public long minutosLibres(Integer idEstacion, Date inicio, Date fin) {\n long minutos = Math.abs(fin.getTime() - inicio.getTime())/60000;\n List<Ejecucion> ejecuciones = null;\n String sql = \"SELECT eje FROM Recurso rec, Ejecucion eje WHERE rec.estacion.idestaciones = :idEstacion AND eje.recurso.idrecurso = rec.idrecurso AND eje.fechafin >= :inicio AND eje.fechainicio < :fin\";\n ejecuciones = getCurrentSession().createQuery(sql).setParameter(\"idEstacion\", idEstacion).setParameter(\"inicio\", inicio).setParameter(\"fin\", fin).list();\n \n if (ejecuciones != null) {\n for (Ejecucion next : ejecuciones) {\n Date inicioEjecucion = next.getFechainicio();\n Date finEjecucion = next.getFechafin();\n if (inicioEjecucion.before(inicio) && finEjecucion.before(fin)) {\n //Comienza en inicio y finaliza en el fin de la ejecucion\n minutos = minutos - Math.abs(finEjecucion.getTime() - inicio.getTime())/60000;\n\n } else if (inicioEjecucion.after(inicio) && finEjecucion.before(fin)) {\n //Comienza en inicio de la ejecucion y finaliza en el fin de la ejecucion\n minutos = minutos - Math.abs(fin.getTime() - inicioEjecucion.getTime())/60000;\n\n }else if (inicioEjecucion.after(inicio) && finEjecucion.after(fin)){\n //Comienza en inicio de la ejecucion y finaliza en el fin\n minutos = minutos - Math.abs(fin.getTime() - inicioEjecucion.getTime())/60000;\n\n } else if (inicioEjecucion.before(inicio) && finEjecucion.after(fin)) {\n //Comienza en inicio y finaliza en el fin\n minutos = minutos - Math.abs(fin.getTime() - inicio.getTime())/60000;\n }\n /*if (inicioEjecucion.before(inicio) && finEjecucion.before(fin)) {\n //Comienza en inicio y finaliza en el fin de la ejecucion\n minutos = minutos + (fin.getTime() - inicio.getTime())/60000;\n\n } else if (inicioEjecucion.after(inicio) && finEjecucion.before(fin)) {\n //Comienza en inicio de la ejecucion y finaliza en el fin de la ejecucion\n minutos = minutos + ((fin.getTime() - inicio.getTime()) + (inicioEjecucion.getTime() - inicio.getTime()))/60000;\n\n }else if (inicioEjecucion.after(inicio) && finEjecucion.after(fin)){\n //Comienza en inicio de la ejecucion y finaliza en el fin\n minutos = minutos + Math.abs(inicioEjecucion.getTime() - inicio.getTime())/60000;\n\n }*/\n }\n }\n return minutos;\n }",
"public void introducirConsumosClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Dpi_Cliente=? AND Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setString(1, dpiCliente);\n declaracion.setDate(2,fechaInicialSql);\n declaracion.setDate(3,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);// mira los consumo de unas fechas\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"private int contabilizaHorasNoLectivas(ArrayList<FichajeRecuentoBean> listaFichajesRecuento, ProfesorBean profesor, boolean guardar, int mes) {\r\n int segundos=0;\r\n for (FichajeRecuentoBean fichajeRecuento : listaFichajesRecuento) {\r\n// System.out.println(fichajeRecuento.getFecha()+\" \"+fichajeRecuento.getHoraEntrada()+\"->\"+fichajeRecuento.getHoraSalida()+\" => \"+UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida()));\r\n segundos+=UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida());\r\n \r\n DetalleInformeBean detalleInforme=new DetalleInformeBean();\r\n detalleInforme.setIdProfesor(profesor.getIdProfesor());\r\n detalleInforme.setTotalHoras(UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida()));\r\n detalleInforme.setFecha(fichajeRecuento.getFecha());\r\n detalleInforme.setHoraIni(fichajeRecuento.getHoraEntrada());\r\n detalleInforme.setHoraFin(fichajeRecuento.getHoraSalida());\r\n detalleInforme.setTipoHora(\"NL\");\r\n if(guardar && detalleInforme.getTotalHoras()>0)GestionDetallesInformesBD.guardaDetalleInforme(detalleInforme, \"contabilizaHorasNoLectivas\", mes);\r\n \r\n }\r\n return segundos;\r\n }",
"@Override\n public long minutosOcupados(Integer idEstacion, Date inicio, Date fin) {\n long minutos = 0;\n String sql = \"SELECT eje FROM Recurso rec, Ejecucion eje WHERE rec.idestacion = :idEstacion AND eje.idrecurso = rec.idrecurso AND eje.fechafin >= :inicio AND eje.fechainicio < :fin\";\n List<Ejecucion> ejecuciones = getCurrentSession().createQuery(sql).setParameter(\"idEstacion\", idEstacion).setParameter(\"inicio\", inicio).setParameter(\"fin\", fin).list();\n for (Ejecucion next : ejecuciones) {\n Date inicioEjecucion = next.getFechainicio();\n Date finEjecucion = next.getFechafin();\n if (inicioEjecucion.before(inicio) && finEjecucion.before(fin)) {\n //Comienza en inicio y finaliza en el fin de la ejecucion\n minutos = minutos + Math.abs(finEjecucion.getTime() - inicio.getTime())/60000;\n \n } else if (inicioEjecucion.after(inicio) && finEjecucion.before(fin)) {\n //Comienza en inicio de la ejecucion y finaliza en el fin de la ejecucion\n minutos = minutos + Math.abs(fin.getTime() - inicioEjecucion.getTime())/60000;\n \n }else if (inicioEjecucion.after(inicio) && finEjecucion.after(fin)){\n //Comienza en inicio de la ejecucion y finaliza en el fin\n minutos = minutos + Math.abs(fin.getTime() - inicioEjecucion.getTime())/60000;\n \n } else if (inicioEjecucion.before(inicio) && finEjecucion.after(fin)) {\n //Comienza en inicio y finaliza en el fin\n minutos = minutos + Math.abs(fin.getTime() - inicio.getTime())/60000;\n }\n }\n return minutos;\n }",
"public Socio getSocioInfoAtualizar() {\n\n ArrayList<Socio> listaSocio = new ArrayList<Socio>();\n // iniciando a conexao\n connection = BancoDados.getInstance().getConnection();\n System.out.println(\"conectado e preparando listagem para pegar Socio\"); \n Statement stmt = null;\n\n\n try {\n stmt = connection.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM alterados\");\n\n // Incluindo Socios na listaSocios que vai ser retornada\n while (rs.next()) {\n Socio socio = new Socio (rs.getString(\"nomeSocio\"),rs.getString(\"cpfSocio\"),rs.getString(\"rgSocio\"),\n rs.getString(\"matSocio\"),rs.getString(\"sexoSocio\"),rs.getString(\"diaNascSocio\"),\n rs.getString(\"mesNascSocio\"),rs.getString(\"anoNascSocio\"),rs.getString(\"enderecoSocio\"),\n rs.getString(\"numEndSocio\"),rs.getString(\"bairroSocio\"),rs.getString(\"cidadeSocio\"),\n rs.getString(\"estadoSocio\"),rs.getString(\"foneSocio\"),rs.getString(\"celSocio\"),\n rs.getString(\"emailSocio\"),rs.getString(\"blocoSocio\"), rs.getString(\"funcaoSocio\"),rs.getInt(\"idSocio\"), rs.getInt(\"idSocioPK\"));\n listaSocio.add(socio);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n\n } finally {\n // este bloco finally sempre executa na instrução try para\n // fechar a conexão a cada conexão aberta\n try {\n stmt.close();\n connection.close();\n } catch (SQLException e) {\n System.out.println(\"Erro ao desconectar\" + e.getMessage());\n }\n }\n\n \n Socio socioMax = new Socio();\n\n socioMax = listaSocio.get(0);\n\n //Se houver mais de um socio na lista vai procurar o de maior ID\n if(listaSocio.size()-1 > 0){\n\n for(int i=0; i<= listaSocio.size()-1; i++){\n\n Socio socio = new Socio();\n socio = listaSocio.get(i);\n\n if(socio.getIdAlterado()>= socioMax.getIdAlterado() ){\n socioMax = socio;\n }\n\n }\n\n }\n //Se não pega o primeiro\n else {\n socioMax = listaSocio.get(0);\n \n }\n\n System.out.println(socioMax.getIdAlterado());\n\n //Retorna o socio de maior ID, logo o ultimo inserido.\n return socioMax;\n }",
"long getExpirations();",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }",
"public void menuprecoperiodo(String username) {\n Scanner s=new Scanner(System.in);\n LogTransportadora t=b_dados.getTrasnportadoras().get(username);\n double count=0;\n try {\n ArrayList<Historico> hist = b_dados.buscaHistoricoTransportadora(t.getCodEmpresa());\n System.out.println(\"Indique o ano:\");\n int ano=s.nextInt();\n System.out.println(\"Indique o mês\");\n int mes=s.nextInt();\n System.out.println(\"Indique o dia\");\n int dia=s.nextInt();\n for(Historico h: hist){\n LocalDateTime date=h.getDate();\n if(date.getYear()==ano && date.getMonthValue()==mes && date.getDayOfMonth()==dia){\n count+=h.getKmspercorridos()*t.getPrecokm();\n }\n }\n System.out.println(\"O total fatorado nesse dia foi de \" + count +\"€\");\n }\n catch (TransportadoraNaoExisteException e){\n System.out.println(e.getMessage());\n }\n }",
"public void sumar(){\n recogidaDatos();\n System.out.println(\"El resultado de la suma es: \" + (numerando1 + numerando2));\n System.out.println(\"***********************************\");\n\n }",
"public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }",
"int getSumaAdunata();",
"public void generTirarDados() {\n\r\n\t}",
"public Double getTotalOliDOdeEnvasadoresEntreDates(Long temporadaId, Date dataInici, Date dataFi, Integer idAutorizada) throws InfrastructureException {\r\n\t\tlogger.debug(\"getTotalOliDOdeEnvasadoresEntreDates ini\");\r\n//\t\tCollection listaTrasllat = getEntradaTrasladosEntreDiasoTemporadas(temporadaId, dataInici, dataFi);\r\n\t\tCollection listaTrasllat = null;\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\tdouble litros = 0;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString q = \"from Trasllat tdi where tdi.retornatEstablimentOrigen = true \";\r\n\t\t\tif(dataInici != null){\r\n\t\t\t\tString fi = df.format(dataInici);\r\n\t\t\t\tq = q+ \" and tdi.data >= '\"+fi+\"' \";\r\n\t\t\t}\r\n\t\t\tif(dataFi != null){\r\n\t\t\t\tString ff = df.format(dataFi);\r\n\t\t\t\tq = q+ \" and tdi.data <= '\"+ff+\"' \";\r\n\t\t\t}\r\n\t\t\tlistaTrasllat = getHibernateTemplate().find(q);\t\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getTotalOliDOdeEnvasadoresEntreDates failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\t\r\n\t\t//Para cada uno de lor registro Trasllat separamos los depositos y devolvemos un objeto rasllatDipositCommand\r\n\t\tif (listaTrasllat != null){\r\n\t\t\tfor(Iterator it=listaTrasllat.iterator();it.hasNext();){\r\n\t\t\t\tTrasllat trasllat = (Trasllat)it.next();\r\n\t\t\t\tif(trasllat.getDiposits()!= null){\r\n\t\t\t\t\tfor(Iterator itDip=trasllat.getDiposits().iterator();itDip.hasNext();){\r\n\t\t\t\t\t\tDiposit diposit = (Diposit)itDip.next();\r\n\t\t\t\t\t\tif(idAutorizada!= null && diposit.getPartidaOli() != null && diposit.getPartidaOli().getCategoriaOli() !=null && diposit.getPartidaOli().getCategoriaOli()!= null){\r\n\t\t\t\t\t\t\tif(diposit.getPartidaOli().getCategoriaOli().getId().intValue() == idAutorizada.intValue() && diposit.getVolumActual()!= null){\r\n\t\t\t\t\t\t\t\tlitros+= diposit.getVolumActual().doubleValue();\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.debug(\"getTotalOliDOdeEnvasadoresEntreDates fin\");\r\n\t\treturn Double.valueOf(String.valueOf(litros));\r\n\t}",
"public void notaFinal() {\n\n for (int i = 0; i <= (nombres.size() - 1); i++) {\n\n notaFinal.add((notas.get(0) + notas.get(1) + notas.get(2)) / 3);\n\n }\n\n }",
"public int rekisteroi() {\r\n alId = seuraavaNro;\r\n seuraavaNro++;\r\n\r\n return seuraavaNro;\r\n }",
"private void calculaIA(int DiffTime) {\n\ttimerTempoEntreTiros+=DiffTime;\n\t\n\t\t\n\t\tif (round>0) \n\t\t\testado=0;\n\t\telse estado=1;\n\t\t\t\n\t\tif (estado==0) {\n\t\t\trecarregando=(false);\n\n\t\t\tif (timerTempoEntreTiros>=Constantes.HE_tempoEntreTiros) {\n\t\t\t\t\n\t\t\t\tif (atirou&&soltouTiro) {\t\n\t\t\t\t\tsoltouTiro=false;\n\t\t\t\t\tatira();\n\t\t\t\t\ttimerTempoEntreTiros=0;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!atirou)\n\t\t\t\t\tsoltouTiro=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (estado==1) {\n\t\t\t\n\t\t\t\n\t\t\ttempoRecarrega += DiffTime;\n\t\t\t\n\t\t\trecarregando=(true);\n\t\t\tif (mag<1)\n\t\t\t\testado=2;\n\t\t\t\t\n\t\t\tif (tempoRecarrega>=Constantes.HE_tempoRecarrega) {\n\t\t\t\t\n\t\t\t\tif (mag >=1) {\n\t\t\t\t\ttempoRecarrega=(0);\n\t\t\t\t\tround=(Constantes.HE_round);\n\t\t\t\t\tmag-=1;\n\t\t\t\t\testado=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (estado==2) {\n\t\t\t\n\t\t\tif (round>0) \n\t\t\t\testado=0;\n\t\t\trecarregando=(false);\n\n\t\t\t\n\t\t}\n\t}",
"public String execute() {\n\t\ttry {\n\t\t\tHashMap<Integer, RigaVenditeCommercianti> map = new HashMap<Integer, RigaVenditeCommercianti>();\n\t\t\tlistaTotali = new LinkedList<RigaVenditeCommercianti>();\n\t\t\t\n\t\t\tFatture fatture = new Fatture();\n\t\t\tfatture.setOrderByCliente();\n\t\t\tCollection colFatture = fatture.getFatture(dataDal, dataAl);\n\t\t\tIterator itr = colFatture.iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tFattura fattura = (Fattura) itr.next();\t\n\t\t\t\tfattura.calcolaTotali();\n\t\t\t\tif (map.containsKey(fattura.getIdCliente().intValue())) {\n\t\t\t\t\t//Aggiungi totali alla riga attuale\n\t\t\t\t\tRigaVenditeCommercianti riga = map.get(fattura.getIdCliente().intValue());\n\t\t\t\t\triga.setTotaleFattura(riga.getTotaleFattura().add(fattura.getTotaleFattura()));\n\n\t\t\t\t\t//CALCOLO IMPONIBILI\n\t\t\t\t\tfattura.calcolaTotali();\n\t\t\t\t\tHashMap<BigDecimal, BigDecimal[]> imponibili = fattura.getImponibili();\n\t\t\t\t\t\n\t\t\t\t\t//IVA AL 4\n\t\t\t\t\tif (imponibili.containsKey(riga.getIva1())) { //IVA AL 4\n\t\t\t\t\t\triga.setImponibile1(riga.getImponibile1().add(imponibili.get(riga.getIva1())[0]));\n\t\t\t\t\t\triga.setImposta1(riga.getImposta1().add(imponibili.get(riga.getIva1())[1]));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//IVA AL 10\n\t\t\t\t\tif (imponibili.containsKey(riga.getIva2())) {\n\t\t\t\t\t\triga.setImponibile2(riga.getImponibile2().add(imponibili.get(riga.getIva2())[0]));\n\t\t\t\t\t\triga.setImposta2(riga.getImposta2().add(imponibili.get(riga.getIva2())[1]));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//IVA AL 20\n\t\t\t\t\tif (imponibili.containsKey(riga.getIva2())) {\n\t\t\t\t\t\triga.setImponibile3(riga.getImponibile3().add(imponibili.get(riga.getIva3())[0]));\n\t\t\t\t\t\triga.setImposta3(riga.getImposta3().add(imponibili.get(riga.getIva3())[1]));\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t//Crea riga per cliente\n\t\t\t\t\tRigaVenditeCommercianti riga = new RigaVenditeCommercianti();\n\t\t\t\t\triga.setCliente(fattura.getCliente());\n\t\t\t\t\triga.setTotaleFattura(fattura.getTotaleFattura());\n\t\t\t\t\t\n\t\t\t\t\t//CALCOLO IMPONIBILI\n\t\t\t\t\tHashMap<BigDecimal, BigDecimal[]> imponibili = fattura.getImponibili();\n\t\t\t\t\tIvas dao = new Ivas();\n\t\t\t\t\tdao.setOrderByDescrizione(DataAccessObject.ORDER_ASC);\n\t\t\t\t\tCollection aliquote = dao.getElements();\n\t\t\t\t\t\n\t\t\t\t\tint index = 1;\n\t\t\t\t\tfor(Object obj : aliquote)\n\t\t\t\t\t{\n\t\t\t\t\t\tIva iva = (Iva)obj;\n\t\t\t\t\t\tif(iva.getValore().floatValue() < 4) continue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tBigDecimal imponibile = new BigDecimal(0);\n\t\t\t\t\t\tBigDecimal imposta = new BigDecimal(0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(imponibili.containsKey(iva.getValore()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\timponibile = imponibili.get(iva.getValore())[0];\n\t\t\t\t\t\t\timposta = imponibili.get(iva.getValore())[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(index == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\triga.setIva1(iva.getValore());\n\t\t\t\t\t\t\triga.setImponibile1(imponibile);\n\t\t\t\t\t\t\triga.setImposta1(imposta);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(index == 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\triga.setIva2(iva.getValore());\n\t\t\t\t\t\t\triga.setImponibile2(imponibile);\n\t\t\t\t\t\t\triga.setImposta2(imposta);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(index == 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\triga.setIva3(iva.getValore());\n\t\t\t\t\t\t\triga.setImponibile3(imponibile);\n\t\t\t\t\t\t\triga.setImposta3(imposta);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(index == 3) break;\n\t\t\t\t\t\t\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tmap.put(fattura.getIdCliente().intValue(), riga);\n\t\t\t\t\tlistaTotali.add(riga);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tstampaErrore(\"PrintVendite.execute()\", e);\n\t\t\treturn ERROR;\n\t\t}\n\t\treturn SUCCESS;\n\t}",
"long buscarUltimo();",
"@Override\r\n\tpublic void entregarDinero() {\n\t\tSystem.out.println(\"Total de dinero entrgado\");\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n operacion.setNumero1(Integer.parseInt(vistaCalculadora.numero_1.getText()));\n operacion.setNumero2(Integer.parseInt(vistaCalculadora.numero_2.getText()));\n /**\n * Se llama la funcion de \n */\n vistaCalculadora.resultado.setText(operacion.Resta());\n }",
"public void calculos() {\n a = a1+a2+a3;\n b = b1+b2+b3;\n c = c1+c2+c3;\n }",
"public synchronized double getTotal(){\n float CantidadTotal=0;\n Iterator it = getElementos().iterator();\n while (it.hasNext()) {\n ArticuloVO e = (ArticuloVO)it.next();\n CantidadTotal=CantidadTotal+(e.getCantidad()*e.getPrecio());\n}\n\n \n return CantidadTotal;\n\n }",
"public int getEgresosPorCompras(){\n return this.egresosPorCompras;\n }",
"public int getAciertos() {\r\n return aciertos;\r\n }",
"public void calcularCost() {\r\n cost = 0;\r\n int a = 0;\r\n try {\r\n String r = DataR.toString()+ \" \" + horaR;\r\n String d = DataD.toString()+ \" \" + horaD;\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n Date dateR = simpleDateFormat.parse(r);\r\n Date dateD = simpleDateFormat.parse(d);\r\n a = (int) ((dateD.getTime() - dateR.getTime())/(1000*3600));\r\n \r\n \r\n } catch (ParseException ex) {\r\n Logger.getLogger(Reserva.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(a > 24) {\r\n cost += 15*(a/(24));\r\n a -= (((int)(a/24))*24);\r\n }\r\n if(a%3600 == 0) {\r\n cost += 1;\r\n }\r\n if(a%3600 > 0) {\r\n cost += 1;\r\n }\r\n \r\n }",
"public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }",
"public void updateCounts() {\n\n Map<Feel, Integer> counts_of = new HashMap<>();\n\n for (Feel feeling : Feel.values()) {\n counts_of.put(feeling, 0);\n }\n\n for (FeelingRecord record : this.records) {\n counts_of.put(record.getFeeling(), counts_of.get(record.getFeeling()) + 1);\n }\n\n this.angry_count.setText(\"Anger: \" + counts_of.get(Feel.ANGER).toString());\n this.fear_count.setText(\"Fear: \" + counts_of.get(Feel.FEAR).toString());\n this.joyful_count.setText(\"Joy: \" + counts_of.get(Feel.JOY).toString());\n this.love_count.setText(\"Love: \" + counts_of.get(Feel.LOVE).toString());\n this.sad_count.setText(\"Sad:\" + counts_of.get(Feel.SADNESS).toString());\n this.suprise_count.setText(\"Suprise: \" + counts_of.get(Feel.SURPRISE).toString());\n }",
"public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }",
"public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }",
"public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }",
"private static void calcularTotal(String[] campos) {\n\t\tif (campos.length == 1)\n\t\t\tSystem.out.println(\"TOTAL de lugares atribuidos: \" + gestor.totalAtribuidos());\n\t\telse {\n\t\t\tint escalao = Integer.valueOf(campos[1]);\n\t\t\tSystem.out.println(\"TOTAL de lugares atribuidos no escalao \" + escalao + \" : \" + gestor.atribuidosNoEscalao(escalao));\n\t\t}\n\t}",
"public double getEntreLlegadas() {\r\n return 60.0 / frecuencia;\r\n }",
"public static void sueldoTotal(int hora, int sueldo){\n int resultado = 0;\r\n if(hora<=40){\r\n resultado = hora*sueldo;\r\n }\r\n if(hora>40 || hora<48){\r\n resultado = (40*sueldo)+(hora-40)*(sueldo*2);\r\n }\r\n if (hora>=48){\r\n resultado =(40*sueldo)+8*(sueldo*2)+(hora-48)*(sueldo*3);\r\n }\r\n System.out.println(\"El sueldo es de \"+ resultado);//Se muestra el sueldo total\r\n \r\n \r\n \r\n }",
"public int getHabitantes(){\n return habitantes;\n }",
"public void iniciarValores(){\r\n //Numero de campos da linha, do arquivo de saida filtrado\r\n this.NUM_CAMPOS = 106;\r\n this.ID = 0; //numero da ficha\r\n this.NUM_ARQUIVOS = 2070;\r\n\r\n this.MIN_INDICE = 1; //indice do cadastro inicial\r\n this.MAX_INDICE = 90; //indice do cadastro final\r\n this.NUM_INDICES = 90; //quantidade de cadastros lidos em cada arquivo\r\n }"
] | [
"0.69370306",
"0.6681249",
"0.6580884",
"0.6574619",
"0.6545545",
"0.6533296",
"0.64959466",
"0.6428248",
"0.641312",
"0.6374449",
"0.63721293",
"0.63715893",
"0.6348949",
"0.6346517",
"0.6327276",
"0.62578785",
"0.6257415",
"0.6253691",
"0.6242991",
"0.6242937",
"0.62414676",
"0.6231622",
"0.6209591",
"0.6198977",
"0.61911446",
"0.6159688",
"0.6131506",
"0.6109017",
"0.61080706",
"0.61063147",
"0.60868144",
"0.60743344",
"0.60735357",
"0.60345775",
"0.60343057",
"0.6027921",
"0.60222954",
"0.5997095",
"0.59931624",
"0.599014",
"0.59827375",
"0.5976108",
"0.5959636",
"0.5957628",
"0.59558666",
"0.5927353",
"0.5924727",
"0.591732",
"0.5916073",
"0.5904262",
"0.5898874",
"0.589339",
"0.58864474",
"0.5870186",
"0.5867369",
"0.58651197",
"0.5852816",
"0.5850369",
"0.58439094",
"0.58401686",
"0.58399373",
"0.58334035",
"0.58223116",
"0.58167267",
"0.58166194",
"0.5812502",
"0.5810997",
"0.5804687",
"0.58030903",
"0.5798349",
"0.5797521",
"0.5793558",
"0.5784994",
"0.5783186",
"0.5772947",
"0.576874",
"0.5765211",
"0.57522696",
"0.57516235",
"0.57495815",
"0.5748685",
"0.57459974",
"0.5745791",
"0.57387555",
"0.5735981",
"0.57335925",
"0.57333195",
"0.57281274",
"0.5724792",
"0.5720939",
"0.57197493",
"0.5719455",
"0.57191813",
"0.5718373",
"0.571714",
"0.5709545",
"0.57083964",
"0.5707111",
"0.57056624",
"0.56994087",
"0.56978893"
] | 0.0 | -1 |
c) Cual es el ingrediente con mas calorias | @Test
void caloricIngredient() throws Exception {
String request = "{\"name\": \"Ensalada\", \"ingredients\": [" +
createIngredient("Calabaza", 100) + "," +
createIngredient("Cebolla", 70) +
"]}";
this.mockMvc.perform(
post("/calculate")
.contentType(MediaType.APPLICATION_JSON)
.content(request))
.andDo(print()).andExpect(status().isOk())
.andExpect(jsonPath("$.caloric.name").value("Cebolla"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }",
"@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}",
"public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }",
"public int jogadorAtual() {\n return vez;\n }",
"public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d * 10 + u * 1;\n //Si es igual se abre.\n if (contrasena == validar) {\n etiResultado.setText(\"Caja Abierta\");\n }\n //Si es menor nos indica que es mas grande\n if (validar < contrasena) {\n etiResultado.setText(\"El número secreto es mayor\");\n }\n //Si es mayot nos indica que es mas pequeño.\n if (validar > contrasena) {\n etiResultado.setText(\"El número secreto es menor\");\n }\n }",
"private void calculadorNotaFinal() {\n\t\t//calculo notaFinal, media de las notas medias\n\t\tif(this.getAsignaturas() != null) {\n\t\t\t\tfor (Iterator<Asignatura> iterator = this.asignaturas.iterator(); iterator.hasNext();) {\n\t\t\t\t\tAsignatura asignatura = (Asignatura) iterator.next();\n\t\t\t\t\tif(asignatura.getNotas() != null) {\n\t\t\t\t\tnotaFinal += asignatura.notaMedia();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//curarse en salud con division entre 0\n\t\t\t\tif(this.getAsignaturas().size() != 0) {\n\t\t\t\tnotaFinal /= this.getAsignaturas().size();\n\t\t\t\t}\n\t\t}\n\t}",
"public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }",
"public void zeraEmpates() {\r\n contaEmpates = 0;\r\n }",
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"public boolean Vacia (){\n return cima==-1;\n \n }",
"public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }",
"public void anterior() {\n canalAtual--;\n televisao.mudarCanal(canalAtual);\n }",
"@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}",
"public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}",
"private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }",
"@Override\r\n\tdouble getBonificacao() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic void salarioAtual() {\n\t\tSystem.out.print(\"VALOR ATUAL\"+this.valor);\r\n\t\t\r\n\t}",
"float znajdzOstatecznaCene()\n\t{\n\t\t//getInput(\"znajdzOstatecznaCene\");\n\t\t//print (\"znajdzOstatecznaCene \"+iteracja);\n\t\t\n\t\t//debug\n\t\tBoolean debug = false;\n\t\tif (LokalneCentrum.getCurrentHour().equals(\"03:00\"))\n\t\t{\n\t\t\tprint(\"03:00 on the clock\",debug);\n\t\t\tdebug=false;\n\t\t}\n\t\t\n\t\t//wszystkie ceny jakie byly oglaszan ne na najblizszy slot w \n\t\tArrayList<Float> cenyNaNajblizszySlot =znajdzOstatecznaCeneCenaNaNajblizszeSloty();\n\t\t\n\t\t\n\t\t//Stworzenie cen w raportowaniu\n\t\tint i=0;\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\trynekHistory.kontraktDodajCene(cenyNaNajblizszySlot.get(i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tprint(\"ceny na najblizszy slot \"+cenyNaNajblizszySlot.size());\n\n\t\t\n\t\t//do rpzerobienia problemu minimalizacji na maksymalizacje\n\t\tint inverter =-1;\n\t\t\n\t\ti=0;\n\t\tfloat cena =cenyNaNajblizszySlot.get(i);\n\t\tfloat minimuCena =cena;\t\t\n\t\tfloat minimumValue =inverter*funkcjaRynku2(cena, false,true);\n\t\ti++;\n\t\t\n\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(funkcjaRynku2(cena, false), minimuCena);\n\t\t\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\tcena =cenyNaNajblizszySlot.get(i);\n\t\t\tfloat value =inverter*funkcjaRynku2(cena, false,true);\t\t\t\n\n\t\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(funkcjaRynku2(cena, false), cena);\n\n\t\t\tif (value<minimumValue)\n\t\t\t{\n\t\t\t\tminimuCena =cena;\n\t\t\t\tminimumValue = value;\n\n\t\t\t}\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tif(debug)\n\t\t{\n\t\t\tgetInput(\"03:00 end\");\n\t\t}\n\t\t\n\t\t//getInput(\"znajdzOstatecznaCene - nto finished\");\n\t\treturn minimuCena;\n\t\t\n\t}",
"public String getCalidad()\n {\n String cadenaADevolver = \"\";\n \n cadenaADevolver = (calidad >= FULLHD) ? \"FullHD\" : \"HD\";\n \n return cadenaADevolver;\n }",
"@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumulado * 0.05) * valor_base);\n resultado += auxilioProcriacao();\n //vale-coxinha\n resultado += 42;\n return resultado;\n }",
"@Override\n public int getSalida() {\n return 0;\n }",
"public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }",
"public Calculadora(){\n this.operador1 = 0.0;\n this.operador2 = 0.0;\n this.resultado = 0.0;\n }",
"@Override\n\tpublic double perimetro() {\n\t\treturn 0;\n\t}",
"public int getCalorias() {return calorias;}",
"public double getEntreLlegadas() {\r\n return 60.0 / frecuencia;\r\n }",
"private void Calculation() {\n\t\tint calStd = jetztStunde + schlafStunde;\n\t\tint calMin = jetztMinute + schlafMinute;\n\n\t\ttotalMin = calMin % 60;\n\t\ttotalStunde = calStd % 24 + calMin / 60;\n\n\t}",
"float getMonatl_kosten();",
"public int calcularIMC(){\r\n\t\t//Calculamos el peso de la persona\r\n\t\tdouble pesoActual=peso/(Math.pow(altura, 2));\r\n\t\t//Segun el peso, devuelve un codigo\r\n\t\tif (pesoActual>=18.75 && pesoActual<=24.9){\r\n\t\t\treturn NORMAL;\r\n\t\t}else if(pesoActual<18.75){\r\n \t\t\treturn DELGADO;\r\n \t\t}else{\r\n \t\t\treturn SOBREPESO;\r\n \t\t}\r\n \t}",
"public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }",
"@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }",
"public int elimiarAlInicio(){\n int edad = inicio.edad;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n inicio=inicio.siguiente;\n }\n return edad;\n }",
"private void calculaIA(int DiffTime) {\n\ttimerTempoEntreTiros+=DiffTime;\n\t\n\t\t\n\t\tif (round>0) \n\t\t\testado=0;\n\t\telse estado=1;\n\t\t\t\n\t\tif (estado==0) {\n\t\t\trecarregando=(false);\n\n\t\t\tif (timerTempoEntreTiros>=Constantes.HE_tempoEntreTiros) {\n\t\t\t\t\n\t\t\t\tif (atirou&&soltouTiro) {\t\n\t\t\t\t\tsoltouTiro=false;\n\t\t\t\t\tatira();\n\t\t\t\t\ttimerTempoEntreTiros=0;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!atirou)\n\t\t\t\t\tsoltouTiro=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (estado==1) {\n\t\t\t\n\t\t\t\n\t\t\ttempoRecarrega += DiffTime;\n\t\t\t\n\t\t\trecarregando=(true);\n\t\t\tif (mag<1)\n\t\t\t\testado=2;\n\t\t\t\t\n\t\t\tif (tempoRecarrega>=Constantes.HE_tempoRecarrega) {\n\t\t\t\t\n\t\t\t\tif (mag >=1) {\n\t\t\t\t\ttempoRecarrega=(0);\n\t\t\t\t\tround=(Constantes.HE_round);\n\t\t\t\t\tmag-=1;\n\t\t\t\t\testado=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (estado==2) {\n\t\t\t\n\t\t\tif (round>0) \n\t\t\t\testado=0;\n\t\t\trecarregando=(false);\n\n\t\t\t\n\t\t}\n\t}",
"public void calcularQuinA(){\n sueldoQuinAd = sueldoMensual /2;\n\n }",
"protected boolean colaVacia() {\r\n return ini == -1;\r\n }",
"@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }",
"public int getPontosTimeMandante() {\r\n return pontosTimeMandante;\r\n }",
"@Override\r\n\tpublic double aumentarSueldo() {\n\t\treturn 0;\r\n\t}",
"public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}",
"@Override\n\tpublic void acelerar() {\n\t\t// TODO Auto-generated method stub\n\t\t\t\tvelocidadActual += 40;\n\t\t\t\tif(velocidadActual>250) {\n\t\t\t\t\tvelocidadActual = 250;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdepositoActual -= 10;\n\t\t\t\tSystem.out.println(\"Velocidad del ferrari: \"+velocidadActual);\n\t}",
"private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}",
"public void obtener() {\r\n \t\r\n \tif (raiz!=null)\r\n {\r\n int informacion = raiz.dato;\r\n raiz = raiz.sig;\r\n end = raiz;\r\n System.out.println(\"Obtenemos el dato de la cima: \"+informacion);\r\n }\r\n else\r\n {\r\n System.out.println(\"No hay datos en la pila\");\r\n }\r\n }",
"public ValoresCalculo getValorCalculo()\r\n/* 88: */ {\r\n/* 89:107 */ return this.valorCalculo;\r\n/* 90: */ }",
"@Override\n\tpublic double calculsalaire() {\n\t\treturn 1500 + nbY*20;\n\t}",
"public long termina() {\n\t\treturn (System.currentTimeMillis() - inicio) / 1000;\n\t}",
"public double getSalario() {\r\n\t\treturn super.getSalario()-10000;\r\n\t}",
"@Override\n\tpublic void frenar() {\n\t\tvelocidadActual = 0;\n\t}",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"public int getOperacion()\r\n/* 22: */ {\r\n/* 23:45 */ return this.operacion;\r\n/* 24: */ }",
"public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }",
"public int obtenerHoraMasAccesos()\n {\n int numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora = 0;\n int horaConElNumeroDeAccesosMaximo = -1;\n\n if(archivoLog.size() >0){\n for(int horaActual=0; horaActual < 24; horaActual++){\n int totalDeAccesosParaHoraActual = 0;\n //Miramos todos los accesos\n for(Acceso acceso :archivoLog){\n if(horaActual == acceso.getHora()){\n totalDeAccesosParaHoraActual++;\n }\n }\n if(numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora<=totalDeAccesosParaHoraActual){\n numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora =totalDeAccesosParaHoraActual;\n horaConElNumeroDeAccesosMaximo = horaActual;\n }\n }\n }\n else{\n System.out.println(\"No hay datos\");\n }\n return horaConElNumeroDeAccesosMaximo;\n }",
"public void llenarCafetera() {\n\t\tthis.setCantidadActual(this.get_capacidadMaxima());\n\t}",
"@Override\r\n\tpublic float valorFinal() {\n\t\treturn 0;\r\n\t}",
"float calcularFinal(){\n return (calif1*0.3f)+(calif2*0.3f)+(calif3*0.4f);// debo agregar la f para que lo tome como float y no como double\r\n }",
"public void calcularSalario(){\n // 1% do lucro mensal\n double percentagemLucro = 0.01 * lucroMensal;\n // valor fixo igual ao dobro do dos empregados sem especialização, acrescido\n //de um prémio que corresponde a 1% do lucro mensal nas lojas da região.\n setSalario(1600 + percentagemLucro);\n\n }",
"@Override\n public int altura() {\n return altura(this.raiz);\n }",
"public Maquina() {\n savia = 0;\n reflejosLagrimas = 0;\n estado = false;\n }",
"public int probabilidadesHastaAhora(){\n return contadorEstados + 1;\n }",
"public boolean esMorosa() {\r\n\t\tboolean esMorosa = false;\r\n\t\tfor (Cuenta c : cuentas) {\r\n\t\t\tif (c != null) {\r\n\t\t\t\tif (c.getSaldo() < 0) {\r\n\t\t\t\t\tesMorosa = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esMorosa;\r\n\t}",
"Integer getEmisoraActual(boolean AM){\n return AM ? this.emisoraAMActual : this.emisoraFMActual; \n }",
"public boolean calcularTotal() {\r\n double dou_debe = 0;\r\n double dou_haber = 0;\r\n for (int i = 0; i < tab_tabla2.getTotalFilas(); i++) {\r\n try {\r\n if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_debe)) {\r\n dou_debe += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n } else if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_haber)) {\r\n dou_haber += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n eti_suma_debe.setValue(\"TOTAL DEBE : \" + utilitario.getFormatoNumero(dou_debe));\r\n eti_suma_haber.setValue(\"TOTAL HABER : \" + utilitario.getFormatoNumero(dou_haber));\r\n\r\n double dou_diferencia = Double.parseDouble(utilitario.getFormatoNumero(dou_debe)) - Double.parseDouble(utilitario.getFormatoNumero(dou_haber));\r\n eti_suma_diferencia.setValue(\"DIFERENCIA : \" + utilitario.getFormatoNumero(dou_diferencia));\r\n if (dou_diferencia != 0.0) {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold;color:red\");\r\n } else {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold\");\r\n return true;\r\n }\r\n return false;\r\n }",
"private void peso(){\r\n if(getPeso()>80){\r\n precioBase+=100;\r\n }\r\n else if ((getPeso()<=79)&&(getPeso()>=50)){\r\n precioBase+=80;\r\n }\r\n else if ((getPeso()<=49)&&(getPeso()>=20)){\r\n precioBase+=50;\r\n }\r\n else if ((getPeso()<=19)&&(getPeso()>=0)){\r\n precioBase+=10;\r\n }\r\n }",
"@Override\r\n\tpublic double recargoImpuesto() {\n\t\treturn 0.03;\r\n\t}",
"public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }",
"protected void calculerAire() {\r\n\t\taire = Math.PI * rayonV * rayonH;\r\n\t\t\r\n\t}",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }",
"public PhanSo(){\n tuSo = 0;\n mauSo = 1;\n }",
"public int getCurrRuptures();",
"@Override\n\tpublic double getUltimaUtilidadObtenida() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic double getBonificacao() {\n\t\treturn 0;\n\t}",
"public int extraer ()\n {\n if (raiz!=null)\n {\n int informacion = raiz.edad;\n raiz = raiz.sig;\n return informacion;\n }\n else\n {\n System.out.println(\"La lista se encuentra vacia\");\n return 0;\n }\n }",
"public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }",
"long buscarUltimo();",
"@Override\n\tpublic double calculaDesconto() {\n\t\treturn this.gastosEmCongressos;\n\t}",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"public int usaAtaque() {\n\t\treturn dano;\n\t}",
"public void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }",
"public String estadoAlum() {\n String informacion = \"\";\n if (getProm() >= 60) {\n setCad(\"USTED APRUEBA CON TOTAL EXITO\");\n } else {\n if (getProm() <= 59) {\n setCad(\"REPROBADO\");\n }\n }\n return getCad();\n }",
"public int lancia() {\r\n\t\tlancio = dado.tiraDado();\r\n\t\tthis.numLanci++;\r\n\t\treturn lancio;\r\n\t}",
"@Override\n public int tonKho() {\n return getAmount() - amountBorrow;\n }",
"public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }",
"@Override\r\n public void ingresarCapacidad(){\r\n double capacidad = Math.pow(alto, 3);\r\n int capacidadInt = Double.valueOf(capacidad).intValue();\r\n super.capacidad = capacidadInt;\r\n super.cantidadRestante = capacidadInt;\r\n System.out.println(capacidadInt);\r\n }",
"public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }",
"@Override\r\n\tprotected boolean puedeExtraer(double monto) {\n\t\treturn ((super.getSaldo() - monto) >= 0) ? true : false;\r\n\t}",
"int calculaY(){\n int n;\n if(pratonl[0][1]==pquesol[0][1]){//evalua si esta en la misma fila\n n=0;\n }else{\n n=pquesol[0][1]-pratonl[0][1]; \n }\n return n;\n }",
"private static void verifPayement(){\n\t\tint x,y, dime;\n\t\tx=jeu.getAssam().getXPion()-1;\n\t\ty=jeu.getAssam().getYPion()-1;\n\t\tint caseInfoTapis = jeu.cases[x][y].getCouleurTapis();\n\t\tif(caseInfoTapis == tour || caseInfoTapis == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tdime = jeu.payerDime(caseInfoTapis,x,y,0,new boolean[7][7]);\n\t\t\tJoueur payeur = jeu.getJoueurs()[tour-1];\n\t\t\tJoueur paye = jeu.getJoueurs()[caseInfoTapis-1];\n\t\t\tif(jeu.payerVraimentDime(payeur,paye,dime)){\n\t\t\t\tjoueurElimine++;\n\t\t\t}\n\t\t\tconsole.afficherPayeurPaye(payeur, paye, dime);\n\t\t}\n\t}",
"public void nourrir() {\n if (!autoriseOperation()) {\n return;\n }\n\n incrFaim(-2);\n incrPoids(1);\n incrHumeur(1);\n incrXp(1);\n\n System.out.println(tamagoStats.getXp());\n setChanged();\n notifyObservers();\n\n }",
"public void VaciarPila()\n {\n this.tope = 0;\n }",
"public int getminutoStamina(){\n return tiempoReal;\n }",
"public void afegirPosicio() {\n\t\tfor(int i=0; i<cal.length; ++i){\n\t\t\tcal[i] = new Dia(false);\n\t\t\tfor(int j=0; j<3; ++j) cal[i].getTorns()[j].setPosicio(i);\n\t\t}\n\t}",
"private static void teste02 () {\n\t\tEstoque e = Estoque.find(1);\n\t\tlog.debug(\"Estoque encontrado.\");\n\n\t\te.setPreco(new Float(10));\n\t\te.update();\n\n\t\tlog.debug(\"Estoque atualizado.\");\n\t}",
"private boolean temMunicao() {\n\t\t\n\t\tif (round<1) {\n\t\t\tsetSemMunicao(true);\n\t\t\treturn false;\n\t\t\t\n\t\t}else \n\t\t\tsetSemMunicao(false);\n\t\t\n\t\t\n\t\treturn true;\n\t}",
"private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }",
"private void actualizaEstadoMapa() {\n if(cambiosFondo >= 0 && cambiosFondo < 10){\n estadoMapa= EstadoMapa.RURAL;\n }\n if(cambiosFondo == 10){\n estadoMapa= EstadoMapa.RURALURBANO;\n }\n if(cambiosFondo > 10 && cambiosFondo < 15){\n estadoMapa= EstadoMapa.URBANO;\n }\n if(cambiosFondo == 15 ){\n estadoMapa= EstadoMapa.URBANOUNIVERSIDAD;\n }\n if(cambiosFondo > 15 && cambiosFondo < 20){\n estadoMapa= EstadoMapa.UNIVERSIDAD;\n }\n if(cambiosFondo == 20){\n estadoMapa= EstadoMapa.UNIVERSIDADSALONES;\n }\n if(cambiosFondo > 20 && cambiosFondo < 25){\n estadoMapa= EstadoMapa.SALONES;\n }\n\n }",
"public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }",
"public boolean fechaVigente(String fechafinal, String horafinal)\r\n\t{\r\n\t\tboolean vigente = true;\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tint añoactual = calendario.get(Calendar.YEAR);\r\n\t\tint mesactual = (calendario.get(Calendar.MONTH)+1);\r\n\t\tint diaactual = calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString fechaactual = añoactual+\"-\"+mesactual+\"-\"+diaactual;\r\n\t\tint horasactuales = calendario.get(Calendar.HOUR_OF_DAY);\r\n\t\tint minutosactuales = calendario.get(Calendar.MINUTE);\r\n\t\tint segundosactuales = calendario.get(Calendar.SECOND);\r\n\t\tString horaactual = horasactuales+\":\"+minutosactuales+\":\"+segundosactuales;\r\n\t\t\r\n\t\tint añofinal = 0;\r\n\t\tint mesfinal = 0;\r\n\t\tint diafinal = 0;\r\n\t\t\r\n\t\tint horasfinales = 0;\r\n\t\tint minutosfinales = 0;\r\n\t\tint segundosfinales = 0;\r\n\r\n\t\tString numerofecha = \"\";\r\n\t\tfor (int i = 0; i < (fechafinal.length()); i++) \r\n\t\t{\r\n\t\t\tchar digito = fechafinal.charAt(i);\r\n\t\t\tif(digito == '0' || digito == '1' || digito == '2' || digito == '3' || digito == '4' || digito == '5' || digito == '6' || digito == '7' || digito == '8' || digito == '9')\r\n\t\t\t{\r\n\t\t\t\tnumerofecha += digito;\r\n\t\t\t\tif((i+1) == (fechafinal.length()))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(añofinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tañofinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mesfinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmesfinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(diafinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdiafinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(añofinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tañofinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(mesfinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tmesfinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(diafinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tdiafinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tString numerohora = \"\";\r\n\t\tfor (int i = 0; i < (horafinal.length()); i++) \r\n\t\t{\r\n\t\t\tchar digito = horafinal.charAt(i);\r\n\t\t\tif(digito == '0' || digito == '1' || digito == '2' || digito == '3' || digito == '4' || digito == '5' || digito == '6' || digito == '7' || digito == '8' || digito == '9')\r\n\t\t\t{\r\n\t\t\t\tnumerohora += digito;\r\n\t\t\t\tif((i+1) == (horafinal.length()))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(horasfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thorasfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(minutosfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tminutosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(segundosfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsegundosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(horasfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\thorasfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(minutosfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tminutosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(segundosfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tsegundosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tString fechafinal2 = añofinal+\"-\"+mesfinal+\"-\"+diafinal;\r\n\t\tString horafinal2 = horasfinales+\":\"+minutosfinales+\":\"+segundosfinales;\r\n\t\tif(añoactual >= añofinal)\r\n\t\t{\r\n\t\t\tif(mesactual >= mesfinal)\r\n\t\t\t{\r\n\t\t\t\tif(diaactual >= diafinal)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(horasactuales >= horasfinales)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(minutosactuales >= minutosfinales)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvigente = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn vigente;\r\n\t}",
"@Override\n\tpublic void teclaCorrigeDigitada() {\n\t\t\n\t}",
"public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }",
"public double calculoCuotaEspecialOrdinario() {\n\tdouble resultado =0;\n\tresultado = (getMontoCredito()+(getMontoCredito()*getInteres()/100))/getPlazo(); \n\treturn resultado;\n}",
"public void calcular()\r\n/* 530: */ {\r\n/* 531:556 */ this.facturaProveedorSRI.setMontoIva(this.facturaProveedorSRI.getBaseImponibleDiferenteCero().multiply(\r\n/* 532:557 */ ParametrosSistema.getPorcentajeIva().divide(BigDecimal.valueOf(100L))));\r\n/* 533: */ }",
"public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }"
] | [
"0.6364745",
"0.6357703",
"0.6346957",
"0.6201901",
"0.61828536",
"0.61672294",
"0.61571693",
"0.60530645",
"0.60447764",
"0.59669065",
"0.5964022",
"0.595896",
"0.595008",
"0.5945353",
"0.5924724",
"0.59209514",
"0.59135956",
"0.5910609",
"0.5908876",
"0.5892073",
"0.5859631",
"0.58574325",
"0.5851982",
"0.5843154",
"0.583907",
"0.5827845",
"0.58201706",
"0.58163893",
"0.58118355",
"0.58049476",
"0.5802722",
"0.5793701",
"0.57914424",
"0.57881135",
"0.5767672",
"0.5762285",
"0.5757357",
"0.57455397",
"0.5738396",
"0.5735154",
"0.5721285",
"0.5709579",
"0.57035995",
"0.5695269",
"0.56940246",
"0.568151",
"0.56797713",
"0.56797075",
"0.56777126",
"0.5676914",
"0.5676814",
"0.5674388",
"0.56731385",
"0.56664467",
"0.5665916",
"0.5661428",
"0.5661293",
"0.56552756",
"0.56549877",
"0.56527036",
"0.56453395",
"0.56447136",
"0.56386775",
"0.56344604",
"0.56320953",
"0.5631714",
"0.5629923",
"0.56259924",
"0.5625242",
"0.5624395",
"0.5623907",
"0.5623186",
"0.5622163",
"0.56215245",
"0.56209534",
"0.5620152",
"0.5620008",
"0.5619081",
"0.5619023",
"0.56140506",
"0.5612076",
"0.55995",
"0.55981547",
"0.5595177",
"0.55937105",
"0.5590109",
"0.5589941",
"0.558354",
"0.5574718",
"0.5573048",
"0.556393",
"0.5563093",
"0.55621266",
"0.5560632",
"0.55523634",
"0.5542264",
"0.5541838",
"0.5539361",
"0.55370015",
"0.55303365",
"0.5529779"
] | 0.0 | -1 |
d) Optional: Generar endpoint para recibir un listo de platos y devolver el listado procesado. | @Test
void processListOfPlates() throws Exception {
String request = "[" +
"{\"name\": \"Ensalada\", \"ingredients\": [" +
createIngredient("Calabaza", 100) + "," +
createIngredient("Cebolla", 70) + "]}," +
"{\"name\": \"Hamburguesa\", \"ingredients\": [" +
createIngredient("Hamburguesa", 100) + "," +
createIngredient("Pan de trigo blanco", 100) + "," +
createIngredient("Cebolla", 70) + "]}" +
"]";
this.mockMvc.perform(
post("/calculateAll")
.contentType(MediaType.APPLICATION_JSON)
.content(request))
.andDo(print()).andExpect(status().isOk())
.andExpect(jsonPath("$[0].calories").value("56"))
.andExpect(jsonPath("$[1].calories").value("517"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping\n\tpublic ResponseEntity<List<Plato>> listarPlatos(){\t\t\n\t\tList<Plato> platos = miServicioPlatos.listarPlatos();\n\t\t\n\t\t// No hay platos\n if(platos.size() <= 0){\n return ResponseEntity.noContent().build();\n } \n \n return ResponseEntity.ok(platos);\n\t}",
"@GetMapping(value = \"/semanario/buscar-por-plato/{idplato}\")\n\tpublic ResponseEntity<List<String>> buscarSemanarioPlato(@PathVariable(\"idplato\") Long idPlato){\n\t\t\t\t\n\t\t//id de plato no valido\n\t\tif(idPlato == null){\n return ResponseEntity.noContent().build();\n } \n\t\t\t\t\n\t\tString dias = this.miServicioPlatos.buscarSemanarioPlato(idPlato);\n\t\t\n\t\t//para devolver como una lista\n\t\tString[] vectorDias = dias.split(\",\");\n\t\tList<String> arregloDias = new ArrayList<String>();\n\t\tfor(int i = 0; i < vectorDias.length; i++) {\n\t\t\tarregloDias.add(vectorDias[i]);\n\t\t}\n\t\t\n\t\treturn ResponseEntity.ok(arregloDias);\n\t\t//return ResponseEntity.ok(dias);\n\t}",
"public interface GPAdimWS {\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.provincia\")\n Call<List<Provincia>> listProvincia();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.especialidad\")\n Call<List<Especialidad>> listEspecialidad();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.cobertura\")\n Call<List<Cobertura>> listCobertura();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.medico/byCoberturaProvinciaEspecialidad/{cobertura}/{provincia}/{especialidad}\")\n Call<List<Medico>> listMedico(@Path(\"cobertura\") String cobertura, @Path(\"provincia\") Long provincia, @Path(\"especialidad\") Long especialidad);\n @POST(\"webresources/com.gylgroup.gp.turno\")\n Call<Turno> createTurno(@Body Turno turno);\n}",
"public interface PIService {\n @POST(\"learningrace1/rest/participante\")\n Call<List<Participante>> getParticipante(@Body Participante participante);\n\n @GET(\"learningrace1/rest/evento/{identificador}\")\n Call<List<Evento>> getEvento(@Path(\"identificador\") String identificador);\n\n}",
"List<VoziloDto> sveVozila();",
"public interface ApiEndPointsAndPatameters {\n\t\n//\t/** Resource path for api resources */\n//\tString API_PREFIX = \"/api\";\n//\n\t/** Resource path for API version 1 */\n\tString API_VERSION_1 = \"/v1\";\n//\n//\t/** Resource path to get available power plants. */\n//\tString POWER_PLANT_PATH = \"/powerPlant\";\n//\n//\t/** Resource path to get power plant data for a given power plant id. */\n//\tString POWER_PLANT_DATA_PATH = \"/{id}\";\n//\n//\tString POWER_PLANT_DETAILS = \"/details\";\n//\n//\tString POWER_PLANT_DATA_SUM_BY_DAY = \"/sumByDay\";\n//\n//\tString POWER_PLANT_DATA_SUM_BY_WEEK = \"/sumByWeek\";\n//\n//\tString POWER_PLANT_DATA_SUM_BY_MONTH = \"/sumByMonth\";\n//\n//\tString POWER_PLANT_DATA_SUM_BY_YEAR = \"/sumByYear\";\n//\t\n//\tString POWER_PLANT_DATA_NEXT_HOUR_FORECAST = \"/nextHourForecast\";\n//\t\n//\tString POWER_PLANT_DATA_NEXT_DAY_FORECAST = \"/nextDayForecast\";\n//\n//\t/** Query parameter for filtering by start date. */\n//\tString QUERY_PARAMETER_START_DATE = \"startDate\";\n//\n//\t/** Query parameter for filtering by end date. */\n//\tString QUERY_PARAMETER_END_DATE = \"endDate\";\n//\n//\t/** Query parameter for filtering by power plant data type. */\n//\tString QUERY_PARAMETER_DATA_TYPE = \"dataType\";\n//\t\n//\t\n\t\n\t\n\t/** Query parameter for filtering by power plant data type. */\n\tString QUERY_AUTHENTICATION_ID = \"Authentication-ID\";\n\t\n\t/** Query parameter for filtering by power plant data type. */\n\tString QUERY_USER_PASSWORD = \"UserPassword\";\n\t\n\t/** Query parameter for filtering by power plant data type. */\n\tString QUERY_AUTHORISATION_ID = \"authorisation-id\";\n\t\n\t/** Resource path to get a list to the components a User has access to. */\n\tString USER_COMPONENT_LIST = \"/UserComponentLists\";\n\t\n\t/** Resource path to get a list of available resources for a component. */\n\tString DATA_LIST = \"/DataLists\";\n\t\n\t/** Resource path to authenticate. */\n\tString AUTHENTICATION = \"/authentication\";\n\t\n\t/** Resource path to logout. */\n\tString LOGOUT = \"/logout\";\n\t\n\t/** Resource path to get power plant data for a given power plant id. */\n\tString COMPONENT_ID_PATH = \"/{cId}\";\n\t\n\t/** Resource path to get power plant data for a given power plant id. */\n\tString SIDE_PATH = \"/{side}\";\n\t\n\t/** Resource path to get power plant data for a given power plant id. */\n\tString TYPE_PATH = \"/{type}\";\n\t\n\t/** Resource path to get power plant data for a given power plant id. */\n\tString DATE_PATH = \"/{date}\";\n}",
"public interface RuntService {\n @Headers({\n \"Accept: application/json\"\n })\n @GET(\"runt/co.com.runt.local.domain.persona/{id}/{placa}\")\n Call<List<RuntVO>> consultaRunt(@Path(\"id\") Integer numeroCedula, @Path(\"placa\") String placa);\n}",
"public ListaPlantilla getPlantilla() throws MalformedURLException, IOException, JAXBException {\n //DEBEMOS INDICAR EL METODO DONDE LEEMOS\n String request = \"api/plantilla\";\n return this.getRequestPlantilla(request);\n }",
"@GET(\"rest/emprego\")\n Call<List<Posto>> callListPostoSINE();",
"private void handleListOperation() {\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\");\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Error code:\" + response.getStatus());\n }\n }",
"public interface ApiService {\n @GET(\"questcms/floorplan\")\n Call<List<FloorPlan>> listFloorPlan();\n}",
"@POST\r\n @GET\r\n @Path(\"/v1.0/produtos\")\r\n @Consumes({ WILDCARD })\r\n @Produces({ APPLICATION_ATOM_XML, APPLICATION_JSON + \"; charset=UTF-8\" })\r\n public Response listarProdutos() {\r\n\r\n log.debug(\"listarProdutos: {}\");\r\n\r\n try {\r\n\r\n List<Produto> produtos = produtoSC.listar();\r\n\r\n return respostaHTTP.construirResposta(produtos);\r\n\r\n } catch (Exception e) {\r\n\r\n return respostaHTTP.construirRespostaErro(e);\r\n }\r\n }",
"List<Pacote> buscarPorTransporte(Transporte transporte);",
"@GetMapping(value = \"/semanario/buscar-por-dia/{nitrest}\")\n\tpublic ResponseEntity<List<Plato>> buscarPlatosPorDia(@PathVariable(\"nitrest\") String nit, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t @RequestParam(name = \"dia\", required = false) String dia,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t @RequestParam(name = \"categoria\", required = false) String categoria){\n\t\t\n\t\t//si dia es nulo, devuelve del dia de hoy\n\t\t//si categiria es nulo, devuelve todas las categorias\n\t\t\n\t\tList<Plato> platos = miServicioPlatos.buscarPlatosPorDia(nit, dia, categoria);\n\t\t\n\t\tSystem.out.println(\"\\n\" + platos + \"\\n\");\n\t\t\n\t\t//No se encontraron platos\n\t\tif(platos == null){\n return ResponseEntity.noContent().build();\n } \t\t\n\t\tif(platos.size() <= 0){\n return ResponseEntity.noContent().build();\n } \n\t\t\n\t\t\t\t\n\t\treturn ResponseEntity.ok(platos);\n\t}",
"@GET(\"montaje/proyectos/ver/\")\n Call<List<clsProyecto>> getProyectos();",
"public interface DatosAPI\n{\n @GET(\"kspt-6t6c.json\")\n Call<List<CentrosAyuda>> obtenerLista();\n}",
"java.util.List<pb4client.TransportRequest> \n getReqList();",
"@Path(\"device\")\n DeviceAPI devices();",
"List<Room> selectRoomList(@Param(\"building\") String building);",
"public interface Service {\n @GET(\"/orama-media/json/fund_detail_full.json?limit=1000&offset=0&serializer=fund_detail_full\")\n Call<List<Example>> getExample();\n\n}",
"interface DeviceAPI {\n /**\n * Get the children of the device.\n *\n * @param device the device\n *\n * @return the children\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getChildrenOfDevice/{device}\")\n List<JsonDevice> childrenOf(@PathParam(\"device\") int device);\n\n /**\n * Get the SensorML description of the device.\n *\n * @param id the id\n *\n * @return the SensorML description\n */\n @GET\n @Produces(MediaType.APPLICATION_XML)\n @Path(\"getDeviceAsSensorML/{device}\")\n String getSensorML(@PathParam(\"device\") int id);\n\n /**\n * Get the list of all devices.\n *\n * @return the devices\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllActiveDevicesFast\")\n List<JsonDevice> all();\n\n /**\n * Get the device.\n *\n * @param device the id\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDevice/{device}\")\n JsonDevice byId(@PathParam(\"device\") int device);\n\n /**\n * Get all device categories.\n *\n * @return the device categories\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();\n\n /**\n * Get the device.\n *\n * @param urn the URN\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceByUrn/{urn}\")\n JsonDevice byURN(@PathParam(\"urn\") String urn);\n }",
"public interface PrecosService {\n\n @GET(\"/combustivelbarato/precos/master/precos.json\")\n List<Preco> getPrecos();\n}",
"public List<GrupoLocalResponse> buscarTodos();",
"@GetMapping(value = \"buscar-por-id/{idplato}\")\n public ResponseEntity<Plato> buscarPlatoPorId(@PathVariable(\"idplato\") Long idPlato) {\n Plato plato = miServicioPlatos.buscarPlatoPorId(idPlato);\n if (null==plato){\n return ResponseEntity.notFound().build();\n }\n return ResponseEntity.ok(plato);\n }",
"@GET\r\n public List<DocumentoDTO> obtenerDocumento(){\r\n List<DocumentoEntity> documento= logic.obtenerDocumento(); \r\n return DocumentoDTO.toZooList(documento);\r\n }",
"java.util.List<Pokemon.Request> \n getRequestsList();",
"public interface ConfigWarDeviceService {\n\n List<ConfigWarDevice> select();\n}",
"public interface ServiceApi\n{\n @GET(\"{list}\")\n Call<ResponseBody> request(@Path(\"list\") String postfix, @QueryMap HashMap<String, Object> params);\n}",
"private void getRequestList()\n {\n StringBuilder soapMessage = new StringBuilder();\n soapMessage.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\");\n soapMessage.append(\"<Envelope xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\");\n soapMessage.append(\"<Body>\");\n soapMessage.append(\"<ListRequestType xmlns=\\\"\" + Constants.TEMP_URI_NAMESPACE + \"\\\">\");\n soapMessage.append(\"<userHash>\" + DataManager.getInstance().user.getUserHash() + \"</userHash>\");\n soapMessage.append(\"</ListRequestType>\");\n soapMessage.append(\"</Body>\");\n soapMessage.append(\"</Envelope>\");\n showProgressDialog();\n VollyResponseListener vollyResponseListener = new VollyResponseListener()\n {\n @Override\n public void onErrorResponse(VolleyError volleyError)\n {\n volleyError.printStackTrace();\n }\n\n @Override\n public void onResponse(String response)\n {\n hideProgressDialog();\n requestList = new ArrayList<SmartObject>();\n Helper.Log(\"Response:%n %s\", response);\n DataManager.getInstance().requestUser = ParserManager.parseRequestResponse(response);\n for (int i = 0; i < ParserManager.parseRequestResponse(response).getRequests().size(); i++)\n {\n int requestId = Integer.parseInt(ParserManager.parseRequestResponse(response).getRequests().get(i).getRequestId());\n String requestName = ParserManager.parseRequestResponse(response).getRequests().get(i).getRequestName();\n requestList.add(i, new SmartObject(requestId, requestName));\n }\n\n {\n if (!requestList.isEmpty())\n showListPopUp(etSelectTeam, requestList);\n }\n\n }\n };\n try\n {\n VollyCustomRequest vollyCustomRequest = new VollyCustomRequest(Constants.PLANNER_WEBSERVICE_URL,\n soapMessage.toString(), Constants.TEMP_URI_NAMESPACE + \"IPlannerService/ListRequestType\", vollyResponseListener);\n vollyCustomRequest.init(\"validateUser\");\n\n\n } catch (Exception e1)\n {\n e1.printStackTrace();\n }\n\n }",
"@GetMapping(value = \"buscar-por-status/{nitrest}/{status}\")\n public ResponseEntity<List<Plato>> buscarPlatoPorStatus(@PathVariable(\"nitrest\") String nit, @PathVariable(\"status\") String status) {\n\t\tList<Plato> platos = miServicioPlatos.buscarPlatoPorStatus(nit, status);\n \n if (platos == null){\n return ResponseEntity.notFound().build();\n }\n \n if (platos.size() <= 0){\n return ResponseEntity.notFound().build();\n }\n \n return ResponseEntity.ok(platos);\n }",
"public interface PokeApiService {\n\n @GET(\"qvqk-dtmf.json\")\n Call<ArrayList<ViasRespuesta>> obtenerListaPokemon();\n}",
"@GetMapping(value = \"buscar-por-restaurante/{nitrest}\")\n public ResponseEntity<List<Plato>> buscarPlatoPorRestaurante(@PathVariable(\"nitrest\") String nit) {\n List<Plato> platos = miServicioPlatos.buscarPlatoPorRestaurante(nit);\n \n if (platos == null){\n return ResponseEntity.notFound().build();\n }\n \n if (platos.size() <= 0){\n return ResponseEntity.notFound().build();\n }\n \n return ResponseEntity.ok(platos);\n }",
"public List<PlantDTO> fetchPlants(String filter);",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n HttpTransport HTTP_TRANSPORT = new NetHttpTransport();\r\n JsonFactory JSON_FACTORY = new JacksonFactory();\r\n HttpRequestFactory requestFactory\r\n = HTTP_TRANSPORT.createRequestFactory(new HttpRequestInitializer() {\r\n @Override\r\n public void initialize(HttpRequest request) {\r\n request.setParser(new JsonObjectParser(JSON_FACTORY));\r\n }\r\n });\r\n\r\n GenericUrl url = new GenericUrl(\"https://openbus.emtmadrid.es:9443/emt-proxy-server/last/geo/GetArriveStop.php\");\r\n\r\n GenericData data = new GenericData();\r\n data.put(\"idClient\",\"[email protected]\");\r\n data.put(\"passKey\", \"3C162353-56FE-4572-9FB4-ED7D2D79E58E\");\r\n data.put(\"idStop\", \"3727\");\r\n\r\n HttpRequest requestGoogle = requestFactory.buildPostRequest(url, new UrlEncodedContent(data));\r\n\r\n\r\n GenericJson json = requestGoogle.execute().parseAs(GenericJson.class);\r\n\r\n \r\n ArrayList arrives = (ArrayList) json.get(\"arrives\");\r\n request.setAttribute(\"llegadas\", arrives);\r\n //para jsp\r\n //request.getRequestDispatcher(\"pintaremt.jsp\").forward(request, response);\r\n //para freemarker\r\n try {\r\n HashMap root = new HashMap();\r\n \r\n //root.put(\"content\",\"hola\");\r\n root.put(\"llegadas\",arrives);\r\n Template temp = Configuration.getInstance().getFreeMarker().getTemplate(\"Freebus.ftl\");\r\n temp.process(root, response.getWriter());\r\n } catch (TemplateException ex) {\r\n Logger.getLogger(GoogleHttpConsumingApi.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n\r\n }",
"public interface IApiService {\n\n @GET(\"/its/master_halte/{id}\")\n public Data<Station> getSynchListStation(@Path(\"id\") String id);\n\n @GET(\"/its/eta/{koridor}/{id}\")\n public Data<Incoming> getSynchListIncoming(@Path(\"koridor\") String koridor,@Path(\"id\") String id);\n}",
"public interface PortadorService {\n\n @POST(\"api/portador/login/auth\")\n Call<FazerLoginPortadorResponse> login(@Body FazerLoginPortador fazerLoginPortador);\n\n @POST(\"api/portador/login\")\n Call<CriarLoginResponse> criarLogin(@Body PortadorLogin portadorLogin);\n\n @GET(\"api/portador/credencial/{documento}/pessoa/{tipoPessoa}/processadora/{idProcessadora}/instituicao/{idInstituicao}\")\n Call<GetCredenciaisResponse> listaCredenciais(\n @Path(\"documento\") String documento,\n @Path(\"tipoPessoa\") long tipoPessoa,\n @Path(\"idProcessadora\") long idProcessadora,\n @Path(\"idInstituicao\") long idInstituicao,\n @Header(\"AuthorizationPortador\") String token\n );\n\n @GET(\"api/portador/credencial/{idCredencial}/detalhes\")\n Call<Credencial> credencialDetalhes(\n @Path(\"idCredencial\") long idCredencial,\n @Header(\"AuthorizationPortador\") String token\n );\n\n @GET(\"api/portador/login/logout\")\n Call<ResponseBody> logout();\n\n @PUT(\"api/portador/login/trocar-email\")\n Call<ItsPayResponse> trocarEmail(@Body TrocarEmail trocarEmail, @Header(\"AuthorizationPortador\") String token);\n\n @PUT(\"api/portador/login/trocar-senha\")\n Call<ItsPayResponse> trocarSenha(@Body TrocarSenhaPortador trocarSenhaPortador, @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/portador/login/{idProcessadora}/{idInstituicao}/buscar-email/{documento}\")\n Call<BuscarEmailResponse> buscarEmail(@Path(\"idProcessadora\") long idProcessadora,\n @Path(\"idInstituicao\") long idInstituicao,\n @Path(\"documento\") String documento,\n @Header(\"AuthorizationPortador\") String token);\n\n //{periodo} - Valores aceitos 15, 30 ou 45.\n @GET(\"api/portador/credencial/{idCredencial}/extrato/data_inicial/{dataInicial}/data_final/{dataFinal}\")\n Call<LinhaExtratoCredencial[]> extratoPeriodo(@Path(\"idCredencial\") long idCredencial,\n @Path(\"dataInicial\") String dataInicial,\n @Path(\"dataFinal\") String dataFinal,\n @Header(\"AuthorizationPortador\") String token);\n\n //{periodo} - Valores aceitos 15, 30 ou 45.\n @GET(\"api/portador/credencial/{idCredencial}/extrato/periodo/{periodo}\")\n Call<LinhaExtratoCredencial[]> extratoCredencial(@Path(\"idCredencial\") long idCredencial,\n @Path(\"periodo\") String periodo,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/plastico/abrir/mobile/{idPlastico}\")\n Call<ResponseBody> abrirPlastico(@Path(\"idPlastico\") long idPlastico,\n @Header(\"AuthorizationPortador\") String token);\n\n /**\n * @param portadorCredencialRequest a credencial deve ser criptografada com SHA512\n * @param token\n * @return\n */\n @POST(\"api/portador/credencial/info-portador\")\n Call<PortadorCredencial> getPortadorCredencial(@Body GetInfoPortadorCredencialRequest portadorCredencialRequest,\n @Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/portador/conta/transferencia\")\n Call<ResponseBody> transferenciaOutroCartao(@Body TransferenciaMesmaInstituicao request,\n @Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/portador/conta/transferencia/conta/corrente\")\n Call<ResponseBody> transferenciaContaCorrente(@Body TransferenciaContaCorrente request,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/banco\")\n Call<Banco[]> listaBancos(@Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/boleto/carga/gerar-linha-digitavel\")\n Call<BoletoCarga> gerarLinhaDigitavel(@Body GerarBoletoCarga request,\n @Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/boleto/carga/enviar-boleto-email\")\n Call<ResponseBody> enviarBoletoEmail(@Body GerarBoletoCarga request,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/portador/credencial/virtual/conta/{idConta}\")\n Call<GetCredenciaisResponse> listaCartoesVirtuais(@Path(\"idConta\") long idConta,\n @Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/gerador/credencial\")\n Call<CredencialGerada> novoCartaoVirtual(@Body GerarCredencialRequest request,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/portador/credencial/status-habilitacao/{idCredencial}\")\n Call<CredencialStatus> listaStatusHabilitacao(@Path(\"idCredencial\") long idCredencial,\n @Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/portador/credencial/trocar-estado\")\n Call<ResponseBody> trocarEstado(@Body TrocarEstadoCredencialRequest request,\n @Header(\"AuthorizationPortador\") String token);\n\n\n @POST(\"api/portador/credencial/avisar-perda\")\n Call<ResponseBody> avisarPerda(@Body AvisarPerdaOuRouboRequest request,\n @Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/portador/credencial/avisar-roubo\")\n Call<ResponseBody> avisarRoubo(@Body AvisarPerdaOuRouboRequest request,\n @Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/portador/credencial/trocar-pin\")\n Call<Boolean> trocarSenhaCartao(@Body TrocarPinRequest request,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/portador/conta/buscar-tarifas/conta/{idConta}\")\n Call<GetPerfilTarifarioResponse> listaTarifas(@Path(\"idConta\") long idConta,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/portador/credencial/{documento}/pessoa/{tipoPessoa}/processadora/{idProc}/instituicao/{idInst}/desbloqueadas\")\n Call<GetCredenciaisResponse> listaCredenciaisLoja(\n @Path(\"documento\") String documento,\n @Path(\"tipoPessoa\") long tipoPessoa,\n @Path(\"idProc\") long idProcessadora,\n @Path(\"idInst\") long idInstituicao,\n @Header(\"AuthorizationPortador\") String token\n );\n\n @GET(\"api/mktplace/portador/pedido/pessoa/{documento}/processadora/{idProcessadora}/instituicao/{idInstituicao}\")\n Call<Pedido[]> buscarPedidos(@Path(\"documento\") String documento,\n @Path(\"idProcessadora\") long idProcessadora,\n @Path(\"idInstituicao\") long idInstituicao,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/mktplace/portador/pedido/{idPedido}\")\n Call<PedidoDetalhe> buscarPedidoDetalhe(\n @Path(\"idPedido\") long idPedido,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/mktplace/portador/parceiro-produto/{idProcessadora}/{idInstituicao}/\")\n Call<ArrayList<ParceiroResponse>> getParceiros(@Path(\"idProcessadora\") long idProcessadora,\n @Path(\"idInstituicao\") long idInstituicao,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/mktplace/administrativo/imagem/sku/{idImagem}\")\n Call<ResponseBody> abrirImagemProduto(@Path(\"idImagem\") long idImagem,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/mktplace/portador/formas-envio/{idParceiro}/endereco/{idEndereco}\")\n Call<GetFormasEnvioResponse[]> getFormasEnvio(@Path(\"idParceiro\") long idParceiro,\n @Path(\"idEndereco\") long idEndereco,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/endereco/{documento}/pessoa/{tipoPessoa}/processadora/{idProc}/instituicao/{idInst}/status/{status}/\")\n Call<EnderecoPessoa[]> getEnderecoPortador(@Path(\"documento\") String documento,\n @Path(\"tipoPessoa\") long tipoPessoa,\n @Path(\"idProc\") long idProc,\n @Path(\"idInst\") long idInst,\n @Path(\"status\") long status,\n @Header(\"AuthorizationPortador\") String token);\n\n @POST(\"api/mktplace/portador/pedido\")\n Call<Integer> efetuarPedido(@Body FazerPedidoMKTPlace request,\n @Header(\"AuthorizationPortador\") String token);\n\n @GET(\"api/mktplace/portador/parcelas/{idParceiro}/valor/{valorCarrinho}\")\n Call<ParcelasResponse> getParcelamento(@Path(\"idParceiro\") long idParceiro,\n @Path(\"valorCarrinho\") double valorCarrinho,\n @Header(\"AuthorizationPortador\") String token);\n}",
"@Path(\"/api/khy\")\n@Produces(\"application/json\")\npublic interface LegaliteDysRESTApis {\n\n @POST\n @Consumes(\"application/json\")\n @Produces(\"application/json\")\n @Path(\"/belge-durum-guncelle\")\n SimpleResponse belgeDurumGuncelle(BelgeDurumuModel belgeDurum);\n\n @POST\n @Consumes(\"application/json\")\n @Produces(\"application/json\")\n @Path(\"/belge-al\")\n SimpleResponse belgeGonder(BelgeAlRestModel request);\n}",
"@GET\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\t@Path(\"/getPoiList/{offset}\")\r\n\tpublic List<Poi> getPoiList(@Context HttpServletRequest request, \r\n\t\t\t@PathParam(\"offset\") int offset) {\n\t\tString host = \"remote host.\";\r\n\t\ttry {\r\n\t\t\thost = request.getRemoteHost();\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tLogDAO.getInstance().addLog(new Log(\"WebService Request from \" + host, System.currentTimeMillis() + (60*60*1000)));\r\n\t\tList<Poi> allPois = new ArrayList<Poi>();\r\n\r\n\t\tallPois.addAll(PoiDAO.getInstance().getAllPoisForWS(offset));\r\n\t\t\t\t\t\t\r\n\t\treturn allPois;\r\n\t}",
"@Path(\"/poleInspection\")\n@Consumes(MediaType.APPLICATION_JSON)\n@Produces(MediaType.APPLICATION_JSON)\npublic interface PoleInspectionWebService extends WebService {\n \n @PUT\n @Operation(summary = \"Create a new pole inspection record\", description = \"Creates a new pole inspection. If unique ID is not populated, it will be populated in the returned object.\")\n PoleInspection create(\n @Parameter(required = true) @HeaderParam(\"Authorization\") String authToken,\n PoleInspection inspection\n );\n \n @GET\n @Path(\"/{inspectionId}\")\n @Operation(summary = \"Get pole inspection by ID\", description = \"Gets pole inspection by unique ID\")\n PoleInspection retrieve(\n @Parameter(required = true) @HeaderParam(\"Authorization\") String authToken,\n @PathParam(\"inspectionId\") String id);\n \n @GET\n @Path(\"/{inspectionId}/summary\")\n @Operation(summary = \"Get pole inspection summary\", description = \"Gets a summary of a pole inspection.\")\n PoleInspectionSummary retrieveSummary(\n @Parameter(required = true) @HeaderParam(\"Authorization\") String authToken,\n @PathParam(\"inspectionId\") String id);\n\n @POST\n @Path(\"/search\")\n @Operation(summary = \"Search pole inspections\", description = \"Get a list of pole inspections by search criteria.\")\n List<PoleInspection> search(\n @Parameter(required = true) @HeaderParam(\"Authorization\") String authToken,\n AssetInspectionSearchParams searchParams);\n \n @POST\n @Operation(summary = \"Updates a pole inspection.\", description = \"Updates an existing pole inspection record.\")\n void update(\n @Parameter(required = true) @HeaderParam(\"Authorization\") String authToken,\n PoleInspection inspection\n );\n\n @DELETE\n @Path(\"/{inspectionId}\")\n @Operation(summary = \"Delete pole inspection by ID\", description = \"Deletes pole inspection by unique ID\")\n public void delete(\n @Parameter(required = true) @HeaderParam(\"Authorization\") String authToken,\n @PathParam(\"inspectionId\") String id\n );\n}",
"@GetMapping\n public List<RequestDto> getRequests(@RequestParam Map<String, String> params) {\n String orderByParam = params.get(ORDER_BY_PARAM);\n List<OrderByField> orderByFields = orderByParamToOrderByFields(orderByParam);\n\n List<Map.Entry<String, String>> filterFields = params.entrySet().stream()\n .filter(entry -> !entry.getKey().equals(ORDER_BY_PARAM))\n .collect(Collectors.toList());\n return requestsService.getRequests(filterFields, orderByFields)\n .stream()\n .map(this::convertToDto)\n .collect(Collectors.toList());\n }",
"@GetMapping (path=\"peliculas\",produces= {MediaType.APPLICATION_JSON_VALUE})\n\t//1.-mapeo de recursos a url 2.- verbo 3.- multiples representaciones \n\tpublic ResponseEntity<List<Pelicula>> listarPeliculas() {\n\t\tList<Pelicula> lista = daoPelicula.findAll();\n\t\tResponseEntity<List<Pelicula>> re = new ResponseEntity<>(lista,HttpStatus.OK);\n\t\t//4.-basado codigos de respuesta, si el recurso exite le devolvemos el ok un 200\n\t\treturn re;\n\t\t//5.-uso de cabeceras\n\t}",
"Request<List<UserInfoDetailsProxy>> getPassengerList(List<Long> passengers);",
"private void onDeviceList(RequestDeviceList r){\n\t\t//Answer the request with the list of devices from the group\n\t\tgetSender().tell(new ReplyDeviceList(r.requestId, deviceActors.keySet()), getSelf());\n\t}",
"@GetMapping(\"/getDepotList\")\n\tpublic List<Depot> getDepotList() {\n\t\treturn busService.getDepotList();\n\t}",
"@Override\n\tpublic Propisi dodajDeo(String requestData) throws JAXBException {\n\n\t\tJSONObject json = new JSONObject(requestData);\n\n\t\tString tekstClana = \"\";\n\t\tString redniBroj = \"\";\n\t\tString tekstStava = \"\";\n\t\tString nazivGlave = \"\";\n\t\tString refPropisNaziv = \"\";\n\n\t\tString nazivDela = json.getString(\"nazivDeo\");\n\n\t\tString nazivClana = json.getString(\"nazivClana\");\n\t\tString opisClana = json.getString(\"opisClana\");\n\t\ttry {\n\t\t\ttekstClana = json.getString(\"tekstClana\");\n\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tredniBroj = json.getString(\"redniBrojStava\");\n\t\t\ttekstStava = json.getString(\"stavTekst\");\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tnazivGlave = json.getString(\"nazivGlave\");\n\t\t} catch (org.json.JSONException e) {\n\n\t\t}\n\t\t\n\t\t\n\n\t\tDeo deo = new Deo();\n\t\tGlava glava = new Glava();\n\t\tClan clan = new Clan();\n\t\tSadrzaj sadrzaj = new Sadrzaj();\n\t\tStav stav = new Stav();\n\t\tTekst tekst = new Tekst();\n\t\t\n\t\ttry {\n\t\t\trefPropisNaziv = json.getString(\"refernciranPropis\");\n\t\t} catch (JSONException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t//ako je true, znaci da refernciramo\n\t\tif(!refPropisNaziv.equals(\"\"))\n\t\t{\n\t\t\tJSONArray jsonArray2 = json.getJSONArray(\"splitovanTekstClan\");\n\t\t\tList<String> list2 = new ArrayList<String>();\n\t\t\tfor (int i=0; i<jsonArray2.length(); i++) {\n\t\t\t\ttekst.getText().add( jsonArray2.getString(i) );\n\t\t\t}\n\t\n\t\t\ttekst.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\ttekst.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\ttekst.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\ttekst.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttekst.getText().add(tekstClana);\n\t\t}\n\n\t\tif (!redniBroj.equals(\"\")) {\n\t\t\tstav.setRedniBroj(Long.parseLong(redniBroj));\n\t\t\tif(!refPropisNaziv.equals(\"\")){\n\t\t\t\tstav.setTekst(tekst.getText());\n\t\t\t\tstav.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\t\tstav.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\t\tstav.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\t\tstav.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t}else{\n\t\t\t\tstav.getTekst().add(tekstStava);\n\t\t\t}\n\t\t\tsadrzaj.getStav().add(stav);\t\n\t\t}\n\t\tif (!tekstClana.equals(\"\")) {\n\t\t\tsadrzaj.getTekst().add(tekst);\n\t\t}\n\t\tif (!nazivGlave.equals(\"\")) {\n\t\t\tglava.getClan().add(clan);\n\t\t\tglava.setID(BigInteger.valueOf(getID()));\n\t\t\tglava.setNaziv(nazivGlave);\n\t\t\tdeo.getGlava().add(glava);\n\t\t}\n\n\t\tclan.setID(BigInteger.valueOf(getID()));\n\t\tclan.setNaziv(nazivClana);\n\t\tclan.setOpis(opisClana);\n\t\tclan.setSadrzaj(sadrzaj);\n\n\t\tif (nazivGlave.equals(\"\")) {\n\t\t\tdeo.getClan().add(clan);\n\t\t}\n\n\t\t// Unmarshalling generi�e objektni model na osnovu XML fajla\n\t\tPropisi propisi = (Propisi) unmarshall(new File(\"./data/xml/propisi.xml\"));\n\n\t\tdeo.setID(BigInteger.valueOf(getID()));\n\t\tdeo.setNaziv(nazivDela);\n\t\tpropisi.getPropisi().get(propisi.getPropisi().size() - 1).getDeo().add(deo);\n\n\t\treturn propisi;\n\t}",
"@Named(\"publisher:list\")\n @GET\n @Path(\"/publishers\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Publisher> listPublishers();",
"public interface SensorAPI {\n\n /**\n * Get the sensor output API.\n *\n * @return the API\n */\n @Path(\"sensorOutputs\")\n SensorOutputAPI sensorOutputs();\n\n /**\n * Get the device API.\n *\n * @return the API\n */\n @Path(\"device\")\n DeviceAPI devices();\n\n /**\n * Get the platform API.\n *\n * @return the API\n */\n @Path(\"platforms\")\n PlatformAPI platforms();\n\n /**\n * JAX-RS interface for the sensor output resource.\n */\n interface SensorOutputAPI {\n /**\n * Get the outputs of the device\n *\n * @param device the device\n *\n * @return the outputs\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceSensorOutputs/{device}\")\n List<JsonSensorOutput> byDevice(@PathParam(\"device\") int device);\n }\n\n /**\n * JAX-RS interface for the device resource.\n */\n interface DeviceAPI {\n /**\n * Get the children of the device.\n *\n * @param device the device\n *\n * @return the children\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getChildrenOfDevice/{device}\")\n List<JsonDevice> childrenOf(@PathParam(\"device\") int device);\n\n /**\n * Get the SensorML description of the device.\n *\n * @param id the id\n *\n * @return the SensorML description\n */\n @GET\n @Produces(MediaType.APPLICATION_XML)\n @Path(\"getDeviceAsSensorML/{device}\")\n String getSensorML(@PathParam(\"device\") int id);\n\n /**\n * Get the list of all devices.\n *\n * @return the devices\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllActiveDevicesFast\")\n List<JsonDevice> all();\n\n /**\n * Get the device.\n *\n * @param device the id\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDevice/{device}\")\n JsonDevice byId(@PathParam(\"device\") int device);\n\n /**\n * Get all device categories.\n *\n * @return the device categories\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();\n\n /**\n * Get the device.\n *\n * @param urn the URN\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceByUrn/{urn}\")\n JsonDevice byURN(@PathParam(\"urn\") String urn);\n }\n\n /**\n * JAX-RS interface for the platform resource.\n */\n interface PlatformAPI {\n /**\n * Get all platforms.\n *\n * @return the platforms\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllRootItems\")\n List<JsonDevice> all();\n\n /**\n * Get all platform types.\n *\n * @return the platform types\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();\n }\n\n}",
"public List getInwDepartCompetences(InwDepartCompetence inwDepartCompetence);",
"@Path(\"/providers/Microsoft.Compute/locations/{location}\")\n@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })\n@Consumes(APPLICATION_JSON)\npublic interface OSImageApi {\n\n /**\n * List Publishers in location\n */\n @Named(\"publisher:list\")\n @GET\n @Path(\"/publishers\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Publisher> listPublishers();\n\n /**\n * List Offers in publisher\n */\n @Named(\"offer:list\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Offer> listOffers(@PathParam(\"publisher\") String publisher);\n\n /**\n * List SKUs in offer\n */\n @Named(\"sku:list\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<SKU> listSKUs(@PathParam(\"publisher\") String publisher, @PathParam(\"offer\") String offer);\n\n /**\n * List Versions in SKU\n */\n @Named(\"version:list\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus/{sku}/versions\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Version> listVersions(@PathParam(\"publisher\") String publisher, @PathParam(\"offer\") String offer,\n @PathParam(\"sku\") String sku);\n \n /**\n * Get the details of a Version\n */\n @Named(\"version:get\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus/{sku}/versions/{version}\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n Version getVersion(@PathParam(\"publisher\") String publisher, @PathParam(\"offer\") String offer,\n @PathParam(\"sku\") String sku, @PathParam(\"version\") String version);\n\n}",
"@Test\n void riordina() {\n sorgenteList = Arrays.asList(\"luglio\", \"marzo\", \"gennaio\");\n previstoList = Arrays.asList(\"gennaio\", \"marzo\", \"luglio\");\n\n ottenutoList = service.riordina(sorgenteList);\n assertNotNull(ottenutoList);\n assertEquals(previstoList, ottenutoList);\n }",
"@Override\n\tpublic Propis dodajPropis(String requestData) throws DatatypeConfigurationException {\n\n\t\tJSONObject json = new JSONObject(requestData);\n\n\t\tString tekstClana = \"\";\n\t\tString redniBroj = \"\";\n\t\tString tekstStava = \"\";\n\t\tString nazivGlave = \"\";\n\t\tString refPropisNaziv = \"\";\n\n\t\tString propisNaziv = json.getString(\"nazivPropisa\");\n\t\tString nazivDela = json.getString(\"nazivDeo\");\n\n\t\tString nazivClana = json.getString(\"nazivClana\");\n\t\tString opisClana = json.getString(\"opisClana\");\n\t\ttry {\n\t\t\ttekstClana = json.getString(\"tekstClana\");\n\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tredniBroj = json.getString(\"redniBrojStava\");\n\t\t\ttekstStava = json.getString(\"stavTekst\");\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tnazivGlave = json.getString(\"nazivGlave\");\n\t\t} catch (org.json.JSONException e) {\n\n\t\t}\n\n\t\tPropis propis = new Propis();\n\t\tDeo deo = new Deo();\n\t\tGlava glava = new Glava();\n\t\tClan clan = new Clan();\n\t\tSadrzaj sadrzaj = new Sadrzaj();\n\t\tStav stav = new Stav();\n\t\tTekst tekst = new Tekst();\n\t\t\n\t\t\n\t\ttry {\n\t\t\trefPropisNaziv = json.getString(\"refernciranPropis\");\n\t\t} catch (JSONException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t//ako je true, znaci da refernciramo\n\t\tif(!refPropisNaziv.equals(\"\"))\n\t\t{\n\t\t\tJSONArray jsonArray2 = json.getJSONArray(\"splitovanTekstClan\");\n\t\t\tList<String> list2 = new ArrayList<String>();\n\t\t\tfor (int i=0; i<jsonArray2.length(); i++) {\n\t\t\t\ttekst.getText().add( jsonArray2.getString(i) );\n\t\t\t}\n\t\n\t\t\ttekst.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\ttekst.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\ttekst.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\ttekst.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttekst.getText().add(tekstClana);\n\t\t}\n\t\t\n\t\t\n\t\n\t\tif (!redniBroj.equals(\"\")) {\n\t\t\tstav.setRedniBroj(Long.parseLong(redniBroj));\n\t\t\tif(!refPropisNaziv.equals(\"\")){\n\t\t\t\tstav.setTekst(tekst.getText());\n\t\t\t\tstav.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\t\tstav.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\t\tstav.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\t\tstav.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t}else{\n\t\t\t\tstav.getTekst().add(tekstStava);\n\t\t\t}\n\t\t\tsadrzaj.getStav().add(stav);\t\t\t\n\t\t}\n\t\tif (!tekstClana.equals(\"\") && redniBroj.equals(\"\")) {\n\t\t\tsadrzaj.getTekst().add(tekst);\n\t\t}\n\t\tif (!nazivGlave.equals(\"\")) {\n\t\t\tglava.getClan().add(clan);\n\t\t\tglava.setID(BigInteger.valueOf(getID()));\n\t\t\tglava.setNaziv(nazivGlave);\n\t\t\tdeo.getGlava().add(glava);\n\t\t}\n\n\t\tclan.setID(BigInteger.valueOf(getID()));\n\t\tclan.setNaziv(nazivClana);\n\t\tclan.setOpis(opisClana);\n\t\tclan.setSadrzaj(sadrzaj);\n\n\t\tif (nazivGlave.equals(\"\")) {\n\t\t\tdeo.getClan().add(clan);\n\t\t}\n\n\t\tdeo.setID(BigInteger.valueOf(getID()));\n\t\tdeo.setNaziv(nazivDela);\n\n\t\tpropis.setID(BigInteger.valueOf(getID()));\n\t\tpropis.setNaziv(propisNaziv);\n\t\tpropis.getDeo().add(deo);\n\t\tpropis.setStatus(\"PREDLOZEN\");\n\t\t\n\n\t\t\n\t\tGregorianCalendar c = new GregorianCalendar();\t\n\t\tc.setTime(new Date()); \n\t\t\n\t\tXMLGregorianCalendar date2 = DatatypeFactory.newInstance().newXMLGregorianCalendar(c);\n\t\tCalendar calendar = date2.toGregorianCalendar();\n\t\t\n\t\tpropis.setDatum(date2);\n\t\t\n\t\t// Postavljanje metapodatka koji predstavlja datum kriranja propisa\n\t\tPropis.DatumKreiranja datumKreiranjaPropisa = new Propis.DatumKreiranja();\n\t\tdatumKreiranjaPropisa.setProperty(datumKreiranjaPropisa.getProperty()); \t\t// Pošto neće samo da se izgeneriše\n\t\tdatumKreiranjaPropisa.setDatatype(datumKreiranjaPropisa.getDatatype());\t\t\t// Pošto neće samo da se izgeneriše\n\t\tdatumKreiranjaPropisa.setValue(date2);\n\t\tpropis.setDatumKreiranja(datumKreiranjaPropisa);\n\n\t\t// Postavljanje about atributa/resursa za metapodatke\n\t\t// propis.setAbout(\"http://www.parlament.gov.rs/rdf/resoruce/\"+propis.getID());\n\t\t\n\t\t// svaki novi propis ce imati svoje ime kao naziv xml fajla\n\t\tString docIdPre = propis.getNaziv().replaceAll(\"\\\\s\", \"\");\n\t\tpropis.setAbout(\"http://www.parlament.gov.rs/rdf/resoruce/\"+docIdPre);\n\t\t\n\t\treturn propis;\n\t}",
"@Named(\"offer:list\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Offer> listOffers(@PathParam(\"publisher\") String publisher);",
"@Override\r\n\tpublic List<ParcelResponse> getParcelReleaseList(String client) {\n\t\tList<Parcels> js = (List<Parcels>)parcelRepository.fetchreleaseparcel(client);\r\n\t\tList<ParcelResponse> parcellist = new ArrayList<ParcelResponse>();\r\n\t\tfor(Parcels par : js){\r\n\t\t\tParcelResponse p = new ParcelResponse();\r\n\t\t\tp.setParcelid(par.getID());\r\n\t\t\tp.setHawb(par.getHawb());\r\n\t\t\tp.setMawb(par.getMawb());\r\n\t\t\tp.setNote(par.getNote());\r\n\t\t\tDropDownModel model = new DropDownModel();\r\n\t\t\tmodel.setName(par.getStatus());\r\n\t\t\tmodel.setValue(par.getStatus());\r\n\t\t\tp.setStat(model);\r\n\t\t\tDropDownModel model1 = new DropDownModel();\r\n\t\t\tmodel1.setName(par.getClient());\r\n\t\t\tmodel1.setValue(par.getClient());\r\n\t\t\tp.setClient(model1);\r\n\t\t\tDropDownModel model2 = new DropDownModel();\r\n\t\t\tmodel2.setName(par.getPod());\r\n\t\t\tmodel2.setValue(par.getPod());\r\n\t\t\tp.setPod(model2);\r\n\t\t\tparcellist.add(p);\r\n\t\t}\r\n\t\treturn parcellist;\r\n\t}",
"List<ProductDto> getProducts();",
"public List<PostalAddress> newServiceProvidingRequest() {\n UserSession session = app.getCurrentSession();\n String email = session.getEmailUser();\n ClientRecords rc = company.getClientRecords();\n cli = rc.getClientByEmail(email);\n List<PostalAddress> led = cli.getPostalAddresses();\n return led;\n }",
"public interface iRetrofitTCU {\n\n //String ENDPOINT = \"http://mobile-aceite.tcu.gov.br/mapa-da-saude\";\n\n @GET(\"rest/emprego\")\n Call<List<Posto>> callListPostoSINE(); // getPosto(@Path(\"codPosto\") String codPosto\n\n @GET(\"rest/emprego/latitude/{latitude}/longitude/{long}/raio/{raio}\")\n Call<List<Posto>> listPosto(@Path(\"latitude\") String lat,@Path(\"long\") String lon,@Path(\"raio\") String raio);\n\n}",
"interface PlatformAPI {\n /**\n * Get all platforms.\n *\n * @return the platforms\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllRootItems\")\n List<JsonDevice> all();\n\n /**\n * Get all platform types.\n *\n * @return the platform types\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();\n }",
"@Override\n public List<Advertisement> advertisementListWeb(Map<String, Object> params)\n {\n return advertisementMapper.advertisementListWeb(params);\n }",
"@RequestMapping(value = \"/deploy/bladelogic/collect\", method = GET, produces = APPLICATION_JSON_VALUE)\n\tpublic List<Deployment> BladeLogicData() {\n\t\tList<Deployment> deploys = null;\n\t\tObjectMapper objectMapper = null;\n\t\tobjectMapper = new ObjectMapper();\n\t\tobjectMapper.configure(Feature.AUTO_CLOSE_SOURCE, true);\n\t\ttry {\n\t\t\tURL url = new URL(\"http://localhost:8083/collect\");\n\t\t\tDeployment[] temp = objectMapper.readValue(url, Deployment[].class);\n\t\t\tdeploys = Arrays.asList(temp);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getClass().getSimpleName());\n\t\t}\n\t\treturn deploys;\n\t}",
"@SwaggerDefinition(info = @Info(description = \"Ampula API \", version = \"1.0.0\", title = \"Ampula API\"),\n produces = MediaType.APPLICATION_JSON_UTF8_VALUE,\n schemes = SwaggerDefinition.Scheme.HTTPS\n)\n@Api(tags = \"Doctor Service\", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, protocols = \"https\")\n@RequestMapping(value = \"api/doctor/\")\npublic interface DoctorEndpoint {\n\n @ApiOperation(value = \"Add new doctor\")\n @ApiResponses({\n @ApiResponse(code = 200, message = \"OK\")\n })\n @RequestMapping(value = \"/add\", method = RequestMethod.POST)\n GeneralResponse<Long> addNewDoctor(GeneralRequest<Void, CreateDoctorRequest> request);\n\n\n @ApiOperation(value = \"Fire a doctor\")\n @ApiResponses({\n @ApiResponse(code = 200, message = \"OK\"),\n @ApiResponse(code = 500, message = \"Server error\", response = GeneralErrorResponse.class)\n })\n @RequestMapping(value = \"/delete\", method = RequestMethod.DELETE)\n GeneralResponse<Void> deleteDoctor(Long doctor_id);\n\n\n @ApiOperation(value = \"Update doctor data\")\n @ApiResponses({\n @ApiResponse(code = 200, message = \"OK\"),\n @ApiResponse(code = 500, message = \"Server error\", response = GeneralErrorResponse.class)\n })\n @RequestMapping(value = \"/update\", method = RequestMethod.POST)\n GeneralResponse<Void> updateDoctorData(GeneralRequest<Long, UpdateDoctorRequest> request);\n\n\n @ApiOperation(value = \"Get doctor data by ID\")\n @ApiResponses({\n @ApiResponse(code = 200, message = \"OK\"),\n @ApiResponse(code = 500, message = \"Server error\", response = GeneralErrorResponse.class)\n })\n @RequestMapping(value = \"/get\", method = RequestMethod.GET)\n GeneralResponse<DoctorDTO> getDoctor(Long doctor_id);\n\n\n @ApiOperation(value = \"Get all doctor's patients\")\n @ApiResponses({\n @ApiResponse(code = 200, message = \"OK\"),\n @ApiResponse(code = 500, message = \"Server error\", response = GeneralErrorResponse.class)\n })\n @RequestMapping(value = \"/get/all/patients\", method = RequestMethod.GET)\n GeneralResponse<List<CardDTO>> getAllPatients(Long doctor_id);\n\n\n @ApiOperation(value = \"Get all doctors\")\n @ApiResponses({\n @ApiResponse(code = 200, message = \"OK\")\n })\n @RequestMapping(value = \"/get/all\", method = RequestMethod.GET)\n GeneralResponse<List<DoctorDTO>> getAll();\n\n\n}",
"Request<List<SimpleTravelProxy>> findAllSimpleTravels();",
"private void getFlatList(final String complex_id, final String block_name) {\n String tag_string_req = \"req_login\";\n\n loaderDialog.show();\n array4 = new ArrayList<>();\n flatList.clear();\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.registration_flat_list, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"JOB RESPONSE: \" + response.toString());\n\n loaderDialog.dismiss();\n\n Gson gson = new Gson();\n\n try {\n\n JsonObject jobj = gson.fromJson(response, JsonObject.class);\n String status = jobj.get(\"status\").getAsString().replaceAll(\"\\\"\", \"\");\n String message = jobj.get(\"message\").getAsString().replaceAll(\"\\\"\", \"\");\n\n Log.d(\"jobj\", \"\" + jobj);\n\n if(status.equals(\"1\")) {\n //array.add(\"Select Location\");\n JsonArray all_data = jobj.getAsJsonArray(\"all_data\");\n\n array4.add(\"Flat Number\");\n\n for (int j = 0; j < all_data.size(); j++) {\n\n JsonObject flat = all_data.get(j).getAsJsonObject();\n String floor = flat.get(\"floor\").getAsString().replaceAll(\"\\\"\", \"\");\n JsonArray data = flat.getAsJsonArray(\"data\");\n\n for (int i = 0; i < data.size(); i++) {\n JsonObject jobj1 = data.get(i).getAsJsonObject();\n //get the object\n\n String id = jobj1.get(\"id\").toString().replaceAll(\"\\\"\", \"\");\n String flat_no = jobj1.get(\"flat_no\").toString().replaceAll(\"\\\"\", \"\");\n\n HashMap<String, String> map_ser = new HashMap<>();\n\n map_ser.put(\"id\", id);\n map_ser.put(\"flat_no\", flat_no);\n\n flatList.add(map_ser);\n array4.add(flat_no + \"(Floor : \"+floor+\")\");\n\n }\n\n }\n\n }else {\n\n array4.add(\"No Flat Found\");\n }\n\n dataadapter4 = new ArrayAdapter(RegisterFlatDetails.this,\n R.layout.item_spinner, R.id.tvCust, array4);\n edt_flat_no.setAdapter(dataadapter4);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"DATA NOT FOUND: \" + error.getMessage());\n loaderDialog.dismiss();\n }\n }){\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to activity_login url\n Map<String, String> params = new HashMap<>();\n\n params.put(\"complex_id\", complex_id);\n params.put(\"block\", block_name);\n params.put(\"type\", user_type);\n\n // Log.d(TAG, \"city_id: \"+params);\n\n return params;\n }\n\n };\n // Adding request to request queue\n GlobalClass.getInstance().addToRequestQueue(strReq, tag_string_req);\n strReq.setRetryPolicy(new DefaultRetryPolicy(20 * 1000,\n 10, 1.0f));\n\n }",
"public interface DeviceService extends BaseService<PDevice,String> {\n\n int checkDeviceName(String dname);\n List<String> getallIp();\n int count();\n String authDevice(String msg1);\n void updateDeviceCon(String eid,String conStatue);\n ReType showCon(PDevice pDevice, int page, int limit);\n\n\n List<PDevice> getAlldevice();\n\n void addDevice(PDevice pDevice);\n\n void updateDeviceIp(String eid, String inetAddress);\n\n PDevice selectDevicebyeid(String eid);\n\n JsonUtil deletebydeviceId(String eid, boolean flag);\n\n void updateDevice(PDevice pDevice);\n\n\n List<HashMap<String,String>> getDeviceConnect(List<String> deviceids);\n}",
"public void GetParams(int id){\n\t JSONObject device;\n\t List<String> params = new ArrayList<String>();\n\t\t\n\t try {\n\t\tHttpResponse<JsonNode> response = Unirest.get(\"https://painel.dcc.ufmg.br/midea/detail/\" + Integer.toString(id))\n\t\t .header(\"accept\", \"application/json, text/plain, */*\")\n\t\t .header(\"x-devtools-emulate-network-conditions-client-id\", \"dfc781d4-4de5-4a54-a230-12b081f0187d\")\n\t\t .header(\"user-agent\", \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36\")\n\t\t .header(\"referer\", \"https://painel.dcc.ufmg.br/midea/\")\n\t\t .header(\"accept-encoding\", \"gzip, deflate, br\")\n\t\t .header(\"accept-language\", \"pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7\")\n\t\t .header(\"cookie\", \"session=.eJwlzs1ugzAQBOBXqfacQzHhgpSbSQXSLiIysdaXKCFEscE98KMER3n30vY6I30zLzjdhna8QzoNc7uBk71C-oKPC6SA4epZ3S3r6mlcLUhzxK6wqDHhcOgo5LGRhTWSY1Tdwp4fpTz2pHEhmT9ZUP-bG5fH5DGw3_eoq3h1_nvXJOQLt9qfFJoteVr3ssDh2KPMEqPwUaomIrl6X7UoVZ2U2lh0nUCx74zKIhL1QiLbwXsD89gOf_9hmQf7be00zv4M7x8c6EyD.DPiMAA.mPVHlsFOK9PP0VA8LGsaki5qRZg\")\n\t\t .header(\"cache-control\", \"no-cache\")\n\t\t .asJson();\n\t\t\n\t\tdevice = (JSONObject) response.getBody().getObject().get(\"device\");\n\t\tget_Estado = (String) device.get(\"estado\");\n\t\tget_Temp = device.get(\"set_temp\").toString();\n\t\tget_Swing = (String) device.get(\"swing\").toString();\n\t\tget_Fan = (String) device.get(\"fan\");\n\t }catch(UnirestException e) {\n\t\tSystem.out.println(\"AIR CONTROL: Failed to get params.\");\n\t }\n\t}",
"@Path(\"platforms\")\n PlatformAPI platforms();",
"@GET\r\n\t@Path(\"getWellData\")\r\n\t@Produces(MediaType.APPLICATION_XML)\r\n\tpublic List<WellDTO> getWellData(@Context HttpServletRequest request,\r\n\t\t\t@Context HttpServletResponse response,\r\n\t\t\t@Context ServletContext servletContext) {\r\n\t\tList<WellDTO> lstAISReadData = getWellData();\r\n\t\tlogger.info(\"getWell size = \" + lstAISReadData.size());\r\n\r\n\t\treturn lstAISReadData;\r\n\t}",
"@Consumes(MediaType.APPLICATION_JSON)\r\n\t@POST\r\n\t@Path(\"flightsList\")\r\n\t//public List<Flight> getFlightsFromCriteria(@PathParam(\"plane\") String plane,@PathParam(\"price\") int price,@PathParam(\"destination\") String destination,@PathParam(\"seats\") int seats) {\r\n\tpublic List<Flight> getFlightsFromCriteria(SearchCriteria sc) {\r\n\t\tList<Flight> l = DaoFactory.getFlightDao().getFlightsFromCriteria(sc);\r\n\t\tSystem.out.print(l);\r\n\t\treturn l;\r\n\t}",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String obtener() {\n logger.debug(\"Obteniendo todos los equipos\");\n Set<Sala> salas= salaService.buscarTodasLasSalasSimples();\n logger.debug(\"Obtenidas.\");\n Genson genson = new Genson();\n String retorno = genson.serialize(salas);\n logger.debug(retorno);\n return retorno;\n }",
"@GetMapping(\"/listAll\")\n List<WebformMetabaseVO> getListWebforms();",
"public static void main(String[] args) {\n Gson json = new Gson();\n RestPregunta client = new RestPregunta();\n ArrayList value = client.getPreguntasCuestionario(ArrayList.class, \"68\");\n for(Object ob: value){ \n System.out.println(ob);\n Pregunta pregunta = json.fromJson(ob.toString(), Pregunta.class);\n System.out.println(pregunta.getPregunta());\n }\n client.close();\n //Gson json = new Gson();\n RestPregunta restPregunta = new RestPregunta();\n ArrayList<Pregunta> lista = new ArrayList();\n ArrayList values = restPregunta.getPreguntasCuestionario(ArrayList.class,\"68\");\n for(Object pro: values){\n Pregunta pregunta = json.fromJson(pro.toString(), Pregunta.class);\n lista.add(new Pregunta(pregunta.getIdPregunta(), pregunta.getIdCuestionario(), pregunta.getPuntoAsignado(), pregunta.getPuntoObtenido(), pregunta.getPregunta())); \n }\n// Pregunta pregunta = client.getPregunta(Pregunta.class, \"1\");\n// System.out.println(pregunta);\n// System.out.println(pregunta.toString());\n \n// ArrayList value = client.getPreguntas(ArrayList.class);\n // ArrayList<Pregunta> list = new ArrayList();\n// System.out.println(value);\n \n //list.add(pregunta);\n \n //System.out.println(pregunta.getArchivoimg2());\n \n// Pregunta p = new Pregunta(1,14,400,300,\"5000?\",\"C:\\\\Users\\\\Matias\\\\Pictures\\\\Pictures\\\\Sample Pictures\\\\Desert.jpg\", inputStream,\" \");\n //Object ob = p;\n// client.addPregunta(p, Pregunta.class);\n// System.out.println(list);\n \n }",
"@GET\n\t@Path(\"/tipost\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<TipoTransmisionDTO> listarTiposT(){\n\t\tSystem.out.println(\"ini: listarTiposT()\");\n\t\t\n\t\tTipoTransmisionService tipotService = new TipoTransmisionService();\n\t\tArrayList<TipoTransmisionDTO> lista = tipotService.ListadoTipoTransmision();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarTiposT()\");\n\t\t\n\t\treturn lista;\n\t}",
"@Override\n\tpublic List<Portlet> getListForSync(Map<String, Object> param) {\n\t\treturn portletDao.getListForSync(param);\n\t}",
"public ExternalServicesDto getExternalServiceData();",
"@RequestMapping(\"/resources_onecb\")\n public ResponseEntity<List<Resource>> request_onecb() {\n IService1 service1 = Feign.builder()\n .decoder(new JacksonDecoder())\n .target(IService1.class, \"http://\"+service1host+\":\"+service1port);\n\n // Fetch and print a list of the contributors to this library.\n List<Resource> resources = service1.resources();\n\n return new ResponseEntity<List<Resource>>(resources, HttpStatus.OK);\n }",
"@GET\r\n @Produces(\"application/json\")\r\n @Path(\"consumer/vendus/interval/{kiosk}/{date1}/{date2}\")\r\n public List<ServiceVendu> getServices(@PathParam(\"kiosk\") String qosk, @PathParam(\"date1\") String date1, @PathParam(\"date2\") String date2) {\r\n return new ServiceVenduBinder(cs.getServiceVendu(qosk, date1, date2));\r\n }",
"@GetMapping(\"/procesadors\")\n @Timed\n public List<Procesador> getAllProcesadors() {\n log.debug(\"REST request to get all Procesadors\");\n List<Procesador> procesadors = procesadorRepository.findAll();\n return procesadors;\n }",
"@GetMapping(\"/produtos\")\n @Timed\n public ResponseEntity<List<Produto>> getAllProdutos(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Produtos\");\n\n//////////////////////////////////REQUER PRIVILEGIOS\n if (!PrivilegioService.podeVer(cargoRepository, ENTITY_NAME)) {\n log.error(\"TENTATIVA DE VISUALIZAR SEM PERMISSÃO BLOQUEADA! \" + ENTITY_NAME);\n return null;\n }\n\n//////////////////////////////////REQUER PRIVILEGIOS\n Page<Produto> page = produtoRepository.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/produtos\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"@GET\n @Path(\"/conciliacion/{id}\")\n @Produces({MediaType.APPLICATION_JSON})\n public List<EscenarioDTO> getByConciliacion(@PathParam(\"id\") int id) {\n logger.log(Level.INFO, \"id:{0}\", id);\n List<EscenarioDTO> lstDTO;\n List<Escenario> lst;\n lst = managerDAO.findByConciliacion(id);\n lstDTO = lst.stream().map(item -> item.toDTO()).distinct().sorted(comparing(EscenarioDTO::getId)).collect(toList());\n List<EscenarioDTO> lstFinal = (List<EscenarioDTO>) (List<?>) lstDTO;\n return lstFinal;\n }",
"@RequestMapping(value = \"getElevatorObjectList/{principal}\", method = RequestMethod.GET)\n @ResponseBody public List<Elevator> getElevatorObjectList(@PathVariable String principal, \n \t\t\t\t\t\t\t\t\t\t\t @RequestParam String elevatorID,\n \t\t\t\t\t\t\t\t\t\t\t @RequestParam String elevatorName) {\n Elevator elevator1 = new Elevator(Long.valueOf(elevatorID), elevatorName, principal);\n Elevator elevator2 = new Elevator(Long.valueOf(elevatorID) + 1L, elevatorName + \"2\", principal);\n List<Elevator> elevatorList = new ArrayList<Elevator>();\n elevatorList.add(elevator1); \n elevatorList.add(elevator2);\n logger.info(\"------genarate elevatorList : \" + elevatorList.toString() + \"------\");\n return elevatorList;\n }",
"@Override\n public void requestPickup(int floor, int direction) {\n // Pick an elevator at rest\n for (Elevator elevator : elevators) {\n if (elevator.getDirection() == 0) {\n elevator.getRequests().offer(floor);\n return;\n }\n }\n\n // Pick an elevator with least load\n Elevator minElevator = elevators.get(0);\n for (Elevator elevator : elevators) {\n if (elevator.getRequests().size() < minElevator.getRequests().size()) {\n minElevator = elevator;\n }\n }\n // add request\n minElevator.getRequests().offer(floor);\n }",
"public interface HostipalRequest {\n @GET(\"centrosatencion\")\n Call<ArrayList<HospitalEntity>> getHospital();\n}",
"@RequestMapping(value = \"/json/data/app/(*:appId)/version/(*:appVersion)/list/(*:dataListId)\", method = RequestMethod.GET)\n public void getList(final HttpServletRequest request, final HttpServletResponse response,\n @RequestParam(\"appId\") final String appId,\n @RequestParam(\"appVersion\") final String appVersion,\n @RequestParam(\"dataListId\") final String dataListId,\n @RequestParam(value = \"page\", required = false, defaultValue = \"0\") final Integer page,\n @RequestParam(value = \"sort\", required = false) final String sort,\n @RequestParam(value = \"desc\", required = false, defaultValue = \"false\") final Boolean desc,\n @RequestParam(value = \"digest\", required = false) final String digest)\n throws IOException {\n\n LogUtil.info(getClass().getName(), \"Executing JSON Rest API [\" + request.getRequestURI() + \"] in method [\" + request.getMethod() + \"] as [\" + WorkflowUtil.getCurrentUsername() + \"]\");\n\n try {\n // get version, version 0 indicates published version\n long version = Long.parseLong(appVersion) == 0 ? appDefinitionDao.getPublishedVersion(appId) : Long.parseLong(appVersion);\n\n // get current App\n AppDefinition appDefinition = appDefinitionDao.loadVersion(appId, version);\n if (appDefinition == null) {\n // check if app valid\n throw new ApiException(HttpServletResponse.SC_BAD_REQUEST, \"Invalid application [\" + appId + \"] version [\" + version + \"]\");\n }\n\n // set current app definition\n AppUtil.setCurrentAppDefinition(appDefinition);\n\n // get dataList definition\n DatalistDefinition datalistDefinition = datalistDefinitionDao.loadById(dataListId, appDefinition);\n if (datalistDefinition == null) {\n throw new ApiException(HttpServletResponse.SC_BAD_REQUEST, \"DataList Definition for dataList [\" + dataListId + \"] not found\");\n }\n\n // get dataList\n DataList dataList = dataListService.fromJson(datalistDefinition.getJson());\n if(dataList == null) {\n throw new ApiException(HttpServletResponse.SC_BAD_REQUEST, \"Error generating dataList [\" + dataListId + \"]\");\n }\n\n // configure sorting\n if(sort != null) {\n dataList.setDefaultSortColumn(sort);\n\n // order ASC / DESC\n dataList.setDefaultOrder(desc ? DataList.ORDER_DESCENDING_VALUE : DataList.ORDER_ASCENDING_VALUE);\n }\n\n // paging\n int pageSize = page == 0 ? DataList.MAXIMUM_PAGE_SIZE : DataList.DEFAULT_PAGE_SIZE;\n int rowStart = page == 0 ? 0 : ((page - 1) * pageSize);\n\n getCollectFilters(request.getParameterMap(), dataList);\n DataListCollection<Map<String, Object>> collections = dataList.getRows(pageSize, rowStart);\n\n // apply formatting\n for (Map<String, Object> row : collections) {\n row.entrySet().forEach(e -> e.setValue(format(dataList, row, e.getKey())));\n }\n\n JSONArray jsonData = new JSONArray();\n\n for (Map<String, Object> row : collections) {\n try {\n JSONObject jsonRow = new JSONObject();\n for (String field : row.keySet()) {\n jsonRow.put(field, format(dataList, row, field));\n }\n jsonData.put(jsonRow);\n } catch (JSONException e) {\n jsonData.put(new JSONObject(row));\n }\n }\n\n try {\n JSONObject jsonResponse = new JSONObject();\n\n String currentDigest = getDigest(jsonData);\n jsonResponse.put(\"total\", jsonData.length());\n if(!Objects.equals(digest, currentDigest))\n jsonResponse.put(\"data\", jsonData);\n jsonResponse.put(\"digest\", currentDigest);\n\n if (jsonData.length() > 0) {\n response.setStatus(HttpServletResponse.SC_OK);\n } else {\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n }\n\n response.getWriter().write(jsonResponse.toString());\n } catch (JSONException e) {\n throw new ApiException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());\n }\n } catch (ApiException e) {\n LogUtil.warn(getClass().getName(), e.getMessage());\n response.sendError(e.getErrorCode(), e.getMessage());\n }\n }",
"private void buscarLista(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"@SwaggerDefinition(\n info = @Info(\n version = \"1.0.0\",\n title = \"\",\n extensions = {\n @Extension(properties = {\n @ExtensionProperty(name = \"name\", value = \"picavi\"),\n @ExtensionProperty(name = \"context\", value = \"/picavi\"),\n })\n }\n ),\n tags = {\n @Tag(name = \"picavi\", description = \"\")\n }\n)\n@Scopes(\n scopes = {\n @Scope(\n name = \"Enroll device\",\n description = \"\",\n key = \"perm:picavi:enroll\",\n permissions = {\"/device-mgt/devices/enroll/picavi\"}\n )\n }\n)\n@SuppressWarnings(\"NonJaxWsWebServices\")\npublic interface DeviceTypeService {\n /**\n * End point to send message to Picavi device.\n */\n @POST\n @Path(\"device/{deviceId}/message\")\n @ApiOperation(\n httpMethod = \"POST\",\n value = \"Send message to Picavi device\",\n notes = \"\",\n response = Response.class,\n tags = \"picavi\",\n extensions = {\n @Extension(properties = {\n @ExtensionProperty(name = PicaviConstants.SCOPE, value = \"perm:picavi:enroll\")\n })\n }\n )\n @ApiResponses(value = {\n @ApiResponse(\n code = 200,\n message = \"OK.\",\n response = Response.class,\n responseHeaders = {\n @ResponseHeader(\n name = \"Content-Type\",\n description = \"The content type of the body\"),\n @ResponseHeader(\n name = \"Last-Modified\",\n description = \"Date and time the resource was last modified.\\n\" +\n \"Used by caches, or in conditional requests.\"),\n }),\n @ApiResponse(\n code = 400,\n message = \"Bad Request. \\n Invalid Device Identifiers found.\",\n response = Response.class),\n @ApiResponse(\n code = 401,\n message = \"Unauthorized. \\n Unauthorized request.\"),\n @ApiResponse(\n code = 500,\n message = \"Internal Server Error. \\n Error occurred while executing command operation to\"\n + \" send threashold\",\n response = Response.class)\n })\n Response sendMessage(\n @ApiParam(\n name = \"deviceId\",\n value = \"The registered device Id.\",\n required = true)\n @PathParam(\"deviceId\") String deviceId,\n @ApiParam(\n name = \"message\",\n value = \"The message to be displayed.\",\n required = true)\n @QueryParam(\"message\") String message);\n\n /**\n * Enroll devices.\n */\n @POST\n @Path(\"device/{device_id}/register\")\n @ApiOperation(\n httpMethod = \"POST\",\n value = \"Enroll device\",\n notes = \"\",\n response = Response.class,\n tags = \"picavi\",\n extensions = {\n @Extension(properties = {\n @ExtensionProperty(name = PicaviConstants.SCOPE, value = \"perm:picavi:enroll\")\n })\n }\n )\n @ApiResponses(value = {\n @ApiResponse(\n code = 202,\n message = \"Accepted.\",\n response = Response.class),\n @ApiResponse(\n code = 406,\n message = \"Not Acceptable\"),\n @ApiResponse(\n code = 500,\n message = \"Internal Server Error. \\n Error on retrieving stats\",\n response = Response.class)\n })\n Response register(\n @ApiParam(\n name = \"deviceId\",\n value = \"Device identifier id of the device to be added\",\n required = true)\n @PathParam(\"device_id\") String deviceId,\n @ApiParam(\n name = \"deviceName\",\n value = \"Device name of the device to be added\",\n required = true)\n @QueryParam(\"deviceName\") String deviceName);\n\n /**\n * Retrieve Sensor data for the device type\n */\n @Path(\"device/stats/{deviceId}\")\n @GET\n @ApiOperation(\n consumes = MediaType.APPLICATION_JSON,\n httpMethod = \"GET\",\n value = \"Retrieve Sensor data for the device type\",\n notes = \"\",\n response = Response.class,\n tags = \"picavi\",\n extensions = {\n @Extension(properties = {\n @ExtensionProperty(name = PicaviConstants.SCOPE, value = \"perm:picavi:enroll\")\n })\n }\n )\n @Consumes(\"application/json\")\n @Produces(\"application/json\")\n Response getPicaviDeviceStats(@PathParam(\"deviceId\") String deviceId, @QueryParam(\"from\") long from,\n @QueryParam(\"to\") long to, @QueryParam(\"sensorType\") String sensorType);\n\n\n}",
"@RequestMapping(value = \"/programs\", produces = {\"application/json;charset=UTF-8\"}, method = RequestMethod.GET)\n @ApiOperation(value = \"Get a list of programs given a date for a given range of channels possibly\",\n notes = \"Get a list of programs for a range of channels (one, a list with commas or \"\n + \"all) a specific date formatted as 'YYYY-MM-DD'.\",\n response = Program.class,\n responseContainer = \"List\")\n @ApiResponses(value = {\n @ApiResponse(code = Constant.OK, message = \"OK\", response = Program.class, responseContainer = \"List\",\n responseHeaders = {\n @ResponseHeader(name = \"X-Result-Count\",\n description = \"The actual number of items contained in the response body.\",\n response = String.class),\n @ResponseHeader(name = \"X-Total-Count\",\n description = \"The total number of items in the collection.\", response = String.class),\n @ResponseHeader(name = \"Cache-Control[max-age,public]\", \n description = \"Contains max-age in seconds\", response =\n String.class),\n @ResponseHeader(name = \"ETag\", description = \"The Entity Tag\", response = String.class)}),\n @ApiResponse(code = Constant.BAD_REQUEST, message = \"Bad Request\", response = Error.class),\n @ApiResponse(code = Constant.INTERNAL_EROR, message = \"Internal Server Error\", response = Error.class)})\n public ResponseEntity<List<Program>> getPrograms(\n @RequestParam(value = \"date\", required = false, defaultValue = \"current\") String date,\n @RequestParam(value = \"application\", required = false, defaultValue = \"PC\") String application,\n @RequestParam(value = \"channels\", required = false, defaultValue = \"all\") List<String> channels,\n @RequestParam(value = \"offset\", required = false, defaultValue = \"0\") Integer offset,\n @RequestParam(value = \"limit\", required = false, defaultValue = \"10\") Integer limit) {\n\n LOGGER.info(\"[getPrograms] date={}, application={}, channels={}, offset={}, limit={}\",\n date, application, channels.toString(), offset, limit);\n if (date.equals(\"current\")) {\n date = LocalDate.now().toString();\n } else {\n try {\n LocalDate.parse(date);\n } catch (DateTimeParseException e) {\n throw new SampleException(\"Bad date format\");\n }\n }\n List<Program> lightPaginated = programsService.findAllPrograms(date, application, channels);\n ResponseEntity<List<Program>> responseEntity = ResponseEntity.ok()\n .body(lightPaginated);\n LOGGER.debug(\"[getPrograms] response = {}\", responseEntity.toString());\n return responseEntity;\n }",
"private void getVehicleList() {\n mApiCall.getVehicleList();\n }",
"protected void handleRestlessPath(UrlMappingResource resource, List<String> elementList) {\n }",
"@GetMapping\n public List<Tipovehiculo>listar(){\n return service.listar();\n }",
"@WebService(name = \"PopuplistDtoServicewsEndpoint\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n@XmlSeeAlso({\n ObjectFactoryPopuplist.class\n})\npublic interface PopuplistDtoServicewsEndpoint {\n\n\n /**\n * \n * @param popuplistDto\n * @return\n * returns org.sepro.parameterweb.serviceapi.PopuplistDto\n */\n @WebMethod\n @WebResult(targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n @RequestWrapper(localName = \"updatePopuplistDtoServicews\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.UpdatePopuplistDtoServicews\")\n @ResponseWrapper(localName = \"updatePopuplistDtoServicewsResponse\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.UpdatePopuplistDtoServicewsResponse\")\n public PopuplistDto updatePopuplistDtoServicews(\n @WebParam(name = \"popuplistDto\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n PopuplistDto popuplistDto);\n\n /**\n * \n * @param entite\n * @return\n * returns java.util.List<org.sepro.parameterweb.serviceapi.PopuplistDto>\n */\n @WebMethod\n @WebResult(targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n @RequestWrapper(localName = \"searchPopuplistDtoServicews\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.SearchPopuplistDtoServicews\")\n @ResponseWrapper(localName = \"searchPopuplistDtoServicewsResponse\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.SearchPopuplistDtoServicewsResponse\")\n public List<PopuplistDto> searchPopuplistDtoServicews(\n @WebParam(name = \"entite\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n String entite);\n\n /**\n * \n * @return\n * returns java.util.List<org.sepro.parameterweb.serviceapi.PopuplistDto>\n */\n @WebMethod\n @WebResult(targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n @RequestWrapper(localName = \"getAllPopuplistDtoServicews\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.GetAllPopuplistDtoServicews\")\n @ResponseWrapper(localName = \"getAllPopuplistDtoServicewsResponse\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.GetAllPopuplistDtoServicewsResponse\")\n public List<PopuplistDto> getAllPopuplistDtoServicews();\n\n /**\n * \n * @param popuplistDto\n * @return\n * returns org.sepro.parameterweb.serviceapi.PopuplistDto\n */\n @WebMethod\n @WebResult(targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n @RequestWrapper(localName = \"createPopuplistDtoServicews\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.CreatePopuplistDtoServicews\")\n @ResponseWrapper(localName = \"createPopuplistDtoServicewsResponse\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.CreatePopuplistDtoServicewsResponse\")\n public PopuplistDto createPopuplistDtoServicews(\n @WebParam(name = \"popuplistDto\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n PopuplistDto popuplistDto);\n\n /**\n * \n * @param popuplistDto\n */\n @WebMethod\n @RequestWrapper(localName = \"deletePopuplistDtoServicews\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.DeletePopuplistDtoServicews\")\n @ResponseWrapper(localName = \"deletePopuplistDtoServicewsResponse\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\", className = \"org.sepro.parameterweb.serviceapi.DeletePopuplistDtoServicewsResponse\")\n public void deletePopuplistDtoServicews(\n @WebParam(name = \"popuplistDto\", targetNamespace = \"http://serviceapi.parameterweb.sepro.org/\")\n PopuplistDto popuplistDto);\n\n}",
"@Path(\"/productos\")\n @GET\n @Produces(MediaType.APPLICATION_JSON) //Por que una track si la aceptaba (ejemplo) pero un producto no?\n public String productos(){\n return test.getProductos().get(\"Leche\").toString();\n\n }",
"List<Transport> getTransports();",
"public JSONResponse listbyparentid(HashMap<String, String> parameters) {\n\t\tString pos = parameters.get(\"pos\"); \t\t\t// the point of sale code.\n\t\tString parentid = parameters.get(\"parentid\"); \t// the parent ID of the list\n\n\t\tif (parentid == null || parentid.isEmpty()) {throw new ServiceException(Error.reservation_bad, parentid);}\n\n\t\tSqlSession sqlSession = RazorServer.openSession();\n\t\tReservationWidgetItems result = new ReservationWidgetItems();\n\t\ttry {\n\t\t\tJSONService.getParty(sqlSession, pos);\n\t\t\tArrayList<ReservationWidgetItem> items = sqlSession.getMapper(ReservationMapper.class).listbyparentid(parentid);\n\t\t\tif (items == null || items.isEmpty()) {throw new ServiceException(Error.rate_data);}\n\t\t\tReservationWidgetItem[] array = new ReservationWidgetItem[items.size()];\n\t\t\titems.toArray(array);\n\t\t\tresult.setItems(array);\n\t\t}\n\t\tcatch (Throwable x) {result.setMessage(x.getMessage());}\n\t\treturn result;\n\t}",
"@GET\n @Path(\"orderlist\")\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrderList(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + os.getAllOrders().toJSONString() + \")\";\n }",
"@WebService(name = \"EditionService\", targetNamespace = \"http://services.webservice.ocp4.com/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface EditionService {\n\n\n /**\n * \n * @param arg0\n * @return\n * returns generated.clientserviceEdition.Edition\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"trouverEdition\", targetNamespace = \"http://services.webservice.ocp4.com/\", className = \"generated.clientserviceEdition.TrouverEdition\")\n @ResponseWrapper(localName = \"trouverEditionResponse\", targetNamespace = \"http://services.webservice.ocp4.com/\", className = \"generated.clientserviceEdition.TrouverEditionResponse\")\n @Action(input = \"http://services.webservice.ocp4.com/EditionService/trouverEditionRequest\", output = \"http://services.webservice.ocp4.com/EditionService/trouverEditionResponse\")\n public Edition trouverEdition(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0);\n\n /**\n * \n * @param arg0\n * @return\n * returns java.util.List<generated.clientserviceEdition.Edition>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"listerParOuvrage\", targetNamespace = \"http://services.webservice.ocp4.com/\", className = \"generated.clientserviceEdition.ListerParOuvrage\")\n @ResponseWrapper(localName = \"listerParOuvrageResponse\", targetNamespace = \"http://services.webservice.ocp4.com/\", className = \"generated.clientserviceEdition.ListerParOuvrageResponse\")\n @Action(input = \"http://services.webservice.ocp4.com/EditionService/listerParOuvrageRequest\", output = \"http://services.webservice.ocp4.com/EditionService/listerParOuvrageResponse\")\n public List<Edition> listerParOuvrage(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n Integer arg0);\n\n}",
"public interface PromotionEndpoints {\n\n @GET(\"/promotions\")\n Call<ArrayList<GETPromotionResponse>> getPromotionsForRestaurant(\n @Query(\"restaurant_name\") String name, @Query(\"restaurant_address\") String address);\n\n @POST(\"/promotions\")\n Call<Void> createPromotion(@Body POSTPromotionRequest createPromotionRequest);\n\n @DELETE(\"/promotions\")\n Call<Void> deletePromotion(@Query(\"restaurant_name\") String name,\n @Query(\"restaurant_address\") String address,\n @Query(\"date\") String date,\n @Query(\"description\") String description);\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"http://youfood.ddns.net\")\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n PromotionEndpoints promotionEndpoints = retrofit.create(PromotionEndpoints.class);\n}",
"public void creatOnt(List<Promoter> pros){\r\n\t\tString nameuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Name\";\r\n\t\tString authoruri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Author\";\r\n\t\tString iduri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Identifier\";\r\n\t\tString linkuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Link\";\r\n\t\tString locuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Location\";\r\n\t\tString titleuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Title\";\r\n\t\t\r\n\t\tString activeuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#active\";\r\n\t\tString fromspeciesuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#fromSpecies\";\r\n\t\tString hasgouri = \"http://miuras.inf.um.es/ontologies/OGO.owl#hasGO\";\r\n\t\tString hashomologyuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#hasHomolgy\";\r\n\t\tString haskeyworduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#hasKeywords\";\r\n\t\tString haspromoteruri = \"http://miuras.inf.um.es/ontologies/promoter.owl#hasPromoter\";\r\n\t\tString hasreferenceuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#hasReference\";\r\n\t\tString hasresourceuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#hasResource\";\r\n\t\tString isbelongeduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#isBelongedTo\";\r\n\t\tString isexpresseduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#isExpressedTo\";\r\n\t\tString istranscribeduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#isTranscribedTo\";\r\n\t\tString istranslateduri = \"http://miuras.inf.um.es/ontologies/OGO.owl#isTranslatedTo\";\r\n\t\t\r\n\t\tString gouri = \"http://miuras.inf.um.es/ontologies/OGO.owl#GO_term\";\r\n\t\tString geneuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Gene\";\r\n\t\tString homologyuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Homology\";\r\n\t\tString keyworduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Keyword\";\r\n\t\tString taxonomyuri = \"http://um.es/ncbi.owl#NCBI_1\";\r\n\t\tString promoteruri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Promoter\";\r\n\t\tString proteinuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Protein\";\r\n\t\tString referenceuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Reference\";\r\n\t\tString resourceuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Resource\";\r\n\t\tString mrnauri = \"http://miuras.inf.um.es/ontologies/promoter.owl#mRNA\";\r\n\t\t\r\n\t\tSimpleExample se = new SimpleExample();\r\n\t\tOntModel onmo = null;\r\n\t\ttry {\r\n\t\t\tonmo = se.loadDB2nd();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tint index = 1;\r\n\t\tfor(Promoter pro: pros){\r\n\t\t\t// Create new individual of promoter;\r\n\t\t\tIndividual newproidv = se.CreateandGetIdv(\r\n\t\t\t\t\tpromoteruri + \"_\" + pro.getName(),\r\n\t\t\t\t\tpromoteruri, onmo);\r\n\t\t\t// Create the relation between promoter and homology\r\n\t\t\tif(pro.getHomology().getId().trim().length()>0){\r\n\t\t\t\tIndividual homoidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\thomologyuri + \"_\" + pro.getHomology().getId(),\r\n\t\t\t\t\t\thomologyuri, onmo);\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), hashomologyuri, homoidv.getURI());\r\n\t\t\t}\r\n\t\t\t//create the reference individual and the relation to promoter\r\n\t\t\tfor(Reference ref : pro.getReferences()){\r\n\t\t\t\tIndividual refidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\treferenceuri + \"_\" + ref.getPubmed(),\r\n\t\t\t\t\t\treferenceuri, onmo);\r\n\t\t\t\tse.addDataProperty(onmo, refidv.getURI(), authoruri, ref.getAuther());\r\n\t\t\t\tse.addDataProperty(onmo, refidv.getURI(), titleuri, ref.getTitle());\r\n\t\t\t\tse.addDataProperty(onmo, refidv.getURI(), iduri, ref.getPubmed());\r\n\t\t\t\tse.addDataProperty(onmo, refidv.getURI(), locuri, ref.getLocation());\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), hasreferenceuri, refidv.getURI());\r\n\t\t\t}\r\n\t\t\t//create the resource individual and the relation to promoter\r\n\t\t\tfor(Resource res : pro.getResources()){\r\n\t\t\t\tIndividual residv = se.CreateandGetIdv(\r\n\t\t\t\t\t\tresourceuri + \"_\" + res.getId(),\r\n\t\t\t\t\t\tresourceuri, onmo);\r\n\t\t\t\tse.addDataProperty(onmo, residv.getURI(), nameuri, res.getDataset());\r\n\t\t\t\tse.addDataProperty(onmo, residv.getURI(), linkuri, res.getLink());\r\n\t\t\t\tse.addDataProperty(onmo, residv.getURI(), iduri, res.getId());\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), hasresourceuri, residv.getURI());\r\n\t\t\t}\r\n\t\t\t//create the keyword individual and the relation to promoter\r\n\t\t\tfor(Keyword kwd : pro.getKeywords()){\r\n\t\t\t\tIndividual kwdidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\tkeyworduri + \"_\" + kwd.getKeyword(),\r\n\t\t\t\t\t\tkeyworduri, onmo);\r\n\t\t\t\tse.addDataProperty(onmo, kwdidv.getURI(), nameuri, kwd.getKeyword());\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), haskeyworduri, kwdidv.getURI());\r\n\t\t\t}\r\n\t\t\t//create the gene individual and the relative individuals to the gene\r\n\t\t\t//create the relation between the gene individual and the relative individuals to the gene and the promoter\r\n\t\t\tfor(Gene gen: pro.getGenes()){\r\n\t\t\t\t//create the gene individual and the relation to promoter\r\n\t\t\t\tIndividual genidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\tgeneuri + \"_\" + gen.getId(),\r\n\t\t\t\t\t\tgeneuri, onmo);\r\n\t\t\t\tse.addDataProperty(onmo, genidv.getURI(), iduri, gen.getId());\r\n\t\t\t\tse.addObjProperty(onmo, genidv.getURI(), haspromoteruri, newproidv.getURI());\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), isbelongeduri, genidv.getURI());\r\n\t\t\t\t//create or get the go individual and the relation to gene\r\n\t\t\t\tfor(GO ngo: gen.getGos()){\r\n\t\t\t\t\tIndividual goidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\t\tse.OGO_PREFIX + \"#GO_\" + ngo.getId(),\r\n\t\t\t\t\t\t\tgouri, onmo);\r\n\t\t\t\t\tse.addObjProperty(onmo, genidv.getURI(), hasgouri, goidv.getURI());\r\n\t\t\t\t}\r\n\t\t\t\t//create or get the taxonomy individual and the relation to gene\r\n\t\t\t\tIndividual taxidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\tse.NCBI_PREFIX + \"#NCBI_\" + gen.getTaxonomy().getId(),\r\n\t\t\t\t\t\ttaxonomyuri, onmo);\r\n\t\t\t\tse.addObjProperty(onmo, genidv.getURI(), fromspeciesuri, taxidv.getURI());\r\n\t\t\t\t//create the mRNA and protein individual and the relation to gene\r\n\t\t\t\tfor(int i = 0; i<=gen.getMrnas().size()-1; i++){\r\n\t\t\t\t\tString rnaid = gen.getMrnas().get(i).getId();\r\n\t\t\t\t\tif(!rnaid.equals(\"-\")){\r\n\t\t\t\t\t\tIndividual rnaidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\t\tmrnauri + \"_\" + rnaid,\r\n\t\t\t\t\t\t\tmrnauri, onmo);\r\n\t\t\t\t\t\tse.addDataProperty(onmo, rnaidv.getURI(), iduri, rnaid);\r\n\t\t\t\t\t se.addObjProperty(onmo, genidv.getURI(), istranscribeduri, rnaidv.getURI());\r\n\t\t\t\t\t se.addObjProperty(onmo, newproidv.getURI(), activeuri, rnaidv.getURI());\r\n\t\t\t\t\t String prnid = gen.getProteins().get(i).getId();\r\n\t\t\t\t\t if(!prnid.equals(\"-\")){\r\n\t\t\t\t\t \tIndividual prnidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\t\t\t\tproteinuri + \"_\" + rnaid,\r\n\t\t\t\t\t\t\t\t\tproteinuri, onmo);\r\n\t\t\t\t\t\t\tse.addDataProperty(onmo, prnidv.getURI(), iduri, prnid);\r\n\t\t\t\t\t\t\tse.addObjProperty(onmo, genidv.getURI(), isexpresseduri, prnidv.getURI());\r\n\t\t\t\t\t\t\tse.addObjProperty(onmo, rnaidv.getURI(), istranslateduri, prnidv.getURI());\r\n\t\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(index+++\".\t\"+\"Promoter: \"+pro.getName()+\" finished!\");\r\n\t\t}\r\n\t}",
"@GetMapping(value = ServiceConfig.URL_PARTIE_ID_JOUEUR_TIRER_INDICE, produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<List<Integer>> carteIndice(@PathVariable(name = ServiceConfig.PARTIE_ID_PARAM) String idP, @PathVariable(name=ServiceConfig.JOUEUR_ID_PARAM) String idJ, @RequestBody List<Integer> des) {\n try {\n facade.tirerIndice(idP, idJ, des);\n GlobalReplayProcessor.partieNotification.onNext(facade.findPartie(idP));\n return ResponseEntity.ok(des);\n } catch (PasJoueurCourantException e) {\n System.out.println(\"401 ws ce n'est pas le tour de ce joueur\");\n return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();\n } catch (PiocherIndiceNonAutoriseException e) {\n System.out.println(\"401 ws action non autorisé : vous n'avez pas fait de loupe au lancer de dé\");\n return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();\n } catch (ActionNonAutoriseeException e) {\n System.out.println(\"401 ws action non autorisé : ce n'est pas le moment pour de piocher une carte\");\n return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();\n } catch (JoueurPasDansLaPartieException | NonInscritException e) {\n System.out.println(\"404 ws joueur non trouvé\");\n return ResponseEntity.status(HttpStatus.NO_CONTENT).build();\n } catch (PartieInexistanteException e) {\n System.out.println(\"404 ws partie non trouvée\");\n return ResponseEntity.status(HttpStatus.NO_CONTENT).build();\n }\n }",
"@CrossOrigin(origins = \"http://localhost:8000\")\n @ApiOperation(value = \"Get all the orders\", produces = \"application/json\", response = PizzaOrder.class, responseContainer = \"List\")\n @RequestMapping(value = \"/orders\", method = RequestMethod.GET)\n public Iterable<PizzaOrder> getPizzaOrders() {\n\t//logger.info(\"TrackingId:89a80896-35a4-468c-9ec3-b762ab161429|ClientId:89a80897-35a4-468c-9ec3-b762ab161429|Find all Ordered Pizza\"); \n\t Iterable<PizzaOrder> pizzaOrderIterable = pizzaOrderService.findAll();\n\t try{\n\t\t\t\t\n\t\t\t\tIterator<PizzaOrder> pizzaOrderIter = pizzaOrderIterable.iterator();\n\t\t\t\tStringBuffer pizzaOrderBuffer = new StringBuffer();\n\t\t\t\tpizzaOrderBuffer.append(\"TrackingId:89a80896-35a4-468c-9ec3-b762ab161429|ClientId:89a80897-35a4-468c-9ec3-b762ab161429|Ordered Pizza List : \");\n\t\t\t\twhile(pizzaOrderIter.hasNext()){\n\t\t\t\t\tPizzaOrder pizzaOrdObj = pizzaOrderIter.next();\n\t\t\t\t\tSet<Pizza> pizzaSet = pizzaOrdObj.getPizzas();\n\t\t\t\t\tIterator<Pizza> pizzaItr = pizzaSet.iterator();\n\t\t\t\t\twhile(pizzaItr.hasNext()){\n\t\t\t\t\t\tpizzaOrderBuffer.append(pizzaItr.next().getName());\n\t\t\t\t\t\tpizzaOrderBuffer.append(\"##\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlogger.info(pizzaOrderBuffer.toString());\n\t }catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t }\n\t\n return pizzaOrderIterable;\n }",
"@ApiOperation(value = \"Retourner une liste de Numero de telephone\")\n @GetMapping(\"/phoneAlert\")\n public List<String> getPhoneOfPersonToStationNumber(@RequestParam String firestation){\n log.info(\"Request to: \" + request.getRequestURI(), firestation);\n return firestationService.getPhoneOfPersonToStationNumber(firestation);\n\n }",
"public String fillRequestBody(){\n\n Gson gson = new Gson();\n ApiSetlistRequestDTO apiSetlistRequestDTO = gson.fromJson(fileOperations.bufferedReader(configurationGet.getApiSetlistRequestJSonBodyResourcePath()), ApiSetlistRequestDTO.class);\n\n apiSetlistRequestDTO.setPage(30303030);\n apiSetlistRequestDTO.setPerPage(8888888);\n apiSetlistRequestDTO.setTotal(300000000);\n apiSetlistRequestDTO.setTotalPages(88888888);\n\n Datum data = new Datum();\n data.setId(10);\n data.setName(\"fghfdasfghgfdsfg\");\n data.setYear(453453);\n data.setColor(\"#f43242\");\n data.setPantoneValue(\"Test dfgfdgfdg Value\");\n\n Datum data2 = new Datum();\n data2.setId(15);\n data2.setName(\"burak\");\n data2.setYear(19);\n data2.setColor(\"#tyuyrefe\");\n data2.setPantoneValue(\"fsd\");\n\n List<Datum> datumList = apiSetlistRequestDTO.getData();\n datumList.set(0,data);\n datumList.set(5,data2);\n\n apiSetlistRequestDTO.setData(datumList);\n\n /*for (Datum data : exampleTestClass.getData()){\n data.setId(10);\n data.setName(\"Sarı\");\n data.setYear(5000);\n data.setColor(\"#999999999\");\n data.setPantoneValue(\"Test Pandone Value\");\n }*/\n\n logger.info(\"Manipule Edilen Data:\" + gson.toJson(apiSetlistRequestDTO));\n\n return gson.toJson(apiSetlistRequestDTO);\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public List<Officer> getOfficer() {\n return officerDao.listar(); \n }"
] | [
"0.58664054",
"0.54932994",
"0.5430132",
"0.542358",
"0.533676",
"0.53353447",
"0.5306228",
"0.5264101",
"0.5191426",
"0.5178453",
"0.5166253",
"0.5158311",
"0.5151283",
"0.51242256",
"0.5102845",
"0.50548506",
"0.50398755",
"0.5029082",
"0.5007391",
"0.49668548",
"0.49658558",
"0.49442753",
"0.49232262",
"0.49153003",
"0.49134204",
"0.49047306",
"0.4897075",
"0.48444146",
"0.48409817",
"0.48282728",
"0.48139715",
"0.4804222",
"0.4801099",
"0.47998893",
"0.47960275",
"0.47790587",
"0.47563925",
"0.47475585",
"0.47438905",
"0.4740797",
"0.47382832",
"0.47290984",
"0.47175598",
"0.47146425",
"0.47107804",
"0.46940726",
"0.4692546",
"0.46866757",
"0.46774843",
"0.46774614",
"0.4661894",
"0.46596602",
"0.46560106",
"0.46517003",
"0.46503547",
"0.46500406",
"0.46480522",
"0.46473792",
"0.46464992",
"0.46437585",
"0.46428895",
"0.46365562",
"0.4626124",
"0.46252725",
"0.46241334",
"0.46221846",
"0.461859",
"0.461621",
"0.46138388",
"0.46003705",
"0.4598919",
"0.45980456",
"0.45964342",
"0.45944223",
"0.45914522",
"0.4591325",
"0.45836616",
"0.45815653",
"0.457479",
"0.45724517",
"0.45667493",
"0.45643887",
"0.4563604",
"0.45566016",
"0.45559958",
"0.45555583",
"0.45512748",
"0.4546673",
"0.45413315",
"0.45401594",
"0.45347723",
"0.4531616",
"0.45305416",
"0.45280927",
"0.45276654",
"0.45233417",
"0.4523042",
"0.45227027",
"0.45225552",
"0.4520901",
"0.4520831"
] | 0.0 | -1 |
Generates a new random vector within certain boundaries given by min_vec and max_vec. | public static float[] createRandom3f(float[] min_vec,float[] max_vec){
float[] rand_vec = new float[3];
for (int i = 0; i < 3; i++){
rand_vec[i] = Utilities.createRandomf(min_vec[i], max_vec[i]);
}
return rand_vec;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int _getRandomFromRange(int min, int max) {\n\t \n return min + random_.nextInt(max - min + 1);\n }",
"public RangeRandom(final float min, final float max) {\n this.max = max;\n this.min = min;\n this.random = new Random(System.nanoTime());\n }",
"private int randomRange(int min, int max) {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((max - min) + 1) + min;\n\t}",
"private static int randomBetween(Random r, int min, int max) {\n return r.nextInt(max - min) + min;\n }",
"private int getRandomNumberInRange(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }",
"private int getRandomNumberInRange(int min, int max) {\r\n\r\n\t\tRandom r = new Random();\r\n\t\treturn ((r.nextInt(max - min) + 1) + min)*40;\r\n\t}",
"protected static int randBetween(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max - (min + 1)) + min;\n\t}",
"private static double randomGenerator(double min, double max) {\n return (double)java.lang.Math.random() * (max - min +1) + min;\n }",
"public void fillVector(){\n int n = min.length;\n for (int i = 0; i < n; i++) {\n this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate();\n }\n }",
"private static int getRandomNumberInRange(int min, int max) {\n\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }",
"int randomIntInRange(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max + 1 - min) + min;\n\t}",
"public static int randomRangeBound(int minDigits, int maxDigits) {\r\n int digitBoundDiff = maxDigits - minDigits + 1;\r\n int i = rn.nextInt() % digitBoundDiff;\r\n if (i < 0) {\r\n i = -i;\r\n }\r\n return minDigits + i;\r\n }",
"public static int getRandom(int min, int max){\n\t int x = (int)(Math.random()*((max-min)+1))+min;\n\t return x;\n\t}",
"private double getRandomDouble(double min, double max)\r\n\t{\r\n\t\tdouble randNum = Math.random() * (max - min) + min;\r\n\t\treturn randNum;\r\n\t}",
"private int randomIntRange(int min, int max) {\r\n Random random = new Random();\r\n if (min < 0 || max < 0) {\r\n return (random.nextInt(Math.abs(max - min)) + Math.abs(min) + 1) * -1;\r\n }\r\n return random.nextInt(max - min) + min + 1;\r\n }",
"public int coordinateGenerator(int max, int min) {\n\t\tRandom r = new Random();\n\t\tint a =r.nextInt(max - min) + min;\n\t\treturn a;\n\t}",
"float getRandomValue(float min, float max)\r\n\t{\n\t\tRandom r = new Random(/*SEED!!!*/);\r\n\t\t//get a float between 0 and 1 then multiply it by the min/max difference.\r\n\t\tfloat num = r.nextFloat();\r\n\t\tnum = num * (max-min) + min;\r\n\t\treturn num;\r\n\t}",
"private static int generateRandom(int min, int max) {\n // max - min + 1 will create a number in the range of min and max, including max. If you don´t want to include it, just delete the +1.\n // adding min to it will finally create the number in the range between min and max\n return r.nextInt(max-min+1) + min;\n }",
"public static double rng(double min, double max) {\r\n\r\n return (Math.random() * ((max - min) + 1)) + min;\r\n }",
"protected int random(int min, int max) {\n\t\treturn this.rand.nextInt(max-min) + min;\n\t}",
"private static int random(int min, int max) {\r\n\t\tRandom rand = java.util.concurrent.ThreadLocalRandom.current();\r\n\t\treturn min + (int) (rand.nextDouble()*(max-min));\r\n\t}",
"public double rand (double min, double max) {\r\n\t\tdouble r = rand();\r\n\t\tr = min + (max - min) * r;\r\n\t\treturn r;\r\n\t}",
"private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }",
"public static int createRandom(int min, int max){\n\t\tif (min == max){\n\t\t\treturn min;\n\t\t}\n\t\telse{\t\t\t\n\t\t\treturn (int)(Math.random() * (max - min) + min); \n\t\t}\n\t}",
"public int randomValueFromClosedInterval(int min, int max, MersenneTwisterFast random)\n {\n if (max - min < 0) // we had an overflow\n {\n int l = 0;\n do l = random.nextInt();\n while(l < min || l > max);\n return l;\n }\n else return min + random.nextInt(max - min + 1);\n }",
"private int alea(final int valeurMin,\n final int valeurMax) {\n Random r = new Random();\n return valeurMin + r.nextInt(valeurMax - valeurMin);\n }",
"private int randBetween(int start, int end) {\n\t\treturn start + (int)Math.round(Math.random() * (end - start));\n\t}",
"private double generateRandomValue(int min, int max) {\n\t\tdouble number = (Math.random() * max * 100) / 100 + min;\n\t\treturn number;\n\t}",
"public static int generateIntRange(int min, int max) {\n return random.nextInt(max - min + 1) + min;\n }",
"public static double rand(double min, double max) {\n\n\t\treturn min + (max - min) * Math.random();\n\n\t}",
"@Test\r\n public void testMinMaxVector() {\r\n System.out.println(\"minMaxVector\");\r\n int[] vector = {1,8,3,4};\r\n VectorHelper instance = new VectorHelper();\r\n int[]expResult= {1,8};\r\n int []result=instance.minMaxVector(vector);\r\n assertArrayEquals(expResult,result);\r\n \r\n }",
"private int generateWholoeNumInRange( int min, int max ) {\r\n\r\n // Evaluate random number from min to max including min and max\r\n return (int)(Math.random()*(max - min + 1) + min);\r\n\r\n }",
"public static int random(int min, int max) {\r\n\t\tint diff = max - min + 1;\r\n\t\treturn ((int) (Math.random() * diff)) + min;\r\n\t}",
"private static int getRandomNumber(int min, int max) \n { //generates a random number within a range\n return (min + rand.nextInt((max - min) + 1));\n }",
"private static int randInt(final int min, final int max) {\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n return rand.nextInt((max - min) + 1) + min;\n }",
"public static int getRandomNumberInRange(int min, int max) {\n\n if (min > max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }",
"public int originalgetRandomPositiveInt(int min, int max){\r\n int number = getRandomPositiveInt(); \r\n return (int)number%(max - min + 1)+min;\r\n }",
"public static int generate(int min, int max) {\n\t\n\treturn min + (int) (Math.random() * ((max - min) + 1));\n\t\n\t}",
"private static int newSecretNumber(int min, int max)\n {\n Random rnd = new Random();\n return rnd.nextInt((max + 1 - min) + min);\n }",
"static int getRandint(int min, int max) {\r\n\t\tRandom r = new Random();\r\n\t\treturn r.nextInt((max - min) + 1) + min;\r\n\t}",
"@Override\n public void getLocalBounds(Vector3 min, Vector3 max) {\n\n // Maximum bounds\n max.setX(radius + margin);\n max.setY(halfHeight + margin);\n max.setZ(max.getX());\n\n // Minimum bounds\n min.setX(-max.getX());\n min.setY(-max.getY());\n min.setZ(min.getX());\n }",
"public static int getRandomNumber(int min, int max){\r\n Random r = new Random();\r\n return r.nextInt((max - min) +1) + min;\r\n }",
"public int getRandomArbitrary(int min, int max) {\n\t\treturn (int) (Math.random() * (max - min) + min);\n\t}",
"public static int getRandomNumberInRange(int min, int max) {\r\n\t\tif (min >= max) {\r\n\t\t\tthrow new IllegalArgumentException(\"max must be greater than min\");\r\n\t\t}\r\n\t\tRandom r = new Random();\r\n\t\treturn r.nextInt((max - min) + 1) + min;\r\n\t}",
"protected static double clamp(double pos, double min, double max) {\n\t\tif(pos < min) {\n\t\t\treturn min;\n\t\t} else if (pos\t> max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}",
"private static int generateRandomNumber(int min, int max) {\n return (int)Math.floor(Math.random() * (max - min + 1)) + min;\n }",
"public static int randInt(int incMin, int incMax){\n\n int rand=incMin+rng.nextInt((incMax-incMin)-1);\n return rand;\n }",
"public static int getRandomInt(int min, int max) {\n return getInstance().rand.nextInt((max - min) + 1) + min;\n }",
"public int randomGenerator(int min, int max) {\n int random = (int) ((Math.random()*((max-min)+1))+min);\n return random;\n }",
"private static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"protected double[] clampV(double nextVabs, double nextVarg)\r\n\t\t{\r\n//\t\t\tif(nextVabs < v_min)\r\n//\t\t\t\tnextVabs = v_min;\r\n//\t\t\telse if(nextVabs > v_max)\r\n//\t\t\t\tnextVabs = v_max;\r\n\t\t\t\r\n\t\t\treturn new double[]{nextVabs, nextVarg};\r\n\t\t}",
"public void ComputeBounds( Vec3 min, Vec3 max )\r\n\t{\r\n\t\tfor ( int iTempCount = 1; iTempCount <= 3; iTempCount++ )\r\n\t\t{\r\n\t\t\tVec3 tempPoint = m_vertices[iTempCount];\r\n\t\t\t\r\n\t\t\tif ( tempPoint.xCoord < min.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.xCoord = tempPoint.xCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.xCoord > max.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.xCoord = tempPoint.xCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.yCoord < min.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.yCoord = tempPoint.yCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.yCoord > max.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.yCoord = tempPoint.yCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.zCoord < min.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.zCoord = tempPoint.zCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.zCoord > max.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.zCoord = tempPoint.zCoord;\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t}",
"public DoubleGenerator range(double min, double max) {\n this.max = max;\n this.min = min;\n return this;\n }",
"public static int generatRandomPositiveNegitiveValue(int max , int min) {\n\t int ii = -min + (int) (Math.random() * ((max - (-min)) + 1));\n\t return ii;\n\t}",
"public SpriteIndexRandom(int min, int max) {\n\n this.min = min;\n this.max = max;\n }",
"public static float createRandomf(float min, float max){\n\t\tif (min == max){\n\t\t\treturn min;\n\t\t}\n\t\telse{\n\t\t\t//get new random generator (with new seed)\n\t\t\tRandom rand = new Random();\n\t\t\t//get random number.\n\t\t\treturn rand.nextFloat() * (max -min) + min;\n\t\t}\n\t}",
"private int genRandomWaveNum(int min, int max){\n int m = genRandomInt(min, max);\n return m;\n }",
"public static int nextInt(int minVal, int maxVal) {\n\t\treturn minVal + Utilities.rand.nextInt((maxVal - minVal));\n\t}",
"public int randBetween(int start, int end) {\n\t\treturn start + (int) Math.round(Math.random() * (end - start));\n\t}",
"public static int randBetween(int start, int end) {\n return start + (int)Math.round(Math.random() * (end - start));\n }",
"private static int randomInt(int min, int max) {\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt(max - min) + min;\n }",
"public static ArrayList<String> generateNumberArray(int min, int max) {\n int[] ran = new int[]{-20, -10, 10, 20};\n ArrayList<Integer> integerArrayList;\n HashSet<Integer> set = new HashSet<>();\n\n int diff = min / 5;\n\n int target = randInt(min + diff, max - diff);\n set.add(target);\n while (set.size() != 4) {\n int badChoice = target + NumberGenerator.randInt(-diff, diff);\n set.add(badChoice);\n }\n set.remove(target);\n integerArrayList = new ArrayList<>(set);\n\n integerArrayList.add(0, target);\n\n ArrayList<String> integers = new ArrayList<>();\n for (Integer myInt : integerArrayList) {\n integers.add(String.valueOf(myInt));\n }\n\n //add a number which has the same last number as target\n while (true) {\n int insertPos = NumberGenerator.randInt(1, 4);\n int subIndex = NumberGenerator.randInt(0, 3);\n int badChoice = target + ran[subIndex];\n\n if (!set.contains(badChoice) && target!= badChoice && badChoice >= min && badChoice <= max) {\n integers.add(insertPos, String.valueOf(badChoice));\n break;\n }\n }\n return integers;\n }",
"private int randomX(int minRandX, int maxRandX) {\n\t\tint randX = MinRandX + (int)(Math.random() * ((MaxRandX - MinRandX) + 1));\n\t\treturn randX;\n\t}",
"static int createInjection(int min, int max){\n\t\t\tint myInjection = (int)(Math.random() * 10 * (Math.random() > 0.5 ? max : min));\t\n\t\t\treturn myInjection;\n\t\t\t}",
"public static <E> Vector<E> randomize(final Vector<E> vector, final Random random) {\n\t\tfor(int i = 0; i < vector.size() - 1; ++i) { //start at the first element and go to the second to last element\n\t\t\tint fromIndex = ((int)(random.nextFloat() * (vector.size() - i))) + i; //get a random number (from zero to the number of elements left minus one), and put it into the range at our current slot\n\t\t\tif(fromIndex != i) { //if we should move our current object\n\t\t\t\tfinal E tempObject = vector.elementAt(i); //get a reference to the element to be replaced\n\t\t\t\tvector.setElementAt(vector.elementAt(fromIndex), i); //copy the specified element from its index into the current slot\n\t\t\t\tvector.setElementAt(tempObject, fromIndex); //put the element that used to be in this slot where the other one came from\n\t\t\t}\n\t\t}\n\t\treturn vector; //return the vector, which is now randomized\n\t}",
"private ArrayList _getRandomList(int num, int min, int max) {\n ArrayList list = new ArrayList();\n ArrayList tmp = new ArrayList();\n for (int i = min; i <= max; i++) {\n tmp.add(new Integer(i));\n }\n \n for (int i = 0; i < num; i++) {\n \tif(tmp.size() > 1){\n\t int pos = _getRandomFromRange(0, tmp.size() - 1);\n\t list.add( (Integer) tmp.get(pos));\n\t tmp.remove(pos);\n \t}\n }\n\n return list;\n }",
"public int randint(int max, int min)\n {\n Random rand = new Random();\n int randomNum = rand.nextInt((max - min) + 1) + min;\n return randomNum;\n }",
"public double random(double theMin, double theMax, CCInterpolator theInterpolator) {\n\t\treturn theMin + random(theInterpolator) * (theMax - theMin);\n\t}",
"static Node generate(int length, int min, int max) {\n Random rand = new Random();\n Node head = null;\n int range = max - min + 1;\n for (int i = 0; i < length; i++) {\n Node t = new Node(rand.nextInt(range) + min);\n if (head == null)\n head = t;\n else {\n t.next = head;\n head = t;\n }\n }\n return head;\n }",
"public int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n}",
"public static double randomDouble(double min, double max) {\r\n\t\tdouble diff = max - min;\r\n\t\treturn (Math.random() * diff) + min;\r\n\t}",
"private void populateRandom(double[][] matrix, double min, double max) {\n\t\tdouble range = max - min;\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\t\tmatrix[i][j] = (range * Math.random()) + min;\n\t\t\t}\n\t\t}\n\t}",
"private int generateRandomNb(int min, int max) {\n Random random = new Random();\n\n return random.nextInt((max - min) + 1) + min;\n }",
"public static int customRandom(int range)\n {\n \tint random = (int)(Math.random()*10)%range;\n\t\n\treturn random;\n }",
"private static int[] calculateLotto(int size, int min, int max) {\n int[] lotto = new int [size];\n int[] numbers = new int [max - min + 1];\n for(int i = 0; i < numbers.length; i++) {\n numbers [i] = min + i;\n }\n for(int i = 0; i < lotto.length; i++) {\n int index = Math.getRandom(0, numbers.length - 1);\n lotto [i] = numbers [index];\n numbers = Arrays.removeIndex(numbers, index);\n }\n return lotto;\n }",
"public static DataPoint genRandomPoint(int min, int max)\n {\n Random rand = new Random();\n return (new DataPoint(\"Centroid\", 99, rand.nextDouble(), rand.nextDouble(), rand.nextDouble(),\n rand.nextDouble(), rand.nextDouble(), rand.nextDouble()));\n }",
"public static int rand(int min, int max) {\n return RUtilities.rand(min, max);\n }",
"public void spawn(double minimumY, double maximumY, double minimumX, double maximumX) {\r\n\r\n double startingY = minimumY + (maximumY - minimumY) * Math.random();\r\n double startingX = minimumX + (maximumX - minimumX) * Math.random();\r\n\r\n y = startingY;\r\n x = startingX;\r\n\r\n }",
"public static int[] generateArray(int min, int max, int size) {\n int[] arr = new int[size];\n for (int i = 0; i < size; i++) {\n arr[i] = min + (int) (Math.random() * (max - min));\n }\n return arr;\n }",
"public final static int getRandomInt(final int min, final int max, final Random random) {\n final int dif = max - min;\n final float number = random.nextFloat(); // 0 <= number < 1\n\n return min + Math.round(number * dif);\n }",
"public DynamicPart minMax(float min, float max) {\n return this.min(min).max(max);\n }",
"public static int randInt(int min, int max) {\n int randomNum = random.nextInt((max - min) + 1) + min;\n return randomNum;\n }",
"public static Vector2D getRandInPoint(Bounds rect)\n\t{\n\t\tfloat x = getRandomFloat(rect.getX(), rect.getX() + rect.getWidth());\n\t\tfloat y = getRandomFloat(rect.getY(), rect.getY() + rect.getHeight());\n\t\treturn new Vector2D(x, y);\n\t}",
"@Override\n public void relocatedWithinBounds() {\n x = random.nextInt(maxX - width);\n y = random.nextInt(maxY - height);\n }",
"public RangeVector(RangeVector base) {\n int dimensions = base.values.length;\n this.values = Arrays.copyOf(base.values, dimensions);\n this.upper = Arrays.copyOf(base.upper, dimensions);\n this.lower = Arrays.copyOf(base.lower, dimensions);\n }",
"public final int random(int min, int max) {\n return Utils.random(min, max);\n }",
"public static double limitRange( double val , double max , double min )\n {\n //If number is greater than maximum, it becomes the maximum.\n if( val > max )\n {\n val = max; \n }\n else if( val < min )//Else if the number is less than minimum, it becomes the minimum.\n {\n val = min;\n }\n \n //Returns the limited number.\n return val;\n }",
"private int getRandomWithExclusion(int bound, List<Integer> exclude) {\n int random = Constants.RAND.nextInt(bound - exclude.size());\n for (int ex : exclude) {\n if (random < ex) break;\n random++;\n }\n return random;\n \n }",
"public static Integer[] makeRandomArray(int size, int min, int max){\n\t\tRandom rand = new Random();\n\t\tInteger[] list = new Integer[size];\n\n\t\tfor (int i = 0; i < list.length; i++){\n\t\t\tlist[i] = rand.nextInt((max - min) + 1) + min;\n\t\t}\t\n\t\t\n\t\treturn list;\n\t}",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }",
"private static int randomNumberBetween(final int start, final int end) {\n\t\treturn start + (int) Math.round(Math.random() * (end - start));\n\t}",
"public int randomInt(int min, int max) {\r\n\t\treturn (int)(Math.random()*(max-min))+min;\r\n\t}",
"public static int RandomNumber(int min, int max){\n Random random = new Random();\n int randomNum = random.nextInt((max - min)+1)+min;\n return randomNum;\n }",
"public static int randInt(int min, int max) {\r\n\t Random rand = new Random();\r\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\r\n\t return randomNum;\r\n\t}",
"public static int random(int min, int max) {\n return (int) Math.floor(Math.random() * (max - min + 1) + min);\n }",
"public void randomize(double lowerBound, double upperBound) {\n if (lowerBound > upperBound)\n return;\n Random random = new Random();\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n data[i][j] = random.nextDouble() * (upperBound - lowerBound) + lowerBound;\n }\n }\n }",
"public UniformVector() {\n super(3);\n this.min = new VectorN(3);\n this.max = new VectorN(1.0, 1.0, 1.0);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum);\n fillVector();\n }",
"public WeighedNormalRandomOutputGenerator(final int min, final int max) {\n this(min, max, 1);\n }",
"private void generateOdd(int size, int min, int max, Point start, Point end)\n\t{\n\t\tint currentRow = start.x;\n\t\tint currentCol = start.y + ((end.y-start.y)/2);\n\t\tint counter = min;\n\t\tthis.matrix[currentRow][currentCol] = counter;\n\t\tcounter++;\t//Move to next number\n\t\t\n\t\t//one up, one right\n\t\tint newRow = -1;\n\t\tint newCol = -1;\n\t\twhile(counter <= max)\n\t\t{\n\t\t\t//Update pos\n\t\t\tnewRow = currentRow - 1;\t//-1 means go up\n\t\t\tnewCol = currentCol + 1;\n\t\t\t//Check if it's outside the box\n\t\t\tif (newRow < start.x)\n\t\t\t{\n\t\t\t\tnewRow = end.x;\n\t\t\t}\n\t\t\tif (newCol > end.y)\n\t\t\t{\n\t\t\t\tnewCol = start.y;\n\t\t\t}\n\t\t\t\n\t\t\t//Check if it's filled and update pos\n\t\t\tif (this.matrix[newRow][newCol] == 0)\n\t\t\t{\n\t\t\t\tcurrentRow = newRow;\n\t\t\t\tcurrentCol = newCol;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Move to box directly under it\n\t\t\t\tcurrentRow = currentRow + 1; //+1 means under it\n\t\t\t\tif (currentRow > end.x)\n\t\t\t\t{\n\t\t\t\t\tcurrentRow = start.x;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Place next number\n\t\t\tthis.matrix[currentRow][currentCol] = counter;\n\t\t\tcounter++;\t//Increment counter by 1\n\t\t}\n\t}",
"public static double newRand(double low, double high) {\n //Calculates the range from high to low\n double range = high - low;\n\n //Calculates a value within the range\n double value = range * Math.random();\n\n //Returns the relevant value\n return high - value;\n }"
] | [
"0.62272435",
"0.6183429",
"0.6119693",
"0.5959746",
"0.5958527",
"0.59493995",
"0.5923775",
"0.58624154",
"0.5837403",
"0.57852644",
"0.5781219",
"0.57434976",
"0.57409763",
"0.5720069",
"0.56897247",
"0.5687794",
"0.5685131",
"0.5670146",
"0.56641686",
"0.5662042",
"0.56562275",
"0.5645174",
"0.56139183",
"0.56125",
"0.55988556",
"0.5592389",
"0.5571173",
"0.55529654",
"0.55472195",
"0.55390036",
"0.5508423",
"0.54996526",
"0.5492107",
"0.548845",
"0.54596883",
"0.54377633",
"0.54131025",
"0.5411465",
"0.54076165",
"0.54074794",
"0.5395",
"0.5373518",
"0.5361957",
"0.5350947",
"0.5343759",
"0.53414404",
"0.5338525",
"0.53206146",
"0.53177994",
"0.5311477",
"0.5307724",
"0.53050596",
"0.529411",
"0.5288879",
"0.5269388",
"0.5262597",
"0.5258225",
"0.5240116",
"0.5236703",
"0.5234711",
"0.522186",
"0.5219007",
"0.52045625",
"0.51970977",
"0.5178736",
"0.51751643",
"0.5172587",
"0.5158362",
"0.51531494",
"0.5143071",
"0.5134411",
"0.51330554",
"0.5130656",
"0.5109949",
"0.5099125",
"0.508098",
"0.50773305",
"0.50733644",
"0.5073111",
"0.506804",
"0.5066332",
"0.5065719",
"0.5062857",
"0.50484395",
"0.50446844",
"0.5043729",
"0.50429726",
"0.5039623",
"0.50373393",
"0.5031247",
"0.50289637",
"0.50104445",
"0.50044817",
"0.5004301",
"0.50003004",
"0.49899954",
"0.49896213",
"0.4989029",
"0.49860775",
"0.4984807"
] | 0.6516763 | 0 |
Generates a new random number within certain boundaries given by min and max. | public static float createRandomf(float min, float max){
if (min == max){
return min;
}
else{
//get new random generator (with new seed)
Random rand = new Random();
//get random number.
return rand.nextFloat() * (max -min) + min;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int getRandomNumberInRange(int min, int max) {\r\n\r\n\t\tRandom r = new Random();\r\n\t\treturn ((r.nextInt(max - min) + 1) + min)*40;\r\n\t}",
"private int getRandomNumberInRange(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }",
"private int _getRandomFromRange(int min, int max) {\n\t \n return min + random_.nextInt(max - min + 1);\n }",
"private int randomRange(int min, int max) {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((max - min) + 1) + min;\n\t}",
"private static int getRandomNumber(int min, int max) \n { //generates a random number within a range\n return (min + rand.nextInt((max - min) + 1));\n }",
"private static int getRandomNumberInRange(int min, int max) {\n\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }",
"protected static int randBetween(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max - (min + 1)) + min;\n\t}",
"private static int generateRandom(int min, int max) {\n // max - min + 1 will create a number in the range of min and max, including max. If you don´t want to include it, just delete the +1.\n // adding min to it will finally create the number in the range between min and max\n return r.nextInt(max-min+1) + min;\n }",
"private static int generateRandomNumber(int min, int max) {\n return (int)Math.floor(Math.random() * (max - min + 1)) + min;\n }",
"public static int createRandom(int min, int max){\n\t\tif (min == max){\n\t\t\treturn min;\n\t\t}\n\t\telse{\t\t\t\n\t\t\treturn (int)(Math.random() * (max - min) + min); \n\t\t}\n\t}",
"protected int random(int min, int max) {\n\t\treturn this.rand.nextInt(max-min) + min;\n\t}",
"private int generateWholoeNumInRange( int min, int max ) {\r\n\r\n // Evaluate random number from min to max including min and max\r\n return (int)(Math.random()*(max - min + 1) + min);\r\n\r\n }",
"private static int randomBetween(Random r, int min, int max) {\n return r.nextInt(max - min) + min;\n }",
"private static double randomGenerator(double min, double max) {\n return (double)java.lang.Math.random() * (max - min +1) + min;\n }",
"public static int getRandomNumber(int min, int max){\r\n Random r = new Random();\r\n return r.nextInt((max - min) +1) + min;\r\n }",
"public RangeRandom(final float min, final float max) {\n this.max = max;\n this.min = min;\n this.random = new Random(System.nanoTime());\n }",
"private static int newSecretNumber(int min, int max)\n {\n Random rnd = new Random();\n return rnd.nextInt((max + 1 - min) + min);\n }",
"private static int random(int min, int max) {\r\n\t\tRandom rand = java.util.concurrent.ThreadLocalRandom.current();\r\n\t\treturn min + (int) (rand.nextDouble()*(max-min));\r\n\t}",
"public static double rng(double min, double max) {\r\n\r\n return (Math.random() * ((max - min) + 1)) + min;\r\n }",
"public int coordinateGenerator(int max, int min) {\n\t\tRandom r = new Random();\n\t\tint a =r.nextInt(max - min) + min;\n\t\treturn a;\n\t}",
"public static int getRandom(int min, int max){\n\t int x = (int)(Math.random()*((max-min)+1))+min;\n\t return x;\n\t}",
"private static int randInt(final int min, final int max) {\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n return rand.nextInt((max - min) + 1) + min;\n }",
"private static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public double rand (double min, double max) {\r\n\t\tdouble r = rand();\r\n\t\tr = min + (max - min) * r;\r\n\t\treturn r;\r\n\t}",
"public static int generate(int min, int max) {\n\t\n\treturn min + (int) (Math.random() * ((max - min) + 1));\n\t\n\t}",
"int randomIntInRange(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max + 1 - min) + min;\n\t}",
"public int randomGenerator(int min, int max) {\n int random = (int) ((Math.random()*((max-min)+1))+min);\n return random;\n }",
"public static int RandomNumber(int min, int max){\n Random random = new Random();\n int randomNum = random.nextInt((max - min)+1)+min;\n return randomNum;\n }",
"public static int random(int min, int max) {\r\n\t\tint diff = max - min + 1;\r\n\t\treturn ((int) (Math.random() * diff)) + min;\r\n\t}",
"private double generateRandomValue(int min, int max) {\n\t\tdouble number = (Math.random() * max * 100) / 100 + min;\n\t\treturn number;\n\t}",
"public int originalgetRandomPositiveInt(int min, int max){\r\n int number = getRandomPositiveInt(); \r\n return (int)number%(max - min + 1)+min;\r\n }",
"public static int getRandomNumberInRange(int min, int max) {\n\n if (min > max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }",
"public int randint(int max, int min)\n {\n Random rand = new Random();\n int randomNum = rand.nextInt((max - min) + 1) + min;\n return randomNum;\n }",
"static int getRandint(int min, int max) {\r\n\t\tRandom r = new Random();\r\n\t\treturn r.nextInt((max - min) + 1) + min;\r\n\t}",
"public static int generateIntRange(int min, int max) {\n return random.nextInt(max - min + 1) + min;\n }",
"public int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n}",
"public static int getRandomNumberInRange(int min, int max) {\r\n\t\tif (min >= max) {\r\n\t\t\tthrow new IllegalArgumentException(\"max must be greater than min\");\r\n\t\t}\r\n\t\tRandom r = new Random();\r\n\t\treturn r.nextInt((max - min) + 1) + min;\r\n\t}",
"public static int getRandomInt(int min, int max) {\n return getInstance().rand.nextInt((max - min) + 1) + min;\n }",
"private int randomIntRange(int min, int max) {\r\n Random random = new Random();\r\n if (min < 0 || max < 0) {\r\n return (random.nextInt(Math.abs(max - min)) + Math.abs(min) + 1) * -1;\r\n }\r\n return random.nextInt(max - min) + min + 1;\r\n }",
"private double getRandomDouble(double min, double max)\r\n\t{\r\n\t\tdouble randNum = Math.random() * (max - min) + min;\r\n\t\treturn randNum;\r\n\t}",
"private static int randomInt(int min, int max) {\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt(max - min) + min;\n }",
"float getRandomValue(float min, float max)\r\n\t{\n\t\tRandom r = new Random(/*SEED!!!*/);\r\n\t\t//get a float between 0 and 1 then multiply it by the min/max difference.\r\n\t\tfloat num = r.nextFloat();\r\n\t\tnum = num * (max-min) + min;\r\n\t\treturn num;\r\n\t}",
"public int getRandomArbitrary(int min, int max) {\n\t\treturn (int) (Math.random() * (max - min) + min);\n\t}",
"public static int rand(int min, int max) {\n return RUtilities.rand(min, max);\n }",
"public int randomValueFromClosedInterval(int min, int max, MersenneTwisterFast random)\n {\n if (max - min < 0) // we had an overflow\n {\n int l = 0;\n do l = random.nextInt();\n while(l < min || l > max);\n return l;\n }\n else return min + random.nextInt(max - min + 1);\n }",
"public static double rand(double min, double max) {\n\n\t\treturn min + (max - min) * Math.random();\n\n\t}",
"private int generateRandomNb(int min, int max) {\n Random random = new Random();\n\n return random.nextInt((max - min) + 1) + min;\n }",
"public static int randInt(int min, int max) {\n int randomNum = random.nextInt((max - min) + 1) + min;\n return randomNum;\n }",
"public int generateRandomNumber(int min, int max) {\n\t\tif (min >= max) {\n\t\t\tthrow new IllegalArgumentException(\"max must be greater than min\");\n\t\t}\n\t\tRandom r = new Random();\n\t\treturn (r.nextInt((max - min) + 1) + min);\n\t}",
"public static int randomRangeBound(int minDigits, int maxDigits) {\r\n int digitBoundDiff = maxDigits - minDigits + 1;\r\n int i = rn.nextInt() % digitBoundDiff;\r\n if (i < 0) {\r\n i = -i;\r\n }\r\n return minDigits + i;\r\n }",
"public static int randInt(int min, int max) {\r\n\t Random rand = new Random();\r\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\r\n\t return randomNum;\r\n\t}",
"public static int randNum(int min, int max) {\r\n\t\treturn ThreadLocalRandom.current().nextInt(min, max + 1);\r\n\t}",
"public final int random(int min, int max) {\n return Utils.random(min, max);\n }",
"public static int randInt(int incMin, int incMax){\n\n int rand=incMin+rng.nextInt((incMax-incMin)-1);\n return rand;\n }",
"public int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t }",
"public static int generatRandomPositiveNegitiveValue(int max , int min) {\n\t int ii = -min + (int) (Math.random() * ((max - (-min)) + 1));\n\t return ii;\n\t}",
"public static int randInt(int min, int max) \n\t{\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }",
"public static int random(int min, int max) {\n return (int) Math.floor(Math.random() * (max - min + 1) + min);\n }",
"public static int randInt(int min, int max) {\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rd.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"public static int randInt(int min, int max) {\n\n // Usually this can be a field rather than a method variable\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public int randomInt(int min, int max) {\n\t\t\t\t // NOTE: Usually this should be a field rather than a method\n\t\t\t\t // variable so that it is not re-seeded every call.\n\t\t\t\t Random rand = new Random();\n\t\t\t\t // nextInt is normally exclusive of the top value,\n\t\t\t\t // so add 1 to make it inclusive\n\t\t\t\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\t\t\t\t return randomNum;\n\t\t\t\t}",
"public int randomInt(int min, int max) {\r\n\t\treturn (int)(Math.random()*(max-min))+min;\r\n\t}",
"public static int randInt(int min, int max) {\n\n // NOTE: Usually this should be a field rather than a method\n // variable so that it is not re-seeded every call.\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public int getNumber(int min, int max) {\n return (int)(Math.random()* (max-min+1)) + min;\n }",
"public static int customRandom(int range)\n {\n \tint random = (int)(Math.random()*10)%range;\n\t\n\treturn random;\n }",
"public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}",
"public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}",
"public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}",
"private int genRandomWaveNum(int min, int max){\n int m = genRandomInt(min, max);\n return m;\n }",
"public int randInt(int min, int max) {\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"public static int generateRandomIntegerNumber(int minNumber, int maxNumber){\n\n Random rndmGnrtr = new Random();\n return rndmGnrtr.nextInt(maxNumber - minNumber + 1) + minNumber; // minNumber + for avoid 0\n }",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public static int randomNumber(){\r\n int max = 10;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }",
"public static int randInt(int min, int max) {\r\n\r\n\t\t\t// Usually this can be a field rather than a method variable\r\n\t\t\tRandom rand = new Random();\r\n\r\n\t\t\t// nextInt is normally exclusive of the top value,\r\n\t\t\t// so add 1 to make it inclusive\r\n\t\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\r\n\r\n\t\t\treturn randomNum;\r\n\t\t}",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n\n return rand.nextInt((max - min) + 1) + min;\n }",
"private int randBetween(int start, int end) {\n\t\treturn start + (int)Math.round(Math.random() * (end - start));\n\t}",
"public static int randomInt(int min, int max) {\n Random rand = new Random();\n int randomNum = rand.nextInt((max - min) + 1) + min;\n return randomNum;\n }",
"public int getRandomNumberInInterval() {\n\t\treturn getRandomNumberUsingNextInt(min, max);\n\t}",
"public static int randint(int min, int max) {\n return (int) ((((Math.random()) * 100) % (max - min + 1)) + min);\n }",
"public static int getRandomNumberInRange(int min, int max, int exclude) {\n\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n //prevent endless loop\n if (min + 1 >= max && min < exclude && max > exclude ) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n\n Random r = new Random();\n int random;\n do{\n random = r.nextInt((max - min) + 1) + min;\n }while (random == exclude);\n return random;\n }",
"private static int randomNumberBetween(final int start, final int end) {\n\t\treturn start + (int) Math.round(Math.random() * (end - start));\n\t}",
"public static int randInt(int min, int max) {\n\t\trand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"private int rand(int lower, int upper) {\n return lower + (int)(Math.random() * ((upper - lower) + 1));\n }",
"public static int randInt(int min, int max) {\n\t\tRandom rand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"public static int randInt(int min, int max) {\n\t\tRandom rand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"public static double newRand(double low, double high) {\n //Calculates the range from high to low\n double range = high - low;\n\n //Calculates a value within the range\n double value = range * Math.random();\n\n //Returns the relevant value\n return high - value;\n }",
"private int rand(int lower, int higher) {\n\t\treturn lower + (int) ((higher - lower + 1) * Math.random());\n\t\t\n\t}",
"public final static int getRandomInt(final int min, final int max, final Random random) {\n final int dif = max - min;\n final float number = random.nextFloat(); // 0 <= number < 1\n\n return min + Math.round(number * dif);\n }",
"public static int generateRandomNumber(int min, int max) {\n\t\tint mynumber = 0;\n\t\ttry {\n\t\t\tlogger.info(\"Generating Randon Number\");\n\t\t\tRandom r = new Random();\n\t\t\tmynumber = r.nextInt(max - min) + min;\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error ocurred while generating Randon Num\"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\treturn mynumber;\n\t}",
"public static int randomNumberAlg(){\r\n int max = 10;\r\n int min = 1;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }",
"int getRandom(int max);",
"public static int randomRound(){\r\n int max = 1000;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n return randNum;\r\n }",
"public static int nextInt(int minVal, int maxVal) {\n\t\treturn minVal + Utilities.rand.nextInt((maxVal - minVal));\n\t}",
"public SpriteIndexRandom(int min, int max) {\n\n this.min = min;\n this.max = max;\n }",
"private int randomNumber(int high, int low){\n \t\t Random r = new Random();\n \t\t return (r.nextInt(high-low) + low);\n \t }",
"public static int randomNumber50(){\r\n int max = 50;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }",
"public static int getRandomNumber(int min, int max) throws IOException {\n\t\tif (min >= max) {\n\t\t\tTestNotify.fatal(\"Max must be greater than Min\");\n\t\t}\n\n\t\treturn (int)(Math.random() * ((max - min) + 1)) + min;\n\t}",
"private int alea(final int valeurMin,\n final int valeurMax) {\n Random r = new Random();\n return valeurMin + r.nextInt(valeurMax - valeurMin);\n }",
"static int createInjection(int min, int max){\n\t\t\tint myInjection = (int)(Math.random() * 10 * (Math.random() > 0.5 ? max : min));\t\n\t\t\treturn myInjection;\n\t\t\t}"
] | [
"0.8149557",
"0.802911",
"0.79837847",
"0.7964926",
"0.79489154",
"0.7935213",
"0.7867055",
"0.785139",
"0.78133917",
"0.775891",
"0.77426803",
"0.7741534",
"0.77190053",
"0.7713649",
"0.77022505",
"0.76868486",
"0.76748645",
"0.76722175",
"0.7637634",
"0.76167464",
"0.7606216",
"0.75901794",
"0.75749034",
"0.75593317",
"0.755668",
"0.75535804",
"0.75493634",
"0.75393057",
"0.7516599",
"0.75104034",
"0.7503168",
"0.7495492",
"0.7484445",
"0.7476188",
"0.7427997",
"0.7411706",
"0.7405113",
"0.73906016",
"0.7355982",
"0.7320882",
"0.7320036",
"0.73016286",
"0.7296331",
"0.7294863",
"0.7291832",
"0.72740924",
"0.72666645",
"0.72590977",
"0.72482437",
"0.72421527",
"0.72082466",
"0.7205082",
"0.7188057",
"0.71801484",
"0.715702",
"0.7136864",
"0.71296144",
"0.7125227",
"0.7124253",
"0.71173346",
"0.7117097",
"0.71007603",
"0.71000725",
"0.70983285",
"0.70939744",
"0.70919675",
"0.70918536",
"0.70918536",
"0.70918536",
"0.7082346",
"0.70752215",
"0.7038423",
"0.7036044",
"0.7036044",
"0.70197874",
"0.7003946",
"0.6999534",
"0.6998429",
"0.69969934",
"0.6947969",
"0.6942889",
"0.6938208",
"0.6928658",
"0.6918384",
"0.691707",
"0.691216",
"0.691216",
"0.6891601",
"0.6883374",
"0.68821305",
"0.6829887",
"0.6788717",
"0.67820954",
"0.67752653",
"0.67722106",
"0.6761994",
"0.6755439",
"0.67481387",
"0.67436016",
"0.67403275",
"0.6727916"
] | 0.0 | -1 |
Generates a new random number within certain boundaries given by min and max. | public static int createRandom(int min, int max){
if (min == max){
return min;
}
else{
return (int)(Math.random() * (max - min) + min);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int getRandomNumberInRange(int min, int max) {\r\n\r\n\t\tRandom r = new Random();\r\n\t\treturn ((r.nextInt(max - min) + 1) + min)*40;\r\n\t}",
"private int getRandomNumberInRange(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }",
"private int _getRandomFromRange(int min, int max) {\n\t \n return min + random_.nextInt(max - min + 1);\n }",
"private int randomRange(int min, int max) {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((max - min) + 1) + min;\n\t}",
"private static int getRandomNumber(int min, int max) \n { //generates a random number within a range\n return (min + rand.nextInt((max - min) + 1));\n }",
"private static int getRandomNumberInRange(int min, int max) {\n\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }",
"protected static int randBetween(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max - (min + 1)) + min;\n\t}",
"private static int generateRandom(int min, int max) {\n // max - min + 1 will create a number in the range of min and max, including max. If you don´t want to include it, just delete the +1.\n // adding min to it will finally create the number in the range between min and max\n return r.nextInt(max-min+1) + min;\n }",
"private static int generateRandomNumber(int min, int max) {\n return (int)Math.floor(Math.random() * (max - min + 1)) + min;\n }",
"protected int random(int min, int max) {\n\t\treturn this.rand.nextInt(max-min) + min;\n\t}",
"private int generateWholoeNumInRange( int min, int max ) {\r\n\r\n // Evaluate random number from min to max including min and max\r\n return (int)(Math.random()*(max - min + 1) + min);\r\n\r\n }",
"private static int randomBetween(Random r, int min, int max) {\n return r.nextInt(max - min) + min;\n }",
"private static double randomGenerator(double min, double max) {\n return (double)java.lang.Math.random() * (max - min +1) + min;\n }",
"public static int getRandomNumber(int min, int max){\r\n Random r = new Random();\r\n return r.nextInt((max - min) +1) + min;\r\n }",
"public RangeRandom(final float min, final float max) {\n this.max = max;\n this.min = min;\n this.random = new Random(System.nanoTime());\n }",
"private static int newSecretNumber(int min, int max)\n {\n Random rnd = new Random();\n return rnd.nextInt((max + 1 - min) + min);\n }",
"private static int random(int min, int max) {\r\n\t\tRandom rand = java.util.concurrent.ThreadLocalRandom.current();\r\n\t\treturn min + (int) (rand.nextDouble()*(max-min));\r\n\t}",
"public static double rng(double min, double max) {\r\n\r\n return (Math.random() * ((max - min) + 1)) + min;\r\n }",
"public int coordinateGenerator(int max, int min) {\n\t\tRandom r = new Random();\n\t\tint a =r.nextInt(max - min) + min;\n\t\treturn a;\n\t}",
"public static int getRandom(int min, int max){\n\t int x = (int)(Math.random()*((max-min)+1))+min;\n\t return x;\n\t}",
"private static int randInt(final int min, final int max) {\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n return rand.nextInt((max - min) + 1) + min;\n }",
"private static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public double rand (double min, double max) {\r\n\t\tdouble r = rand();\r\n\t\tr = min + (max - min) * r;\r\n\t\treturn r;\r\n\t}",
"public static int generate(int min, int max) {\n\t\n\treturn min + (int) (Math.random() * ((max - min) + 1));\n\t\n\t}",
"int randomIntInRange(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max + 1 - min) + min;\n\t}",
"public int randomGenerator(int min, int max) {\n int random = (int) ((Math.random()*((max-min)+1))+min);\n return random;\n }",
"public static int RandomNumber(int min, int max){\n Random random = new Random();\n int randomNum = random.nextInt((max - min)+1)+min;\n return randomNum;\n }",
"public static int random(int min, int max) {\r\n\t\tint diff = max - min + 1;\r\n\t\treturn ((int) (Math.random() * diff)) + min;\r\n\t}",
"private double generateRandomValue(int min, int max) {\n\t\tdouble number = (Math.random() * max * 100) / 100 + min;\n\t\treturn number;\n\t}",
"public int originalgetRandomPositiveInt(int min, int max){\r\n int number = getRandomPositiveInt(); \r\n return (int)number%(max - min + 1)+min;\r\n }",
"public static int getRandomNumberInRange(int min, int max) {\n\n if (min > max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }",
"public int randint(int max, int min)\n {\n Random rand = new Random();\n int randomNum = rand.nextInt((max - min) + 1) + min;\n return randomNum;\n }",
"static int getRandint(int min, int max) {\r\n\t\tRandom r = new Random();\r\n\t\treturn r.nextInt((max - min) + 1) + min;\r\n\t}",
"public static int generateIntRange(int min, int max) {\n return random.nextInt(max - min + 1) + min;\n }",
"public int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n}",
"public static int getRandomNumberInRange(int min, int max) {\r\n\t\tif (min >= max) {\r\n\t\t\tthrow new IllegalArgumentException(\"max must be greater than min\");\r\n\t\t}\r\n\t\tRandom r = new Random();\r\n\t\treturn r.nextInt((max - min) + 1) + min;\r\n\t}",
"public static int getRandomInt(int min, int max) {\n return getInstance().rand.nextInt((max - min) + 1) + min;\n }",
"private int randomIntRange(int min, int max) {\r\n Random random = new Random();\r\n if (min < 0 || max < 0) {\r\n return (random.nextInt(Math.abs(max - min)) + Math.abs(min) + 1) * -1;\r\n }\r\n return random.nextInt(max - min) + min + 1;\r\n }",
"private double getRandomDouble(double min, double max)\r\n\t{\r\n\t\tdouble randNum = Math.random() * (max - min) + min;\r\n\t\treturn randNum;\r\n\t}",
"private static int randomInt(int min, int max) {\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt(max - min) + min;\n }",
"float getRandomValue(float min, float max)\r\n\t{\n\t\tRandom r = new Random(/*SEED!!!*/);\r\n\t\t//get a float between 0 and 1 then multiply it by the min/max difference.\r\n\t\tfloat num = r.nextFloat();\r\n\t\tnum = num * (max-min) + min;\r\n\t\treturn num;\r\n\t}",
"public int getRandomArbitrary(int min, int max) {\n\t\treturn (int) (Math.random() * (max - min) + min);\n\t}",
"public static int rand(int min, int max) {\n return RUtilities.rand(min, max);\n }",
"public int randomValueFromClosedInterval(int min, int max, MersenneTwisterFast random)\n {\n if (max - min < 0) // we had an overflow\n {\n int l = 0;\n do l = random.nextInt();\n while(l < min || l > max);\n return l;\n }\n else return min + random.nextInt(max - min + 1);\n }",
"public static double rand(double min, double max) {\n\n\t\treturn min + (max - min) * Math.random();\n\n\t}",
"private int generateRandomNb(int min, int max) {\n Random random = new Random();\n\n return random.nextInt((max - min) + 1) + min;\n }",
"public static int randInt(int min, int max) {\n int randomNum = random.nextInt((max - min) + 1) + min;\n return randomNum;\n }",
"public int generateRandomNumber(int min, int max) {\n\t\tif (min >= max) {\n\t\t\tthrow new IllegalArgumentException(\"max must be greater than min\");\n\t\t}\n\t\tRandom r = new Random();\n\t\treturn (r.nextInt((max - min) + 1) + min);\n\t}",
"public static int randomRangeBound(int minDigits, int maxDigits) {\r\n int digitBoundDiff = maxDigits - minDigits + 1;\r\n int i = rn.nextInt() % digitBoundDiff;\r\n if (i < 0) {\r\n i = -i;\r\n }\r\n return minDigits + i;\r\n }",
"public static int randInt(int min, int max) {\r\n\t Random rand = new Random();\r\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\r\n\t return randomNum;\r\n\t}",
"public static int randNum(int min, int max) {\r\n\t\treturn ThreadLocalRandom.current().nextInt(min, max + 1);\r\n\t}",
"public final int random(int min, int max) {\n return Utils.random(min, max);\n }",
"public static int randInt(int incMin, int incMax){\n\n int rand=incMin+rng.nextInt((incMax-incMin)-1);\n return rand;\n }",
"public int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t }",
"public static int generatRandomPositiveNegitiveValue(int max , int min) {\n\t int ii = -min + (int) (Math.random() * ((max - (-min)) + 1));\n\t return ii;\n\t}",
"public static int randInt(int min, int max) \n\t{\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }",
"public static int random(int min, int max) {\n return (int) Math.floor(Math.random() * (max - min + 1) + min);\n }",
"public static int randInt(int min, int max) {\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rd.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"public static int randInt(int min, int max) {\n\n // Usually this can be a field rather than a method variable\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public int randomInt(int min, int max) {\n\t\t\t\t // NOTE: Usually this should be a field rather than a method\n\t\t\t\t // variable so that it is not re-seeded every call.\n\t\t\t\t Random rand = new Random();\n\t\t\t\t // nextInt is normally exclusive of the top value,\n\t\t\t\t // so add 1 to make it inclusive\n\t\t\t\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\t\t\t\t return randomNum;\n\t\t\t\t}",
"public int randomInt(int min, int max) {\r\n\t\treturn (int)(Math.random()*(max-min))+min;\r\n\t}",
"public static int randInt(int min, int max) {\n\n // NOTE: Usually this should be a field rather than a method\n // variable so that it is not re-seeded every call.\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public int getNumber(int min, int max) {\n return (int)(Math.random()* (max-min+1)) + min;\n }",
"public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}",
"public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}",
"public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}",
"public static int customRandom(int range)\n {\n \tint random = (int)(Math.random()*10)%range;\n\t\n\treturn random;\n }",
"private int genRandomWaveNum(int min, int max){\n int m = genRandomInt(min, max);\n return m;\n }",
"public int randInt(int min, int max) {\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"public static int generateRandomIntegerNumber(int minNumber, int maxNumber){\n\n Random rndmGnrtr = new Random();\n return rndmGnrtr.nextInt(maxNumber - minNumber + 1) + minNumber; // minNumber + for avoid 0\n }",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }",
"public static int randomNumber(){\r\n int max = 10;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }",
"public static int randInt(int min, int max) {\r\n\r\n\t\t\t// Usually this can be a field rather than a method variable\r\n\t\t\tRandom rand = new Random();\r\n\r\n\t\t\t// nextInt is normally exclusive of the top value,\r\n\t\t\t// so add 1 to make it inclusive\r\n\t\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\r\n\r\n\t\t\treturn randomNum;\r\n\t\t}",
"public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n\n return rand.nextInt((max - min) + 1) + min;\n }",
"private int randBetween(int start, int end) {\n\t\treturn start + (int)Math.round(Math.random() * (end - start));\n\t}",
"public static int randomInt(int min, int max) {\n Random rand = new Random();\n int randomNum = rand.nextInt((max - min) + 1) + min;\n return randomNum;\n }",
"public int getRandomNumberInInterval() {\n\t\treturn getRandomNumberUsingNextInt(min, max);\n\t}",
"public static int randint(int min, int max) {\n return (int) ((((Math.random()) * 100) % (max - min + 1)) + min);\n }",
"public static int getRandomNumberInRange(int min, int max, int exclude) {\n\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n //prevent endless loop\n if (min + 1 >= max && min < exclude && max > exclude ) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n\n Random r = new Random();\n int random;\n do{\n random = r.nextInt((max - min) + 1) + min;\n }while (random == exclude);\n return random;\n }",
"private static int randomNumberBetween(final int start, final int end) {\n\t\treturn start + (int) Math.round(Math.random() * (end - start));\n\t}",
"public static int randInt(int min, int max) {\n\t\trand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"private int rand(int lower, int upper) {\n return lower + (int)(Math.random() * ((upper - lower) + 1));\n }",
"public static int randInt(int min, int max) {\n\t\tRandom rand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"public static int randInt(int min, int max) {\n\t\tRandom rand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}",
"public static double newRand(double low, double high) {\n //Calculates the range from high to low\n double range = high - low;\n\n //Calculates a value within the range\n double value = range * Math.random();\n\n //Returns the relevant value\n return high - value;\n }",
"public final static int getRandomInt(final int min, final int max, final Random random) {\n final int dif = max - min;\n final float number = random.nextFloat(); // 0 <= number < 1\n\n return min + Math.round(number * dif);\n }",
"private int rand(int lower, int higher) {\n\t\treturn lower + (int) ((higher - lower + 1) * Math.random());\n\t\t\n\t}",
"public static int generateRandomNumber(int min, int max) {\n\t\tint mynumber = 0;\n\t\ttry {\n\t\t\tlogger.info(\"Generating Randon Number\");\n\t\t\tRandom r = new Random();\n\t\t\tmynumber = r.nextInt(max - min) + min;\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error ocurred while generating Randon Num\"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\treturn mynumber;\n\t}",
"public static int randomNumberAlg(){\r\n int max = 10;\r\n int min = 1;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }",
"int getRandom(int max);",
"public static int randomRound(){\r\n int max = 1000;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n return randNum;\r\n }",
"public static int nextInt(int minVal, int maxVal) {\n\t\treturn minVal + Utilities.rand.nextInt((maxVal - minVal));\n\t}",
"public SpriteIndexRandom(int min, int max) {\n\n this.min = min;\n this.max = max;\n }",
"private int randomNumber(int high, int low){\n \t\t Random r = new Random();\n \t\t return (r.nextInt(high-low) + low);\n \t }",
"public static int randomNumber50(){\r\n int max = 50;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }",
"public static int getRandomNumber(int min, int max) throws IOException {\n\t\tif (min >= max) {\n\t\t\tTestNotify.fatal(\"Max must be greater than Min\");\n\t\t}\n\n\t\treturn (int)(Math.random() * ((max - min) + 1)) + min;\n\t}",
"private int alea(final int valeurMin,\n final int valeurMax) {\n Random r = new Random();\n return valeurMin + r.nextInt(valeurMax - valeurMin);\n }",
"static int createInjection(int min, int max){\n\t\t\tint myInjection = (int)(Math.random() * 10 * (Math.random() > 0.5 ? max : min));\t\n\t\t\treturn myInjection;\n\t\t\t}"
] | [
"0.8150861",
"0.8030627",
"0.79849446",
"0.79661983",
"0.7950197",
"0.7936661",
"0.7868497",
"0.7852883",
"0.7814729",
"0.77442014",
"0.7742726",
"0.77199924",
"0.7715387",
"0.7703937",
"0.7688214",
"0.76752275",
"0.7673537",
"0.76398987",
"0.7617977",
"0.7607645",
"0.7591463",
"0.7576349",
"0.75614625",
"0.75577044",
"0.75550145",
"0.75511223",
"0.7540871",
"0.7518369",
"0.7511648",
"0.75039405",
"0.7497365",
"0.74857736",
"0.74773633",
"0.7429146",
"0.7412868",
"0.74069524",
"0.7392349",
"0.73569274",
"0.7322813",
"0.73211026",
"0.7303174",
"0.72975403",
"0.7296932",
"0.72923505",
"0.7276525",
"0.72676677",
"0.72608805",
"0.7249971",
"0.7242904",
"0.72099024",
"0.7207032",
"0.71898335",
"0.71818674",
"0.71588355",
"0.7137872",
"0.71314245",
"0.71270245",
"0.71258867",
"0.7119182",
"0.7119067",
"0.71023244",
"0.71015465",
"0.71002275",
"0.70948976",
"0.70937425",
"0.70937425",
"0.70937425",
"0.709243",
"0.70833397",
"0.707705",
"0.7039877",
"0.70379496",
"0.70379496",
"0.7020892",
"0.70059574",
"0.700145",
"0.6998677",
"0.69986194",
"0.6948405",
"0.6944113",
"0.6939092",
"0.6928639",
"0.6920391",
"0.69180036",
"0.6914161",
"0.6914161",
"0.6891936",
"0.68840516",
"0.6883916",
"0.6831972",
"0.67896724",
"0.6782126",
"0.6776353",
"0.67733145",
"0.6763134",
"0.6755457",
"0.6749161",
"0.67452693",
"0.6740347",
"0.6728159"
] | 0.77601063 | 9 |
Create a Fruit object | protected Fruit(Sprite sprite, int lifetime, int effectDuration) {
this.image = sprite;
this.lifetime = lifetime;
this.effectDuration = effectDuration;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fruit() {\r\n\t}",
"public Fruit(){\r\n\t\tthis.name = \"Not Specified\";\r\n\t\tthis.color = \"Not Specified\";\r\n\t\tthis.averageHarvestTime = 0.0;\r\n\t\tthis.timeUnit = \"days\";\r\n\t}",
"Fruit(String name){\n this.name = name;\n this.color = null;\n }",
"public ProductFruit() {\r\n }",
"public Fruit() {\r\n\t\tsetColor(null);\r\n\t\tsetName(null);\r\n\t}",
"public Fruit(String color, String name) {\r\n\t\tthis.color = color;\r\n\t\tthis.name = name;\r\n\t}",
"Fruit(){\n this.name = null;\n this.color = null;\n }",
"public abstract Fruit generateFruit(int size, FruitType fruitType);",
"public Fruit()\n {\n setColor(Color.GREEN);\n }",
"public interface FruitFactory {\n\n Fruit getApple();\n\n Fruit getBanana();\n}",
"public FruitStand() {}",
"public Recipe createRecipe(String name, String chocolate, String coffee, String milk, String sugar, String price) throws RecipeException {\r\n Recipe recipe = new Recipe();\r\n recipe.setName(name);\r\n recipe.setAmtChocolate(chocolate);\r\n recipe.setAmtCoffee(coffee);\r\n recipe.setAmtMilk(milk);\r\n recipe.setAmtSugar(sugar);\r\n recipe.setPrice(price);\r\n return recipe;\r\n }",
"public Fruit(int x, int y, int image)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.type = image;\n\t\tspr = createSprite(main.getImage(image, false));\n\t\tsprite = spr;\n\t\tboom = createSprite(main.getImage(main.IMG_EXPLOSION, true));\n\t\tempty= createSprite(main.getImage(main.IMG_EMPTY, true));\n\t\tbomb = createSprite(main.getImage(main.IMG_BOMB, true));\n\t\tsprite.setPosition(x*sprite.getWidth(),y*sprite.getHeight());\n\t}",
"Foco createFoco();",
"public void createFood() {\n }",
"public Pizza() {\n this(\"small\", 1, 1, 1);\n }",
"public PaletteFruit(ImageView view, Fruit fruit)\n {\n this.fruit = fruit;\n this.paletteView = view;\n //this.section = section;\n //this.path = new VectorChildFinder(paletteView.getContext(), R.drawable.ic_colorblob, paletteView).findPathByName(\"blob\");\n //path.setFillColor(fruit.toInt());\n paletteView.invalidate();\n }",
"@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}",
"public Fruitore()\r\n\t{\r\n\t\tthis.nomeUtente = Costanti.STRINGA_VUOTA;\r\n\t}",
"public Fruit(String name, String color, double aveHarvestTime, String timeUnit){\r\n\t\tthis.name = name;\r\n\t\tthis.color = color;\r\n\t\tthis.averageHarvestTime = aveHarvestTime;\r\n\t\tthis.timeUnit = timeUnit;\r\n\t}",
"void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}",
"@Override\n public Animal createAnimal() {\n return new Monkey();\n }",
"public Cheese() {\n\n }",
"public void create(){}",
"public Shoe makeShoe() {\n\treturn new Shoe();\r\n}",
"PlayerBean create(String name);",
"public Fish create(){\n\t\tMovementStyle style = new NoMovement();\n\t\treturn new Shark(style);\n\t}",
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"Habit createHabit(Habit habit);",
"private void initFruits() {\n\t\tthis.fruits.clear();\n\t\tGraphFruit fruit = new GraphFruit();\n\t\tList<String> f = game.getFruits();\n\t\tfor(String s : f) {\n\t\t\tfruit.initFruit(s);\n\t\t\tthis.fruits.add(fruit);\n\t\t}\n\t}",
"public Fruit() {\n super(0, \"melon.png\",HEIGHT);\n\n reposition();\n isSinglePlayer = false;\n timeSinceSpeedUp = 0;\n difficulty = 1f;\n }",
"@Override\n\tpublic IProduct factoryMethod() {\n\t\treturn new Toy();\n\t}",
"public Fish() {\r\n\t}",
"private Ball createBall(Vektor v) {\n \t\tBall ball = new Ball(v, ballsize);\n \t\tball.color = Color.random();\n \t\tballs.add(ball);\n \t\treturn ball;\n \t}",
"public Butterfly(String name, String wingColor, int numberOfWings, String favFlower ){\n this.name = name;\n this.favFlower = favFlower;\n this.wingColor = wingColor;\n this.numberOfWings = numberOfWings;\n }",
"public Apple(String colour, double weight, int taste, boolean worm) throws TasteOutOfRangeException, InvalidWeightException, InvalidColourException {\n\t\tsetColour(colour);\n\t\tsetWeight(weight);\n\t\tsetTaste(taste);\n\t\tsetWorm(worm);\n\t\tpeelerFactory = new PeelerFactory();\n\t}",
"public Bike createCityBike() {\n Wheels cityWheels = new Wheels(559,50f,10000); //Räder des Stadtrads erstellen\n Gears cityGears = new Gears(3,1,5000); //Gangschaltung des Stadtrads erstellen\n Bike newCityBike = new Bike(cityGears, cityWheels, \"Stahl\", \"CB105\", true, true, 30000); //Stadtrad erstellen\n return newCityBike; //Stadtrad zurückgeben\n}",
"public Fish(String name, String gender){\n this.name = name;\n this.gender = gender;\n this.value = 10;\n this.eats = whatItEats(new fishFood());\n this.portionSize = 20;\n this.minimumOffspring = 1;\n this.maximumOffspring = 12;\n this.maxAge = 4;\n this.vetCost = 2;\n }",
"public void addFruit(int foodX, int foodY) {\n\t\t\n\n\t\tfruits.add(new Fruit(foodX, foodY)); // add new fruit to fruit array\n\t}",
"public Food() {\n super(1, 0, 1, 100, 5, 5, Resources.RICHSOIL, Resources.POORSOIL, \"Food\");\n }",
"public Pizza createPizza(String type) {\n\t\tPizza pizza = null;\n\t\tif(type.equals(\"cheese\")) {\n\t\t\tpizza = new CheesePizza();\n\t\t}\n\t\telse if(type.equals(\"pepperoni\")) {\n\t\t\tpizza = new PepperoniPizza();\n\t\t}\n\t\treturn pizza;\n\t}",
"public Food() {\n\t\tsuper(\"FOOD.png\");\n\t}",
"@Override\r\n public Food createFood(List<Coordinate> obstacles) {\r\n Random random = new Random();\r\n double num = random.nextDouble();\r\n\r\n if (num <= MushroomPowerUp.rarity) {\r\n return new MushroomPowerUp(randomCoordinates(obstacles));\r\n }\r\n if (num <= DoubleScorePowerUp.rarity + MushroomPowerUp.rarity) {\r\n return new DoubleScorePowerUp(randomCoordinates(obstacles));\r\n }\r\n return new AppleFactory().createFood();\r\n }",
"Person createPerson();",
"public Fruit(int x) {\n super(x, \"melon.png\",HEIGHT);\n\n isSinglePlayer = false;\n startTime = TimeUtils.millis();\n timeSinceSpeedUp = 0;\n difficulty = 1f;\n }",
"Book createBook();",
"public YellowTea() {\n super();\n this.setName(\"Yellow Tea\");\n this.setPrice(3.50);\n\n this.brewFirstLiquid = new BrewHotWater();\n this.brewSecondLiquid = new BrewNoLiquid();\n this.brewThirdLiquid = new BrewNoLiquid();\n\n System.out.println(\"Brewing Yellow Tea...\");\n }",
"public interface Fruit {\n}",
"void create(Team team);",
"public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}",
"public BubbleFactory() {\n // TODO Auto-generated constructor stub\n }",
"Thing createThing();",
"public void eatFruit(Fruit fruit) {\n raiseFoodLevel(30);\n }",
"public Fleet(String name) {\r\n this.name = name;\r\n boats = new ArrayList<Boat>();\r\n }",
"T create();",
"T create();",
"void create(T t);",
"protected Basket makeBasket() {\n\t\treturn new Basket();\n\t}",
"public Breadfruit(String nameTag) {\r\n super(sciPlantName, commonPlantName, hiPlantName, nameTag,\r\n origin, status, plantForm, plantSize,\r\n Evergreen.getMinHeightFromSize(plantSize),\r\n Evergreen.getMaxHeightFromSize(plantSize),\r\n Evergreen.getMinWidthFromSize(plantSize),\r\n Evergreen.getMaxWidthFromSize(plantSize),\r\n latitude, longitude);\r\n }",
"public Pizza makePizza(String newPizzaType){\n if(newPizzaType.equals(\"a\")){\r\n return new CheesePizza();\r\n }\r\n else if(newPizzaType.equals(\"b\")){\r\n return new VeggiePizza();\r\n }\r\n else if(newPizzaType.equals(\"c\")){\r\n return new ChickenPizza(); \r\n }\r\n else{ \r\n return null; \r\n }\r\n \r\n }",
"public void create(PraiseDiary bean) {\n\t\tdao.create(bean);\n\t}",
"@Test\n public void testCreation() {\n this.view.getController().addNewTypeOfFood(creationOfFood(\"Banana\", Pair.of(Nutrient.CARBOHYDRATES, 1.0)));\n assertEquals(\"There is only one type of food\", this.controller.getExistingViewFoods().size(), 1);\n assertEquals(\"There is one type of food in each set\", this.view.getFoodTypes().size(), this.controller.getExistingViewFoods().size());\n this.view.getController().addNewTypeOfFood(creationOfFood(\"Fragola\", Pair.of(Nutrient.CARBOHYDRATES, 1.0)));\n this.view.getController().addNewTypeOfFood(creationOfFood(\"Mela\", Pair.of(Nutrient.WATER, 1.0)));\n assertEquals(\"There are three types of food\", this.controller.getExistingViewFoods().size(), 3);\n assertThrows(AlreadyExistingFoodException.class, () -> this.view.getController().addNewTypeOfFood(creationOfFood(\"Mela\", Pair.of(Nutrient.WATER, 1.0))));\n this.view.getController().addNewTypeOfFood(creationOfFood(\"banana\", Pair.of(Nutrient.CARBOHYDRATES, 1.0)));\n assertEquals(\"banana is different from Banana\", this.controller.getExistingViewFoods().size(), 4);\n }",
"public BirdFoodTest()\r\n {\r\n }",
"@Override\n\tpublic String getFruit() {\n\t\treturn \"Orange\";\n\t}",
"public Animal(String farmObjectType, int purchasePrice){\n\t\tthis.setFarmObjectType(farmObjectType); \n\t\tthis.setPurchasePrice(purchasePrice);\n\t\tthis.setHealth(100); \n\t\tthis.setHappiness(100); \n\t}",
"public void create(Pizza pizza){\n pizza.setID(counter++);\n pizzas.add(pizza);\n }",
"Girl(String n,String p,String i,String a,String b,String t,String pr) {\n \n name = n;\n pairedto = p;\n intelligence = Integer.parseInt(i);\n attractiveness = Integer.parseInt(a);\n mBudget = Integer.parseInt(b); \n type = t;\n pref = pr;\n \n }",
"public interface Fruit {\n String name();\n}",
"public Breadfruit() {\r\n super(sciPlantName, commonPlantName, hiPlantName, \"\",\r\n origin, status, plantForm, plantSize,\r\n Evergreen.getMinHeightFromSize(plantSize),\r\n Evergreen.getMaxHeightFromSize(plantSize),\r\n Evergreen.getMinWidthFromSize(plantSize),\r\n Evergreen.getMaxWidthFromSize(plantSize),\r\n latitude, longitude);\r\n }",
"public Food (int id, String name, Seller seller, int price, FoodCategory category)\n {\n this.id=id;\n this.name=name;\n this.seller=seller;\n this.price=price;\n this.category=category;\n }",
"public void create() {\n\t\t\n\t}",
"public void testCreate() {\n TCreate_Return[] Baskets_create_out = basketService.create(new TCreate_Input[] { Basket_in });\n assertNoError(Baskets_create_out[0].getError());\n\n assertNull(\"No FormErrors\", Baskets_create_out[0].getFormErrors());\n assertEquals(\"created?\", true, Baskets_create_out[0].getCreated());\n assertNotNull(\"Path not null\", Baskets_create_out[0].getPath());\n BasketPath = Baskets_create_out[0].getPath();\n }",
"@Override\n\tprotected Pizza createPizza(String type) {\n\t\tPizza pizza = null;\n\t\tPizzaIngredientFactory pizzaIngredientFactory = new NYPizzaIngredientFactory();\n\t\tif(type.equals(\"cheese\")){\n\t\t\tpizza = new CheesePizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Cheese Pizza\");\n\t\t} else if(type.equals(\"veggie\")){\n\t\t\tpizza = new VeggiePizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Veggie Pizza\");\n\t\t} else if(type.equals(\"clam\")) {\n\t\t\tpizza = new ClamPizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Clam Pizza\");\n\t\t} return pizza;\n\t}",
"private void fillFruitList()\n\t{\n\t\tfruitList.add(\"apple\");\n\t\tfruitList.add(\"kiwi\");\n\t\tfruitList.add(\"coconut\");\n\t\tfruitList.add(\"orange\");\n\t\tfruitList.add(\"pineapple\");\n\t\tfruitList.add(\"pear\");\n\t\tfruitList.add(\"banana\");\n\t\tfruitList.add(\"papaya\");\n\t\tfruitList.add(\"blueberry\");\n\t}",
"public Food(int x, int y) {\n\t\tsuper(\"FOOD.png\",x,y);\n\t}",
"public Product createProduct() {\n String code, name;\n int quantity;\n float price;\n String color;\n String producer;\n int productType;\n\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"1. for dairy 2. for color product \");\n productType = scanner.nextInt();\n\n System.out.println(\"Give product Code\");\n code = scanner.next();\n System.out.println(\"Give product Name\");\n name = scanner.next();\n System.out.println(\"Give product Quantity\");\n quantity = scanner.nextInt();\n System.out.println(\"Give product Price\");\n price = scanner.nextFloat();\n\n Product product;\n switch (productType) {\n case 1:\n System.out.println(\"Give producer \");\n producer = scanner.next();\n product = new DairyProduct(code, name, price, quantity, producer);\n return product;\n case 2:\n System.out.println(\"Give color \");\n color = scanner.next();\n product = new ColorProducts(code, name, price, quantity, color);\n return product;\n default: return null;\n }\n }",
"@Override\r\n\tprotected Pizza createPizza(String type) {\n\t\tif(type.equals(\"cheese\")) {\r\n\t\t\treturn new NYStyleCheesePizza();\r\n\t\t}\r\n\t\telse return null;\r\n\t}",
"@POST(\"lugares/\")\n Call<Lugar> create(@Body Lugar lugar);",
"public Apple(String colour, double weight, int taste, boolean worm, boolean eaten, boolean peeled) throws TasteOutOfRangeException, InvalidWeightException, InvalidColourException {\n\t\tthis(colour, weight, taste, worm);\n\t\tsetEaten(eaten);\n\t\tsetPeeled(peeled);\n\t}",
"private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }",
"void createItem (String name, String description, double price);",
"void createSportItem (String name, String description, double price, String sportType);",
"private static void createProducts() {\n productRepository.addProduct(Product.builder()\n .name(\"Milk\")\n .barcode(new Barcode(\"5900017304007\"))\n .price(new BigDecimal(2.90))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Butter\")\n .barcode(new Barcode(\"5906217041483\"))\n .price(new BigDecimal(4.29))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Beer\")\n .barcode(new Barcode(\"5905927001114\"))\n .price(new BigDecimal(2.99))\n .build()\n );\n }",
"public static Bounty createEntity() {\n Bounty bounty = new Bounty()\n// .status(DEFAULT_STATUS)\n// .issueUrl(DEFAULT_URL)\n .amount(DEFAULT_AMOUNT)\n// .experience(DEFAULT_EXPERIENCE)\n// .commitment(DEFAULT_COMMITMENT)\n// .type(DEFAULT_TYPE)\n// .category(DEFAULT_CATEGORY)\n// .keywords(DEFAULT_KEYWORDS)\n .permission(DEFAULT_PERMISSION)\n .expiryDate(DEFAULT_EXPIRES);\n return bounty;\n }",
"public Fox() {\n super(randomAge(MAX_AGE), randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Pizza build(){\n Pizza pizza = new Pizza(this);\n return pizza;\n }",
"void create(Book book);",
"Rental createRental();",
"public RestaurantItem() {\n }",
"public Restaurant() { }",
"private BasicCoffeeMachine createCoffeeMachine() {\n\t\tMap<CoffeeSelection, CoffeeBean> beans = new HashMap<CoffeeSelection, CoffeeBean>();\n\t\tbeans.put(CoffeeSelection.ESPRESSO, new CoffeeBean(\"My favorite espresso bean\", 1000));\n\t\tbeans.put(CoffeeSelection.FILTER_COFFEE, new CoffeeBean(\"My favorite filter coffee bean\", 1000));\n\t\t\n\t\t// instantiate a new CoffeeMachine object\n\t\treturn new PremiumCoffeeMachine(beans);\n\t}",
"public void create(RecognizedItem item, SketchBook model) {\n }",
"RentalObject createRentalObject();",
"Vehicle createVehicle();",
"Vehicle createVehicle();",
"public Pizza(){\n this.name = \"Plain Pizza\";\n this.toppings = new ArrayList<String>(Arrays.asList(\"Olive\", \"Cheese\"));\n }",
"void create(Artist artist);",
"Stone create();",
"Klassenstufe createKlassenstufe();",
"public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }",
"public void testCreateWithDefaults() {\n TCreate_Input basket_in = new TCreate_Input();\n TCreate_Return[] Baskets_create_out = basketService.create(new TCreate_Input[] { basket_in });\n assertNoError(Baskets_create_out[0].getError());\n assertNull(\"No FormErrors\", Baskets_create_out[0].getFormErrors());\n assertEquals(\"created?\", true, Baskets_create_out[0].getCreated());\n assertNotNull(\"Path not null\", Baskets_create_out[0].getPath());\n }"
] | [
"0.7769404",
"0.7218082",
"0.71887493",
"0.71472025",
"0.69667065",
"0.6925369",
"0.6825449",
"0.6760375",
"0.67400634",
"0.650804",
"0.64506966",
"0.60223657",
"0.59757596",
"0.5960785",
"0.5904277",
"0.5885554",
"0.5859495",
"0.5741929",
"0.5706091",
"0.5673909",
"0.5671081",
"0.5653877",
"0.56468976",
"0.5596982",
"0.5589368",
"0.5579067",
"0.55204076",
"0.55176294",
"0.551149",
"0.55084336",
"0.5494983",
"0.546319",
"0.54612035",
"0.5454619",
"0.5447233",
"0.54433805",
"0.5432121",
"0.53940105",
"0.538948",
"0.5384883",
"0.53786093",
"0.5369813",
"0.53578365",
"0.53476006",
"0.53379273",
"0.5335033",
"0.5334241",
"0.532609",
"0.53125584",
"0.5304334",
"0.52965266",
"0.52773786",
"0.5262001",
"0.52399135",
"0.5236678",
"0.5236678",
"0.52347225",
"0.5233196",
"0.52233595",
"0.52203614",
"0.52200603",
"0.52191377",
"0.52134955",
"0.52095",
"0.52065706",
"0.5199377",
"0.5198185",
"0.5196225",
"0.51958853",
"0.5191494",
"0.5188615",
"0.51860344",
"0.5177727",
"0.5176115",
"0.5172547",
"0.517171",
"0.5169527",
"0.5163391",
"0.5162807",
"0.51600224",
"0.515812",
"0.51497644",
"0.51486486",
"0.51481485",
"0.514749",
"0.51393926",
"0.5136938",
"0.5128754",
"0.5122386",
"0.5122167",
"0.51116097",
"0.5111081",
"0.51094574",
"0.5107563",
"0.5107563",
"0.5098929",
"0.5095906",
"0.50918204",
"0.50835896",
"0.50720173",
"0.5071699"
] | 0.0 | -1 |
Return the sprite of this fruit | public Sprite getSprite() {
return image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Image sprite(){\n\t\treturn (face);\n\t}",
"@Override\n\tpublic final Sprite getSprite() {\n\t\treturn this.sprite;\n\t}",
"public Sprite getSprite()\n\t{\n\t\treturn sprite;\n\t}",
"public Sprite getSprite() {\n\t\treturn sprite;\n\t}",
"public Sprite getSprite() {\n\t\treturn sprite;\n\t}",
"public Sprite getCurrentSprite() {\n\t\tif (this.getVx() <= 0) {\n\t\t\treturn getImages()[0];\n\t\t}\n\t\treturn getImages()[1];\n\t}",
"public Sprite getSprite() {\n\t\tlong currTime = System.currentTimeMillis();\n\t\tif(currTime - lastUpdate > timeEach) {\n\t\t\tlastUpdate = currTime;\n\t\t\tcurrSprite++;\n\t\t\tif(currSprite >= sprites.length)\n\t\t\t\tcurrSprite = 0;\n\t\t}\n\t\treturn sprites[currSprite];\n\t}",
"public MyAnimation getSprite();",
"public Sprite getBattleSprite()\n {\n return battleSprite;\n }",
"@Override\n public Sprite getHurtSprite() {\n return Assets.getInstance().getSprite(\"entity/zombie_blood0.png\");\n }",
"public MyAnimation getFrontSprite();",
"public int getSpriteID() {\n return spriteID;\n }",
"public Sprite getSprite(String ref) {\n\t\tif (ref.equals(\"boss\")) {\n\t\t\treturn sprite.get(\"bossSprite\");\n\t\t} else if (ref.equals(\"boss_bullet\")) {\n\t\t\treturn sprite.get(\"bossBulletSprite\");\n\t\t} else if (ref.equals(\"boss_explosion\")) {\n\t\t\treturn sprite.get(\"bossExplosionSprite\");\n\t\t} else if (ref.equals(\"boss_hit\")) {\n\t\t\treturn sprite.get(\"bossHitSprite\");\n\t\t} else if (ref.equals(\"bullet\")) {\n\t\t\treturn sprite.get(\"bulletSprite\");\n\t\t} else if (ref.equals(\"enemy_bullet\")) {\n\t\t\treturn sprite.get(\"enemyBulletSprite\");\n\t\t} else if (ref.equals(\"enemy_explosion\")) {\n\t\t\treturn sprite.get(\"enemyExplosionSprite\");\n\t\t} else if (ref.equals(\"enemy_hit\")) {\n\t\t\treturn sprite.get(\"enemyHitSprite\");\n\t\t} else if (ref.equals(\"green_box\")) {\n\t\t\treturn sprite.get(\"greenBoxSprite\");\n\t\t} else if (ref.equals(\"laser\")) {\n\t\t\treturn sprite.get(\"laserSprite\");\n\t\t} else if (ref.equals(\"player\")) {\n\t\t\treturn sprite.get(\"playerSprite\");\n\t\t} else if (ref.equals(\"player_explosion\")) {\n\t\t\treturn sprite.get(\"playerExplosionSprite\");\n\t\t} else if (ref.equals(\"player_hit\")) {\n\t\t\treturn sprite.get(\"playerHitSprite\");\n\t\t} else if (ref.equals(\"powerup_explosion\")) {\n\t\t\treturn sprite.get(\"powerupExplosionSprite\");\n\t\t} else if (ref.equals(\"red_box\")) {\n\t\t\treturn sprite.get(\"redBoxSprite\");\n\t\t} else {\n\t\t\tSystem.out.println(\"fatal error\");\n\t\t\tSystem.out.println(ref);\n\t\t\treturn null;\n\t\t}\n\t}",
"public MyAnimation getRearSprite();",
"Sprite getBackground();",
"public Java2DSprite getSprite(Image ref) {\r\n\t\tif (window == null) {\r\n\t\t\tthrow new RuntimeException(\"Attempt to retrieve sprite before game window was created\");\r\n\t\t}\r\n\t\treturn new Java2DSprite((Java2DGameWindow) window,ref);\r\n\t}",
"private Sprite getIdeaSprite() {\n\t\tfinal String idea = entity.getIdea();\n\n\t\tif (idea == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn SpriteStore.get().getSprite(\n\t\t\t\t\"data/sprites/ideas/\" + idea + \".png\");\n\t}",
"public SpriteBase getSpriteBase() {\n return spriteBase;\n }",
"@Override\n\tpublic final Image getImage() {\n\t\treturn this.getSprite().getImage();\n\t}",
"public Sprite getMazeSprite()\n {\n return mazeSprite;\n }",
"public BufferedImage getSpriteImage(String ref) {\n\t\treturn sprites.get(ref);\n\t}",
"protected abstract void chooseSprite();",
"ImageView getRepresentationFromSpriteId(int spriteId);",
"int getSelectedSpriteValue();",
"public int getSpriteStandard()\n\t{\n\t\treturn this.spriteStandard;\n\t}",
"public Sprite getSprite(String spriteName)\n {\n if (this.sprites.containsKey(spriteName))\n return this.sprites.get(spriteName);\n else\n {\n \tSystem.out.println(\"Sprite \" + spriteName + \"does not exist in the bank\");\n return null;\n }\n }",
"public Drawable getDrawable() {\n return this.wotCharacter.getDrawable(this);\n }",
"@Override\n\tpublic SpriteType getSpriteType() {\n\t\treturn null;\n\t}",
"public Sprite getBackground() {\n this.background = new CirclesBackground();\n return this.background;\n }",
"public synchronized Sprite getSprite(String ref) {\n\t\t// if we've already got the sprite in the cache\n\t\t// then just return the existing version\n\t\tif (sprites.get(ref) != null) {\n\t\t\treturn sprites.get(ref);\n\t\t}\n\t\t\n\t\t// otherwise, go away and grab the sprite from the resource\n\t\t// loader\n\t\t\n\t\t// The ClassLoader.getResource() ensures we get the sprite\n\t\t// from the appropriate place, this helps with deploying the game\n\t\t// with things like webstart. You could equally do a file look\n\t\t// up here.\n\t\ttry (InputStream imgStr = this.getClass().getClassLoader().getResourceAsStream(ref)) {\n\t\t\tif (imgStr == null) {\n\t\t\t\tfail(\"Can't find ref: \"+ref);\n\t\t\t}\n\t\t\t\n\t\t\t// use ImageIO to read the image in\n\t\t\t// create a sprite, add it the cache then return it\n\t\t\tSprite sprite = new Sprite(new Image(imgStr));\n\t\t\t\n\t\t\tsprites.put(ref,sprite);\n\t\t\tnewSprites.put(ref, sprite);\n\t\t\t\n\t\t\treturn sprite;\n\t\t} catch (IOException e) {\n\t\t\tthrow new UncheckedIOException(e);\n\t\t}\n\t\t\n\t}",
"public static ImageIcon getSprite(String name)\n\t{\n\t\tImageIcon img = sprites.get(name);\n\t\tif (img == null)\n\t\t{\n\t\t\tDebug.println(\"Image \"+name+ \" loaded\");\n\t\t\ttry{\n\t\t\t\tURL url = new URL(\"https://deanattali.com/files/java/Scrabble/\" + name);\n\t\t\t img = new ImageIcon(url);\n\t\t\t}catch(Exception ex){}\n\t\t\tsprites.put(name,img);\n\t\t}\n\n\t\treturn img;\n\t}",
"private TextureAtlasSprite getActiveTexture() {\n TextureAtlasSprite activeTexture = Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite();\n if (texture instanceof TextureBase.Sprite) {\n TextureBase.Sprite sprite = (TextureBase.Sprite) texture;\n activeTexture = sprite.icon;\n } else if (texture instanceof TextureBase.Proxy) {\n TextureBase.Proxy proxySprite = (TextureBase.Proxy) texture;\n if (proxySprite.base instanceof TextureBase.Sprite) {\n activeTexture = ((TextureBase.Sprite) proxySprite.base).icon;\n }\n }\n\n return activeTexture;\n }",
"@Override\n public Sprite createSprite(SnakeSmash game) {\n Texture texture = game.getAssetManager().get(\"pinkSquare.png\");\n return new Sprite(texture, texture.getWidth(), texture.getHeight());\n }",
"public Image getBulletImg(){ \n return SpriteSheet.playerProjectileSprites[this.frameNumber]; \n }",
"abstract public void loadSprite();",
"public HashMap<String, BufferedImage> getSprites() {\n \t\treturn sprites;\n \t}",
"@Override\n\tpublic SpriteType getSpriteType() {\n\t\tif (isFinish) {\n\t\t\treturn SpriteType.FINISH_POINT;\n\t\t}\n\t\treturn SpriteType.BEGIN_POINT;\n\t}",
"public SuperMario getActor() {\r\n return mario;\r\n }",
"public Sprite getBackground() {\r\n return new BackGround4();\r\n }",
"public Image getImage(String token) {\n\t\tImage image = spriteMap.get(token);\n\t\tif (image == null) {\n\t\t\tSystem.out.println(\"null image on input \" + token);\n\t\t}\n\t\treturn image;\n\t}",
"public int getLength () { return spriteLength; }",
"public RectF getSpriteBoundary() { return new RectF(atomSpriteBoundary); }",
"public Image getSpriteImage(Sprite sprite){\n if(sprite == null){\n return sprites.get(1);\n }\n return sprites.get(sprite.getSpriteIndex());\n }",
"public Sprite getPlayer() {\n\t\treturn player;\n\t}",
"public void evaluateSprite(){\n if(this.orientation == Orientation.FACING_NORTH) {\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingNorth.png\"));\n }\n if(this.orientation == Orientation.FACING_WEST){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingWest.png\"));\n }\n if(this.orientation == Orientation.FACING_SOUTH){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingSouth.png\"));\n }\n if(this.orientation == Orientation.FACING_EAST){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingEast.png\"));\n }\n\n this.sprite = new Sprite(texture);\n }",
"public Fruit(int x, int y, int image)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.type = image;\n\t\tspr = createSprite(main.getImage(image, false));\n\t\tsprite = spr;\n\t\tboom = createSprite(main.getImage(main.IMG_EXPLOSION, true));\n\t\tempty= createSprite(main.getImage(main.IMG_EMPTY, true));\n\t\tbomb = createSprite(main.getImage(main.IMG_BOMB, true));\n\t\tsprite.setPosition(x*sprite.getWidth(),y*sprite.getHeight());\n\t}",
"ArrayList<Sprite> getSpriteArray();",
"public JewelSprite(int type, int x, int y) {\n\t this.type = type;\n\t setxPos(x);\n\t setyPos(y);\n\n\t String imagePath = \"/\" + Integer.toString(type) + \".png\";\n\t jewelImage = new Image(Jewel.class.getResourceAsStream(imagePath));\n\t ImageView jewelImageView = new ImageView();\n\t jewelImageView.setImage(jewelImage);\n\t jewelImageView.setStyle(\"-fx-background-color:transparent;\");\n\n\t setNode(jewelImageView);\n\t }",
"public BufferedImage getDrawable(){\n\t\tif(this.isOilContamination()){\n\t\t\treturn this.myFlyweight.getDeadDrawable();\n\t\t}\n\t\t//check direction -- such a horrible way to write a method\n\t\t//redundant checking and ugh.... design this away please...........................\n\t\tif(this.getDirection().getX() > 0 && !this.myFlyweight.getMovingBackAnimationSequence().isEmpty()){\n\t\t\treturn this.myFlyweight.getMovingBackAnimationSequence().get(animationFrame);\n\t\t}\n\t\treturn this.myFlyweight.getAnimationSequence().get(animationFrame);\n\t}",
"public CroppableAtlasSprite obtainSprite(ETexture texture) {\n\t\treturn obtainSprite(ResourceCache.getTexture(texture));\n\t}",
"public Optional<Sprite> select(String spriteKey) {\n\t\tselectedKey = spriteKey;\n\t\treturn current();\n\t}",
"@Override\n public void chooseSprite() {\n switch(direction){\n case 0:\n sprite=Sprite.python_down;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_down,Sprite.python_down_1,Sprite.python_down_2,Sprite.python_down_3,animate,40);\n break;\n case 1:\n sprite=Sprite.python_right;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_right,Sprite.python_right_1,Sprite.python_right_2,animate,40);\n break;\n case 2:\n sprite=Sprite.python_up;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_up,Sprite.python_up_1,Sprite.python_up_2,animate,40);\n break;\n case 3:\n sprite=Sprite.python_left;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_left,Sprite.python_left_1,Sprite.python_left_2,animate,40);\n break;\n\n\n }\n\n }",
"public Sprite() {}",
"@Override\n public Sprite createSprite(TSSGame game) {\n return new Sprite();\n }",
"public Rect hitBox(){\n return new Rect((int)getX(), (int)getY(), (int)getX() + spriteWidth, (int)getY() + spriteHeight);\n }",
"@Override\r\n protected void chooseSprite() {\r\n switch(_direction) {\r\n case 0:\r\n case 1:\r\n if(_moving)\r\n _sprite = Sprite.movingSprite(Sprite.stupid_right1, Sprite.stupid_right2, Sprite.stupid_right3, _animate, 60);\r\n else\r\n _sprite = Sprite.stupid1;\r\n break;\r\n case 2:\r\n case 3:\r\n if(_moving)\r\n _sprite = Sprite.movingSprite(Sprite.stupid1, Sprite.stupid2, Sprite.stupid3, _animate, 60);\r\n else\r\n _sprite = Sprite.stupid1;\r\n break;\r\n }\r\n }",
"public int getSpriteWidth() {\n return this.spriteWidth;\n }",
"@Override\r\n public Sprite getBackground() {\r\n return new Level3Background();\r\n }",
"public Collision getCollisionType(ISprite sprite);",
"@Override\n\tprotected Sprite getAnimationSprite() {\n\t\tfinal SpriteStore store = SpriteStore.get();\n\t\tZoneInfo info = ZoneInfo.get();\n\n\t\tSprite sprite;\n\n\t\ttry {\n\t\t\tfinal RPEntity npc = entity;\n\t\t\tfinal int code = npc.getOutfit();\n\t\t\tfinal String strcode = npc.getExtOutfit();\n\n\t\t\tfinal OutfitColor color = OutfitColor.get(npc.getRPObject());\n\n\t\t\tif (strcode != null) {\n\t\t\t\tsprite = OutfitStore.get().getAdjustedOutfit(strcode, color, info.getZoneColor(), info.getColorMethod());\n\t\t\t} else if (code != RPEntity.OUTFIT_UNSET) {\n\t\t\t\tfinal int body = code % 100;\n\t\t\t\tfinal int dress = code / 100 % 100;\n\t\t\t\tfinal int head = (int) (code / Math.pow(100, 2) % 100);\n\t\t\t\tfinal int hair = (int) (code / Math.pow(100, 3) % 100);\n\t\t\t\tfinal int detail = (int) (code / Math.pow(100, 4) % 100);\n\n\t\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\t\tsb.append(\"body=\" + body);\n\t\t\t\tsb.append(\",dress=\" + dress);\n\t\t\t\tsb.append(\",head=\" + head);\n\t\t\t\tsb.append(\",hair=\" + hair);\n\t\t\t\tsb.append(\",detail=\" + detail);\n\n\t\t\t\tsprite = OutfitStore.get().getAdjustedOutfit(sb.toString(), color, info.getZoneColor(),\n\t\t\t\t\t\tinfo.getColorMethod());\n\t\t\t} else {\n\t\t\t\t// This NPC's outfit is read from a single file.\n\t\t\t\tsprite = store.getModifiedSprite(translate(\"npc/\"\n\t\t\t\t\t\t+ entity.getEntityClass()), info.getZoneColor(),\n\t\t\t\t\t\tinfo.getColorMethod());\n\t\t\t}\n\t\t} catch (final Exception e) {\n\t\t\tlogger.error(\"Cannot build animations\", e);\n\t\t\tsprite = store.getModifiedSprite(translate(entity.getEntityClass()),\n\t\t\t\t\tinfo.getZoneColor(), info.getColorMethod());\n\t\t}\n\n\t\treturn sprite;\n//\t\treturn addShadow(sprite);\n\t}",
"@Override\n\tpublic String getPath() {\n\t\treturn \"./gfx/weapon.png\";\n\t}",
"@Override\n public Sprite createSprite(DeathmatchMania game) {\n Animation = createAnimation(game);\n return new Sprite(Animation.getKeyFrame(0, true));\n }",
"private AnimatedImage armorSprite() throws FileNotFoundException {\n\n\t\tString[] imageArray = new String[4];\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\timageArray[i] = \"sprites/BluePotion\" + i + \".png\";\n\t\t}\n\n\t\tAnimatedImage armor = new AnimatedImage(imageArray, 0.125, 70, 70);\n\n\t\treturn armor;\n\n\t}",
"public int getSpriteHover()\n\t{\n\t\treturn this.spriteHover;\n\t}",
"public Actor getActor() {\n\t\treturn map.getActorAt(this);\n\t}",
"private AnimatedImage healthSprite() throws FileNotFoundException {\n\n\t\tString[] imageArray = new String[4];\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\timageArray[i] = \"sprites/Heart\" + i + \".png\";\n\t\t}\n\n\t\tAnimatedImage health = new AnimatedImage(imageArray, 0.125, 90, 90);\n\n\t\treturn health;\n\n\t}",
"public int getSpriteHeight() {\n return this.spriteHeight;\n }",
"public Actor getActor(int index) { return (Actor)ActorSet.elementAt(index); }",
"public static ItemStack getZombieSkull () {\n \n return new ItemStack(Items.SKULL, 1, 2);\n }",
"public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}",
"Texture getIcon();",
"public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}",
"public Sprite(String pathname) throws IOException {\n\t\tBufferedImage img = ImageIO.read(new File(pathname));\n\t\tint nbcol = img.getWidth() / SPRITE_WIDTH;\n\t\tint nblig = img.getHeight() / SPRITE_HEIGHT;\n\t\tm_length = nblig * nbcol;\n\t\tm_sprites = new BufferedImage[m_length];\n\t\tfor (int i = 0; i < m_length; i++) {\n\t\t\tint x = i % nbcol;\n\t\t\tint y = i / nbcol;\n\t\t\tm_sprites[i] = img.getSubimage(x * SPRITE_WIDTH, y * SPRITE_HEIGHT, SPRITE_WIDTH, SPRITE_HEIGHT);\n\t\t}\n\t}",
"public static Bitmap GetDealSpriteBitmap()\r\n\t{\r\n\t\t// Load background desktop image from resouce\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(m_DealSpriteBitmap == null)\r\n\t\t\t{\r\n\t\t\t\tm_DealSpriteBitmap = BitmapFactory.decodeResource(res, R.drawable.face);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\timage = m_DealSpriteBitmap;\r\n\t\t} \r\n\t\treturn image;\r\n\t}",
"public abstract Drawable getIcon();",
"public static SpriteStore get() {\n\t\treturn single;\n\t}",
"private void chooseSprite()\r\n\t{\r\n\t\t//Ensure pedestrian sprites exist\r\n\t\tif (sprites.isEmpty()) {\r\n\t\t\tSystem.err.println(\"ERROR: No pedestrian sprites have been loaded\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//Select a random sprite\r\n\t\tint index = (int) Math.floor( Math.random()*sprites.size() );\r\n\t\tspriteName = sprites.get(index);\r\n\t\tsetSprite(\"pedestrians/\"+spriteName);\r\n\t}",
"@Override\n\t\t\t\t\tpublic Drawable getDrawable() {\n\t\t\t\t\t\treturn getWeightDrawable(id,width,height);\n\t\t\t\t\t}",
"@Override\n\tpublic int getTexture() {\n\t\treturn 0;\n\t}",
"protected ResourceLocation getEntityTexture(EntityZombie p_110775_1_)\n {\n return this.getEntityTexture((EntityMegaZombie)p_110775_1_);\n }",
"public BufferedImage[] powerSprite(){\n\t\tBufferedImage arr[] = new BufferedImage[4];\n\t\tarr[0] = img.getSubimage(724, 283, 71, 67);\n\t\tarr[1] = img.getSubimage(650, 286, 72, 64);\n\t\tarr[2] = img.getSubimage(484, 292, 83, 58);\n\t\tarr[3] = img.getSubimage(257, 281, 71, 69);\n\t\treturn arr;\n\t\t\t\n\t}",
"public Sprite(double x, double y, String imageName) {\n\n this.x = x;\n this.y = y;\n visible = true;\n\n // set the image\n ImageIcon ii = new ImageIcon(imageName);\n image = ii.getImage();\n\n r = image.getHeight(null);\n }",
"public Image getPokeImg(int index) {\n\t\treturn pokemonImgs[index];\n\t}",
"@Override\r\n public Sprite build() {\r\n return new Sprite(imageView, totalNbrFrames, columns, offsetX, offsetY, widthFrame, heightFrame);\r\n }",
"private Sprite createSprite(Image image)\n\t{\n\t\tSprite sprite = new Sprite(image, image.getWidth(), image.getHeight());\n\t\treturn sprite;\n\t}",
"int indexOfSpriteThatCollided(Array<? extends Sprite> sprites, Sprite sprite);",
"public Mario(){\n setImage(\"06.png\");\n \n }",
"public Drawable getDrawable()\n\t {\n\t return drawable;\n\t }",
"public Image getTieUnder();",
"public void addSprite(Scene pScene, int x, int y) {\n\t\t\r\n\t}",
"private SpriteFont getSpriteFontInstance() {\r\n\t\t// called by the seed batch upon making a batch\r\n\t\t// only needs docPoint if an influenceImage is set\r\n\t\t//System.out.println(\"SpriteFontBiome::getSpriteFontInstance ... num biomeItems = \" + biomeItems.size());\r\n\t\tif (probabilitiesNormalised == false) normaliseProbabilities();\r\n\r\n\t\tif (biomeItems.size() == 1) {\r\n\t\t\treturn biomeItems.get(0);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfloat r = randomStream.randRangeF(0f, 1f);\r\n\t\treturn getSpriteFontFromProbabilityStack(r);\r\n\t}",
"public Image getTieOver();",
"private void drawSprite(int x, int y, int u, int v)\n {\n GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(STAT_ICONS);\n float f = 0.0078125F;\n float f1 = 0.0078125F;\n int i = 18;\n int j = 18;\n Tessellator tessellator = Tessellator.getInstance();\n BufferBuilder bufferbuilder = tessellator.getBuffer();\n bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\n bufferbuilder.pos((double)(x + 0), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 0), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n tessellator.draw();\n }",
"public int getImageResource() {\n switch (id) {\n case 0: return R.drawable.aatrox_square_0;\n case 1: return R.drawable.ahri_square_0;\n case 2: return R.drawable.akali_square_0;\n case 3: return R.drawable.alistar_square_0;\n case 4: return R.drawable.amumu_square_0;\n case 5: return R.drawable.anivia_square_0;\n case 6: return R.drawable.annie_square_0;\n case 7: return R.drawable.ashe_square_0;\n case 8: return R.drawable.azir_square_0;\n case 9: return R.drawable.bard_square_0;\n case 10: return R.drawable.blitzcrank_square_0;\n case 11: return R.drawable.brand_square_0;\n case 12: return R.drawable.braum_square_0;\n case 13: return R.drawable.caitlyn_square_0;\n case 14: return R.drawable.cassiopeia_square_0;\n case 15: return R.drawable.chogath_square_0;\n case 16: return R.drawable.corki_square_0;\n case 17: return R.drawable.darius_square_0;\n case 18: return R.drawable.diana_square_0;\n case 19: return R.drawable.draven_square_0;\n case 20: return R.drawable.drmundo_square_0;\n default:\n return R.drawable.fizz_square_0;\n }\n }",
"private int getInstr(int index) {\n switch (index) {\n case 0:\n return R.drawable.chickpeacurry;\n case 1:\n return R.drawable.sweetpotatoblackbeanburger;\n case 2:\n return R.drawable.cabbagedietsoup;\n case 3:\n return R.drawable.instantpotvegetablesoup;\n case 4:\n return R.drawable.veganpumpkinsoup;\n\n default:\n return -1;\n }\n }",
"public Tile getTile(int pos) {\n\t\tObject t = tileList.get(pos);\n\t\tif(t instanceof Property){\n\t\t\treturn (Property) t;\n\t\t} else if(t instanceof TaxTile){\n\t\t\treturn (TaxTile) t;\n\t\t} else { // Should not happen\n\t\t\treturn (Tile) t;\n\t\t}\n\t}",
"@Override\r\n\tpublic Image getGameIcon() {\n\t\treturn null;\r\n\t}",
"public ArrayList<String> getSpriteNames() {\n\t\treturn getFileNamesByPath(simulationConfig.getString(\"spritepath\"));\n\t}",
"protected ResourceLocation getEntityTexture(Entity p_110775_1_)\n {\n return this.getEntityTexture((EntityMegaZombie)p_110775_1_);\n }",
"private void getRandomSprite(String type) {\n\t\tint randInt = new Random().nextInt(3);\n\t\tspriteNum = randInt;\n\t\tswitch(type){\n\t\tcase \"red\":\n\t\t\tspriteCol = 0;\n\t\t\tbreak;\n\t\tcase \"blue\":\n\t\t\tspriteCol = 1;\n\t\t\tbreak;\n\t\tcase \"green\":\n\t\t\tspriteCol = 2;\n\t\t\tbreak;\n\t\tcase \"black\":\n\t\t\tspriteCol = 3;\n\t\t\tbreak;\n\t\tcase \"grey\":\n\t\t\tspriteCol = 4;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tspriteCol =0;\n\t\t\tbreak;\n\t\t}\n\t}"
] | [
"0.76833034",
"0.74920243",
"0.74506396",
"0.7391943",
"0.7391943",
"0.69987255",
"0.6987927",
"0.69858295",
"0.6876693",
"0.67969656",
"0.67961687",
"0.67726386",
"0.6654216",
"0.6610626",
"0.6573914",
"0.65328974",
"0.6523049",
"0.65151167",
"0.6506935",
"0.6477668",
"0.64564073",
"0.6440417",
"0.63721585",
"0.62274796",
"0.62095803",
"0.6182841",
"0.6176713",
"0.61701155",
"0.61217445",
"0.61179143",
"0.60726297",
"0.6050598",
"0.6046602",
"0.60327595",
"0.5996531",
"0.5897912",
"0.5891667",
"0.58697885",
"0.586123",
"0.5832715",
"0.58150643",
"0.58054054",
"0.5786643",
"0.5781737",
"0.57619375",
"0.5748751",
"0.57396007",
"0.5739362",
"0.57104146",
"0.5688156",
"0.5671513",
"0.565125",
"0.5624724",
"0.55897504",
"0.55883515",
"0.55795515",
"0.5579234",
"0.55516434",
"0.5540788",
"0.5538651",
"0.5528953",
"0.55262923",
"0.5524842",
"0.5522518",
"0.5511738",
"0.5494064",
"0.54838836",
"0.54626226",
"0.54577243",
"0.5455013",
"0.54336",
"0.54329973",
"0.542294",
"0.5415959",
"0.5391437",
"0.5378297",
"0.53735757",
"0.53679794",
"0.53508604",
"0.5338404",
"0.53270596",
"0.53254056",
"0.5316072",
"0.53060645",
"0.5299255",
"0.5296252",
"0.5295176",
"0.52922136",
"0.5290498",
"0.52810293",
"0.5278215",
"0.5277487",
"0.52689534",
"0.526844",
"0.5263275",
"0.5262607",
"0.52602816",
"0.5242511",
"0.5239418",
"0.522993"
] | 0.7321426 | 5 |
returns the time for which this fruit will remain on the board. | public int getLifetime() {
return lifetime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getRemainingTime()\n {\n return totalTime - scheduledTime;\n }",
"Double getRemainingTime();",
"public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }",
"public int getEat_time()\n\t{\n\t\treturn eat_time;\n\t}",
"public int getTime() {\n\t\treturn time;\n\t}",
"public int getTime() {\n\t\treturn time;\n\t}",
"public int getTime() {\n\n\t\treturn time;\n\t}",
"public int getTime() {\r\n return time;\r\n }",
"Duration getRemainingTime();",
"public int getTime() {\n return time;\n }",
"public int getTime() {\n return time;\n }",
"public int getTime() {\n return time;\n }",
"public long getRemainingTime() {\n return (maxTime_ * 1000L)\n - (System.currentTimeMillis() - startTime_);\n }",
"private long remainingTime() {\n final long remainingTime = this.designatedEnd - System.currentTimeMillis();\n return remainingTime >= 0 ? remainingTime : 0L;\n }",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}",
"public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}",
"public int totalTime()\n {\n return departureTime - arrivalTime;\n }",
"public long getTimeDisrepair()\n\t{\n\t\treturn timeDisrepair;\n\t}",
"public double getHoldTime();",
"public double getTimeRemaining() {\n\t\treturn (startingTime + duration) - System.currentTimeMillis();\n\t}",
"public static int getTime() {\n\t\treturn time;\n\t}",
"public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}",
"public float getRemainingTime () {\n\t\treturn duration - timer < 0 ? 0 : duration - timer;\n\t}",
"public long getTime() {\r\n\t\treturn time;\r\n\t}",
"public int getConfirmTime() {\n\t\treturn _tempNoTiceShipMessage.getConfirmTime();\n\t}",
"public long getMaxTime()\n {\n return times[times.length - 1];\n }",
"@Override\n public long getTime() {\n return time;\n }",
"public int getYellowTime() {\r\n return yellowTime;\r\n }",
"long getInhabitedTime();",
"public long getTime() {\r\n \treturn time;\r\n }",
"public Integer getCraftTime(final ItemStack item, final int amount) {\n\n final int time = 0;\n\n return 0;\n}",
"public int getTime() { return _time; }",
"public Integer getCurrentLapsTime() {\n\t\treturn this.currentAction.getCurrentLapsTime();\n\t}",
"public java.lang.Integer getTime() {\n return time;\n }",
"public double getTime() { return time; }",
"@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public java.lang.Integer getTime() {\n return time;\n }",
"public long getTime() {\n return time;\n }",
"public int getTurnaround (){\n return finishingTime-arrival_time;\n }",
"int getTime();",
"int getTime();",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public int getThunderTime()\n {\n return thunderTime;\n }",
"public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }",
"public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }",
"public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }",
"int time()\n\t{\n\t\treturn totalTick;\n\t}",
"public final long getTime () {\n return time;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}",
"public double getTime() {\n return this.time;\n }",
"public double getTime() {\n\t\treturn this.completedTime;\n\t}",
"public long getTimeRemaining() {\n int timer = 180000; //3 minutes for the game in milliseconds\n long timeElapsed = System.currentTimeMillis() - startTime;\n long timeRemaining = timer - timeElapsed + bonusTime;\n long timeInSeconds = timeRemaining / 1000;\n long seconds = timeInSeconds % 60;\n long minutes = timeInSeconds / 60;\n if (seconds < 0 || minutes < 0) { //so negative numbers don't show\n seconds = 0;\n minutes = 0;\n }\n return timeInSeconds;\n }",
"public Date time() {\n return _time;\n }",
"public Date time() {\n return _time;\n }",
"public int getTimeToAtk() {\r\n return timeToAtk;\r\n }",
"java.lang.String getDepartureTime();",
"java.lang.String getDepartureTime();",
"public String getAvailableTime() {\n String output = \"\";\n for (int i = 0; i < 24; ++i) {\n if (availableTime[i] == true) {\n output += i;\n break;\n }\n }\n output += \" to \";\n for (int i = 23; i >= 0; --i) {\n if (availableTime[i] == true) {\n output += i;\n break;\n }\n }\n return output;\n }",
"public Date time() {\n return _time;\n }",
"public synchronized static int getTime() {\n\t\treturn time;\n\t}",
"public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }",
"public int getGrowthTime(){\n return this.growthTime;\n }",
"public Long getTime() {\n return time;\n }",
"public int getTime() {\n\t\tif(player == null) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn player.getPosition();\n\t}",
"public synchronized long getTime() {\n return -1L;\n }",
"public float getTimeToMove()\n\t{\n\t\treturn this.timeToMove;\n\t}",
"public long getTime() {\n return _time;\n }",
"public double getTime() {return _time;}",
"long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}",
"public Integer getGameUseTime() {\n return gameUseTime;\n }",
"public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}",
"public int getMatchTime() {\n return getIntegerProperty(\"Time\");\n }",
"public long lastCumulativeTime()\r\n/* 234: */ {\r\n/* 235:434 */ return this.lastCumulativeTime;\r\n/* 236: */ }",
"public long getOccupiedSeconds(){\n \t\treturn occupiedSeconds;\n \t}",
"public long getDropTime() {\n\t\treturn dropTime;\n\t}",
"private int getActiveTime() {\n\t\treturn 15 + level;\n\t}",
"public long getEventTime();",
"@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}",
"@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}",
"public int getTT()\n {\n return toTime;\n }",
"@java.lang.Override\n public long getTime() {\n return time_;\n }",
"public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }",
"public Time getTime() {\n return this.time; // returns the time associated with the task\n }",
"public int getTotalTime();",
"public Date takeOff() {\n \t\r\n \tthis.lastTimeTookOf = new Date();\r\n \treturn lastTimeTookOf;\r\n }",
"public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }",
"public String getTime() {\r\n\t\treturn time;\r\n\t}",
"public int getTimeToComplete() {\n // one level is ten minutes long\n int totalTime = numberOfLevels * 10;\n if (is3D) {\n // if it's 3d then it take twice as long because its harder\n totalTime = totalTime * 2;\n }\n \n return totalTime;\n }",
"public String getTime() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString time = dateFormat.format(cal.getTime());\n\t\t\treturn time;\n\t\t}"
] | [
"0.6814859",
"0.67330956",
"0.6723164",
"0.667701",
"0.65564233",
"0.65564233",
"0.65039665",
"0.65032524",
"0.6485985",
"0.64745104",
"0.64745104",
"0.64745104",
"0.64571804",
"0.6406166",
"0.64026546",
"0.64026546",
"0.6385458",
"0.6368797",
"0.63470584",
"0.634135",
"0.63030136",
"0.6296663",
"0.62894773",
"0.6277198",
"0.62644607",
"0.62642473",
"0.62551385",
"0.6253863",
"0.6248205",
"0.6243968",
"0.62434906",
"0.6232051",
"0.6214081",
"0.6212525",
"0.6200178",
"0.6192236",
"0.61739624",
"0.6157246",
"0.6155399",
"0.6155399",
"0.6155399",
"0.61414707",
"0.6132453",
"0.6113318",
"0.61130774",
"0.61130774",
"0.6106075",
"0.6106075",
"0.6106075",
"0.6106075",
"0.6106075",
"0.6106075",
"0.6105922",
"0.61031437",
"0.6102037",
"0.6096252",
"0.60952747",
"0.60899526",
"0.60886896",
"0.60886896",
"0.6076562",
"0.60674053",
"0.606722",
"0.60671616",
"0.60574114",
"0.60574114",
"0.6056619",
"0.60471743",
"0.60471743",
"0.60438526",
"0.60412014",
"0.6028943",
"0.60223347",
"0.60187995",
"0.60130864",
"0.6012539",
"0.60090286",
"0.60089475",
"0.6005995",
"0.60056543",
"0.600512",
"0.60050416",
"0.6002385",
"0.59987885",
"0.5998497",
"0.59957516",
"0.5995606",
"0.5995414",
"0.59919214",
"0.59896815",
"0.5979962",
"0.5975524",
"0.5972912",
"0.596968",
"0.5965006",
"0.59513044",
"0.59495425",
"0.5948828",
"0.59418976",
"0.59407073",
"0.593988"
] | 0.0 | -1 |
Returns the time for which the power of this fruit is active | public int getEffectDuration() {
return effectDuration;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int getActiveTime() {\n\t\treturn 15 + level;\n\t}",
"EDataType getActivePower();",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public double getHoldTime();",
"public double getTime()\n {\n long l = System.currentTimeMillis()-base;\n return l/1000.0;\n }",
"@Basic\n\tpublic double getTimeInWater(){\n\t\treturn this.time_in_water;\n\t}",
"public double getTimeForOpen();",
"public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}",
"public double getTime() { return time; }",
"public int getEnergyTimer()\n\t{\n\t\treturn currentEnergyTimer;\n\t}",
"public double getCBRTime();",
"private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }",
"int time()\n\t{\n\t\treturn totalTick;\n\t}",
"public int getLevelTime();",
"public int getEat_time()\n\t{\n\t\treturn eat_time;\n\t}",
"public int getPower() {\n return PA_POW_reg.getPower();\n }",
"public double getTime() {\n return this.time;\n }",
"public Double getBestTime() {\n return bestTime;\n }",
"float getPower();",
"public long getEventTime();",
"public double getStartTime();",
"public double getTimeDelayActivation() {\r\n\t\tif (activation_count > 1) return last_activation;\r\n\t\telse return 0.0;\r\n\t}",
"public double getTime() {return _time;}",
"public Integer getCurrentLapsTime() {\n\t\treturn this.currentAction.getCurrentLapsTime();\n\t}",
"public double getTime();",
"public int getPower() {\n \t\treturn power;\n \t}",
"public int getPower() {\n\t\treturn aerodynamics.getPower()+engine.getPower()+suspension.getPower()+breaks.getPower()+tires.getPower();\n\t}",
"public double getWorkTime()\n {\n if (cFixedServiceTimed)\n {\n return (mServerConfig.mServiceTime);\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n return (cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n return (tBase + cRandom.negexp(tDelta));\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n return (tBase + cRandom.poisson(tDelta));\n\n case cHoldUniform:\n return (cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n }\n return 0.0;\n }",
"public int getCurrentSpecialPower() {\n return currentSpecialPower;\n }",
"public int getPower();",
"public float getCurrentTime () {\n\t\treturn timer;\n\t}",
"public int getWorkRequired() {\n return time;\n }",
"public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }",
"java.lang.String getTxpower();",
"private long getSleepTime()\n {\n return sleepTime;\n }",
"public abstract double sensingTime();",
"com.google.protobuf.Timestamp getCurrentStateTime();",
"public double getTimeForClose();",
"public int getPower() {\n return this.power;\n }",
"EDataType getReactivePower();",
"public double getSlowToFire();",
"public int getSkillRechargeTime(Skills currentSkill);",
"BigInteger getPower_consumption();",
"public float getPower() {\n return power_;\n }",
"public int getPower(){\n\t\treturn this.power;\n\t}",
"public int getTime() {\r\n return time;\r\n }",
"public double getPower()\n {\n return this.power;\n }",
"public float getPower() {\n return power_;\n }",
"public long getSleepTime() {\n return sleepTime;\n }",
"public int getPower() {\n\t\treturn 0;\r\n\t}",
"double getFullTime();",
"public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }",
"@Override\n\tpublic int getPower() {\n\t\treturn power;\n\t}",
"@Array({9}) \n\t@Field(25) \n\tpublic Pointer<Byte > ActiveTime() {\n\t\treturn this.io.getPointerField(this, 25);\n\t}",
"public double getStopTime();",
"public double getPower() {\r\n return power;\r\n }",
"public int getTime() {\n\t\treturn time;\n\t}",
"public int getTime() {\n\t\treturn time;\n\t}",
"public Timer getTime() {\n\t\treturn time;\n\t}",
"public int getWarmupTime() {\n return warmupTime;\n }",
"public double getUserTimeSec() {\n\treturn getUserTime() / Math.pow(10, 9);\n}",
"public int getTime() {\n return time;\n }",
"public int getTime() {\n return time;\n }",
"public int getTime() {\n return time;\n }",
"public int get_power() {\r\n\t\treturn this._power;\r\n\t}",
"public long getMaxActiveTime()\n {\n if (_maxActiveTime > Long.MAX_VALUE / 2)\n return -1;\n else\n return _maxActiveTime;\n }",
"Double getRemainingTime();",
"public double getCurrentTime() {\n\t\treturn currentTime;\n\t}",
"public double getPower() {\n return power;\n }",
"public long startTime();",
"public Integer getGameUseTime() {\n return gameUseTime;\n }",
"@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}",
"public BigInteger getTime() {\n\t\treturn time;\n\t}",
"public double getServiceTime() {\r\n\t\treturn serviceTime.sample();\r\n\t}",
"public int getTime() {\n\n\t\treturn time;\n\t}",
"public Float getUsedtime() {\n return usedtime;\n }",
"@Basic\n\tpublic double getTimeInvincible(){\n\t\treturn this.time_invincible;\n\t}",
"public Date getEventTime() {\n\t\treturn time;\n\t}",
"int getChronicDelayTime();",
"hr.client.appuser.CouponCenter.TimeRange getUseTime();",
"hr.client.appuser.CouponCenter.TimeRange getUseTime();",
"double getTime();",
"public Date getBuy_time() {\r\n\t\treturn buy_time;\r\n\t}",
"public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}",
"long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}",
"public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}",
"public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public Rational getStartTime ()\r\n {\r\n return startTime;\r\n }",
"public static int getTempSampleTime() {\n return tempSampleTime;\n }",
"public int getTotalTime();",
"@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }",
"public Integer getOnTime() {\n return onTime;\n }",
"public Long getFastestTime()\r\n {\r\n return this.fastestTime;\r\n }",
"long getInhabitedTime();",
"public java.lang.Integer getTime() {\n return time;\n }",
"public int getGrowthTime(){\n return this.growthTime;\n }",
"public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }",
"public long getMinTime()\n {\n return times[0];\n }",
"public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}",
"protected static double getFPGATime() {\n return (System.currentTimeMillis() - startTime) / 1000.0;\n }"
] | [
"0.7185531",
"0.68449426",
"0.67809707",
"0.67809707",
"0.6654582",
"0.66160077",
"0.6563948",
"0.65583605",
"0.65180856",
"0.64999896",
"0.6411996",
"0.64053833",
"0.6375456",
"0.63367605",
"0.6329757",
"0.6321867",
"0.63005424",
"0.62866426",
"0.62822247",
"0.62593645",
"0.62553316",
"0.6249246",
"0.6234223",
"0.62333465",
"0.62333155",
"0.62329775",
"0.6227285",
"0.6217149",
"0.6215566",
"0.61947685",
"0.61923987",
"0.61881876",
"0.6187039",
"0.6173815",
"0.61609864",
"0.6155421",
"0.6151603",
"0.61506164",
"0.6150356",
"0.6142276",
"0.6136579",
"0.6136498",
"0.6125148",
"0.6123771",
"0.6120968",
"0.6118949",
"0.6115587",
"0.6114631",
"0.6113013",
"0.6111982",
"0.610818",
"0.61029637",
"0.6100254",
"0.60999495",
"0.6097545",
"0.6088952",
"0.6084597",
"0.6084145",
"0.6084145",
"0.60807866",
"0.60801995",
"0.6078936",
"0.60768044",
"0.60768044",
"0.60768044",
"0.60618",
"0.6053029",
"0.6051295",
"0.6050675",
"0.6050026",
"0.6041018",
"0.6038226",
"0.6037426",
"0.60341865",
"0.60239196",
"0.6019371",
"0.60155416",
"0.60121405",
"0.6004105",
"0.6003367",
"0.6002347",
"0.6002347",
"0.59994644",
"0.5990464",
"0.5988244",
"0.5985266",
"0.5978114",
"0.59669083",
"0.59662396",
"0.5959886",
"0.59529626",
"0.59498686",
"0.5948327",
"0.594778",
"0.5947304",
"0.59438133",
"0.59432656",
"0.5935697",
"0.59292513",
"0.59274256",
"0.5924702"
] | 0.0 | -1 |
Enable the power of this fruit. | public abstract void fruitEffect(Player p); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void power()\r\n {\r\n powerOn = true;\r\n }",
"public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}",
"void powerOn();",
"public void setPower(boolean power){\n this.power = power;\n }",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"public void enable() {\n disabled = false;\n updateSign(true);\n circuit.enable();\n notifyChipEnabled();\n }",
"@Override\r\n\tpublic boolean powerOnOff() {\n\t\tif (power == true)\r\n\t\t{\r\n\t\t\tpower = false;\r\n\t\t}\r\n\t\telse if(power == false)\r\n\t\t{\r\n\t\t\tpower = true;\r\n\t\t}\r\n\t\treturn power;\r\n\t}",
"public void enable() {\r\n m_enabled = true;\r\n }",
"public void setPower(double power) {\n this.power = power;\n intake.set(power);\n }",
"@Override\n public void setPower(double power) {\n\n }",
"public void enable() {\n\t\tif (!permanent) {\n\t\t\tenabled = true;\n\t\t\trect.setColor(c);\n\t\t}\n\t}",
"public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}",
"public void enable(){\r\n\t\tthis.activ = true;\r\n\t}",
"public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}",
"void setGodPower(boolean b);",
"public void enable() {\n operating = true;\n }",
"@Override\n public void activate(boolean status) {\n godPower.activate(status);\n }",
"public void setPower(int power) {\n\t\t\r\n\t}",
"public abstract void PowerOn();",
"public void enable() {\n \t\t\tsetEnabled(true);\n \t\t}",
"public void enable();",
"@Override\r\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"ig tv power on\");\r\n\t}",
"@Override\n public void increaseStrength(int power) {\n this.damageStrength += power;\n }",
"@Override\n public void setPower(double power) {\n this.power = power;\n }",
"@Override\r\n\tpublic void enable() {\n\t\tcurrentState.enable();\r\n\t}",
"protected void enableActionSetMute()\n {\n Action action = new Action(\"SetMute\");\n action.addInputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateSetMute = new DoSetMute();\n enableAction(action, iDelegateSetMute);\n }",
"void useGodPower(boolean use);",
"public void enable() {\n\t\tm_enabled = true;\n\t\tm_controller.reset();\n\t}",
"public void setPower(double pow) {\n \tthis.powerIn = pow;\n }",
"public Builder setPower(float value) {\n bitField0_ |= 0x00000040;\n power_ = value;\n onChanged();\n return this;\n }",
"void setPowerBox(boolean powerBox);",
"public void activatePowerup(Powerup p)\r\n\t{\r\n\t\thasPowerup = true;\r\n\t\tcurrentPowerup = p;\r\n\t}",
"public boolean togglePower() {\r\n if(power) {\r\n pioneerclient.sendCommand(\"PF\");\r\n return false;\r\n } else {\r\n pioneerclient.sendCommand(\"PO\");\r\n return true;\r\n }\r\n\t}",
"public void setPower(int power) {\n \t\tthis.power = power;\n \t}",
"protected void enableActionMute()\n {\n Action action = new Action(\"Mute\");\n action.addOutputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateMute = new DoMute();\n enableAction(action, iDelegateMute);\n }",
"public void enableMic(boolean enable);",
"@Override\n\tpublic void onEnable() {\n\t\tSystem.out.println(\"Modus: Forcedown\");\n\t\tArduinoInstruction.getInst().enable();\n\t\tArduinoInstruction.getInst().setControl((byte)0x40);\n\t}",
"public void setPower(int power) {\n\t\tthis.power = power;\n\t}",
"public boolean canRequestPower();",
"@Override\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"samsongTV powerOn\");\n\n\t}",
"public void enable() {\n\t\tenabled = true;\n\t\t//System.out.println(\"Enabled Controller\");\n\t}",
"public void setPower(Float power) {\n this.power = power;\n }",
"void enableMod();",
"public void enable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Brake);\n }",
"@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}",
"public void setPowerState(boolean power) {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE, 0);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t\teditor.putBoolean(TOGGLE_KEY, power);\n\t\teditor.commit();\n\t}",
"@Override\r\n\tpublic void power() {\n\t\tSystem.out.println(\"Power off\");\r\n\t\t\r\n\t}",
"public void superCOPower(){\r\n SCOP = true;\r\n }",
"@Override\n public void powerOn() {\n if(isOn)System.out.println(\"The Projector is already ON!\");\n else{\n System.out.println(\"The Projector is now ON!\");\n isOn = true;\n }\n }",
"public boolean getPower(){\n return power;\n }",
"public void enablePropertyMute()\n {\n iPropertyMute = new PropertyBool(new ParameterBool(\"Mute\"));\n addProperty(iPropertyMute);\n }",
"protected abstract void enable();",
"void enable();",
"public void powerOn() \n\t{\n\t\t//put active to true\n\t\tactive = true;\n\t\t\n\t\t// Set attached lever\n\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\tsetActivationLever(true);\n\t\t}\n\t\t\n\t\t//lots of code to make the furnace light up, without loosing contents.\n\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tbyte data = furnace.getData().getData();\n\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\tfurnace.getInventory().clear();\n\t\tfactoryPowerSourceLocation.getBlock().setType(Material.BURNING_FURNACE);\n\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tfurnace.setRawData(data);\n\t\tfurnace.update();\n\t\tfurnace.getInventory().setContents(oldContents);\n\t\t//reset the production timer\n\t\tcurrentProductionTimer = 0;\n\t}",
"public void toggleEnable();",
"public abstract void onEnable();",
"@Override\n public void activatePowerUp() {\n myGame.getStatusDisplay().getMyProgress().updateScoreMultiplier(SCORE_MULTIPLIED_COUNTER);\n }",
"protected void enableActionUnityGain()\n {\n Action action = new Action(\"UnityGain\");\n action.addOutputParameter(new ParameterRelated(\"Value\", iPropertyUnityGain));\n iDelegateUnityGain = new DoUnityGain();\n enableAction(action, iDelegateUnityGain);\n }",
"public void setPower(int i)\n {\n this.powerOfIi = i;\n }",
"public void enable()\n\t{\n\t\tplayButton.setEnabled(true);\n\t\tpassButton.setEnabled(true);\n\t\tbigTwoPanel.setEnabled(true);\n\t}",
"public void activateShield() {\n shield.activate();\n }",
"public void enablePropertyUnityGain()\n {\n iPropertyUnityGain = new PropertyBool(new ParameterBool(\"UnityGain\"));\n addProperty(iPropertyUnityGain);\n }",
"protected void enableActionSetVolume()\n {\n Action action = new Action(\"SetVolume\");\n action.addInputParameter(new ParameterRelated(\"Value\", iPropertyVolume));\n iDelegateSetVolume = new DoSetVolume();\n enableAction(action, iDelegateSetVolume);\n }",
"public void onEnable() {\n }",
"void enable(final Op op);",
"@Override\r\n public void start() {\r\n runtime.reset();\r\n FL.setPower(1);\r\n FR.setPower(1);\r\n BR.setPower(1);\r\n BL.setPower(1);\r\n try{\r\n Thread.sleep(850);\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); \r\n }",
"public void setInputPower(int power) {\n this.inputPower = power;\n }",
"EDataType getActivePower();",
"void enableDigital();",
"static final void setRadioPower(boolean enabled) {\n for (Phone phone : PhoneFactory.getPhones()) {\n phone.setRadioPower(enabled);\n }\n }",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public static void setPower(double power) {\n\t\tsetLeftPower(power);\n\t\tsetRightPower(power);\n\t}",
"private void power(){\n this.powerX = realX * radius;\n this.powerY = realY * radius;\n }",
"public void enableFlyingMode()\n\t{\n\t\tthis.player.useFlyingMode = true;\n\t\tif(this.player.healthIn < 100)\n\t\t{\n\t\t\tthis.player.healthIn = 100;\n\t\t}\n\t}",
"public static void enableSound() {\n\t\tvelocity = 127;\n\t}",
"public void enable() {\n\t\tm_controller.reset();\n\t\tm_runner.enable();\n\t}",
"public ABLPower Power() {\r\n\t\treturn new ABLPower(BrickFinder.getDefault().getPower());\r\n\t}",
"public void enable() {\n canvas.setEnabled(true);\n addListeners();\n runViaListener();\n canvas.repaint();\n }",
"void enableAnalog(double minPressurePSI, double maxPressurePSI);",
"public void setChannelTxPower(PowerLevel power){\n this.level = power;\n \n }",
"public void enableSound() {\n soundToggle = true;\n }",
"public void setPwrreserve( java.lang.Boolean newValue ) {\n __setCache(\"pwrreserve\", newValue);\n }",
"public void switchPowerLevel()\n {\n // If power level is 1, set this.powerLevel to 3 - 1 = 2.\n // If power level is 2, set this.powerLevel to 3 - 2 = 1.\n this.powerLevel = (3 - this.powerLevel);\n }",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public void manualControl(double power){\n leftMotor.set(power);\n rightMotor.set(power);\n }",
"void setEnable(boolean b) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public boolean setEnabled(boolean enable);",
"@Override\n public void setMotorPower(double power)\n {\n final String funcName = \"setMotorPower\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", power);\n }\n\n if (power != currPower)\n {\n motor.set(power);\n currPower = power;\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", power);\n }\n }",
"public Builder clearPower() {\n bitField0_ = (bitField0_ & ~0x00000040);\n power_ = 0F;\n onChanged();\n return this;\n }",
"public void enableMonsters(){\n enabled = true;\n }",
"void enablePWM(double initialDutyCycle);",
"public void setPower(int value) {\n powerValue.setText(String.format(powerFormat, value));\n }",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"protected void enableActionVolumeInc()\n {\n Action action = new Action(\"VolumeInc\");\n iDelegateVolumeInc = new DoVolumeInc();\n enableAction(action, iDelegateVolumeInc);\n }",
"public void enable(){\n if(criticalStop) return;\n getModel().setStatus(true);\n }",
"public void setPowerUp(object_type powerUp) {\n this.powerUp = powerUp;\n }",
"float getPower();",
"public void Power() {\n if (Estado == false){\r\n Estado = true;\r\n } else if (Estado == true){\r\n Estado = false;\r\n }\r\n }",
"default void onEnable() {}",
"public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }"
] | [
"0.77505857",
"0.7676064",
"0.7099215",
"0.6952092",
"0.69520426",
"0.6916672",
"0.6873407",
"0.6803264",
"0.67071426",
"0.6685622",
"0.6620773",
"0.6616989",
"0.6604189",
"0.65969074",
"0.6583271",
"0.65554607",
"0.65470666",
"0.65442604",
"0.6525263",
"0.65181947",
"0.6451568",
"0.64512086",
"0.64254946",
"0.6421412",
"0.64101154",
"0.6381638",
"0.63160497",
"0.63107324",
"0.6310692",
"0.63104284",
"0.6304076",
"0.6295155",
"0.6294545",
"0.6276168",
"0.6238969",
"0.62145805",
"0.619617",
"0.6184764",
"0.61493516",
"0.6143699",
"0.61383355",
"0.61302006",
"0.6110555",
"0.6108218",
"0.61066717",
"0.6105138",
"0.60927206",
"0.6084073",
"0.6079382",
"0.6075841",
"0.6069883",
"0.6068274",
"0.60542446",
"0.6044322",
"0.6031424",
"0.60310006",
"0.5997036",
"0.59860283",
"0.59850645",
"0.59672266",
"0.59462166",
"0.5945465",
"0.59402543",
"0.5939976",
"0.5920395",
"0.5901124",
"0.5883595",
"0.58774495",
"0.58629084",
"0.58510464",
"0.5850315",
"0.58467394",
"0.58360183",
"0.5813513",
"0.5812631",
"0.5787379",
"0.57776487",
"0.5776488",
"0.5775065",
"0.57661813",
"0.5763551",
"0.576279",
"0.5756621",
"0.5756599",
"0.5738595",
"0.5738035",
"0.57372713",
"0.57361215",
"0.5730818",
"0.57294077",
"0.57276535",
"0.57229316",
"0.57058203",
"0.57054496",
"0.5695158",
"0.56943876",
"0.5694199",
"0.5692288",
"0.5684431",
"0.56750786",
"0.5674904"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean clearExpired(Date date) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void clear() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void addCookie(Cookie cookie) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
$FF: synthetic method $FF: bridge method | protected Builder stateBuilder() {
return this.stateBuilder();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }",
"public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }",
"public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }",
"public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }",
"public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }",
"public /* bridge */ /* synthetic */ void mo55095b() {\n super.mo55095b();\n }",
"@Override\n protected void prot() {\n }",
"@Override\n public void b() {\n }",
"public abstract void mo70713b();",
"public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void b2() {\n\t\t\n\t}",
"public abstract void mo27386d();",
"@Override\r\n\tpublic void cast() {\n\r\n\t}",
"public abstract void mo42329d();",
"public abstract Object mo1185b();",
"public abstract void mo42331g();",
"@Override\n\tpublic void b1() {\n\t\t\n\t}",
"public abstract void mo6549b();",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"StackManipulation virtual(TypeDescription invocationTarget);",
"public abstract void mo35054b();",
"@Override\n\tpublic void b() {\n\n\t}",
"public String visit(MessageSend n, MethodType argu) {\r\n\r\n //argu.SetTransferedArg();\r\n String temp1 = n.f0.accept(this, argu);\r\n this.callCounter++;\r\n String classType = this.callMap.get(callCounter);\r\n //String classType = argu.getThisType();\r\n //argu.CleanTransferedArg();\r\n //System.out.println(classType);\r\n\r\n n.f2.accept(this, argu);\r\n Integer vtableOffset = methodOffsets.get(classType + \".\" + n.f2.f0.toString())/8;\r\n\r\n emit(\"; \" + classType + \".\" + n.f2.f0.toString() + \" \" + \": \" + vtableOffset.toString() + \"\\n\");\r\n String temp2 = newTemp();\r\n emit(temp2 + \" = bitcast \" + temp1 + \" to i8***\\n\");\r\n String temp3 = newTemp();\r\n emit(temp3 + \" = load i8**, i8*** \" + temp2 + \"\\n\");\r\n String temp4 = newTemp();\r\n String temp5 = newTemp();\r\n String temp6 = newTemp();\r\n String temp7 = newTemp();\r\n emit(temp4 + \" = getelementptr i8*, i8** \" + temp3 + \", i32 \" + vtableOffset + \"\\n\");\r\n emit(temp5 + \"= load i8*, i8** \" + temp4 + \"\\n\");\r\n\r\n\r\n emit(temp6 + \" = bitcast i8* \" + temp5 + \" to \" + typeConverter(symbolTable.classes.get(classType).methods.get(n.f2.f0.toString()).returnType) + \" (i8*\");\r\n for(String arg : symbolTable.classes.get(classType).methods.get(n.f2.f0.toString()).arguments.keySet()){\r\n emit(\", \" + typeConverter(symbolTable.classes.get(classType).methods.get(n.f2.f0.toString()).arguments.get(arg)[0]));\r\n }\r\n emit(\")*\\n\");\r\n\r\n n.f4.accept(this, argu);\r\n\r\n emit(temp7 + \" = call \" + typeConverter(symbolTable.classes.get(classType).methods.get(n.f2.f0.toString()).returnType) + \" \" + temp6 + \"(\" + temp1);\r\n for(String arg : argu.tempCallArgumentsCodeG.values()){\r\n emit(\", \" + arg);\r\n }\r\n\r\n\r\n argu.tempCallArgumentsCodeG.clear();\r\n /*\r\n %_4 = bitcast i8* %_3 to i8***\r\n %_5 = load i8**, i8*** %_4\r\n %_6 = getelementptr i8*, i8** %_5, i32 0\r\n %_7 = load i8*, i8** %_6\r\n %_8 = bitcast i8* %_7 to i1 (i8*,i32)*\r\n\t %_9 = call i1 %_8(i8* %_3, i32 16)\r\n */\r\n\r\n emit(\")\\n\");\r\n\r\n return typeConverter(symbolTable.classes.get(classType).methods.get(n.f2.f0.toString()).returnType) + \" \" + temp7;\r\n }",
"public abstract void mo27464a();",
"public abstract void mo1184a(Object obj);",
"public abstract void mo45765b();",
"public abstract void mo27385c();",
"@Override\n\tpublic void A() {\n\t\t\n\t}",
"@Override\n\tpublic void A() {\n\t\t\n\t}",
"public BridgeEntity onBridge();",
"public abstract Object mo26777y();",
"public /* bridge */ /* synthetic */ java.lang.Object run() throws java.lang.Exception {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.1.run():java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.1.run():java.lang.Object\");\n }",
"interface G1 {\n default int foo (){ // should be intercepted by peer\n System.out.println(\"this is bytecode G1.foo()\");\n return -1;\n }\n }",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"public abstract BoundType b();",
"private VerbBridge() {\r\n\t\tvB = null;\r\n\t}",
"AnonymousClass2(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.2.<init>(android.telecom.ConnectionServiceAdapterServant):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.<init>(android.telecom.ConnectionServiceAdapterServant):void\");\n }",
"@Override\n\tpublic void dosomething2() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"@Override\n\tpublic void realFun() {\n\n\t}",
"AnonymousClass1(java.security.Signer r1, java.security.PublicKey r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: java.security.Signer.1.<init>(java.security.Signer, java.security.PublicKey):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.1.<init>(java.security.Signer, java.security.PublicKey):void\");\n }",
"public abstract void mo42330e();",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"public void method_192() {}",
"@Override\n\t\t\t\t\tpublic Method handleSimpleMethod(Element parent, FMethod src) {\n\t\t\t\t\t\treturn super.handleSimpleMethod(parent, src);\n\t\t\t\t\t}",
"public interface C11922a {\n void bvR();\n }",
"StackManipulation special(TypeDescription invocationTarget);",
"public OntoBridge()\r\n\t{ \r\n\t}",
"public abstract void m15813a();",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"BOpMethod createBOpMethod();",
"public abstract BoundType a();",
"@Override\n\tpublic void i2() {\n\t\t\n\t}",
"public abstract java.lang.Object a ( ) {\n/* .annotation system Ldalvik/annotation/Signature; */\n/* value = { */\n/* \"()TT;\" */\n/* } */\n}",
"public /* bridge */ /* synthetic */ void mo22960b(C7059Ec ec, Object obj) {\n super.mo22960b(ec, obj);\n }",
"@Override\n\t\t\t\t\tpublic Method handleBroadcastMethod(Element parent,\n\t\t\t\t\t\t\tFBroadcast src) {\n\t\t\t\t\t\treturn super.handleBroadcastMethod(parent, src);\n\t\t\t\t\t}",
"@Override\n\tpublic void bbb() {\n\t\t\n\t}",
"public abstract void mo30696a();",
"public abstract void mo102899a();",
"public static native void OpenMM_AmoebaVdwForce_setNonbondedMethod(PointerByReference target, int method);",
"public void mo115190b() {\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"static /* synthetic */ android.os.Handler m19-get1(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.-get1(android.telecom.ConnectionServiceAdapterServant):android.os.Handler, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.-get1(android.telecom.ConnectionServiceAdapterServant):android.os.Handler\");\n }",
"public static native int OpenMM_AmoebaVdwForce_getNonbondedMethod(PointerByReference target);",
"@Override\n\tpublic void some() {\n\t\t\n\t}",
"AnonymousClass1(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.1.<init>(android.telecom.ConnectionServiceAdapterServant):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.1.<init>(android.telecom.ConnectionServiceAdapterServant):void\");\n }",
"public interface C26438t {\n /* renamed from: b */\n void mo5959b(boolean z, String str, Bundle bundle);\n}",
"@Override\n\tpublic void jugar() {}",
"public abstract void mo53562a(C18796a c18796a);",
"@Override\n\tvoid hi() {\n\t}",
"public abstract Object mo1771a();",
"void mo57277b();",
"protected void h() {}",
"void mo2508a(bxb bxb);",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"abstract protected void brew();",
"public void startMethod (Symbol methodName, java.lang.Object[] args) throws G2AccessException;",
"interface C0868a {\n /* renamed from: a */\n void mo3207a(Object obj);\n\n /* renamed from: a */\n void mo3208a(String str, Bundle bundle);\n\n /* renamed from: a */\n void mo3209a(String str, Bundle bundle, ResultReceiver resultReceiver);\n\n /* renamed from: a */\n boolean mo3210a(Intent intent);\n }",
"public void foo() {\r\n\t}",
"@Override\r\n\tpublic void PrimitiveOperation2() {\n\t\tSystem.out.println(\"Concrete class B method 2 implemation\");\r\n\t}",
"@Override\n\tpublic void driving() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public abstract boolean isSynthetic();",
"public void mo9137b() {\n }",
"private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }",
"public abstract void mo957b();",
"@Override\n\tpublic void bidfunction() {\n\t\t\n\t}",
"@Override\n\tpublic void bidfunction() {\n\t\t\n\t}",
"public interface C11859a {\n void bvs();\n }",
"@Override\n public void visit(MethodDeclaration decl, Void arg){\n super.visit(decl, arg);\n handleDecl(decl);\n }",
"void mo80455b();",
"public void b() {\r\n }",
"public abstract void mh();",
"public void mo21825b() {\n }"
] | [
"0.70239085",
"0.69449884",
"0.67939746",
"0.67468184",
"0.66852564",
"0.6616999",
"0.6549216",
"0.6361095",
"0.6357293",
"0.6271952",
"0.626287",
"0.6234042",
"0.6226184",
"0.6199034",
"0.61939824",
"0.6191965",
"0.6169066",
"0.61571693",
"0.6151426",
"0.61232054",
"0.6117521",
"0.6117521",
"0.6117521",
"0.6100529",
"0.6095799",
"0.60750955",
"0.607317",
"0.6064073",
"0.60156",
"0.5997623",
"0.5976838",
"0.59707946",
"0.59707946",
"0.5969186",
"0.5957947",
"0.59559894",
"0.59552455",
"0.5951936",
"0.59377164",
"0.59198946",
"0.5884838",
"0.58811826",
"0.5871306",
"0.5862106",
"0.5860481",
"0.58564615",
"0.58546335",
"0.58362526",
"0.5821988",
"0.58168215",
"0.58124226",
"0.5810022",
"0.58003086",
"0.5791557",
"0.5780263",
"0.5773644",
"0.5773644",
"0.5766442",
"0.57555616",
"0.57486326",
"0.5740381",
"0.5738856",
"0.57286257",
"0.57284206",
"0.57282376",
"0.5726897",
"0.57261574",
"0.57232004",
"0.5721918",
"0.5718069",
"0.5711796",
"0.5709696",
"0.57088226",
"0.57078713",
"0.5707649",
"0.57069623",
"0.5702163",
"0.57014406",
"0.56901556",
"0.5685038",
"0.56844056",
"0.5680065",
"0.5677523",
"0.5671653",
"0.5670491",
"0.5669588",
"0.5668117",
"0.5668105",
"0.5668105",
"0.5659452",
"0.5657598",
"0.56522596",
"0.5644907",
"0.564108",
"0.564108",
"0.5638539",
"0.56360805",
"0.5625099",
"0.562385",
"0.56224257",
"0.5617642"
] | 0.0 | -1 |
ASYNC WRITE Writes b.length bytes of body from the specified byte array to the output stream. | @Override
public void send(byte[] bytes) throws IOException {
Throwable cause = error.get();
if (cause != null) {
if (cause instanceof IOException) {
throw (IOException) cause;
}
throw new IOException(cause);
}
if (bytes != null && bytes.length > 0) {
addToQueueAndSend(bytes);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void write(byte b[]) throws IOException;",
"public abstract void write(byte[] b);",
"private void writeBuffer( byte b[], int offset, int length) throws IOException\r\n\t{\r\n\t\t// Write the chunk length as a hex number.\r\n\t\tfinal String size = Integer.toHexString(length);\r\n\t\tthis.out.write(size.getBytes());\r\n\t\t// Write a CRLF.\r\n\t\tthis.out.write( CR );\r\n\t\tthis.out.write( LF );\r\n\t\t// Write the data.\r\n\t\tif (length != 0 )\r\n\t\t\tthis.out.write(b, offset, length);\r\n\t\t// Write a CRLF.\r\n\t\tthis.out.write( CR );\r\n\t\tthis.out.write( LF );\r\n\t\t// And flush the real stream.\r\n\t\tthis.out.flush();\r\n\t}",
"void write(byte b[]) throws IOException;",
"public abstract void writeBytes(byte[] b, int offset, int length) throws IOException;",
"public void write(byte b[], int off, int len) throws IOException;",
"public void write(byte b[]) throws IOException\n {\n checkThreshold(b.length);\n getStream().write(b);\n written += b.length;\n }",
"@Override\r\n\tpublic synchronized void write(byte[] b, int off, int len)\r\n\t{\r\n\t}",
"public void write(byte[] b) throws IOException {\n\t\tbaos.writeBytes(b);\n\t}",
"public void writeBytes(byte[] b, int length) throws IOException {\n\t\twriteBytes(b, 0, length);\n\t}",
"public void asyncWrite(Object requestCtxt, byte[] data, int length, TrcEvent event, TrcNotifier.Receiver handler)\n {\n asyncWrite(requestCtxt, -1, data, length, event, handler);\n }",
"void write(byte[] buffer, int bufferOffset, int length) throws IOException;",
"public void write(byte b[]) throws IOException {\n baos.write(b, 0, b.length);\n }",
"@Override\r\n public synchronized void write(byte b[], int off, int len ) throws IOException {\r\n \tint avail = buf.length - count;\r\n\r\n \tif ( len <= avail ) {\r\n \t\tSystem.arraycopy( b, off, buf, count, len );\r\n \t\tcount += len;\r\n \t\treturn; // Over step to do flush()\r\n\t } else if ( len > avail ) {\r\n\t \tSystem.arraycopy( b, off, buf, count, avail);\r\n\t \tcount += avail;\r\n\t \tflush();\r\n\t \tSystem.arraycopy( b, avail, b, 0, (len-avail));\r\n\t \twrite(b, 0, (len-avail));\r\n\t } else {\r\n\t \twriteBuffer(b, off, len);\r\n\t }\r\n\t}",
"public void write(final byte[] b) throws IOException {\n\t\twrite(b, 0, b.length);\n\t}",
"public void writeBytes(byte[] b) throws IOException {\n\t\tbaos.writeBytes(b);\n\t}",
"public void write(byte[] buffer);",
"public void write(byte[] b, int offset, int len) throws IOException {\n if (pos + len < BUFFER_SIZE) {\n System.arraycopy(b, offset, buffer, pos, len);\n pos += len;\n } else {\n flush();\n if (len < BUFFER_SIZE) {\n System.arraycopy(b, offset, buffer, 0, len);\n } else {\n ConsoleRedirect.this.flush(b, offset, len);\n }\n }\n }",
"public void asyncWrite(\n Object requestId, int address, byte[] data, int length, TrcEvent completionEvent,\n TrcNotifier.Receiver completionHandler)\n {\n final String funcName = \"asyncWrite\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"ctxt=%s,addr=%d,data=%s,length=%d,event=%s\",\n requestId == null? \"null\": requestId, address, Arrays.toString(data), length, completionEvent);\n }\n\n if (requestQueue != null)\n {\n Request request = new Request(requestId, false, address, data, length, completionEvent, completionHandler);\n requestQueue.add(request, this::requestHandler, false);\n }\n else\n {\n throw new UnsupportedOperationException(\"asyncWrite is not support without a request queue.\");\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n }",
"public void sendBodyByte(byte[] content) throws IOException {\n this.out.write(content);\n }",
"public int syncWrite(int address, byte[] data, int length)\n {\n final String funcName = \"syncWrite\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"addr=%d,data=%s,length=%d\",\n address, Arrays.toString(data), length);\n }\n\n if (!isEnabled())\n {\n throw new RuntimeException(\"Must call setEnabled first.\");\n }\n\n int bytesWritten = 0;\n if (requestQueue != null)\n {\n TrcEvent completionEvent = new TrcEvent(instanceName + \".\" + funcName);\n Request request = new Request(null, false, address, data, length, completionEvent, null);\n TrcRequestQueue<Request>.RequestEntry entry = requestQueue.add(request, this::requestHandler, false);\n\n while (!completionEvent.isSignaled())\n {\n Thread.yield();\n }\n\n if (!entry.isCanceled())\n {\n bytesWritten = request.length;\n }\n }\n else\n {\n bytesWritten = writeData(address, data, length);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%d\", bytesWritten);\n }\n\n return bytesWritten;\n }",
"public void write(byte[] b, int off, int len) {\n\t\tbaos.write(b, off, len);\n\t}",
"public void write(byte b[], int off, int len) throws IOException\n\t{\n\t\tout.write(b, off, len);\n\t\tmd5.update(b, off, len);\n\t}",
"public void write(byte b[], int off, int len) throws IOException {\n baos.write(b, off, len);\n }",
"public synchronized void write(byte b[], int off, int len) {\n \tif ((off < 0) || (off > b.length) || (len < 0) ||\n \t\t\t((off + len) > b.length) || ((off + len) < 0)) {\n \t\tthrow new IndexOutOfBoundsException();\n \t} else if (len == 0) {\n \t\treturn;\n \t}\n \tif (enableClip) {\n \t\tdoClipWrite(b, off, len);\n \t} else {\n \t\twriteDirectly(b, off, len);\n \t}\n \t\n }",
"void writeBytes(byte[] value);",
"public void write(byte b[], int off, int len) \r\n {\r\n \tif ((off < 0) || (off > b.length) || (len < 0) ||\r\n ((off + len) > b.length) || ((off + len) < 0)) \r\n \t{\r\n \t\tthrow new IndexOutOfBoundsException();\r\n \t} \r\n \telse if (len == 0) \r\n \t{\r\n \t\treturn;\r\n \t}\r\n int newcount = count + len;\r\n if (newcount > buf.length) \r\n {\r\n byte newbuf[] = new byte[Math.max(buf.length << 1, newcount)];\r\n System.arraycopy(buf, 0, newbuf, 0, count);\r\n buf = newbuf;\r\n }\r\n System.arraycopy(b, off, buf, count, len);\r\n count = newcount;\r\n }",
"@Override\n\tpublic int write( byte [] buffer, int offset, int length ) {\n\t\tByteBuffer out = getOutputBuffer();\n\t\tif( out.limit() <= 0 ) {\n\t\t\tout.limit( out.capacity() );\n\t\t}\n\t\tsynchronized( out ) {\n\t\t\tout.put( buffer, offset, length );\n\t\t}\n\t\tdispatcher.requestWrite( this );\n\t\treturn length;\n\t}",
"void writeByteArray(ByteArray array);",
"private void sendBody(OutputStream outputStream, long pending) throws IOException {\n\t\t\tlong BUFFER_SIZE = 16 * 1024;\n\t\t\tbyte[] buff = new byte[(int) BUFFER_SIZE];\n\t\t\tboolean sendEverything = pending == -1;\n\t\t\twhile (pending > 0 || sendEverything) {\n\t\t\t\tlong bytesToRead = sendEverything ? BUFFER_SIZE : Math.min(pending, BUFFER_SIZE);\n\t\t\t\tint read = this.data.read(buff, 0, (int) bytesToRead);\n\t\t\t\tif (read <= 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toutputStream.write(buff, 0, read);\n\t\t\t\tif (!sendEverything) {\n\t\t\t\t\tpending -= read;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void write(byte b[], int off, int len) throws IOException\n {\n checkThreshold(len);\n getStream().write(b, off, len);\n written += len;\n }",
"@Field(1) \n\tpublic GOutputStreamClass write_async(Pointer<GOutputStreamClass.write_async_callback > write_async) {\n\t\tthis.io.setPointerField(this, 1, write_async);\n\t\treturn this;\n\t}",
"public void write(byte[] data, long offset);",
"@Override\n public void write (byte[] b) throws IOException {\n byte currByte = b[b[0] + 1];\n int counter = 0;\n for (int i = 0; i < b[0] + 1; i++) {\n out.write(b[i]);\n }\n for (int i = b[0] + 1; i < b.length; i++) {\n if (currByte == 0 && b[i] == 1 || currByte == 1 && b[i] == 0) {\n if (counter <= 255) {\n out.write((byte) counter);\n } else {\n OutOfByteSize(counter);\n }\n counter = 1;\n currByte = b[i];\n } else {\n counter++;\n }\n }\n\n }",
"public void write(int b) throws IOException {\n baos.write(b);\n }",
"private synchronized void writeInternal(final byte[] data, int offset,\n int length) throws IOException {\n while (length > 0) {\n checkStreamState();\n final int availableBufferBytes = MAX_DATA_BYTES_PER_REQUEST\n - this.outBuffer.size();\n final int nextWrite = Math.min(availableBufferBytes, length);\n\n outBuffer.write(data, offset, nextWrite);\n offset += nextWrite;\n length -= nextWrite;\n\n if (outBuffer.size() > MAX_DATA_BYTES_PER_REQUEST) {\n throw new RuntimeException(\"Internal error: maximum write size \" +\n Integer.toString(MAX_DATA_BYTES_PER_REQUEST) + \"exceeded.\");\n }\n\n if (outBuffer.size() == MAX_DATA_BYTES_PER_REQUEST) {\n flushIOBuffers();\n }\n }\n }",
"@Override\n public void write(int b) {\n try {\n out.write(b);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public int syncWrite(byte[] data, int length)\n {\n return syncWrite(-1, data, length);\n }",
"public AsyncWrite(final PieceBlock block, final ByteBuffer b, final Transfer t) {\n super(t);\n assert b != null;\n assert block != null;\n assert t != null;\n boolean hasRemaining = b.hasRemaining();\n assert hasRemaining;\n this.block = block;\n buffer = b;\n }",
"public void write(byte[] b) throws IOException\n {\n for(int i = 0; i < 12; i++) // write the first 12 bytes to the OutPutStream [row, row, column, column, S(r), S(r), S(c), S(c), G(r), G(r), G(c), G(c), ..]\n {\n this.out.write(b[i]);\n }\n int counter = 0;\n String s = \"\";\n int lastIter = 7;\n for(int i = 12; i < b.length; i++)\n {\n s += b[i];\n counter++;\n if((counter == 7) || (i == b.length - 1))\n {\n if(i == b.length - 1)\n {\n lastIter = counter;\n }\n byte binaryByte = (byte)(int)Integer.valueOf(s, 2);\n this.out.write(binaryByte);\n counter = 0;\n s = \"\";\n }\n }\n this.out.write(lastIter);\n }",
"@Override\n public void write(byte[] buf, int offset, int size) throws IOException;",
"public int write(byte[] b, int off, int len)\n {\n synchronized (this) {\n if (!open) {\n return 0;\n }\n\n writing = true;\n started = true;\n reset = false;\n timeTracker.start();\n }\n line.start();\n int written = line.write(b, off, len);\n synchronized (this) {\n // drain() might be waiting, so we should wake it up.\n notifyAll();\n writing = false;\n\t\t\tif (!reset) {\n\t\t\t\ttotalWritten += written;\n\t\t\t} else if (reset && open) {\n\t\t\t\t// Flush what we just wrote to keep it reset.\n\t\t\t\tline.flush();\n\t\t\t}\n return written;\n }\n }",
"boolean write(byte[] data, int offset, int length, long time);",
"@Override\r\n\tpublic synchronized void write(int b)\r\n\t{\r\n\t}",
"@Override\n public void write(ByteBuffer b, int off, int len)\n throws IOException {\n byteBufferStreamOutput.write(b, off, len);\n }",
"public void write(byte[] b, int off, int len) throws IOException {\r\n try {\r\n os.write(b, off, len);\r\n } catch (IOException io) {\r\n if (!cbImpl.checkMobileNetwork()) {\r\n throw new WrapperIOException(new TransportException(io.getMessage(), io,\r\n TransportException.NO_NETWORK_COVERAGE));\r\n }\r\n throw io;\r\n }\r\n }",
"@Override\n public void write(final byte[] data, final int offset, final int length)\n throws IOException {\n if (offset < 0 || length < 0 || length > data.length - offset) {\n throw new IndexOutOfBoundsException();\n }\n\n writeInternal(data, offset, length);\n }",
"void write(ByteBuffer b, int off, int len) throws IOException;",
"@Override\r\n\t\t\tpublic void write(int b) throws IOException {\n\t\t\t}",
"public void closeAsync() throws IOException {\n if (anyAreSet(state, FLAG_CLOSED)) return;\n \n state |= FLAG_CLOSED;\n state &= ~FLAG_READY;\n if (allAreClear(state, FLAG_WRITE_STARTED) && channel == null) {\n if (buffer == null) {\n servletResponse.setHeader(Headers.CONTENT_LENGTH, \"0\");\n } else {\n servletResponse.setHeader(Headers.CONTENT_LENGTH, \"\" + buffer.position());\n }\n }\n if (channel == null) {\n channel = servletResponse.getExchange().getResponseChannel();\n }\n if (buffer != null) {\n if (!flushBufferAsync()) {\n resumeWrites();\n return;\n }\n }\n channel.shutdownWrites();\n state |= FLAG_DELEGATE_SHUTDOWN;\n if (!channel.flush()) {\n resumeWrites();\n }\n }",
"private void write( byte[] data) throws IOException {\n ByteBuffer buffer = ByteBuffer.wrap(data);\n\n int write = 0;\n // Keep trying to write until buffer is empty\n while(buffer.hasRemaining() && write != -1)\n {\n write = channel.write(buffer);\n }\n\n checkIfClosed(write); // check for error\n\n if(ProjectProperties.DEBUG_FULL){\n System.out.println(\"Data size: \" + data.length);\n }\n\n key.interestOps(SelectionKey.OP_READ);// make key read for reading again\n\n }",
"private int writeBytesMultiple(ChannelOutboundBuffer in, IovArray array) throws IOException {\n/* 311 */ long expectedWrittenBytes = array.size();\n/* 312 */ assert expectedWrittenBytes != 0L;\n/* 313 */ int cnt = array.count();\n/* 314 */ assert cnt != 0;\n/* */ \n/* 316 */ long localWrittenBytes = this.socket.writevAddresses(array.memoryAddress(0), cnt);\n/* 317 */ if (localWrittenBytes > 0L) {\n/* 318 */ adjustMaxBytesPerGatheringWrite(expectedWrittenBytes, localWrittenBytes, array.maxBytes());\n/* 319 */ in.removeBytes(localWrittenBytes);\n/* 320 */ return 1;\n/* */ } \n/* 322 */ return Integer.MAX_VALUE;\n/* */ }",
"@Override\n public void write(final byte[] data) throws IOException {\n write(data, 0, data.length);\n }",
"@Override\n public void write(byte[] data) throws IOException {\n for (int i = 0; i < data.length; i++) {\n write(data[i]);\n }\n }",
"@Override\n public void write(byte[] data, int off, int len) throws IOException {\n for (int i = off; i < len; i++) {\n write(data[i]);\n }\n }",
"public static native int write(int fd, byte[] data, int off, int len) throws IOException;",
"public void write(int b) \r\n {\r\n \tint newcount = count + 1;\r\n \tif (newcount > buf.length) \r\n \t{\r\n \t\tbyte newbuf[] = new byte[Math.max(buf.length << 1, newcount)];\r\n \t\tSystem.arraycopy(buf, 0, newbuf, 0, count);\r\n \t\tbuf = newbuf;\r\n \t}\r\n \tbuf[count] = (byte)b;\r\n \tcount = newcount;\r\n }",
"public abstract int writeData(int address, byte[] buffer, int length);",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n\n // Share the sent message with the UI activity.\n /*Message writtenMsg = handler.obtainMessage(\n MessageConstants.MESSAGE_WRITE, -1, -1, mmBuffer);\n writtenMsg.sendToTarget();*/\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when sending data\", e);\n\n // Send a failure message back to the activity.\n /*Message writeErrorMsg =\n handler.obtainMessage(MessageConstants.MESSAGE_TOAST);\n Bundle bundle = new Bundle();\n bundle.putString(\"toast\",\n \"Couldn't send data to the other device\");\n writeErrorMsg.setData(bundle);\n handler.sendMessage(writeErrorMsg);*/\n }\n }",
"void writeBytes(byte[] b, File f) throws Exception {\n \n ByteBuffer[] bb = splitByteArray(b);\n\n for (int i = 0; i < bb.length; ++i) {\n\n // WRITE NEXT PORTION OF BYTES VIA FOS:\n\n fos.write(bb[i].array()); \n\n ++i;\n\n // WRITE NEXT PORTION OF BYTES VIA CHANNEL:\n\n if (i < bb.length) {\n FileLock fl = outChannel.lock();\n outChannel.write(bb[i]);\n outChannel.force(false);\n fl.release();\n }\n }\n }",
"public void writeBinary(byte[] bytes) throws IOException {\n if (writeFrame(WebSocketMessage.OPCODE_BINARY, ByteBuffer.wrap(bytes),\n true, true) != bytes.length) {\n throw new IOException(\"IO error writing message\");\n }\n endWrite();\n }",
"@Override\n public void write(int i) throws IOException {\n if (pos == BUFFER_SIZE) {\n flush();\n }\n buffer[pos++] = (byte)i;\n }",
"public void writeData(byte[] b, int pos)\n throws IOException\n {\n Buffer buf;\n for (int i = 0; i < b.length; i++)\n {\n buf = getBufferByPosition(pos + i);\n buf.setByte(b[i], pos + i);\n }\n }",
"public void write(int b) throws IOException;",
"public void write(byte[] buffer) { //이건 보내주는거\n try {\n mmOutStream.write(buffer);\n\n // Disabled: Share the sent message back to the main thread\n mHandler.obtainMessage(MESSAGE_WRITE, -1, -1, buffer).sendToTarget(); //MH주석풀엇음 //what arg1, arg2 obj\n\n } catch (IOException e) {\n Log.e(TAG, \"Exception during write\");\n }\n }",
"public void streamWrite(byte[] buffer,int bufferOffset,int nrOfBytes) throws VlException\n {\n if (this instanceof VStreamWritable)\n {\n VStreamWritable wfile = (VStreamWritable) (this);\n OutputStream ostr = wfile.getOutputStream(); // do not append\n\n try\n {\n ostr.write(buffer, bufferOffset, nrOfBytes);\n ostr.flush(); \n ostr.close(); // Close between actions !\n }\n catch (IOException e)\n {\n throw new VlIOException(\"Failed to write to file:\" + this, e);\n }\n }\n else\n {\n throw new nl.uva.vlet.exception.NotImplementedException(\"File type does not support (remote) write access\");\n }\n }",
"public void write(byte buffer[],int nrOfBytes) throws VlException\n {\n write(0,buffer,0,nrOfBytes);\n }",
"public void writedata(byte b) throws Exception{\n ByteBuffer byteBuffer = ByteBuffer.wrap(\"hello\".getBytes(\"UTF-8\"));\n// byteBuffer.flip();\n client.write(byteBuffer);\n byteBuffer.clear();\n client.close();\n\n }",
"@Override\n\t\tpublic CompletableFuture<Void> write(byte[] buffer, long offset) {\n\t\t\t\n\t\t\tsynchronized(roleSwitcherThread) {\n\t\t\t\tif (!RockyController.role.equals(RockyControllerRoleType.Owner)) {\n\t\t\t\t\tSystem.err.println(\"ASSERT: write can be served only by the Owner\");\n\t\t\t\t\tSystem.err.println(\"currently, my role=\" + RockyController.role);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (debugPrintoutFlag) {\n\t\t\t\tSystem.out.println(\"write entered. buffer size=\" + buffer.length);\n\t\t\t\tSystem.out.println(\"offset=\" + offset);\n\t\t\t}\n\t\t\t\n\t\t\tlong firstBlock = offset / blockSize;\n\t\t\tint length = buffer.length;\n\t\t long lastBlock = 0;\n\t\t if (length % blockSize == 0) {\n\t\t \tlastBlock = (offset + length) / blockSize - 1;\n\t\t } else {\n\t\t \tlastBlock = (offset + length) / blockSize;\n\t\t }\n\t\t //long lastBlock = (offset + length) / blockSize;\n\t\t \n\t\t if (debugPrintoutFlag) {\n\t\t \tSystem.out.println(\"firstBlock=\" + firstBlock + \" lastBlock=\" + lastBlock + \" length=\" + length);\n\t\t }\n\t\t \t\n\t\t if (mutationSnapEvalFlag) {\n\t\t \tnumBlockWrites += (int) (lastBlock - firstBlock + 1);\n\t\t }\n\t\t \n//\t\t // we assume that buffer size to be blockSize when it is used\n//\t\t // as a block device properly. O.W. it can be smaller than that.\n//\t\t // To make it compatible with the original intention, when \n//\t\t // we get buffer smaller than blockSize, we increment the loastBlock\n//\t\t // by one.\n//\t\t if (firstBlock == lastBlock) {\n//\t\t \tlastBlock++; \n//\t\t }\n//\t\t for (int i = (int) firstBlock; i < (int) lastBlock; i++) {\n\t \tfor (int i = (int) firstBlock; i <= (int) lastBlock; i++) {\n\t \t\tif (debugPrintoutFlag) {\n\t \t\t\tSystem.out.println(\"setting dirtyBitmap for blockID=\" + i);\n\t \t\t}\n\t \t\tsynchronized(dirtyBitmap) {\n\t\t \t\tdirtyBitmap.set(i);\n\t\t \t}\n\t\t \tWriteRequest wr = new WriteRequest();\n\t\t \tint copySize = 0;\n\t\t \tif (i == lastBlock) {\n\t\t \t\tif (debugPrintoutFlag) {\n\t\t \t\t\tSystem.out.println(\"copySize first\");\n\t\t \t\t}\n\t\t \t\tint residual = buffer.length % blockSize;\n\t\t \t\tif (residual == 0) {\n\t\t \t\t\tcopySize = blockSize;\n\t\t \t\t} else {\n\t\t \t\t\tcopySize = residual;\n\t\t \t\t}\n\t\t \t} else {\n\t\t \t\tif (debugPrintoutFlag) {\n\t\t \t\t\tSystem.out.println(\"copySize second\");\n\t\t \t\t}\n\t\t \t\tcopySize = blockSize;\n\t\t \t}\n\t\t \tbyte[] copyBuf = new byte[copySize];\n\t\t \tif (debugPrintoutFlag) {\n\t\t \t\tSystem.out.println(\"copySize=\" + copySize);\n\t\t \t}\n\t\t \tint bufferStartOffset = (int) ((i - firstBlock) * blockSize);\n\t\t \tif (debugPrintoutFlag) {\n\t\t \t\tSystem.out.println(\"bufferStartOffset=\" + bufferStartOffset + \" i=\" + i + \" firstBlock=\" + firstBlock + \" blockSize=\" + blockSize);\n\t\t \t}\n\t\t \tSystem.arraycopy(buffer, (int) ((i - firstBlock) * blockSize), copyBuf, 0, copySize);\n\t\t \twr.buf = copyBuf;\n\t\t \t//wr.offset = offset;\n\t\t\t wr.offset = i * blockSize;\n\t\t\t try {\n\t\t\t \t//System.out.println(\"[RockyStorage] enqueuing WriteRequest for blockID=\" \n\t\t\t \t//\t\t+ ((int) wr.offset / blockSize));\n\t\t\t\t\tqueue.put(wr);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t\treturn super.write(buffer, offset);\n\t\t}",
"@Override\n public void write(byte[] buf) throws IOException;",
"public void write(byte[] bytes) {\n\t\t\ttry {\n\t\t\t\tmmOutStream.write(bytes);\n\t\t\t\tmmOutStream.flush();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"public void write(byte buffer[], int bufferOffset,int nrOfBytes) throws VlException\n {\n write(0,buffer,bufferOffset,nrOfBytes);\n }",
"public void write(byte[] buffer){\r\n\t\t\r\n\t\ttry{\r\n\t\t\toOutStream.write(buffer);\r\n\t\t}catch(IOException e){\r\n\t\t\tLog.e(TAG, \"exception during write\", e);\r\n\t\t}\r\n\t}",
"public void write(int b) throws IOException\n\t{\n\t\tout.write(b);\n\t\tmd5.update((byte) (b & 0xff));\n\t}",
"protected void write(byte[] bytes, int offset, int length) {\n/* 114 */ if (this.socket == null) {\n/* 115 */ if (this.connector != null && !this.immediateFail) {\n/* 116 */ this.connector.latch();\n/* */ }\n/* 118 */ if (this.socket == null) {\n/* 119 */ String msg = \"Error writing to \" + getName() + \" socket not available\";\n/* 120 */ throw new AppenderLoggingException(msg);\n/* */ } \n/* */ } \n/* 123 */ synchronized (this) {\n/* */ try {\n/* 125 */ getOutputStream().write(bytes, offset, length);\n/* 126 */ } catch (IOException ex) {\n/* 127 */ if (this.retry && this.connector == null) {\n/* 128 */ this.connector = new Reconnector(this);\n/* 129 */ this.connector.setDaemon(true);\n/* 130 */ this.connector.setPriority(1);\n/* 131 */ this.connector.start();\n/* */ } \n/* 133 */ String msg = \"Error writing to \" + getName();\n/* 134 */ throw new AppenderLoggingException(msg, ex);\n/* */ } \n/* */ } \n/* */ }",
"@Override\n\t\tpublic void write(byte[] buffer) throws IOException {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tout.write(buffer);\n\t\t\tamount+=buffer.length;\n\t\t\tthis.listener.AmountTransferred(amount);\n\t\t}",
"@Override\n public void write(byte[] b) throws IOException {\n byte lastByte = 0;\n int count = 0;\n List compressedBytes = new ArrayList();\n out.write(Arrays.copyOfRange(b, 0, metaData));\n for(int i=metaData; i < b.length; i++){\n if(b[i] == lastByte)\n count++;\n else{\n while(count>256){\n compressedBytes.add((byte)255);\n compressedBytes.add((byte)0);\n //out.write(255);\n //out.write(0);\n count = count - 255;\n }\n compressedBytes.add((byte)count);\n //out.write(count);\n count = 1;\n if (lastByte == 0)\n lastByte = 1;\n else\n lastByte = 0;\n }\n }\n compressedBytes.add((byte)count);\n //out.write(count);\n out.write(toByteArray(compressedBytes));\n\n System.out.println ((compressedBytes.size()/b.length)*100);\n }",
"public void write(byte[] buffer) {\n try {\n String bufferstring=\"a5550100a2\";\n // byte [] buffer03=new byte[]{(byte) 0xa5, Byte.parseByte(\"ffaa\"),0x01,0x00, (byte) 0xa2};\n byte buffer01[]=bufferstring.getBytes();\n byte [] buffer02=new byte[]{(byte) 0xa5,0x55,0x01,0x00, (byte) 0xa2};\n\n\n //for(int i=0;i<100000;i++) {\n mmOutStream.write(buffer);\n // Thread.sleep(1000);\n //}\n //\n //Share the sent message back to the UI Activity\n// mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)\n// .sendToTarget();\n } catch (Exception e) {\n Log.e(TAG, \"Exception during write\", e);\n }\n }",
"public static void write(byte[] buffer, long offset, long length , long value) {\n while(length-- > 0){\n buffer[(int) offset++] = (byte) (value & 0xFF);\n value >>=8;\n }\n }",
"private void writeBytes() {\n\t\tint needToWrite = rawBytes.length - bytesWritten;\n\t\tint actualWrit = line.write(rawBytes, bytesWritten, needToWrite);\n\t\t// if the total written is not equal to how much we needed to write\n\t\t// then we need to remember where we were so that we don't read more\n\t\t// until we finished writing our entire rawBytes array.\n\t\tif (actualWrit != needToWrite) {\n\t\t\tCCSoundIO.debug(\"writeBytes: wrote \" + actualWrit + \" of \" + needToWrite);\n\t\t\tshouldRead = false;\n\t\t\tbytesWritten += actualWrit;\n\t\t} else {\n\t\t\t// if it all got written, we should continue reading\n\t\t\t// and we reset our bytesWritten value.\n\t\t\tshouldRead = true;\n\t\t\tbytesWritten = 0;\n\t\t}\n\t}",
"public synchronized void write(final int b) throws IOException {\n\t\tthis.singleIntArray[0] = (byte) (0xFF & b);\n\t\twrite(singleIntArray, 0, 1);\n\t}",
"void flush(byte[] b, int off, int len) {\n if (len > 0) {\n synchronized (flushed) {\n flushed.append(new String(b, off, len));\n }\n }\n }",
"native int _writeSerialPort(int port, byte data[]);",
"public void write( int b ) throws IOException {\n\t\tthis.oneBuf[0] = (byte) b;\n\t\tthis.write( this.oneBuf, 0, 1 );\n\t\t}",
"public void body(OutputStream outputStream, ReliableDownloadOptions options) throws IOException {\n for (ByteBuf buffer : this.asyncResponse.body(options).toIterable()) {\n buffer.readBytes(outputStream, buffer.readableBytes());\n buffer.release();\n }\n }",
"public abstract void writeByte(byte b) throws IOException;",
"public void write(final byte[] data, final int offset, final int len) throws IOException {\n checkOpened();\n dos.write(data, offset, len);\n flush();\n }",
"public void write(int b) throws IOException\n {\n this.out.write(b); // write the byte b to the Stream\n }",
"void onBytesWritten(int bytesWritten);",
"void writeBody(ByteBuf bb, TranscoderContext context) throws Exception;",
"public static void writeArray(byte[] buffer, long offset, long length , byte [] name) {\n int i =0 ;\n while(length-- > 0){\n buffer[(int) offset++] = (byte) (name[i++] & 0xff);\n }\n }",
"public void WriteMessage(byte[] message)\r\n {\r\n try {\r\n out.write(new Integer(message.length).byteValue());\r\n out.write(message);\r\n out.flush();\r\n }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n }",
"public void write(int b) throws IOException {\n/* 54 */ this.appendable.append((char)b);\n/* */ }",
"@Override\n public void write(int b) throws IOException {\n if (b == ModbusASCIITransport.FRAME_START) {\n out.write(58);\n // System.out.println(\"Wrote FRAME_START\");\n return;\n } else if (b == ModbusASCIITransport.FRAME_END) {\n out.write(13);\n out.write(10);\n // System.out.println(\"Wrote FRAME_END\");\n return;\n } else {\n out.write(ModbusUtil.toHex(b));\n // System.out.println(\"Wrote byte \"+b+\"=\"+new String(ModbusUtil.toHex(b)));\n }\n }",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n } catch (IOException e) { }\n }",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n } catch (IOException e) { }\n }",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n } catch (IOException e) { }\n }",
"public static void m2854a(HttpURLConnection httpURLConnection, byte[] bArr) {\n httpURLConnection.setDoOutput(true);\n httpURLConnection.addRequestProperty(\"Content-Type\", AbstractC1628m.m2795d());\n DataOutputStream dataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream());\n dataOutputStream.write(bArr);\n dataOutputStream.close();\n }",
"default void sendBinary(byte[] data, int offset, int length) {\n ByteBuffer buffer = ByteBuffer.wrap(data, offset, length);\n sendBinary(buffer);\n }",
"protected abstract void writeToExternal(byte[] b, int off, int len) throws IOException;",
"public void write(byte[] out) {\n if (mSendProcessThread != null)\n mSendProcessThread.write(out);\n else\n Toast.makeText(this, \"send process thread null\", Toast.LENGTH_SHORT).show();\n }"
] | [
"0.6530948",
"0.6483616",
"0.6465961",
"0.6394175",
"0.63343894",
"0.62678623",
"0.6257888",
"0.6222747",
"0.61956114",
"0.61849797",
"0.6101022",
"0.6067039",
"0.6054528",
"0.5976364",
"0.5971469",
"0.5971147",
"0.59361416",
"0.5854895",
"0.5850498",
"0.58051956",
"0.57373184",
"0.57365197",
"0.5721254",
"0.56551695",
"0.56130856",
"0.5600035",
"0.55923176",
"0.55876404",
"0.5545808",
"0.55405295",
"0.5539474",
"0.55328876",
"0.5500067",
"0.5438229",
"0.5428693",
"0.54117894",
"0.54101914",
"0.5404981",
"0.53851396",
"0.5379033",
"0.5373397",
"0.5361238",
"0.53593206",
"0.53466845",
"0.5341971",
"0.53311163",
"0.53143567",
"0.53037184",
"0.52825874",
"0.5246795",
"0.5234844",
"0.5227929",
"0.5227853",
"0.5224774",
"0.52101743",
"0.5200772",
"0.520048",
"0.51986504",
"0.51675904",
"0.5162155",
"0.51354605",
"0.51340526",
"0.51322806",
"0.51232374",
"0.51070315",
"0.50953454",
"0.50933385",
"0.50906706",
"0.5085812",
"0.5083606",
"0.5080513",
"0.5071054",
"0.5064815",
"0.505523",
"0.5054397",
"0.50301516",
"0.5029905",
"0.50019807",
"0.49825478",
"0.49812722",
"0.49734035",
"0.49725223",
"0.4972175",
"0.49631548",
"0.4961459",
"0.49572268",
"0.4944366",
"0.49049473",
"0.49014372",
"0.48999694",
"0.48984715",
"0.48857063",
"0.48850238",
"0.48777848",
"0.48739251",
"0.48739251",
"0.48739251",
"0.48687884",
"0.48602605",
"0.48575577",
"0.4857453"
] | 0.0 | -1 |
END PROCESSING Completes the synchronous operation that was started on the request. | @Override
public boolean end() {
if (closed.compareAndSet(false, true)) {
addToQueueAndSend(new byte[0]);
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void processEnd();",
"public void finish() {\n if (!isFinishing) {\n performFnishWithRequest(true);\n }\n }",
"protected void endBatch() {\n \n }",
"<T> T endProcess(AsyncResult<T> asyncResult) throws ExecutionException, InterruptedException;",
"public void finishRequest ()\r\n\t{\r\n\t\tthis.simTime = this.sim.getTimer();\r\n\t\t//Debug/System.out.println(Fmt.time(this.simTime)\r\n\t\t//Debug/\t+ \": <finishRequest> \" + this.request);\r\n\r\n\t\t//\tRemove request from the queue.\r\n\t\tthis.removeRequest();\r\n\t\t//\tGet the next request from the queue.\r\n\t\tthis.nextRequest();\r\n\t\t//\tIf there is one, process it.\r\n\t\t//\tIf not, then the next request scheduled will begin immediately.\r\n\t\tif (this.request != null) this.procRequest();\r\n\t}",
"protected void onEndRequest()\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"public void finishedAllRequests() {\n hasMoreRequests = false;\n }",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"void requestFinish();",
"protected void finishExecution() {\r\n\r\n\t}",
"process finishService ();",
"public synchronized void abort() throws IOException {\n ensureOpen();\n // need check again .\n //\tif(isDone) {\n //\t throw new IOException(\"Operation has already ended\");\n //\t}\n\n //no compatible with sun-ri\n if ((isDone) && (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE)) {\n throw new IOException(\"Operation has already ended\");\n }\n\n exceptionMessage = \"Operation aborted\";\n if ((!isDone) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n isDone = true;\n /*\n * Since we are not sending any headers or returning any headers then\n * we just need to write and read the same bytes\n */\n parent.sendRequest(0xFF, null, replyHeaders, null);\n\n if (replyHeaders.responseCode != ResponseCodes.OBEX_HTTP_OK) {\n throw new IOException(\"Invalid response code from server\");\n }\n\n exceptionMessage = null;\n }\n\n close();\n }",
"public void finishTask() {\n\t\t\n\t}",
"@Override\n\tpublic void finish() throws DPFTRuntimeException {\n\t\tDPFTLogger.info(this, \"Updating Outbound Control Records...\");\n\t\tDPFTOutboundDboSet rSet = (DPFTOutboundDboSet) this.getPreviousAction().getResultSet();\n\t\tDPFTOutboundControlDboSet ctrlSet = rSet.getControlTableRecords(\"process_status='\" + GlobalConstants.DPFT_OBND_STAT_RUN + \"'\");\n\t\tctrlSet.taskComplete();\n\t\tctrlSet.close();\n\t\t\n\t\t//send Notification\n\t\tString cmp_code = ctrlSet.getDbo(0).getString(\"camp_code\");\n\t\tfor(String sf: success_ftp_files){\n\t\t\tObject[] params = {sf, this.getOutFileRemoteDir()};\n\t\t\tDPFTUtil.pushNotification(\n\t\t\t\t\tDPFTUtil.getCampaignOwnerEmail(cmp_code), \n\t\t\t\t\tnew DPFTMessage(\"CUSTOM\", \"TFB00011I\", params)\n\t\t\t);\n\t\t}\n\t\tsuccess_ftp_files.clear();\n\t}",
"public void batchProcessComplete() {\n System.out.print(\"Completed \" + entityCount + \" documents\");\n if (size > 0) {\n System.out.print(\"; \" + size + \" characters\");\n }\n System.out.println();\n long elapsedTime = System.currentTimeMillis() - mStartTime;\n System.out.println(\"Time Elapsed : \" + elapsedTime + \" ms \");\n }",
"public abstract HTTPResponse finish();",
"protected void end() {\n isFinished();\n }",
"protected void end() {\r\n }",
"protected void end() {\r\n }",
"protected void end() {\r\n }",
"protected void end() {\r\n }",
"protected void finished(){\n if (doFilterUpdate) {\n //runFilterUpdates();\n }\n \n double groupTotalTimeSecs = (System.currentTimeMillis() - (double) groupStartTime) / 1000;\n log.info(\"Job \"+id+\" finished \" /*+ parsedType*/ + \" after \"\n + groupTotalTimeSecs + \" seconds\");\n \n ((DistributedTileBreeder)breeder).jobDone(this);\n }",
"@Override\n public void finish() throws CrawlerException {\n processor.finish();\n }",
"public void formProcessingComplete()\r\n {\r\n return;\r\n }",
"void endTask();",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n \n \n }",
"protected void end()\n\t{\n\t}",
"public abstract void end();",
"@Override\n\tpublic void endSuccess() {\n\t\t\n\t}",
"protected void synchronizationDone() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"void completeJob();",
"protected abstract boolean end();",
"private void finishProcessing() {\n // Restore original system output streams\n System.setOut(origStdOut);\n System.setErr(origStdErr);\n // Print out each log to the output\n for (int i = 0; i < processingNodes.size; i++) {\n System.out.println(processingNodes.get(i).getLog());\n }\n processingNodes.clear();\n processedCount.set(0);\n processing = false;\n listener.onProcessingFinished();\n executorService.shutdown();\n }",
"public void end();",
"public void finish() {}",
"public void finish() throws IOException {\n\t\tthis.writeEOFRecord();\n\t\t}",
"@Override\n\tpublic void end() {\n\t\t// Empty on purpose, no cleanup required yet\n\t}",
"protected void finish() {\n }",
"protected void end() {\n\r\n\t}",
"protected void end()\n\t{\n\t\tstop();\n\t}",
"private void finishRequests(){\n\t\tpeer.getRequests().removeAll(finishedRequestsList);\n\t\tfinishedRequestsList.clear();\n\t}",
"public void finish() {\n Span span = GlobalTracer.get().activeSpan();\n if (this.tracingScope == null) {\n DDLogger.getLoggerImpl().debug(\"Unable to close tracing scope because it is null.\");\n } else {\n this.tracingScope.close();\n if (span != null) {\n span.finish();\n } else {\n DDLogger.getLoggerImpl().debug(\"Unable to finish span because it is null.\");\n }\n }\n if(this.shouldUseExtension) {\n Extension.flush();\n }\n }",
"public void end() throws Exception;",
"public static void closeStreamAndForceCompleteResponse() throws IOException {\n FacesContext fc = FacesContext.getCurrentInstance();\n ExternalContext ex = Faces.getExternalContext();\n ex.getResponseOutputStream().flush();\n ex.getResponseOutputStream().close();\n fc.responseComplete();\n }",
"public void complete() {\n\t}",
"public void finish() throws IOException;",
"synchronized public void requestDone(Request request, boolean isSuccessful)\n {\n runningRequest = null;\n runNextRequest();\n }",
"protected void end() {\n \t// theres nothing to end\n }",
"@Override\n\tpublic void stopProcessing() {\n\n\t}",
"@Override\n\tvoid endHandling() {\n\t}",
"@Override\n\tvoid endHandling() {\n\t}",
"@Override\n\tvoid endHandling() {\n\t}",
"@Override\n\tvoid endHandling() {\n\t}"
] | [
"0.64064616",
"0.6322815",
"0.6180766",
"0.61783445",
"0.6101751",
"0.6038043",
"0.6021864",
"0.6021864",
"0.6007029",
"0.6007029",
"0.6007029",
"0.59807736",
"0.59807736",
"0.59594756",
"0.59486645",
"0.59486645",
"0.59486645",
"0.59486645",
"0.59486645",
"0.5864537",
"0.5847034",
"0.58390933",
"0.5809397",
"0.58015037",
"0.5766269",
"0.57620823",
"0.5747294",
"0.56870025",
"0.56652236",
"0.56652236",
"0.56652236",
"0.56652236",
"0.56583405",
"0.5654909",
"0.5645679",
"0.5643826",
"0.563834",
"0.563834",
"0.563834",
"0.563834",
"0.563834",
"0.563834",
"0.5632624",
"0.5628184",
"0.56162715",
"0.5616215",
"0.5616177",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.5602072",
"0.56001264",
"0.5579512",
"0.5577582",
"0.55718285",
"0.5569563",
"0.556934",
"0.5565967",
"0.5563634",
"0.55587554",
"0.55393165",
"0.55187815",
"0.55128264",
"0.55104196",
"0.5509437",
"0.5506385",
"0.5502807",
"0.549277",
"0.54843134",
"0.54815936",
"0.5481148",
"0.5481148",
"0.5481148",
"0.5481148"
] | 0.0 | -1 |
/Tudo Referente aos emails vinculados | public String adcionarEmail() {
pessoa.adicionaEmail(email);
this.email = new Email();
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mailList() {\n for (int index = 0; index < emails.size(); index++) {\n Mensagem mensagem = emails.get(index);\n System.out.println(\"Email \" + index + \": \");\n System.out.println(\"De: \" + mensagem.remetente);\n System.out.println(\"Para: \" + mensagem.destinatario + \"\\n\");\n }\n }",
"String getUserMail();",
"private static List<String> getEmailList(){\n List<String> lista = new ArrayList<>();\n lista.add(\"[email protected]\");\n lista.add(\"[email protected].\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected].\");\n lista.add(\"meu#[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[[email protected]\");\n lista.add(\"<[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n\n\n return lista;\n\n }",
"private String SuggestEmail() {\n EmailDAOHE emaildaohe = new EmailDAOHE();\n List<String> suggestString = emaildaohe.findEmailByUserId(getUserId());\n List<Email> suggestList = new ArrayList<Email>();\n for (int i = 0; i < suggestString.size(); i++) {\n Email email = new Email();\n email.setUserId((long) i);\n email.setSender(StringEscapeUtils.escapeHtml(suggestString.get(i) + \"; \"));\n suggestList.add(email);\n }\n String listEmail = emaildaohe.convertToJSONArray(suggestList, \"userId\", \"sender\", \"sender\");\n return listEmail;\n }",
"@Override\r\n\tpublic String getEmailAdrress() {\n\t\treturn null;\r\n\t}",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"private boolean comprobar_email() {\n\t\tString mail = email.getText().toString();\n\n\t\tif (mail.matches(\".*@.*\\\\.upv.es\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void setEmail(String p) { this.idcorreo = p; }",
"public void sendInvitations(){\r\n for(int i = 0; i< emails.size(); i++){\r\n System.out.println(\"Inviting: \" + emails.get(i));\r\n }\r\n\r\n }",
"private String extractEMailAddress() {\n return SwingUtil.extract(emailJTextField, Boolean.TRUE);\n }",
"@Override\n public void sendEmail(String emailBody) {\n }",
"public void sendEmail(String[] to, String subject, String body, MailMimeType mailMimeType) throws EmailNotSendedException {\n if(emailConfig == null){\n throw new EmailNotSendedException(\"Servidor de email não está configurado\");\n }\n // Validar configuracoes de email\n ValidatorFactory validatorFactory = Validation.buildDefaultValidatorFactory();\n Validator validator = validatorFactory.getValidator();\n Set<ConstraintViolation<EmailConfig>> violations = validator.validate(emailConfig);\n if(violations.size() > 0){\n throw new EmailNotSendedException(\"Configurações de Email Incorretas ao tentar enviar\");\n }\n Properties props = new Properties();\n props.put(\"mail.smtp.host\", emailConfig.getHost());\n props.put(\"mail.smtp.port\", emailConfig.getPort());\n if (emailConfig.getProtocol() == Protocol.TLS) {\n props.put(\"mail.smtp.starttls.enable\", \"true\");\n }else if(emailConfig.getProtocol() == Protocol.SMTPS){\n props.put(\"mail.smtp.ssl.enable\", \"true\");\n }\n final String username = emailConfig.getLogin();\n final String password = emailConfig.getPassword();\n final String from = emailConfig.getSender();\n Authenticator authenticator = null;\n if(emailConfig.getNeedAuthentication()){\n\n props.put(\"mail.smtp.auth\", \"true\");\n authenticator = new Authenticator() {\n private PasswordAuthentication pa = new PasswordAuthentication(username, password);\n\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return pa;\n }\n };\n }\n\n Session session = Session.getInstance(props, authenticator);\n session.setDebug(emailConfig.getDebug());\n MimeMessage message = new MimeMessage(session);\n try {\n message.setFrom(new InternetAddress(from));\n InternetAddress[] address = new InternetAddress[to.length];\n\n for (int i = 0; i < to.length; i++) {\n try {\n address[i] = new InternetAddress(to[i]);\n } catch (Exception e) {\n throw new EmailNotSendedException(\"Endereço de email inválido\");\n }\n }\n message.setRecipients(Message.RecipientType.TO, address);\n message.setSubject(subject);\n message.setSentDate(new Date());\n\n Multipart multipart = new MimeMultipart(\"alternative\");\n\n MimeBodyPart bodyPart = new MimeBodyPart();\n\n switch (mailMimeType){\n case TXT:\n bodyPart.setText(body);\n break;\n case HTML:\n bodyPart.setContent(body, \"text/html\");\n break;\n default:\n bodyPart.setText(body);\n\n }\n\n multipart.addBodyPart(bodyPart);\n message.setContent(multipart);\n Transport.send(message);\n\n } catch (MessagingException ex) {\n throw new EmailNotSendedException(\"Não foi possível enviar email: \" + ex.getMessage());\n\n }\n\n }",
"@Override\n public String generateMail() {\n return \"<HTML> Don`t call us Nikolas</HTML>\";\n }",
"private String getSendMailResetPasswordContent(UserForm userForm) {\n return \"\";\n }",
"@Override\n public void sendEmail() {\n return;\n }",
"public interface MailService\r\n{\r\n public static final String FROM_ADDRESS = \"[email protected]\";\r\n \r\n \r\n /**\r\n * Envoi un mail aux distinataires dont les adresses sont fournies.\r\n * \r\n * @param recipients Liste des adresses mail des destinataires (non null, non vide)\r\n * @param object Sujet du mail\r\n * @param message Message du mail\r\n * @throws IllegalArgumentException Si recipients est null ou vide\r\n * @throws MailException En cas de problème pour envoyer le mail\r\n */\r\n void sendMail(List<String> recipients, String object, String message) throws MailException;\r\n \r\n /**\r\n * Envoi un mail pour chaque distinataires dont les adresses sont fournies.\r\n * Il y a un mail d'envoyé par destinataire et non un seul mail avec tous\r\n * les destinataires en copie.\r\n * \r\n * @param recipients Liste des adresses mail des destinataires (non null, non vide)\r\n * @param object Sujet du mail\r\n * @param message Message du mail\r\n * @throws IllegalArgumentException Si recipients est null ou vide\r\n * @throws MailException En cas de problème pour envoyer le mail pour 1 ou plusieurs destinataires\r\n */\r\n void sendSeparateMail(List<String> recipients, String object, String message) throws MailException;\r\n}",
"private void getRegisteredEmails() {\n\t\tAccountManager manager = (AccountManager)getSystemService(ACCOUNT_SERVICE);\n\t\tAccount [] account = manager.getAccounts();\n\t\tfinal String [] emails = new String [account.length];\n\t\tint x=0;\n\t\tfor(Account ac : account){\n\t\t\temails[x]=ac.name;\n\t\t\tx++;\n\t\t}\n\t\t\n\t\tif(emails.length==0){\n\t\t\treturn;\n\t\t}\n\t\tfinal Dialog alert = new Dialog(Authenticate.this, AlertDialog.THEME_HOLO_LIGHT);\n\t\tListView lvEmails = new ListView(Authenticate.this);\n\t\tlvEmails.setAdapter(new ArrayAdapter<String>(Authenticate.this, R.layout.device_email_list, R.id.device_email_list_textView_email, emails));\n\t\talert.setContentView(lvEmails);\n\t\t\n\t\tlvEmails.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tetPassword.setText(emails[position]);\n\t\t\t\talert.dismiss();\n\t\t\t}\n\t\t});\n\t\t\n\t\talert.show();\n\t\talert.setCancelable(true);\n\t\talert.setCanceledOnTouchOutside(true);\n\t\talert.setTitle(\"Choose an email\");\n\t}",
"public void enviarEmail(String c, Ciudadano a){\n\t}",
"SendEmail() {\t\n\t}",
"private EMailUtil() {}",
"public String getEmailInString() {\n\t\tString shortenedBody = StringHelper.shortenString(body, 75, .5);\n\t\tString indentedBody = \"\\t\" + shortenedBody.replace(StringHelper.newline, StringHelper.newline + \"\\t\");\n\t\tString bodyLine = \"(Shortened) Body (html >>> \" + html + \"):\" + StringHelper.newline + indentedBody;\n\n\t\tStringBuilder bodyPartBuilder = new StringBuilder(\"bodyParts:\");\n\t\tfor (MimeBodyPart mimeBodyPart : bodyParts) {\n\t\t\tbodyPartBuilder.append(StringHelper.newline).append(\"\\t\");\n\t\t\ttry {\n\t\t\t\tbodyPartBuilder.append(mimeBodyPart.getFileName());\n\t\t\t} catch (Throwable ex) {\n\t\t\t\t//We don't care if this error is thrown. We don't want this to break anything.\n\t\t\t\tbodyPartBuilder.append(\"N/A\");\n\t\t\t}\n\t\t}\n\t\treturn StringHelper.splitBy(StringHelper.newline,\n\t\t\t\t\t\t\"from: \" + from,\n\t\t\t\t\t\t\"replyTo: \" + StringHelper.splitBy(\", \", replyTo),\n\t\t\t\t\t\t\"to: \" + StringHelper.splitBy(\", \", to),\n\t\t\t\t\t\t\"cc: \" + StringHelper.splitBy(\", \", cc),\n\t\t\t\t\t\t\"bcc: \" + StringHelper.splitBy(\", \", bcc),\n\t\t\t\t\t\t\"subject: \" + subject,\n\t\t\t\t\t\tbodyLine,\n\t\t\t\t\t\tbodyPartBuilder.toString());\n\t}",
"public String getAlternateEmail() { return alternateEmail; }",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"[email protected]\");\n\t\t\n\t}",
"private boolean revisarFormatoCorreo() {\n\t\tString correoE = this.campoCorreo.getText();\n\t\tPattern pat = Pattern.compile(\"^[\\\\w-]+(\\\\.[\\\\w-]+)*@[\\\\w-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n\t\tMatcher mat = pat.matcher(correoE);\n\t\tif (mat.matches()) {\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}",
"private void composeEmail() {\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:[email protected]\"));\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }",
"java.lang.String getUserEmail();",
"public interface IEmailProvider {\n\n void sendEmail(String[] toAddresses, String subject, String messageText);\n}",
"public boolean verificaEmail(String correo) {\n Pattern pat = null;\r\n Matcher mat = null;\r\n pat = Pattern.compile(\"^([0-9a-zA-Z]([_.w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-w]*[0-9a-zA-Z].)+([a-zA-Z]{2,9}.)+[a-zA-Z]{2,3})$\");\r\n mat = pat.matcher(correo);\r\n if (mat.find()) {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"@Schema(description = \"La lista de correos del negocio\")\n public List<String> getEmails() {\n return emails;\n }",
"public void setEmailad(String emailad) {\n\tthis.emailad = emailad;\n}",
"public String getFromEMail() {\n return fromEMail;\n }",
"public String getEmail() { return (this.idcorreo == null) ? \"\" : this.idcorreo; }",
"public void setAlternateEmail(String altemail) { this.alternateEmail = altemail; }",
"String getPasswordExpiredMailBody( );",
"public static String validEmail(String message){\n boolean success = false;\n String line = \"\";\n do {\n line = readLine(message).trim();\n success = checkEmail(line);\n if (!success)\n System.out.println(\"Debes introducir una dirección de correo \"\n + \"válida... \");\n } while(!success);\n return line;\n }",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"email id [email protected]\");\n\t\t\n\t}",
"public String getEmail() {\r\n // Bouml preserved body begin 00040D82\r\n\t System.out.println(email);\r\n\t return email;\r\n // Bouml preserved body end 00040D82\r\n }",
"@Override\n public void validaEmailInteractor(CharSequence charSequence) {\n verificaEmail(charToString(charSequence));\n }",
"void sendCommonMail(String to, String subject, String content);",
"private void sendEmail(String emailAddress, String subject, String body) {\n\t\t\n\t}",
"public void EnvoyerEmailSurveillant(Utilisateur user) {\n\t\t\t\t MimeMessage mimeMessage = mailSender.createMimeMessage(); \n\t\t\t try {\n\t\t\t MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, true);\n\t\t\t mimeMessageHelper.setSubject(\"Compte Surveillant \");\n\t\t\t mimeMessageHelper.setFrom(\"[email protected]\");\n\n\t\t\t mimeMessageHelper.setTo(user.getEmail());\n\t\t\t String url =\"scolarity.dpc.com.tn\";\n\t\t String content = \"Bonjour Mr ( Mmme), \" + user.getNom()+\" + \" + user.getPrenom()\n\t\t + \", votre nom d'utilisateur par la platforme scolarity est : \\n \" + user.getUsername() +\" \\n\"+\"et votre mot de passe est : \\n\"+ user.getPassword()+\"\\n\"+\"vous pouvez accéder au espace surveillant via l'adresse suivante : \\n\"+url+\"\\n\"+\" \\n Cordialement.\";\n\t\t System.out.println(content);\n\n\t\t\t mimeMessageHelper.setTo(user.getEmail());\n\t\t mimeMessageHelper.setText(content);\n\t\t // Add a resource as an attachment\n\t\t mimeMessageHelper.setText(\"<html><body><p>\" + content + \"</p> <img src=\\\"http://207.180.211.158:/logodpc.bmp\\\" width=\\\"50\\\" alt=\\\"Apen\\\"></body></html>\", true);\n\n\t\t\t \n\t\t\t \n\t\t\t mailSender.send(mimeMessageHelper.getMimeMessage());\n\t\t\t } catch (MessagingException e) {\n\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t\t\t\n\t\t\t}",
"public static void main(String[] args) throws IOException, ParseException, MessagingException, ClassNotFoundException {\n Gmail service = getGmailService();\n \n // Fetch all COL Trading Confirmation Messages\n String user = \"me\";\n String pageToken = \"\";\n List<Message> messages = new ArrayList<>();\n do {\n \tif (pageToken == null || pageToken.isEmpty()) {\n ListMessagesResponse listResponse =\n service.users().messages().list(user).setQ(\"subject:COL Trading Confirmation\").setMaxResults(1000L).execute();\n messages.addAll(listResponse.getMessages());\n pageToken = listResponse.getNextPageToken();\n \n \t} else {\n ListMessagesResponse listResponse =\n service.users().messages().list(user).setQ(\"subject:COL Trading Confirmation\").setMaxResults(1000L).setPageToken(pageToken).execute();\n messages.addAll(listResponse.getMessages());\n pageToken = listResponse.getNextPageToken();\n \t}\n } while (pageToken != null && !pageToken.isEmpty());\n \n if (messages.size() == 0) {\n System.out.println(\"No COL Trading Confirmation email found\");\n } else {\n \t\n \t// Read last processed\n \tDate lastProcessed = null;\n \tif (LAST_PROCESSED.exists()) {\n \ttry (ObjectInputStream in = new ObjectInputStream(new FileInputStream(LAST_PROCESSED))) {\n lastProcessed = (Date) in.readObject();\n \t}\n \t}\n \t\n \tDate latest = null;\n \t\n for (Message message : messages) {\n \t// Fetch raw email\n message = service.users().messages().get(\"me\", message.getId()).setFormat(\"raw\").execute();\n \n byte[] emailBytes = Base64.decodeBase64(message.getRaw());\n\n Properties props = new Properties();\n Session session = Session.getDefaultInstance(props, null);\n MimeMessage email = new MimeMessage(session, new ByteArrayInputStream(emailBytes));\n \n \n // Write only if email is COL Trading Confirmation\n if (email.getSubject().startsWith(\"COL Trading Confirmation\")) {\n\n \t// Compose file name\n \tSimpleDateFormat readDf = new SimpleDateFormat(\"MM/dd/yyyy\");\n \treadDf.setLenient(false);\n Date tradeDate = readDf.parse(email.getSubject().substring(email.getSubject().length()-10));\n \n // Skip if current message was previously processed\n if (lastProcessed != null && !tradeDate.after(lastProcessed)) {\n \tbreak;\n }\n \n \tSimpleDateFormat writeDf = new SimpleDateFormat(\"yyyy-MM-dd\");\n \tString fileName = writeDf.format(tradeDate) + \" COL Trading Confirmation\";\n \n \tif (!TRADING_CONFIRMATION.exists()) {\n \t\tTRADING_CONFIRMATION.mkdir();\n \t}\n \t\n \t// Write to file\n \ttry (FileWriter fw = new FileWriter(TRADING_CONFIRMATION.getAbsolutePath()+\"/\"+fileName+\".txt\")) {\n \tfw.write(new String(emailBytes));\n\n \tSystem.out.printf(\"Added %s\\n\", fileName + \".txt\");\n\n \tif (latest == null || latest.before(tradeDate)) {\n \tlatest = tradeDate;\n \t}\n }\n \t\n }\n }\n \n // Store last processed\n if (latest != null) {\n try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(LAST_PROCESSED))) {\n out.writeObject(latest);\n }\n }\n System.out.printf(\"Done processing\");\n }\n }",
"@AutoEscape\n\tpublic String getEmailCom();",
"void send(String email, Locale locale);",
"public boolean enviarMailConfirmacion(Agente agente, Usuario usuario){\n\n try {\n\n //seteamos el asunto\n// message.setSubject(\"UNDEC - Activar Cuenta Nortia UNDEC\");\n//\n// //seteamos el mensaje que vamos a enviar\n// message.setContent(\"<html>\\n\" +\n// \"<body>\\n\" +\n// \"\\n Hola, para poder activar la cuenta haga click en el siguiente link ----> \" +\n// \"<a href=\\\"\"+new URLWEB().getAbsoluteApplicationUrl()+\"/activarcuenta.xhtml?username=\"+usuario.getUsuarionombre()+\n// \"&hash=\"+usuario.getUsuarioclave()+\n// \"\\\">\\n\" +\n// \"Activar cuenta</a>\\n\" +\n// \"\\n\" +\n// \"En caso de no poder pegue en el browser lo siguiente\\n \"+\n// new URLWEB().getAbsoluteApplicationUrl()+\"/activarcuenta.xhtml?username=\"+usuario.getUsuarionombre()+\n// \"&hash=\"+usuario.getUsuarioclave()+\"\\n\"+\n// \"Muchas Gracias\"+\n// \"</body>\\n\" +\n// \"</html>\", \"text/html\");\n// //colocamos la direccion de donde enviamos el correo\n// Address address = new InternetAddress(agente.getEmail());\n// message.setFrom(address);\n// //Colocamos la direccion de la persona a enviar\n// Address send = new InternetAddress(agente.getOtroemail(),false);\n// message.addRecipient(Message.RecipientType.TO,send);\n// message.addRecipient(Message.RecipientType.BCC, new InternetAddress( agente.getOtroemail()));\n// //la persona que envia con la validacion de su cuenta.\n// Transport trans = session.getTransport(\"smtp\");\n// //Aca se autentifica que la direccion de la persona que envia sea válida\n// //trans.connect();\n// trans.connect(\"[email protected]\",\"sgap*9812\");\n// trans.sendMessage(message,message.getAllRecipients());\n// trans.close();\n Email email = new Email();\n email.setFromAddress(\"Nortia UNDEC\", \"[email protected]\");\n email.addRecipient(agente.getApellido(), agente.getEmail(), RecipientType.TO);\n email.addRecipient(agente.getApellido(), agente.getOtroemail(), RecipientType.BCC);\n email.setTextHTML(\"Hola \"+usuario.getUsuarionombre()+\", <br /> para poder activar la cuenta haga click en el siguiente link ----> \" +\n\"<a href=\\\"\"+new URLWEB().getAbsoluteApplicationUrl()+\"/activarcuenta.xhtml?username=\"+usuario.getUsuarionombre()+\n \"&hash=\"+usuario.getUsuarioclave() +\n\"\\\"> Activar cuenta </a> <br />\"+\n \n\"En caso de no poder pegue en el browser lo siguiente \" +\n new URLWEB().getAbsoluteApplicationUrl()+\"/activarcuenta.xhtml?username=\"+usuario.getUsuarionombre()+\n\"&hash=\"+usuario.getUsuarioclave()+\"<br />\" +\n\"Muchas Gracias\");\n email.setSubject(\"UNDEC - Activar Cuenta Nortia UNDEC\");\n \n // or:\n new Mailer(\"localhost\", 25, \"[email protected]\", \"sgap*9812\").sendMail(email);\n } catch (Exception ex) {\n\n ex.printStackTrace();\n //Si el correo tiene algun error lo retornaremos aca\n JsfUtil.addErrorMessage(ex,\"No se pudo crear el Usuario\");\n\n return false;\n\n// } catch (MalformedURLException ex) {\n// Logger.getLogger(EnviarMail.class.getName()).log(Level.SEVERE, null, ex);\n// return false;\n }\n //Correo tuvo exito dara una salida en este punto indicando que si se envio\n return true;\n \n }",
"private static boolean enviarEmailAnexo(Email remetente, List<File> files, String destinatario, String titulo, String mensagem) {\n Properties prop = new Properties();\r\n prop.put(\"mail.smtp.host\", \"smtp.gmail.com\");\r\n prop.put(\"mail.smtp.port\", \"465\");\r\n prop.put(\"mail.smtp.auth\", \"true\");\r\n prop.put(\"mail.smtp.socketFactory.port\", \"465\");\r\n prop.put(\"mail.smtp.socketFactory.class\", \"javax.net.ssl.SSLSocketFactory\");\r\n\r\n Session session = Session.getInstance(prop,\r\n new DefaultAuthenticator(remetente.getRemetente(), remetente.getSenha()));\r\n\r\n MimeMessage msg = new MimeMessage(session);\r\n\r\n try {\r\n //Quem esta enviando\r\n msg.setFrom(new InternetAddress(remetente.getRemetente()));\r\n //Destinatario\r\n msg.setRecipient(Message.RecipientType.TO, new InternetAddress(destinatario));\r\n //Data de envio\r\n msg.setSentDate(new Date());\r\n //titulo email\r\n msg.setSubject(titulo);\r\n\r\n Multipart mp = new MimeMultipart();\r\n //mensagem\r\n\r\n MimeBodyPart paragrafo = new MimeBodyPart();\r\n paragrafo.setContent(mensagem + \"\\n\\nJCR\", \"text/html\");\r\n mp.addBodyPart(paragrafo);\r\n //anexos\r\n for (File file : files) {\r\n MimeBodyPart mbp = new MimeBodyPart();\r\n DataSource fds = new FileDataSource(file);\r\n mbp.setDisposition(Part.ATTACHMENT);\r\n mbp.setDataHandler(new DataHandler(fds));\r\n mbp.setFileName(deAccent(fds.getName()));\r\n mp.addBodyPart(mbp);\r\n }\r\n\r\n msg.setContent(mp);\r\n\r\n //envia a mensagem\r\n Transport.send(msg);\r\n return true;\r\n } catch (MessagingException e) {\r\n System.err.println(e);\r\n GerarLogErro.gerar(e.getMessage());\r\n return false;\r\n }\r\n }",
"private boolean verificaEmail(String cadena) {\n if (validate.esVacio(cadena)) {\n setErrorEmail(getMsjVacio());\n return false;\n }\n if (!validate.esEmailValido(cadena)) {\n setErrorEmail(getMsjEmailInvalido());\n return false;\n }\n setErrorEmail(null);\n return true;\n }",
"public static String getBiblioMail() {\n\t\treturn \"mail\";\n\t}",
"public void addEmail(String s){\r\n\t\temail.add(s);\t\t\r\n\t}",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }",
"public java.lang.String getEmailAddress()\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tint length = emailAddress.length();\r\n\t\t\r\n\t\tif (!locked)\r\n\t\t\tresult = emailAddress;\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i = 1; i < length; i++)\r\n\t\t\t{\r\n\t\t\t\t//char asterisk = emailAddress.charAt(i);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn result;\r\n\t\t\t\r\n\t}",
"public String getEmail()\r\n/* 31: */ {\r\n/* 32:46 */ return this.email;\r\n/* 33: */ }",
"public Object[] getEmails() {\r\n String encodedEmails = insertMode ? null : stringValue(CONTACTS_EMAIL_ADDRESSES);\r\n return decodeEmails(encodedEmails);\r\n }",
"public String getEmailAddresses()\n {\n return this.emailAddresses;\n }",
"public abstract void arhivare(Email email);",
"String getExpirationtMailBody( );",
"public void pullingEmails() {\n new Thread(() -> {\n mySqlConn sql = new mySqlConn();\n EMAILS_LIST = sql.getAllEmailIDs(null);\n\n TextFields.bindAutoCompletion(txt_to, EMAILS_LIST);\n TextFields.bindAutoCompletion(txt_cc, EMAILS_LIST);\n TextFields.bindAutoCompletion(txt_bcc, EMAILS_LIST);\n }).start();\n }",
"public Historique SendMail( Historique h,String resultat ,String date,String heure) throws Exception {\n\r\n\r\n Logger log = LoggerFactory.getLogger(MailController.class);\r\n\r\n \r\n\r\n \r\n log.info(\"Spring Mail - Sending Simple Email with JavaMailSender Example\");\r\n\r\n Mail mail = new Mail();\r\n mail.setFrom(\"[email protected]\");\r\n \r\n //mail.setTo(h.get().getEmails());\r\n String [] res =h.getEmails().split(\"\\\\s\");\r\n for(int i=0; i<res.length;i++)\r\n \r\n {\r\n \tSystem.out.println(res[i]);\r\n mail.setTo(res[i]);\r\n \r\n if(resultat.equals(\"echec\"))\r\n { \t mail.setSubject(\" échec d'éxécution du test\");\r\n mail.setContent(\"Echec de test \"+h.getNom()+\" éffectué à \"+date+\"à l'heure \"+heure);}\r\n else\r\n { \t\r\n mail.setSubject(\"Retard d'éxécution du test\");\r\n mail.setContent(\"Retard d'éxecution :temps de réponse réél est \"+h.getTemps_rep_reel()+\" et le temps de réponse attendu = est:\"+h.getResultat_attendu());}\r\n emailService.sendSimpleMessage(mail);\r\n }\r\n \r\n\r\n \r\n\t\treturn null; \r\n\r\n }",
"public synchronized String getMail()\r\n {\r\n return mail;\r\n }",
"public abstract String getEmail( String [ ] strLineDataArray );",
"@Override\n\tpublic void createDigestEmail() {\n\n\t}",
"public java.lang.String getEmailAddress();",
"public Email getEmail()\r\n {\r\n /**\r\n * Ya hemos leido. Se devuelve una nueva instancia en cada envio de mail para evitar problemas de sincronizacion.\r\n */\r\n return createEmailInstance();\r\n }",
"public boolean mailRecuperarPassword(String nombreusuario, String password, String mail){\n\n try {\n\n// //seteamos el asunto\n// message.setSubject(\"UNDEC - Activar Cuenta Nortia UNDEC\");\n//\n// //seteamos el mensaje que vamos a enviar\n// message.setContent(\"<html>\\n\" +\n// \"<body>\\n\" +\n// \"\\nHola, usuario = \" +nombreusuario+ \",\\n su nuevo password es = \"+password+\n// \"\\n\" +\n// \"\\nUsted puede cambiar el password cuando ingrese al sistema\\n \"+\n// \n// \"Muchas Gracias\"+\n// \"</body>\\n\" +\n// \"</html>\", \"text/html\");\n// //colocamos la direccion de donde enviamos el correo\n// Address address = new InternetAddress(mail);\n// message.setFrom(address);\n// //Colocamos la direccion de la persona a enviar\n// Address send = new InternetAddress(mail,false);\n// message.addRecipient(Message.RecipientType.TO,send);\n// \n// //la persona que envia con la validacion de su cuenta.\n// Transport trans = session.getTransport(\"smtp\");\n// //Aca se autentifica que la direccion de la persona que envia sea válida\n//\n// trans.connect(\"[email protected]\",\"momomomo\");\n// trans.sendMessage(message,message.getAllRecipients());\n// trans.close();\n System.out.println(\"maiñll\");\n Email email = new Email();\n email.setFromAddress(\"Nortia UNDEC\", \"[email protected]\");\n email.addRecipient(nombreusuario, mail, RecipientType.TO);\n //email.addRecipient(agente.getApellido(), agente.getOtroemail(), RecipientType.BCC);\n email.setTextHTML(\"Hola, usuario = \"+nombreusuario+ \"su nuevo password es = \"+password +\n\n\" <br />Usted puede cambiar el password cuando ingrese al sistema <br />\" +\n\n\"Muchas Gracias\");\n System.out.println(\"-----------\"+mail);\n email.setSubject(\"UNDEC - Recuperar Password Nortia UNDEC\");\n \n // or:\n new Mailer(\"localhost\", 25, \"[email protected]\", \"sgap*9812\").sendMail(email);\n System.out.println(\"-----------enviado\");\n } catch (Exception ex) {\n\n ex.printStackTrace();\n //Si el correo tiene algun error lo retornaremos aca\n JsfUtil.addErrorMessage(ex,\"No se pudo crear el Usuario\");\n\n return false;\n\n \n }\n //Correo tuvo exito dara una salida en este punto indicando que si se envio\n return true;\n \n }",
"private String getSendMailPasswordContent(UserForm userForm) {\n return \"\";\n\n }",
"public String getEmailad() {\n\treturn emailad;\n}",
"public void service(Mail mail) throws MessagingException {\n if (mail.getAttribute(MARKER) != null) {\n mail.removeAttribute(MARKER);\n return;\n }\n\n Collection<MailAddress> recipientsToRemove = new HashSet<MailAddress>();\n Collection<MailAddress> recipientsToAddLocal = new ArrayList<MailAddress>();\n Collection<MailAddress> recipientsToAddForward = new ArrayList<MailAddress>();\n\n Collection<MailAddress> recipients = mail.getRecipients();\n Map<MailAddress, String> recipientsMap = new HashMap<MailAddress, String>(recipients.size());\n\n for (MailAddress address : recipients) {\n // Assume all addresses are non-virtual at start\n recipientsMap.put(address, null);\n }\n\n mapRecipients(recipientsMap);\n\n for (MailAddress source : recipientsMap.keySet()) {\n String targetString = recipientsMap.get(source);\n\n // Only non-null mappings are translated\n if (targetString != null) {\n if (targetString.startsWith(\"error:\")) {\n // Mark this source address as an address to remove from the\n // recipient list\n recipientsToRemove.add(source);\n processDSN(mail, source, targetString);\n } else {\n StringTokenizer tokenizer = new StringTokenizer(targetString, getSeparator(targetString));\n\n while (tokenizer.hasMoreTokens()) {\n String targetAddress = tokenizer.nextToken().trim();\n\n // log(\"Attempting to map from \" + source + \" to \" +\n // targetAddress);\n\n if (targetAddress.startsWith(\"regex:\")) {\n try {\n targetAddress = RecipientRewriteTableUtil.regexMap(source, targetAddress);\n } catch (PatternSyntaxException e) {\n log(\"Exception during regexMap processing: \", e);\n }\n if (targetAddress == null)\n continue;\n }\n\n try {\n MailAddress target = (targetAddress.indexOf('@') < 0) ? new MailAddress(targetAddress, domainList.getDefaultDomain()) : new MailAddress(targetAddress);\n\n // Mark this source address as an address to remove\n // from the recipient list\n recipientsToRemove.add(source);\n\n // We need to separate local and remote\n // recipients. This is explained below.\n if (getMailetContext().isLocalServer(target.getDomain())) {\n recipientsToAddLocal.add(target);\n } else {\n recipientsToAddForward.add(target);\n }\n\n String buf = \"Translating virtual user \" + source + \" to \" + target;\n log(buf);\n\n } catch (ParseException pe) {\n // Don't map this address... there's an invalid\n // address mapping here\n String exceptionBuffer = \"There is an invalid map from \" + source + \" to \" + targetAddress;\n log(exceptionBuffer);\n } catch (DomainListException e) {\n log(\"Unable to access DomainList\", e);\n }\n }\n }\n }\n }\n\n // Remove mapped recipients\n recipients.removeAll(recipientsToRemove);\n\n // Add mapped recipients that are local\n recipients.addAll(recipientsToAddLocal);\n\n // We consider an address that we map to be, by definition, a\n // local address. Therefore if we mapped to a remote address,\n // then we want to make sure that the mail can be relayed.\n // However, the original e-mail would typically be subjected to\n // relay testing. By posting a new mail back through the\n // system, we have a locally generated mail, which will not be\n // subjected to relay testing.\n\n // Forward to mapped recipients that are remote\n if (recipientsToAddForward.size() != 0) {\n // Can't use this ... some mappings could lead to an infinite loop\n // getMailetContext().sendMail(mail.getSender(),\n // recipientsToAddForward, mail.getMessage());\n\n // duplicates the Mail object, to be able to modify the new mail\n // keeping the original untouched\n MailImpl newMail = new MailImpl(mail);\n try {\n try {\n newMail.setRemoteAddr(dns.getLocalHost().getHostAddress());\n } catch (UnknownHostException e) {\n newMail.setRemoteAddr(\"127.0.0.1\");\n }\n try {\n newMail.setRemoteHost(dns.getLocalHost().getHostName());\n } catch (UnknownHostException e) {\n newMail.setRemoteHost(\"localhost\");\n }\n\n newMail.setRecipients(recipientsToAddForward);\n newMail.setAttribute(MARKER, Boolean.TRUE);\n getMailetContext().sendMail(newMail);\n } finally {\n newMail.dispose();\n }\n }\n\n // If there are no recipients left, Ghost the message\n if (recipients.size() == 0) {\n mail.setState(Mail.GHOST);\n }\n }",
"private void sendEmailWithoutChooser() {\r\n String email = AppConstants.ADMIN_EMAIL;\r\n String feedback_msg = \"\";\r\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO);\r\n String aEmailList[] = {email};\r\n emailIntent.setData(Uri.parse(\"mailto:\")); // only email apps should handle this\r\n emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);\r\n emailIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(\"<i><font color='your color'>\" + feedback_msg + \"</font></i>\"));\r\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"Request help from Customer Support\");\r\n\r\n PackageManager packageManager = getApplicationContext().getPackageManager();\r\n boolean isIntentSafe = emailIntent.resolveActivity(packageManager) != null;\r\n if (isIntentSafe) {\r\n startActivity(emailIntent);\r\n } else {\r\n Toast.makeText(getApplicationContext(), \"Email app is not found\", Toast.LENGTH_SHORT).show();\r\n }\r\n }",
"public static void print_invalid_emails () {\n invalidEmails = new ArrayList<>();\n for (int i = 0; i < roster.size(); i++) {\n if (!roster.get(i).getEmail().contains(\"@\") || !roster.get(i).getEmail().contains(\".\") || roster.get(i).getEmail().contains(\" \")) {\n invalidEmails.add(roster.get(i).getEmail());\n }\n }\n\n if (invalidEmails.isEmpty()) {\n System.out.println(\"No invalid email addresses found.\");\n } else {\n System.out.println(\"The following email addresses are invalid: \");\n for (int j = 0; j < invalidEmails.size(); j++) {\n System.out.println(invalidEmails.get(j));\n }\n System.out.println(\"Note: A valid e-mail should include an at sign (\\\"@\\\") and period (\\\".\\\") and doesn't include a space.\");\n System.out.println();\n }\n }",
"public String getEmailAddressesString() {\r\n return this.emailAddressesString;\r\n }",
"public interface MailService {\n\n /**\n * Tell you if the mail service is enabled or not.\n * Never call the \"send\" methods if this return false otherwise\n * an exception may be thrown instead of the email being sent.\n *\n * @return true if the mail service has been enabled.\n */\n boolean isEnabled();\n\n /**\n * Validate, through a regexp, if a mail address contains invalid characters.\n * It cannot, in anyway, tell you if the email is really valid.\n *\n * @param mailAddress a not null mail address.\n * @return true if the mail address is valid.\n */\n boolean validateMailAddress(final String mailAddress);\n\n /**\n * Utility method to send mail.\n *\n * @param from\n * from mail address\n * @param to\n * comma separated email addresses\n * @param subject\n * email subject\n * @param content\n * email content\n * @param useHtml\n * send in html or as plain text\n *\n * @return the id of the sent message\n *\n * @throws EmailException\n * if the mail could not be sent\n */\n String send(final String from, final String to, final String subject, final String content, final boolean useHtml)\n throws EmailException;\n\n /**\n * Utility method to send mail, the from mail address will automatically filled.\n *\n * @param to\n * comma separated email addresses\n * @param subject\n * email subject\n * @param content\n * email content\n * @param useHtml\n * send in html or as plain text\n *\n * @return the id of the sent message\n *\n * @throws EmailException\n * if the mail could not be sent\n */\n String send(final String to, final String subject, final String content, final boolean useHtml)\n throws EmailException;\n}",
"@Override\n public String getEmail() {\n return null;\n }",
"public ArrayList<String> getEmails(){\r\n return emails; //emails.toString();\r\n }",
"private String getPlainFrom(MimeMessage m)\r\n\t{\r\n\t\tString fromEmail = null;\r\n\t\ttry\r\n\t\t{\r\n\t fromEmail = m.getFrom()[0].toString().toLowerCase();\r\n\t int idx;\r\n\t if ((idx = fromEmail.indexOf('<')) != -1)\r\n\t \tfromEmail = fromEmail.substring(++idx, fromEmail.indexOf('>', idx));\r\n\t\t}\r\n\t\tcatch (MessagingException e) {}\r\n return fromEmail;\r\n\t}",
"@Override\r\n\tpublic void sendEmails() {\n\t\tSystem.out.println(\"All e-mails sent from e-mail service!\");\r\n\t}",
"public String getEmailBodyString() {\r\n return this.emailBodyString;\r\n }",
"public void pesquisarEmail() {\n\t\tif (this.alunoDao.pesquisar(this.emailPesquisa) != null) {\n\t\t\tAluno alunoAtual = this.alunoDao.pesquisar(this.emailPesquisa);\n\t\t\tthis.alunos.clear();\n\t\t\tthis.alunos.add(alunoAtual);\n\t\t\tthis.quantPesquisada = this.alunos.size();\n\t\t} else {\n\t\t\tFacesContext.getCurrentInstance().addMessage(null,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_ERROR, \"\", \" email inválido \"));\n\t\t}\n\t}",
"public void sendDiscrepancyEmail() throws Exception;",
"public void setEmailCom(String emailCom);",
"void send(String emailName, Map model, Locale locale, EmailPreparator emailPreparator);",
"@Override\n\tpublic int getMailynCnt() {\n\t\treturn 0;\n\t}",
"public void sendingMessageForEmp(Set<String> emailCCList){\n\tSimpleMailMessage[] mailMessageArray = new SimpleMailMessage[1];\r\n Iterator iterator = emailCCList.iterator();\r\n // for (int index = 0; iterator.hasNext(); index ++){\r\n while(iterator.hasNext())\r\n {\r\n String mailids=(String)iterator.next();\r\n SimpleMailMessage message = new SimpleMailMessage();\r\n String toAddress = (String)iterator.next();\r\n message.setFrom(\"[email protected]\");\r\n message.setTo(\"[email protected]\");\r\n message.setSubject(\"With CC\");\r\n message.setCc(mailids);\r\n message.setText(\"Mail Sent from @[email protected]\");\r\n mailMessageArray[0] = message;\r\n//}\r\n\r\n System.out.println(\"Sending email ....\");\r\n mailSender.send(mailMessageArray);\r\n System.out.println(\"Sent email ....\");\r\n }\r\n\r\n}",
"public void enviarAlertaDeQueEstaOnline(){\n //mandaria un mail a los usuarios avisando que ya esta disponible para ver.\n System.out.println(\"Enviando mail con url \" + this.url);\n }",
"private void sendEmail(){\n String teachersEmail = tvTeachersEmail.getText().toString();\n String[] receiver = new String[1];\n receiver[0] = teachersEmail;\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.putExtra(Intent.EXTRA_EMAIL, receiver);\n\n // opening only email clients - force sending with email\n intent.setType(\"message/rfc822\");\n startActivity(Intent.createChooser(intent, getString(R.string.open_email_clients)));\n }",
"String getOtherAlertMailBody( );",
"public void posaljiIzvestajEmail(final IzvestajDto izvestajDto) {\n final Context context = popuniKontekstIzvestaja(izvestajDto);\n partnerRepository.findByPpid(izvestajDto.getKomentarDto().getPpid()).ifPresent(partner -> {\n log.info(\"Slanje izvestaja komercijalisti {}\", partner.getNaziv());\n sendEmail.pripremiIPosaljiEmail(partner.getEmail(), \"Podsetnik za izvestaj\", \"slanjeIzvestajPodsetnik\", context);\n });\n\n }",
"public ArrayList<String> getAllEmails() {\n return allEmails;\n }",
"@AutoEscape\n\tpublic String getEmail_address();",
"String getEmail(int type);",
"@AutoEscape\n public String getEmail();"
] | [
"0.6928739",
"0.6474532",
"0.64628613",
"0.6403337",
"0.6328167",
"0.6307982",
"0.6307982",
"0.6307982",
"0.6307982",
"0.6307982",
"0.6307982",
"0.6277791",
"0.62593126",
"0.6248913",
"0.62413675",
"0.61723363",
"0.6139275",
"0.61135834",
"0.61019766",
"0.60969883",
"0.6090328",
"0.6077976",
"0.6069844",
"0.6052575",
"0.6046067",
"0.60375684",
"0.60363144",
"0.60345656",
"0.60192204",
"0.6012866",
"0.60086155",
"0.5979761",
"0.59782803",
"0.5970828",
"0.59676695",
"0.59663707",
"0.59660906",
"0.5963674",
"0.5960864",
"0.5956722",
"0.59542364",
"0.5952951",
"0.5951622",
"0.5948907",
"0.5936173",
"0.5934977",
"0.5929673",
"0.59178513",
"0.59098667",
"0.5904073",
"0.58999896",
"0.58886325",
"0.5884947",
"0.5873197",
"0.5870318",
"0.5870318",
"0.5870318",
"0.5870318",
"0.5870318",
"0.5867605",
"0.58586776",
"0.58425957",
"0.58410203",
"0.58335954",
"0.5827014",
"0.5821813",
"0.5816083",
"0.5815791",
"0.5809209",
"0.580746",
"0.57929516",
"0.5792163",
"0.5791996",
"0.5790319",
"0.57876056",
"0.57858205",
"0.5784638",
"0.57834774",
"0.5782161",
"0.5780196",
"0.5773267",
"0.5772641",
"0.5764734",
"0.57646644",
"0.576353",
"0.576162",
"0.5752734",
"0.57485443",
"0.5748327",
"0.5745165",
"0.57405686",
"0.57374847",
"0.5737286",
"0.5736933",
"0.57346225",
"0.57239556",
"0.57212806",
"0.5708372",
"0.5707236",
"0.57070035"
] | 0.6659254 | 1 |
The list of all the customers | @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
/*
* @ApiOperation(value = "Get all the customers", notes =
* "Send GET request to get all the customers" , httpMethod = "GET", code = 200,
* response = CustomerResponse.class, responseContainer = "List", produces =
* MediaType.APPLICATION_JSON_VALUE)
*
* @ApiResponses(value = {
*
* @ApiResponse(code = 200, response = CustomerResponse.class, responseContainer
* = "List", message = "List of all customers"),
*
* @ApiResponse(code = 401, response = ErrorResponse.class, message =
* "Invalid or expired token provided. Error code: CREDENTIALS_REJECTED"),
*
* @ApiResponse(code = 500, response = ErrorResponse.class, message =
* "Runtime server error occurred. Error code: SERVER_ERROR")})
*/
public List<CustomerResponse> getCustomers() {
log.info("hit the controller");
return customerService.findAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void listAllCustomers () {\r\n\t\t\r\n customersList = my.resturnCustomers();\r\n\t\t\r\n\t}",
"public static List<Customer> getCustomers(){\n \treturn Customer.findAll();\n }",
"@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }",
"public void listCustomers() {\r\n\t\tSystem.out.println(store.listCustomers());\r\n\t}",
"public void listCustomers() {\n\t\tSystem.out.println(\"\\nCustomers llegits desde la base de dades\");\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(System.out::println);\n\n\t}",
"public List<Customer> getAllCustomers() {\n return customerRepository.findAll();\n }",
"List<Customer> getCustomerList();",
"@GetMapping(value = CustomerRestURIConstants.GET_ALL_CUSTOMER )\n\tpublic ResponseEntity<List<Customer>> list() {\n\t\tList<Customer> customers = customerService.getAllCustomers();\n\t\treturn ResponseEntity.ok().body(customers);\n\t}",
"List<Customer> getCustomers();",
"public List<Customer> getCustomers()\n {\n List<Customer> customers = new ArrayList<>();\n\n customers.add(new Customer(\"Recipient\", \"One\", \"[email protected]\", \"Green\"));\n customers.add(new Customer(\"Recipient\", \"Two\", \"[email protected]\", \"Red\"));\n customers.add(new Customer(\"Recipient\", \"Three\", \"[email protected]\", \"Blue\"));\n customers.add(new Customer(\"Recipient\", \"Four\", \"[email protected]\", \"Orange\"));\n\n return customers;\n }",
"@GetMapping(\"/customers\")\n\tpublic List<Customer> getcustomers(){\n\t\t\n\t\treturn thecustomerService.getCustomers();\n\t}",
"@Override\n\tpublic List<Customer> listCustomers() {\n\t\treturn null;\n\t}",
"public List<Customer> getCustomerList() {\n return new ArrayList<Customer>(customersList);\n }",
"@GetMapping(\"/customers\")\r\n\tprivate List<Customer> getAllCustomers() {\r\n\t\treturn customerService.getAllCustomers();\r\n\t}",
"List<Customer> getList();",
"public List<Customermodel> getCustomers() {\n\t return customerdb.findAll();\n\t }",
"@Override\n\tpublic List<Customer> retrieveAllCustomers() {\n\t\tlogger.info(\"A GET call retrieved all customers: retrieveAllCustomers()\");\n\t\treturn customers;\n\t}",
"public List<Customer> getCustomers() {\n\t\treturn customers;\n\t}",
"public List<Customer> getAllCustomers() {\n Query query = em.createNamedQuery(\"Customer.findAll\");\r\n // return query result\r\n return query.getResultList();\r\n }",
"@Override\n\tpublic Iterable<Customer> displayCust() {\n\t\treturn customerRepository.findAll();\n\t}",
"@Override\r\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\r\n\t}",
"public ArrayList<Customer> getAllCustomers();",
"@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn customerRepository.findAllCustomer();\n\t}",
"@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//create the query\n\t\tQuery<Customer> query = session.createQuery(\"from Customer order by lastName\", Customer.class);\n\t\t//get the result list\n\t\tList<Customer> customers = query.getResultList();\n\t\treturn customers;\n\t}",
"@Override\n\tpublic List<Customer> getCustomers() {\n\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Customer order by lastName\", Customer.class)\n\t\t\t\t.getResultList();\n\n\t}",
"@Override\n\tpublic List<CustomerData> getAllCustomer() {\n\t\treturn customerRepository.findAll();\n\t}",
"public List<CustomerModel> getCustomers();",
"public List<Customer> findAll(){\n\t\treturn custRepo.findAll();\n\t}",
"@Override\n\tpublic Uni<List<Customer>> findAllCustomer() {\n\t\treturn repo.findAll().list();\n\t}",
"@GetMapping(\"/allCustomers\")\n public List<Customer> getAllCusData() {\n return customerData.showList();\n }",
"@GET\n\t@Path(\"getAllCustomer\")\n\tpublic List<Customer> getAllCustomer() {\n\t\treturn ManagerHelper.getCustomerManager().getAllCustomer();\n\t}",
"@Override\n\tpublic List<Customer> findAllCustomer() {\n\t\treturn customerDao.findAllCustomer();\n\t}",
"@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Customer> theQuery =\n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\treturn customers;\n\t}",
"@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\n\t}",
"public static List<Customer> getAllCustomers() {\r\n\t\tList<Customer> customerList = new ArrayList<Customer>();\r\n\t\tConnection conn = ConnectionFactory.getConnection();\r\n\r\n\t\tString query = \"SELECT customerUuid, customerType, customerName, personKey, addressKey FROM Customer\";\r\n\r\n\t\tPreparedStatement ps = null;\r\n\t\tResultSet rs = null;\r\n\t\tCustomer customer = null;\r\n\r\n\t\ttry {\r\n\t\t\tps = conn.prepareStatement(query);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString customerUuid = rs.getString(\"customerUuid\");\r\n\t\t\t\tString customerType = rs.getString(\"customerType\");\r\n\t\t\t\tString customerName = rs.getString(\"customerName\");\r\n\t\t\t\tint personKey = rs.getInt(\"personKey\");\r\n\t\t\t\tPerson primaryContact = Person.getPersonByKey(personKey);\r\n\t\t\t\tint addressKey = rs.getInt(\"addressKey\");\r\n\t\t\t\tAddress address = Address.getAddressByKey(addressKey);\r\n\t\t\t\t\r\n\t\t\t\tif (customerType.equals(\"G\")) {\r\n\t\t\t\t\tcustomer = new GovernmentCustomer(customerUuid, primaryContact, customerName, address);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcustomer = new CorporateCustomer(customerUuid, primaryContact, customerName, address);\r\n\t\t\t\t}\r\n\t\t\t\tcustomerList.add(customer);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"SQLException: \");\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t} finally {\r\n\t\t\tConnectionFactory.closeConnection(conn, ps, rs);\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}",
"@GET\r\n\t@Produces({ MediaType.APPLICATION_JSON })\r\n\tpublic ArrayList<Customer> getCustomers() {\r\n\t\treturn custDao.readAll();\r\n\t}",
"public static ObservableList<Customers> getAllCustomers() {\n return allCustomers;\n }",
"java.util.List<com.google.cloud.channel.v1.Customer> \n getCustomersList();",
"@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDAO.getCustomers();\n\t\t\n\t}",
"@GetMapping(\"/customers\")\n public List<CustomerHibernate> listCustomers() {\n return customerService.findAll();\n }",
"@Override\n\tpublic List<MstCustomerDto> getAllCustomer() {\n\t\tList<MstCustomerDto> listMstCustomerDtos=new ArrayList<>();\n\t\tList<Object[]> obj=new ArrayList<>();\n\t\t\n\t\tobj = mstCustomerDao.getAll();\n\t\tlistMstCustomerDtos = mapperFacade.mapAsList(obj, MstCustomerDto.class);\n\t\t\n\t\treturn listMstCustomerDtos;\n\t}",
"public String allCustomers(){\n String outputString = \"Customer accounts:\"+\"\\n\";\n for(Customer record : bank.getName2CustomersMapping().values()){\n outputString += record.getFullName()+\" \"+record.getAccounts().toString()+\"\\n\";\n }\n return outputString;\n }",
"@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\t\t\n\t\t// create a query ... sort by the lastname\n\t\tQuery<Customer> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\",Customer.class);\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t}",
"@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\t\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t\t\t// create a query ... sort by last name\n\t\t\t\tQuery<Customer> theQuery = currentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t\t\t// execute query and get result list\n\t\t\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\t\t\t// return the results\n\t\t\t\treturn customers;\n\t}",
"@GetMapping(\"/customers\")\n public List<Customer> findAll()\n {\n return customerService.findAll();\n }",
"public List<Customer> findAllCustomers() throws DatabaseOperationException;",
"@Override\n\t@Transactional\n\tpublic List<AMOUNT> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<AMOUNT> theQuery = currentSession.createQuery(\"from Customer ORDER BY lastName\", AMOUNT.class);\n\n\t\t// execute query and get result list\n\t\tList<AMOUNT> customers = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn customers;\n\t}",
"@Override\n\tpublic List<Customer> findAll() {\n\t\treturn customerRepository.findAll();\n\t}",
"public Collection<Customer> listCustomer10() {\r\n\t\tfinal Collection<Customer> list = this.customerRepository.listCustomer10();\r\n\t\treturn list;\r\n\t}",
"@GetMapping(\"/api/customer\")\n\tpublic ResponseEntity<List<CustomerDetails>> getAllCustomerDetails() {\n\n\t\tList<CustomerDetails> customerDetaillist = customerService.getAllCustomerDetails();\n\n\t\treturn ResponseEntity.ok().body(customerDetaillist);\n\n\t}",
"@Override\n\tpublic List<Customer> getCustomerList() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"Select c from Customer c\");\n\t\tList<Customer> list=(List<Customer>)query.getResultList();\n\t\t/*\n\t\t * Customer customer = (Customer)session.load(Customer.class,customerId);\n\t\t * */\n\t\treturn list;\n\t}",
"public ArrayList<Customer> getCustomerList() {\n\t\treturn customerList;\n\t}",
"public Collection<Customer> listCustomer10() {\n\t\tfinal Collection<Customer> list = this.customerRepository.listCustomer10();\n\t\treturn list;\n\t}",
"public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }",
"List<Customer> loadAllCustomer();",
"public List<Customer> getCustomerList() {\r\n\t\tList<Object> columnList = null;\r\n\t\tList<Object> valueList = null;\r\n\t\tList<Customer> customers = new ArrayList<Customer>();\r\n\r\n\t\tif (searchValue != null && !searchValue.trim().equals(\"\")) {\r\n\t\t\tcolumnList = new ArrayList<Object>();\r\n\t\t\tvalueList = new ArrayList<Object>();\r\n\t\t\tcolumnList.add(searchColumn);\r\n\t\t\tvalueList.add(searchValue);\r\n\t\t}\r\n\t\tcustomers = customerService.searchCustomer(columnList, valueList,\r\n\t\t\t\tfirst, pageSize);\r\n\t\t\r\n\r\n\t\treturn customers;\r\n\t}",
"@RequestMapping(\"getAllCustomers\")\r\n\t @ResponseBody\r\n\t public List<Customer> getAllCustomers() {\r\n\t\t return repo.findAll();\r\n\t }",
"@Override\r\n\tpublic List<Customer> getAllCustomers() {\r\n\t\tList<Customer> allCustomers = new ArrayList<Customer>();\r\n\t\tallCustomers = customerRepository.findAll();\r\n\t\tif (!allCustomers.isEmpty()) {\r\n\t\t\treturn allCustomers;\r\n\t\t} else {\r\n\t\t\tthrow new EmptyEntityListException(\"No Customers Found.\");\r\n\t\t}\r\n\r\n\t}",
"@RequestMapping(value = \"/customers\", method = RequestMethod.GET)\n public ResponseEntity<?> getCustomers() {\n Iterable<Customer> customerList = customerService.getCustomers();\n return new ResponseEntity<>(customerList, HttpStatus.OK);\n }",
"@ApiOperation(value = \"Lists all the customers\", notes = \"\")\n @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public CustomerListDTO getCustomers() {\n\n return new CustomerListDTO(customerService.getCustomers());\n }",
"@PreAuthorize(\"#oauth2.hasAnyScope('read','write','read-write')\")\n\t@RequestMapping(method = GET)\n\tpublic Mono<ResponseEntity<List<Customer>>> allCustomers() {\n\n\t\treturn repo.findAll().collectList()\n\t\t\t.filter(customers -> customers.size() > 0)\n\t\t\t.map(customers -> ok(customers))\n\t\t\t.defaultIfEmpty(noContent().build());\n\t}",
"@GetMapping()\n public String showAllCustomers(Model model) {\n model.addAttribute(CUSTOMERS, customerService.showCustomerList());\n return CUSTOMERS_INDEX;\n }",
"public List<Customer> findAll() {\n\t\t//get current session\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t//query to fetch all records\n\t\tQuery<Customer> query = currentSession.createQuery(\n\t\t\t\t\t\t\t\t\"from Customer where customerId!=:customerId\", Customer.class);\n\t\t//get account details of all accounts\n\t\tquery.setParameter(\"customerId\", 9999999);\n\t\tList<Customer> customer = query.getResultList();\n\t\t//return the result\n\t\treturn customer;\n\t}",
"@Override\n\tpublic Collection<Customer> getAllCustomers() throws Exception {\n\t\tArrayList<Customer> customers = new ArrayList<Customer>();\n\t\tConnection con = pool.getConnection();\n\t\t\n\t\ttry {\n\t\t\tString getAllCustomers = \"select * from customer\";\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(getAllCustomers);\n\t\t\tint result = 0;\n\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tCustomer cust = new Customer();\n\t\t\t\t\tcust.setId(rs.getLong(\"ID\"));\n\t\t\t\t\tcust.setCustName(rs.getString(\"Cust_Name\"));\n\t\t\t\t\tcust.setPassword(rs.getString(\"Password\"));\n\t\t\t\t\tcustomers.add(cust);\n\t\t\t\t\tresult++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(result + \" Customers were retrieved.\");\n \n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \" Could not retrieve data from DB.\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Could not close the connection to the DB\");\n\t\t\t}\n\t\t}\n\t\treturn customers;\n\t}",
"public void listAllCustomers() {\n List<Customer> list = model.findAllCustomers();\n if(list != null){\n if(list.isEmpty())\n view.showMessage(not_found_error);\n else\n view.showTable(list);\n }\n else\n view.showMessage(retrieving_data_error); \n }",
"@GetMapping()\n public List<AgentCustomerList> findAllAgentsCustomerList() {\n return agentRepo.findAllAgentCustomerListBy();\n }",
"public List<Customer> getCustomerByID() {\n Query query = em.createNamedQuery(\"Customer.findByCustomerId\")\r\n .setParameter(\"customerId\", custID);\r\n // return query result\r\n return query.getResultList();\r\n }",
"public List<Customer> list() throws CustomerEmptyListException{\n\t\tList<Customer> customerList = new LinkedList<Customer>();\n\t\t\n\t\tif (repository.findAll() == null) {\n\t\t\tthrow new CustomerEmptyListException(\"There is no customer in the repository!\");\n\t\t}\n\t\t\n\t\tfor (Customer customer : repository.findAll()) {\n\t\t\tcustomerList.add(customer);\n\t\t}\n\t\treturn customerList;\n\t}",
"public String list(){\n\t\tif(name == null) {\n\t\t\ttry {\n\t\t\t\tlist = customerBO.getAll();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tList<Customer> l = new ArrayList<Customer>();\n\t\t\ttry {\n\t\t\t\tl = customerBO.getAll();\n\t\t\t\tfor(Customer cus: l) {\n\t\t\t\t\tString CustomerName = cus.getFirstName() + \" \" + cus.getLastName();\n\t\t\t\t\tif(CustomerName.compareTo(name) == 0) {\n\t\t\t\t\t\tlist.add(cus);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint total = list.size();\n\t\t\t\tint div = total / STATIC_ROW_MAX;\n\t\t\t\tif(div * STATIC_ROW_MAX == total) {\n\t\t\t\t\ttotalPage = div;\n\t\t\t\t} else {\n\t\t\t\t\ttotalPage = div + 1;\n\t\t\t\t}\t\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\n\t\treturn \"list\";\n\t}",
"public List<CustomerEntity> findAll() {\n\t\treturn customerRepository.findAll();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Customer> listRecords() {\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from CUSTOMER\").list();\r\n\r\n\t}",
"@RequestMapping(value = \"/customer-addres\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<CustomerAddres> getAllCustomerAddres() {\n log.debug(\"REST request to get all CustomerAddres\");\n List<CustomerAddres> customerAddres = customerAddresRepository.findAll();\n return customerAddres;\n }",
"@GetMapping(value = \"/showCustomers\")\n\tpublic String getAllCustomers(Model model) {\n\t\t// AllCustomers model attribute iterated over to display Customers in table on\n\t\t// JSP page\n\t\tmodel.addAttribute(\"AllCustomers\", customerService.getCustomers());\n\t\t// Returns showCustomers.jsp (see webapp/jsp folder)\n\t\treturn \"showCustomers\";\n\t}",
"@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Customer> findAll() {\n\t\treturn (List<Customer>) customerDAO.findAll();\n\t}",
"@RequestMapping(method = RequestMethod.GET)\n\t\tpublic ResponseEntity<Collection<Customer>> getAllUsers() {\n\t\t\treturn service.getAllCustomers();\n\t\t}",
"@GetMapping(\"/list\")\n\tpublic String listCustomers(Model theModel) {\n\t\tList<User> theUsers = userService.getUsers();\n\n\t\t// add the customer to the model\n\t\ttheModel.addAttribute(\"users\", theUsers);\n\n\t\treturn \"list-users\";\n\t}",
"public List<Customer> getCustomerByName() {\n Query query = em.createNamedQuery(\"Customer.findByName\")\r\n .setParameter(\"name\", custName);\r\n // return query result\r\n return query.getResultList();\r\n }",
"public String list(){\n\t\tlist = connC.getAll();\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\t\treturn \"list\";\n\t}",
"@GetMapping(\"/list\")\n\tpublic String listCustomers(Model themodel) {-get Customer from DAO\n\t\t//2-Add to MVC model\n\t\t\n\t\t//1\n\t\tList<Customer> theCustomers= customerService.getCustomers();\n\t\t\n\t\t\n\t\t//2\n\t\tthemodel.addAttribute(\"customers\",theCustomers);\n\t\t\n\t\t\n\t\t\n\t\treturn \"list-customers\";\n\t}",
"@Override\n public List<Customer> listAll() {\n\n\n Customer c1 = new Customer();\n Customer c2 = new Customer();\n Customer c3 = new Customer();\n\n List<Customer> list = new ArrayList<>();\n list.add(c1);\n list.add(c2);\n list.add(c3);\n\n System.out.println(\"demo\");\n System.out.println(\"Entering test\");\n\n return list;\n }",
"List<CustomerOrder> getAllCustomerOrder();",
"public void getCustomerNames() throws SQLException {\n ResultSet rs; \n Statement st = dbConnection.dbConnect().createStatement();\n String recordQuery = (\"Select * from customer\");\n rs = st.executeQuery(recordQuery);\n while(rs.next()){\n customers.getItems().add(rs.getString(\"customerName\"));\n }\n }",
"public static ObservableList<Customer> getCustomerList() throws SQLException{\r\n customerList.clear();\r\n Connection conn = DBConnection.getConnection();\r\n String selectStatement = \"SELECT * FROM customers;\";\r\n DBQuery.setPreparedStatement(conn, selectStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.execute();\r\n ResultSet rs = ps.getResultSet();\r\n\r\n //creates customer and adds to list\r\n while(rs.next())\r\n {\r\n int customerID = rs.getInt(\"Customer_ID\");\r\n String customerName = rs.getString(\"Customer_Name\");\r\n String address = rs.getString(\"Address\");\r\n String state = getDivisionName(rs.getInt(\"Division_ID\"));\r\n String postalCode = rs.getString(\"Postal_Code\");\r\n String country = getCountryName(getCountryID(rs.getInt(\"Division_ID\")));\r\n String phoneNumber = rs.getString(\"Phone\");\r\n Customer customer = new Customer(customerID,customerName,address,state,postalCode,country,phoneNumber);\r\n customerList.add(customer);\r\n }\r\n return customerList;\r\n }",
"@Override\n\t@Transactional\n\tpublic List<Customer> getAll() {\n\t\tList<Customer> loadAll = hibernateTemplate.loadAll(Customer.class);\n\t\treturn loadAll;\n\t}",
"@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic @ResponseBody\n\tIterable<Customer> findAll() {\n\t\tLOGGER.debug(\"Rendering persons list\");\n\t\treturn customerService.findAll();\n\n\t}",
"@GetMapping(\"/customers\")\n\tpublic ResponseEntity<Object> getAllCustomers(HttpServletRequest request){\n\t\tif(service.findByEmail(SessionManager.getInstance().getSessionEmail(request.getSession())) == null) {\n\t\t\tSessionManager.getInstance().delete(request.getSession());\n\t\t\treturn new ResponseEntity<>(HttpStatus.UNAUTHORIZED); \n\t\t}else {\n\t\t\tList<Customer> c = cService.findAll();;\n\t\t\tMappingJacksonValue mappedCustomers = new MappingJacksonValue(c);\n\t\t\tmappedCustomers.setFilters(new SimpleFilterProvider().addFilter(Customer.FILTER, SimpleBeanPropertyFilter.filterOutAllExcept(\"id\", \"email\", \"name\")));\n\t\t\treturn new ResponseEntity<>(mappedCustomers, HttpStatus.OK);\n\t\t}\n\t}",
"@GetMapping(\"/customers\")\n\tpublic String findAll(Model theModel) {\n\t\tList<Customer> theCustomer = customerServices.findAll();\n\t\ttheModel.addAttribute(\"customer\", theCustomer);\n\t\treturn \"customer/list-customer\";\n\t}",
"public List<Customer> read() {\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer\");\n rest = ppst.executeQuery();\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }",
"@Override\n public ArrayList<IndividualCustomer> getData() {\n return customerList;\n }",
"public List<Customer> findAll() throws CustomerNotFoundException {\r\n return this.entityManager.createQuery(\"select customer from Customer as customer\").getResultList();\r\n }",
"@GetMapping(\"/list\") // @RequestMapping(path = \"/list\", method = RequestMethod.GET)\r\n\tpublic String listCustomers(Model theModel) {\n\t\tList<Customer> theCustomers = customerService.getCustomers();\r\n\t\t\t\t\r\n\t\t// add the customers to the model\r\n\t\ttheModel.addAttribute(\"customers\", theCustomers);\r\n\t\t\r\n\t\treturn \"list-customers\";\r\n\t}",
"@Override\n\tpublic void viewCustomers(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*----*****-------List of Customers-------*****----*\\n\");\n\t\t\t\n\t\t\t//pass these input items to client controller\n\t\t\tviewCustomers=mvc.viewCustomers(session);\n\n\t\t\tSystem.out.println(\"CustomerId\"+\" \"+\"UserName\");\n\t\t\tfor(int i = 0; i < viewCustomers.size(); i++) {\n\t System.out.println(viewCustomers.get(i)+\"\\t\"+\"\\t\");\n\t }\n\t System.out.println(\"<------------------------------------------------>\");\n\t\t\t//System.out.println(viewCustomers);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Customer Exception: \" +e.getMessage());\n\t\t}\n\t}",
"public static List<CustomerItems> getCustomerItems() {\n\n\t\tList<CustomerItems> showCustomerItems = null;\n\n\t\ttry {\n\t\t\tshowCustomerItems = CustomerItemsDAO.showCustomerItemsDetails();\n\n\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn showCustomerItems;\n\t}",
"public Object getAllCustomers(HttpServletRequest req);",
"@Override\n\tpublic List<Customer> findall() {\n\t\treturn (List<Customer>) h.find(\"from Customer\");\n\t}",
"@GetMapping(\"/list\")\n public String listCustomers(Model model){\n List<Customer> customerList = customerDAO.getCustomers();\n\n //add customers to the model\n model.addAttribute(\"customers\", customerList);\n\n return \"list-customers\";\n }",
"public ArrayList<Customer> getservedCustomers()\r\n {\r\n return this.servedCustomers;\r\n }",
"public void printAllCustomerNames() {\r\n for (Customer customer : customers) {\r\n if (customer != null) {\r\n System.out.format(\"Customer with id[%s] is named %s\\n\", customer.getID(), customer.getName());\r\n }\r\n }\r\n }",
"com.google.cloud.channel.v1.Customer getCustomers(int index);"
] | [
"0.85456514",
"0.8503349",
"0.8497749",
"0.84528494",
"0.8403737",
"0.8386489",
"0.82991785",
"0.8284236",
"0.82605386",
"0.8210438",
"0.81929994",
"0.81891555",
"0.8167169",
"0.81511116",
"0.8144069",
"0.81307715",
"0.8128531",
"0.81207174",
"0.80943954",
"0.8041576",
"0.804009",
"0.80218816",
"0.80196834",
"0.80043936",
"0.799768",
"0.79966015",
"0.79768944",
"0.7969556",
"0.79618937",
"0.7960602",
"0.79508966",
"0.7947658",
"0.7939942",
"0.7932449",
"0.79089046",
"0.7908347",
"0.78760546",
"0.7842439",
"0.7831494",
"0.7826516",
"0.77940613",
"0.7775628",
"0.7769592",
"0.7746557",
"0.774301",
"0.77414685",
"0.77384543",
"0.7720958",
"0.770703",
"0.76954204",
"0.7685538",
"0.76729715",
"0.76727784",
"0.7671806",
"0.7666948",
"0.76593643",
"0.764853",
"0.7639615",
"0.76354736",
"0.7632176",
"0.76251405",
"0.75868887",
"0.7582084",
"0.757771",
"0.7560297",
"0.75587654",
"0.75272304",
"0.7494333",
"0.7475705",
"0.7454847",
"0.7427643",
"0.74184763",
"0.7414045",
"0.7411572",
"0.739012",
"0.73781884",
"0.73504114",
"0.7337217",
"0.73316956",
"0.73184633",
"0.7310378",
"0.73014605",
"0.7287953",
"0.7287381",
"0.7281964",
"0.7253179",
"0.725272",
"0.72382313",
"0.722804",
"0.72242594",
"0.72032696",
"0.7196651",
"0.71924025",
"0.71858597",
"0.7179313",
"0.71748555",
"0.7164784",
"0.7155126",
"0.7082968",
"0.70736164"
] | 0.7086018 | 98 |
creates the order for the given customer | @PostMapping(value = "/{customerRefId}"
+ AppConstants.ORDER_API, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
/*
* @ApiOperation(value = "Order created according to the sent specification",
* notes =
* "Send POST request to create the order according to the specification." ,
* httpMethod = "GET", code = 200, response = OrderResponse.class, produces =
* MediaType.APPLICATION_JSON_VALUE)
*
* @ApiResponses(value = {
*
* @ApiResponse(code = 200, response = OrderResponse.class, message =
* "Created order"),
*
* @ApiResponse(code = 401, response = ErrorResponse.class, message =
* "Invalid or expired token provided. Error code: CREDENTIALS_REJECTED"),
*
* @ApiResponse(code = 500, response = ErrorResponse.class, message =
* "Runtime server error occurred. Error code: SERVER_ERROR")})
*/
public OrderResponse createOrder(
@NotBlank @PathVariable(name = "customerRefId", required = true) String customerRefId,
@Valid @RequestBody OrderRequest orderRequest, BindingResult result, Model m)
throws BadRequestException, InsufficientPermissionsException {
log.info("hit the controller");
if (result.hasErrors()) {
log.info("not able to handle error");
StringBuilder builder = new StringBuilder();
result.getAllErrors().forEach(error -> builder.append(error.toString()));
throw new BadRequestException("BAD_REQUEST", builder.toString());
}
log.info("orderService doesn't create order");
return orderService.createOrder(orderRequest, customerRefId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private CustomerOrder addOrder(Customer customer, ShoppingCart cart) {\n CustomerOrder order = new CustomerOrder();\r\n order.setCustomerID(customer);\r\n order.setCustomerOrderAmount(BigDecimal.valueOf(cart.getTotal()));\r\n\r\n // Get current timestamp\r\n Calendar calendar = Calendar.getInstance();\r\n Timestamp currentTimestamp = new java.sql.Timestamp(calendar.getTime().getTime());\r\n order.setCustomerOrderCreated(currentTimestamp);\r\n\r\n // Create confirmation number\r\n Random random = new Random();\r\n int i = random.nextInt(999999999);\r\n order.setCustomerOrderConfirmationNumber(i);\r\n out.print(i);\r\n\r\n // Save order\r\n em.persist(order);\r\n\r\n return order;\r\n }",
"void createOrder(List<Product> products, Customer customer);",
"static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }",
"@RequestMapping(value = \"/customerOrders\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<CustomerOrder> createCustomerOrder(@Valid @RequestBody CustomerOrder customerOrder) throws URISyntaxException {\n log.debug(\"REST request to save CustomerOrder : {}\", customerOrder);\n if (customerOrder.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"customerOrder\", \"idexists\", \"A new customerOrder cannot already have an ID\")).body(null);\n }\n CustomerOrder result = customerOrderRepository.save(customerOrder);\n customerOrderSearchRepository.save(result);\n return ResponseEntity.created(new URI(\"/api/customerOrders/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"customerOrder\", result.getId().toString()))\n .body(result);\n }",
"public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}",
"public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }",
"void create(Order order);",
"public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}",
"SerialResponse createCustomer(PinCustomerPost pinCustomerPost);",
"Customer createCustomer();",
"Customer createCustomer();",
"Customer createCustomer();",
"Customer createCustomer();",
"@Override\r\n\tpublic void createAccount(Customer customer) {\n\t\tcustMap.put(customer.getMobileNo(),customer);\r\n\t\t\r\n\t}",
"public ResponseEntity<?> createCustomer(customer.controller.Customer customer);",
"@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic void create(Customer t) {\n\n\t}",
"private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }",
"protected abstract Order createOrder(Cuisine cuisine);",
"private void takeOrder(MyCustomer customer) {\n\tDo(\"Taking \" + customer.cmr +\"'s order.\");\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgWhatWouldYouLike();\n\tstateChanged();\n }",
"public MessageResponseCustomerDto createCustomer(CustomerDto customer);",
"public Order(int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = 0;\r\n\t\torderTotal = 0;\r\n\t}",
"@RequestMapping(value=\"/pizza/custCreate.html\", method = RequestMethod.POST)\r\n public ModelAndView custCreate(\r\n @ModelAttribute(\"customer\")Customer customer,\r\n @CookieValue(value = \"v\", defaultValue = \"\") String visitorId,\r\n HttpServletResponse response) throws Exception {\n visitorManager.setCookieValue(visitorId);\r\n \r\n // Get the current order\r\n Order order = shoppingCart.getOrder();\r\n ModelAndView result = new ModelAndView(\"/pizza/cardEntry\");\r\n result.addObject(\"order\", order);\r\n \r\n // TODO: Is the customer valid?\r\n \r\n // Add the customer to the order\r\n order.setCustomer(customer);\r\n shoppingCart.assignCustomer(customer);\r\n\r\n // Remember the visitor\r\n response.addCookie(new Cookie(\"v\", visitorManager.getCookieValue()));\r\n return result;\r\n }",
"public Invoice createInvoice(Order order);",
"@Override\n @Transactional\n public PurchaseResponse placeOrder(Purchase purchase) {\n Order order = purchase.getOrder();\n\n //genrate traking number\n String orderTrakingNumber = genrateOrderTrakingnumber();\n order.setOrderTrackingNumber(orderTrakingNumber);\n\n //populate order with order item\n Set<OrderItem> orderItems = purchase.getOrderItems();\n orderItems.forEach(item-> order.add(item));\n\n //populate order with billingAddress and shipplingAddress\n order.setBillingAddress(purchase.getBillingAddress());\n order.setShippingAddress(purchase.getShippingAddress());\n\n //populate customer with order\n Customer customer = purchase.getCustomer();\n\n // checck if the existing customer\n String theEmail = customer.getEmail();\n Customer customerFromDB = customerRepository.findByEmail(theEmail);\n\n if(customerFromDB != null){\n // we found it let assign them\n customer = customerFromDB;\n }\n\n customer.add(order);\n\n //sqve to the db\n customerRepository.save(customer);\n\n\n\n // return the response\n return new PurchaseResponse(orderTrakingNumber);\n }",
"public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }",
"@Override\n\tpublic void createCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\ttry {\n\t\t\t\n\t\t\tStatement st = con.createStatement();\n\t\t\tString create = String.format(\"insert into customer values('%s', '%s')\", customer.getCustName(),\n\t\t\t\t\tcustomer.getPassword());\n\t\t\tst.executeUpdate(create);\n\t\t\tSystem.out.println(\"Customer added successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to add A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}",
"private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }",
"private Customer addCustomer(String title, String firstName, String lastName, String phone, String email, String addressLine1, String addressLine2, String city, String state, String postCode, String country) {\r\n out.print(title);\r\n out.print(firstName);\r\n out.print(lastName);\r\n out.print(phone);\r\n out.print(email);\r\n out.print(addressLine1);\r\n out.print(addressLine2);\r\n out.print(city);\r\n out.print(state);\r\n out.print(postCode);\r\n out.print(country);\r\n\r\n Customer customer = new Customer();\r\n customer.setCustomerTitle(title);\r\n customer.setCustomerFirstName(firstName);\r\n customer.setCustomerLastName(lastName);\r\n customer.setCustomerPhone(phone);\r\n customer.setCustomerEmail(email);\r\n customer.setCustomerAddressLine1(addressLine1);\r\n customer.setCustomerAddressLine2(addressLine2);\r\n customer.setCustomerCity(city);\r\n customer.setCustomerState(state);\r\n customer.setCustomerPostCode(postCode);\r\n customer.setCustomerCountry(country);\r\n\r\n em.persist(customer);\r\n return customer;\r\n }",
"public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }",
"public void create(Customer customer) {\r\n this.entityManager.persist(customer);\r\n }",
"private PersonCtr createCustomer()\n {\n\n // String name, String addres, int phone, int customerID\n PersonCtr c = new PersonCtr();\n String name = jTextField3.getText();\n String address = jTextPane1.getText();\n int phone = Integer.parseInt(jTextField2.getText());\n int customerID = phone;\n Customer cu = new Customer();\n cu = c.addCustomer(name, address, phone, customerID);\n JOptionPane.showMessageDialog(null, cu.getName() + \", \" + cu.getAddress()\n + \", tlf.nr.: \" + cu.getPhone() + \" er oprettet med ID nummer: \" + cu.getCustomerID()\n , \"Kunde opretttet\", JOptionPane.INFORMATION_MESSAGE);\n return c;\n\n\n }",
"Customers createCustomers();",
"@Transactional\n\t@Override\n\tpublic Customer createCustomer(String name) {\n\t\t\n\t\tvalidateName(name);\n\t\tLocalDateTime now = LocalDateTime.now();\n\t\tAccount account = new Account(5000.0, now);\n\t\taccountRepository.save(account);\n\t\tSet<Item> set = new HashSet<>();\n\t\tCustomer customer = new Customer(name, account,set);\n\t\tcustRepository.save(customer);\n\t\treturn customer;\n\t\t\n\t}",
"public void create(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"INSERT INTO customer (name, id, phone) VALUES (?, ?, ?)\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.executeUpdate();\n System.out.println(\"Customer created.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Creation error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }",
"Order placeNewOrder(Order order, Project project, User user);",
"public static void createCustomer() throws IOException\r\n\t{\r\n\t\tclearScreen();\r\n\t\t\r\n\t\tSystem.out.println(\"[CUSTOMER CREATOR]\\n\");\r\n\t\tSystem.out.println(\"Enter the name of the customer you would like to create:\");\r\n\t\t\r\n\t\t// create a new customer with a user-defined name\r\n\t\tCustomer c = new Customer(inputString(false));\r\n\t\t// add the customer to the ArrayList\r\n\t\tcustomers.add(c);\r\n\t\t// display the edit screen for the customer\r\n\t\teditCustomer(c);\r\n\t}",
"@Override\n\tpublic OrderResponseDto createOrder(OrderRequestDto orderRequestDto) {\n\t\tLOGGER.info(\"Enter into order service impl\");\n\n\t\tOptional<Stocks> stock = stockRepository.findById(orderRequestDto.getStockId());\n\t\tOptional<User> user = userRepository.findById(orderRequestDto.getUserId());\n\n\t\tif (!stock.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_STOCK_NOT_FOUND);\n\t\tif (!user.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_USER_NOT_FOUND);\n\t\tif (orderRequestDto.getStockQuantity() >= 100)\n\t\t\tthrow new CommonException(TradingConstants.ERROR_QUANTITY);\n\t\tDouble brokeragePercent = Double.valueOf(stock.get().getBrokerageAmount() / 100d);\n\t\tDouble brokerageAmount = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokeragePercent;\n\t\tDouble totalPrice = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokerageAmount;\n\n\t\tOrders orders = Orders.builder().stockId(stock.get().getStockId())\n\t\t\t\t.stockQuantity(orderRequestDto.getStockQuantity()).totalPrice(totalPrice)\n\t\t\t\t.stockStatus(StockStatus.P.toString()).userId(orderRequestDto.getUserId()).build();\n\t\torderRepository.save(orders);\n\t\tResponseEntity<GlobalQuoteDto> latest = latestStockPrice(stock.get().getStockName());\n\t\treturn new OrderResponseDto(orders.getOrderId(), stock.get().getStockPrice(),\n\t\t\t\tlatest.getBody().getGlobalQuote().getPrice());\n\t}",
"io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();",
"public OrderBuilder name(String customerName) {\r\n\t\tthis.customerName = customerName;\r\n\t\treturn this;\r\n\t}",
"public Order(String deliveryAddress, String customerName, double orderTotalPrice, String id,\n String description, String customerTelephone, String comment, String pharmacyId, Date date, String userToken) {\n this.deliveryAddress = deliveryAddress;\n this.customerName = customerName;\n this.orderStatus = OrderStatus.WAITING_ORDER;\n this.orderTotalPrice = orderTotalPrice;\n this.description = description;\n this.id = id;\n this.customerTelephone = customerTelephone;\n this.pharmacyId = pharmacyId;\n this.comment = comment;\n this.date = new Date(date.getTime());\n this.userToken = userToken;\n }",
"@Override\n\tpublic boolean createCustomer(Customer customer) {\n\n\t\tif (customer != null) {\n\t\t\tcustomers.add(customer);\n\t\t\tlogger.info(\"Customer added to the list\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Failed to add customer to the list: createCustomer()\");\n\t\t\treturn false;\n\t\t}\n\t}",
"@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tpublic StockAccount(Customer customer)\n\t{\n\t\t// System.out.println(customer);\n\t\tJSONObject name = new JSONObject();\n\t\tJSONObject jsonObject = Utility.readFromJsonFile1(mCustomerPath);\n\t\tJSONObject jsonObject1 = new JSONObject();\n\n\t\tname.put(\"Money\", customer.getMoney());\n\t\tname.put(\"TotalShare\", customer.getTotal_share());\n\t\tjsonObject.put(customer.getName(), name);\n\t\tUtility.writeJsonObjectToFile2(mCustomerPath, jsonObject);\n\t}",
"@PostMapping()\n public String createCustomer(\n @ModelAttribute(CUSTOMER) CustomerDTO customerDTO) {\n customerDTO.getActualAddress().setCreated(LocalDateTime.now());\n customerDTO.getRegisteredAddress().setCreated(LocalDateTime.now());\n Customer customer = mapDTOCustomerToPersistent(customerDTO);\n customerService.saveCustomer(customer);\n return REDIRECT_CLIENTS;\n }",
"public Order(int orderID, int customerID, Date orderDate) {\n this(orderID, customerID, orderDate, null);\n }",
"public Order(int ordID, int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = ordID;\r\n\t\torderTotal = 0;\r\n\t}",
"@RequestMapping(value = \"/createCustomer\", method = RequestMethod.POST)\n\tpublic String createCustomer(@RequestBody Customer customer) throws Exception {\n\n\t\tlog.log(Level.INFO, \"Customer zawiera\", customer.toString());\n\t\tcustomerRepository.save(customer); // Zapis do bazy\n\t\tSystem.out.println(\"##################### Utworzono klienta: \" + customer);\n\t\treturn \"Klient zostal stworzony\" + customer;\n\t}",
"@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Customer(String name, List<Food> order, int priority) {\n\t\tthis.name = name;\n\t\tthis.order = order;\n\t\tthis.priority = priority;\n\t\tthis.orderNum = runningCounter++;\n//\t\torderReadylatch = new CountDownLatch(order.size() + 1);\n\t}",
"public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public void create(Order order) {\n order_dao.create(order);\n }",
"void createOrders(int orderNum) throws OrderBookOrderException;",
"@Test\r\n public void customerService() {\r\n Customer customer;\r\n customerCrudService = (CustomerCrudService)ctx.getBean(\"customerCrudService\");\r\n \r\n Contact contact = ContactFactory.getContact(\"[email protected]\", \"0785566321\", \"0218897190\");\r\n Demography demo = DemographyFactory.getDemography(\"Female\", \"Black\", new Date(10/6/1986));\r\n \r\n BigDecimal sellingPrice = new BigDecimal(\"8.00\");\r\n BigDecimal broughtPrice = new BigDecimal(\"6.00\");\r\n BigDecimal profit = new BigDecimal(\"2.00\");\r\n ArrayList prices = new ArrayList<BigDecimal>();\r\n prices.add(sellingPrice);\r\n prices.add(broughtPrice);\r\n prices.add(profit);\r\n Item item = ItemFactory.getItem(\"PS\", prices);\r\n \r\n List items = new ArrayList<Item>();\r\n items.add(items);\r\n \r\n customer = new CustomerFactory\r\n .Builder(125)\r\n .CustomerName(\"Mphokazi\")\r\n .CustomerSurname(\"Mhlontlo\")\r\n .Contact(contact)\r\n .Demography(demo)\r\n .OrderItem(items)\r\n .build();\r\n \r\n customerCrudService.persist(customer);\r\n customerService = (CustomerServices)ctx.getBean(\"customerService\");\r\n List<OrderItem> orderItems = customerService.customerOrder(customer.getId());\r\n Assert.assertNotNull(orderItems);\r\n for (OrderItem orderItem : orderItems) {\r\n System.out.println(orderItem.getItem());\r\n \r\n \r\n } \r\n }",
"@PostMapping(\"/customer\")\n\tpublic Customer createCustomer(@RequestBody Customer customer) {\n\t\treturn customerRepository.save(customer);\n\t}",
"public void addCustomer() {\r\n\t\tdo {\r\n\t\t\tString name = getToken(\"Enter the customer's name: \");\r\n\t\t\tString phoneNumber = getToken(\"Enter the phone number: \");\r\n\t\t\tCustomer customer = store.addCustomer(name, phoneNumber);\r\n\t\t\tif (customer == null) {\r\n\t\t\t\tSystem.out.println(\"Could not add customer.\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(customer);\r\n\t\t} while (yesOrNo(\"Would you like to add another Customer?\"));\r\n\t}",
"void createACustomer() {\r\n\t\tSystem.out.println(\"\\nCreating a customer:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}",
"CustomerOrder save(CustomerOrder customerOrder);",
"public CustomerService() {\n\n Customer c1 = new Customer(\"Brian May\", \"45 Dalcassian\", \"[email protected]\", 123);\n Customer c2 = new Customer(\"Roger Taylor\", \"40 Connaught Street\", \"[email protected]\", 123);\n Customer c3 = new Customer(\"John Deacon\", \"2 Santry Avenue\", \"[email protected]\", 123);\n Customer c4 = new Customer(\"Paul McCartney\", \"5 Melville Cove\", \"[email protected]\", 123);\n\n c1.setIdentifier(1);\n c2.setIdentifier(2);\n c3.setIdentifier(3);\n c4.setIdentifier(4);\n customers.add(c1);\n customers.add(c2);\n customers.add(c3);\n customers.add(c4);\n\n c1.addAccount(new Account(101));\n c2.addAccount(new Account(102));\n c2.addAccount(new Account(102));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c4.addAccount(new Account(104));\n\n }",
"private void addOrder(String orderNumber, String barcodeNumber, String customNumber, String customerName, String orderDate) {\n\t\t_database = this.getWritableDatabase();\n\t \n\t ContentValues values = new ContentValues();\n\t \n\t values.put(ORDER_NUMBER, orderNumber); \n\t \n\t if(barcodeNumber.length()>0) {\n\t \tvalues.put(BARCODE_NUMBER, barcodeNumber); \n\t }\n\t \n\t values.put(CUSTOMER_NUMBER, customNumber); \n\t values.put(CUSTOMER_NAME, customerName); \n\t values.put(ORDER_DATE, orderDate); \n\t \n\t // Inserting Row\n\t _database.insertOrThrow(ORDER_RECORDS_TABLE, null, values);\n\t}",
"private Boolean createOrder(String phoneEmployee, String phoneCustomer, HashMap<String, Integer> barcodes)\n {\n Boolean quit = false;\n\n try{\n Order order = orderController.createOrder(phoneEmployee, phoneCustomer, barcodes);\n System.out.println(\"Salg oprettet.\");\n System.out.println(\"\");\n printOrder(order);\n quit = true;\n } catch(Exception e){\n System.out.println(\"Salg kunne ikke oprettes.\");\n System.out.println(\"\");\n }\n\n return quit;\n }",
"public Customer (String customerName, String address,\n String telephoneNumber){\n this.customerName = customerName;\n this.address = address;\n this.telephoneNumber = telephoneNumber;\n }",
"private void addCustomer(Customer customer) {\n List<String> args = Arrays.asList(\n customer.getCustomerName(),\n customer.getAddress(),\n customer.getPostalCode(),\n customer.getPhone(),\n customer.getCreateDate().toString(),\n customer.getCreatedBy(),\n customer.getLastUpdate().toString(),\n customer.getLastUpdatedBy(),\n String.valueOf(customer.getDivisionID())\n );\n DatabaseConnection.performUpdate(\n session.getConn(),\n Path.of(Constants.UPDATE_SCRIPT_PATH_BASE + \"InsertCustomer.sql\"),\n args\n );\n }",
"public boolean createCustomer(String customerJSON);",
"@RequestMapping(\"/createOrder\")\n public Order createOrder(@RequestParam(\"user_id\") int user_id){\n System.out.println(\"createOrder\");\n Order order = orderService.createOrder(user_id);\n\n return order;\n }",
"private void createCustomer(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n String customerName = request.getParameter(\"CustomerName\");\n System.out.println(\"them mới id\"+ customerName);\n String customerBir = request.getParameter(\"CustomerBir\");\n String gender = request.getParameter(\"Gender\");\n int cusIdNum =Integer.parseInt(request.getParameter(\"CusIdNum\"));\n int cusTelNum = Integer.parseInt(request.getParameter(\"CusTelNum\"));\n String cusEmail = request.getParameter(\"CusEmail\");\n String address = request.getParameter(\"Address\");\n String customerTypeId = request.getParameter(\"CustomerTypeId\");\n System.out.println(\"them mới id\"+ customerName);\n Customer customer = new Customer(customerName,customerBir,gender,cusIdNum,cusTelNum,cusEmail,address, new CustomerType(customerTypeId));\n customerService.save(customer);\n showCustomerList(request,response);\n System.out.println(\"them mới\"+ customer);\n }",
"Customer(){}",
"CreatePaymentDataBuilder withCustomer(Customer c) {\n this.customer = c;\n return this;\n }",
"@PostMapping(value = \"/customers\", consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic void createCustomer(@RequestBody CustomerDTO custDTO) {\n\t\tlogger.info(\"Creation request for customer {}\", custDTO);\n\t\tcustService.createCustomer(custDTO);\n\t}",
"OrderDTO create(OrderDTO orderDTO);",
"public void setCustomer(String customer) {\n this.customer = customer;\n }",
"public Customer Create(Customer customer) {\n\t\tString sqlInsert = \"Insert into customers (name, email, address) values('\" + customer.getName()+ \"','\"\n\t\t+ customer.getEmail()+ \"','\"+ customer.getAddress()+\"')\";\n\t\t\n\t\ttry {\n\t\t\tstmt.executeUpdate(sqlInsert);\n\t\t\treturn readLatest();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}",
"public Customer(String name, double initialAmount) { //constructor for our customer class\r\n this.name = name;\r\n addId++;\r\n this.custId=addId;\r\n this.transactions = new ArrayList<>();\r\n balance=initialAmount;\r\n transactions.add(initialAmount);\r\n }",
"void createAndManageCustomer() {\r\n\t\tSystem.out.println(\"\\nCreating and managing a customer:\");\r\n\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c = new Customer2(\"Sami\", \"Cemil\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c);\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\t\r\n\t\ttx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tc.setLastName(\"Kamil\");\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\tem.close();\r\n\t}",
"public Customer createOrUpdateCustomer(final Customer customer) {\n checkNotNull(customer);\n\n String key = CustomerDbClient.computeKey(customer.getPhone(), customer.getName());\n Customer existing = dbClient.getById(key);\n if (existing == null) {\n return dbClient.putAndUpdateTimestamp(customer.toBuilder().setId(key).build());\n }\n\n List<Address> newAddresses = customer.getAddressesList()\n .stream()\n .filter(t -> !existing.getAddressesList().contains(t))\n .collect(Collectors.toList());\n\n Customer toUpdate = existing.toBuilder()\n .clearAddresses()\n .addAllAddresses(newAddresses) // The new address will be the default one.\n .addAllAddresses(existing.getAddressesList())\n .setDefaultAddressIndex(0)\n .build();\n\n return dbClient.putAndUpdateTimestamp(toUpdate);\n }",
"public Customer(CustomerTransaction cust) {\n this.name = cust.getName();\n this.mobile = cust.getMobile();\n this.email = cust.getEmail();\n this.history = new ArrayList <CustomerTransaction>();\n history.add(cust);\n }",
"public void create(Order order) {\n\t\torderDao.create(order);\n\t}",
"public Customer(int customer_ID, String customer_Name, String address, String postalCode, String phone, String createdDate, String createdBy, String lastUpdate, String lastUpdatedBy, int divisionID) {\n this.customer_ID = customer_ID;\n this.customer_Name = customer_Name;\n this.address = address;\n this.postalCode = postalCode;\n this.phone = phone;\n this.createdDate = createdDate;\n this.createdBy = createdBy;\n this.lastUpdate = lastUpdate;\n this.lastUpdatedBy = lastUpdatedBy;\n this.divisionID = divisionID;\n }",
"@Override\n\tpublic Customers create(Customers newcust) {\n\t\tif (newcust.getId()!=null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers savecust = CustRepo.save(newcust);\n\t\treturn savecust;\n\t}",
"Customer() \n\t{\n\t}",
"@GetMapping(\"/createorders\")\n\tpublic void generateOrderRequest(){\n\t\tSystem.out.println(\" == generateOrderRequest == \");\n\t\tfor(int i=0;i<150;i++) {\n\t\t\t// create new order\n\t\t\tOrderRequest order = new OrderRequest();\n\t\t\torder.setOrderReqId(\n\t\t\t\t\tInteger.parseInt(new RandomStringGenerator.Builder().withinRange('1', '9').build().generate(5))\n\t\t\t\t\t);\n\t\t\torder.setName(new RandomStringGenerator.Builder().withinRange('a', 'z').build().generate(5));\n\t\t\t// create status row for this order\n\t\t\tOrderRequestStatus orderStatus = new OrderRequestStatus();\n\t\t\torderStatus.setStatus(\"new\");\n\t\t\torderStatus.setOrderRequest(order);\n\t\t\torderStateRepository.save(orderStatus);\n\t\t}\n\t}",
"public Customer(String name, double amount)\n {\n customer = name;\n sale = amount;\n }",
"public Order(int orderID, int customerID, Date orderDate, Date expectedDeliveryDate) {\n this.orderID = orderID;\n this.customerID = customerID;\n this.orderDate = orderDate;\n this.expectedDeliveryDate = expectedDeliveryDate;\n }",
"@PostMapping(\"/customers\")\r\n\tpublic Customer addCustomer(@RequestBody Customer customer) {\n\t\tcustomer.setId(0);\r\n\t\t\r\n\t\tcustomerService.saveCustomer(customer);\r\n\t\treturn customer;\r\n\t}",
"public String saveCustomerOrder(OrderDetails orderDetails){\n String confirmationNumber = \"SS-\"+ UUID.randomUUID().toString().substring(0, 12).toUpperCase();\n orderDetails.setOrderId(confirmationNumber);\n orderDetails.setOrderStatus(\"In Progress\");\n orderDetails.setOrderDate(new Date().toString());\n orderDetails.setOrderCreateDate(new Date().toString());\n log.info(\"orderDetails- \", orderDetails);\n orderDetails = mongoDbConnector.saveCustomerOrder(orderDetails);\n return orderDetails.getOrderId();\n }",
"void createCustomers() {\r\n\t\tSystem.out.println(\"\\nCreating 5 customers:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\tCustomer2 c2 = new Customer2(\"Serap\", \"Atik\");\r\n\t\tCustomer2 c3 = new Customer2(\"Kemal\", \"Tanir\");\r\n\t\tCustomer2 c4 = new Customer2(\"Betul\", \"Kara\");\r\n\t\tCustomer2 c5 = new Customer2(\"Selman\", \"Saki\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\tem.persist(c2);\r\n\t\tem.persist(c3);\r\n\t\tem.persist(c4);\r\n\t\tem.persist(c5);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}",
"@Override\n\tpublic void createOrder(OrderDto orderDto) {\n\t\tModelMapper modelMapper = new ModelMapper();\n\t\t\n\t\tmodelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);\n\t\t\n\t\tOrderEntity orderEntity = new OrderEntity();\n\t\t//\t\t= modelMapper.map(orderDto, OrderEntity.class);\n\t\t\n\t\t\n\t\torderEntity.setCustomerName(orderDto.getCustomer().getName());\n\t\torderEntity.setEmail(orderDto.getCustomer().getEmail());\n\t\torderEntity.setProductName(orderDto.getProduct().getName());\n\t\torderEntity.setDescription(orderDto.getProduct().getDescription());\n\t\torderEntity.setAmount(orderDto.getAmount());\n\t\torderEntity.setoId(orderDto.getoId());\n\t\torderRepository.save(orderEntity);\n\t\t\t\t\n\t}",
"@RequestMapping(value = \"/customers\", method = RequestMethod.POST)\n public ResponseEntity<?> addCustomer(@RequestBody Customer customer) {\n Customer aNewCustomer = customerService.newCustomer(customer);\n return new ResponseEntity<>(aNewCustomer, HttpStatus.CREATED);\n }",
"private Customer createCustomerInstance(String name, String email, String phoneNumber) {\n Customer customer = new Customer();\n customer.setName(name);\n customer.setEmail(email);\n customer.setPhoneNumber(phoneNumber);\n return customer;\n }",
"public Integer createRecord(Customer customer) {\n\t\treturn (Integer)sessionFactory.getCurrentSession().save(customer);\r\n\r\n\t}",
"@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }",
"@PostMapping(\"/customers\")\n public Customer addCustomer(@RequestBody Customer theCustomer)\n {\n //also just in case they pass an id in JSON .. set id to o\n //this is to force a save of new item ... instead od update\n theCustomer.setId(0);\n customerService.save(theCustomer);\n return theCustomer;\n }",
"@Test\n public void testPopulateNewOrderInfo() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n Order order4 = service.populateNewOrderInfo(order3);\n\n assertEquals(\"Paul\", order4.getCustomerName());\n }",
"public void createCustomerTransaction(String customerId, TransactionData transData) {\n \t\n \tTransaction transEntity = new Transaction();\n \t\n \tBeanUtils.copyProperties(transData, transEntity);\n \ttransEntity.setCustomerId(customerId.trim().toUpperCase());\n \t//Save and flush\n \ttransactionRepository.saveAndFlush(transEntity);\n }",
"private void giveFoodToCustomer(MyCustomer customer) {\n\tDo(\"Giving finished order of \" + customer.choice +\" to \" + customer.cmr);\n\tPosition inFrontOfGrill = new Position(customer.food.getX()-1,customer.food.getY());\n\tguiMoveFromCurrentPostionTo(inFrontOfGrill);//in front of grill\n\twaiter.pickUpFood(customer.food);\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\twaiter.serveFood(tables[customer.tableNum]);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgHereIsYourFood(customer.choice);\n\tstateChanged();\n }",
"@Override\n\tpublic void createSession(String customer) {\n\t\t\n\t}",
"public Customers(int customerId, String customerName, String customerAddress, String customerPostalCode,\n String customerPhone, int divisionId, String divisionName, int countryId, String countryName) {\n this.customerId = customerId;\n this.customerName = customerName;\n this.customerAddress = customerAddress;\n this.customerPostalCode = customerPostalCode;\n this.customerPhone = customerPhone;\n this.divisionId = divisionId;\n this.divisionName = divisionName;\n this.countryId = countryId;\n this.countryName = countryName;\n }",
"private static CreditRequest getRequestDataFromCustomer() {\n\t\treturn new CreditRequest(0, new Vector<Warrantor>(), null, null, null, null);\n\t}",
"void createCustomerAccount(String mobileNumber) throws Exception;",
"CustomerOrder update(CustomerOrder customerOrder);",
"public void createOrder() throws FlooringDaoException {\n boolean validData = true;\n do {\n try {\n Order newOrder = view.getNewOrderInfo();\n service.createOrder(newOrder);\n validData = true;\n } catch (InvalidDataException ex) {\n view.displayError(ex.getMessage());\n validData = false;\n } catch (NumberFormatException ex) {\n view.displayError(\"Area must consist of digits 0-9 with or without a decimal point.\");\n validData = false;\n }\n } while (!validData);\n }"
] | [
"0.7585299",
"0.7468325",
"0.7138208",
"0.69587654",
"0.68756527",
"0.67738205",
"0.66951495",
"0.66735023",
"0.66348135",
"0.6625635",
"0.6625635",
"0.6625635",
"0.6625635",
"0.66164666",
"0.6557073",
"0.6489977",
"0.6433055",
"0.6395181",
"0.6390342",
"0.6367468",
"0.6349795",
"0.6338461",
"0.6317864",
"0.6313251",
"0.6298827",
"0.6296986",
"0.6289523",
"0.628249",
"0.6244532",
"0.6199164",
"0.618403",
"0.61814666",
"0.6170117",
"0.61556965",
"0.6151907",
"0.6140059",
"0.61289144",
"0.6127569",
"0.61064357",
"0.6093272",
"0.60879743",
"0.6074998",
"0.6063599",
"0.6044601",
"0.6037286",
"0.603515",
"0.6034241",
"0.6027939",
"0.6015186",
"0.60147876",
"0.6013875",
"0.60091484",
"0.5998333",
"0.5994048",
"0.59843737",
"0.59843385",
"0.59829694",
"0.59790266",
"0.59711015",
"0.59678584",
"0.59436536",
"0.59224856",
"0.59200567",
"0.59153104",
"0.59121674",
"0.58994526",
"0.589716",
"0.58967066",
"0.58930737",
"0.58909184",
"0.58623344",
"0.58619106",
"0.58562005",
"0.5848019",
"0.5844057",
"0.5836448",
"0.58362496",
"0.5826961",
"0.5825369",
"0.5819268",
"0.58125454",
"0.58117753",
"0.5807421",
"0.579794",
"0.57958454",
"0.5789896",
"0.5779723",
"0.57740086",
"0.57698977",
"0.5766886",
"0.57613146",
"0.5756706",
"0.57449275",
"0.5738791",
"0.5736102",
"0.57353514",
"0.57337064",
"0.572799",
"0.5722616",
"0.57212204"
] | 0.6058147 | 43 |
get the order identified by unique refId for the specific customer identified by the customerRefId | @GetMapping(value = "/{customerRefId}" + AppConstants.ORDER_API
+ "/{refId}", produces = MediaType.APPLICATION_JSON_VALUE)
/*
* @ApiOperation(value = "Order returned according to the sent specification",
* notes =
* "Send GET request to create the order according to the specification." ,
* httpMethod = "GET", code = 200, response = OrderResponse.class, produces =
* MediaType.APPLICATION_JSON_VALUE)
*
* @ApiResponses(value = {
*
* @ApiResponse(code = 200, response = OrderResponse.class, message =
* "Sought order"),
*
* @ApiResponse(code = 401, response = ErrorResponse.class, message =
* "Invalid or expired token provided. Error code: CREDENTIALS_REJECTED"),
*
* @ApiResponse(code = 500, response = ErrorResponse.class, message =
* "Runtime server error occurred. Error code: SERVER_ERROR")})
*/
public OrderResponse getOrderInfo(
@NotBlank @PathVariable(name = "customerRefId", required = true) String customerRefId,
@NotBlank @PathVariable(name = "refId", required = true) String refId) throws NotFoundException {
log.info("hit the controller");
List<OrderResponse> orders = orderService.findByCustomerRefIdAndRefId(customerRefId, refId);
if (orders.size() == 0) {
throw new NotFoundException("ORDER_NOT_FOUND", "Could not find the order " + refId);
}
return orders.get(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic RechargeOrder getByOrderID(String orderId) {\n\t\treturn null;\n\t}",
"public Customer getCustomers(int customerId) {\n for(Customer customer:customers){\n if(customer.getId() == customerId){\n return customer;\n }\n }\n return null;\n }",
"private ObservableList<Order> getAllCustomerOrders(int customerId){\r\n ObservableList<Order> customerOrders = null;\r\n try {\r\n OrderDB odb = new OrderDB();\r\n customerOrders = odb.getAllOrders(customerId);\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n return customerOrders;\r\n }",
"public int getCustomerref() {\n\t\treturn custref;\n\t}",
"public Order getOrderById(long orderId);",
"@Override\n\tpublic RechargeOrder getByOrderIDAndUid(String orderId, Long userId) {\n\t\treturn null;\n\t}",
"io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();",
"Optional<OrdPaymentRefDTO> findOne(Long id);",
"public String getOrderReference() {\n return orderReference;\n }",
"Order getOrder(String orderId) throws OrderBookOrderException;",
"@GetMapping(\"/{customerid}\")\n public ResponseEntity<List<Order>> byCustomer(@PathVariable(value = \"customerid\") Long customerId) {\n return new ResponseEntity<>(orderService.getAllByCustomerId(customerId), HttpStatus.OK);\n }",
"public String getCustomer(String custId);",
"public String getCustomerReference() {\n return customerReference;\n }",
"OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;",
"ClOrderInfo selectByPrimaryKey(String orderId);",
"public Long getRelCustId() {\n return relCustId;\n }",
"Order getByID(String id);",
"@Override\n\tpublic RechargeOrder getByUid(Long userId) {\n\t\treturn null;\n\t}",
"public JSONObject fetchOrder(long orderId) throws Exception;",
"@RequestMapping(value = \"/customerOrders/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<CustomerOrder> getCustomerOrder(@PathVariable Long id) {\n log.debug(\"REST request to get CustomerOrder : {}\", id);\n CustomerOrder customerOrder = customerOrderRepository.findOne(id);\n return Optional.ofNullable(customerOrder)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}",
"List<OrderDTO> findAll(String customerId);",
"public ComplexOrderTO getOrder(long storeID, long orderId) throws NotInDatabaseException;",
"public Customer getCustomer(String cID, ArrayList<Customer> customers) throws NotFoundException\r\n\t{\t\r\n\t\tCustomer cust = null;\r\n\t\tfor(int i=0; i<customers.size(); i++)\r\n\t\t{\r\n\t\t\tif(customers.get(i).getcID().equals(cID))\r\n\t\t\t\tcust = customers.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tif(cust == null)\r\n\t\t\tthrow new NotFoundException(cID);\r\n\t\t\r\n\t\treturn cust;\t\t\r\n\t}",
"public abstract CustomerOrder findOne(Long id);",
"public Order findOrder(String orderID) {\r\n\t\tfor(Order o : orders.values()) {\r\n\t\t\tif(o.getOrderID().equals(orderID)) {\r\n\t\t\t\treturn o;\r\n\t\t\t}\r\n\t\t} return null; \r\n\t}",
"public Order getOrderByID(String order_id) throws Exception {\n\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from ocgr_orders left join ocgr_clients on ocgr_orders.client_id = ocgr_clients.client_id left join ocgr_vendors on ocgr_orders.vendor_id = ocgr_vendors.vendor_id where order_id=? ;\";\n\n\t\tDB db = new DB();\n\n\t\ttry {\n\t\t\tdb.open();\n\t\t\tcon = db.getConnection();\n\n\t\t\tstmt = con.prepareStatement(sql);\n\t\t\tstmt.setString(1,order_id);\n\t\t\trs = stmt.executeQuery();\n\n\t\t\tif (!rs.next()) {\n\t\t\t\trs.close();\n\t\t\t\tstmt.close();\n\t\t\t\tdb.close();\n\n\t\t\t\tthrow new Exception(\"Not valid Order_id\");\n\t\t\t}\n\t\t\tClient client = new Client( rs.getString(\"client_id\"), rs.getString(\"client_password\"), rs.getString(\"client_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"client_fullname\"), rs.getString(\"client_compName\"), rs.getString(\"client_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"client_itin\"), rs.getString(\"client_doy\"), rs.getString(\"client_phone\") );\n\n\t\t\tVendor vendor = new Vendor( rs.getString(\"vendor_id\"), rs.getString(\"vendor_password\"), rs.getString(\"vendor_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_fullname\"), rs.getString(\"vendor_compName\"), rs.getString(\"vendor_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_itin\"), rs.getString(\"vendor_doy\"), rs.getString(\"vendor_phone\") );\n\n\t\t\tOrder order = new Order(rs.getString(\"order_id\"), rs.getTimestamp(\"order_date\"), rs.getBigDecimal(\"order_total\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_address\"), rs.getString(\"order_address\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_paymentmethod\"), client, vendor );\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tdb.close();\n\n\t\t\treturn order;\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdb.close();\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}",
"Customer getCustomerById(int customerId);",
"public Customer getCustomer(int userId) {\n\t\tIterator i = customers.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tCustomer customer = (Customer) i.next();\n\t\t\tif (userId == customer.getUserId()) {\n\t\t\t\treturn customer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String getOrder(String orderId) {\n\t SQLiteDatabase db = this.getReadableDatabase();\n\t \n\t String orderSQLSelect = \"SELECT * FROM \" + ORDER_RECORDS_TABLE + \" WHERE \" + ORDER_NUMBER + \" = '\" + orderId + \"'\";\n\t Cursor cursor = db.rawQuery(orderSQLSelect, null);\n\t \n\t if (cursor != null) { \n\t \tif(cursor.moveToFirst()) {\n\t \t\treturn cursor.getString(0) + \" \" + cursor.getString(3);\n\t \t} else {\n\t \t\treturn null;\n\t \t}\n\t }\n\t\n\t return null;\n\t}",
"@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}",
"public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }",
"public CustomerOrder getOrder() {\n return (CustomerOrder) get(\"order\");\n }",
"protected abstract Order getOrder( int O_W_ID, int O_D_ID, Integer NO_O_ID, int O_CARRIER_ID );",
"Order getOrder(int id) throws ServiceException;",
"Customer getCustomerById(final Long id);",
"public Receipt getReceiptByOrder(Long orderid) {\n\t\tReceipt exreceipt = new Receipt();\n\t\tOrder order = new Order();\n\t\torder.setId(orderid);\n\t\texreceipt.setOrder(order);\n\t\tExample<Receipt> ex = Example.of(exreceipt);\n\t\treturn receiptRepository.findOne(ex);\n\t}",
"public List<CustomerOrder> custOrders(String custid) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic CustomerRec getCustomerRecById(String id) {\n\t\tCustomerRec rec = customerRecDao.selectByPrimaryKey(id);\r\n\t\treturn rec;\r\n\t}",
"public static DTO_JPOS_Customer getCustomer(int customerId,Connection con) {\r\n\t\tLMSDAOFactory factory = LMSDAOFactory.getInstances();\r\n\t\tIJPOS_Customer myCustomer = factory.getJPOS_Customer();\r\n\t\treturn myCustomer.getCustomer(customerId,con);\r\n\t}",
"@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}",
"String getCustomerName(String bookingRef);",
"List<Purchase> retrieveForCustomerID(Long customerID) throws SQLException, DAOException;",
"List<CustomerOrder> getAllCustomerOrder();",
"public Customer getCustomer(String id) {\n\t\tString firstName = \"\";\n//\t\tString lastName = \"\";\n//\t\tString address = \"\";\n//\t\tString creditCard = \"\";\n//\t\tString phone = \"\";\n//\t\tArrayList<Order> orders = new ArrayList<>();\n\t\tConnection connection = DBConnect.getDatabaseConnection();\n\t\t\n\t\ttry {\n\t\t\tStatement selectStatement = connection.createStatement();\n\t\t\t\n\t\t\tString selectQuery = \"SELECT * from Customer where CustomerID='\" + id +\"'\";\n\t\t\tResultSet resultSet = selectStatement.executeQuery(selectQuery);\n\t\t\tresultSet.next();\n\t\t\t\n\t\t\tfirstName = resultSet.getString(\"FName\");\n//\t\t\tlastName = resultSet.getString(\"lastName\");\n//\t\t\taddress = resultSet.getString(\"lastName\"); //TODO update this code: Address has it's own table . access AddressDAO object (use attribute line 21) \n//\t\t\tcreditCard = resultSet.getString(\"creditCard\"); //TODO same as Address. (attribute line 22) \n\n//\t\t\torders = orderDAO.getAllOrders(); //TODO fix me (make sure function returns something).\n\t\t\t\n\t\t}catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\t\n\t\tCustomer customer = new Customer();\n\t\tcustomer.setFirstName(firstName);\n//\t\tcustomer.setLastName(lastName);\n//\t\t//TODO customer.setAddress(address); update\n//\t\t//TODO customer.setCard(creditCard); update\n//\t\tcustomer.setOrders(orders);\n\t\t\n\t\treturn customer;\n\t}",
"public String getOrderId(JsonObject order) {\r\n\t\tint orderID = 0;\r\n\t\tString customerId = order.get(\"customerId\").getAsString();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT * FROM home_heating_fuel_orders\" + \" WHERE customerID = '\" + customerId + \"';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\torderID = Math.max(rs.getInt(\"orderID\"), orderID);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t\treturn orderID + \"\";\r\n\t}",
"public Shoporder GetOrderById(String orderId) {\n\t\treturn mapper.GetOrderById(orderId);\n\t}",
"@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}",
"@GetMapping(\"/{userId}/orders/{orderId}\")\n public OrderDto findOrder(@PathVariable @Positive Long userId,\n @PathVariable @Positive Long orderId) {\n return orderService.findByUserId(userId, orderId);\n }",
"List<Order> getOpenOrders(OpenOrderRequest orderRequest);",
"public List<OrderDetail> getOrderDetailByOrder(Long orderId);",
"@Override\n @Transactional\n public Customer getCustomer(int customerId) {\n Optional<Customer> queryResult = customerRepository.findById(customerId);\n // if null return new Customer(), otherwise return the Customer\n return queryResult.orElseGet(Customer::new);\n }",
"@Override\n\tpublic Customer findCustomer(int customerId) {\n\t\treturn null;\n\t}",
"List<Cargo> getCargoesForOrder(OrderDTO orderDTO);",
"public ShippingOrder getOrderInfoByOrderId(String orderId){\r\n ShippingDataAccess shippingOrder = new ShippingDataAccess(this.sqlServerIp);\r\n String log = null;\r\n ShippingOrder order = shippingOrder.selectShippingOrderByOrderId(orderId, log);\r\n return order;\r\n }",
"public void lookupCustomer(String customerId) {\r\n customer = transaction.getCustomerInfo(customerId);\r\n }",
"public Customer getCustomerBy_id(ObjectId _id) {\n\t\treturn custRepo.findBy_id(_id);\n\t}",
"String getOrderId();",
"public Order getOrderByClientId(String clientOrderId) throws AlpacaAPIException {\n Type objectType = new TypeToken<Order>() {\n }.getType();\n\n AlpacaRequestBuilder urlBuilder = new AlpacaRequestBuilder(apiVersion, baseAccountUrl,\n AlpacaConstants.ORDERS_BY_CLIENT_ORDER_ID_ENDPOINT);\n\n if (clientOrderId != null) {\n try {\n clientOrderId = URLEncoder.encode(clientOrderId, AlpacaConstants.UTF_ENCODING);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n urlBuilder.appendURLParameter(AlpacaConstants.CLIENT_ORDER_ID_PARAMETER, clientOrderId);\n }\n\n HttpResponse<JsonNode> response = alpacaRequest.invokeGet(urlBuilder);\n\n if (response.getStatus() != 200) {\n throw new AlpacaAPIException(response);\n }\n\n return alpacaRequest.getResponseObject(response, objectType);\n }",
"@Override\n\tpublic List<Customer> getCustomerById(int customerid) {\n\t\treturn null;\n\t}",
"public abstract Page<CustomerOrder> findByCustomer(Customer customer, GlobalSearch globalSearch, Pageable pageable);",
"static orders getOrder(String uid) {\n return null;\n }",
"@Override\n\tpublic Customer getCustomerById(long customerId) {\n\t\treturn null;\n\t}",
"List<OrdPaymentRefDTO> findAll();",
"public Customer getCustomer() {\n String __key = this.customerId;\n if (customer__resolvedKey == null || customer__resolvedKey != __key) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n CustomerDao targetDao = daoSession.getCustomerDao();\n Customer customerNew = targetDao.load(__key);\n synchronized (this) {\n customer = customerNew;\n \tcustomer__resolvedKey = __key;\n }\n }\n return customer;\n }",
"public OrderDetail getOrderDetail(final String id);",
"public ServiceOrder retrieveServiceOrder( String orderid) {\r\n\t\tlogger.info(\"will retrieve Service Order from catalog orderid=\" + orderid );\r\n\t\ttry {\r\n\t\t\tObject response = template.\r\n\t\t\t\t\trequestBody( CATALOG_GET_SERVICEORDER_BY_ID, orderid);\r\n\t\t\t\r\n\t\t\tif ( !(response instanceof String)) {\r\n\t\t\t\tlogger.error(\"Service Order object is wrong.\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"retrieveServiceOrder response is: \" + response);\r\n\t\t\tServiceOrder sor = toJsonObj( (String)response, ServiceOrder.class); \r\n\t\t\t\r\n\t\t\treturn sor;\r\n\t\t\t\r\n\t\t}catch (Exception e) {\r\n\t\t\tlogger.error(\"Cannot retrieve Service Order details from catalog. \" + e.toString());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public List getOrderDetails(OrderDetail orderDetail);",
"@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }",
"List<Order> findClientOrders(long clientId) throws DaoProjectException;",
"List<LineItem> listLineItemByOrderId(Integer orderId);",
"private Customer findCustomer(String customerName){\n for(int i=0; i<customers.size(); i+=1){\n Customer existingCustomer = this.customers.get(i);\n if(existingCustomer.getName().equals(customerName)){\n return existingCustomer;\n }\n }\n return null;\n }",
"public Order find_Order(Integer order_id, Integer branch_id) {\n return order_dao.find(order_id, branch_id);\n }",
"public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}",
"Order getOrder();",
"Optional<Order> findByUserId(long userId);",
"public CustomerOrderDetails fallbackGetOrders(Long orderId) {\n\n\t\tCustomerOrderDetails orderDetails = CustomerOrderDetails.builder().orderId(0L)\n\t\t\t\t.externalReference(\"not available\").items(null).build();\n\n\t\treturn orderDetails;\n\n\t}",
"public void setRelCustId(Long relCustId) {\n this.relCustId = relCustId;\n }",
"BonusResponse get(Long customerId, Long bonusId);",
"public static Customer getCustomer(int _customerID) throws SQLException{\n ResultSet rs = ConnectionManager.selectAllColumns(\"Tbl_Customer_GroupNo\", \"CustomerID= \"+_customerID);\n if(rs.next()){\n Customer cus = new Customer(rs.getInt(\"CustomerId\"), rs.getString(\"FirstName\"), rs.getString(\"LastName\"), rs.getString(\"Address\"), rs.getString(\"Email\"), rs.getString(\"Phone\"));\n return cus;\n }else{\n return null;\n }\n }",
"@Override\n public Collection<Order> getOrdersByUserId(String id) {\n Collection<Order> orders = getAll();\n return orders.stream()\n .filter(x -> x.getCustomerId().equals(id))\n .collect(Collectors.toList());\n }",
"@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}",
"public Order readOrder(Long id)\n {\n Long customerID = null;\n List<Item> orderItems = new ArrayList<>();\n\n String sql = \"SELECT customerID FROM orders WHERE id = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n resultSet.next();\n customerID = resultSet.getLong(\"customerID\");\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n\n sql = \"SELECT items.* FROM order_items LEFT JOIN items ON order_items.itemID = items.id WHERE orderID = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n while(resultSet.next())\n {\n orderItems.add(modelItemFromResultSet(resultSet));\n }\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n return new Order(id, customerID, orderItems);\n }",
"public CustomerPath customer() {\n if (_customer == null)\n _customer = new CustomerPath(this, Keys.PAYMENT_P2007_03__PAYMENT_P2007_03_CUSTOMER_ID_FKEY, null);\n\n return _customer;\n }",
"public List<String> getActivePaymentRequestDocumentNumbersForPurchaseOrder(Integer purchaseOrderId);",
"@GetMapping(value = \"farmers/{farmId}/orders/{orderId}\")\n @ApiOperation(value = \"Get an order by farmId and orderId\", response = ApiResponse.class)\n public ResponseEntity<ApiResponse> getFarmOrder(\n @PathVariable(\"farmId\") UUID farmId, @PathVariable(\"orderId\") UUID orderId) {\n return ApiMapper.buildResponseEntity(\n List.of(ApiMapper.toDeliveryResponse(deliveryService.getDeliveryOrder(farmId, orderId))),\n HttpStatus.OK);\n }",
"List<OrderDto> getAllOrders(String restaurantId);",
"public Customer getSpecificCustomerById(String customerId){\n Customer specificCustomer = null;\n\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email FROM Customer WHERE CustomerId=?\");\n preparedStatement.setString(1, customerId);\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n specificCustomer = new Customer(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\")\n );\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return specificCustomer;\n }",
"public String getOrderDocId() {\r\n return this.orderDocId;\r\n }",
"public Order getOrder(Business business, Long orderId) {\n\t\tcheckNotNull(business, \"business was null\");\n\t\t\t\n\t\ttry {\n\t\t\treturn orderRepo.getById(business.getKey(), orderId);\n\t\t} catch (com.googlecode.objectify.NotFoundException e) {\n\t\t\tlogger.error(\"Unable to get order, order or business id unknown\", e);\n\t\t\treturn null;\n\t\t}\n\t}",
"Order requireById(Long orderId);",
"@Override\n\tpublic Customer getCustomer(Integer id) {\n\t\treturn customerDao.findById(id);\n\t}",
"public String getCustomerContactRecordCustomerReference() {\n return customerContactRecordCustomerReference;\n }",
"public OrderDetail getOrderDetail(int order_detail_id) {\n SQLiteDatabase db = this.getReadableDatabase();\n String sqlSelectQuery = \"SELECT * FROM \" + CoffeeShopDatabase.OrderDetailTable.TABLE_NAME +\n \" WHERE \" + CoffeeShopDatabase.OrderDetailTable._ID + \" = \" + order_detail_id;\n Cursor cursor = db.rawQuery(sqlSelectQuery, null);\n if (cursor != null) {\n cursor.moveToFirst();\n }\n OrderDetail orderDetail = new OrderDetail(\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable._ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_ORDER_ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_DRINK_ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_QUANTITY))\n );\n return orderDetail;\n }",
"public List<Map<String, Object>> getOrder(String id);",
"private void getOrderFromDatabase() {\r\n Cursor cursor = helper.getOrderMoreDetails(orderId);\r\n cursor.moveToFirst();\r\n try {\r\n JSONObject senderObject = new JSONObject(cursor.getString(0));\r\n sender = senderObject.getString(\"name\");\r\n JSONObject receiverObject = new JSONObject(cursor.getString(1));\r\n receiver = receiverObject.getString(\"name\");\r\n JSONObject departureObject = new JSONObject(cursor.getString(2));\r\n if (departureObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n departure = departureObject.getString(\"long_name\");\r\n else\r\n departure = departureObject.getString(\"short_name\");\r\n JSONObject destinationObject = new JSONObject(cursor.getString(3));\r\n if (destinationObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n destination = destinationObject.getString(\"long_name\");\r\n else\r\n destination = destinationObject.getString(\"short_name\");\r\n numberOfGoods = cursor.getInt(4);\r\n orderTime = cursor.getString(5);\r\n state = cursor.getString(6);\r\n JSONArray goodIdArray = new JSONArray(cursor.getString(7));\r\n goodId = new String[goodIdArray.length()];\r\n for (int i = 0; i < goodIdArray.length(); i++) {\r\n goodId[i] = goodIdArray.getString(i);\r\n }\r\n orderType = cursor.getString(8);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n cursor.close();\r\n }",
"OrderModel getOrderForCode(CustomerModel currentUser, String code, BaseStoreModel baseStoreModel);",
"@Override\n\t@Transactional\n\tpublic Customer getCustomer(int theId) {\n\t\t;\n\t\treturn customerDAO.getCustomer(theId);\n\t}",
"@PostMapping(value = \"/{customerRefId}\"\n\t\t\t+ AppConstants.ORDER_API, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\t/*\n\t * @ApiOperation(value = \"Order created according to the sent specification\",\n\t * notes =\n\t * \"Send POST request to create the order according to the specification.\" ,\n\t * httpMethod = \"GET\", code = 200, response = OrderResponse.class, produces =\n\t * MediaType.APPLICATION_JSON_VALUE)\n\t * \n\t * @ApiResponses(value = {\n\t * \n\t * @ApiResponse(code = 200, response = OrderResponse.class, message =\n\t * \"Created order\"),\n\t * \n\t * @ApiResponse(code = 401, response = ErrorResponse.class, message =\n\t * \"Invalid or expired token provided. Error code: CREDENTIALS_REJECTED\"),\n\t * \n\t * @ApiResponse(code = 500, response = ErrorResponse.class, message =\n\t * \"Runtime server error occurred. Error code: SERVER_ERROR\")})\n\t */\n\tpublic OrderResponse createOrder(\n\t\t\t@NotBlank @PathVariable(name = \"customerRefId\", required = true) String customerRefId,\n\t\t\t@Valid @RequestBody OrderRequest orderRequest, BindingResult result, Model m)\n\t\t\tthrows BadRequestException, InsufficientPermissionsException {\n\t\tlog.info(\"hit the controller\");\n\t\tif (result.hasErrors()) {\n\t\t\tlog.info(\"not able to handle error\");\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tresult.getAllErrors().forEach(error -> builder.append(error.toString()));\n\t\t\tthrow new BadRequestException(\"BAD_REQUEST\", builder.toString());\n\t\t}\n\t\tlog.info(\"orderService doesn't create order\");\n\t\treturn orderService.createOrder(orderRequest, customerRefId);\n\t}",
"public Customer getCustomerByName(String customerName);"
] | [
"0.5868262",
"0.5867876",
"0.58582705",
"0.5797153",
"0.5796877",
"0.57913554",
"0.57237536",
"0.56981206",
"0.56713",
"0.56522495",
"0.56428105",
"0.56306493",
"0.5611965",
"0.557873",
"0.55706316",
"0.5567258",
"0.552785",
"0.55061",
"0.5488608",
"0.54507995",
"0.54499453",
"0.5445926",
"0.54453635",
"0.5435569",
"0.54325485",
"0.54048216",
"0.5402568",
"0.5402015",
"0.53901047",
"0.5375823",
"0.5339658",
"0.53268415",
"0.53260773",
"0.53214014",
"0.53146267",
"0.5313708",
"0.53009075",
"0.52847147",
"0.5272119",
"0.52707505",
"0.5270137",
"0.52588755",
"0.52571344",
"0.5236364",
"0.52317387",
"0.5230596",
"0.5225702",
"0.52215713",
"0.52072823",
"0.5206552",
"0.5198908",
"0.519584",
"0.5191848",
"0.5183736",
"0.5178968",
"0.51757586",
"0.5170767",
"0.5150498",
"0.5148944",
"0.514333",
"0.5131334",
"0.5128328",
"0.51161087",
"0.5099847",
"0.5089622",
"0.50889236",
"0.5080077",
"0.50782365",
"0.5074022",
"0.5066395",
"0.5064391",
"0.5063059",
"0.50612926",
"0.5057932",
"0.50451803",
"0.5034861",
"0.50328285",
"0.50327075",
"0.5027847",
"0.50266975",
"0.50256854",
"0.50129366",
"0.5010441",
"0.5007262",
"0.50047386",
"0.5004288",
"0.4996916",
"0.4996102",
"0.49703798",
"0.4965495",
"0.49632657",
"0.49621907",
"0.4952606",
"0.4946855",
"0.49381137",
"0.49372292",
"0.49344388",
"0.4922578",
"0.49200767",
"0.49145257"
] | 0.6802357 | 0 |
method to find LCA | public void LCA(int d1, int d2) {
this.LCA(this.root, d1, d2);
this.LCAHeight(this.root, d1, d2);
this.LCADiameter(this.root, d1, d2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int findLCA(int a, int b) {\n int n1 = (depth[a] > depth[b]) ? a : b;\n int n2 = (depth[a] > depth[b]) ? b : a;\n\n int toMove = depth[n1] - depth[n2];\n for (int i = 17; i >= 0; i--) {\n if (lcaSteps[i] <= toMove) {\n n1 = lcaArr[i][n1];\n toMove -= lcaSteps[i];\n }\n }\n\n // Find LCA\n if (n1 == n2) return n1;\n else {\n for (int i = 17; i >= 0; i--) {\n if (lcaArr[i][n1] != lcaArr[i][n2]) {\n n1 = lcaArr[i][n1];\n n2 = lcaArr[i][n2];\n }\n }\n }\n\n return lcaArr[0][n1];\n }",
"int getLac();",
"private Node findLCA(Node n1, Node n2) {\n\t\tif (n1 == n2) {\n\t\t\treturn n1;\n\t\t}\n\t\treturn findLCA(n1.parent, n2.parent);\n\t}",
"Tree findLCA(Tree tree, int n1, int n2){\n\n if(tree == null){\n return null;\n }\n\n\n // If either n1 or n2 matches with root's key, report\n // the presence by returning root (Note that if a key is\n // ancestor of other, then the ancestor key becomes LCA\n if(tree.data==n1 || tree.data==n2){\n return tree;\n }\n\n Tree leftLCA = findLCA(tree.left, n1, n2);\n Tree rightLCA = findLCA(tree.right, n1, n2);\n\n // If both of the above calls return Non-NULL, then one key\n // is present in once subtree and other is present in other,\n // So this node is the LCA\n if(leftLCA!=null && rightLCA!=null) {\n return tree;\n }\n\n return leftLCA!=null?leftLCA:rightLCA;\n\n}",
"public static void main(String[] args) {\n\t\tNode root = TreeUtilA.createNewTreeA1();\n\t\tint n1 = 4;\n\t\tint n2 = 6;\n\t\t\n\t\tNode lca = findLCA(root, n1, n2);\n\t\tSystem.out.println(lca.data);\n\t}",
"public static void main(String args[])\r\n{\r\n // Let us create the Binary Tree shown in above diagram.\r\n BTNode root = newNode(1);\r\n root.left = newNode(2);\r\n root.right = newNode(3);\r\n root.left.left = newNode(4);\r\n root.left.right = newNode(5);\r\n root.right.left = newNode(6);\r\n root.right.right = newNode(7);\r\n System.out.println(findLCA(root, 4, 5));\r\n System.out.println(findLCA(root, 4, 6));\r\n System.out.println(findLCA(root, 3, 4));\r\n System.out.println(findLCA(root, 2, 4));\r\n}",
"public Node findLCA(Node root, int n1, int n2){\n\t\tif(root == null)\n\t\t\treturn null;\n\t\telse if(root.data > n1 && root.data > n2)\n\t\t\treturn findLCA(root.left, n1, n2);\n\t\telse if(root.data < n1 && root.data < n2)\n\t\t\treturn findLCA(root.right, n1, n2);\n\t\treturn root;\n\t}",
"public static void main(String args[]) {\n\t\tBNode root = new BNode(4);\n\t\troot.left = new BNode(2);\n\t\troot.right = new BNode(6);\n\t\troot.left.left = new BNode(1);\n\t\troot.left.right = new BNode(3);\n\t\troot.right.left = new BNode(5);\n\t\troot.right.right = new BNode(7);\n\t\tSystem.out.println(\"LCA(4, 5) = \" + findLCA(root, 4, 5).data);\n\t\tSystem.out.println(\"itr LCA(4, 5) = \" + lcaIterative(root, 4, 5).data);\n\t\tSystem.out.println(\"LCA(4, 6) = \" + findLCA(root, 4, 6).data);\n\t\tSystem.out.println(\"itr LCA(4, 6) = \" + lcaIterative(root, 4, 6).data);\n\t\tSystem.out.println(\"LCA(3, 4) = \" + findLCA(root, 3, 4).data);\n\t\tSystem.out.println(\"itr LCA(3, 4) = \" + lcaIterative(root, 3, 4).data);\n\t\tSystem.out.println(\"LCA(2, 4) = \" + findLCA(root, 2, 4).data);\n\t\tSystem.out.println(\"itr LCA(2, 4) = \" + lcaIterative(root, 2, 4).data);\n\t\t\n\t\tSystem.out.println(\"itr LCA(2, 9) = \" + lcaIterative(root, 2, 9).data);\n\n\t\tBNode root2 = new BNode(4);\n\t\troot2.left = new BNode(2);\n\t\troot2.right = new BNode(6);\n\t\troot2.left.left = new BNode(1);\n\t\troot2.left.right = new BNode(3);\n\t\troot2.right.left = new BNode(5);\n\t\troot2.right.right = new BNode(7);\n\t\troot2.right.right.right = new BNode(8);\n\t\tSystem.out.println(\"-----------------------------------------------\");\n\t\tSystem.out.println(\"Dist (4, 5) = \" + findDistance(root2, 4, 5));\n\t\tSystem.out.println(\"Dist itr (4, 5) = \" + findDistance2(root2, 4, 5));\n\n\t\tSystem.out.println(\"Dist(4, 6) = \" + findDistance(root2, 4, 6));\n\t\tSystem.out.println(\"Dist itr (4, 6) = \" + findDistance2(root2, 4, 6));\n\n\t\tSystem.out.println(\"Dist(3, 4) = \" + findDistance(root2, 3, 4));\n\t\tSystem.out.println(\"Dist itr(3, 4) = \" + findDistance2(root2, 3, 4));\n\n\t\tSystem.out.println(\"Dist(2, 4) = \" + findDistance(root2, 2, 4));\n\t\tSystem.out.println(\"Dist itr(2, 4) = \" + findDistance2(root2, 2, 4));\n\n\t\tSystem.out.println(\"Dist(8, 5) = \" + findDistance(root2, 8, 5));\n\t\tSystem.out.println(\"Dist itr(8, 5) = \" + findDistance2(root2, 8, 5));\n\n\t}",
"int LCA(int level[], int parent[], int x, int y) {\n while (rootOfSubtree[x] != rootOfSubtree[y]) {\n if (level[x] > level[y]) {\n x = rootOfSubtree[x];\n } else {\n y = rootOfSubtree[y];\n }\n }\n //now they are in the same section, so we trivially compute the LCA\n while (x != y) {\n if (level[x] > level[y]) {\n x = parent[x];\n } else {\n y = parent[y];\n }\n }\n return x;\n }",
"public int getLac() {\n return lac_;\n }",
"public int getLac() {\n return lac_;\n }",
"static // Returns LCA if node n1, n2 are present in the given binary tree,\r\n// otherwise return -1\r\nint findLCA(BTNode root, int n1, int n2)\r\n{\n int[] path1 = null, path2 = null;\r\n \r\n // Find paths from root to n1 and root to n1. If either n1 or n2\r\n // is not present, return -1\r\n if ( !findPath(root, path1, n1) || !findPath(root, path2, n2))\r\n return -1;\r\n \r\n /* Compare the paths to get the first different value */\r\n int i;\r\n for (i = 0; i < path1.length && i < path2.length ; i++)\r\n if (path1[i] != path2[i])\r\n break;\r\n return path1[i-1];\r\n}",
"public TreeNode LCA(TreeNode root, int num1, int num2){\n if(root == null) return null;\n if(root.data < num1 && root.data < num2) {\n return LCA(root.right, num1, num2);\n }\n if(root.data > num1 && root.data > num2) {\n return LCA(root.left, num1, num2);\n }\n return root;\n }",
"TreeNode LCA(TreeNode root, TreeNode a, TreeNode b) {\n\t\t// teacher tang class ref\n\t\tif (root == null || root == a || root == b) {\n\t\t\treturn root;\n\t\t}\n\t\tTreeNode lc = LCA(root.left, a, b);\n\t\tTreeNode rc = LCA(root.right, a, b);\n\t\tif (lc != null && rc != null) {\n\t\t\treturn root;\n\t\t}\n\t\treturn lc == null ? rc : lc;\n\t}",
"public static void main(String[] args){\n\t\tSystem.out.println(Lcs.lcs(\"abc\", \"ac\"));\n\t\t//System.out.println(Lcs.lcs(\"abcdef\", \"abc\"));\n\t\t//System.out.println(Lcs.lcs(\"abcdef\", \"acf\"));\n\t\t\n\t}",
"public static int lca(Node node, int d1, int d2) {\n ArrayList<Integer> al1=nodeToRootPath(node,d1);\n ArrayList<Integer> al2=nodeToRootPath(node,d2);\n\n\n int l1=al1.size()-1;\n int l2=al2.size()-1;\n\n while(l1>=0 && l2>=0){\n if(al1.get(l1)==al2.get(l2))\n {\n l1--;\n l2--;\n continue;\n }\n else\n break;\n }\n if(l1==al1.size()-1)\n return -1;\n return al1.get(l1+1);\n }",
"public static void main(String[] args) {\n\t\troot=new Node(1);\r\n\t\troot.left=new Node(2);\r\n\t\troot.right=new Node(3);\r\n\t\troot.left.left=new Node(4);\r\n\t\troot.left.right=new Node(5);\r\n\t\troot.right.left=new Node(6);\r\n\t\troot.right.right=new Node(7);\r\n\t\troot.left.left.left=new Node(8);\r\n\t\troot.left.left.right=new Node(9);\r\n\t\troot.left.right.left=new Node(10);\r\n\t\troot.left.right.right=new Node(11);\r\n\t\tNode temp1=root.left.left.left;\r\n\t\tNode temp2=root.left.right;\r\n\t\tSystem.out.println(LCA(root,temp1,temp2).data);\r\n\t}",
"static Node findNode(Node root, int a, int b, int c) {\n Node x = getLCA(root, a, b);\n\n // lca of b, c\n Node y = getLCA(root, b, c);\n\n // lca of c, a\n Node z = getLCA(root, c, a);\n\n if (x.data == y.data)\n return z;\n else if (x.data == z.data)\n return y;\n else\n return x;\n }",
"public java.lang.String getCA() {\n return CA;\n }",
"@Override\n\tpublic CiaL getCiaLByName(String nameCiaL) {\n\t\treturn _ciaLDao.getCiaLByName(nameCiaL);\n\t}",
"String getCADENA_TRAMA();",
"public static int lca(Node node, int d1, int d2){\r\n ArrayList<Integer> path1 = nodeToRootPath(node, d1);\r\n ArrayList<Integer> path2 = nodeToRootPath(node, d2);\r\n \r\n //Traverse from behind to avoid time complexity\r\n int i = path1.size() - 1;\r\n int j = path2.size() - 1;\r\n \r\n //Check for valid iterations and till the time data is common, first occurence of diff data in arraylist is the time to stop\r\n while(i>=0 && j>=0 && path1.get(i) == path2.get(j)){\r\n i--; j--;\r\n }\r\n \r\n //Return the last common element from behind in ArrayList\r\n return path1.get(i+1);\r\n }",
"public long getLA() {\n return la;\n }",
"public BTNode LCA(BTNode root, BTNode p, BTNode q) \n {\n \t if(root==null || p==null || q == null)\n \t {\n \t \treturn null;\n \t }\n \t \n \t \n \t if(root==p || root==q)\n \t {\n \t return root;\n \t }\n \t \n \t BTNode l = LCA(root.left, p, q);\n \t BTNode r = LCA(root.right, p, q);\n \t \n \t if(l!=null&&r!=null)\n \t {\n \t return root;\n \t }else if(l==null&&r==null)\n \t {\n \t return null;\n \t }else\n \t {\n \t return l==null?r:l;\n \t }\n }",
"double find_aoa_of_given_lift (double lift, double cl_to_alpha) {\n // L = Cl * A * .5 * rho * V^2 , \n // in foilsim. L = fconv * current_part.cl * q0_EN * area / lconv / lconv; \n // so...\n double cl_required = lift / ( q0_SI * strut.span * strut.chord * (1- alt_val/100));\n double aoa = cl_required * cl_to_alpha;\n // NEED to DEBUG the incremental increse in above!!\n // but for now, the above ad hoc formula gives OK approximation, use it...\n // double k_alt = (Math.pow(alt_val/100, 1.7));\n // return 0.9 * k_alt;\n return aoa;\n }",
"public static BNode lcaIterative(BNode root, int n1, int n2) {\n\t\twhile (root != null) {\n\t\t\t// If both n1 and n2 are smaller than root, then LCA lies in left\n\t\t\tif (root.data > n1 && root.data > n2)\n\t\t\t\troot = root.left;\n\n\t\t\t// If both n1 and n2 are greater than root, then LCA lies in right\n\t\t\telse if (root.data < n1 && root.data < n2)\n\t\t\t\troot = root.right;\n\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\treturn root;\n\n\t}",
"public static void demo_LCS(RoWordNet RoWN) throws Exception {\n Timer timer = new Timer();\n String lcs;\n\n boolean allowAllRelations = true;\n\n Literal l1 = new Literal(\"viață\");\n Literal l2 = new Literal(\"vietate\");\n String s1 = RoWN.getSynsetsFromLiteral(l1).get(5).getId();\n String s2 = RoWN.getSynsetsFromLiteral(l2).get(0).getId();\n\n Literal l3 = new Literal(\"fenomen\");\n Literal l4 = new Literal(\"proces\");\n String s3 = RoWN.getSynsetsFromLiteral(l3).get(1).getId();\n String s4 = RoWN.getSynsetsFromLiteral(l4).get(1).getId();\n\n IO.outln(\"\\n*** Searching for the LCS with all relations as the allowed relation ...\");\n timer.start();\n IO.outln(\"Source synset: \" + s1 + \" \" + ((Synset) RoWN\n .getSynsetById(s1)).toString());\n IO.outln(\"Target synset: \" + s2 + \" \" + ((Synset) RoWN\n .getSynsetById(s2)).toString());\n lcs = SimilarityMetrics\n .lowestCommonSubsumer(RoWN, s1, s2, allowAllRelations);\n IO.outln(\"LCS found: \" + lcs + \" \" + ((Synset) RoWN.getSynsetById(lcs))\n .toString());\n IO.outln();\n IO.outln(\"Done: \" + timer.mark());\n\n allowAllRelations = false;\n IO.outln(\"\\n*** Searching the LCS with only hypernymy as allowed edge ...\");\n timer.start();\n IO.outln(\"Source synset: \" + s3 + \" \" + ((Synset) RoWN\n .getSynsetById(s3)).toString());\n IO.outln(\"Target synset: \" + s4 + \" \" + ((Synset) RoWN\n .getSynsetById(s4)).toString());\n lcs = SimilarityMetrics\n .lowestCommonSubsumer(RoWN, s3, s4, allowAllRelations);\n IO.outln(\"LCS found: \" + lcs + \" \" + ((Synset) RoWN.getSynsetById(lcs))\n .toString());\n IO.outln();\n IO.outln(\"Done: \" + timer.mark());\n }",
"int getCedula();",
"public TreeNode LCA(TreeNode root, TreeNode p, TreeNode q) {\n if (root == null || root == p || root == q) {\n return root;\n }\n TreeNode left = LCA(root.left, p, q);\n TreeNode right = LCA(root.right, p, q);\n if (left == null) {\n return right;\n }\n if (right == null) {\n return left;\n }\n return root;\n }",
"private BinaryNode lca(BinaryNode node, E a, E b){\n if (exists(node.left, a) && exists(node.left, b)) return lca(node.left, a, b);\n else if (exists(node.right, a) && exists(node.right, b))return lca(node.right, a, b);\n else return node;\n }",
"public BigDecimal getCOVERING_ACC_SL() {\r\n return COVERING_ACC_SL;\r\n }",
"public TreeNode LCA(TreeNode root, TreeNode one, TreeNode two) {\r\n\t\t// base case\r\n\t\tif (root == null || root == one || root == two) {\r\n\t\t\treturn root;\r\n\t\t}\r\n\t\t\r\n\t\t// recursion rules\r\n\t\tTreeNode lchild = LCA(root.left, one, two);\r\n\t\tTreeNode rchild = LCA(root.right, one, two);\r\n\t\t\r\n\t\tif(lchild == null && rchild == null) { // case 1.1 and 2.1\r\n\t\t\treturn null;\r\n\t\t} else if (lchild != null && rchild != null) { // case 2.3\r\n\t\t\treturn root;\r\n\t\t}\r\n\t\t\r\n\t\treturn lchild == null ? rchild : lchild; // case 1.2 and 2.2\r\n\t}",
"com.google.protobuf.ByteString getExplicitLac();",
"public static Node findLca(Node root, Node node1, Node node2) {\n if (node1 == null || node2 == null) return null;\n if (root == null)\n throw new NullPointerException(\"Root in null\");\n\n Node temp = root;\n while (temp != null) {\n if (temp == node1 || temp == node2) return temp;\n Node left = temp.left;\n Node right = temp.right;\n\n if ((isLeft(temp, node1) && isRight(temp, node2))\n || (isLeft(temp, node2) && isRight(temp, node1))) {\n return temp;\n } else {\n if (isRight(temp, node1)) {\n temp = right;\n } else {\n temp = left;\n }\n }\n }\n\n return null;\n }",
"public abstract int forca();",
"int getC();",
"private static Node1 lca(Node1 root, int v1, int v2) {\n\t\tif (root.data < v1 && root.data < v2) return lca(root.right, v1, v2); //if root is smaller than vertexes\n\t\tif (root.data > v1 && root.data > v2) return lca(root.left, v1, v2); //if root is bigger than vertexes\n\t\treturn root; //else if is between vertexes the root is the lowest common divisor\n\t}",
"public static void main(String[] args) {\n LowestCommonAncestor obj = new LowestCommonAncestor();\n obj.insert(4);\n obj.insert(2);\n obj.insert(1);\n obj.insert(3);\n obj.insert(6);\n obj.insert(5);\n obj.insert(7);\n System.out.println(\"LCA of 2 numbers is \" + obj.lcaRecursive(obj.root, 1,3).data);\n obj.inorder(obj.root);\n }",
"public BigDecimal getACC_SL() {\r\n return ACC_SL;\r\n }",
"public static Node LCA2(Node root, int n1, int n2) {\n if(root != null){\n if(root.data == n1 || root.data == n2)\n return root;\n\n Node l = LCA2(root.left, n1, n2);\n Node r = LCA2(root.right, n1, n2);\n if(l != null && r != null)\n return root;\n else if( l != null)\n return l;\n else if( r != null)\n return r;\n }\n return null;\n }",
"public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Catalogo_causalLocal getCatalogo_causal();",
"public float getDCA();",
"private int lcs(String word1, String word2) {\n int m = word1.length();\n int n = word2.length();\n int[][] dp = new int[m + 1][n + 1];\n //mem[i][j] means the LCS length formed by A[:i] and B[:j]\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if (word1.charAt(i) == word2.charAt(j)) {\n dp[i + 1][j + 1] = dp[i][j] + 1;\n } else {\n dp[i + 1][j + 1] = Math.max(dp[i + 1][j], dp[i][j + 1]);\n }\n }\n }\n return dp[m][n];\n }",
"AlgebraicTerm getAlgebraicTermL();",
"public static Node LCA_BasedOnFindNode(Node r, int n1, int n2){\n if(r != null){\n if(r.data == n1 || r.data == n2)\n return r;\n\n Node left = LCA_BasedOnFindNode(r.left, n1, n2); \n Node right = LCA_BasedOnFindNode(r.right, n1, n2);\n\n if(left != null && right != null)\n return r;\n else if(left != null)\n return left;\n else if(right != null)\n return right;\n \n }\n return null;\n }",
"public BigDecimal getCOVERING_ACC_GL() {\r\n return COVERING_ACC_GL;\r\n }",
"@Override\n\tpublic CiaL getCiaLById(Long idCiaL) {\n\t\treturn _ciaLDao.getCiaLById(idCiaL);\n\t}",
"public int getLC() {\n return this.lc;\n }",
"public static void main(String[] args) {\n \t\tTreeNode root = new TreeNode(3);\n \t\tTreeNode n5 = new TreeNode(5);\n \t\tTreeNode n1 = new TreeNode(1);\n \t\tTreeNode n6 = new TreeNode(6);\n \t\tTreeNode n2 = new TreeNode(2);\n \t\tTreeNode n7 = new TreeNode(7);\n \t\tTreeNode n4 = new TreeNode(4);\n \t\tTreeNode n0 = new TreeNode(0);\n \t\tTreeNode n8 = new TreeNode(8);\n \t\t\n \t\troot.left = n5;\n \t\troot.right = n1;\n \t\tn5.left = n6;\n \t\tn5.right =n2;\n \t\tn2.left = n7;\n \t\tn2.right = n4;\n \t\tn1.left = n0;\n \t\tn1.right = n8;\n \n \t\tint i = 6;\n \t\tint j = 0;\n \t\t\n \t\tSystem.out.println(\"Least common ancestor of \" + i + \" and \" + j + \" is \" + lca(root, i, j));\n }",
"public int getLC() {\n\treturn lc;\n }",
"static void setupLCA() {\n maxDepth = 0;\n depth = new int[N]; // store the depth of each node\n firstParents = new int[N]; // the immediate parent\n firstParents[0] = 0;\n depth[0] = 0;\n dfs(0);\n int power = 1;\n // Increase the power higher until we go over the maxDepth\n // This will be one more than we need\n while (1 << power <= maxDepth) {\n power++;\n }\n parent = new int[power][N]; // go up 2^power from node i of N\n // Now, use that initial information acquired from the dfs to build\n // base cases of the sparse tables!\n for (int node = 0; node < N; node++) {\n parent[0][node] = firstParents[node];\n }\n // Necessary to set everything else to zero for now, so\n // that we never get confused if we are out of bounds\n\n // Must fill it up with -1's\n for (int p = 1; p < parent.length; p++) {\n for (int i = 0; i < N; i++) {\n parent[p][i] = -1;\n }\n }\n // p represents going up by 1 << p\n for (int p = 1; p < parent.length; p++) {\n for (int node = 0; node < N; node++) {\n if (parent[p - 1][node] != -1) {\n int myParent = parent[p - 1][node];\n parent[p][node] = parent[p-1][myParent];\n }\n }\n }\n }",
"Lingua getLingua();",
"public String getAllele1(int index);",
"private static int cprNLFunction(double lat) {\n\t\tif (lat < 0)\n\t\t\tlat = -lat; // Table is symmetric about the equator\n\t\tif (lat < 10.47047130)\n\t\t\treturn 59;\n\t\tif (lat < 14.82817437)\n\t\t\treturn 58;\n\t\tif (lat < 18.18626357)\n\t\t\treturn 57;\n\t\tif (lat < 21.02939493)\n\t\t\treturn 56;\n\t\tif (lat < 23.54504487)\n\t\t\treturn 55;\n\t\tif (lat < 25.82924707)\n\t\t\treturn 54;\n\t\tif (lat < 27.93898710)\n\t\t\treturn 53;\n\t\tif (lat < 29.91135686)\n\t\t\treturn 52;\n\t\tif (lat < 31.77209708)\n\t\t\treturn 51;\n\t\tif (lat < 33.53993436)\n\t\t\treturn 50;\n\t\tif (lat < 35.22899598)\n\t\t\treturn 49;\n\t\tif (lat < 36.85025108)\n\t\t\treturn 48;\n\t\tif (lat < 38.41241892)\n\t\t\treturn 47;\n\t\tif (lat < 39.92256684)\n\t\t\treturn 46;\n\t\tif (lat < 41.38651832)\n\t\t\treturn 45;\n\t\tif (lat < 42.80914012)\n\t\t\treturn 44;\n\t\tif (lat < 44.19454951)\n\t\t\treturn 43;\n\t\tif (lat < 45.54626723)\n\t\t\treturn 42;\n\t\tif (lat < 46.86733252)\n\t\t\treturn 41;\n\t\tif (lat < 48.16039128)\n\t\t\treturn 40;\n\t\tif (lat < 49.42776439)\n\t\t\treturn 39;\n\t\tif (lat < 50.67150166)\n\t\t\treturn 38;\n\t\tif (lat < 51.89342469)\n\t\t\treturn 37;\n\t\tif (lat < 53.09516153)\n\t\t\treturn 36;\n\t\tif (lat < 54.27817472)\n\t\t\treturn 35;\n\t\tif (lat < 55.44378444)\n\t\t\treturn 34;\n\t\tif (lat < 56.59318756)\n\t\t\treturn 33;\n\t\tif (lat < 57.72747354)\n\t\t\treturn 32;\n\t\tif (lat < 58.84763776)\n\t\t\treturn 31;\n\t\tif (lat < 59.95459277)\n\t\t\treturn 30;\n\t\tif (lat < 61.04917774)\n\t\t\treturn 29;\n\t\tif (lat < 62.13216659)\n\t\t\treturn 28;\n\t\tif (lat < 63.20427479)\n\t\t\treturn 27;\n\t\tif (lat < 64.26616523)\n\t\t\treturn 26;\n\t\tif (lat < 65.31845310)\n\t\t\treturn 25;\n\t\tif (lat < 66.36171008)\n\t\t\treturn 24;\n\t\tif (lat < 67.39646774)\n\t\t\treturn 23;\n\t\tif (lat < 68.42322022)\n\t\t\treturn 22;\n\t\tif (lat < 69.44242631)\n\t\t\treturn 21;\n\t\tif (lat < 70.45451075)\n\t\t\treturn 20;\n\t\tif (lat < 71.45986473)\n\t\t\treturn 19;\n\t\tif (lat < 72.45884545)\n\t\t\treturn 18;\n\t\tif (lat < 73.45177442)\n\t\t\treturn 17;\n\t\tif (lat < 74.43893416)\n\t\t\treturn 16;\n\t\tif (lat < 75.42056257)\n\t\t\treturn 15;\n\t\tif (lat < 76.39684391)\n\t\t\treturn 14;\n\t\tif (lat < 77.36789461)\n\t\t\treturn 13;\n\t\tif (lat < 78.33374083)\n\t\t\treturn 12;\n\t\tif (lat < 79.29428225)\n\t\t\treturn 11;\n\t\tif (lat < 80.24923213)\n\t\t\treturn 10;\n\t\tif (lat < 81.19801349)\n\t\t\treturn 9;\n\t\tif (lat < 82.13956981)\n\t\t\treturn 8;\n\t\tif (lat < 83.07199445)\n\t\t\treturn 7;\n\t\tif (lat < 83.99173563)\n\t\t\treturn 6;\n\t\tif (lat < 84.89166191)\n\t\t\treturn 5;\n\t\tif (lat < 85.75541621)\n\t\t\treturn 4;\n\t\tif (lat < 86.53536998)\n\t\t\treturn 3;\n\t\tif (lat < 87.00000000)\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 1;\n\t}",
"public double getScoreForLCS() {\n return scoreForLCS;\n }",
"public final boolean aCL() {\n return false;\n }",
"public static void main(String[] args) {\n LCSBruteForce al = new LCSBruteForce();\n System.out.println(\"Maximum Lenght: \" + al.LCS(\"cababc\", \"abdcb\", 5, 4));\n System.out.println(\"Recursive calls made: \" + al.cntCalls);\n }",
"public static void main(String[] args) {\n\t\tString str1 = \"ABCBDAB\";\n\t\tString str2 = \"BDCABA\";\n\t\tString str = LCS.getLCS(str1,str2);\n\t\tSystem.out.println(str);\n\t}",
"public String getAllele2(int index);",
"protected Double getCAProfessionnel() {\n List<Facture> facturesProfessionnel = this.factureProfessionnelList;\n Double ca = 0.0; \n for(Facture f : facturesProfessionnel )\n ca = ca + f.getTotalHT();\n \n return ca ; \n \n }",
"public long getLUC() {\r\n/* 180 */ return this._LUC;\r\n/* */ }",
"public void howToGetASubject(String cCode){\n\t\t//CODE HERE\n\t\t\n\t\tfor (RegCourse course:registeredCourses){\n\t\t\tif(course.getCourseCode().equals(cCode)){\n\t\t\t\t\n\t\t\t\tif(this.findAccum(course)+(1-this.findFullAccum(course))<0.8){\n\t\t\t\t\tSystem.out.println(\"You can't get A for this subject\");\n\t\t\t\t}else {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.printf(\"You need %.2f score more to get an A for this subject\\n\",(0.8-this.findAccum(course))*100);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"void toca();",
"public tc a(List<lc> list) {\n long j2;\n LinkedList linkedList = new LinkedList(list);\n Collections.sort(linkedList);\n linkedList.add(new lc(-1, -1, -1));\n ArrayList arrayList = new ArrayList();\n long j3 = 0;\n int i2 = 0;\n while (true) {\n j2 = -9223372036854775807L;\n if (i2 >= a()) {\n break;\n }\n if (((lc) linkedList.peek()).a != i2) {\n long b2 = b(i2);\n if (b2 != -9223372036854775807L) {\n j3 += b2;\n }\n } else {\n ov a2 = a(i2);\n ov ovVar = new ov(a2.a, a2.b - j3, a(a2.c, linkedList), a2.d);\n arrayList.add(ovVar);\n }\n i2++;\n }\n long j4 = this.b;\n if (j4 != -9223372036854775807L) {\n j2 = j4 - j3;\n }\n tc tcVar = new tc(this.a, j2, this.c, this.d, this.e, this.f, this.g, this.h, this.k, this.i, this.j, arrayList);\n return tcVar;\n }",
"@Test\n\tpublic void testFindAlignment1() {\n\t\tint[] s = new int[cs5x3.length];\n\t\tfor (int i = 0; i < s.length; i++)\n\t\t\ts[i] = -1;\n\t\tAlignment.AlignmentScore score = testme3.findAlignment(s);\n\t\t// AAG-- 3\n\t\t// --GCC 3\n\t\t// -CGC- 2\n\t\t// -AGC- 3\n\t\t// --GCT 2\n\t\tassertEquals(13, score.actual);\n\t\tscore = testme4.findAlignment(s);\n\t\t// AAG-- 3\n\t\t// --GCC 3\n\t\t// -CGC- 2\n\t\t// -AGC- 3\n\t\t// -AGC- 3 [reverse strand]\n\t\tassertEquals(14, score.actual);\n\t}",
"public String lca(E a, E b) {\n\n // one of the items is not in the tree, so the other is its own ancestor\n if (!exists(root, a) || !exists(root, b)) {\n if (exists(root, a)) return a.toString();\n else return b.toString();\n }\n BinaryNode<E> ancestor = null;\n if (a.compareTo(b) < 0) {\n ancestor = lca(root, a, b);\n } else {\n ancestor = lca(root, b, a);\n }\n if (ancestor == null) return \"none\";\n else return ancestor.toString();\n }",
"public Lecturers getLecTable();",
"public static void main(String[] args) {\n String a = \"agbcba\";\n StringBuilder rev = new StringBuilder(a);\n System.out.println(a.length() - findLCS(a, rev.reverse().toString(), a.length(), a.length()));\n }",
"boolean hasExplicitLac();",
"gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Aa getAa();",
"int computeCalib()\n {\n long cid = mApp.mCID;\n if ( cid < 0 ) return -2;\n List<CalibCBlock> list = mApp_mDData.selectAllGMs( cid, 0 ); \n if ( list.size() < 16 ) {\n return -1;\n }\n int ng = 0; // cb with group\n for ( CalibCBlock cb : list ) {\n if ( cb.mGroup > 0 ) ++ng;\n }\n if ( ng < 16 ) {\n return -3;\n }\n switch ( mAlgo ) {\n case CalibInfo.ALGO_NON_LINEAR:\n mCalibration = new CalibAlgoBH( 0, true );\n // FIXME set the calibration algorithm (whether non-linear or linear)\n // mCalibration.setAlgorith( mAlgo == 2 ); // CALIB_AUTO_NON_LINEAR\n break;\n case CalibInfo.ALGO_MINIMUM:\n if ( TDLevel.overTester ) {\n mCalibration = new CalibAlgoMin( 0, false );\n break;\n }\n default: // linear algo\n mCalibration = new CalibAlgoBH( 0, false );\n }\n\n mCalibration.Reset( list.size() );\n for ( CalibCBlock item : list ) mCalibration.AddValues( item );\n \n int iter = mCalibration.Calibrate();\n if ( iter > 0 && iter < TDSetting.mCalibMaxIt ) {\n float[] errors = mCalibration.Errors();\n for ( int k = 0; k < list.size(); ++k ) {\n CalibCBlock cb = list.get( k );\n mApp_mDData.updateGMError( cb.mId, cid, errors[k] );\n // cb.setError( errors[k] );\n }\n\n byte[] coeff = mCalibration.GetCoeff();\n mApp_mDData.updateCalibCoeff( cid, CalibAlgo.coeffToString( coeff ) );\n mApp_mDData.updateCalibError( cid, \n mCalibration.Delta(),\n mCalibration.Delta2(),\n mCalibration.MaxError(),\n iter );\n\n // DEBUG:\n // Calibration.logCoeff( coeff );\n // coeff = Calibration.stringToCoeff( mApp.mDData.selectCalibCoeff( cid ) );\n // Calibration.logCoeff( coeff );\n }\n // Log.v( TopoDroidApp.TAG, \"iteration \" + iter );\n return iter;\n }",
"@Override\n public Forme symetrieAxiale(final Ligne l) {\n double coeficient = (l.getPointB().getY() - l.getPointA().getY()) / (l.getPointB().getX() - l.getPointA().getX());\n double b = l.getPointA().getY() - (coeficient * l.getPointA().getX());\n /* Calcul de l'equation de la deuxieme droite (entre le centre et le centre symetrique) :\n * coefficient = 1 / coefficientPremiereDroite\n * donc yCentre = xCentre * coefficient + b\n * */\n\n double coefficientBis = -1 / coeficient;\n\n double bBis = this.centre.getY() - (this.centre.getX() * coefficientBis);\n double bpCercle =this.pCercle.getY() - (this.pCercle.getX() * coefficientBis);\n\n /*\n Soit les droites dont les équations sont y = x – 4 et y = –2x + 5, alors : x – 4 = –2x + 5. On représente ces droites dans un plan cartésien.\n Donc : 3x = 9 et x = 3\n Puis : y = –1\n Les coordonnées du point d’intersection de ces droites sont (3, –1).\n\n */\n double xCentre = (bBis - b) / (coeficient - coefficientBis);\n double yCentre = coefficientBis * xCentre + bBis;\n\n double xPCercle = (bpCercle - b) / (coeficient - coefficientBis);\n double yPCercle = coefficientBis * xPCercle + bpCercle;\n\n Point newCentre = new Point(Math.floor((2*xCentre - this.centre.getX())*100)/100,Math.floor((2*yCentre - this.centre.getY())*100)/100);\n Point newPoint = new Point(Math.floor((2*xPCercle - this.pCercle.getX())*100)/100,Math.floor((2*yPCercle - this.pCercle.getY())*100)/100);\n return new Cercle(newCentre,newPoint);\n }",
"public static DZcsn cs_lu(DZcs A, DZcss S, double tol)\n\t{\n\t\tDZcs L, U ;\n\t\tDZcsn N ;\n\t\tdouble[] pivot ;\n\t\tDZcsa Lx = new DZcsa(), Ux = new DZcsa(), x ;\n\t\tdouble a, t ;\n\t\tint Lp[], Li[], Up[], Ui[], pinv[], xi[], q[], n, ipiv, k, top, p, i, col, lnz, unz ;\n\t\tif (!CS_CSC(A) || S == null) return (null) ;\t/* check inputs */\n\t\tn = A.n ;\n\t\tq = S.q ; lnz = S.lnz ; unz = S.unz ;\n\t\tx = new DZcsa(n) ;\t\t/* get double workspace */\n\t\txi = new int [2 * n] ;\t\t/* get int workspace */\n\t\tN = new DZcsn() ;\t\t/* allocate result */\n\t\tN.L = L = cs_spalloc (n, n, lnz, true, false) ;\t\t/* allocate result L */\n\t\tN.U = U = cs_spalloc (n, n, unz, true, false) ;\t\t/* allocate result U */\n\t\tN.pinv = pinv = new int [n] ;\t\t\t\t/* allocate result pinv */\n\t\tLp = L.p ; Up = U.p ;\n\t\tfor (i = 0 ; i < n ; i++) x.set(i, cs_czero()) ;\t/* clear workspace */\n\t\tfor (i = 0 ; i < n ; i++) pinv [i] = -1 ;\t\t/* no rows pivotal yet */\n\t\tfor (k = 0 ; k <= n ; k++) Lp [k] = 0 ;\t\t\t/* no cols of L yet */\n\t\tlnz = unz = 0 ;\n\t\tfor (k = 0 ; k < n ; k++)\t\t\t\t/* compute L(:,k) and U(:,k) */\n\t\t{\n\t\t\t/* --- Triangular solve --------------------------------------------- */\n\t\t\tLp [k] = lnz ;\t\t\t\t\t/* L(:,k) starts here */\n\t\t\tUp [k] = unz ;\t\t\t\t\t/* U(:,k) starts here */\n\t\t\tif (lnz + n > L.nzmax)\n\t\t\t{\n\t\t\t\tcs_sprealloc(L, 2 * L.nzmax + n) ;\n\t\t\t}\n\t\t\tif (unz + n > U.nzmax)\n\t\t\t{\n\t\t\t\tcs_sprealloc(U, 2 * U.nzmax + n) ;\n\t\t\t}\n\t\t\tLi = L.i ; Lx.x = L.x ; Ui = U.i ; Ux.x = U.x ;\n\t\t\tcol = q != null ? (q [k]) : k ;\n\t\t\ttop = cs_spsolve(L, A, col, xi, x, pinv, true) ; /* x = L\\A(:,col) */\n\t\t\t/* --- Find pivot --------------------------------------------------- */\n\t\t\tipiv = -1 ;\n\t\t\ta = -1 ;\n\t\t\tfor (p = top ; p < n ; p++)\n\t\t\t{\n\t\t\t\ti = xi [p] ;\t\t\t/* x(i) is nonzero */\n\t\t\t\tif (pinv [i] < 0) /* row i is not yet pivotal */\n\t\t\t\t{\n\t\t\t\t\tif ((t = cs_cabs(x.get(i))) > a)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = t;\t\t/* largest pivot candidate so far */\n\t\t\t\t\t\tipiv = i ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \t\t\t\t/* x(i) is the entry U(pinv[i],k) */\n\t\t\t\t{\n\t\t\t\t\tUi [unz] = pinv [i] ;\n\t\t\t\t\tUx.set(unz++, x.get(i)) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ipiv == -1 || a <= 0) return (cs_ndone (N, null, xi, x, false)) ;\n\t\t\tif (pinv [col] < 0 && cs_cabs(x.get(col)) >= a * tol) ipiv = col ;\n\t\t\t/* --- Divide by pivot ---------------------------------------------- */\n\t\t\tpivot = x.get(ipiv) ;\t\t\t/* the chosen pivot */\n\t\t\tUi [unz] = k ;\t\t\t\t/* last entry in U(:,k) is U(k,k) */\n\t\t\tUx.set(unz++, pivot) ;\n\t\t\tpinv [ipiv] = k ;\t\t\t/* ipiv is the kth pivot row */\n\t\t\tLi [lnz] = ipiv ;\t\t\t/* first entry in L(:,k) is L(k,k) = 1 */\n\t\t\tLx.set(lnz++, cs_cone()) ;\n\t\t\tfor (p = top ; p < n ; p++)\t\t/* L(k+1:n,k) = x / pivot */\n\t\t\t{\n\t\t\t\ti = xi [p] ;\n\t\t\t\tif (pinv [i] < 0)\t\t/* x(i) is an entry in L(:,k) */\n\t\t\t\t{\n\t\t\t\t\tLi [lnz] = i ;\t\t/* save unpermuted row in L */\n\t\t\t\t\tLx.set(lnz++, cs_cdiv(x.get(i), pivot)) ; /* scale pivot column */\n\t\t\t\t}\n\t\t\t\tx.set(i, cs_czero()) ;\t\t/* x [0..n-1] = 0 for next k */\n\t\t\t}\n\t\t}\n\t\t/* --- Finalize L and U ------------------------------------------------- */\n\t\tLp [n] = lnz ;\n\t\tUp [n] = unz ;\n\t\tLi = L.i ;\t\t\t\t\t/* fix row indices of L for final pinv */\n\t\tfor (p = 0 ; p < lnz ; p++) Li [p] = pinv [Li [p]] ;\n\t\tcs_sprealloc (L, 0) ;\t\t\t\t/* remove extra space from L and U */\n\t\tcs_sprealloc (U, 0) ;\n\t\treturn (cs_ndone (N, null, xi, x, true)) ;\t/* success */\n\t}",
"public static void main(String[] args) {\n List<String> res = lcs(\"LCLC\",\"CLCL\");\r\n for(String s:res){\r\n \t System.out.print(s +\",\");\r\n }\r\n\t}",
"public boolean hasLUC() {\r\n/* 295 */ return this._has_LUC;\r\n/* */ }",
"private int getCrs(TrackPoint p) {\r\n\t\tint crsindex = 0;\r\n\t\tif (coordinateReferenceSystem.length > 1) {\r\n\t\t\tint ls = TransformCoordinates.getLocalProjectionSystem(coordinateReferenceSystem[0]);\r\n\t\t\tProjectedPoint gkbl = TransformCoordinates.wgs84ToLocalsystem(p, ls); // TODO: think / read about what to do if bottom left and top right are not in the same Gau?-Kr?ger stripe?\r\n\t\t\tint wantepsg = gkbl.getEpsgCode();\r\n\t\t\tfor (crsindex = 0; crsindex < coordinateReferenceSystem.length; crsindex++) {\r\n\t\t\t\tif (coordinateReferenceSystem[crsindex] == wantepsg)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (crsindex >= coordinateReferenceSystem.length) { // not match\r\n\t\t\t\tfor (crsindex = 0; crsindex < coordinateReferenceSystem.length; crsindex++) {\r\n\t\t\t\t\tif (Math.abs(coordinateReferenceSystem[crsindex] - wantepsg) == 1)\r\n\t\t\t\t\t\tbreak; // accept 1 zone deviation\r\n\t\t\t\t}\r\n\t\t\t\tif (crsindex >= coordinateReferenceSystem.length)\r\n\t\t\t\t\tcrsindex = -1;\r\n\r\n\t\t\t}\r\n\t\t\tif (crsindex < 0)\r\n\t\t\t\tthrow new IllegalArgumentException(MyLocale.getMsg(4829, \"getUrlForBoundingBox: Point:\") + \" \" + gkbl.toString() + MyLocale.getMsg(4830, \"no matching Gau?-Kr?ger-Stripe in the EPSG-code list in the .wms\"));\r\n\t\t}\r\n\t\treturn crsindex;\r\n\t}",
"public String find()\n\t{\n\t\tFile f = new File(ampath);\n\t\tString fdir = f.getParent();\n\t\tFile fs = new File (fdir);\n\t\tString cplpath = null;\n\t\tboolean found = false;\n\t\t\n\t\tFile [] files = fs.listFiles();\n\t\t\n\t\tfor (int i=0; i<files.length; i++) {\n\t\t\tif(files[i].getName().equalsIgnoreCase(cplfilename)){\n\t\t\t\tfound = true;\n\t\t\t\tcplpath = files[i].getPath();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//Searching in Subfolder for CPL-File\n\t\t\tif (files[i].isDirectory()) {\n\t\t\t\tFile f2 = new File(files[i].getPath());\n\t\t\t\tFile [] files2 = f2.listFiles();\n\t\t\t\tfor(int j=0; j<files2.length; j++) {\n\t\t\t\t\tif(files2[j].getName().equalsIgnoreCase(cplfilename)){\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tcplpath = files2[i].getPath();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Returns CPL-File as String\n\t\tif (found == false) {\n\t\t\tSystem.out.println(\"CPL-File not found\");\n\t\t\treturn \"CPL-File not found\";\n\t\t}\n\t\telse {\n\t\t\treturn cplpath;\n\t\t}\n\t\t\n\t}",
"public BigDecimal getACC_GL() {\r\n return ACC_GL;\r\n }",
"static int lcs(int x, int y, String s1, String s2)\n {\n // your code here\n \n int len1 = x;\n \n int len2 = y;\n \n int dp[][] = new int[len1+1][len2+1];\n \n for(int i=0;i<=len1;i++){\n dp[i][0] = 0;\n }\n \n for(int i=0;i<=len2;i++){\n dp[0][i] = 0;\n }\n \n for(int i=1;i<=len1;i++){\n for(int j=1;j<=len2;j++){\n \n if(s1.charAt(i-1)==s2.charAt(j-1)){\n dp[i][j]=1+dp[i-1][j-1];\n }\n else {\n dp[i][j] = Math.max(dp[i-1][j],dp[i][j-1]);\n }\n \n }\n }\n \n return dp[len1][len2];\n }",
"public float getDCL();",
"public void cpl() {\n\t\tint op = registers.getRegister(Register.A);\n\t\tint result = invert(op);\n\t\tregisters.setRegister(Register.A, result);\n\n\t\tregisters.setFlag(Flag.H, true);\n\t\tregisters.setFlag(Flag.N, true);\n\t}",
"public int getLaSign() {\n return laSign;\n }",
"@Override\r\n\tpublic reclamation getreclamatioin(long code_apoger) {\n\t\tfor(int i=0;i<reclamations.size();i++) {\r\n\t\t\t\r\n\t\t\tif(reclamations.get(i).getcodeapoger()==code_apoger)\r\n\t\t return reclamations.get(i);\r\n\t\t\t\r\n\t\t\t}\r\n\t\treturn null;\r\n\t}",
"List<AlgCollation> getCollationList();",
"public static Picture laplacian(Picture picture) {\n double[][] weights = { { -1.0, -1.0, -1.0 }, { -1.0, 8.0, -1.0 }, { -1.0, -1.0, -1.0 }, };\n return kernel(picture, weights);\n }",
"public Causa getCausa() {\n return causa.get();\n }",
"public void setLA(long value) {\n this.la = value;\n }",
"int getCoorX();",
"java.lang.String getCit();",
"public static Picture laplacian(Picture picture) {\r\n double[][] laplacian = {{-1,-1,-1},{-1,8,-1},{-1,-1,-1}};\r\n\r\n return transform(picture, laplacian);\r\n }",
"public String obtenerCicloLetra() {\n\n if (conectado) {\n try {\n String letra = \"\";\n\n String Query = \"SELECT `CURRENT_CICLO`() AS `CURRENT_CICLO`; \";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n\n if (resultSet.next()) {\n letra = resultSet.getString(\"CURRENT_CICLO\");\n Logy.m(\"letra obtenida ------------ : \" + letra);\n } else {\n Logy.me(\"no se obtuvieron resultados de CURRENT_CICLO()\");\n }\n\n if (letra != null && (letra.equals(\"A\") || letra.equals(\"B\"))) {\n return letra;\n } else {\n Logy.me(\"error al obtener la letra del CICLO de DB\");\n return null;\n }\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar CURRENT_CICLO`() de la DB: \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }",
"public double getCl_plot (double camb_val, double thic_val, double angl) {\n // return new Solver(angl, thic_val*25, camb_val*25).get_Cl(angl);\n Solver s = plot_solver;\n s.getFreeStream ();\n s.getCirculation(angl, thic_val*25, camb_val*25);\n double cl = s.get_Cl(angl);\n // System.out.println(\"-- s: \" + s + \" cl: \" + cl);\n return cl;\n }",
"@SuppressWarnings(\"unused\")\r\n private void findAbdomenVOI() {\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 39; angle < 45; angle += 3) {\r\n int x, y, yOffset;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n scaleFactor = Math.tan(angleRad);\r\n x = xDim;\r\n y = ycm;\r\n yOffset = y * xDim;\r\n while (x > xcm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n x--;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n x = xcm;\r\n y = 0;\r\n yOffset = y * xDim;\r\n while (y < ycm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n y++;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n x = 0;\r\n y = ycm;\r\n yOffset = y * xDim;\r\n while (x < xcm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n x++;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 225 && angle <= 315) {\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n x = xcm;\r\n y = yDim;\r\n yOffset = y * xDim;\r\n while (y < yDim && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n y--;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n }\r\n } // end for (angle = 0; ...\r\n \r\n int[] x1 = new int[xValsAbdomenVOI.size()];\r\n int[] y1 = new int[xValsAbdomenVOI.size()];\r\n int[] z1 = new int[xValsAbdomenVOI.size()];\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n x1[idx] = xValsAbdomenVOI.get(idx);\r\n y1[idx] = xValsAbdomenVOI.get(idx);\r\n z1[idx] = 0;\r\n }\r\n\r\n // make the VOI's and add the points to them\r\n abdomenVOI = new VOI((short)0, \"Abdomen\");\r\n abdomenVOI.importCurve(x1, y1, z1);\r\n\r\n\r\n }",
"public static DegreeCourse getCorsoLaureaByID(long corsoLaureaID) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.parameters = new Object[] { corsoLaureaID };\n\t\t\trp.type = RequestType.GET_DEGREE_COURSES_BY_ID;\n\t\t\tReceiveContent rpp = sendReceive(rp);\n\t\t\treturn (DegreeCourse) rpp.parameters[0];//\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn null;\n\t}",
"java.lang.String getC3();",
"public static void main(String[] args) {\n\t\tSystem.out.println(lcsRecursionPractice(\"abc\", \"bcd\"));\n\t\tSystem.out.println(lcsWithRecursion(\"abc\", \"bcd\"));\n\t\tSystem.out.println(lcsWithIterative(\"abc\", \"bcd\", new int[4][4]));\n\t}",
"int lcs(int x, int y, string s1, string s2,int[][] str){\n \n if(text1.length()==0||text2.length()==0) {\n return 0;\n }\n \n if(str[x][y]!=0) {\n return str[x][y];\n }\n \n int ans =0;\n \n if(text1.charAt(0)== text2.charAt(0)) {\n \n \n \n ans = 1 + longestCommonSubsequence(x+1,y+1,ros1, ros2,str);\n \n \n }\n else {\n \n int first = longestCommonSubsequence(x,y+1,ros1, text2,str);\n int second = longestCommonSubsequence(x+1,y,text1, ros2,str);\n \n ans = Math.max(first,second);\n \n \n \n }\n \n str[x][y] = ans;\n return ans;\n \n \n \n \n \n}",
"private Feature searchRefCatastral(Feature[] cache,Feature refCatFeature, Comparator comparator)\r\n {\r\n int featureIndex = Arrays.binarySearch(cache, refCatFeature,comparator);\r\n if(featureIndex<0) return null;\r\n return cache[featureIndex];\r\n }",
"private byte getLRChargeIndex() {\n\t\tString lrcType = cbLRC.getText();\n\n\t\t//Check with optionA\n\t\tfor (byte i = 0; i < 3; i++) {\n\t\t\tif (optionA[i].equals(lrcType))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn 0;\n\t}",
"CLanguage getClanguage();"
] | [
"0.74086976",
"0.653669",
"0.6280968",
"0.62602013",
"0.6231226",
"0.6225165",
"0.61429363",
"0.6138796",
"0.6123029",
"0.61018544",
"0.60733926",
"0.5980862",
"0.5918392",
"0.58967674",
"0.5874055",
"0.58420324",
"0.5824131",
"0.57981676",
"0.5783484",
"0.5751071",
"0.56696737",
"0.5624683",
"0.56183314",
"0.5575685",
"0.55730844",
"0.555493",
"0.55312264",
"0.5518528",
"0.54674125",
"0.5461191",
"0.5452121",
"0.53969926",
"0.53738105",
"0.53682464",
"0.5348405",
"0.53289694",
"0.53163373",
"0.5291885",
"0.527752",
"0.52719265",
"0.5223368",
"0.5223163",
"0.5209252",
"0.52047914",
"0.52020824",
"0.5179194",
"0.5147811",
"0.513795",
"0.51377946",
"0.511785",
"0.51136273",
"0.51007366",
"0.5092502",
"0.50782114",
"0.5076871",
"0.5051517",
"0.50228435",
"0.5020945",
"0.5006593",
"0.50022304",
"0.5000468",
"0.49909353",
"0.49806294",
"0.4973313",
"0.4939579",
"0.4925632",
"0.4923585",
"0.49042192",
"0.4902139",
"0.49020657",
"0.49004436",
"0.48995307",
"0.48912835",
"0.4881238",
"0.48758283",
"0.48743936",
"0.4871333",
"0.4862296",
"0.48422933",
"0.4827941",
"0.48264202",
"0.48262727",
"0.4818817",
"0.48147458",
"0.4812394",
"0.48081544",
"0.48070142",
"0.48025605",
"0.47979942",
"0.47872895",
"0.47851434",
"0.4783759",
"0.4779175",
"0.4779123",
"0.47780833",
"0.4777581",
"0.4771156",
"0.47702813",
"0.47669762",
"0.47607607"
] | 0.5939924 | 12 |
Validate given email with regular expression. | public static boolean validateEmail(String email) {
Pattern pattern = Pattern.compile("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$");
Matcher matcher = pattern.matcher(email);
return matcher.matches();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean validateEmail(String email) {\n \n // Compiles the given regular expression into a pattern.\n Pattern pattern = Pattern.compile(PATTERN_EMAIL);\n \n // Match the given input against this pattern\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n \n }",
"public static boolean validate(final String email){\n\t\t final Matcher matcher = pattern.matcher(email);\n\t\t return matcher.matches();\n\t }",
"private boolean checkEmailPattern(String email) {\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }",
"static boolean isValid(String email) {\r\n\t\t String regex = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\r\n\t\t return email.matches(regex);\r\n\t}",
"private boolean isEmailValid(String email) {\n if(Patterns.EMAIL_ADDRESS.matcher(email).matches()){\n\n return true;\n }else {\n return false;\n }\n// return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.matches(\"^[a-zA-Z]{5,12}$\");\r\n }",
"public boolean emailValidate(final String email) {\n\n\t\tmatcher = pattern.matcher(email);\n\t\treturn matcher.matches();\n\n\t}",
"void validate(String email);",
"public boolean validarEmail(String email) { \r\n\t\tPattern p = Pattern.compile(\"[a-zA-Z0-9]+[.[a-zA-Z0-9_-]+]*@[a-z0-9][\\\\w\\\\.-]*[a-z0-9]\\\\.[a-z][a-z\\\\.]*[a-z]$\");\r\n\t\tMatcher m = p.matcher(email); \r\n\t\treturn m.matches(); \r\n\t}",
"public static boolean validateEmail(String email){\n return email.matches(EMAIL_PATTERN);\n }",
"private boolean validateEmail(String email) {\n return Constants.VALID_EMAIL_PATTERN.matcher(email).find();\n }",
"private void checkValidEmail(String email) throws ValidationException {\n String emailRegex = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\n if (!email.matches(emailRegex)) {\n throw new ValidationException(\"Incorrect email format\");\n }\n }",
"private boolean isEmailValid(String email) {\n return true;\r\n }",
"private boolean isValidMail(String email) {\n String EMAIL_STRING = \"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\n return Pattern.compile(EMAIL_STRING).matcher(email).matches();\n }",
"private boolean isEmailValid(String email){\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n //Make the comparison case-insensitive.\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if(matcher.matches()){\n isValid = true;\n }\n return isValid;\n }",
"private boolean isEmailValid(String email) {\n return true;\n }",
"private boolean isEmailValid(String email) {\n return true;\n }",
"private boolean isEmailValid(String email) {\n return true;\n }",
"private boolean isEmailValid(String email) {\n return true;\n }",
"@Override\n\tpublic boolean emailisValid(String email) \n\t{\n\t\treturn false;\n\t}",
"private boolean isEmailValid(String email) {\n return Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }",
"private boolean isEmailValid(String email) {\n return Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }",
"protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }",
"private void emailValidation( String email ) throws Exception {\r\n if ( email != null && !email.matches( \"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\" ) ) {\r\n throw new Exception( \"Merci de saisir une adresse courriel valide.\" );\r\n }\r\n }",
"public static boolean validateEmail(String email){\n String regular = \"^([a-z0-9A-Z]+[-|\\\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\\\.)+[a-zA-Z]{2,}$\";\n Pattern pattern = Pattern.compile(regular);\n return pattern.matcher(email).matches();\n }",
"private boolean isValidEmail(String email) {\n String EMAIL_PATTERN = \"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n + \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\n\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }",
"private boolean validEmail(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" +\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n return email != null && pat.matcher(email).matches();\n }",
"static void emailValidation(String email) throws Exception {\n Pattern pattern_email = Pattern.compile(\"^[a-z0-9._-]+@[a-z0-9._-]{2,}\\\\.[a-z]{2,4}$\");\n if (email != null) {\n if (!pattern_email.matcher(email).find()) {\n throw new Exception(\"The value is not a valid email address\");\n }\n } else {\n throw new Exception(\"The email is required\");\n }\n }",
"private boolean isEmailValid(CharSequence email) {\n return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }",
"private boolean isEmailValid(String email) {\r\n //TODO: Replace this with your own logic\r\n return email.contains(\"@\");\r\n }",
"boolean validateEmail(String email) {\n\t\treturn true;\n\n\t}",
"private static boolean isValid(String email){\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\"+\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n if (email == null)\n return false;\n return pat.matcher(email).matches();\n\n }",
"public void validateEmail(String email) throws SubscriptionValidationException {\n final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\",\n Pattern.CASE_INSENSITIVE);\n Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(email);\n if (!(matcher.matches())) {\n throw new SubscriptionValidationException(\"Wrong email address: \" + email);\n }\n }",
"public static boolean validateEmail(final String email) {\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }",
"public static boolean isEmailValid(String email) {\r\n boolean isValid = false;\r\n\r\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\r\n CharSequence inputStr = email;\r\n\r\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\r\n Matcher matcher = pattern.matcher(inputStr);\r\n if (matcher.matches()) {\r\n isValid = true;\r\n }\r\n return isValid;\r\n }",
"public static boolean checkEmail (String email) throws IllegalArgumentException{\n check = Pattern.compile(\"^[a-zA-Z0-9]+(?:\\\\+*-*.[a-zA-Z0-9]+)*@[a-zA-Z0-9]+(?:\\\\.[a-zA-Z0-9]{2,}+)*$\").matcher(email).matches();\n if (check) {\n return true;\n } else {\n throw new IllegalArgumentException(\"Enter a valid Email Address\");\n }\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }",
"private boolean isEmailValid(String email) {\n //TODO: Replace this with your own logic\n return email.contains(\"@\");\n }",
"public boolean isValidEmail(String u) {\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(u);\n return matcher.matches();\n }",
"public static boolean checkEmail(String email){\n String regex = \"^[\\\\w!#$%&’*+/=?`{|}~^-]+(?:\\\\.[\\\\w!#$%&’*+/=?\"\n + \"`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\\\.)+[a-zA-Z]{2,6}$\";\n if (email.matches(regex))\n return true;\n else\n return false;\n }",
"public static boolean isEmailValid(String email) {\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if (matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }",
"public static boolean isEmailValid(String email) {\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if (matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }",
"public static boolean validarEmail(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\"+ \n \"[a-zA-Z0-9_+&*-]+)*@\" + \n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" + \n \"A-Z]{2,7}$\"; \n \n Pattern pat = Pattern.compile(emailRegex); \n if (email == null) \n return false; \n return pat.matcher(email).matches(); \n }",
"public boolean isEmailValid(String email) {\n return true;\n }",
"public static boolean validateEmail(String email){\n String emailcheck= \"[a-zA-Z0-9._-]+@[a-z]+\\\\.+[a-z]+\";\n boolean iscorrect= email.trim().matches(emailcheck);\n return iscorrect;\n }",
"private static boolean isEmailValid(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" +\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n if (email == null)\n return false;\n return pat.matcher(email).matches();\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }",
"private boolean isEmailValid(String email){\n return email.contains(\"@\");\n }",
"public static boolean isEmailValid(String email) {\n String regExpression = \"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,4}\";\n\n Pattern pattern = Pattern.compile(regExpression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(email);\n\n if (matcher.matches())\n return true;\n else\n return false;\n }",
"protected boolean isValidEmailAddress(String email) {\n return EMAIL_REGEX.matcher(email).matches();\n }",
"boolean isValidEmail(String email){\n boolean ValidEmail = !email.isEmpty() && Patterns.EMAIL_ADDRESS.matcher(email).matches();\n if(!ValidEmail){\n userEmail.setError(\"please fill this field correctly\");\n return false;\n }\n return true;\n }",
"public boolean validateMail(String mail){\n Pattern pattern;\n Matcher matcher;\n pattern = Pattern.compile(\"^[_A-Za-z0-9-]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n matcher = pattern.matcher(mail);\n return matcher.matches();\n }",
"private boolean checkEmail(String email) {\n\n\t\tString patternStr = \"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\";\n\t\tPattern pattern = Pattern.compile(patternStr, Pattern.CASE_INSENSITIVE);\n\t\tMatcher matcher = pattern.matcher(email);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\n\t}",
"public static boolean verifyEmailFormat(String email) {\n\t\tboolean isValid = false;\n\n\t\tif (email != null) {\n\t\t\tPattern p = Pattern.compile(\".+@.+\\\\.[a-z]+\");\n\t\t\tMatcher m = p.matcher(email);\n\t\t\tisValid = m.matches();\n\t\t}\n\n\t\treturn isValid;\n\t}",
"public static boolean isEmailValid(String email) {\n boolean isValid = false;\n //Acceptable email formats include:\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n CharSequence inputStr = email;\n Matcher matcher = pattern.matcher(inputStr);\n if(matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }",
"public static boolean email(String email) throws UserRegistrationException {\n\t\tboolean resultEmail = validateEmail.validator(email);\n\t\tif(true) {\n\t\t\treturn Pattern.matches(patternEmail, email);\n\t\t}else\n\t\t\tthrow new UserRegistrationException(\"Enter correct Email\");\n\t}",
"public static boolean isEmailValid(String email) {\r\n\r\n return email.matches(\"^([a-z]|[A-Z]){1,100}@([a-z]|[A-Z]){1,100}\\\\.([a-z]|[A-Z]){1,10}\");\r\n }",
"private void validationEmail(String email) throws Exception {\r\n\t\tif (email != null && email.trim().length() != 0) {\r\n\t\t\tif (!email.matches(\"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\")) {\r\n\t\t\t\tthrow new Exception(\"Merci de saisir une adresse mail valide.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"Merci de saisir une adresse mail.\");\r\n\t\t}\r\n\t}",
"private boolean isEmailValid(String email) {\n if (email.length() == 8){\n return true;\n }\n\t//user names first two characters must be letters\n Boolean condition1 = false;\n Boolean condition2 = false;\n\n int ascii = (int) email.charAt(0);\n if ((ascii >= 65 && ascii <= 90) || ascii >= 97 && ascii <= 122){\n condition1 = true;\n }\n ascii = (int) email.charAt(1);\n if ((ascii >= 65 && ascii <= 90) || ascii >= 97 && ascii <= 122){\n condition2 = true;\n }\n if (condition1 == true && condition2 == true){\n return true;\n }\n\n\t//user names last six characters must be numbers\n for (int i = email.length()-6; i < email.length(); i++){\n ascii = (int) email.charAt(i);\n if (!(ascii >= 48 && ascii <= 57)){\n return false;\n }\n }\n\n return true;\n }",
"private boolean isEmailValid(String email) {\n return email.equals(\"[email protected]\");\n }",
"boolean validateMailAddress(final String mailAddress);",
"public static boolean checkEmail(String email) {\r\n\t\tboolean result = false;\r\n\t\tif (check(email) && email.matches(CommandParameter.REG_EXP_EMAIL)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public static boolean isValidEmail(String email) {\r\n String emailPattern = \"^[\\\\w!#$%&’*+/=?`{|}~^-]+(?:\\\\.[\\\\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\\\.)+[a-zA-Z]{2,6}$\";\r\n Pattern p = Pattern.compile(emailPattern);\r\n Matcher m = p.matcher(email);\r\n return m.matches();\r\n }",
"public boolean checkEmail(String email){\r\n boolean check = true;\r\n if(!email.matches(\"^[a-zA-Z0-9]+@[a-zA-Z0-9]+(.[a-zA-Z]{2,})$\")){\r\n check = false;\r\n }\r\n return check;\r\n }",
"public static\n\tboolean isValidEmail(String value)\n\t{\n\t\treturn !StringX.isBlank(value) && RegExHelper.EMAIL_PATTERN.matcher(value).matches();\n\t}",
"public static boolean email(String email) {\r\n\t\tboolean resul = false;\r\n\r\n\t\tif (email != null) {\r\n\t\t\tMatcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(email);\r\n\t\t\tresul = matcher.find();\r\n\t\t}\r\n\r\n\t\treturn resul;\r\n\t}",
"private boolean isEmailValid(String email) {\n //TODO: Replace this with your own logic\n return email.length() > 0;\n }",
"private boolean isEmailValid(String email) {\n return email.contains(\"@\") && (email.length() <= 30); //TODO: Perhaps change to a longer maximum length? Also in db.\n }",
"public boolean isEmailValid(String email) {\n boolean errorFlag = true;\n Pattern emailPattern = Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\", Pattern.CASE_INSENSITIVE);\n if(!emailPattern.matcher(email).find()){\n errorFlag = false;\n }\n return errorFlag;\n }",
"public static boolean esEmailCorrecto(String email) {\n \n boolean valid = false;\n \n Pattern p = Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\" +\"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n \n Matcher mE = p.matcher(email.toLowerCase());\n if (mE.matches()){\n valid = true; \n }\n return valid;\n }",
"private boolean isEmail(String email)\n {\n Pattern pat = null;\n Matcher mat = null;\n pat = Pattern.compile(\"^[\\\\w\\\\\\\\\\\\+]+(\\\\.[\\\\w\\\\\\\\]+)*@([A-Za-z0-9-]+\\\\.)+[A-Za-z]{2,4}$\");\n mat = pat.matcher(email);\n if (mat.find()) {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public boolean validateEmail(final String hex) {\n pattern = Pattern.compile(EMAIL_PATTERN);\n matcher = pattern.matcher(hex);\n return matcher.matches();\n }",
"public static boolean checkEmail(String email) {\r\n return email != null && Pattern.matches(EMAIL_REGEX, email);\r\n }",
"private boolean checkEmailString(String email) {\n boolean validEmail = true;\n try {\n InternetAddress emailAddr = new InternetAddress(email);\n emailAddr.validate();\n } catch (AddressException ex) {\n validEmail = false;\n }\n return validEmail;\n }",
"private void validationEmail(String email) throws FormValidationException {\n\t\tif (email != null) {\n\t\t\tif (!email.matches(\"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\")) {\n\t\t\t\tSystem.out.println(\"Merci de saisir une adresse mail valide.\");\n\n\t\t\t\tthrow new FormValidationException(\n\t\t\t\t\t\t\"Merci de saisir une adresse mail valide.\");\n\t\t\t\t// } else if ( groupDao.trouver( email ) != null ) {\n\t\t\t\t// System.out.println(\"Cette adresse email est déjà utilisée, merci d'en choisir une autre.\");\n\t\t\t\t// throw new FormValidationException(\n\t\t\t\t// \"Cette adresse email est déjà utilisée, merci d'en choisir une autre.\"\n\t\t\t\t// );\n\t\t\t}\n\t\t}\n\t}",
"public static boolean emailCheck(String email) {\n Pattern p = Pattern.compile(\"\\\\b[A-Z0-9._%-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,13}\\\\b\", Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(email);\n return m.matches();\n }",
"public static boolean isEmailValid(String email) {\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }",
"public static boolean isValid(String email)\n {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\"+\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n if (email == null)\n return false;\n return pat.matcher(email).matches();\n }",
"public static boolean isEmailValid(String email) {\n return email.contains(\"@\") && email.contains(\".\");\n }",
"public static boolean emailCheck(String email)\r\n\t{\r\n\t\treturn email.matches(\"^[_A-Za-z0-9-]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\r\n\t}"
] | [
"0.79602635",
"0.7871307",
"0.7864652",
"0.78587246",
"0.78500175",
"0.7834409",
"0.7834115",
"0.778746",
"0.7754617",
"0.76956564",
"0.7661495",
"0.7651286",
"0.76374876",
"0.7621706",
"0.75799704",
"0.7562926",
"0.7562926",
"0.7562926",
"0.7562926",
"0.75441957",
"0.7527938",
"0.7527938",
"0.7503222",
"0.7484603",
"0.74672323",
"0.7453617",
"0.7445109",
"0.744142",
"0.74316436",
"0.74216217",
"0.74077564",
"0.7402682",
"0.74008906",
"0.73978686",
"0.736356",
"0.7361472",
"0.7359942",
"0.7359942",
"0.7359942",
"0.7359942",
"0.7353705",
"0.73385715",
"0.73297",
"0.73283654",
"0.73283654",
"0.7326223",
"0.7313915",
"0.73130566",
"0.7297361",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.7289802",
"0.72890145",
"0.7278233",
"0.7268079",
"0.72581357",
"0.7257423",
"0.72572726",
"0.7246042",
"0.72120523",
"0.72006375",
"0.71987903",
"0.7190138",
"0.71863735",
"0.7182321",
"0.7150057",
"0.71396077",
"0.7133311",
"0.71331614",
"0.712454",
"0.7122778",
"0.7101764",
"0.70939076",
"0.7090778",
"0.7089549",
"0.7080716",
"0.7064092",
"0.70506155",
"0.7035363",
"0.7025569",
"0.7016573",
"0.7014199",
"0.6998085",
"0.6998039",
"0.69825613"
] | 0.725785 | 71 |
Inaccessible tiles always have all 4 walls since you can't get to them | public InaccessibleTile(int x, int y) {
super(true, true, true, true, x, y);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void renderPlayerWalls() {\n\t\tfor(List<Tile> list : game.tiles()) {\n\t\t\tfor(Tile tile : list) {\n\t\t\t\t//Why does this not work?!\n\t\t\t\tif(tile.hasWall()) {\n\t\t\t\t\tthis.output[tile.position().y][tile.position().x] = WALL_SIGN;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public boolean isTileFriendly(){\n return false;\n }",
"private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}",
"public void getWalls() {\n\t\tRandomMapGenerator rmg = new RandomMapGenerator();\n\n\t\tboolean[][] cm = rmg.cellmap;\n\n\t\tfor (int x = 0; x < rmg.width; x++) {\n\t\t\tfor (int y = 0; y < rmg.height; y++) {\n\t\t\t\tif (cm[x][y]) {\n\t\t\t\t\twallArray.add(new Wall(x * 12, y * 12, mode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }",
"private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }",
"private boolean atLeastOneNonWallLocation() {\n\t\tfor (int x = 0; x < this.map.getMapWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.map.getMapHeight(); y++) {\n\n\t\t\t\tif (this.map.getMapCell(new Location(x, y)).isWalkable()) {\n\t\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public void handleRightWall(){\n for(int i = 0; i < 15; i ++){\n if(i % 2 == 1 ){\n maze[18][i] = VISIBLESPACE;\n }\n }\n }",
"public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }",
"@Override\n\tprotected void updateTiles() {\n\n\t\tfinal byte tileId = getPlanetType().mainTileId;\n\n\t\tfor (int i = 0; i < tiles.length; i++) {\n\t\t\t// if (random.NextDouble() > 0.95f)\n\t\t\t// tiles[i] = 0;\n\t\t\t// else\n\t\t\ttiles[i] = tileId;\n\t\t}\n\t}",
"public static void removeSomeWalls(TETile[][] t) {\n for (int x = 1; x < WIDTH - 1; x++) {\n for (int y = 1; y < HEIGHT - 1; y++) {\n if (t[x][y] == Elements.TREE\n && t[x + 1][y] == Elements.FLOOR) {\n if (t[x - 1][y] == Elements.FLOOR\n && t[x][y + 1] == Elements.FLOOR) {\n if (t[x][y - 1] == Elements.FLOOR\n && t[x + 1][y + 1] == Elements.FLOOR) {\n if (t[x + 1][y - 1] == Elements.FLOOR\n && t[x - 1][y + 1] == Elements.FLOOR) {\n if (t[x - 1][y - 1] == Elements.FLOOR) {\n t[x][y] = Elements.FLOOR;\n }\n }\n }\n }\n }\n }\n }\n }",
"private void enableAllTiles() {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tplayerBoard[j][i].setEnabled(true);\n\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"t\");\n\t\t\t\tplayerBoard[j][i].setForeground(Color.lightGray);\n\t\t\t\tplayerBoard[j][i].setBackground(Color.darkGray);\n\t\t\t}\n\t\t}\n\t}",
"public WallTile()\n\t{\n\t\t\n\t}",
"public void buildWall() {\n for (int i = 0; i < worldWidth; i += 1) {\n for (int j = 0; j < worldHeight; j += 1) {\n if (world[i][j].equals(Tileset.NOTHING)\n && isAdjacentFloor(i, j)) {\n world[i][j] = Tileset.WALL;\n }\n }\n }\n }",
"public Wall() {\n\t\tcanHold = false;\n\t\tisPassable = false;\n\t\ttype = TileTypes.WALL;\n\t}",
"public boolean tileBlocked(float xTile, float yTile)\r\n/* 117: */ {\r\n/* 118:131 */ return (!tileInBounds(xTile, yTile)) || (this.blocked[((int)xTile)][((int)yTile)] != 0);\r\n/* 119: */ }",
"private void disableRestrictedTiles(int x, int y) {\n\t\tif (shipsToPlace == 3) {\n\t\t\tfor (int i = 6; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[i][j].setEnabled(false);\n\t\t\t\t\tplayerBoard[i][j].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[i][j].setName((j) + \"\" + (i) + \"f\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else if (shipsToPlace == 2) {\n\t\t\t// disables long ship tiles\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (y - i >= 0) {\n\t\t\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setEnabled(false);\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setBackground(Color.lightGray);\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setName((x + j) + \"\" + (y - i) + \"f\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// disables restricted tiles\n\t\t\tfor (int i = 8; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[j][i].setEnabled(false);\n\t\t\t\t\tplayerBoard[j][i].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"f\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatus.setText(\" Click to place the second ship\");\n\t\t} else if (shipsToPlace == 1) {\n\t\t\t// disable medium ship tiles\n\t\t\tif (y - 1 >= 0) {\n\t\t\t\tplayerBoard[x][y - 1].setEnabled(false);\n\t\t\t\tplayerBoard[x][y - 1].setBackground(Color.lightGray);\n\t\t\t\tplayerBoard[x][y - 1].setName(x + \"\" + (y - 1) + \"f\");\n\t\t\t}\n\t\t\tplayerBoard[x][y].setEnabled(false);\n\t\t\tplayerBoard[x][y + 1].setEnabled(false);\n\t\t\tplayerBoard[x][y + 2].setEnabled(false);\n\n\t\t\tplayerBoard[x][y].setBackground(Color.lightGray);\n\t\t\tplayerBoard[x][y + 1].setBackground(Color.lightGray);\n\t\t\tplayerBoard[x][y + 2].setBackground(Color.lightGray);\n\n\t\t\tplayerBoard[x][y].setName(x + \"\" + y + \"f\");\n\t\t\tplayerBoard[x][y + 1].setName(x + \"\" + (y + 1) + \"f\");\n\t\t\tplayerBoard[x][y + 2].setName(x + \"\" + (y + 2) + \"f\");\n\n\t\t\t// disables long ship tiles\n\t\t\tfor (int counter1 = 0; counter1 < 2; counter1++) {\n\t\t\t\tif (longShipCoords[1] - counter1 >= 0) {\n\n\t\t\t\t\tfor (int longcount = 0; longcount < 5; longcount++) {\n\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1].setEnabled(false);\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1]\n\t\t\t\t\t\t\t\t.setBackground(Color.lightGray);\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1]\n\t\t\t\t\t\t\t\t.setName((longShipCoords[0] + longcount) + \"\" + (longShipCoords[1] - counter1) + \"f\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// disable restricted tiles\n\t\t\tfor (int i = 9; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[j][i].setEnabled(false);\n\t\t\t\t\tplayerBoard[j][i].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"f\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatus.setText(\" Click to place the third ship\");\n\t\t} else {\n\t\t\tenableAllTiles();\n\t\t}\n\t}",
"private boolean isThereLegalTilesNotColored(){\n\n\t\tArrayList<Tile> legalTiles=getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tlegalTiles.removeAll(coloredTilesList);\n\t\tif(legalTiles.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private void computeMovableTilesToDisplayToPlayer() {\n \tfor (Entity enemyEntity : allCreaturesOfCurrentRoom) {\n \t\tAIComponent aiComponent = Mappers.aiComponent.get(enemyEntity);\n \t\tif (aiComponent.getSubSystem() != null) {\n \t\t\tboolean handledInSubSystem = aiComponent.getSubSystem().computeMovableTilesToDisplayToPlayer(this, enemyEntity, room);\n \t\t\tif (handledInSubSystem) continue;\n \t\t}\n \t\t\n \tMoveComponent moveCompo = Mappers.moveComponent.get(enemyEntity);\n \tAttackComponent attackCompo = Mappers.attackComponent.get(enemyEntity);\n \t\n \t\t//clear the movable tile\n \t\tmoveCompo.clearMovableTiles();\n \t\tif (attackCompo != null) attackCompo.clearAttackableTiles();\n \t\t\n \t\tmoveCompo.setMoveRemaining(moveCompo.getMoveSpeed());\n \t\t\n \t//Build the movable tiles list\n \t\ttileSearchService.buildMoveTilesSet(enemyEntity, room);\n \t\tif (attackCompo != null) attackTileSearchService.buildAttackTilesSet(enemyEntity, room, false, true);\n \t\tmoveCompo.hideMovableTiles();\n \t\tif (attackCompo != null) attackCompo.hideAttackableTiles();\n \t}\n }",
"private void drawTiles(Graphics g)\n {\n for (int x = 0; x < 19; x++)\n {\n for (int y = 0; y < 15; y++)\n {\n tileset.getSprite(5, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n switch(board[x][y])\n {\n case 1:\n {\n tileset.getSprite(4, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n break;\n }\n case 2:\n {\n tileset.getSprite(3, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n break;\n }\n case 3:\n {\n if (bombs[x][y].getTimeLeft() > 80)\n {\n bombImage.getSprite(0, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 80 && bombs[x][y].getTimeLeft() > 50)\n {\n bombImage.getSprite(1, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 50 && bombs[x][y].getTimeLeft() > 20)\n {\n bombImage.getSprite(2, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 20)\n {\n bombImage.getSprite(3, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n //4 is player\n case 5:\n {\n if (fire[x][y] == null)\n {\n tileset.getSprite(2, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n case 6:\n {\n if (fire[x][y] == null)\n {\n tileset.getSprite(15, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n }\n }\n }\n }",
"public void setAdjacent()\r\n {\n \t\r\n adjacentTiles = new Tile[6];\r\n \r\n \r\n //Driver.map[VERT][HOR]\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos > 1) //topleft\r\n {\r\n \ttopLeft = Driver.map[verticalPos + 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \ttopLeft = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length - 2) //top\r\n {\r\n \ttop = Driver.map[verticalPos + 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \ttop = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos < Driver.map[0].length) //topright\r\n {\r\n \ttopRight = Driver.map[verticalPos + 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \ttopRight = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos < Driver.map[0].length) //bottomright\r\n {\r\n \tbottomRight = Driver.map[verticalPos - 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \tbottomRight = null;\r\n }\r\n \r\n if(verticalPos > 2) //bottom\r\n {\r\n \tbottom = Driver.map[verticalPos - 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \tbottom = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos > 1) //botttomLeft\r\n {\r\n \tbottomLeft = Driver.map[verticalPos - 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \tbottomLeft = null;\r\n }\r\n \t\r\n \r\n adjacentTiles[0] = topLeft;\r\n adjacentTiles[1] = top;\r\n adjacentTiles[2] = topRight;\r\n adjacentTiles[3] = bottomRight;\r\n adjacentTiles[4] = bottom;\r\n adjacentTiles[5] = bottomLeft;\r\n \r\n \r\n// System.out.print(\"main tile \" + getHor() + \", \" + getVert() + \" \");\r\n// for(int i = 0; i < adjacentTiles.length; i++)\r\n// {\r\n// \tif( adjacentTiles[i] != null)\r\n// \t\tSystem.out.print(adjacentTiles[i].getHor() + \", \" + adjacentTiles[i].getVert() + \" | \");\r\n// \telse\r\n// \t\tSystem.out.print(\"null \");\r\n// }\r\n// System.out.println();\r\n \r\n }",
"public SpaceHulkWorldModel(TiledMap map, int players)\r\n/* 49: */ {\r\n/* 50: 49 */ super(map);\r\n/* 51: 50 */ this.mission = false;\r\n/* 52: 51 */ this.reachablePlaces = 0;\r\n/* 53: 52 */ this.highlight = new int[getWidthInTiles()][getHeightInTiles()];\r\n/* 54: 53 */ this.walkable = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 55: 54 */ this.blocked = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 56: 55 */ this.finish = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 57: 56 */ this.door = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 58: 57 */ this.rock = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 59: 58 */ this.fire = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 60: 59 */ this.grass = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 61: 60 */ this.sand = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 62: */ \r\n/* 63: 62 */ this.reach = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 64: 64 */ for (int x = 0; x < getWidthInTiles(); x++) {\r\n/* 65: 66 */ for (int y = 0; y < getHeightInTiles(); y++) {\r\n/* 66: 69 */ this.walkable[x][y] = checkTileProperty(x, y, \"walkable\", \"true\");\r\n/* 67: */ }\r\n/* 68: */ }\r\n/* 69: */ }",
"private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }",
"public void buildBoundaryWall() {\n for (int i = 0; i < worldWidth; i += 1) {\n for (int j = 0; j < worldHeight; j += 1) {\n if (i == 0 || i == worldWidth - 1\n || j == 0 || j == worldHeight - 1) {\n world[i][j] = Tileset.WALL;\n }\n }\n }\n }",
"private boolean wall(int cell) {\n\t\treturn cell >= 0 && (cell >= size || DungeonTileSheet.wallStitcheable(Dungeon.level.map[cell]));\n\t}",
"void randomBlock() {\n\t\t// map generate (int map)\n\t\tfor (int i = 0; i < mapX; i += 2) {\n\t\t\tfor (int j = 0; j < mapY; j += 2) {\n\t\t\t\tint r = (int) Math.random() * 4;\n\t\t\t\tif (r == 0) {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 1);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 1);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 1);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 0);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 0);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 0);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 0);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public List<Tile> getOwnedTiles() {\n return new ArrayList<Tile>(ownedTiles);\n }",
"public void setTiles() {\n\t\tTileStack names = new TileStack();\n\t\tfor(int x=0; x < theBoard.getCols(); x++) {\n\t\t\tfor(int y=0; y < theBoard.getRows(); y++) {\n\t\t\t\tp = new Point(x,y);\n\t\t\t\tif(p.equals(new Point(0,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse \n\t\t\t\t\ttheBoard.setTile(p, names.pop());\n\t\t\t}\n\t\t}\n\t}",
"public static int getTileBits() {\n return TILE_BITS;\n }",
"public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}",
"private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }",
"public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }",
"protected void checkForWalls(int x, int y, ArrayList<Position> walls) {\n int x1 = x - 1;\n int x2 = x + 2;\n int y1 = y - 1;\n int y2 = y + 2;\n\n if (x == 0) // We want to avoid an OutOfBounds exception\n x1 = x;\n if (x == sizeOfFloor - 1)\n x2 = sizeOfFloor;\n if (y == 0)\n y1 = y;\n if (y == sizeOfFloor - 1)\n y2 = sizeOfFloor;\n\n\n for (int i = x1; i < x2; i++) {\n for (int j = y1; j < y2; j++) {\n if (layout[i][j].getContent() == 'a')\n walls.add(layout[i][j]);\n }\n }\n }",
"public boolean checkNorth(HashMap<Coordinate,MapTile> currentView){\n\t\tCoordinate currentPosition = new Coordinate(getPosition());\n\t\tfor(int i = 0; i <= wallSensitivity; i++){\n\t\t\tMapTile tile = currentView.get(new Coordinate(currentPosition.x, currentPosition.y+i));\n\t\t\tif(tile.isType(MapTile.Type.WALL)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private void checkWalls() {\n\t\tcheckSideWalls();\n\t\tcheckTopWall();\n\t\tcheckBottomWall();\n\t}",
"public boolean checkNorth(HashMap<Coordinate,MapTile> currentView){\n\t\t\tCoordinate currentPosition = new Coordinate(getPosition());\n\t\t\tfor(int i = 0; i <= wallSensitivity; i++){\n\t\t\t\tMapTile tile = currentView.get(new Coordinate(currentPosition.x, currentPosition.y+i));\n\t\t\t\tif(tile.isType(MapTile.Type.WALL)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public boolean tileGrass(float xTile, float yTile)\r\n/* 212: */ {\r\n/* 213:236 */ return (tileInBounds(xTile, yTile)) && (this.grass[((int)xTile)][((int)yTile)] != 0);\r\n/* 214: */ }",
"void loadCheckerBoard(int tileSize);",
"@Override\n protected void generateTiles() {\n }",
"public void getTile_B8();",
"public ArrayList<Tile> getAllBoardTiles() {\n\n\t\tArrayList<ArrayList<Tile>> tilesMapValues=new ArrayList<ArrayList<Tile>>(getTilesMap().values()) ;\n\t\tArrayList<Tile> allTiles =new ArrayList<Tile>() ;\n\t\tfor(ArrayList<Tile> tileList : tilesMapValues) {\n\t\t\tallTiles.addAll(tileList);\n\n\t\t}\n\t\treturn allTiles;\n\t}",
"public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void openFloor(Tile t) {\r\n int tileRow = t.getRow();\r\n int tileCol = t.getCol();\r\n if (t.getSurroudingBombs() == 0) { \r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) {\r\n Tile inspectionTile = grid[r][c]; \r\n if (!(r == tileRow && c == tileCol) && inspectionTile.isHidden() \r\n && !inspectionTile.getFlagged()) {\r\n if (!inspectionTile.isBomb()) {\r\n inspectionTile.handleTile();\r\n if (inspectionTile.getSurroudingBombs() == 0) {\r\n openFloor(inspectionTile);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) {\r\n Tile inspectionTile = grid[r][c]; \r\n if ((r != tileRow - 1 && c != tileCol - 1) ||\r\n (r != tileRow - 1 && c != tileCol + 1) ||\r\n (r != tileRow + 1 && c != tileCol - 1) ||\r\n (r != tileRow + 1 && c != tileCol + 1) && \r\n !(r == tileRow && c == tileCol) && inspectionTile.isHidden()) {\r\n if (!inspectionTile.isBomb()) {\r\n inspectionTile.handleTile();\r\n if (inspectionTile.getSurroudingBombs() == 0) {\r\n openFloor(inspectionTile);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }",
"public static boolean isEveryTileFilled() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (tiles.get(new Coordinates(i, j)).getTextFromTile().getText().equals(\"\")) {\n return false;\n }\n }\n }\n return true;\n }",
"@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }",
"private ArrayList<Tile> getPossibleRedTiles(){\n\t\tArrayList<Tile> toReturn = new ArrayList<>();\n\n\t\tGame game=Game.getInstance();\n\t\tArrayList<Tile> legalTiles= getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tArrayList<Tile> blockedTiles=new ArrayList<Tile>();\n\t\tlegalTiles.removeAll(coloredTilesList);\n\n\t\t//\t\tonly one soldier can move\n\t\tif(game.getTurn().isLastTileRed()) {\n\t\t\tPiece lastPMoved = game.getTurn().getLastPieceMoved();\n\t\t\tArrayList<Tile> possibleTiles=lastPMoved.getPossibleMoves(game.getCurrentPlayerColor());\n\t\t\tpossibleTiles.removeAll(coloredTilesList);\n\t\t\tif(!possibleTiles.isEmpty()) {\n\t\t\t\tfor(Tile t: possibleTiles) {\n\t\t\t\t\tPiece tempPiece=null;\n\t\t\t\t\tif(lastPMoved instanceof Soldier) {\n\t\t\t\t\t\ttempPiece=new Soldier(lastPMoved.getId(), lastPMoved.getColor(), t.getLocation());\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttempPiece=new Queen(lastPMoved.getId(), lastPMoved.getColor(), t.getLocation());\n\t\t\t\t\t}\n\t\t\t\t\tif(tempPiece.getPossibleMoves(game.getCurrentPlayerColor()).isEmpty()) {\n\t\t\t\t\t\tblockedTiles.add(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpossibleTiles.removeAll(blockedTiles);\n\t\t\t}\n\t\t\ttoReturn = possibleTiles;\n\t\t}\n\t\telse {\n\t\t\tHashMap<Tile, ArrayList<Piece>> tempCollection = new HashMap<>();\n\n\t\t\tfor(Tile t:legalTiles) {\n\t\t\t\tfor(Piece p : getColorPieces(Game.getInstance().getCurrentPlayerColor())){\n\t\t\t\t\tboolean canMove = false;\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.UP_LEFT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.UP_RIGHT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.DOWN_RIGHT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.DOWN_LEFT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(canMove) {\n\t\t\t\t\t\tArrayList<Piece> pp = null;\n\t\t\t\t\t\tif(!tempCollection.containsKey(t)) {\n\t\t\t\t\t\t\tpp = new ArrayList<>();\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpp = tempCollection.get(t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpp.add(p);\n\t\t\t\t\t\ttempCollection.put(t, pp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tArrayList<Tile> tilesToRemove = new ArrayList<>();\n\n\t\t\tfor(Tile t : tempCollection.keySet()) {\n\t\t\t\tArrayList<Piece> pieces= tempCollection.get(t);\n\t\t\t\tfor(Piece p : pieces) {\n\t\t\t\t\tPiece tempPiece=null;\n\t\t\t\t\tif(p instanceof Soldier) {\n\t\t\t\t\t\ttempPiece=new Soldier(p.getId(), p.getColor(), t.getLocation());\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttempPiece=new Queen(p.getId(), p.getColor(), t.getLocation());\n\t\t\t\t\t}\n\t\t\t\t\tif(tempPiece.getPossibleMoves(game.getCurrentPlayerColor()).isEmpty()) {\n\t\t\t\t\t\tif(!tilesToRemove.contains(t))\n\t\t\t\t\t\t\ttilesToRemove.add(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(Tile t : tilesToRemove) {\n\t\t\t\ttempCollection.remove(t);\n\t\t\t}\n\n\t\t\ttoReturn = new ArrayList<Tile>(tempCollection.keySet());\t\n\t\t}\n\t\treturn toReturn;\n\t}",
"private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }",
"private void createChamber() {\n\n // Give all tiles coordinates for map and temp map\n int CurrentY = 0;\n for (Tile[] tiles : map) {\n int CurrentX = 0;\n for (Tile tile : tiles) {\n tile.setPosition(new Coordinates(CurrentX, CurrentY));\n tile.setTerrain(Terrain.WALL);\n CurrentX++;\n }\n CurrentY++;\n }\n\n for (int y = 0; y < CAST_HEIGHT; y++) {\n for (int x = 0; x < CAST_WIDTH; x++) {\n tempMap[y][x].setPosition(new Coordinates(x, y));\n }\n }\n\n // Initialize algorithm at starting position (0, 0)\n tempMap[0][0].setVisited(true);\n numberOfCellsVisited = 1; //setting number of cells visited to 1 because I have visited one now!\n mapStack.push(tempMap[0][0]); //Chamber start position\n createMaze(tempMap[0][0]); //Chamber start position\n\n // Reveal top edge, sides, and bottom edge\n for (Tile tile : map[0]) {\n tile.setVisible(true);\n }\n for (Tile[] tiles : map) {\n tiles[0].setVisible(true);\n tiles[CHAMBER_WIDTH].setTerrain(Terrain.WALL);\n tiles[CHAMBER_WIDTH].setVisible(true);\n }\n for (Tile tile : map[CHAMBER_HEIGHT]) {\n tile.setVisible(true);\n }\n\n // Clear bugged walls\n for (int i = 1; i < MAP_HEIGHT - 2; i += 2)\n map[i][MAP_WIDTH - 2].setTerrain(Terrain.EMPTY);\n\n // Randomly make regulated holes in walls to create cycles\n Random rand = new Random(); // Preset rng for performance purposes\n for (int i = 1; i < MAP_HEIGHT - 1; i++) {\n for (int j = 1; j < MAP_WIDTH - 1; j++) {\n Tile tile = map[i][j];\n if (tile.getTerrain().equals(Terrain.WALL)) {\n\n // Neighbourhood Check\n int neighbourCount = 0, index = 0;\n boolean[] neighbourhood = new boolean[]{false, false, false, false}; // validity flags\n\n for (Direction direction : Direction.cardinals) {\n Coordinates targetCoordinates = Utility.locateDirection(tile.getPosition(), direction);\n Tile neighbour = getTileAtCoordinates(targetCoordinates);\n if (neighbour.getTerrain().equals(Terrain.WALL)) {\n neighbourCount++;\n neighbourhood[index] = true;\n }\n index++;\n }\n\n // Corner exclusion test, tests vertical NS and horizontal EW\n boolean isStraight = false;\n if (neighbourhood[0] && neighbourhood[1]) isStraight = true;\n if (neighbourhood[2] && neighbourhood[3]) isStraight = true;\n\n if (neighbourCount == 2 && isStraight) {\n if (rand.nextInt(5) == 4) tile.setTerrain(Terrain.EMPTY);\n }\n }\n }\n }\n\n // Check for enclosed spaces and create openings\n for (int i = 1; i < MAP_HEIGHT - 2; i++) probe(map[i][MAP_WIDTH - 2], Direction.EAST);\n }",
"private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }",
"private void updateAllTiles() {\r\n mEntireBoard.updateDrawableState();\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large].updateDrawableState();\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small].updateDrawableState();\r\n }\r\n }\r\n }",
"private void revealTiles() {\n\n for (int i = 0; i < minefield.getRows(); i++) {\n for (int j = 0; j < minefield.getCols(); j++) {\n if (minefield.getMinefield()[i][j].isRevealed()\n && !minefield.getMinefield()[i][j].isMined()) {\n tileLabel[i][j].setText(\"<html><b>\" + minefield.getMinefield()[i][j].getMinedNeighbours() + \"</html></b>\");\n tile[i][j].setBackground(new Color(208, 237, 243));\n switch (tileLabel[i][j].getText()) {\n case \"<html><b>0</html></b>\":\n tileLabel[i][j].setText(\"\");\n break;\n case \"<html><b>1</html></b>\":\n tileLabel[i][j].setForeground(Color.blue);\n break;\n case \"<html><b>2</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 100, 0));\n break;\n case \"<html><b>3</html></b>\":\n tileLabel[i][j].setForeground(Color.red);\n break;\n case \"<html><b>4</html></b>\":\n tileLabel[i][j].setForeground(new Color(75, 0, 130));\n break;\n case \"<html><b>5</html></b>\":\n tileLabel[i][j].setForeground(new Color(130, 0, 0));\n break;\n case \"<html><b>6</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 153, 153));\n break;\n case \"<html><b>7</html></b>\":\n tileLabel[i][j].setForeground(Color.black);\n break;\n case \"<html><b>8</html></b>\":\n tileLabel[i][j].setForeground(Color.darkGray);\n break;\n }\n }\n }\n }\n frame.repaint();\n }",
"public Puzzle exPuzzle() {\n List<Tile> tiles = new ArrayList<>(9);\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.C, Half.x), new Pic(Pattern.C, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y), new Pic(Pattern.C, Half.y)));\n return new Puzzle(tiles);\n }",
"public void clearTiles() {\n \tfor (int x = 0; x < (mAbsoluteTileCount.getX()); x++) {\n for (int y = 0; y < (mAbsoluteTileCount.getY()); y++) {\n setTile(0, x, y);\n }\n }\n }",
"public static byte[] getGoalTiles() {\n return GOAL_TILES;\n }",
"public boolean tileWalkable(float xTile, float yTile)\r\n/* 160: */ {\r\n/* 161:183 */ return (!tileInBounds(xTile, yTile)) || \r\n/* 162:184 */ (this.walkable[((int)xTile)][((int)yTile)] != 0);\r\n/* 163: */ }",
"private static boolean tilesAreNotFilled(int[][] grid) {\n\t\tfor(int i = 0; i < BOUNDARY; i++) {\n\t\t\tfor(int j = 0; j < BOUNDARY; j++) {\n\t\t\t\tif(grid[i][j] == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void getLegalMoves() {\r\n\t\tint pawnX = this.getX();\r\n\t\tint pawnY = this.getY();\r\n\t\tchar pawnColor = getColor();\r\n\t\tTile[][] chessBoard = SimpleChess.getChessBoard();\r\n\t\tcheckInFront(chessBoard,pawnX,pawnY,pawnColor);\r\n\t\tcheckDiagonal(chessBoard,pawnX,pawnY,pawnColor);\r\n\t}",
"public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void setObjectives(TiledMap map)\r\n/* 72: */ {\r\n/* 73: 80 */ this.mission = true;\r\n/* 74: 81 */ for (int x = 0; x < getWidthInTiles(); x++) {\r\n/* 75: 83 */ for (int y = 0; y < getHeightInTiles(); y++)\r\n/* 76: */ {\r\n/* 77: 85 */ this.reach[x][y] = checkTileProperty(x, y, \"reach\", \"true\");\r\n/* 78: 86 */ if (this.reach[x][y] != 0) {\r\n/* 79: 88 */ this.reachablePlaces += 1;\r\n/* 80: */ }\r\n/* 81: 90 */ this.fire[x][y] = checkTileProperty(x, y, \"fire\", \"true\");\r\n/* 82: 91 */ if (this.fire[x][y] != 0) {\r\n/* 83: 93 */ this.burnPlaces += 1;\r\n/* 84: */ }\r\n/* 85: */ }\r\n/* 86: */ }\r\n/* 87: */ }",
"private void makeMaze() {\n\t\ttry {\n\t\t\tthis.end = ImageIO.read(new File(\"images/tiles/end_locked.png\"));\n\t\t\tint w = getWidth()/gui.getModel().getDifficulty();\n\t\t\tint h = getHeight()/gui.getModel().getDifficulty();\n\t\t\tint difficulty = gui.getModel().getDifficulty();\n\t\t\tmazeImage = new BufferedImage(difficulty*(getWidth()/difficulty), difficulty*(getHeight()/difficulty), BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics2D g = mazeImage.createGraphics();\n\t\t\tString tile = \"\";\n\t\t\tfor (BaseState s: gui.getModel().getMaze()) {\n\t\t\t\tint x = s.getX(); int y = s.getY();\n\t\t\t\t\n\t\t\t\t// check walls\n\t\t\t\tint numSides = 0;\n\t\t\t\tboolean rightWall = false;\n\t\t\t\tboolean leftWall = false;\n\t\t\t\tboolean topWall = false;\n\t\t\t\tboolean bottomWall = false;\n\t\t\t\tif (s.getRight() == null) rightWall = true;\n\t\t\t\tif (s.getLeft() == null) leftWall = true;\n\t\t\t\tif (s.getUp() == null) topWall = true;\n\t\t\t\tif (s.getDown() == null) bottomWall = true;\n\t\t\t\tif (topWall) numSides++;\n\t\t\t\tif (leftWall) numSides++;\n\t\t\t\tif (bottomWall) numSides++;\n\t\t\t\tif (rightWall) numSides++;\n\t\t\t\t\n\t\t\t\t// find tile type\n\t\t\t\tif (numSides == 3) { // dead end\n\t\t\t\t\tif (!rightWall) tile = \"images/tiles/deadend_left.bmp\";\n\t\t\t\t\telse if (!leftWall) tile = \"images/tiles/deadend_right.bmp\";\n\t\t\t\t\telse if (!topWall) tile = \"images/tiles/deadend_bottom.bmp\";\n\t\t\t\t\telse if (!bottomWall) tile = \"images/tiles/deadend_top.bmp\";\n\t\t\t\t} else if (numSides == 2) { // corner or hall\n\t\t\t\t\t//hall\n\t\t\t\t\tif (rightWall && leftWall) tile = \"images/tiles/hall_vertical.bmp\";\n\t\t\t\t\telse if (topWall && bottomWall) tile = \"images/tiles/hall_horizontal.bmp\";\n\t\t\t\t\t//corner\n\t\t\t\t\telse if (topWall && leftWall) tile = \"images/tiles/corner_top_left.bmp\";\n\t\t\t\t\telse if (topWall && rightWall) tile = \"images/tiles/corner_top_right.bmp\";\n\t\t\t\t\telse if (bottomWall && leftWall) tile = \"images/tiles/corner_bottom_left.bmp\";\n\t\t\t\t\telse if (bottomWall && rightWall) tile = \"images/tiles/corner_bottom_right.bmp\";\n\t\t\t\t} else if (numSides == 1) { // single side\n\t\t\t\t\tif (leftWall) tile = \"images/tiles/wall_left.bmp\";\n\t\t\t\t\telse if (rightWall) tile = \"images/tiles/wall_right.bmp\";\n\t\t\t\t\telse if (topWall) tile = \"images/tiles/wall_top.bmp\";\n\t\t\t\t\telse if (bottomWall) tile = \"images/tiles/wall_bottom.bmp\";\n\t\t\t\t} else { // open\n\t\t\t\t\ttile = \"images/tiles/open.bmp\";\n\t\t\t\t}\n\t\t\t\t// draw tile\n\t\t\t\tg.drawImage(ImageIO.read(new File(tile)), x*w, y*h, w, h, null);\n\t\t\t\t\n\t\t\t\t// check for ending and draw if need be\n\t\t\t\tif (s.getX() == gui.getModel().getDifficulty() - 1 && s.getY() == gui.getModel().getDifficulty() - 1) {\n\t\t\t\t\tg.drawImage(ImageIO.read(new File(\"images/tiles/end_unlocked.png\")), x*w, y*h, w, h, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(IOException e) {System.err.println(\"Images not found.\");}\n\t}",
"public boolean isWalkAbleTile(int x, int y) {\n\t\tfor (Entity e : entities) {\n\t\t\tif (e.getX() >> 4 == x && e.getY() >> 4 == y)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static void CheckArea(double wallSize, Scene scene, Group root)\r\n\t{ //check player area\r\n\t\tfor (int a = 0; a < GenerateMaze.rows; a++){ \r\n\t\t\tfor (int b = 0; b < GenerateMaze.columns; b++){\t\t\t\r\n\t\t\t\tif (GenerateMaze.maze[a][b] == 0){ //if player is in open\r\n\t\t\t\t\tif (camX >= (a*wallSize) - (wallSize/2) && camX <= (a*wallSize) + (wallSize/2)\r\n\t\t\t\t\t\t\t&& camZ >= (b*wallSize) - (wallSize/2) && camZ <= (b*wallSize) + (wallSize/2)){\r\n\t\t\t\t\t\tSystem.out.println(\"Open\"); //debug open\r\n\t\t\t\t\t\t//set record of positions\r\n\t\t\t\t\t\tlocX = b;\r\n\t\t\t\t\t\tlocY = a;\r\n\t\t\t\t\t\tif (lastLocX != locX) lastLocX = locX;\r\n\t\t\t\t\t\tif (lastLocY != locY) lastLocY = locY;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (GenerateMaze.maze[a][b] == 1){ //if player is in wall\r\n\t\t\t\t\tif (camX >= (a*wallSize) - (wallSize/2) && camX <= (a*wallSize) + (wallSize/2)\r\n\t\t\t\t\t\t\t&& camZ >= (b*wallSize) - (wallSize/2) && camZ <= (b*wallSize) + (wallSize/2) && camY >=-wallSize/2){\r\n\t\t\t\t\t\tSystem.out.println(\"Wall\");//debug wall\r\n\t\t\t\t\t\t//set record of positions\r\n\t\t\t\t\t\tlocX = b;\r\n\t\t\t\t\t\tlocY = a;\r\n\t\t\t\t\t\tCollision.Collide(GameController.camera, wallSize, b, a, false);\r\n\t\t\t\t\t\tSystem.out.println(\"Wall Collided at: \" + b + \", \" + a);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (GenerateMaze.maze[a][b] == 3){ //if player is at start\r\n\t\t\t\t\tif (camX >= (a*wallSize) - (wallSize/2) && camX <= (a*wallSize) + (wallSize/2)\r\n\t\t\t\t\t\t\t&& camZ >= (b*wallSize) - (wallSize/2) && camZ <= (b*wallSize) + (wallSize/2)){\r\n\t\t\t\t\t\tSystem.out.println(\"At Start\");//debug start\r\n\t\t\t\t\t\t//set record of positions\r\n\t\t\t\t\t\tlocX = b;\r\n\t\t\t\t\t\tlocY = a;\r\n\t\t\t\t\t\tif (lastLocX != locX) lastLocX = locX;\r\n\t\t\t\t\t\tif (lastLocY != locY) lastLocY = locY;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (GenerateMaze.maze[a][b] == 9){ //if player is at finish\r\n\t\t\t\t\tif (camX >= (a*wallSize) - (wallSize/2) && camX <= (a*wallSize) + (wallSize/2)\r\n\t\t\t\t\t\t\t&& camZ >= (b*wallSize) - (wallSize/2) && camZ <= (b*wallSize) + (wallSize/2)){\r\n\t\t\t\t\t\tSystem.out.println(\"At Finish, maze completed!\");//debug finish\r\n\t\t\t\t\t\t//set record of positions\r\n\t\t\t\t\t\tlocX = b;\r\n\t\t\t\t\t\tlocY = a;\r\n\t\t\t\t\t\tif (lastLocX != locX) lastLocX = locX;\r\n\t\t\t\t\t\tif (lastLocY != locY) lastLocY = locY;\r\n\t\t\t\t\t\tFinished = true; //set finish to true\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (camX < 0 && camZ < 0) {\r\n\t\t\tSystem.out.println(\"Player isn't even on map\"); //debug player isn't on map\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Current location: \" + locX + \", \" + locY + \". \"\r\n\t\t\t\t\t+ \"Last Recorded Position: \" + lastLocX + \", \" + lastLocY); //debug player current position in maze\r\n\t\t}\r\n\t}",
"public boolean tileReachObjectives(float xTile, float yTile)\r\n/* 122: */ {\r\n/* 123:136 */ return (!tileInBounds(xTile, yTile)) || \r\n/* 124:137 */ (this.reach[((int)xTile)][((int)yTile)] != 0);\r\n/* 125: */ }",
"public void init() {\r\n int width = img.getWidth();\r\n int height = img.getHeight();\r\n floor = new Floor(game, width, height);\r\n units = new ArrayList<Unit>();\r\n objects = new ArrayList<GameObject>();\r\n for (int y=0; y<height; y++) {\r\n for (int x=0; x<width; x++) {\r\n int rgb = img.getRGB(x,y);\r\n Color c = new Color(rgb);\r\n Tile t;\r\n if (c.equals(GRASS_COLOR)) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_grass.png\");\r\n } else if (c.equals(STONE_COLOR)) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_stone.png\");\r\n } else {\r\n /* Check all the surrounding tiles. Take a consensus for the underlying tile color. */\r\n int numGrass=0, numStone=0;\r\n for (int j=y-1; j<=y+1; j++) {\r\n for (int i=x-1; i<=x+1; i++) {\r\n if (i>=0 && i<img.getWidth() && j>=0 && j<img.getHeight() && !(i==x && j==y)) {\r\n int rgb2 = img.getRGB(i,j);\r\n Color c2 = new Color(rgb2);\r\n if (c2.equals(GRASS_COLOR)) numGrass++;\r\n else if (c2.equals(STONE_COLOR)) numStone++;\r\n }\r\n }\r\n }\r\n if (numGrass >= numStone) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_grass.png\");\r\n } else {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_stone.png\");\r\n }\r\n }\r\n floor.setTile(x, y, t);\r\n \r\n if (c.equals(TREE_COLOR)) {\r\n //objects.add(new GameObject(x,y))\r\n } else if (c.equals(WALL_COLOR)) {\r\n objects.add(new Wall(game, new Posn(x,y), \"wall_48x78_1.png\"));\r\n } else if (c.equals(WIZARD_COLOR)) {\r\n addWizard(x,y);\r\n } else if (c.equals(ZOMBIE_COLOR)) {\r\n addZombie(x,y);\r\n } else if (c.equals(BANDIT_COLOR)) {\r\n addBandit(x,y);\r\n } else if (c.equals(PLAYER_COLOR)) {\r\n game.getPlayerUnit().setPosn(new Posn(x,y));\r\n units.add(game.getPlayerUnit());\r\n }\r\n }\r\n }\r\n }",
"private static long getPawnWestAttacks(long board, int side) {\n\t\tlong result;\n\t\tif (side == 0) {\n\t\t\tresult = ((board << 7) & ~CoreConstants.FILE_H);\n\t\t} else {\n\t\t\tresult = ((board >>> 9) & ~CoreConstants.FILE_H);\n\t\t}\n\t\treturn result;\n\t}",
"protected Tile[] newTiles() {\n int len = getWidthInTiles() * getHeightInTiles();\n Tile[] t = new Tile[ len ];\n for(int i = 0; i < len; i++) {\n t[i] = null;\n }\n return t;\n }",
"private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void hideInnerMaze(){\n for(int i = 0; i < 20; i ++){\n for(int j = 0; j < 15; j ++){\n if(maze[i][j] == VISIBLESPACE){\n maze[i][j] = NOTVISIBLESPACE;\n }\n }\n }\n\n //SET OUTER WALL TO VISIBLE\n for(int i = 0; i < 20; i ++){\n maze[i][0] = VISIBLEWALL;\n maze[i][14] = VISIBLEWALL;\n }\n for(int i = 0; i < 15; i ++){\n maze[0][i] = VISIBLEWALL;\n maze[19][i] = VISIBLEWALL;\n }\n }",
"public static ArrayList<FloorTile> getEffectedTiles() {\r\n\r\n ArrayList<FloorTile> temp = new ArrayList<>();\r\n for(int i = GameControl.ytile-1; i < GameControl.ytile + 2; i++) {\r\n for(int j = GameControl.xtile-1; j < GameControl.xtile + 2; j++) {\r\n if(i >= 0 && i < board.length && j >= 0 && j < board[0].length) {\r\n temp.add(board[i][j]);\r\n }\r\n }\r\n }\r\n return temp;\r\n }",
"@Override\n\tprotected void generateTiles() {\n\t}",
"public void generateLevel() {\n\t\tfor (int y = 0; y < this.height; y++) {\n\t\t\tfor (int x = 0; x < this.width; x++) {\n\t\t\t\tif (x * y % 10 < 5)\n\t\t\t\t\ttiles[x + y * width] = Tile.GRASS.getId();\n\t\t\t\telse\n\t\t\t\t\ttiles[x + y * width] = Tile.STONE.getId();\n\t\t\t}\n\t\t}\n\t}",
"public void createWorldMap() {\r\n\t\tdo {\r\n\t\t\t//\t\t@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Recursive map generation method over here@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n\t\t\t//Generation loop 1 *ADDS VEIN STARTS AND GRASS*\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif (Math.random()*10000>9999) { //randomly spawn a conore vein start\r\n\t\t\t\t\t\ttileMap[i][j] = new ConoreTile (conore, true);\r\n\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t}else if (Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new KannaiteTile(kanna, true);\r\n\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new FuelTile(fuel, true);\r\n\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999) {\r\n\t\t\t\t\t\ttileMap[i][j] = new ForestTile(forest, true);\r\n\t\t\t\t\t\tforestCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new OilTile(oil,true);\r\n\t\t\t\t\t}else if(Math.random()*10000>9997) {\r\n\t\t\t\t\t\ttileMap[i][j] = new MountainTile(mountain, true);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\ttileMap[i][j] = new GrassTile(dirt);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} // End for loop \r\n\t\t\t} // End for loop\r\n\t\t\t//End generation loop 1\r\n\r\n\t\t\t//Generation loop 2 *EXPANDS ON THE VEINS*\r\n\t\t\tdo {\r\n\t\t\t\tif (conoreCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ConoreTile (conore,true);\r\n\t\t\t\t\tconoreCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tconorePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (kannaiteCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new KannaiteTile (kanna,true);\r\n\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (fuelCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new FuelTile (fuel,true);\r\n\t\t\t\t\tfuelCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (forestCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ForestTile (forest,true);\r\n\t\t\t\t\tforestCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tforestPass = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 2\r\n\r\n\t\t\t//Generation loop 3 *COUNT ORES*\r\n\t\t\tint loop3Count = 0;\r\n\t\t\tconorePass = false;\r\n\t\t\tkannaitePass = false;\r\n\t\t\tfuelPass = false;\r\n\t\t\tforestPass = false;\r\n\t\t\tdo {\r\n\t\t\t\tconoreCount = 0;\r\n\t\t\t\tkannaiteCount = 0;\r\n\t\t\t\tfuelCount = 0;\r\n\t\t\t\tforestCount = 0;\r\n\t\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (tileMap[i][j] instanceof ConoreTile) {\r\n\t\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof KannaiteTile) {\r\n\t\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof FuelTile) {\r\n\t\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof ForestTile) {\r\n\t\t\t\t\t\t\tforestCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (conoreCount < 220) {\r\n\t\t\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tconorePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (kannaiteCount < 220) {\r\n\t\t\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (fuelCount< 220) {\r\n\t\t\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (forestCount < 220) {\r\n\t\t\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tforestPass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tloop3Count++;\r\n\t\t\t\tif (loop3Count > 100) {\r\n\t\t\t\t\tSystem.out.println(\"map generation failed! restarting\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\t\t\t//END OF LOOP 3\r\n\r\n\t\t\t//LOOP 4: THE MOUNTAIN & OIL LOOP\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildMountain(i,j);\r\n\t\t\t\t\tbuildOil(i,j);\r\n\t\t\t\t}\r\n\t\t\t}//End of THE Mountain & OIL LOOP\r\n\r\n\t\t\t//ADD MINIMUM AMOUNT OF ORES\r\n\r\n\t\t\t//Generation Loop 5 *FINAL SETUP*\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif(i == 1 || j == 1 || i == tileMap.length-2 || j == tileMap[i].length-2) {\r\n\t\t\t\t\t\ttileMap[i][j] = new DesertTile(desert);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (i == 0 || j == 0 || i == tileMap.length-1 || j == tileMap[i].length-1) {\r\n\t\t\t\t\t\ttileMap[i][j] = new WaterTile(water);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 5\r\n\t\t\t//mapToString();//TEST RUN\r\n\t\t} while(!conorePass || !kannaitePass || !fuelPass || !forestPass); // End createWorldMap method\r\n\t}",
"public void update(GameState gameState) {\n for (int i = 0;i < map.length; i++) {\n for (int j = 0;j < map[0].length;j++) {\n if (map[i][j] == TileType.WATER) {\n continue;\n }\n\n if (map[i][j] == TileType.MY_ANT) {\n map[i][j] = TileType.LAND;\n }\n\n if (gameState.getMap()[i][j] != TileType.UNKNOWN) {\n this.map[i][j] = gameState.getMap()[i][j];\n }\n }\n }\n\n this.myAnts = gameState.getMyAnts();\n this.enemyAnts = gameState.getEnemyAnts();\n this.myHills = gameState.getMyHills();\n this.seenEnemyHills.addAll(gameState.getEnemyHills());\n\n // remove eaten food\n MapUtils mapUtils = new MapUtils(gameSetup);\n Set<Tile> filteredFood = new HashSet<Tile>();\n filteredFood.addAll(seenFood);\n for (Tile foodTile : seenFood) {\n if (mapUtils.isVisible(foodTile, gameState.getMyAnts(), gameSetup.getViewRadius2())\n && getTileType(foodTile) != TileType.FOOD) {\n filteredFood.remove(foodTile);\n }\n }\n\n // add new foods\n filteredFood.addAll(gameState.getFoodTiles());\n this.seenFood = filteredFood;\n\n // explore unseen areas\n Set<Tile> copy = new HashSet<Tile>();\n copy.addAll(unseenTiles);\n for (Tile tile : copy) {\n if (isVisible(tile)) {\n unseenTiles.remove(tile);\n }\n }\n\n // remove fallen defenders\n Set<Tile> defenders = new HashSet<Tile>();\n for (Tile defender : motherlandDefenders) {\n if (myAnts.contains(defender)) {\n defenders.add(defender);\n }\n }\n this.motherlandDefenders = defenders;\n\n // prevent stepping on own hill\n reservedTiles.clear();\n reservedTiles.addAll(gameState.getMyHills());\n\n targetTiles.clear();\n }",
"public int tilesRemain() {\n return tiles.size();\n }",
"public int getActualTileWidth() {\n return 32;\n }",
"private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}",
"private void revealAround() {\n if (xTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile - 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile - 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile - 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile - 1][yTile].setRevealed(true);\n }\n }\n if (yTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile][yTile - 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile - 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile - 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile - 1].setRevealed(true);\n }\n }\n if (xTile + 1 < Parameters.NUM_X_TILES && !References.GetMainTileActorMap()[xTile + 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile + 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile + 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile + 1][yTile].setRevealed(true);\n }\n }\n if (yTile + 1 < Parameters.NUM_Y_TILES && !References.GetMainTileActorMap()[xTile][yTile + 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile + 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile + 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile + 1].setRevealed(true);\n }\n }\n }",
"private void updateTileCollisions(Mob mob) {\n\t\tif (mob instanceof Player) {\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().x, Display.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().y, Display.getHeight() - mob.getHeight() / 2)));\n\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().x, tilemap.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().y, tilemap.getHeight()) - mob.getHeight() / 2));\r\n\t\t}\r\n\r\n\t\tPoint center = mob.getScreenPosition().add(offset);\r\n\r\n\t\tboolean hitGround = false; // used to check for vertical collisions and determine \r\n\t\t// whether or not the mob is in the air\r\n\t\tboolean hitWater = false;\r\n\r\n\t\t//update mob collisions with tiles\r\n\t\tfor (int i = 0; i < tilemap.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < tilemap.grid[0].length; j++) {\r\n\r\n\t\t\t\tif (tilemap.grid[i][j] != null &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x > center.x - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x < center.x + (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y > center.y - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y < center.y + (250)) {\r\n\r\n\t\t\t\t\tRectangle mobRect = mob.getBounds();\r\n\t\t\t\t\tRectangle tileRect = tilemap.grid[i][j].getBounds();\r\n\r\n\t\t\t\t\t// if mob intersects a tile\r\n\t\t\t\t\tif (mobRect.intersects(tileRect)) {\r\n\r\n\t\t\t\t\t\t// get the intersection rectangle\r\n\t\t\t\t\t\tRectangle rect = mobRect.intersection(tileRect);\r\n\r\n\t\t\t\t\t\t// if the mob intersects a water tile, adjust its movement accordingly\r\n\t\t\t\t\t\tif (tilemap.grid[i][j].type == TileMap.WATER) { \r\n\r\n\t\t\t\t\t\t\tmob.gravity = mob.defaultGravity * 0.25f;\r\n\t\t\t\t\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed * 0.35f;\r\n\t\t\t\t\t\t\tmob.moveSpeed = mob.defaultMoveSpeed * 0.7f;\r\n\r\n\t\t\t\t\t\t\tif (!mob.inWater) { \r\n\t\t\t\t\t\t\t\tmob.velocity.x *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.velocity.y *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.inWater = true;\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thitWater = true;\r\n\t\t\t\t\t\t\tmob.jumping = false;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t// if intersection is vertical (and underneath player)\r\n\t\t\t\t\t\t\tif (rect.getHeight() < rect.getWidth()) {\r\n\r\n\t\t\t\t\t\t\t\t// make sure the intersection isn't really horizontal\r\n\t\t\t\t\t\t\t\tif (j + 1 < tilemap.grid[0].length && \r\n\t\t\t\t\t\t\t\t\t\t(tilemap.grid[i][j+1] == null || \r\n\t\t\t\t\t\t\t\t\t\t!mobRect.intersects(tilemap.grid[i][j+1].getBounds()))) {\r\n\r\n\t\t\t\t\t\t\t\t\t// only when the mob is falling\r\n\t\t\t\t\t\t\t\t\tif (mob.velocity.y <= 0) {\r\n\t\t\t\t\t\t\t\t\t\tmob.velocity.y = 0;\r\n\t\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.inAir = false;\t\r\n\t\t\t\t\t\t\t\t\t\tmob.jumping = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if intersection is horizontal\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tmob.velocity.x = 0;\r\n\r\n\t\t\t\t\t\t\t\tif (mobRect.getCenterX() < tileRect.getCenterX()) {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tfloat xToCenter = Math.abs((float)(mobRect.getCenterX() - tileRect.getCenterX()));\r\n\t\t\t\t\t\t\tfloat yToCenter = Math.abs((float)(mobRect.getCenterY() - tileRect.getCenterY())); \r\n\r\n\t\t\t\t\t\t\t// Check under the mob to see if it touches a tile. If so, hitGround = true\r\n\t\t\t\t\t\t\tif (yToCenter <= (mobRect.getHeight() / 2 + tileRect.getHeight() / 2) && \r\n\t\t\t\t\t\t\t\t\txToCenter <= (mobRect.getWidth() / 2 + tileRect.getWidth() / 2))\r\n\t\t\t\t\t\t\t\thitGround = true;\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if mob doesn't intersect a tile vertically, they are in the air\r\n\t\tif (!hitGround) {\r\n\t\t\tmob.inAir = true;\r\n\t\t}\r\n\t\t// if the mob is not in the water, restore its default movement parameters\r\n\t\tif (!hitWater) {\r\n\t\t\tmob.gravity = mob.defaultGravity;\r\n\t\t\tmob.moveSpeed = mob.defaultMoveSpeed;\r\n\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed;\r\n\t\t\tmob.inWater = false;\r\n\t\t}\r\n\t}",
"public static int minimumNumberOfWhiteWallsOnBoard()\n {\n return 0;\n }",
"public SetOfTiles getSetOfTiles();",
"private void layTiles(TiledMapManager mapManager) {\n board = new Tile[height][width];\n for (int row = 0; row < height; row++) {\n for (int col = 0; col < width; col++) {\n TiledMapTile tile = mapManager.getCell(\"TILES\", row, col).getTile();\n String tileType = (String) tile.getProperties().get(\"Type\");\n Tile currentTile;\n switch (tileType) {\n case \"GEAR\":\n boolean clockwise = (boolean) tile.getProperties().get(\"Clockwise\");\n currentTile = new Gear(row, col, clockwise);\n break;\n case \"HOLE\":\n currentTile = new Hole(row, col);\n break;\n case \"DOCK\":\n int number = (Integer) tile.getProperties().get(\"Number\");\n currentTile = new Dock(number, row, col);\n docks.add((Dock) currentTile);\n break;\n case \"CONVEYOR_BELT\":\n currentTile = installConveyorBelt(mapManager, row, col);\n break;\n case \"REPAIR_SITE\":\n currentTile = new RepairSite(row, col);\n break;\n default:\n currentTile = new Tile(row, col);\n break;\n }\n layTile(currentTile);\n }\n }\n Collections.sort(docks);\n }",
"public boolean canMove(int forX , int forY)\n {\n\n\n int tankX = locX + width/2;\n int tankY = locY + height/2;\n\n\n for(WallMulti wall : walls)\n {\n if(wall.getType().equals(\"H\"))\n {\n\n int disStart = (wall.getX()-tankX)*(wall.getX()-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disStart<=700)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disStart)\n return false;\n }\n\n int disEnd = ((wall.getX()+wall.getLength())-tankX)*((wall.getX()+wall.getLength())-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disEnd<=1700)\n {\n int dis2 = ((wall.getX()+wall.getLength())-(tankX+forX))*((wall.getX()+wall.getLength())-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disEnd)\n return false;\n }\n\n if(tankX >= wall.getX() && tankX <= (wall.getX() + wall.getLength()))\n {\n //tank upper than wall\n if( tankY+20 < wall.getY() && wall.getY()-(tankY+40)<=20 )\n {\n if( wall.getY() <= (tankY+20 + forY) )\n {\n return false;\n }\n }\n\n //tank lower than wall\n if( (tankY-35) > wall.getY() && (tankY-35)-wall.getY()<=25 )\n {\n if( wall.getY() >= (tankY - 35 + forY) )\n {\n return false;\n }\n }\n }\n }\n\n if(wall.getType().equals(\"V\"))\n {\n\n int disStart = (wall.getX()-tankX)*(wall.getX()-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disStart<=700)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disStart)\n return false;\n }\n\n int disEnd = (wall.getX()-tankX)*(wall.getX()-tankX) + ((wall.getY()+wall.getLength())-tankY)*((wall.getY()+wall.getLength())-tankY);\n if(disEnd<=3600)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + ((wall.getY()+wall.getLength())-(tankY+forY))*((wall.getY()+wall.getLength())-(tankY+forY));\n if(dis2<disEnd)\n return false;\n }\n\n\n if(tankY >= wall.getY() && tankY <= (wall.getY() + wall.getLength()))\n {\n //tank at the left side of the wall\n if( tankX+20 < wall.getX() && wall.getX()-(tankX+40)<=20 )\n {\n if( wall.getX() <= (tankX+20 + forX) )\n {\n return false;\n }\n }\n\n //tank lower than wall\n if( (tankX-35) > wall.getX() && (tankX-35)-wall.getX()<=25 )\n {\n if( wall.getX() >= (tankX - 35 + forX) )\n {\n return false;\n }\n }\n }\n }\n }\n return true;\n }",
"public boolean tileReachable(float tx, float ty, AgentModel selectedAgent)\r\n/* 243: */ {\r\n/* 244:271 */ float x = selectedAgent.getX() - 0.5F;\r\n/* 245:272 */ float y = selectedAgent.getY() - 0.5F;\r\n/* 246:274 */ switch ((int)selectedAgent.getAngle())\r\n/* 247: */ {\r\n/* 248: */ case 0: \r\n/* 249:277 */ if ((y - 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 250:279 */ return true;\r\n/* 251: */ }\r\n/* 252: */ break;\r\n/* 253: */ case 90: \r\n/* 254:283 */ if ((x + 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 255:285 */ return true;\r\n/* 256: */ }\r\n/* 257: */ break;\r\n/* 258: */ case 180: \r\n/* 259:289 */ if ((y + 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 260:291 */ return true;\r\n/* 261: */ }\r\n/* 262: */ break;\r\n/* 263: */ case 270: \r\n/* 264:295 */ if ((x - 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 265:298 */ return true;\r\n/* 266: */ }\r\n/* 267: */ break;\r\n/* 268: */ }\r\n/* 269:303 */ return false;\r\n/* 270: */ }",
"boolean canBuildDome(Tile t);",
"public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}",
"public void fillTheBoard() {\n for (int i = MIN; i <= MAX; i++) {\n for (int j = MIN; j <= MAX; j++) {\n this.getCells()[i][j] = new Tile(i, j, false);\n }\n }\n }",
"public abstract Set<Tile> getNeighbors(Tile tile);",
"public void checkTileMapCollision() {\t\t\t// Works for both x and y directions. Only going to use the x-component for now but leaves room for future expansion.\n\n\t\tcurrCol = (int)x / tileSize;\n\t\tcurrRow = (int)y / tileSize;\n\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\n\t\txtemp = x;\n\t\tytemp = y;\n\n\t\tcalculateCorners(x, ydest);\n\t\tif (dy < 0) { \t\t\t// upwards\n\t\t\tif (topLeft || topRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = currRow * tileSize + height / 2;\t\t\t// Set just below where we bumped our head.\n\t\t\t} else {\n\t\t\t\tytemp += dy;\t\t// Otherwise keep going.\n\t\t\t}\n\t\t}\n\t\tif (dy > 0) { \t\t\t// downwards\n\t\t\tif (bottomLeft || bottomRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tfalling = false;\n\t\t\t\tytemp = (currRow + 1) * tileSize - height / 2;\n\t\t\t} else {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\n\t\tcalculateCorners(xdest, y);\n\t\tif (dx < 0) { \t\t\t// left\n\t\t\tif (topLeft || bottomLeft) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = currCol * tileSize + width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif (dx > 0) { \t\t\t// right\n\t\t\tif (topRight || bottomRight) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (currCol + 1) * tileSize - width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\n\t\tif(!falling) {\n\t\t\tcalculateCorners(x, ydest + 1);\t\t\t// Have to check the ground 1 pixel below us and make sure we haven't fallen off a cliff\n\t\t\tif(!bottomLeft && !bottomRight) {\n\t\t\t\tfalling = true;\n\t\t\t}\n\t\t}\n\n\t}",
"public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}",
"@Test\n public void testGetTile() {\n assertEquals(7, board3by3.getTile(0, 0).getId());\n }",
"public int getTileWidth() {\n return 8;\n }",
"@Test\n\tpublic void testIllegalMapNoLimitsTest1() {\n\t\ttry {\n\t\t\tmapFactory.initializeGameState(\"./src/Mapfiles/NightlyTests/IllegalMapNoLimits1\", 1, rng, gs);\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Expected IllegalArgumentException\");\n\t\t} catch (IllegalArgumentException e) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfail(\"Expected IllegalArgumentException\");\n\t}",
"public void markDangerTiles() {\n List<Tile> dangerTiles = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y);\n if (dangerTiles.contains(this.gb.get(this.us_head_x, this.us_head_y)))\n return; // Don't force fill if our head is there\n for (Tile t : dangerTiles)\n t.setForceFilled(true);\n }",
"private static boolean validBoardTile(int i, int j, boolean visitedTiles[][]) { \r\n\t\tif(i >= 0 && j >= 0 && i < 4 && j < 4 && !visitedTiles[i][j]) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false; \r\n\t}",
"private static long getPawnEastAttacks(long board, int side) {\n\t\tlong result;\n\t\tif (side == 0) {\n\t\t\tresult = ((board << 9) & ~CoreConstants.FILE_A);\n\n\t\t} else {\n\t\t\tresult = ((board >>> 7) & ~CoreConstants.FILE_A);\n\t\t}\n\t\treturn result;\n\t}",
"public void initializeMaze(){\n for(int i = 0; i < 20; i ++){\n for(int j = 0; j < 15; j ++){\n if((i % 2 == 1) && (j % 2 == 1)){\n maze[i][j] = NOTVISIBLESPACE;\n }\n else{\n maze[i][j] = NOTVISIBLEWALL;\n }\n }\n }\n\n for(int i = 0; i < 15; i ++){\n maze[19][i] = NOTVISIBLEWALL;\n }\n }",
"public Tile[] generateTiles() {\n return null;\n }",
"public void clearTiles() {\r\n\r\n for (int i = 0; i < 16; i += 1) {\r\n tiles[i] = 0;\r\n }\r\n boardView.invalidate();\r\n placedShips = 0;\r\n }",
"private Board create5by5Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 5);\n Tile t2 = new Tile(1, 5);\n Tile t3 = new Tile(2, 5);\n Tile t4 = new Tile(3, 5);\n Tile t5 = new Tile(4, 5);\n Tile t6 = new Tile(5, 5);\n Tile t7 = new Tile(6, 5);\n Tile t8 = new Tile(7, 5);\n Tile t9 = new Tile(8, 5);\n Tile t10 = new Tile(9, 5);\n Tile t11 = new Tile(10, 5);\n Tile t12 = new Tile(11, 5);\n Tile t13 = new Tile(12, 5);\n Tile t14 = new Tile(13, 5);\n Tile t15 = new Tile(14, 5);\n Tile t16 = new Tile(15, 5);\n Tile t17 = new Tile(16, 5);\n Tile t18 = new Tile(17, 5);\n Tile t19 = new Tile(18, 5);\n Tile t20 = new Tile(19, 5);\n Tile t21 = new Tile(20, 5);\n Tile t22 = new Tile(21, 5);\n Tile t23 = new Tile(22, 5);\n Tile t24 = new Tile(23, 5);\n Tile t25 = new Tile(24, 5);\n tiles = new Tile[5][5];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[0][3] = t5;\n tiles[0][4] = t9;\n tiles[1][0] = t3;\n tiles[1][1] = t1;\n tiles[1][2] = t8;\n tiles[1][3] = t4;\n tiles[1][4] = t11;\n tiles[2][0] = t17;\n tiles[2][1] = t18;\n tiles[2][2] = t10;\n tiles[2][3] = t25;\n tiles[2][4] = t20;\n tiles[3][0] = t23;\n tiles[3][1] = t21;\n tiles[3][2] = t12;\n tiles[3][3] = t15;\n tiles[3][4] = t13;\n tiles[4][0] = t22;\n tiles[4][1] = t24;\n tiles[4][2] = t14;\n tiles[4][3] = t16;\n tiles[4][4] = t19;\n return new Board(tiles);\n }",
"public void markEmptyFields(int shipSize){\n\t\tint x = hitLocation3.x;\n\t\tint y = hitLocation3.y;\n\t\t\n\t\tif( hitLocation2==null && hitLocation3 !=null ){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\t//po skosie lewy gorny\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\t//gorny\n\t\t\t}\n\t\t\tif(y + 1 <sizeBoard){\n\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\t//prawy\t\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y+1] = true;\t\t\t\t//po skosie dol prawy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0 && y + 1 < sizeBoard){\n\t\t\t\topponentShootTable[x-1][y+1] = true;\t\t\t\t//po skosie prawy gora\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif( x +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y] = true;\t\t\t\t// dolny\n\t\t\t\tpossibleshoots.remove(new TabLocation(x+1,y));\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x+1 <sizeBoard && y - 1 >= 0){\n\t\t\t\topponentShootTable[x+1][y-1] = true;\t\t\t//po skosie dol lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(y - 1 >= 0){\n\t\t\t\topponentShootTable[x][y-1] = true;\t\t\t//lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tboolean orientacja = false;\n\t\t\tif( hitLocation3.x == hitLocation2.x ) orientacja = true;\n\t\t\tint tempshipSize = shipSize;\n\t\t\tif( orientacja ){\n\t\t\t\t\n\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//prawy skrajny\t\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x-1, y+tempshipSize ) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x, y+tempshipSize ) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 <sizeBoard && y+tempshipSize>=0){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y+1<sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+tempshipSize) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+tempshipSize) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( x-1 >= 0 ){\n\t\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y-i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y+i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(x + 1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.y < hitLocation3.y){\n\t\t\t\t\t\tfor(int i=0; i<shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y-i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y+i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//dolny skrajny\t\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x+1 < sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x+1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(y-1 >= 0){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y+1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.68949825",
"0.6751918",
"0.67111444",
"0.6544831",
"0.6497344",
"0.6495274",
"0.64412224",
"0.640788",
"0.6406817",
"0.63819224",
"0.6368799",
"0.63383687",
"0.6295469",
"0.62925154",
"0.62863076",
"0.6261406",
"0.62591225",
"0.6252133",
"0.6211017",
"0.61979866",
"0.6194073",
"0.61880714",
"0.6185177",
"0.61714315",
"0.61648965",
"0.6159901",
"0.6157876",
"0.6149741",
"0.6145326",
"0.614087",
"0.6126292",
"0.60926586",
"0.60793334",
"0.6078955",
"0.6071056",
"0.60638714",
"0.6055926",
"0.6052008",
"0.6045806",
"0.6037627",
"0.6027368",
"0.6024052",
"0.60168976",
"0.60106725",
"0.6003746",
"0.60009295",
"0.59898776",
"0.59876764",
"0.5985427",
"0.59789133",
"0.5977403",
"0.59729016",
"0.5969922",
"0.5969217",
"0.59679186",
"0.5958218",
"0.59397274",
"0.59385693",
"0.59308016",
"0.59273016",
"0.59099156",
"0.5908188",
"0.5900646",
"0.5892153",
"0.5889171",
"0.5887481",
"0.58840424",
"0.58820164",
"0.58782953",
"0.5877111",
"0.58760095",
"0.5875828",
"0.58746076",
"0.58668995",
"0.58517164",
"0.58489025",
"0.5840267",
"0.58373284",
"0.58365715",
"0.58315355",
"0.5831026",
"0.58278316",
"0.5827594",
"0.5823956",
"0.58235115",
"0.5821789",
"0.58191013",
"0.58190614",
"0.5818469",
"0.5818325",
"0.58116394",
"0.58096325",
"0.5809496",
"0.5805667",
"0.5805179",
"0.58048487",
"0.58047223",
"0.57976717",
"0.5794871",
"0.5793058"
] | 0.6116418 | 31 |
Overrides super class, so this tile is never accessible | public boolean isAccessible() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Tile() {\n super();\n }",
"@Override\n public boolean isTileFriendly(){\n return false;\n }",
"public Tile getTile() { return tile; }",
"@Override\n protected void generateTiles() {\n }",
"public Tile getTile() {\n return tile;\n }",
"public Tile getTile() {\n return tile;\n }",
"public FireTile() {\n super();\n setUtility(5);\n }",
"@Override\n\tprotected void generateTiles() {\n\t}",
"public Tile getTile() {\n return _tile;\n }",
"public TileSelector(){\r\n super();\r\n \r\n }",
"public MapTile() {}",
"public void drawTile() {\n\n }",
"public InaccessibleTile(int x, int y) {\n super(true, true, true, true, x, y);\n }",
"UtileFrame() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public WallTile()\n\t{\n\t\t\n\t}",
"public RemoveTileChange() {}",
"void setTile(Tile tile) {\n _tile = tile;\n }",
"TileItem getCurrentTile();",
"protected abstract void setTile( int tile, int x, int y );",
"public TileObject(Point position, TileContainer superContainer, TETile tile) {\n super(1, 1, position, superContainer);\n superContainer.addElement(this);\n this.tile = tile;\n }",
"@Override\r\n\tpublic void tileLoadedHandler(Tile tile) {\n\r\n\t}",
"public Tile getTile() {\n\t\treturn tile;\n\t}",
"public Rect getTileRect(){\n return this.tileRect;\n }",
"public TileItem(Game game, Element e) {\n super(game, e);\n }",
"public IsoTiledTest() {\r\n\t\tsuper(\"Isometric Tiled Map Test\");\r\n\t}",
"protected void registerTile(int x, int y) {}",
"public PondTile(int x, int y) {\n super(x, y);\n }",
"public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}",
"@Override\r\n public void onTileAdded() {\r\n super.onTileAdded();\r\n //Log.d(TAG, \"on tile added running\");\r\n initTileState();\r\n }",
"public Tile getTile(){\n\t\treturn currentTile;\n\t}",
"public TilePiece(){\n\t\t\n\t\tiColour = null;\n\t\tiShape = null;\n\t}",
"@Override\n public TileEntity createNewTileEntity(World world)\n {\n return null;\n }",
"public Tile(int x, int y, String type) {\n\tthis.x = x;\n\tthis.y = y;\n\tthis.type = type;\n\tboundingShape = null;\n }",
"public TileItem(Game game, Tile tile) {\n super(game);\n if (tile == null) {\n throw new NullPointerException();\n }\n this.tile = tile;\n }",
"public void setTile(Tile tile) {\n\t\tthis.tile = tile;\n\t}",
"public TileMap getMyTileMap() {\n return this.myTileMap;\n }",
"EnemyTile(int xGraphic, int yGraphic, int xGrid, int yGrid){\n super(xGraphic,yGraphic, xGrid, yGrid);\n }",
"public abstract Tile getTileAt(int x, int y);",
"public TileBlockBase(BlockBehaviour.Properties properties) {\n super(properties);\n }",
"public TrapTiles()\r\n {\r\n id = 604 ; \r\n }",
"public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}",
"public IFSingleItemChestTile() {\r\n\t\tsuper(IFTileRegistry.SINGLE_ITEM_CHEST_TILE_BIG.get());\r\n\t}",
"public Tile(int row, int column){\n this.row = row;\n this.column = column;\n this.piece = null;\n }",
"public void onTileEntry(Tile tile) {}",
"public void getTile_B8();",
"public SandTile(float x, float y) {\n\t\tsuper(x, y, ImageLibrary.get(\"sand_tile\"));\n\t}",
"public abstract TiledMapTileSet getTileSet();",
"public TileEntity a_()\n {\n return new TileMarker();\n }",
"public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }",
"public DoorTile(int x, int y) {\r\n\t\tsuper(\"resources/door.gif\", x, y);\r\n\t}",
"public int getTileType() {\r\n\t\treturn 3;\r\n\t}",
"public int getTileLevel()\n {\n return tileLevel;\n }",
"public Tile (int pos, int type) { \r\n\t\tthis.tilePos = pos;\r\n\t\tthis.tileType = type;\r\n\t}",
"public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }",
"private VolaTile getCaveTile() {\n/* */ try {\n/* 2147 */ Zone z = Zones.getZone(this.tilex, this.tiley, false);\n/* 2148 */ return z.getOrCreateTile(this.tilex, this.tiley);\n/* */ }\n/* 2150 */ catch (NoSuchZoneException noSuchZoneException) {\n/* */ \n/* */ \n/* 2153 */ logger.log(Level.WARNING, \"No cave tile for \" + this.tilex + \", \" + this.tiley);\n/* 2154 */ return this;\n/* */ } \n/* */ }",
"@Override\n\tpublic BlockState[] getTileEntities()\n\t{\n\t\tthrow new UnimplementedOperationException();\n\t}",
"public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }",
"@Override\n\tpublic Object clone() \n\t{\n\t\ttry{\n\t\t// Note all state is primitive so no need to deep copy reference types.\n\t\treturn (Tile) super.clone();\n\t\t} catch (CloneNotSupportedException e) \n\t\t{\n\t\t\t// We should not ever be here as we implement Cloneable.\n\t\t\t// It is better to deal with the exception here rather than letting\n\t\t\t// clone throw it as we would have to catch it in more places then.\n\t\t\treturn null;\n\t\t}\n\t}",
"Tile getTile() {\n if (tiles.size() == 0) {\n return null;\n } else {\n int randomIndex = ThreadLocalRandom.current().nextInt(0, tiles.size());\n Tile result = tiles.get(randomIndex);\n tiles.remove(randomIndex);\n return result;\n }\n }",
"public Tile(int number) {\n this.number = number;\n }",
"protected void repaint() {\n if (_tile!=null)\n _tile.repaint();\n }",
"public BlackTile(float posX, float posY, float posZ, float height, float width) {\n super(new Box3D(posX, posY, posZ, height, width, 1f));\n this.setTexture(\"black_tile\");\n this.canWalkOver = true;\n }",
"public Image getTileImage(){\n\t\treturn tileImage;\n\t}",
"public MapTile(final Sprite sprite) {\n if (sprite == null) {\n this.sprite = Sprite.UNKNOWN;\n }\n\n this.sprite = sprite;\n }",
"public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}",
"public Tile(int x, int y, char type) {\n\t\tthis.tileX = x*Tile.TILE_SIDE;\n\t\tthis.tileY = LevelScreen.INFO_BAR_HEIGHT+y*Tile.TILE_SIDE;\n\t\tthis.type = type;\n\t\tthis.hasDefenseObject = false;\n\t\tthis.currentConstruct = null;\n\n\t\tif (type == TOWER_TERRAIN) {\n\t\t\ttileImage = Assets.tileEmptyTower;\n\t\t} else if (type == PATH) {\n\t\t\ttileImage = Assets.tilePath;\n\t\t} else if (type == MONSTER_GOAL) {\n\t\t\ttileImage = Assets.tileGoal;\n\t\t} else if (type == MONSTER_ENTRANCE) {\n\t\t\ttileImage = Assets.tileEntrance;\n\t\t}\n\t}",
"public void func_192841_a(TileEntity te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {\n/* 109 */ super.func_192841_a(te, x, y, z, partialTicks, destroyStage, alpha);\n/* 110 */ renderTileEntityAt((TileGolemBuilder)te, x, y, z, partialTicks, destroyStage);\n/* */ }",
"@Override\n\tpublic AbstractTileOLD createTile(Frame frame, Point pos, Point sourcePos) {\n\t\t// TileOLD t = new TileOLD(frame, pos.x, pos.y, new ZoneSheet(frame,\n\t\t// ZoneSheet.TILE_SHEET), sourcePos.x, sourcePos.y);\n\t\t// t.setData((TileDataOLD) data[sourcePos.x][sourcePos.y]);\n\t\treturn null;\n\t}",
"public Tiles getTiles() {\n return tiles;\n }",
"@Override\n\tpublic TileEntity createTileEntity(World world, int metadata) {\n\t\treturn null;\n\t}",
"public Tile(GameLogic logic, PieceService pieceservice, int x, int y) {\n\n this.x = x;\n this.y = y;\n this.pieces = new ArrayList<>();\n\n setWidth(TakApp.TILE_SIZE);\n setHeight(TakApp.TILE_SIZE);\n \n relocate(x * TakApp.TILE_SIZE, y * TakApp.TILE_SIZE);\n Image tilebg = new Image(getClass().getResourceAsStream(\"/images/tile.jpg\"));\n ImagePattern imagePattern = new ImagePattern(tilebg);\n setFill(imagePattern);\n \n if (this.hasPieces() == false) {\n setOnMousePressed(e -> {\n String pieceColor = logic.checkTurn();\n Piece piece = pieceservice.makePiece(logic, pieceColor, x, y);\n if (piece != null) {\n pieceservice.setPiece(piece, x, y);\n this.pieces.add(piece);\n }\n });\n } else if (this.hasPieces() == true) {\n \n setOnMousePressed(e -> {\n this.oldX = this.getXcoordinate();\n this.oldY = this.getYcoordinate();\n });\n\n setOnMouseDragged(e -> {\n relocate(e.getSceneX(), e.getSceneY());\n });\n \n setOnMouseReleased(e -> {\n \n double mouseX = e.getSceneX();\n double mouseY = e.getSceneY();\n\n int newX = (int) Math.floor(mouseX / 100.0);\n int newY = (int) Math.floor(mouseY / 100.0);\n \n boolean validMove = logic.isValidMove(oldX, oldY, newX, newY);\n \n if (validMove) {\n pieceservice.removePiece(this.pieces.get(this.pieces.size() - 1), oldX, oldY);\n pieceservice.setPiece(this.pieces.get(this.pieces.size() - 1), newX, newY);\n } else {\n pieceservice.setPiece(this.pieces.get(this.pieces.size() - 1), oldX, oldY);\n }\n });\n } \n }",
"public int tileType(){\n\t\treturn this.type;\n\t}",
"public Tile getTileAt(Position p);",
"public Tile(final int x, final int y) {\n this.x = x;\n this.y = y;\n }",
"public Tile getTile()\r\n\t{\r\n\t\tif(this.hasTiles())\r\n\t\t\treturn _tiles.remove(0);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"public MetroTile(MetroTileView metroTileView) {\n this.metroTileView = metroTileView;\n getRows();\n getTiles();\n }",
"public GrassTile(int id) {\r\n\t\tsuper(Color.GREEN, id);\r\n\t}",
"public Tile(Position pos, TileType type) {\n super(pos, type);\n this.walkable = type.isWalkable();\n\n }",
"public Tile[] generateTiles() {\n return null;\n }",
"public void addSubbedTile(Tile t) { subbedTiles.add(t); }",
"private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }",
"@Override\n public void updateTileEntity(IBlockAccess world, int x, int y, int z) {\n }",
"public Tile getSample() {\n return (Tile) super.getSample();\n }",
"public StaticTiledMapTile(TextureRegion textureRegion) {\n \t\tthis.textureRegion = textureRegion;\n \t}",
"@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }",
"public Tile(final int originalPos) {\n this.originalPos = originalPos;\n this.currentPos = originalPos;\n this.selector = Player.empty();\n }",
"public LoadingScreen2()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n tracker = new Tracker();\n }",
"@Override\n public void drawTile(GraphicsContext gc, double dx, double dy) {\n gc.drawImage(tile, dx, dy, 64, 64);\n }",
"public TileView(Context context, AttributeSet attrs) {\n super(context, attrs);\n }",
"public Tile(Tile tile){\n this.gameX = tile.getGameX();\n this.gameY = tile.getGameY();\n this.state = tile.getState();\n this.color = tile.getColor();\n }",
"public TilePanel(CoordinatesTile coordTile) {\r\n\t\tthis(getPath(coordTile));\r\n\t}",
"public TownTile(float x, float y, int type, int index) {\n\t\tsuper(x, y);\n\t\tthis.type = type;\n\t\tthis.initialize(index);\n\t}",
"public int getTileId() {\n\t\treturn tileId;\n\t}",
"public Tile[][] getTileMap(){\r\n\t\treturn tileMap;\r\n\t}",
"public TiledWraparound(Spatial tile)\r\n {\r\n super(tile.getTopRight());\r\n final int PAD = 1;\r\n int tiles = PAD*2+1;\r\n this.tile = tile;\r\n float BLx = -tr.getX(), BLy = -tr.getY();\r\n offsets = new Location[tiles*tiles];\r\n for(int i=0; i<tiles; i++)\r\n {\r\n for(int j=0; j<tiles; j++)\r\n {\r\n offsets[i*tiles+j] = new Location.Location2D(BLx+tr.getX()*i, BLy+tr.getY()*j);\r\n }\r\n }\r\n }",
"public Tile(int type, int x, int y) {\n\t\tthis.type=type;\n\t\tthis.coordinates= new int[2];\n\t\tthis.coordinates[0]=x;\n\t\tthis.coordinates[1]=y;\n\t\tif(type==1){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"scenery.png\")).getImage();\n\t\t}\n\t\telse if(type==2){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"path.png\")).getImage();\n\t\t}\n\t\telse if(type==3){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"tower.png\")).getImage();\n\t\t}\n\t}",
"@Override\n public TileEntity createNewTileEntity(World world) {\n return new TileEntityAscender();\n }",
"@Override\n public int getTileHeight() {\n return this.tileHeight;\n }",
"public Location getLocation() {\n return ((Location) tile);\n }",
"public Level()\n {\n //Initialise Tile Types\n try \n {\n //Dynamically assign texture paints\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/surface.jpg\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/rover.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/rock.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/mineral.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/target.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/warning.png\")), tile));\n } catch(FileNotFoundException fnfe) {\n System.out.println(\"ERROR: Invalid texture paint, file not found\" + fnfe);\n }\n catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"public Zombie(int x, int y, Map map) {\r\n\t\tsuper(x, y, imagePath, map);\r\n\t\t\r\n\t}"
] | [
"0.77366346",
"0.7415316",
"0.72216034",
"0.72019964",
"0.70929366",
"0.70929366",
"0.7068217",
"0.7059561",
"0.69885004",
"0.69368",
"0.6921074",
"0.68856335",
"0.68855107",
"0.67949784",
"0.677639",
"0.67335993",
"0.6707868",
"0.6622248",
"0.65853524",
"0.6527727",
"0.6488633",
"0.6465341",
"0.6440328",
"0.6434705",
"0.64314824",
"0.6407705",
"0.6403732",
"0.6393149",
"0.63869196",
"0.6372146",
"0.63660705",
"0.6360697",
"0.6351492",
"0.634727",
"0.63468117",
"0.6345698",
"0.63436884",
"0.63330764",
"0.6291722",
"0.6282127",
"0.62788653",
"0.6275004",
"0.62734896",
"0.6261539",
"0.62410176",
"0.62362224",
"0.62191296",
"0.6192452",
"0.61881226",
"0.6183649",
"0.6178007",
"0.61731035",
"0.6169224",
"0.61608696",
"0.61558586",
"0.61389387",
"0.61278933",
"0.6104739",
"0.61013037",
"0.6094116",
"0.6093576",
"0.60935557",
"0.60636586",
"0.60479665",
"0.60352075",
"0.6033954",
"0.6023354",
"0.6020843",
"0.6004983",
"0.6000875",
"0.5982067",
"0.59770966",
"0.59755653",
"0.59670883",
"0.59661853",
"0.5966018",
"0.5957114",
"0.59446764",
"0.59406054",
"0.59367424",
"0.5927224",
"0.5919684",
"0.59189445",
"0.59066975",
"0.590587",
"0.5902702",
"0.59012514",
"0.5876921",
"0.58753073",
"0.58731765",
"0.5873031",
"0.5869845",
"0.5865397",
"0.58612055",
"0.58523566",
"0.58323604",
"0.5830247",
"0.58241916",
"0.5823313",
"0.58217883",
"0.58217746"
] | 0.0 | -1 |
Symbol representing an inaccessible tile | public String toString() {
return "*";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public InaccessibleTile(int x, int y) {\n super(true, true, true, true, x, y);\n }",
"public void getTile_B8();",
"protected void registerTile(int x, int y) {}",
"@Override\n public boolean isTileFriendly(){\n return false;\n }",
"public Missile(String name, CMWorld world, Font ttf, String fontSymbol,\n Color color)\n {\n super(name, world, ttf, fontSymbol, color);\n this.setPlatformType(PlatformType.AIR);\n\n }",
"public Tile getTileAt(Position p);",
"public void drawTile() {\n\n }",
"public abstract Tile getTileAt(int x, int y);",
"public Tile getTile() { return tile; }",
"public interface C0557b {\n public static final Tile f2819b;\n\n static {\n f2819b = new Tile(-1, -1, null);\n }",
"public Tile getTile(Character letter) {\r\n int index;\r\n Tile returnedTile;\r\n if(isAvailable(letter)) {\r\n index = frame.indexOf(new Tile(letter));\r\n returnedTile = frame.get(index);\r\n }\r\n else //if we want to return blank instead of unavailable letter\r\n {\r\n index = frame.indexOf(new Tile('_'));\r\n returnedTile = frame.get(index);\r\n returnedTile.setBlankAs(letter);\r\n }\r\n return returnedTile;\r\n }",
"public Tile getTile() {\n return _tile;\n }",
"public Tile getTile() {\n return tile;\n }",
"public Tile getTile() {\n return tile;\n }",
"String getTileType();",
"public abstract String getIcon(int current_turn);",
"public String toString() {\n/* 6387 */ return \"VolaTile [X: \" + this.tilex + \", Y: \" + this.tiley + \", surf=\" + this.surfaced + \"]\";\n/* */ }",
"public char getIcon() {\n return this.icon;\n }",
"public static String symbol() {\n return \"ALT\";\n }",
"@Nullable\n @Override\n public Icon getIcon(boolean unused) {\n RowIcon rowIcon = new RowIcon(2);\n\n rowIcon.setIcon(ElixirIcons.MODULE, 0);\n rowIcon.setIcon(PlatformIcons.ANONYMOUS_CLASS_ICON, 1);\n\n return rowIcon;\n }",
"Icon getIcon();",
"String getIcon();",
"String getIcon();",
"public interface ISymbol {\n\n\tBufferedImage getImage();\n\n\tvoid setImage(String icon);\n\n\tvoid setValue(int value);\n\n\tint getValue();\n}",
"public TileEntity a_()\n {\n return new TileMarker();\n }",
"TileItem getCurrentTile();",
"SerializableState getTile(Long id, int x, int y) throws RemoteException;",
"public void displayMilitaryIcon(Graphics g, int xPos, int yPos){\n\t\t\n\t}",
"public static IIcon method_2666() {\r\n return class_1192.field_6027.field_2131;\r\n }",
"String getSymbol();",
"@Test\n public void testGetTile() {\n assertEquals(7, board3by3.getTile(0, 0).getId());\n }",
"Texture getIcon();",
"long getSymbol();",
"public IIcon getIcon(int p_149691_1_, int p_149691_2_)\n {\n return p_149691_1_ == 1 ? this.field_150035_a : (p_149691_1_ == 0 ? Blocks.planks.getBlockTextureFromSide(p_149691_1_) : (p_149691_1_ != 2 && p_149691_1_ != 4 ? this.blockIcon : this.field_150034_b));\n }",
"public Icon getIcon(String spellName);",
"protected abstract void setTile( int tile, int x, int y );",
"public Tile getTile() {\n\t\treturn tile;\n\t}",
"java.lang.String getIcon();",
"java.lang.String getIcon();",
"@Nullable\n @Override\n public Icon getIcon(boolean unused) {\n return ToolkitIcons.METHOD.get(method);\n }",
"public Missile(String name, CMWorld world)\n {\n super(name, world);\n this.setPlatformType(PlatformType.AIR);\n }",
"public abstract String getSymbol();",
"public IIcon method_2681() {\r\n return this.field_2146;\r\n }",
"public void\r DisplayIcon(CType display_context, int x, int y, int icon_number);",
"public String getPageSymbol(ItemStack page);",
"public MapTile() {}",
"public ItemStack getIconItemStack()\n {\n return new ItemStack(Item.writableBook, 1, 0);\n }",
"public ItemStack getIconItemStack()\n {\n return new ItemStack(Item.writableBook, 1, 0);\n }",
"public int getTileType() {\r\n\t\treturn 3;\r\n\t}",
"public GrassTile(int id) {\r\n\t\tsuper(Color.GREEN, id);\r\n\t}",
"public String getAccessibleIconDescription();",
"@Override\n\tpublic BlockState[] getTileEntities()\n\t{\n\t\tthrow new UnimplementedOperationException();\n\t}",
"public Icon getIcon();",
"public Tile(char letter) {\n\t\tthis.letter = letter;\n\t\tactive = false;\n\t}",
"public Piece getPieceInTile() {\n \r\n return pieceInTile;\r\n }",
"public Tile getTile(){\n\t\treturn currentTile;\n\t}",
"public static synchronized Icon getIllegalIcon ()\n\t{\n\t\tif (_illegalIcon == null)\n\t\t{\n\t\t\t_illegalIcon = getIcon(\n\t\t\t\t\"org/openide/resources/propertysheet/invalid.gif\", // NOI18N\n\t\t\t\tMappingContextFactory.getDefault().getString(\"ICON_illegal\"));\n\t\t}\n\n\t\treturn _illegalIcon;\n\t}",
"@Override\r\n\tpublic Image getGameIcon() {\n\t\treturn null;\r\n\t}",
"void setTile(Tile tile) {\n _tile = tile;\n }",
"public boolean tileSand(float xTile, float yTile)\r\n/* 217: */ {\r\n/* 218:241 */ return (tileInBounds(xTile, yTile)) && (this.sand[((int)xTile)][((int)yTile)] != 0);\r\n/* 219: */ }",
"@Override\n\tpublic Icon getIcon(int width, int height) {\n\t\treturn null; // Use Display Name instead of an icon.\n\t}",
"public Icon getIcon() {\n \t\treturn null;\n \t}",
"public String getIcon(){\n\t\t\t\t\n\t\treturn inCity.getWeather().get(0).getIcon();\n\t}",
"GameState requestActionTile();",
"public String toString(){\n return this.tileType.toString() + this.position + this.orientation;\n }",
"public boolean tileOfHuman (int row, int col){\n return this.gameBoard[row][col] == 'o';\n }",
"public Icon getIcon(Object object);",
"public String getTile(int row, int column)\n {\n return tiles.get(row).get(column).getLetter(); \n }",
"String symbol();",
"private void d() {\n/* 287 */ int tIdx = getTileIdx();\n/* */ \n/* 289 */ if (this.e.getNumComps() < 3) {\n/* 290 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 293 */ if (this.e.getTileCompWidth(tIdx, 0) != this.e.getTileCompWidth(tIdx, 1) || this.e\n/* 294 */ .getTileCompWidth(tIdx, 0) != this.e.getTileCompWidth(tIdx, 2) || this.e\n/* 295 */ .getTileCompHeight(tIdx, 0) != this.e.getTileCompHeight(tIdx, 1) || this.e\n/* 296 */ .getTileCompHeight(tIdx, 0) != this.e.getTileCompHeight(tIdx, 2)) {\n/* 297 */ throw new IllegalArgumentException(\"Can not use ICT on components with different dimensions\");\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 303 */ int[] utd = new int[this.e.getNumComps()];\n/* 304 */ for (int i = utd.length - 1; i >= 0; i--) {\n/* 305 */ utd[i] = this.e.getNomRangeBits(i);\n/* */ }\n/* 307 */ this.i = a(utd, 2, (int[])null);\n/* */ }",
"private String symbol() {\n switch (this.suit) {\n case 1:\n return \"♣\";\n case 2:\n return \"♦\";\n case 3:\n return \"♥\";\n case 4:\n return \"♠\";\n default:\n throw new IllegalArgumentException(\"Invalid Suit\");\n }\n }",
"public String getSymbol() {\n }",
"@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }",
"public abstract String typeIcon();",
"public void nextTile() {\n/* 779 */ this.e.nextTile();\n/* 780 */ this.k = getTileIdx();\n/* */ \n/* */ \n/* 783 */ String str = (String)this.f.f(this.k);\n/* 784 */ if (str.equals(\"none\")) {\n/* 785 */ this.h = 0;\n/* */ }\n/* 787 */ else if (str.equals(\"rct\")) {\n/* 788 */ this.h = 1;\n/* 789 */ c();\n/* */ }\n/* 791 */ else if (str.equals(\"ict\")) {\n/* 792 */ this.h = 2;\n/* 793 */ d();\n/* */ } else {\n/* */ \n/* 796 */ throw new IllegalArgumentException(\"Component transformation not recognized\");\n/* */ } \n/* */ }",
"public IIcon getIconFromDamage(int par1)\n/* 54: */ {\n/* 55:53 */ if (this.isIron) {\n/* 56:54 */ return Items.iron_sword.getIconFromDamage(par1);\n/* 57: */ }\n/* 58:55 */ return Items.diamond_sword.getIconFromDamage(par1);\n/* 59: */ }",
"@SideOnly(Side.CLIENT)\r\n/* 67: */ public IIcon getIcon(int par1, int par2)\r\n/* 68: */ {\r\n/* 69: 70 */ if (par2 < 6) {\r\n/* 70: 71 */ return par1 == par2 % 6 ? nodeBase : nodeSideExtract;\r\n/* 71: */ }\r\n/* 72: 72 */ if (par2 < 12) {\r\n/* 73: 73 */ return par1 == par2 % 6 ? nodeBase : nodeSideLiquid;\r\n/* 74: */ }\r\n/* 75: 74 */ if (par2 == 13) {\r\n/* 76: 75 */ return nodeSideEnergyHyper;\r\n/* 77: */ }\r\n/* 78: 77 */ return nodeSideEnergy;\r\n/* 79: */ }",
"public Symbol getCurrentPlayerSymbol();",
"public String getTentSymbol(){ return tentSymbol;}",
"public Icon getIcon(int par1, int par2) {\n\t\treturn par1 != 1 && par1 != 0 ? this.blockIcon : this.theIcon;\n\t}",
"public SandTile(float x, float y) {\n\t\tsuper(x, y, ImageLibrary.get(\"sand_tile\"));\n\t}",
"public boolean tileGrass(float xTile, float yTile)\r\n/* 212: */ {\r\n/* 213:236 */ return (tileInBounds(xTile, yTile)) && (this.grass[((int)xTile)][((int)yTile)] != 0);\r\n/* 214: */ }",
"public void a(fn paramfn)\r\n/* 256: */ {\r\n/* 257:270 */ this.c = paramfn.e(\"xTile\");\r\n/* 258:271 */ this.d = paramfn.e(\"yTile\");\r\n/* 259:272 */ this.e = paramfn.e(\"zTile\");\r\n/* 260:273 */ if (paramfn.b(\"inTile\", 8)) {\r\n/* 261:274 */ this.f = atr.b(paramfn.j(\"inTile\"));\r\n/* 262: */ } else {\r\n/* 263:276 */ this.f = atr.c(paramfn.d(\"inTile\") & 0xFF);\r\n/* 264: */ }\r\n/* 265:278 */ this.b = (paramfn.d(\"shake\") & 0xFF);\r\n/* 266:279 */ this.a = (paramfn.d(\"inGround\") == 1);\r\n/* 267:280 */ this.h = paramfn.j(\"ownerName\");\r\n/* 268:281 */ if ((this.h != null) && (this.h.length() == 0)) {\r\n/* 269:282 */ this.h = null;\r\n/* 270: */ }\r\n/* 271: */ }",
"public ImageIcon getIcon(Location loc){\r\n return loc.getImage(pointer);\r\n }",
"Icon createIcon();",
"public Icon getIcon()\n {\n return this.blockIcon;\n }",
"public int getTileX()\n\t{\n\t\treturn this.tileX;\n\t}",
"public DoorTile(int x, int y) {\r\n\t\tsuper(\"resources/door.gif\", x, y);\r\n\t}",
"@Override public String symbol() {\n return symbol;\n }",
"Character symbolStackWrite();",
"public Icon getIcon() {\n\t\treturn null;\n\t}",
"public Tile(int number) {\n this.number = number;\n }",
"public void displayOilIcon(Graphics g, int xPos, int yPos){\n\t\t\n\t}",
"public int tileType(){\n\t\treturn this.type;\n\t}",
"public org.netbeans.modules.j2ee.dd.api.common.Icon getIcon(){return null;}",
"public char getPermanentIcon() {\n\t\tif(!playerMapped)\r\n\t\t\treturn ' ';\r\n\t\treturn permanentIcon;\t//TODO: this the part that will need to change if the permanent icon isn't the right one to display.)\r\n\t}",
"public int[] getGrassTileRaw() {\n return grassTileRaw;\n }",
"void use(ATile clickedTile, GodSim g);",
"public Image getTileImage(){\n\t\treturn tileImage;\n\t}",
"public void onTileEntry(Tile tile) {}",
"public Tile(int row, int column){\n this.row = row;\n this.column = column;\n this.piece = null;\n }"
] | [
"0.65501714",
"0.6462809",
"0.6023741",
"0.601464",
"0.6007534",
"0.5922814",
"0.5897727",
"0.5895577",
"0.5872566",
"0.5820337",
"0.57806766",
"0.57138956",
"0.5699043",
"0.5699043",
"0.568853",
"0.56629163",
"0.5644075",
"0.5635071",
"0.5615656",
"0.5615156",
"0.560969",
"0.5598473",
"0.5598473",
"0.5596234",
"0.5585",
"0.5583847",
"0.5565954",
"0.555968",
"0.5538688",
"0.5538043",
"0.5536603",
"0.55354327",
"0.5531979",
"0.55263406",
"0.550567",
"0.54903966",
"0.5480352",
"0.547752",
"0.547752",
"0.5466331",
"0.545573",
"0.5451194",
"0.54420024",
"0.5438667",
"0.5437957",
"0.54250884",
"0.54219794",
"0.54219794",
"0.5420072",
"0.5420014",
"0.5419226",
"0.54077154",
"0.5397319",
"0.53852034",
"0.53771824",
"0.53709173",
"0.5370882",
"0.53651303",
"0.5357067",
"0.5351165",
"0.5350036",
"0.5326308",
"0.5320502",
"0.5317751",
"0.53151196",
"0.5310402",
"0.53089267",
"0.5301996",
"0.529737",
"0.5295222",
"0.5294581",
"0.52894974",
"0.5279555",
"0.5267098",
"0.52600193",
"0.5256104",
"0.5247893",
"0.5243373",
"0.5242306",
"0.5238954",
"0.52382004",
"0.5236816",
"0.5230599",
"0.52304465",
"0.5214563",
"0.5212417",
"0.5212155",
"0.51986414",
"0.51977926",
"0.51951313",
"0.5194312",
"0.519246",
"0.51915586",
"0.5181952",
"0.51777196",
"0.51727325",
"0.5172265",
"0.5170833",
"0.51690364",
"0.51631576",
"0.51617104"
] | 0.0 | -1 |
/ Format is one of 0 jsp 1 xml 2 rss 3 json | public void ReturnComments(HttpServletRequest request, HttpServletResponse response,int Format,String Title) throws ServletException, IOException{
CommentConnector commtc = new CommentConnector();
commtc.setHost("134.36.36.150");
System.out.println("Return All comments for"+Title);
List<CommentStore> Comments = commtc.getComments(Title);
switch(Format){
case 0: request.setAttribute("Comments", Comments);
RequestDispatcher rd=null;
try {
rd=request.getRequestDispatcher("/RenderComments.jsp");
rd.forward(request,response);
}catch(Exception et){
System.out.println("Can't forward to "+ rd.toString());
}
break;
case 3: request.setAttribute("Data", Comments);
RequestDispatcher rdjson=request.getRequestDispatcher("/RenderJson");
rdjson.forward(request,response);
break;
default: System.out.println("Invalid Format in ReturnArticle ");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n response.setContentType(\"text/xml\");\n PrintWriter out = response.getWriter();\n try {\n String conferenceid=request.getParameter(\"conferenceid\");\n String xml_param=request.getParameter(\"url\");\n String output=\"\";\n\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document dom = db.parse(xml_param);\n\n Element docEle = dom.getDocumentElement();\n\n NodeList sequence_list=docEle.getElementsByTagName(\"seq\").item(0).getChildNodes();\n int total=0;\n for(int i=0;i<sequence_list.getLength();i++){\n Node node_event=sequence_list.item(i);\n if(node_event.getNodeType()==Node.ELEMENT_NODE){\n String json_message=\"{\";\n\n String activity=node_event.getNodeName();\n json_message=json_message+\"\\\"event\\\":\\\"\"+activity+\"\\\"\";\n\n if(node_event.hasAttributes()){\n NamedNodeMap event_attribs=node_event.getAttributes();\n for(int j=0;j<event_attribs.getLength();j++){\n Node attrib=event_attribs.item(j);\n String attrib_name=attrib.getNodeName();\n String attrib_value=attrib.getNodeValue();\n json_message=json_message+\",\\\"\"+attrib_name+\"\\\":\\\"\"+attrib_value+\"\\\"\";\n }\n }\n if(node_event.hasChildNodes()){\n if(node_event.getFirstChild().getNodeType()==Node.TEXT_NODE){\n String text=node_event.getFirstChild().getNodeValue().trim();\n if(!text.equalsIgnoreCase(\"\")){\n json_message=json_message+\",\\\"text\\\":\\\"\"+text+\"\\\"\";\n }\n }\n NodeList subnodes=node_event.getChildNodes();\n if(subnodes.getLength()>1)\n {\n json_message=json_message+\",\\\"\"+subnodes.item(1).getNodeName()+\"\\\":[\";\n for(int j=0;j<subnodes.getLength();j++){\n Node subnode=subnodes.item(j);\n\n if(subnode.getNodeType()==Node.ELEMENT_NODE){\n json_message=json_message+\"\\\"\"+subnode.getFirstChild().getNodeValue()+\"\\\"\";\n json_message+=\",\";\n }\n }\n json_message=json_message.substring(0, json_message.length()-1);\n json_message+=\"]\";\n }\n }\n\n json_message+=\"}\";\n\n IEvent event =new Event();\n ((Event)event).setConferenceID(conferenceid);\n ((Event)event).setTimeStamp(System.currentTimeMillis());\n ((Event)event).setMessage(json_message);\n\n sendMessagesToQueue(event);\n total++;\n Thread.sleep(150);\n }\n }\n \n output=\"finish processing \"+total+\" objects\";\n out.println(\"<message>\"+output+\"</message>\");\n }catch(Exception ex){\n Logger.getLogger(XMLProcesser.class.getName()).log(Level.SEVERE, null, ex);\n }finally {\n out.close();\n }\n }",
"@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n WebFunction.JsonHeaderInit(resp);\r\n ArticleService svc=new ArticleService();\r\n JSONObject ResultJson = svc.GetType(\"1\");\r\n WebFunction.ResponseJson(resp, ResultJson);\r\n }",
"public Object parseItem(int rssType, Document doc, int index) throws Exception;",
"@RequestMapping(value = \"/listComittee.do\")\n\tpublic String outputJsonList(HttpServletRequest request, HttpServletResponse response,Model model) throws IOException {\n\t\tSystem.out.println(\"get\");\n\t\tString sPageNo = request.getParameter(\"pageNo\");\n\t\tString sPageSize = request.getParameter(\"pageSize\");\n\t\tString sTotalcnt = \"0\";\n\t\tString sTitle = request.getParameter(\"sTitle\");\n\t\tif(sTitle == null ) {\n\t\t\tsTitle = \"\";\n\t\t};\n\t\tSystem.out.println(sTitle);\n\t\t\n\t\tMap <String,String> hm1 = new HashMap();\n\t\thm1.put (\"sPageNo\",sPageNo);\t\t\n\t\thm1.put (\"sPageSize\",sPageSize);\t\t\n\t\thm1.put (\"sTotalcnt\",sTotalcnt);\t\n\t\thm1.put (\"sTitle\",sTitle);\n\n\t\tString Tot= comitteeListService.selectTotal(hm1);\n\t\t\n\t\tList<HashMap<String, String>> aList= comitteeListService.listComittee(hm1);\n\t \n\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t map.put(\"result\",aList);\n\t \n\t model.addAllAttributes(map);\n\t model.addAttribute(\"totCnt\",Tot);\n\n\t // Keypoint ! setViewName占쏙옙 占쏙옙載� String 占식띰옙占쏙옙姑占� JsonView bean 占쏙옙占쏙옙占쏙옙占쏙옙占� id占쏙옙 占쏙옙占싣억옙 占싼댐옙.\t \n\t return \"jsonView\";\n\t}",
"public interface JugFunInterface {\n\n @GET\n @Path(\"/GetFunFromXML\")\n @Consumes(MediaType.TEXT_HTML)\n @Produces(MediaType.TEXT_XML)\n public JUGstats getSomethingXML(@PathParam(\"counter\") String counter) throws RemoteException, MuleException;\n\n /**\n * @return String\n * @throws java.rmi.RemoteException\n */\n @GET\n @Path(\"/GetFunFromHTML\")\n @Consumes(MediaType.TEXT_HTML)\n @Produces(MediaType.APPLICATION_XML)\n public JUGstats getSomethingHTML(@PathParam(\"counter\") String counter) throws RemoteException, MuleException;\n}",
"public String getXml( HttpServletRequest request )\n {\n StringBuffer strXml = new StringBuffer( );\n\n XmlUtil.beginElement( strXml, TAG_JASPER_PORTLET );\n XmlUtil.addElementHtml( strXml, TAG_JASPER_PORTLET_CONTENT, _strJasperFeedId );\n XmlUtil.endElement( strXml, TAG_JASPER_PORTLET );\n\n return addPortletTags( strXml );\n }",
"String getContentFormat();",
"@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}",
"private void parseResponse(String response, List<NewsDetailItem> items) {\n\n Pattern pText = Pattern.compile(ITEM_TEXT_PREF + \".*?\" + ITEM_TEXT_POSTF);\n Pattern pTitle = Pattern.compile(TITLE_PREF + \".*?\" + TITLE_POSTF);\n Pattern pDate = Pattern.compile(\"class=\\\"metadata\\\">.*?</a>\");\n Pattern pDate2 = Pattern.compile(\"</strong>.*?<\");\n\n Pattern pImage2 = Pattern.compile(IMG_PREF + \".*?\" + IMG_POSTF);\n\n Pattern pVideo = Pattern.compile(VIDEO_PREF + \".*?\" + VIDEO_POSTF);\n\n Pattern pImageUrl = Pattern.compile(IMG_URL_PREF + \".*?\" + IMG_URL_POSTF);\n\n Pattern pComment = Pattern.compile(\"li class=\\\" item\\\" id=\\\"comment.*?</li>\");\n Pattern pAuthor = Pattern.compile(\"class=\\\"commentauthor\\\".*?</span>\");\n\n Pattern pAuthorName1 = Pattern.compile(\"'>.*?</span>\");\n Pattern pAuthorName2 = Pattern.compile(\"/>.*?</span>\");\n Pattern pAuthorImage = Pattern.compile(AUTHOR_IMAGE_PREF + \".*?\" + AUTHOR_IMAGE_POSTF);\n\n Pattern pCommentText = Pattern.compile(\"<span id=\\\"co_.*?</li>\");\n Pattern pCommentId = Pattern.compile(COMMENT_ID_PREFIX + \".*?\" + COMMENT_ID_POSTFIX);\n\n Pattern pCommentTex2t = Pattern.compile(\"dislike-counter.*?comment-toolbar\"); //Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pCommentText3 = Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pThumbsDown = Pattern.compile(\"dislike-counter-comment.*?</span>\");\n Pattern pThumbsUp = Pattern.compile(\"like-counter-comment.*?</span>\");\n Pattern pThumb2 = Pattern.compile(THUMB_PREF + \".*?\" + THUMB_POSTF);\n\n Pattern pCommentDate = Pattern.compile(COMMENTDATE_PREF + \".*?\" + COMMENTDATE_POSTF);\n Pattern pWidth = Pattern.compile(WIDTH_PREF + \".*?\" + WIDTH_POSTF);\n Pattern pHeight = Pattern.compile(HEIGHT_PREF + \".*?\" + HEIGHT_POSTF);\n\n Pattern pAkismet = Pattern.compile(\"vortex_ajax_comment\"+\".*?\"+\";\");\n\n Pattern pAkismet2 = Pattern\n .compile(\"\\\"nonce\\\":\\\".*?\"+\"\\\"\");\n\n Pattern pValue = Pattern.compile(\"value=\\\".*?\\\"\");\n\n Pattern pAk_js = Pattern\n .compile(\"id=\\\"ak_js\\\".*?/>\");\n\n\n String akismet = \"\";\n String ak_js = \"\";\n String postId = \"\";\n Matcher makismet_comment = pAkismet.matcher(response);\n if (makismet_comment.find()) {\n Matcher mvalue = pAkismet2.matcher(makismet_comment.group());\n if (mvalue.find()) {\n akismet = mvalue.group();\n akismet = akismet.replace(\"\\\"\", \"\");\n akismet = akismet.replace(\"nonce:\", \"\");\n }\n }\n\n Matcher mak_js = pAk_js.matcher(response);\n if (mak_js.find()) {\n Matcher mvalue = pValue.matcher(mak_js.group());\n if (mvalue.find()) {\n ak_js = mvalue.group();\n ak_js = ak_js.replace(\"\\\"\", \"\");\n ak_js = ak_js.replace(\"value=\", \"\");\n }\n }\n\n\n Pattern ppost_id = Pattern.compile(\"name=\\\"comment_post_ID\\\".*?/>\");\n Matcher mpost_id = ppost_id.matcher(response);\n if (mpost_id.find()) {\n Matcher mvalue = pValue.matcher(mpost_id.group());\n if (mvalue.find()) {\n postId = mvalue.group();\n postId = postId.replace(\"\\\"\", \"\");\n postId = postId.replace(\"value=\", \"\");\n }\n }\n\n Matcher itemMatcher;\n itemMatcher = pDate.matcher(response);\n String date = \"\";\n if (itemMatcher.find()) {\n itemMatcher = pDate2.matcher(itemMatcher.group());\n if (itemMatcher.find()) {\n date = itemMatcher.group().substring(10);\n date = date.substring(0, date.length() - 2);\n }\n }\n\n Matcher mTitle = pTitle.matcher(response);\n if (mTitle.find()) {\n String itemText = mTitle.group().substring(TITLE_PREF.length()); //(\" dc:title=\\\"\".length()).replace(\"\\\"\", \"\");\n itemText = itemText.substring(0, itemText.length() - TITLE_POSTF.length());\n NewsDetailItem item = new NewsDetailItem();\n item.setText(itemText);\n item.setDate(date);\n item.setContentType(NewsDetailDBHelper.NewsItemType.TITLE.ordinal());\n item.setPostUrl(mUrl);\n item.setCommentId(postId);\n item.setAkismet(akismet);\n item.setAk_js(ak_js);\n items.add(item);\n }\n\n Matcher mText = pText.matcher(response);\n int imageEnd = 0;\n int textStart;\n\n if (mText.find()) {\n String text = mText.group().substring(ITEM_TEXT_PREF.length());\n text = text.substring(0, text.length() - ITEM_TEXT_POSTF.length());\n Matcher mImage = pImage2.matcher(text);\n while (mImage.find()) {\n int textEnd = mImage.start();\n textStart = imageEnd;\n imageEnd = mImage.end();\n String itemText = text.substring(textStart, textEnd);\n addTextItem(items, itemText);\n processImageItem(items, mImage.group(), pImageUrl, pWidth, pHeight);\n }\n\n Matcher mVideo = pVideo.matcher(text);\n while (mVideo.find()) {\n int textEnd = mVideo.start();\n textStart = imageEnd;\n imageEnd = mVideo.end();\n String itemText = \"\";\n if (textEnd >= textStart) {\n itemText = text.substring(textStart, textEnd);\n }\n addTextItem(items, itemText);\n processVideoItem(items, mVideo.group(), pImageUrl, pWidth, pHeight);\n }\n\n text = text.substring(imageEnd);\n addTextItem(items, text);\n }\n\n\n NewsDetailItem item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY_HEADER.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n\n Matcher mComment = pComment.matcher(response);\n while (mComment.find()) {\n item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n item.setAkismet(akismet);\n String comment = mComment.group();\n\n // if (comment.contains(CAN_CHANGE_KARMA_PREFIX)) {\n item.setCanChangeKarma(1);\n // } else {\n // item.setCanChangeKarma(0);\n // }\n\n Matcher mAuthor = pAuthor.matcher(comment);\n if (mAuthor.find()) {\n String authorText = mAuthor.group();\n item.setAuthorImage(getAuthorImgage(authorText, pAuthorImage));\n item.setAuthor(getAuthorName(authorText, pAuthorName1, pAuthorName2));\n }\n Matcher mCommentText = pCommentText.matcher(comment);\n if (mCommentText.find()) {\n String s = mCommentText.group();\n mCommentText = pCommentTex2t.matcher(s);\n if (mCommentText.find()) {\n mCommentText = pCommentText3.matcher(mCommentText.group());\n if (mCommentText.find()) {\n String commentText = mCommentText.group().substring(COMMENT_PREFIX.length());\n commentText = commentText.substring(0, commentText.length() - COMMENT_POSTFIX.length());\n commentText = commentText.replace(\"<p>\", \"\");\n commentText = commentText.replace(\"</p>\", \"\");\n item.setText(commentText);\n }\n }\n }\n Matcher mCommentId = pCommentId.matcher(comment);\n if (mCommentId.find()) {\n String commentId = mCommentId.group().substring(COMMENTDATE_PREF.length());\n commentId = commentId.substring(0, commentId.length() - COMMENT_ID_POSTFIX.length());\n item.setCommentId(commentId);\n }\n Matcher mCommentDate = pCommentDate.matcher(comment);\n if (mCommentDate.find()) {\n String commentDate = mCommentDate.group().substring(COMMENTDATE_PREF.length());\n commentDate = commentDate.substring(0, commentDate.length() - COMMENTDATE_POSTF.length());\n item.setDate(commentDate);\n }\n item.setKarmaUp(getKarma(comment, pThumbsUp, pThumb2));\n item.setkarmaDown(getKarma(comment, pThumbsDown, pThumb2));\n }\n }",
"private static String getMarkup(String contentType) {\r\n\t\tif( \"text/vnd.wap.wml\".equals(contentType) )\r\n\t\t\treturn \"wml\";\r\n else\r\n return \"html\";\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"application/json;charset=UTF-8\");\n\n java.sql.Date start_date = null;\n java.sql.Date end_date = null;\n DAO dao = new DAO(DataSourceFactory.getDataSource(DataSourceFactory.DriverType.server));\n String graphic_type = request.getParameter(\"graphic\");\n graphic_type = (graphic_type == null) ? \"\" : graphic_type;\n String sdate = request.getParameter(\"start_date\");\n String edate = request.getParameter(\"end_date\");\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n try {\n start_date = new java.sql.Date(format.parse(sdate).getTime());\n end_date = new java.sql.Date(format.parse(edate).getTime());\n } catch (ParseException ex) {\n Logger.getLogger(GraphicsController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n switch (graphic_type) {\n case \"codes\":\n \n try (PrintWriter out = response.getWriter()) {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n out.println(gson.toJson(dao.GetBenefitsByProductCodesAndDate(start_date, end_date)));\n }\n break;\n case \"geo\":\n try (PrintWriter out = response.getWriter()) {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n out.println(gson.toJson(dao.GetBenefitsByState(start_date, end_date)));\n }\n break;\n case \"client\":\n try (PrintWriter out = response.getWriter()) {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n out.println(gson.toJson(dao.GetBenefitsByCustomerAndDate(start_date, end_date)));\n }\n break;\n }\n\n }",
"public void jsonPresentation () {\n System.out.println ( \"****** Json Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n String jsonData = \"\";\n ObjectMapper mapper = new ObjectMapper();\n bookArrayList = new Request().postRequestBook();\n try {\n jsonData = mapper.writeValueAsString(bookArrayList);\n } catch (JsonProcessingException e) {\n System.out.println(\"Error: \"+ e);\n }\n System.out.println(jsonData);\n ClientEntry.showMenu ( );\n }",
"@Test\n public void parserHtml() throws JSONException, IOException {\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(req.getInputStream()));\n\n String json = \"\";\n if(br != null){\n json = br.readLine();\n System.out.println(json);\n }\n\n // 2. initiate jackson mapper\n ObjectMapper mapper = new ObjectMapper();\n\n // 3. Convert received JSON to Article\n Product product = mapper.readValue(json, Product.class);\n\n // 4. Set response type to JSON\n resp.setContentType(\"application/json\");\n\n ProductService productService = new ProductService();\n productService.addProduct(product);\n\n String productsJsonString = this.gson.toJson(productService.getAllProducts());\n PrintWriter out = resp.getWriter();\n resp.setContentType(\"application/json\");\n resp.setCharacterEncoding(\"UTF-8\");\n out.print(productsJsonString);\n out.flush();\n\n }",
"@RequestMapping(value = \"/writeComittee.do\")\n\tpublic String writeComittee(HttpServletRequest request, HttpServletResponse response,Model model) throws IOException {\n\t\tSystem.out.println(\"get\");\n\t\tString sTitle = request.getParameter(\"sTitle\");\n\t\tString sContent = request.getParameter(\"sContent\");\n\n\t\tSystem.out.println(sTitle);\n\t\t\n\t\tMap <String,String> hm2 = new HashMap();\n\t\thm2.put (\"sTitle\",sTitle);\n\t\thm2.put (\"sContent\",sContent);\n\n\t\tint i= comitteeListService.writeComittee(hm2);\n\n\t\tString msg = \"\";\n\t\t\n\t\tif(\"\".equals(sTitle)) {\n\t\t\tmsg = \"占쏙옙占쏙옙占쏙옙 占쌉뤄옙占쏙옙占쌍쇽옙占쏙옙.\";\n\t\t\treturn \"jsonView\";\n\t\t}\n\n\t\tif(\"\".equals(sContent)) {\n\t\t\tmsg = \"占쏙옙占쏙옙占쏙옙 占쌉뤄옙占쏙옙占쌍쇽옙占쏙옙.\";\n\t\t\treturn \"jsonView\";\n\t\t}\t\t\n\t Map<String,Object> map = new HashMap<String,Object>();\n\t \n\t map.put(\"result\",i);\n\t map.put(\"data\",msg);\n\t model.addAllAttributes(map);\n\t \n\t return \"jsonView\";\n\t}",
"private static void processFeed(String url, String file, SimpleWriter out) \n {\n \tXMLTree rss = new XMLTree1(url);\n \t\n \t// make sure the rss tree is a valid rss tree\n if(!ensureValidRSSTree(rss, out))\n {\n \tout.println(\"This is not a valid RSS Tree.\");\n \treturn;\n }\n \n // print entire document to file\n outputHeader(rss.child(0), out);\n outputFooter(out);\n \n }",
"public Object parseImage(int rssType, Document doc) throws Exception;",
"String getJSON();",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n XmlParser parser = new XmlParser();\n String [] urls = parser.leerUrls();\n \n CalcProxy calcProxy = new CalcProxy(urls);\n \n String pattern = request.getParameter(\"pattern\");\n String result = \"0\";\n String [] result2 = null;\n \n if (!pattern.equals(\"\")) {\n result = calcProxy.buscar(pattern);\n System.out.println(result);\n } else\n {\n result = calcProxy.listar();\n result2 = calcProxy.listarTxt().split(\"&\");\n System.out.println(result2.toString());\n }\n \n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet CalcServlet</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(result);\n if(result2 != null)\n for(int i = 0; i < result2.length;i++)\n {\n // out.println(\"<p><a href=\\\"http://localhost:8080/sgarci18WasServer/files/urls.txt\\\" download=\\\"http://localhost:8080/sgarci18WasServer/files/urls.txt\\\">urls</a></p>\\n\");\n out.println(\"<p><a href=\\\"\"+ calcProxy.uri+\"/../\"+ result2[i]+\"\\\" download=\\\"\"+ calcProxy.uri+\"/../\"+ result2[i]+\"\\\">\"+ result2[i]+\"</a></p>\\n\"); //+url del json, pero no logre parsearlo\n }\n out.println(\"<p><a href=\\\"index.html\\\" title=\\\"pag principal\\\">Volver</a></p>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n Boolean tag=false;\n ArrayList list=new ArrayList();\n response.setContentType(\"application/json;charset=UTF-8\");\n HttpSession session=request.getSession(true);\n JSONArray jsonarray = new JSONArray();\n// prBean pb = new prBean();\n// session.setAttribute(\"pb\",pb);\n PrintWriter out = response.getWriter();\n \n try{\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n String connectionURL = \"jdbc:derby://localhost:1527/YUHAO_WU\";\n conn = DriverManager.getConnection(connectionURL, \"IS2560\", \"IS2560\");\n st = conn.createStatement();\n String q1 = new String(\"SELECT * FROM PRODUCTS,PRODUCTTYPE where PRODUCTS.TYPEID=PRODUCTTYPE.TYPEID\");\n rs = st.executeQuery(q1);\n while(rs.next()){\n JSONObject jsonobj=new JSONObject();\n jsonobj.put(\"ID\",rs.getInt(\"PRODUCTID\"));\n jsonobj.put(\"Name\",rs.getString(\"NAME\"));\n jsonobj.put(\"Inventory\",rs.getInt(\"INVENTORY\"));\n jsonobj.put(\"Price\",rs.getDouble(\"PRICE\"));\n jsonobj.put(\"Type\",rs.getString(\"TYPENAME\"));\n jsonarray.add(jsonobj);\n }\n tag=true;\n } \n catch (SQLException se)\n {\n se.printStackTrace(); \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ProductServlet.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n if(tag){\n // JSONArray jsonArray=JSONArray.fromObject(list);\n// out.write(jsonArray.toString());\n String json= JSON.toJSONString(jsonarray);\n out.write(json); \n out.flush();\n out.close();\n \n }else{\n \n RequestDispatcher rd = getServletContext().getRequestDispatcher(\"/Failure.jsp\");\n rd.forward(request, response);\n }\n// \n// out.println(\"<html>\");\n// out.println(\"<head>\");\n// out.println(\"<title>Servlet list Messages</title>\");\n// out.println(\"</head>\");\n// out.println(\"<body>\");\n// out.println(\"<h1>The following Messages exist</h1>\");\n// out.println(\"<table class='table table-striped'><tr><th>ProductName</th><th>Inventory</th><th>Price</th><th>Type</th></tr>\");\n// try{\n// while(rs.next())\n// {\n// out.println(\"<tr><td>\"+\n// rs.getString(\"NAME\")+\n// \"</td><td>\"+rs.getString(\"INVENTORY\")+\"</td><td>\"+rs.getString(\"PRICE\")+\"</td><td>\"+rs.getString(\"TYPENAME\")+\"</td></tr>\");\n// }\n// out.print(\"</table>\");\n// }\n// catch(SQLException sqle)\n// {\n// sqle.printStackTrace(); \n// }\n//\n// out.println(\"</ol>\");\n// out.println(\"</body>\");\n// out.println(\"</html>\");\n// out.close();\n }",
"void testFormatter(String s){\n\t\tInputStream istream = new java.io.ByteArrayInputStream(s.getBytes());\n\t\tMessageContext mc = new MessageContext();\n\t\tJSONOMBuilder ob = new JSONOMBuilder();\n\t\tOMSourcedElement omse;\n\t\ttry {\n\t\t\tomse = (OMSourcedElement) ob.processDocument(istream, \"application/json\", mc);\n\t\t} catch (AxisFault e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n // go for the formatte\n\t\tJSONMessageFormatter of = new JSONMessageFormatter();\n\t\tmc.setDoingREST(true);\n\t\tOMDataSource datasource = omse.getDataSource();\n\t\tString str = of.getStringToWrite(datasource);\n\t\tSystem.out.println(str);\n\t}",
"@RequestMapping(method=RequestMethod.GET, value=\"/emps\", headers=\"Accept=application/atom+xml\")\n\tpublic @ResponseBody String getEmpFeed() {\n\t\treturn \"no supporeted\";\n\t\t}",
"@Override\n\tprotected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString type = request.getParameter(\"type\");\n\t\tif(type != null) {\n\t\t\tswitch(type) {\n\t\t\t\tcase \"list\" :\n\t\t\t\t\tlist(request,response);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"add\" :\n\t\t\t\t\tadd(request,response);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"empById\" :\n\t\t\t\t\tempById(request,response);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(response.getCharacterEncoding());\n\t\t\tresponse.setCharacterEncoding(\"gbk\");\n\t\t\tresponse.getWriter().write(\"type无值\");\n\t\t}\n\t}",
"@RequestMapping(method=RequestMethod.GET, path=\"/l\")\n\tpublic String goToRssView(Model model){\n\t\treturn \"bean/rss\";\n\t}",
"public void inflate(){\n\t\tInflateTextContent();\n\t\tif(tempData.get(\"Media_Type\").equals(\"1\")){\n\t\t\tgenerateMediaView();\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"2\")){\n\t\t\tprocessURL(2);\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"3\")){\n\t\t\tprocessURL(3);\n\t\t}\t\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/json;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n\n XTreeDictionary data = new XTreeDictionary();\n MapConverter map = new MapConverter(data);\n Gson gson = new Gson();\n String bid = request.getParameter(\"bid\");\n if (bid == null ? true : bid.isEmpty()) {\n data.add(\"status\", \"NO-UPDATE\");\n out.print(gson.toJson(map, WebConfig.WRITING_CLASS));\n return;\n }\n XArrayList booking_list = AbstractEntity.readDataFormCsv(new Booking());\n booking_list = booking_list.binarySearchAndSort(\"booking_id\", bid, Booking.class);\n if (booking_list == null ? true : booking_list.isEmpty()) {\n data.add(\"status\", \"NO-UPDATE\");\n out.print(gson.toJson(map, WebConfig.WRITING_CLASS));\n return;\n }\n Booking b = (Booking) booking_list.get(0);\n if (b == null ? true : b.isNotNull() || b.getDriver_id() == null) {\n data.add(\"status\", \"NO-UPDATE\");\n out.print(gson.toJson(map, WebConfig.WRITING_CLASS));\n return;\n }\n if (b.getBookingStatus().equals(BookingStatus.WATING_ACCEPTED)) {\n data.add(\"status\", \"NO-UPDATE\");\n out.print(gson.toJson(map, WebConfig.WRITING_CLASS));\n return;\n }\n\n XArrayList driver_list = AbstractEntity.readDataFormCsv(new Driver());\n driver_list = driver_list.binarySearchAndSort(\"user_id\", b.getDriver_id(), Driver.class);\n if (driver_list == null ? true : driver_list.isEmpty() || driver_list.get(0) == null) {\n data.add(\"status\", \"NO-UPDATE\");\n out.print(gson.toJson(map, WebConfig.WRITING_CLASS));\n return;\n }\n\n // Have update\n Driver d = (Driver) driver_list.get(0);\n // ouser phone, ouser name, ouser profile picture, booking status name\n // ouser_phone, ouser_name, ouser_profile, booking_status\n data.add(\"status\", \"OK\");\n data.add(\"ouser_phone\", d.getPhoneNumber() == null ? \"\" : d.getPhoneNumber());\n data.add(\"ouser_name\", d.getName());\n data.add(\"booking_status\", b.getBookingStatus());\n data.add(\"ouser_profile\", Functions.getProfilePic_byid(d.getId()));\n out.print(gson.toJson(map, WebConfig.WRITING_CLASS));\n }\n\n }",
"protected abstract String evalDefault() throws JspException;",
"@GET\n\t@Produces(MediaType.TEXT_XML)\n\tpublic String getXMLList()\n\t{\n\t\tString myStr = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" + \"<parent>\" + \"<policy>\" + \" Hello, World\" + \"</policy>\" + \"<hello>\" + \" Hello, World\" + \"</hello>\" + \"</parent>\";\n\t\t// iterate via \"New way to loop\"\n\t\t/*System.out.println(\"Looping through the list to build the xml string\");\n\t\tfor (String policy : _policyList) \n\t\t{\n\t\t\tmyStr += \"<Policy>\" + policy + \"</Policy>\";\n\t\t}*/\n\n\t\treturn myStr;\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException\n\t{\n\t\tresponse.setContentType(\"application/json;charset=UTF-8\");\n\t}",
"private void GetPByActionValue(HttpServletRequest request, HttpServletResponse response) throws IOException, NumberFormatException {\n String fullClassPath = request.getParameter(\"fullClassPath\");\n String indexStr = request.getParameter(\"index\");\n String type = request.getParameter(\"type\");\n int ElementIndex = Integer.parseInt(indexStr);\n\n String result = XMLTree.getInstance().getPValuesByActionValue(fullClassPath, ElementIndex, type);\n response.getWriter().write(result);\n }",
"@Override\r\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\ttry{\r\n\t\t\tURL feedUrl = new URL(\"http://blog.rss.naver.com/leeminji25.xml\");\r\n\t\t\tSyndFeedInput input = new SyndFeedInput();\r\n\t\t\tSyndFeed syndFeed = input.build(new XmlReader(feedUrl));\r\n\t\t\t\r\n\t\t\t/* RSS */\r\n\t\t\tSystem.out.println( syndFeed.getFeedType() );\r\n\t\t\tList<SyndEntry> entries = syndFeed.getEntries();\r\n\t\t\trequest.setAttribute(\"entries\", entries);\t\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"/content/blog.jsp\");\r\n\t\tdispatcher.forward(request, response);\r\n\t}",
"@Override\n public JsonElement serialize(FrontPageContentResponse src, Type typeOfSrc, JsonSerializationContext context) {\n\treturn null;\n }",
"private void publishfeed(String type,JSONObject jsonRoot) throws JSONException {\n\t\t\tJSONObject jLocation = jsonRoot.getJSONObject(\"weather\").getJSONObject(\"location\");\n\t\t\tJSONObject jCondition = jsonRoot.getJSONObject(\"weather\").getJSONObject(\"condition\");\n\t\t\tString city = jLocation.getString(\"city\");\n\t\t\tString region = jLocation.getString(\"region\");\n\t\t\tString country = jLocation.getString(\"country\");\n\t\t\tString text = jCondition.getString(\"text\");\n\t\t\tString temp = jCondition.getString(\"temp\");\n\t\t\tString unit = jsonRoot.getJSONObject(\"weather\").getJSONObject(\"units\").getString(\"temperature\");\n\t\t\tString feed = jsonRoot.getJSONObject(\"weather\").getString(\"feed\");\n\t\t\tString detail = jsonRoot.getJSONObject(\"weather\").getString(\"link\");\n\t\t\tString imgUrl = \"\";\n\t\t\tString name =\"\";\n\t\t\tString caption = \"\";\n\t\t\tString description = \"\";\n\t\t\t\n\t\t\tif(!region.equals(\"\")){\n\t\t\t\tname = city + \",\" + region + \",\" + country;\n\t\t\t} else{\n\t\t\t\tname = city + \",\" + country;\n\t\t\t}\n\t\t\t\n\t\t\tif(type.equals(\"current\")){\n\t\t\t\tcaption = \"The current condition for \" + city + \"is \" + text;\n\t\t\t\tdescription = \"Temperature is \" + temp + (char) 0x00B0 + unit;\n\t\t\t\timgUrl = jsonRoot.getJSONObject(\"weather\").getString(\"img\");\n\t\t\t} else {\n\t\t\t\tcaption = \"Weather forecast for \" + city;\n\t\t\t\timgUrl = \"http://www-scf.usc.edu/~csci571/2013Fall/hw8/weather.jpg\";\n\t\t\t\tJSONArray jsonForecasts = jsonRoot.getJSONObject(\"weather\").getJSONArray(\"forecast\");\n\t\t\t\tfor(int i = 0; i < jsonForecasts.length(); i++){\n\t\t\t\t\tJSONObject obj = jsonForecasts.getJSONObject(i);\n\t\t\t\t\tdescription += obj.getString(\"day\") + \": \" + obj.getString(\"text\") + \", \" \n\t\t\t\t\t + obj.getString(\"high\") + \"/\" + obj.getString(\"low\") + (char) 0x00B0 + unit + \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tJSONObject property = new JSONObject(); \n\t\t\tproperty.put(\"text\", \"here\"); \n\t\t\tproperty.put(\"href\", detail); \n\t\t\tJSONObject properties = new JSONObject(); \n\t\t\tproperties.put(\"Look at details\", property); \n\t\t\tBundle params = new Bundle();\n\t\t\tparams.putString(\"name\", name);\n\t\t params.putString(\"caption\", caption);\n\t\t params.putString(\"description\", description);\n\t\t params.putString(\"link\", feed);\n\t\t params.putString(\"picture\", imgUrl);\n\t\t params.putString(\"properties\", properties.toString());\n\t\t WebDialog feedDialog = (\n\t\t\t new WebDialog.FeedDialogBuilder(MainActivity.this,\n\t\t\t Session.getActiveSession(),\n\t\t\t params))\n\t\t\t .setOnCompleteListener(new OnCompleteListener() {\n\n\t\t\t @Override\n\t\t\t public void onComplete(Bundle values,\n\t\t\t FacebookException error) {\n\t\t\t if (error == null) {\n\t\t\t // When the story is posted, echo the success\n\t\t\t // and the post Id.\n\t\t\t final String postId = values.getString(\"post_id\");\n\t\t\t if (postId != null) {\n\t\t\t Toast.makeText(MainActivity.this,\n\t\t\t \"Posted story, id: \"+postId,\n\t\t\t Toast.LENGTH_SHORT).show();\n\t\t\t } else {\n\t\t\t // User clicked the Cancel button\n\t\t\t Toast.makeText(MainActivity.this.getApplicationContext(), \n\t\t\t \"Publish cancelled\", \n\t\t\t Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t\t } else if (error instanceof FacebookOperationCanceledException) {\n\t\t\t // User clicked the \"x\" button\n\t\t\t Toast.makeText(MainActivity.this.getApplicationContext(), \n\t\t\t \"Publish cancelled\", \n\t\t\t Toast.LENGTH_SHORT).show();\n\t\t\t } else {\n\t\t\t // Generic, ex: network error\n\t\t\t Toast.makeText(MainActivity.this.getApplicationContext(), \n\t\t\t \"Error posting story\", \n\t\t\t Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t\t }\n\n\t\t\t })\n\t\t\t .build();\n\t\t\t feedDialog.show();\n\n\t\t}",
"private JSON() {\n\t}",
"@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws IOException, ServletException {\n boolean wasXmlRequested = isRequestedFormatXml(request);\n if( ! wasXmlRequested ){\n super.doGet(request,response);\n }else{\n try {\n VitroRequest vreq = new VitroRequest(request);\n Configuration config = getConfig(vreq); \n ResponseValues rvalues = processRequest(vreq);\n \n response.setCharacterEncoding(\"UTF-8\");\n response.setContentType(\"text/xml;charset=UTF-8\");\n writeTemplate(rvalues.getTemplateName(), rvalues.getMap(), config, request, response);\n } catch (Exception e) {\n log.error(e, e);\n }\n }\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n response.setCharacterEncoding(AuraBaseServlet.UTF_ENCODING);\n String ret = null;\n long now = System.currentTimeMillis();\n long ifModifiedSince = request.getDateHeader(\"If-Modified-Since\");\n if(ifModifiedSince != -1 && ifModifiedSince + 1000 > now) {\n response.sendError(HttpServletResponse.SC_NOT_MODIFIED);\n return;\n }\n \n setLongCache(response);\n AuraContext.Format format = context.getFormat();\n response.setContentType(getContentType(format));\n switch(format){\n case MANIFEST:\n writeManifest(request, response);\n break;\n case CSS:\n try {\n writeCss(request, response);\n } catch (Throwable t) {\n handleServletException(t, true, context, request, response, true);\n }\n break;\n case JS:\n try {\n ret = writeDefinitions(request, response);\n response.getWriter().println(ret);\n } catch (Throwable t) {\n handleServletException(t, true, context, request, response, ret != null);\n }\n break;\n case JSON:\n try {\n Aura.getConfigAdapter().validateCSRFToken(csrfToken.get(request));\n writeComponents(request, response);\n } catch (Throwable t) {\n handleServletException(t, true, context, request, response, true);\n }\n break;\n default:\n break;\n }\n }",
"public Object parseChannel(int rssType, Document doc) throws Exception;",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"application/json\");\n try (PrintWriter out = response.getWriter()) {\n Gson gson = new Gson();\n\n ProblemsManager problemsManager = ServletUtils.getProblemsManager(getServletContext());\n List<TimeTableProblem> problemList = problemsManager.getProblems();\n List<DTOShortProblem> shortProblemsList= new LinkedList<>();\n for(TimeTableProblem problem:problemList)\n {\n shortProblemsList.add(new DTOShortProblem(problem));\n }\n\n\n String json = gson.toJson(shortProblemsList);\n out.println(json);\n out.flush();\n }\n }",
"@GET\n @Produces(\"application/json\")\n public String getJson() {\n MultivaluedMap<String, String> params = context.getQueryParameters();\n String catId = params.getFirst(Propuesta.FIELDS.CATEGORYID);\n// MultivaluedMap<String, String> params = context.getQueryParameters();\n// for (String param : params.keySet()) {\n// String val = params.getFirst(param);\n// System.out.println(\"Param:\"+param+\", value:\"+val);\n// }\n //System.out.println(headers.getRequestHeader(HttpHeaders.AUTHORIZATION).get(0));\n return getProposalsJSON(catId);\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException, Exception {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n try (PrintWriter out = response.getWriter()) {\r\n// String url = request.getParameter(\"url\");\r\n Gson gson = new Gson();\r\n getDataAPI g = new getDataAPI();\r\n String jsonString = g.sendGet(\"https://apartment-crawl.herokuapp.com/api/apartments\");\r\n\r\n System.err.println(jsonString);\r\n byte ptext[] = jsonString.getBytes(\"ISO-8859-1\");\r\n String s = new String(ptext, \"UTF-8\");\r\n java.lang.reflect.Type type = new TypeToken<List<InformationObj>>() {\r\n }.getType();\r\n List<InformationObj> list = gson.fromJson(s, type);\r\n\r\n HttpSession session = request.getSession();\r\n session.setAttribute(\"list\", list);\r\n response.sendRedirect(\"data.jsp\");\r\n }\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try ( PrintWriter out = response.getWriter()) {\n response.setContentType(\"application/xml;charset=UTF-8\");\n response.setCharacterEncoding(\"UTF-8\"); \n out.println(\"<?xml version=\\\"1.0\\\"?>\");\n \n HttpSession session = request.getSession();\n Store store = (Store) session.getAttribute(\"store\");\n try {\n SimpleDateFormat DF = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date date = DF.parse(request.getParameter(\"date\"));\n String startTime = request.getParameter(\"startTime\");\n\n if(startTime != null && store != null && date !=null) {\n HaveId haveId = new HaveId(startTime, 0, date);\n TimeSlot timeSlot = TimeSlotDAO.get(startTime);\n Have have = new Have(haveId, 0, timeSlot);\n session.setAttribute(\"have\", have);\n out.println(\"<msg>\" + DateUtil.dateOfHaveObject(have) + \"</msg>\");\n } else if(store != null && date != null) {\n out.println(\"<timeSlots>\");\n \n for (Have h : HaveDAO.getTimeSlotsByStoreId(store.getId(), date)) {\n out.println(\" <timeSlot>\");\n out.println(\" <startTime><![CDATA[\" + h.getTimeSlot().getStartTime() + \"]]></startTime>\");\n out.println(\" <endTime><![CDATA[\" + h.getTimeSlot().getEndTime() + \"]]></endTime>\");\n out.println(\" <capacity><![CDATA[\" + h.getCapacity() + \"]]></capacity>\");\n out.println(\" </timeSlot>\");\n }\n \n out.println(\"</timeSlots>\");\n } else {\n out.println(\"<msg>Requête inconnue !</msg>\");\n }\n } catch (Exception ex){\n out.print(\"<msg_error>\" + ex.getMessage() + \"</msg_error>\");\n }\n }\n }",
"@Override\n public String getContentType() {\n return \"text/xml; charset=UTF-8\";\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"application/json\");\n try (PrintWriter out = response.getWriter()) {\n JSONArray jArr = new JSONArray();\n ArrayList<Queue> queueList = QueueDAO.getQueue();\n for(Queue q : queueList){\n JSONObject queue = new JSONObject();\n queue.put(\"patientID\", q.getPatientID());\n queue.put(\"visitID\", q.getVisitID());\n queue.put(\"timestamp\", q.getTimestamp());\n queue.put(\"status\", q.getStatus());\n queue.put(\"name\", q.getName());\n jArr.add(queue);\n }\n out.println(jArr.toString());\n response.setStatus(HttpServletResponse.SC_OK);\n }\n }",
"@GET\n @Path(\"/multiget/{j}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response sayJsonHello(@PathParam(\"j\") String j) {\n\t StringTokenizer st = new StringTokenizer(j, \",\");\n String res = \"{\" + \"\\n\";\n\t while(st.hasMoreElements())\n\t {\n\t\t String next = st.nextToken();\n\t\t if(map.get(next) == null)\n\t\t return Response.status(404).build();\n\t\t res += next + \" : \" + map.get(next)+ \"\\n\";\n\t }\n\t res += \"}\";\n\t return Response.ok(res).build();\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n int user_id = 1;// get from session\n boolean isAdmin = true;//get from sssion\n\n int reguser_id, admin_id, message_id;\n String message;\n Messages dto = new Messages();\n\n if (isAdmin) {\n dto.setAdmin_id(user_id);\n dto.setSender(0);\n } else {\n dto.setUser_id(user_id);\n dto.setSender(1);\n\n }\n\n PrintWriter out = response.getWriter();\n try {\n String jsonString = \"\";\n BufferedReader br\n = new BufferedReader(new InputStreamReader(request.getInputStream()));\n String line;\n //String json = \"\";\n while ((line = br.readLine()) != null) {\n jsonString += line;\n //System.out.println(\"recieve\" + jsonString);\n }\n //System.out.println(jsonString != null);\n if (jsonString != null) {\n System.out.println(jsonString);\n JSONObject obj = new JSONObject(jsonString);\n\n reguser_id = obj.getInt(\"student_id\");\n \n admin_id = obj.getInt(\"teacher_id\"); \n \n message_id = obj.getInt(\"message_id\");\n \n MessageDbManager mDB = new MessageDbManager();\n ArrayList<Messages> list = mDB.getAllMessagesAfterID(reguser_id, admin_id, message_id);\n System.out.println(list);\n if(list!=null)\n {\n \n JSONArray json = new JSONArray(list);\n out.print(json.toString());\n System.out.println(json.toString());\n// for(Messages m : list){\n// JSONObject json=new JSONObject(m);\n// out.print(json.toString());\n// System.out.println(json.toString());\n// }\n \n }\n else\n {\n out.print(\"null\");\n }\n\n }\n\n }catch(Exception ex){\n ex.printStackTrace();\n } \n finally {\n \n out.close();\n }\n\n }",
"@Override\n public void handleRequest(HttpServletRequest request,\n HttpServletResponse response) throws ServletException, IOException\n {\n response.setHeader(\"Expires\", \"Tue, 03 Jul 2001 06:00:00 GMT\");\n response.setHeader(\"Last-Modified\", new Date().toString());\n response.setHeader(\"Cache-Control\", \"no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0\");\n response.setHeader(\"Pragma\", \"no-cache\");\n response.setContentType(\"application/json\");\n\n\n String format = (request.getParameter(\"format\") != null) ? request.getParameter(\"format\") : \"html\";\n\t\tString action = (request.getParameter(\"action\") != null) ? request.getParameter(\"action\") : \"view\";\n\n if (format.equals(\"json\")) {\n \tif (action.equals(\"load\")) {\n\t\t\t\tactionIsLoad(response);\n\t\t\t} else if (action.equals(\"clear\")) {\n \t\tactionIsClear(response);\n\t\t\t} else if (action.equals(\"showXML\")) {\n\t\t\t\tactionIsShowXml(response);\n\t\t\t} else {\n \t\tfinal PrintWriter writer = response.getWriter();\n \t\twriter.write(new Gson().toJson(\"Error\"));\n\t\t\t}\n } else {\n request.getRequestDispatcher(\"/WEB-INF/jsp/init.jsp\").forward(request, response);\n }\n\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet JSONCollector</title>\");\n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Servlet JSONCollector at \" + request.getContextPath () + \"</h1>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n } finally {\n out.close();\n }\n }",
"@RequestMapping(\"/get1\")\t// 自测如果类上的 @RequestMapping(\"/\") 则这里可以不用 /也可以用\r\n\tpublic @ResponseBody String Get1(HttpServletRequest request) throws Exception {// 不加 @ResponseBody 将默认返回XXX.jsp 页面的名称,不存在则出错\r\n\t\tString id = request.getParameter(\"id\");\r\n\t\treturn id;\r\n//\t\treturn cfxService.GetServiceById(id);\r\n\t}",
"@Override\r\n\tpublic Map parseTag(HttpServletRequest request, String tagName) {\n\t\tString title = getParameter(\"title\", \"\");\r\n\t\tString cid = getParameter(\"columnId\", \"-1\");\r\n\t\tString showNum = getParameter(\"showNum\", \"0\");\r\n\r\n\t\tString od = getParameter(\"od\", \"-1\");\r\n\t\tString ods = getParameter(\"ods\", \"-1\");\r\n\r\n\t\tint tagTemplateId = this.getIntParameter(\"tmd\", 0);\r\n\r\n\t\tTagTemplate tagTem = null;\r\n\t\tif (tagTemplateId > 0) {\r\n\t\t\ttagTem = getBussinessService(request).getTagTemplate(tagTemplateId);\r\n\r\n\t\t}\r\n\r\n\t\tif (Integer.parseInt(cid) < 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tColumns col = null;\r\n\t\tcol = getBussinessService(request)\r\n\t\t.getColumns(Integer.parseInt(cid));\r\n\r\n\t\tif (\"\".equals(title)) {\r\n\t\t\t// ²éѯÀ¸±êÌâ\r\n\t\t\t// col = getBussinessService(request)\r\n\t\t\t// .getColumns(Integer.parseInt(cid));\r\n\t\t\tif (col == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\ttitle = col.getTitle();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (showNum.equals(\"1\")) {\r\n\t\t\tif (col == null) {\r\n\t\t\t\tcol = getBussinessService(request).getColumns(\r\n\t\t\t\t\t\tInteger.parseInt(cid));\r\n\t\t\t}\r\n\t\t\tif (col != null && col.getPricepackId() != null\r\n\t\t\t\t\t&& col.getPricepackId() > 0) {\r\n\t\t\t\tLong count = getResourceService(request)\r\n\t\t\t\t\t\t.getResourcePackReleationsCount(col.getPricepackId());\r\n\t\t\t\tif (count > 0)\r\n\t\t\t\t\ttitle += \"(\" + count + \")\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMap velocityMap = new HashMap();\r\n\t\tvelocityMap.put(\"title\", title);\r\n\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(request.getContextPath());\r\n\t\tsb.append(ParameterConstants.PORTAL_PATH);\r\n\t\tsb.append(\"?\");\r\n\t\tsb.append(ParameterConstants.PAGE);\r\n\t\tsb.append(\"=\");\r\n\t\tsb.append(ParameterConstants.PAGE_COLUMN);\r\n\t\tsb.append(\"&\");\r\n\t\tURLUtil.append(sb, ParameterConstants.PRODUCT_ID, request);\r\n\t\tURLUtil.append(sb, ParameterConstants.PAGEGROUP_ID, request);\r\n\t\tURLUtil.append(sb, ParameterConstants.AREA_ID, request);\r\n\t\tsb.append(ParameterConstants.COLUMN_ID);\r\n\t\tsb.append(\"=\");\r\n\t\tsb.append(Integer.parseInt(cid) > 0 ? cid : col.getId());\r\n\t\tsb.append(\"&\");\r\n\r\n\t\tif (Integer.parseInt(od) > 0 && Integer.parseInt(ods) > 0) {\r\n\t\t\tsb.append(ParameterConstants.ORDER);\r\n\t\t\tsb.append(\"=\");\r\n\t\t\tsb.append(od);\r\n\t\t\tsb.append(\"&\");\r\n\t\t\tsb.append(ParameterConstants.ORDERSUB);\r\n\t\t\tsb.append(\"=\");\r\n\t\t\tsb.append(ods);\r\n\t\t\tsb.append(\"&\");\r\n\t\t}\r\n\r\n\t\tURLUtil.append(sb, ParameterConstants.CHANNEL_ID, request);\r\n\t\tURLUtil.trimURL(sb);\r\n\t\tvelocityMap.put(\"url\", sb.toString());\r\n\r\n\t\tString url = getBussinessService(request).getVariables(\"media_url\")\r\n\t\t\t\t.getValue();\r\n\t\tif (col != null) {\r\n\t\t\tString icon_id = col.getIcon();\r\n\t\t\tif (StringUtils.isNotEmpty(icon_id)) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tMaterial mater = getBussinessService(request).getMaterial(\r\n\t\t\t\t\t\t\tInteger.parseInt(icon_id));\r\n\t\t\t\t\tString imgName = mater.getFilename() + \".\"\r\n\t\t\t\t\t\t\t+ mater.getExtName();\r\n\t\t\t\t\tString imgUrl = \"\";\r\n\t\t\t\t\timgUrl = url + imgName;\r\n\t\t\t\t\tvelocityMap.put(\"img\", imgUrl);\r\n\t\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tMap resultMap = new HashMap();\r\n\t\tresultMap.put(TagUtil.makeTag(tagName), DBVmInstance.getInstance()\r\n\t\t\t\t.parseVM(velocityMap, this, tagTem));\r\n\t\treturn resultMap;\r\n\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n\n request.setCharacterEncoding(\"UTF-8\");\n\n String URL = \"http://localhost:8080/_WebApplication1_project_/_html3_file_.jsp?total=1500&count=10&type=2\";\n\n\n// String sougaku = request.getParameter(\"total\");\n// String suuryou = request.getParameter(\"count\");\n// String shubetsu = request.getParameter(\"type\");\n \n\n // type の値を元に,商品種別の日本語情報を表示\n int type = 2;\n \n switch(type){\n case 1:\n out.print(\"雑貨\" + \"<br>\");\n break;\n case 2:\n out.print(\"生鮮食品\" + \"<br>\");\n break;\n case 3:\n out.print(\"その他\" + \"<br>\");\n break;\n }\n \n // 商品の単価を求め,画面に表示\n int total = 1500;\n int count = 10;\n \n int tanka = (total / count);\n out.print(\"商品単価は\" + tanka + \"円です\" + \"<br>\");\n \n int sougaku = total * count;\n int suuryou = count;\n int shubetsu = type;\n \n // 商品購入総額に応じてポイントを計算し,その値を画面に表示\n // ポイントの計算は,商品購入総額を基準にして行います\n double point = sougaku / suuryou;\n \n if(point > 0){\n out.print(\"ポイントが発生しました\" + \"<br>\");\n }else{\n out.print(\"ポイントが発生しませんでした\" + \"<br>\");\n }\n \n \n if(sougaku <= 3000){ // 3000 円未満 ... 0%\n out.print(\"ポイントは\" + (point * 0) + \"です\" + \"<br>\");\n }else if(sougaku >= 3000 && sougaku <= 5000){ //3000 円以上で5000円未満 ... 購入総額の 4%\n out.print(\"ポイントは\" + (point * 0.04) + \"です\" + \"<br>\");\n }else if(sougaku >= 5000){ // 5000 円以上 ... 購入総額の 5%\n out.print(\"ポイントは\" + (point * 0.05) + \"です\" + \"<br>\");\n }\n\n \n // テキストボックスの情報\n// out.print(request.getParameter(\"total\"));\n// out.print(request.getParameter(\"count\"));\n// out.print(request.getParameter(\"type\"));\n \n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet test</title>\");\n out.println(\"</head>\");\n out.println(\"<body>\");\n\n out.println(\"総額は\" + sougaku + \"です\" + \"<br>\");\n out.println(\"数量は\" + suuryou + \"です\" + \"<br>\");\n out.println(\"商品は\" + shubetsu + \"です\" + \"<br>\");\n\n out.println(\"<h1>Servlet test at \" + request.getContextPath() + \"</h1>\");\n\n out.println(\"</body>\");\n out.println(\"</html>\");\n }\n }",
"@Override\r\n protected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n throws ServletException, IOException {\n req.setCharacterEncoding(\"UTF-8\");\r\n \r\n String actType = req.getParameter(\"actType\");\r\n System.out.println(\"actType == \" + actType);\r\n\r\n JSONObject json = new JSONObject();\r\n resp.setContentType(\"text/json;charset=UTF-8\");\r\n ActivityPhotoDAO dao = new ActivityPhotoDAO();\r\n List<ActivityPhotoVO> photoTypeList = dao.getAllActivityPhotoByType(actType);\r\n System.out.println(photoTypeList.size());\r\n String[] photos = new String[photoTypeList.size()];\r\n int i = 0;\r\n for(ActivityPhotoVO activityPhotoVO : photoTypeList) {\r\n photos[i] = activityPhotoVO.getPhotoURL();\r\n i++;\r\n }\r\n JSONArray jsonArray = JSONArray.fromObject(photos);\r\n json.put(\"photos\", jsonArray);\r\n resp.getWriter().print(json.toString());\r\n }",
"private void parseData() {\n\t\t\r\n\t}",
"private void parseData(String url, String response) {\n\n if (response.isEmpty()) {\n if (!mErrorMessage.isEmpty()) {\n alertParseErrorAndFinish(mErrorMessage);\n } else {\n renderData();\n }\n } else {\n if (mItemTotal == 0) {\n //---------------------------------------------------------------------------------\n // 목록 파싱하기 - 아메바 블로그의 HTML 코드가 변경됨. 파서 다시 만들어야 함. 2016-09-10\n //---------------------------------------------------------------------------------\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_AKB48_TEAM8:\n Akb48Parser akb48Parser = new Akb48Parser();\n akb48Parser.parseTeam8ReportList(response, mNewDataList);\n break;\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n BaseParser parser = new BaseParser();\n parser.parseAmebaList(response, mNewDataList);\n mItemTotal = mNewDataList.size();\n break;\n case Config.BLOG_ID_NGT48_MANAGER:\n Ngt48Parser ngt48manager = new Ngt48Parser();\n ngt48manager.parseLineBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n //Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n case Config.BLOG_ID_NGT48_PHOTOLOG:\n Ngt48Parser ngt48photo = new Ngt48Parser();\n ngt48photo.parseMemberBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n }\n }\n\n //-------------------------------\n // 항목별 사진 파싱하기\n //-------------------------------\n if (mItemTotal > 0) { // && mItemTotal >= mItemCount) {\n if (mItemCount > 0) {\n BaseParser parser = new BaseParser();\n String[] array = parser.parseAmebaArticle(response);\n\n WebData webData = mNewDataList.get(mItemCount - 1);\n webData.setContent(array[0]);\n webData.setImageUrl(array[1]);\n }\n\n if (mItemCount < mItemTotal) {\n WebData webData = mNewDataList.get(mItemCount);\n String reqUrl = webData.getUrl();\n String reqAgent = Config.USER_AGENT_MOBILE;\n\n requestData(reqUrl, reqAgent);\n updateProgress();\n\n mItemCount++;\n } else {\n mItemTotal = 0;\n mItemCount = 0;\n mPbLoadingHorizontalMore.setProgress(0);\n }\n }\n\n if (mItemTotal == 0) {\n renderData();\n }\n }\n }",
"public List getJpmProductSaleNews(JpmProductSaleNew jpmProductSaleNew);",
"protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\treq.setCharacterEncoding(\"UTF-8\");\n Gson gson = new GsonBuilder()\n .setDateFormat(\"yyyy-MM-dd HH:mm:ss\")\n .create();\n\t\tBufferedReader br = req.getReader();\n\t\tStringBuilder jsonIn = new StringBuilder();\n\t\tString line = null;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tjsonIn.append(line);\n\t\t}\n\t\tJsonObject jsonObject = gson.fromJson(jsonIn.toString(),\n\t\t\t\tJsonObject.class);\n\t\t//String action = jsonObject.get(\"action\").getAsString();\n\t\tString action = \"AllSell\";\n\t\tString outStr = \"\";\n\t\t// 注意:是大寫\n\t\tif (\"AllSell\".equals(action)) {\n\t\t\t//String url = req.getContextPath() + \"/room/room.do\";\n\t\t\tString url = null;\n\t\t\tif (\"10.0.2.2\".equals(req.getServerName())){\n\t\t\t\turl = \"http://\" + \"localhost\" + \":8081/DDD_web/room/room.do\";\n\t\t\t}else{\n\t\t\t\turl = \"http://\" + req.getServerName() + \":8081/DDD_web/room/room.do\";\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//String url = \"http://\" + \"localhost\" + \":8081/DDD_web/room/room.do\";\n\t\t\tSystem.out.println(\"url: \" + url);\n\t\t\tString charset = \"UTF-8\"; // Or in Java 7 and later, use the constant: java.nio.charset.StandardCharsets.UTF_8.name()\n\t\t\tString param1 = \"AllSell\";\n\t\t\t//String param2 = \"value2\";\n\t\t\t// ...\n\n\t\t\tString query = String.format(\"action=%s\", URLEncoder.encode(param1, charset));\n\t\t\t//String query = String.format(\"action=%s¶m2=%s\", URLEncoder.encode(param1, charset), URLEncoder.encode(param2, charset));\n\t\t\t\n\t\t\tHttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();\n\t\t\tconnection.setDoOutput(true); // Triggers POST.\n\t\t\tconnection.setRequestProperty(\"Accept-Charset\", charset);\n\t\t\tconnection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded;charset=\" + charset);\n\t\t\t\n\t\t\t// getOutputStream會自動開啟連線:\n\t\t\ttry (OutputStream output = connection.getOutputStream()) {\n\t\t\t output.write(query.getBytes(charset));\n\t\t\t //output.close(); // try-catch-with resources會自動關閉\n\t\t\t}\n//\t\t\tInputStream response = connection.getInputStream();\n\t\t\t//connection.connect();\n\t\t\t\n\t int responseCode = connection.getResponseCode();\n\t // 確認能與server建立Socket連線\n\t if (responseCode == 200) {\n\t \tSystem.out.println(\"response code: \" + responseCode);\n\t // connection.getInputStream() - 等待server回應,如果還沒有回應就hold在這邊\n\t //BufferedReader br_02 = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t } else {\n\t System.out.println(\"response code: \" + responseCode);\n\t }\n\t connection.disconnect();\n\t\t\t\n\t\t}\t\n\t\t\n\t\t\n\t\t\n\t}",
"public RestTemplate contentTypeHelper(RestTemplate restTemplatex) {\n restTemplatex = new RestTemplateBuilder().build();\n List<HttpMessageConverter<?>> messageConverters = new ArrayList<>();\n MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();\n converter.setSupportedMediaTypes(Collections.singletonList(MediaType.ALL));\n messageConverters.add(converter);\n restTemplatex.setMessageConverters(messageConverters);\n return restTemplatex;\n }",
"@RequestMapping(\"/getResult\")\r\n @ResponseBody\r\n public String prob(@RequestParam String URL){\n \tHashSet<String> res= new CrawlerService().getPageLinks(URL); \t\r\n \tStringBuffer result =new StringBuffer(); \t\r\n \tfor (String item:res){\r\n \t\tresult.append(item+\"<br>\");\r\n \t} \t\r\n return result.toString();\r\n\r\n }",
"@RequestMapping(method=RequestMethod.GET, path=\"/p\")\n\tpublic String goToContentNegotiation(Model model){\n\t\t\n\t\tList<String> books = new ArrayList<>();\n\t\tbooks.add(\"Las mil y una noches\");\n\t\tbooks.add(\"Divina Comedia\");\n\t\tbooks.add(\"Don Quijote de la Mancha\");\n\t\tbooks.add(\"Cien años de soledad\");\n\t\tbooks.add(\"Odisea\");\n\t\tmodel.addAttribute(books);\n\t\t\n\t\treturn \"simple/contentNegotiationView\";\n\t}",
"public static String getContentType(String format) {\n\t\tif (StringUtils.hasText(format)) {\n\t\t\tif (format.equalsIgnoreCase(XML.name())) {\n\t\t\t\treturn ContentTypes.XML.toString();\n\t\t\t} else if (format.equalsIgnoreCase(JSON.name())) {\n\t\t\t\treturn ContentTypes.JSON.toString();\n\t\t\t} else if (format.equalsIgnoreCase(PDF.name())) {\n return ContentTypes.PDF.toString();\n }\n\t\t}\n\t\treturn null;\n\t}",
"protected String generateJSONString(ArrayList<Review> set, String page)\n\t{\n\t\tStringBuffer sb = new StringBuffer();\n\t\tsb.append(\"{\\\"numOfPages\\\":\\\"\" + set.size() / 10 + \"\\\",\" + \"\\\"reviews\\\":[\");\n\t\tIterator<Review> it = set.iterator();\n\t\tint p = Integer.parseInt(page);\n\t\tint i = 0;\n\t\twhile (it.hasNext() && i < 10 * p)\n\t\t{\n\t\t\tReview review = it.next();\n\t\t\tif (i < 10 * (p-1))\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tsb.append(\"{\\\"author\\\":\\\"\" + review.getReviewUsername() + \"\\\",\");\n\t\t\tsb.append(\"\\\"date\\\":\\\"\" + review.getReviewDate() + \"\\\",\");\n\t\t\tsb.append(\"\\\"rating\\\":\\\"\" + review.getRating() + \"\\\",\");\n\t\t\tsb.append(\"\\\"id\\\":\\\"\" + review.getReviewId() + \"\\\",\");\n\t\t\tsb.append(\"\\\"likes\\\":\\\"\" + review.getLikes() + \"\\\",\");\n\t\t\t//sb.append(\"\\\"city\\\":\\\"\" + hotel.getHotel().getHotelAddress().getCity() + \"\\\",\");\n\t\t\tsb.append(\"\\\"text\\\":\\\"\" + review.getReviewText() + \"\\\"},\" );\n\t\t\ti++;\n\t\t}\n\t\tsb.deleteCharAt(sb.length() - 1);\n\t\tsb.append(\"]\" + \"}\");\n\t\treturn sb.toString();\n\t}",
"@RequestMapping(value = \"baseType.do\")\n @ResponseBody\n public String baseType(int age){\n return \"age:\"+age;\n }",
"@Path(\"{url}\")\r\n @GET\r\n @Produces(MediaType.TEXT_PLAIN)\r\n public String getIt(@PathParam(\"url\") String url) throws SQLException {\r\n \t//make connection\r\n\t\turl = \"https://\"+url;\r\n \t\t\tJsoupConnection job =new JsoupConnection(url);\r\n \t\t\tDocument jSoupDoc = job.getDoc();\r\n \t\t\t\r\n \t\t\t//Parse\r\n \t\t\tParser par = new Parser(jSoupDoc);\r\n \t\t\tWebDataStructure wb = par.filterData();\r\n \t\t\tMySqlDataIngestion mysqling =new MySqlDataIngestion();\r\n \t\t\tmysqling.ingestData(wb);\r\n \t\t\t\r\n \t\t\t//lets return output\r\n return \"Inserted into Mysql Succesfully!!\";\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n Object[] profile = data(111);\n for(int i=0; i<4; i++){\n out.print(profile[i]);\n }\n \n }\n }",
"protected String xmlType()\n {\n return PRS_XML;\n }",
"public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String msg = request.getParameter(\"Body\");\n msg = msg.toLowerCase();\n System.out.println(\"-->\" + msg);\n\n String cmd = msg.split(\" \")[0];\n msg = msg.substring(msg.indexOf(' ')+1);\n\n String result = \"\";\n\n if (cmd.equals(\"usage\")) {\n System.out.println(\"usage\");\n result = \"Twilio Movie Assistant Usage Guide:\"\n + \"\\nLIST: Returns a list of movies available\"\n + \"\\nSHOW movie_num: Returns the movie's showtimes\";\n } else if (cmd.equals(\"list\")) {\n System.out.println(\"list\");\n Document doc;\n try {\n doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n Elements titles = doc.select(\".info > h3 > span > a\");\n System.out.println(titles.size());\n for (int i = 1; i <= titles.size(); i++) {\n String title = titles.get(i-1).text().split(\"\\\\(\")[0];\n title = title.substring(0, title.length()-1);\n result += \"\\n\" + i + \"-\" + title;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (cmd.equals(\"show\")){\n System.out.println(\"showtimes\");\n Document doc;\n try {\n doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n Elements titles = doc.select(\".info > h3 > span > a\");\n Elements showtimes = doc.getElementsByClass(\"showtimes\");\n\n System.out.println(showtimes.size() + \" , \" + titles.size());\n for (int i = 0; i < titles.size(); i++) {\n String title = titles.get(i).text().toLowerCase().split(\"\\\\(\")[0];\n title = title.substring(0, title.length()-1);\n if ((\"\"+(i+1)).equals(msg)) {\n result = (titles.get(i).text() + \" : \" + showtimes.get(i).text());\n }\n }\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n // } else if (cmd.equals(\"review\")) {\n // Document doc;\n // HttpURLConnection con;\n // try {\n // doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n // Elements titles = doc.select(\".info > h3 > span > a\");\n // System.out.println(titles.size());\n // String title = \"\";\n // for (int i = 0; i < titles.size(); i++) {\n // title = titles.get(i).text().split(\"\\\\(\")[0];\n // title = title.substring(0, title.length()-1);\n // if ((\"\"+i).equals(msg)) {\n // result = title;\n // break;\n // }\n // }\n // result = result.replace(' ', '+');\n // String url = \"http://api.rottentomatoes.com/api/public/v1.0/movies.json?q=\" + title + \"&page_limit=10&page=1&apikey=69dxhndmtkxf7f8m8bertygz\";\n\n // URL obj = new URL(url);\n // con = (HttpURLConnection) obj.openConnection();\n // con.setRequestMethod(\"GET\");\n // con.setRequestProperty(\"User-Agent\", \"Mozilla/5.0\");\n // BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n // String inputLine;\n // StringBuffer buf = new StringBuffer();\n \n // while ((inputLine = in.readLine()) != null) {\n // buf.append(inputLine);\n // }\n \n // JSONParser parser = new JSONParser(); \n // JSONObject json = (JSONObject) parser.parse(buf.toString());\n // JSONArray jsonArray = ((JSONArray)json.get(\"movies\"));\n // JSONObject movie1 = (JSONObject)jsonArray.get(0);\n // result = (String)movie1.get(\"synopsis\");\n \n // in.close();\n // } catch (IOException e) {\n // e.printStackTrace();\n // } catch (ParseException e) {\n \n // }\n } else {\n result = \"Cannot complete command: \" + msg;\n }\n\n System.out.println(result);\n\n Message message = new Message(result);\n TwiMLResponse twiml = new TwiMLResponse();\n try {\n twiml.append(message);\n } catch (TwiMLException e) {\n e.printStackTrace();\n }\n\n response.setContentType(\"application/xml\");\n response.getWriter().print(twiml.toXML());\n }",
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"public void doGet(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws IOException, ServletException\r\n {\r\n response.setContentType(\"text/html\");\r\n PrintWriter out = response.getWriter(); \r\n CookieUtil PkCookie = new CookieUtil();\r\n String vPID = PkCookie.getCookie(request,\"PID\");\r\n if(vPID==null)\r\n {\r\n out.println(WebUtil.IllegalEntry());\r\n return;\r\n }\r\n \r\n String Browser = request.getParameter(\"Browser\");\r\n String ctempl = request.getParameter(\"ClsTempl\");\r\n String vTemplName = null;\r\n\r\n out = response.getWriter(); \r\n out.println(\"<html><head>\");\r\n \r\n WebUtil util = new WebUtil();\r\n Script scr = null;\r\n String str[]= new String[7];\r\n Rectangle rect[] = new Rectangle[7]; \r\n String tag = null;\r\n int bid = -1;\r\n int sid = -1;\r\n\r\n if(ctempl.equalsIgnoreCase(\"ordtempl1\"))\r\n {\r\n vTemplName = \"OrdTempl1\"; \r\n rect[0] = new Rectangle(0,0,100,25); \r\n rect[1] = new Rectangle(20,65,75,75); \r\n rect[2] = new Rectangle(120,60,320,25); \r\n rect[3] = new Rectangle(120,87,320,75); \r\n rect[4] = new Rectangle(500,65,100,75); \r\n rect[5] = new Rectangle(15,170,100,100); \r\n rect[6] = new Rectangle(350,170,100,100); \r\n }\r\n else if(ctempl.equalsIgnoreCase(\"ordtempl2\"))\r\n {\r\n vTemplName = \"OrdTempl2\";\r\n rect[0] = new Rectangle(0,0,100,25); \r\n rect[1] = new Rectangle(330,70,75,75); \r\n rect[2] = new Rectangle(15,60,320,25); \r\n rect[3] = new Rectangle(15,90,320,75); \r\n rect[4] = new Rectangle(500,65,100,75); \r\n rect[5] = new Rectangle(15,170,100,100); \r\n rect[6] = new Rectangle(350,170,100,100); \r\n }\r\n else if(ctempl.equalsIgnoreCase(\"ordtempl3\"))\r\n {\r\n vTemplName = \"OrdTempl3\";\r\n rect[0] = new Rectangle(0,0,100,25); \r\n rect[1] = new Rectangle(500,70,75,75); \r\n rect[2] = new Rectangle(20,65,350,25); \r\n rect[3] = new Rectangle(20,90,350,40); \r\n rect[4] = new Rectangle(20,135,100,75); \r\n rect[5] = new Rectangle(15,190,100,100); \r\n rect[6] = new Rectangle(350,190,100,100); \r\n }\r\n\r\n\r\n if( Browser.equals(\"1\") )\r\n {\r\n scr = DelTemplForm.ShowNetsScript( vPID );\r\n tag = \"</Layer>\";\r\n str[0] = \"<Layer id=\\\"player\\\" left=\"+rect[0].x+\" top=\"+rect[0].y+\" width=\"+rect[0].width+\"% height=\"+rect[0].height+\" border=\\\"0\\\" visibility=\\\"show\\\"> \";\r\n str[1] = \"<Layer id=\\\"ilayer\\\" left=\"+rect[1].x+\" top=\"+rect[1].y+\" width=\"+rect[1].width+\" height=\"+rect[1].height+\" border=\\\"0\\\" visibility=\\\"show\\\"> \";\r\n str[2] = \"<Layer id=\\\"clayer\\\" left=\"+rect[2].x+\" top=\"+rect[2].y+\" width=\"+rect[2].width+\" height=\"+rect[2].height+\" border=\\\"0\\\" visibility=\\\"show\\\"> \";\r\n str[3] = \"<Layer id=\\\"alayer\\\" left=\"+rect[3].x+\" top=\"+rect[3].y+\" width=\"+rect[3].width+\" height=\"+rect[3].height+\" border=\\\"0\\\" visibility=\\\"show\\\"> \";\r\n str[4] = \"<Layer id=\\\"olayer\\\" left=\"+rect[4].x+\" top=\"+rect[4].y+\" border=\\\"0\\\"> \";\r\n str[5] = \"<Layer id=\\\"blayer\\\" left=\"+rect[5].x+\" top=\"+rect[5].y+\" width=\"+rect[5].width+\"% height=\"+rect[5].height+\" border=\\\"2\\\" visibility=\\\"show\\\">\";\r\n str[6] = \"<Layer id=\\\"slayer\\\" left=\"+rect[6].x+\" top=\"+rect[6].y+\" width=\"+rect[6].width+\"% height=\"+rect[6].height+\" border=\\\"2\\\" visibility=\\\"show\\\"> \";\r\n bid = 1;\r\n sid = 2;\r\n }\r\n else\r\n {\r\n scr = DelTemplForm.ShowIntExplScript( vPID );\r\n tag = \"</Div>\";\r\n str[0] = \"<div id=\\\"player\\\" style=\\\"position:absolute; width:\"+rect[0].width+\"%; height:\"+rect[0].height+\"; left: \"+rect[0].x+\"; top: \"+rect[0].y+\"; visibility:visible\\\">\";\r\n str[1] = \"<div id=\\\"ilayer\\\" style=\\\"position:absolute; width:\"+rect[1].width+\"; height:\"+rect[1].height+\"; left: \"+rect[1].x+\"; top: \"+rect[1].y+\"; visibility:visible\\\">\";\r\n str[2] = \"<div id=\\\"clayer\\\" style=\\\"position:absolute; width:\"+rect[2].width+\"; height:\"+rect[2].height+\"; left: \"+rect[2].x+\"; top: \"+rect[2].y+\"; visibility:visible\\\">\";\r\n str[3] = \"<div id=\\\"alayer\\\" style=\\\"position:absolute; width:\"+rect[3].width+\"; height:\"+rect[3].height+\"; left: \"+rect[3].x+\"; top: \"+rect[3].y+\"; visibility:visible\\\">\";\r\n str[4] = \"<div id=\\\"olayer\\\" style=\\\"position:absolute; left:\"+rect[4].x+\"; top:\"+rect[4].y+\"\\\"> \";\r\n str[5] = \"<div id=\\\"blayer\\\" style=\\\"position:absolute; width:\"+rect[5].width+\"%; height:\"+rect[5].height+\"; left: \"+rect[5].x+\"; top: \"+rect[5].y+\"; visibility:visible\\\">\";\r\n str[6] = \"<div id=\\\"slayer\\\" style=\\\"position:absolute; width:\"+rect[6].width+\"%; height:\"+rect[6].height+\"; left: \"+rect[6].x+\"; top: \"+rect[6].y+\"; visibility:visible\\\">\";\r\n bid = 3;\r\n sid = 4;\r\n }\r\n\r\n out.println(scr);\r\n out.println(\"<title>Template 1</title> \");\r\n out.println(\"</head> \");\r\n out.println(\"<body BACKGROUND=\\\"/ordimg/BACKGR2.GIF\\\"><BR> \");\r\n\r\n out.println(str[0]);\r\n out.println(\"<b><font face=\\\"Arial,Helvetica\\\" color=\\\"#3333FF\\\" size=+2> \");\r\n out.println(\"<CENTER><A href=\\\"JavaScript:getChallanTitle('Enter Challan Title : ',document.forms[0].text2.value)\\\">Delivery Challan</A></font></b></CENTER>\");\r\n out.println(tag);\r\n out.println(\"<BR>\");\r\n\r\n out.println(str[1]);\r\n out.println(\"<A href=\\\"JavaScript:getLogo()\\\"><img SRC=\\\"/ordimg/logo.jpg\\\" border=\\\"0\\\" height=75 width=75 align=ABSCENTER></A> \");\r\n out.println(tag);\r\n\r\n out.println(str[2]);\r\n out.println(\" <font face=\\\"Arial,Helvetica\\\" color=\\\"#3333FF\\\" size=+2> \");\r\n out.println(\" <A href=\\\"JavaScript:getCompanyName('Enter Company Name : ',document.forms[0].text1.value)\\\">Company Name</A> \");\r\n out.println(\" </font> \");\r\n out.println(tag);\r\n\r\n out.println(str[3]);\r\n out.println(\" <A href=\\\"JavaScript:getAddress('Enter Company Address :',document.forms[0].text3.value)\\\" STYLE=\\\"text-decoration:none\\\"> \");\r\n out.println(\" <font face=\\\"Arial,Helvetica\\\" color=\\\"#000000\\\" size=-1> \");\r\n out.println(\" Company Address, City, State, Pin Code, Phone Number, Fax Number \");\r\n out.println(\" </font> \");\r\n out.println(\" </A> \"); \r\n out.println(tag);\r\n\r\n out.println(str[4]);\r\n if(ctempl.equalsIgnoreCase(\"ordtempl3\"))\r\n {\r\n out.println(\" <b><font color=\\\"#3333FF\\\">Delivery Nr.</font></b> ORDTIN121\");\r\n out.println(\" <b><font color=\\\"#3333FF\\\">Delivery Dt.</font></b> 12.12.1999 \");\r\n }\r\n else\r\n {\r\n out.println(\" <b><font color=\\\"#3333FF\\\">Delivery Nr.</font></b> ORDTIN121<BR> \");\r\n out.println(\" <b><font color=\\\"#3333FF\\\">Delivery Dt.</font></b> 12.12.1999 \");\r\n }\r\n out.println(tag);\r\n\r\n out.println(\"<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH=\\\"100%\\\" >\");\r\n out.println(\"<tr><td width=50%>\");\r\n out.println(str[5]);\r\n out.println(\"<b>Shipment From :</b>\");\r\n out.println(\"<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH=\\\"80%\\\" >\");\r\n out.println(\"<tr><td width=\\\"30%\\\"> Name </td><td>-----------------------</td></tr>\");\r\n out.println(\"<tr><td> Address </td><td>----------------------</td></tr>\");\r\n out.println(\"<tr><td> City </td><td>----------</td></tr>\");\r\n out.println(\"<tr><td> State </td><td>------------</td></tr>\");\r\n out.println(\"<tr><td> Pin Code </td><td>----------------</td></tr>\");\r\n out.println(\"<tr><td> Phone No </td><td>---------</td></tr>\");\r\n out.println(\"<tr><td> Fax No </td><td>----------</td></tr>\");\r\n out.println(\"</table>\");\r\n out.println(tag);\r\n out.println(\"</td><td>\");\r\n out.println(str[6]);\r\n out.println(\"<b>Transport Address :</b>\");\r\n out.println(\"<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH=\\\"80%\\\" >\");\r\n out.println(\"<tr><td width=\\\"30%\\\"> Name </td><td>-----------------------</td></tr>\");\r\n out.println(\"<tr><td> Address </td><td>----------------------</td></tr>\");\r\n out.println(\"<tr><td> City </td><td>----------</td></tr>\");\r\n out.println(\"<tr><td> State </td><td>------------</td></tr>\");\r\n out.println(\"<tr><td> Pin Code </td><td>----------------</td></tr>\");\r\n out.println(\"<tr><td> Phone No </td><td>---------</td></tr>\");\r\n out.println(\"<tr><td> Fax No </td><td>----------</td></tr>\");\r\n out.println(\"</table>\");\r\n out.println(tag);\r\n out.println(\"</td></tr>\");\r\n out.println(\"</table>\");\r\n\r\n out.println(\"<form action=\\\"/JOrder/servlets/DelTempl\\\" method=\\\"POST\\\" target=\\\"mid_frame\\\"> \");\r\n out.println(\"<Input type=\\\"hidden\\\" name=\\\"ordtempl\\\" value=\\\"\"+vTemplName+\"\\\"> \");\r\n out.println(\"<Input type=\\\"hidden\\\" name=\\\"logoname\\\" value=\\\"\\\"> \");\r\n out.println(\"<Input type=\\\"hidden\\\" name=\\\"text1\\\" value=\\\"\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"text2\\\" value=\\\"\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"text3\\\" value=\\\"\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"billaddr_id\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"shipaddr_id\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"note\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"Instruct\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"rem1\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"rem2\\\"> \");\r\n out.println(\"<input type=\\\"hidden\\\" name=\\\"rem3\\\"> \");\r\n if(ctempl.equalsIgnoreCase(\"ordtempl3\"))\r\n {\r\n out.println(\"<BR><BR><BR><BR><BR><BR>\");\r\n out.println(\"<table width=\\\"47%\\\"> \");\r\n out.println(\"<tr><td align=\\\"right\\\"> \");\r\n out.println(\"SysDate<INPUT Type=\\\"Radio\\\" name=\\\"odateflg\\\" value=\\\"0\\\" CHECKED> Enterable<INPUT Type=\\\"Radio\\\" name=\\\"odateflg\\\" value=\\\"1\\\"> \");\r\n out.println(\"</tr></td> \");\r\n out.println(\"</table> \");\r\n out.println(\"<BR><BR><BR><BR><BR><BR><BR><BR><BR>\");\r\n }\r\n else\r\n {\r\n out.println(\"<BR><BR><BR>\"); \r\n out.println(\"<table width=\\\"85%\\\"> \");\r\n out.println(\"<tr><td align=\\\"right\\\"> \");\r\n out.println(\"SysDate<INPUT Type=\\\"Radio\\\" name=\\\"odateflg\\\" value=\\\"0\\\" CHECKED> Enterable<INPUT Type=\\\"Radio\\\" name=\\\"odateflg\\\" value=\\\"1\\\"> \");\r\n out.println(\"</tr></td> \");\r\n out.println(\"</table> \");\r\n out.println(\"<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> \");\r\n }\r\n out.println(\"<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH=\\\"80%\\\" > \");\r\n out.println(\"<tr><td> \");\r\n out.println(\" <input type=\\\"button\\\" value=\\\"Select\\\" onClick=\\\"callTable(\"+bid+\")\\\"> <input type=\\\"button\\\" value=\\\"New\\\" onClick=\\\"callForm(\"+bid+\")\\\"> Readonly<INPUT Type=\\\"Radio\\\" name=\\\"billid\\\" value=\\\"0\\\" CHECKED> Enterable<INPUT Type=\\\"Radio\\\" name=\\\"billid\\\" value=\\\"1\\\"> \");\r\n out.println(\"</td><td> \");\r\n out.println(\"<input type=\\\"button\\\" value=\\\"Select\\\" onClick=\\\"callTable(\"+sid+\")\\\"> <input type=\\\"button\\\" value=\\\"New\\\" onClick=\\\"callForm(\"+sid+\")\\\"> Readonly<INPUT Type=\\\"Radio\\\" name=\\\"shipid\\\" value=\\\"0\\\" CHECKED> Enterable<INPUT Type=\\\"Radio\\\" name=\\\"shipid\\\" value=\\\"1\\\"> \");\r\n out.println(\"</td></tr> \");\r\n out.println(\"</table> \");\r\n out.println(\"<BR> \");\r\n out.println(\"<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH=\\\"70%\\\" > \");\r\n out.println(\"<TR> \");\r\n out.println(\"<TD width=\\\"10%\\\"><b><font face=\\\"Arial,Helvetica\\\" size=-1> Note</Font></b></TD> \");\r\n out.println(\"<TD><font face=\\\"Arial,Helvetica\\\" size=-1><INPUT Type=\\\"Text\\\" name=\\\"notes\\\" Size=50 MaxLength=100></Font></TD> \");\r\n out.println(\"<TD> <INPUT Type=\\\"CheckBox\\\" name=\\\"note\\\"></TD> \");\r\n out.println(\"</TR> \");\r\n out.println(\"</table> \");\r\n out.println(\"<BR> \");\r\n out.println(\"<hr ALIGN=LEFT SIZE=4 WIDTH=\\\"80%\\\"> \");\r\n out.println(\"<br><b><i> Delivery Details are Entered here at the time of Creating the Delivery</i></b> \");\r\n out.println(\"<BR><BR> \");\r\n out.println(\"<hr ALIGN=LEFT SIZE=4 WIDTH=\\\"80%\\\"> \");\r\n out.println(\"<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH=\\\"80%\\\" > \");\r\n out.println(\"<TR> \");\r\n out.println(\"<TD width=\\\"15%\\\" vAlign=\\\"Top\\\"><b><font face=\\\"Arial,Helvetica\\\" size=-1> Instructions</font></B></TD> \");\r\n out.println(\"<TD><TextArea Name=Inst Rows=3 Cols=50></TextArea></TD> \");\r\n out.println(\"<TD vAlign=\\\"Top\\\"> <INPUT Type=\\\"CheckBox\\\" name=\\\"Instruct\\\"></TD> \");\r\n out.println(\"</TR> \");\r\n out.println(\"<TR> \");\r\n out.println(\"<TD><b><font face=\\\"Arial,Helvetica\\\" size=-1> Remark1</Font></B></TD> \");\r\n out.println(\"<TD><font face=\\\"Arial,Helvetica\\\" size=-1><INPUT Type=\\\"Text\\\" name=\\\"remark1\\\" Size=50 MaxLength=100></Font></TD> \");\r\n out.println(\"<TD> <INPUT Type=\\\"CheckBox\\\" name=\\\"rem1\\\"></TD> \");\r\n out.println(\"</TR>\");\r\n out.println(\"<TR>\");\r\n out.println(\"<TD><b><font face=\\\"Arial,Helvetica\\\" size=-1> Remark2</Font></B></TD>\");\r\n out.println(\"<TD><font face=\\\"Arial,Helvetica\\\" size=-1><INPUT Type=\\\"Text\\\" name=\\\"remark2\\\" Size=50 MaxLength=100></Font></TD>\");\r\n out.println(\"<TD> <INPUT Type=\\\"CheckBox\\\" name=\\\"rem2\\\"></TD>\");\r\n out.println(\"</TR>\");\r\n out.println(\"<TR>\");\r\n out.println(\"<TD><b><font face=\\\"Arial,Helvetica\\\" size=-1> Remark3</Font></B></TD>\");\r\n out.println(\"<TD><font face=\\\"Arial,Helvetica\\\" size=-1><INPUT Type=\\\"Text\\\" name=\\\"remark3\\\" Size=50 MaxLength=100></Font></TD>\");\r\n out.println(\"<TD> <INPUT Type=\\\"CheckBox\\\" name=\\\"rem3\\\"></TD>\");\r\n out.println(\"</TR>\");\r\n out.println(\"</table>\");\r\n out.println(\"<br> \");\r\n out.println(\"<Center>Template Name \"+util.getBlankSpaces(3)+\"<Input type=\\\"text\\\" name=\\\"vAliasName\\\" size=\\\"20\\\" maxlength=\\\"30\\\" onBlur=\\\"this.value=this.value.toUpperCase()\\\">\"+util.getBlankSpaces(5)+\"<input type=\\\"button\\\" value=\\\"Submit\\\" onClick=\\\"submit_form()\\\"></Center>\");\r\n out.println(\"</form>\");\r\n out.println(\" </body> \");\r\n out.println(\" </html> \");\r\n }",
"@RequestMapping(value=\"/main1\") \n public String main(Model model,Integer start){\n int count=allpageService.getCount();\n System.out.println(count);\n //List<page> pages1=allpageService.getOne((start-1)*8, 8);//start是页数\n model.addAttribute(\"count\",count);//总数\n //model.addAttribute(\"pages\",pages);\n // model.addAttribute(\"pages1\",pages1);//一页\n return \"main\"; \n }",
"public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(java.net.MalformedURLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n catch(com.rometools.rome.io.FeedException fexp)\n {\n String message = fexp.getMessage();\n System.out.println(message);\n }\n catch(java.io.IOException ioexp)\n {\n String message = ioexp.getMessage();\n System.out.println(message);\n }\n }",
"public static String getFileType() {return \"json\";}",
"private void setContentType(HttpServletResponse response, Format format) {\r\n switch (format) {\r\n case html:\r\n case htmlfragment:\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n break;\r\n case kml:\r\n response.setContentType(\"application/vnd.google-earth.kml+xml;charset=UTF-8\");\r\n response.setHeader(\"Content-Disposition\",\"attachment; filename=\\\"document.kml\\\"\");\r\n break;\r\n case json:\r\n response.setContentType(\"application/json;charset=UTF-8\");\r\n response.setHeader(\"Content-disposition\", \"attachment; filename=\\\"document.json\\\"\");\r\n break;\r\n case pjson:\r\n\t response.setContentType(\"text/plain;charset=UTF-8\");\r\n\t break; \r\n default:\r\n case xml:\r\n response.setContentType(\"text/xml;charset=UTF-8\");\r\n break;\r\n }\r\n}",
"protected String convertToJSON(List<NewsItem> newsItems) {\n Gson gson = new GsonBuilder().disableHtmlEscaping().create();\n return gson.toJson(newsItems);\n }",
"Object visitorResponse();",
"@ModelAttribute(\"representation\")\n\tString representation(HttpServletRequest request) throws IOException {\n\t\tString contentType = request.getContentType();\n\n\t\tif (contentType != null && contentType.contains(\"application/json\")) {\n\t\t\tInputStream in = request.getInputStream();\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\n\t\t\tint d;\n\t\t\twhile ((d = in.read()) != -1) {\n\t\t\t\tstringBuffer.append((char) d);\n\t\t\t}\n\t\t\tSystem.out.println(stringBuffer.toString());\n\t\t\tSystem.out.println(Rra.defaultRepresentation instanceof GsonRepresentation);\n\t\t\trequest.setAttribute(\"representation\", stringBuffer.toString());\n\t\t}\n\t\treturn \"representation\";\n\t}",
"protected abstract Object evalValue() throws JspException;",
"private void getByTitle(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString type = request.getParameter(\"type\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\tswitch(type){\n\t\tcase \"BigData\":\n\t\t\tlist = artService.getAll(\"atype\", \"辅修\");\n\t\t\tbreak;\n\t\tcase \"Computer\":\n\t\t\tlist = artService.getAll(\"atype\", \"专业\");\n\t\t\tbreak;\n\t\tcase \"Math\":\n\t\t\tlist = artService.getAll(\"atype\", \"留学\");\n\t\t\tbreak;\n\t\tcase \"Economy\":\n\t\t\tlist = artService.getAll(\"atype\", \"考研\");\n\t\t\tbreak;\n\t\tcase \"Psychology\":\n\t\t\tlist = artService.getAll(\"atype\", \"就业\");\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlist=artService.getAll(\"atype\", \"其他\");\n\t\t\t\tbreak;\n\t\t}\n\t\trequest.setAttribute(\"list\", list);\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(\"/essay/other_essay.jsp\").forward(request, response);\n\t\t} catch (ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@RequestMapping(value = \"/viewComittee.do\")\n\t\tpublic String viewComittee(HttpServletRequest request, HttpServletResponse response,Model model) throws IOException {\n\t\t\tSystem.out.println(\"get\");\n\t\t\tString sSeq = request.getParameter(\"sSeq\");\n\t\t\tSystem.out.println(sSeq);\n\t\t\t\n\t\t\tMap <String,String> hm3 = new HashMap();\n\t\t\thm3.put (\"sSeq\",sSeq);\n\t\t\t\n\t\t\tMap<String,String> map = comitteeListService.viewComittee(hm3);\n\t\t\t\n\t\t model.addAllAttributes(map);\n\t\t \n\t\t // Keypoint ! setViewName占쏙옙 占쏙옙載� String 占식띰옙占쏙옙姑占� JsonView bean 占쏙옙占쏙옙占쏙옙占쏙옙占� id占쏙옙 占쏙옙占싣억옙 占싼댐옙.\t \n\t\t return \"jsonView\";\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n\t{\n\t\tString xml = request.getParameter(\"xml\");\n\t\tSystem.out.println(xml);\n\t\tPrintWriter out = response.getWriter();\n\t\tString result = \"<Items><Item><error>0</error><Message>ERROR</Message><MidID>OK</MidID></Item></Items>\";\n\t\tout.print(result);\n\t}",
"public static ArrayList<NewsItem> parseNews(String jObject){\r\n\r\n ArrayList<NewsItem> newsItemList = new ArrayList<>();\r\n\r\n try {\r\n JSONObject mainJSONObject = new JSONObject(jObject);\r\n JSONArray items = mainJSONObject.getJSONArray(\"articles\");\r\n\r\n for(int i = 0; i < items.length(); i++){\r\n JSONObject item = items.getJSONObject(i);\r\n newsItemList.add(new NewsItem(item.getString(\"author\"), item.getString(\"title\"),\r\n item.getString(\"description\"), item.getString(\"url\"), item.getString(\"urlToImage\"), item.getString(\"publishedAt\") ));\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n return newsItemList;\r\n }",
"private static String m1472a(String str, String str2, Integer num, Integer num2, JSONObject jSONObject, Integer num3) {\n return String.format(Locale.ROOT, \"<html><head></head><body><div id=\\\"%s\\\" style=\\\"width: %dpx; height: %dpx;\\\"></div><script>(function initMoatTracking(apiname, pcode, ids, duration) {var events = [];window[pcode + '_moatElToTrack'] = document.getElementById('%s');var moatapi = {'dropTime':%d,'adData': {'ids': ids, 'duration': duration, 'url': 'n/a'},'dispatchEvent': function(ev) {if (this.sendEvent) {if (events) { events.push(ev); ev = events; events = false; }this.sendEvent(ev);} else {events.push(ev);}},'dispatchMany': function(evs){for (var i=0, l=evs.length; i<l; i++) {this.dispatchEvent(evs[i]);}}};Object.defineProperty(window, apiname, {'value': moatapi});var s = document.createElement('script');s.src = 'https://z.moatads.com/' + pcode + '/moatvideo.js?' + apiname + '#' + apiname;document.body.appendChild(s);})('%s', '%s', %s, %s);</script></body></html>\", new Object[]{\"mianahwvc\", num, num2, \"mianahwvc\", Long.valueOf(System.currentTimeMillis()), str, str2, jSONObject.toString(), num3});\n }",
"private HashMap<String, String> parsePathType(String path) {\n LOG.debug(\"Path: \" + path);\n Pattern systemPattern = Pattern.compile(\"v[0-9]+/systems/?(\\\\?.*)?$\");\n Matcher systemMatcher = systemPattern.matcher(path);\n\n Pattern systemStatusPattern = Pattern.compile(\"v[0-9]+/systems/status/?(\\\\?.*)?$\");\n Matcher systemStatusMatcher = systemStatusPattern.matcher(path);\n\n Pattern systemReportsPattern = Pattern.compile(\"v[0-9]+/systems/(.*)/reports/?(\\\\?.*)?$\");\n Matcher systemReportsMatcher = systemReportsPattern.matcher(path);\n\n Pattern reportsPattern = Pattern.compile(\"v[0-9]+/reports/?(\\\\?.*)?$\");\n Matcher reportsMatcher = reportsPattern.matcher(path);\n\n Pattern acksPattern = Pattern.compile(\"v[0-9]+/acks/?(\\\\?.*)$\");\n Matcher acksMatcher = acksPattern.matcher(path);\n\n Pattern rulesPattern = Pattern.compile(\"v[0-9]+/rules/?(\\\\?.*)$\");\n Matcher rulesMatcher = rulesPattern.matcher(path);\n\n Pattern uploadsPattern = Pattern.compile(\"uploads(/.*)?(/\\\\?.*)?$\");\n Matcher uploadsMatcher = uploadsPattern.matcher(path);\n\n HashMap<String, String> response = new HashMap<String, String>();\n if (systemMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEMS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"systems\")));\n } else if (systemReportsMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEM_REPORTS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"reports\")));\n String id = (String) systemReportsMatcher.group(1);\n if (id != null) {\n response.put(\"id\", id);\n }\n } else if (reportsMatcher.matches()) {\n response.put(\"type\", Constants.REPORTS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"reports\")));\n } else if (acksMatcher.matches()) {\n response.put(\"type\", Constants.ACKS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"acks\")));\n } else if (rulesMatcher.matches()) {\n response.put(\"type\", Constants.RULES_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"rules\")));\n } else if (uploadsMatcher.matches()) {\n response.put(\"type\", Constants.UPLOADS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"uploads\")));\n } else if (systemStatusMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEMS_STATUS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"systems\")));\n } else {\n response.put(\"type\", \"-1\");\n response.put(\"index\", \"-1\");\n }\n return response;\n }",
"void parse();",
"public ArrayList<Product> parseJSONAction(String textJson){\n \n JSONParser j = new JSONParser();\n \n try {\n \n Map<String, Object> productsListJson = j.parseJSON(new CharArrayReader(textJson.toCharArray()));\n ArrayList<Map<String,Object>> productsList = (ArrayList<Map<String,Object>>) productsListJson.get(\"root\");\n //System.out.println(\"pdd \" + productsList.toString());\n Map<String, Object> cart = productsList.get(0);\n //System.out.println(\"cc \" + cart);\n //System.out.println(\"ggg\" + cart.get(\"cart\"));\n ArrayList<Map<String,Object>> lis = (ArrayList<Map<String,Object>>) cart.get(\"cart\");\n //System.out.println(\"lista \" + lis.toString());\n for(Map<String, Object> en : lis){\n Product p = new Product();\n p.setDetails(en.get(\"numProducts\").toString());\n p.setRef_product((int) Double.parseDouble(en.get(\"refProduct\").toString()));\n p.setPrice((int) Float.parseFloat(en.get(\"totalPrice\").toString()));\n products.add(p);\n }\n \n Map<String, Object> data = productsList.get(1);\n ArrayList<Map<String,Object>> llis = (ArrayList<Map<String,Object>>) data.get(\"data\");\n System.out.println(\"dddd\" + llis.toString());\n int i=0;\n for(Map<String, Object> en : llis){\n Product pro = products.get(i);\n pro.setName(en.get(\"name\").toString());\n pro.setPhoto(\"http://127.0.0.1/ftbb_web/ftbb_web/public/images/prod/\"+en.get(\"photo\").toString());\n i++;\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n \n return products; \n }",
"String getJson();",
"String getJson();",
"String getJson();",
"protected void startOutput() throws JspException, SAXException {\n if (uriExpr != null)\n uri = evalString(\"uri\", uriExpr);\n String prefix = null;\n if (nameExpr != null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1) {\n prefix = qname.substring(0, colonIndex);\n name = qname.substring(colonIndex + 1);\n } else\n name = qname;\n }\n if (attrExpr != null) {\n Object attrList = eval(\"attr\", attrExpr, Object.class);\n if (attrList instanceof AttributesImpl)\n attr = (AttributesImpl) attrList;\n else {\n attr = new AttributesImpl();\n StringTokenizer tokenizer\n = new StringTokenizer(attrList.toString());\n while (tokenizer.hasMoreTokens()) {\n String expr = tokenizer.nextToken();\n int dotIndex = expr.indexOf('.');\n String attrName = expr;\n if (dotIndex != -1)\n attrName = expr.substring(dotIndex + 1);\n expr = \"${\" + expr + \"}\";\n String attrValue = evalString(\"attr\", expr);\n attr.addAttribute(null, attrName, attrName,\n \"CDATA\", attrValue);\n }\n }\n }\n if (emptyExpr != null)\n empty = evalBoolean(\"empty\", emptyExpr);\n int nsIndex = -1;\n String oldUri = null;\n if (uri != null) {\n String qns = prefix != null ? \"xmlns:\" + prefix : \"xmlns\";\n String ns = prefix != null ? prefix : \"xmlns\";\n nsIndex = attr.getIndex(qns);\n if (nsIndex != -1) {\n oldUri = attr.getValue(nsIndex);\n attr.setValue(nsIndex, uri);\n } else {\n attr.addAttribute(null, ns, qns, \"CDATA\", uri);\n nsIndex = attr.getIndex(qns);\n }\n }\n if (attr == null)\n attr = new AttributesImpl();\n serializer.getHandler().startElement(uri, name, qname, attr);\n if (nsIndex != -1)\n if (oldUri != null)\n attr.setValue(nsIndex, oldUri);\n else\n attr.removeAttribute(nsIndex);\n if (!empty) {\n // workaround: force the serializer to close the start tag\n emptyComment();\n }\n }",
"public interface FrequentlyRelatedItemHttpResponseParser {\n public FrequentlyRelatedItemSearchResponse[] parse(String json);\n}",
"public interface AjaxPaginationService {\n /**\n *\n * @param pageNow 当前页\n * @param data 传入数据\n * @return List<String> [0]放入分页内容[1]放入分页页码列表\n */\n public List<String> getPagination(Integer pageNow, Object data);\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\t//perform send request to ESearch API everytime we run this servlet\n\t\tsend();\n\t\t//output html on browser\n\t\tresponse.setContentType(\"text/html\");\n PrintWriter pw = response.getWriter();\n try{\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n org.w3c.dom.Document doc = docBuilder.parse(filePath+\"group3_result.xml\");\n //read from xml generated, and display its values in table view\n //table headers\n pw.println(\"<table border=2><tr><th></th><th>DOCNO</th><th>PMID</th><th>Title</th><th>Author</th></tr>\");\n //loop through <literature> tag as created in xml\n for (int i=0; i<doc.getElementsByTagName(\"literature\").getLength(); i++){\n \tint no = i + 1;\n \tNode n = doc.getElementsByTagName(\"literature\").item(i);\n \torg.w3c.dom.Element ele = (org.w3c.dom.Element) n;\n \t//display row number\n \tpw.println(\"<tr><td>\"+no+\"</td>\");\n \t//display docno\n \tpw.println(\"<td width='100'>\"+ele.getElementsByTagName(\"docno\").item(0).getTextContent()+\"</td>\");\n \t//display pmid\n \tif (ele.getElementsByTagName(\"pmid\").item(0).getTextContent().contains(\",\")) {\n\t \tString[] spmid = ele.getElementsByTagName(\"pmid\").item(0).getTextContent().split(\",\");\n\t \t//split pmids by delimiter ,\n\t \tpw.println(\"<td width='100'>\");\n\t \tfor(int j =0; j < spmid.length ; j++) {\n\t \t\tif (j == spmid.length-1) {\n\t \t\t\t//no , if last pmid\n\t \t\t\tpw.println(spmid[j]);\n\t \t\t} else {\n\t \t\t\t//add linebreak for each pmid\n\t \t\t\tpw.println(spmid[j]+\",<br>\");\n\t \t\t}\n\t \t}\n\t \tpw.println(\"</td>\");\n \t} else {\n \t\t//if there is only 1 or not found\n \t\tpw.println(\"<td width='100'>\"+ele.getElementsByTagName(\"pmid\").item(0).getTextContent()+\"</td>\");\n \t}\n \t//display literature title\n \tpw.println(\"<td width='250'>\"+ele.getElementsByTagName(\"title\").item(0).getTextContent()+\"</td>\");\n \t//display author of the literature\n \tpw.println(\"<td width='200'>\"+ele.getElementsByTagName(\"author\").item(0).getTextContent()+\"</td>\"); \n pw.println(\"</tr>\");\n }\n pw.println(\"</table>\");\n }\n catch(Exception e){\n System.out.println(e);\n }\n }",
"java.lang.String getFeed();",
"private void writeHttpServiceResponse(String contentType, HttpServletResponse response, Object result) throws\r\n IOException {\r\n if (contentType.indexOf(CONTENT_TYPE_BSF) > -1) {\r\n OutputStream outputStream = response.getOutputStream();\r\n ObjectOutputStream oos = new ObjectOutputStream(outputStream);\r\n oos.writeObject(new ServiceResponse(result));\r\n oos.close();\r\n } else {\r\n //JSONObject jsonResult = new JSONObject();\r\n \tJsonObject jsonResult = new JsonObject();\r\n if (result instanceof Throwable) {\r\n Throwable ex = (Throwable) result;\r\n jsonResult.addProperty(ERROR, ex.getMessage());\r\n StringWriter sw = new StringWriter();\r\n ex.printStackTrace(new PrintWriter(sw));\r\n jsonResult.addProperty(STACK_TRACE, sw.toString());\r\n } /*else if (result != null && ObjectUtil.isCollection(result)) {\r\n jsonResult.put(VALUE, JSONArray.fromObject(result));\r\n } else if (result instanceof String && JSONUtils.mayBeJSON((String) result)) {\r\n jsonResult.put(VALUE, JSONObject.fromObject((String) result));\r\n } else if (JSONUtils.isNumber(result) || JSONUtils.isBoolean(result) || JSONUtils.isString(result)) {\r\n jsonResult.put(VALUE, result);\r\n }*/ \r\n else {\r\n System.out.println(\">>>result class: \" + result.getClass());\r\n jsonResult.add(VALUE, JSONConverter.toJsonTree(result));\r\n }\r\n response.setCharacterEncoding(RESP_ENCODING);\r\n response.getWriter().write(JSONConverter.gson().toJson(jsonResult));\r\n }\r\n }",
"public interface RSSService {\n\n //if only RSS feeds used the last-modified tag..\n @HEAD\n Call<Void> headFeed(@Url String url);\n\n @GET\n Call<RSSFeed> getFeed(@Url String url);\n}",
"@RequestMapping(value = \"baseType2.do\")\n @ResponseBody\n public String baseType2(Integer age){\n \t\n return \"age:\"+age;\n }",
"@GET\n\t@Path(\"/\") \n\t@Produces(MediaType.TEXT_HTML) \n\tpublic String readItems() \n\t { \n\t return itemObj.readProjects(); \n\t }",
"@ResponseBody\r\n\t@RequestMapping(\"/toutiaoApiDB\")\r\n\tpublic String toutiaoApiDB(ModelMap modelMap, HttpServletRequest request, HttpServletResponse response,\r\n\t\t\t@RequestParam(value = \"keyword\", required = true) String keyword,\r\n\t\t\t@RequestParam(value = \"count\", required = true) Integer count,\r\n\t\t\t@RequestParam(value = \"offset\", required = true) Integer offset) {\n\t\tresponse.setHeader(\"Access-Control-Allow-Origin\",\"*\"); // 允许任意域名发起的跨域请求 \r\n\t\tresponse.setHeader(\"Access-Control-Allow-Headers\",\"X-Requested-With,X_Requested_With\");\r\n\r\n\t\tString errobj = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString url = \"http://www.toutiao.com/search_content/?format=json&keyword=\"+URLEncoder.encode(keyword, \"UTF-8\")+\"&count=\"+count+\"&offset=\"+offset;\r\n\t\t\tSystem.out.println(url);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tMap<String, Integer> brandMap = new HashMap<String, Integer>();\r\n\t\t\tList<Brand> brandList = brandMapper.selectByExample(null);\r\n\t\t\tfor (Brand b : brandList) {\r\n\t\t\t\tbrandMap.put(b.getName().trim(), b.getId());\r\n\t\t\t}\r\n//\t\t\tString result = EHtmlUnit.getAjaxPage(url);//EHttpClientUtil.methodGet(url);\r\n\t\t\tString result = PythonUtil.python(request.getRealPath(\"/getAjaxWeb.py\"), url);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"result=========================\");\r\n\t\t\tSystem.out.println(result);\r\n\t\t\tresult = HtmlRegexpUtil.filterHtml(result);\r\n\t\t\tSystem.out.println(result);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tJSONObject json = JSONObject.fromObject(result);\r\n\t\t\tJSONArray arr = json.getJSONArray(\"data\");\r\n\t\t\tSystem.out.println(keyword+\"==\"+json.getString(\"return_count\"));\r\n\t\t\tfor (Object object : arr) {\r\n\t\t\t\terrobj = object.toString();\r\n\t\t\t\tArticle a = new Article();\r\n\t\t\t\tJSONObject o = (JSONObject)object;\r\n\t\t\t\t\r\n\t\t\t\tif(!o.has(\"id\"))continue;\t\r\n//\t\t\t\tSystem.out.println(o.getString(\"id\"));\r\n\t\t\t\ta.setWid(o.getLong(\"id\"));\r\n\t\t\t\t\r\n\t\t\t\tif(o.has(\"group_id\"))a.setGid(o.getLong(\"group_id\"));\r\n\t\t\t\tif(o.has(\"item_id\"))a.setItemId(o.getLong(\"item_id\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!o.has(\"title\"))continue;\r\n\t\t\t\ta.setTitle(o.getString(\"title\"));\r\n\t\t\t\ta.setSiteId(1L);\r\n\t\t\t\t\r\n\t\t\t\tif(o.has(\"abstract\"))a.setAbstracts(o.getString(\"abstract\"));\r\n\t\t\t\tif(o.has(\"source\"))a.setAuthor(o.getString(\"source\"));\r\n\t\t\t\ta.setReply(o.getInt(\"comments_count\"));\r\n\t\t\t\ta.setPreReply(0);\r\n\t\t \ta.setSeplyStatus(0);\r\n\t\t \ta.setBrandId(brandMap.get(keyword.trim())==null?0:brandMap.get(keyword.trim()));\r\n\t\t \ta.setKeyword(o.getString(\"keywords\"));\r\n\t\t \ta.setPositive(2);\r\n\t\t \ta.setStatus(0);\r\n\t\t \tif(o.has(\"url\"))a.setUrl(o.getString(\"url\"));\r\n\t\t \tif(o.has(\"share_url\"))a.setShareUrl(o.getString(\"share_url\"));\r\n\t\t \tif(o.has(\"datetime\")){\r\n\t\t \t\ta.setReleaseTime(Long.valueOf(DateUtil.dateToStamp(o.getString(\"datetime\")+\":00\") / 1000).intValue());\r\n\t\t \t}else{\r\n\t\t \t\ta.setReleaseTime(0);\r\n\t\t \t}\r\n\t\t \ta.setCreated(Long.valueOf(System.currentTimeMillis() / 1000).intValue());\r\n\t\t \ta.setUpdated(0);\r\n\t\t \ta.setDeleted(0);\r\n\t\t \ta.setIsDanger(0);\r\n\t\t \t\r\n\t\t \t\r\n\t\t \tArticleExample example = new ArticleExample();\r\n\t\t \texample.createCriteria().andWidEqualTo(a.getWid());\r\n\t\t \tlong c = articleMapper.countByExample(example);\r\n\t\t \tif(c == 0){\r\n\t\t \t\tarticleMapper.insert(a);\r\n\t\t \t}else{\r\n\t\t \t\tList<Article> list = articleMapper.selectByExample(example);\r\n\t\t \t\tArticle article = list.get(0);\r\n\t\t \t\tarticle.setPreReply(article.getReply());\r\n\t\t \t\tarticle.setReply(a.getReply());\r\n\t\t \t\tarticleMapper.updateByPrimaryKey(article);\r\n\t\t \t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn \"{\\\"code\\\":1,\\\"message\\\":\\\"成功\\\"}\";\r\n//\t\t\treturn this.writeJsonObject(json);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(errobj);\r\n\t\t}\r\n\t\treturn \"{\\\"code\\\":2,\\\"message\\\":\\\"失败\\\"}\";\r\n\t}",
"@RequestMapping(value=\"/displayitemsbycategory.htm\")\n\t@ResponseBody\n\tpublic String displayItemsByCategory(HttpServletRequest request,HttpServletResponse response) throws Exception{\n\t\tlog.info(\"inside displayItemsByCategory()\");\n\t\tJSONObject obj=new JSONObject();\n\t\tString error=null;\n\t\ttry{\n\t\t\t\n\t\t\tProperties properties = new Properties();\n\t\t\tString propFileName = \"filePath.properties\";\n\t InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n\t properties.load(inputStream);\n\n\t\t\tJSONObject json=JsonParser.getJson(request, response);\n\t\t\tInteger categoryId=json.getInt(\"categoryid\");\n\t\t\tSystem.out.println(categoryId);\n\t\t\tArrayList<ItemsDto> itemsDto=this.itemService.getItemsByCategoryId(categoryId);\n\t\t\tSystem.out.println(itemsDto);\n\t\t\tArrayList<JSONObject> jsonList=new ArrayList<JSONObject>();\n\t\t\t\n\t\t\tfor(ItemsDto item:itemsDto){\n\t\t\t\tJSONObject itemJSON=new JSONObject();\n\t\t\t\titemJSON.accumulate(\"itemname\", item.getItemName());\n\t\t\t\tString photo=item.getPhotos();\n\t\t\t\tSystem.out.println(photo);\n\t\t\t\tString[] photoList=photo.split(\";\");\n\t\t\t\tSystem.out.println(photoList[1]);\n\t\t\t\n\t\t\t\t//System.out.println(firstPhoto);\n\t\t\t\tSystem.out.println(item.getItemId());\n\t\t\t\tInteger itemNo=item.getItemId();\n\t\t\t\tString imageUrl= properties.getProperty(\"itemimagepath\")+itemNo+\"/\"+photoList[1];\n\t\t\t\tSystem.out.println(imageUrl);\n\t\t\t\titemJSON.accumulate(\"image\", imageUrl);\n\t\t\t\titemJSON.accumulate(\"subcategory\", item.getCategoryId().getCategoryName());\n\t\t\t\tHashSet<CategoriesDto> parents=(HashSet<CategoriesDto>) item.getCategoryId().getParentCategories();\n\t\t\t\tSystem.out.println(parents.iterator().next().getCategoryName());\n\t\t\t\titemJSON.accumulate(\"parentcategory\", parents.iterator().next().getCategoryName());\n\t\t\t\tjsonList.add(itemJSON);\n\t\t\t\t\n\t\t\t}\n\t\t\tJSONArray array=new JSONArray(jsonList);\n\t\t\tJSONObject output=new JSONObject();\n\t\t\toutput.accumulate(\"itemslist\", jsonList);\n\t\t\treturn output.toString();\n\t\t\t\n\t\t}\n\t\tcatch(ItemNotFoundException e){\n\t\t\t\n\t\t\tString message=\"Item Not Found\";\n\t\t\tlog.error(message+\"\"+e.toString());\n\t\t\tobj.accumulate(\"status\", message);\n\t\t\treturn obj.toString();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\t\n\t\t\tString message=\"Some Error Occurred While Listing Items\";\n\t\t\tlog.error(message+\"\"+e.toString());\n\t\t\tobj.accumulate(\"status\", message);\n\t\t\treturn obj.toString();\n\t\t}\n\t}",
"public abstract void doTagLogic() throws JspException, IOException;",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString title = req.getParameter(\"title\");\n\t\tString content = req.getParameter(\"content\");\n\t\t//System.out.print(content);\n\t\tresp.setContentType(\"text/html\");\n\t\tresp.setCharacterEncoding(\"utf-8\");\n\t\tnews news1 = new news();\n\t\tnews1.setTitle(title);\n\t\tnews1.setContent(content);\n\t\tnews1.setCount(0);\n\t\tmanage manage1 = new manage();\n\t\tint a =0;\n\t\ttry {\n\t\t\ta = manage1.zeng(news1);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tPrintWriter out = resp.getWriter();\n\t\tif(a==1){\n\t\t\t\n\t\t\tout.print(\"发布成功\");\n\t\t}else {\n\t\t\tout.print(\"发布失败\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public interface Spider {\n /**\n * 获取当前页面的title\n * */\n String getHtmlTitle(Document doc);\n /**\n * 获取当前新闻的title\n * */\n String getTitle(Document doc);\n /**\n * 获取当前新闻的time\n * */\n Date getTime(Document doc);\n\n /**\n * 获取当前新闻的title\n * */\n String getTitle(Element element);\n\n /**\n * 获取当前新闻的content\n * */\n String getContent(Element element);\n /**\n * 获取当前新闻的time\n * */\n Date getTime(Element element);\n /**\n * 获取当前新闻的url\n * */\n String getUrl(Element element);\n\n /**\n * 获取当前新闻的url\n * */\n String getResourceUrl(Element element);\n\n Elements getElements(Document doc,String cssQuery);\n\n void getNewsContents(NewsExPage news);\n\n List<NewsExPage> getNews(Document doc);\n\n}"
] | [
"0.5478726",
"0.5261548",
"0.5130325",
"0.49941444",
"0.4956287",
"0.48456585",
"0.4777728",
"0.4751077",
"0.47320995",
"0.47266722",
"0.4716168",
"0.469685",
"0.4658862",
"0.46445504",
"0.4644419",
"0.46291128",
"0.46279836",
"0.46236742",
"0.46142668",
"0.45651603",
"0.4552945",
"0.45379153",
"0.45293537",
"0.45133653",
"0.4495398",
"0.44684857",
"0.44667053",
"0.44573405",
"0.44499126",
"0.44479436",
"0.44478405",
"0.4430081",
"0.44287044",
"0.4417712",
"0.44145337",
"0.44102257",
"0.44098622",
"0.44034302",
"0.43901688",
"0.438854",
"0.43848962",
"0.43790272",
"0.4374244",
"0.43729475",
"0.43665442",
"0.43610442",
"0.43558586",
"0.43413153",
"0.4335538",
"0.43253773",
"0.43234634",
"0.43207362",
"0.43099982",
"0.4309851",
"0.43077245",
"0.43056932",
"0.43048653",
"0.4304758",
"0.4304338",
"0.4303918",
"0.43036693",
"0.42999226",
"0.42983654",
"0.42963496",
"0.42905986",
"0.42886695",
"0.4287762",
"0.42863035",
"0.4285659",
"0.4282151",
"0.4281988",
"0.42810595",
"0.42792502",
"0.42787272",
"0.4276281",
"0.42735386",
"0.42734036",
"0.42717507",
"0.42708966",
"0.42644772",
"0.42633858",
"0.42600235",
"0.42594934",
"0.4259388",
"0.4259388",
"0.4259388",
"0.42587695",
"0.4257083",
"0.42528194",
"0.4250142",
"0.42488283",
"0.42455268",
"0.42435026",
"0.4242415",
"0.42383105",
"0.42374605",
"0.4237432",
"0.4236227",
"0.42333588",
"0.42333168"
] | 0.5086455 | 3 |
Used to determine ambient occlusion and culling when rebuilding chunks for render | @Override
public boolean isOpaqueCube(BlockState state) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void renderOccluder(boolean renderWithLight);",
"public boolean shouldCombineTextures() {\n/* 210 */ return false;\n/* */ }",
"private void initRendering() {\n\t\tmActivity.showDebugMsg(\" initRendering\");\n\t\tGLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f : 1.0f);\n\n\t\tfor (Texture t : mTextures) {\n\t\t\tGLES20.glGenTextures(1, t.mTextureID, 0);\n\t\t\tGLES20.glBindTexture(GLES20.GL_TEXTURE_2D, t.mTextureID[0]);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, t.mWidth, t.mHeight, 0, GLES20.GL_RGBA,\n\t\t\t\t\tGLES20.GL_UNSIGNED_BYTE, t.mData);\n\t\t}\n\n\t\tshaderProgramID = ArUtils.createProgramFromShaderSrc(\n\t\t\t\tShaders.CUBE_MESH_VERTEX_SHADER,\n\t\t\t\tShaders.CUBE_MESH_FRAGMENT_SHADER);\n\n\t\tvertexHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexPosition\");\n\t\ttextureCoordHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexTexCoord\");\n\t\tmvpMatrixHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"modelViewProjectionMatrix\");\n\t\ttexSampler2DHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"texSampler2D\");\n\n\t\tif (!mModelIsLoaded) {\n\t\t\t//object = new Teapot();\n\t\t\tobject = mActivity.get3DObject();\n\t\t\tobjectScaleFloat *= object.getDefScale();\n\t\t\t//minObjectScale *= object.getDefScale();\n\t\t\t//maxObjectScale *= object.getDefScale();\n\n\t\t\tmActivity.showDebugMsg(\"Loading model Teapot\");\n\t\t\t// Hide the Loading Dialog\n\t\t\t//mActivity.loadingDialogHandler.sendEmptyMessage(LoadingDialogHandler.HIDE_DIALOG);\n\t\t}\n\n\t}",
"public boolean smooth(EnumSkyBlock mode) {\r\n \t\t\tint x, y, z, typeid, light, factor;\r\n \t\t\tint loops = 0;\r\n \t\t\tboolean haserror = true;\r\n \t\t\tboolean haderror = false;\r\n \t\t\tint lasterrx, lasterry, lasterrz;\r\n \t\t\tlasterrx = lasterry = lasterrz = 0;\r\n \t\t\twhile (haserror) {\r\n \t\t\t\tif (loops > 100) {\r\n \t\t\t\t\tlasterrx += this.chunk.x << 4;\r\n \t\t\t\t\tlasterrz += this.chunk.z << 4;\r\n \t\t\t\t\tStringBuilder msg = new StringBuilder();\r\n \t\t\t\t\tmsg.append(\"Failed to fix all \" + mode.toString().toLowerCase() + \" lighting at [\");\r\n \t\t\t\t\tmsg.append(lasterrx).append('/').append(lasterry);\r\n \t\t\t\t\tmsg.append('/').append(lasterrz).append(']');\r\n \t\t\t\t\tNoLaggLighting.plugin.log(Level.WARNING, msg.toString());\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\thaserror = false;\r\n \t\t\t\tloops++;\r\n \t\t\t\tint inity;\r\n \t\t\t\tfor (x = 0; x < 16; x++) {\r\n \t\t\t\t\tfor (z = 0; z < 16; z++) {\r\n \t\t\t\t\t\tif (mode == EnumSkyBlock.SKY) {\r\n \t\t\t\t\t\t\tinity = this.chunk.b(x, z);\r\n \t\t\t\t\t\t\tif (inity >= this.world.getHeight()) {\r\n \t\t\t\t\t\t\t\tinity = this.world.getHeight() - 1;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tinity = this.world.getHeight() - 1;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tfor (y = inity; y > 0; --y) {\r\n \t\t\t\t\t\t\tif (this.chunk.i()[y >> 4] == null) {\r\n \t\t\t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\ttypeid = this.chunk.getTypeId(x, y, z);\r\n \t\t\t\t\t\t\tif (!Block.n[typeid]) {\r\n \t\t\t\t\t\t\t\tfactor = Math.max(1, Block.lightBlock[typeid]);\r\n \t\t\t\t\t\t\t\tlight = this.chunk.getBrightness(mode, x, y, z);\r\n \t\t\t\t\t\t\t\t// actual editing here\r\n \t\t\t\t\t\t\t\tint newlight = light + factor;\r\n \t\t\t\t\t\t\t\t// obtain lighting from all sides\r\n \t\t\t\t\t\t\t\tnewlight = Math.max(newlight, getLightLevel(mode, x - 1, y, z));\r\n \t\t\t\t\t\t\t\tnewlight = Math.max(newlight, getLightLevel(mode, x + 1, y, z));\r\n \t\t\t\t\t\t\t\tnewlight = Math.max(newlight, getLightLevel(mode, x, y, z - 1));\r\n \t\t\t\t\t\t\t\tnewlight = Math.max(newlight, getLightLevel(mode, x, y, z + 1));\r\n \t\t\t\t\t\t\t\tnewlight = Math.max(newlight, getLightLevel(mode, x, y - 1, z));\r\n \t\t\t\t\t\t\t\tnewlight = Math.max(newlight, getLightLevel(mode, x, y + 1, z));\r\n \t\t\t\t\t\t\t\tnewlight -= factor;\r\n \t\t\t\t\t\t\t\t// pick the highest value\r\n \t\t\t\t\t\t\t\tif (newlight > light) {\r\n \t\t\t\t\t\t\t\t\tChunkSection chunksection = this.chunk.i()[y >> 4];\r\n \t\t\t\t\t\t\t\t\tif (chunksection != null) {\r\n \t\t\t\t\t\t\t\t\t\tif (mode == EnumSkyBlock.SKY) {\r\n \t\t\t\t\t\t\t\t\t\t\tchunksection.c(x, y & 0xf, z, newlight);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tchunksection.d(x, y & 0xf, z, newlight);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t\tlasterrx = x;\r\n \t\t\t\t\t\t\t\t\t\tlasterry = y;\r\n \t\t\t\t\t\t\t\t\t\tlasterrz = z;\r\n \t\t\t\t\t\t\t\t\t\thaserror = true;\r\n \t\t\t\t\t\t\t\t\t\thaderror = true;\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn haderror;\r\n \t\t}",
"public boolean usesNormals() {\r\n return false;\r\n }",
"private Color calcGlobalEffects(GeoPoint geopoint, Ray ray, int level, double k) {\r\n\t\tif (level == 1 || k < MIN_CALC_COLOR_K) {\r\n\t\t\treturn Color.BLACK;\r\n\t\t}\r\n\t\tColor color = Color.BLACK;\r\n\t\tVector n = geopoint.geometry.get_Normal(geopoint.point);\r\n\t\tMaterial material = geopoint.geometry.getMaterial();\r\n\t\t// calculate reflectedd äùú÷ôåú\r\n\t\tdouble kr = material.kR;\r\n\t\tdouble kkr = k * kr;\r\n\t\tif (kkr > MIN_CALC_COLOR_K) {\r\n\t\t\ttry {\r\n\t\t\t\tif(AdaptiveDiffusedAndGlossyFlag)//if adaptive Diffused And Glossy is on\r\n\t {\r\n\t // calc the reflected vector\r\n\t double nv1 = ray.getDir().dotProduct(n);\r\n\t Vector v1 = ray.getDir();\r\n\t Vector ref = v1.add(n.scale(-2*nv1));\r\n\t //calc the color\r\n\t color = color.add(AdaptiveDiffusedAndGlossy(n,geopoint.point,ref,-1, material.get_DiffusedAndGlossy(),level,kkr,kr).scale(kr));\r\n\t }\r\n\t else\r\n\t {\r\n\t List<Ray> reflectedRays = constructReflectedRays(n, geopoint.point,ray, material.get_DiffusedAndGlossy());\r\n\t primitives.Color tempColor1 = primitives.Color.BLACK;\r\n\t //calculate for each ray\r\n\t for(Ray reflectedRay: reflectedRays)\r\n\t {\r\n\t GeoPoint gp = findClosestIntersection(reflectedRay);\r\n\t tempColor1 = tempColor1.add(gp == null ? primitives.Color.BLACK : calcColor(gp, reflectedRay, level - 1, kkr).scale(kr));\r\n\t }\r\n\t color = color.add(tempColor1.reduce(reflectedRays.size()));\r\n\t }\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\treturn geopoint.geometry.getEmmission();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t// calculate refracted ù÷éôåú\r\n\t\tdouble kt = material.kT;\r\n\t\tdouble kkt = k * kt;\r\n\t\tif (kkt > MIN_CALC_COLOR_K) {\r\n\t\t\ttry {\r\n\t\t\t\tif(AdaptiveDiffusedAndGlossyFlag)//if adaptive Diffused And Glossy is on\r\n\t\t\t\t{\r\n\t\t\t\t\tcolor = color.add(AdaptiveDiffusedAndGlossy(n,geopoint.point,ray.getDir(),1, material.get_DiffusedAndGlossy(),level,kkt,kt).scale(kt));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tList<Ray> refractedRays = constructRefractedRays(n, geopoint.point,ray, material.get_DiffusedAndGlossy());\r\n\t\t\t\t\tprimitives.Color tempColor2 = primitives.Color.BLACK;\r\n\t\t\t\t\t//calculate for each ray\r\n\t\t\t\t\tfor(Ray refractedRay: refractedRays)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tGeoPoint gp = findClosestIntersection(refractedRay);\r\n\t\t\t\t\t\ttempColor2 = tempColor2.add(gp == null? primitives.Color.BLACK : calcColor(gp, refractedRay, level -1, kkt).scale(kt));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcolor = color.add(tempColor2.reduce(refractedRays.size()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{return geopoint.geometry.getEmmission();}\r\n\t\r\n\t\t}\r\n\t\treturn color;\r\n\t}",
"public boolean getAmbient()\r\n/* 85: */ {\r\n/* 86: 87 */ return this.ambient;\r\n/* 87: */ }",
"public void setup(){\n\t\t gl.glEnable(GL.GL_BLEND);\n\t\t gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);\n\t\t for (int i = 0; i< cubes.length; i++){\n\t\t cubes[i] = this.s.new Cube(\n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\t5,//Math.round(random(-100, 100)),\n\t\t \t\tMath.round(p.random(-10, 10)), \n\t\t \t\t\tMath.round(p.random(-10, 10)), \n\t\t\t\t\tMath.round( p.random(-10, 10))\n\t\t );\n\t\t cubRotation[i]=new Vector3D();\n\t\t cubRotationFactor[i]=new Vector3D();\n\t\t cubRotationFactor[i].x = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].y = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].z = (float)Math.random()/2f;\n\t\t \n\t\t cubColor[i]=new Vector3D();\n\t\t cubColor[i].x = (float)Math.random();\n\t\t cubColor[i].y = (float)Math.random();\n\t\t cubColor[i].z = (float)Math.random();\n\t\t }\n\t\t \n\t\t try {\n\t\t\togl.makeProgram(\n\t\t\t\t\t\t\"glass\",\n\t\t\t\t\t\tnew String[] {},\n\t\t\t\t\t\tnew String[] {\"SpecularColor1\",\"SpecularColor2\",\"SpecularFactor1\",\"SpecularFactor2\",\"LightPosition\"}, //\"GlassColor\",\n\t\t\t\t\t\togl.loadGLSLShaderVObject(\t\"resources/robmunro/perform/ol5/glass_c.vert\" ), \n\t\t\t\t\t\togl.loadGLSLShaderFObject(\t\"resources/robmunro/perform/ol5/glass_c.frag\"\t)\n\t\t\t\t);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}",
"public boolean hasCrappyOpengl();",
"private Color calcLocalEffects(GeoPoint intersection, Ray ray,double k) \r\n\t{\r\n\t\tVector v = ray.getDir();// ray direction\r\n\t\tVector n = intersection.geometry.get_Normal(intersection.point);\r\n\t\tdouble nv = Util.alignZero(n.dotProduct(v));\r\n\t\tif (Util.isZero(nv))// there is no diffusive and Specular\r\n\t\t\treturn Color.BLACK;\r\n\t\tint nShininess = intersection.geometry.getMaterial().nShininess;\r\n\t\tdouble kd = intersection.geometry.getMaterial().kD;\r\n\t\tdouble ks = intersection.geometry.getMaterial().kS;\r\n\t\tColor color = Color.BLACK;\r\n\t\tfor (LightSource lightSource : scene.lights) {\r\n\t\t\tVector l = lightSource.getL(intersection.point);\r\n\t\t\tdouble nl = Util.alignZero(n.dotProduct(l));\r\n\t\t\tif (nl * nv > 0) { // sign(nl) == sing(nv)\r\n\t\t\t\tdouble ktr = transparency( l, n, intersection,lightSource);\r\n\t\t\t\tif (ktr * k > MIN_CALC_COLOR_K) {\r\n\t\t\t\t\tColor lightIntensity = lightSource.getIntensity(intersection.point).scale(ktr);\r\n\t\t\t\t\tcolor = color.add(calcDiffusive(kd, nl, lightIntensity),\r\n\t\t\t\t\t\t\tcalcSpecular(ks, l, n, nl, v, nShininess, lightIntensity));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn color;\r\n\t}",
"public void previewOglRender();",
"String getUseCollisionAvoidance();",
"public void updateFilter() {\n Texture2dProgram.ProgramType programType;\n float[] kernel = null;\n float colorAdj = 0.0f;\n\n Log.d(TAG, \"Updating filter to \" + mNewFilter);\n switch (mNewFilter) {\n case CameraActivity.FILTER_NONE:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT;\n break;\n case CameraActivity.FILTER_BLACK_WHITE:\n // (In a previous version the TEXTURE_EXT_BW variant was enabled by a flag called\n // ROSE_COLORED_GLASSES, because the shader set the red channel to the B&W color\n // and green/blue to zero.)\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_BW;\n break;\n case CameraActivity.FILTER_BLUR:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;\n kernel = new float[] {\n 1f/16f, 2f/16f, 1f/16f,\n 2f/16f, 4f/16f, 2f/16f,\n 1f/16f, 2f/16f, 1f/16f };\n break;\n case CameraActivity.FILTER_SHARPEN:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;\n kernel = new float[] {\n 0f, -1f, 0f,\n -1f, 5f, -1f,\n 0f, -1f, 0f };\n break;\n case CameraActivity.FILTER_EDGE_DETECT:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;\n kernel = new float[] {\n -1f, -1f, -1f,\n -1f, 8f, -1f,\n -1f, -1f, -1f };\n break;\n case CameraActivity.FILTER_EMBOSS:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;\n kernel = new float[] {\n 2f, 0f, 0f,\n 0f, -1f, 0f,\n 0f, 0f, -1f };\n colorAdj = 0.5f;\n break;\n default:\n throw new RuntimeException(\"Unknown filter mode \" + mNewFilter);\n }\n\n // Do we need a whole new program? (We want to avoid doing this if we don't have\n // too -- compiling a program could be expensive.)\n if (programType != mFullScreen.getProgram().getProgramType()) {\n mFullScreen.changeProgram(new Texture2dProgram(programType));\n // If we created a new program, we need to initialize the texture width/height.\n mIncomingSizeUpdated = true;\n }\n\n // Update the filter kernel (if any).\n if (kernel != null) {\n mFullScreen.getProgram().setKernel(kernel, colorAdj);\n }\n\n mCurrentFilter = mNewFilter;\n }",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n // Do backface culling\n GLES20.glEnable(GLES20.GL_CULL_FACE);\n GLES20.glFrontFace(GLES20.GL_CCW);\n // Why using GL_BACK won't work is a mystery\n GLES20.glCullFace(GLES20.GL_BACK);\n // Enable depth buffer\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n GLES20.glDepthFunc(GLES20.GL_LEQUAL);\n GLES20.glDepthMask(true);\n \n for (int i = 0; i < NUM_CARS; i++) {\n mCarBody[i] = new CarBody((float) Math.random(),\n (float) Math.random(),\n (float) Math.random());\n mCarWheels[i] = new CarWheels();\n }\n \n // Create transformation matrices for each car\n for (int i = 0; i < NUM_CARS; i++) {\n mCarXOffsets[i] = (i % NUM_LANES) * 1.1f;\n mCarZOffsets[i] = ((i / NUM_LANES) * -2) + ((i % NUM_LANES) * 1.3f);\n }\n \n road = new Square(0.6f, 0.6f, 0.6f);\n land = new Square(0.1f, 0.6f, 0.1f);\n sky = new Square(0.6f, 0.6f, 0.9f);\n background = new Sprite(mActivityContext);\n \n }",
"public void renderFlanges(int cons, int tex)\r\n/* 108: */ {\r\n/* 109:106 */ this.context.setTex(tex);\r\n/* 110:108 */ if ((cons & 0x1) > 0)\r\n/* 111: */ {\r\n/* 112:109 */ this.context.setTexFlags(0);\r\n/* 113:110 */ this.context.renderBox(63, 0.25D, 0.0D, 0.25D, 0.75D, 0.125D, 0.75D);\r\n/* 114: */ }\r\n/* 115:112 */ if ((cons & 0x2) > 0)\r\n/* 116: */ {\r\n/* 117:113 */ this.context.setTexFlags(112320);\r\n/* 118:114 */ this.context.renderBox(63, 0.25D, 0.875D, 0.25D, 0.75D, 1.0D, 0.75D);\r\n/* 119: */ }\r\n/* 120:116 */ if ((cons & 0x4) > 0)\r\n/* 121: */ {\r\n/* 122:117 */ this.context.setTexFlags(217134);\r\n/* 123:118 */ this.context.renderBox(63, 0.25D, 0.25D, 0.0D, 0.75D, 0.75D, 0.125D);\r\n/* 124: */ }\r\n/* 125:120 */ if ((cons & 0x8) > 0)\r\n/* 126: */ {\r\n/* 127:121 */ this.context.setTexFlags(188469);\r\n/* 128:122 */ this.context.renderBox(63, 0.25D, 0.25D, 0.875D, 0.75D, 0.75D, 1.0D);\r\n/* 129: */ }\r\n/* 130:124 */ if ((cons & 0x10) > 0)\r\n/* 131: */ {\r\n/* 132:125 */ this.context.setTexFlags(2944);\r\n/* 133:126 */ this.context.renderBox(63, 0.0D, 0.25D, 0.25D, 0.125D, 0.75D, 0.75D);\r\n/* 134: */ }\r\n/* 135:128 */ if ((cons & 0x20) > 0)\r\n/* 136: */ {\r\n/* 137:129 */ this.context.setTexFlags(3419);\r\n/* 138:130 */ this.context.renderBox(63, 0.875D, 0.25D, 0.25D, 1.0D, 0.75D, 0.75D);\r\n/* 139: */ }\r\n/* 140: */ }",
"public boolean isOpaqueCube()\r\n/* 26: */ {\r\n/* 27:41 */ return false;\r\n/* 28: */ }",
"public boolean isOpaqueCube(){\r\n return false;\r\n }",
"public void init(SoState state)\n\n{\n // Set to GL defaults:\n// ivState.ambientColor.copyFrom( getDefaultAmbient());\n// ivState.emissiveColor.copyFrom( getDefaultEmissive());\n// ivState.specularColor.copyFrom( getDefaultSpecular());\n// ivState.shininess = getDefaultShininess();\n// ivState.colorMaterial = false;\n// ivState.blending = false;\n// ivState.lightModel = LightModel.PHONG.getValue();\n \n // Initialize default color storage if not already done\n if (defaultDiffuseColor == null) {\n defaultDiffuseColor = SbColorArray.allocate(1);\n defaultDiffuseColor.get(0).setValue(getDefaultDiffuse());\n defaultTransparency = new float[1];\n defaultTransparency[0] = getDefaultTransparency();\n defaultColorIndices = new int[1];\n defaultColorIndices[0] = getDefaultColorIndex();\n defaultPackedColor = new int[1];\n defaultPackedColor[0] = getDefaultPacked();\n }\n \n //following value will be matched with the default color, must\n //differ from 1 (invalid) and any legitimate nodeid. \n// ivState.diffuseNodeId = 0;\n// ivState.transpNodeId = 0;\n// //zero corresponds to transparency off (default).\n// ivState.stippleNum = 0;\n// ivState.diffuseColors = defaultDiffuseColor;\n// ivState.transparencies = defaultTransparency;\n// ivState.colorIndices = defaultColorIndices;\n// ivState.packedColors = defaultPackedColor;\n//\n// ivState.numDiffuseColors = 1;\n// ivState.numTransparencies = 1;\n// ivState.packed = false;\n// ivState.packedTransparent = false;\n// ivState.transpType = SoGLRenderAction.TransparencyType.SCREEN_DOOR.ordinal(); \n// ivState.cacheLevelSetBits = 0;\n// ivState.cacheLevelSendBits = 0;\n// ivState.overrideBlending = false;\n// \n// ivState.useVertexAttributes = false;\n//\n// ivState.drawArraysCallback = null;\n// ivState.drawElementsCallback = null; \n// ivState.drawArraysCallbackUserData = null;\n// ivState.drawElementsCallbackUserData = null; \n\n coinstate.ambient.copyFrom(getDefaultAmbient());\n coinstate.specular.copyFrom(getDefaultSpecular());\n coinstate.emissive.copyFrom(getDefaultEmissive());\n coinstate.shininess = getDefaultShininess();\n coinstate.blending = /*false*/0;\n coinstate.blend_sfactor = 0;\n coinstate.blend_dfactor = 0;\n coinstate.alpha_blend_sfactor = 0;\n coinstate.alpha_blend_dfactor = 0;\n coinstate.lightmodel = LightModel.PHONG.getValue();\n coinstate.packeddiffuse = false;\n coinstate.numdiffuse = 1;\n coinstate.numtransp = 1;\n coinstate.diffusearray = SbColorArray.copyOf(lazy_defaultdiffuse);\n coinstate.packedarray = IntArrayPtr.copyOf(lazy_defaultpacked);\n coinstate.transparray = FloatArray.copyOf(lazy_defaulttransp);\n coinstate.colorindexarray = IntArrayPtr.copyOf(lazy_defaultindex);\n coinstate.istransparent = false;\n coinstate.transptype = (int)(SoGLRenderAction.TransparencyType.BLEND.getValue());\n coinstate.diffusenodeid = 0;\n coinstate.transpnodeid = 0;\n coinstate.stipplenum = 0;\n coinstate.vertexordering = VertexOrdering.CCW.getValue();\n coinstate.twoside = false ? 1 : 0;\n coinstate.culling = false ? 1 : 0;\n coinstate.flatshading = false ? 1 : 0;\n coinstate.alphatestfunc = 0;\n coinstate.alphatestvalue = 0.5f;\n}",
"public void onSurfaceCreated(GL2 gl) {\r\n gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);\r\n gl.glLoadIdentity();\r\n\r\n // Perspective\r\n final int width = SCREEN_WIDTH;\r\n final int height = SCREEN_HEIGHT;\r\n aspectRatio = (float) width / (float) height;\r\n glu.gluPerspective(camera.getOpeningAngle(), aspectRatio, nearClippingPlane, farClippingPlane);\r\n\r\n // Viewport\r\n gl.glViewport(0, 0, width, height);\r\n gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);\r\n\r\n // Depth\r\n gl.glEnable(GL2.GL_DEPTH_TEST);\r\n\r\n // which is the front? the one which is drawn counter clockwise\r\n gl.glFrontFace(GL2.GL_CCW);\r\n // which one should NOT be drawn\r\n gl.glCullFace(GL2.GL_BACK);\r\n\r\n // define the color we want to be displayed as the \"clipping wall\"\r\n gl.glClearColor((float) (CLEAR_COLOR.get(0)), (float) (CLEAR_COLOR.get(1)), (float) (CLEAR_COLOR.get(2)), OPAQUE);\r\n\r\n // Flat shading\r\n gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_FILL);\r\n\r\n // Set a light, just use the first one from the root node.\r\n if (renderFrame != null && renderFrame.getRoot().getNumberOfLightSources() > 0) {\r\n LightSource lightSource = renderFrame.getRoot().getLightSource(0);\r\n float lightAmbient[] = { 1, 1, 1, 1 };\r\n float lightSpecular[] = { 1, 1, 1, 1 };\r\n float lightPosition[] = lightSource.getPosition().floatData();\r\n float lightDiffuse[] = lightSource.getColor().floatData();\r\n gl.glEnable(GL2.GL_LIGHT0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_AMBIENT, lightAmbient, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_SPECULAR, lightSpecular, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, lightDiffuse, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, lightPosition, 0);\r\n }\r\n\r\n updateView(gl);\r\n }",
"public void updateRendering(Container[][][] buffer) {\n int neighbours = getNeighbours(buffer);\n if (neighbours == 6 || (neighbours == 5 && indexPosition.y == 0)) {\n this.setCullHint(Spatial.CullHint.Always);\n } else {\n this.setCullHint(Spatial.CullHint.Dynamic);\n //System.out.println(\"Cull at \" + this.indexPosition.toString()); //debug\n }\n }",
"@Override\r\n\tpublic boolean isOpaqueCube ( )\r\n\t{\n\t\treturn ( Configuration.Cosmetic.renderFallback ) ;\r\n\t}",
"public void renderImage() {\n Camera camera = scene.getCamera();//fot the function thats in the camera.constr.. to build the rays.\n Intersectable geometries = scene.getGeometries();//list of geomertries for the functon in geometries.findinter..\n java.awt.Color background = scene.getBackground().getColor();\n double distance = scene.getDistance();\n\n\n int width = (int) imageWriter.getWidth(); //width of the view plane\n int height = (int) imageWriter.getHeight();//height of the view plane\n int Nx = imageWriter.getNx(); // number of squares in the Row (shura). we need it for the for\n int Ny = imageWriter.getNy(); //number of squares in the column.(amuda). we need it for the for\n\n /**for each pixel we will send ray, and with the function findIntersection\n * we will get the Geo points(point 3d, color).\n * if we got nothing so we will color with the back round color\n * if we got the GeoPoints We will send to the function getClosestPoint and color*/\n Color pixelColor;\n for (int row = 0; row < Ny; ++row) {\n for (int column = 0; column < Nx; ++column) {\n if (amountRays > 1) { //if there is superSampling\n List<Ray> rays = camera.constructNRaysThroughPixel(Nx, Ny, column, row, distance, width, height,superSamplingRate, amountRays);\n Color averageColor;\n pixelColor = scene.getBackground();\n for (Ray ray : rays) {//for each ray from the list give the list of intersection geo-points.\n List<GeoPoint> intersectionPoints = geometries.findGeoIntersections(ray);\n averageColor = scene.getBackground();\n if (intersectionPoints != null) {\n GeoPoint closestPoint = getClosestPoint(intersectionPoints);//get the closest point for each ray.\n averageColor = calcColor(closestPoint, ray);//calculate the color and put in averageColor\n }\n pixelColor = pixelColor.add(averageColor);//befor we go to the next ray we add the averageColor to pixelColor.\n }\n pixelColor = pixelColor.reduce(rays.size());//we are doing the (memuza) and that is the color of that pixel.\n }\n else {//if there is no supersampling\n Ray ray = camera.constructRayThroughPixel(Nx, Ny, column, row, distance, width, height);\n List<GeoPoint> intersectionPoints = geometries.findGeoIntersections(ray);\n pixelColor = scene.getBackground();\n if (intersectionPoints != null) {\n GeoPoint closestPoint = getClosestPoint(intersectionPoints);\n pixelColor = calcColor(closestPoint, ray);\n }\n }\n imageWriter.writePixel(column, row, pixelColor.getColor());\n }\n }\n }",
"private void initRendering() {\n ring = new Ring(0.3f, 0.7f);\n line = new Line(ImageTargets.screenWidth / 2, ImageTargets.screenHeight / 2);\n state_txt = createObject(68f, state_txt_cx, state_txt_cy, R.drawable.state);\n state_img = createObject(120f, state_img_cx, state_img_cy, R.drawable.open);\n record_txt = createObject(68f, record_txt_cx, record_txt_cy, R.drawable.record_txt);\n record_img = createObject(95f, record_img_cx, record_img_cy, R.drawable.record_img);\n recog_txt = createObject(68f, recog_txt_cx, recog_txt_cy, R.drawable.recog_txt);\n recog_img = createObject(155, recog_img_cx, recog_img_cy, R.drawable.person);\n record_num = createObject(85, record_num_cx, record_num_cy, R.drawable.num);\n\n histogram = createHistogram(85, 275.0f, 1150, 2.0f);\n histogram1 = createHistogram(85, 405, 1150, 2.2f);\n histogram2 = createHistogram(85, 540, 1150, 2.58f);\n histogram3 = createHistogram(85, 675, 1150, 0.9f);\n mRenderer = Renderer.getInstance();\n\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f\n : 1.0f);\n setBgTransparent();\n //初始化纹理\n initTexture(res);\n mActivity.loadingDialogHandler\n .sendEmptyMessage(LoadingDialogHandler.HIDE_LOADING_DIALOG);\n\n }",
"public boolean isOpaqueCube()\n {\n return false;\n }",
"public boolean isOpaqueCube()\n {\n return false;\n }",
"public boolean isOpaqueCube()\r\n {\r\n return false;\r\n }",
"public static boolean renderCustomEffect(RenderItem renderItem, ItemStack itemStack, IBakedModel model) {\n/* 765 */ if (enchantmentProperties == null)\n/* */ {\n/* 767 */ return false;\n/* */ }\n/* 769 */ if (itemStack == null)\n/* */ {\n/* 771 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 775 */ int[][] idLevels = getEnchantmentIdLevels(itemStack);\n/* */ \n/* 777 */ if (idLevels.length <= 0)\n/* */ {\n/* 779 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 783 */ HashSet<Integer> layersRendered = null;\n/* 784 */ boolean rendered = false;\n/* 785 */ TextureManager textureManager = Config.getTextureManager();\n/* */ \n/* 787 */ for (int i = 0; i < idLevels.length; i++) {\n/* */ \n/* 789 */ int id = idLevels[i][0];\n/* */ \n/* 791 */ if (id >= 0 && id < enchantmentProperties.length) {\n/* */ \n/* 793 */ CustomItemProperties[] cips = enchantmentProperties[id];\n/* */ \n/* 795 */ if (cips != null)\n/* */ {\n/* 797 */ for (int p = 0; p < cips.length; p++) {\n/* */ \n/* 799 */ CustomItemProperties cip = cips[p];\n/* */ \n/* 801 */ if (layersRendered == null)\n/* */ {\n/* 803 */ layersRendered = new HashSet();\n/* */ }\n/* */ \n/* 806 */ if (layersRendered.add(Integer.valueOf(id)) && matchesProperties(cip, itemStack, idLevels) && cip.textureLocation != null) {\n/* */ \n/* 808 */ textureManager.bindTexture(cip.textureLocation);\n/* 809 */ float width = cip.getTextureWidth(textureManager);\n/* */ \n/* 811 */ if (!rendered) {\n/* */ \n/* 813 */ rendered = true;\n/* 814 */ GlStateManager.depthMask(false);\n/* 815 */ GlStateManager.depthFunc(514);\n/* 816 */ GlStateManager.disableLighting();\n/* 817 */ GlStateManager.matrixMode(5890);\n/* */ } \n/* */ \n/* 820 */ Blender.setupBlend(cip.blend, 1.0F);\n/* 821 */ GlStateManager.pushMatrix();\n/* 822 */ GlStateManager.scale(width / 2.0F, width / 2.0F, width / 2.0F);\n/* 823 */ float offset = cip.speed * (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F;\n/* 824 */ GlStateManager.translate(offset, 0.0F, 0.0F);\n/* 825 */ GlStateManager.rotate(cip.rotation, 0.0F, 0.0F, 1.0F);\n/* 826 */ renderItem.func_175035_a(model, -1);\n/* 827 */ GlStateManager.popMatrix();\n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 834 */ if (rendered) {\n/* */ \n/* 836 */ GlStateManager.enableAlpha();\n/* 837 */ GlStateManager.enableBlend();\n/* 838 */ GlStateManager.blendFunc(770, 771);\n/* 839 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 840 */ GlStateManager.matrixMode(5888);\n/* 841 */ GlStateManager.enableLighting();\n/* 842 */ GlStateManager.depthFunc(515);\n/* 843 */ GlStateManager.depthMask(true);\n/* 844 */ textureManager.bindTexture(TextureMap.locationBlocksTexture);\n/* */ } \n/* */ \n/* 847 */ return rendered;\n/* */ }",
"public static boolean renderCustomArmorEffect(EntityLivingBase entity, ItemStack itemStack, ModelBase model, float limbSwing, float prevLimbSwing, float partialTicks, float timeLimbSwing, float yaw, float pitch, float scale) {\n/* 854 */ if (enchantmentProperties == null)\n/* */ {\n/* 856 */ return false;\n/* */ }\n/* 858 */ if (Config.isShaders() && Shaders.isShadowPass)\n/* */ {\n/* 860 */ return false;\n/* */ }\n/* 862 */ if (itemStack == null)\n/* */ {\n/* 864 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 868 */ int[][] idLevels = getEnchantmentIdLevels(itemStack);\n/* */ \n/* 870 */ if (idLevels.length <= 0)\n/* */ {\n/* 872 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 876 */ HashSet<Integer> layersRendered = null;\n/* 877 */ boolean rendered = false;\n/* 878 */ TextureManager textureManager = Config.getTextureManager();\n/* */ \n/* 880 */ for (int i = 0; i < idLevels.length; i++) {\n/* */ \n/* 882 */ int id = idLevels[i][0];\n/* */ \n/* 884 */ if (id >= 0 && id < enchantmentProperties.length) {\n/* */ \n/* 886 */ CustomItemProperties[] cips = enchantmentProperties[id];\n/* */ \n/* 888 */ if (cips != null)\n/* */ {\n/* 890 */ for (int p = 0; p < cips.length; p++) {\n/* */ \n/* 892 */ CustomItemProperties cip = cips[p];\n/* */ \n/* 894 */ if (layersRendered == null)\n/* */ {\n/* 896 */ layersRendered = new HashSet();\n/* */ }\n/* */ \n/* 899 */ if (layersRendered.add(Integer.valueOf(id)) && matchesProperties(cip, itemStack, idLevels) && cip.textureLocation != null) {\n/* */ \n/* 901 */ textureManager.bindTexture(cip.textureLocation);\n/* 902 */ float width = cip.getTextureWidth(textureManager);\n/* */ \n/* 904 */ if (!rendered) {\n/* */ \n/* 906 */ rendered = true;\n/* */ \n/* 908 */ if (Config.isShaders())\n/* */ {\n/* 910 */ ShadersRender.layerArmorBaseDrawEnchantedGlintBegin();\n/* */ }\n/* */ \n/* 913 */ GlStateManager.enableBlend();\n/* 914 */ GlStateManager.depthFunc(514);\n/* 915 */ GlStateManager.depthMask(false);\n/* */ } \n/* */ \n/* 918 */ Blender.setupBlend(cip.blend, 1.0F);\n/* 919 */ GlStateManager.disableLighting();\n/* 920 */ GlStateManager.matrixMode(5890);\n/* 921 */ GlStateManager.loadIdentity();\n/* 922 */ GlStateManager.rotate(cip.rotation, 0.0F, 0.0F, 1.0F);\n/* 923 */ float texScale = width / 8.0F;\n/* 924 */ GlStateManager.scale(texScale, texScale / 2.0F, texScale);\n/* 925 */ float offset = cip.speed * (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F;\n/* 926 */ GlStateManager.translate(0.0F, offset, 0.0F);\n/* 927 */ GlStateManager.matrixMode(5888);\n/* 928 */ model.render((Entity)entity, limbSwing, prevLimbSwing, timeLimbSwing, yaw, pitch, scale);\n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 935 */ if (rendered) {\n/* */ \n/* 937 */ GlStateManager.enableAlpha();\n/* 938 */ GlStateManager.enableBlend();\n/* 939 */ GlStateManager.blendFunc(770, 771);\n/* 940 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 941 */ GlStateManager.matrixMode(5890);\n/* 942 */ GlStateManager.loadIdentity();\n/* 943 */ GlStateManager.matrixMode(5888);\n/* 944 */ GlStateManager.enableLighting();\n/* 945 */ GlStateManager.depthMask(true);\n/* 946 */ GlStateManager.depthFunc(515);\n/* 947 */ GlStateManager.disableBlend();\n/* */ \n/* 949 */ if (Config.isShaders())\n/* */ {\n/* 951 */ ShadersRender.layerArmorBaseDrawEnchantedGlintEnd();\n/* */ }\n/* */ } \n/* */ \n/* 955 */ return rendered;\n/* */ }",
"@Override\n // public Map<Geometry, List<Point3D>> findIntersections(Ray myRay) {\n public List<Point3D> FindIntersections(Ray myRay) {\n\n List<Point3D> geometryListMap = new ArrayList<>();\n List<Point3D> listOfIntersections = new ArrayList<Point3D>();\n\n // the bottom base of the cylinder\n Plane plane1 = new Plane(orientation.getPOO(), orientation.getDirection());\n\n // the top base of the cylinder\n Plane plane2 = new Plane(top, orientation.getDirection());\n\n List<Point3D> temp1 = plane1.FindIntersections(myRay);\n\n List<Point3D> temp2 = plane2.FindIntersections(myRay);\n\n // removing all points that beyond the radius\n if (temp1 != null)\n for (Point3D p1 : temp1) {\n if (new Vector(Point3D.substract(orientation.getPOO(), p1)).length() <= _radius && p1 != null)\n listOfIntersections.add(p1);\n\n }\n\n if (temp2 != null)\n for (Point3D p2 : temp2) {\n if (new Vector(Point3D.substract(orientation.getPOO(), p2)).length() <= _radius && p2 != null)\n listOfIntersections.add(p2);\n\n }\n\n // using the infinity cylinder to find all the intersections in the body of the limited cylinder\n geometryListMap = super.FindIntersections(myRay);\n\n for (Point3D p : geometryListMap) {\n if (isOnCylinder(p))\n listOfIntersections.add(p);\n\n }\n if (listOfIntersections.isEmpty())\n return null;\n //geometryListMap.put(this, listOfIntersections);\n return geometryListMap;\n }",
"public void renderWorldBlock(bbb renderblocks, ym iba, int i, int j, int k, int md)\r\n/* 26: */ {\r\n/* 27: 26 */ int cons = 0;\r\n/* 28: 27 */ TilePipe tt = (TilePipe)CoreLib.getTileEntity(iba, i, j, k, TilePipe.class);\r\n/* 29: 29 */ if (tt == null) {\r\n/* 30: 29 */ return;\r\n/* 31: */ }\r\n/* 32: 31 */ this.context.exactTextureCoordinates = true;\r\n/* 33: 32 */ this.context.setTexFlags(55);\r\n/* 34: 33 */ this.context.setTint(1.0F, 1.0F, 1.0F);\r\n/* 35: 34 */ this.context.setPos(i, j, k);\r\n/* 36: 35 */ if (tt.CoverSides > 0)\r\n/* 37: */ {\r\n/* 38: 36 */ this.context.readGlobalLights(iba, i, j, k);\r\n/* 39: 37 */ renderCovers(tt.CoverSides, tt.Covers);\r\n/* 40: */ }\r\n/* 41: 40 */ cons = PipeLib.getConnections(iba, i, j, k);\r\n/* 42: */ \r\n/* 43: */ \r\n/* 44: */ \r\n/* 45: 44 */ this.context.setBrightness(this.block.e(iba, i, j, k));\r\n/* 46: */ \r\n/* 47: 46 */ this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);\r\n/* 48: 47 */ this.context.setPos(i, j, k);\r\n/* 49: */ \r\n/* 50: 49 */ RenderLib.bindTexture(\"/eloraam/machine/machine1.png\");\r\n/* 51: */ \r\n/* 52: */ \r\n/* 53: */ \r\n/* 54: */ \r\n/* 55: */ \r\n/* 56: */ \r\n/* 57: */ \r\n/* 58: */ \r\n/* 59: */ \r\n/* 60: */ \r\n/* 61: */ \r\n/* 62: */ \r\n/* 63: */ \r\n/* 64: 63 */ renderCenterBlock(cons, 26, 28);\r\n/* 65: */ \r\n/* 66: 65 */ tt.cacheFlange();\r\n/* 67: 66 */ renderFlanges(tt.Flanges, 27);\r\n/* 68: */ \r\n/* 69: 68 */ RenderLib.unbindTexture();\r\n/* 70: */ }",
"public void addConclusions() {\n\t\tif(conclusionNumbers1.size()==0) {\n\t\t\tconclusion1=\"\";\n\t\t}\n\t\telse if(conclusionNumbers1.size()==1) {\n\t\t\tconclusion1 = \"Bacteroides was detected from sample \"+conclusionNumbers1.get(0)+\".\";\n\t\t}\n\t\telse if(conclusionNumbers1.size()==2) {\n\t\t\tconclusion1 = \"Bacteroides was detected from samples \"+conclusionNumbers1.get(0) + \" and \"+ conclusionNumbers1.get(1) + \".\";\n\t\t}\n\t\telse {\n\t\t\tconclusion1 = \"Bacteroides was detected from samples \";\n\t\t\tfor(int i=0;i<conclusionNumbers1.size()-2;i++) {\n\t\t\t\tconclusion1+=conclusionNumbers1.get(i) + \", \";\n\t\t\t}\n\t\t\tconclusion1+= conclusionNumbers1.get(conclusionNumbers1.size()-2) + \" and \"+ conclusionNumbers1.get(conclusionNumbers1.size()-1) + \".\";\n\t\t}\n\t\t\n\t\tif(conclusionNumbers2.size()==0) {\n\t\t\tconclusion2=\"\";\n\t\t}\n\t\telse if(conclusionNumbers2.size()==1) {\n\t\t\tconclusion2 = \"no Bacteroides was detected from sample \"+conclusionNumbers2.get(0)+\".\";\n\t\t}\n\t\telse if(conclusionNumbers2.size()==2) {\n\t\t\tconclusion2 = \"no Bacteroides was detected from samples \"+conclusionNumbers2.get(0) + \" and \"+ conclusionNumbers2.get(1) + \".\";\n\t\t}\n\t\telse {\n\t\t\tconclusion2 = \"no Bacteroides was detected from samples \";\n\t\t\tfor(int i=0;i<conclusionNumbers2.size()-2;i++) {\n\t\t\t\tconclusion2+=conclusionNumbers2.get(i) + \", \";\n\t\t\t}\n\t\t\tconclusion2+= conclusionNumbers2.get(conclusionNumbers2.size()-2) + \" and \"+ conclusionNumbers2.get(conclusionNumbers2.size()-1) + \".\";\n\t\t}\n\t\t\n\t}",
"private final void segmentsFrameEffects() {\n\t\tif (alive) {\n\t\t\tint i;\n\t\t\t// Energy obtained through photosynthesis\n\t\t\tdouble photosynthesis = 0;\n\t\t\t_nChildren = 1;\n\t\t\t_indigo =0;\n\t\t\t_lowmaintenance =0;\n\t\t\tint fertility =0;\n\t\t\tint yellowCounter =0;\n\t\t\tint reproduceearly =0;\n\t\t\tdouble goldenage =0;\n\t\t\t_isfrozen =false;\n\t\t\tboolean trigger =false;\n\t\t\tfor (i=_segments-1; i>=0; i--) {\n\t\t\t\t// Manteniment\n\t\t\t\tswitch (getTypeColor(_segColor[i])) {\n\t\t\t\t// \tMovement\n\t\t\t\tcase CYAN:\n\t\t\t\t\tif (Utils.random.nextInt(100)<8 && useEnergy(Utils.CYAN_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tdx=Utils.between(dx+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\tdy=Utils.between(dy+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase TEAL:\n\t\t\t\t\tif (_geneticCode.getPassive()) {\n\t\t\t\t\t\tif (_hasdodged == false) {\n\t\t\t\t\t\t\t_dodge =true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\t} else \n\t\t\t\t\t if (Utils.random.nextInt(100)<8 && useEnergy(Utils.CYAN_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between(dx+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between(dy+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Photosynthesis\n\t\t\t\tcase SPRING:\n\t\t\t\t\t if (_geneticCode.getClockwise()) {\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+0.1*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t\t photosynthesis += Utils.SPRING_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t} else {\n\t\t\t\t\t dtheta=Utils.between(dtheta-0.1*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t photosynthesis += Utils.SPRING_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIME:\n\t\t\t\t\tif (trigger == false) {\n\t\t\t\t\t\ttrigger =true;\n\t\t\t\t\t if (_world.fastCheckHit(this) != null) {\n\t\t\t\t\t \t_crowded =true;\n\t\t\t\t\t } else {\n\t\t\t\t\t \t_crowded =false;\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\tif (_crowded == true) {\n\t\t\t\t\t photosynthesis += Utils.CROWDEDLIME_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tphotosynthesis += Utils.LIME_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase JADE:\n\t\t\t\t\t_isjade =true;\n\t\t\t\t\tphotosynthesis += Utils.JADE_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase GREEN:\n\t\t\t\t\tphotosynthesis += Utils.GREEN_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase FOREST:\n\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase BARK:\n\t\t\t\t\tphotosynthesis += Utils.BARK_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRASS:\n\t\t\t\t\tphotosynthesis += Utils.GRASS_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase C4:\n\t\t\t\t\t_lowmaintenance += _m[i];\n\t\t\t\t\tphotosynthesis += Utils.C4_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// is a consumer\n\t\t\t\tcase RED:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase FIRE:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ORANGE:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MAROON:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase PINK:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tif (_isakiller < 2) {\n\t\t\t\t\t\t_lowmaintenance += 0.8 * _m[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase CREAM:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with yellow segments have more children\n\t\t\t\tcase YELLOW:\n\t\t\t\t\tyellowCounter++;\n\t\t\t\t\tfertility += _m[i];\n\t\t\t\t break;\n\t\t\t\t// Experienced parents have more children\n\t\t\t\tcase SILVER:\n\t\t\t\t\tif (_isaconsumer == false) {\n\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t\tcase GRAY:\n\t\t\t\t\t\tcase LILAC:\n\t\t\t\t\t\tcase SPIKE:\n\t\t\t\t\t\tcase PLAGUE:\n\t\t\t\t\t\tcase CORAL:\n\t\t\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t}}}\n\t\t\t\t\t if (_nTotalChildren >= 1 && _nTotalChildren < 5) {\n\t\t\t\t\t\t_nChildren = 2; \n\t\t\t\t\t} else if (_nTotalChildren >= 5 && _nTotalChildren < 14) {\n\t\t\t\t\t\t_nChildren = 3; \n\t\t\t\t\t} else if (_nTotalChildren >= 14 && _nTotalChildren < 30) {\n\t\t\t\t\t\t_nChildren = 4; \n\t\t\t\t\t} else if (_nTotalChildren >= 30 && _nTotalChildren < 55) {\n\t\t\t\t\t\t_nChildren = 5;\n\t\t\t\t\t} else if (_nTotalChildren >= 55 && _nTotalChildren < 91) {\n\t\t\t\t\t _nChildren = 6;\n\t\t\t\t\t} else if (_nTotalChildren >= 91 && _nTotalChildren < 140) {\n\t\t\t\t\t\t_nChildren = 7; \n\t\t\t\t\t} else if (_nTotalChildren >= 140) {\n\t\t\t\t\t\t_nChildren = 8;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Auburn always has one real child if infected\n\t\t\t\tcase AUBURN:\n\t\t\t\t\t_isauburn =true;\n\t\t\t\t\t_lowmaintenance += _m[i] - (Utils.AUBURN_ENERGY_CONSUMPTION * _m[i]);\n\t\t\t\t\tif (_infectedGeneticCode != null && _nChildren == 1) {\n\t\t\t\t\t\t_nChildren = 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with blond segments reproduce earlier\n\t\t\t\tcase BLOND:\n\t\t\t\t\treproduceearly += 3 + _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with indigo segments reduce the energy the new born virus receives\n\t\t\t\tcase INDIGO:\n\t\t\t\t\t_indigo += _m[i];\n\t\t\t\t\t_lowmaintenance += 0.8 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Plague forces an organism to reproduce the virus\n\t\t\t\tcase PLAGUE:\n\t\t\t\t\t_isplague =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Coral transforms particles and viruses\n\t\t\t\tcase CORAL:\n\t\t\t\t\t_iscoral =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Mint immunity against infections\t\n\t\t\t\tcase MINT:\n\t\t\t\t\t_isantiviral =true;\n\t\t\t\t\tif (_infectedGeneticCode != null && Utils.random.nextInt(Utils.IMMUNE_SYSTEM)<=_m[i] && useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_infectedGeneticCode = null;\n\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Healing\n\t\t\t\tcase MAGENTA:\n\t\t\t\t _isregenerative =true;\n\t\t\t\t for (int j = 0; j < _segments; j++) {\n\t\t\t\t if ((_segColor[j] == Utils.ColorLIGHTBROWN) || (_segColor[j] == Utils.ColorGREENBROWN) || (_segColor[j] == Utils.ColorPOISONEDJADE)\n\t\t\t\t\t\t|| (_segColor[j] == Utils.ColorBROKEN) || (_segColor[j] == Utils.ColorLIGHT_BLUE) || (_segColor[j] == Utils.ColorICE)\n\t\t\t\t\t\t|| (_segColor[j] == Utils.ColorDARKJADE) || (_segColor[j] == Utils.ColorDARKFIRE)) {\n\t\t\t\t\tif (Utils.random.nextInt(Utils.HEALING)<=_m[i] && useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t _segColor[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t}}}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKFIRE:\n\t\t\t\t\tif (Utils.random.nextInt(100)<_geneticCode.getSymmetry() && useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_segColor[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKJADE:\n\t\t\t\t\t_isjade =true;\n\t\t\t\t\tif (Utils.random.nextInt(Utils.DARKJADE_DELAY * _geneticCode.getSymmetry() * _geneticCode.getSymmetry())<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorJADE; \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Normalize spike\n\t\t\t\tcase SPIKEPOINT:\n\t\t\t\t\t_segColor[i] = Utils.ColorSPIKE;\n\t\t\t\t\tbreak;\n\t\t\t\t// is a killer\n\t\t\t\tcase SPIKE:\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t}\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LILAC:\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRAY:\n\t\t\t\t\tif (_isakiller < 2) {\n\t\t\t\t\t _isakiller = 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// is poisonous\n\t\t\t\tcase VIOLET:\n\t\t\t\t\t_ispoisonous =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// is a freezer\n\t\t\t\tcase SKY:\n\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// is enhanced\n\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t_isenhanced =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Energy transfer\n\t\t\t\tcase ROSE:\n\t\t\t\t\t_lowmaintenance += 0.99 * _m[i];\n\t\t\t\t\tif (_transfersenergy == false) {\n\t\t\t\t\t\t_transfersenergy =true;\n\t\t\t\t\t _lengthfriend = _geneticCode.getGene(i%_geneticCode.getNGenes()).getLength();\n\t\t\t\t\t _thetafriend = _geneticCode.getGene(i%_geneticCode.getNGenes()).getTheta();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Low maintenance\n\t\t\t\tcase DARK:\n\t\t\t\t\t_lowmaintenance += 0.99 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with gold segments live longer\n\t\t\t\tcase GOLD:\n\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\tgoldenage += (_m[i]/Utils.GOLD_DIVISOR);\n\t\t\t\t\t_geneticCode._max_age = Utils.MAX_AGE + ((_geneticCode.getNGenes() * _geneticCode.getSymmetry())/Utils.AGE_DIVISOR) + (int)goldenage;\n\t\t\t\t\tbreak;\n\t\t\t\t// is weakened\n\t\t\t\tcase LIGHTBROWN:\n\t\t\t\tcase GREENBROWN:\n\t\t\t\tcase POISONEDJADE:\n\t\t\t\t\tif (_remember) {\n\t\t\t\t\t\t_isjade =false;\n\t\t\t\t\t\t_isenhanced =false;\n\t\t\t\t\t\t_isantiviral =false;\n\t\t\t\t\t\t_isregenerative =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase JADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t\t\t\t_isenhanced =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase MINT:\n\t\t\t\t\t\t\t\t_isantiviral =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase MAGENTA:\n\t\t\t\t\t\t\t\t_isregenerative =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t _geneticCode._max_age = Utils.MAX_AGE + ((_geneticCode.getNGenes() * _geneticCode.getSymmetry())/Utils.AGE_DIVISOR) + (int)goldenage;\n\t\t\t\t\t _remember =false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIGHT_BLUE:\n\t\t\t\t\tif (_isafreezer) {\n\t\t\t\t\t\t_isafreezer =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase SKY:\n\t\t\t\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// is frozen\n\t\t\t\tcase ICE:\n\t\t\t\t\t_isfrozen =true;\n\t\t\t\t\tif (_isjade) {\n\t\t\t\t\t\t_isjade =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase JADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEADBARK:\n\t\t\t\t\t_isfrozen =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Restore abilities\n\t\t\t\tcase DARKLILAC:\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (Utils.random.nextInt(100)<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorLILAC;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\tif (Utils.random.nextInt(100)<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorSKY;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKOLIVE:\n\t\t\t\t\tif (Utils.random.nextInt(100)<8 && useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorOLIVE;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Reset dodging\n\t\t\tif (_hasdodged == true) {\n\t\t\t\t_dodge =false;\n\t\t\t\t_hasdodged =false;\n\t\t\t}\n\t\t\t//Get sun's energy\n\t\t\tif (photosynthesis > 0) {\n\t\t\t\t_isaplant =true;\n\t\t\t _energy += _world.photosynthesis(photosynthesis);\t\t\t\n\t\t\t}\n\t\t\t// Calculate number of children\n\t\t\tif (fertility > 0) {\n\t\t\t\tif (_geneticCode.getSymmetry() != 3) {\n\t\t\t\t _nChildren += (yellowCounter / _geneticCode.getSymmetry()) + (fertility / 23);\n\t\t\t } else {\n\t\t\t \t_nChildren += (yellowCounter / _geneticCode.getSymmetry()) + (fertility / 34);\n\t\t\t }\n\t\t\t}\n\t\t\t// Calculate reproduction energy for blond segments\n\t\t\tif ((reproduceearly > 0) && (_infectedGeneticCode == null)) {\n\t\t\t\tif (_energy > _geneticCode.getReproduceEnergy() - reproduceearly + Utils.YELLOW_ENERGY_CONSUMPTION*(_nChildren-1)) {\n\t\t\t\t\tif ((!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\tif ((_energy >= 10) && (_growthRatio<16) && (useEnergy(Utils.BLOND_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t_nChildren = 1;\n\t\t\t\t\t _geneticCode._reproduceEnergy = Math.max((40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry()) - reproduceearly, 10);\n\t\t\t\t\t reproduce();\n\t\t\t\t\t _geneticCode._reproduceEnergy = 40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry();\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((_energy >= 30) && (_growthRatio==1) && (_timeToReproduce==0) && (useEnergy(Utils.BLOND_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t _geneticCode._reproduceEnergy = Math.max((40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry()) - reproduceearly, 30);\n\t\t\t\t\t\t reproduce();\n\t\t\t\t\t\t _geneticCode._reproduceEnergy = 40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry();\t\t\t\t\t\t\t\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t}\n\t}",
"public void updateLighting() {\n\t\tint k;\n\t\tint i;\n\n\t\tfor (k=0; k<num_vobjects;k++) {\t\t\t// Loop through all the objects to be illuminated \n\t\t\t\n\t\t\tif ((vobject[k].potentially_visible) && (vobject[k].needs_lighting) ) {\n\t\t\t\tvobject[k].resetLighting();\n\t\t\t\tfor (i=0; i<num_vobjects;i++) {\t// Loop through all the light sources that can illuminate this object\n\t\t\t\t\tif (vobject[i].light_source) {\n\t\t\t\t\t\tvobject[k].addLightSource(vobject[i].abs_x_pos, vobject[i].abs_y_pos, vobject[i].abs_z_pos, vobject[i].light_red, vobject[i].light_green, vobject[i].light_blue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvobject[k].calculateAverageLighting();\n\t\t\t\tvobject[k].needs_lighting=false;\n\t\t\t}\n\t\t}\n\t}",
"public boolean isOpaqueCube()\r\n/* 61: */ {\r\n/* 62: 82 */ return false;\r\n/* 63: */ }",
"private void m23260f() {\n Shimmer aVar;\n Shader shader;\n Rect bounds = getBounds();\n int width = bounds.width();\n int height = bounds.height();\n if (width != 0 && height != 0 && (aVar = this.f19138f) != null) {\n int a = aVar.mo28981a(width);\n int b = this.f19138f.mo28983b(height);\n boolean z = true;\n if (this.f19138f.f19117g != 1) {\n if (!(this.f19138f.f19114d == 1 || this.f19138f.f19114d == 3)) {\n z = false;\n }\n if (z) {\n a = 0;\n }\n if (!z) {\n b = 0;\n }\n shader = new LinearGradient(0.0f, 0.0f, (float) a, (float) b, this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n } else {\n shader = new RadialGradient(((float) a) / 2.0f, ((float) b) / 2.0f, (float) (((double) Math.max(a, b)) / Math.sqrt(2.0d)), this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n }\n this.f19134b.setShader(shader);\n }\n }",
"private void calcShadeLevel() {\n TexturedPolygon3D poly = (TexturedPolygon3D)sourcePolygon;\n float intensity = 0;\n if (lightSource != null) {\n\n\n // average all the vertices in the polygon\n directionToLight.setTo(0,0,0);\n for (int i=0; i<poly.getNumVertices(); i++) {\n directionToLight.add(poly.getVertex(i));\n }\n directionToLight.divide(poly.getNumVertices());\n\n // make the vector from the average vertex\n // to the light\n directionToLight.subtract(lightSource);\n directionToLight.multiply(-1);\n\n // get the distance to the light for falloff\n float distance = directionToLight.length();\n\n // compute the diffuse reflect\n directionToLight.normalize();\n Vector3D normal = poly.getNormal();\n intensity = lightSource.getIntensity(distance)\n * directionToLight.getDotProduct(normal);\n intensity = Math.min(intensity, 1);\n intensity = Math.max(intensity, 0);\n }\n\n intensity+=ambientLightIntensity;\n intensity = Math.min(intensity, 1);\n intensity = Math.max(intensity, 0);\n int level =\n Math.round(intensity*ShadedTexture.MAX_LEVEL);\n ((ShadedTexture)poly.getTexture()).\n setDefaultShadeLevel(level);\n }",
"protected void updateFlags() {\n USE_CANNY = USE_CANNY && mainInterface.DEBUG_FRAME;\n DEBUG_PREP_FRAME = DEBUG_PREP_FRAME && mainInterface.DEBUG_FRAME;\n DEBUG_CONTOURS = DEBUG_CONTOURS && mainInterface.DEBUG_FRAME;\n DEBUG_POLY = DEBUG_POLY && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_MARKERS = DEBUG_DRAW_MARKERS && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_MARKER_ID = DEBUG_DRAW_MARKER_ID && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_SAMPLING = DEBUG_DRAW_SAMPLING && mainInterface.DEBUG_FRAME;\n }",
"@Override\n public boolean isOpaqueCube() {\n return false;\n }",
"public void loadCommon() {\n \n Node mainScene = new Node(\"Main Scene\");\n rootNode.attachChild(mainScene);\n \n DirectionalLight sun = new DirectionalLight();\n sun.setDirection(lightDir);\n sun.setColor(ColorRGBA.White.clone().multLocal(1.7f));\n rootNode.addLight(sun);\n \n Spatial sky = SkyFactory.createSky(assetManager, \"Scenes/Beach/FullskiesSunset0068.dds\", false);\n sky.setLocalScale(350);\n \n mainScene.attachChild(sky);\n \n water = new WaterFilter(rootNode, lightDir);\n \n FilterPostProcessor fpp = myApp.getFpp();\n \n fpp.addFilter(water);\n BloomFilter bloom = new BloomFilter();\n \n bloom.setExposurePower(55);\n bloom.setBloomIntensity(1.0f);\n \n fpp.addFilter(bloom);\n LightScatteringFilter lsf = new LightScatteringFilter(lightDir.mult(-300));\n lsf.setLightDensity(1.0f);\n fpp.addFilter(lsf);\n \n DepthOfFieldFilter dof = new DepthOfFieldFilter();\n dof.setFocusDistance(0);\n dof.setFocusRange(100);\n fpp.addFilter(dof);\n \n water.setWaveScale(0.003f);\n water.setMaxAmplitude(1f);\n water.setFoamExistence(new Vector3f(1f, 4, 0.5f));\n water.setFoamTexture((Texture2D) assetManager.loadTexture(\"Common/MatDefs/Water/Textures/foam2.jpg\"));\n \n water.setRefractionStrength(0.2f);\n \n water.setWaterHeight(initialWaterHeight);\n uw = cam.getLocation().y < waterHeight;\n \n waves = new AudioNode(assetManager, \"Sounds/Environment/Ocean Waves.ogg\", false);\n waves.setVolume(0.15f);\n waves.setLooping(true);\n waves.setReverbEnabled(true);\n if (uw) {\n waves.setDryFilter(new LowPassFilter(0.5f, 0.1f));\n } else {\n waves.setDryFilter(aboveWaterAudioFilter);\n }\n \n myApp.getViewPort().addProcessor(fpp);\n }",
"private void applyOpenGLStartSettings(){\r\n\t\t//TODO pa.smooth() / pa.noSmooth() ver�ndert auch line_smooth!\r\n\t\t//f�r test ob multisampling lines ohne Line_smooth okay rendered m�ssen\r\n\t\t//sicherheitshalber auch die pa.smoot() etc abgefangen werden und line_smooth immer disabled sein!\r\n\t\t\r\n\t\t//TODO check line drawing and abstractvisible at stencil in this context (line_smooth)\r\n\t\t\r\n\t //TODO \r\n\t\t// - if multisampling enabled dont do line smoothing at all\r\n\t\t// - OR: disable multisampling each time before doing line_smoothing! (better but expensive?) \r\n\t\t// -> info: disabling multisampling isnt possible at runtime..\r\n\r\n\t // - or disable mutisample before drawing with line_smooth!\r\n\t\t//TOOD dont use lines to smooth some objects then (fonts, etc)\r\n\t if (MT4jSettings.getInstance().isOpenGlMode() ){\r\n\t \t\r\n\t \t//////////////////////////////\r\n\t \tthis.loadGL();\r\n\t //////////////////////////\r\n\t \r\n//\t \tGL gl = Tools3D.getGL(this);\r\n\t GLCommon gl = getGLCommon();\r\n\t \t\r\n\t \tlogger.info(\"OpenGL Version: \\\"\" + gl.glGetString(GL.GL_VERSION) + \"\\\"\" + \" - Vendor: \\\"\" + gl.glGetString(GL.GL_VENDOR) + \"\\\"\" + \" - Renderer: \\\"\" + gl.glGetString(GL.GL_RENDERER) + \"\\\"\");\r\n//\t \tlogger.info(\"Shading language version: \\\"\" + gl.glGetString(GL.GL_SHADING_LANGUAGE_VERSION) + \"\\\"\");\r\n\t \tlogger.info(\"Non power of two texture sizes allowed: \\\"\" + Tools3D.supportsNonPowerOfTwoTexture(this) + \"\\\"\");\r\n\t \tlogger.info(\"OpenGL Framebuffer Object Extension available: \\\"\" + GLFBO.isSupported(this) + \"\\\"\");\r\n\t \t\r\n\t\t\t//Set VSyncing on -> to avoid tearing \r\n\t\t\t//-> check if gfx card settings allow apps to set it!\r\n\t\t\t//-> Use with caution! only use with fps rate == monitor Hz!\r\n\t\t\t//and fps never drop below Hz! -> else choppy!\r\n\t\t\t//-> only works with opengl!\r\n\t \tTools3D.setVSyncing(this, MT4jSettings.getInstance().isVerticalSynchronization());\r\n\t\t\tlogger.info(\"Vertical Sync enabled: \\\"\" + MT4jSettings.getInstance().isVerticalSynchronization() + \"\\\"\");\r\n\t \t\r\n\t \tif ( MT4jSettings.getInstance().isMultiSampling()){\r\n\t \t\tgl.glEnable(GL.GL_MULTISAMPLE);\r\n//\t \t\tgl.glDisable(GL.GL_MULTISAMPLE);\r\n\t \t\tlogger.info(\"OpenGL multi-sampling enabled.\");\r\n\t \t}\r\n\t \tgl.glEnable(GL.GL_LINE_SMOOTH);\r\n//\t \tgl.glDisable(GL.GL_LINE_SMOOTH);\r\n\t }\r\n\t}",
"public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }",
"public boolean isFull3D()\r\n {\r\n return true;\r\n }",
"private void finalRenderToTexture() {\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glCullFace(GL11.GL_BACK);\n\t\tGL11.glColorMask(true, true, true, true);\n\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\tGL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP);\n\t\tGL11.glDepthMask(false);\n\t\tGL11.glEnable(GL11.GL_STENCIL_TEST);\n\n\t\t// ambient pass\n\t\tGL11.glStencilFunc(GL11.GL_NOTEQUAL, 0, 0xff);\n\t\tphongShadowContext.uniform1f(\"ambientOnly\", 1);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(phongShadowContext);\n\t\t}\n\n\t\t// diffuse pass\n\t\tGL11.glStencilFunc(GL11.GL_EQUAL, 0, 0xff);\n\t\tphongShadowContext.uniform1f(\"ambientOnly\", 0);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(phongShadowContext);\n\t\t}\n\n\t\tGL11.glDisable(GL11.GL_BLEND);\n\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\tGL11.glDepthMask(true);\n\t\tGL11.glDisable(GL11.GL_STENCIL_TEST);\n\n\t\t// SCREEN POST PROCESSING\n\t\tscreenBuffer.copyPixels();\n\t}",
"public void renderWorld(boolean renderWithLight);",
"@Override\n public boolean isOpaqueCube()\n {\n return false;\n }",
"private void doBeam(Vector3f start, Vector3f end, Vector3f up, float len, float spanWidth, Vector4f color) {\n boolean useSoftSprites = false;//Ref.glRef.srgbBuffer != null && Ref.glRef.r_softparticles.isTrue();\n CubeTexture tex = null; // depth\n\n Shader sh = Ref.glRef.getShader(\"Poly\");\n Ref.glRef.PushShader(sh);\n sh.setUniform(\"ModelView\", view.viewMatrix);\n sh.setUniform(\"Projection\", view.ProjectionMatrix);\n// if(useSoftSprites) {\n// // use soft particle shader\n// Ref.glRef.PushShader(softSprite);\n// softSprite.setUniform(\"res\", Ref.glRef.GetResolution());\n//\n// // Bind depth from FBO\n// int depth = Ref.glRef.srgbBuffer.getDepthTextureId();\n// tex = new CubeTexture(Ref.glRef.srgbBuffer.getTarget(), depth, null);\n// tex.textureSlot = 1;\n// tex.loaded = true;\n// tex.Bind();\n// }\n\n GL11.glDisable(GL11.GL_CULL_FACE);\n\n GL11.glDepthMask(false); // dont write to depth\n GL11.glBegin(GL11.GL_QUADS);\n {\n // Fancy pants shaders\n Vector3f v = Helper.VectorMA(start, spanWidth, up, null);\n GL20.glVertexAttrib2f(Shader.INDICE_COORDS, 1, 0);\n Helper.col(color);\n GL20.glVertexAttrib3f(Shader.INDICE_POSITION, v.x, v.y, v.z);\n\n Helper.VectorMA(start, -spanWidth, up, v);\n GL20.glVertexAttrib2f(Shader.INDICE_COORDS, 1, 1);\n Helper.col(color);\n GL20.glVertexAttrib3f(Shader.INDICE_POSITION, v.x, v.y, v.z);\n\n \n\n Helper.VectorMA(end, -spanWidth, up, v);\n GL20.glVertexAttrib2f(Shader.INDICE_COORDS, 0, 1);\n Helper.col(color);\n GL20.glVertexAttrib3f(Shader.INDICE_POSITION, v.x, v.y, v.z);\n\n Helper.VectorMA(end, spanWidth, up, v);\n GL20.glVertexAttrib2f(Shader.INDICE_COORDS, 0, 0);\n Helper.col(color);\n GL20.glVertexAttrib3f(Shader.INDICE_POSITION, v.x, v.y, v.z);\n }\n GL11.glEnd();\n GL11.glDepthMask(true);\n\n GL11.glEnable(GL11.GL_CULL_FACE);\n\n if(useSoftSprites) {\n tex.Unbind();\n Ref.glRef.PopShader();\n }\n Ref.glRef.PopShader();\n }",
"public void buildMap() {\n // CUBES ENGINE INITIALIZATION MOVED TO APPSTATE METHOD\n // Here we init cubes engine\n CubesTestAssets.registerBlocks();\n CubesSettings blockSettings = CubesTestAssets.getSettings(this.app);\n blockSettings.setBlockSize(5);\n //When blockSize = 5, global coords should be multiplied by 3 \n this.blockScale = 3.0f;\n this.halfBlockStep = 0.5f;\n \n testTerrain = new BlockTerrainControl(CubesTestAssets.getSettings(this.app), new Vector3Int(4, 1, 4));\n testNode = new Node();\n int wallHeight = 3;\n //testTerrain.setBlockArea(new Vector3Int(0, 0, 0), new Vector3Int(32, 1, 64), CubesTestAssets.BLOCK_STONE);\n this.testTerrain.setBlockArea( new Vector3Int(3,0,43), new Vector3Int(10,1,10), CubesTestAssets.BLOCK_STONE); // Zone 1 Floor\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,52), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(12,1,46), new Vector3Int(1,wallHeight,4)); // Door A\n \n this.testTerrain.setBlockArea( new Vector3Int(12,0,45), new Vector3Int(13,1,6), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(12,1,45), new Vector3Int(8,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,50), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea(new Vector3Int(19,0,42), new Vector3Int(6,1,3), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(19,1,42), new Vector3Int(1,wallHeight,3), CubesTestAssets.BLOCK_WOOD); //\n this.testTerrain.setBlockArea( new Vector3Int(24,1,42), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); //\n \n this.testTerrain.setBlockArea( new Vector3Int(15,0,26), new Vector3Int(18,1,17), CubesTestAssets.BLOCK_STONE); // Zone 3 Floor\n this.testTerrain.setBlockArea( new Vector3Int(15,1,42), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(32,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(20,1,42), new Vector3Int(4,wallHeight,1)); // Door B\n this.testTerrain.removeBlockArea( new Vector3Int(15,1,27), new Vector3Int(1,wallHeight,6)); // Door C\n \n this.testTerrain.setBlockArea( new Vector3Int(10,0,26), new Vector3Int(5,1,8), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(10,1,26), new Vector3Int(5,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,0,18), new Vector3Int(8,1,16), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(3,1,18), new Vector3Int(1,wallHeight,16), CubesTestAssets.BLOCK_WOOD); // East Wall\n this.testTerrain.setBlockArea( new Vector3Int(10,1,18), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,33), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n \n this.testTerrain.setBlockArea( new Vector3Int(1,0,5), new Vector3Int(26,1,14), CubesTestAssets.BLOCK_STONE); // Zone 5\n this.testTerrain.setBlockArea( new Vector3Int(1,1,18), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(26,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(4,1,18), new Vector3Int(6,wallHeight,1)); // Door E\n \n // Populate the world with spawn points\n this.initSpawnPoints();\n \n //Add voxel world/map to collisions\n testTerrain.addChunkListener(new BlockChunkListener(){\n @Override\n public void onSpatialUpdated(BlockChunkControl blockChunk){\n Geometry optimizedGeometry = blockChunk.getOptimizedGeometry_Opaque();\n phyTerrain = optimizedGeometry.getControl(RigidBodyControl.class);\n if(phyTerrain == null){\n phyTerrain = new RigidBodyControl(0);\n optimizedGeometry.addControl(phyTerrain);\n bulletAppState.getPhysicsSpace().add(phyTerrain);\n }\n phyTerrain.setCollisionShape(new MeshCollisionShape(optimizedGeometry.getMesh()));\n }\n });\n \n testNode.addControl(testTerrain);\n rootNode.attachChild(testNode);\n }",
"private void initialize() {\n ShaderProgram.pedantic = false;\r\n\r\n shader = CustomShaderLoader.createShader();\r\n if (!shader.isCompiled()) {\r\n System.err.println(shader.getLog());\r\n System.exit(0);\r\n }\r\n if (shader.getLog().length() != 0)\r\n System.out.println(shader.getLog());\r\n }",
"public void calculateNormals() {\n // TODO!\n }",
"public void setCulling(boolean tf) {\n m_culling = tf;\n }",
"public void gatherAssets(AssetDirectory directory) {\r\n\r\n\t\tassets = directory;\r\n\t\tavatarTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tcombinedTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\r\n\t\t// Tiles\r\n\t\tlightTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_light\", Texture.class ));\r\n\t\tdarkTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_dark\", Texture.class ));\r\n\t\tallTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_all\", Texture.class ));\r\n\t\trainLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light\", Texture.class ));\r\n\t\trainDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark\", Texture.class ));\r\n\t\trainAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all\", Texture.class ));\r\n\t\tlightningLightTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light\", Texture.class ));\r\n\t\tlightningDarkTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark\", Texture.class ));\r\n\t\tlightningAllTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all\", Texture.class ));\r\n\t\tcrumbleLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light\", Texture.class ));\r\n\t\tcrumbleDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark\", Texture.class ));\r\n\t\tcrumbleAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all\", Texture.class ));\r\n\r\n\t\trainLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light_reduced\", Texture.class ));\r\n\t\trainDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark_reduced\", Texture.class ));\r\n\t\trainAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all_reduced\", Texture.class ));\r\n\t\tlightningLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light_reduced\", Texture.class ));\r\n\t\tlightningDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark_reduced\", Texture.class ));\r\n\t\tlightningAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all_reduced\", Texture.class ));\r\n\t\tcrumbleLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light_reduced\", Texture.class ));\r\n\t\tcrumbleDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark_reduced\", Texture.class ));\r\n\t\tcrumbleAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all_reduced\", Texture.class ));\r\n\r\n\t\t// Tutorial\r\n\t\ttutorial_signs = new TextureRegion[]{\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:camera_pan\", Texture.class)), //0\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_dash\", Texture.class)), //1\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_jump\", Texture.class)), //2\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_propel\", Texture.class)), //3\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_walk\", Texture.class)), //4\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_dash\", Texture.class)), //5\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_jump\", Texture.class)), //6\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_propel\", Texture.class)), //7\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_walk\", Texture.class)), //8\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_switch\", Texture.class)), //9\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_separate\", Texture.class)), //10\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_unify\", Texture.class)), //11\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:dash_catch\", Texture.class)),\t //12\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:propel_dash_vertical\", Texture.class))\t //13\r\n\r\n\t\t};\r\n\r\n\t\t// Base models\r\n\t\tsomniTexture = new TextureRegion(directory.getEntry(\"platform:somni_stand\",Texture.class));\r\n\t\tsomniIdleTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tsomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_walk_cycle\",Texture.class));\r\n\t\tsomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Jump_Dash\",Texture.class));\r\n\t\tsomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\",Texture.class));\r\n\t\tsomniFallTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\", Texture.class));\r\n\r\n\t\tphobiaTexture = new TextureRegion(directory.getEntry(\"platform:phobia_stand\",Texture.class));\r\n\t\tphobiaIdleTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Idle\",Texture.class));\r\n\t\tphobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_walk_cycle\",Texture.class));\r\n\t\tphobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Jump_Dash\",Texture.class));\r\n\t\tphobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\",Texture.class));\r\n\t\tphobiaFallTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\", Texture.class));\r\n\r\n\r\n\t\t// Combined models\r\n\t\tsomniPhobiaTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\t\tsomniPhobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_walk\",Texture.class));\r\n\t\tsomniPhobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_side\",Texture.class));\r\n\t\tsomniPhobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_up\",Texture.class));\r\n\t\tphobiaSomniTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_stand\",Texture.class));\r\n\t\tphobiaSomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_walk\",Texture.class));\r\n\t\tphobiaSomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_side\",Texture.class));\r\n\t\tphobiaSomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_up\",Texture.class));\r\n\r\n\t\tsomniPhobiaHandsTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_hands\",Texture.class));\r\n\t\tphobiaSomniHandsTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_hands\",Texture.class));\r\n\t\tblueRingBigTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_big\",Texture.class));\r\n\t\tyellowRingBigTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_big\",Texture.class));\r\n\t\tblueRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_small\",Texture.class));\r\n\t\tyellowRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_small\",Texture.class));\r\n\t\tsomniHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_front\",Texture.class));\r\n\t\tsomniHandBackTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_back\",Texture.class));\r\n\t\tphobiaHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_front\",Texture.class));\r\n\t\tphobiaHandBackTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_back\",Texture.class));\r\n\r\n\t\tbackgrounds = new TextureRegion[] {\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_statues\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_statues\", Texture.class)),\r\n\r\n\t\t};\r\n\r\n\r\n\t\tTextureRegion [] somnis = {somniIdleTexture,somniWalkTexture,somniDashSideTexture,somniDashUpTexture, somniFallTexture, somniDashUpTexture};\r\n\t\tsomnisTexture = somnis;\r\n\t\tTextureRegion [] phobias = {phobiaIdleTexture,phobiaWalkTexture,phobiaDashSideTexture,phobiaDashUpTexture, phobiaFallTexture, phobiaDashUpTexture};\r\n\t\tphobiasTexture = phobias;\r\n\t\tTextureRegion [] somniphobias = {somniPhobiaTexture,somniPhobiaWalkTexture,somniPhobiaDashSideTexture,somniPhobiaDashUpTexture, somniPhobiaDashUpTexture};\r\n\t\tsomniphobiasTexture = somniphobias;\r\n\t\tTextureRegion [] phobiasomnis = {phobiaSomniTexture,phobiaSomniWalkTexture,phobiaSomniDashSideTexture,phobiaSomniDashUpTexture, phobiaSomniDashUpTexture};\r\n\t\tphobiasomnisTexture = phobiasomnis;\r\n\t\tTextureRegion [] somniHands = {somniHandFrontTexture, somniHandBackTexture, somniPhobiaHandsTexture};\r\n\t\tsomniHandsTextures = somniHands;\r\n\t\tTextureRegion [] phobiaHands = {phobiaHandFrontTexture, phobiaHandBackTexture, phobiaSomniHandsTexture};\r\n\t\tphobiaHandsTextures = phobiaHands;\r\n\r\n\t\tanimationSpeed = new float[]{0.1f, 0.5f, 0.1f, 0.1f, 0.1f, 0.1f};\r\n\t\tframePixelWidth = new double[]{32, 64, 32, 32, 32, 32};\r\n\t\toffsetsX = new float[]{12, 19, 0, 0, 15, 0};\r\n\t\toffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tsecOffsetsX = new float[]{-20, -16, 52, 60, -18, 35, -18};\r\n\t\tsecOffsetsY = new float[]{0, 0, -80, -60, 0, -70, 0};\r\n\t\tthirdOffsetsX = new float[]{0, -18, -22, -22, 0, -22, 10, -15, 0, 0, 5, 0, 0, -20, 0, 0, -2, 0};\r\n\t\tthirdOffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tdashAngles = new float[] {0, 0, -1.55f, 0, 0, 3.14f};\r\n\t\tpropelAngles = new float[] {0, 0, 0, 1.55f, 0, -1.55f};\r\n\r\n\r\n\t\t// Setup masking\r\n\t\tcircle_mask = new TextureRegion(directory.getEntry(\"circle_mask\",Texture.class));\r\n\t\tVector2 mask_size = new Vector2(circle_mask.getRegionWidth(), circle_mask.getRegionHeight());\r\n\t\tMIN_MASK_DIMENSIONS = new Vector2(mask_size).scl(mask_shrink_factor);\r\n\t\tmaskWidth = MIN_MASK_DIMENSIONS.x;\r\n\t\tmaskHeight = MIN_MASK_DIMENSIONS.y;\r\n\r\n\t\tsliderBarTexture = directory.getEntry( \"platform:sliderbar\", Texture.class);\r\n\t\tsliderKnobTexture = directory.getEntry( \"platform:sliderknob\", Texture.class);\r\n\r\n\t\tjumpSound = directory.getEntry( \"platform:jump\", SoundBuffer.class );\r\n\t\tfireSound = directory.getEntry( \"platform:pew\", SoundBuffer.class );\r\n\t\tplopSound = directory.getEntry( \"platform:plop\", SoundBuffer.class );\r\n\r\n\t\tconstants = directory.getEntry( \"constants\", JsonValue.class );\r\n\r\n\r\n\r\n\r\n\r\n//Gather sound assets\r\n\t\twinTrack = directory.getEntry(\"winTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setWinTrack(winTrack);\r\n\r\n\t\tfailTrack = directory.getEntry(\"failTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setFailTrack(failTrack);\r\n\r\n\r\n\r\n//\t\tsomniTrack = directory.getEntry(\"somniTrack\", SoundBuffer.class);\r\n//\t\tphobiaTrackPath = directory.getEntry(\"phobiaTrack\", SoundBuffer.class);\r\n//\t\tcombinedTrackPath = directory.getEntry(\"combinedTrack\", SoundBuffer.class);\r\n\r\n\r\n//\t\tmenu drawables\r\n\t\torangeUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline_red\", Texture.class));\r\n\t\tblueUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline\", Texture.class));\r\n\t\tblueRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:bluerectangle\", Texture.class));\r\n\t\tblueExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_blue\", Texture.class));\r\n\t\tblueResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_blue\", Texture.class));\r\n\t\tblueRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_blue\", Texture.class));\r\n\t\torangeRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:orangerectangle\", Texture.class));\r\n\t\torangeExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_orange\", Texture.class));\r\n\t\torangeResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_orange\", Texture.class));\r\n\t\torangeRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_orange\", Texture.class));\r\n\t\t//\t\tSliders\r\n\t\torangeSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_orange\", Texture.class));\r\n\t\tblueSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_blue\", Texture.class));\r\n\t\torangeKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_orange\", Texture.class));\r\n\t\tblueKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_blue\", Texture.class));\r\n\t\torangeSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_orange\", Texture.class));\r\n\t\tblueSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_blue\", Texture.class));\r\n\t\tblueMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_blue\", Texture.class));\r\n\t\torangeMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_orange\", Texture.class));\r\n\r\n\t\tblueNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextblue\", Texture.class));\r\n\t\torangeNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextorange\", Texture.class));\r\n\r\n\t\tbluePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_blue\", Texture.class));\r\n\t\torangePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_red\", Texture.class));\r\n\t\tblurBackground = new TextureRegion(directory.getEntry(\"pause_menu:blur\", Texture.class));\r\n\r\n\r\n\t\tsuper.gatherAssets(directory);\r\n\r\n\r\n\t}",
"private void drawsegment_gouraud_texture32_alpha\n (\n float leftadd,\n float rghtadd,\n int ytop,\n int ybottom\n ) {\n //Accurate texture mode added - comments stripped from dupe code, see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode){\n if(precomputeAccurateTexturing()){ //see if the precomputation goes well, if so finish the setup\n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n accurateMode = false; //if the matrix inversion screwed up, revert to normal rendering (something is degenerate)\n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n for ( ;xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n // get texture pixel color\n try {\n //if (iz < m_zbuffer[xstart]) {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) { // [fry 041114]\n //m_zbuffer[xstart] = iz;\n \n // blend\n int al = ia >> 16;\n \n int red;\n int grn;\n int blu;\n \n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = (iu & 0xFFFF) >> 9;\n int ivi = (iv & 0xFFFF) >> 9;\n \n // get texture pixels\n int pix0 = m_texture[ofs];\n int pix1 = m_texture[ofs + 1];\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int pix2 = m_texture[ofs];\n int pix3 = m_texture[ofs + 1];\n \n // red\n int red0 = (pix0 & 0xFF0000);\n int red2 = (pix2 & 0xFF0000);\n int up = red0 + ((((pix1 & 0xFF0000) - red0) * iui) >> 7);\n int dn = red2 + ((((pix3 & 0xFF0000) - red2) * iui) >> 7);\n red = (up + (((dn-up) * ivi) >> 7)) >> 16;\n \n // grn\n red0 = (pix0 & 0xFF00);\n red2 = (pix2 & 0xFF00);\n up = red0 + ((((pix1 & 0xFF00) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF00) - red2) * iui) >> 7);\n grn = (up + (((dn-up) * ivi) >> 7)) >> 8;\n \n // blu\n red0 = (pix0 & 0xFF);\n red2 = (pix2 & 0xFF);\n up = red0 + ((((pix1 & 0xFF) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF) - red2) * iui) >> 7);\n blu = up + (((dn-up) * ivi) >> 7);\n \n // alpha\n pix0>>>=24;\n pix2>>>=24;\n up = pix0 + ((((pix1 >>> 24) - pix0) * iui) >> 7);\n dn = pix2 + ((((pix3 >>> 24) - pix2) * iui) >> 7);\n al = al * (up + (((dn-up) * ivi) >> 7)) >> 8;\n } else {\n blu = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)];\n al = al * (blu >>> 24) >> 8;\n red = (blu & 0xFF0000) >> 16; // 0 - 255\n grn = (blu & 0xFF00) >> 8; // 0 - 255\n blu = (blu & 0xFF); // 0 - 255\n }\n \n // multiply with gouraud color\n red = (red * ir) >>> 8; // 0x00FF????\n grn = (grn * ig) >>> 16; // 0x0000FF??\n blu = (blu * ib) >>> 24; // 0x000000FF\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n \n //\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al) >> 8)) & 0xFF0000) |\n ((bg + (((grn - bg) * al) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n } catch (Exception e) { }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n ia+=iaadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n aleft+=aleftadd;\n zleft+=zleftadd;\n }\n }",
"public static void preloadAllAssets() {\r\n\t\tbackground = new Image(fileURL(\"./assets/gifs/background.gif\"));\r\n\r\n\t\tbackgroundGif = new Background(new BackgroundImage(background, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT));\r\n\r\n\t\t//Michael Bay Mode gifs\r\n\t\tcollisionGif = new Image(fileURL(\"./assets/gifs/collision.gif\"));\r\n\t\trunAwayGif = new Image(fileURL(\"./assets/gifs/run_away.gif\"));\r\n\r\n\t\t//Regular Simulation Images \r\n\t\tearthImage = new ImagePattern(new Image(fileURL(\"./assets/images/earth.png\")));\r\n\t\tneptuneImage = new ImagePattern(new Image(fileURL(\"./assets/images/neptune.png\")));\r\n\t\tsunImage = new ImagePattern(new Image(fileURL(\"./assets/images/sun.png\")));\r\n\t\tstarImage = new ImagePattern(new Image(fileURL(\"./assets/images/star.png\")));\r\n\t\tmarsImage = new ImagePattern(new Image(fileURL(\"./assets/images/mars.png\")));\r\n\t\tmoonImage = new ImagePattern(new Image(fileURL(\"./assets/images/moon.png\")));\r\n\t\tasteroidImage = new ImagePattern(new Image(fileURL(\"./assets/images/asteroid.png\")));\r\n\r\n\t\t//Michael Bay mode images\r\n\t\tmichaelBayExplosionImage = new ImagePattern(new Image(fileURL(\"./assets/images/bay_explosion.jpg\")));\r\n\t\tmichaelBayPointingImage = new Image(fileURL(\"./assets/images/bay_pointing.jpg\"));\r\n\t\tmichaelBayGangsterImage = new ImagePattern(new Image(fileURL(\"./assets/images/bay_gangster.jpg\")));\r\n\t\tgenericExplosionImage = new ImagePattern(new Image(fileURL(\"./assets/images/generic_explosion.png\")));\r\n\t\tusaFlagImage = new Image(fileURL(\"./assets/images/usa_flag.jpg\"));\r\n\t\tusaBackground = new Background(new BackgroundImage(usaFlagImage, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT));\r\n\t}",
"private void setup() {\n\t\tpopulateEntitiesLists();\n\t\t// rayHandler.setCombinedMatrix(batch.getProjectionMatrix());\n\t\tambientColor = Color.CLEAR;\n\t\tsetAmbientAlpha(.3f);\n\t\tfpsLogger = new FPSLogger();\n\t\tdynamicEntities = new ArrayList<DynamicEntity>();\n\t\tfont.getData().setScale(DEBUG_FONT_SCALE);\n\t}",
"public Color4f getColor(Ray ray, IntersectResult result) {\n \tColor4f c = new Color4f();\n \tif(result.t == Double.POSITIVE_INFINITY) {\n \t\tc.x = render.bgcolor.x;\n \t\tc.y = render.bgcolor.y;\n \t\tc.z = render.bgcolor.z;\n \t\treturn c;\n \t}\n \t\n \t//Ambient color\n \tc.x = ambient.x * result.material.diffuse.x;\n \tc.y = ambient.y * result.material.diffuse.y;\n \tc.z = ambient.z * result.material.diffuse.z;\n \t\n \t//multi light resources contribute to result point\n \tfor(Light light: lights.values()) {\n \t\tRay shadowRay = new Ray();\n \t\tIntersectResult shadowResult = new IntersectResult();\n \t\t\n \t\tint rowNum = 5;\n \t\tint columnNum = 5; //the light plane is separated to rowNum*columnNum sub plane.\n \t\tColor4f lightAccumColor = new Color4f();\n \t\tfor(int i = 0; i < rowNum; i++) {\n \t\tfor(int j = 0; j < columnNum; j++) {\n \t\t\tLight jitterLight = new Light();\n \t\tjitterLight.color.set(light.color);\n \t\tjitterLight.from.set(light.from);\n \t\tjitterLight.power = light.power;\n \t\tVector3d a = new Vector3d(2, 2, 0);\n \t\tVector3d b = new Vector3d(0, 2, 2);\n \t\ta.scale((double)i/(double)rowNum); //delta\n \t\tb.scale((double)j/(double)columnNum);\n \t\t//jitterLight.from = light.from + epsilon1*a + epsilon2*b\n \t\tjitterLight.from.x = jitterLight.from.x+a.x+b.x;\n \t\tjitterLight.from.y = jitterLight.from.y+a.y+b.y;\n \t\tjitterLight.from.z = jitterLight.from.z+a.z+b.z;\n \t\t\n \t\t\n \t\tif(!inShadow(result, surfaceList, jitterLight, shadowResult, shadowRay)) {\n \t \t\t//Lambertian shader\n \t \t\tColor3f ld = new Color3f();\n \t \t\tVector3d l = new Vector3d();\n \t \t\t\n \t \t\t//Area light according to FCG p340\n \t \t\tl.sub(jitterLight.from, result.p);\n \t \t\tl.normalize();\n \t \t\tdouble max = Math.max(0.0, l.dot(result.n));\n \t \t\tld.x = (float)(light.color.x * light.power * result.material.diffuse.x * max);\n \t \t\tld.y = (float)(light.color.y * light.power * result.material.diffuse.y * max);\n \t \t\tld.z = (float)(light.color.z * light.power * result.material.diffuse.z * max);\n \t \t\t\n \t \t\t//Blinn-Phone shader\n \t \t\tColor3f ls = new Color3f();\n \t \t\tVector3d h = new Vector3d();\n \t \t\tVector3d v = new Vector3d();\n \t \t\tv.sub(ray.eyePoint, result.p);\n \t \t\tv.normalize();\n \t \t\th.add(l, v);\n \t \t\th.normalize();\n \t \t\tmax = Math.max(0.0, h.dot(result.n));\n \t \t\tls.x = (float)( light.color.x * light.power * result.material.specular.x * Math.pow(max, result.material.shinyness));\n \t \t\tls.y = (float)( light.color.y * light.power * result.material.specular.y * Math.pow(max, result.material.shinyness));\n \t \t\tls.z = (float)( light.color.z * light.power * result.material.specular.z * Math.pow(max, result.material.shinyness));\n \t \t\t\n \t \t\t//update c\n \t \t\tlightAccumColor.x += ld.x+ls.x;\n \t \t\tlightAccumColor.y += ld.y+ls.y;\n \t \t\tlightAccumColor.z += ld.z+ls.z;\n \t\t}\n \t\t\n \t\tif(result.material.mirror != null) {\n \t\t\t//Firstly calculate reflection ray\n \t\t\tRay mirrorRay = new Ray();\n \t\t\tIntersectResult mirrorResult = new IntersectResult();\n \t\t\tmirrorRay.eyePoint.set(result.p); //Firstly origin is intersection point\n \t\t\tmirrorRay.viewDirection.set(ray.viewDirection); //initialize to d temply, finally to r = d-2(dn)n textbook 103\n \t\t\t\n \t\t\tVector3d d = new Vector3d();\n \t\t\tVector3d n = new Vector3d();\n \t\t\td.set(ray.viewDirection);\n \t\t\tn.set(result.n);\n \t\t\tn.scale(-2.0*d.dot(n)); // n = -2(dn)n\n \t\t\tmirrorRay.viewDirection.add(n); //finally\n \t\t\t\n \t\t\tVector3d epsilon = new Vector3d();\n \t\t\tepsilon.set(mirrorRay.viewDirection);\n \t\t\tepsilon.scale(1e-8);\n \t\t\tmirrorRay.eyePoint.add(epsilon); //add a very small offset in the mirror ray direction to avoid t = 0 \n \t\t\t\n \t\t\tfor(Intersectable surface: surfaceList) {\n \t\t\t\tsurface.intersect(mirrorRay, mirrorResult); //see the intersection of mirror ray with the scene\n \t\t\t}\n \t\t\tColor4f mirrorColor = getColor(mirrorRay, mirrorResult);\n \t\t\tlightAccumColor.x += result.material.mirror.x*mirrorColor.x;\n \t\t\tlightAccumColor.y += result.material.mirror.y*mirrorColor.y;\n \t\t\tlightAccumColor.z += result.material.mirror.z*mirrorColor.z;\n \t\t}\n \t\t}\n \t\t}\n \t\tlightAccumColor.scale(1/(float)(rowNum*columnNum));\n \t\tc.add(lightAccumColor);\n\n \t\t\n \t\t\n \t}\n \t\n \treturn c;\n }",
"private void activeDrawEffects() {\n }",
"public void preLoadContent(AssetManager manager) {\n\t\tif (worldAssetState != AssetState.EMPTY) {\n\t\t\treturn;\n\t\t}\n\n\t\tworldAssetState = AssetState.LOADING;\n\n\t\tmanager.load(KOI_TEXTURE, Texture.class);\n\t\tassets.add(KOI_TEXTURE);\n\n\t\tmanager.load(ENEMY_TEXTURE, Texture.class);\n\t\tassets.add(ENEMY_TEXTURE);\n\n\t\tmanager.load(LILY_TEXTURE, Texture.class);\n\t\tassets.add(LILY_TEXTURE);\n\t\t\n\t\tmanager.load(LILY_TEXTURE_N, Texture.class);\n\t\tassets.add(LILY_TEXTURE_N);\n\t\t\n\t\tmanager.load(LILY_TEXTURE_S, Texture.class);\n\t\tassets.add(LILY_TEXTURE_S);\n\n\t\tmanager.load(LANTERN_TEXTURE, Texture.class);\n\t\tassets.add(LANTERN_TEXTURE);\n\n\t\tmanager.load(LIGHTING_TEXTURE, Texture.class);\n\t\tassets.add(LIGHTING_TEXTURE);\n\n\t\tmanager.load(SHADOW_TEXTURE, Texture.class);\n\t\tassets.add(SHADOW_TEXTURE);\n\n\t\tmanager.load(GOAL_TEXTURE, Texture.class);\n\t\tassets.add(GOAL_TEXTURE);\n\n\t\tmanager.load(EARTH_FILE,Texture.class);\n\t\tassets.add(EARTH_FILE);\n\n\t\tmanager.load(EARTH_FILE_D,Texture.class);\n\t\tassets.add(EARTH_FILE_D);\n\t\tmanager.load(EARTH_FILE_N,Texture.class);\n\t\tassets.add(EARTH_FILE_N);\n\t\tmanager.load(EARTH_FILE_S,Texture.class);\n\t\tassets.add(EARTH_FILE_S);\n\t\tmanager.load(SHORE_FILE,Texture.class);\n\t\tassets.add(SHORE_FILE);\n\n\t\tmanager.load(ROCK_FILE_D,Texture.class);\n\t\tassets.add(ROCK_FILE_D);\n\t\tmanager.load(ROCK_FILE_N,Texture.class);\n\t\tassets.add(ROCK_FILE_N);\n\t\tmanager.load(ROCK_FILE_S,Texture.class);\n\t\tassets.add(ROCK_FILE_S);\n\n\t\tmanager.load(WHIRLPOOL_TEXTURE, Texture.class);\n\t\tassets.add(WHIRLPOOL_TEXTURE);\n\t\t\n\t\tmanager.load(ENERGYBAR_TEXTURE, Texture.class);\n\t\tassets.add(ENERGYBAR_TEXTURE);\n\n\t\tmanager.load(UI_FLOWER, Texture.class);\n\t\tassets.add(UI_FLOWER);\n\n\t\tmanager.load(OVERLAY, Texture.class);\n\t\tassets.add(OVERLAY);\n\n\t\tmanager.load(BACKGROUND_FILE_N, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_N);\n\n\t\tmanager.load(BACKGROUND_FILE_D, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_D);\n\n\t\tmanager.load(BACKGROUND_FILE_S, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_S);\n\t\t\n\t\t\n\n\t\tmanager.load(OVERLAY_FILE, Texture.class);\n\t\tassets.add(OVERLAY_FILE);\n\n\t\tmanager.load(KOI_ARROW, Texture.class);\n\t\tassets.add(KOI_ARROW);\n\t\tmanager.load(WHIRL_ARROW, Texture.class);\n\t\tassets.add(WHIRL_ARROW);\n\t\t\n\t\tmanager.load(TUTORIAL_TEXTURE1, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE1);\n\t\tmanager.load(TUTORIAL_TEXTURE2, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE2);\n\t\tmanager.load(TUTORIAL_TEXTURE3, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE3);\n\t\tmanager.load(TUTORIAL_TEXTURE4, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE4);\n\t\tmanager.load(TUTORIAL_TEXTURE5, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE5);\n\t\tmanager.load(TUTORIAL_TEXTURE6, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE6);\n\t\t\n\t\tmanager.load(HELP_TEXTURE, Texture.class);\n\t\tassets.add(HELP_TEXTURE);\n\t\t\n\n\t\treferenceC.a = 0f;\n\n\t\t// Load the font\n\t\tFreetypeFontLoader.FreeTypeFontLoaderParameter size2Params = new FreetypeFontLoader.FreeTypeFontLoaderParameter();\n\t\tsize2Params.fontFileName = FONT_FILE;\n\t\tsize2Params.fontParameters.size = FONT_SIZE;\n\t\tmanager.load(FONT_FILE, BitmapFont.class, size2Params);\n\t\tassets.add(FONT_FILE);\n\n\t\tFreetypeFontLoader.FreeTypeFontLoaderParameter size3Params = new FreetypeFontLoader.FreeTypeFontLoaderParameter();\n\t\tsize3Params.fontFileName = FONT_FILE2;\n\t\tsize3Params.fontParameters.size = FONT_SIZE2;\n\t\tmanager.load(FONT_FILE2, BitmapFont.class, size3Params);\n\t\tassets.add(FONT_FILE2);\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLog.d(TAG, \"onSurfaceCreated\");\r\n//\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to\r\n\t\tgl.glClearColor(0.f, 0.f, 0.f, 0.f);\r\n/////new/////\t\t\r\n\t\t gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA);\r\n\t\t gl.glEnable(gl.GL_BLEND);\r\n///////\t\t \r\n\t\tgl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden\r\n\t\t\t\t\t\t\t\t\t\t\t// surface removal\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\r\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// perspective\r\n\t\t// view\r\n\t\tgl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\r\n\t\tgl.glDisable(GL10.GL_DITHER); // Disable dithering for better\r\n\t\t\t\t\t\t\t\t\t\t// performance\r\n\t\t// You OpenGL|ES initialization code here\r\n\t\t// ......\r\n\t\tgl.glGenTextures(MAX_MODEL_NUM, texIDS, 0);\r\n\r\n//\t\tglview.loadTexture(gl); // Load image into Texture (NEW)\r\n\t\tgl.glEnable(gl.GL_TEXTURE_2D); // Enable texture (NEW)\r\n\t\t\r\n\t}",
"@Override\n protected void setup(){\n /* if(\"red\".equals(contrast) && \"round\".equals(ShapeAgent.shape)){\n System.out.println(\"Detected \"+count +\" Microneurysms in input image\");\n \n\n }\n else if((\"light yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape)) || (\"yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape))){\n System.out.println(\"Detected \"+count +\" exudates in input image\");\n\n }\n else if((\"dark yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape)) || (\"yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape))){\n System.out.println(\"Detected \"+count +\" exudates in input image\");\n\n }\n else{\n System.out.println(\"Complecated situation appeared with count agent\");\n\n }*/\n \n if(((1.12<BrightnessAgent.contrast) && (3.12>BrightnessAgent.contrast)) && ShapeAgent.shape >=0.8){\n System.out.println(\"Detected \"+count +\" Microneurysms in input image\"); \n }\n else if(((3.12<BrightnessAgent.contrast) && (4.12>BrightnessAgent.contrast)) && ShapeAgent.shape < 0.8){\n System.out.println(\"Detected \"+count +\" exudates in input image\"); \n }\n else if(((3.12<BrightnessAgent.contrast) && (4.12>BrightnessAgent.contrast)) && ShapeAgent.shape >= 0.8){\n System.out.println(\"Detected \"+count +\" exudates in input image\"); \n }\n else{\n System.out.println(\"Complecated situation occured in shape identification\");\n }\n doDelete();\n}",
"@Override\n public void onSurfaceCreated(GL10 gl10, EGLConfig eglConfig) {\n filter = new LutColorFilter(mContext);\n mTextureId = createTextureObject();\n mSurfaceTexture = new SurfaceTexture(mTextureId);\n\n\n try {\n Bitmap bitmap = BitmapFactory.decodeStream(mContext.getResources().getAssets().open(\"lut_01.png\"));\n filter.setBitmap(bitmap);\n }catch (IOException e){\n\n }\n\n }",
"public static void habilitarCullFace(){\n\t\t\n\t\tGL11.glEnable(GL11.GL_CULL_FACE);\n\t\tGL11.glCullFace(GL11.GL_BACK);\n\t}",
"String getCollisionAvoidanceFactor();",
"public static SbColor\ngetAmbient(SoState state) \n{\n SoLazyElement elem = getInstance(state);\n if(state.isCacheOpen()) elem.registerGetDependence(state, masks.AMBIENT_MASK.getValue());\n //return curElt.ivState.ambientColor;\n\treturn elem.coinstate.ambient;\n}",
"public void drawCube() {\r\n GLES20.glUseProgram(program);\r\n\r\n GLES20.glUniform3fv(lightPosParam, 1, lightPosInEyeSpace, 0);\r\n\r\n // Set the Model in the shader, used to calculate lighting\r\n GLES20.glUniformMatrix4fv(modelParam, 1, false, model, 0);\r\n\r\n // Set the ModelView in the shader, used to calculate lighting\r\n GLES20.glUniformMatrix4fv(modelViewParam, 1, false, modelView, 0);\r\n\r\n // Set the position of the cube\r\n GLES20.glVertexAttribPointer(positionParam, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false, 0, vertices);\r\n\r\n // Set the ModelViewProjection matrix in the shader.\r\n GLES20.glUniformMatrix4fv(modelViewProjectionParam, 1, false, modelViewProjection, 0);\r\n\r\n // Set the normal positions of the cube, again for shading\r\n GLES20.glVertexAttribPointer(normalParam, 3, GLES20.GL_FLOAT, false, 0, normals);\r\n GLES20.glVertexAttribPointer(colorParam, 4, GLES20.GL_FLOAT, false, 0, isLookingAtObject(this) ? cubeFoundColors : colors);\r\n\r\n GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 36);\r\n checkGLError(\"Drawing cube\");\r\n }",
"public boolean isOpaqueCube() {\n\t\treturn false;\n\t}",
"public boolean isOpaqueCube() {\n\t\treturn false;\n\t}",
"public boolean isOpaqueCube() {\n\t\treturn false;\n\t}",
"public boolean isOpaqueCube() {\n\t\treturn false;\n\t}",
"public boolean isOpaqueCube()\n\t {\n\t return false;\n\t }",
"boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }",
"private Color calcColor(GeoPoint intersection, Ray ray, int level, double k)\r\n\t{\r\n\t\tColor color = intersection.geometry.getEmmission();\r\n\t\tcolor = color.add(calcLocalEffects(intersection, ray,k));\r\n\t\treturn 1 == level ? color : color.add(calcGlobalEffects(intersection, ray, level, k));\r\n\t}",
"public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }",
"private void drawsegment_gouraud_alpha(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n for ( ; xstart < xend; xstart++ ) {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n //\n int red = (ir & 0xFF0000);\n int grn = (ig >> 8) & 0xFF00;\n int blu = (ib >> 16);\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n \n // blend alpha\n int al = ia >> 16;\n \n //\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al) >> 8)) & 0xFF0000) | \n ((bg + (((grn - bg) * al) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n \n //\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n ia+=iaadd;\n iz+=izadd;\n }\n \n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n aleft+=aleftadd;\n zleft+=zleftadd;\n }\n }",
"public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.1f, 0.1f, 0.25f, 1.0f);\n RSGFXShaderManager.loadShaders();\n next_game_tick = SystemClock.elapsedRealtime();\n // No culling of back faces\n GLES20.glDisable(GLES20.GL_CULL_FACE);\n \n // No depth testing\n //GLES20.glDisable(GLES20.GL_DEPTH_TEST);\n setupRender();\n // Enable blending\n // GLES20.glEnable(GLES20.GL_BLEND);\n // GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE);\n \n // Setup quad \n \t\t// Generate your vertex, normal and index buffers\n \t\t// vertex buffer\n \t\t_qvb = ByteBuffer.allocateDirect(_quadv.length\n \t\t\t\t* FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();\n \t\t_qvb.put(_quadv);\n \t\t_qvb.position(0);\n\n \t\t// index buffer\n \t\t_qib = ByteBuffer.allocateDirect(_quadi.length\n \t\t\t\t* 4).order(ByteOrder.nativeOrder()).asIntBuffer();\n \t\t_qib.put(_quadi);\n \t\t_qib.position(0);\n }",
"public void renderInvBlock(bbb renderblocks, int md)\r\n/* 73: */ {\r\n/* 74: 72 */ this.block.f();\r\n/* 75: */ \r\n/* 76: 74 */ this.context.setDefaults();\r\n/* 77: 75 */ this.context.setPos(-0.5D, -0.5D, -0.5D);\r\n/* 78: 76 */ this.context.useNormal = true;\r\n/* 79: 77 */ this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);\r\n/* 80: */ \r\n/* 81: 79 */ RenderLib.bindTexture(\"/eloraam/machine/machine1.png\");\r\n/* 82: 80 */ baz tessellator = baz.a;\r\n/* 83: */ \r\n/* 84: 82 */ tessellator.b();\r\n/* 85: 83 */ this.context.useNormal = true;\r\n/* 86: */ \r\n/* 87: */ \r\n/* 88: 86 */ this.context.setTex(28, 28, 26, 26, 26, 26);\r\n/* 89: */ \r\n/* 90: 88 */ this.context.renderBox(60, 0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D);\r\n/* 91: 89 */ this.context.renderBox(60, 0.6240000128746033D, 0.9990000128746033D, 0.6240000128746033D, 0.3759999871253967D, 0.001000000047497451D, 0.3759999871253967D);\r\n/* 92: 90 */ renderFlanges(3, 27);\r\n/* 93: */ \r\n/* 94: 92 */ tessellator.a();\r\n/* 95: 93 */ RenderLib.unbindTexture();\r\n/* 96: 94 */ this.context.useNormal = false;\r\n/* 97: */ }",
"public void createMesh(GL2 gl){\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(y + pos[1]*chunkHeight <= ChunkManager.map2D(x + pos[0]*chunkSize, z + pos[2]*chunkSize)){\r\n\t\t\t\t\t\tblocks[x][y][z] = (byte) (2.7*(y+pos[1]*chunkHeight)/13+1); // Initialize each block\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tblocks[x][y][z] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvertexCount = 0;\r\n\t\t// Allocate the buffers (Change to one buffer, or use short/byte buffer for normals and color)\r\n\t\tvertexData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tnormalData = Buffers.newDirectFloatBuffer(chunkSize*chunkHeight*chunkSize*18*3);\r\n\t\tcolorsData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(BlockType.isActive(blocks[x][y][z])){\r\n\t\t\t\t\t\tcreateCube(x, y, z); // If the cube is active, add it to the Buffer\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// correct the buffer size, and rewind\r\n\t\tnormalData.flip();\r\n\t\tvertexData.flip();\r\n\t\tcolorsData.flip();\r\n\t\tgl.glGenBuffers(3, buffer, 0); // allocate the buffers and get IDs\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[0]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, vertexData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[1]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, normalData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[2]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, colorsData, GL.GL_DYNAMIC_DRAW);\r\n\t\t// set buffer as null now that it's done being used, hope it will be garbage collected\r\n\t\tvertexData = null;\r\n\t\tnormalData = null;\r\n\t\tcolorsData = null;\t\t\r\n\t}",
"@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); \n\t\t//set vertices shared by all cubes\n\t\t//set vertexpointer(3memberXYZ,FloatData,3Float*4Byte,dataBuffer)\n\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 12, vertices);\n\t\t//set normals shared by all cubes\n\t\t//normalpointer(dataTYPE,3float*4bytes,dataBuffer)\n\t\tgl.glNormalPointer(GL10.GL_FLOAT, 12, normals);\n\n\t\t//set light parameters\n\t\tgl.glLoadIdentity();\n\t\t//RGBA ambient light colors\n\t\tfloat[] ambientColor = { 0.1f, 0.11f, 0.1f, 1f }; \n\t\t//glLightModelfv(ambientLight, array with color, offset to color)\n\t\tgl.glLightModelfv(GL10.GL_LIGHT_MODEL_AMBIENT, ambientColor, 0);\n\t\t//position from where the light comes to the origin\n\t\tfloat[] pos = {3, 0, 2, 0};\n\t\t//set source1 position \n\t\t//glLightfv(source id, parameter, data array, offset);\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, pos, 0);\n\n\t\t//enable lighting\n\t\tgl.glEnable(GL10.GL_LIGHTING);\n\t\t//enable source 1\n\t\tgl.glEnable(GL10.GL_LIGHT0);\n\t\t//light shade model interpolate\n\t\tgl.glShadeModel(GL10.GL_SMOOTH);\n\t\t//enable material\n\t\tgl.glEnable(GL10.GL_COLOR_MATERIAL);\n\t\t\n\t\t//1st cube will use default color, so disable color array\n\t\tgl.glDisableClientState(GL10.GL_COLOR_ARRAY);\n\t\t//set default render color for 2nd cube\n\t\tgl.glColor4f(0, 1, 0.5f, 1);\n\t\t\t\t\n\t\t//transform 1st cube\n\t\tgl.glLoadIdentity();\n\t\tgl.glTranslatef(0, 0, -8);\n\t\tgl.glScalef(0.3f, 0.3f, 0.3f);\t\n\t\tgl.glRotatef(angle, 1, 1, 0);\n\t\t\t\t\n\t\t//draw first cube\n\t\tgl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_SHORT, index);\n\t\t//GL10.glDrawElements(DrawType,36 indices,shorData,dataBuffer)\n\t\t\n\t\t//second cube with Vertexcolor\n\t\t//enable color array\n\t\tgl.glEnableClientState(GL10.GL_COLOR_ARRAY);\n\t\t//glcolorpointer(4members RGBA,dataType,4floats*4bytes,dataBuffer)\n\t\tgl.glColorPointer(4, GL10.GL_FLOAT, 16, colors);\n\t\t\t\t\n\t\t//set transformation for second cube\n\t\tgl.glLoadIdentity();\n\t\tgl.glTranslatef(0, 0, -8);\n\t\tgl.glRotatef(angle, 0, 1, 0);\n\t\t//Draw second cube\n\t\tgl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_SHORT, index);\n\t\t\n\t\t//third cube will use texture, disable color array\n\t\tgl.glDisableClientState(GL10.GL_COLOR_ARRAY);\n\t\t//set default color to solid white\n\t\tgl.glColor4f(1, 1, 1, 1);\n\t\t//enable texture coordinates array\n\t\tgl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);\n\t\t//enable 2D texture for bind\n\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\n\t\t//set texturecoord pointer\n\t\tgl.glTexCoordPointer(2, GL10.GL_FLOAT, 8, texturemap); \n\t\t//bind texture\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textureId);\n\t\t\n\t\t//translate 3rd cube\n\t\tgl.glLoadIdentity();\n\t\tgl.glTranslatef(-5, -1, -7);\n\t\tgl.glRotatef(-angle, 0, 1, 0);\n\t\t//draw 3rd cube\n\t\tgl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_SHORT, index);\n\t\t//unbind texture so other cubes dont use texture\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, 0);\n\t\t//disable texture state if not next frame first cube \n\t\t//will try to use the texture\n\t\tgl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);\n\t\tgl.glDisable(GL10.GL_TEXTURE_2D);\n\t\tangle++;\n\t}",
"public void draw() {\n /* put graphical code here, runs repeatedly at defined framerate in setup, else default at 60fps: */\n if (renderingForce == false) {\n background(255); \n //imageMode(CORNERS);\n image(outputSplat, 0, 0);\n world.draw();\n checkChangeColor();\n }\n}",
"private void renderShadowMap() {\n GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboId[0]);\n GLES20.glViewport(0, 0, mShadowMapWidth,\n mShadowMapHeight);\n // Clear color and buffers\n GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);\n GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);\n // Start using the shader\n GLES20.glUseProgram(mDepthMapProgram);\n float[] tempResultMatrix = new float[16];\n // Calculate matrices for standing objects\n // View matrix * Model matrix value is stored\n Matrix.multiplyMM(mLightMvpMatrix_staticShapes, 0, mLightViewMatrix, 0, mModelMatrix, 0);\n // Model * view * projection matrix stored and copied for use at rendering from camera point of view\n Matrix.multiplyMM(tempResultMatrix, 0, mLightProjectionMatrix, 0, mLightMvpMatrix_staticShapes, 0);\n System.arraycopy(tempResultMatrix, 0, mLightMvpMatrix_staticShapes, 0, 16);\n // Pass in the combined matrix.\n GLES20.glUniformMatrix4fv(mMVPMatrixHandleShadow, 1, false, mLightMvpMatrix_staticShapes, 0);\n // Render all stationary shapes on scene\n\n mDrawPlane.setDraw(mPositionHandleShadow, 0, 0, 0, true);\n mDrawPlane.draw();\n\n // Calculate matrices for moving objects\n // Rotate the model matrix with current rotation matrix\n Matrix.multiplyMM(tempResultMatrix, 0, mModelMatrix, 0, mCubeRotation, 0);\n // View matrix * Model matrix value is stored\n Matrix.multiplyMM(mLightMvpMatrix_dynamicShapes, 0, mLightViewMatrix, 0, tempResultMatrix, 0);\n // Model * view * projection matrix stored and copied for use at rendering from camera point of view\n Matrix.multiplyMM(tempResultMatrix, 0, mLightProjectionMatrix, 0, mLightMvpMatrix_dynamicShapes, 0);\n System.arraycopy(tempResultMatrix, 0, mLightMvpMatrix_dynamicShapes, 0, 16);\n // Pass in the combined matrix.\n GLES20.glUniformMatrix4fv(mMVPMatrixHandleShadow, 1, false, mLightMvpMatrix_dynamicShapes, 0);\n // Render all moving shapes on scene\n mDrawObj.setDraw(mPositionHandleShadow,0,0,0,true);\n }",
"public void cambiaUfos() {\n cambiaUfos = true;\n }",
"void renderHotspots() {\n boolean afterCurrent = false;\n boolean hasLastPos = false;\n float lastX = 0.0f;\n float lastY = 0.0f;\n float lastZ = 0.0f;\n \n final float halfWidth = 0.1f / 2;\n final float halfLength = 0.1f / 2;\n final float halfHeight = 0.1f / 2;\n final float eyeHeight = 0.91712f;//1.1f;\n \n // Find pan position offset vector\n if (selectedTimeInterval.getLocationMetadataEntry() == null) {\n return;\n }\n \n if (!dstLocationVectorExists)\n return;\n \n GL11.glLoadIdentity();\n // set up for tracking hotspot screen x,y\n\t\tfloat projectedXYZ[] = new float[3]; \t\t\n\t\tprojectionMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projectionMatrix);\n\t\tgetMatrixAsArray(projectionMatrix, projectionArray);\n\t\tviewportMatrix.clear();\n\t\tGL11.glGetInteger(GL11.GL_VIEWPORT, viewportMatrix);\n\t\tviewportArray[0] = viewportMatrix.get(0);\n\t\tviewportArray[1] = viewportMatrix.get(1);\n\t\tviewportArray[2] = viewportMatrix.get(2);\n\t\tviewportArray[3] = viewportMatrix.get(3);\n //System.out.println(\"\"+viewportArray[0] + \" \"+ viewportArray[1]+\" \"+viewportArray[2]+\" \"+viewportArray[3] ); \n\t\tmodelMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelMatrix);\n\t\tgetMatrixAsArray(modelMatrix, modelArray);\n \n GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); // no texture\n \n for (int i=0; i<roverTrackingList.size()-1; i++) {\n \tRoverTrackingListEntry listEntry = (RoverTrackingListEntry) roverTrackingList.get(i);\n\t\t\tlistEntry.screenX = 0.0f;\n\t\t\tlistEntry.screenY = 0.0f;\n \t\n double da = listEntry.locationMetadataEntry.rover_origin_offset_vector_a + listEntry.siteMetadataEntry.offset_vector_a - currentLocationVectorA;\n double db = listEntry.locationMetadataEntry.rover_origin_offset_vector_b + listEntry.siteMetadataEntry.offset_vector_b - currentLocationVectorB;\n double dc = listEntry.locationMetadataEntry.rover_origin_offset_vector_c + listEntry.siteMetadataEntry.offset_vector_c - currentLocationVectorC;\n \n float x = (float) db;\n float y = (-(float)dc) - eyeHeight;\n float z = - (float) da;\n\n // calculate brightness of point based on number of images visible for location\n float brightness = 0.0f;\n \n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getNumEnabledImages() > 2) {\n \t// track screen x, y of hotspot\n \t\t\tGLU.gluProject(x, y, z, modelArray, projectionArray, viewportArray, projectedXYZ);\n \t\t\tif (projectedXYZ[2] < 1.0f) {\n\t \t\t\tlistEntry.screenX = projectedXYZ[0];\n\t \t\t\t// transform y from opengl screen coords to regular screen coords\n\t \t\t\tlistEntry.screenY = viewportArray[3] - projectedXYZ[1];\n \t\t\t}\n \t\n \t// render hotspot\n GL11.glLoadIdentity();\n GL11.glTranslatef(x, y, z);\n //System.out.println(\"\"+listEntry.screenX+\" \"+listEntry.screenY);\n \n brightness = 0.5f + 0.1f * listEntry.locationListEntry.getNumEnabledImages();\n if (brightness > 1.0f) {\n brightness = 1.0f;\n }\n \n GL11.glBegin(GL11.GL_QUADS); // D draw A Quad\n \n if (listEntry.locationListEntry.getStartLocation().equals(selectedTimeInterval.getStartLocation())) {\n GL11.glColor3f(brightness, 0.0f, brightness); \n }\n else if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n }\n \n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Bottom Left Of The Quad (Top)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Bottom Right Of The Quad (Top)\n\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Top Right Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Top Left Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Bottom)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Bottom)\n\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Front)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Front)\n\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Back)\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Back)\n\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Left)\n\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Right)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Right)\n \n GL11.glEnd(); // Done Drawing The Quads\n\t }\n \n if (hasLastPos && !listEntry.segmentStart) {\n brightness = 0.5f;\n if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n } \n GL11.glLoadIdentity();\n GL11.glBegin(GL11.GL_LINES); \n// GL11.glColor3f(1.0f, 0.0f, 0.0f); \n GL11.glVertex3f(lastX, lastY, lastZ);\n GL11.glVertex3f(x, y, z);\n GL11.glEnd();\n }\n \n lastX = x;\n lastY = y;\n lastZ = z;\n hasLastPos = true;\n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getStartLocation().equals(this.selectedTimeInterval.getStartLocation())) {\n afterCurrent = true;\n }\n }\n }",
"public void render(float delta, float runTime) {\n Gdx.gl.glClearColor(0, 0, 0, 1);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n\n batch.begin();\n// shapeRenderer.begin(ShapeRenderer.ShapeType.Filled);\n// shapeRenderer.setColor(Color.BLUE);\n// shapeRenderer.rect(rabbit.getHitBox().getX(), rabbit.getHitBox().getY(), rabbit.getHitBox().getWidth(), rabbit.getHitBox().getHeight());\n// shapeRenderer.setColor(Color.RED);\n// shapeRenderer.rect(ground1.getHitBox().getX(), ground1.getHitBox().getY(), ground1.getHitBox().getWidth(), ground1.getHitBox().getHeight());\n// shapeRenderer.rect(ground2.getHitBox().getX(), ground2.getHitBox().getY(), ground2.getHitBox().getWidth(), ground2.getHitBox().getHeight());\n// shapeRenderer.setColor(Color.PINK);\n// shapeRenderer.rect(hill1.getHitBox().getX(), hill1.getHitBox().getY(), hill1.getHitBox().getWidth(), hill1.getHitBox().getHeight());\n// shapeRenderer.rect(hill2.getHitBox().getX(), hill2.getHitBox().getY(), hill2.getHitBox().getWidth(), hill2.getHitBox().getHeight());\n// shapeRenderer.setColor(Color.YELLOW);\n// shapeRenderer.rect(hill3.getHitBox().getX(), hill3.getHitBox().getY(), hill3.getHitBox().getWidth(), hill3.getHitBox().getHeight());\n// shapeRenderer.rect(hill4.getHitBox().getX(), hill4.getHitBox().getY(), hill4.getHitBox().getWidth(), hill4.getHitBox().getHeight());\n// shapeRenderer.setColor(Color.PURPLE);\n// shapeRenderer.rect(policeCar1.getHitBox().getX(), policeCar1.getHitBox().getY(), policeCar1.getHitBox().getWidth(), policeCar1.getHitBox().getHeight());\n// shapeRenderer.rect(policeCar2.getHitBox().getX(), policeCar2.getHitBox().getY(), policeCar2.getHitBox().getWidth(), policeCar2.getHitBox().getHeight());\n //Temporary Location\n //drawWater();\n\n drawBackground();\n drawClouds();\n drawWeed();\n drawGround();\n drawHills();\n drawHillBottoms();\n drawHillTops();\n drawPoliceCars();\n drawScore();\n drawEnemies();\n drawRabbit(delta, runTime);\n drawDyingPolice();\n drawBlood();\n drawBackgroundUI();\n drawBlood();\n drawTitle();\n drawPause();\n drawMenuUI();\n drawReady();\n drawRunning();\n drawLeaderBoard();\n drawResuming();\n drawBullets();\n drawHigh();\n //Shitty code to handle rabbit dying and bars showing over score\n if (rabbit.isDead()) {\n drawScore();\n }\n// - shapeRenderer.end();540\n batch.end();\n\n }",
"@Override\n public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n \n String vertexShaderSource = TextResourceReader.readTextFileFromResource(context, R.raw.simple_vertex_shader);\n String fragmentShaderSource = TextResourceReader.readTextFileFromResource(context, R.raw.simple_fragment_shader);\n \n int vertexShaderId = ShaderHelper.compileVertexShader(vertexShaderSource);\n int fragmentShaderId = ShaderHelper.compileFragmentShader(fragmentShaderSource);\n \n program = ShaderHelper.linkProgram(vertexShaderId, fragmentShaderId);\n \n if(LoggerConfig.ON){\n \tShaderHelper.validateProgram(program);\n }\n glUseProgram(program);\n uColorLocation = glGetUniformLocation(program, U_COLOR);\n aPositionLocation = glGetAttribLocation(program, A_POSITION);\n \n vertexData.position(0);\n glVertexAttribPointer(aPositionLocation, POSITION_COMPONENT_COUNT, GL_FLOAT, false, 0, vertexData);\n glEnableVertexAttribArray(aPositionLocation); \n }",
"@Override\n\tpublic void draw(RoomBlocks grid) {\n\t\trenderer.setProjectionMatrix(CameraHolder.instance().getOrtho().combined);\n//\t\tCont tot = new Cont();\n\t\tColor color = new Color();\n\n\t\t\n\t\tDimensions dim = grid.getDimensions().toRoomWorldDimmensions();\n\t\tgrid.forEach(bl -> {\n//\t\t\t\n\t\t\tint x = (GeneratorConstants.ROOM_BLOCK_SIZE * bl.getX()) + GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\n\t\t\tx = (dim.getW() - x) + dim.getX();\n\t\t\t\n\t\t\tint pseudWorldRoomY = grid.getDimensions().getY() * Configuration.getLevelGridElementContentSize();\n\t\t\tint y = (bl.getY() + pseudWorldRoomY) * (GeneratorConstants.ROOM_BLOCK_SIZE);\n\t\t\t\n\t\t\tShapeType shType = ShapeType.Filled;\n\t\t\tboolean render = false;\n\t\t\t\n\t\t\tif(bl.isDoor()) {\n\t\t\t\trender = true;\n\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t} else if(bl.isWall()) {\n//\t\t\t\trender = true;\n//\t\t\t\tcolor.set(1, 1, 1, 1);\n//\t\t\t\tshType = ShapeType.Line;\n\t\t\t} else if(bl.getMetaInfo() != null) {//TODO\n\t\t\t\t\n\t\t\t\tif(bl.getMetaInfo().getType().equals(\".\")) {\n\t\t\t\t\trender = true;\n\t\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t\t} else if(!bl.getMetaInfo().getType().equals(\"x\")) {\n\t\t\t\t\t\n\t\t\t\t\tBrush brush = Configuration.brushesPerTile.get(bl.getMetaInfo().getType().charAt(0));\n\t\t\t\t\tif(brush != null) {// && bl.getOwner() != null\n\t\t\t\t\t\t\n//\t\t\t\t\t\tif(bl.getOwner() != null) {\n//\t\t\t\t\t\t\tSystem.out.println(\"owner: \" + brush.tile);\n//\t\t\t\t\t\t}\t\t\t\t\t\t\n//\t\t\t\t\t\t\n\t\t\t\t\t\trender = true;\n\t\t\t\t\t\tcolor.set(brush.color[0], brush.color[1], brush.color[2], 1);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(render) {\n\t\t\t\t\n\t\t\t\tint size = GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\t\n\t\t\t\trenderer.begin(shType);\n\t\t\t\trenderer.setColor(color);\n\t\t\t\trenderer.rect(x, y, size, size);\n\t\t\t\trenderer.end();\n\t\t\t}\n\t\t\t\n//\t\t\tif(bl.getOwner() != null ) {\n//\t\t\t\tfinal int fx = x;\n//\t\t\t\tfinal int fy = y;\n//\t\t\t\t\n//\t\t\t\tbl.getOwner().forEachItems(itm -> {//desenhando os items\n//\t\t\t\t\trenderer.begin(ShapeType.Filled);\n//\t\t\t\t\trenderer.setColor(itm.color[0], itm.color[1], itm.color[2], 1);\n//\t\t\t\t\trenderer.rect(fx + itm.dx, fy + itm.dy, itm.width, itm.height);\n//\t\t\t\t\trenderer.end();\t\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t}\t\t\t\n\t\t});\n\t}",
"public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glDisable(GL10.GL_DITHER);\n\n /*\n * Some one-time OpenGL initialization can be made here\n * probably based on features of this particular context\n */\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\n GL10.GL_FASTEST);\n\n float ratio = (float) width / height;\n gl.glMatrixMode(GL10.GL_PROJECTION);\n gl.glLoadIdentity();\n gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10);\n\n if (mTranslucentBackground) {\n gl.glClearColor(0,0,0,0);\n } else {\n gl.glClearColor(0.07f, 0.639f, 0.7f, 1f);\n }\n gl.glMatrixMode(GL10.GL_MODELVIEW);\n gl.glEnable(GL10.GL_CULL_FACE);\n gl.glShadeModel(GL10.GL_FLAT);\n gl.glLineWidth(2f);\n\n //lighting\n // Define the ambient component of the first light\n gl.glEnable(GL10.GL_LIGHTING);\n gl.glEnable(GL10.GL_LIGHT0);\n gl.glEnable(GL10.GL_LIGHT1);\n gl.glEnable(GL10.GL_LIGHT2);\n\n float lightColor[] = {0.07f, 0.639f, 0.7f, 1f};\n FloatBuffer light0Ambient = FloatBuffer.wrap(lightColor);\n float light1PositionVector[] = {1f, 0f, 0f, 0f};\n FloatBuffer light1Position = FloatBuffer.wrap(light1PositionVector);\n float light2PositionVector[] = {-1f, 0f, 0f, 0f};\n FloatBuffer light2Position = FloatBuffer.wrap(light2PositionVector);\n\n gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_AMBIENT, light0Ambient);\n gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_POSITION, light1Position);\n gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_AMBIENT, light0Ambient);\n gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_POSITION, light2Position);\n }",
"public boolean addComponentParts(World world, Random random, StructureBoundingBox boundingBox)\n {\n if (this.field_143015_k < 0)\n {\n this.field_143015_k = this.getAverageGroundLevel(world, boundingBox);\n\n if (this.field_143015_k < 0)\n {\n return true;\n }\n\n this.boundingBox.offset(0, this.field_143015_k - this.boundingBox.maxY + 5 - 1, 0);\n }\n\n this.fillWithBlocks(world, boundingBox, 1, 1, 1, 10, 4, 10, Blocks.air, Blocks.air, false);\n this.fillWithBlocks(world, boundingBox, 0, 0, 0, 10, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n /*this.fillWithBlocks(world, boundingBox, 0, 0, 0, 10, 0, 0, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 10, 0, 0, 10, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 10, 0, 10, 0, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 0, 0, 10, 0, 0, 0, Blocks.cobblestone, Blocks.cobblestone, false);*/\n this.fillWithBlocks(world, boundingBox, 1, 0, 1, 9, 0, 9, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 4, 0, 10, 4, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n \n //RIGHT WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 0, 0, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 0, 0, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 1, boundingBox);\n this.fillWithBlocks(world, boundingBox, 0, 2, 2, 0, 2, 4, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 5, boundingBox);\n this.fillWithBlocks(world, boundingBox, 0, 2, 6, 0, 2, 8, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 10, boundingBox);\n \n //LEFT WALL\n this.fillWithBlocks(world, boundingBox, 10, 1, 0, 10, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 10, 3, 0, 10, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 1, boundingBox);\n this.fillWithBlocks(world, boundingBox, 10, 2, 2, 10, 2, 4, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 5, boundingBox);\n this.fillWithBlocks(world, boundingBox, 10, 2, 6, 10, 2, 8, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 10, boundingBox);\n \n //FRONT WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 0, 5, 1, 0, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 7, 1, 0, 10, 1, 0, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 0, 10, 3, 0, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 1, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 2, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 3, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 4, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 5, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 7, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 8, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 0, boundingBox);\n \n //BACK WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 10, 10, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 10, 10, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 1, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 2, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 3, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 4, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 5, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 6, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 7, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 8, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 10, boundingBox);\n \n \n //DECO\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.crafting_table, 0, 9, 1, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 1, 8, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 8, 1, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.furnace, this.getMetadataWithOffset(Blocks.furnace, 1), 8, 1, 9, boundingBox);\n this.generateStructureChestContents(world, boundingBox, random, 7, 1, 9, workshopChestContents, getCount(random, 5, 7));\n this.generateStructureChestContents(world, boundingBox, random, 6, 1, 9, workshopChestContents, getCount(random, 5, 7));\n this.placeDoorAtCurrentPosition(world, boundingBox, random, 6, 1, 0, this.getMetadataWithOffset(Blocks.wooden_door, 1));\n //this.placeBlockAtCurrentPosition(world, Blocks.torch, this.getMetadataWithOffset(Blocks.torch, 1), 5, 3, 9, boundingBox);\n\n if (this.getBlockAtCurrentPosition(world, 6, 0, -1, boundingBox).getMaterial() == Material.air && this.getBlockAtCurrentPosition(world, 6, -1, -1, boundingBox).getMaterial() != Material.air)\n {\n this.placeBlockAtCurrentPosition(world, Blocks.stone_stairs, this.getMetadataWithOffset(Blocks.stone_stairs, 3), 6, 0, -1, boundingBox);\n }\n\n /* for (l = 0; l < 6; ++l)\n {\n for (int i1 = 0; i1 < 9; ++i1)\n {\n this.clearCurrentPositionBlocksUpwards(p_74875_1_, i1, 9, l, p_74875_3_);\n this.func_151554_b(p_74875_1_, Blocks.cobblestone, 0, i1, -1, l, p_74875_3_);\n }\n }*/\n\n this.spawnVillagers(world, boundingBox, 2, 1, 2, 1);\n return true;\n }",
"@Override\n public void render(Renderable renderable)\n {\n context.setBlending(false, GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);\n context.setCullFace(GL20.GL_BACK);\n context.setDepthTest(GL20.GL_LEQUAL, 0.0f, 50.0f);\n context.setDepthMask(true);\n super.render(renderable);\n }",
"public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n\t\tGLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);\n\t\tmVertexShader = RawResourceReader.readTextFileFromRawResource(mContext,\n\t\t\t\tde.moliso.shelxle.R.raw.atoms_vetrex_shader);\n\t\tmFragmentShader = RawResourceReader.readTextFileFromRawResource(\n\t\t\t\tmContext, de.moliso.shelxle.R.raw.atoms_fragment_shader);\n\n\t\tmProgram = createProgram(mVertexShader, mFragmentShader);\n\t\tif (mProgram == 0) {\n\t\t\treturn;\n\t\t}\n\t\ttry{\n\t\t\tversionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;\n\t\t}catch (NameNotFoundException e){\n\t\t\t//wurst\n\t\t}\n\t\ttexturH = GLES20.glGetUniformLocation(mProgram, \"text\");\n\t\tellipsoidH = GLES20.glGetUniformLocation(mProgram, \"eli\");\n\t\tlichtH = GLES20.glGetUniformLocation(mProgram, \"lighting\");\n\n\t\tvertexAttr1 = GLES20.glGetAttribLocation(mProgram, \"vertex\");\n\n\t\tnormalAttr1 = GLES20.glGetAttribLocation(mProgram, \"normal\");\n\t\tmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"matrix\");\n\t\tinvmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"invmatrix\");\n\t\tcolorUniform1 = GLES20.glGetUniformLocation(mProgram, \"col\");\n\n\t\tmTextureLoc = GLES20.glGetUniformLocation(mProgram, \"textureSampler\");\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t// Matrix.setLookAtM(mVMatrix, 0, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);\n\n\t}",
"public void drawFloor() {\r\n GLES20.glUseProgram(program);\r\n\r\n // Set ModelView, MVP, position, normals, and color.\r\n GLES20.glUniform3fv(lightPosParam, 1, lightPosInEyeSpace, 0);\r\n GLES20.glUniformMatrix4fv(modelParam, 1, false, model, 0);\r\n GLES20.glUniformMatrix4fv(modelViewParam, 1, false, modelView, 0);\r\n GLES20.glUniformMatrix4fv(modelViewProjectionParam, 1, false, modelViewProjection, 0);\r\n GLES20.glVertexAttribPointer(positionParam, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false, 0, vertices);\r\n GLES20.glVertexAttribPointer(normalParam, 3, GLES20.GL_FLOAT, false, 0, normals);\r\n GLES20.glVertexAttribPointer(colorParam, 4, GLES20.GL_FLOAT, false, 0, colors);\r\n\r\n GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 6);\r\n\r\n checkGLError(\"drawing floor\");\r\n }",
"private void renderSkybox(int p_73971_1_, int p_73971_2_, float p_73971_3_) {\n\t\tthis.mc.getFramebuffer().unbindFramebuffer();\n\t\tGlStateManager.viewport(0, 0, 256, 256);\n\t\tthis.drawPanorama(p_73971_1_, p_73971_2_, p_73971_3_);\n\t\tthis.rotateSkybox();\n\t\tthis.mc.getFramebuffer().bindFramebuffer(true);\n\t\tGlStateManager.viewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);\n\t\tTessellator var4 = Tessellator.getInstance();\n\t\tWorldRenderer var5 = var4.getWorldRenderer();\n\t\tvar5.startDrawingQuads();\n\t\tfloat var6 = this.width > this.height ? 120.0F / (float) this.width : 120.0F / (float) this.height;\n\t\tfloat var7 = (float) this.height * var6 / 256.0F;\n\t\tfloat var8 = (float) this.width * var6 / 256.0F;\n\t\tvar5.func_178960_a(1.0F, 1.0F, 1.0F, 1.0F);\n\t\tint var9 = this.width;\n\t\tint var10 = this.height;\n\t\tvar5.addVertexWithUV(0.0D, (double) var10, (double) this.zLevel, (double) (0.5F - var7),\n\t\t\t\t(double) (0.5F + var8));\n\t\tvar5.addVertexWithUV((double) var9, (double) var10, (double) this.zLevel, (double) (0.5F - var7),\n\t\t\t\t(double) (0.5F - var8));\n\t\tvar5.addVertexWithUV((double) var9, 0.0D, (double) this.zLevel, (double) (0.5F + var7), (double) (0.5F - var8));\n\t\tvar5.addVertexWithUV(0.0D, 0.0D, (double) this.zLevel, (double) (0.5F + var7), (double) (0.5F + var8));\n\t\tvar4.draw();\n\t}",
"public void initialize()\r\n\t{\r\n\t\tgl.glClearColor(0.0F, 0.0F, 0.0F, 1.0F);\r\n\t\t// initialize blending for transparency\r\n\t\tgl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\r\n\t\tgl.glEnable(GL_DEPTH_TEST);\r\n\t\tgl.glEnable(GL_DITHER);\r\n\t\t//gl.disable(GL_ALPHA_TEST);\r\n\t\t//gl.disable(GL_COLOR_MATERIAL);\r\n\t\tgl.glShadeModel(GL_SMOOTH);\r\n\t\tgl.glDepthFunc( GL_LEQUAL );\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\r\n\t\tgl.glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\r\n\t\tgl.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);\r\n\t\tgl.glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);\r\n\t\tglj.gljCheckGL();\r\n\t}",
"public void process() {\n\tprocessing = true;\r\n\tCollections.sort(imageRequest, new Comparator<ImageRequest>() {\r\n\t @Override\r\n\t public int compare(ImageRequest i0, ImageRequest i1) {\r\n\t\tif (i0.zDepth < i1.zDepth)\r\n\t\t return -1;\r\n\t\tif (i0.zDepth > i1.zDepth)\r\n\t\t return 1;\r\n\t\treturn 0;\r\n\t }\r\n\r\n\t});\r\n\r\n\t// Draw alpha things\r\n\tfor (int i = 0; i < imageRequest.size(); i++) {\r\n\t ImageRequest ir = imageRequest.get(i);\r\n\t setzDepth(ir.zDepth);\r\n\t drawSprite(ir.sprite, ir.offX, ir.offY, false, false);\r\n\t}\r\n\r\n\t// Draw lighting\r\n\tfor (int i = 0; i < lightRequest.size(); i++) {\r\n\t LightRequest lr = lightRequest.get(i);\r\n\t drawLightRequest(lr.light, lr.x, lr.y);\r\n\t}\r\n\r\n\tfor (int i = 0; i < pixels.length; i++) {\r\n\t float r = ((lightMap[i] >> 16) & 0xff) / 255f;\r\n\t float g = ((lightMap[i] >> 8) & 0xff) / 255f;\r\n\t float b = (lightMap[i] & 0xff) / 255f;\r\n\r\n\t pixels[i] = ((int) (((pixels[i] >> 16) & 0xff) * r) << 16 | (int) (((pixels[i] >> 8) & 0xff) * g) << 8\r\n\t\t | (int) ((pixels[i] & 0xff) * b));\r\n\t}\r\n\r\n\timageRequest.clear();\r\n\tlightRequest.clear();\r\n\tprocessing = false;\r\n }",
"public boolean isStaticLight();",
"public void areaEffect(Player player){\n if(object.getProperties().containsKey(\"endLevel\")) {\n System.out.println(\"Fin du level\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n PlayScreen.setEndLevel();\n }\n\n if(object.getProperties().containsKey(\"startBossFight\")) {\n\n System.out.println(\"Start Boss Fight\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 9, cell);\n\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 9, cell);\n\n PlayScreen.cameraChangeBoss(true);\n setCategoryFilterFixture(GameTest.GROUND_BIT, PlayScreen.getFixtureStartBoss());\n\n }\n\n if(object.getProperties().containsKey(\"blueKnight\")) {\n System.out.println(\"Changement en bleu\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"blue\");\n }\n\n if(object.getProperties().containsKey(\"greyKnight\")) {\n System.out.println(\"Changement en gris\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"grey\");\n }\n\n if(object.getProperties().containsKey(\"redKnight\")) {\n System.out.println(\"Changement en rouge\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"red\");\n }\n\n }",
"private void m7635b() {\n if (!this.f6418o) {\n this.f6417n = false;\n this.f6405b.clearAnimation();\n this.f6406c.removeAnnotations();\n List arrayList = new ArrayList();\n for (GridDTO polygons : this.f6414k) {\n arrayList.add(new PolygonOptions().addAll(polygons.getPolygons()).fillColor(Color.parseColor(\"#00bcd4\")).strokeColor(-16728876).alpha(0.5f));\n }\n this.f6406c.addPolygons(arrayList);\n this.f6417n = false;\n }\n }",
"public void fullRenderRefresh() {\n gameChanged = true;\n visionChanged = true;\n backgroundChanged = true;\n selectionChanged = true;\n movementChanged = true;\n }",
"private void drawBox() {\n GLES20.glEnable(GLES20.GL_SCISSOR_TEST);\n GLES20.glScissor(0, 0, 100, 100);\n GLES20.glClearColor(1.0f, 0.0f, 0.0f, 1.0f);\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);\n GLES20.glDisable(GLES20.GL_SCISSOR_TEST);\n }",
"int getBlockTint(fd world, int original, int x, int y, int z, TintType ttype) {\n /*if (true)*/return original; //blarg :<\n /*double temperature = 0.0;\n double humidity = 0.0;\n switch (ttype)\n {\n case GRASS:\n // world.getWorldChunkManager().func_4069_a(i, k, 1, 1);\n synchronized (world)\n {\n world.a().a(x, z, 1, 1);\n // double d =\n // iblockaccess.getWorldChunkManager().temperature[0];\n \n temperature = world.a().a[0];\n // double humidity =\n // iblockaccess.getWorldChunkManager().humidity[0];\n humidity = world.a().b[0];\n }\n // return ColorizerGrass.\n try\n {\n return colorMult(original, hx.a(temperature, humidity));\n }\n catch (Throwable t)\n {\n System.err.println(\"err on temp \" + temperature + \" and humid \" + humidity);\n t.printStackTrace();\n }\n case FOLIAGE:\n synchronized(world)\n {\n world.a().a(x, z, 1, 1);\n temperature = world.a().a[0];\n humidity = world.a().b[0];\n }\n try\n {\n // return ColorizerFoliage.getFoliageColor\n return colorMult(original, je.a(temperature, humidity));\n }\n catch (Throwable t)\n {\n System.err.println(\"err on temp \" + temperature + \" and humid \" + humidity);\n t.printStackTrace();\n }\n case PINE:\n return colorMult(original, je.a());\n case BIRCH:\n return colorMult(original, je.b());\n case REDSTONE:\n \n int blockmeta = world.e(x, y, z);\n // TODO: this could be integer math, instead of going to/from\n // float\n float floatmeta = (float)blockmeta / 15F;\n float r = floatmeta * 0.6F + 0.4F;\n if (blockmeta == 0)\n {\n r = 0.0F;\n }\n float g = floatmeta * floatmeta * 0.7F - 0.5F;\n float b = floatmeta * floatmeta * 0.6F - 0.7F;\n if (g < 0.0F)\n {\n g = 0.0F;\n }\n if (b < 0.0F)\n {\n b = 0.0F;\n }\n int tint = ((int)(b * 0xff)) + (((int)(g * 0xff)) << 8) + (((int)(r * 0xff)) << 16);\n return colorMult(original, tint);\n default:\n return original;\n }*/\n }",
"@Override\n public void simpleInitApp() {\n cam.setLocation(new Vector3f(-2.336393f, 11.91392f, -7.139601f));\n cam.setRotation(new Quaternion(0.23602544f, 0.11321983f, -0.027698677f, 0.96473104f));\n\n Material mat = new Material(assetManager,\"Common/MatDefs/Light/Lighting.j3md\");\n mat.setFloat(\"Shininess\", 15f);\n mat.setBoolean(\"UseMaterialColors\", true);\n mat.setColor(\"Ambient\", ColorRGBA.Yellow.mult(0.2f));\n mat.setColor(\"Diffuse\", ColorRGBA.Yellow.mult(0.2f));\n mat.setColor(\"Specular\", ColorRGBA.Yellow.mult(0.8f));\n\n Material matSoil = new Material(assetManager,\"Common/MatDefs/Light/Lighting.j3md\");\n matSoil.setFloat(\"Shininess\", 15f);\n matSoil.setBoolean(\"UseMaterialColors\", true);\n matSoil.setColor(\"Ambient\", ColorRGBA.Gray);\n matSoil.setColor(\"Diffuse\", ColorRGBA.Black);\n matSoil.setColor(\"Specular\", ColorRGBA.Gray);\n\n Spatial teapot = assetManager.loadModel(\"Models/Teapot/Teapot.obj\");\n teapot.setLocalTranslation(0,0,10);\n\n teapot.setMaterial(mat);\n teapot.setShadowMode(ShadowMode.CastAndReceive);\n teapot.setLocalScale(10.0f);\n rootNode.attachChild(teapot);\n\n Geometry soil = new Geometry(\"soil\", new Box(800, 10, 700));\n soil.setLocalTranslation(0, -13, 550);\n soil.setMaterial(matSoil);\n soil.setShadowMode(ShadowMode.CastAndReceive);\n rootNode.attachChild(soil);\n\n DirectionalLight light=new DirectionalLight();\n light.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());\n light.setColor(ColorRGBA.White.mult(1.5f));\n rootNode.addLight(light);\n\n // load sky\n Spatial sky = SkyFactory.createSky(assetManager, \"Textures/Sky/Bright/FullskiesBlueClear03.dds\", SkyFactory.EnvMapType.CubeMap);\n sky.setCullHint(Spatial.CullHint.Never);\n rootNode.attachChild(sky);\n\n FilterPostProcessor fpp = new FilterPostProcessor(assetManager);\n int numSamples = getContext().getSettings().getSamples();\n if (numSamples > 0) {\n fpp.setNumSamples(numSamples);\n }\n pf = new PosterizationFilter();\n fpp.addFilter(pf);\n\n viewPort.addProcessor(fpp);\n initInputs();\n\n }",
"private Color calcSpecularComp(double ks, Vector v, Vector normal, Vector l, double shininess, Color lightIntensity){\n Vector R = new Vector(l);\n normal.scale(2*l.dotProduct(normal));\n R.subtract(normal);\n v.normalize();\n R.normalize();\n double KsVdotR = ks * Math.pow(v.dotProduct(R), shininess);\n int red = Math.min(255,(int)(lightIntensity.getRed() * KsVdotR));\n red = Math.max(red, 0);\n int green = Math.min(255,(int)(lightIntensity.getGreen() * KsVdotR));\n green = Math.max(green, 0);\n int blue = Math.min(255,(int)(lightIntensity.getBlue() * KsVdotR));\n blue = Math.max(blue, 0);\n return new Color(red, green, blue);\n }",
"boolean hasAsset();"
] | [
"0.5942058",
"0.540328",
"0.53513426",
"0.53080916",
"0.52613425",
"0.5198626",
"0.51570326",
"0.5145549",
"0.509572",
"0.5086832",
"0.50412863",
"0.50335133",
"0.5024726",
"0.5017782",
"0.49583796",
"0.49559096",
"0.49450845",
"0.49330458",
"0.4932951",
"0.4929182",
"0.49217054",
"0.49186084",
"0.49076504",
"0.49060598",
"0.49060598",
"0.4893011",
"0.48842412",
"0.48815104",
"0.4880848",
"0.48688018",
"0.48651803",
"0.48632553",
"0.48422918",
"0.48304617",
"0.47996938",
"0.4794541",
"0.47932273",
"0.47814155",
"0.47776812",
"0.47776324",
"0.47758597",
"0.47751567",
"0.47701317",
"0.47693458",
"0.47662878",
"0.47528002",
"0.47491255",
"0.47489455",
"0.4748524",
"0.4739383",
"0.47238174",
"0.47203025",
"0.47181988",
"0.4713941",
"0.47132486",
"0.4711945",
"0.47101825",
"0.4705819",
"0.47050697",
"0.46938184",
"0.46847743",
"0.46832693",
"0.4675793",
"0.46710628",
"0.4665504",
"0.4665504",
"0.4665504",
"0.4665504",
"0.46517032",
"0.4649517",
"0.4641159",
"0.463255",
"0.46282846",
"0.46191755",
"0.46107575",
"0.46103087",
"0.4606549",
"0.46044528",
"0.4601886",
"0.46006787",
"0.45851666",
"0.4583806",
"0.4569011",
"0.45670506",
"0.45597002",
"0.45536456",
"0.45500994",
"0.45498887",
"0.45497954",
"0.4547934",
"0.45398918",
"0.45382306",
"0.453537",
"0.45258397",
"0.45218703",
"0.45197675",
"0.45154577",
"0.45137882",
"0.4513777",
"0.45114145",
"0.45085862"
] | 0.0 | -1 |
Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstate | @Override
public BlockState getStateForPlacement(World worldIn, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, LivingEntity placer)
{
BlockState basetype = this.getStateFromMeta(meta);
if (facing.getAxis().isHorizontal() /*&& this.canAttachTo(worldIn, pos.offset(facing.getOpposite()), facing)*/)
{
return basetype.withProperty(FACING, facing);
}
else
{
if(worldIn.getBlockState(pos.down()).getBlock() instanceof BlockTGLadder) {
BlockState statedown = worldIn.getBlockState(pos.down());
return basetype.withProperty(FACING, statedown.getValue(FACING));
} else if (worldIn.getBlockState(pos.up()).getBlock() instanceof BlockTGLadder) {
BlockState stateup = worldIn.getBlockState(pos.up());
return basetype.withProperty(FACING, stateup.getValue(FACING));
}
return basetype.withProperty(FACING, placer.getHorizontalFacing().getOpposite());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void setBlock(Block block) {\n super.setBlock(block);\n updateAffectedBlocks();\n }",
"private void setBlock(Block block) {\r\n this.block = block;\r\n }",
"private void setBlockMeta() {\n\t\tint meta = getBlockMetadata();\n\t\tForgeDirection dir = ForgeDirection.getOrientation(meta);\n\t\tif(dir != direction) {\n\t\t\tworldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, direction.ordinal(), 3);\n\t\t\tmarkDirty();\n\t\t}\n\t}",
"public void setBlock(Block newBlock) {\n\t\tthis.block = newBlock;\n\t}",
"public void setBlock(Block node) {\n setChild(node, 0);\n }",
"public void setBlock(Block node) {\n setChild(node, 0);\n }",
"public boolean setBlock(Block aNewBlock)\n {\n boolean wasSet = false;\n if (aNewBlock != null)\n {\n block = aNewBlock;\n wasSet = true;\n }\n return wasSet;\n }",
"Tetrisblock()\n {\n newblockparam();\n newmapparam();\n setboundary();\n }",
"@Override\n void setupState(TYPE firstItem) {\n currentItem = 0;\n }",
"public static void preInit() {\n registerBlocks();\n }",
"public void setBlock(int x, int y, int id) {\n\t\tint[] xy = expandTo(x, y);\n\t\tx = xy[0];\n\t\ty = xy[1];\n\n\t\tif(!checkCanBePlaced(x, y, id))\n\t\t\treturn;\n\n\t\tsetBlockRaw(x, y, id);\n\t\tsignalBlockChange(x, y);\n\t\tupdateSensors(x, y, id);\n\t\trenderer.resizeBuffer();\n\n\t\tBlock.getBlock(id).onPlace(x, y, this);\n\t\t\n\t\t//TODO break object into multiple parts.\n\t}",
"void beforeState();",
"void updateBlock(Block block) ;",
"public EntangledChaliceItem(Block block) {\n super(block);\n }",
"public void setDirtyBlock(int localX, int localY, int localZ) {\n\t\tif (this.dirtyBlocks.size() < MaxBlocksPerUpdate) {\n\t\t\tthis.dirtyBlocks.add(packAddress(localX, localY, localZ));\n\t\t}\n\t}",
"public void setBlock(boolean block) {\n this.block = block;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic <TileEntityType extends ATileEntityBase<JSONDefinition>, JSONDefinition extends AJSONMultiModelProvider> boolean setBlock(ABlockBase block, Point3d position, WrapperPlayer playerWrapper, Axis axis){\r\n \tif(!world.isRemote){\r\n \t\tBuilderBlock wrapper = BuilderBlock.blockMap.get(block);\r\n \t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n \t\tif(playerWrapper != null){\r\n \t\t\tWrapperPlayer player = playerWrapper;\r\n \t \tItemStack stack = playerWrapper.getHeldStack();\r\n \t \tAItemBase item = player.getHeldItem();\r\n \t \tEnumFacing facing = EnumFacing.valueOf(axis.name());\r\n \t \tif(!world.getBlockState(pos).getBlock().isReplaceable(world, pos)){\r\n \t pos = pos.offset(facing);\r\n \t position.add(facing.getXOffset(), facing.getYOffset(), facing.getZOffset());\r\n \t \t}\r\n \t \t\r\n\t if(item != null && player.player.canPlayerEdit(pos, facing, stack) && world.mayPlace(wrapper, pos, false, facing, null)){\r\n\t \tIBlockState newState = wrapper.getStateForPlacement(world, pos, facing, 0, 0, 0, 0, player.player, EnumHand.MAIN_HAND);\r\n\t \tif(world.setBlockState(pos, newState, 11)){\r\n\t\t \t//Block is set. See if we need to set TE data.\r\n\t\t \tif(block instanceof ABlockBaseTileEntity){\r\n\t\t \t\tBuilderTileEntity<TileEntityType> builderTile = (BuilderTileEntity<TileEntityType>) world.getTileEntity(pos);\r\n\t\t \t\tWrapperNBT data;\r\n\t\t \t\tif(stack.hasTagCompound()){\r\n\t\t \t\t\tdata = new WrapperNBT(stack);\r\n\t\t \t\t}else{\r\n\t\t \t\t\tdata = new WrapperNBT();\r\n\t\t \t\t\tif(item instanceof AItemPack){\r\n\t\t\t \t\t\tdata.setString(\"packID\", ((AItemPack<?>) item).definition.packID);\r\n\t\t\t\t \t\tdata.setString(\"systemName\", ((AItemPack<?>) item).definition.systemName);\r\n\t\t\t\t \t\tif(item instanceof AItemSubTyped){\r\n\t\t\t\t \t\t\tdata.setString(\"subName\", ((AItemSubTyped<?>) item).subName);\r\n\t\t\t\t \t\t}\r\n\t\t \t\t\t}\r\n\t\t \t\t}\r\n\t\t \t\tbuilderTile.tileEntity = (TileEntityType) ((ABlockBaseTileEntity) block).createTileEntity(this, position, player, data);\r\n\t\t \t}\r\n\t\t \t//Shrink stack as we placed this block.\r\n\t\t stack.shrink(1);\r\n\t\t return true;\r\n\t\t }\r\n\t }\r\n \t\t}else{\r\n \t\t\tIBlockState newState = wrapper.getDefaultState();\r\n \t\t\tif(world.setBlockState(pos, newState, 11)){\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \treturn false;\r\n }",
"public void blockedAndBlock(){\n\t\tif(player.isAttacking() && random(BASE_BLOCK_PERCENTAJE + ((double)difficulty)/10)){\n\t\t\tplayer.hasBeenBlocked();\n\t\t\tthis.setCurrentAnimation(\"blocked and prepare block_\" + orientation, FRAME_DURATION);\n\t\t\tmanageSword(\"blocked and prepare block\", 0, false);\n\t\t} else{\n\t\t\tthis.setCurrentAnimation(\"attack end blocked_\" + orientation, FRAME_DURATION);\n\t\t\tmanageSword(\"attack end blocked\", 0, false);\n\t\t}\n\t}",
"public void setBlockdef(BlocksFromSymbolsFactory levelBlockDef) {\n this.blockDef = levelBlockDef;\n }",
"public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)\n\t {\n\t this.func_150011_b(this.func_150012_g(world, x, y, z));\n\t }",
"public void setBlockAsChanged(Integer block_id) {\n this.addIntoQueue(block_id);\n this.getBlockByID(block_id).setShadow(null);\n // getBlockByID(block_id).deleteOutputValues();// this function is missing, but probably not necessary\n for (Type port : this.getBlockByID(block_id).outputs) {\n for(Type dst_port : port.getDst()) {\n dst_port.deleteValues();\n }\n for(Integer id : port.getAllDstID()) {\n this.setBlockAsChanged(id);\n }\n }\n }",
"public void setBlockAt(Location loc, BlockType type) {\n\t\tsetBlockAt(loc.getX(), loc.getY(), loc.getZ(), type);\n\t}",
"protected boolean setBlockIfValid(World world, BlockPos pos, IBlockState state) {\n\t\tif(world.getBlockState(pos).getBlockHardness(world, pos) >= 0) {\n\t\t\tthis.setBlockAndNotifyAdequately(world, pos, state);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void resetBlocks() {\n\t\tBLOCK_LIST.clear();\n\t}",
"@Override\n public boolean setBlockState(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {\n Block newBlock = BlockShuffleMod.BLOCK_PAIRS.getOrDefault(state.getBlock(),null);\n if (newBlock != null) {\n state = newBlock.getDefaultState();\n }\n Chunk chunk = this.getChunk(pos);\n BlockState blockState = chunk.setBlockState(pos, state, false);\n if (blockState != null) {\n this.world.onBlockChanged(pos, blockState, state);\n }\n\n Block block = state.getBlock();\n if (block.hasBlockEntity()) {\n if (chunk.getStatus().getChunkType() == ChunkStatus.ChunkType.field_12807) {\n chunk.setBlockEntity(pos, ((BlockEntityProvider) block).createBlockEntity(this));\n } else {\n CompoundTag compoundTag = new CompoundTag();\n compoundTag.putInt(\"x\", pos.getX());\n compoundTag.putInt(\"y\", pos.getY());\n compoundTag.putInt(\"z\", pos.getZ());\n compoundTag.putString(\"id\", \"DUMMY\");\n chunk.addPendingBlockEntityTag(compoundTag);\n }\n } else if (blockState != null && blockState.getBlock().hasBlockEntity()) {\n chunk.removeBlockEntity(pos);\n }\n\n if (state.shouldPostProcess(this, pos)) {\n this.markBlockForPostProcessing(pos);\n }\n\n return true;\n }",
"@Override\n\tpublic void resetBlocks() {\n\t\ttry {\n\t\t\tConnection conn = ZoneVolumeMapper.getZoneConnection(this, this.zone.getName());\n\t\t\tZoneVolumeMapper.reloadZoneBlocks(conn, this, 0, Integer.MAX_VALUE, null);\n\t\t} catch (SQLException ex) {\n\t\t\tWar.war.log(\"Failed to load warzone \" + zone.getName() + \": \" + ex.getMessage(), Level.WARNING);\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tWar.war.log(\"Reset warzone \" + this.zone.getName() + \".\", java.util.logging.Level.INFO);\n\t\tthis.isSaved = true;\n\t}",
"Tetrisblock2()\n {\n newblockparam();\n newmapparam();\n setboundary();\n }",
"private void revertState() {\r\n\t\tBlock block = this.state.getBlock();\r\n\t\t//If the block has been changed by the time we revert (e.g. block place). Also, we ignore fire since it isn't worth the time\r\n\t\tif (block.getType() != this.newData.getMaterial() && block.getType() != Material.FIRE && block.getType() != Material.SOUL_FIRE) {\r\n\t\t\t//Get the drops of the original block and drop them in the world\r\n\t\t\tGeneralMethods.dropItems(block, GeneralMethods.getDrops(block, this.state.getType(), this.state.getBlockData()));\r\n\t\t} else {\r\n\t\t\t//Previous Material was SNOW\r\n\t\t\tif (this.state.getType() == Material.SNOW){\r\n\t\t\t\tupdateSnowableBlock(block.getRelative(BlockFace.DOWN), true);\r\n\t\t\t}\r\n\r\n\t\t\t//Revert the original blockstate\r\n\t\t\tthis.state.update(true, applyPhysics(state.getType())\r\n\t\t\t\t\t&& !(state.getBlockData() instanceof Bisected));\r\n\t\t}\r\n\t}",
"public void initialize() {\r\n addSprite(this.info.getBackground());\r\n createBorders();\r\n defineDeathBlock();\r\n addIndicators();\r\n BlockRemover removeBlock = new BlockRemover(this, this.remainingBlocks);\r\n// this.remainingBlocks=removeBlock.getRemainingBlocks();\r\n ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(this.score);\r\n for (int i = 0; i < info.blocks().size(); i++) {\r\n info.blocks().get(i).addHitListener(removeBlock);\r\n info.blocks().get(i).addHitListener(scoreTrackingListener);\r\n info.blocks().get(i).addToGame(this);\r\n }\r\n }",
"public void begin(){\n\t\tTransaction block = new Transaction();\n\t\tblock.setPrev(blocks.getLast());\n\t\tblocks.add(block);\n\t}",
"@Override\r\n\tpublic void init() {\r\n\t\tif(pos.getBlock().getState() instanceof Sign)\r\n\t\t\tthis.items = getItem(((Sign)pos.getBlock().getState() ).getLines(), plugin.getLevel());\r\n\t\telse\r\n\t\t\tplugin.LogWarning(\"Missing sign !\");\r\n\t\t// TODO:Fix it, it should just \"display\" the item but make it not\r\n\t\t// lootable. We can loot it\r\n\t\t/*\r\n\t\t * if (!items.getItemStacks().isEmpty() && (droppedItem==null ||\r\n\t\t * droppedItem.isDead()) &&\r\n\t\t * plugin.getConfig().getBoolean(\"Signs.ShopSign.DropItem\", true)) {\r\n\t\t * for(ItemStack n : items.getItemStacks()) { droppedItem =\r\n\t\t * pos.getWorld().dropItem(pos, new ItemStack(item));\r\n\t\t * droppedItem.setVelocity(new Vector(0, 0, 0)); } }\r\n\t\t */\r\n\t}",
"@Override\r\n\tpublic void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {\r\n\t\tint meta = world.getBlockMetadata(x, y, z);\r\n\t\tboolean flag = getStateFromMeta(meta) == 1;\r\n\t\tfloat var6 = 0.0625F;\r\n\r\n\t\tif (flag) {\r\n\t\t\tthis.setBlockBounds(\r\n\t\t\t\t\tvar6,\r\n\t\t\t\t\t0.0F,\r\n\t\t\t\t\tvar6,\r\n\t\t\t\t\t1.0F - var6,\r\n\t\t\t\t\t0.03125F,\r\n\t\t\t\t\t1.0F - var6);\r\n\t\t} else {\r\n\t\t\tthis.setBlockBounds(\r\n\t\t\t\t\tvar6,\r\n\t\t\t\t\t0.0F,\r\n\t\t\t\t\tvar6,\r\n\t\t\t\t\t1.0F - var6,\r\n\t\t\t\t\t0.0625F,\r\n\t\t\t\t\t1.0F - var6);\r\n\t\t}\r\n\t}",
"protected final void setIDAndRender(Block block, int renderID, int x, int y, int z, int side)\n\t{\n\t\tthis.renderID = renderID;\n\t\tdelegateSideRender(block, x, y, z, side);\n\t}",
"@Override\r\n public void setDead()\r\n {\r\n if (!worldObj.isRemote && !this.isDead)\r\n {\r\n if (blocks != null)\r\n {\r\n for (ItemStack[][] barrarr : blocks)\r\n {\r\n for (ItemStack[] barr : barrarr)\r\n for (ItemStack b : barr)\r\n {\r\n if (b != null) this.entityDropItem(b, 0.5f);\r\n }\r\n }\r\n if (this.getHeldItem() != null) this.entityDropItem(getHeldItem(), 1);\r\n }\r\n }\r\n super.setDead();\r\n }",
"public void onBlockAdded(World world, int x, int y, int z){\n\t\t\tsuper.onBlockAdded(world, x, y, z);\n\t\t\tif (!world.isRemote && !world.isBlockIndirectlyGettingPowered(x, y, z)){ \n\t tile = (OrangeSirenTileEntity) world.getTileEntity(x, y, z); \n\t tile.setShouldStop(true);}\n\t\t\t\n\t if (!world.isRemote && world.isBlockIndirectlyGettingPowered(x, y, z)){ \n\t tile = (OrangeSirenTileEntity) world.getTileEntity(x, y, z); \n\t tile.setShouldStart(true);}\n\t\t}",
"public void updateMainBlock() {\n\t\tthis.mainblock = player.getWorld().getBlockAt(player.getLocation().add(0, -1, 0));\n\t}",
"default BlockState getSpecialState(Block block) { return block.defaultBlockState(); }",
"@Override\r\n public void setCacheBlocks(boolean b) {\n\r\n }",
"protected void onBlockPlace(BlockPlaceEvent event) {\n\t}",
"@Override\r\n public void preInit(FMLPreInitializationEvent e) {\n \tModBlocks.registerBlockModels();\r\n \tnet.minecraftforge.fml.client.registry.RenderingRegistry.registerEntityRenderingHandler(EntityTribeling.class, RenderTribeling.FACTORY);\r\n super.preInit(e);\r\n }",
"public Block() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t\tthis.point_BlockTopRight = null;\r\n\t\tthis.point_BlockDownleft = null;\r\n\t\tthis.setpoint_BlockTopLeft(null);\r\n\t\tthis.IDBloack = 0;\r\n\t\tthis.type = \"\";\r\n\t}",
"public void setBlockUnchecked(int x, int y, int id) {\n\t\tint[] xy = expandTo(x, y);\n\t\tx = xy[0];\n\t\ty = xy[1];\n\n\t\tsetBlockRaw(x, y, id);\n\t\tsignalBlockChange(x, y);\n\t\tupdateSensors(x, y, id);\n\t\trenderer.resizeBuffer();\n\t}",
"public void setBlock(final int aX, final int aY, final short aId)\r\n\t{\r\n\t\tmBlocks[aX][aY] = aId;\r\n\t}",
"public void setBlockRecord() {\r\n\t\t\tthis.blockRecord = new ArrayList<BlockList>();\r\n\t\t}",
"private void trueRevertBlock() {\r\n\t\tthis.reverted = true;\r\n\t\tif (instances_.containsKey(this.block)) {\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> {\r\n\t\t\t\tTempBlock last = instances_.get(this.block).getLast();\r\n\t\t\t\tthis.block.setBlockData(last.newData); //Set the block to the next in line TempBlock\r\n\t\t\t});\r\n\t\t} else { //Set to the original blockstate\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> revertState());\r\n\t\t}\r\n\r\n\t\tREVERT_QUEUE.remove(this);\r\n\t\tif (this.revertTask != null) {\r\n\t\t\tthis.revertTask.run();\r\n\t\t}\r\n\r\n\t\tfor (TempBlock attached : attachedTempBlocks) {\r\n\t\t\tattached.revertBlock();\r\n\t\t}\r\n\t}",
"public Block(){\r\n\t\tthis.altitude = 0;\r\n\t\tthis.river = false;\t\r\n\t\tthis.ocean = false;\r\n\t\tthis.river = false;\r\n\t\tborder = false;\r\n\t}",
"@Override\r\n\tpublic void onBlockHit(Block block) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onBlockHit(Block block) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onBlockHit(Block block) {\n\t\t\r\n\t}",
"@EventHandler(priority = EventPriority.MONITOR)\n public void onPlaceFirstBlockNotify(BlockPlaceEvent event) {\n if (event.isCancelled()) return;\n Block block = event.getBlock();\n Player player = event.getPlayer();\n if (!player.hasPermission(\"lockettepro.lock\")) return;\n if (Utils.shouldNotify(player) && Config.isLockable(block.getType())) {\n switch (Config.getQuickProtectAction()) {\n case (byte) 0 -> Utils.sendMessages(player, Config.getLang(\"you-can-manual-lock-it\"));\n case (byte) 1, (byte) 2 -> Utils.sendMessages(player, Config.getLang(\"you-can-quick-lock-it\"));\n }\n }\n }",
"public void setPosition(double x, double y, double z) {\n super.setPosition(x, y, z);\n if (this.dataManager != null && this.ticksExisted != 0) {\n Optional<BlockPos> optional = this.dataManager.get(ATTACHED_BLOCK_POS);\n if (this.isAddedToWorld() && this.world instanceof net.minecraft.world.server.ServerWorld) ((net.minecraft.world.server.ServerWorld)this.world).chunkCheck(this); // Forge - Process chunk registration after moving.\n Optional<BlockPos> optional1 = Optional.of(new BlockPos(x, y, z));\n if (!optional1.equals(optional)) {\n this.dataManager.set(ATTACHED_BLOCK_POS, optional1);\n this.dataManager.set(PEEK_TICK, (byte)0);\n this.isAirBorne = true;\n }\n\n }\n }",
"@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)\n public void onBlockPlace(BlockPlaceEvent event) {\n if (event.getBlock().getType() == Material.IRON_BLOCK) {\n\n running = true;\n\n Location location = event.getBlock().getLocation();\n int size = Options.ARENA_SIZE;\n\n // Set our Y to where we won't collide with anything.\n location.setY(location.getWorld().getHighestBlockYAt(location));\n\n for (int x = -size / 2; x <= size / 2; x++) {\n for (int z = -size / 2; z <= size / 2; z++) {\n int maxY = (x == -size / 2 || z == -size / 2 || x == size / 2 || z == size / 2) ? 5 : 1;\n\n for (int y = 0; y < maxY; y++) {\n Block block = location.clone().add(x, y, z).getBlock();\n\n if (y == 0) {\n block.setType(Material.NETHERRACK);\n } else {\n block.setType(Material.IRON_FENCE);\n }\n }\n }\n }\n\n Player player = event.getPlayer();\n\n player.getInventory().clear();\n player.getActivePotionEffects().clear();\n player.setGameMode(GameMode.ADVENTURE);\n player.teleport(location.clone().add(5, 1, 0));\n\n player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(ChatColor.RED + \"An arena appears...\"));\n\n Options.KIT_ITEMS.forEach(itemStack -> player.getInventory().addItem(itemStack.clone()));\n \n updateArmor(player);\n\n Bukkit.getScheduler().scheduleSyncDelayedTask(Plugin.getInstance(), () -> {\n Location spawnLocation = location.clone().add(0, 1, 0);\n\n SpawnControl point = new SpawnControl(spawnLocation);\n NPCController controller = new NPCController(player.getUniqueId(), point);\n\n NPCRegistry.getInstance().register(controller);\n });\n\n event.setBuild(false);\n }\n }",
"public abstract void setNextBlockInstant();",
"@Override\r\n\tprotected boolean shouldBlock(Entity e) {\n\t\treturn super.shouldBlock(e);\r\n\t}",
"public void BeforeClearSpaceBlockReplaced(BlockPos pos) {\n }",
"public void setPosition(BlockVector position)\n {\n this.position = position;\n }",
"public void markTileEntityChanged(Point3d position){\r\n\t\tworld.getTileEntity(new BlockPos(position.x, position.y, position.z)).markDirty();\r\n\t}",
"void reset() {\n blocks.clear();\n }",
"public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)\r\n {\r\n super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n// this.func_149930_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n }",
"public static void initializeBlockFields() {\n KitchenMod.LOGGER.log(\"Initializing static block fields\");\n KMComposterBlock.rinit();\n\n StakeBlock.registerPlant(GRAPE_VINE);\n StakeBlock.registerPlant(TOMATO_VINE);\n StakeBlock.registerPlant(VANILLA_VINE);\n }",
"@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\n\tpublic void onPlaceBlock(BlockPlaceEvent e) {\n\t\tBlock block = e.getBlock();\n\n\t\tMaterial blockMaterial = block.getType();\n\t\tint x = block.getX();\n\t\tint y = block.getY();\n\t\tint z = block.getZ();\n\t\tWorldChunk chunk = CropControl.getDAO().getChunk(block.getChunk());\n\n\t\tif (CropControl.getDAO().isTracked(block) == true) {\n\t\t\t// We've got a replacement\n\t\t\tCropControl.getPlugin().debug(\"Ghost object? Placement is overtop a tracked object at {0}, {1}, {2}\", x, y, z);\n\t\t\thandleRemoval(block, chunk);\n\t\t}\n\t\tif (harvestableCrops.containsKey(blockMaterial)) {\n\t\t\t// we placed a block overtop an existing crop. Will be handled by a break event?\n\t\t\t/*Crop crop = chunk.getCrop(x, y, z);\n\t\t\tif (crop != null) {\n\t\t\t\tcrop.setRemoved();\n\t\t\t\tCropControl.getPlugin().debug(\"Missed an event? Replacing a Crop at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t\n\t\t\t// We've placed a crop!\n\t\t\tCrop.create(chunk, x, y, z, blockMaterial.toString(), getBaseCropState(blockMaterial),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis(), harvestableCrops.get(blockMaterial));\n\t\t} else if (blockMaterial == Material.SAPLING) {\n\t\t\t// we placed a block overtop an existing sapling. TODO: Do I need to remove sapling here, or will there be a break event?\n\t\t\t/*Sapling sapling = chunk.getSapling(x, y, z);\n\t\t\tif (sapling != null) {\n\t\t\t\tsapling.setRemoved();\n\t\t\t\tCropControl.getPlugin().debug(\"Missed an event? Replacing a Sapling at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t// We've placed a sapling!\n\t\t\tSapling.create(chunk, x, y, z, getSaplingType(block.getData()),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis(), false);\n\t\t} else if (blockMaterial == Material.CHORUS_FLOWER) {\n\t\t\t/*if (CropControl.getDAO().isTracked(block) == true) {\n\t\t\t\tCropControl.getPlugin().debug(\"Ghost object? Placement is overtop a tracked object at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t\n\t\t\t// TODO: Check if connected to an existing chorus tree.\n\n\t\t\t// First register the \"tree\"\n\t\t\tTree chorusPlant = Tree.create(chunk, x, y, z, Material.CHORUS_PLANT.toString(),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis());\n\n\t\t\t// Then the component in the tree.\n\t\t\tTreeComponent.create(chorusPlant, chunk, x, y, z, Material.CHORUS_PLANT.toString(),\n\t\t\t\t\te.getPlayer().getUniqueId(), false);\n\t\t} else if (blockMaterial.isSolid()){ // check for cactus.\n\t\t\tfor (BlockFace face : CropControlEventHandler.directions) {\n\t\t\t\tBlock adj = block.getRelative(face);\n\t\t\t\tif (Material.CACTUS == adj.getType()) {\n\t\t\t\t\tLocation loc = adj.getLocation();\n\t\t\t\t\tif (!pendingChecks.contains(loc)) {\n\t\t\t\t\t\tpendingChecks.add(loc);\n\t\t\t\t\t\thandleBreak(adj, BreakType.PLAYER, e.getPlayer().getUniqueId(), null);\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void setBlockRaw(int x, int y, int id) {\n\t\tnumber -= getBlock(x, y).getTextureLayers(x, y, this);\n\n\t\tblocks[x + width * y] = id;\n\n\t\tnumber += Block.getBlock(id).getTextureLayers(x, y, this);\n\n\t\tFixtureDef[] fd = Block.getBlock(id).getPhysics(x, y, this);\n\n\t\tif(fd != null) {\n\t\t\tcreateFixture(fd);\n\t\t} else {\n\t\t\tif(hasBlockAdjacent(x, y)) {\n\t\t\t\tcreateSensor(x, y);\n\t\t\t}\n\t\t}\n\t}",
"public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {\n\t\tint var5 = par1IBlockAccess.getBlockMetadata(par2, par3, par4) & 7;\n\t\tfloat var6 = (float) (2 * (1 + var5)) / 16.0F;\n\t\tthis.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, var6, 1.0F);\n\t}",
"@Override\r\n public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {\r\n if (state.getBlock() != newState.getBlock()) {\r\n BlockEntity blockEntity = world.getBlockEntity(pos);\r\n if (blockEntity instanceof PresentTileEntity) {\r\n ItemScatterer.spawn(world, pos, (PresentTileEntity)blockEntity);\r\n // update comparators\r\n world.updateComparators(pos,this);\r\n }\r\n super.onStateReplaced(state, world, pos, newState, moved);\r\n }\r\n }",
"public void changeEnvironmentTypeToBlock() {\n this.setEnvironmentType(EnvironmentTypesList.getBlockEnvironmentType());\n }",
"private void init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }",
"public void a(World world, BlockPosition blockposition, IBlockData iblockdata, int i) {\n/* 211 */ changeLevel(world, blockposition, iblockdata, i, (Entity)null, CauldronLevelChangeEvent.ChangeReason.UNKNOWN);\n/* */ }",
"@Override\n public void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {\n Minecraft.getInstance().execute(() -> {\n for (Direction d : Direction.values()) {\n IlluminateClient.instance().addLight(new LightBlockLight(level, blockPos, d));\n }\n });\n }",
"@Override\n public void setChanged() {\n set(getItem());\n }",
"public BlockChanger(HashMap<Fluid, ChangedBlocks> bc, FluidFlow p) {\n\t\tblockChanges = bc;\n\t\tplugin = p;\n\n\t\trunTime = plugin.getConfig().getInt(\"BlockChanger.runTime\", runTime);\n\t\tchangeCountPerIter = plugin.getConfig().getInt(\"BlockChanger.changeCountPerIter\", changeCountPerIter);\n\t\tplugin.getConfig().save();\n\t}",
"@Override\r\n public void initCreature() \r\n {\n \t\r\n if ( worldObj.provider.dimensionId == 1 && worldObj.rand.nextInt( 5 ) == 0 )\r\n \t{\r\n \tsetCarried( Block.whiteStone.blockID );\r\n \tsetCarryingData( 0 );\r\n \t}\r\n }",
"public static void init()\n {\n oreStarSteel = new BlockOreStarSteel(MSAConfig.ores, Material.rock);\n storageStarSteel = new BlockStorageStarSteel(MSAConfig.storageBlock, Material.iron);\n // tech blocks\n launchTower = new BlockLaunchTower(MSAConfig.launchTower, Material.iron);\n launchTowerController = new BlockLaunchControl(MSAConfig.launchController, Material.iron);\n rocketAssembler = new BlockRocketAssembler(MSAConfig.rocketAssembler, Material.iron);\n comSatellite = new BlockComSatellite(MSAConfig.comSatellite, Material.iron);\n ssBuilding = new BlockSSBuilding(MSAConfig.ssBuilding, Material.rock);\n commandCenter = new BlockCommandCenter(MSAConfig.commandCenter, Material.iron);\n\n /* Register Blocks */\n // ore blocks\n GameRegistry.registerBlock(oreStarSteel, \"oreStarSteel\");\n GameRegistry.registerBlock(storageStarSteel, \"storageStarSteel\");\n // tech blocks\n GameRegistry.registerBlock(launchTower, \"launchTower\");\n GameRegistry.registerBlock(launchTowerController, \"launchTowerController\");\n GameRegistry.registerBlock(rocketAssembler, \"rocketAssembler\");\n GameRegistry.registerBlock(comSatellite, \"comSatellite\");\n GameRegistry.registerBlock(ssBuilding, \"ssBuilding\");\n GameRegistry.registerBlock(commandCenter, \"commandCenter\");\n\n /* Set block harvest level */\n // ore blocks\n MinecraftForge.setBlockHarvestLevel(oreStarSteel, \"pickaxe\", 2);\n MinecraftForge.setBlockHarvestLevel(storageStarSteel, \"pickaxe\", 2);\n // building blocks\n MinecraftForge.setBlockHarvestLevel(ssBuilding, \"pickaxe\", 2);\n // tech blocks\n MinecraftForge.setBlockHarvestLevel(launchTower, \"pickaxe\", 1);\n }",
"public void blockAdded(Response block) {\n try {\n long id = block.getId(\"block\");\n blockList.add(0, block);\n blockMap.put(block.getId(\"block\"), block);\n fireTableRowsInserted(0, 0);\n } catch (IdentifierException exc) {\n // Ignore the block\n }\n }",
"public void enterHatchingState() {\n\n\t}",
"public void setBlocks(Block[][][] blocks)\n\t{\n\t\tthis.blocks = blocks;\n\t}",
"@Override\r\n\tpublic void onBlockHit(Block block) {\n\r\n\t}",
"public void fillBlock(TYPE typeOfBlock){\n isFull=true;\n type=typeOfBlock;\n return;\n }",
"void blockState(BooleanFormula pState, int pMaxLevel, CFANode pLocation);",
"@Override\n\tpublic boolean onUseBonemeal(World world, int blockID, int X, int Y, int Z) {\n\t\treturn false;\n\t}",
"public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {\n\t\tif (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1) == this) {\n\t\t\tthis.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F);\n\t\t} else if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1) == this) {\n\t\t\tthis.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F);\n\t\t} else if (p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_) == this) {\n\t\t\tthis.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);\n\t\t} else if (p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_) == this) {\n\t\t\tthis.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F);\n\t\t} else {\n\t\t\tthis.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);\n\t\t}\n\t}",
"public void setBlockBoundsForItemRender() {\n\t\tthis.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);\n\t}",
"public static void initialize()\n {\n CHUNK_LOADER = new ChunkLoader();\n //VILLAGE_INDICATOR = new VillageIndicator();\n\n BLOCK_LIST.add(CHUNK_LOADER);\n //BLOCK_LIST.add(VILLAGE_INDICATOR);\n Log.info(\"=========================================================> Initialized Blocks\");\n }",
"public synchronized void block() {\n\t\tsetBlocked(true);\n\t}",
"private void setBlocks() {\n // load the class\n ClassLoader cl = ClassLoader.getSystemClassLoader();\n // create an InputStream object\n InputStream inputStream = cl.getResourceAsStream(this.map.get(\"block_definitions\"));\n // initialize this factory with a factory\n this.factory = BlocksDefinitionReader.fromReader(new InputStreamReader(inputStream));\n try {\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"public Block()\n {\n this.blockType = BlockType.AIR;\n }",
"private void initialState() {\n forEach(item -> item.setInKnapsack(false));\n\n for (final Item item : this) {\n if (wouldOverpack(item)) {\n break;\n }\n item.switchIsKnapsack();\n }\n }",
"public void testSetState() {\r\n try {\r\n address.setState(null);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }",
"private static void registerBlock(Block b)\n\t{\n\t}",
"protected void a(IBlockData iblockdata, World world, BlockPosition blockposition, Block block) {\n/* 103 */ boolean flag = ((Boolean)iblockdata.get(POWERED)).booleanValue();\n/* 104 */ boolean flag1 = (world.isBlockIndirectlyPowered(blockposition) || a(world, blockposition, iblockdata, true, 0) || a(world, blockposition, iblockdata, false, 0));\n/* */ \n/* 106 */ if (flag1 != flag) {\n/* */ \n/* 108 */ int power = flag ? 15 : 0;\n/* 109 */ int newPower = CraftEventFactory.callRedstoneChange(world, blockposition, power, 15 - power).getNewCurrent();\n/* 110 */ if (newPower == power) {\n/* */ return;\n/* */ }\n/* */ \n/* 114 */ world.setTypeAndData(blockposition, iblockdata.set(POWERED, Boolean.valueOf(flag1)), 3);\n/* 115 */ world.applyPhysics(blockposition.down(), this);\n/* 116 */ if (((BlockPropertyTrackPosition)iblockdata.get(SHAPE)).c()) {\n/* 117 */ world.applyPhysics(blockposition.up(), this);\n/* */ }\n/* */ } \n/* */ }",
"private void setWaitState() {\r\n state = WAITFORBALL;\r\n game.waitingForBall.addFirst(this);\r\n }",
"public void setBlockService(BlockService blockService) {\n _blockService = blockService;\n }",
"private void init() {\n StateManager.setState(new MenuState());\n }",
"private void setMechanicState(MechanicState state) {\r\n if (this.state == state) {\r\n return;\r\n }\r\n this.state = state;\r\n }",
"@Override\n\tpublic void postinit(FMLPostInitializationEvent event) {\n\t\t\n\t\tRenderItem renderItem = Minecraft.getMinecraft().getRenderItem();\n\t\t\n\t\t//blocks\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.bonepile), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockBonePile) TCMBlocks.bonepile).getName(), \"inventory\"));\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.obsidianpressureplate), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockObsidianPressurePlate) TCMBlocks.obsidianpressureplate).getName(), \"inventory\"));\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.invisiblepressureplate), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockInvisiblePressurePlate) TCMBlocks.invisiblepressureplate).getName(), \"inventory\"));\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.crystaltorch), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockCrystalTorch) TCMBlocks.crystaltorch).getName(), \"inventory\"));\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.solidglass), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockSolidGlass) TCMBlocks.solidglass).getName(), \"inventory\"));\n\n\t\t//items\n\t\trenderItem.getItemModelMesher().register(TCMItems.firestaff, 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((ItemFireStaff) TCMItems.firestaff).getName(), \"inventory\"));\n\n\t}",
"public void setBlock(int b, int block[][]){\n\t\tfor (int i = 0; i < size; i++){\n\t\t\tfor (int j = 0; j < size; j++){\n\t\t\t\tnumbers[i+size*(b/size)][j+size*(b%size)] =\n\t\t\t\t\tblock[i][j];\n\t\t\t}\n\t\t}\n\t}",
"public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {\n/* 94 */ IBlockState iblockstate = worldIn.getBlockState(pos.offset(facing.getOpposite()));\n/* */ \n/* 96 */ if (iblockstate.getBlock() == Blocks.END_ROD) {\n/* */ \n/* 98 */ EnumFacing enumfacing = (EnumFacing)iblockstate.getValue((IProperty)FACING);\n/* */ \n/* 100 */ if (enumfacing == facing)\n/* */ {\n/* 102 */ return getDefaultState().withProperty((IProperty)FACING, (Comparable)facing.getOpposite());\n/* */ }\n/* */ } \n/* */ \n/* 106 */ return getDefaultState().withProperty((IProperty)FACING, (Comparable)facing);\n/* */ }",
"public void setItemInHand ( ItemStack item ) {\n\t\tPlayer handle = handle ( );\n\t\t\n\t\tif ( handle != null ) {\n\t\t\ttry {\n\t\t\t\tsafeGetMethod ( PlayerInventory.class , \"setItemInMainHand\" , new Class[] { ItemStack.class } )\n\t\t\t\t\t\t.invoke ( handle.getInventory ( ) , item );\n\t\t\t} catch ( Exception e ) {\n\t\t\t\ttry {\n\t\t\t\t\tsafeGetMethod ( PlayerInventory.class , \"setItemInHand\" , new Class[] { ItemStack.class } )\n\t\t\t\t\t\t\t.invoke ( handle.getInventory ( ) , item );\n\t\t\t\t} catch ( IllegalAccessException | InvocationTargetException ex ) {\n\t\t\t\t\tex.printStackTrace ( );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public Block(){\n\t\tthis.type = Code.Type.NULL;\n\t}",
"final protected void setEntityState(int newState)\n {\n state = newState;\n }",
"public void onPlaced(BlockPos p, IBlockState bs, EntityLivingBase elb, ItemStack st) {\n\t}",
"public Block( ) {\r\n _offSetRow = 0;\r\n _offSetCol = 0;\r\n _noOfRows = 0;\r\n _noOfCols = 0;\r\n }"
] | [
"0.70910656",
"0.6940367",
"0.65332955",
"0.6448414",
"0.6351183",
"0.6351183",
"0.62240064",
"0.61651",
"0.6119574",
"0.60838467",
"0.6055553",
"0.60439223",
"0.59994984",
"0.59754306",
"0.5965866",
"0.5960975",
"0.5957845",
"0.59066993",
"0.5906006",
"0.5903079",
"0.58990777",
"0.589091",
"0.588947",
"0.5878424",
"0.58666",
"0.58577675",
"0.57274854",
"0.569654",
"0.5664564",
"0.5655946",
"0.56181645",
"0.56099623",
"0.5599141",
"0.5594096",
"0.55934113",
"0.55885494",
"0.5584941",
"0.55797404",
"0.55297095",
"0.55246025",
"0.552104",
"0.5506598",
"0.5505138",
"0.5504902",
"0.55011845",
"0.54996574",
"0.5495843",
"0.5495843",
"0.5495843",
"0.54854256",
"0.54812014",
"0.5471149",
"0.5464902",
"0.54584",
"0.54470545",
"0.5440728",
"0.5436764",
"0.54313004",
"0.54246527",
"0.5417452",
"0.54146355",
"0.539609",
"0.539592",
"0.5394713",
"0.53943944",
"0.5394193",
"0.5385077",
"0.5380882",
"0.537864",
"0.5378561",
"0.53763133",
"0.53721076",
"0.53699845",
"0.5369366",
"0.5363969",
"0.5359142",
"0.53576374",
"0.53441286",
"0.5335162",
"0.53335494",
"0.5328369",
"0.53261817",
"0.53196394",
"0.5317572",
"0.5308598",
"0.5298741",
"0.5292944",
"0.528824",
"0.5285132",
"0.5281518",
"0.52813846",
"0.52718836",
"0.52635616",
"0.5256353",
"0.5253763",
"0.5250736",
"0.5244452",
"0.5242748",
"0.5240567",
"0.5239784",
"0.52378815"
] | 0.0 | -1 |
============== PUBLIC METHODS ============== | public User() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n protected void init() {\n }",
"private stendhal() {\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void init() {}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override public int describeContents() { return 0; }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void initialize() {\n \n }",
"public contrustor(){\r\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n public void initialize() { \n }",
"private TMCourse() {\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"private Singletion3() {}",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n public void load() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\n protected void initData() {\n }",
"@Override\n protected void initData() {\n }"
] | [
"0.64050686",
"0.639706",
"0.63043314",
"0.62241215",
"0.62241215",
"0.62241215",
"0.62241215",
"0.62241215",
"0.62241215",
"0.6220222",
"0.60958487",
"0.60656554",
"0.60618013",
"0.60580117",
"0.60580117",
"0.605457",
"0.6048392",
"0.6042568",
"0.602626",
"0.6011159",
"0.60089767",
"0.60057837",
"0.60018724",
"0.59905523",
"0.59867907",
"0.59711105",
"0.5970437",
"0.5941333",
"0.5934355",
"0.5933577",
"0.59285253",
"0.59285253",
"0.59252024",
"0.59252024",
"0.5921854",
"0.5914771",
"0.5914771",
"0.59082174",
"0.5887798",
"0.5872945",
"0.58589375",
"0.5852987",
"0.58387065",
"0.5828004",
"0.58259857",
"0.58259857",
"0.58259857",
"0.5811267",
"0.5804985",
"0.5802526",
"0.5802526",
"0.5802526",
"0.5801044",
"0.57923824",
"0.5792063",
"0.57911026",
"0.57854325",
"0.57637054",
"0.5760034",
"0.5760034",
"0.5757854",
"0.5757779",
"0.57553273",
"0.5753984",
"0.5753984",
"0.57387376",
"0.5738026",
"0.5737175",
"0.573406",
"0.573406",
"0.573406",
"0.573406",
"0.573406",
"0.5722004",
"0.5722004",
"0.5722004",
"0.5722004",
"0.5722004",
"0.5722004",
"0.5721636",
"0.57204944",
"0.57204944",
"0.5719279",
"0.5712674",
"0.5712674",
"0.5712674",
"0.5712674",
"0.5712674",
"0.5712674",
"0.5712674",
"0.5712674",
"0.5712674",
"0.5712674",
"0.5712289",
"0.57001746",
"0.5698987",
"0.569632",
"0.5693092",
"0.5690286",
"0.56891537",
"0.56891537"
] | 0.0 | -1 |
public abstract void changeWarehouseAmount(int productID, int decrementNumber) throws GettingDataFailedException, WarehouseProductAmountException; | public abstract void setWarehouseAmount(int productID, int newAmount) throws GettingDataFailedException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ProductWithStockItemTO changePrice(long storeID, StockItemTO stockItemTO) throws NotInDatabaseException, UpdateException;",
"public abstract void setstockNumber();",
"public void updateWarehouse(Warehouse warehouse, boolean inverse) ;",
"void update(Product product) throws IllegalArgumentException;",
"public void sell(int number) {\r\n quantity -= number;\r\n }",
"public void sellProduct(){\n if(quantity > 0)\n this.quantity -= 1;\n else\n throw new IllegalArgumentException(\"Cannot sell \"+ this.model +\" with no inventory\");\n\n }",
"@Override\n\tpublic void Update(Warehouse ware) {\n\t\ttry {\n\t\t\t success=0;\n\t\t\t success=1;\n\t\t\tgetSqlMapClientTemplate().update(\"Warehouse.updateWarehouse\", ware);\n\t\t\t\n\n\t\t} catch (Exception ex) {\n\t\t\n\t\t\t success=0;\n\n\t\t}\n\n\t}",
"@Override\r\n public void dispenseProduct() {\r\n System.out.println(\"Insufficient funds!\");\r\n\r\n }",
"@Override\n\tpublic void modify(int quantity) {\n\t}",
"@Override\n\tpublic void modifyWarehouseInfo(WarehouseTO warehouseTO) {\n\t\t\n\t}",
"public void stock(int number) {\r\n quantity += number;\r\n }",
"@Override\n\tpublic void dispenseChange(String productCode) {\n\t\t\n\t}",
"public Integer updateProductSales(Long productId) throws Exception;",
"public void decrementAmount() {\n this.amount--;\n amountSold++;\n }",
"@Override\r\n\tpublic int updateProduct(Product product) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic int updateInventory(int tranNo, int amount) throws Exception {\n\t\treturn 0;\n\t}",
"private void reduceQuantity(Context context, Uri productUri, int currentQuantity) {\n\n // Reduce stock, check if new stock is less than 0, in which case set it to 0\n int newStock = (currentQuantity >= 1) ? currentQuantity - 1 : 0;\n\n // Update table with new stock of the product\n ContentValues contentValues = new ContentValues();\n contentValues.put(ProductEntry.COLUMN_PRODUCT_QUANTITY, newStock);\n int numRowsUpdated = context.getContentResolver().update(productUri, contentValues, null, null);\n\n// // Display error message in Log if product stock fails to update\n// if (!(numRowsUpdated > 0)) {\n// Log.e(TAG, context.getString(R.string.error_quantity_update));\n// }\n }",
"@Override\n\tpublic int reduceStock(Integer id, Integer quantity) {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\t \n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"update product set stock=stock-? where id=?\");\n\t\t\tpst.setInt(1,quantity);\n\t\t\tpst.setInt(2, id);\n\t\t\t\n\t\n\t\t\treturn pst.executeUpdate();\n\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n public void changeQuantity(Product product, int position) {\n changeProductQuantity(product, -1);\n }",
"public void editProduct(int index, String description, String category, int quantity, int weight, int price, int stocknumber) {\t\t\n\t}",
"public void addWarehouseStock(String name, int amount);",
"public void decreaseQuantity() {\n this.quantity--;\n this.updateTotalPrice();\n }",
"@Override\n public void updateProduct(TradingQuote tradingQuote) {\n }",
"@Override\r\n\tpublic void updatePurchase(Purchase Purchase) throws Exception {\n\t\t\r\n\t}",
"public abstract int getCostToUpgrade();",
"public int adjustQuantitiesInDB(Ingredient ingredient, int givenQuantity)throws SQLException{ //adds a current type of ingredient to database takes in quantity and ingredient object \r\n\t\tint newQuantity;\r\n\t\tString requiredIngredientName = ingredient.getName();\r\n\t\tString sqlUpdate = \"update stock_ingredients set quantity = quantity + \" + givenQuantity + \" where name = \" + \"'\" + requiredIngredientName + \"'\";\r\n\t\t\t\r\n\t\t//find correct syntax for increasing the quantity by x amount\r\n\r\n\t\tConnection connection = connectToDB(databaseUser, databasePass);\r\n\r\n\t\tPreparedStatement ps = connection.prepareStatement(sqlUpdate);\r\n\r\n\t\tps.executeUpdate();\r\n\r\n\t\tnewQuantity = checkCurrentStockLevels(ingredient);\r\n\r\n\t\tconnection.close();\r\n\t\t\r\n\t\treturn newQuantity;\r\n\r\n\t}",
"public void changeQuantity(int difference) {\n\t\tquantity += difference;\n\t\t\n\t\tif (quantity < 0)\n\t\t\tquantity = 0;\n\t}",
"@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}",
"@Override\n public String getDescription() {\n return \"Digital goods quantity change\";\n }",
"public void decreaseQuantity(int amount) {\n this.currentQuantity -= amount;\n }",
"@Override\n void updateStockLevels(){\n for(OrderLine orderLine : products){\n Product p = orderLine.getProduct();\n //remove quantity ordered from stock levels\n p.updateNumInStock(-orderLine.getQuantity());\n }\n }",
"public abstract void decrement(int delta);",
"public void addFuel(int quantity) throws Exception;",
"void deduct(String name, Integer amount);",
"public void actualizarStock(Long idProducto, Long cantidad) {\n\t\t\n\t}",
"int getSellQuantity();",
"@Test\n\tpublic void testUpdateStock() {\n\t\tStock stock = null;\n\t\tString productId = \"HY-1004\";\n\t\tTestFactory tf = new TestFactory();\n\t\tEntityManager em = emf.createEntityManager();\n\t\ttry {\n\t\t\tif (!tf.createStock(em, productId)) {\n\t\t\t\tfail(\"Unable to create \"); // doubt\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tem.getTransaction().begin();\n\t\t\t// Find Stock for update\n\t\t\tstock = em.find(Stock.class, productId);\n\t\t\t// Update Business Partner\n\t\t\tstock.setQuantity(BigDecimal.valueOf(10));\n\t\t\tem.persist(stock);\n\t\t\tem.getTransaction().commit();\n\t\t\t// Find Business Partner after update\n\t\t\tstock = em.find(Stock.class, productId);\n\t\t\tassertEquals(\n\t\t\t\t\t\"Update Stock: Stock attribute quantity not updated in the database\",\n\t\t\t\t\tBigDecimal.valueOf(10), stock.getQuantity());\n\t\t\ttf.deleteStock(em, productId);\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\n\t}",
"public void updateDB(int orderID, String prodID, String quantity) {\r\n try {\r\n String sql = \"UPDATE EmpOrders SET EmpOrderID = '\" + orderID + \"', ProductID = '\"\r\n + prodID + \"', QuanitityNeeded = '\" + quantity + \"'\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }",
"void updateWarehouseDepot(String username, LightWarehouseDepot warehouseDepot);",
"@Modifying(clearAutomatically = true)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity - ?1 WHERE i =?2\")\n int deductFromStock(double qty, Item item);",
"public abstract void Upgrade(Tower t);",
"@Test\n public void testDecrementInventory() throws Exception {\n int firstDecrement;\n int secondDecrement;\n\n List<VendingItem> items;\n VendingItem twix;\n\n try {\n fillInventoryFileWithTestData(VALID);\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n }\n\n items = dao.getItems();\n\n assertEquals(1, items.size());\n\n twix = items.get(0);\n\n // firstDecrement = 19\n firstDecrement = twix.decrementStock();\n\n // secondDecrement = 18\n secondDecrement = twix.decrementStock();\n\n assertEquals(1, firstDecrement - secondDecrement);\n }",
"public void accountSale(long storeID, final SaleTO sale) throws ProductOutOfStockException, NotInDatabaseException, UpdateException;",
"private void updateProduct(Product productUpdated, int productId) {\n try {\n ConDB conn = new ConDB();\n String query = \"UPDATE products SET productName = ?,\"\n + \"total = ?, remaining = ?, warehouse_id = ? WHERE id = \" + productId;\n \n \n PreparedStatement pst = conn.getConnection().prepareStatement(query);\n pst.setString(1, productUpdated.getProductName());\n pst.setInt(2, productUpdated.getTotal());\n pst.setInt(3, productUpdated.getRemaining());\n pst.setInt(4, productUpdated.getWarehouse_id());\n \n pst.executeUpdate();\n JOptionPane.showMessageDialog(null, \"Product updated\");\n closeUpdateProduct();\n } catch (SQLException ex) {\n System.out.println(ex.getLocalizedMessage());\n }\n }",
"@Override\r\n public void updatedSaleInventory(ItemAndQuantity lastItem) {\r\n }",
"@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}",
"@Override\n\tpublic void setElectricityBill(int electricityBill) {\n\t}",
"private void decreaseStock() {\n\t\tint decreaseBy; // declares decreaseBy\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the card you wish to edit:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\n\t\tif(inventoryObject.cardExists(sic_idHolder)) { // checks to see if the card with the inputed ID exists\n\t\tSystem.out.println(\"Please enter the amount you wish to decrease the stock by (Note: This should be a positive number):\");\n\t\tdecreaseBy = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\tif(decreaseBy <= 0) { //checks to see is decrease by is negative\n\t\t\tSystem.out.println(\"Error! You must decrease the stock by 1 or more\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\tif(inventoryObject.quantitySize(sic_idHolder) - decreaseBy < 0 ) { // checks to see if the current quantity minus decreasedBy is negative\n\t\t\tSystem.out.println(\"Error. Quantity can not be reduced to a negative number\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\tinventoryObject.decreaseStock(sic_idHolder, decreaseBy); // calls decreaseStock in InventoryManagement\n\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"There are no cards with the ID you entered\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}",
"public double fuelQuantity() throws Exception;",
"void stockPriceChanged(Stock stock, double oldValue, double newValue);",
"public void setWarehouseID(String newName) {\r\n\t\tthis.name = newName;\r\n\t}",
"int getBuyQuantity();",
"protected abstract Product modifyProduct(ProductApi api,\n Product modifyReq) throws RestApiException;",
"public abstract void updateBalance(Balance balance, LedgerEntry.Subtype subtype, long amount) throws TransactionException;",
"void PurshaseToDonate(Integer Id_Member, Integer Id_Product, Integer Quantity);",
"@Override\r\n\tpublic void decreaseDomesticTradeResourceAmount(ResourceType resource) {\n\t\t\r\n\t}",
"@UICallout public void setM_Product_ID (String oldM_Product_ID, \n\t\t\tString newM_Product_ID, int windowNo) throws Exception\n\t{\n\t\tif (newM_Product_ID == null || newM_Product_ID.length() == 0)\n\t\t\treturn;\n\t\tint M_Product_ID = Integer.parseInt(newM_Product_ID);\n\t\tif (M_Product_ID == 0)\n\t\t{\n\t\t\tsetM_AttributeSetInstance_ID(0);\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\tsuper.setM_Product_ID(M_Product_ID);\n\t\tsetC_Charge_ID(0);\n\t\t\n\t\t//\tSet Attribute & Locator\n\t\tint M_Locator_ID = 0;\n\t\tif (getCtx().getContextAsInt(EnvConstants.WINDOW_INFO, EnvConstants.TAB_INFO, \"M_Product_ID\") == M_Product_ID\n\t\t\t&& getCtx().getContextAsInt(EnvConstants.WINDOW_INFO, EnvConstants.TAB_INFO, \"M_AttributeSetInstance_ID\") != 0)\n\t\t{\n\t\t\tsetM_AttributeSetInstance_ID(getCtx().getContextAsInt(EnvConstants.WINDOW_INFO, EnvConstants.TAB_INFO, \"M_AttributeSetInstance_ID\"));\n\t\t\t//\tLocator from Info Window - ASI\n\t\t\tM_Locator_ID = getCtx().getContextAsInt(EnvConstants.WINDOW_INFO, EnvConstants.TAB_INFO, \"M_Locator_ID\");\n\t\t\tif (M_Locator_ID != 0)\n\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t}\n\t\telse\n\t\t\tsetM_AttributeSetInstance_ID(0);\n\t\t//\n\t\tboolean IsSOTrx = getCtx().isSOTrx(windowNo);\n\t\tif (IsSOTrx)\n\t\t\treturn;\n\n\t\t//\tPO - Set UOM/Locator/Qty\n\t\tMProduct product = getProduct();\n\t\tsetC_UOM_ID(product.getC_UOM_ID());\n\t\tBigDecimal QtyEntered = getQtyEntered();\n\t\tsetMovementQty(QtyEntered);\n\t\tif (M_Locator_ID != 0)\n\t\t\t;\t\t//\talready set via ASI\n\t\telse\n\t\t{\n\t\t\tint M_Warehouse_ID = getCtx().getContextAsInt(windowNo, \"M_Warehouse_ID\");\n\t\t\tM_Locator_ID = MProductLocator.getFirstM_Locator_ID (product, M_Warehouse_ID);\n\t\t\tif (M_Locator_ID != 0)\n\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t\telse\n\t\t\t{\n\t\t\t\tMWarehouse wh = MWarehouse.get (getCtx(), M_Warehouse_ID);\n\t\t\t\tif(wh.isWMSEnabled())\n\t\t\t\t\tM_Locator_ID = wh.getM_RcvLocator_ID();\n\t\t\t\t\n\t\t\t\tif(M_Locator_ID == 0)\n\t\t\t\t\tM_Locator_ID = wh.getDefaultM_Locator_ID();\n\t\t\t\t\n\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void updateTranCode(Purchase Purchase) throws Exception {\n\t\t\r\n\t}",
"public void setWarehouseid(Integer warehouseid) {\n this.warehouseid = warehouseid;\n }",
"@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }",
"public void setProductQty (BigDecimal ProductQty)\n{\nif (ProductQty == null) throw new IllegalArgumentException (\"ProductQty is mandatory\");\nset_Value (\"ProductQty\", ProductQty);\n}",
"@Override\n\tpublic String updateProduct() throws AdminException {\n\t\treturn null;\n\t}",
"public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }",
"public CartOrder updateOrder(CartOrder order) throws Exception;",
"public void doChangeTicketPrices();",
"public abstract void raiseSalary();",
"public void changeQuantity(int prodID, int quant)\r\n\t{\r\n\t\tOrderItem temp;\r\n\t\tint test = 0;\r\n\t\t\r\n\t\t//iterate through list and compare product ID of each item against the parameter,\r\n\t\t//then update the quantity of the one that matches\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++)\r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttest = temp.getProductID();\r\n\t\t\tif (test == prodID)\r\n\t\t\t{\r\n\t\t\t\ttemp.setProductQuant(quant);\r\n\t\t\t} //end if\r\n\t\t} //end for\r\n\t\t\t\r\n\t}",
"public void updateInventory(Drink drink, int numDrinks)\n {\n\n String name = drink.getName();\n double size = drink.getSize();\n String type = drink.getType();\n if(drink.getType().equals(\"Small Draft Beer\") || drink.getType().equals(\"Large Draft Beer\")){\n //update size to account for quantities\n size = size * numDrinks;\n inventoryDB.updateQuantity(name.substring(6), size);\n }else if(drink.getType().equals(\"Mixed Drink\")){\n MixedDrink md = (MixedDrink)(drink); \n for(NonAlcoholic component: md.getMixer()){\n name = component.getName();\n size = component.getSize();\n //update size to account for quantities\n size = size * numDrinks;\n inventoryDB.updateQuantity(name, size);\n }\n for(Liquor component: md.getLiquor()){\n name = component.getName();\n size = component.getSize();\n //update size to account for quantities\n size = size * numDrinks;\n inventoryDB.updateQuantity(name, size);\n }\n }else{\n //update size to account for quantities\n size = size * numDrinks;\n inventoryDB.updateQuantity(name, size);\n }\n }",
"public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}",
"@Transactional(propagation = Propagation.MANDATORY)\n public void updateEatableProductAmount(int id, int currentProductAmount, int productAmount) throws ProductTransactionException {\n\n if (currentProductAmount < 0) {\n throw new ProductTransactionException(\"There is no such amount of product: current amount : \" + productAmount);\n }\n\n eatableProductRepo.update(currentProductAmount, id);\n }",
"public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;",
"public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}",
"public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }",
"void setIncome(double newIncome) throws BankException {\n throw new BankException(\"This account does not support this feature\");\n }",
"@UICallout public void setMovementQty (String oldMovementQty, \n\t\t\tString newMovementQty, int windowNo) throws Exception\n\t{\n\t\tif (newMovementQty == null || newMovementQty.length() == 0)\n\t\t\treturn;\n\t\tBigDecimal MovementQty = new BigDecimal(newMovementQty);\n\t\tsuper.setMovementQty(MovementQty);\n\t\tsetQty(windowNo, \"MovementQty\");\n\t}",
"org.hl7.fhir.Quantity addNewValueQuantity();",
"Product updateProductInStore(Product product);",
"@ServiceMethod(name = \"updateStoreProductQuantity\")\r\n\tpublic IResponseHandler updateStoreProductQuantity(StoreProductDTO dto)\r\n\t{\t\r\n\t\t\r\n\t\tList<StoreProduct> sps =getStoreProduct(dto);\r\n\t\t\r\n\t\tfor(StoreProduct sp : sps)\r\n\t\t{\r\n\t\t\tsp.setQuantity(dto.getQuantity());\r\n\t\t\tgetSession().update(sp);\r\n\t\t}\r\n\r\n\t\treturn dto;\r\n\t}",
"public void updateProduct(Product catalog) throws BackendException;",
"public void decreaseStock(int serialNum, int reduction){\n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, reduce inventory by specified amount\n this.items.get(i).removeFromQty(reduction);\n }\n }\n }",
"public abstract String withdrawAmount(double amountToBeWithdrawn);",
"public interface WarehouseManipulator {\n int newWarehouseRequest(String s, NewWarehouseModalBottomSheet mbs);\n int editWarehouseRequest(Warehouse w,String newName, EditWarehouseModalBottomSheet mbs);\n int removeWarehouseRequest(Warehouse w);\n List<Warehouse> getWarehouses(String role);\n int showEditModalBottomSheet(EditWarehouseModalBottomSheet mbs);\n int openWarehouse(Warehouse w);\n}",
"@Override\n\tpublic int update(ProductDTO dto) {\n\t\treturn 0;\n\t}",
"public void decreaseStock(int ID, int amt) {\r\n\t\tinventory.put(ID, inventory.get(ID)-amt);\r\n\t}",
"@Override\r\n\tpublic void increaseDomesticTradeResourceAmount(ResourceType resource) {\n\t\t\r\n\t}",
"protected void beforeUpdateWarehouse(\n RetailscmUserContext userContext,\n Warehouse existed,\n String retailStoreCountryCenterId,\n String warehouseId,\n int warehouseVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}",
"@Override\n public void changePrice(Product product, int position) {\n changeProductPrice(product, -1);\n }",
"public UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void update(Product product) {\n\n\t}",
"public ProductWithStockItemTO updateStockItem(long storeID, StockItemTO stockItemTO) throws NotInDatabaseException, UpdateException;",
"int updateByPrimaryKey(Drug_OutWarehouse record);",
"@Override\n\tpublic void updateWaybill(WaybillEntity waybill) {\n\t\t\n\t}",
"@Test\n public void negativeIncrement() {\n manager.raiseSalary(-2.0);\n }",
"public void consumeFuel(double amount);",
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Product_ID (int M_Product_ID);",
"void setExtremeSpikeIncrease(VariableAmount increase);",
"public void updateQuantity(DrinkItem temp, int val) throws SQLException{\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity=? where drink_code=?\");\n\t\t\tmyStmt.setInt(1, val);\n\t\t\tmyStmt.setInt(2, temp.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t\t\n\t}",
"public void Update(StokContract entity) {\n\t\t\n\t}",
"@Override\n\tpublic boolean updateStock(int quant) {\n\t\treturn false;\n\t}"
] | [
"0.61970574",
"0.6143739",
"0.60854834",
"0.6027005",
"0.59427243",
"0.59298724",
"0.5894655",
"0.5867101",
"0.5853449",
"0.58275515",
"0.57982683",
"0.5767869",
"0.57366616",
"0.5716149",
"0.56420726",
"0.5627636",
"0.56209767",
"0.5606704",
"0.5603054",
"0.5602982",
"0.5588277",
"0.5585942",
"0.55764985",
"0.5574258",
"0.55728406",
"0.5539621",
"0.5504726",
"0.54956937",
"0.5491221",
"0.54911333",
"0.54820526",
"0.5471626",
"0.5470537",
"0.54584706",
"0.54531336",
"0.5434568",
"0.5434425",
"0.5427791",
"0.54267216",
"0.54006153",
"0.5394856",
"0.5389659",
"0.53874683",
"0.53792864",
"0.5366328",
"0.5356185",
"0.5356014",
"0.53538054",
"0.5342039",
"0.53408664",
"0.5331732",
"0.53282547",
"0.5325649",
"0.5324002",
"0.5323659",
"0.53081435",
"0.5299614",
"0.5289741",
"0.5288177",
"0.52851826",
"0.52819985",
"0.5271595",
"0.52690387",
"0.52680606",
"0.5262512",
"0.52623427",
"0.5258019",
"0.52578324",
"0.5257401",
"0.5241967",
"0.52350193",
"0.52342844",
"0.5233628",
"0.5231393",
"0.52300334",
"0.5229927",
"0.52194566",
"0.52178276",
"0.52142346",
"0.5206435",
"0.519622",
"0.5195047",
"0.51937747",
"0.51935124",
"0.5193063",
"0.51925695",
"0.5187649",
"0.5182279",
"0.5176256",
"0.5163638",
"0.51566637",
"0.515604",
"0.5154073",
"0.5153509",
"0.51528233",
"0.51528233",
"0.51442176",
"0.51383746",
"0.5137597",
"0.512994"
] | 0.85842615 | 0 |
Gets the over under bet event. | public static BetTypeEventInterwetten getOverUnderBetEvent(Integer typeId)
throws InterwettenBetTypeEventNotFoundException {
BetTypeEventInterwetten result;
if (isGameUnderOver(typeId)) {
result = BetTypeEventInterwetten.PARTIDO_COMPLETO;
} else if (isFirstPartUnderOver(typeId)) {
result = BetTypeEventInterwetten.PRIMERA_PARTE;
} else if (isSecondPartUnderOver(typeId)) {
result = BetTypeEventInterwetten.SEGUNDA_PARTE;
} else if (isThirdPartUnderOver(typeId)) {
result = BetTypeEventInterwetten.TERCERA_PARTE;
} else if (isFirstQuarterUnderOver(typeId)) {
result = BetTypeEventInterwetten.PRIMER_CUARTO;
} else if (isSecondQuarterUnderOver(typeId)) {
result = BetTypeEventInterwetten.SEGUNDO_CUARTO;
} else if (isThirdQuarterUnderOver(typeId)) {
result = BetTypeEventInterwetten.TERCER_CUARTO;
} else if (isForthQuarterUnderOver(typeId)) {
result = BetTypeEventInterwetten.CUARTO_CUARTO;
} else if (isFirstFiveInninngsUnderOver(typeId)) {
result = BetTypeEventInterwetten.CINCO_PRIMERAS_ENTRADAS;
} else {
throw new InterwettenBetTypeEventNotFoundException("");
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected SoundEvent getHurtSound()\n {\n return MCSoundEvents.ENTITY_BUM_HURT;\n }",
"public double getOverhitDamage()\n\t{\n\t\treturn overhitDamage;\n\t}",
"HabitEvent getPassedHabitEvent();",
"public Object getOnmouseout() {\r\n\t\treturn getOnMouseOut();\r\n\t}",
"protected SoundEvent getAmbientSound()\n {\n if (timetopee > 0 || bumgave )\n {\n return MCSoundEvents.ENTITY_BUM;\n }\n else\n {\n return MCSoundEvents.ENTITY_BUM_LIVINGPEE;\n }\n }",
"protected SoundEvent getDeathSound()\n {\n return MCSoundEvents.ENTITY_BUM_DEATH;\n }",
"public BattleEvent getBattleEvent() {\n return battleEvent;\n }",
"public Object getOnmouseover() {\r\n\t\treturn getOnMouseOver();\r\n\t}",
"public SoundEvent getFallSound() {\n/* 103 */ return this.fallSound;\n/* */ }",
"public void knockMeOver(){}",
"@Override\n\tpublic boolean getIsOver();",
"public boolean isOver() {\r\n return isOver;\r\n }",
"@Override\n\tprotected SoundEvent getHurtSound(DamageSource damageSourceIn) {\n\t\treturn getSoundManager().getHurtSound();\n\t}",
"public void onTurnOver() {}",
"public void check_empate_GAME_OVER() {\n doNothing().when(c0).sendEvent(EventType.GAME_OVER, null);\n \n //Capturamos el evento GAME_OVER y comprobamos sus parámetros\n ArgumentCaptor<Event> argument = ArgumentCaptor.forClass(Event.class);\n verify(c0, times(1)).sendEvent(eq(EventType.GAME_OVER), argument.capture());\n Object event = argument.getValue();\n WinnerValue wv = (WinnerValue) event;\n \n assertEquals(\"Al haber empate, el valor del ganador debería ser null\", null, wv);\n }",
"public int getScenarioIsOver() {\n return scenarioIsOver;\n }",
"public String getOnmouseout()\r\n\t{\r\n\t\treturn _onMouseOut;\r\n\t}",
"public String getAwayLoss(String team) {\n\n return getGameInfo(team, \"away_loss\");\n }",
"public boolean isOver() {\n\t\treturn over;\n\t}",
"public boolean isOver() {\n \t\treturn isOver;\n \t}",
"public double awayWin() {\n\t\treturn this.bp.P2();\n\t}",
"public void onBetPlaced(Bet bet);",
"public void gameOver() {\n\t}",
"public void takeBetBack() {\n\t\ttotalMoney += bet;\n\t}",
"private void gameOver() {\n\t\t\n\t}",
"public L2Character getOverhitAttacker()\n\t{\n\t\treturn overhitAttacker;\n\t}",
"public boolean getOver(){\n\t\t//if the game is over, stop the timer\n\t\tif(this.over){\n\t\t\t//update the total points label\n\t\t\tthis.getPoints();\n\t\t\t\n\t\t\tthis.timer.stop();\n\t\t}\n\t\t\n\t\treturn this.over;\n\t}",
"public boolean isOverhit()\n\t{\n\t\treturn overhit;\n\t}",
"public boolean getIsBattleOver()\r\n {\r\n return isBattleOver;\r\n }",
"public Sound getSoundHurt() {\n return soundHurt;\n }",
"int getLoses() {return _loses;}",
"public String getOnmouseover()\r\n\t{\r\n\t\treturn _onMouseOver;\r\n\t}",
"public boolean isOverState() {\n return overState;\n }",
"boolean gameOver() {\n return _gameOver;\n }",
"public int getBet(Shoe shoe, OUTCOME lastOutcome) {\n\t\treturn baseBet;\r\n\t}",
"void gameOver();",
"void gameOver();",
"public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }",
"public final String getOnMouseOverAttribute() {\n return getAttributeValue(\"onmouseover\");\n }",
"public Constants.LongPollEvent getEvent() {\n if (this == DROP_MESSAGE) return Constants.LongPollEvent.FILTERED_CHAT;\n else return null;\n }",
"Event getEvent();",
"void hitEvent(Block beingHit, Ball hitter);",
"void hitEvent(Block beingHit, Ball hitter);",
"public Image getTieOver();",
"int getBet() {\n\t\treturn _bet;\n\t}",
"@Override\n\tprotected SoundEvent getDeathSound() {\n\t\treturn getSoundManager().getDeathSound();\n\t}",
"@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}",
"public short getHandThrowDamage();",
"int getSellCurrentRaw();",
"public void gameOver(int gameOver);",
"public String getAwayWin(String team) {\n\n return getGameInfo(team, \"away_win\");\n }",
"default void onGameOver(ScotlandYardView view, Set<Colour> winningPlayers) {}",
"public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }",
"boolean isGameOver() {\n\t\treturn Hit;\n\t}",
"public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}",
"@DISPID(-2147412111)\n @PropGet\n java.lang.Object onmouseout();",
"@Override\n\tpublic double getAttack() {\n\t\treturn 0;\n\t}",
"public boolean gameOver() {\n\t\treturn gameOver;\n\t}",
"public final String getOnMouseOutAttribute() {\n return getAttributeValue(\"onmouseout\");\n }",
"public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }",
"@Override\n public Event testEvent() throws PhidgetException {\n if((sensorController.getVal(sensorName) > threshold)){\n return new Event(name_gt,description_gt, hideFromFeed);\n } else {\n return new Event(name_lt,description_lt, hideFromFeed);\n }\n }",
"@Override\n\tprotected SoundEvent getAmbientSound() {\n\t\treturn getSoundManager().getLivingSound();\n\t}",
"@Override\n\tpublic BaseLayer GetUnderLayer() {\n\t\tif (p_UnderLayer == null)\n\t\t\treturn null;\n\t\treturn p_UnderLayer;\n\t}",
"public String getAwayE(String team) {\n\n String awayE;\n // if the game status is preview or postponed\n if (getGameStatus(team).equals(\"Preview\") || getGameStatus(team).equals(\"Postponed\")) {\n awayE = \"\";\n }\n else {\n awayE = getLineScore(team, \"linescore\",\"e\", \"away\");\n }\n\n return awayE;\n }",
"void bust() {\n\t\t_loses++;\n\t\t//_money -= _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}",
"public void gameOver() {\n tb.setState();\n Date finalDate = new Date();\n float currTime = (finalDate.getTime() - start) / 1000F;\n Intent intent = new Intent(getContext(), TrueBlueOverActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n intent.putExtra(\"Score\", score);\n\n intent.putExtra(\"Time\", currTime);\n\n intent.putExtra(\"Level\", level);\n getContext().startActivity(intent);\n }",
"private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}",
"public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}",
"private void loseCondition() {\n if (player.getHealth() <= 0) {\n lose();\n }\n }",
"public double getBet() {\n return bet;\n }",
"public static int getPreviousHealth(EntityLiving entity) {\n return entity.getEntityData().getInteger(\"phb\");\n }",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"@Override\r\n public void hitEvent(Block beingHit, Ball hitter) {\n this.currentScore.increase(5);\r\n // and destroying a block is worth and additional 10 points\r\n if (beingHit.getHitPointsNumber() == 0) {\r\n this.currentScore.increase(10);\r\n }\r\n }",
"public void playerLost()\r\n {\r\n \r\n }",
"private void gameOver() {\n\t\tAsteroidsGameOverString gameOverString = new AsteroidsGameOverString(GameObject.ROOT);\n\t\tgameOverString.setScale(new Vector3(5.0, 5.0, 5.0));\n\t\tgameOverString.translate(new Vector3(0.0, 8.0));\n\t}",
"public String getEventName();",
"@SideOnly(Side.CLIENT)\n\tpublic static RayTraceResult getPlayerMouseOverBlock(double dist, float duringTicks)\n\t{\n\t EntityPlayer player = ClientProxy.getClientPlayer();\n\t\t\n\t\tVec3d vec3 = player.getPositionEyes(duringTicks);\n\t Vec3d vec31 = player.getLook(duringTicks);\n\t Vec3d vec32 = vec3.addVector(vec31.xCoord * dist, vec31.yCoord * dist, vec31.zCoord * dist);\n\t \n\t //參數: entity位置, entity視線最遠位置, 停止在液體方塊上, 忽略沒有AABB的方塊, 回傳距離內最遠的不可碰撞方塊\n\t return player.world.rayTraceBlocks(vec3, vec32, true, false, false);\n\t}",
"public static void lose()\n\t{\n\t\tGame.setMoney(Game.getMoney()-bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tlblUpdate.setText(\"The dealer wins\");\n\t\tif(Game.getMoney()<=0)\n\t\t{\n\t\t\tGame.setComplete(true);\n\t\t\tendGameSequence();\n\n\t\t}\n\t}",
"public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }",
"public int getKeySellItem() {\r\n return getKeyShoot();\r\n }",
"public static boolean isOffHand(PlayerInteractEntityEvent event)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn event.getHand() == org.bukkit.inventory.EquipmentSlot.OFF_HAND; \r\n\t\t}\r\n\t\tcatch (Throwable t)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@DISPID(-2147412112)\n @PropGet\n java.lang.Object onmouseover();",
"public void gameOver() {\n this.lives --;\n this.alive = false;\n }",
"@Override\n\tprotected void onPlayerDamage(EntityDamageEvent evt, Player p) {\n\t\tsuper.onPlayerDamage(evt, p);\n\t\tif(evt.getCause() == DamageCause.WITHER){\n\t\t\tGUtils.healDamageable(getOwnerPlayer(), evt.getDamage() * 1.5);\n\t\t\tVector v = Utils.CrearVector(getOwnerPlayer().getLocation(), getPlayer().getLocation()).multiply(0.5D);\n\t\t\tdouble max = 7;\n\t\t\tfor (int i = 0; i < max; i++) {\n//\t\t\t\tgetWorld().playEffect(getPlayer().getEyeLocation().add(0, -0.8, 0).add(v.clone().multiply(i/max)),\n//\t\t\t\t\t\tEffect.HEART, 0);\n\t\t\t}\n\t\t}\n\t}",
"public void throwEvent(GameController game, TimelineView timelineView ){\n\n\t\tgame.setStars(game.getStars() - price);\n\t\ttimelineView.tweet(this.event.nom);\n\n\t\tdouble probaLenght = ((float) probability) / 100.0;\n\t\tint stars = (int) Math.round(event.lenghtStars * probaLenght);\n\t\tint contamination = (int) Math.round(event.lenghtContamination * probaLenght);\n\n\t\tregion.setContamination(region.getContamination() + contamination);\n\t\tgame.setStars(game.getStars() + stars);\n\n\t\t// REMOVE BEFORE FLIGHT\n\t\tSystem.out.println(\"====== THROW EVENT ======\");\n\t\tSystem.out.println(\"Name : \" + this.event.nom);\n\t\tSystem.out.println(\"Regions : \" + region.getName());\n\t\tSystem.out.println(\"Probability : \" + probability);\n\t\tSystem.out.println(\"Probability lenght: \" + probaLenght);\n\t\tSystem.out.println(\"Stars impact : \" + event.lenghtStars * probaLenght);\n\t\tSystem.out.println(\"contamination impact : \" + event.lenghtContamination * probaLenght);\n\t\tSystem.out.println(\"=========================\");\n\n\t}",
"public void battleOver()\r\n {\r\n isBattleOver = true;\r\n }",
"private String getChosenSecondaryEvent()\n {\n return chosenEvent;\n }",
"@SubscribeEvent(receiveCanceled = true)\n public void onEvent(RenderGameOverlayEvent.Post event) {\n switch (event.getType()) {\n case HEALTH:\n\n break;\n default: // If it's not one of the above cases, do nothing\n break;\n }\n }",
"int getWins() {return _wins;}",
"int getAttackRoll();",
"@Override\n public void onTakeOffTeaBagRaised() {\n }",
"@Override\r\n\tpublic void onBattleEvent(BattleEvent e) {\n\t\t\r\n\t}",
"public Object getOnmouseup() {\r\n\t\treturn getOnMouseUp();\r\n\t}",
"protected void consumeGoldenFood(SavedHorse savedHorse, AbstractHorse horse, int nuggetValue, Player player) {\n CONFIG.HEALTH.setEffort(savedHorse, CONFIG.HEALTH.getEffort(savedHorse) + nuggetValue);\n if (CONFIG.HEALTH.hasLevelIncreased(savedHorse, horse)) {\n notifyLevelUp(player, savedHorse, horse, CONFIG.HEALTH);\n }\n\n Location loc = horse.getLocation();\n loc.getWorld().playSound(loc, Sound.ENTITY_HORSE_EAT, SoundCategory.NEUTRAL, 2.0f, 1.0f);\n\n if (CONFIG.HEALTH.getFractionalLevel(savedHorse) > CONFIG.HEALTH.getMaxLevel()) {\n savedHorse.onOverfed(player, horse);\n }\n }",
"public int[] getWinLoss()\n {\n int[] winst = new int[]\n {\n wins , losses\n };\n return winst;\n }",
"public int getOvertimeHourlyWage() {\n return overtimeHourlyWage;\n }",
"public boolean isLevelOver() {\n\t\treturn waveControl.isLevelEnd();\n\t}",
"@Override\n\tpublic double getAttack() {\n return attack;\n\t}",
"@DISPID(-2147412111)\n @PropPut\n void onmouseout(\n java.lang.Object rhs);",
"@WebMethod public List<BetMade> getBetsFromEvents(Event ev);"
] | [
"0.6247835",
"0.6220707",
"0.6035263",
"0.602961",
"0.586204",
"0.5814003",
"0.57896745",
"0.5749195",
"0.57134926",
"0.5672224",
"0.56629884",
"0.5652064",
"0.5624128",
"0.5619787",
"0.56027836",
"0.5591596",
"0.5542605",
"0.5525088",
"0.55123395",
"0.5503403",
"0.5498984",
"0.54808384",
"0.54493594",
"0.54187083",
"0.54144806",
"0.5413265",
"0.5370068",
"0.53649414",
"0.5312447",
"0.53096944",
"0.5308593",
"0.52988046",
"0.5296712",
"0.527002",
"0.52668524",
"0.52478397",
"0.52478397",
"0.5236905",
"0.5232028",
"0.5230662",
"0.5227445",
"0.5220064",
"0.5220064",
"0.5218069",
"0.52177507",
"0.52131516",
"0.5212336",
"0.5189885",
"0.5188974",
"0.5188941",
"0.5186935",
"0.5186178",
"0.51804507",
"0.5177253",
"0.5171268",
"0.51684374",
"0.51601475",
"0.5134562",
"0.5134353",
"0.51340973",
"0.5130821",
"0.5128046",
"0.5127854",
"0.5119669",
"0.5099688",
"0.509837",
"0.5098073",
"0.5085885",
"0.50828743",
"0.5071388",
"0.50712675",
"0.5067661",
"0.5064724",
"0.5057205",
"0.5056384",
"0.50561035",
"0.50558835",
"0.50553304",
"0.50531983",
"0.505126",
"0.50496686",
"0.5041896",
"0.5041744",
"0.5038384",
"0.50367975",
"0.503573",
"0.5029011",
"0.5024164",
"0.5022479",
"0.5011495",
"0.50108176",
"0.5010091",
"0.5007647",
"0.5006158",
"0.5001807",
"0.49999943",
"0.4997466",
"0.49971524",
"0.49953777",
"0.49949557"
] | 0.5942144 | 4 |
Checks if is first five inninngs under over. | public static Boolean isFirstFiveInninngsUnderOver(Integer integer) {
return firstFiveInningsUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isFiveOfAKind(){\n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < dice.length; i++){\n numbers.add(dice[i].getFaceValue());\n }\n\n for(int i = 0; i < numbers.size(); i++){\n int numSame = 0;\n for(int j = 0; j < numbers.size(); j++){\n if(numbers.get(i).equals(numbers.get(j))){\n numSame++;\n }\n }\n if (numSame == 5){\n return true;\n }\n }\n return false;\n }",
"@Override\n public boolean isFull() {\n return this.count() == 5;\n }",
"public static boolean is5 (int num){\r\n\t\t\r\n\t\tif(num%5==0){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}",
"public boolean gameOver()\r\n {\r\n return enemigos.size() == 10;\r\n }",
"private boolean caughtEmAll(){\n\t\tint howMany = 1;\n\t\tArrayList<Pokemon> pokedex = theTrainer.getPokedex();\n\t\tCollections.sort(pokedex);\n\t\tfor(int i = 0; i < pokedex.size() - 1; i++){\n\t\t\tif(pokedex.get(i+1).getPokemonID() != pokedex.get(i).getPokemonID()){\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t}\n\t\treturn (howMany == 10);\n\t}",
"public void takeFiveFromAny() {\n if (stackA.getNumChips() >= 5){\n stackA.removeChips(5);\n }else if(stackB.getNumChips() >= 5){\n stackB.removeChips(5);\n }else if(stackC.getNumChips() >= 5){\n stackC.removeChips(5);\n }else if(stackA.getNumChips() > stackB.getNumChips()){\n if (stackA.getNumChips() == stackC.getNumChips()){\n stackA.removeChips(1);\n }else if (stackA.getNumChips() > stackC.getNumChips()){\n stackA.removeChips(1);\n }else {\n stackC.removeChips(1);\n }\n }else if(stackB.getNumChips() > stackC.getNumChips()){\n if (stackB.getNumChips() == stackA.getNumChips()){\n stackB.removeChips(1);\n }else {\n stackB.removeChips(1);\n }\n }else if (stackC.getNumChips() > stackB.getNumChips()){\n stackC.removeChips(1);\n }else{\n stackC.removeChips(1);\n }\n }",
"private boolean isWrong() {\n\t\treturn wrongMatches >= 5;\n\t}",
"public boolean gameIsOver() {return revealedShips >= 4;}",
"private boolean multipleOfFive() {\n\n boolean[][] tempBoard = new boolean[board.length][board[0].length];\n for (int i = 0; i < board.length; i++) {\n System.arraycopy(board[i], 0, tempBoard[i], 0, board[0].length);\n }\n for (int i = 0; i < tempBoard.length; i++) {\n for (int j = 0; j < tempBoard[0].length; j++) {\n if (!tempBoard[i][j]) {\n int result = floodFill(tempBoard, i, j);\n if(result % 5 != 0) return false;\n }\n }\n }\n return true;\n }",
"private boolean caughtTwenty(){\n\t\treturn (theTrainer.getPokedex().size() >= 20);\n\t}",
"public boolean checkHighScore(){\n if(highScoreList.isEmpty() || highScoreList.size() < 5){\n return true;\n }\n //Any other case, we have to start comparing\n for(User user : highScoreList) {\n //We found a place to put their score!\n if(getScore() > user.score) {\n return true;\n }\n }\n return false;\n }",
"public static Boolean isOverUnder(Integer number, List<BET> bets) {\r\n\t\tBoolean result = Boolean.FALSE;\r\n\t\tif (bets.size() == 2\r\n\t\t\t\t&& (isGameUnderOver(number) || isFirstQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isSecondQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isThirdQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isForthQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isFirstPartUnderOver(number)\r\n\t\t\t\t\t\t|| isSecondPartUnderOver(number)\r\n\t\t\t\t\t\t|| isThirdPartUnderOver(number) || isFirstFiveInninngsUnderOver(number))) {\r\n\t\t\tresult = Boolean.TRUE;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"void lowerNumberOfStonesLeftToPlace();",
"public void checkShipsSunk() {\n int sunkships = 0;\n int pos = 0; \n Ship ship;\n for(int i =0; i<5; i++) {\n ship = ships.get(i); \n if(ship.getSunk() == true) {\n sunkships++;\n pos = pos + ship.getLength(); \n }\n else{\n ship.setSunk(isSunk(ship.getLength(), pos));\n pos = pos + ship.getLength(); \n if(ship.getSunk() == true) {\n sunkships++;\n }\n }\n }\n shipsRemaining = 5 - sunkships; \n }",
"void lowerNumberOfStonesOnBoard();",
"public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }",
"public void isRoundOver(){\n if (redTrickScore == 5) {\n redScore += 2;\n } else if (redTrickScore > 2 && whoCalled == 1) {\n redScore += 2;\n } else if (redTrickScore > 2 && whoCalled == 0) {\n redScore += 1;\n } else if (blueTrickScore == 5) {\n blueScore += 2;\n } else if (blueTrickScore > 2 && whoCalled == 0) {\n blueScore += 2;\n } else if (blueTrickScore > 2 && whoCalled == 1) {\n blueScore += 1;\n }\n\n // reset the trick scores\n int trickSum = blueTrickScore + redTrickScore;\n if(trickSum == 5) {\n blueTrickScore = 0;\n redTrickScore = 0;\n }\n }",
"public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }",
"private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }",
"private boolean isAboveLimit(FallingPiece piece){\r\n\t\tfor (Point p : piece.allOuterPoints()) {\r\n if (p.Y() >= height) \r\n return true;\r\n }\r\n\t\treturn false;\r\n\t}",
"public static boolean isStraight(){\n boolean start = false;\n int count = 0;\n for (int i : rankFrequency) {\n if(i == 1){\n if(start){\n count++;\n }else{\n start=true;\n count++;\n }\n }else{\n if(start){\n count = 0;\n start = false;\n }\n }\n }\n\n return (count == 5);\n }",
"public boolean checkX1()\n {\n if((this.getX()<5)) {\n return true;\n }\n else\n return false;\n\n }",
"private boolean isMoreThanMoles(int numOfMoles) {\n int count = 0;\n for (ImageView imageView : imageViewsArray) {\n if (imageView.getDrawable() != null) {\n count++;\n }\n }\n return count > numOfMoles;\n }",
"private boolean notTooManySkips(ArrayList<Integer> jValues)\r\n\t{\r\n\t\tint length = jValues.size();\r\n\t\tint span = jValues.get(jValues.size() - 1) - jValues.get(0) + 1;\r\n\r\n\t\treturn span - length <= MAX_SKIPS;\r\n\t}",
"public boolean hasBust() {\n\t\treturn this.hand.countValue().first() > 21;\n\t}",
"private boolean checkGreedyIronCurtain() {\r\n return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0));\r\n }",
"public Boolean IsNormally() {\n Random r = new Random();\n int k = r.nextInt(100);\n //5%\n if (k <= 5) {\n normally++;\n return true;\n }\n return false;\n }",
"private void check_OutofBag(Character pl) {\n if (pl.getBag().size() > 5) {\n display_StoreMenu(pl);\n }\n }",
"protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }",
"public boolean GameIsOver() {\n\t\tif(deck.numCardsLeft()==8) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isRoundOver() {\n\t\tint numberOfLiving = 0;\n\t\tboolean nobodyHasAmmo = true;\n\t\t\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\t// The round is over if someone is dead\n\t\t\tif (tanks[i].isAlive()) {\n\t\t\t\tnumberOfLiving++;\n\t\t\t}\n\t\t\tnobodyHasAmmo &= tanks[i].getAmmo() == 0;\n\t\t}\n\t\t\n\t\t// Return true if one or none players are living, or stalemate\n\t\treturn numberOfLiving <= 1 || (nobodyHasAmmo && bullets.isEmpty());\n\t}",
"public boolean underfull() {\n\t\treturn lastindex < minkeys(); // ptrs number: Math.ceil(degree / 2.0) ~ n\n\t}",
"public boolean isDifficult()\n {\n int count = 0;\n for (int i = 1; i < markers.length; i++) {\n if (Math.abs(markers[i] - markers[i-1]) >= 30){\n count++;\n }\n }\n return (count >= 3);\n }",
"public static boolean chance() {\r\n Random rand = new Random();\r\n int chance = rand.nextInt(10);\r\n return chance > 5;\r\n }",
"public boolean checkGameOver(){\n\t\tfor(int x = 0; x < this.tile[3].length; x++){\n\t\t if(this.isFilled(3, x)){\n\t\t \tSystem.out.println(\"game over\");\n\t\t return true;\n\t\t }\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasBust()\n {\n return getSumOfCards(false) > 21;\n }",
"boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }",
"private boolean fourstonesReached() {\n\t\t\n\t\t\n\t\t//TO-DO: evtl. Abbruch, wenn ein freies Feld entdeckt wird\n\t\t\n\t\tint counter=0;\n\t\t\n\t\t//check horizontal lines\n\t\tfor(int i=0; i<horizontal;i++ ) {\n\t\t\t\n\t\t\tfor(int j=0; j<vertical;j++ ) {\n\t\t\t\t\n\t\t\t\tif(board[i][j] == player.ordinal()) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\tif(counter == 4) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcounter=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcounter=0;\n\t\t}\n\t\t\n\t\t\n\t\t//check vertical lines\n\t\tfor(int i=0; i<vertical;i++ ) {\n\t\t\t\n\t\t\tfor(int j=0; j<horizontal;j++ ) {\n\t\t\t\t\n\t\t\t\tif(board[j][i] == player.ordinal()) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\tif(counter == 4) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcounter=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcounter=0;\n\t\t}\n\t\t\n\t\t//check diagonal \n\t\tint ordinal = player.ordinal();\n\t\t\n\t\tif( //checking lines from up-left to down-right\n\t\t\t(board[3][0] == ordinal && board[2][1] == ordinal && board[1][2] == ordinal && board[0][3] == ordinal) || \n\t\t\t(board[4][0] == ordinal && board[3][1] == ordinal && board[2][2] == ordinal && board[1][3] == ordinal) ||\n\t\t\t(board[3][1] == ordinal && board[2][2] == ordinal && board[1][3] == ordinal && board[0][4] == ordinal) ||\n\t\t\t(board[5][0] == ordinal && board[4][1] == ordinal && board[3][2] == ordinal && board[2][3] == ordinal) ||\n\t\t\t(board[4][1] == ordinal && board[3][2] == ordinal && board[2][3] == ordinal && board[1][4] == ordinal) ||\n\t\t\t(board[3][2] == ordinal && board[2][3] == ordinal && board[1][4] == ordinal && board[0][5] == ordinal) ||\n\t\t\t(board[5][1] == ordinal && board[4][2] == ordinal && board[3][3] == ordinal && board[2][4] == ordinal) ||\n\t\t\t(board[4][2] == ordinal && board[3][3] == ordinal && board[2][4] == ordinal && board[1][5] == ordinal) ||\n\t\t\t(board[3][3] == ordinal && board[2][4] == ordinal && board[1][5] == ordinal && board[0][6] == ordinal) ||\n\t\t\t(board[5][2] == ordinal && board[4][3] == ordinal && board[3][4] == ordinal && board[2][5] == ordinal) ||\n\t\t\t(board[4][3] == ordinal && board[3][4] == ordinal && board[2][5] == ordinal && board[1][6] == ordinal) ||\n\t\t\t(board[5][3] == ordinal && board[4][4] == ordinal && board[3][5] == ordinal && board[2][6] == ordinal) ||\n\t\t\t\n\t\t\t//checking lines from up-right to down-left\n\t\t\t(board[2][0] == ordinal && board[3][1] == ordinal && board[4][2] == ordinal && board[5][3] == ordinal) ||\n\t\t\t(board[1][0] == ordinal && board[2][1] == ordinal && board[3][2] == ordinal && board[4][3] == ordinal) ||\n\t\t\t(board[2][1] == ordinal && board[3][2] == ordinal && board[4][3] == ordinal && board[5][4] == ordinal) ||\n\t\t\t(board[0][0] == ordinal && board[1][1] == ordinal && board[2][2] == ordinal && board[3][3] == ordinal) ||\n\t\t\t(board[1][1] == ordinal && board[2][2] == ordinal && board[3][3] == ordinal && board[4][4] == ordinal) ||\n\t\t\t(board[2][2] == ordinal && board[3][3] == ordinal && board[4][4] == ordinal && board[5][5] == ordinal) ||\n\t\t\t(board[0][1] == ordinal && board[1][2] == ordinal && board[2][3] == ordinal && board[3][4] == ordinal) ||\n\t\t\t(board[1][2] == ordinal && board[2][3] == ordinal && board[3][4] == ordinal && board[4][5] == ordinal) ||\n\t\t\t(board[2][3] == ordinal && board[3][4] == ordinal && board[4][5] == ordinal && board[5][6] == ordinal) ||\n\t\t\t(board[0][2] == ordinal && board[1][3] == ordinal && board[2][4] == ordinal && board[3][5] == ordinal) ||\n\t\t\t(board[1][3] == ordinal && board[2][4] == ordinal && board[3][5] == ordinal && board[4][6] == ordinal) ||\n\t\t\t(board[0][3] == ordinal && board[1][4] == ordinal && board[2][5] == ordinal && board[3][6] == ordinal)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public static boolean isTopCrossSolved(Cube cube){\n\t\tint counter = 0;\n\t\tif(cube.getSquare (5, 0, 1) == 5) counter++;\n\t\tif(cube.getSquare (5, 1, 0) == 5) counter++;\n\t\tif(cube.getSquare (5, 1, 2) == 5) counter++;\n\t\tif(cube.getSquare (5, 2, 1) == 5) counter++;\n\t\treturn (counter==4);\n\t}",
"private boolean hasEatenPowerUp() {\r\n if (snake[HEAD].row == powerUp.row && \r\n snake[HEAD].column == powerUp.column) { \r\n growSnake();\r\n newPowerUp();\r\n MainClass.totalPoints++;\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean checkMarksNumber(Player shooter, int marks){\n int count=0;\n for(int i=0;i<this.marks.size();i++){\n if(this.marks.get(i)==shooter.getColor())\n count++;\n }\n\n return marks+count<=MARKS_PER_ENEMY;\n }",
"public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }",
"public static boolean m1550n(int i) {\n return (i >= 5 || Log.isLoggable(AdRequest.LOGTAG, i)) && i != 2;\n }",
"protected void checkThreshold(int count) throws IOException\n {\n if (!thresholdExceeded && (written + count > threshold))\n {\n thresholdReached();\n thresholdExceeded = true;\n }\n }",
"@Override\r\n\tpublic boolean wasIncident() {\r\n\t\tdouble random = Math.random()*100;\r\n\t\tif(random<=25) return true;\r\n\t\treturn false;\r\n\t}",
"public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"private boolean m(){\r\n int m = countColors - maxSat;\r\n if (m <= TH){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"private boolean ifTooEmpty() {\n if (items.length <= 8) {\n return false;\n }\n float efficiency = (float) size / (float) items.length;\n return efficiency < 0.25;\n }",
"static boolean isStraight(ArrayList<Card> c)\n {\n if(c.size() < 5)\n {\n return false;\n }\n for(int x = 0 ; x < c.size()-1 ; x++)\n {\n int rank1 = c.get(x).getRank();\n int rank2 = c.get(x+1).getRank();\n \n if(rank1 != rank2 - 1)\n {\n return false;\n }\n }\n \n return true;\n }",
"protected boolean hasNext() {\n\t\treturn (counter + incrValue) < max && (counter + incrValue) > min;\n\t}",
"@ScheduledMethod(start = 1, interval = 1, priority = 6)\n\tpublic void determineIfEating() {\n\t\tisEating = (RandomHelper.nextIntFromTo(0,100) <= CFG.diningOutPercent());\n\t}",
"private boolean hasNumberThreshold() {\r\n return entity.getActualNumber() < entity.getTheoreticalNumber();\r\n }",
"boolean hasS5();",
"public boolean checkForCodek(){\n int size = pile.size();\n if(size >= 4){\n for(int i = size-1; i >= size-3; i--)\n if(pile.get(i).getVal() != pile.get(i-1).getVal())\n return false;\n return true;\n }\n else return false;\n }",
"boolean monkeyBusiness(Monkey[] monkeys) {\n boolean allSmiles;\n int smiles = 0;\n for(Monkey monkey: monkeys) {\n if(monkey.smile) {\n smiles++;\n }\n }\n allSmiles = smiles >= (double) monkeys.length / 2;\n return allSmiles;\n }",
"public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }",
"protected boolean checkFirstSix(ArrayList<ReturnValue> rvs) {\n\t\tfor (int i = 1; i <= 6; i++) {\n\t\t\tcheckNumbers(i, rvs.get(i - 1));\n\t\t}\n\t\treturn true;\n\t}",
"boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }",
"private boolean allLessThanN() {\n return this.matrix.stream()\n .allMatch(row -> row.stream()\n .allMatch(e -> e <= this.n));\n }",
"public static boolean hasStraight(Card [] cards) {\n\t\tint smallNum = 14;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue() < smallNum){\n\t\t\t\tsmallNum = cards[i].getValue(); \n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue() == smallNum+1){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif (counter == 0 && smallNum == 1){\n\t\t\tsmallNum = 10;\n\t\t}\n\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\tif (cards[x].getValue() == smallNum){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif(counter!=0){\n\t\t\tcounter = 1;\n\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\tif (cards[x].getValue() == smallNum+1){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(counter!=1){\n\t\t\t\tcounter = 2;\n\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\tif (cards[x].getValue() == (smallNum+2)){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(counter!=2){\n\t\t\t\t\tcounter = 3;\n\n\t\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\t\tif (cards[x].getValue() == smallNum+3){\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(counter!=3){\n\t\t\t\t\t\tcounter = 4;\n\n\t\t\t\t\t\tif((smallNum+4) == 14){\n\t\t\t\t\t\t\tsmallNum = 1;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tsmallNum = smallNum+4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\t\t\tif (cards[x].getValue() == smallNum){\n\t\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(counter!=4){\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean isGameOver() {\n int numberOfRowsFilled = 0;\n for (GameRow row : rows) {\n if (row.isFilled()) {\n numberOfRowsFilled++;\n if (row.hasWinner()) {\n return true;\n }\n }\n }\n return numberOfRowsFilled == rows.size();\n }",
"private int getAwardsFiveMurdersOneMinute(String killer) {\n\t\tList<LogLineData> dataSubList = dataList;\n\t\tint awards = 0;\n\n\t\twhile (!dataSubList.isEmpty()) {\n\t\t\t\n\t\t\tCalendar calendar = DateUtil.stringToCalendar(dataSubList.get(0).getActionTime());\n\t\t\tcalendar.add(Calendar.MINUTE, 1);\n\t\t\tList<LogLineData> subList = new ArrayList<>();\n\t\t\tList<LogLineData> smallList = new ArrayList<>();\n\t\t\tint countMurder = 0;\n\n\t\t\tfor (LogLineData d : dataSubList) {\n\t\t\t\tCalendar c = DateUtil.stringToCalendar(d.getActionTime());\n\t\t\t\tif (c.compareTo(calendar) <= 0) {\n\t\t\t\t\tsubList.add(d);\n\t\t\t\t}else {\n\t\t\t\t\tsmallList.add(d);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (LogLineData d : subList) {\n\t\t\t\tif (d.getKillerName().equals(killer))\n\t\t\t\t\tcountMurder += 1;\n\t\t\t}\n\n\t\t\tif (countMurder >= 5)\n\t\t\t\tawards += 1;\n\n\t\t\tif(smallList.size() == 1) {\n\t\t\t\tdataSubList.remove(smallList.get(0));\n\t\t\t}else {\n\t\t\t\tdataSubList = smallList;\n\t\t\t}\n\t\t}\n\n\t\treturn awards;\n\t}",
"public boolean flushTest()\n\t{\n\t\tboolean flush = false;\n\t\tfinal int SUITS = 4;\n\t\tint[] highs = new int[SUITS];\n\t\tint[] suitCount = new int[SUITS];\n\t\t\n\t\tfor (int i=0; i<SUITS; i++)\n\t\t{\n\t\t\thighs[i] = -1;\n\t\t\tsuitCount[i] = 0;\n\t\t}\n\t\t\n\t\tfor (int j=0; j<hand.length; j++)\n\t\t{\n\t\t\tint suit = hand[j].getIntSuit();\n\t\t\tsuitCount[suit]++;\n\t\t\t\n\t\t\tif ((highs[suit]==-1) && (j==5 || j==6))\n\t\t\t\thighs[suit] = hand[j].getValue();\n\t\t}\n\t\t\n\t\tfor (int x=0; x<SUITS; x++)\n\t\t{\n\t\t\tif (suitCount[x] >= 5)\n\t\t\t{\n\t\t\t\tflush = true;\n\t\t\t\thandScore = 50000;\n\t\t\t\thandScore += 100 * highs[x];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn flush;\n\t}",
"public boolean isTotallyOnGrid() {\n\t\t\tfor(int i=0; i<4; i++) {\n\t\t\t\tif(position.y + i >= 0)\n\t\t\t\t\treturn true; //everything from here down is on grid\n\t\t\t\t// this row is above grid so look for non-empty squares\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tif(squares[i][j])\n\t\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tSystem.err.println(\"TetrisPiece.isTotallyOnGrid internal error\");\n\t\t\treturn false;\n\t\t}",
"private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }",
"@Then(\"^Assert the order taking the first five results$\")\n public void assert_the_order_taking_the_first_five_results() throws Throwable {\n \t\n \t\n\t\tint i=0;\n\t\tboolean condition=true;\n\t\tdouble priceA=0,priceB=0, priceC=0, priceD=0, priceF=0;\n\t\tfor(i=0;i<5;i++) { \t\t\n\t\t\t\n\t\t\tif(i==0) {\t\t\t\t\n\t\t\t priceA=convertStringToNumber(pageHome.product3().get(i).getText());\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(i==1) {\n\t\t\t\tpriceB=convertStringToNumber(pageHome.product3().get(i).getText());\n\t\t\t}\n\t\t\t\n\t\t\telse if(i==2) {\n\t\t\t\tpriceC=convertStringToNumber(pageHome.product3().get(i).getText());\n\t\t\t}\n\t\t\telse if(i==3) {\n\t\t\t\tpriceD=convertStringToNumber(pageHome.product3().get(i).getText());\n\t\t\t}\n\t\t\telse if(i==4) {\n\t\t\t\tpriceF=convertStringToNumber(pageHome.product3().get(i).getText());\n\t\t\t}\n\t \t \n\t\t\tif(priceA < priceB && priceB < priceC && priceC < priceD && priceD < priceF ) {\n\t\t\t\tSystem.out.print(\"Pass, The prices order are correct\");\n\t\t\t\t condition= true;\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcondition= false;\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\t\n\t\t\t\t\n\t\t\t\n \n }\n\t\t\t\n\t\t\n\t\t\tdriver.close();\n\t\t\tAssert.assertTrue(condition);\t\t\n\t\t\t/*SoftAssert softassert=new SoftAssert();\n\t\t\tsoftassert.assertTrue(condition);\t\t\t\n\t\t\tdriver.close();\n\t\t\tsoftassert.assertAll();*/\n\t\t\t\n\t\t\n\t \n\t\t\n\n\t \n\t \n\t\t\n\t \n\t \n }",
"public boolean won()\n {\n for(int i=0;i<4;i++)\n {\n if(foundationPile[i].isEmpty() || foundationPile[i].peek().getRank()!=Rank.KING)\n return false; \n }\n return true;\n }",
"private Boolean almostAllScraped(int x, int y) {\n if (x == 0 && y > 0) {\n return false;\n } else if (x == 0 && y == 0) {\n return false;\n } else if (x > y) {\n return true;\n }\n double d = (double) ((double) (y - x) / (double) y);\n return d <= 0.01; //stop scraping if true\n //return x >= y - 1;\n }",
"@Override\n\tpublic boolean isCovered() {\n\t\treturn (falseCount > 0) && (trueCount > 0);\n\t}",
"public void multiplesOfFive()\n {\n int index = 10;\n int max = 95;\n\n while (index <= 95) {\n System.out.println(index);\n index += 5;\n }\n }",
"protected void templateTop5MoreVisitedPrivateExhibitions(final String username, final Class<?> expected) {\r\n\r\n\t\tClass<?> caught = null;\r\n\r\n\t\t// 1. Log in \r\n\t\tthis.authenticate(username);\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 2. Display the dashboard\r\n\t\t\tfinal List<Exhibition> top5Retrieved = new ArrayList<Exhibition>(this.administratorService.getTop5MoreVisitedPrivateExhibitions());\r\n\t\t\tList<Exhibition> top5Computed = new ArrayList<Exhibition>();\r\n\r\n\t\t\tfinal Comparator<Exhibition> moreDayPasses = new Comparator<Exhibition>() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int compare(final Exhibition o1, final Exhibition o2) {\r\n\r\n\t\t\t\t\tif (o1.getDayPasses().size() < o2.getDayPasses().size())\r\n\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\telse if (o1.getDayPasses().size() == o2.getDayPasses().size())\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn -1;\r\n\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tfor (final Exhibition e : this.exhibitionService.findAll())\r\n\t\t\t\tif (e.getIsPrivate())\r\n\t\t\t\t\ttop5Computed.add(e);\r\n\r\n\t\t\tCollections.sort(top5Computed, moreDayPasses);\r\n\t\t\ttop5Computed = top5Computed.subList(0, 5 > top5Computed.size() ? top5Computed.size() - 1 : 5);\r\n\r\n\t\t\tAssert.isTrue(top5Retrieved.equals(top5Computed));\r\n\r\n\t\t} catch (final Throwable oops) {\r\n\t\t\tcaught = oops.getClass();\r\n\t\t}\r\n\r\n\t\tthis.unauthenticate();\r\n\t\tthis.checkExceptions(expected, caught);\r\n\t}",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"public boolean limitHit() {\r\n return (count >= maxCount);\r\n }",
"private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"public boolean checkWin (int totalPieces){\n\t\treturn isFull();\n\t}",
"public boolean rollTheDice() {\n\t\tboolean result;\n\t\tint randomDiceRoll = (int)(Math.random() * 6) + 1;\n\t\tif(randomDiceRoll>=5) {\n\t\t\tresult=true;\n\t\t}\n\t\telse {\n\t\t\tresult=false;\n\t\t}\n\t\treturn result;\n\t}",
"public boolean check(ArrayList<Card> cards){\n int val = cards.get(0).getVal();\n if(val == 2 || val == 10)\n return true;\n //sevens are special\n if(topCardVal() == 7)\n return (topCardVal() >= val);\n return (topCardVal() <= val);\n }",
"private static int trailzerofun(int num) {\n\t\tint count=0;\n\t\tif(num<0)\n\t\t\treturn -1;\n\t\tfor(int i=5;num/i>=1;i*=5)\n\t\t{\n\t\t\tcount+=num/i;\n\t\t}\n\t\treturn count;\n\t}",
"public boolean checkLessThanMaxX() {\n return (currX + getXMargin) <= getMaxX;\n }",
"private boolean checkFifthYear(Schedule sched)\n\t{\n\t\tArrayList<Course> fifthYearCourses = new ArrayList<Course>(); //Only 500CPSC courses\n\t\t//A list we build with time slots that 5th year courses were assigned \n\t\tArrayList<TimeSlot> fifthYearSlots = new ArrayList<TimeSlot>(); \n\t\tCourse tempCourse;\n\t\tint tempCourseNumber;\n\t\tTimeSlot tempSlot;\n\t\t\n\t\t//Traverse through all the courses\n\t\tfor(int i = 0; i<sched.getCourses().size();i++)\n\t\t{\n\t\t\ttempCourse = sched.getCourses().get(i);\n\t\t\ttempCourseNumber = tempCourse.getNumber();\n\t\t\t\n\t\t\t//If its course number is between 500 and 600 and it's in the cpsc department\n\t\t\t// append it to the list of fifth year courses\n\t\t\tif(\n\t\t\t\t\t(tempCourseNumber >= 500) && \n\t\t\t\t\t(tempCourseNumber < 600))\n\t\t\t{\n\t\t\t\tfifthYearCourses.add(tempCourse);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//At this point, fifthYearCourses contains all the 500 level CPSC class\n\t\t//THis loop checks if the time slot for the current 500 level course has \n\t\t//already been added to our list. If it is, we know they are not all at different times.\n\t\t//\n\t\tfor(int i = 0; i<fifthYearCourses.size();i++)\n\t\t{\n\t\t\ttempSlot = fifthYearCourses.get(i).getSlot();\n\t\t\t\n\t\t\tif(tempSlot != null)\n\t\t\t{\n\t\t\t\n\t\t\t\tif(fifthYearSlots.contains(tempSlot))\n\t\t\t\t\treturn false;\n\t\t\t\telse\n\t\t\t\t\tfifthYearSlots.add(tempSlot);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}",
"public boolean isOverhit()\n\t{\n\t\treturn overhit;\n\t}",
"public int checkChasingPlayer()\n {\n if(stunCountdown > 0)\n {\n chasingPlayer = false;\n return stunCountdown;\n }\n if(Game.getInstance().getPlayer().getCurrentRoom().isControlRoom())\n {\n chasingPlayer = false;\n return(-1);\n }\n else\n {\n List<Exit> neighbors = getCurrentRoom().getCollectionOfExits();\n for(Exit neighbor : neighbors)\n {\n if(getCurrentRoom().getExit(neighbor).equals(Game.getInstance().getPlayer().getCurrentRoom()) && neighbor.isOperating())\n {\n chasingPlayer = true;\n return(5 + (int) Math.floor(Math.random() * 6));\n }\n }\n chasingPlayer = false;\n return(-1);\n }\n }",
"public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }",
"public static int gameOver(Node nd){\n\t\tint win;\n\t\tfor(int i=0; i<6; i++){\n\t\t\tfor(int j=0; j<7; j++){\n\t\t\t\tif((win = utilVert(nd,i,j)) != 0){\n\t\t\t\t\tif(win == -512)\n\t\t\t\t\t\treturn -512;\n\t\t\t\t\telse if(win == 512)\n\t\t\t\t\t\treturn 512;\n\t\t\t\t}\n\n\t\t\t\tif((win = utilHori(nd,i,j)) != 0){\n\t\t\t\t\tif(win == -512)\n\t\t\t\t\t\treturn -512;\n\t\t\t\t\telse if(win == 512)\n\t\t\t\t\t\treturn 512;\n\t\t\t\t}\n\n\t\t\t\tif((win = utilRDiag(nd,i,j)) != 0){\n\t\t\t\t\tif(win == -512)\n\t\t\t\t\t\treturn -512;\n\t\t\t\t\telse if(win == 512)\n\t\t\t\t\t\treturn 512;\n\t\t\t\t}\n\n\t\t\t\tif((win = utilLDiag(nd,i,j)) != 0){\n\t\t\t\t\tif(win == -512)\n\t\t\t\t\t\treturn -512;\n\t\t\t\t\telse if(win == 512)\n\t\t\t\t\t\treturn 512;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(fullBoard(nd))\n\t\t\treturn 1;\n\n\t\treturn 0;\n\t}",
"protected void testLessThanMaxLots () throws OutsideMaxLotsException\n {\n if (lots.size() >= MAX_LOTS)\n throw new OutsideMaxLotsException();\n }",
"public final boolean checkPrependOverLimit(int i) {\n boolean z = false;\n if (this.mLastVisibleIndex < 0) {\n return false;\n }\n if (!this.mReversedFlow ? findRowMin(true, null) <= i + this.mSpacing : findRowMax(false, null) >= i - this.mSpacing) {\n z = true;\n }\n return z;\n }",
"public int numberOfBoxesInPile()\n {\n if (aboveBox != null)\n {\n return 1 + aboveBox.numberOfBoxesInPile();\n }\n else\n {\n return 1;\n }\n }",
"public boolean canHit() {\n\t\treturn this.hand.countValue().first() < 17;\n\t}",
"public static int BlockCheckWin(ArrayList<BlockObject> objects)\n\t{\n\t\tint sum = 0;\n\t\t//Checks horizontal\n\t\tsum = BlockSumMatrix(objects);\n\t\t//Return sum if someone won.\n\t\tif(sum == 27 || sum == 30)\n\t\t\treturn sum;\n\t\t\n\t\treturn sum;\n\t}",
"public boolean hit() {\r\n add(deck.deal());\r\n return getHandValue() <= 21;\r\n }",
"public void removeMissiles(){\n nunMissiles--;\n }",
"public static int ShadowCheckWin(ArrayList<ShadowObject> objects)\n\t{\n\t\tint sum = 0;\n\t\t//Checks horizontal\n\t\tsum = ShadowSumMatrix(objects);\n\t\t//Return sum if someone won.\n\t\tif(sum == 27 || sum == 30)\n\t\t\treturn sum;\n\t\t\n\t\treturn sum;\n\t}",
"public boolean hasCardsLeftOver() {\r\n\r\n return !(currentCards.isEmpty());\r\n\r\n }",
"public static int countDivBy5(Scanner s){\n\t\t\n\t\tint count = 0;\n\t\t\n\t\twhile(s.hasNextInt()){\n\t\t\t\n\t\t\t//check to see if the next is divisible by 5 if so increment count\n\t\t\tif(s.nextInt() %5 == 0){\n\t\t\t\tcount ++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"boolean hasWeek5();",
"private boolean tryOverpopulation(int x, int y, Assignment assignment){\n\n\t\tif(getNeighborCount(x, y, assignment) >= 4)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"public boolean CheckVictory()\n {\n\n for (int i = 0; i < 6; i++) {\n if(isFiveAligned(\n getCell(i, 0),\n getCell(i, 1),\n getCell(i, 2),\n getCell(i, 3),\n getCell(i, 4),\n getCell(i, 5) )){\n Winner=getCell(i, 2);\n return true;\n }\n }\n\n for (int i = 0; i < 6; i++) {\n if(isFiveAligned(\n getCell(0,i),\n getCell(1,i),\n getCell(2,i),\n getCell(3,i),\n getCell(4,i),\n getCell(5,i) )){\n Winner=getCell(2, i);\n return true;\n }\n }\n CellType[] arrTypes={getCell(0, 0),getCell(1, 1),getCell(2, 2),getCell(3, 3),\n getCell(4, 4),getCell(5, 5)};\n\n \n if(isFiveAligned(arrTypes))\n {\n Winner=arrTypes[2];\n return true;\n }\n\n CellType[] REVERSE_arrTypes={getCell(0, 5),getCell(1, 4),getCell(2, 3),getCell(3, 2),\n getCell(4, 1),getCell(5, 0)};\n\n \n\n if(isFiveAligned(REVERSE_arrTypes))\n {\n Winner=REVERSE_arrTypes[2]; \n return true;\n }\n\n\n if(isFiveAligned(new CellType[]{getCell(0, 1),\n getCell(1, 2),\n getCell(2, 3),\n getCell(3, 4),\n getCell(4, 5),\n CellType.None\n })) {\n Winner=getCell(3, 4);\n return true;\n }\n \n if(isFiveAligned(new CellType[]{getCell(1, 0),\n getCell(2, 1),\n getCell(3, 2),\n getCell(4, 3),\n getCell(5, 4),\n CellType.None\n })) {\n Winner=getCell(4, 3);\n return true;\n }\n\n if(isFiveAligned(new CellType[]{\n getCell(4, 0),\n getCell(3, 1),\n getCell(2, 2),\n getCell(1, 3),\n getCell(0, 4),\n CellType.None\n \n })){\n Winner=getCell(2, 2);\n return true;}\n\n if(isFiveAligned(new CellType[]{\n getCell(5, 1),\n getCell(4, 2),\n getCell(3, 3),\n getCell(2, 4),\n getCell(1, 5),\n CellType.None\n \n })){\n Winner=getCell(3, 3);\n return true;}\n\n \n \n\n\n \n\n return false;\n }",
"public boolean isOver() {\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (!matrix[i][j].isClicked()) {\n return false;\n }\n }\n }\n return true;\n }"
] | [
"0.63674325",
"0.6319158",
"0.61977255",
"0.6111309",
"0.60675365",
"0.59199136",
"0.5885786",
"0.5874995",
"0.5870801",
"0.5825881",
"0.58250934",
"0.58112264",
"0.5777417",
"0.57406205",
"0.57227916",
"0.57025653",
"0.56693614",
"0.5655163",
"0.56523865",
"0.56504405",
"0.56455255",
"0.56125724",
"0.5595549",
"0.5590264",
"0.5574241",
"0.55576324",
"0.5514081",
"0.547316",
"0.5454509",
"0.54543954",
"0.54405713",
"0.5438509",
"0.543156",
"0.5429337",
"0.5427468",
"0.5407118",
"0.5403813",
"0.5403269",
"0.54029125",
"0.53966004",
"0.53813297",
"0.5370659",
"0.53705627",
"0.53676355",
"0.53561825",
"0.5342441",
"0.5326522",
"0.53142637",
"0.5312498",
"0.53076136",
"0.53051287",
"0.53045857",
"0.5297203",
"0.5287142",
"0.5283235",
"0.5283211",
"0.52824575",
"0.52797025",
"0.5274285",
"0.52731776",
"0.52701783",
"0.52614105",
"0.52561575",
"0.52486503",
"0.5245198",
"0.5242953",
"0.52386713",
"0.5238013",
"0.5231559",
"0.52270544",
"0.5225893",
"0.5220632",
"0.5210404",
"0.5207946",
"0.5207484",
"0.5206297",
"0.52010024",
"0.51892716",
"0.518563",
"0.51637316",
"0.51609325",
"0.51591",
"0.5150634",
"0.5142413",
"0.5137767",
"0.5137675",
"0.51369065",
"0.51367456",
"0.51344943",
"0.51343036",
"0.5126723",
"0.51223874",
"0.5122124",
"0.5109831",
"0.51093984",
"0.5108552",
"0.5105449",
"0.5104302",
"0.51026595",
"0.510086"
] | 0.72536224 | 0 |
Checks if is first part time under over. | public static Boolean isFirstPartUnderOver(Integer integer) {
return firstPartUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasDesiredTime();",
"boolean hasStartTime();",
"boolean hasTime();",
"boolean hasTime();",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public boolean hasDesiredTime() {\n return desiredTime_ != null;\n }",
"public boolean hasDesiredTime() {\n return desiredTimeBuilder_ != null || desiredTime_ != null;\n }",
"boolean hasExchangeTime();",
"public boolean isBefore(Time time) {\n\tboolean check = true;\n\t\tif(this.getHour() > time.getHour()) {\n\t\t\tcheck = false;\n\t\t} else if((this.getHour() == time.getHour()) && (this.getMinutes() > time.getMinutes())){\n\t\t\tcheck = false;\n\t\t}\n\t\treturn check;\n\t}",
"boolean hasEndTime();",
"public boolean isFirstOfTheDay() {\r\n return !strDate.equals(game.settings.getLastSeen());\r\n }",
"boolean hasErrorTime();",
"public boolean usesTime() {\n return uhrzeit != null;\n }",
"public boolean isDuringTime() {\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HHmm\");\r\n\t\tint now = Integer.parseInt( sdf.format(new Date()) );\r\n for ( int i = 0; i < openTime.length; i++ )\r\n\t\t\tif ( now >= openTime[i] && now <= closeTime[i])\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean hasTime() {\n return this.timeWrapper.isPresent();\n }",
"@java.lang.Override\n public boolean hasTime() {\n return instance.hasTime();\n }",
"public boolean checkTime() {\n boolean result = false;\n long currentTime = System.currentTimeMillis();\n while (currentTime == timeFlag + 1000) {\n this.timeFlag = currentTime;\n result = true;\n return result;\n }\n return result;\n }",
"boolean hasSubmitTime();",
"private boolean adjustedTimeIsSet() {\n return (adjustedTimeStamp != null);\n }",
"boolean hasCurrentStateTime();",
"boolean hasTimeRecord();",
"private boolean hfun(Time currentTime,POI last,POI poi,Plan mPlan,boolean skip){\n Time arriveAt=new Time(currentTime.hour,currentTime.min);\n if(last!=null){\n if(arriveAt.add(last.getShortestPath(poi.getId()))){\n if(poi.getOpenTime().compare(arriveAt)||skip){\n return true;\n }\n }\n }\n else{\n \n if(mPlan!=null){\n POI mLast = mPlan.getLastPOI();\n if(mLast!=null)\n arriveAt.add(mPlan.getLastPOI().getShortestPath(poi.getId()));\n }\n if(poi.getOpenTime().compare(arriveAt)||skip){\n return true;\n }\n }\n return false;\n }",
"boolean hasVisitStarttime();",
"boolean hasVisitStarttime();",
"@Override\n protected boolean isFinished() {\n return Timer.getFPGATimestamp()-startT >= 1.5;\n }",
"boolean hasUseTime();",
"boolean hasUseTime();",
"private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }",
"public boolean hasTime() {\n return fieldSetFlags()[0];\n }",
"public boolean hasStartTime() {\n return fieldSetFlags()[0];\n }",
"private boolean validateArrivingTime(StopPoint currentSP) {\n\t\ttry {\n\t\t\tint time = Integer.valueOf(hourComboBox.getValue()) * 60;\n\t\t\ttime += Integer.valueOf(minuteComboBox.getValue());\n\t\t\ttime += timeIndicatorComboBox.getValue().equals(\"PM\") ? 12 * 60 : 0;\n\t\t\tfor (StopPoint stopPoint : stopPoints) {\n\t\t\t\tif (stopPoint.getTime() != null && !stopPoint.getTime().equals(\"\") && stopPoint != currentSP) {\n\t\t\t\t\tString[] spTimeString = stopPoint.getTime().split(\"[ :]+\");\n\t\t\t\t\tint spTime = Integer.valueOf(spTimeString[0]) * 60;\n\t\t\t\t\tspTime += Integer.valueOf(spTimeString[1]);\n\t\t\t\t\tspTime += spTimeString[2].equals(\"PM\") ? 12 * 60 : 0;\n\n\t\t\t\t\tif (time <= spTime + 5 && time >= spTime - 5) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isSetTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(TIME$2) != 0;\n }\n }",
"boolean hasInstant();",
"protected boolean _isFirstTime() {\n return _firstTime;\n }",
"public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }",
"boolean hasCollectEndTime();",
"public boolean timeExists(int time) {\n Node currentNode = first;\n while(currentNode != null) {\n if(time == currentNode.getData().getIntegerTime())\n return true;\n currentNode = currentNode.getNextNode();\n }\n return false;\n }",
"private boolean isTimeOverlap(Item t) {\n\t\treturn t.getEndDate().equals(event.getEndDate());\n\t}",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"boolean hasTimeBoltHBoltE();",
"public void checkAddTrackDay() {\n int hour = this.timeTrankiManager.getHour();\n int minute = this.timeTrankiManager.getMinute();\n\n if (hour == 9 && minute == 00) {\n this.trackListFinal.addTrackDay(1);\n }\n }",
"public boolean hasInstant() {\n return instant_ != null;\n }",
"public boolean isNowTime_in_period(){\r\n if (isTimeWith_in_Interval((LocalTime.now()).format(formatter),openTime,closeTime)) {\r\n // System.out.println(\"hi this works\");\r\n return true;\r\n } else {\r\n \r\n return false;\r\n }\r\n }",
"public boolean hasExchangeTime() {\n return exchangeTime_ != null;\n }",
"public boolean hasUseTime() {\n return useTime_ != null;\n }",
"public boolean hasUseTime() {\n return useTime_ != null;\n }",
"boolean hasDepositEndTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"private boolean checkTime(int hour, int minutes) {\n\tboolean check = true;\n\t\tif((hour < 0) || (hour > 23) || (minutes < 0) || (minutes > 59)) {\n\t\t\tcheck = false;\n\t\t}\n\t\telse {\n\t\t\tcheck = true;\n\t\t}\n\treturn check;\n\t}",
"boolean hasVotingStartTime();",
"public void testSingleTimeBeforeRules() {\n ZoneId zone = ZoneId.of(\"America/New_York\");\n long time = time(\"1980-01-01\", zone);\n assertThat(Instant.ofEpochMilli(time), lessThan(lastTransitionIn(zone).getInstant()));\n assertRoundingAtOffset(LocalTimeOffset.lookup(zone, time, time).lookup(time), time, hours(-5));\n }",
"public boolean isSetStartTime() {\n return this.startTime != null;\n }",
"public boolean isJourneyInThePast() {\n\t\t\n\t\tlong journeyStartTime = TimeParser.strDateTimeToDate(mDeparture).getTime();\n\t\tlong now = System.currentTimeMillis();\n\t\t//System.out.println(\"DBG isInPast: now:\"+now+\" start:\"+journeyStartTime);\n\t\tif (journeyStartTime >= now) {\n\t\t\treturn false;\n\t\t}\n\t\tif (Constants.useWallClock == false) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isTimeElapsed() {\n\t\treturn (timeLeft <= 0);\n\t}",
"@Override\n public boolean isMayorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()<this.getValue();\n }",
"public void testGetStartTime() {\n assertTrue(mb.getStartTime() > -1);\n }",
"public boolean isSetStartTime() {\n return this.startTime != null;\n }",
"public boolean func_isInTheFuture() {\n if(TimeUtils.compareWithNow(startTime) >= 0)\n return true;\n return false;\n }",
"boolean hasStart();",
"public boolean isNightTime() {\n\t\tint hour24 = this.total % 24;\n\t\tif (hour24 < 7 || hour24 > 18) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isScheduled(){\n //System.out.println(\"nextrun: \" + nextrun.getTime() + \" nu: \" + System.currentTimeMillis());\n if (nextrun != null){\n long next = nextrun.getTime();\n \n return next < System.currentTimeMillis();\n }else{\n //null => instance has never run before & should run asap\n return true;\n }\n }",
"public boolean isFirstWeekFull() {\r\n\t\tif (flsaDays.size() == 7) {\r\n\t\t\treturn (flsaTime.isBefore(payPeriodBeginTime)) ? false : true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"boolean hasTimeBoltBBoltC();",
"private boolean isSurpass(State lastTime, State nowTime) {\n boolean result;\n String last;\n String now;\n try {\n last = ShortcutUtil.refFormatOnlyDate(Long.valueOf(lastTime.getTime_point()));\n now = ShortcutUtil.refFormatOnlyDate(Long.valueOf(nowTime.getTime_point()));\n }catch (Exception e){\n e.printStackTrace();\n return false;\n }\n result = !last.equals(now);\n return result;\n }",
"boolean hasTimeSpoutBoltF();",
"public boolean hasUseTime() {\n return useTimeBuilder_ != null || useTime_ != null;\n }",
"public boolean hasUseTime() {\n return useTimeBuilder_ != null || useTime_ != null;\n }",
"public boolean isFirstStart() {\n return !sp.contains(UUID_SP_KEY);\n }",
"boolean hasSendTime();",
"boolean hasBeginDate();",
"public boolean isAM() {\n\tif (start != null)\n\t return start.isBefore(LocalTime.NOON);\n\treturn false;\n }",
"boolean hasVotingEndTime();",
"public boolean hasExchangeTime() {\n return exchangeTimeBuilder_ != null || exchangeTime_ != null;\n }",
"public boolean isSetTime() {\n return EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID);\n }",
"private boolean timeSlotConflict(Course course, Lab lab)\n\t{\n\t\tboolean passed = true;\n\t\tTimeSlot cSlot = course.getSlot(), lSlot = lab.getSlot();\n\t\t\n\t\t//Obviously there is no conflict if they course + lab didn't have a time slot assigned\n\t\tif(cSlot != null && lSlot != null)\n\t\t{\n\t\t\t//If a course and lab are on the same day, or course is monday and lab is friday\n\t\t\tif(cSlot.getDay() == lSlot.getDay() || (cSlot.getDay()==ScheduleDay.MO && lSlot.getDay()==ScheduleDay.FR))\n\t\t\t{\n\t\t\t\t//If it's a Tuesday\n\t\t\t\tif(cSlot.getDay() == ScheduleDay.TU)\n\t\t\t\t{\n\t\t\t\t\t//If they have the same start they are a conflict\n\t\t\t\t\t//Lectures are 1.5 hours and labs are 1 hour. \n\t\t\t\t\t//If a lecture starts 30 min after a lab, it's a conflict\n\t\t\t\t\t//If a lecture starts 30 min before (-70 becuase thats how we coded it for ints)\n\t\t\t\t\t// then it is a conflict\n\t\t\t\t\t//NOTE: I need to do more testing, but everything i tired is working so far\n\t\t\t\t\tif(cSlot.getStartTime() == lSlot.getStartTime())\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()+30))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()-70))\n\t\t\t\t\t\tpassed = false; \n\t\t\t\t\telse if (cSlot.getStartTime() == (lSlot.getStartTime() -100))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\t//THIS IS WHERE WE NEED FIXING \n\t\t\t\t}\n\t\t\t\telse if(cSlot.getDay() == ScheduleDay.MO && lSlot.getDay() == ScheduleDay.FR)\n\t\t\t\t{\n\t\t\t\t\tif(cSlot.getStartTime() == lSlot.getStartTime())\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()+100))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\t//else if(sC.getStartTime() == (sL.getStartTime()-100))\n\t\t\t\t\t\t//conflict = true; \n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t//If they are equaal, there is a time conflict\n\t\t\t\t\tpassed = !(cSlot.getStartTime() == lSlot.getStartTime());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tpassed = true; //If they don't have the same day, they are obviously not in conflict\n\t\t}\n\t\treturn passed;\n\t}",
"boolean hasTimeBoltABoltB();",
"@SuppressWarnings(\"unused\")\n public boolean isFirstTime() {\n return firstTime;\n }",
"private static void checkLastSampleTime() {\n double lastSampleTime = ((Double)state.get( \"lastSampleTime\" )).doubleValue();\n Double cTime = (Double)state.get( \"currentTime\" );\n double currentTime = cTime.doubleValue(); // just in case this is a ref\n\n if( lastSampleTime <= currentTime ){\n validity = false;\n out.println( \"<BR>Error: Last Sample Time is less than current time<BR>\" ); \n }\n }",
"protected boolean isFinished() {\n return (System.currentTimeMillis() - startTime) >= time;\n \t//return false;\n }",
"public boolean isSetStartTime() {\n return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);\n }",
"public boolean isSetStartTime() {\n return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);\n }",
"public boolean isSetStartTime() {\n return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);\n }",
"public boolean isSetStartTime() {\n return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);\n }",
"public boolean isSetStartTime() {\n return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);\n }",
"public boolean isSetStartTime() {\n return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);\n }",
"@Override\n public boolean isMenorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()>this.getValue(); \n }",
"public boolean isInPreference(DateTime startTime){\n int startHour = startTime.getHourOfDay();\n int dayNum = startTime.getDayOfWeek();\n\n if (dayPreference[dayNum] < 0 || hourPreference[startHour] < 0)\n return false;\n\n return true;\n }",
"public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }",
"public boolean hasTime() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}",
"public boolean hasTime() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"private boolean isMeetingReadyToStart(Meeting meeting) {\n return meeting.getAgendaItems().length != 0 && !meeting.getTitle().equals(\"\");\n\n }",
"public boolean isTime() {\n return false;\n }",
"public boolean isTimeToSelect();",
"public boolean hasVisitStarttime() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public boolean hasVisitStarttime() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }"
] | [
"0.74681324",
"0.7057817",
"0.7025103",
"0.7025103",
"0.69595575",
"0.6943444",
"0.66531956",
"0.6601486",
"0.6485597",
"0.6463446",
"0.6445494",
"0.6437654",
"0.6420949",
"0.64154154",
"0.6402866",
"0.6382135",
"0.63752556",
"0.6347146",
"0.63452417",
"0.6343757",
"0.63357264",
"0.6331538",
"0.6317308",
"0.6317308",
"0.62844765",
"0.6267754",
"0.6267754",
"0.62616307",
"0.62522954",
"0.6240269",
"0.6239362",
"0.623533",
"0.62190884",
"0.61851364",
"0.61711127",
"0.6167107",
"0.61460716",
"0.6121563",
"0.6084111",
"0.60774434",
"0.60704684",
"0.6067488",
"0.6058388",
"0.6001964",
"0.5996411",
"0.5996411",
"0.5988322",
"0.59780324",
"0.59780324",
"0.59780324",
"0.59780324",
"0.59780324",
"0.59780324",
"0.5976898",
"0.59745693",
"0.59731495",
"0.5957307",
"0.5951843",
"0.59497696",
"0.5945184",
"0.5934008",
"0.59152174",
"0.59045434",
"0.590069",
"0.58890593",
"0.5865636",
"0.5859576",
"0.5853504",
"0.58423805",
"0.5841193",
"0.58372986",
"0.58372986",
"0.58282053",
"0.58251524",
"0.58243877",
"0.5824278",
"0.5823878",
"0.58090365",
"0.5798576",
"0.5790042",
"0.5788866",
"0.57857263",
"0.5772129",
"0.5769691",
"0.57635987",
"0.57635987",
"0.57635987",
"0.57635987",
"0.57635987",
"0.57635987",
"0.57621694",
"0.5756445",
"0.57499003",
"0.57492965",
"0.57348263",
"0.57342476",
"0.5733838",
"0.57235193",
"0.57217294",
"0.5713889",
"0.5713889"
] | 0.0 | -1 |
Checks if is first quarter under over. | public static Boolean isFirstQuarterUnderOver(Integer integer) {
return firstQuarterUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Boolean isForthQuarterUnderOver(Integer integer) {\r\n\t\treturn forthQuarterUnderOver.contains(integer);\r\n\t}",
"@Override\n\tpublic void endOfQuarter(int quarter) {\n\t\t\n\t}",
"public static Boolean isThirdQuarterUnderOver(Integer integer) {\r\n\t\treturn thirdQuarterUnderOver.contains(integer);\r\n\t}",
"public static Boolean isSecondQuarterUnderOver(Integer integer) {\r\n\t\treturn secondQuarterUnderOver.contains(integer);\r\n\t}",
"public boolean isMultipleQuarterHour() {\n\n if (this.startTimeArray == null || this.endTimeArray == null) {\n return true;\n }\n long minutes = Duration.between(LocalTime.parse(this.startTimeString), LocalTime.parse(this.endTimeString)).toMinutes();\n\n if (minutes % 15 == 0 && minutes > 15) {\n\n return true;\n\n }\n\n return false;\n\n }",
"public void insertQuarter() {\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n gumballMachine.getState().insertQuarter();\n }",
"private boolean isValidQuiz1(double quiz1)\n\t{\n\t\treturn quiz1 >= 0 && quiz1 <= 10;\n\t}",
"private boolean isValidQuiz3(double quiz3)\n\t{\n\t\treturn quiz3 >= 0 && quiz3 <= 10;\n\t}",
"public void testQUARTER3() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 94, \"quarter\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"private boolean checkQuads(Player player) {\n\t\tint j;\n\t\tfor (j = 0; j <= 3; j++) {\n\t\t\tif (player.getSevenCardsTempHand().get(j).getRank()\n\t\t\t\t\t.equals(player.getSevenCardsTempHand().get(j + 3).getRank())) {\n\t\t\t\tplayer.setQuads(true);\n\t\t\t\tplayer.setHandRank(HandRank.QUADS);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!player.isQuads())\n\t\t\treturn false;\n\t\t\n\t\t// init 5 cards hand\n\t\tfor(int i = 0; i < hand.length; i++) {\n\t\t\thand[i] = player.getSevenCardsTempHand().get(j);\n\t\t\tplayer.getSevenCardsTempHand().remove(j);\n\t\t}\n\t\t\n\t\t// add kicker\n\t\thand[4] = player.getSevenCardsTempHand().get(2);\n\n\t\tplayer.setFiveCardsHand(hand);\n\t\treturn true;\n\t}",
"protected void insertQuarter(double balance)\r\n {\r\n totalBalance = balance;\r\n totalBalance = totalBalance + 0.25;\r\n \r\n }",
"public void insertQuarter(int coin[]) {\n if(coin.length ==2){\n \n if(coin[0] == 25 && coin[1]==25){\n //System.out.println(\"a[0]\"+a[0]);\n System.out.println(\"You inserted a quarter in q2\");\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n }else{\n gumballMachine.setState(gumballMachine.getNoQuarterState()); \n }\n \n \n \n }\n \n // System.out.println(\"You inserted a quarter in q2\");\n // gumballMachine.setState(gumballMachine.getHasQuarterState());\n\t}",
"public void testQUARTER1() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 92, \"quarterly\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"private static boolean checkIfYearContinue(Sheet sheet) {\r\n String last = sheet.getCellAt(\"A\" + sheet.getRowCount()).getTextValue(); \r\n return !last.equals(\"end\");\r\n }",
"@Test\n public void floorToQuarterHour() throws Exception {\n DateTime dt0 = new DateTime(2009,6,24,23,29,30,789,DateTimeZone.UTC);\n\n Assert.assertNull(DateTimeUtil.floorToQuarterHour(null));\n \n // floor to nearest half hour\n DateTime dt1 = DateTimeUtil.floorToQuarterHour(dt0);\n\n Assert.assertEquals(2009, dt1.getYear());\n Assert.assertEquals(6, dt1.getMonthOfYear());\n Assert.assertEquals(24, dt1.getDayOfMonth());\n Assert.assertEquals(23, dt1.getHourOfDay());\n Assert.assertEquals(15, dt1.getMinuteOfHour());\n Assert.assertEquals(0, dt1.getSecondOfMinute());\n Assert.assertEquals(0, dt1.getMillisOfSecond());\n Assert.assertEquals(DateTimeZone.UTC, dt1.getZone());\n\n DateTime dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,0,0,0));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,1,23,456));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,30,12,56));\n Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,59,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,55,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,46,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n }",
"private boolean isAscension(final Calendar date) {\n Calendar paquesMonday = getEasterDate(date.get(Calendar.YEAR));\n paquesMonday.add(Calendar.DATE, 39);\n return date.get(Calendar.DAY_OF_YEAR) == paquesMonday\n .get(Calendar.DAY_OF_YEAR)\n && date.get(Calendar.MONTH) == paquesMonday.get(Calendar.MONTH);\n }",
"public boolean hasQuads(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 4);\r\n\t\t\r\n\t\t\r\n\t}",
"boolean isSetFractionalMinimum();",
"public int getQuarter () {\n return NQuarter;\n }",
"private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }",
"public void setQuarter(String quarter) {\r\n this.quarter = quarter;\r\n }",
"public void quadTest()\n\t{\n\t\tint index = 0, lim = 3;\n\t\tboolean quads = false;\n\t\t\n\t\twhile (index<=lim && (!quads))\n\t\t{\n\t\t\tif ((intRep[index] == intRep[index+1]) &&\n\t\t\t\t(intRep[index] == intRep[index+2]) &&\n\t\t\t\t(intRep[index] == intRep[index+3]) )\n\t\t\t{\n\t\t\t\tquads = true;\n\t\t\t\thandScore = 70000;\n\t\t\t\thandScore += 100 * intRep[index];\n\t\t\t}\n\t\t\telse index++;\n\t\t}\n\t}",
"public void testQUARTER2() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 93, \"quartered\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"public boolean isFirstWeekFull() {\r\n\t\tif (flsaDays.size() == 7) {\r\n\t\t\treturn (flsaTime.isBefore(payPeriodBeginTime)) ? false : true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private boolean exceedRange(int year) {\n\t\tboolean exceeds = false;\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint upperRange = currentYear + RANGE_LIMIT;\n\t\tint lowerRange = currentYear - RANGE_LIMIT;\n\t\t\n\t\tif(year < lowerRange || year > upperRange){\n\t\t\texceeds = true;\n\t\t}\n\t\treturn exceeds;\n\t}",
"boolean isNilFractionalMinimum();",
"public boolean isBefore(Group3Date b) {\n\t\t\treturn compareTo(b) < 0;\n\t\t}",
"@Test\n public void testOneQuarter() {\n int oneQuarter = 0x00BC; // http://codepoints.net/U+00BC\n int equalSign = 0x003D;\n assertEquals(\n equalSign,\n GlyphCorrector.singleton().codePointConversion(\"AdvP4C4E74\",\n oneQuarter));\n }",
"public String getQuarter() {\r\n return quarter;\r\n }",
"public boolean hasPast();",
"private boolean isValidMidtermExam(double midtermExam)\n\t{\n\t\treturn midtermExam >= 0 && midtermExam <= 100;\n\t}",
"public boolean isBefore(SpentOn spentOn)\n {\n return ( (calendar.get(Calendar.YEAR) < spentOn.calendar.get(Calendar.YEAR))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) < spentOn.calendar.get(Calendar.MONTH))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) < spentOn.calendar.get(Calendar.DAY_OF_MONTH))\n );\n }",
"public boolean experired() {\n\t\tint month = Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\tString[] parts = this.experiation.split(\"/\");\n\t\tString originalMonth = parts[0];\n\t\tint oM = Integer.parseInt(originalMonth);\n\t\tString originalYear = parts[1];\n\t\tint oY = Integer.parseInt(originalYear);\n\t\t\n\t\tif(oY < year) {\n\t\t\treturn true;\n\t\t}\n\t\tif(oY == year && oM < month) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public int[] findQuarterBounds(int[] datesJulian, int numQuarters) {\n int numTransactions = datesJulian.length;\n int[] timeBlock = new int[numTransactions];\n int lowerBound = 0;\n int upperBound = 0;\n\n // Get indices of earliest and latest julianDate\n earliestIndex = MinAndMaxFinder.findEarliestIndex(datesJulian);\n latestIndex = MinAndMaxFinder.findLatestIndex(datesJulian);\n\n int[] year = new int[datesJulian.length];\n int[] month = new int[datesJulian.length];\n int[] dateGreg = new int[2];\n\n // Get the month and year values of all the transaction julianDate\n for (int i = 0; i < datesJulian.length; i++) {\n dateGreg = convertJulianToGregorian(datesJulian[i]);\n year[i] = dateGreg[0];\n month[i] = dateGreg[1];\n }\n\n /* Get the year and month value of the earliest date only\n * to be used as a starting point for the search */\n int y = year[earliestIndex];\n int m = month[earliestIndex];\n\n /* Find the initial lower and upper bounds for the search\n * loop */\n if (m > 0 & m < 4) {\n lowerBound = 0;\n upperBound = 4;\n }\n if (m > 3 & m < 7) {\n lowerBound = 3;\n upperBound = 7;\n }\n if (m > 6 & m < 10) {\n lowerBound = 6;\n upperBound = 10;\n }\n if (m > 9 & m < 13) {\n lowerBound = 9;\n upperBound = 13;\n }\n //System.out.println(\"Number of ... Quarters \" + getNumQuarters());\n /* Search Loop */\n int groupCounter = 1;\n boolean[] indexToExcludeFromSearch = new boolean[numTransactions];\n java.util.Arrays.fill(indexToExcludeFromSearch, false);\n // Iterate for each quarter\n for (int i = 0; i < numQuarters; i++) {\n // Iterate for each transaction\n for (int j = 0; j < numTransactions; j++) {\n if (year[j] == y && (month[j] > lowerBound & month[j] < upperBound) &&\n indexToExcludeFromSearch[j] == false) {\n timeBlock[j] = groupCounter;\n indexToExcludeFromSearch[j] = true;\n }\n } // end inner for\n if (lowerBound == 9 && upperBound == 13) {\n lowerBound = 0;\n upperBound = 4;\n y++;\n } else {\n lowerBound = lowerBound + 3;\n upperBound = upperBound + 3;\n }\n groupCounter++;\n } // end outer for\n groupCounter--;\n setNumQuarters(groupCounter);\n DataPreprocessing split = new DataPreprocessing();\n\n return timeBlock;\n }",
"boolean isNilSingleBetMinimum();",
"public boolean domainMin1Closed() throws IllegalStateException {\n\treturn true;\n }",
"boolean hasWeek3();",
"public boolean thirtyoneDays() {\n String[] months = new String[]{\"January\", \"March\", \"May\", \"July\", \"August\", \"October\", \"December\"};\n for (String m : months) {\n if (m.equals(this.month)) {\n return true;\n }\n }\n return false;\n }",
"protected boolean isOverdue() {\n\t\t// this might be backwards, go back and check later\n\t\t/*int i = todaysDate.compareTo(returnDate);// returns 0, a positive num, or a negative num\n\t\tif (i == 0) { return false;}\t\t// the dates are equal, not overdue\n\t\telse if (i > 0) { return true; }\t// positive value if the invoking object is later than date\n\t\telse { return false; } */\t\t\t// negative value if the invoking object is earlier than date\n\t\t\n\t\t// can also do\n\t\tif (todaysDate.getTime() > returnDate.getTime() ) { return true; }\n\t\telse { return false; }\t// if the difference in time is less than or equal\n\t}",
"public boolean hasPreviousInSet() {\n return (hasPrevious() &&\n (indexOfCurrentElement - 1 >= firstIndexOfCurrentSet) &&\n (indexOfCurrentElement - 1 < firstIndexOfCurrentSet + quantity));\n }",
"public boolean upwardTrend() {\n\t\tfor(int index = 1; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index-1) <= rank.get(index)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean nextRound() {\n if (numberOfRounds > playedRounds) {\n return true;\n }\n return false;\n }",
"private boolean crossesInternationalDateline(String eastValue, \n String westValue\n ) {\n boolean crosses = false;\n \n if ((eastValue != null) &&\n (eastValue != \"\") &&\n (westValue != null) &&\n (westValue != \"\")\n ) {\n Double eastInteger = new Double(eastValue);\n Double westInteger = new Double(westValue);\n \n crosses = westInteger > eastInteger;\n }\n \n logger.debug(\"crosses International Dateline: \" + crosses);\n \n return crosses;\n }",
"@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}",
"public boolean not3TimesHigher() {\n\t\tArrayList<Double> temp=averageSalaries();\n\t\tfor(int i=0;i<temp.size();i++) {\n\t\t\tdouble selectOne= temp.get(i);//choose the select employee\n\t\t\ttemp.remove(i);//remove the select one's salary\n\t\t\tdouble[] otherEmployees=new double[temp.size()];\n\t\t\tfor(int j=0;j<otherEmployees.length;j++) {\n\t\t\t\totherEmployees[j]=temp.get(j);\n\t\t\t}\n\t\t\ttemp.add(i,selectOne);//add the salary whose selected last time.\n\t\t\ttry{\n\t\t\t\tif(selectOne>(average(otherEmployees)*3)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}catch(IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(\"There is something wrong with input\");\n\t\t\t}\n\t\t}\n\t return true;\n\t}",
"public static boolean inRange(long quakeTime) throws Exception {\n SimpleDateFormat dayFormatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n String quakeDay = dayFormatter.format(new Date(quakeTime));\n String currentDay = dayFormatter.format(new Date());\n return (quakeDay.equals(currentDay));\n }",
"public boolean checkX1()\n {\n if((this.getX()<5)) {\n return true;\n }\n else\n return false;\n\n }",
"public boolean isOverdue(int today);",
"@java.lang.Override\n public boolean hasQuatValue() {\n return typeCase_ == 11;\n }",
"private boolean isValidQuiz2(double quiz2)\n\t{\n\t\treturn quiz2 >= 0 && quiz2 <= 10;\n\t}",
"public boolean checkLessThanMaxX() {\n return (currX + getXMargin) <= getMaxX;\n }",
"private boolean isValidFinalExam(double finalExam)\n\t{\n\t\treturn finalExam >= 0 && finalExam <= 100;\n\t}",
"public boolean expired(){\n return !Period.between(dateOfPurchase.plusYears(1), LocalDate.now()).isNegative();\n }",
"boolean hasQuatValue();",
"public boolean hasQ() {\n return fieldSetFlags()[5];\n }",
"@Test(timeout = 4000)\n public void test039() throws Throwable {\n Range range0 = Range.ofLength(0L);\n boolean boolean0 = range0.startsBefore(range0);\n assertFalse(boolean0);\n assertTrue(range0.isEmpty());\n }",
"@java.lang.Override\n public boolean hasQuatValue() {\n return typeCase_ == 11;\n }",
"public boolean istrianglevalid(double semiPer) {\n //declare variables\n boolean checkA = true;\n boolean checkB = true;\n boolean checkC = true;\n \n if (semiPer >= sideA && semiPer >= sideB && semiPer >= sideC) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean hasTick();",
"public static void before1(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,5);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==5);\n assert(ret0==false);\n System.out.println(ret0);\n }",
"private boolean checkFifthYear(Schedule sched)\n\t{\n\t\tArrayList<Course> fifthYearCourses = new ArrayList<Course>(); //Only 500CPSC courses\n\t\t//A list we build with time slots that 5th year courses were assigned \n\t\tArrayList<TimeSlot> fifthYearSlots = new ArrayList<TimeSlot>(); \n\t\tCourse tempCourse;\n\t\tint tempCourseNumber;\n\t\tTimeSlot tempSlot;\n\t\t\n\t\t//Traverse through all the courses\n\t\tfor(int i = 0; i<sched.getCourses().size();i++)\n\t\t{\n\t\t\ttempCourse = sched.getCourses().get(i);\n\t\t\ttempCourseNumber = tempCourse.getNumber();\n\t\t\t\n\t\t\t//If its course number is between 500 and 600 and it's in the cpsc department\n\t\t\t// append it to the list of fifth year courses\n\t\t\tif(\n\t\t\t\t\t(tempCourseNumber >= 500) && \n\t\t\t\t\t(tempCourseNumber < 600))\n\t\t\t{\n\t\t\t\tfifthYearCourses.add(tempCourse);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//At this point, fifthYearCourses contains all the 500 level CPSC class\n\t\t//THis loop checks if the time slot for the current 500 level course has \n\t\t//already been added to our list. If it is, we know they are not all at different times.\n\t\t//\n\t\tfor(int i = 0; i<fifthYearCourses.size();i++)\n\t\t{\n\t\t\ttempSlot = fifthYearCourses.get(i).getSlot();\n\t\t\t\n\t\t\tif(tempSlot != null)\n\t\t\t{\n\t\t\t\n\t\t\t\tif(fifthYearSlots.contains(tempSlot))\n\t\t\t\t\treturn false;\n\t\t\t\telse\n\t\t\t\t\tfifthYearSlots.add(tempSlot);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public boolean isFirstRound() {\r\n return cards.size() == 2;\r\n }",
"public boolean m10374q() {\n return this.Q.m15884s();\n }",
"public boolean isStripExistingQ3()\r\n {\r\n return stripExistingQ3;\r\n }",
"public static void before0(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,6);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==6);\n assert(ret0==true);\n System.out.println(ret0);\n }",
"public int checkTrend(double a1d, double a7d) {\r\n\t\tif (a7d > a1d) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}",
"public boolean isSpare(){\r\n\t\tif( this.firstThrow + this.secondThrow == 10\r\n\t\t\t&& !this.isStrike())\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public abstract double calculateQuarterlyFees();",
"@Test\n public void monthly_firstMonday_recursEveryFirstMonday() {\n assertTrue(firstMondayEveryMonth.includes(firstMondayOfApril));\n assertTrue(firstMondayEveryMonth.includes(firstMondayOfMarch));\n assertTrue(firstMondayEveryMonth.includes(firstMondayOfJan2018));\n assertFalse(firstMondayEveryMonth.includes(firstTuesdayOfMarch));\n }",
"public boolean isBelowRail() {\r\n return this.offset < 0;\r\n }",
"public boolean isHighCard() {\r\n\r\n return getHighestConsecutive() == 1;\r\n }",
"@Test\n void sellingDatePast() {\n int originalQuality = 10;\n Item[] items = new Item[]{\n new Item(\"single\", 5, originalQuality),\n new Item(\"double\", -1, originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"single\", app.items[0].name);\n assertTrue(originalQuality > app.items[0].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 1, app.items[0].quality, \"Quality should've dropped regularly\");\n\n assertEquals(\"double\", app.items[1].name);\n assertTrue(originalQuality > app.items[1].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 2, app.items[1].quality, \"Quality should've dropped twice as much\");\n }",
"private boolean cond3(Data C) {\n return (C.getBottom() > this.yT);\n }",
"public boolean isFuture()\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int dayT = currentDate.get(GregorianCalendar.DATE);\n int monthT = currentDate.get(GregorianCalendar.MONTH) + 1;\n int yearT = currentDate.get(GregorianCalendar.YEAR);\n int hourT = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minuteT = currentDate.get(GregorianCalendar.MINUTE);\n\n if (yearT < year)\n {\n return true;\n }\n else if (yearT == year && monthT < month)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT < day)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT == day && hourT < hour)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT == day && hourT == hour\n && minuteT < minute)\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"boolean signalMinStep(int minStep) {\n if (nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter <= minStep) {\n includedLength = nextStepLength;\n computeRemainingLength();\n return false;\n } else {\n return previousRowsLength + borderBefore \n + borderAfter + paddingBefore + paddingAfter > minStep;\n }\n }",
"protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }",
"public boolean mo1531a() {\n if (Math.abs(this.f15728e - 1.0f) < 0.01f) {\n if (Math.abs(this.f15729f - 1.0f) < 0.01f) {\n return false;\n }\n }\n return true;\n }",
"private void givenExchangeRatesExistsForEightMonths() {\n }",
"public Integer getQuarter() {\r\n return QTR;\r\n }",
"public boolean mo7630q() {\n return !this.f4373c.isEmpty() && !this.f4372b.isEmpty();\n }",
"@Override\n public synchronized boolean hasPeriodPassed(double period) {\n if (get() > period) {\n // Advance the start time by the period.\n // Don't set it to the current time... we want to avoid drift.\n m_startTime += period * 1000;\n return true;\n }\n return false;\n }",
"@Test\n\tpublic void gapsLeadToBadQuality() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tt1.addValue(new SampledValue(new FloatValue(234F), 60, Quality.BAD));\n\t\tt0.setInterpolationMode(InterpolationMode.STEPS);\n\t\tt1.setInterpolationMode(InterpolationMode.STEPS);\n\t\tfinal ReadOnlyTimeSeries avg = MultiTimeSeriesUtils.getAverageTimeSeries(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0L, 110);\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(59).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(60).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(63).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(70).getQuality());\n\t}",
"private boolean isRun(CribbageRank[] combo) {\n for (int i = 1; i < combo.length; i++) {\n if (!combo[i - 1].nextHigher().equals(combo[i])) {\n return false;\n }\n }\n return true;\n }",
"boolean hasWeek4();",
"boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}",
"boolean isSetSingleBetMinimum();",
"public boolean istVoll()\n\t{\n\t return (_spalte0 > 0) && (_spalte1 > 0) && (_spalte2 > 0);\n\t}",
"public double quaterlyHealthInsurance(){\n return (this.healthInsurancePerAnnum*4)/12;\n }",
"@Test\r\n\tpublic void calculQualityAxisWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 3f), new Float(2));\r\n\t}",
"@Test\n\tpublic void testSpareOnLastFrame() {\n\t\tScoresheet s = new Scoresheet();\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(4);\n\t\ts.addThrow(6);\n\t\ts.addThrow(8);\n\t\tassertEquals(s.addscore(), 90);\n\t}",
"public boolean isStrike(){\r\n\t\tif( this.firstThrow == 10 )\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"boolean isBeginInclusive();",
"@Test\r\n\tpublic void calculQualityAxisWithNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 4f), new Float(0));\r\n\t}",
"public boolean isScaleAhead() {\r\n\t\treturn robotStartPos == scalePos;\r\n\t}",
"private boolean isJulyFourteenth(final Calendar date) {\n return JULY_14TH_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.JULY == date.get(Calendar.MONTH);\n }",
"public Boolean insideStraightDraw(Integer[] cardRanks, Integer minNum) {\n\t\tBoolean retVal = false;\n\t\tArrays.sort(cardRanks);\n\t\tSet<Integer> uniqCards = new TreeSet<Integer>();\n\t\tuniqCards.addAll(Arrays.asList(cardRanks));\n\t\tif (uniqCards.contains(1)) uniqCards.add(14); // put an ace at top and bottom of rank order\n\t\tInteger[] uniqRanks = uniqCards.toArray(new Integer[uniqCards.size()]);\n\t\tfor (int i = minNum-1; i < uniqRanks.length; i++) {\n\t\t\tif(uniqRanks[i-minNum+1] == uniqRanks[i] - minNum) {\n\t\t\t\tretVal = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn retVal;\n\t}",
"@Test\n\tpublic void testQuality1SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 1, quality);\n\t}",
"public boolean isHigher(Operator o){\n if(indent > o.indent){\n return true;\n }else{\n return prec > o.prec;\n }\n }",
"private boolean m18354q() {\n return this.f16621o != null;\n }",
"private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }"
] | [
"0.6529586",
"0.61505383",
"0.6119488",
"0.5938702",
"0.5824873",
"0.5813037",
"0.5491175",
"0.5486035",
"0.5426638",
"0.5425751",
"0.53538305",
"0.53459084",
"0.53300905",
"0.5280978",
"0.52806723",
"0.52416295",
"0.5225297",
"0.5181985",
"0.5103216",
"0.5057788",
"0.50416374",
"0.50387645",
"0.50381136",
"0.5025221",
"0.49792174",
"0.4973101",
"0.49589622",
"0.49540466",
"0.49221453",
"0.4921591",
"0.49067494",
"0.48826447",
"0.4872439",
"0.4859453",
"0.48569065",
"0.48506987",
"0.48412278",
"0.48260325",
"0.48256144",
"0.48232508",
"0.48201987",
"0.48170915",
"0.48055217",
"0.48016703",
"0.48007476",
"0.48006654",
"0.47970366",
"0.4787327",
"0.47790122",
"0.47692123",
"0.47623253",
"0.47605824",
"0.4759531",
"0.47566977",
"0.47525445",
"0.4751957",
"0.47506708",
"0.47437555",
"0.47436026",
"0.47417986",
"0.4740775",
"0.47395152",
"0.47354653",
"0.47193494",
"0.4718294",
"0.47070822",
"0.47047433",
"0.47041294",
"0.46972924",
"0.46853983",
"0.46784905",
"0.4675477",
"0.46726203",
"0.46698093",
"0.46638012",
"0.46587428",
"0.46517423",
"0.4648061",
"0.464736",
"0.4646857",
"0.4645181",
"0.46386793",
"0.46378502",
"0.46378064",
"0.4635591",
"0.462965",
"0.46292442",
"0.46267724",
"0.4625431",
"0.46220782",
"0.4616915",
"0.46036708",
"0.46034908",
"0.4599469",
"0.45987386",
"0.45952803",
"0.4593877",
"0.45923674",
"0.45899004",
"0.4589838"
] | 0.71476054 | 0 |
Checks if is forth quarter under over. | public static Boolean isForthQuarterUnderOver(Integer integer) {
return forthQuarterUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Boolean isThirdQuarterUnderOver(Integer integer) {\r\n\t\treturn thirdQuarterUnderOver.contains(integer);\r\n\t}",
"public static Boolean isFirstQuarterUnderOver(Integer integer) {\r\n\t\treturn firstQuarterUnderOver.contains(integer);\r\n\t}",
"public static Boolean isSecondQuarterUnderOver(Integer integer) {\r\n\t\treturn secondQuarterUnderOver.contains(integer);\r\n\t}",
"@Override\n\tpublic void endOfQuarter(int quarter) {\n\t\t\n\t}",
"private boolean isValidQuiz3(double quiz3)\n\t{\n\t\treturn quiz3 >= 0 && quiz3 <= 10;\n\t}",
"public boolean isMultipleQuarterHour() {\n\n if (this.startTimeArray == null || this.endTimeArray == null) {\n return true;\n }\n long minutes = Duration.between(LocalTime.parse(this.startTimeString), LocalTime.parse(this.endTimeString)).toMinutes();\n\n if (minutes % 15 == 0 && minutes > 15) {\n\n return true;\n\n }\n\n return false;\n\n }",
"private boolean checkQuads(Player player) {\n\t\tint j;\n\t\tfor (j = 0; j <= 3; j++) {\n\t\t\tif (player.getSevenCardsTempHand().get(j).getRank()\n\t\t\t\t\t.equals(player.getSevenCardsTempHand().get(j + 3).getRank())) {\n\t\t\t\tplayer.setQuads(true);\n\t\t\t\tplayer.setHandRank(HandRank.QUADS);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!player.isQuads())\n\t\t\treturn false;\n\t\t\n\t\t// init 5 cards hand\n\t\tfor(int i = 0; i < hand.length; i++) {\n\t\t\thand[i] = player.getSevenCardsTempHand().get(j);\n\t\t\tplayer.getSevenCardsTempHand().remove(j);\n\t\t}\n\t\t\n\t\t// add kicker\n\t\thand[4] = player.getSevenCardsTempHand().get(2);\n\n\t\tplayer.setFiveCardsHand(hand);\n\t\treturn true;\n\t}",
"public boolean isOverdue(int today);",
"public boolean not3TimesHigher() {\n\t\tArrayList<Double> temp=averageSalaries();\n\t\tfor(int i=0;i<temp.size();i++) {\n\t\t\tdouble selectOne= temp.get(i);//choose the select employee\n\t\t\ttemp.remove(i);//remove the select one's salary\n\t\t\tdouble[] otherEmployees=new double[temp.size()];\n\t\t\tfor(int j=0;j<otherEmployees.length;j++) {\n\t\t\t\totherEmployees[j]=temp.get(j);\n\t\t\t}\n\t\t\ttemp.add(i,selectOne);//add the salary whose selected last time.\n\t\t\ttry{\n\t\t\t\tif(selectOne>(average(otherEmployees)*3)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}catch(IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(\"There is something wrong with input\");\n\t\t\t}\n\t\t}\n\t return true;\n\t}",
"private boolean isMayEighth(final Calendar date) {\n return MAY_8TH_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.MAY == date.get(Calendar.MONTH);\n }",
"protected boolean isOverdue() {\n\t\t// this might be backwards, go back and check later\n\t\t/*int i = todaysDate.compareTo(returnDate);// returns 0, a positive num, or a negative num\n\t\tif (i == 0) { return false;}\t\t// the dates are equal, not overdue\n\t\telse if (i > 0) { return true; }\t// positive value if the invoking object is later than date\n\t\telse { return false; } */\t\t\t// negative value if the invoking object is earlier than date\n\t\t\n\t\t// can also do\n\t\tif (todaysDate.getTime() > returnDate.getTime() ) { return true; }\n\t\telse { return false; }\t// if the difference in time is less than or equal\n\t}",
"public static boolean inRange(long quakeTime) throws Exception {\n SimpleDateFormat dayFormatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n String quakeDay = dayFormatter.format(new Date(quakeTime));\n String currentDay = dayFormatter.format(new Date());\n return (quakeDay.equals(currentDay));\n }",
"public void testQUARTER3() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 94, \"quarter\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"public boolean thirtyoneDays() {\n String[] months = new String[]{\"January\", \"March\", \"May\", \"July\", \"August\", \"October\", \"December\"};\n for (String m : months) {\n if (m.equals(this.month)) {\n return true;\n }\n }\n return false;\n }",
"public boolean upwardTrend() {\n\t\tfor(int index = 1; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index-1) <= rank.get(index)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void insertQuarter() {\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n gumballMachine.getState().insertQuarter();\n }",
"public boolean hasPast();",
"private boolean cond3(Data C) {\n return (C.getBottom() > this.yT);\n }",
"private boolean crossesInternationalDateline(String eastValue, \n String westValue\n ) {\n boolean crosses = false;\n \n if ((eastValue != null) &&\n (eastValue != \"\") &&\n (westValue != null) &&\n (westValue != \"\")\n ) {\n Double eastInteger = new Double(eastValue);\n Double westInteger = new Double(westValue);\n \n crosses = westInteger > eastInteger;\n }\n \n logger.debug(\"crosses International Dateline: \" + crosses);\n \n return crosses;\n }",
"@Test\n public void floorToQuarterHour() throws Exception {\n DateTime dt0 = new DateTime(2009,6,24,23,29,30,789,DateTimeZone.UTC);\n\n Assert.assertNull(DateTimeUtil.floorToQuarterHour(null));\n \n // floor to nearest half hour\n DateTime dt1 = DateTimeUtil.floorToQuarterHour(dt0);\n\n Assert.assertEquals(2009, dt1.getYear());\n Assert.assertEquals(6, dt1.getMonthOfYear());\n Assert.assertEquals(24, dt1.getDayOfMonth());\n Assert.assertEquals(23, dt1.getHourOfDay());\n Assert.assertEquals(15, dt1.getMinuteOfHour());\n Assert.assertEquals(0, dt1.getSecondOfMinute());\n Assert.assertEquals(0, dt1.getMillisOfSecond());\n Assert.assertEquals(DateTimeZone.UTC, dt1.getZone());\n\n DateTime dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,0,0,0));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,1,23,456));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,30,12,56));\n Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,59,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,55,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,46,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n }",
"public boolean isOverDue() {\n\t\treturn state == loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\r\n\t}",
"private boolean isJulyFourteenth(final Calendar date) {\n return JULY_14TH_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.JULY == date.get(Calendar.MONTH);\n }",
"public boolean hasQuads(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 4);\r\n\t\t\r\n\t\t\r\n\t}",
"public void quadTest()\n\t{\n\t\tint index = 0, lim = 3;\n\t\tboolean quads = false;\n\t\t\n\t\twhile (index<=lim && (!quads))\n\t\t{\n\t\t\tif ((intRep[index] == intRep[index+1]) &&\n\t\t\t\t(intRep[index] == intRep[index+2]) &&\n\t\t\t\t(intRep[index] == intRep[index+3]) )\n\t\t\t{\n\t\t\t\tquads = true;\n\t\t\t\thandScore = 70000;\n\t\t\t\thandScore += 100 * intRep[index];\n\t\t\t}\n\t\t\telse index++;\n\t\t}\n\t}",
"public boolean isAfter(Group3Date b) {\n\t\t\treturn compareTo(b) > 0;\n\t\t}",
"private boolean exceedRange(int year) {\n\t\tboolean exceeds = false;\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint upperRange = currentYear + RANGE_LIMIT;\n\t\tint lowerRange = currentYear - RANGE_LIMIT;\n\t\t\n\t\tif(year < lowerRange || year > upperRange){\n\t\t\texceeds = true;\n\t\t}\n\t\treturn exceeds;\n\t}",
"boolean hasWeek3();",
"public void checkOverDue() {\n\t\tif (state == loanState.current && //changed 'StAtE' to 'state' and ' lOaN_sTaTe.CURRENT to loanState.current\r\n\t\t\tCalendar.getInstance().getDate().after(date)) { //changed Calendar.gEtInStAnCe to Calender.getInstance and gEt_DaTe to getDate and DaTe to date\r\n\t\t\tthis.state = loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\t\t\t\r\n\t\t} //added curly brackets\r\n\t}",
"private boolean isValidQuiz1(double quiz1)\n\t{\n\t\treturn quiz1 >= 0 && quiz1 <= 10;\n\t}",
"public static Boolean isOverUnder(Integer number, List<BET> bets) {\r\n\t\tBoolean result = Boolean.FALSE;\r\n\t\tif (bets.size() == 2\r\n\t\t\t\t&& (isGameUnderOver(number) || isFirstQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isSecondQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isThirdQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isForthQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isFirstPartUnderOver(number)\r\n\t\t\t\t\t\t|| isSecondPartUnderOver(number)\r\n\t\t\t\t\t\t|| isThirdPartUnderOver(number) || isFirstFiveInninngsUnderOver(number))) {\r\n\t\t\tresult = Boolean.TRUE;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public void Down3(){\r\n if(Hy2>0 && Hy2<900){\r\n \r\n Hy2+=3;\r\n }\r\n }",
"@Override\r\n\t\t\tpublic boolean accept(double t) {\n\t\t\t\treturn t>0.5;\r\n\t\t\t}",
"private boolean checkFifthYear(Schedule sched)\n\t{\n\t\tArrayList<Course> fifthYearCourses = new ArrayList<Course>(); //Only 500CPSC courses\n\t\t//A list we build with time slots that 5th year courses were assigned \n\t\tArrayList<TimeSlot> fifthYearSlots = new ArrayList<TimeSlot>(); \n\t\tCourse tempCourse;\n\t\tint tempCourseNumber;\n\t\tTimeSlot tempSlot;\n\t\t\n\t\t//Traverse through all the courses\n\t\tfor(int i = 0; i<sched.getCourses().size();i++)\n\t\t{\n\t\t\ttempCourse = sched.getCourses().get(i);\n\t\t\ttempCourseNumber = tempCourse.getNumber();\n\t\t\t\n\t\t\t//If its course number is between 500 and 600 and it's in the cpsc department\n\t\t\t// append it to the list of fifth year courses\n\t\t\tif(\n\t\t\t\t\t(tempCourseNumber >= 500) && \n\t\t\t\t\t(tempCourseNumber < 600))\n\t\t\t{\n\t\t\t\tfifthYearCourses.add(tempCourse);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//At this point, fifthYearCourses contains all the 500 level CPSC class\n\t\t//THis loop checks if the time slot for the current 500 level course has \n\t\t//already been added to our list. If it is, we know they are not all at different times.\n\t\t//\n\t\tfor(int i = 0; i<fifthYearCourses.size();i++)\n\t\t{\n\t\t\ttempSlot = fifthYearCourses.get(i).getSlot();\n\t\t\t\n\t\t\tif(tempSlot != null)\n\t\t\t{\n\t\t\t\n\t\t\t\tif(fifthYearSlots.contains(tempSlot))\n\t\t\t\t\treturn false;\n\t\t\t\telse\n\t\t\t\t\tfifthYearSlots.add(tempSlot);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private boolean isValidQuiz2(double quiz2)\n\t{\n\t\treturn quiz2 >= 0 && quiz2 <= 10;\n\t}",
"private boolean checkStraight(Player player) {\n\t\tint counter = 0; // counts the increments between 2 folowing cards\n\t\tint j;\n\n\t\tfor (j = 6; j >= 1; j--) {\n\t\t\tif (player.getSevenCardsTempHand().get(j).getRank()\n\t\t\t\t\t.getValue() == player.getSevenCardsTempHand().get(j - 1).getRank().getValue() + 1)\n\n\t\t\t\tcounter++;\n\n\t\t\t// exclude lower values if there are any\n\t\t\tif (counter == 4)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (counter == 4) {\n\t\t\tplayer.setStraight(true);\n\t\t\tplayer.setHandRank(HandRank.STRAIGHT);\n\n\t\t\t// init 5 cards hand\n\t\t\tfor (int i = 0; i < hand.length; i++)\n\t\t\t\thand[i] = player.getSevenCardsTempHand().get(j + i);\n\n\t\t\tplayer.setFiveCardsHand(hand);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Special \"wheel straight\" case (Ace to 5)\n\t\tif (player.getSevenCardsTempHand().get(0).getRank().equals(Card.Rank.TWO)\n\t\t\t\t&& player.getSevenCardsTempHand().get(1).getRank().equals(Card.Rank.THREE)\n\t\t\t\t&& player.getSevenCardsTempHand().get(2).getRank().equals(Card.Rank.FOUR)\n\t\t\t\t&& player.getSevenCardsTempHand().get(3).getRank().equals(Card.Rank.FIVE)\n\t\t\t\t&& player.getSevenCardsTempHand().get(6).getRank().equals(Card.Rank.ACE)) {\n\n\t\t\tplayer.setStraight(true);\n\t\t\tplayer.setHandRank(HandRank.STRAIGHT);\n\t\t\t\n\t\t\t// init 5 cards hand\n\t\t\thand[0] = player.getSevenCardsTempHand().get(6);\n\t\t\tfor (int i = 1; i < hand.length; i++)\n\t\t\t\thand[i] = player.getSevenCardsTempHand().get(i-1);\n\t\t\t\n\t\t\tplayer.setFiveCardsHand(hand);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }",
"protected void insertQuarter(double balance)\r\n {\r\n totalBalance = balance;\r\n totalBalance = totalBalance + 0.25;\r\n \r\n }",
"private boolean isValidFinalExam(double finalExam)\n\t{\n\t\treturn finalExam >= 0 && finalExam <= 100;\n\t}",
"public boolean tick() {\n/* 55 */ this.affected = true;\n/* 56 */ if (this.round > 0)\n/* 57 */ this.round--; \n/* 58 */ return (this.round == 0);\n/* */ }",
"private boolean m(){\r\n int m = countColors - maxSat;\r\n if (m <= TH){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}",
"@Override\n protected boolean isFinished() {\n return (System.currentTimeMillis() >= thresholdTime || (currentAngle > (totalAngleTurn - 2) && currentAngle < (totalAngleTurn + 2)));\n }",
"private boolean isFixedDayOff(final Calendar date) {\n return isChristmasDay(date) || isAugustFifteenth(date)\n || isJanuaryFirst(date) || isJulyFourteenth(date)\n || isMayFirst(date) || isMayEighth(date)\n || isNovemberFirst(date) || isNovemberEleventh(date);\n\n }",
"public boolean isThreeOfAKind() {\r\n\r\n return getHighestConsecutive() == 3;\r\n }",
"public boolean downwardTrend() {\n\t\tfor(int index = 1; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index-1) >= rank.get(index)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean nextRound() {\n if (numberOfRounds > playedRounds) {\n return true;\n }\n return false;\n }",
"public boolean istrianglevalid(double semiPer) {\n //declare variables\n boolean checkA = true;\n boolean checkB = true;\n boolean checkC = true;\n \n if (semiPer >= sideA && semiPer >= sideB && semiPer >= sideC) {\n return true;\n } else {\n return false;\n }\n }",
"public int checkTrend(double a1d, double a7d) {\r\n\t\tif (a7d > a1d) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}",
"public boolean isDifficult()\n {\n int count = 0;\n for (int i = 1; i < markers.length; i++) {\n if (Math.abs(markers[i] - markers[i-1]) >= 30){\n count++;\n }\n }\n return (count >= 3);\n }",
"public boolean isFuture()\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int dayT = currentDate.get(GregorianCalendar.DATE);\n int monthT = currentDate.get(GregorianCalendar.MONTH) + 1;\n int yearT = currentDate.get(GregorianCalendar.YEAR);\n int hourT = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minuteT = currentDate.get(GregorianCalendar.MINUTE);\n\n if (yearT < year)\n {\n return true;\n }\n else if (yearT == year && monthT < month)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT < day)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT == day && hourT < hour)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT == day && hourT == hour\n && minuteT < minute)\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"private boolean isPast(Calendar currentCal){\n Calendar presentCal = Calendar.getInstance();\n presentCal.set(Calendar.SECOND,59);\n return currentCal.before(presentCal);\n }",
"public boolean isAfter(SpentOn spentOn)\n {\n return ( (calendar.get(Calendar.YEAR) > spentOn.calendar.get(Calendar.YEAR))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) > spentOn.calendar.get(Calendar.MONTH))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) > spentOn.calendar.get(Calendar.DAY_OF_MONTH))\n );\n }",
"public boolean isHigher(Operator o){\n if(indent > o.indent){\n return true;\n }else{\n return prec > o.prec;\n }\n }",
"public boolean istVoll()\n\t{\n\t return (_spalte0 > 0) && (_spalte1 > 0) && (_spalte2 > 0);\n\t}",
"protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }",
"private void givenExchangeRatesExistsForEightMonths() {\n }",
"public boolean checkForJumping(int roundsInFuture) {\n return (round + roundsInFuture) % Config.ROUNDS_PER_JUMP == 0;\n }",
"public void insertQuarter(int coin[]) {\n if(coin.length ==2){\n \n if(coin[0] == 25 && coin[1]==25){\n //System.out.println(\"a[0]\"+a[0]);\n System.out.println(\"You inserted a quarter in q2\");\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n }else{\n gumballMachine.setState(gumballMachine.getNoQuarterState()); \n }\n \n \n \n }\n \n // System.out.println(\"You inserted a quarter in q2\");\n // gumballMachine.setState(gumballMachine.getHasQuarterState());\n\t}",
"@Test\n public void checkDivisibilityByHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByHundred(1600);\n assertTrue(flag);\n }",
"private boolean caughtTwenty(){\n\t\treturn (theTrainer.getPokedex().size() >= 20);\n\t}",
"private boolean isAscension(final Calendar date) {\n Calendar paquesMonday = getEasterDate(date.get(Calendar.YEAR));\n paquesMonday.add(Calendar.DATE, 39);\n return date.get(Calendar.DAY_OF_YEAR) == paquesMonday\n .get(Calendar.DAY_OF_YEAR)\n && date.get(Calendar.MONTH) == paquesMonday.get(Calendar.MONTH);\n }",
"@Test\n public void checkDivisibilityByFourHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByFourHundred(1600);\n assertTrue(flag);\n }",
"public boolean isEnCours() {\n\t\tLocalDate date = LocalDate.now();\n\t\tif (date.plusDays(1).isAfter(dateDebut) && date.isBefore(dateFin)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean isMenorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()>this.getValue(); \n }",
"public double quaterlyHealthInsurance(){\n return (this.healthInsurancePerAnnum*4)/12;\n }",
"public boolean isBearish(){\n return (Double.compare(this.open, this.close) > 0) ? true : false;\r\n }",
"private void givenExchangeRatesExistsForSixMonths() {\n }",
"private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }",
"private boolean checkGreedyIronCurtain() {\r\n return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0));\r\n }",
"public boolean isNight() {\r\n return hours < 6 || hours >= 20;\r\n }",
"boolean hasWeek5();",
"public boolean parrotTrouble(boolean talking, int hour) {\n return (talking && (hour < 7 || hour > 20));\n}",
"private boolean isValidMidtermExam(double midtermExam)\n\t{\n\t\treturn midtermExam >= 0 && midtermExam <= 100;\n\t}",
"public boolean isHalfCarry() {\n\t\treturn ((get() >> 5) & 1) == 1;\n\t}",
"public void testQUARTER2() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 93, \"quartered\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"public abstract double calculateQuarterlyFees();",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"public boolean mo7630q() {\n return !this.f4373c.isEmpty() && !this.f4372b.isEmpty();\n }",
"public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }",
"public boolean hasLapsed(int currentTime) {\n\t\tint currentTimeInSecs = currentTime;\n\t\tif (orderTimeInSecs < currentTimeInSecs) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void setQuarter(String quarter) {\r\n this.quarter = quarter;\r\n }",
"public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }",
"@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}",
"private static boolean hasFunds(double cost)\n {\n if (Clock.getRoundNum() < 200) { //TODO edit this out if necessary\n return rc.getTeamOre() > cost;\n } else {\n return rc.getTeamOre() > cost*2;\n }\n }",
"protected boolean shouldHoldEncumbrance() {\n if (getTripEnd() == null) {\n return false; // we won't hold encumbrances if we don't know when the trip is ending\n }\n final java.sql.Date tripEnd = new java.sql.Date(getTripEnd().getTime());\n return getTravelEncumbranceService().shouldHoldEntries(tripEnd);\n\n }",
"@Test\n public void includes_300418_everyFifthMonday_true() {\n assertTrue(everyFifthMonday.includes(testDate300418));\n }",
"@Test\n public void testOneQuarter() {\n int oneQuarter = 0x00BC; // http://codepoints.net/U+00BC\n int equalSign = 0x003D;\n assertEquals(\n equalSign,\n GlyphCorrector.singleton().codePointConversion(\"AdvP4C4E74\",\n oneQuarter));\n }",
"public static int numQuarters(double money) {\n int quarters = 0;\n while (money>0.25){\n quarters++;\n money =(money-0.25);}\n return quarters;}",
"public boolean tieneDinero(int precioEntrada){\r\n return this.dinero >= precioEntrada;\r\n }",
"public boolean isStrike(){\r\n\t\tif( this.firstThrow == 10 )\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }",
"@Override\n protected boolean isFinished() {\n return Math.abs(m_currentError) <= constants.tolerance;\n }",
"public void testQUARTER1() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 92, \"quarterly\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }",
"public static boolean isValid(double side1, double side2, double side3) {\n\t boolean isValid = side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1 ;\n\t return isValid;\n\t}",
"public boolean expired(){\n return !Period.between(dateOfPurchase.plusYears(1), LocalDate.now()).isNegative();\n }",
"public static Boolean isFirstFiveInninngsUnderOver(Integer integer) {\r\n\t\treturn firstFiveInningsUnderOver.contains(integer);\r\n\t}",
"public boolean hasQ() {\n return fieldSetFlags()[5];\n }",
"public int q(int t) {\n int l = 0, r = times.length - 1;//index\n while(l < r){\n int m = l + (r - l)/2 + 1;//need offset\n if(times[m] > t) r = m - 1;\n else l = m;//l always hold the smallOrEqual point\n }\n //l == r\n return winners[l];\n }",
"public boolean IsPackmanReachedFruit(double time, double timeTotal)\n\t{\n\t\tif(time<timeTotal) \n\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t\telse\n\t\t\t\treturn true;\n\t}"
] | [
"0.6838089",
"0.66020155",
"0.63492244",
"0.6039896",
"0.5938381",
"0.59271204",
"0.57106745",
"0.56237787",
"0.55606395",
"0.544091",
"0.5436054",
"0.53911144",
"0.5363731",
"0.53169376",
"0.52835846",
"0.5264102",
"0.52371377",
"0.5223633",
"0.51908886",
"0.517891",
"0.51703805",
"0.5154241",
"0.51470745",
"0.51329255",
"0.5123662",
"0.5123231",
"0.5121439",
"0.5117288",
"0.5107709",
"0.5099107",
"0.50881636",
"0.5072864",
"0.5068734",
"0.50618273",
"0.50564057",
"0.5046295",
"0.50409126",
"0.50389206",
"0.5032999",
"0.50174123",
"0.5003939",
"0.4996782",
"0.49817315",
"0.49801722",
"0.4975453",
"0.49728864",
"0.4964038",
"0.49599433",
"0.495581",
"0.49516475",
"0.49484953",
"0.49433526",
"0.4936175",
"0.4928715",
"0.4927863",
"0.49241006",
"0.4919762",
"0.49050996",
"0.49033844",
"0.48982784",
"0.489514",
"0.48880467",
"0.48784754",
"0.4875455",
"0.4871711",
"0.48614353",
"0.48506063",
"0.4847519",
"0.48470402",
"0.484668",
"0.48299775",
"0.48282605",
"0.48273084",
"0.48264605",
"0.48246288",
"0.48235655",
"0.48234627",
"0.48164627",
"0.4816119",
"0.48153654",
"0.48109788",
"0.48050964",
"0.47931406",
"0.479155",
"0.4788469",
"0.4788423",
"0.47856268",
"0.47848773",
"0.47830766",
"0.47822016",
"0.47820878",
"0.4779305",
"0.47755316",
"0.47566563",
"0.47554567",
"0.47542974",
"0.47538507",
"0.47537854",
"0.47525385",
"0.47517994"
] | 0.72835356 | 0 |
Checks if is game under over. | public static Boolean isGameUnderOver(Integer integer) {
return gameUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }",
"boolean isGameOver() {\n\t\treturn Hit;\n\t}",
"public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }",
"public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }",
"public boolean isGameOver() {\r\n\treturn false;\r\n }",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"public boolean isGameOver() {\n\t\treturn false;\n\t}",
"public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}",
"protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }",
"boolean GameOver() {\n\t\treturn player.isDead();\n\t}",
"boolean isGameOver();",
"boolean isGameOver();",
"public boolean gameOver() {\n\t\treturn gameOver;\n\t}",
"private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}",
"public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }",
"public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }",
"private void gameOver() {\n\t\tgameOver=true;\n\t}",
"public boolean isGameOver();",
"public boolean isGameOver();",
"@Override\r\n\tpublic boolean isGameOver() {\n\t\treturn !( hasMoves( Seed.CROSS) || hasMoves( Seed.NOUGHT) );\r\n\t}",
"public boolean GameIsOver() {\n\t\tif(deck.numCardsLeft()==8) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}",
"public boolean gameOverTick(Game game) {\n\t\treturn false;\n\t}",
"public boolean isGameOver() {\n\t\treturn (lives <= 0);\n\t}",
"public boolean isGameOver() {\n\t\treturn this.b.isGameOver();\n\t}",
"private boolean isGameOver() {\n return Snake().isTouching(Wall()) || Snake().isTouching(Snake());\n }",
"@Override\n public boolean isGameOver() {\n //TODO Implement this method\n return false;\n }",
"private void gameOver() {\n\t\t\n\t}",
"@Override\r\n public void checkWarGameOver(){\r\n if(this.checkOnePlayerDecksEmpty(0)){\r\n // Set gameOver flag to true\r\n this.isGameOver = true; \r\n \r\n }\r\n \r\n }",
"private boolean checkGameOver() {\n\t\tboolean singlePlayerWon = otherPlayer.getLife() == 0;\n\t\tboolean otherPlayerWon = singlePlayer.getLife() == 0;\n\n\t\tif (singlePlayerWon || otherPlayerWon) {\n\t\t\tthis.singlePlayer.createEndButton(singlePlayerWon);\n\t\t\tthis.singlePlayer.onGameOver();\n\t\t\tthis.otherPlayer.onGameOver();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public void checkGameOver() {\n if(snake.getX() < 0 || snake.getX() > WIDTH - 4) { setGameState(GameState.GAME_OVER); }\n if(snake.getY() < 0 || snake.getY() > HEIGHT - 4) { setGameState(GameState.GAME_OVER); }\n if(snake.hasCollided()) { setGameState(GameState.GAME_OVER); }\n\n }",
"public boolean gameOver(){\n\n\t\tif (score > highScore) {\n\t\t\thighScore = score;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void gameOver() {\n\t\tgameOver = true;\r\n\t\tupdate();\r\n\t}",
"public boolean isGameOver() {\n return gameOver;\n }",
"public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}",
"public boolean isGameOver() {\r\n\t\treturn !getCurrentPlayingSpace().isBallsLeftOnTable();\r\n\t}",
"public boolean isGameOver() {\r\n if(timesAvoid == 3) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public boolean gameOver();",
"public boolean gameOver();",
"boolean gameOver() {\n return _gameOver;\n }",
"public boolean isGameOver()\n {\n if(bird.isOnTheFloor||gameOver||pipes.getWhereToDrawB().intersect(bird.getWhereToDraw())|| pipes.getWhereToDrawT().intersect(bird.getWhereToDraw()))\n {\n if(!gameOver){\n Music.playCrash(context);\n }\n gameOver=true;\n return gameOver;\n }\n return false;\n }",
"public synchronized boolean isGameOver() {\n\t\treturn gameOver;\n\n\t}",
"public boolean isGameOverDelayed() {\n return gameOver;\n }",
"public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }",
"public boolean isGameOver()\n {\n if ( this.canMove(Direction.UP) || this.canMove(Direction.DOWN) ||\n this.canMove(Direction.LEFT) || this.canMove(Direction.RIGHT) ) { \n return false;\n }\n else {\n return true;\n } \n }",
"public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }",
"public boolean isGameOver() {\n if(gameDescriptor.getTotalCycles() < roundNumber){\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameFinished));\n return true;\n }\n return false;\n }",
"public abstract boolean gameIsOver();",
"public boolean isGameOver() {\n return isGameOver;\n }",
"public boolean isGameOver() {\r\n return this.isGameOver;\r\n }",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"public boolean gameOver() {\n return winner() != null;\n }",
"public boolean gameOver()\n {\n boolean over = false;\n if (player1Hand.isEmpty()||player2Hand.isEmpty())\n {\n over = true;\n }\n return over;\n }",
"public void gameOver() {\n\t}",
"public boolean isOver() {\n \t\treturn isOver;\n \t}",
"boolean isGameSpedUp();",
"public boolean isGameOver() {\n return (hasHeWon(computer) || hasHeWon(user) || getAvailableStates().isEmpty());\n }",
"public boolean isGameOver() {\n\t\treturn (movesLeft() == 0) || someoneQuit\n\t\t\t\t|| (winningPlayer != Game.GAME_NOT_OVER);\n\t}",
"public boolean isGameOver() {\n return poolFront.next == null;\n }",
"public boolean isGameOver() {\n\t\treturn isBoardFull() || (isValidMoveAvailableForDisc(Disc.WHITE) == false &&\n\t\t\t\t\t\t\t\t\tisValidMoveAvailableForDisc(Disc.BLACK) == false);\n\t}",
"public boolean isOver() {\n\t\treturn over;\n\t}",
"void gameOver();",
"void gameOver();",
"public void gameOver() {\n this.lives --;\n this.alive = false;\n }",
"public boolean isLevelOver() {\n\t\treturn waveControl.isLevelEnd();\n\t}",
"public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }",
"public boolean isOver() {\r\n return isOver;\r\n }",
"public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}",
"public boolean getOver(){\n\t\t//if the game is over, stop the timer\n\t\tif(this.over){\n\t\t\t//update the total points label\n\t\t\tthis.getPoints();\n\t\t\t\n\t\t\tthis.timer.stop();\n\t\t}\n\t\t\n\t\treturn this.over;\n\t}",
"public boolean checkGameOver() {\n return ((posIniPiece[piece.getKind()] == piece.getPos(0)) && iteration > 0);\n }",
"private boolean isGameOver() {\n // either all black or all white pieces don't have any moves left, save\n // to internal field so that a delayed status is available\n gameOver = longestAvailableMoves(1, true).isEmpty() ||\n longestAvailableMoves(1, false).isEmpty();\n return gameOver;\n }",
"public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }",
"public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }",
"private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }",
"public void checkDeath()\n {\n if (player.getY() >= 549)\n {\n gameOver();\n }\n }",
"public boolean checkGameOver(){\n\t\tfor(int x = 0; x < this.tile[3].length; x++){\n\t\t if(this.isFilled(3, x)){\n\t\t \tSystem.out.println(\"game over\");\n\t\t return true;\n\t\t }\n\t\t}\n\t\treturn false;\n\t}",
"public boolean gameIsOver() {return revealedShips >= 4;}",
"public boolean isBattleOver(){\n\n if(battleEnemies.size() == 0) {\n System.out.println(\"Battle over all enemies dead\");\n findDefeated();\n cleanStatuses();\n result = true;\n\n return true;\n }\n if(character.getCurrHP() <= 0){\n System.out.println(\"Battle over character has died\");\n //findDefeated();\n cleanStatuses();\n result = false;\n\n return true;\n }\n //System.out.printf(\"remaining enemies: %s\\n\", battleEnemies.size());\n return false;\n }",
"public void gameOver() {\n \tint currentPosition=0;\n \twhile(lenght-1 > currentPosition) {\n \t\tif(this.xCoord==handler.getWorld().body.get(currentPosition).x && this.yCoord==handler.getWorld().body.get(currentPosition).y) {\n \t\t\tState.setState(handler.getGame().gameOverState);\n \t\t}\n \t\t\n \t\tcurrentPosition++;\n \t\t\n \t}\n }",
"@Override\n public boolean gameOver() {\n return player1Wins() || player2Wins();\n }",
"private boolean isGameOver() {\n\t\tfor (int i = 0; i < this.board.getHeight(); i++) {\n\t\t\tif (this.board.getModel(i, 0) instanceof AbstractZombie) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isOverhit()\n\t{\n\t\treturn overhit;\n\t}",
"public void notifyGameOver() {\n\t\tgameOver = true;\n\t}",
"private void gameOver() {\n System.out.println(\"GAME OVER!!\");\n\n reset();\n mGameOver = true;\n mChangeObserver.gameOver();\n }",
"boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }",
"boolean isGameOver() {\n return getMenu() instanceof ch;\n }",
"@Override\n public boolean gameOver() {\n //true if the board full or a winner has been found\n return getWinner() != EMPTY || isBoardFull();\n }",
"public boolean gameOver(){\r\n if(isGame) return (currentPlayer.getChecks() == 0 || nextPlayer.getChecks() == 0 || currentPlayer.getQueens() == 4 || nextPlayer.getQueens() == 4 || (currentPlayer.cantMove() && nextPlayer.cantMove()));\r\n return getNumChecks(WHITE) == 0 || getNumChecks(BLACK) == 0 || getNumQueens(WHITE) == 4 || getNumQueens(BLACK) == 4;\r\n }",
"private void checkGameOver() {\n boolean isGameOver = true;\n for(int i = 0; i< noOfColumns; i++)\n for(int j = 0; i< noOfRows; i++)\n if(cards[i][j].getCardState() != CardState.MATCHED){\n isGameOver = false;\n break;\n }\n if(isGameOver){\n endGame();\n }\n }",
"private boolean gameOver()\n {\n \t//lose case\n \tif (guess_number == 0)\n \t{\n \t\twin = false;\n \t\treturn true;\n \t}\n \t//win case\n \tif (mask.compareTo(word) == 0)\n \t{\n \t\twin = true;\n \t\treturn true;\n \t}\n \t\n \treturn false;\n }",
"public boolean isGameOver() {\n if (gameStatus == null || gameStatus.getPlayerOne() == null || gameStatus.getPlayerTwo() == null) return false;\n return gameStatus.isTie()\n || gameStatus.getPlayerOne().equals(gameStatus.getWinner())\n || gameStatus.getPlayerTwo().equals(gameStatus.getWinner())\n || gameStatus.getPlayerOnePoints() == 0\n || gameStatus.getPlayerTwoPoints() == 0\n || (getWhoseTurn() == 1 && isPlayerMoveImpossible(1))\n || (getWhoseTurn() == 2 && isPlayerMoveImpossible(2));\n }",
"private boolean didPlayerLose() {\r\n return mouseListeningMode && bird.getNumThrowsRemaining() == 0;\r\n }",
"public boolean GameOver() {\r\n if(Main.player1.SuaVida()==0 || Main.player2.SuaVida()==0)\r\n return true;\r\n return false;\r\n }",
"public boolean isBattleOver() {\n\t\treturn battleOver;\n\t}",
"boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }",
"private void loseCondition() {\n if (player.getHealth() <= 0) {\n lose();\n }\n }",
"public boolean isCycleOver(){\n if(playersTurns.isEmpty()) {\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.RoundEnded));\n return true;\n }\n return false;\n }",
"@Test\n public void isGameOver()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertFalse(adjudicator.isGameOver(environment));\n }",
"protected void quitGame() {\n gameOver = true;\n }",
"public boolean isGameOver(){\n if( character.getHp() <= 0 ){\n System.out.println(\"GAME IS OVER BECAUSE CHARACTER DEAD\");\n return true;\n }\n for (int i = 0 ; i < enemies.size() ; i++)\n {\n if(!enemies.get(i).isDead()){\n System.out.println(\"NOT ALL ENEMIES DEAD\");\n return false;\n }\n }\n if( !isGameOver ){\n endGame();\n isGameOver = true;\n }\n System.out.println(\"GAME IS OVER BECAUSE ALL ENEMIES ARE DEAD\");\n return true;\n }"
] | [
"0.8103097",
"0.8059955",
"0.7814375",
"0.7778307",
"0.7713032",
"0.77091676",
"0.7684673",
"0.76746416",
"0.76695025",
"0.7631967",
"0.7624963",
"0.7624963",
"0.7618437",
"0.7607327",
"0.7589402",
"0.7586737",
"0.75781494",
"0.7568944",
"0.7568944",
"0.7568834",
"0.7566548",
"0.7531508",
"0.752952",
"0.75288403",
"0.7500905",
"0.7495932",
"0.74875325",
"0.746519",
"0.74397856",
"0.74371284",
"0.7427391",
"0.73965853",
"0.7395006",
"0.738825",
"0.7380063",
"0.73794204",
"0.73774546",
"0.7374119",
"0.7374119",
"0.73730874",
"0.7360596",
"0.73323965",
"0.73242104",
"0.7313428",
"0.730906",
"0.7304759",
"0.7297817",
"0.72868013",
"0.72572976",
"0.7254828",
"0.7230851",
"0.7221658",
"0.71927917",
"0.7182425",
"0.71808374",
"0.71780217",
"0.71637917",
"0.71511656",
"0.7104384",
"0.7099018",
"0.70942765",
"0.70893514",
"0.70893514",
"0.7087551",
"0.70801777",
"0.7077937",
"0.7076313",
"0.70758086",
"0.7054242",
"0.70468754",
"0.7044129",
"0.7023471",
"0.7009114",
"0.7006372",
"0.69776803",
"0.6976945",
"0.69444764",
"0.6942218",
"0.6941266",
"0.69390243",
"0.69325155",
"0.69202846",
"0.69180906",
"0.6904818",
"0.6902474",
"0.68875647",
"0.68306506",
"0.6814667",
"0.6811554",
"0.6801223",
"0.6797834",
"0.67835903",
"0.6783043",
"0.6776034",
"0.6760237",
"0.6739801",
"0.6739056",
"0.6731449",
"0.6731401",
"0.67280555"
] | 0.67660475 | 94 |
Checks if is over under. | public static Boolean isOverUnder(Integer number, List<BET> bets) {
Boolean result = Boolean.FALSE;
if (bets.size() == 2
&& (isGameUnderOver(number) || isFirstQuarterUnderOver(number)
|| isSecondQuarterUnderOver(number)
|| isThirdQuarterUnderOver(number)
|| isForthQuarterUnderOver(number)
|| isFirstPartUnderOver(number)
|| isSecondPartUnderOver(number)
|| isThirdPartUnderOver(number) || isFirstFiveInninngsUnderOver(number))) {
result = Boolean.TRUE;
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isOver() {\n\t\treturn over;\n\t}",
"public boolean isOver() {\n \t\treturn isOver;\n \t}",
"public boolean isOverhit()\n\t{\n\t\treturn overhit;\n\t}",
"public boolean isOver() {\r\n return isOver;\r\n }",
"public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }",
"public boolean isLevelOver() {\n\t\treturn waveControl.isLevelEnd();\n\t}",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"public boolean isThundering()\n {\n return thundering;\n }",
"boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }",
"public boolean isGameOver() {\n return poolFront.next == null;\n }",
"private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }",
"public boolean isOver() {\n return this.treeNode.getBuilding().isFinished();\n }",
"boolean isGameOver() {\n\t\treturn Hit;\n\t}",
"public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }",
"private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}",
"@Override\n\tpublic boolean getIsOver();",
"public boolean isOver(VisibleThing other) {\n // checks each of the false conditions for the other's image not being over our current image\n // returns false if each of these conditions fails, true otherwise\n\n if (other == null) {\n return false;\n }\n if ((other.x > (this.x + this.image.width))) {\n return false;\n }\n\n if ((other.x + other.image.width) < this.x) {\n return false;\n }\n\n if (other.y > (this.y + this.image.height)) {\n return false;\n }\n\n if ((other.y + other.image.height) < this.y) {\n return false;\n }\n\n return true;\n\n\n }",
"public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }",
"public static Boolean isGameUnderOver(Integer integer) {\r\n\t\treturn gameUnderOver.contains(integer);\r\n\t}",
"public boolean isOverState() {\n return overState;\n }",
"protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }",
"public boolean GameIsOver() {\n\t\tif(deck.numCardsLeft()==8) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private void loseCondition() {\n if (player.getHealth() <= 0) {\n lose();\n }\n }",
"@Override\r\n\tpublic boolean isGameOver() {\n\t\treturn !( hasMoves( Seed.CROSS) || hasMoves( Seed.NOUGHT) );\r\n\t}",
"public void checkOverDue() {\n\t\tif (state == loanState.current && //changed 'StAtE' to 'state' and ' lOaN_sTaTe.CURRENT to loanState.current\r\n\t\t\tCalendar.getInstance().getDate().after(date)) { //changed Calendar.gEtInStAnCe to Calender.getInstance and gEt_DaTe to getDate and DaTe to date\r\n\t\t\tthis.state = loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\t\t\t\r\n\t\t} //added curly brackets\r\n\t}",
"private boolean isGameOver() {\n return Snake().isTouching(Wall()) || Snake().isTouching(Snake());\n }",
"public boolean isOverdrawn() {\n return balance < 0;\n }",
"public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}",
"public boolean hasCardsLeftOver() {\r\n\r\n return !(currentCards.isEmpty());\r\n\r\n }",
"public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }",
"public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }",
"@Override\r\n public void checkWarGameOver(){\r\n if(this.checkOnePlayerDecksEmpty(0)){\r\n // Set gameOver flag to true\r\n this.isGameOver = true; \r\n \r\n }\r\n \r\n }",
"boolean isDrooping();",
"public void checkDeath()\n {\n if (player.getY() >= 549)\n {\n gameOver();\n }\n }",
"public boolean isOverDue() {\n\t\treturn state == loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\r\n\t}",
"public boolean isGameOver() {\r\n if(timesAvoid == 3) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }",
"public void bottomTopCheck() {\n bLCollide = false;\n bRCollide = false;\n tLCollide = false;\n tRCollide = false;\n if(grounded) {\n bottomCollision(); \n }\n else if(!grounded) {\n if(ySpeed > 0 || Math.abs(xSpeed) > Math.abs(ySpeed)) {\n bottomCollision(); \n }\n else if(ySpeed < 0 || Math.abs(xSpeed) > Math.abs(ySpeed)) {\n topCollision();\n }\n }\n }",
"public boolean getOver(){\n\t\t//if the game is over, stop the timer\n\t\tif(this.over){\n\t\t\t//update the total points label\n\t\t\tthis.getPoints();\n\t\t\t\n\t\t\tthis.timer.stop();\n\t\t}\n\t\t\n\t\treturn this.over;\n\t}",
"public boolean isOver() {\n\t\t\n\t\tif(!dealer.hasCards()){\n\t\t\tisOver= true;\n\t\t\treturn isOver;\n\t\t}\n\t\t\n\t\tfor (Player p : players) {\n\t\t\tif (!p.hasCards()) {\n\t\t\t\tisOver = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isOver;\n\t}",
"boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }",
"public void checkGameOver() {\n if(snake.getX() < 0 || snake.getX() > WIDTH - 4) { setGameState(GameState.GAME_OVER); }\n if(snake.getY() < 0 || snake.getY() > HEIGHT - 4) { setGameState(GameState.GAME_OVER); }\n if(snake.hasCollided()) { setGameState(GameState.GAME_OVER); }\n\n }",
"public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }",
"public boolean isGameOver() {\n\t\treturn (lives <= 0);\n\t}",
"public boolean isBattleOver() {\n\t\treturn battleOver;\n\t}",
"public boolean gameOverTick(Game game) {\n\t\treturn false;\n\t}",
"private void gameOver() {\n\t\t\n\t}",
"@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}",
"public boolean gameOver()\n {\n boolean over = false;\n if (player1Hand.isEmpty()||player2Hand.isEmpty())\n {\n over = true;\n }\n return over;\n }",
"private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"public boolean gameOver(){\n\n\t\tif (score > highScore) {\n\t\t\thighScore = score;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isBattleOver(){\n\n if(battleEnemies.size() == 0) {\n System.out.println(\"Battle over all enemies dead\");\n findDefeated();\n cleanStatuses();\n result = true;\n\n return true;\n }\n if(character.getCurrHP() <= 0){\n System.out.println(\"Battle over character has died\");\n //findDefeated();\n cleanStatuses();\n result = false;\n\n return true;\n }\n //System.out.printf(\"remaining enemies: %s\\n\", battleEnemies.size());\n return false;\n }",
"@Override\n\tpublic boolean \t\t\thasPriorityOver (EventI e)\n\t{\n\t\treturn false;\n\t}",
"public boolean isOverdrawn() {\n return this.getBalance().compareTo(new BigDecimal(\"0\")) < 0;\n }",
"public boolean isMouseOver(){\n\t\treturn this.contains(Main.camera.getMousePos());\n\t}",
"public void setOver(boolean over) {\r\n isOver = over;\r\n }",
"private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}",
"private void gameOver() {\n\t\tgameOver=true;\n\t}",
"private boolean didPlayerLose() {\r\n return mouseListeningMode && bird.getNumThrowsRemaining() == 0;\r\n }",
"private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}",
"public void checkMouse(){\n if(Greenfoot.mouseMoved(null)){\n mouseOver = Greenfoot.mouseMoved(this);\n }\n //Si esta encima se volvera transparente el boton en el que se encuentra\n if(mouseOver){\n adjTrans(MAX_TRANS/2);\n }\n else{\n adjTrans(MAX_TRANS);\n }\n \n }",
"public boolean isOverThreshold(){return isOverThreshold;}",
"public void gameOver() {\n this.lives --;\n this.alive = false;\n }",
"public boolean gameOver() {\n\t\treturn gameOver;\n\t}",
"private boolean isUnderground(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().isUnderground() == true){return true; }\n else{ return false; }\n }",
"boolean GameOver() {\n\t\treturn player.isDead();\n\t}",
"public boolean hasFainted() {\n return hp <= 0;\n }",
"public boolean isRoundOver() {\n\t\tint numberOfLiving = 0;\n\t\tboolean nobodyHasAmmo = true;\n\t\t\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\t// The round is over if someone is dead\n\t\t\tif (tanks[i].isAlive()) {\n\t\t\t\tnumberOfLiving++;\n\t\t\t}\n\t\t\tnobodyHasAmmo &= tanks[i].getAmmo() == 0;\n\t\t}\n\t\t\n\t\t// Return true if one or none players are living, or stalemate\n\t\treturn numberOfLiving <= 1 || (nobodyHasAmmo && bullets.isEmpty());\n\t}",
"public boolean gameIsOver() {return revealedShips >= 4;}",
"public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }",
"public boolean isUnderMouse(int x, int y) {\n\t\tif (x >= getX() && x <= getX() + getWidth() && y >= getY() && y <= getY() + getHeight())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean overLaps(Property prop) {\n if (this.getXRight() <= prop.getXLeft() || this.getXLeft() >= prop.getXRight()\n || this.getYTop() >= prop.getYBottom() || this.getYBottom() <= prop.getYTop()) {\n return false;\n }\n return true;\n }",
"private int sinksUnderwater() {\n if ((getPosition() == null) || isOffBoard()) {\n return 0;\n }\n\n IHex curHex = game.getBoard().getHex(getPosition());\n // are we even in water? is it depth 1+\n if ((curHex.terrainLevel(Terrains.WATER) <= 0) || (getElevation() >= 0)) {\n return 0;\n }\n\n // are we entirely underwater?\n if (isProne() || (curHex.terrainLevel(Terrains.WATER) >= 2)) {\n return getHeatCapacity();\n }\n\n // okay, count leg sinks\n int sinksUnderwater = 0;\n for (Mounted mounted : getMisc()) {\n if (mounted.isDestroyed() || mounted.isBreached() || !locationIsLeg(mounted.getLocation())) {\n continue;\n }\n if (mounted.getType().hasFlag(MiscType.F_HEAT_SINK)) {\n sinksUnderwater++;\n } else if (mounted.getType().hasFlag(MiscType.F_DOUBLE_HEAT_SINK)) {\n sinksUnderwater += 2;\n }\n }\n return sinksUnderwater;\n }",
"public boolean isOver() {\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (!matrix[i][j].isClicked()) {\n return false;\n }\n }\n }\n return true;\n }",
"public void setThundering(boolean thunderingIn)\n {\n thundering = thunderingIn;\n }",
"public boolean hasBust() {\n\t\treturn this.hand.countValue().first() > 21;\n\t}",
"private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }",
"@Override\n\tpublic boolean isAWin(int side) {\n\t\treturn false;\n\t}",
"public Boolean isInputOver() {\n if (this.currentState == states.INPUT) {\n return true;\n }\n return false;\n }",
"private boolean checkStatus() {\r\n //\tSystem.out.println(\"Left \" + Left.getX() + \",\" + Left.getY());\r\n \t//System.out.println(\"Head \" + head.getX() + \",\" + head.getY());\r\n \tboolean result = false;\r\n \tif(Left.getX() >= -4 && Left.getX() <= -3.5f) {\r\n \t\t\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= -2 && Left.getX() <= -0.5f) {\r\n \t\tthis.die = 1;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 0 && Left.getX() <= 1.5f) {\r\n \t\tthis.die = 2;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 2 && Left.getX() <= 3.5f) {\r\n \t\tthis.die = 3;\r\n \t\tresult = true;\r\n \t}\r\n \treturn result;\r\n }",
"private boolean checkGameOver() {\n\t\tboolean singlePlayerWon = otherPlayer.getLife() == 0;\n\t\tboolean otherPlayerWon = singlePlayer.getLife() == 0;\n\n\t\tif (singlePlayerWon || otherPlayerWon) {\n\t\t\tthis.singlePlayer.createEndButton(singlePlayerWon);\n\t\t\tthis.singlePlayer.onGameOver();\n\t\t\tthis.otherPlayer.onGameOver();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }",
"public abstract boolean gameIsOver();",
"public void battleOver()\r\n {\r\n isBattleOver = true;\r\n }",
"@Override\n\tpublic boolean isCovered() {\n\t\treturn (falseCount > 0) && (trueCount > 0);\n\t}",
"public void check() {\n Ellipse2D.Double head = snakeParts.get(0);\n Food food = gameGround.getFood();\n\n // Ate itself\n for (int i = 1; i < snakeParts.size(); i++) {\n if (head.getMinX() == snakeParts.get(i).getMinX() && head.getMinY() == snakeParts.get(i).getMinY()) {\n over = true;\n return;\n }\n }\n\n // Ate food\n if (head.getMinX() == food.getShape().getMinX() && head.getMinY() == food.getShape().getMinY()) {\n scoreBoard.addPoints(1);\n food.next(this);\n snakeParts.add(ass);\n }\n }",
"public boolean shouldHit() {\r\n\t\tif(getHandVal() < 17) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false; \r\n\t}",
"public boolean isGameOver()\n {\n if(bird.isOnTheFloor||gameOver||pipes.getWhereToDrawB().intersect(bird.getWhereToDraw())|| pipes.getWhereToDrawT().intersect(bird.getWhereToDraw()))\n {\n if(!gameOver){\n Music.playCrash(context);\n }\n gameOver=true;\n return gameOver;\n }\n return false;\n }",
"public boolean isGameOver() {\r\n\treturn false;\r\n }",
"public boolean gameOver() {\n return winner() != null;\n }",
"public boolean CheckTimeInLevel(){\n \n Long comparetime = ((System.nanoTime() - StartTimeInLevel)/1000000000);\n \n return (comparetime>TILData.critpoints.get((int)speed));\n // stop tetris because this subject is an outlier for this level\n \n \n }",
"private boolean maybeBelowTracked(Block block) {\n\t\tif (Material.SOIL.equals(block.getType()) || // wheat, carrots, potatoes, beetroot, melon stalk, pumpkin stalk\n\t\t\t\tMaterial.NETHERRACK.equals(block.getType()) || // netherwart\n\t\t\t\tMaterial.SAND.equals(block.getType()) || // cactus, sugarcane\n\t\t\t\tMaterial.END_STONE.equals(block.getType())) { // chorus fruit \n\t\t\treturn true;\n\t\t}\n\t\tBlock up = block.getRelative(BlockFace.UP);\n\t\tif (Material.BROWN_MUSHROOM.equals(up.getType()) || Material.RED_MUSHROOM.equals(up.getType()) || // mushrooms\n\t\t\t\tMaterial.SAPLING.equals(up.getType())) { // saplings\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isUnderflow() {\n\t\treturn (dataSize() < Math.ceil(degree / 2.0) - 1);\n\t}"
] | [
"0.7097099",
"0.69173557",
"0.6674545",
"0.6648647",
"0.6502123",
"0.64245176",
"0.6388857",
"0.63493663",
"0.62914276",
"0.6177131",
"0.6174941",
"0.61527616",
"0.61472756",
"0.6125861",
"0.6113232",
"0.60564005",
"0.6049631",
"0.59754187",
"0.5971573",
"0.59628433",
"0.59579855",
"0.59499085",
"0.5939466",
"0.59258085",
"0.59170544",
"0.59111273",
"0.5906393",
"0.5891358",
"0.58681566",
"0.58557516",
"0.58475304",
"0.58353823",
"0.583328",
"0.57891953",
"0.5789189",
"0.578611",
"0.57833976",
"0.57707167",
"0.57689166",
"0.5766764",
"0.5758074",
"0.5757497",
"0.5747479",
"0.5741905",
"0.57299954",
"0.57238984",
"0.5718634",
"0.5713651",
"0.5712253",
"0.5710034",
"0.57066566",
"0.5705954",
"0.5705954",
"0.5705954",
"0.5705954",
"0.5705954",
"0.5705954",
"0.5702743",
"0.5691893",
"0.5691384",
"0.5689093",
"0.5680186",
"0.56610507",
"0.5656196",
"0.56470966",
"0.5636081",
"0.56300235",
"0.56299406",
"0.56255734",
"0.56104857",
"0.5604754",
"0.5604432",
"0.55985326",
"0.5595921",
"0.55956715",
"0.55880356",
"0.5573904",
"0.5572897",
"0.55657715",
"0.5559069",
"0.55491215",
"0.5545412",
"0.55271137",
"0.5526661",
"0.55257255",
"0.55219394",
"0.55213773",
"0.55211735",
"0.5512115",
"0.55067444",
"0.5491895",
"0.54846346",
"0.54771405",
"0.5475947",
"0.54735583",
"0.54705524",
"0.54615545",
"0.5457785",
"0.54576313",
"0.5455527"
] | 0.56915176 | 59 |
Checks if is second part time under over. | public static Boolean isSecondPartUnderOver(Integer integer) {
return secondPartUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasDesiredTime();",
"boolean hasTime();",
"boolean hasTime();",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public boolean secondTimer() {\r\n if (seconds - lastSecond >= 1) {\r\n lastSecond = seconds;\r\n return true;\r\n } else if (seconds < lastSecond) {\r\n lastSecond = 0;\r\n }\r\n return false;\r\n }",
"private boolean isTimeOverlap(Item t) {\n\t\treturn t.getEndDate().equals(event.getEndDate());\n\t}",
"boolean hasExchangeTime();",
"public boolean checkTime() {\n boolean result = false;\n long currentTime = System.currentTimeMillis();\n while (currentTime == timeFlag + 1000) {\n this.timeFlag = currentTime;\n result = true;\n return result;\n }\n return result;\n }",
"boolean hasErrorTime();",
"boolean hasEndTime();",
"public boolean isDuringTime() {\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HHmm\");\r\n\t\tint now = Integer.parseInt( sdf.format(new Date()) );\r\n for ( int i = 0; i < openTime.length; i++ )\r\n\t\t\tif ( now >= openTime[i] && now <= closeTime[i])\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean isNightTime() {\n\t\tint hour24 = this.total % 24;\n\t\tif (hour24 < 7 || hour24 > 18) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean hasDesiredTime() {\n return desiredTime_ != null;\n }",
"private boolean validateArrivingTime(StopPoint currentSP) {\n\t\ttry {\n\t\t\tint time = Integer.valueOf(hourComboBox.getValue()) * 60;\n\t\t\ttime += Integer.valueOf(minuteComboBox.getValue());\n\t\t\ttime += timeIndicatorComboBox.getValue().equals(\"PM\") ? 12 * 60 : 0;\n\t\t\tfor (StopPoint stopPoint : stopPoints) {\n\t\t\t\tif (stopPoint.getTime() != null && !stopPoint.getTime().equals(\"\") && stopPoint != currentSP) {\n\t\t\t\t\tString[] spTimeString = stopPoint.getTime().split(\"[ :]+\");\n\t\t\t\t\tint spTime = Integer.valueOf(spTimeString[0]) * 60;\n\t\t\t\t\tspTime += Integer.valueOf(spTimeString[1]);\n\t\t\t\t\tspTime += spTimeString[2].equals(\"PM\") ? 12 * 60 : 0;\n\n\t\t\t\t\tif (time <= spTime + 5 && time >= spTime - 5) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean isSurpass(State lastTime, State nowTime) {\n boolean result;\n String last;\n String now;\n try {\n last = ShortcutUtil.refFormatOnlyDate(Long.valueOf(lastTime.getTime_point()));\n now = ShortcutUtil.refFormatOnlyDate(Long.valueOf(nowTime.getTime_point()));\n }catch (Exception e){\n e.printStackTrace();\n return false;\n }\n result = !last.equals(now);\n return result;\n }",
"boolean hasUseTime();",
"boolean hasUseTime();",
"boolean hasTimeSpoutBoltF();",
"boolean hasStartTime();",
"boolean hasTimeBoltHBoltE();",
"public static boolean hasTime(String time) {\n String[] components = time.split(\" \");\n return components.length == 2;\n }",
"private boolean checkTime(int hour, int minutes) {\n\tboolean check = true;\n\t\tif((hour < 0) || (hour > 23) || (minutes < 0) || (minutes > 59)) {\n\t\t\tcheck = false;\n\t\t}\n\t\telse {\n\t\t\tcheck = true;\n\t\t}\n\treturn check;\n\t}",
"private Boolean TimeInRange(String time){\n \n String[] t = time.split(\":\");\n \n int hours = Integer.parseInt(t[0]);\n int minutes = Integer.parseInt(t[1]);\n int seconds = Integer.parseInt(t[2]);\n \n if(hours == 11 && minutes == 59 && (seconds >= 55)){\n return true;\n }\n \n return false;\n \n }",
"public boolean hasDesiredTime() {\n return desiredTimeBuilder_ != null || desiredTime_ != null;\n }",
"boolean hasReceiveTime();",
"public boolean checkTime(Calendar from,Calendar to,Calendar time)\n {\n if(time.after(from) && time.before(to))\n {\n return true;\n }\n return false;\n }",
"@Override\n public boolean isMenorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()>this.getValue(); \n }",
"boolean hasTimeRecord();",
"public static boolean timecomparison(String ftime, String stime) {\n\t\t\r\n\t\tint fYear = Integer.parseInt(ftime.substring(0,4));\r\n\t\tint sYear = Integer.parseInt(stime.substring(0,4));\r\n\t\t\r\n\t\tint fMonth = Integer.parseInt(ftime.substring(5,7));\r\n\t\tint sMonth = Integer.parseInt(stime.substring(5,7));\r\n\t\t\r\n\t\tint fDay = Integer.parseInt(ftime.substring(8,10));\r\n\t\tint sDay = Integer.parseInt(stime.substring(8,10));\r\n\t\t\r\n\t\tint fHour = Integer.parseInt(ftime.substring(11,13));\r\n\t\tint sHour = Integer.parseInt(stime.substring(11,13));\r\n\t\t\r\n\t\tint fMin = Integer.parseInt(ftime.substring(14,16));\r\n\t\tint sMin = Integer.parseInt(stime.substring(14,16));\r\n\t\t\r\n\t\tint fSec = Integer.parseInt(ftime.substring(17,19));\r\n\t\tint sSec = Integer.parseInt(stime.substring(17,19));\r\n\t\t\r\n\t\tdouble difference = (fYear-sYear)*262800*60 + (fMonth-sMonth)*720*60 + (fDay-sDay)*24*60+ (fHour-sHour)*60 + ((fMin-sMin));\r\n\t\t\r\n\t\t//might need to change the = depending on the order of checks\r\n\t\tif(difference <= 0) {\r\n\t\t\treturn true; \r\n\t\t}\r\n\t\telse return false; \r\n\t}",
"@java.lang.Override\n public boolean hasTime() {\n return instance.hasTime();\n }",
"boolean hasCollectEndTime();",
"public boolean usesTime() {\n return uhrzeit != null;\n }",
"boolean isClockFailure();",
"boolean hasTimeBoltBBoltC();",
"public boolean CheckTimeInLevel(){\n \n Long comparetime = ((System.nanoTime() - StartTimeInLevel)/1000000000);\n \n return (comparetime>TILData.critpoints.get((int)speed));\n // stop tetris because this subject is an outlier for this level\n \n \n }",
"boolean hasTimeBoltABoltB();",
"@Override\n public boolean isMayorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()<this.getValue();\n }",
"boolean hasVisitEndtime();",
"boolean hasVisitEndtime();",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"boolean hasInstant();",
"public static int checkApp2Closed(){\n long timeNow = System.currentTimeMillis();\n\n DateFormat df = new SimpleDateFormat(\"HH:mm\");\n df.setTimeZone(TimeZone.getTimeZone(\"GMT+05:30\"));\n String time = df.format(new Date(timeNow));\n int hours = Integer.parseInt(time.split(\":\")[0]);\n int minutes = Integer.parseInt(time.split(\":\")[1]);\n int totalMinutes = (60 * hours) + minutes;\n\n ConfigUtility configUtility = ConfigUtility.getInstance();\n int startHour = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V2_START_HOUR,\"9\"));\n int startMinutes = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V2_START_MINUTE,\"0\"));\n int endHour = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V2_END_HOUR,\"18\"));\n int endMinutes = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V2_END_MINUTE,\"0\"));\n\n int startTime = (60 * startHour) + startMinutes;\n int endTime = (60 * endHour) + endMinutes;\n\n if (totalMinutes < startTime) {\n return -1;\n }\n if (totalMinutes > endTime) {\n return 1;\n }\n return 0;\n }",
"public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }",
"public void timePasses(){\n crtClock++;\n if(crtClock==25)crtClock=1; // If end of day, reset to 1\n if(crtClock<=opHours)tellMeterToConsumeUnits(unitsPerHr);\n }",
"boolean hasCurrentStateTime();",
"public boolean timeExists(int time) {\n Node currentNode = first;\n while(currentNode != null) {\n if(time == currentNode.getData().getIntegerTime())\n return true;\n currentNode = currentNode.getNextNode();\n }\n return false;\n }",
"public boolean hasTime() {\n return this.timeWrapper.isPresent();\n }",
"public static boolean isTimeAfter(String time1, String time2)\n\t{\n\t\treturn isTimeAfter(time1, time2, getDateTimeFormat());\n\t}",
"public boolean isNowTime_in_period(){\r\n if (isTimeWith_in_Interval((LocalTime.now()).format(formatter),openTime,closeTime)) {\r\n // System.out.println(\"hi this works\");\r\n return true;\r\n } else {\r\n \r\n return false;\r\n }\r\n }",
"boolean hasVotingEndTime();",
"public void checkHighScore(){\n if(timeElapsed >= highMinutes){\n highMinutes = timeElapsed;\n highSeconds = timeCounter / 60;\n }\n }",
"private static boolean isMonitoringTimeOver(Properties configuration) {\r\n String monitoringStartTime = configuration.getProperty(Constants.PROPERTY_MONITORING_START_TIME);\r\n if (monitoringStartTime == null) {\r\n return false;\r\n }\r\n DateTimeZone.setDefault(DateTimeZone.UTC);\r\n \r\n DateTime startTime = new DateTime(monitoringStartTime);\r\n String monitoringDuration = configuration.getProperty(Constants.PROPERTY_TIME_MONITORING_DURATION);\r\n \r\n int monitoringDurationMinutes = Integer.parseInt(monitoringDuration);\r\n DateTime endTime = startTime.plusMinutes(monitoringDurationMinutes);\r\n \r\n return endTime.isBeforeNow();\r\n }",
"public boolean isTime() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return Timer.getFPGATimestamp()-startT >= 1.5;\n }",
"boolean hasTimeSpoutBoltA();",
"boolean hasDepositEndTime();",
"public boolean isTimeStampReached(long _timeStamp) {\n return (_timeStamp - getTime())<=0;\n }",
"private static void checkLastSampleTime() {\n double lastSampleTime = ((Double)state.get( \"lastSampleTime\" )).doubleValue();\n Double cTime = (Double)state.get( \"currentTime\" );\n double currentTime = cTime.doubleValue(); // just in case this is a ref\n\n if( lastSampleTime <= currentTime ){\n validity = false;\n out.println( \"<BR>Error: Last Sample Time is less than current time<BR>\" ); \n }\n }",
"public boolean isTimeBetweenTwoTime(String shift, String loc) throws ParseException {\n String locale = loc.substring(0, 1);\n boolean valid = false;\n\n //Time variables\n Calendar cal = Calendar.getInstance();\n int currentDay = cal.get(Calendar.DAY_OF_MONTH);\n\n DateFormat df = new SimpleDateFormat(\"HH:mm:ss\");\n String argCurrentTime = df.format(new Date());\n String argStartTime=\"\";\n String argEndTime=\"\";\n\n //Set start & end timings for shift patterns (Stations & Depots)\n //30 minutes extra time for updating attendance of the shift\n switch(shift){\n case \"A\":\n //Station Shift A Timing\n if(locale.equalsIgnoreCase(\"E\") || locale.equalsIgnoreCase(\"N\")) {\n argStartTime = \"04:00:00\";\n argEndTime = \"12:00:00\";\n }\n //Depot Shift A Timing\n else if(locale.equalsIgnoreCase(\"D\")) {\n argStartTime = \"04:00:00\";\n argEndTime = \"13:00:00\";\n }\n break;\n case \"B\":\n //Station Shift B Timing\n if(locale.equalsIgnoreCase(\"E\") || locale.equalsIgnoreCase(\"N\")) {\n argStartTime = \"11:00:00\";\n argEndTime = \"19:00:00\";\n }\n //Depot Shift B Timing\n else if(locale.equalsIgnoreCase(\"D\")) {\n argStartTime = \"12:00:00\";\n argEndTime = \"21:00:00\";\n }\n break;\n case \"C\":\n //Station Shift C Timing\n if(locale.equalsIgnoreCase(\"E\") || locale.equalsIgnoreCase(\"N\")) {\n argStartTime = \"18:00:00\";\n argEndTime = \"02:00:00\";\n }\n //Depot Shift C Timing\n else if(locale.equalsIgnoreCase(\"D\")) {\n argStartTime = \"20:00:00\";\n argEndTime = \"05:00:00\";\n }\n break;\n }\n\n if (shift.equalsIgnoreCase(\"A\") || shift.equalsIgnoreCase(\"B\") || shift.equalsIgnoreCase(\"C\")) {\n // Start Time\n Date startTime = new SimpleDateFormat(\"HH:mm:ss\").parse(argStartTime);\n Calendar startCalendar = Calendar.getInstance();\n startCalendar.setTime(startTime);\n\n // Current Time\n Date currentTime = new SimpleDateFormat(\"HH:mm:ss\").parse(argCurrentTime);\n Calendar currentCalendar = Calendar.getInstance();\n currentCalendar.setTime(currentTime);\n\n // End Time\n Date endTime = new SimpleDateFormat(\"HH:mm:ss\").parse(argEndTime);\n Calendar endCalendar = Calendar.getInstance();\n endCalendar.setTime(endTime);\n\n //\n if (currentTime.compareTo(endTime) < 0) {\n currentCalendar.add(Calendar.DATE, 1);\n currentTime = currentCalendar.getTime();\n }\n\n if (startTime.compareTo(endTime) < 0) {\n startCalendar.add(Calendar.DATE, 1);\n startTime = startCalendar.getTime();\n }\n\n //\n if (currentTime.before(startTime)) {\n valid = false;\n } else {\n if (currentTime.after(endTime)) {\n endCalendar.add(Calendar.DATE, 1);\n endTime = endCalendar.getTime();\n }\n\n if (currentTime.before(endTime)) {\n valid = true;\n } else {\n valid = false;\n }\n }\n }\n\n return valid;\n }",
"public static boolean isRemoteOnOrAfterTimeValid(long onOrAfter, long now) {\n return onOrAfter + CLOCK_SKEW_TIME > now;\n }",
"private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }",
"private boolean adjustedTimeIsSet() {\n return (adjustedTimeStamp != null);\n }",
"private boolean checkTime(ActiveTimeSpans active, TimeSpan span, Object constraintKey)\n {\n if (span.isTimeless())\n {\n return true;\n }\n else if (constraintKey == null)\n {\n final AnimationPlan animationPlan = myAnimationPlan;\n final AnimationState currentAnimationState = myCurrentAnimationState;\n if (animationPlan == null || currentAnimationState == null)\n {\n return active != null && active.getPrimary().intersects(span);\n }\n final AnimationState state = animationPlan.findState(span, currentAnimationState.getDirection());\n if (state == null)\n {\n return false;\n }\n boolean result = false;\n try\n {\n result = animationPlan.calculateDistance(currentAnimationState, state) == 0;\n }\n catch (final RuntimeException e)\n {\n // If this test fails just fail the in range test as\n // this always happens during a plan change where the\n // distributor has yet to receive the updated plan and\n // ends up in a race condition with the animation\n // manager adjusting to the new plan.\n result = false;\n }\n return result;\n }\n else\n {\n final Collection<? extends TimeSpan> secondary = active == null ? null : active.getSecondary().get(constraintKey);\n boolean overlaps = false;\n if (secondary != null)\n {\n for (final TimeSpan ts : secondary)\n {\n if (ts.overlaps(span))\n {\n overlaps = true;\n break;\n }\n }\n }\n return overlaps;\n }\n }",
"public void checkRegScore(){\n currentSecond = timeCounter / 60;\n currentMinute = timeElapsed;\n }",
"boolean hasSendTime();",
"boolean hasSubmitTime();",
"boolean addHardTimePlayed(long time);",
"public boolean isNight() {\r\n return hours < 6 || hours >= 20;\r\n }",
"public boolean hasTime() {\n return fieldSetFlags()[0];\n }",
"public boolean isBefore(Time time) {\n\tboolean check = true;\n\t\tif(this.getHour() > time.getHour()) {\n\t\t\tcheck = false;\n\t\t} else if((this.getHour() == time.getHour()) && (this.getMinutes() > time.getMinutes())){\n\t\t\tcheck = false;\n\t\t}\n\t\treturn check;\n\t}",
"public boolean isTimeToSelect();",
"public boolean hasExpired() {\n return this.getOriginalTime() + TimeUnit.MINUTES.toMillis(2) < System.currentTimeMillis();\n }",
"public boolean timeValidated(Event e) {\n\t\tLocalDate date = e.sDate;\n\t\tLocalTime stime = e.sTime;\n\t\tLocalTime etime = e.eTime;\n\t\tArrayList<Event> list = new ArrayList<Event>();\n\t\tif(map.containsKey(date)) {\n\t\t\tlist = map.get(date);\n\n\t\t\tfor(int i = 0; i<list.size(); i++) {\n\t\t\t\tEvent evnt = list.get(i);\n\n\t\t\t\tif(e.sTime.equals(evnt.sTime) || e.eTime.equals(evnt.eTime)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//check for start times\n\t\t\t\tif(e.sTime.isBefore(evnt.sTime)) {\n\t\t\t\t\tif(!e.eTime.isBefore(evnt.sTime)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//check for end time\n\t\t\t\tif(e.sTime.isAfter(evnt.sTime)) {\n\t\t\t\t\tif(!e.sTime.isAfter(evnt.eTime)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}",
"@java.lang.Override\n public boolean hasRemainingTimeSeconds() {\n return remainingTimeSeconds_ != null;\n }",
"public boolean validateTimes() {\n if (!allDay) {\n // Convert the time strings to ints\n int startTimeInt = parseTime(startTime);\n int endTimeInt = parseTime(endTime);\n\n if (startTimeInt > endTimeInt) {\n return false;\n }\n }\n return true;\n }",
"private boolean timeSlotConflict(Course course, Lab lab)\n\t{\n\t\tboolean passed = true;\n\t\tTimeSlot cSlot = course.getSlot(), lSlot = lab.getSlot();\n\t\t\n\t\t//Obviously there is no conflict if they course + lab didn't have a time slot assigned\n\t\tif(cSlot != null && lSlot != null)\n\t\t{\n\t\t\t//If a course and lab are on the same day, or course is monday and lab is friday\n\t\t\tif(cSlot.getDay() == lSlot.getDay() || (cSlot.getDay()==ScheduleDay.MO && lSlot.getDay()==ScheduleDay.FR))\n\t\t\t{\n\t\t\t\t//If it's a Tuesday\n\t\t\t\tif(cSlot.getDay() == ScheduleDay.TU)\n\t\t\t\t{\n\t\t\t\t\t//If they have the same start they are a conflict\n\t\t\t\t\t//Lectures are 1.5 hours and labs are 1 hour. \n\t\t\t\t\t//If a lecture starts 30 min after a lab, it's a conflict\n\t\t\t\t\t//If a lecture starts 30 min before (-70 becuase thats how we coded it for ints)\n\t\t\t\t\t// then it is a conflict\n\t\t\t\t\t//NOTE: I need to do more testing, but everything i tired is working so far\n\t\t\t\t\tif(cSlot.getStartTime() == lSlot.getStartTime())\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()+30))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()-70))\n\t\t\t\t\t\tpassed = false; \n\t\t\t\t\telse if (cSlot.getStartTime() == (lSlot.getStartTime() -100))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\t//THIS IS WHERE WE NEED FIXING \n\t\t\t\t}\n\t\t\t\telse if(cSlot.getDay() == ScheduleDay.MO && lSlot.getDay() == ScheduleDay.FR)\n\t\t\t\t{\n\t\t\t\t\tif(cSlot.getStartTime() == lSlot.getStartTime())\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()+100))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\t//else if(sC.getStartTime() == (sL.getStartTime()-100))\n\t\t\t\t\t\t//conflict = true; \n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t//If they are equaal, there is a time conflict\n\t\t\t\t\tpassed = !(cSlot.getStartTime() == lSlot.getStartTime());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tpassed = true; //If they don't have the same day, they are obviously not in conflict\n\t\t}\n\t\treturn passed;\n\t}",
"boolean hasSolverTimeLimitSeconds();",
"boolean hasTimeBoltCBoltD();",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"private boolean isTimeToDumpAgain() {\n return (!getSettings().isSituationChangeOnly() || !isPreviousCheckFailed()) && (getLastThreadDumpTime() == 0 ||\n getLastThreadDumpTime() + TimeUnit.MINUTES.toMillis(getSettings().getMinutesBetweenThreadDumps()) <\n System.currentTimeMillis());\n }",
"public static String raceOfTime(int hour, int minute, int second, int time1, int time2){\n\t if(time1 > time2)\n\t {\n \t\tint temporary = time1;\n\t\ttime1 = time2;\n\t\ttime2 = temporary;\n\t }\n\t int counter = 0;\n\t if(time1 <= hour && hour < time2) \n\t {\n\t counter++;\n\t } \n\t else if(time1 <= (double)minute / 5 && (double)minute / 5 < time2) \n\t {\n \tcounter++;\n\t } \n\t else if(time1 < (double)second / 5 && (double)second / 5 < time2) \n\t {\n\t\tcounter++;\n\t } \n\t else \n\t {\n\t }\n if(ounter == 0 || counter == 3) \n\t {\n return \"YES\";\n\t } \n\t else \n\t {\n return \"NO\";\n\t }\n\t}",
"boolean hasResponseTimeNsec();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"@Override\n\tpublic int isRightTime(int day, int hourBef, int hourAft) {\n\t\tint rtnHour = -1;\n\t\tint ccrrentDay = DateProcessTools.achieveDayOfMonth();\n\t\tint currentHour = DateProcessTools.achieveDayOfHour();\n\t\tif ((ccrrentDay == day) && (hourBef <= currentHour)\n\t\t\t\t&& (currentHour <= hourAft)) {\n\t\t\trtnHour = currentHour;\n\t\t} else if(((ccrrentDay == day))&&(currentHour>hourAft)){ //活动已经结束\n\t\t\trtnHour = -2;\n\t\t}\n\t\treturn rtnHour;\n\t}",
"private static boolean isTime(final Object obj) {\n return timeClass != null && timeClass.isAssignableFrom(obj.getClass());\n }",
"private boolean isSecondMove(int numberGeneratedSoFarLength) {\n\t\treturn numberGeneratedSoFarLength == 2;\n\t}",
"public boolean isJourneyInThePast() {\n\t\t\n\t\tlong journeyStartTime = TimeParser.strDateTimeToDate(mDeparture).getTime();\n\t\tlong now = System.currentTimeMillis();\n\t\t//System.out.println(\"DBG isInPast: now:\"+now+\" start:\"+journeyStartTime);\n\t\tif (journeyStartTime >= now) {\n\t\t\treturn false;\n\t\t}\n\t\tif (Constants.useWallClock == false) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean validateTime(){\n if(startSpinner.getValue().isAfter(endSpinner.getValue())){\n showError(true, \"The start time can not be greater than the end time.\");\n return false;\n }\n if(startSpinner.getValue().equals(endSpinner.getValue())){\n showError(true, \"The start time can not be the same as the end time.\");\n return false;\n }\n startLDT = convertToTimeObject(startSpinner.getValue());\n endLDT = convertToTimeObject(endSpinner.getValue());\n startZDT = convertToSystemZonedDateTime(startLDT);\n endZDT = convertToSystemZonedDateTime(endLDT);\n\n if (!validateZonedDateTimeBusiness(startZDT)){\n return false;\n }\n if (!validateZonedDateTimeBusiness(endZDT)){\n return false;\n };\n return true;\n }",
"public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }",
"boolean hasTimeBoltDBoltH();",
"private boolean hfun(Time currentTime,POI last,POI poi,Plan mPlan,boolean skip){\n Time arriveAt=new Time(currentTime.hour,currentTime.min);\n if(last!=null){\n if(arriveAt.add(last.getShortestPath(poi.getId()))){\n if(poi.getOpenTime().compare(arriveAt)||skip){\n return true;\n }\n }\n }\n else{\n \n if(mPlan!=null){\n POI mLast = mPlan.getLastPOI();\n if(mLast!=null)\n arriveAt.add(mPlan.getLastPOI().getShortestPath(poi.getId()));\n }\n if(poi.getOpenTime().compare(arriveAt)||skip){\n return true;\n }\n }\n return false;\n }",
"private boolean isClashing() {\n\t\tArrayList<Item> events = getEvents();\n\t\tfor (Item t : events) {\n\t\t\tif (isTimeOverlap(t)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean isBetweenTimes(String time1, String time2, String time) {\n if (time1.compareTo(time2) <= 0) {\n return time.compareTo(time1) >= 0 && time.compareTo(time2) < 0;\n } else {\n return time.compareTo(time1) >= 0 || time.compareTo(time2) < 0;\n }\n }",
"public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }"
] | [
"0.7360621",
"0.69985455",
"0.69985455",
"0.6911982",
"0.67374444",
"0.66663086",
"0.6557461",
"0.6551391",
"0.65372115",
"0.6510038",
"0.65032756",
"0.64503",
"0.6413445",
"0.6387881",
"0.6318699",
"0.62473667",
"0.62473667",
"0.62382984",
"0.62201035",
"0.6216301",
"0.61135",
"0.6088729",
"0.6075526",
"0.6073947",
"0.6067917",
"0.6064307",
"0.6059792",
"0.60580134",
"0.60376304",
"0.60344315",
"0.6026214",
"0.601278",
"0.600133",
"0.5995292",
"0.5981093",
"0.59777766",
"0.5970523",
"0.5966026",
"0.5966026",
"0.596327",
"0.5962114",
"0.59566706",
"0.5956006",
"0.59521466",
"0.59500176",
"0.5916137",
"0.59160376",
"0.5913489",
"0.58909297",
"0.58785474",
"0.58777565",
"0.5872472",
"0.58700913",
"0.5869509",
"0.58691645",
"0.5868911",
"0.5865804",
"0.58607787",
"0.5856283",
"0.58468807",
"0.58449525",
"0.5839253",
"0.5838529",
"0.5815051",
"0.5806231",
"0.58023936",
"0.58004516",
"0.5794455",
"0.57762927",
"0.57749844",
"0.57680637",
"0.5752637",
"0.5752357",
"0.57516414",
"0.574903",
"0.57471615",
"0.5730108",
"0.5726925",
"0.57252914",
"0.57252914",
"0.57252914",
"0.57194275",
"0.5717034",
"0.5715597",
"0.57084376",
"0.57084376",
"0.57084376",
"0.57084376",
"0.57084376",
"0.57084376",
"0.5706324",
"0.5663732",
"0.5659506",
"0.5657732",
"0.5655734",
"0.5639815",
"0.56330705",
"0.56319344",
"0.56299794",
"0.5629868",
"0.5628996"
] | 0.0 | -1 |
Checks if is second quarter under over. | public static Boolean isSecondQuarterUnderOver(Integer integer) {
return secondQuarterUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Boolean isForthQuarterUnderOver(Integer integer) {\r\n\t\treturn forthQuarterUnderOver.contains(integer);\r\n\t}",
"public static Boolean isFirstQuarterUnderOver(Integer integer) {\r\n\t\treturn firstQuarterUnderOver.contains(integer);\r\n\t}",
"public static Boolean isThirdQuarterUnderOver(Integer integer) {\r\n\t\treturn thirdQuarterUnderOver.contains(integer);\r\n\t}",
"public boolean isMultipleQuarterHour() {\n\n if (this.startTimeArray == null || this.endTimeArray == null) {\n return true;\n }\n long minutes = Duration.between(LocalTime.parse(this.startTimeString), LocalTime.parse(this.endTimeString)).toMinutes();\n\n if (minutes % 15 == 0 && minutes > 15) {\n\n return true;\n\n }\n\n return false;\n\n }",
"private boolean isValidQuiz2(double quiz2)\n\t{\n\t\treturn quiz2 >= 0 && quiz2 <= 10;\n\t}",
"@Override\n\tpublic void endOfQuarter(int quarter) {\n\t\t\n\t}",
"private boolean isValidQuiz3(double quiz3)\n\t{\n\t\treturn quiz3 >= 0 && quiz3 <= 10;\n\t}",
"public boolean istVoll()\n\t{\n\t return (_spalte0 > 0) && (_spalte1 > 0) && (_spalte2 > 0);\n\t}",
"private boolean isValidQuiz1(double quiz1)\n\t{\n\t\treturn quiz1 >= 0 && quiz1 <= 10;\n\t}",
"public void checkHighScore(){\n if(timeElapsed >= highMinutes){\n highMinutes = timeElapsed;\n highSeconds = timeCounter / 60;\n }\n }",
"public static boolean inRange(long quakeTime) throws Exception {\n SimpleDateFormat dayFormatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n String quakeDay = dayFormatter.format(new Date(quakeTime));\n String currentDay = dayFormatter.format(new Date());\n return (quakeDay.equals(currentDay));\n }",
"@Override\r\n\t\t\tpublic boolean accept(double t) {\n\t\t\t\treturn t>0.5;\r\n\t\t\t}",
"public boolean isHigher(Operator o){\n if(indent > o.indent){\n return true;\n }else{\n return prec > o.prec;\n }\n }",
"private boolean exceedRange(int year) {\n\t\tboolean exceeds = false;\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint upperRange = currentYear + RANGE_LIMIT;\n\t\tint lowerRange = currentYear - RANGE_LIMIT;\n\t\t\n\t\tif(year < lowerRange || year > upperRange){\n\t\t\texceeds = true;\n\t\t}\n\t\treturn exceeds;\n\t}",
"private boolean isValidFinalExam(double finalExam)\n\t{\n\t\treturn finalExam >= 0 && finalExam <= 100;\n\t}",
"private boolean checkFifthYear(Schedule sched)\n\t{\n\t\tArrayList<Course> fifthYearCourses = new ArrayList<Course>(); //Only 500CPSC courses\n\t\t//A list we build with time slots that 5th year courses were assigned \n\t\tArrayList<TimeSlot> fifthYearSlots = new ArrayList<TimeSlot>(); \n\t\tCourse tempCourse;\n\t\tint tempCourseNumber;\n\t\tTimeSlot tempSlot;\n\t\t\n\t\t//Traverse through all the courses\n\t\tfor(int i = 0; i<sched.getCourses().size();i++)\n\t\t{\n\t\t\ttempCourse = sched.getCourses().get(i);\n\t\t\ttempCourseNumber = tempCourse.getNumber();\n\t\t\t\n\t\t\t//If its course number is between 500 and 600 and it's in the cpsc department\n\t\t\t// append it to the list of fifth year courses\n\t\t\tif(\n\t\t\t\t\t(tempCourseNumber >= 500) && \n\t\t\t\t\t(tempCourseNumber < 600))\n\t\t\t{\n\t\t\t\tfifthYearCourses.add(tempCourse);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//At this point, fifthYearCourses contains all the 500 level CPSC class\n\t\t//THis loop checks if the time slot for the current 500 level course has \n\t\t//already been added to our list. If it is, we know they are not all at different times.\n\t\t//\n\t\tfor(int i = 0; i<fifthYearCourses.size();i++)\n\t\t{\n\t\t\ttempSlot = fifthYearCourses.get(i).getSlot();\n\t\t\t\n\t\t\tif(tempSlot != null)\n\t\t\t{\n\t\t\t\n\t\t\t\tif(fifthYearSlots.contains(tempSlot))\n\t\t\t\t\treturn false;\n\t\t\t\telse\n\t\t\t\t\tfifthYearSlots.add(tempSlot);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public void quadTest()\n\t{\n\t\tint index = 0, lim = 3;\n\t\tboolean quads = false;\n\t\t\n\t\twhile (index<=lim && (!quads))\n\t\t{\n\t\t\tif ((intRep[index] == intRep[index+1]) &&\n\t\t\t\t(intRep[index] == intRep[index+2]) &&\n\t\t\t\t(intRep[index] == intRep[index+3]) )\n\t\t\t{\n\t\t\t\tquads = true;\n\t\t\t\thandScore = 70000;\n\t\t\t\thandScore += 100 * intRep[index];\n\t\t\t}\n\t\t\telse index++;\n\t\t}\n\t}",
"public boolean not3TimesHigher() {\n\t\tArrayList<Double> temp=averageSalaries();\n\t\tfor(int i=0;i<temp.size();i++) {\n\t\t\tdouble selectOne= temp.get(i);//choose the select employee\n\t\t\ttemp.remove(i);//remove the select one's salary\n\t\t\tdouble[] otherEmployees=new double[temp.size()];\n\t\t\tfor(int j=0;j<otherEmployees.length;j++) {\n\t\t\t\totherEmployees[j]=temp.get(j);\n\t\t\t}\n\t\t\ttemp.add(i,selectOne);//add the salary whose selected last time.\n\t\t\ttry{\n\t\t\t\tif(selectOne>(average(otherEmployees)*3)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}catch(IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(\"There is something wrong with input\");\n\t\t\t}\n\t\t}\n\t return true;\n\t}",
"public boolean hasLapsed(int currentTime) {\n\t\tint currentTimeInSecs = currentTime;\n\t\tif (orderTimeInSecs < currentTimeInSecs) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isOverdue(int today);",
"private boolean isValidMidtermExam(double midtermExam)\n\t{\n\t\treturn midtermExam >= 0 && midtermExam <= 100;\n\t}",
"public boolean isAfter(Group3Date b) {\n\t\t\treturn compareTo(b) > 0;\n\t\t}",
"public boolean isSpare(){\r\n\t\tif( this.firstThrow + this.secondThrow == 10\r\n\t\t\t&& !this.isStrike())\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"@Override\n public boolean isMenorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()>this.getValue(); \n }",
"private static void checkLastSampleTime() {\n double lastSampleTime = ((Double)state.get( \"lastSampleTime\" )).doubleValue();\n Double cTime = (Double)state.get( \"currentTime\" );\n double currentTime = cTime.doubleValue(); // just in case this is a ref\n\n if( lastSampleTime <= currentTime ){\n validity = false;\n out.println( \"<BR>Error: Last Sample Time is less than current time<BR>\" ); \n }\n }",
"public boolean greaterP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) > (yRatio.numerator * x.denominator));\n }\n }\n }",
"public boolean hasPast();",
"private boolean checkQuads(Player player) {\n\t\tint j;\n\t\tfor (j = 0; j <= 3; j++) {\n\t\t\tif (player.getSevenCardsTempHand().get(j).getRank()\n\t\t\t\t\t.equals(player.getSevenCardsTempHand().get(j + 3).getRank())) {\n\t\t\t\tplayer.setQuads(true);\n\t\t\t\tplayer.setHandRank(HandRank.QUADS);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!player.isQuads())\n\t\t\treturn false;\n\t\t\n\t\t// init 5 cards hand\n\t\tfor(int i = 0; i < hand.length; i++) {\n\t\t\thand[i] = player.getSevenCardsTempHand().get(j);\n\t\t\tplayer.getSevenCardsTempHand().remove(j);\n\t\t}\n\t\t\n\t\t// add kicker\n\t\thand[4] = player.getSevenCardsTempHand().get(2);\n\n\t\tplayer.setFiveCardsHand(hand);\n\t\treturn true;\n\t}",
"public void insertQuarter(int coin[]) {\n if(coin.length ==2){\n \n if(coin[0] == 25 && coin[1]==25){\n //System.out.println(\"a[0]\"+a[0]);\n System.out.println(\"You inserted a quarter in q2\");\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n }else{\n gumballMachine.setState(gumballMachine.getNoQuarterState()); \n }\n \n \n \n }\n \n // System.out.println(\"You inserted a quarter in q2\");\n // gumballMachine.setState(gumballMachine.getHasQuarterState());\n\t}",
"public boolean withinMargin(double time,double margin ){\r\n\t\treturn MathUtil.abs(time-this.time)<=margin;\r\n\t}",
"public boolean nextRound() {\n if (numberOfRounds > playedRounds) {\n return true;\n }\n return false;\n }",
"private boolean equals(double x, double y) {\n return Math.abs(x - y) <= TOLERANCE;\n }",
"private boolean isPast(Calendar currentCal){\n Calendar presentCal = Calendar.getInstance();\n presentCal.set(Calendar.SECOND,59);\n return currentCal.before(presentCal);\n }",
"@Test\n public void floorToQuarterHour() throws Exception {\n DateTime dt0 = new DateTime(2009,6,24,23,29,30,789,DateTimeZone.UTC);\n\n Assert.assertNull(DateTimeUtil.floorToQuarterHour(null));\n \n // floor to nearest half hour\n DateTime dt1 = DateTimeUtil.floorToQuarterHour(dt0);\n\n Assert.assertEquals(2009, dt1.getYear());\n Assert.assertEquals(6, dt1.getMonthOfYear());\n Assert.assertEquals(24, dt1.getDayOfMonth());\n Assert.assertEquals(23, dt1.getHourOfDay());\n Assert.assertEquals(15, dt1.getMinuteOfHour());\n Assert.assertEquals(0, dt1.getSecondOfMinute());\n Assert.assertEquals(0, dt1.getMillisOfSecond());\n Assert.assertEquals(DateTimeZone.UTC, dt1.getZone());\n\n DateTime dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,0,0,0));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,1,23,456));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,30,12,56));\n Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,59,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,55,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,46,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n }",
"public boolean isOverDue() {\n\t\treturn state == loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\r\n\t}",
"public void insertQuarter() {\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n gumballMachine.getState().insertQuarter();\n }",
"private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }",
"public boolean hasTick();",
"public boolean thirtyoneDays() {\n String[] months = new String[]{\"January\", \"March\", \"May\", \"July\", \"August\", \"October\", \"December\"};\n for (String m : months) {\n if (m.equals(this.month)) {\n return true;\n }\n }\n return false;\n }",
"public void testQUARTER2() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 93, \"quartered\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"protected boolean isOverdue() {\n\t\t// this might be backwards, go back and check later\n\t\t/*int i = todaysDate.compareTo(returnDate);// returns 0, a positive num, or a negative num\n\t\tif (i == 0) { return false;}\t\t// the dates are equal, not overdue\n\t\telse if (i > 0) { return true; }\t// positive value if the invoking object is later than date\n\t\telse { return false; } */\t\t\t// negative value if the invoking object is earlier than date\n\t\t\n\t\t// can also do\n\t\tif (todaysDate.getTime() > returnDate.getTime() ) { return true; }\n\t\telse { return false; }\t// if the difference in time is less than or equal\n\t}",
"private boolean crossesInternationalDateline(String eastValue, \n String westValue\n ) {\n boolean crosses = false;\n \n if ((eastValue != null) &&\n (eastValue != \"\") &&\n (westValue != null) &&\n (westValue != \"\")\n ) {\n Double eastInteger = new Double(eastValue);\n Double westInteger = new Double(westValue);\n \n crosses = westInteger > eastInteger;\n }\n \n logger.debug(\"crosses International Dateline: \" + crosses);\n \n return crosses;\n }",
"public boolean CheckTimeInLevel(){\n \n Long comparetime = ((System.nanoTime() - StartTimeInLevel)/1000000000);\n \n return (comparetime>TILData.critpoints.get((int)speed));\n // stop tetris because this subject is an outlier for this level\n \n \n }",
"public abstract void isDIVRejection(long ms);",
"@Test\n public void testIsInLimitUpper() {\n Assertions.assertFalse(saab.isInLimit(.5, 1.5, 2.0));\n }",
"public static boolean percentOfTime(int p) {\n return (rng.nextInt(100) + 1 <= p);\n }",
"private boolean m(){\r\n int m = countColors - maxSat;\r\n if (m <= TH){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"public boolean isAfter(SpentOn spentOn)\n {\n return ( (calendar.get(Calendar.YEAR) > spentOn.calendar.get(Calendar.YEAR))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) > spentOn.calendar.get(Calendar.MONTH))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) > spentOn.calendar.get(Calendar.DAY_OF_MONTH))\n );\n }",
"public boolean istrianglevalid(double semiPer) {\n //declare variables\n boolean checkA = true;\n boolean checkB = true;\n boolean checkC = true;\n \n if (semiPer >= sideA && semiPer >= sideB && semiPer >= sideC) {\n return true;\n } else {\n return false;\n }\n }",
"public void testQUARTER3() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 94, \"quarter\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"public boolean isStrike(){\r\n\t\tif( this.firstThrow == 10 )\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"boolean hasDesiredTime();",
"@Override\n protected boolean isFinished() {\n return (System.currentTimeMillis() >= thresholdTime || (currentAngle > (totalAngleTurn - 2) && currentAngle < (totalAngleTurn + 2)));\n }",
"public boolean hasQuads(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 4);\r\n\t\t\r\n\t\t\r\n\t}",
"public boolean checkX2()\n {\n if(this.getX()>495) {\n return true;\n }\n else\n return false;\n\n }",
"private boolean cond3(Data C) {\n return (C.getBottom() > this.yT);\n }",
"protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }",
"protected void insertQuarter(double balance)\r\n {\r\n totalBalance = balance;\r\n totalBalance = totalBalance + 0.25;\r\n \r\n }",
"public int q(int t) {\n int l = 0, r = times.length - 1;//index\n while(l < r){\n int m = l + (r - l)/2 + 1;//need offset\n if(times[m] > t) r = m - 1;\n else l = m;//l always hold the smallOrEqual point\n }\n //l == r\n return winners[l];\n }",
"@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}",
"public boolean isCurTimeInOutage(final Outage out) {\n return isTimeInOutage(new GregorianCalendar(), out);\n }",
"public boolean isDuringTime() {\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HHmm\");\r\n\t\tint now = Integer.parseInt( sdf.format(new Date()) );\r\n for ( int i = 0; i < openTime.length; i++ )\r\n\t\t\tif ( now >= openTime[i] && now <= closeTime[i])\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"@Override\n public synchronized boolean hasPeriodPassed(double period) {\n if (get() > period) {\n // Advance the start time by the period.\n // Don't set it to the current time... we want to avoid drift.\n m_startTime += period * 1000;\n return true;\n }\n return false;\n }",
"boolean hasHPPerSecond();",
"@Test\n public void checkDivisibilityByHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByHundred(1600);\n assertTrue(flag);\n }",
"boolean hasSolverTimeLimitSeconds();",
"@Test\n\tpublic void testTOutOfBoundsRightMargin2() {\n\t\ttank.setX(460);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}",
"public boolean isHalfCarry() {\n\t\treturn ((get() >> 5) & 1) == 1;\n\t}",
"private static boolean anomalyCheck(double oldtemperature, double temperature2) {\n\t\tif (Math.abs(oldtemperature-temperature2)>=10)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t\t\n\t}",
"public boolean isFallSemester() {\n return semesterNum % 2 == 1;\n }",
"@Override\n protected boolean isFinished() {\n return Timer.getFPGATimestamp()-startT >= 1.5;\n }",
"public boolean isSpecial2() {\r\n return PaulMath.delta(46 / 360, hsvValues[0]) < 0.075f && PaulMath.delta(0.27f, hsvValues[1]) < 0.075f && PaulMath.delta(0.23f, hsvValues[2]) < 0.075f;\r\n }",
"public boolean tick() {\n/* 55 */ this.affected = true;\n/* 56 */ if (this.round > 0)\n/* 57 */ this.round--; \n/* 58 */ return (this.round == 0);\n/* */ }",
"@Override\n public boolean isMayorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()<this.getValue();\n }",
"private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }",
"private void givenExchangeRatesExistsForEightMonths() {\n }",
"boolean hasErrorTime();",
"public boolean isHighCard() {\r\n\r\n return getHighestConsecutive() == 1;\r\n }",
"int main()\n{\n int p;\n float t;\n cin>>p>>t;\n if(t>13.30)\n if( p <= 13)\n cout<<\"$\"<<2<<\".00\";\n \telse\n cout<<\"$\"<<5<<\".00\";\n else\n if( p <= 13)\n cout<<\"$\"<<4<<\".00\";\n else\n cout<<\"$\"<<8<<\".00\";\n \n}",
"public static Boolean isOverUnder(Integer number, List<BET> bets) {\r\n\t\tBoolean result = Boolean.FALSE;\r\n\t\tif (bets.size() == 2\r\n\t\t\t\t&& (isGameUnderOver(number) || isFirstQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isSecondQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isThirdQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isForthQuarterUnderOver(number)\r\n\t\t\t\t\t\t|| isFirstPartUnderOver(number)\r\n\t\t\t\t\t\t|| isSecondPartUnderOver(number)\r\n\t\t\t\t\t\t|| isThirdPartUnderOver(number) || isFirstFiveInninngsUnderOver(number))) {\r\n\t\t\tresult = Boolean.TRUE;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public boolean isBearish(){\n return (Double.compare(this.open, this.close) > 0) ? true : false;\r\n }",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"private static boolean checkIfYearContinue(Sheet sheet) {\r\n String last = sheet.getCellAt(\"A\" + sheet.getRowCount()).getTextValue(); \r\n return !last.equals(\"end\");\r\n }",
"@Override\n protected boolean isFinished() {\n return Math.abs(m_currentError) <= constants.tolerance;\n }",
"public void checkOverDue() {\n\t\tif (state == loanState.current && //changed 'StAtE' to 'state' and ' lOaN_sTaTe.CURRENT to loanState.current\r\n\t\t\tCalendar.getInstance().getDate().after(date)) { //changed Calendar.gEtInStAnCe to Calender.getInstance and gEt_DaTe to getDate and DaTe to date\r\n\t\t\tthis.state = loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\t\t\t\r\n\t\t} //added curly brackets\r\n\t}",
"public static boolean isValid(double side1, double side2, double side3) {\n\t boolean isValid = side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1 ;\n\t return isValid;\n\t}",
"public boolean greaterEqualP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) >= (yRatio.numerator * x.denominator));\n }\n }\n }",
"public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"public static boolean passed(double a, double t, double b) {\n return ((a <= t && t <= b) || (b <= t && t <= a));\n }",
"@Test\r\n\tpublic void calculQualityAxisWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 3f), new Float(2));\r\n\t}",
"private boolean canTakeBandanaFrom(Unit other) {\n return getCalories() >= (2 * other.getCalories());\n }",
"public boolean isWithinLimit() {\n return assumptionsFailed.get() < assumptionLimit;\n }",
"public boolean canTrade()\n\t{\n\t\treturn System.currentTimeMillis() - m_lastTrade > 60 * 1000 && getPartyCount() >= 2;\n\t}",
"public boolean Window(String inDate , String inDate2)\n {\n LocalDateTime currentTime = LocalDateTime.now();\n // current date value to compare with margins\n int monthValue = currentTime.getMonthValue();\n int dayOfMonth = currentTime.getDayOfMonth();\n int currentTimeYear = currentTime.getYear(); // obvioulsy in our case this will be 2021 but fo the sake of scalability we used getter\n\n // split in String to create margin 1\n String[] rawTime = inDate.split(\"/\");\n // split in String to create margin 2\n String[] rawClosedTime = inDate2.split(\"/\");\n\n //margin 1\n int inDateMonth = Integer.parseInt(rawTime[0]);\n int inDateDay = Integer.parseInt(rawTime[1]);\n int inDateYear = Integer.parseInt(rawTime[2]);\n // margin 2\n int inDate2Month = Integer.parseInt(rawClosedTime[0]);\n int inDate2Day = Integer.parseInt(rawClosedTime[1]);\n int inDate2Year = Integer.parseInt(rawClosedTime[2]);\n\n // checking if months are value equivalent , if so checking which day is later\n if((inDateMonth == monthValue && inDateDay <= dayOfMonth) || (inDateMonth < monthValue))\n {\n // // checking if months are value equivalent , if so checking which day is earlier\n if( (monthValue == inDate2Month && inDate2Day >= dayOfMonth) || (monthValue > inDate2Month) )\n {\n return true;\n }else{\n\n return false;\n\n }\n\n }\n return false;\n\n }"
] | [
"0.65507203",
"0.651186",
"0.629112",
"0.613687",
"0.5845177",
"0.583114",
"0.54809386",
"0.52487874",
"0.52115154",
"0.5197601",
"0.51934266",
"0.518499",
"0.5181273",
"0.51264554",
"0.5123962",
"0.5119809",
"0.51001513",
"0.5095522",
"0.5088022",
"0.50794756",
"0.50582343",
"0.5041415",
"0.5038467",
"0.50311446",
"0.50052863",
"0.5002438",
"0.49979067",
"0.49954772",
"0.49870774",
"0.4979358",
"0.49764207",
"0.49750593",
"0.49734294",
"0.49728718",
"0.49720556",
"0.49717084",
"0.4964456",
"0.49584457",
"0.49570578",
"0.4950442",
"0.4947638",
"0.4947027",
"0.49350047",
"0.4924277",
"0.4915719",
"0.4912938",
"0.48971432",
"0.48963904",
"0.48955747",
"0.48945022",
"0.48903394",
"0.48902544",
"0.48872077",
"0.4865147",
"0.4855934",
"0.483307",
"0.48280674",
"0.4824711",
"0.48167524",
"0.48086318",
"0.48048657",
"0.47928944",
"0.4786026",
"0.47859526",
"0.47852498",
"0.4783414",
"0.47783014",
"0.4775666",
"0.4773638",
"0.47715545",
"0.47670257",
"0.47655773",
"0.47635034",
"0.47607243",
"0.4755017",
"0.47520185",
"0.4751754",
"0.4745982",
"0.4742418",
"0.4738921",
"0.47328967",
"0.472984",
"0.47294953",
"0.47253972",
"0.47249937",
"0.47161114",
"0.47155064",
"0.47146797",
"0.47113255",
"0.47113255",
"0.47113255",
"0.47113255",
"0.47113255",
"0.47113255",
"0.47109666",
"0.47043785",
"0.4700483",
"0.46991006",
"0.46987996",
"0.4697059"
] | 0.69525313 | 0 |
Checks if is third part time under over. | public static Boolean isThirdPartUnderOver(Integer integer) {
return thirdPartUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasDesiredTime();",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"private boolean isTimeOverlap(Item t) {\n\t\treturn t.getEndDate().equals(event.getEndDate());\n\t}",
"boolean hasErrorTime();",
"boolean hasTime();",
"boolean hasTime();",
"public static Boolean isThirdQuarterUnderOver(Integer integer) {\r\n\t\treturn thirdQuarterUnderOver.contains(integer);\r\n\t}",
"boolean hasExchangeTime();",
"public boolean isThreeFoldRepetition() {\n int repeatNum = 0;\n\n for (Board position : game.getPositionList()) {\n if (game.getCurrentPosition().equals(position)) {\n repeatNum++;\n }\n }\n\n return repeatNum >= 3;\n }",
"public boolean method_1954(long var1, TimeUnit var3) {\n long var4;\n if ((var4 = var3.convert(System.nanoTime() - this.field_1249, TimeUnit.NANOSECONDS)) >= var1) {\n this.method_1949();\n }\n\n return var4 >= var1;\n }",
"public boolean checkTime(Calendar from,Calendar to,Calendar time)\n {\n if(time.after(from) && time.before(to))\n {\n return true;\n }\n return false;\n }",
"public boolean isDifficult()\n {\n int count = 0;\n for (int i = 1; i < markers.length; i++) {\n if (Math.abs(markers[i] - markers[i-1]) >= 30){\n count++;\n }\n }\n return (count >= 3);\n }",
"public boolean isThreeOfAKind() {\r\n\r\n return getHighestConsecutive() == 3;\r\n }",
"public boolean hasDesiredTime() {\n return desiredTime_ != null;\n }",
"private boolean timeSlotConflict(Course course, Lab lab)\n\t{\n\t\tboolean passed = true;\n\t\tTimeSlot cSlot = course.getSlot(), lSlot = lab.getSlot();\n\t\t\n\t\t//Obviously there is no conflict if they course + lab didn't have a time slot assigned\n\t\tif(cSlot != null && lSlot != null)\n\t\t{\n\t\t\t//If a course and lab are on the same day, or course is monday and lab is friday\n\t\t\tif(cSlot.getDay() == lSlot.getDay() || (cSlot.getDay()==ScheduleDay.MO && lSlot.getDay()==ScheduleDay.FR))\n\t\t\t{\n\t\t\t\t//If it's a Tuesday\n\t\t\t\tif(cSlot.getDay() == ScheduleDay.TU)\n\t\t\t\t{\n\t\t\t\t\t//If they have the same start they are a conflict\n\t\t\t\t\t//Lectures are 1.5 hours and labs are 1 hour. \n\t\t\t\t\t//If a lecture starts 30 min after a lab, it's a conflict\n\t\t\t\t\t//If a lecture starts 30 min before (-70 becuase thats how we coded it for ints)\n\t\t\t\t\t// then it is a conflict\n\t\t\t\t\t//NOTE: I need to do more testing, but everything i tired is working so far\n\t\t\t\t\tif(cSlot.getStartTime() == lSlot.getStartTime())\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()+30))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()-70))\n\t\t\t\t\t\tpassed = false; \n\t\t\t\t\telse if (cSlot.getStartTime() == (lSlot.getStartTime() -100))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\t//THIS IS WHERE WE NEED FIXING \n\t\t\t\t}\n\t\t\t\telse if(cSlot.getDay() == ScheduleDay.MO && lSlot.getDay() == ScheduleDay.FR)\n\t\t\t\t{\n\t\t\t\t\tif(cSlot.getStartTime() == lSlot.getStartTime())\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\telse if(cSlot.getStartTime() == (lSlot.getStartTime()+100))\n\t\t\t\t\t\tpassed = false;\n\t\t\t\t\t//else if(sC.getStartTime() == (sL.getStartTime()-100))\n\t\t\t\t\t\t//conflict = true; \n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t//If they are equaal, there is a time conflict\n\t\t\t\t\tpassed = !(cSlot.getStartTime() == lSlot.getStartTime());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tpassed = true; //If they don't have the same day, they are obviously not in conflict\n\t\t}\n\t\treturn passed;\n\t}",
"private boolean validateArrivingTime(StopPoint currentSP) {\n\t\ttry {\n\t\t\tint time = Integer.valueOf(hourComboBox.getValue()) * 60;\n\t\t\ttime += Integer.valueOf(minuteComboBox.getValue());\n\t\t\ttime += timeIndicatorComboBox.getValue().equals(\"PM\") ? 12 * 60 : 0;\n\t\t\tfor (StopPoint stopPoint : stopPoints) {\n\t\t\t\tif (stopPoint.getTime() != null && !stopPoint.getTime().equals(\"\") && stopPoint != currentSP) {\n\t\t\t\t\tString[] spTimeString = stopPoint.getTime().split(\"[ :]+\");\n\t\t\t\t\tint spTime = Integer.valueOf(spTimeString[0]) * 60;\n\t\t\t\t\tspTime += Integer.valueOf(spTimeString[1]);\n\t\t\t\t\tspTime += spTimeString[2].equals(\"PM\") ? 12 * 60 : 0;\n\n\t\t\t\t\tif (time <= spTime + 5 && time >= spTime - 5) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isDuringTime() {\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HHmm\");\r\n\t\tint now = Integer.parseInt( sdf.format(new Date()) );\r\n for ( int i = 0; i < openTime.length; i++ )\r\n\t\t\tif ( now >= openTime[i] && now <= closeTime[i])\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"private boolean cond3(Data C) {\n return (C.getBottom() > this.yT);\n }",
"public void setInTime3(String inTime3) {\n\tthis.inTime3 = inTime3;\n }",
"public boolean isNightTime() {\n\t\tint hour24 = this.total % 24;\n\t\tif (hour24 < 7 || hour24 > 18) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean isPickupTimeValid(int hour, int minute){\n Calendar currentTime = Calendar.getInstance();\n int c_hour = currentTime.get(Calendar.HOUR_OF_DAY);\n int c_minute = currentTime.get(Calendar.MINUTE);\n\n //Given time in minutes\n int g_mins = hour*60 + minute;\n\n //Current time in minutes\n int c_mins = c_hour*60 + c_minute;\n\n if(g_mins-c_mins<30){\n return false;\n }\n\n return true;\n }",
"public boolean isBefore(Time time) {\n\tboolean check = true;\n\t\tif(this.getHour() > time.getHour()) {\n\t\t\tcheck = false;\n\t\t} else if((this.getHour() == time.getHour()) && (this.getMinutes() > time.getMinutes())){\n\t\t\tcheck = false;\n\t\t}\n\t\treturn check;\n\t}",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"public static boolean isRemoteOnOrAfterTimeValid(long onOrAfter, long now) {\n return onOrAfter + CLOCK_SKEW_TIME > now;\n }",
"boolean isClockFailure();",
"@Override\n public boolean isMenorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()>this.getValue(); \n }",
"public static boolean hasTime(String time) {\n String[] components = time.split(\" \");\n return components.length == 2;\n }",
"public boolean checkTime() {\n boolean result = false;\n long currentTime = System.currentTimeMillis();\n while (currentTime == timeFlag + 1000) {\n this.timeFlag = currentTime;\n result = true;\n return result;\n }\n return result;\n }",
"private boolean checkTime(int hour, int minutes) {\n\tboolean check = true;\n\t\tif((hour < 0) || (hour > 23) || (minutes < 0) || (minutes > 59)) {\n\t\t\tcheck = false;\n\t\t}\n\t\telse {\n\t\t\tcheck = true;\n\t\t}\n\treturn check;\n\t}",
"private Boolean TimeInRange(String time){\n \n String[] t = time.split(\":\");\n \n int hours = Integer.parseInt(t[0]);\n int minutes = Integer.parseInt(t[1]);\n int seconds = Integer.parseInt(t[2]);\n \n if(hours == 11 && minutes == 59 && (seconds >= 55)){\n return true;\n }\n \n return false;\n \n }",
"private boolean checkConflict(Course c1, Course c2) {\n\n\t\tString day1 = c1.getDay1();\n\t\tString day2 = c1.getDay2();\n\t\tString cday1 = c2.getDay1();\n\t\tString cday2 = c2.getDay2();\n\n\t\tfloat startTime = Float.parseFloat(c1.getStarttime());\n\t\tfloat endTime = Float.parseFloat(c1.getEndtime());\n\t\tfloat cstartTime = Float.parseFloat(c2.getStarttime());\n\t\tfloat cendTime = Float.parseFloat(c2.getEndtime());\n\t\t\n\t\tif(day1.equals(cday1) || day1.equals(cday2) || day2.equals(cday2)) {\n\t\t\tif(startTime < cstartTime && endTime < cstartTime) {\n\t\t\t\treturn false;\n\t\t\t} else if(startTime > cstartTime && startTime > cendTime) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean hasDesiredTime() {\n return desiredTimeBuilder_ != null || desiredTime_ != null;\n }",
"@Override\n public boolean isMayorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()<this.getValue();\n }",
"private boolean isClashing() {\n\t\tArrayList<Item> events = getEvents();\n\t\tfor (Item t : events) {\n\t\t\tif (isTimeOverlap(t)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean isTieGame3() {\n\t\treturn (spacesLeft == 3 && board[1][0] == ' ' && board[1][1] == ' '\n\t\t\t\t&& board[1][2] == ' ' && board[0][0] == 'X'\n\t\t\t\t&& board[0][2] == 'X' && board[2][1] == 'X')\n\t\t\t\t|| (spacesLeft == 3 && board[1][0] == ' ' && board[1][1] == ' '\n\t\t\t\t\t\t&& board[1][2] == ' ' && board[2][0] == 'X'\n\t\t\t\t\t\t&& board[0][1] == 'X' && board[2][2] == 'X')\n\t\t\t\t|| (spacesLeft == 3 && board[0][1] == ' ' && board[1][1] == ' '\n\t\t\t\t\t\t&& board[2][1] == ' ' && board[0][0] == 'X'\n\t\t\t\t\t\t&& board[2][0] == 'X' && board[1][2] == 'X')\n\t\t\t\t|| (spacesLeft == 3 && board[0][1] == ' ' && board[1][1] == ' '\n\t\t\t\t\t\t&& board[2][1] == ' ' && board[0][2] == 'X'\n\t\t\t\t\t\t&& board[1][0] == 'X' && board[2][2] == 'X');\n\n\t}",
"private boolean isMiddle(int middle, int time1, int time2) {\n int[] distanceFromTime1 = leftRightDistance(middle, time1);\n int[] distanceFromTime2 = leftRightDistance(middle, time2);\n return Arrays.equals(distanceFromTime1, distanceFromTime2);\n }",
"public boolean parrotTrouble(boolean talking, int hour) {\n return (talking && (hour < 7 || hour > 20));\n}",
"public static boolean timecomparison(String ftime, String stime) {\n\t\t\r\n\t\tint fYear = Integer.parseInt(ftime.substring(0,4));\r\n\t\tint sYear = Integer.parseInt(stime.substring(0,4));\r\n\t\t\r\n\t\tint fMonth = Integer.parseInt(ftime.substring(5,7));\r\n\t\tint sMonth = Integer.parseInt(stime.substring(5,7));\r\n\t\t\r\n\t\tint fDay = Integer.parseInt(ftime.substring(8,10));\r\n\t\tint sDay = Integer.parseInt(stime.substring(8,10));\r\n\t\t\r\n\t\tint fHour = Integer.parseInt(ftime.substring(11,13));\r\n\t\tint sHour = Integer.parseInt(stime.substring(11,13));\r\n\t\t\r\n\t\tint fMin = Integer.parseInt(ftime.substring(14,16));\r\n\t\tint sMin = Integer.parseInt(stime.substring(14,16));\r\n\t\t\r\n\t\tint fSec = Integer.parseInt(ftime.substring(17,19));\r\n\t\tint sSec = Integer.parseInt(stime.substring(17,19));\r\n\t\t\r\n\t\tdouble difference = (fYear-sYear)*262800*60 + (fMonth-sMonth)*720*60 + (fDay-sDay)*24*60+ (fHour-sHour)*60 + ((fMin-sMin));\r\n\t\t\r\n\t\t//might need to change the = depending on the order of checks\r\n\t\tif(difference <= 0) {\r\n\t\t\treturn true; \r\n\t\t}\r\n\t\telse return false; \r\n\t}",
"public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }",
"boolean hasTimeRecord();",
"public boolean withinMargin(double time,double margin ){\r\n\t\treturn MathUtil.abs(time-this.time)<=margin;\r\n\t}",
"boolean hasTimeBoltHBoltE();",
"@Test\n\tvoid testCheckDuration3() {\n\t\tassertFalse(DataChecker.checkDuration(Duration.ZERO));\n\t}",
"boolean hasTimeBoltBBoltC();",
"public void testSingleTimeBeforeRules() {\n ZoneId zone = ZoneId.of(\"America/New_York\");\n long time = time(\"1980-01-01\", zone);\n assertThat(Instant.ofEpochMilli(time), lessThan(lastTransitionIn(zone).getInstant()));\n assertRoundingAtOffset(LocalTimeOffset.lookup(zone, time, time).lookup(time), time, hours(-5));\n }",
"boolean hasUseTime();",
"boolean hasUseTime();",
"public boolean IsPackmanReachedFruit(double time, double timeTotal)\n\t{\n\t\tif(time<timeTotal) \n\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t\telse\n\t\t\t\treturn true;\n\t}",
"public boolean isGameOver() {\r\n if(timesAvoid == 3) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"private boolean hfun(Time currentTime,POI last,POI poi,Plan mPlan,boolean skip){\n Time arriveAt=new Time(currentTime.hour,currentTime.min);\n if(last!=null){\n if(arriveAt.add(last.getShortestPath(poi.getId()))){\n if(poi.getOpenTime().compare(arriveAt)||skip){\n return true;\n }\n }\n }\n else{\n \n if(mPlan!=null){\n POI mLast = mPlan.getLastPOI();\n if(mLast!=null)\n arriveAt.add(mPlan.getLastPOI().getShortestPath(poi.getId()));\n }\n if(poi.getOpenTime().compare(arriveAt)||skip){\n return true;\n }\n }\n return false;\n }",
"private boolean inTimeScope(Expression expr, long time) {\n\n String time_start = expr.getTime_start();\n String time_end = expr.getTime_end();\n String day_start = expr.getDay_start();\n String day_end = expr.getDay_end();\n\n if (!StringHelper.isEmpty(day_start) && !StringHelper.isEmpty(day_end)) {\n\n long startTime = DateTimeHelper.dateFormat(day_start, \"yyyy-MM-dd\").getTime();\n long endTime = DateTimeHelper.dateFormat(day_end, \"yyyy-MM-dd\").getTime();\n\n if (time < startTime || time >= endTime + 24 * 3600 * 1000) {\n return false;\n }\n }\n\n if (!StringHelper.isEmpty(time_start) && !StringHelper.isEmpty(time_end)) {\n\n long startTime = DateTimeHelper\n .dateFormat(DateTimeHelper.getToday(\"yyyy-MM-dd\") + \" \" + time_start, \"yyyy-MM-dd HH:mm\").getTime();\n long endTime = DateTimeHelper\n .dateFormat(DateTimeHelper.getToday(\"yyyy-MM-dd\") + \" \" + time_end, \"yyyy-MM-dd HH:mm\").getTime();\n\n if (time < startTime || time >= endTime) {\n return false;\n }\n }\n\n int weekday = DateTimeHelper.getWeekday(new Date(time));\n \n if(expr.getWeekdayLimit()!=null&&!expr.getWeekdayLimit()[weekday]) {\n return false;\n }\n \n return true;\n }",
"private boolean canInsertLast(Plan plan,POI poi,Trip trip,Time currentTime,Plan mPlan,boolean skip){\n // if poi cost and time addtion to plan full cost and time satisify the constrains: \n // 1- full cost <= budget\n // 2- fulltime-poiTime >=poi.startTime if skip is false only\n // 3- fulltime <= trip.endTime\n // 4- fulltime <= poi.colseTime\n // insert and make Calculations and change last\n\n // Check 1\n if((plan.getFullCost()+poi.getCost())<=trip.getBudget()){\n // Check 2\n POI last=plan.getLastPOI();\n \n if(hfun(currentTime, last, poi, mPlan, skip)){\n // Check3\n // cal poi duration\n int fullduration=poi.getDuration();\n //cal waste time\n if(skip){\n Time currTime = new Time(currentTime.hour,currentTime.min);\n if(last!=null)\n currTime.add(last.getShortestPath(poi.getId()));\n else if(mPlan!=null&&mPlan.getLastPOI()!=null)\n currTime.add(mPlan.getLastPOI().getShortestPath(poi.getId()));\n int x = Time.substract(currTime, poi.getOpenTime());\n fullduration+=(x==-1)?0:x;\n }\n //cal travel time\n if(last!=null)\n fullduration+=last.getShortestPath(poi.getId());\n else if(mPlan!=null){\n POI mLast=mPlan.getLastPOI();\n if(mLast!=null)\n fullduration+= mLast.getShortestPath(poi.getId());\n }\n if(Time.isIn(currentTime, fullduration, trip.getEndTime())){\n // Check4\n if(Time.isIn(currentTime, fullduration, poi.getCloseTime())){\n return true;\n }\n }\n }\n }\n return false;\n }",
"if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }",
"boolean hasWeek3();",
"private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }",
"public boolean CheckTimeInLevel(){\n \n Long comparetime = ((System.nanoTime() - StartTimeInLevel)/1000000000);\n \n return (comparetime>TILData.critpoints.get((int)speed));\n // stop tetris because this subject is an outlier for this level\n \n \n }",
"public boolean hasWeek3() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean timeExists(int time) {\n Node currentNode = first;\n while(currentNode != null) {\n if(time == currentNode.getData().getIntegerTime())\n return true;\n currentNode = currentNode.getNextNode();\n }\n return false;\n }",
"private static boolean checkBy3 (int a) {\n return a % 3 == 0;\n }",
"boolean hasSolverTimeLimitSeconds();",
"public void timePasses(){\n crtClock++;\n if(crtClock==25)crtClock=1; // If end of day, reset to 1\n if(crtClock<=opHours)tellMeterToConsumeUnits(unitsPerHr);\n }",
"private static void checkLastSampleTime() {\n double lastSampleTime = ((Double)state.get( \"lastSampleTime\" )).doubleValue();\n Double cTime = (Double)state.get( \"currentTime\" );\n double currentTime = cTime.doubleValue(); // just in case this is a ref\n\n if( lastSampleTime <= currentTime ){\n validity = false;\n out.println( \"<BR>Error: Last Sample Time is less than current time<BR>\" ); \n }\n }",
"public String getInTime3() {\n\treturn inTime3;\n }",
"private boolean overlaps(ThingTimeTriple a, ThingTimeTriple b)\r\n/* 227: */ {\r\n/* 228:189 */ return (a.from < b.to) && (a.to > b.from);\r\n/* 229: */ }",
"private boolean thirdMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[3][0] == 13)\n )\n return true;\n else\n return false;\n }",
"public boolean hasWeek3() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean isTimeContextDependent() {\r\n\t\treturn (_numberOfIntervals[MONTH_INTERVAL] != 0\r\n\t\t\t\t|| _numberOfIntervals[YEAR_INTERVAL] != 0\r\n\t\t\t\t|| _numberOfIntervals[DECADE_INTERVAL] != 0 || _numberOfIntervals[CENTURY_INTERVAL] != 0);\r\n\t}",
"public void checkAddTrackDay() {\n int hour = this.timeTrankiManager.getHour();\n int minute = this.timeTrankiManager.getMinute();\n\n if (hour == 9 && minute == 00) {\n this.trackListFinal.addTrackDay(1);\n }\n }",
"public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }",
"private boolean checkTuesdayEleven(Schedule sched)\n\t{\n\t\t//Looks at all the course's timeslots and checks time start time and day\n\t\tfor(int i = 0; i<sched.getCourses().size();i++)\n\t\t{\n\t\t\tif(sched.getCourses().get(i).getSlot() != null)\n\t\t\t{\n\t\t\t\tif((sched.getCourses().get(i).getSlot().getDay() == ScheduleDay.TU) && \n\t\t\t\t\t\t(sched.getCourses().get(i).getSlot().getStartTime() == 1100))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If we made it here, we found no conflict. Check passes \n\t\treturn true;\n\t}",
"private boolean timeValidation(String time){\n if(! time.matches(\"(?:[0-1][0-9]|2[0-4]):[0-5]\\\\d\")){\n return false;\n }\n return true;\n }",
"private boolean checkIfTransferHasBeenLongerThanAWeek(String lastTimeStamp, String currentTimeStamp) {\n // should be in same format now\n\n String[] previousDate = getDateFormatToCompare(lastTimeStamp);\n String[] currentDate = getDateFormatToCompare(currentTimeStamp);\n\n //2020-01-01T12:34:56.000Z\n //2020-01-07T13:14:52.777Z\n\n LOGGER.debug(\"Check for over week since last transfer default false\");\n return false;\n }",
"private static boolean isTimeCancelable(ClientReservedTime clientReservedTime) {\n\t\t//Reserved time can be canceled until 1 hour before time is reached\n\t\ttry {\n\t\t\treturn clientReservedTime\n .getGregorianDateTime()\n .minusHours(ConfigurationParameter.couldBeCanceledPeriod)\n .isAfter(LocalDateTime.now());\n\t\t}catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean isValidQuiz3(double quiz3)\n\t{\n\t\treturn quiz3 >= 0 && quiz3 <= 10;\n\t}",
"private boolean isSurpass(State lastTime, State nowTime) {\n boolean result;\n String last;\n String now;\n try {\n last = ShortcutUtil.refFormatOnlyDate(Long.valueOf(lastTime.getTime_point()));\n now = ShortcutUtil.refFormatOnlyDate(Long.valueOf(nowTime.getTime_point()));\n }catch (Exception e){\n e.printStackTrace();\n return false;\n }\n result = !last.equals(now);\n return result;\n }",
"public boolean timeValidated(Event e) {\n\t\tLocalDate date = e.sDate;\n\t\tLocalTime stime = e.sTime;\n\t\tLocalTime etime = e.eTime;\n\t\tArrayList<Event> list = new ArrayList<Event>();\n\t\tif(map.containsKey(date)) {\n\t\t\tlist = map.get(date);\n\n\t\t\tfor(int i = 0; i<list.size(); i++) {\n\t\t\t\tEvent evnt = list.get(i);\n\n\t\t\t\tif(e.sTime.equals(evnt.sTime) || e.eTime.equals(evnt.eTime)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//check for start times\n\t\t\t\tif(e.sTime.isBefore(evnt.sTime)) {\n\t\t\t\t\tif(!e.eTime.isBefore(evnt.sTime)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//check for end time\n\t\t\t\tif(e.sTime.isAfter(evnt.sTime)) {\n\t\t\t\t\tif(!e.sTime.isAfter(evnt.eTime)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}",
"private void check3(){\n \n if (errorCode == 0){\n \n if (firstDigit * fifthDigit * ninthDigit != 24){\n valid = false;\n errorCode = 3;\n }\n }\n\t}",
"boolean hasCurrentStateTime();",
"boolean hasEndTime();",
"private boolean checkValidHour() {\n return numHours >= 0 && numHours <= 23;\n }",
"boolean addHardTimePlayed(long time);",
"private boolean adjustedTimeIsSet() {\n return (adjustedTimeStamp != null);\n }",
"public static boolean isReservationTimeValid(int hour, int minute){\n Calendar currentTime = Calendar.getInstance();\n int c_hour = currentTime.get(Calendar.HOUR_OF_DAY);\n int c_minute = currentTime.get(Calendar.MINUTE);\n\n //Given time in minutes\n int g_mins = hour*60 + minute;\n\n //Current time in minutes\n int c_mins = c_hour*60 + c_minute;\n\n if(g_mins-c_mins<180){\n return false;\n }\n\n return true;\n }",
"public boolean thirtyoneDays() {\n String[] months = new String[]{\"January\", \"March\", \"May\", \"July\", \"August\", \"October\", \"December\"};\n for (String m : months) {\n if (m.equals(this.month)) {\n return true;\n }\n }\n return false;\n }",
"public boolean not3TimesHigher() {\n\t\tArrayList<Double> temp=averageSalaries();\n\t\tfor(int i=0;i<temp.size();i++) {\n\t\t\tdouble selectOne= temp.get(i);//choose the select employee\n\t\t\ttemp.remove(i);//remove the select one's salary\n\t\t\tdouble[] otherEmployees=new double[temp.size()];\n\t\t\tfor(int j=0;j<otherEmployees.length;j++) {\n\t\t\t\totherEmployees[j]=temp.get(j);\n\t\t\t}\n\t\t\ttemp.add(i,selectOne);//add the salary whose selected last time.\n\t\t\ttry{\n\t\t\t\tif(selectOne>(average(otherEmployees)*3)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}catch(IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(\"There is something wrong with input\");\n\t\t\t}\n\t\t}\n\t return true;\n\t}",
"public void setOutTime3(String outTime3) {\n\tthis.outTime3 = outTime3;\n }",
"private boolean checkTime(ActiveTimeSpans active, TimeSpan span, Object constraintKey)\n {\n if (span.isTimeless())\n {\n return true;\n }\n else if (constraintKey == null)\n {\n final AnimationPlan animationPlan = myAnimationPlan;\n final AnimationState currentAnimationState = myCurrentAnimationState;\n if (animationPlan == null || currentAnimationState == null)\n {\n return active != null && active.getPrimary().intersects(span);\n }\n final AnimationState state = animationPlan.findState(span, currentAnimationState.getDirection());\n if (state == null)\n {\n return false;\n }\n boolean result = false;\n try\n {\n result = animationPlan.calculateDistance(currentAnimationState, state) == 0;\n }\n catch (final RuntimeException e)\n {\n // If this test fails just fail the in range test as\n // this always happens during a plan change where the\n // distributor has yet to receive the updated plan and\n // ends up in a race condition with the animation\n // manager adjusting to the new plan.\n result = false;\n }\n return result;\n }\n else\n {\n final Collection<? extends TimeSpan> secondary = active == null ? null : active.getSecondary().get(constraintKey);\n boolean overlaps = false;\n if (secondary != null)\n {\n for (final TimeSpan ts : secondary)\n {\n if (ts.overlaps(span))\n {\n overlaps = true;\n break;\n }\n }\n }\n return overlaps;\n }\n }",
"public boolean isNight() {\r\n return hours < 6 || hours >= 20;\r\n }",
"public boolean isMultipleQuarterHour() {\n\n if (this.startTimeArray == null || this.endTimeArray == null) {\n return true;\n }\n long minutes = Duration.between(LocalTime.parse(this.startTimeString), LocalTime.parse(this.endTimeString)).toMinutes();\n\n if (minutes % 15 == 0 && minutes > 15) {\n\n return true;\n\n }\n\n return false;\n\n }",
"boolean hasSubmitTime();",
"boolean hasTimeSpoutBoltF();",
"private static boolean isMonitoringTimeOver(Properties configuration) {\r\n String monitoringStartTime = configuration.getProperty(Constants.PROPERTY_MONITORING_START_TIME);\r\n if (monitoringStartTime == null) {\r\n return false;\r\n }\r\n DateTimeZone.setDefault(DateTimeZone.UTC);\r\n \r\n DateTime startTime = new DateTime(monitoringStartTime);\r\n String monitoringDuration = configuration.getProperty(Constants.PROPERTY_TIME_MONITORING_DURATION);\r\n \r\n int monitoringDurationMinutes = Integer.parseInt(monitoringDuration);\r\n DateTime endTime = startTime.plusMinutes(monitoringDurationMinutes);\r\n \r\n return endTime.isBeforeNow();\r\n }",
"public static boolean validoA3(X509Certificate certificate) throws NfeException {\r\n\r\n\t\tif (certificate.getNotAfter() != null && certificate.getNotAfter().after(new Date())) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"boolean hasStartTime();",
"public boolean isNowTime_in_period(){\r\n if (isTimeWith_in_Interval((LocalTime.now()).format(formatter),openTime,closeTime)) {\r\n // System.out.println(\"hi this works\");\r\n return true;\r\n } else {\r\n \r\n return false;\r\n }\r\n }",
"public static final boolean betweenTimes(Calendar tA, Calendar tB, Calendar tC) {\n return (tB.compareTo(tA) > 0)&&(tB.compareTo(tC) < 0);\n }",
"public boolean contains(long time) {\n\t\treturn ((start <= time) && (time <= end));\n\t}",
"private static boolean anomalyCheck(double oldtemperature, double temperature2) {\n\t\tif (Math.abs(oldtemperature-temperature2)>=10)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t\t\n\t}",
"public static boolean validateTime(String validTill) {\n\t\treturn true;\n\t}",
"public static boolean inRange(long quakeTime) throws Exception {\n SimpleDateFormat dayFormatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n String quakeDay = dayFormatter.format(new Date(quakeTime));\n String currentDay = dayFormatter.format(new Date());\n return (quakeDay.equals(currentDay));\n }"
] | [
"0.6747914",
"0.6213525",
"0.6130108",
"0.61102766",
"0.60954064",
"0.60954064",
"0.59819454",
"0.5978082",
"0.5924475",
"0.59169686",
"0.5904656",
"0.5892151",
"0.5865332",
"0.58528",
"0.58462095",
"0.5825393",
"0.5820016",
"0.5806768",
"0.57905895",
"0.57767814",
"0.577036",
"0.5764702",
"0.5763075",
"0.5740724",
"0.5715717",
"0.5706291",
"0.5695533",
"0.5689213",
"0.56760365",
"0.5658758",
"0.5630105",
"0.5627486",
"0.5567429",
"0.55556065",
"0.5541468",
"0.55414367",
"0.55299544",
"0.5507766",
"0.5505629",
"0.5505185",
"0.55030996",
"0.5495865",
"0.5483998",
"0.54826236",
"0.5477091",
"0.5464788",
"0.5464788",
"0.5464082",
"0.5429028",
"0.54268926",
"0.5423971",
"0.5421254",
"0.5418929",
"0.54185987",
"0.54168403",
"0.5416436",
"0.540948",
"0.54049176",
"0.5400428",
"0.53953457",
"0.5392754",
"0.539132",
"0.53861827",
"0.5376863",
"0.53756845",
"0.53747994",
"0.53745127",
"0.53702915",
"0.5365938",
"0.5365427",
"0.536215",
"0.53599036",
"0.5352066",
"0.53471476",
"0.53469515",
"0.53270996",
"0.53257805",
"0.5323338",
"0.531898",
"0.5318079",
"0.53085256",
"0.5303506",
"0.5290742",
"0.5280894",
"0.5278734",
"0.5277851",
"0.5263069",
"0.5258481",
"0.5253386",
"0.52472633",
"0.52423954",
"0.52342266",
"0.52307725",
"0.52298415",
"0.52197295",
"0.52178806",
"0.5208693",
"0.52054435",
"0.5203598",
"0.5198936"
] | 0.55943054 | 32 |
Checks if is third quarter under over. | public static Boolean isThirdQuarterUnderOver(Integer integer) {
return thirdQuarterUnderOver.contains(integer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isValidQuiz3(double quiz3)\n\t{\n\t\treturn quiz3 >= 0 && quiz3 <= 10;\n\t}",
"public static Boolean isForthQuarterUnderOver(Integer integer) {\r\n\t\treturn forthQuarterUnderOver.contains(integer);\r\n\t}",
"public static Boolean isFirstQuarterUnderOver(Integer integer) {\r\n\t\treturn firstQuarterUnderOver.contains(integer);\r\n\t}",
"public boolean not3TimesHigher() {\n\t\tArrayList<Double> temp=averageSalaries();\n\t\tfor(int i=0;i<temp.size();i++) {\n\t\t\tdouble selectOne= temp.get(i);//choose the select employee\n\t\t\ttemp.remove(i);//remove the select one's salary\n\t\t\tdouble[] otherEmployees=new double[temp.size()];\n\t\t\tfor(int j=0;j<otherEmployees.length;j++) {\n\t\t\t\totherEmployees[j]=temp.get(j);\n\t\t\t}\n\t\t\ttemp.add(i,selectOne);//add the salary whose selected last time.\n\t\t\ttry{\n\t\t\t\tif(selectOne>(average(otherEmployees)*3)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}catch(IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(\"There is something wrong with input\");\n\t\t\t}\n\t\t}\n\t return true;\n\t}",
"public boolean isThreeOfAKind() {\r\n\r\n return getHighestConsecutive() == 3;\r\n }",
"public static Boolean isSecondQuarterUnderOver(Integer integer) {\r\n\t\treturn secondQuarterUnderOver.contains(integer);\r\n\t}",
"private boolean cond3(Data C) {\n return (C.getBottom() > this.yT);\n }",
"private static boolean checkBy3 (int a) {\n return a % 3 == 0;\n }",
"public void testQUARTER3() throws Exception {\n\t\tObject retval = execLexer(\"QUARTER\", 94, \"quarter\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"QUARTER\", expecting, actual);\n\t}",
"public boolean isThreeFoldRepetition() {\n int repeatNum = 0;\n\n for (Board position : game.getPositionList()) {\n if (game.getCurrentPosition().equals(position)) {\n repeatNum++;\n }\n }\n\n return repeatNum >= 3;\n }",
"public boolean isMultipleQuarterHour() {\n\n if (this.startTimeArray == null || this.endTimeArray == null) {\n return true;\n }\n long minutes = Duration.between(LocalTime.parse(this.startTimeString), LocalTime.parse(this.endTimeString)).toMinutes();\n\n if (minutes % 15 == 0 && minutes > 15) {\n\n return true;\n\n }\n\n return false;\n\n }",
"public boolean hasThreeSides() { return hasNMarkedSides(3); }",
"public static Boolean isThirdPartUnderOver(Integer integer) {\r\n\t\treturn thirdPartUnderOver.contains(integer);\r\n\t}",
"@Override\n\tpublic void endOfQuarter(int quarter) {\n\t\t\n\t}",
"private boolean checkQuads(Player player) {\n\t\tint j;\n\t\tfor (j = 0; j <= 3; j++) {\n\t\t\tif (player.getSevenCardsTempHand().get(j).getRank()\n\t\t\t\t\t.equals(player.getSevenCardsTempHand().get(j + 3).getRank())) {\n\t\t\t\tplayer.setQuads(true);\n\t\t\t\tplayer.setHandRank(HandRank.QUADS);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!player.isQuads())\n\t\t\treturn false;\n\t\t\n\t\t// init 5 cards hand\n\t\tfor(int i = 0; i < hand.length; i++) {\n\t\t\thand[i] = player.getSevenCardsTempHand().get(j);\n\t\t\tplayer.getSevenCardsTempHand().remove(j);\n\t\t}\n\t\t\n\t\t// add kicker\n\t\thand[4] = player.getSevenCardsTempHand().get(2);\n\n\t\tplayer.setFiveCardsHand(hand);\n\t\treturn true;\n\t}",
"private boolean between(int x1, int x2, int x3) {\n return (x1 >= x3 && x1 <= x2) || (x1 <= x3 && x1 >= x2);\n }",
"public static boolean isValid(double side1, double side2, double side3) {\n\t boolean isValid = side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1 ;\n\t return isValid;\n\t}",
"boolean canFormTriangle(double a, double b, double c) {\n return (a + b > c) && (a + c > b) && (b + c > a);\n }",
"public void quadTest()\n\t{\n\t\tint index = 0, lim = 3;\n\t\tboolean quads = false;\n\t\t\n\t\twhile (index<=lim && (!quads))\n\t\t{\n\t\t\tif ((intRep[index] == intRep[index+1]) &&\n\t\t\t\t(intRep[index] == intRep[index+2]) &&\n\t\t\t\t(intRep[index] == intRep[index+3]) )\n\t\t\t{\n\t\t\t\tquads = true;\n\t\t\t\thandScore = 70000;\n\t\t\t\thandScore += 100 * intRep[index];\n\t\t\t}\n\t\t\telse index++;\n\t\t}\n\t}",
"@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}",
"public boolean isThreeOfAKind(){\n \r\n List<PokerCard> threeCards;\r\n \r\n //First possibility: first three cards match\r\n threeCards = cards.subList(0, 3);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Second possibility: middle three cards match\r\n threeCards = cards.subList(1, 4);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Third possibility: last three cards match\r\n threeCards = cards.subList(2, 5);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n return false;\r\n }",
"public void Down3(){\r\n if(Hy2>0 && Hy2<900){\r\n \r\n Hy2+=3;\r\n }\r\n }",
"boolean hasWeek3();",
"public void insertQuarter(int coin[]) {\n if(coin.length ==2){\n \n if(coin[0] == 25 && coin[1]==25){\n //System.out.println(\"a[0]\"+a[0]);\n System.out.println(\"You inserted a quarter in q2\");\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n }else{\n gumballMachine.setState(gumballMachine.getNoQuarterState()); \n }\n \n \n \n }\n \n // System.out.println(\"You inserted a quarter in q2\");\n // gumballMachine.setState(gumballMachine.getHasQuarterState());\n\t}",
"private boolean isValidQuiz2(double quiz2)\n\t{\n\t\treturn quiz2 >= 0 && quiz2 <= 10;\n\t}",
"public static boolean isPowerOfThree3(int n)\n\t{\n\t\tif(n <= 0)\n\t\t\treturn false;\n\t\tdouble r = Math.log10(n) / Math.log10(3);\n\t\tif (r % 1 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t\t\n\t}",
"public boolean hasQuads(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 4);\r\n\t\t\r\n\t\t\r\n\t}",
"@Test\n public void testThirdPositiveRegion(){\n precisionAssertEquals(\n \"Test [x = 1.05]: third positive region\",\n 0.931952,\n systemFunctions.calculate(1.05)\n );\n precisionAssertEquals(\n \"Test [x = 1.1]: third positive region\",\n 0.931852,\n systemFunctions.calculate(1.1)\n );\n precisionAssertEquals(\n \"Test [x = 1.15]: third positive region\",\n 0.931464,\n systemFunctions.calculate(1.15)\n );\n precisionAssertEquals(\n \"Test [x = 1.2]: third positive region\",\n 0.930531,\n systemFunctions.calculate(1.2)\n );\n }",
"@Test\n public void testThirdPositiveRegion(){\n precisionAssertEquals(\n \"Test [x = 1.05]: third positive region\",\n 0.931952,\n systemFunctions.calculate(1.05)\n );\n precisionAssertEquals(\n \"Test [x = 1.1]: third positive region\",\n 0.931852,\n systemFunctions.calculate(1.1)\n );\n precisionAssertEquals(\n \"Test [x = 1.15]: third positive region\",\n 0.931464,\n systemFunctions.calculate(1.15)\n );\n precisionAssertEquals(\n \"Test [x = 1.2]: third positive region\",\n 0.930531,\n systemFunctions.calculate(1.2)\n );\n }",
"@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}",
"public static boolean isPowerof3(int num){\n\t\tif (Math.pow(3,20) % num == 0){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t\t// while (num % 3 == 0){\n\t\t// \tnum /= 3;\n\t\t// \tif (num == 1){\n\t\t// \t\treturn true;\n\t\t// \t}\n\t\t// }\n\t\t// return false;\n\t}",
"public boolean hasWeek3() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean isDifficult()\n {\n int count = 0;\n for (int i = 1; i < markers.length; i++) {\n if (Math.abs(markers[i] - markers[i-1]) >= 30){\n count++;\n }\n }\n return (count >= 3);\n }",
"public boolean setQuiz3(double quiz3)\n\t{\n\t\tboolean isValid;\n\t\t\n\t\tisValid = isValidQuiz3(quiz3);\n\t\t\n\t\tif(isValid)\n\t\t{\n\t\t\tthis.quiz3 = quiz3;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}",
"public static boolean haveThree(int[] nums) {\n\n\t\tint count = 0;\n\t\t\n\t\tfor (int i=0; i < nums.length; i++) {\n\t\t\tif (nums[i] == 3) {\n\t\t\t\tcount++;\t\n\t\t\t}\t\t\n\t\t}\n\n\n\t\tfor (int i=0; i < nums.length-1; i++) {\n\t\t\tif (nums[i] == 3 && nums[i+1] == 3) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\n\t\tif (count==3) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean getWeek3() {\n return week3_;\n }",
"private boolean thirdMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[3][0] == 13)\n )\n return true;\n else\n return false;\n }",
"private void check3(){\n \n if (errorCode == 0){\n \n if (firstDigit * fifthDigit * ninthDigit != 24){\n valid = false;\n errorCode = 3;\n }\n }\n\t}",
"public boolean getWeek3() {\n return week3_;\n }",
"public boolean hasWeek3() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public static boolean isContained(double a, double b, double c){\n\t\treturn ((a >= b && a <= c) || (a >= c && a <= b));\n\t}",
"private int med3(double x[], int a, int b, int c) {\r\n return (x[a] < x[b]\r\n ? (x[b] < x[c] ? b : x[a] < x[c] ? c : a)\r\n : (x[b] > x[c] ? b : x[a] > x[c] ? c : a));\r\n }",
"private boolean isValidQuiz1(double quiz1)\n\t{\n\t\treturn quiz1 >= 0 && quiz1 <= 10;\n\t}",
"public void insertQuarter() {\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n gumballMachine.getState().insertQuarter();\n }",
"private boolean checkAnswerThree() {\n CheckBox correctAnswer1Q3 = findViewById(R.id.qs3Ans1);\n correctAnswer1Q3.setTextColor(Color.parseColor(\"green\"));\n return correctAnswer1Q3.isChecked();\n }",
"private static boolean isDivisibeby3or5(int a){\n\t\treturn a%3 == 0 || a%5 == 0;\n\t}",
"private boolean cond4(Data C) {\n return (C.getTop() < this.yD);\n }",
"public boolean isStripExistingQ3()\r\n {\r\n return stripExistingQ3;\r\n }",
"public double getQuiz3()\n\t{\n\t\treturn this.quiz3;\n\t}",
"private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }",
"public boolean hasThreeOfAKind(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"hasThreeOfAKind(hand = \"+hand+\")\");\n\t\tif(getThreeOfAKind(hand)!=null){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\n\t}",
"public boolean method_1954(long var1, TimeUnit var3) {\n long var4;\n if ((var4 = var3.convert(System.nanoTime() - this.field_1249, TimeUnit.NANOSECONDS)) >= var1) {\n this.method_1949();\n }\n\n return var4 >= var1;\n }",
"public void setThirdSSN(float num3){\n\t\t ThirdSSN = ((num3>0 && num3<=9999)?num3:0);\n\t\t }",
"private static int med3(double x[], int a, int b, int c) {\n\t\treturn (x[a] < x[b] ?\n\t\t\t\t(x[b] < x[c] ? b : x[a] < x[c] ? c : a) :\n\t\t\t\t\t(x[b] > x[c] ? b : x[a] > x[c] ? c : a));\n\t}",
"boolean isThreeOfAKind();",
"protected boolean checkThreeOfAKind(ReturnValue returnValue) {\n\t\tboolean returnBool = false;\n\t\tint localCheck = 0;\n\t\tint localPoints = 0;\n\t\tint localDiceInt;\n\t\tboolean localBool = false;\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\tif (intList.get(i) == intList.get(j)) {\n\t\t\t\t\tlocalCheck++;\n\t\t\t\t\tif (localCheck == 3) {\n\t\t\t\t\t\tlocalBool = true;\n\t\t\t\t\t\tlocalPoints = intList.get(i) * 3;\n\t\t\t\t\t\tlocalDiceInt = intList.get(i);\n\t\t\t\t\t\treturnValue.setValue(localBool, localPoints, Box.THREE_OF_A_KIND);\n\t\t\t\t\t\treturnValue.setTheDiceInt(localDiceInt);\n\t\t\t\t\t\treturnBool = true;\n\t\t\t\t\t\treturn returnBool;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocalCheck = 0;\n\t\t}\n\t\treturnValue.setValue(localBool, localPoints, Box.THREE_OF_A_KIND);\n\t\treturn returnBool;\n\t}",
"static boolean ccw(PointDouble p, PointDouble q, PointDouble r) {\n return cross(vector(p, q), vector(p, r)) > 0;\n }",
"public boolean check() {\n BigInteger t1 = y.modPow(int2, c.p);\n BigInteger t2 = x.modPow(int3, c.p);\n BigInteger t3 = ((t2.add(c.a.multiply(x))).add(c.b)).mod(c.p);\n return t1.compareTo(t3) == 0;\n }",
"public static boolean hasThreeOfAKind(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i< cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter>=3){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public static void checkThirdQuestion(String xpath) {\r\n\t\tcheckNoSuchElementExceptionByXPath(xpath, \"\\\"Third question\\\" question\");\t\r\n\t}",
"public boolean isPerfectSquare3(int num) {\n int i = 1;\n while (num > 0) {\n num -= i;\n i += 2;\n }\n return num == 0;\n }",
"public boolean morethanthreeletter(String sCheck) {\n\t\tint total=sCheck.length();\n\t\tint x=0;\n\t\tint begin=0;\n\t\tint end=0;\n\t\tchar ch;\n\t\tString sResult=\"\";\n\t\tint chcount=1;\n\t\twhile(x < total){\n\t\t\tch=sCheck.charAt(x);\n\t\t\tif(ch != ' ' && ch != '.' && ch != ','){\n\t\t\t\tif(x==total-1){\n\t\t\t\t\tend=x;\n\t\t\t\t\tif((end-begin+1) > 3){\n\t\t\t\t\t\tsResult=sCheck.substring(begin,end+1);\n\t\t\t\t\t\tSystem.out.println(sResult);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\tx++;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(x==total-1){\n\t\t\t\t\tend=x-1;\n\t\t\t\t\tif((end-begin+1) > 3){\n\t\t\t\t\t\tsResult=sCheck.substring(begin,end+1);\n\t\t\t\t\t\tSystem.out.println(sResult);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\tif(sCheck.charAt(x+1)==' ' || sCheck.charAt(x+1)=='.'\n\t\t\t\t\t\t\t||sCheck.charAt(x+1)==','){\n\t\t\t\t\t\tchcount++;\n\t\t\t\t\t\tx++;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tend=x-chcount;\n\t\t\t\t\t\tchcount=1;\n\t\t\t\t\t\tif((end-begin+1) > 3){\n\t\t\t\t\t\t\tsResult=sCheck.substring(begin,end+1);\n\t\t\t\t\t\t\tSystem.out.println(sResult);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbegin=x;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean istrianglevalid(double semiPer) {\n //declare variables\n boolean checkA = true;\n boolean checkB = true;\n boolean checkC = true;\n \n if (semiPer >= sideA && semiPer >= sideB && semiPer >= sideC) {\n return true;\n } else {\n return false;\n }\n }",
"public static boolean check3(Class<?> theClass) {\n\t\t/*\n\t\t * Create an array of 10000 times Math.Pi and 1 times 10000 * Math.Pi.\n\t\t * Then check if the sum is 20000 times Math.Pi.\n\t\t */\n\t\tdouble[] testArgument = new double[10001];\n\t\tfor(int i=0; i<testArgument.length; i++) {\n\t\t\ttestArgument[i] = Math.PI;\n\t\t}\n\t\ttestArgument[5000] = 10000*Math.PI;\n\t\tdouble testSum = 20000*Math.PI;\n\n\t\tDoubleVector vector = ObjectConstructor.<DoubleVector>create(theClass, DoubleVector.class, testArgument);\n\n\t\tdouble error = testSum - vector.sum();\n\t\tif(Math.abs(error) > accuracy) {\n\t\t\tSystem.out.println(\"\\tAccuracy test failes. Accuracy is too low. The error is \" + error);\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"\\tAccuracy test passed.\");\n\t\t}\n\n\t\treturn true;\n\t}",
"public static final boolean m18706a(double d, double d2, double d3) {\n return d == d2 || (Double.isNaN(d) && Double.isNaN(d2)) || Math.abs(d - d2) <= d3;\n }",
"private boolean isValidFinalExam(double finalExam)\n\t{\n\t\treturn finalExam >= 0 && finalExam <= 100;\n\t}",
"protected void insertQuarter(double balance)\r\n {\r\n totalBalance = balance;\r\n totalBalance = totalBalance + 0.25;\r\n \r\n }",
"public boolean isThreeOfAKind(){\n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < dice.length; i++){\n numbers.add(dice[i].getFaceValue());\n }\n int pairsOfThree = 0;\n int pairsOfTwo = 0;\n for(int i = 0; i < numbers.size(); i++){\n int numSame = 0;\n for(int j = 0; j < numbers.size(); j++){\n if(numbers.get(i).equals(numbers.get(j))){\n numSame++;\n }\n }\n if (numSame == 2){\n pairsOfTwo++;\n }\n if (numSame == 3){\n pairsOfThree++;\n }\n }\n if (pairsOfTwo > 0){\n return false;\n }\n return (pairsOfThree == 3);\n }",
"public void calculateThreeOfAKind(Die[] dice) {\n for (int i = 0; i < 6; i++) {\n if (this.numOfOccurances(dice, i) >= 3) {\n this.threeOfAKind = this.diceSum(dice);\n //System.out.println(\"you have gotten a three of a kind\");\n return;\n }\n }\n this.threeOfAKind = 0;\n return;\n }",
"@Test\n public void testThirdNegativeRegionToExtremePoint(){\n precisionAssertEquals(\n \"Test [x = -1.7]: third negative region\",\n -9.26823,\n systemFunctions.calculate(-1.7)\n );\n precisionAssertEquals(\n \"Test [x = -1.8]: third negative region\",\n -6.30266,\n systemFunctions.calculate(-1.8)\n );\n precisionAssertEquals(\n \"Test [x = -1.9]: third negative region\",\n -5.40983,\n systemFunctions.calculate(-1.9)\n );\n }",
"@Test\n public void testThirdNegativeRegionToExtremePoint(){\n precisionAssertEquals(\n \"Test [x = -1.7]: third negative region\",\n -9.26823,\n systemFunctions.calculate(-1.7)\n );\n precisionAssertEquals(\n \"Test [x = -1.8]: third negative region\",\n -6.30266,\n systemFunctions.calculate(-1.8)\n );\n precisionAssertEquals(\n \"Test [x = -1.9]: third negative region\",\n -5.40983,\n systemFunctions.calculate(-1.9)\n );\n }",
"public int getQuarter () {\n return NQuarter;\n }",
"public static boolean isTopCrossSolved(Cube cube){\n\t\tint counter = 0;\n\t\tif(cube.getSquare (5, 0, 1) == 5) counter++;\n\t\tif(cube.getSquare (5, 1, 0) == 5) counter++;\n\t\tif(cube.getSquare (5, 1, 2) == 5) counter++;\n\t\tif(cube.getSquare (5, 2, 1) == 5) counter++;\n\t\treturn (counter==4);\n\t}",
"Long getCompletedBugThirdQuarterDurationByProjectIdDateBackByMonth(Integer projectId, Integer months);",
"private boolean isBetween(float a, float b, float c) {\n return b >= a ? c >= a && c <= b : c >= b && c <= a;\n }",
"public boolean isAfter(Group3Date b) {\n\t\t\treturn compareTo(b) > 0;\n\t\t}",
"public boolean isPowerOfThree(int n){\n\t\treturn (n > 0) && (1162261467 % n == 0);\n\t}",
"public boolean isPowerOfThree(int n) {\n return (n > 0 && 1162261467 % n == 0);\n }",
"public static Boolean InsideBoundary(Double a, Double b, Double c)\n {\n if (a <= b && a > c)\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public void validateRpd3s3()\n {\n List<String> headings = Arrays.asList(\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\");\n\n int previousLevel = 1;\n for (Node element : getElements(headings)) {\n int currentLevel = Integer.parseInt(element.getNodeName().substring(1));\n\n // Verify that we haven't jumped from h1 to h3.\n assertTrue(Type.ERROR, \"rpd3s3.headings\", currentLevel <= previousLevel + 1);\n previousLevel = currentLevel;\n }\n }",
"public boolean isPowerOfThree(int n) {\n return ( n>0 && 1162261467%n==0);\n\n }",
"public boolean hasTeen(int a, int b, int c) {\n return (a>=13 && a<=19) ||\n (b>=13 && b<=19) ||\n (c>=13 && c<=19);\n}",
"public void setQuarter(String quarter) {\r\n this.quarter = quarter;\r\n }",
"private static boolean checkForMethod3() {\n\t\t\n\t\tif(easyTag3.size() < 3 || mediumTag1.size() < 3 || hardTag2.size() < 3 || easyTag6.size() < 3 || mediumTag4.size() < 3 || hardTag5.size() < 3) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean isTieGame3() {\n\t\treturn (spacesLeft == 3 && board[1][0] == ' ' && board[1][1] == ' '\n\t\t\t\t&& board[1][2] == ' ' && board[0][0] == 'X'\n\t\t\t\t&& board[0][2] == 'X' && board[2][1] == 'X')\n\t\t\t\t|| (spacesLeft == 3 && board[1][0] == ' ' && board[1][1] == ' '\n\t\t\t\t\t\t&& board[1][2] == ' ' && board[2][0] == 'X'\n\t\t\t\t\t\t&& board[0][1] == 'X' && board[2][2] == 'X')\n\t\t\t\t|| (spacesLeft == 3 && board[0][1] == ' ' && board[1][1] == ' '\n\t\t\t\t\t\t&& board[2][1] == ' ' && board[0][0] == 'X'\n\t\t\t\t\t\t&& board[2][0] == 'X' && board[1][2] == 'X')\n\t\t\t\t|| (spacesLeft == 3 && board[0][1] == ' ' && board[1][1] == ' '\n\t\t\t\t\t\t&& board[2][1] == ' ' && board[0][2] == 'X'\n\t\t\t\t\t\t&& board[1][0] == 'X' && board[2][2] == 'X');\n\n\t}",
"@org.junit.Test\n public void kYearMonthDurationMultiply3() {\n final XQuery query = new XQuery(\n \"0 * xs:yearMonthDuration(\\\"P3Y36M\\\") eq xs:yearMonthDuration(\\\"P0M\\\")\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertBoolean(true)\n );\n }",
"private boolean checkFifthYear(Schedule sched)\n\t{\n\t\tArrayList<Course> fifthYearCourses = new ArrayList<Course>(); //Only 500CPSC courses\n\t\t//A list we build with time slots that 5th year courses were assigned \n\t\tArrayList<TimeSlot> fifthYearSlots = new ArrayList<TimeSlot>(); \n\t\tCourse tempCourse;\n\t\tint tempCourseNumber;\n\t\tTimeSlot tempSlot;\n\t\t\n\t\t//Traverse through all the courses\n\t\tfor(int i = 0; i<sched.getCourses().size();i++)\n\t\t{\n\t\t\ttempCourse = sched.getCourses().get(i);\n\t\t\ttempCourseNumber = tempCourse.getNumber();\n\t\t\t\n\t\t\t//If its course number is between 500 and 600 and it's in the cpsc department\n\t\t\t// append it to the list of fifth year courses\n\t\t\tif(\n\t\t\t\t\t(tempCourseNumber >= 500) && \n\t\t\t\t\t(tempCourseNumber < 600))\n\t\t\t{\n\t\t\t\tfifthYearCourses.add(tempCourse);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//At this point, fifthYearCourses contains all the 500 level CPSC class\n\t\t//THis loop checks if the time slot for the current 500 level course has \n\t\t//already been added to our list. If it is, we know they are not all at different times.\n\t\t//\n\t\tfor(int i = 0; i<fifthYearCourses.size();i++)\n\t\t{\n\t\t\ttempSlot = fifthYearCourses.get(i).getSlot();\n\t\t\t\n\t\t\tif(tempSlot != null)\n\t\t\t{\n\t\t\t\n\t\t\t\tif(fifthYearSlots.contains(tempSlot))\n\t\t\t\t\treturn false;\n\t\t\t\telse\n\t\t\t\t\tfifthYearSlots.add(tempSlot);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"boolean hasC3();",
"private boolean crossesInternationalDateline(String eastValue, \n String westValue\n ) {\n boolean crosses = false;\n \n if ((eastValue != null) &&\n (eastValue != \"\") &&\n (westValue != null) &&\n (westValue != \"\")\n ) {\n Double eastInteger = new Double(eastValue);\n Double westInteger = new Double(westValue);\n \n crosses = westInteger > eastInteger;\n }\n \n logger.debug(\"crosses International Dateline: \" + crosses);\n \n return crosses;\n }",
"@Test\n public void checkDivisibilityByFourHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByFourHundred(1600);\n assertTrue(flag);\n }",
"private boolean exceedRange(int year) {\n\t\tboolean exceeds = false;\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint upperRange = currentYear + RANGE_LIMIT;\n\t\tint lowerRange = currentYear - RANGE_LIMIT;\n\t\t\n\t\tif(year < lowerRange || year > upperRange){\n\t\t\texceeds = true;\n\t\t}\n\t\treturn exceeds;\n\t}",
"private static int med3(float x[], int a, int b, int c) {\n\t\treturn (x[a] < x[b] ?\n\t\t\t\t(x[b] < x[c] ? b : x[a] < x[c] ? c : a) :\n\t\t\t\t\t(x[b] > x[c] ? b : x[a] > x[c] ? c : a));\n\t}",
"private static boolean m26009a(long j, long j2, long j3) {\n if (j2 >= 0 && j3 > 0) {\n if ((j >= 0 ? j % j3 : (((Long.MAX_VALUE % j3) + 1) + ((j & Long.MAX_VALUE) % j3)) % j3) >= j2) {\n return false;\n }\n }\n return true;\n }",
"public boolean is3G() {\r\n return is3G;\r\n }",
"public boolean thirtyoneDays() {\n String[] months = new String[]{\"January\", \"March\", \"May\", \"July\", \"August\", \"October\", \"December\"};\n for (String m : months) {\n if (m.equals(this.month)) {\n return true;\n }\n }\n return false;\n }",
"public static boolean validoA3(X509Certificate certificate) throws NfeException {\r\n\r\n\t\tif (certificate.getNotAfter() != null && certificate.getNotAfter().after(new Date())) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"@Test\n\tpublic void testMultiplica3Reales() {\n\t\tdouble resultado= Producto.multiplica3reales(7.2, 8.2, 5.2);\n\t\tdouble esperado= 307.008;\n\t\t\n\t\tassertEquals(esperado, resultado);\n\t}",
"@Test\n public void testSixthNegativeRegionToPuncturePoint(){\n precisionAssertEquals(\n \"Test [x = -4.3]: sixth negative region\",\n -5.08678,\n systemFunctions.calculate(-4.3)\n );\n precisionAssertEquals(\n \"Test [x = -4.4]: sixth negative region\",\n -5.45166,\n systemFunctions.calculate(-4.4)\n );\n precisionAssertEquals(\n \"Test [x = -4.5]: sixth negative region\",\n -6.5621,\n systemFunctions.calculate(-4.5)\n );\n precisionAssertEquals(\n \"Test [x = -4.6]: sixth negative region\",\n -10.3553,\n systemFunctions.calculate(-4.6)\n );\n }",
"@Test\n public void testSixthNegativeRegionToPuncturePoint(){\n precisionAssertEquals(\n \"Test [x = -4.3]: sixth negative region\",\n -5.08678,\n systemFunctions.calculate(-4.3)\n );\n precisionAssertEquals(\n \"Test [x = -4.4]: sixth negative region\",\n -5.45166,\n systemFunctions.calculate(-4.4)\n );\n precisionAssertEquals(\n \"Test [x = -4.5]: sixth negative region\",\n -6.5621,\n systemFunctions.calculate(-4.5)\n );\n precisionAssertEquals(\n \"Test [x = -4.6]: sixth negative region\",\n -10.3553,\n systemFunctions.calculate(-4.6)\n );\n }",
"public int[] findQuarterBounds(int[] datesJulian, int numQuarters) {\n int numTransactions = datesJulian.length;\n int[] timeBlock = new int[numTransactions];\n int lowerBound = 0;\n int upperBound = 0;\n\n // Get indices of earliest and latest julianDate\n earliestIndex = MinAndMaxFinder.findEarliestIndex(datesJulian);\n latestIndex = MinAndMaxFinder.findLatestIndex(datesJulian);\n\n int[] year = new int[datesJulian.length];\n int[] month = new int[datesJulian.length];\n int[] dateGreg = new int[2];\n\n // Get the month and year values of all the transaction julianDate\n for (int i = 0; i < datesJulian.length; i++) {\n dateGreg = convertJulianToGregorian(datesJulian[i]);\n year[i] = dateGreg[0];\n month[i] = dateGreg[1];\n }\n\n /* Get the year and month value of the earliest date only\n * to be used as a starting point for the search */\n int y = year[earliestIndex];\n int m = month[earliestIndex];\n\n /* Find the initial lower and upper bounds for the search\n * loop */\n if (m > 0 & m < 4) {\n lowerBound = 0;\n upperBound = 4;\n }\n if (m > 3 & m < 7) {\n lowerBound = 3;\n upperBound = 7;\n }\n if (m > 6 & m < 10) {\n lowerBound = 6;\n upperBound = 10;\n }\n if (m > 9 & m < 13) {\n lowerBound = 9;\n upperBound = 13;\n }\n //System.out.println(\"Number of ... Quarters \" + getNumQuarters());\n /* Search Loop */\n int groupCounter = 1;\n boolean[] indexToExcludeFromSearch = new boolean[numTransactions];\n java.util.Arrays.fill(indexToExcludeFromSearch, false);\n // Iterate for each quarter\n for (int i = 0; i < numQuarters; i++) {\n // Iterate for each transaction\n for (int j = 0; j < numTransactions; j++) {\n if (year[j] == y && (month[j] > lowerBound & month[j] < upperBound) &&\n indexToExcludeFromSearch[j] == false) {\n timeBlock[j] = groupCounter;\n indexToExcludeFromSearch[j] = true;\n }\n } // end inner for\n if (lowerBound == 9 && upperBound == 13) {\n lowerBound = 0;\n upperBound = 4;\n y++;\n } else {\n lowerBound = lowerBound + 3;\n upperBound = upperBound + 3;\n }\n groupCounter++;\n } // end outer for\n groupCounter--;\n setNumQuarters(groupCounter);\n DataPreprocessing split = new DataPreprocessing();\n\n return timeBlock;\n }"
] | [
"0.71416533",
"0.66928816",
"0.645284",
"0.6289162",
"0.62143576",
"0.6209736",
"0.61894584",
"0.5859616",
"0.583755",
"0.5710414",
"0.567579",
"0.5672944",
"0.5628565",
"0.55899644",
"0.5487678",
"0.5480396",
"0.54649293",
"0.54615384",
"0.54579633",
"0.5408034",
"0.5389136",
"0.5377026",
"0.5371969",
"0.53517455",
"0.5333768",
"0.5330155",
"0.5322948",
"0.52889913",
"0.52889913",
"0.5256558",
"0.52564216",
"0.52441776",
"0.5233916",
"0.5226767",
"0.52197564",
"0.521147",
"0.5191352",
"0.51900077",
"0.51895595",
"0.51858807",
"0.5185561",
"0.51724875",
"0.516725",
"0.5141669",
"0.5140979",
"0.51390743",
"0.5134602",
"0.51170725",
"0.51064557",
"0.5102237",
"0.5100584",
"0.5096759",
"0.5076269",
"0.5072271",
"0.5067309",
"0.5058212",
"0.5050188",
"0.5049012",
"0.50474876",
"0.5046172",
"0.50410295",
"0.50390506",
"0.50335675",
"0.5008367",
"0.49949646",
"0.49835032",
"0.4979882",
"0.49710628",
"0.49562305",
"0.49488586",
"0.49488586",
"0.49476108",
"0.4944822",
"0.4922429",
"0.49168503",
"0.4911305",
"0.4901584",
"0.49010235",
"0.4898507",
"0.48930845",
"0.48912126",
"0.48873678",
"0.48826993",
"0.4879842",
"0.48762164",
"0.48735026",
"0.4860389",
"0.4859817",
"0.48531154",
"0.48455986",
"0.48430324",
"0.48414126",
"0.48391652",
"0.48355725",
"0.48308486",
"0.48205513",
"0.48172912",
"0.4808928",
"0.4808928",
"0.48075846"
] | 0.75681466 | 0 |
TODO Autogenerated method stub | @Override
public void attributeReplaced(HttpSessionBindingEvent se) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public JSONObject getJSON() {
return tenses;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
IsNumber method char charAt(int index) | public static boolean isNumber (String str) {
char[] charTostr = new char[str.length()]; // 스트링을 담을 배열
for(int i=0;i<charTostr.length;i++){
charTostr[i]=(str.charAt(i));//스트링을 한글자씩 끊어 배열에 저장
System.out.println(charTostr[i]); //출력
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean isnumber(char c) {\n\t\tif (c=='0'||c=='1'||c=='2'||c=='3'||c=='4'||c=='5'||c=='6'||c=='7'||c=='8'||c=='9') {\n\t\t\treturn true;// return true if that char is number\n\t\t}\n\t\telse { //else return false\n\t\t\treturn false;\n\t\t}\n\t}",
"private static boolean isDigit(char p_char) {\n return p_char >= '0' && p_char <= '9';\n }",
"public static boolean isNumber(char n) {\r\n\t\treturn (n >= '0' && n <= '9');\r\n\t}",
"private boolean isDigit(char x) {\n return x >= '0' && x <= '9';\n }",
"public char charAt(int index);",
"boolean isNumeric(char pChar)\n{\n\n //check each possible number\n if (pChar == '0') {return true;}\n if (pChar == '1') {return true;}\n if (pChar == '2') {return true;}\n if (pChar == '3') {return true;}\n if (pChar == '4') {return true;}\n if (pChar == '5') {return true;}\n if (pChar == '6') {return true;}\n if (pChar == '7') {return true;}\n if (pChar == '8') {return true;}\n if (pChar == '9') {return true;}\n\n return false; //not numeric\n\n}",
"public static boolean isAsciiNumeric(char ch) {\n/* 517 */ return (ch >= '0' && ch <= '9');\n/* */ }",
"public static final boolean isNumeric(char c, int i) {\r\n return NUMERIC_FORMAT_CHARS.indexOf(c) >= 0 || (i <= 2 && NUMERIC_FORMAT_CHARS2.indexOf(c) >= 0);\r\n }",
"private static final boolean isNumeric(final char formatChar, final int count) {\n\t\tint i = NUMERIC_FORMAT_CHARS.indexOf(formatChar);\n\t\treturn (i > 0 || (i == 0 && count < 3));\n\t}",
"private boolean isNumerico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private boolean isDigit(char toCheck) {\n return toCheck >= '0' && toCheck <= '9';\n }",
"public char convertToCharacter(int letterThatIsNumber)\n\t{\n\t\treturn characters[letterThatIsNumber];\n\t}",
"public static boolean isNumeric(char num) {\n\t\treturn isNumeric(String.valueOf(num));\n\t}",
"java.lang.String getNumber();",
"java.lang.String getNumber();",
"java.lang.String getNumber();",
"private int getCharNumber(char c) {\n int myReturn = -1;\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n if (a <= val && val <= z) {\n myReturn = val - a;\n }\n return myReturn;\n }",
"public abstract boolean isNumeric();",
"private boolean isNumber(char c){\n if(c >= 48 && c < 58)\n return true;\n else{\n return false;\n }\n }",
"public static char getCharForNum(byte number) {\n if (number > 9) {\n throw new IndexOutOfBoundsException(\"number > 9\");\n }\n // the ascii offset for numbers is 48, adding 48 gets the right char\n return (char) (number + 48);\n }",
"private int convertCharNumtoNum(char charIn){\n\t\tint number = -1;\n\t\tint convertedNum = Character.getNumericValue(charIn);\n\t\t\n\t\tfor(int i: Seats.SEAT_NUMS){\n\t\t\tif(i == convertedNum){\n\t\t\t\tnumber = convertedNum; \n\t\t\t}\n\t\t}\n\t\treturn number;\n\t}",
"public void handleNumbers() {\n // TODO handle \"one\", \"two\", \"three\", etc.\n }",
"private static boolean isNumber( char i ) {\n\t\tif ( Character.isDigit(i) ) return true; \n\t\tthrow new IllegalArgumentException(\"The weight of the route should be a number, now it's '\"+ i +\"'\");\n\t}",
"private static int charAt(String data) {\n\t\treturn 0;\n\t}",
"private static int eatNumber (String s, int pos[]) {\r\n int sign = 1;\r\n int result = 0;\r\n int i = 0;\r\n if (s.charAt(pos[0])=='-') {\r\n pos[0]++;\r\n sign = -1;\r\n }\r\n for (; pos[0]<s.length(); i++) {\r\n char c=s.charAt(pos[0]);\r\n if (! Character.isDigit(c)) {\r\n break;\r\n }\r\n result = 10*result + (c-'0');\r\n pos[0]++;\r\n if (i==0 && result==0) return 0;\r\n }\r\n if (i==0) throw new RuntimeException();\r\n return result*sign;\r\n }",
"private boolean isDigit(char ch) {\n if ( (ch >= '0') && (ch <= '9')) {\n return true;\n } // if\n else {\n return false;\n } // else\n }",
"private Token number() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t}\n\t\t//处理小数\n\t\tif(this.currentChar == '.') {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t\t\n\t\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\t\tsb.append(this.currentChar);\n\t\t\t\tnext_char();\n\t\t\t}\n\t\t\treturn new Token(Type.REAL_CONST, sb.toString());\n\t\t}else {\n\t\t\treturn new Token(Type.INTEGER_CONST, sb.toString());\n\t\t}\n\t}",
"private boolean isNumberAhead() {\r\n\t\treturn Character.isDigit(expression[currentIndex]);\r\n\t}",
"public boolean testForNumber() throws IOException {\n int token = fTokenizer.nextToken();\n\tfTokenizer.pushBack();\n return (token == StreamTokenizer.TT_NUMBER);\n }",
"private String readNumber() {\n StringBuilder sb = new StringBuilder();\n char currentChar = code.charAt(currentIndex);\n while (!isEndOfCode() && Character.isDigit(currentChar)) {\n sb.append(currentChar);\n currentIndex++;\n if (isEndOfCode()) break;\n currentChar = code.charAt(currentIndex);\n }\n return sb.toString();\n }",
"public boolean isNum() \n\t{ \n\t try \n\t { \n\t int d = Integer.parseInt(numeric); \n\t } \n\t catch(NumberFormatException nfe) \n\t { \n\t return false; \n\t } \n\t return true; \n\t}",
"public static boolean isNumber(String s) \r\n{ \r\n for (int i = 0; i < s.length(); i++) \r\n if (Character.isDigit(s.charAt(i)) \r\n == false) \r\n return false; \r\n\r\n return true; \r\n}",
"private static boolean isDigitFollowing(String s, int index) {\n while (index < s.length()) {\n char c = s.charAt(index);\n if (c == ' ') {\n index++;\n continue;\n }\n if (Character.isDigit(c)) {\n return true;\n }\n return false;\n }\n return false;\n }",
"public char charAt(int charOffset);",
"public static boolean isNumeric(char c)\n\t{\n\t\tif (c >= '0' && c <= '9')\n\t\t\treturn true;\n\t\telse if (c == '.')\n\t\t\treturn true;\n\t\telse if (c == '-')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"private boolean isLegalNumChar(char c) {\n return c == '-'\n || c == '+'\n || (c >= '0' && c <= '9')\n || c == 'e'\n || c == 'E'\n || c == '.';\n }",
"protected java.lang.String readNum() throws java.io.IOException {\n char c = readCharWord();\n java.lang.StringBuilder result = new java.lang.StringBuilder();\n if (c!='-' && !java.lang.Character.isDigit(c))\n throw error();\n do {\n result.append(c);\n c = next();\n } while (java.lang.Character.isDigit(c));\n return result.toString();\n }",
"public static char getDigitCharacter(){\n\t\treturn getRandomCharacter('0','9');\n\t}",
"private boolean isNumeric(String s) {\n return java.util.regex.Pattern.matches(\"\\\\d+\", s);\n }",
"private static boolean isNumeric(String cadena)\n\t {\n\t\t try \n\t\t {\n\t\t\t Integer.parseInt(cadena);\n\t\t\t return true;\n\t\t } catch (NumberFormatException nfe)\n\t\t {\n\t\t\t return false;\n\t\t }\n\t }",
"@Override\n public final char charAt(final int index) {\n return text.charAt(index);\n }",
"public static boolean isDigit(char c)\n {\n return (c >= '0' && c <= '9');\n }",
"private boolean isNotNumeric(String s) {\n return s.matches(\"(.*)\\\\D(.*)\");\n }",
"public int charNum() {\n return myCharNum;\n }",
"private boolean isAlphaNumeric(char toCheck) {\n return isAlpha(toCheck) || isDigit(toCheck);\n }",
"private int getCharNumber(Character letter) {\n\t\tint integerA = Character.getNumericValue('a');\n\t\tint integerZ = Character.getNumericValue('z');\n\t\tint integerLetter = Character.getNumericValue(letter);\n\t\tif (integerLetter >= integerA && integerLetter <= integerZ) {\n\t\t\treturn integerLetter - integerA; //a -> 0, b -> 1, c -> 2, etc\n\t\t}\n\t\treturn -1;\n\t}",
"private static boolean isNumber(String value){\r\n\t\tfor (int i = 0; i < value.length(); i++){\r\n\t\t\tif (value.charAt(i) < '0' || value.charAt(i) > '9')\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }",
"public char charAt(int index) {\n/* 121 */ return this.m_str.charAt(index);\n/* */ }",
"private static int convertCharToInt(char charAt) {\n\t\tif(charAt == 48) {\t\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn 1;\n\t\t}\n\t}",
"private static boolean isNumeric(String str){\n return NumberUtils.isNumber(str);\n }",
"int getIndex(Character c)\n{\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n \n if (a <= val && val <= z) return val - a;\n return -1;\n}",
"java.lang.String getNum2();",
"private Token readNum(char firstchar) {\n StringBuilder numConstructCache = new StringBuilder();\n char c = firstchar;\n\n while (true) {\n if (isLegalNumChar(c)) {\n numConstructCache.append(c);\n } else {\n revokeCharRead();\n break;\n }\n c = getNextChar();\n }\n return new Token(TokenType.NUMBER, numConstructCache.toString()); //the value of 0 is null\n }",
"public boolean isNum(String x) {\n\t\tfor (int i = 0; i < x.length(); i++) {\n\t\t\tchar c = x.charAt(i);\n\t\t\tif ((c == '-' || c == '+') && x.length() > 1)\n\t\t\t\tcontinue;\n\t\t\tif ((int) c > 47 && (int) c < 58)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private static boolean stringContainsNumber( String userName ) {\n return Pattern.compile( \"[0-9]\" ).matcher( userName).find();\n }",
"public Integer getCharNum() {\n return charNum;\n }",
"public String validateNumberString() {\n String tempNumber = numberString;\n int start = 0;\n Pattern pattern = Pattern.compile(\"\\\\D+\");\n Matcher matcher = pattern.matcher(tempNumber);\n if (isZero()) {\n return \"0\";\n }\n if (isNegative()) {\n start++;\n }\n if (matcher.find(start)) {\n throw new IllegalArgumentException(\"Wrong number: \" + tempNumber);\n }\n pattern = Pattern.compile(\"([1-9][0-9]*)\");\n matcher.usePattern(pattern);\n if (!matcher.find(0)) {\n throw new IllegalArgumentException(\"Wrong number: \" + tempNumber);\n }\n return tempNumber.substring(matcher.start(), matcher.end());\n }",
"private boolean isNumeric(String s)\n {\n for (int i = 0; i < s.length(); ++i)\n {\n if (!Character.isDigit(s.charAt(i)))\n {\n return false;\n }\n }\n return true;\n }",
"private int queryNumberChar() throws IOException {\n\t\tbrin.mark(2);\n\t\treturn brin.read();\n\t}",
"private boolean isNumber(String str) {\r\n int ASCII_0 = 48;\r\n int ASCII_9 = 57;\r\n if (str.equals(\"\")) {\r\n return false;\r\n }\r\n for (int i = 0; i < str.length(); i++) {\r\n int chr = str.charAt(i);\r\n if (chr < ASCII_0 || chr > ASCII_9) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public static final boolean isDigit(char ch) {\n return ch >= '0' && ch <= '9';\n }",
"@Override\r\n\tpublic char charAt(int index) {\n\t\treturn chars[index];\r\n\t}",
"@Test\n\tpublic void checkNumbersFollowedByExclamationMark() {\n\t\tString input = \"Five six SEVEN eiGHt!!\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"5 6 7 8!!\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"public boolean isDigit(String s)\r\n\t\t{\n\t\t\tfor(char c : s.toCharArray())\r\n\t\t\t{\r\n\t\t\t if(!(Character.isDigit(c)))\r\n\t\t\t {\r\n\t\t\t return false;\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\t//return false;\r\n\t\t\treturn true;\r\n\t\t}",
"public static boolean IsNumber(int par_Numer) {\n return true;\n }",
"private boolean isNumber(char input) {\n\t\tboolean isNumber = false;\n\t\t\n\t\tif((input >= 48) && (input <= 57))\n\t\t{\n\t\t\tisNumber = true;\n\t\t}\n\t\telse if((input >= 65) && (input <= 70))\n\t\t{\n\t\t\tisNumber = true;\n\t\t}\n\t\t\n\t\t\n\t\treturn isNumber;\n\t}",
"private int getDigit(int index) {\n return getDigit(number, index);\n }",
"public boolean isDigit(char ch) {\n\t\treturn Character.isDigit(ch);\n\t}",
"private boolean checkForNumber(String field) {\n\n\t\tPattern p = Pattern.compile(\"[0-9].\");\n\t\tMatcher m = p.matcher(field);\n\n\t\treturn (m.find()) ? true : false;\n\t}",
"private boolean isNumber( String test ) {\n\treturn test.matches(\"\\\\d+\");\n }",
"public char charAt(int anIndex)\n {\n return _xstr.charAt(_start + anIndex);\n }",
"private static boolean areNumbers(String s) {\n boolean isADigit = false;//only changed once everything has been checked\n //checks if places 0-2 are numbers and 3 is a \"-\"\n for(int i = 0; i < 3; i++) {\n if(Character.isDigit(s.charAt(i)) && s.charAt(3) == '-') {\n isADigit = true;\n }\n }\n //checks if places 4-5 are numbers and 6 is a \"-\"\n for(int i = 4; i < 6; i++) {\n if(Character.isDigit(s.charAt(i)) && s.charAt(6) == '-') {\n isADigit = true;\n }\n }\n //checks if places 7-10 are numbers\n for(int i = 7; i < 11; i++) {\n if(Character.isDigit(s.charAt(i))) {\n isADigit = true;\n }\n }\n return isADigit;\n }",
"public void setCharNum(Integer charNum) {\n this.charNum = charNum;\n }",
"public char charAt(int index)\r\n/* 31: */ {\r\n/* 32: 44 */ if (index > this.pos) {\r\n/* 33: 45 */ throw new IndexOutOfBoundsException();\r\n/* 34: */ }\r\n/* 35: 47 */ return this.chars[index];\r\n/* 36: */ }",
"public String getNumber() throws Exception;",
"char toChar(int index) {\n return _letters.charAt(index);\n }",
"public boolean isNumeric(String str){\r\n\t Pattern pattern = Pattern.compile(\"[0-9]*\");\r\n\t return pattern.matcher(str).matches(); \r\n\t}",
"private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}",
"private static Symbol number(String text, int base)\r\n\t{\r\n\t\tint linepos = line_;\r\n\t\tint charpos = char_;\r\n\t\tint colpos = col_;\r\n\t\tscan(text);\r\n\t\tToken token = new Token(fname, text, linepos, charpos, colpos);\r\n\t\ttoken.number = convertNumber(text, base);\r\n\t\treturn new Symbol(sym.NUMBER, linepos, colpos, token);\r\n\t}",
"private void handleNumber() {\n while (isDigit(peek())) {\n advance();\n }\n\n // Look for decimals; Will be allowing extension calls like 140.abs() so make sure it's a numerical decimal\n if (peek() == '.' && isDigit(peekFurther(1))) {\n\n // Consume the decimal\n advance();\n\n // Consume the digits following the decimal\n while (isDigit(peek())) {\n advance();\n }\n }\n\n addToken(NUMBER, Double.parseDouble(source.substring(start, current)));\n }",
"public static boolean isNumeric(String cadena){ \r\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException e){\t\r\n System.out.println(e.getMessage());\r\n return false;\r\n }\r\n }",
"public static Boolean isNumeric(String text)\n {\n //This checks for negative numbers...\n if (text.startsWith(\"-\"))\n {\n text = text.substring(1, text.length());\n }\n\n for (char c : text.toCharArray())\n {\n if (!Character.isDigit(c))\n {\n return false;\n }\n }\n return true;\n }",
"private static boolean isPrimitive(String value) {\n boolean status = true;\n value = value.trim();\n if (value.length() < 1) {\n return false;\n }\n for (int i = 0; i < value.length(); i++) {\n char c = value.charAt(i);\n if (!Character.isDigit(c)) {\n status = false;\n break;\n }\n }\n\n return status;\n }",
"private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}",
"Boolean isNumeric(PrintWriter out, String strNum);",
"public String digit(String digit);",
"java.lang.String getNum1();",
"public char getChar();",
"@Test\n public void testGetNumber() throws Exception {\n System.out.println(\"getNumber\");\n char a = ' ';\n int expResult = 27;\n int result = utilsHill.getNumber(a);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }",
"public boolean isNumeric(String cadena) {\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException nfe) {\r\n return false;\r\n }\r\n }",
"private String extractNumber() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\twhile (currentIndex < expression.length && Character.isDigit(expression[currentIndex])) {\r\n\t\t\tsb.append(expression[currentIndex]);\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\r\n\t\treturn sb.toString();\r\n\t}",
"private void processNumeric() {\n\n Token token = tokens.get(currentTokenPointer);\n\n String tokenString = string(token);\n\n pushIt(new ReplacementTransformer(tokenString));\n\n }",
"public static char posLetterToNumber(char POS)\n\t{\n\t\tswitch (POS)\n\t\t{\n\t\t\tcase 'n':\n\t\t\t\treturn '1';\n\t\t\tcase 'v':\n\t\t\t\treturn '2';\n\t\t\tcase 'a':\n\t\t\t\treturn '3';\n\t\t\tcase 'r':\n\t\t\t\treturn '4';\n\t\t\tcase 's':\n\t\t\t\treturn '5';\n\t\t}\n\t\tSystem.err.println(\"ERROR in WordNetUtilities.posLetterToNumber(): bad letter: \" + POS);\n\t\treturn '1';\n\t}",
"@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tchar c = e.getKeyChar();\r\n\t\t\t\tif (!Character.isDigit(c)) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}",
"Rule Digit() {\n // No effect on value stack\n return CharRange('0', '9');\n }",
"private String parseNumber () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n fBuffer.delete(0, fBuffer.length());//empty string buffer\r\n \r\n char chr=next();//get next character\r\n assert \"-0123456789\".indexOf(chr)>=0;//assert valid start character\r\n while (\"0123456789.Ee+-\".indexOf(chr)>=0) {//until non number character\r\n fBuffer.append(chr);//append to string buffer\r\n chr=next();//get next character\r\n if (chr==NONE) throw new RuntimeException(\"Invalid syntax : \"+context());//gee, thanks...\r\n }//until non number character\r\n \r\n if (\"]},\".indexOf(chr)<0) throw new RuntimeException(\"Invalid syntax : \"+context());//no way jose\r\n\r\n back(); //rewind to the terminator character\r\n \r\n return fBuffer.toString();//return string in buffer\r\n \r\n }",
"boolean hasNumber();",
"public String getNumberLiteral()\n {\n token = \"\";\n skipSpaces();\n char ch = getCurrentChar();\n\n // Read the first sign, if exists\n if ( ch == '+'\n || ch == '-' )\n {\n token += ch;\n this.advance();\n ch = getCurrentChar();\n }\n\n while( Character.isDigit( ch )\n || ch == '.' )\n {\n token += ch;\n this.advance();\n ch = getCurrentChar();\n }\n\n return token;\n }",
"private Token scanNumber(LocatedChar firstChar) {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(firstChar.getCharacter());\n\t\tappendSubsequentDigits(buffer);\n\t\tif(input.peek().getCharacter() == DECIMAL_POINT) {\n\t\t\tLocatedChar c = input.next();\n\t\t\tif(input.peek().getCharacter() == DECIMAL_POINT) {\n\t\t\t\tinput.pushback(c);\n\t\t\t\treturn IntToken.make(firstChar, buffer.toString());\n\t\t\t}\n\t\t\tbuffer.append(c.getCharacter());\n\t\t\tif(input.peek().isDigit()) {\n\t\t\t\tappendSubsequentDigits(buffer);\n\t\t\t\tif(input.peek().getCharacter() == CAPITAL_E) {\n\t\t\t\t\tLocatedChar expChar = input.next();\n\t\t\t\t\tbuffer.append(expChar.getCharacter());\n\t\t\t\t\tif(input.peek().getCharacter() == '+' || input.peek().getCharacter() == '-') {\n\t\t\t\t\t\tbuffer.append(input.next().getCharacter());\n\t\t\t\t\t}\n\t\t\t\t\tif(input.peek().isDigit()) {\n\t\t\t\t\t\tappendSubsequentDigits(buffer);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlexicalError(expChar, \"malformed floating exponent literal\");\n\t\t\t\t\t\treturn findNextToken();\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\treturn FloatToken.make(firstChar, buffer.toString());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlexicalError(firstChar, \"malformed floating literal\");\n\t\t\t\treturn findNextToken();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn IntToken.make(firstChar, buffer.toString());\n\t\t}\n\t}"
] | [
"0.67927444",
"0.6722558",
"0.65409803",
"0.6489487",
"0.6466666",
"0.63974005",
"0.63271755",
"0.6309345",
"0.62755656",
"0.627552",
"0.6241355",
"0.62345654",
"0.6185216",
"0.6146222",
"0.6146222",
"0.6146222",
"0.6132221",
"0.6110129",
"0.61080414",
"0.6089974",
"0.60714626",
"0.60657114",
"0.6029811",
"0.6012287",
"0.5994621",
"0.59916985",
"0.59908587",
"0.5975899",
"0.5964015",
"0.5954799",
"0.5948533",
"0.5935169",
"0.59139395",
"0.5894955",
"0.5887187",
"0.58687896",
"0.58321935",
"0.58233285",
"0.582124",
"0.58162874",
"0.5813885",
"0.58070606",
"0.580445",
"0.5803039",
"0.5802495",
"0.58012825",
"0.5788662",
"0.5777689",
"0.5761234",
"0.5758328",
"0.5755154",
"0.57388335",
"0.57351303",
"0.5730567",
"0.5709923",
"0.5697992",
"0.56964844",
"0.5689401",
"0.56875336",
"0.5674969",
"0.5649837",
"0.563532",
"0.5627483",
"0.5627092",
"0.56125903",
"0.56119853",
"0.5601747",
"0.559508",
"0.55948263",
"0.5579378",
"0.55563134",
"0.5554563",
"0.5553508",
"0.55515593",
"0.55414253",
"0.5537584",
"0.55283636",
"0.55215365",
"0.5509486",
"0.55073506",
"0.54986304",
"0.5470437",
"0.54668987",
"0.545695",
"0.5451877",
"0.5441927",
"0.543699",
"0.54342276",
"0.5428032",
"0.5426892",
"0.5416344",
"0.5413714",
"0.5409746",
"0.54096943",
"0.53992903",
"0.53942174",
"0.5391398",
"0.5385894",
"0.5381783",
"0.5379182"
] | 0.55323905 | 76 |
Create a CSRF token | public String generateToken(HttpServletRequest request)
{
return tokensManager.generateToken((HttpServletRequest) request);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getCSRFToken();",
"String addCSRFToken(String href);",
"protected Tag makeCsrfTokenInputTag(Http.Request request) {\n return input().isHidden().withValue(getCsrfToken(request)).withName(\"csrfToken\");\n }",
"@Override\n\tprotected AuthenticationToken createToken(ServletRequest request,\n\t\t\tServletResponse response) throws Exception {\n\t\tHttpServletRequest httpRequest = (HttpServletRequest) request;\n\t\tString ticket = httpRequest.getParameter(TICKET_PARAMETER);\n\t\treturn new CasToken(ticket);\n\t}",
"@Override\r\n\tpublic Token createToken() {\n\t\tToken token = new Token();\r\n\t\treturn token;\r\n\t}",
"private String newToken(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n return jwtUtils.generateToken(userDetails);\r\n }",
"String createToken(User user);",
"@Override\n\tprotected AuthenticationToken createToken(ServletRequest request, ServletResponse response) throws Exception {\n\t\treturn null;\n\t}",
"public Token newToken() {\r\n\t\tString value = UUID.randomUUID().toString();\r\n\t\treturn new Token(value);\r\n\t}",
"void verifyCSRFToken(HttpServletRequest request) throws IntrusionException;",
"public static String getTokenFromRequest(final HttpServletRequest httpServletRequest)\n\t{\n\t\tfinal String requestCsrfToken = httpServletRequest.getParameter(CSRF_PARAM_NAME);\n\n\t\tif (requestCsrfToken == null)\n\t\t{\n\t\t\treturn httpServletRequest.getHeader(CSRF_PARAM_NAME);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn requestCsrfToken;\n\t\t}\n\t}",
"public String createToken(String identity) throws InternalSkiException {\n byte[] tokenKey = getTokenKey();\n byte[] newKey = SkiKeyGen.generateKey(SkiKeyGen.DEFAULT_KEY_SIZE_BITS);\n\n Token tkn = new Token();\n tkn.setIdentity(identity);\n tkn.setKey(newKey);\n // log.info(\"New token key: \" + tkn.getKey());\n\n String tknValue = th.encodeToken(tkn, tokenKey);\n if (tknValue==null) {\n log.warning(\"Failed to encode token during token creation!\");\n }\n if (log.isLoggable(Level.FINE)) {\n log.fine(\"Created token with value: \" + tknValue);\n }\n return tknValue;\n }",
"public Token createAuthorizationToken(User user);",
"@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(),\"CSRF success: \" + response.toString(), Toast.LENGTH_SHORT).show();\n HashMap<String, String> params = new HashMap<String, String>();\n try{\n params.put(\"X-Csrf-Token\",response.getString(\"token\"));\n }catch (Exception ex){\n\n }\n\n }",
"private void registerCSRFUser() {\n\n RestAssured.given()\n .when()\n .relaxedHTTPSValidation()\n .formParam(\"username\", \"csrf-\" + this.getUser())\n .formParam(\"password\", \"password\")\n .formParam(\"matchingPassword\", \"password\")\n .formParam(\"agree\", \"agree\")\n .post(url(\"register.mvc\"));\n\n }",
"public static String getTokenForSession(final HttpSession httpSession)\n\t{\n\t\tString sessionCsrfToken = null;\n\t\tsynchronized (httpSession)\n\t\t{\n\t\t\tsessionCsrfToken = (String) httpSession.getAttribute(CSRF_TOKEN_SESSION_ATTRIBUTE);\n\t\t\tif (StringUtils.isBlank(sessionCsrfToken))\n\t\t\t{\n\t\t\t\tsessionCsrfToken = generateToken();\n\t\t\t\thttpSession.setAttribute(CSRF_TOKEN_SESSION_ATTRIBUTE, sessionCsrfToken);\n\t\t\t}\n\t\t}\n\t\treturn sessionCsrfToken;\n\t}",
"WithCreate withSecurityToken(SourceControlSecurityTokenProperties securityToken);",
"GetToken.Req getGetTokenReq();",
"public StringBuilder createToken() throws IOException {\n /**\n * we need the url where we want to make an API call\n */\n URL url = new URL(\"https://api.scribital.com/v1/access/login\");\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n /**\n * set the required type, in this case it's a POST request\n */\n connection.setRequestMethod(\"POST\");\n\n /**\n * set the type of content, here we use a JSON type\n */\n connection.setRequestProperty(\"Content-Type\", \"application/json; utf-8\");\n connection.setDoOutput(true);\n\n /**\n * set the Timeout, will disconnect if the connection did not work, avoid infinite waiting\n */\n connection.setConnectTimeout(6000);\n connection.setReadTimeout(6000);\n\n /**\n * create the request body\n * here we need only the username and the api-key to make a POST request and to receive a valid token for the Skribble API\n */\n String jsonInputString = \"{\\\"username\\\": \\\"\" + username +\"\\\", \\\"api-key\\\":\\\"\" + api_key + \"\\\"}\";\n try(OutputStream os = connection.getOutputStream()){\n byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);\n os.write(input,0, input.length);\n }\n\n /**\n * read the response from the Skriblle API which is a token in this case\n */\n try(BufferedReader br = new BufferedReader(\n new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {\n StringBuilder response = new StringBuilder();\n String responseLine = null;\n while ((responseLine = br.readLine()) != null) {\n response.append(responseLine.trim());\n Token = response;\n }\n }\n return Token;\n }",
"private void createServerSideToken(TokenRequestBody tokenRequestBody, final Paystack.TokenCallback tokenCallback) throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException {\n ApiService apiService = new ApiClient().getApiService();\n\n HashMap<String, String> params = new HashMap<>();\n params.put(TokenRequestBody.FIELD_PUBLIC_KEY, tokenRequestBody.publicKey);\n params.put(TokenRequestBody.FIELD_CLIENT_DATA, tokenRequestBody.clientData);\n\n Call<TokenApiResponse> call = apiService.createToken(params);\n call.enqueue(new Callback<TokenApiResponse>() {\n /**\n * Invoked for a received HTTP response.\n * <p/>\n\n * @param call - the call enqueueing this callback\n * @param response - response from the server after call is made\n */\n @Override\n public void onResponse(Call<TokenApiResponse> call, Response<TokenApiResponse> response) {\n TokenApiResponse tokenApiResponse = response.body();\n if (tokenApiResponse != null) {\n //check for status...if 0 return an error with the message\n if (tokenApiResponse.status.equals(\"0\")) {\n //throw an error\n tokenCallback.onError(new TokenException(tokenApiResponse.message));\n } else {\n Token token = new Token();\n token.token = tokenApiResponse.token;\n token.last4 = tokenApiResponse.last4;\n\n tokenCallback.onCreate(token);\n }\n }\n }\n\n /**\n * Invoked when a network exception occurred talking to the server or when an unexpected\n * exception occurred creating the request or processing the response.\n *\n * @param call - call that enqueued this callback\n * @param t - the error or exception that caused the failure\n */\n @Override\n public void onFailure(Call<TokenApiResponse> call, Throwable t) {\n Log.e(LOG_TAG, t.getMessage());\n tokenCallback.onError(t);\n\n }\n\n });\n }",
"OAuth2Token getToken();",
"private String generateToken(LoginViewModel viewModel){\n \n String authenticationToken;\n \n try{\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(viewModel.getUsername(), viewModel.getPassword()));\n \n SecurityContextHolder.getContext().setAuthentication(authentication);\n UserPrincipal principal = (UserPrincipal) authentication.getPrincipal();\n \n System.out.println(generateExpirationDate());\n authenticationToken = JWT\n .create()\n .withClaim(\"role\",\"ROLE_\" + principal.getRole())\n .withSubject(principal.getUsername())\n .withExpiresAt(generateExpirationDate())\n .sign(HMAC512(CommonSecurityConfig.SECRET.getBytes()));\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n \n return authenticationToken;\n }",
"public static String generateToken(HttpServletResponse response) {\n String token = cage.getTokenGenerator().next();\n String token0 = DigestUtils.shaHex(token);\n SessionCookieHolder.setCookie(response, \"c\", token0);\n return token;\n }",
"public Token toScribeToken() {\n return new Token(oauthToken, oauthTokenSecret);\n }",
"protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}",
"private String generateToken(Map<String, Object> claims) {\n return Jwts.builder()\n .setClaims(claims)\n .setExpiration(new Date(System.currentTimeMillis() + 700000000))\n .signWith(SignatureAlgorithm.HS512, SECRET)\n .compact();\n }",
"public static String getToken() {\n String token = \"96179ce8939c4cdfacba65baab1d5ff8\";\n return token;\n }",
"public String getToken();",
"public String getSecurityToken()\r\n {\r\n return getAttribute(\"token\");\r\n }",
"public static String createToken(UserDetails userDetails) {\n\t\tlong expires = System.currentTimeMillis() + 1000L * 60 * 30;\n\t\t\n\t\t/* Expires in three Year */\n\t\t//long expiresOneYear = System.currentTimeMillis() + 1000L * 60 * 60 * 24 * 365 *3;\n\t\t\n\t\tStringBuilder tokenBuilder = new StringBuilder();\n\t\ttokenBuilder.append(userDetails.getUsername());\n\t\ttokenBuilder.append(\":\");\n\t\t// set expire time\n\t\ttokenBuilder.append(expires);\n\t\t\n\t\ttokenBuilder.append(\":\");\n\t\t\n\t\ttokenBuilder.append(TokenUtils.computeSignature(userDetails, expires));\n\t\t\n\t\treturn tokenBuilder.toString();\n\t}",
"private void enviarTokenRegistro(String token){\n Log.d(TAG, token);\n }",
"public void storeToken(AuthorizationToken token);",
"public TokenInfo createToken(TokenCoreInfo coreInfo, String password);",
"protected void saveToken(HttpServletRequest request) {\r\n Logger l = LogUtils.enterLog(getClass(), \"saveToken\", request);\r\n\r\n saveToken(request, getTokenConstant());\r\n\r\n l.exiting(getClass().getName(), \"saveToken\");\r\n }",
"private boolean getCSRF()\n throws IOException {\n CookieManager cookieManager = new CookieManager();\n CookieHandler.setDefault(cookieManager);\n HttpURLConnection conn = null;\n\n conn = (HttpURLConnection) url.openConnection();\n\n conn.setUseCaches(false); // Don't use a Cached Copy\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Connection\", \"Keep-Alive\");\n conn.getContent();\n conn.disconnect();\n\n /// parse the returned object for the CSRF token\n CookieStore cookieJar = cookieManager.getCookieStore();\n List<HttpCookie> cookies = cookieJar.getCookies();\n String csrf = null;\n for (HttpCookie cookie : cookies) {\n Log.d(\"cookie\", \"\" + cookie);\n if (cookie.getName().equals(\"csrftoken\")) {\n csrf = cookie.getValue();\n break;\n }\n }\n if (csrf == null) {\n Log.d(MainActivity.TAG, \"Unable to get CSRF\");\n return false;\n }\n Log.d(MainActivity.TAG, \"Received cookie: \" + csrf);\n\n addFormField(\"csrfmiddlewaretoken\", csrf);\n return true;\n }",
"public CustomCsrfTokenImpl(String headerName, String parameterName, String token) {\r\n\t\tAssert.hasLength(headerName, \"headerName cannot be null or empty\");\r\n\t\tAssert.hasLength(parameterName, \"parameterName cannot be null or empty\");\r\n\t\tAssert.hasLength(token, \"token cannot be null or empty\");\r\n\t\tthis.headerName = headerName;\r\n\t\tthis.parameterName = parameterName;\r\n\t\tthis.token = token;\r\n\t}",
"@RequestMapping(value = \"/api/v1/token\", method = RequestMethod.POST, produces = \"application/json\", consumes = \"application/json\")\r\n\t@ResponseBody\r\n\tpublic Map<String, String> createToken(@RequestBody(required = true) NewToken newToken) {\r\n\t\tAccount account = accountManager.getAccountByEmail(newToken.getEmail().toLowerCase(), true);\r\n\r\n\t\tif (null == account) {\r\n\t\t\tthrow new BadCredentialsException(\"No such account.\");\r\n\t\t}\r\n\t\tif (!passwordEncoder.matches(newToken.getPassword(), account.getPassword())) {\r\n\t\t\tthrow new BadCredentialsException(\"Invalid password.\");\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tString tokenText = accountManager.addToken(account, newToken.getDeviceName(),\r\n\t\t\t\t\tnewToken.getDeviceIdentifier());\r\n\r\n\t\t\treturn Collections.singletonMap(\"auth-token\", tokenText);\r\n\t\t} catch (ModificationException e) {\r\n\t\t\tthrow new BadCredentialsException(\"Could not authenticate user.\");\r\n\t\t}\r\n\t}",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"private String createAuthToken(User user) {\n // create new Auth Token\n String authToken = userAuthenticationService.generateToken();\n\n // store the token\n userAuthenticationService.storeAuthToken(user, authToken);\n return authToken;\n }",
"private static OAuth2Token createFactory() {\n\t\tOAuth2Token token = null;\n\t\tConfigurationBuilder cb = configure();\n\t\t\n\t\ttry {\n\t\t\ttoken = new TwitterFactory(cb.build()).getInstance().getOAuth2Token();\n\t\t} catch (TwitterException e) {\n\t\t\tSystem.out.println(\"Error getting OAuth2 token!\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\treturn token;\n\t}",
"private String doGenerateToken(Map<String, Object> claims, String subject) {\n\t\treturn Jwts.builder()\n\t\t\t\t .setClaims(claims)\n\t\t\t\t .setSubject(subject)\n\t\t\t\t .setIssuedAt(new Date(System.currentTimeMillis()))\n\t\t\t\t .setExpiration(new Date(System.currentTimeMillis() + JWT_TOKEN_VALIDITY * 1000))\n\t\t\t\t .signWith(SignatureAlgorithm.HS512, secret)\n\t\t\t\t .compact();\n\t}",
"public String generateToken(Authentication authentication) {\n\t\tUser user=(User) authentication.getPrincipal();\t//Get user being authenticated (configured in security config)\n\t\tString userId= Long.toString(user.getId());\n\t\tDate now= new Date(System.currentTimeMillis());\n\t\tDate expiryTime= new Date(now.getTime()+SecurityConstants.TOKEN_EXPIRY);\n\t\t\n\t\tMap<String, Object> claims= new HashMap<>();\n\t\tclaims.put(\"id\", userId);\n\t\tclaims.put(\"username\", user.getUsername());\n\t\tclaims.put(\"fullname\", user.getFullName());\n\t\t//Role (IF IMPLEMENTED)\n\t\t\n\t\treturn Jwts.builder()\n\t\t\t\t.setSubject(userId)\n\t\t\t\t.setClaims(claims)\n\t\t\t\t.setIssuedAt(now)\n\t\t\t\t.setExpiration(expiryTime)\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, SecurityConstants.SECRET)\n\t\t\t\t.compact();\n\t}",
"RequestToken getOAuthRequestToken() throws MoefouException;",
"public String generateToken(UserDetails userDetails) {\n\t\tMap<String, Object> claims = new HashMap<>();\n\t\treturn createToken(claims, userDetails.getUsername());\n\t}",
"private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }",
"public static String createToken(int userId) {\n String tokenRaw = userId + \"_\" + UUID.randomUUID().toString().replace(\"-\", \"\");\n return encryptedByMD5(tokenRaw);\n }",
"@VisibleForTesting\n protected EzSecurityToken getSecurityToken() {\n if (new EzProperties(getConfigurationProperties(), true).getBoolean(\"ezbake.security.fake.token\", false)) {\n return ThriftTestUtils.generateTestSecurityToken(applicationSecurityId, applicationSecurityId, Lists.newArrayList(\"U\"));\n } else {\n try {\n return securityClient.fetchAppToken();\n } catch (Exception ex) {\n logger.error(\"Failed to get security token for INS\", ex);\n throw new RuntimeException(ex);\n }\n }\n }",
"@RequestMapping(\"/generateToken\")\n @ApiOperation(value = \"Generates the JWT\", httpMethod = \"POST\")\n public ServiceResponse<String> generateToken(@RequestBody ServiceRequest<String> serviceRequest,\n HttpServletResponse response) {\n ServiceResponse<String> serviceResponse = new ServiceResponse<>();\n try {\n checkParameter(serviceRequest);\n long sixMinutes = 6 * 1000 * 60;\n String token = securityService.generateToken(serviceRequest.getParameter(), sixMinutes);\n handleResponse(serviceResponse, token, response);\n } catch (Exception e) {\n exceptionHandler.handleControllerException(serviceResponse, serviceRequest, e, getMethodName(), response);\n }\n return serviceResponse;\n }",
"public String createToken(Map<String, Object> claims, String subject) {\n\t\t\n\t\tSystem.out.println(\"encoded :: \"+Base64.getEncoder().encode(SECERATE_KEY.getBytes()));\n\t\treturn Jwts.builder().setClaims(claims).setSubject(subject)\n\t\t\t\t.setIssuedAt(new Date(System.currentTimeMillis()))\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis() +1000 * 60 * 60 * 10))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, Base64.getEncoder().encode(SECERATE_KEY.getBytes())).compact();\n\t}",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String toToken(JwtClaims claims, SecretKey key);",
"public void generateToken(String uri) {\n this.token = \"sandbox\";\n }",
"public UserAuthToken createUser(CreateUserRequest request);",
"public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return jwtUtil.generateJwtToken(authentication);\n }",
"public static String generateToken(String cookie, String url, String method, long currentTimeSecs) {\n String data = url + \" \" + method + \" \" + currentTimeSecs;\n byte[] hmac;\n try {\n hmac = computeSHA1HMac(data, cookie);\n } catch (GeneralSecurityException e) {\n throw new RuntimeException(\"Security exception - \" + e.getMessage());\n }\n return Base64.encodeWebSafe(hmac, true);\n }",
"private String doGenerateToken(Map<String, Object> claims, String subject) {\n\n\t\treturn Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis() + expiration * 1000))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, secret).compact();\n\t}",
"public static String urlSafeRandomToken() {\n SecureRandom random = new SecureRandom();\n byte bytes[] = new byte[20];\n random.nextBytes(bytes);\n Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();\n String token = encoder.encodeToString(bytes);\n return token;\n }",
"@Transactional\n public UserToken generateToken() {\n if (!firebaseService.canProceed())\n return null;\n\n try {\n Optional<UserAuth> userOptional = Auditor.getLoggedInUser();\n if (!userOptional.isPresent()) return UNAUTHENTICATED;\n UserAuth user = userOptional.get();\n Map<String, Object> claims = new HashMap<>();\n claims.put(\"type\", user.getType().toString());\n claims.put(\"department\", user.getDepartment().getName());\n claims.put(\"dean_admin\", PermissionManager.hasPermission(user.getAuthorities(), Role.DEAN_ADMIN));\n String token = FirebaseAuth.getInstance().createCustomTokenAsync(user.getUsername(), claims).get();\n return fromUser(user, token);\n } catch (InterruptedException | ExecutionException e) {\n return UNAUTHENTICATED;\n }\n }",
"@PostMapping(value = \"/{userId}\", produces = \"application/json\")\n public ResponseEntity<TokenDto> getToken(@PathVariable @UserValidator String userId){\n return createResponse(\n TokenDto.builder().token(tokenService.getToken(userId)).build(),\n HttpStatus.CREATED\n );\n }",
"public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }",
"public JWTCreator.Builder toSign(JWTCreator.Builder token) {\n token.withClaim(makeIngressDatapathRef(), source.getLong());\n token.withClaim(makeIngressPortRef(), ingressPortNumber);\n token.withClaim(makeEgressDatapathRef(), dest.getLong());\n token.withClaim(makePingIdRef(), pingId.toString());\n\n token.withClaim(makeIngressLatencyRef(), getSenderLatency());\n sendTime = System.currentTimeMillis();\n token.withClaim(makeTimestampRef(), sendTime);\n\n return token;\n }",
"public interface AesTokenCreationStrategy {\n\n /**\n * Creates a token based on the provided claims and the AES key used for the content encryption\n *\n * @param claims to be represented in the token\n * @param key the base64 encoded AES key\n * @return assembled token\n */\n String toToken(JwtClaims claims, SecretKey key);\n}",
"public Token() {\n mTokenReceivedDate = new Date();\n }",
"Pokemon.RequestEnvelop.AuthInfo.JWT getToken();",
"public static Result token(String body) {\n\t\t\r\n\t\tArrayList<String> data = new Gson().fromJson(body, ArrayList.class);\r\n\t\tif(data == null) {\r\n\t\t\treturn new BadRequest(\"No payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tString token = data.get(0);\r\n\t\tif(token == null || token.trim().equals(\"\")) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\r\n\t\tString uname = data.get(1);\r\n\t\tif(uname == null || uname.trim().equals(\"\")) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tUser loggedUser = User.find(\"byUsername\", uname).first();\r\n\t\tif (loggedUser == null) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!CsrfTokenUtils.checkToken(uname, token)) {\r\n\t\t\treturn new BadRequest(\"Invalid token\");\r\n\t\t}\r\n\r\n\t\tLong msgNum = userMsgNum.get(loggedUser.username);\r\n\t\tif(msgNum == null) {\r\n\t\t\tloggedUser.msgNum = 0L;\r\n\t\t\tuserMsgNum.put(loggedUser.username, loggedUser.msgNum);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tloggedUser.msgNum = Long.parseLong(msgNum.toString());\r\n\t\t}\r\n\r\n\t\tsession.put(\"user\", loggedUser.username);\r\n\t\tsession.put(\"userRole\", loggedUser.role.name);\r\n\t\tsession.put(\"userMsgNum\", loggedUser.msgNum);\r\n\t\t\r\n\t\ttoken = JWTUtils.generateJWT(loggedUser.username);\r\n\t\tString json = \"{\\\"role\\\": \\\"\" + loggedUser.role.name\r\n\t\t\t\t\t\t+ \"\\\", \\\"username\\\": \\\"\" + loggedUser.username\r\n\t\t\t\t\t\t+ \"\\\", \\\"msgNum\\\": \" + loggedUser.msgNum\r\n\t\t\t\t\t\t+ \", \\\"token\\\": \\\"\" + token + \"\\\"}\";\r\n\t\treturn new RenderText(json);\r\n\t}",
"private String prepareSecurityToken() {\r\n\t\tint time = ((int) System.currentTimeMillis() % SECURITY_TOKEN_TIMESTAMP_RANGE);\r\n\t\treturn String.valueOf(time + (new Random().nextLong() - SECURITY_TOKEN_TIMESTAMP_RANGE));\r\n\t}",
"@Override\n public String createJwtToken(String userId) {\n Calendar expiration = Calendar.getInstance();\n expiration.roll(Calendar.HOUR, 1);\n \n HashMap<String, Object> claims = new HashMap<>();\n claims.put(\"http://tapkey.net/oauth/token_exchange/client_id\", oauthClientId);\n\n return Jwts.builder()\n .addClaims(claims)\n .setSubject(userId)\n .setAudience(identityProviderAudience)\n .setIssuer(identityProviderIssuer)\n .setIssuedAt(new Date())\n .setExpiration(expiration.getTime())\n .signWith(keyService.getPrivateKey(), SignatureAlgorithm.RS256)\n .compact();\n }",
"public TokenTO generateToken(UserTO user) {\n TokenTO res;\n\n res = mgrToken.createToken(Crypto.generateToken() + Crypto.generateToken());\n mgrToken.save(res);\n user.setToken(res);\n getDao().update(user);\n\n return res;\n }",
"private String generateVerificationToken(User user) {\n String token = UUID.randomUUID().toString();\n VerificationToken verificationToken = new VerificationToken();\n verificationToken.setToken(token);\n verificationToken.setUser(user);// after that we save it to repository\n verificationTokenRepository.save(verificationToken);\n return token;\n }",
"public Token() {\n token = new Random().nextLong();\n }",
"public String createResetToken() {\n String uuid = UUID.randomUUID().toString();\n setResetToken(uuid);\n return uuid;\n }",
"public TemplexTokenMaker() {\r\n\t\tsuper();\r\n\t}",
"public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n if (tokenBuilder_ == null) {\n return token_;\n } else {\n return tokenBuilder_.getMessage();\n }\n }",
"public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n return token_;\n }",
"public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }",
"public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }",
"public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }",
"public static String generateToken(UserIdentity domainUser) {\n \t\n \tlong nowMillis = System.currentTimeMillis();\n Date now = new Date(nowMillis);\n \t\n Claims claims = Jwts.claims()\n \t\t.setSubject(domainUser.getUserName() )\n \t\t.setIssuer(\"RAP\")\n \t\t.setIssuedAt(now)\n \t\t.setAudience(\"backoffice\");\n claims.put(\"idmToken\", domainUser.getToken());\n\n long expMillis = nowMillis + (15 * ONE_MINUTE_IN_MILLIS); // set JWT to expire in 15 minutes.\n Date exp = new Date(expMillis);\n \n return Jwts.builder()\n .setClaims(claims)\n .signWith(SignatureAlgorithm.HS512, JwtUtils.jwtSecret)\n .setExpiration(exp)\n .compact();\n }",
"public Token() {\n }",
"public void validarToken() {\r\n\t\ttry {\r\n\t\t\tif (getToken() == null || getToken().trim().isEmpty())\r\n\t\t\t\tMensaje.crearMensajeWARN(\"Debe ingresar su token para continuar.\");\r\n\t\t\telse if (!mngRes.verificarTokenEstudiante(getEstudiante().getId(), getToken()))\r\n\t\t\t\tMensaje.crearMensajeWARN(\"Su token es incorrecto. Verifíquelo.\");\r\n\t\t\telse {\r\n\t\t\t\treserva = mngRes.buscarReservaPorID(getDniEstudiante(), periodo.getPrdId());\r\n\t\t\t\tif (reserva != null && reserva.getResEstado().equals(Funciones.estadoFinalizado))\r\n\t\t\t\t\tMensaje.crearMensajeWARN(\"Usted ya posee una reserva finalizada:\");\r\n\t\t\t\telse {\r\n\t\t\t\t\ttokenOk = true;\r\n\t\t\t\t\tmayorEdad = Funciones.mayorDeEdad(getEstudiante().getMatFechaNacimiento());\r\n\t\t\t\t\tcargarSitiosLibres();\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('dlgtoken').hide();\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetToken(\"\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tMensaje.crearMensajeERROR(\"Error al validar token: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"void putToken(String name, String value);",
"Mono<GenericToken> getToken();",
"com.google.protobuf.ByteString\n getTokenBytes();",
"protected UsernamePasswordAuthenticationToken getAuthRequest(HttpServletRequest request) {\n\t\tString username = request.getParameter(\"username\");\n\t\tString password = request.getParameter(\"password\");\n\t\treturn new UsernamePasswordAuthenticationToken(username , password);\n\t}",
"public Token() {\n }",
"String generateUserRequestToken(String username, Collection<String> authorities);",
"public static String generateToken() {\n return new Generex(PatternValidator.TOKEN_PATTERN).random();\n }",
"private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }",
"public String newToken(){\n String line = getLine(lines);\n String token = getToken(line);\n return token;\n }",
"String setRememberToken(HttpServletRequest request, HttpServletResponse response, String password, int maxAge, String domain, String path);",
"private CompleteTokenDefinition createNewToken(\r\n\t\t\tConcreteSyntax syntax,\r\n\t\t\tAntlrTokenDerivator tokenDerivator, \r\n\t\t\tPlaceholderInQuotes placeholder) {\r\n\t\t// a token definition must be created\r\n\t\tQuotedTokenDefinition newToken = ConcretesyntaxFactory.eINSTANCE.createQuotedTokenDefinition();\r\n\t\t\r\n\t\tString name = tokenDerivator.deriveTokenName(placeholder);\r\n\t\tnewToken.setName(name);\r\n\t\t\r\n\t\tString expression = tokenDerivator.deriveTokenExpression(placeholder);\r\n\t\tnewToken.setSynthesizedRegex(expression);\r\n\t\t\r\n\t\tnewToken.setPrefix(placeholder.getNormalizedPrefix());\r\n\t\tnewToken.setSuffix(placeholder.getNormalizedSuffix());\r\n\t\tnewToken.setEscapeCharacter(placeholder.getNormalizedEscapeCharacter());\r\n\t\t\r\n\t\tsyntax.getSyntheticTokens().add(newToken);\r\n\t\treturn newToken;\r\n\t}"
] | [
"0.730258",
"0.6682445",
"0.6484944",
"0.6449138",
"0.62398016",
"0.6025924",
"0.60201746",
"0.5991968",
"0.59345937",
"0.5922273",
"0.5919104",
"0.5859421",
"0.5803793",
"0.57551223",
"0.57352555",
"0.56787395",
"0.5664286",
"0.5652139",
"0.56496507",
"0.5625408",
"0.5598714",
"0.5598418",
"0.5597575",
"0.5515445",
"0.5455729",
"0.5437361",
"0.5435301",
"0.5408677",
"0.5387734",
"0.5382988",
"0.53826743",
"0.53280157",
"0.53276324",
"0.530472",
"0.528856",
"0.52806646",
"0.5277921",
"0.527295",
"0.527295",
"0.527295",
"0.527295",
"0.527295",
"0.527295",
"0.5261502",
"0.5257658",
"0.5250207",
"0.52304226",
"0.522317",
"0.52228796",
"0.5216859",
"0.5198462",
"0.5193699",
"0.5188718",
"0.51858205",
"0.5180227",
"0.5180227",
"0.5180227",
"0.5180227",
"0.5180227",
"0.5176548",
"0.51722586",
"0.5147906",
"0.5136105",
"0.5129198",
"0.5123209",
"0.5111252",
"0.5108864",
"0.50831103",
"0.50825435",
"0.50778383",
"0.50765455",
"0.5053608",
"0.5048583",
"0.504446",
"0.5041174",
"0.50120515",
"0.5001809",
"0.49964127",
"0.49729633",
"0.49666214",
"0.49437544",
"0.49399993",
"0.49375567",
"0.4935486",
"0.4935486",
"0.4935486",
"0.49320543",
"0.49195656",
"0.4915186",
"0.49150643",
"0.49090075",
"0.49062374",
"0.4886952",
"0.48860672",
"0.48836306",
"0.48818594",
"0.4878928",
"0.48769093",
"0.48658055",
"0.48585138"
] | 0.5701913 | 15 |
validate blacklist path and validate token, collect blackList path and update needVaildate when token validate failed. | public boolean isTokenValid(String actionUrl, String fuseaction, String displayAction, String user,
String reqToken, String isAddBlackList, String currentUrl, String refererUrl)
{
boolean flag = Boolean.TRUE;
try
{
// when first use this method, init blackList cache data.
if (m_CSRFBlackList.size() == 0)
{
this.initCSRFBlackListCache(null);
// this.initCSRFBlackListFromFileCache();
}
// get blackList from cache
String flagStr = SystemConfigCacheHelper.getInstance().getCSRFBlackListCache(
actionUrl + "_" + fuseaction + "_" + displayAction);
// current URL not exists in blackList Cache
if (flagStr == null)
{
CSRFBlackListService service = this.getCSRFBlackListService();
// current URL exists in blackList database, add this record to cache
if (service.isExistBlackList(actionUrl, fuseaction, displayAction, NEED_VALIDATE))
{
flagStr = NEED_VALIDATE;
SystemConfigCacheHelper.getInstance().putCSRFBlackListCache(
actionUrl + "_" + fuseaction + "_" + displayAction, NEED_VALIDATE);
}
else
{
// auto collect blackList path
if ("true".equals(isAddBlackList))
{
// service.addBlackList(actionUrl, fuseaction, displayAction, user);
service.addBlackList(new CSRFBlackListModel(actionUrl, fuseaction, displayAction, user));
SystemConfigCacheHelper.getInstance().putCSRFBlackListCache(
actionUrl + "_" + fuseaction + "_" + displayAction, NEED_VALIDATE);
}
else
{
// current URL not is blackList
SystemConfigCacheHelper.getInstance().putCSRFBlackListCache(
actionUrl + "_" + fuseaction + "_" + displayAction, NOT_NEED_VALIDATE);
}
}
}
if (NEED_VALIDATE.equals(flagStr))
{
// validate current URL token
flag = tokensManager.isTokenExistAndRemove(reqToken);
// auto update blackList validate status when token validate failed
if (!flag)
{
this.getCSRFBlackListService().updateBlackListValidate(actionUrl, fuseaction, displayAction,
user, NOT_NEED_VALIDATE, currentUrl, refererUrl);
flag = Boolean.TRUE;
logger.error("CSRF token validate failed, url: " + actionUrl + " fuseaction: " + fuseaction
+ " displayAction: " + displayAction);
}
}
}
catch (Exception re)
{
logger.throwing(CSRFBlackListClient.class.getName(), "isTokenValid", re);
return Boolean.FALSE;
}
return flag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void checkToken(String token) throws InvalidTokenException;",
"public void testBlacklist(){\n this.exp = new Experiment(\"foo\");\n assertEquals(\"Wrong size blacklist\", 0, this.exp.getBlacklist().size());\n ArrayList<String> mid_array = new ArrayList<>();\n ArrayList<String> temp_array;\n for (int i=0; i<30; i++){\n this.exp.addToBlacklist(\"\"+i);\n if (i == 20){\n temp_array = this.exp.getBlacklist();\n for (int j=0; j<temp_array.size(); j++){\n mid_array.add(temp_array.get(j));\n }\n assertEquals(\"getblacklist broken\", 21, mid_array.size());\n assertEquals(\"Wrong size blacklist\", 21, this.exp.getBlacklist().size());\n assertEquals(\"blacklist IN broken\", true, this.exp.isBlacklisted(\"3\"));\n this.exp.delFromBlacklist(\"3\");\n this.exp.delFromBlacklist(\"4\");\n assertEquals(\"del blacklist broken\", 19, this.exp.getBlacklist().size());\n assertEquals(\"blacklist IN broken\", false, this.exp.isBlacklisted(\"3\"));\n this.exp.addManyBlacklist(mid_array);\n assertEquals(\"Add blacklist broken\", 21, this.exp.getBlacklist().size());\n\n }\n }\n this.exp.addToBlacklist(\"31\");\n assertEquals(\"add blacklist broken\", 31, this.exp.getBlacklist().size());\n this.exp.delManyBlacklist(mid_array);\n assertEquals(\"del blacklists broken\", 10, this.exp.getBlacklist().size());\n\n }",
"@Scheduled(fixedRate = checkRate)\n public void CheckValidated() {\n log.info(\"Checking if links still valid and alive\");\n try{\n for(ShortURL s : urlList) {\n UrlValidatorAndCheckerImpl urlValidatorAndChecker = new UrlValidatorAndCheckerImpl(s.getTarget());\n if(!urlValidatorAndChecker.execute()){\n log.info(\"URL {} dead or not valid anymore.\", s.getTarget());\n s.setMode(HttpStatus.GONE.value());\n } else{\n s.setMode(HttpStatus.TEMPORARY_REDIRECT.value());\n }\n }\n } catch( NullPointerException e) {\n //No se ha inicializado aun\n }\n }",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"private void validate(Path path) {\n }",
"public void validarToken() {\r\n\t\ttry {\r\n\t\t\tif (getToken() == null || getToken().trim().isEmpty())\r\n\t\t\t\tMensaje.crearMensajeWARN(\"Debe ingresar su token para continuar.\");\r\n\t\t\telse if (!mngRes.verificarTokenEstudiante(getEstudiante().getId(), getToken()))\r\n\t\t\t\tMensaje.crearMensajeWARN(\"Su token es incorrecto. Verifíquelo.\");\r\n\t\t\telse {\r\n\t\t\t\treserva = mngRes.buscarReservaPorID(getDniEstudiante(), periodo.getPrdId());\r\n\t\t\t\tif (reserva != null && reserva.getResEstado().equals(Funciones.estadoFinalizado))\r\n\t\t\t\t\tMensaje.crearMensajeWARN(\"Usted ya posee una reserva finalizada:\");\r\n\t\t\t\telse {\r\n\t\t\t\t\ttokenOk = true;\r\n\t\t\t\t\tmayorEdad = Funciones.mayorDeEdad(getEstudiante().getMatFechaNacimiento());\r\n\t\t\t\t\tcargarSitiosLibres();\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('dlgtoken').hide();\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetToken(\"\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tMensaje.crearMensajeERROR(\"Error al validar token: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Private\npublic interface BlacklistManager {\n\n /**\n * Report failure of a container on node.\n * @param node that has a container failure\n */\n void addNode(String node);\n\n /**\n * Get {@link ResourceBlacklistRequest} that indicate which nodes should be\n * added or to removed from the blacklist.\n * @return {@link ResourceBlacklistRequest}\n */\n ResourceBlacklistRequest getBlacklistUpdates();\n\n /**\n * Refresh the number of NodeManagers available for scheduling.\n * @param nodeHostCount is the number of node hosts.\n */\n void refreshNodeHostCount(int nodeHostCount);\n}",
"public static void Hash_Blacklist(File directory, File directory1){\n\t\tfor (final File file : directory.listFiles()) {\n\t\t\tDomain_Doc_Array.add(file.getPath());\n\t\t}\n\t\t//File directory1 = new File(\"Blacklist/URL\");\n\t\tfor (final File file1 : directory1.listFiles()) {\n\t\t\tURL_Doc_Array.add(file1.getPath());\n\t\t}\n\t\ttry{\n\n\t\t\tfor (int docno = 0; docno <URL_Doc_Array.size(); docno++ ){\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(URL_Doc_Array.get(docno)));\n\t\t\t\tString line;\n\t\t\t\twhile ((line = br.readLine()) != null){\n\n\t\t\t\t\tBlacklist_Domain.put(line, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry{\n\n\t\t\tfor (int docno = 0; docno <Domain_Doc_Array.size(); docno++ ){\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(Domain_Doc_Array.get(docno)));\n\t\t\t\tString line;\n\t\t\t\twhile ((line = br.readLine()) != null){\n\n\t\t\t\t\tBlacklist_URL.put(line, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t\n\t}",
"public Blacklist getBlacklist() {\n return blacklist;\n }",
"@Override\n\tboolean validate(Vector<String> tokens) {\n\t\treturn false;\n\t}",
"@POST\n\t @Produces(\"application/json\")\n\t @Path(\"/validateToken\")\n\t public Response validateToken(@HeaderParam(\"Authorization\") String token){\n\t\t String result=\"\";\n\t\t String Role=\"Visitor\";\n\t\t boolean isValid=false;\n\t\t TokenFactory tokens= listBook.tokens;\n\t\t JSONObject jsonObject= new JSONObject(); \n\t\t System.out.println(token);\n\t\t JSONObject verifyToken =tokens.tokenConsume(token);\n\t\t if(verifyToken.length()>1){\n\t\t\t\t try {\n\t\t\t\t\tif(verifyToken.getInt(\"ID\")>0){\n\t\t\t\t\t\tisValid=true;\n\t\t\t\t\t\tHashMap<String,String> memberData = new HashMap<String,String>();\n\t\t\t\t\t\tmemberData.put(\"ID_Member\", verifyToken.getInt(\"ID\")+\"\");\n\t\t\t\t\t\tmemberData.put(\"Role\", verifyToken.getString(\"Role\")); \n\t\t\t\t\t\tif(retrieveMember(memberData).length()>0){\n\t\t\t\t\t\t\tRole=verifyToken.getString(\"Role\");\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t\t \t\t\t \n\t\t\ttry {\n\t\t\t\tjsonObject.put(\"isValid\", isValid);\n\t\t\t\tjsonObject.put(\"Role\", Role);\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresult=jsonObject+\"\";\n\t\t\treturn listBook.makeCORS(Response.status(200), result);\t\n \t }",
"public void processToken(String token) {\n \n // Create an int with an id of currentTokenLength and set it equal to the token.length()\n int currentTokenLength = token.length();\n processTokenHelper(currentTokenLength);\n\n /**\n * Create an int with an id of tokenLengthReps and set it equal to \n * tokenSizes.get(currentTokenLength);\n */\n int tokenLengthReps = tokenSizes.get(currentTokenLength);\n\n /**\n * Create an if statement that will determine if the tokenLength is \n * larger than the maximumSize int variable\n */\n if (tokenLengthReps > maximumSize) {\n maximumSize = tokenSizes.get(currentTokenLength);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public BlackListDirFilter(final FileSystem fs, final List<String> directoryNameBlackList) {\n this.fs = fs;\n blacklist = (List<String>) (directoryNameBlackList == null\n ? Collections.emptyList()\n : directoryNameBlackList);\n }",
"public boolean isTokenValid(String actionUrl, String fuseaction, String displayAction, String reqToken)\r\n\t\t\tthrows AAException\r\n\t{\r\n\t\t// when first use this method, init blackList cache data.\r\n\t\tif (m_CSRFBlackList.size() == 0) \r\n\t\t{\r\n//\t\t\tthis.initCSRFBlackListCache(NEED_VALIDATE);\r\n\t\t\tthis.initCSRFBlackListFromFileCache();\r\n\t\t}\r\n\r\n\t\tboolean flag = Boolean.TRUE;\r\n\t\tif (NEED_VALIDATE.equals(SystemConfigCacheHelper.getInstance().getCSRFBlackListCache(\r\n\t\t\tactionUrl + \"_\" + fuseaction + \"_\" + displayAction)))\r\n\t\t{\r\n\t\t\t// validate token\r\n\t\t\tif (!tokensManager.isTokenExistAndRemove(reqToken))\r\n\t\t\t{\r\n\t\t\t\tflag = Boolean.FALSE;\r\n\t\t\t\tlogger.error(\"CSRF token validate failed, url: \" + actionUrl + \" fuseaction: \" + fuseaction\r\n\t\t\t\t\t\t+ \" displayAction: \" + displayAction);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn flag;\r\n\t}",
"@JsonProperty(\"blacklistUnsafeTokens\")\n public void setBlacklistUnsafeTokens(Boolean blacklistUnsafeTokens) {\n this.blacklistUnsafeTokens = blacklistUnsafeTokens;\n }",
"protected void updateTokens(){}",
"private void refreshTokenPool() {\n \n\t\tfor (Map.Entry<String, Token> entry : tokenPool.entrySet()) {\t\n\t\t\tToken token = entry.getValue();\n\t\t\tString key = entry.getKey();\n\t\t\tif(token.getExpiry() <= getTimeStampMilliSeconds()) {\n\t\t\t\ttokenPool.remove(key);\n\t\t\t\t//check if it is in live list and remove it\n\t\t\t\tif(liveTokenList.contains(key)) {\n\t\t\t\t\tremoveKeyFromTokenList(key);\n\t\t\t\t}\n\t\t //Add the token if it has never been live or if the current time is more than the last use + the rate \n\t\t\t} else if(token.getLastlive() == 0 || (getTimeStampMilliSeconds() >= token.getLastUsed()+token.getRate())) {\n//\t\t\t\tlogger.info(\"MAKE-LIVE : \" + (token.getLastlive()+token.getRate()) + \", : time : \" + getTimeStampMilliSeconds() + \", last used : \" + token.getLastUsed());\n\t\t\t\tif(!liveTokenList.contains(key)) {\n\t\t\t\t\taddKeyToTokenList(key);\n\t\t\t\t\ttoken.setLastlive(getTimeStampMilliSeconds());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void rejects_invalid_racer() {\n }",
"protected OAuth2ClientApplicationDTO findOAuthConsumerIfTokenIsValid(OAuth2TokenValidationRequestDTO requestDTO) {\n OAuth2TokenValidationService oAuth2TokenValidationService = new OAuth2TokenValidationService();\n return oAuth2TokenValidationService.findOAuthConsumerIfTokenIsValid(requestDTO);\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:14:32.628 -0400\", hash_original_method = \"640D2755ED806484D55C588F11F80004\", hash_generated_method = \"C727CA6A408327EA311C09973186FF62\")\n \n public static boolean addToBlacklistCommand(String bssid){\n \tdouble taintDouble = 0;\n \ttaintDouble += bssid.getTaintInt();\n \n \treturn ((taintDouble) == 1);\n }",
"protected void validateRefreshRequest() {\n\t\tcallAndStopOnFailure(EnsureScopeInRefreshRequestContainsNoMoreThanOriginallyGranted.class, \"RFC6749-6\");\n\t\tcallAndStopOnFailure(ValidateRefreshToken.class, \"RFC6749-6\");\n\t}",
"private boolean isPathInWhiteList(String requestPath) {\n\t\tif (requestPath.equals(HOME_PATH))\r\n\t\t\treturn true;\r\n\r\n\t\tfor (String urlPatternItem : EXCLUDED_URLS) {\r\n\t\t\tif (requestPath.contains(urlPatternItem)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Scheduled(fixedRate = 30 * 60 * 1000)\n public void CheckSafe() {\n log.info(\"Checking if links still safe\");\n try {\n googleSafeBrowsingUrlVerifier = new GoogleSafeBrowsingUrlVerifier();\n for(ShortURL s : urlList) {\n if(!googleSafeBrowsingUrlVerifier.isSafe(s.getTarget())){\n log.info(\"URL {} not safe anymore.\", s.getTarget());\n s.setSafe(false);\n s.setMode(HttpStatus.GONE.value());\n } else{\n s.setSafe(true);\n s.setMode(HttpStatus.TEMPORARY_REDIRECT.value());\n }\n }\n } catch( NullPointerException e) {\n //No se ha inicializado aun\n }\n }",
"@JsonProperty(\"blacklistUnsafeTokens\")\n public Boolean getBlacklistUnsafeTokens() {\n return blacklistUnsafeTokens;\n }",
"default List<ValidatorIndex> process_registry_updates(MutableBeaconState state) {\n /* Process activation eligibility and ejections\n for index, validator in enumerate(state.validator_registry):\n if validator.activation_eligibility_epoch == FAR_FUTURE_EPOCH and validator.effective_balance >= MAX_EFFECTIVE_BALANCE:\n validator.activation_eligibility_epoch = get_current_epoch(state)\n\n if is_active_validator(validator, get_current_epoch(state)) and validator.effective_balance <= EJECTION_BALANCE:\n initiate_validator_exit(state, index) */\n List<ValidatorIndex> ejected = new ArrayList<>();\n for (ValidatorIndex index : state.getValidatorRegistry().size()) {\n ValidatorRecord validator = state.getValidatorRegistry().get(index);\n if (validator.getActivationEligibilityEpoch().equals(getConstants().getFarFutureEpoch())\n && validator.getEffectiveBalance().greaterEqual(getConstants().getMaxEffectiveBalance())) {\n state.getValidatorRegistry().update(index,\n v -> ValidatorRecord.Builder.fromRecord(v)\n .withActivationEligibilityEpoch(get_current_epoch(state)).build());\n }\n\n if (is_active_validator(validator, get_current_epoch(state))\n && validator.getEffectiveBalance().lessEqual(getConstants().getEjectionBalance())) {\n initiate_validator_exit(state, index);\n ejected.add(index);\n }\n }\n\n /* Queue validators eligible for activation and not dequeued for activation prior to finalized epoch\n activation_queue = sorted([\n index for index, validator in enumerate(state.validator_registry) if\n validator.activation_eligibility_epoch != FAR_FUTURE_EPOCH and\n validator.activation_epoch >= get_delayed_activation_exit_epoch(state.finalized_epoch)\n ], key=lambda index: state.validator_registry[index].activation_eligibility_epoch) */\n List<Pair<ValidatorIndex, ValidatorRecord>> activation_queue = new ArrayList<>();\n for (ValidatorIndex index : state.getValidatorRegistry().size()) {\n ValidatorRecord v = state.getValidatorRegistry().get(index);\n if (!v.getActivationEligibilityEpoch().equals(getConstants().getFarFutureEpoch())\n && v.getActivationEpoch().greaterEqual(get_delayed_activation_exit_epoch(state.getFinalizedEpoch()))) {\n activation_queue.add(Pair.with(index, v));\n }\n }\n activation_queue.sort(Comparator.comparing(p -> p.getValue1().getActivationEligibilityEpoch()));\n int limit = get_churn_limit(state).getIntValue();\n List<Pair<ValidatorIndex, ValidatorRecord>> limited_activation_queue =\n activation_queue.size() > limit ? activation_queue.subList(0, limit) : activation_queue;\n\n /* Dequeued validators for activation up to churn limit (without resetting activation epoch)\n for index in activation_queue[:get_churn_limit(state)]:\n if validator.activation_epoch == FAR_FUTURE_EPOCH:\n validator.activation_epoch = get_delayed_activation_exit_epoch(get_current_epoch(state)) */\n for (Pair<ValidatorIndex, ValidatorRecord> p : limited_activation_queue) {\n if (p.getValue1().getActivationEpoch().equals(getConstants().getFarFutureEpoch())) {\n state.getValidatorRegistry().update(p.getValue0(),\n v -> ValidatorRecord.Builder.fromRecord(v)\n .withActivationEpoch(get_delayed_activation_exit_epoch(get_current_epoch(state)))\n .build());\n }\n }\n\n return ejected;\n }",
"public void setBlacklistTime(long blacklistTime) {\n\t\tthis.blacklistTime = blacklistTime;\n\t}",
"@GetMapping(\"/validateToken\")\n\t@ApiOperation(value = \"Validate token\", notes = \"Validates token \", response = AuthenticationResponse.class)\n\tpublic AuthenticationResponse getValidity(\n\t\t\t@ApiParam(value = \"Token for validation\", required = true) @RequestHeader(\"Authorization\") final String token) {\n\t\tlog.info(\"Token Validation ----->{}\", token);\n\t\treturn validationService.validate(token);\n\t}",
"public void initCSRFBlackListFromFileCache() throws AAException\r\n\t{\r\n\t\tInputStream inputStream = this.getClass().getResourceAsStream(\"aa_sys_csrf_url.properties\");\r\n\t\tProperties props = new Properties();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tprops.load(inputStream);\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\tlogger.error(\"Error load white list from aa_sys_csrf_url.properties\");\r\n\t\t}\r\n\t\tSet<Object> keys = props.keySet();\r\n\t\tfor (Object o : keys)\r\n\t\t{\r\n\t\t\tString key = (String) o;\r\n\t\t\tString value = (String) props.get(o);\r\n\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(key, value);\r\n\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(\"/i18n\" + key, value);\r\n\t\t}\r\n\t}",
"public void processToken(String token) {\n currentTokenLocation++;\n if (foundLocations.containsKey(token)) {\n List<Integer> list = foundLocations.get(token);\n list.add(currentTokenLocation);\n } \n }",
"@SuppressLint(\"CommitPrefEdits\") // Preferences change needs to be synchronous\n public void invalidateToken() {\n preferences.edit().remove(getString(R.string.auth_token)).commit();\n validateToken();\n }",
"@VisibleForTesting\n protected boolean validateToken(EzSecurityToken token) {\n try {\n securityClient.validateReceivedToken(token);\n } catch (EzSecurityTokenException e) {\n logger.error(\"Token validation failed. \", e);\n throw new SecurityException(\"Token failed validation\");\n }\n\n String fromId = token.getValidity().getIssuedTo();\n String toId = token.getValidity().getIssuedFor();\n if (!fromId.equals(toId) && !fromId.equals(deployerSecurityId)) {\n throw new SecurityException(String.format(\n \"This call can only be made from Deployer (%s) or INS services. From: %s - To: %s\",\n deployerSecurityId, fromId, toId));\n }\n\n return true;\n }",
"default void process_slashings(MutableBeaconState state) {\n /* current_epoch = get_current_epoch(state)\n active_validator_indices = get_active_validator_indices(state, current_epoch)\n total_balance = get_total_balance(state, active_validator_indices) */\n EpochNumber current_epoch = get_current_epoch(state);\n List<ValidatorIndex> active_validator_indices = get_active_validator_indices(state, current_epoch);\n Gwei total_balance = get_total_balance(state, active_validator_indices);\n\n /* Compute `total_penalties`\n total_at_start = state.latest_slashed_balances[(current_epoch + 1) % LATEST_SLASHED_EXIT_LENGTH]\n total_at_end = state.latest_slashed_balances[current_epoch % LATEST_SLASHED_EXIT_LENGTH]\n total_penalties = total_at_end - total_at_start */\n Gwei total_at_start = state.getLatestSlashedBalances().get(\n current_epoch.increment().modulo(getConstants().getLatestSlashedExitLength()));\n Gwei total_at_end = state.getLatestSlashedBalances().get(\n current_epoch.modulo(getConstants().getLatestSlashedExitLength()));\n Gwei total_penalties = total_at_end.minus(total_at_start);\n\n /* for index, validator in enumerate(state.validator_registry):\n if validator.slashed and current_epoch == validator.withdrawable_epoch - LATEST_SLASHED_EXIT_LENGTH // 2:\n penalty = max(\n validator.effective_balance * min(total_penalties * 3, total_balance) // total_balance,\n validator.effective_balance // MIN_SLASHING_PENALTY_QUOTIENT\n )\n decrease_balance(state, index, penalty) */\n for (ValidatorIndex index : state.getValidatorRegistry().size()) {\n ValidatorRecord validator = state.getValidatorRegistry().get(index);\n if (validator.getSlashed()\n && current_epoch.equals(\n validator.getWithdrawableEpoch().minus(getConstants().getLatestSlashedExitLength().half()))) {\n Gwei total_penalty_multiplier = UInt64s.min(total_penalties.times(3), total_balance);\n Gwei penalty = UInt64s.max(\n validator.getEffectiveBalance().times(total_penalty_multiplier).dividedBy(total_balance),\n validator.getEffectiveBalance().dividedBy(getConstants().getMinSlashingPenaltyQuotient())\n );\n decrease_balance(state, index, penalty);\n }\n }\n }",
"public boolean validateRefreshToken(String token){\n return refreshTokenRepository.findByToken(token).isPresent();\n }",
"private boolean isRemovableWord(String token) {\n Pattern pattern = Pattern.compile(URL_REGEX);\n Matcher matcher = pattern.matcher(token);\n if (matcher.matches()) {\n return true;\n }\n if (token.length() < MIN_WORD_LENGTH) {\n return true;\n }\n if (token.contains(\"://\")) {\n return true;\n }\n return token.matches(\".*[^\\\\x20-\\\\x7E].*\");\n }",
"public void validate(){\n ArrayList<User> u1 = new ArrayList<User>();\n u1.addAll(Application.getApplication().getUsers());\n u1.add(this);\n\n ArrayList<User> u2 = new ArrayList<User>();\n \n u2.addAll(Application.getApplication().getNonValidatedUsers());\n u2.remove(this);\n\n Application.getApplication().setUsers(u1);\n Application.getApplication().setNonValidatedUsers(u2);\n }",
"public void verifyBugerList()\n\t{\n\t\t\n\t}",
"public List<String> validate()\n {\n List<String> errs = new ArrayList<String>();\n\n if (StringUtils.isEmpty(startingUrl))\n errs.add(\"Missing starting URL.\");\n else\n {\n String[] schemes = {\"http\", \"https\"};\n UrlValidator urlValidator = new UrlValidator(schemes);\n if (!urlValidator.isValid(startingUrl))\n errs.add(\"Invalid starting URL.\");\n }\n\n if (StringUtils.isEmpty(outputPath))\n errs.add(\"Missing output path.\");\n else\n {\n try\n {\n Path path = Paths.get(outputPath);\n File dir = path.toFile();\n if (!dir.exists())\n dir.mkdirs();\n else if (!dir.isDirectory())\n errs.add(\"Output path exists but is not a directory.\");\n }\n catch (Exception ex)\n {\n errs.add(\"Invalid output path or unable to create the directory.\");\n }\n }\n\n if (StringUtils.isEmpty(resultFile))\n errs.add(\"Missing result file.\");\n else if (errs.isEmpty())\n {\n // Only do this check if the output path is valid.\n try\n {\n Paths.get(outputPath, resultFile);\n }\n catch (Exception ex)\n {\n errs.add(\"Invalid result file.\");\n }\n }\n\n if (numThreads < CrawlerImpl.MIN_THREADS)\n numThreads = CrawlerImpl.MIN_THREADS;\n\n if (crawlTimeoutSeconds < MIN_CRAWL_TIMEOUT_SECONDS)\n crawlTimeoutSeconds = MIN_CRAWL_TIMEOUT_SECONDS;\n\n return errs;\n }",
"public void validate() throws ValidationException {\r\n\r\n // unmapped request and image dirs are only used by LC, no validation needed\r\n\r\n // mapped image dir validation\r\n\r\n File useDir = (mapImageDir != null) ? mapImageDir : imageDir;\r\n\r\n // expand file into ascending list of files\r\n LinkedList list = new LinkedList();\r\n while (useDir != null) {\r\n list.addFirst(useDir);\r\n useDir = useDir.getParentFile();\r\n }\r\n\r\n // the first must be the UNC marker; cf. FileMapper.getRoot\r\n if ( ! ((File) list.removeFirst()).getPath().equals(\"\\\\\\\\\") ) throw new ValidationException(Text.get(this,\"e6\"));\r\n\r\n // the second is the UNC share name\r\n if (list.isEmpty()) throw new ValidationException(Text.get(this,\"e7\"));\r\n list.removeFirst();\r\n // no validation here; it can contain at least IP dots, possibly more\r\n\r\n // the rest must satisfy the strict rule\r\n while ( ! list.isEmpty() ) {\r\n File file = (File) list.removeFirst();\r\n if (ruleStrict.matcher(file.getName()).find()) throw new ValidationException(Text.get(this,\"e8\"));\r\n }\r\n\r\n // other validations\r\n\r\n if (ruleAlpha.matcher(prefix).find()) throw new ValidationException(Text.get(this,\"e3\"));\r\n\r\n if (useDigits < NDIGIT_ORDER_MIN) throw new ValidationException(Text.get(this,\"e4\",new Object[] { Convert.fromInt(NDIGIT_ORDER_MIN) }));\r\n\r\n if (prefix.length() + useDigits > NDIGIT_TOTAL_MAX) throw new ValidationException(Text.get(this,\"e5\",new Object[] { Convert.fromInt(NDIGIT_TOTAL_MAX) }));\r\n\r\n MappingUtil.validate(mappings);\r\n }",
"private void validateRights() {\n\n aRightsMapperUpdated = new ArrayList<>();\n aRightsMapperUpdated.clear();\n if (processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.tor_creation))) {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.PNC)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n } else if ((processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.stop_process)))\n || (processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.crime)))) {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n } else {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.PNC)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.ATHENA)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.STOPS)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n }\n }",
"private List<String> validateBUserToRegisterDto(BUserToRegisterDto bUserToRegisterDto){\n\t\tList<String> res = new ArrayList<>();\n\t\tif(bUserToRegisterDto==null){\n\t\t\tres.add(\"The new BUser cannot be null\");\n\t\t}else{\n\t\t\tif(bUserToRegisterDto.getUsername()==null || bUserToRegisterDto.getUsername().trim().equals(\"\")){\n\t\t\t\tres.add(\"The file Username cannot be null\");\n\t\t\t}else{\n\t\t\t\tBUser bUser = findByUsername(bUserToRegisterDto.getUsername());\n\t\t\t\tif(bUser!=null){\n\t\t\t\t\tres.add(\"There is a BUser with the same Username\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(bUserToRegisterDto.getName()==null || bUserToRegisterDto.getName().trim().equals(\"\")){\n\t\t\t\tres.add(\"The file Name cannot be null\");\n\t\t\t}\n\t\t\tif(bUserToRegisterDto.getSurname()==null || bUserToRegisterDto.getSurname().trim().equals(\"\")){\n\t\t\t\tres.add(\"The file Surname cannot be null\");\n\t\t\t}\n\t\t\tif(bUserToRegisterDto.getEmail()==null || bUserToRegisterDto.getEmail().trim().equals(\"\")){\n\t\t\t\tres.add(\"The file Email cannot be null\");\n\t\t\t}\n\t\t\tif(bUserToRegisterDto.getPhoneNumber()==null || bUserToRegisterDto.getPhoneNumber().trim().equals(\"\")){\n\t\t\t\tres.add(\"The file Phone Number cannot be null\");\n\t\t\t}\n\t\t\tif(bUserToRegisterDto.getPassword()==null || bUserToRegisterDto.getPassword().trim().equals(\"\")){\n\t\t\t\tres.add(\"The file Password cannot be null\");\n\t\t\t}else if(bUserToRegisterDto.getPassword().length()<=5){\n\t\t\t\tres.add(\"The file Password must have at least 5 characters\");\n\t\t\t}else if(bUserToRegisterDto.getrPassword()==null || bUserToRegisterDto.getrPassword().trim().equals(\"\")){\n\t\t\t\tres.add(\"The file Repeat Password cannot be null\");\n\t\t\t}else if(!bUserToRegisterDto.getPassword().equals(bUserToRegisterDto.getrPassword())){\n\t\t\t\tres.add(\"The file Password and Repeat Password do not match\");\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"public interface BlacklistService {\n boolean checkForBlackList(String question);\n}",
"protected void validateConfiguration() {}",
"public List<String> validate();",
"@Override\n public Response throttlingDenyPoliciesGet(String accept, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n List<BlockConditionsDTO> blockConditions = apiProvider.getBlockConditions();\n BlockingConditionListDTO listDTO =\n BlockingConditionMappingUtil.fromBlockConditionListToListDTO(blockConditions);\n return Response.ok().entity(listDTO).build();\n } catch (APIManagementException | ParseException e) {\n String errorMessage = \"Error while retrieving Block Conditions\";\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }",
"private void performUnloadPathRecheck() {\r\n\t\trecheckUnloadPath = false;\r\n\t\tTile oldTile = gameMap.get(myRC.getLocation());\r\n\t\tTile actTile;\r\n\t\t\r\n\t\t/* cut where path is not accessible */\r\n\t\tfor (MapLocation loc : path) {\r\n\t\t\tactTile = gameMap.get(loc);\r\n\t\t\tif (actTile.totalHeight - oldTile.totalHeight > WORKER_MAX_HEIGHT_DELTA) {\r\n\t\t\t\tpath = path.subList(0, path.indexOf(loc));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\toldTile = actTile;\r\n\t\t}\r\n\t\t\r\n\t\t/* cut where we can unload */\r\n\t\tpath.add(0, myRC.getLocation());\r\n\t\tif (path.size() >= 2)\r\n\t\t\tif (gameMap.get(path.get(path.size() - 1)).totalHeight - \r\n\t\t\t\tgameMap.get(path.get(path.size() - 2)).totalHeight >= WORKER_MAX_HEIGHT_DELTA) {\r\n\t\t\t\t/* we can't unload at the end of the path. get to the end and drop it */\r\n\t\t\t\tpath.add(path.get(path.size() - 2));\r\n\t\t\t}\r\n\t\tpath.remove(0);\r\n//\t\tpath.add(0, myRC.getLocation());\r\n//\t\tint size = path.size();\r\n//\t\toldTile = gameMap.get(path.get(size - 1));\r\n//\t\twhile(size >= 2){\r\n//\t\t\tactTile = gameMap.get(path.get(size - 2));\r\n//\t\t\tif (gameMap.get(path.get(path.size() - 1)).totalHeight - gameMap.get(path.get(path.size() - 2)).totalHeight >= WORKER_MAX_HEIGHT_DELTA) {\r\n//\t\t\t\tpath.remove(size - 1);\r\n//\t\t\t\tsize--;\r\n//\t\t\t} else\r\n//\t\t\t\tbreak;\r\n//\t\t\toldTile = actTile;\r\n//\t\t}\r\n//\t\tpath.remove(0);\r\n\t}",
"private void validateReflexMapFile(String mapToCheck) throws FileNotFoundException\n {\n //Initialize the map scanner\n reflexValidator = new Scanner(new File(mapToCheck));\n\n if (reflexValidator.next().contains(\"reflex\"))\n {\n reflexValidated = true;\n System.out.println(\"\\nThis is a valid Reflex Arena map file\");\n }\n\n else\n {\n System.out.println(\"\\nThis is not a Reflex Arena map file\");\n }\n }",
"private synchronized void validateLookupCache(int index, String urlNoFragString) {\n if (this.lookupCacheURLs != null && lookupCacheEnabled) {\n if (index >= this.lookupCacheURLs.length || !urlNoFragString.equals(URLUtil.urlNoFragString(this.lookupCacheURLs[index]))) {\n if (DEBUG || DEBUG_LOOKUP_CACHE) {\n System.out.println(\"WARNING: resource lookup cache invalidated for lookupCacheLoader at \" + index);\n }\n disableAllLookupCaches();\n }\n }\n }",
"public void checkToken(Token token) {\n if(keywordHashTable.containsKey(token.getTokenInstance()))\n token.setTokenID(keywordHashTable.get(token.getTokenInstance()));\n }",
"@PostMapping(\"/token\")\n public ResponseEntity<Object> validateToken(@RequestParam(\"token\") String token) { \t\n \t\tUserLog userlog = authenticationService.authenticateByToken(token); \n \t\tif(userlog == null) {\n \t\t\t// risp.: 401\n \t\t\treturn new ResponseEntity<>(new UserLog(), HttpStatus.NOT_FOUND);\n \t\t}\n \t\treturn new ResponseEntity<>(userlog, HttpStatus.OK); \t\n }",
"public void validate() throws LedgerException {\n Iterator<Map.Entry<Integer, Block>> blocks = listBlocks();\n\n while ( blocks.hasNext() ) {\n Block block = blocks.next().getValue();\n validateBlock(block);\n }\n\n return;\n }",
"public void validate() {\n\t\tthis.invalidated = false;\n\t}",
"private void releaseTokenState() {\n //checks if token is taken\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());\n if (preferences!=null && preferences.getBoolean(TOKEN_RELEASED_ERROR, false)) {\n leaveToken();\n }\n }",
"private boolean validatePath(BoardSquareInfo start, BoardSquareInfo target, ArrayList<BoardSquareInfo> path) {\n\t\tLog.d(LOG_TAG, String.format(\"Validating path: [%s]\",path));\n\t\t\n\t\t// Invalid if start and target row are separated \n\t\t// by 2 spaces and columns are the same\n\t\tboolean valid = !(Math.abs(start.row-target.row) == 2 \n\t\t\t\t&& start.column == target.column);\n\t\t\n\t\t// Invalid if start and target columns are separated \n\t\t// by 2 spaces and rows are the same\n\t\tvalid = valid && !(start.row == target.row\n\t\t\t\t&& Math.abs(start.column-target.column) == 2);\n\t\t\n\t\tif(valid && path.size() > 1) {\n\t\t\tBoardSquareInfo square = path.get(path.size()-2);\n\t\t\t\n\t\t\t// Invalid if start and target row are separated \n\t\t\t// by 2 spaces and columns are the same\n\t\t\tvalid = valid && !(Math.abs(square.row-target.row) == 2 \n\t\t\t\t\t&& square.column == target.column);\n\t\t\t\n\t\t\t// Invalid if start and target columns are separated \n\t\t\t// by 2 spaces and rows are the same\n\t\t\tvalid = valid && !(square.row == target.row\n\t\t\t\t\t&& Math.abs(square.column-target.column) == 2);\n\t\t}\n\t\t\n\t\tif(valid) {\n\t\t\tstart.swap(target);\n\t\t\tfor(BoardSquareInfo square : path) {\n\t\t\t\tsquare.makeEmpty();\n\t\t\t}\n\t\t\tswitchPlayer();\n\t\t}\n\t\t\n\t\treturn valid;\n\t}",
"private void checkList() {\n val list = config.getString(\"list\");\n val mode = config.getString(\"mode\");\n\n if (isNullOrEmpty(list)) {\n MovieHandler.Type type = MovieHandler.Type.valueOf(mode);\n\n if (type.equals(MovieHandler.Type.COMBINED) || type.equals(MovieHandler.Type.ADD_TO_WATCHLIST)) {\n throw new IllegalArgumentException(\"list is not set, but required for current mode!\");\n }\n } else {\n checkArgument(list.startsWith(\"ls\") || list.equals(\"watchlist\"), \"list doesn't start with ls prefix!\");\n checkArgument(list.length() >= 3, \"list string length less than 3!\");\n }\n }",
"private List<List<Pair>> customDFS(Box box, List<Box> aliveBoxes, List<List<Pair>> validPaths, List<Pair> possiblePath){\n List<Integer> deadBoxes = getDead(aliveBoxes);\n deadBoxes.add(box.getId());\n List<Box> nextAliveBoxes = initBoxes(deadBoxes);\n\n List<Pair> currentPath = new ArrayList<>();\n currentPath.addAll(possiblePath);\n currentPath.add(new Pair(box.getId(),box.getLetter()));\n if(currentPath.size()>2&&dictionary.isWord(pairsToWord(currentPath))){\n validPaths.add(currentPath);\n }\n\n for(Box alive : nextAliveBoxes){\n if(contains(box.getNeighbours(),alive.getId())){\n\n List<Pair> tempPath = new ArrayList<>();\n tempPath.addAll(currentPath);\n tempPath.add(new Pair(alive.getId(),alive.getLetter()));\n\n if(dictionary.isWordBegining(pairsToWord(tempPath))){\n customDFS(alive, nextAliveBoxes, paths, currentPath);\n }\n }\n }\n return validPaths;\n }",
"private static JsonNode validate (Request req, Response res) {\n FeedVersion version = requestFeedVersion(req, \"manage\");\n\n // FIXME: Update for sql-loader validation process?\n return null;\n// return version.retrieveValidationResult(true);\n }",
"public void createLBPolicy2(){\n\n\t\tIterator<ASServer> itm = manager.getASServers().values().iterator();\n\t\t\n\t\twhile(itm.hasNext()){\n\t\t\t\n\t\t\tASServer as = itm.next();\n\t\t\tAppServerPolicy ap = as.currentPolicy;\n\t\t\tIterator<ObjectKey> ik = ap.policyMap.keySet().iterator();\n\t\t\t\n\t\t\twhile(ik.hasNext()){\n\t\t\t\t\n\t\t\t\tObjectKey ot = ik.next();\n\t\t\t\t\n\t\t\t\tif(ot instanceof ListKey){\n\t\t\t\t\tListKey tlk = (ListKey) ot;\n\t\t\t\t\tString t = tlk.key;\n\t\t\t\t\t//System.out.println(\"Checking for mapping of :\" + t);\n\t\t\t\t\t\n\t\t\t\t\tif(((ResourceToRequestMap) as.getStruct((String)RequestResourceMappingLogProcessor.OBJ_REQ_MAP)).map.get(t) == null){\n\t\t\t\t\t\t//System.out.println(\"Mapping Map is NULL\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tArrayList<String> test = new ArrayList<String>(((ResourceToRequestMap) as.getStruct((String)RequestResourceMappingLogProcessor.OBJ_REQ_MAP)).map.get(t));\n\t\t\t\t\t\n\t\t\t\t\tIterator<String> itemp = test.iterator();\n\t\t\t\t\t\n\t\t\t\t\twhile(itemp.hasNext()){\n\t\t\t\t\t\n\t\t\t\t\t\tString url = itemp.next();\n\t\t\t\t\t\t\n\t\t\t\t\t\tint[] sc = LBPCreatorMap.get(url);\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(sc == null){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsc = new int[NO_SERVERS];\n\t\t\t\t\t\t\tsc[as.serverNo]++;\n\t\t\t\t\t\t\tLBPCreatorMap.put(url, sc);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tsc[as.serverNo]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tIterator<String> iturl = LBPCreatorMap.keySet().iterator();\n\t\t\n\t\twhile(iturl.hasNext()){\n\t\t\t\n\t\t\tString url = iturl.next();\n\t\t\t\n\t\t\tint[] sc = LBPCreatorMap.get(url);\n\t\t\t\n\t\t\tint size = sc.length;\n\t\t\tint maxtemp=0;\n\t\t\tint maxindex=0;\n\t\t\tint val;\n\t\t\t\n\t\t\t\n\t\t\tfor(int i=0; i< size; i++){\n\t\t\t\t\n\t\t\t\tval = sc[i];\n\t\t\t\tif(val > maxtemp)\n\t\t\t\t{\n\t\t\t\t\tmaxtemp = val;\n\t\t\t\t\tmaxindex = i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tString xyz = manager.getASServer(maxindex).serverId;\n\t\t\tthis.currentLBPolicy.mapUrlToServers(url, Analyser.resolveHost(xyz));\n\t\t\t\n\t\t\t\n//\t\t\tif(mLogger.isInfoEnabled()){\n//\t\t\t\tmLogger.log(Priority.INFO, \":\" + url + \": being assigned to: \" + xyz);\n//\t\t\t}\n\t\t\t\n\t\t\tInteger sId = LBDMap.get(xyz);\n\t\t\t\n\t\t\tif(sId == null){\n\t\t\t\tsId=new Integer(1);\n\t\t\t\tLBDMap.put(xyz, sId);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsId++;\n\t\t\t\tLBDMap.put(xyz, sId);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"------------URL ServerCounter start---------------\");\n//\t\t\n//\t\tIterator<String> ilbp = LBPCreatorMap.keySet().iterator();\n//\t\t\n//\t\twhile(ilbp.hasNext()){\n//\t\t\t\n//\t\t\tString url = ilbp.next();\n//\t\t\tint[] pi = LBPCreatorMap.get(url);\n//\t\t\tSystem.out.println(\"url is:\" + url);\n//\t\t\tfor(int i=0; i< pi.length; i++){\n//\t\t\t\tSystem.out.print(\"Site:\"+ i + \":\" + pi[i]);\n//\t\t\t}\n//\t\t}\n//\t\t\n////\t\t//System.out.println(\"Number of entries corresponding to LBPolicy for localhost are: \" + currentLBPolicy.policyMap.values().size() );\n//\t\n//\t\tSystem.out.println(\"------------URL ServerCounter end-----------------\");\n\t\t\n\t\tSystem.out.println(\"------------LBPolicy start---------------\");\n//\t\tSystem.out.println(currentLBPolicy);\n//\t\t\n//\t\tSystem.out.println(\"Number of entries in LBPolicy are: \" + currentLBPolicy.policyMap.size() );\n\t\t\n\t\tIterator<String> itlb = LBDMap.keySet().iterator();\n\t\t\n\t\twhile(itlb.hasNext()){\n\t\t\tString serid = itlb.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Server:\" + serid + \" has been allocated: \" + LBDMap.get(serid) + \" objects\");\n\t\t}\n\t\t\n//\t\n\t\tSystem.out.println(\"------------LBPolicy end-----------------\");\n\t\n\n\t\t\n\t}",
"private static Pair<List<Path>/*enabled*/, List<Path>/*disabled*/> scanDirectory(Location serverRoot, DataRegistry dataRegistry) {\n Path dir = IOX.asPath(serverRoot);\n \n try { \n List<Path> directory = ListUtils.toList( Files.list(dir).filter(p->Files.isDirectory(p)).sorted() );\n// directory.stream()\n// .filter(LocalServer::isFormattedDataSource)\n// .collect(Collectors.toList());\n List<Path> enabled = directory.stream()\n .filter(path -> isEnabled(path))\n .collect(Collectors.toList());\n List<Path> disabled = directory.stream()\n .filter(path -> !isEnabled(path))\n .collect(Collectors.toList());\n return Pair.create(enabled, disabled);\n }\n catch (IOException ex) {\n LOG.error(\"Exception while reading \"+dir);\n throw IOX.exception(ex);\n }\n }",
"private void checkValidity() throws FileSystemException {\n\t\tif ( invalidated || cachedCurrentDirectory == null ) {\n\t\t\t\n\t\t\tfillCache();\n\t\t\tinvalidated = false;\n\t\t} \n\t\t\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.483 -0400\", hash_original_method = \"E78BE117D2BFD149ECDA4C37949EB819\", hash_generated_method = \"42AD052F23E4D7B232B6640352218870\")\n \n public static boolean clearBlacklistCommand(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }",
"private static List<String> loadHighlightBlacklist(String highlightURLBlacklistFile) {\n ClassLoader classLoader = ElasticSearch.class.getClassLoader();\n URL fileUrl = classLoader.getResource(highlightURLBlacklistFile);\n\n List<String> urls = new ArrayList<>();\n if (null != fileUrl) {\n File file = new File(fileUrl.getFile());\n try (BufferedReader bw = new BufferedReader(new FileReader(file))) {\n String blacklistedUrl;\n\n while ((blacklistedUrl = bw.readLine()) != null) {\n urls.add(URIUtil.cleanUri(blacklistedUrl));\n }\n } catch (IOException e) {\n // Print additional info out to stderr\n error().exception(e).log(\"error while attempting to load highlight blacklist file\");\n // Unable to load the file, so return an empty ArrayList (won't black list any urls)\n return new ArrayList<>();\n }\n }\n return urls;\n }",
"void cannotRecognize(Term token);",
"public void invalidRoute() \n {\n validRoute = false;\n }",
"@Override\n protected void update(ScanningContext context) {\n validateAttributes(context);\n }",
"public JSONObject checkTokenIntegrity(String token){\n\t\t String result=\"\";\n\t\t String Role=\"Visitor\";\n\t\t int tokenID=0;\n\t\t boolean isValid=false;\n\t\t TokenFactory tokens= listBook.tokens;\n\t\t JSONObject jsonObject= new JSONObject(); \n\t\t System.out.println(token);\n\t\t JSONObject verifyToken =tokens.tokenConsume(token);\n\t\t //checks if the token consuming response is valid,if its valid it will validate its contents with the the database member entry\n\t\t if(verifyToken.length()>1){\n\t\t\t\t try {\n\t\t\t\t\tif(verifyToken.getInt(\"ID\")>0){\n\t\t\t\t\t\tisValid=true;\n\t\t\t\t\t\tHashMap<String,String> memberData = new HashMap<String,String>();\n\t\t\t\t\t\ttokenID= verifyToken.getInt(\"ID\");\n\t\t\t\t\t\tmemberData.put(\"ID_Member\", verifyToken.getInt(\"ID\")+\"\");\n\t\t\t\t\t\tmemberData.put(\"Role\", verifyToken.getString(\"Role\"));\n\t\t\t\t\t\tif(retrieveMember(memberData).length()>0){\n\t\t\t\t\t\t\ttokenID=verifyToken.getInt(\"ID\");\n\t\t\t\t\t\t\tRole=verifyToken.getString(\"Role\");\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t\t \t\t\t \n\t\t\ttry {\n\t\t\t\tjsonObject.put(\"isValid\", isValid);\n\t\t\t\tjsonObject.put(\"ID\", tokenID);\n\t\t\t\tjsonObject.put(\"Role\", Role);\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsonObject;\n \t }",
"@Override\r\n\tprotected void validateList(List<StravaChallenge> list) {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.validateList(list);\r\n\t\t}\r\n\t}",
"protected void validate() {\n // no op\n }",
"public void check(String[] path) {\n\t\tVector<String> cked = new Vector<String>();\n\t\tcheck(path, cked);\n\t}",
"public void processToken(String token) {\n\n distinctTokens.add(token);\n\n }",
"public interface FormValidator {\r\n\r\n /**\r\n * Performs on-the-fly validation of the form field 'name'.\r\n *\r\n * @param value This parameter receives the value that the user has typed.\r\n * @return Indicates the outcome of the validation. This is sent to the\r\n * browser.\r\n */\r\n default FormValidation doCheckArtifactId(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation.error(\"Please set an ArtifactId!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckGroupId(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation.error(\"Please set a GroupId!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckVersion(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation\r\n .error(\"Please set a Version for your artifact!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckStagingRepository(\r\n @QueryParameter String value) {\r\n return checkURI(value);\r\n }\r\n\r\n default FormValidation doCheckReleaseRepository(\r\n @QueryParameter String value) {\r\n return checkURI(value);\r\n }\r\n\r\n /**\r\n * This method checks originally the URL if it is valid. On the way to\r\n * support tokens this behavior is build out. It will be reactivated\r\n * after a general refactoring for better token macro support.\r\n * <p>\r\n * TODO implment a URL validation which works with token macro plugin\r\n *\r\n * @param value\r\n * @return\r\n */\r\n default FormValidation checkURI(String value) {\r\n if (value.length() == 0) {\r\n return FormValidation\r\n .error(\"Please set an URL for the staging repository!\");\r\n }\r\n return FormValidation.ok();\r\n }\r\n\r\n /**\r\n * Generates LisBoxModel for available Repository systems\r\n *\r\n * @return available Promoters as ListBoxModel\r\n */\r\n default ListBoxModel doFillPromoterClassItems() {\r\n ListBoxModel promoterModel = new ListBoxModel();\r\n for (Promotor promotor : Jenkins.getInstance()\r\n .getExtensionList(Promotor.class)) {\r\n promoterModel.add(promotor.getDescriptor().getDisplayName(), promotor\r\n .getClass().getCanonicalName());\r\n }\r\n\r\n return promoterModel;\r\n }\r\n\r\n}",
"@ApiOperation(\n value = \"${swagger.operations.password-validate-token.description}\",\n response = String.class\n )\n @ApiResponses({\n @ApiResponse(code = 500, message = \"Internal Server Error / No message available\"),\n @ApiResponse(code = 400, message = \"Token is invalid or expired or missing correlation ID\"),\n @ApiResponse(code = 204, message = \"Token is valid\")\n })\n @ApiImplicitParams({\n @ApiImplicitParam(name = X_CORRELATION_ID_HEADER,\n required = true,\n value = \"UUID formatted string to track the request through the enquiries stack\",\n paramType = \"header\"),\n })\n @PostMapping(PasswordController.VALIDATE_TOKEN_PATH)\n ResponseEntity<Void> validateToken(@RequestBody ValidateTokenRequest validateTokenRequest);",
"@Override\n public void onResume() {\n super.onResume();\n\n validateToken();\n }",
"public void alg_REQ(){\nSystem.out.println(\"3LastTokenIn, TokenIn, TokenOut:\" + lastTokenIn.value + TokenIn.value + TokenOut.value);\n\nif(lastTokenIn.value) {\nif (TokenChanged.value) {\n if (!PERequest.value) {\n Block.value = false;\n TokenOut.value = false;\n System.out.println(\"Conv 3: I just got token, request is coming let bag go and keep token\");\n } else {\n Block.value = false;\n TokenOut.value = true;\n System.out.println(\"Conv 3: I just got token, no request so run conveyer but let token go\");\n }\n} else {\n if (!PERequest.value) {\n System.out.println(\"Conv 3: I had token for a while, request here and bag passed eye, keep running conv and keep token\");\n Block.value = false;\n TokenOut.value = false;\n } else {\n if (PEExit.value) {\n Block.value = false;\n TokenOut.value = true;\n System.out.println(\"Conv 3: I had token for a while, no requests and bag passed eye, let token go\");\n } else {\n Block.value = false;\n TokenOut.value = false;\n System.out.println(\"Conv 3: I have token, no requests and bag not passed eye yet, keep token\");\n }\n }\n}\n}\n\nelse {\n if (!PERequest.value) {\n Block.value = true;\nTokenOut.value = true;\n System.out.println(\"Conv 3: No token, rquest here. Wait\");\n }\nelse {\nBlock.value = false;\nTokenOut.value = false;\nSystem.out.println(\"Conv 3: No token no request\");\n}\n}\n\nif(lastTokenIn.value != TokenIn.value) {\n TokenChanged.value = true;\n}\nelse {\n TokenChanged.value = false;\n}\nlastTokenIn.value = TokenIn.value;\n\n}",
"private boolean isIllegalTokenCollectionForRuleOne(int elapsedTimeInSeconds) {\n int interval = elapsedTimeInSeconds / 10;\n int intervalModTwo = interval % 2;\n return intervalModTwo == 0;\n }",
"protected boolean getStravaCheckToken()\n {\n return true;\n }",
"private void update_memories() {\n\t\tserver.MaliciousPatterns mpat = null;\n\t\ttry {\n\t\t\tmpat = MainClass.get_server().maliciousPatternRequest(Register.get_nodeID());\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (mpat == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (mpat.isIsDeleted() == true) {\t/* node is deleted by admin, exit program */\n\t\t\tSystem.out.println(\"\\nATTENTION: This node was deleted from the administrator of the network!\");\n\t\t\tSystem.out.println(\"Forcing exit...\\n\");\n\t\t\tSystem.out.println(\"____________________________________________________________________________________________________\");\n\t\t\tSystem.exit(1);\t\t\t\t\t/* exit program */\n\t\t}\n\n\n\t\tString[] update_ips = mpat.getMal_ips();\n\t\tString[] update_patterns = mpat.getMal_patterns();\n\n\t\tif (update_ips != null) {\t\t\t\t\t/* there are updates in malicious IPs */\n\t\t\tSystem.out.println();\n\t\t\tfor (String ip : update_ips) {\n\t\t\t\tMPSM_IP.add_IP(ip);\n\t\t\t\tSystem.out.println(\"IP \" + ip + \" is malicious!\");\n\t\t\t}\n\t\t}\n\t\tif (update_patterns != null) {\t\t\t\t/* there are updates in malicious patterns */\n\t\t\tSystem.out.println();\n\t\t\tfor (String pattern : update_patterns) {\n\t\t\t\tMPSM_Pattern.add_Pattern(pattern);\n\t\t\t\tSystem.out.println(\"Pattern \" + pattern + \" is malicious!\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}",
"@GetMapping(path = \"/api/activity/declinedactivities/{token}\")\n public ArrayList<ActivityDTO> getDeclinedActivities(@PathVariable String token) {\n return activityService.getAllDeclinedActivities(userService.getUserIDFromJWT(token));\n }",
"private boolean shouldReplanPath(State.StateView state, History.HistoryView history, Stack<MapLocation> currentPath)\n {\n \t\t/* TODO: Write this method\n \t\t * Check if the path is blocked every step or check if the next spot is blocked?\n \t\t * Does enemy attack if you get too close?\n \t\t */\n \t\n \t\n \t\t//checking if the next step is blocked\n \t\t//setting up local fields\n \t\tUnitView enemy = state.getUnit(enemyFootmanID);\n \t\tMapLocation next;\n \t\tif (!path.isEmpty()) {\n \t\t\tnext = path.peek();\n \t\t\n \t\t\tif(next.x == enemy.getXPosition() && next.y == enemy.getYPosition()) \n \t\t\t\treturn true;\n \t\t\t\n \t\t}\n \t\t\n return false;\n }",
"private void refreshAllowance() {\n\t\tif(! PIN.isValidated()){\n\t\t\tISOException.throwIt(SW_VERIFICATION_REQUIRED);\n\t\t}\n\t\t\n\t\t// TODO More sanity checks\n\t\t\n\t\t// Refresh allowance\n\t\tallowance = MAX_ALLOWANCE;\n\t\t\n\t}",
"private String validateToken(String url, String apiKey, String userId, String format, String token)\n throws AuthenticationFailedException {\n BufferedReader in = null;\n HttpURLConnection urlConnection = null;\n StringBuilder builder;\n if (log.isDebugEnabled()) {\n log.debug(\"Token validation URL: \" + url);\n }\n if (StringUtils.isEmpty(url)) {\n return \"\";\n } else {\n try {\n URL obj = new URL(url + Token2Constants.API + Token2Constants.EQUAL + apiKey + Token2Constants.AMPERSAND +\n Token2Constants.TOKEN + Token2Constants.EQUAL + token + Token2Constants.AMPERSAND +\n Token2Constants.USER_ID + Token2Constants.EQUAL + userId + Token2Constants.AMPERSAND +\n Token2Constants.FORMAT + Token2Constants.EQUAL + format);\n urlConnection = (HttpURLConnection) obj.openConnection();\n urlConnection.setRequestMethod(Token2Constants.GET_METHOD);\n in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\n builder = new StringBuilder();\n String inputLine = in.readLine();\n while (inputLine != null) {\n builder.append(inputLine).append(\"\\n\");\n inputLine = in.readLine();\n }\n if (log.isDebugEnabled()) {\n log.debug(\"response: \" + builder.toString());\n }\n } catch (MalformedURLException e) {\n throw new AuthenticationFailedException(\"Invalid URL\", e);\n } catch (ProtocolException e) {\n throw new AuthenticationFailedException(\"Error while setting the HTTP request method\", e);\n } catch (IOException e) {\n throw new AuthenticationFailedException(\"Error in I/O Streams\" + e.getMessage(), e);\n } finally {\n try {\n if (in != null) {\n in.close();\n }\n } catch (IOException e) {\n log.error(\"Couldn't close the I/O Streams\", e);\n }\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n return builder.toString();\n }\n }",
"public abstract List<String> getValidDescriptors();",
"public boolean validate(String securityToken, RequestMetadata requestMetadata);",
"public void setBlacklistRegexp(String blacklistRegexp) {\n\t\tthis.blacklistRegexp = blacklistRegexp;\n\t}",
"public void setDeniedFilesList(String dENDED) {\n\t\t\r\n\t}",
"@Override\n\tpublic boolean isTokenValid(String token) {\n\t\tLoginToken loginToken = getLoginTokenByToken(token);\n\t\tif (loginToken != null) {\n\t\t\tDate createTime = loginToken.getCreateTime();\n\t\t\tDate current = new Date();\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()));\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()) / (1000 *60));\n\t\t\tif (Math.abs(current.getTime() - createTime.getTime()) / (1000 * 60) >= 60) {\n\t\t\t\tloginToken.setStatus(Constant.LOGIN_TOKEN_STATUS_INVALID);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tloginToken.setCreateTime(current);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Scheduled(fixedRate = checkRate)\n public void CheckExpired() {\n log.info(\"Checking if links expired\");\n try {\n for(ShortURL s : urlList) {\n // Si la fecha guardada es antes que este momento\n Date then1 = s.getExpirationDate();\n java.util.Date then2= new java.util.Date(then1.getTime());\n Instant then = then2.toInstant();\n Instant now = ZonedDateTime.now().toInstant();\n if(then.isBefore(now)){\n log.info(\"URL {} expired.\", s.getUri().toString());\n s.setMode(HttpStatus.GONE.value());\n }\n }\n } catch( NullPointerException e) {\n //No se ha inicializado aun\n }\n\n }",
"public List checkApprovedFiles() throws LMSException;",
"@Override\n public boolean isTokenValid(CrUser user, String token) {\n boolean result = false;\n if (user.getToken().equalsIgnoreCase(token)) {\n Date currentTime = new Date();\n if ((currentTime.getTime() - user.getTokenUpdateTime().getTime()) <= 1800000) {\n user.setTokenUpdateTime(currentTime);\n result = true;\n }\n }\n return result;\n }",
"protected void performGenericAuthorizationEndpointErrorResponseValidation() {\n\t\tcallAndContinueOnFailure(CheckStateInAuthorizationResponse.class, ConditionResult.FAILURE);\n\t\t// as https://tools.ietf.org/html/draft-ietf-oauth-iss-auth-resp is still a draft we only warn if the value is wrong,\n\t\t// and do not require it to be present.\n\t\tcallAndContinueOnFailure(ValidateIssInAuthorizationResponse.class, ConditionResult.WARNING, \"OAuth2-iss-2\");\n\t\tcallAndContinueOnFailure(EnsureErrorFromAuthorizationEndpointResponse.class, ConditionResult.FAILURE, \"OIDCC-3.1.2.6\");\n\t\tcallAndContinueOnFailure(RejectAuthCodeInAuthorizationEndpointResponse.class, ConditionResult.FAILURE, \"OIDCC-3.1.2.6\");\n\t\tcallAndContinueOnFailure(CheckForUnexpectedParametersInErrorResponseFromAuthorizationEndpoint.class, ConditionResult.WARNING, \"OIDCC-3.1.2.6\");\n\t\tcallAndContinueOnFailure(CheckErrorDescriptionFromAuthorizationEndpointResponseErrorContainsCRLFTAB.class, ConditionResult.WARNING, \"RFC6749-4.1.2.1\");\n\t\tcallAndContinueOnFailure(ValidateErrorDescriptionFromAuthorizationEndpointResponseError.class, ConditionResult.FAILURE,\"RFC6749-4.1.2.1\");\n\t\tcallAndContinueOnFailure(ValidateErrorUriFromAuthorizationEndpointResponseError.class, ConditionResult.FAILURE,\"RFC6749-4.1.2.1\");\n\t}",
"@Override\n public RateLimiter load(String token) {\n Map<String, Integer> customizeTenantQpsRate = trafficConfiguration.getCustomizeTenantQpsRate();\n int tenantQuota = trafficConfiguration.getDefaultTenantQpsRate();\n if (MapUtils.isNotEmpty(customizeTenantQpsRate)) {\n tenantQuota = customizeTenantQpsRate.getOrDefault(token, trafficConfiguration.getDefaultTenantQpsRate());\n }\n // use tenant default rate limit\n return RateLimiter.create(tenantQuota, 1, TimeUnit.SECONDS);\n }",
"private void validateData() {\n }",
"void check(@NotNull String contentPath,\n\t\t\t @NotNull Map<String, String> uriVars,\n\t\t\t @NotNull AuthenticationToken authToken,\n\t \t\t @NotNull CmsContent cmsContent,\n\t \t\t @NotNull SimpleErrors errors);",
"public static void startValidation() {\n errList = new ArrayList<>();\n }",
"public abstract Result check(WebBundleDescriptor descriptor);",
"protected void validate() throws ConfigurationException\n {\n\n }",
"@Override\n\tpublic void validateTimestamps() {\n\n\t\t/*\n\t\t * This validates the content-timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getContentTimestamps()) {\n\n\t\t\tfinal byte[] timestampBytes = getContentTimestampData(timestampToken);\n\t\t\ttimestampToken.matchData(timestampBytes);\n\t\t}\n\n\t\t/*\n\t\t * This validates the signature timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getSignatureTimestamps()) {\n\n\t\t\tfinal byte[] timestampBytes = getSignatureTimestampData(timestampToken, null);\n\t\t\ttimestampToken.matchData(timestampBytes);\n\t\t}\n\n\t\t/*\n\t\t * This validates the SigAndRefs timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getTimestampsX1()) {\n\n\t\t\tfinal byte[] timestampBytes = getTimestampX1Data(timestampToken, null);\n\t\t\ttimestampToken.matchData(timestampBytes);\n\t\t}\n\n\t\t/*\n\t\t * This validates the RefsOnly timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getTimestampsX2()) {\n\n\t\t\tfinal byte[] timestampBytes = getTimestampX2Data(timestampToken, null);\n\t\t\ttimestampToken.matchData(timestampBytes);\n\t\t}\n\n\t\t/*\n\t\t * This validates the archive timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getArchiveTimestamps()) {\n\n\t\t\tfinal byte[] timestampData = getArchiveTimestampData(timestampToken, null);\n\t\t\ttimestampToken.matchData(timestampData);\n\t\t}\n\t}",
"private void addWhitelistEntries(VDDHash whitelist) {\n for (Object entry: whitelist.values()) {\n this.whitelist.add(new TextFinder((String)entry));\n }\n }",
"public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }",
"public String validateToken(HttpServletRequest request, HttpServletResponse response) {\n String[] cookieTokens = extractAndDecodeCookie(request, response);\n return validateToken(cookieTokens, request, response);\n }",
"public interface Validable {\n /**\n * @param levelOfSecurityBroken - 0,1,2,3,4 levels of security\n */\n void onValidationSuccess(int levelOfSecurityBroken);\n\n /**\n * when validation in progress, if user goes with invalid path, this method is invoked\n */\n void onValidationFailed();\n\n void onSequenceRestart();\n\n}"
] | [
"0.51692617",
"0.4989332",
"0.49888736",
"0.49134463",
"0.4797552",
"0.46972406",
"0.46941432",
"0.46811113",
"0.4658749",
"0.46412542",
"0.46334535",
"0.46039206",
"0.45061174",
"0.4471211",
"0.44640812",
"0.44538715",
"0.44523233",
"0.4434888",
"0.44233516",
"0.44014198",
"0.43933746",
"0.4389182",
"0.43837222",
"0.43774548",
"0.4376528",
"0.43594122",
"0.43531147",
"0.43439984",
"0.43388265",
"0.4337999",
"0.4326636",
"0.4303628",
"0.42957798",
"0.4274192",
"0.42657882",
"0.42597562",
"0.42526773",
"0.42470133",
"0.423165",
"0.4229909",
"0.4229805",
"0.42254612",
"0.42207795",
"0.41976774",
"0.41945213",
"0.41901305",
"0.41865683",
"0.4186424",
"0.4185249",
"0.4182259",
"0.41803578",
"0.4172517",
"0.41680482",
"0.41676074",
"0.4158056",
"0.41484904",
"0.41438612",
"0.4137909",
"0.4135353",
"0.41336015",
"0.41292644",
"0.41236007",
"0.41177985",
"0.41148347",
"0.4106712",
"0.40947253",
"0.40917674",
"0.40842617",
"0.40815756",
"0.40687093",
"0.4064894",
"0.4058488",
"0.4055833",
"0.40489686",
"0.4043613",
"0.4038481",
"0.4037235",
"0.4036702",
"0.40364096",
"0.40176848",
"0.40163526",
"0.40142068",
"0.40096807",
"0.40085492",
"0.39991257",
"0.39945224",
"0.39944547",
"0.3993642",
"0.39912018",
"0.39875457",
"0.39867744",
"0.39750016",
"0.3971472",
"0.39677507",
"0.39577368",
"0.39558032",
"0.39539474",
"0.3953886",
"0.3950219",
"0.39459905"
] | 0.5499213 | 0 |
CSRF validate token. It will cache need validate blackList data, and not collect blackList data. | public boolean isTokenValid(String actionUrl, String fuseaction, String displayAction, String reqToken)
throws AAException
{
// when first use this method, init blackList cache data.
if (m_CSRFBlackList.size() == 0)
{
// this.initCSRFBlackListCache(NEED_VALIDATE);
this.initCSRFBlackListFromFileCache();
}
boolean flag = Boolean.TRUE;
if (NEED_VALIDATE.equals(SystemConfigCacheHelper.getInstance().getCSRFBlackListCache(
actionUrl + "_" + fuseaction + "_" + displayAction)))
{
// validate token
if (!tokensManager.isTokenExistAndRemove(reqToken))
{
flag = Boolean.FALSE;
logger.error("CSRF token validate failed, url: " + actionUrl + " fuseaction: " + fuseaction
+ " displayAction: " + displayAction);
}
}
return flag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void verifyCSRFToken(HttpServletRequest request) throws IntrusionException;",
"public void validarToken() {\r\n\t\ttry {\r\n\t\t\tif (getToken() == null || getToken().trim().isEmpty())\r\n\t\t\t\tMensaje.crearMensajeWARN(\"Debe ingresar su token para continuar.\");\r\n\t\t\telse if (!mngRes.verificarTokenEstudiante(getEstudiante().getId(), getToken()))\r\n\t\t\t\tMensaje.crearMensajeWARN(\"Su token es incorrecto. Verifíquelo.\");\r\n\t\t\telse {\r\n\t\t\t\treserva = mngRes.buscarReservaPorID(getDniEstudiante(), periodo.getPrdId());\r\n\t\t\t\tif (reserva != null && reserva.getResEstado().equals(Funciones.estadoFinalizado))\r\n\t\t\t\t\tMensaje.crearMensajeWARN(\"Usted ya posee una reserva finalizada:\");\r\n\t\t\t\telse {\r\n\t\t\t\t\ttokenOk = true;\r\n\t\t\t\t\tmayorEdad = Funciones.mayorDeEdad(getEstudiante().getMatFechaNacimiento());\r\n\t\t\t\t\tcargarSitiosLibres();\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('dlgtoken').hide();\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetToken(\"\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tMensaje.crearMensajeERROR(\"Error al validar token: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"String getCSRFToken();",
"public boolean validate(String securityToken, RequestMetadata requestMetadata);",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"public boolean isTokenValide() {\n try {\n token = Save.defaultLoadString(Constants.PREF_TOKEN, getApplicationContext());\n if (token != null && !token.equals(\"\")) {\n if (token.equals(\"\"))\n return false;\n JWT jwt = new JWT(token);\n boolean isExpired = jwt.isExpired(0);\n return !isExpired;\n } else\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n }",
"@Override\n protected void doFilterInternal(HttpServletRequest request,\n HttpServletResponse response,\n FilterChain filterChain) throws ServletException, IOException {\n if (TcServletUtils.isXmlHttpRequest(request)) {\n Optional<Cookie> cookieOptional = Arrays.stream(request.getCookies())\n .filter(cookie -> Objects.equals(cookie.getName(), XSRF_TOKEN_COOKIE_NAME))\n .findAny();\n // no cookie, yes header -> impossible\n // yes cookie, no header -> not a correct req\n // no cookie, no header -> pass\n // yes cookie, yes header -> go to verify\n if (cookieOptional.isPresent()) {\n Cookie cookie = cookieOptional.get();\n String header = request.getHeader(XSRF_TOKEN_HEADER_NAME);\n if (Objects.isNull(header)) {\n log.warn(\"req [{}] has xsrf cookie but do not pass a xsrf token in xml http req, not a valid req\",\n request.getRequestURI());\n response.sendError(HttpStatus.FORBIDDEN.value(), \"拒绝服务\");\n return;\n }\n if (!Objects.equals(cookie.getValue(), header)) {\n log.warn(\"req [{}] has xsrf cookie and xsrf token but they are not match\", request.getRequestURI());\n response.sendError(HttpStatus.FORBIDDEN.value(), \"拒绝服务\");\n return;\n }\n }\n }\n filterChain.doFilter(request, response);\n }",
"public boolean isTokenValid(String actionUrl, String fuseaction, String displayAction, String user,\r\n\t\t\tString reqToken, String isAddBlackList, String currentUrl, String refererUrl)\r\n\t{\r\n\t\tboolean flag = Boolean.TRUE;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// when first use this method, init blackList cache data.\r\n\t\t\tif (m_CSRFBlackList.size() == 0)\r\n\t\t\t{\r\n\t\t\t\tthis.initCSRFBlackListCache(null);\r\n//\t\t\t\tthis.initCSRFBlackListFromFileCache();\r\n\t\t\t}\r\n\r\n\t\t\t// get blackList from cache\r\n\t\t\tString flagStr = SystemConfigCacheHelper.getInstance().getCSRFBlackListCache(\r\n\t\t\t\tactionUrl + \"_\" + fuseaction + \"_\" + displayAction);\r\n\r\n\t\t\t// current URL not exists in blackList Cache\r\n\t\t\tif (flagStr == null)\r\n\t\t\t{\r\n\t\t\t\tCSRFBlackListService service = this.getCSRFBlackListService();\r\n\t\t\t\t// current URL exists in blackList database, add this record to cache\r\n\t\t\t\tif (service.isExistBlackList(actionUrl, fuseaction, displayAction, NEED_VALIDATE))\r\n\t\t\t\t{\r\n\t\t\t\t\tflagStr = NEED_VALIDATE;\r\n\t\t\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(\r\n\t\t\t\t\t\tactionUrl + \"_\" + fuseaction + \"_\" + displayAction, NEED_VALIDATE);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// auto collect blackList path\r\n\t\t\t\t\tif (\"true\".equals(isAddBlackList))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// service.addBlackList(actionUrl, fuseaction, displayAction, user);\r\n\t\t\t\t\t\tservice.addBlackList(new CSRFBlackListModel(actionUrl, fuseaction, displayAction, user));\r\n\t\t\t\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(\r\n\t\t\t\t\t\t\tactionUrl + \"_\" + fuseaction + \"_\" + displayAction, NEED_VALIDATE);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// current URL not is blackList\r\n\t\t\t\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(\r\n\t\t\t\t\t\t\tactionUrl + \"_\" + fuseaction + \"_\" + displayAction, NOT_NEED_VALIDATE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (NEED_VALIDATE.equals(flagStr))\r\n\t\t\t{\r\n\t\t\t\t// validate current URL token\r\n\t\t\t\tflag = tokensManager.isTokenExistAndRemove(reqToken);\r\n\r\n\t\t\t\t// auto update blackList validate status when token validate failed\r\n\t\t\t\tif (!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\t this.getCSRFBlackListService().updateBlackListValidate(actionUrl, fuseaction, displayAction,\r\n\t\t\t\t\t\t user, NOT_NEED_VALIDATE, currentUrl, refererUrl);\r\n\t\t\t\t\t flag = Boolean.TRUE;\r\n\r\n\t\t\t\t\tlogger.error(\"CSRF token validate failed, url: \" + actionUrl + \" fuseaction: \" + fuseaction\r\n\t\t\t\t\t\t\t+ \" displayAction: \" + displayAction);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception re)\r\n\t\t{\r\n\t\t\tlogger.throwing(CSRFBlackListClient.class.getName(), \"isTokenValid\", re);\r\n\t\t\treturn Boolean.FALSE;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"@POST\n\t @Produces(\"application/json\")\n\t @Path(\"/validateToken\")\n\t public Response validateToken(@HeaderParam(\"Authorization\") String token){\n\t\t String result=\"\";\n\t\t String Role=\"Visitor\";\n\t\t boolean isValid=false;\n\t\t TokenFactory tokens= listBook.tokens;\n\t\t JSONObject jsonObject= new JSONObject(); \n\t\t System.out.println(token);\n\t\t JSONObject verifyToken =tokens.tokenConsume(token);\n\t\t if(verifyToken.length()>1){\n\t\t\t\t try {\n\t\t\t\t\tif(verifyToken.getInt(\"ID\")>0){\n\t\t\t\t\t\tisValid=true;\n\t\t\t\t\t\tHashMap<String,String> memberData = new HashMap<String,String>();\n\t\t\t\t\t\tmemberData.put(\"ID_Member\", verifyToken.getInt(\"ID\")+\"\");\n\t\t\t\t\t\tmemberData.put(\"Role\", verifyToken.getString(\"Role\")); \n\t\t\t\t\t\tif(retrieveMember(memberData).length()>0){\n\t\t\t\t\t\t\tRole=verifyToken.getString(\"Role\");\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t\t \t\t\t \n\t\t\ttry {\n\t\t\t\tjsonObject.put(\"isValid\", isValid);\n\t\t\t\tjsonObject.put(\"Role\", Role);\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresult=jsonObject+\"\";\n\t\t\treturn listBook.makeCORS(Response.status(200), result);\t\n \t }",
"public String validateToken(HttpServletRequest request, HttpServletResponse response) {\n String[] cookieTokens = extractAndDecodeCookie(request, response);\n return validateToken(cookieTokens, request, response);\n }",
"@GetMapping(\"/validateToken\")\n\t@ApiOperation(value = \"Validate token\", notes = \"Validates token \", response = AuthenticationResponse.class)\n\tpublic AuthenticationResponse getValidity(\n\t\t\t@ApiParam(value = \"Token for validation\", required = true) @RequestHeader(\"Authorization\") final String token) {\n\t\tlog.info(\"Token Validation ----->{}\", token);\n\t\treturn validationService.validate(token);\n\t}",
"private boolean getCSRF()\n throws IOException {\n CookieManager cookieManager = new CookieManager();\n CookieHandler.setDefault(cookieManager);\n HttpURLConnection conn = null;\n\n conn = (HttpURLConnection) url.openConnection();\n\n conn.setUseCaches(false); // Don't use a Cached Copy\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Connection\", \"Keep-Alive\");\n conn.getContent();\n conn.disconnect();\n\n /// parse the returned object for the CSRF token\n CookieStore cookieJar = cookieManager.getCookieStore();\n List<HttpCookie> cookies = cookieJar.getCookies();\n String csrf = null;\n for (HttpCookie cookie : cookies) {\n Log.d(\"cookie\", \"\" + cookie);\n if (cookie.getName().equals(\"csrftoken\")) {\n csrf = cookie.getValue();\n break;\n }\n }\n if (csrf == null) {\n Log.d(MainActivity.TAG, \"Unable to get CSRF\");\n return false;\n }\n Log.d(MainActivity.TAG, \"Received cookie: \" + csrf);\n\n addFormField(\"csrfmiddlewaretoken\", csrf);\n return true;\n }",
"@Override\r\n\tpublic Map<String, Claim> verifyJWT(String token) {\n\t\treturn null;\r\n\t}",
"private Boolean ignoreTokenExpiration(String token) {\n return false;\r\n }",
"@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(),\"CSRF success: \" + response.toString(), Toast.LENGTH_SHORT).show();\n HashMap<String, String> params = new HashMap<String, String>();\n try{\n params.put(\"X-Csrf-Token\",response.getString(\"token\"));\n }catch (Exception ex){\n\n }\n\n }",
"String addCSRFToken(String href);",
"@SuppressLint(\"CommitPrefEdits\") // Preferences change needs to be synchronous\n public void invalidateToken() {\n preferences.edit().remove(getString(R.string.auth_token)).commit();\n validateToken();\n }",
"@Override\n public void onResume() {\n super.onResume();\n\n validateToken();\n }",
"protected boolean getStravaCheckToken()\n {\n return true;\n }",
"@VisibleForTesting\n protected boolean validateToken(EzSecurityToken token) {\n try {\n securityClient.validateReceivedToken(token);\n } catch (EzSecurityTokenException e) {\n logger.error(\"Token validation failed. \", e);\n throw new SecurityException(\"Token failed validation\");\n }\n\n String fromId = token.getValidity().getIssuedTo();\n String toId = token.getValidity().getIssuedFor();\n if (!fromId.equals(toId) && !fromId.equals(deployerSecurityId)) {\n throw new SecurityException(String.format(\n \"This call can only be made from Deployer (%s) or INS services. From: %s - To: %s\",\n deployerSecurityId, fromId, toId));\n }\n\n return true;\n }",
"@Override\n\t\tprotected void doFilterInternal(HttpServletRequest request, \n\t\t\t\tHttpServletResponse response, \n\t\t\t\tFilterChain filterChain) throws ServletException, IOException\n\t\t{\n\t\t\tCsrfToken token = (CsrfToken) request.getAttribute(\"_csrf\");\n\t\t\tlog.debug(\"CsrfToken header: \" + token.getHeaderName() +\n\t\t\t\t\t\" CsrfToken parameterName:\" + token.getParameterName() + \n\t\t\t\t\t\" CsrfToken token:\" + token.getToken() +\n\t\t\t\t\t\", filterChain: \" + filterChain.toString());\n\t\t\tlog.debug(\"Request servlet path: \" + request.getServletPath());\t\t\t\n\t\t\tif (\n\t\t\t\t// only care if it's a POST\t \n\t\t\t\t\"POST\".equals(request.getMethod()) &&\t \n\t\t\t\t// make sure we have a token\n\t\t\t\ttoken != null\n\t\t\t\t) {\n\t\t\t\t// CsrfFilter already made sure the token matched. Here, we'll make sure it's not expired\n\t\t\t\ttry {\n\t\t\t\t\tJwts.parser()\n\t\t\t\t\t\t.setSigningKeyResolver(secretService.getSigningKeyResolver())\n\t\t\t\t\t\t.parseClaimsJws(token.getToken());\t\t\t\t\t\n\n\t\t\t\t} catch (JwtException e) {\n\t\t\t\t\t// most likely an ExpiredJwtException, but this will handle any\n\t\t\t\t\tlog.debug(\"Expired token\");\n\t\t\t\t\trequest.setAttribute(\"exception\", e);\n\t\t\t\t\tresponse.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t\t\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"error\");\n\t\t\t\t\tdispatcher.forward(request, response);\n\t\t\t\t}\n\t\t\t} \n\t\t\tfilterChain.doFilter(request, response);\n\t\t}",
"public static boolean checkSavedToken(Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n String storage_token = preferences.getString(\"token\", \"notoken\");\n\n if (!storage_token.equals(\"notoken\")) {\n Log.d(\"Service\", \"Using stored token\");\n header_token = \"Bearer \" + storage_token;\n isTokenPresent = true;\n bindToken();\n return true;\n }\n return false;\n }",
"@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\n\t\t\tthrows Exception {\n\t\tif (handler instanceof HandlerMethod) {\n\t\t\tHandlerMethod handlerMethod = (HandlerMethod) handler;\n\t\t\tMethod method = handlerMethod.getMethod();\n\t\t\tTokenCheck annotation = method.getAnnotation(TokenCheck.class);\n\t\t\tHttpSession session = request.getSession();\n\t\t\tif (annotation != null) {\n\n\t\t\t\tboolean tokenCheck = annotation.check();\n\t\t\t\tif (tokenCheck) {\n\t\t\t\t\tif (isRepeatSubmit(request)) {\n\t\t\t\t\t\tString rootPath = session.getServletContext().getContextPath();\n\t\t\t\t\t\tresponse.sendRedirect(rootPath + \"/user/tokenError\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t//session.removeAttribute(CommonConstants.SSM_TOKEN);\n\t\t\t\t}\n\t\t\t\tboolean generateToken = annotation.generateToken();\n\t\t\t\tif (generateToken) {\n\t\t\t\t\tsession.setAttribute(CommonConstants.SSM_TOKEN, UUID.randomUUID().toString());\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn super.preHandle(request, response, handler);\n\t\t}\n\t}",
"public void initCSRFBlackListFromFileCache() throws AAException\r\n\t{\r\n\t\tInputStream inputStream = this.getClass().getResourceAsStream(\"aa_sys_csrf_url.properties\");\r\n\t\tProperties props = new Properties();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tprops.load(inputStream);\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\tlogger.error(\"Error load white list from aa_sys_csrf_url.properties\");\r\n\t\t}\r\n\t\tSet<Object> keys = props.keySet();\r\n\t\tfor (Object o : keys)\r\n\t\t{\r\n\t\t\tString key = (String) o;\r\n\t\t\tString value = (String) props.get(o);\r\n\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(key, value);\r\n\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(\"/i18n\" + key, value);\r\n\t\t}\r\n\t}",
"public boolean validate(String key, String value) {\r\n Jedis jedis = null;\r\n try{\r\n jedis = pool.getResource();\r\n String redisValue = jedis.get(getRedisKey(key));\r\n boolean isTokenValid = (redisValue != null && redisValue.equals(value));\r\n if(isTokenValid){\r\n \tjedis.psetex(getRedisKey(key), redisConfiguration.getIdleTimeToInvalidateAuthToken() * 60 * 1000L, value);\r\n }\r\n return isTokenValid;\r\n } finally {\r\n if (jedis != null) {\r\n jedis.close();\r\n }\r\n }\r\n }",
"@PostMapping(\"/token\")\n public ResponseEntity<Object> validateToken(@RequestParam(\"token\") String token) { \t\n \t\tUserLog userlog = authenticationService.authenticateByToken(token); \n \t\tif(userlog == null) {\n \t\t\t// risp.: 401\n \t\t\treturn new ResponseEntity<>(new UserLog(), HttpStatus.NOT_FOUND);\n \t\t}\n \t\treturn new ResponseEntity<>(userlog, HttpStatus.OK); \t\n }",
"public JSONObject checkTokenIntegrity(String token){\n\t\t String result=\"\";\n\t\t String Role=\"Visitor\";\n\t\t int tokenID=0;\n\t\t boolean isValid=false;\n\t\t TokenFactory tokens= listBook.tokens;\n\t\t JSONObject jsonObject= new JSONObject(); \n\t\t System.out.println(token);\n\t\t JSONObject verifyToken =tokens.tokenConsume(token);\n\t\t //checks if the token consuming response is valid,if its valid it will validate its contents with the the database member entry\n\t\t if(verifyToken.length()>1){\n\t\t\t\t try {\n\t\t\t\t\tif(verifyToken.getInt(\"ID\")>0){\n\t\t\t\t\t\tisValid=true;\n\t\t\t\t\t\tHashMap<String,String> memberData = new HashMap<String,String>();\n\t\t\t\t\t\ttokenID= verifyToken.getInt(\"ID\");\n\t\t\t\t\t\tmemberData.put(\"ID_Member\", verifyToken.getInt(\"ID\")+\"\");\n\t\t\t\t\t\tmemberData.put(\"Role\", verifyToken.getString(\"Role\"));\n\t\t\t\t\t\tif(retrieveMember(memberData).length()>0){\n\t\t\t\t\t\t\ttokenID=verifyToken.getInt(\"ID\");\n\t\t\t\t\t\t\tRole=verifyToken.getString(\"Role\");\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t\t \t\t\t \n\t\t\ttry {\n\t\t\t\tjsonObject.put(\"isValid\", isValid);\n\t\t\t\tjsonObject.put(\"ID\", tokenID);\n\t\t\t\tjsonObject.put(\"Role\", Role);\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsonObject;\n \t }",
"void checkToken(String token) throws InvalidTokenException;",
"@GET\n @Path(\"validate\")\n @Produces({MediaType.APPLICATION_JSON + \";charset=utf-8\"})\n public Response validateToken() {\n CONSOLE.log(Level.INFO, \"Token validado con exito. \");\n return Response.ok(new ResponseDTO(0, \"Token validado con éxito\")).build();\n }",
"public boolean checkTokenExpiry(String token) {\n System.out.println(token);\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(token);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }",
"@Override\n\tpublic boolean isTokenValid(String token) {\n\t\tLoginToken loginToken = getLoginTokenByToken(token);\n\t\tif (loginToken != null) {\n\t\t\tDate createTime = loginToken.getCreateTime();\n\t\t\tDate current = new Date();\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()));\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()) / (1000 *60));\n\t\t\tif (Math.abs(current.getTime() - createTime.getTime()) / (1000 * 60) >= 60) {\n\t\t\t\tloginToken.setStatus(Constant.LOGIN_TOKEN_STATUS_INVALID);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tloginToken.setCreateTime(current);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n public void handleTokenExpiration(){\n JWTToken.removeTokenSharedPref(this);\n }",
"protected boolean validateToken(SignedJWT jwtToken) {\n boolean sigValid = validateSignature(jwtToken);\n if (!sigValid) {\n LOG.warn(\"Signature could not be verified\");\n }\n boolean audValid = validateAudiences(jwtToken);\n if (!audValid) {\n LOG.warn(\"Audience validation failed.\");\n }\n boolean expValid = validateExpiration(jwtToken);\n if (!expValid) {\n LOG.info(\"Expiration validation failed.\");\n }\n\n return sigValid && audValid && expValid;\n }",
"@RequestMapping(value = \"\", method = RequestMethod.GET)\n\tpublic void validateToken(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tString signature = request.getParameter(\"signature\");\n\t\tSystem.out.println(\"signature: \" + signature);\n\t\tString timestamp = request.getParameter(\"timestamp\");\n\t\tSystem.out.println(\"timestamp: \" + timestamp);\n\t\tString nonce = request.getParameter(\"nonce\");\n\t\tSystem.out.println(\"nonce: \" + nonce);\n\t\tString echostr = request.getParameter(\"echostr\");\n\t\tSystem.out.println(\"echostr: \" + echostr);\n\t\tList<String> params = new ArrayList<String>();\n\t\tparams.add(TOKEN);\n\t\tparams.add(timestamp);\n\t\tparams.add(nonce);\n\n\t\tCollections.sort(params, new Comparator<String>() {\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn o1.compareTo(o2);\n\t\t\t}\n\t\t});\n\t\tString temp = SHA1.encode(params.get(0) + params.get(1) + params.get(2));\n\t\tif (temp.equals(signature)) {\n\t\t\tresponse.getWriter().write(echostr);\n\t\t}\n\t}",
"private void revalidateSession(String token) {\n\t\tview.showLoggingInLoader();\r\n\t\tif (token != null) {\r\n\t\t\tsynAlert.clear();\r\n\t\t\tAsyncCallback<UserProfile> callback = new AsyncCallback<UserProfile>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onSuccess(UserProfile result) {\r\n\t\t\t\t\tuserAuthenticated();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\tsynAlert.handleException(caught);\r\n\t\t\t\t\tview.showLogin();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tauthenticationController.setNewAccessToken(token, callback);\r\n\t\t}\r\n\t}",
"public boolean validateRefreshToken(String token){\n return refreshTokenRepository.findByToken(token).isPresent();\n }",
"public Boolean isValidCredential(String jwtToken , HttpServletRequest request) throws Exception {\n// Once we get the token and session .. validate it.\n\n // means user no already registered and using an un authenticated session\n // may be session fixation attack\n if (SecurityContextHolder.getContext().getAuthentication() == null) {\n System.out.println(\"[SUSPICIOUS REQUEST]-[\"+request.getRemoteAddr()+\"] not a authenticated session but jwt is acceptable \");\n return false;\n }else {\n // get UserDetails from SecurityContextHolder\n UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n if (jwtTokenUtil.validateToken(jwtToken, userDetails )){\n // jwt is valid , now check the session\n String sessionIp = (String) request.getSession().getAttribute(\"IP\");\n String sessionJwt = (String) request.getSession().getAttribute(\"TOKEN\");\n if (sessionIp != null && sessionJwt != null && sessionIp.equals(request.getRemoteAddr()) && sessionJwt.equals(jwtToken)){\n System.out.println(\"[SESSION VALIDATION APPROVED]\");\n return true;\n }else {\n System.out.println(\"[SUSPICIOUS REQUEST]-[\"+request.getRemoteAddr()+\"] user ip address or jwt not match\");\n System.out.println(\"-------details:\");\n System.out.println(\"---------------storedIp [\"+sessionIp+\"] != requestIp[\"+request.getRemoteAddr()+\"]\");\n System.out.println(\"---------------storedJwt[\"+sessionJwt+\"] != requestJWT[\"+jwtToken+\"]\");\n return false;\n }\n }else {\n System.out.println(\"[ERROR] jwt is not correct\");\n return false;\n }\n\n }\n }",
"public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }",
"@Override\n public boolean isTokenValid(CrUser user, String token) {\n boolean result = false;\n if (user.getToken().equalsIgnoreCase(token)) {\n Date currentTime = new Date();\n if ((currentTime.getTime() - user.getTokenUpdateTime().getTime()) <= 1800000) {\n user.setTokenUpdateTime(currentTime);\n result = true;\n }\n }\n return result;\n }",
"@Override\n\tboolean validate(Vector<String> tokens) {\n\t\treturn false;\n\t}",
"public boolean validateToken(String token) {\n\t\ttry {\n\t\t\tJwts.parser().setSigningKey(secret).parseClaimsJws(token);\n\t\t\treturn true;\n\t\t} catch (MalformedJwtException e) {\n\t\t\tlogger.error(\"token mal formado \" +e.getMessage());\n\t\t} catch (UnsupportedJwtException e) {\n\t\t\tlogger.error(\"token no soportado \" +e.getMessage());\n\t\t} catch (ExpiredJwtException e) {\n\t\t\tlogger.error(\"token expirado \" +e.getMessage());\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tlogger.error(\"token vacío \" +e.getMessage());\n\t\t} catch (SignatureException e) {\n\t\t\tlogger.error(\"error en la firma \" +e.getMessage());\n\t\t}\n\t\treturn false;\n\t}",
"private void registerCSRFUser() {\n\n RestAssured.given()\n .when()\n .relaxedHTTPSValidation()\n .formParam(\"username\", \"csrf-\" + this.getUser())\n .formParam(\"password\", \"password\")\n .formParam(\"matchingPassword\", \"password\")\n .formParam(\"agree\", \"agree\")\n .post(url(\"register.mvc\"));\n\n }",
"private boolean validateToken(String token, String user) {\n System.out.println(\"Userid is: \" + user);\n System.out.println(\"The token is \" + token);\n return user.equals(Jwts.parser().setSigningKey(SIGNING_KEY).parseClaimsJws(token).getBody().getSubject());\n\n }",
"protected void validateSpaRequest()\n\t{\n\t\tif (isSpaRequest())\n\t\t{\n\t\t\thttpContext.disableSpaRequest();\n\t\t\tsendSpaHeaders();\n\t\t}\n\t}",
"protected Tag makeCsrfTokenInputTag(Http.Request request) {\n return input().isHidden().withValue(getCsrfToken(request)).withName(\"csrfToken\");\n }",
"@Test\r\n\tpublic void TestvalidateToken() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tBoolean validateToken = jwtutil.validateToken(generateToken);\r\n\t\tassertEquals(true, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}",
"@Override\n\tpublic Response validateToken(\n\t\t\tString user,\n\t\t\tString token,\n\t\t\tString client_id,//client_id from the app calling the API\n\t\t\tString url,\n\t\t\tString method){\n\n\t\ttry{\t\t\t\n\t\t\tOA2Response result = sessionHandler.validateSession(client_id, user, token, url, method);\n\t\t\treturn Response.ok(result).build();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\toa2logger.logError(httpRequest, Level.SEVERE, e.getLocalizedMessage());\n\t\t\treturn Response.status(Status.INTERNAL_SERVER_ERROR).\n\t\t\t\t\tentity(new OA2Response(500, \"Internal server Error.\"))\n\t\t\t\t\t.build();\n\t\t}\n\t}",
"@Override\n public void tokenOverdue(final Context context) {\n System.out.println(\"tokenOverdue token 失效,重新获取token\");\n\n // 开发者通过自己的方法获取token,这里是demo\n String acountId = \"\";\n USDKCommonManager.updateToken(context, acountId);\n\n /**** 这份代码是例子。。。。。 ****/\n acountId = USDKTest.getSPToken(context);\n String callerPhone = USDKTest.getCallerPhone(context);\n if (TextUtils.isEmpty(acountId) || TextUtils.isEmpty(acountId)) {\n return;\n }\n USDKTest.getToken(context, callerPhone, acountId, new IUSDKHttpCallback() {\n @Override\n public void onSuccess(Object result) {\n try {\n String json = (String) result;\n System.out.println(\"onSuccess json =\" + json);\n String token = \"\";\n\n USDKTestResultGetTokenBean bean = new USDKTestResultGetTokenBean(new JSONObject(json));\n token = bean.getToken();\n USDKCommonManager.updateToken(context, token);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailed(Object result) {\n System.out.println(\"onFailed result =\" + result);\n }\n });\n /**** 这份代码是例子。。。。。 ****/\n }",
"@Override\r\n\tprotected Result validate(Keywords form, HttpServletRequest request) {\n\t\treturn null;\r\n\t}",
"@GetMapping(\"/validate\")\n\tpublic ResponseEntity<?> getValidity(@RequestHeader(\"Authorization\") String jwtToken) {\n\t\treturn new ResponseEntity<AuthResponse>(this.service.validate(jwtToken) , HttpStatus.OK);\n\t}",
"@JsonProperty(\"blacklistUnsafeTokens\")\n public Boolean getBlacklistUnsafeTokens() {\n return blacklistUnsafeTokens;\n }",
"public void validate(){\n if (validated){\n validated = false;\n } else {\n validated = true;\n }\n }",
"protected OAuth2ClientApplicationDTO findOAuthConsumerIfTokenIsValid(OAuth2TokenValidationRequestDTO requestDTO) {\n OAuth2TokenValidationService oAuth2TokenValidationService = new OAuth2TokenValidationService();\n return oAuth2TokenValidationService.findOAuthConsumerIfTokenIsValid(requestDTO);\n }",
"private void requestValidationToken(final Context context, final ThreePid pid, final ThreePidRequestListener listener) {\n Uri identityServerUri = mHsConfig.getIdentityServerUri();\n new LoginRestClient(mHsConfig)\n .doesServerRequireIdentityServerParam(new ApiCallback<Boolean>() {\n @Override\n public void onNetworkError(Exception e) {\n listener.onThreePidRequestFailed(e.getLocalizedMessage());\n }\n\n @Override\n public void onMatrixError(MatrixError e) {\n listener.onThreePidRequestFailed(e.getLocalizedMessage());\n }\n\n @Override\n public void onUnexpectedError(Exception e) {\n listener.onThreePidRequestFailed(e.getLocalizedMessage());\n }\n\n @Override\n public void onSuccess(Boolean info) {\n if (info) {\n if (identityServerUri == null) {\n listener.onIdentityServerMissing();\n } else {\n doRequestValidationToken(context, pid, identityServerUri.toString(), listener);\n }\n\n } else {\n // Ok, not mandatory\n doRequestValidationToken(context, pid, null, listener);\n }\n }\n });\n\n }",
"private boolean isValid(CachedSession cachedSession, String authToken, JsonObject jsonAuth) {\n\n if (null == cachedSession) {\n return false;\n }\n\n if (null == authToken && null != jsonAuth) {\n // we might have this token on the jsonAuth:\n if (jsonAuth.containsKey(\"token\")) {\n authToken = jsonAuth.getString(\"token\");\n }\n }\n\n if (!cachedSession.getAuthToken().equals(authToken)) {\n // this is a new token, validate it again!\n logger.backingTokenChanged(cachedSession.getAuthToken(), authToken);\n return false;\n }\n\n boolean stillValid = System.currentTimeMillis() < cachedSession.getExpiresAt();\n logger.isTokenStillValid(stillValid);\n\n return stillValid;\n }",
"@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }",
"public boolean checkTokenExpiry() {\n //System.out.println(\"Checking token expiry...\");\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(currentAccessToken);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n //System.out.println(\"Now is \"+nowTime);\n //System.out.println(\"Expires at \"+expires);\n //System.out.println(\"Expired? \"+(nowTime >= expires));\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }",
"private boolean verifyToken(final String token) {\n LOG.debug(token);\n if (!this.verificationToken.equals(token)) {\n LOG.error(Constants.VERIFICATION_TOKEN_INVALID);\n return false;\n }\n return true;\n }",
"protected void validateRefreshRequest() {\n\t\tcallAndStopOnFailure(EnsureScopeInRefreshRequestContainsNoMoreThanOriginallyGranted.class, \"RFC6749-6\");\n\t\tcallAndStopOnFailure(ValidateRefreshToken.class, \"RFC6749-6\");\n\t}",
"public static boolean hasRequestTokenSecret(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN_SECRET, null)!=null;\n\t\t}",
"public boolean tokenEnabled() {\n return tokenSecret != null && !tokenSecret.isEmpty();\n }",
"private boolean tokenValido(TipoToken tipoToken) {\r\n Token token = colaDeTokens.poll();\r\n if (token.tipoToken.equals(tipoToken)) {\r\n return true;\r\n } else {\r\n System.out.println(\"Error: token no válido \" + token.valor);\r\n return false;\r\n }\r\n }",
"@Scheduled(fixedRate = checkRate)\n public void CheckValidated() {\n log.info(\"Checking if links still valid and alive\");\n try{\n for(ShortURL s : urlList) {\n UrlValidatorAndCheckerImpl urlValidatorAndChecker = new UrlValidatorAndCheckerImpl(s.getTarget());\n if(!urlValidatorAndChecker.execute()){\n log.info(\"URL {} dead or not valid anymore.\", s.getTarget());\n s.setMode(HttpStatus.GONE.value());\n } else{\n s.setMode(HttpStatus.TEMPORARY_REDIRECT.value());\n }\n }\n } catch( NullPointerException e) {\n //No se ha inicializado aun\n }\n }",
"public UserValidationDto validateUserToken(String token) {\n\n\t\tString url = coreUrl + \"/validate-token\";\n\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\trestTemplate.setErrorHandler(new RestTemplateUserResponseErrorHandler());\n\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE);\n\n\t\tUriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url).queryParam(\"token\", token);\n\n\t\tHttpEntity<UserValidationDto> response = restTemplate.getForEntity(builder.build().encode().toUri(), UserValidationDto.class);\n\n\t\treturn response.getBody();\n\n\t}",
"public boolean validateToken(String token, String username) {\n\t\tString tokenUserName = getUsername(token);\n\t\treturn username.equals(tokenUserName) && !isTokenExpired(tokenUserName);\n\t}",
"public Jwt validateJwtSessionCookie(MessageInfo messageInfo) {\n\n C jwtSessionCookie = findJwtSessionCookie(messageInfo);\n if (jwtSessionCookie != null) {\n LOG.debug(\"Session JWT cookie found\");\n }\n\n if (jwtSessionCookie != null && !isEmpty(jwtSessionCookie.getValue())) {\n\n final Jwt jwt;\n try {\n jwt = verifySessionJwt(jwtSessionCookie.getValue());\n } catch (JweDecryptionException e) {\n LOG.debug(\"Failed to decrypt Jwt\", e);\n return null;\n }\n if (jwt != null) {\n //if all goes well!\n setClaimsOnRequest(messageInfo, jwt);\n\n // If request is made within one minute of the Jwt being issued the idle timeout is not reset.\n // This helps reduce overheads when the client makes multiple requests for a single operation.\n if (hasCoolOffPeriodExpired(jwt)) {\n // reset tokenIdleTime\n resetIdleTimeout(jwt, messageInfo);\n }\n\n messageInfo.getMap().put(JWT_VALIDATED_KEY, true);\n\n return jwt;\n }\n } else {\n LOG.debug(\"Session JWT cookie not set\");\n }\n\n return null;\n }",
"protected boolean shouldValidateSession ()\n {\n return false;\n }",
"public void sendValidateUserToken(String token) {\n\t\tif (token != null) {\n\t\t\tsendSuccessResult(CALLBACK_TYPE_VALIDATE_USER_TOKEN, token);\n\t\t}\n\t}",
"public Boolean validateToken(String token, UserDetails userDetails) {\n\t\tfinal String username = getUsernameFromToken(token);\n\t\treturn (username.equals(userDetails.getUsername())\n\t\t\t\t&& !isTokenExpired(token)\n\t\t\t\t&& activeTokens.getActiveTokens().contains(token));\n\t}",
"@Override\r\n\tpublic boolean checktoken(String telephone, String accesstoken) {\n\t\tUserCustomer checktoken = userCustomerMapper.checktoken(telephone ,accesstoken );\r\n\t\tif (checktoken == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean tokenIsValid(String token) {\n return DATABASE.getTokens().stream()\n .anyMatch(currentToken -> currentToken.equals(token));\n }",
"private TokenHandler(Context context) {\n mContext = context;\n pullTokenDataFromLocal();\n if(hasSocialToken()){\n updateLoginTokens();\n }\n }",
"public Boolean canTokenBeRefreshed(String token, UserDetails userDetails) {\n return isTokenValid(token, userDetails);\n }",
"private Boolean isTokenExpired(String token) {\n\t\tfinal Date expiration = getExpirationDateFromToken(token);\n\t\treturn expiration.before(new Date());\n\t}",
"private void refreshTokenPool() {\n \n\t\tfor (Map.Entry<String, Token> entry : tokenPool.entrySet()) {\t\n\t\t\tToken token = entry.getValue();\n\t\t\tString key = entry.getKey();\n\t\t\tif(token.getExpiry() <= getTimeStampMilliSeconds()) {\n\t\t\t\ttokenPool.remove(key);\n\t\t\t\t//check if it is in live list and remove it\n\t\t\t\tif(liveTokenList.contains(key)) {\n\t\t\t\t\tremoveKeyFromTokenList(key);\n\t\t\t\t}\n\t\t //Add the token if it has never been live or if the current time is more than the last use + the rate \n\t\t\t} else if(token.getLastlive() == 0 || (getTimeStampMilliSeconds() >= token.getLastUsed()+token.getRate())) {\n//\t\t\t\tlogger.info(\"MAKE-LIVE : \" + (token.getLastlive()+token.getRate()) + \", : time : \" + getTimeStampMilliSeconds() + \", last used : \" + token.getLastUsed());\n\t\t\t\tif(!liveTokenList.contains(key)) {\n\t\t\t\t\taddKeyToTokenList(key);\n\t\t\t\t\ttoken.setLastlive(getTimeStampMilliSeconds());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void validate() {\n // no op\n }",
"@ServiceMethod(returns = ReturnType.SINGLE)\n void refreshValidationToken(String resourceGroupName, String profileName, String customDomainName, Context context);",
"private void releaseTokenState() {\n //checks if token is taken\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());\n if (preferences!=null && preferences.getBoolean(TOKEN_RELEASED_ERROR, false)) {\n leaveToken();\n }\n }",
"private boolean isValidToken(String authHeader) {\n AuthorisedTokenData token = authorisedTokensServices.getAuthorisedTokenByToken(authHeader);\n\n return token != null && token.getToken().equals(authHeader);\n }",
"private static boolean ValidateTokenSignature(String token, PublicKey publicKey) {\n \tboolean verified=true;\n try {\n \tJwts.parser().setSigningKey(publicKey).parseClaimsJws(token);\n } catch (Exception e) {\n verified=false;\n }\n return verified;\n }",
"@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {\n String token = provider.getTokenFromHttpHeader(request);\n\n try {\n if (token != null && provider.validateToken(token)) {\n Authentication authentication = provider.getAuthentication(token);\n SecurityContextHolder.getContext().setAuthentication(authentication);\n }\n } catch (Exception ex) {\n System.out.println(ex);\n SecurityContextHolder.clearContext();\n }\n\n chain.doFilter(request, response);\n }",
"ValidationResponse validate();",
"public static boolean hasRequestToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN, null)!= null;\n\t\t}",
"@Override\n public void validateRequest(WebScriptRequest webScriptRequest) {\n }",
"public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }",
"public void verifyExpiration(RefreshToken token) {\n if (token.getExpiryDate().compareTo(Instant.now()) < 0) {\n throw new TokenRefreshException(token.getToken(), \"Expired token. Please issue a new request\");\n }\n }",
"@Override\n protected void doFilterInternal(\n HttpServletRequest request, HttpServletResponse response, FilterChain chain)\n throws ServletException, IOException {\n\n String token = Optional.ofNullable(request.getHeader(TokenDTO.TOKEN_HEADER))\n .filter(a -> a.startsWith(\"Bearer \"))\n .map(a -> a.replaceAll(\"^Bearer \", \"\"))\n .orElseGet(() -> request.getParameter(\"token\"));\n\n // We should exclude some API methods used for confirm email from this filter\n // due to they have the same parameter as 'token'\n if (token == null ||\n request.getServletPath().startsWith(\"/user/validate-reset-token\") ||\n request.getServletPath().startsWith(\"/user/confirm-email\")) {\n chain.doFilter(request, response);\n return;\n }\n\n try {\n //Validate and parse JWT token, check token expiration.\n DecodedJWT decodedJwt = loginService.decodeJwt(token);\n\n Long id = decodedJwt.getClaim(\"id\").asLong();\n User user = userService.getUserById(id);\n if (user == null) {\n throw new UnauthorizedException(\"No such user with id= \" + id);\n }\n\n List<Role> roles = Collections.singletonList(user.getRole());\n Collection<SimpleGrantedAuthority> authorityList = getSimpleGrantedAuthorities(\n roles);\n\n List<Long> projectIds = projectService.getProjectsByUserId(user.getId()).stream()\n .map(Project::getId)\n .collect(Collectors.toList());\n\n AuthenticatedUser credentials = new AuthenticatedUser(user.getId(), user.getEmail(),\n token,\n authorityList, projectIds,\n user.isLocked() || user.isBlockedByAdmin());\n\n if (!credentials.isAccountNonLocked()) {\n setResponseErrorMsg(response, \"User Account is locked!\");\n return;\n }\n\n Authentication jwtAuthentication =\n new UsernamePasswordAuthenticationToken(credentials, \"\",\n credentials.getAuthorities());\n\n SecurityContextHolder.getContext().setAuthentication(jwtAuthentication);\n } catch (JWTDecodeException | SignatureVerificationException e) {\n setResponseErrorMsg(response, \"JWT token is not valid\");\n return;\n } catch (TokenExpiredException e) {\n setResponseErrorMsg(response, \"JWT token has expired\");\n return;\n } catch (Exception e) {\n setResponseErrorMsg(response, \"JWT authentication failed\");\n return;\n }\n\n chain.doFilter(request, response);\n }",
"private void validateData() {\n }",
"public boolean isSecurityTokenExpired() {\n return System.currentTimeMillis() > securityTokenExpiryTime || isExpired();\n }",
"public void checkToken(Token token) {\n if(keywordHashTable.containsKey(token.getTokenInstance()))\n token.setTokenID(keywordHashTable.get(token.getTokenInstance()));\n }",
"@java.lang.Override\n public boolean hasToken() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"private static JsonNode validate (Request req, Response res) {\n FeedVersion version = requestFeedVersion(req, \"manage\");\n\n // FIXME: Update for sql-loader validation process?\n return null;\n// return version.retrieveValidationResult(true);\n }",
"@Override\n\tprotected AuthenticationToken createToken(ServletRequest request, ServletResponse response) throws Exception {\n\t\treturn null;\n\t}",
"public Result validate(String username, String password){\n\tTokenGeneratorService tokengen = new TokenGeneratorService();\n\tString token = tokengen.usertoken(username, password);\n\tCookie redirecturlcookie = request().cookie(\"redirecturl\");\n\tString redirecturl =null;\n\tSystem.out.println(redirecturl);\n\tif(token.equals(\"default\"))\n\treturn redirect(\"/\");\n\tif(redirecturlcookie!=null){\n\t\t redirecturl = redirecturlcookie.value();\n\t\t response().discardCookie(\"redirecturl\");\n\t\tCookie ck = new Cookie(\"authorization\",token, null, null, null, false,false);\n\treturn redirect(redirecturl).withCookies(ck);\n\t}\n\telse\n\t{\n\t\tCookie ck = new Cookie(\"authorization\",token, null, null, null, false,false);\n\t\treturn ok(views.html.validated.render()).withCookies(ck);\n\t}\n}",
"@Override\n public void scanHttpResponseReceive(HttpMessage msg, int id, Source source) {\n if (AlertThreshold.HIGH.equals(getAlertThreshold()) && !msg.isInScope()) {\n return; // At HIGH threshold return if the msg isn't in scope\n }\n\n // need to do this if we are to be able to get an element's parent. Do it as early as\n // possible in the logic\n source.fullSequentialParse();\n\n long start = System.currentTimeMillis();\n\n ExtensionAntiCSRF extAntiCSRF = getExtensionAntiCSRF();\n\n if (extAntiCSRF == null) {\n return;\n }\n\n List<Element> formElements = source.getAllElements(HTMLElementName.FORM);\n List<String> tokenNames = extAntiCSRF.getAntiCsrfTokenNames();\n\n if (formElements != null && formElements.size() > 0) {\n boolean hasSecurityAnnotation = false;\n\n // Loop through all of the FORM tags\n LOGGER.debug(\"Found {} forms\", formElements.size());\n\n int numberOfFormsPassed = 0;\n\n List<String> ignoreList = new ArrayList<>();\n String ignoreConf = getCSRFIgnoreList();\n if (ignoreConf != null && ignoreConf.length() > 0) {\n LOGGER.debug(\"Using ignore list: {}\", ignoreConf);\n for (String str : ignoreConf.split(\",\")) {\n String strTrim = str.trim();\n if (strTrim.length() > 0) {\n ignoreList.add(strTrim);\n }\n }\n }\n String ignoreAttName = getCSRFIgnoreAttName();\n String ignoreAttValue = getCSRFIgnoreAttValue();\n\n for (Element formElement : formElements) {\n LOGGER.debug(\n \"FORM [{}] has parent [{}]\", formElement, formElement.getParentElement());\n StringBuilder sbForm = new StringBuilder();\n SortedSet<String> elementNames = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);\n ++numberOfFormsPassed;\n // if the form has no parent, it is pretty likely invalid HTML (or Javascript!!!),\n // so we will not report\n // any alerts on it.\n // ie. This logic is necessary to eliminate false positives on non-HTML files.\n if (formElement.getParentElement() == null) {\n LOGGER.debug(\n \"Skipping HTML form because it has no parent. Likely not actually HTML.\");\n continue; // do not report a missing anti-CSRF field on this form\n }\n if (formOnIgnoreList(formElement, ignoreList)) {\n continue;\n }\n if (!StringUtils.isEmpty(ignoreAttName)) {\n // Check to see if the specific security annotation is present\n Attribute att = formElement.getAttributes().get(ignoreAttName);\n if (att != null) {\n if (StringUtils.isEmpty(ignoreAttValue)\n || ignoreAttValue.equals(att.getValue())) {\n hasSecurityAnnotation = true;\n }\n }\n }\n\n List<Element> inputElements = formElement.getAllElements(HTMLElementName.INPUT);\n sbForm.append(\"[Form \" + numberOfFormsPassed + \": \\\"\");\n boolean foundCsrfToken = false;\n\n if (inputElements != null && inputElements.size() > 0) {\n // Loop through all of the INPUT elements\n LOGGER.debug(\"Found {} inputs\", inputElements.size());\n for (Element inputElement : inputElements) {\n String attId = inputElement.getAttributeValue(\"ID\");\n if (attId != null) {\n elementNames.add(attId);\n for (String tokenName : tokenNames) {\n if (tokenName.equalsIgnoreCase(attId)) {\n foundCsrfToken = true;\n break;\n }\n }\n }\n String name = inputElement.getAttributeValue(\"NAME\");\n if (name != null) {\n if (attId == null) {\n // Dont bother recording both\n elementNames.add(name);\n }\n for (String tokenName : tokenNames) {\n if (tokenName.equalsIgnoreCase(name)) {\n foundCsrfToken = true;\n break;\n }\n }\n }\n }\n }\n if (foundCsrfToken) {\n continue;\n }\n\n String evidence = \"\";\n evidence = formElement.getFirstElement().getStartTag().toString();\n\n // Append the form names with double quotes\n sbForm.append(String.join(\"\\\" \\\"\", elementNames));\n sbForm.append(\"\\\" ]\");\n\n String formDetails = sbForm.toString();\n String tokenNamesFlattened = tokenNames.toString();\n\n int risk = Alert.RISK_MEDIUM;\n String desc = Constant.messages.getString(\"pscanrules.noanticsrftokens.desc\");\n String extraInfo =\n Constant.messages.getString(\n \"pscanrules.noanticsrftokens.alert.extrainfo\",\n tokenNamesFlattened,\n formDetails);\n if (hasSecurityAnnotation) {\n risk = Alert.RISK_INFO;\n extraInfo =\n Constant.messages.getString(\n \"pscanrules.noanticsrftokens.extrainfo.annotation\");\n }\n\n newAlert()\n .setRisk(risk)\n .setConfidence(Alert.CONFIDENCE_LOW)\n .setDescription(desc + \"\\n\" + getDescription())\n .setOtherInfo(extraInfo)\n .setSolution(getSolution())\n .setReference(getReference())\n .setEvidence(evidence)\n .setCweId(getCweId())\n .setWascId(getWascId())\n .raise();\n }\n }\n LOGGER.debug(\"\\tScan of record {} took {} ms\", id, System.currentTimeMillis() - start);\n }",
"public ResponseEntity<AuthDetails> validateJwtToken(String tokenToValidate, String authToken) {\n\t\treturn restTemplate.exchange(\n\t\t\t\tRequestEntity\n\t\t\t\t\t.post(URI.create(protocol + \"://\" + host + \":\" + port + context + \"/validate\"))\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.header(\"Authorization\", \"Bearer \" + authToken)\n\t\t\t\t\t.body(new JwtToken(tokenToValidate)),\n\t\t\t\tAuthDetails.class);\t\t\n\t}",
"public void validate() {\n\t\tthis.invalidated = false;\n\t}",
"public AuthenticationResponse validateToken(AuthValidationRequest authValidationRequest) throws TokenExpiredException {\n boolean isExpired = tokenHelper.isExpired(authValidationRequest.getToken());\n if(isExpired){\n throw new TokenExpiredException(\"Token expired. Please login again\");\n }\n\n AuthenticationResponse response = new AuthenticationResponse();\n response.setToken(authValidationRequest.getToken());\n\n String username = tokenHelper.getUsernameFromToken(authValidationRequest.getToken());\n User user = userRepo.findByUsername(username);\n\n response.setUser(user);\n\n return response;\n }",
"public Boolean validateToken(String token, String username, String applicationCode, Date lastPasswordReset) {\n\t\tfinal String usernameToValidate = this.getUsernameFromToken(token);\n\t\tfinal String applicationCodeToValidate = this.getIssuerFromToken(token);\n\t\tfinal Date created = this.getCreatedDateFromToken(token);\n\t\tfinal Date expiration = this.getExpirationDateFromToken(token);\n\t\treturn (usernameToValidate.equals(username) \n\t\t\t\t&& applicationCodeToValidate.equals(applicationCode)\n\t\t\t\t&& !(this.isTokenExpired(token)) \n\t\t\t\t&& !(this.isCreatedBeforeLastPasswordReset(created, lastPasswordReset)));\n\t}",
"public boolean hasToken() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }"
] | [
"0.69795823",
"0.6065491",
"0.59449536",
"0.59390754",
"0.5870761",
"0.57915103",
"0.56929064",
"0.56774986",
"0.56466657",
"0.5536862",
"0.54954964",
"0.5428256",
"0.53279984",
"0.53176755",
"0.5315878",
"0.5270757",
"0.52668",
"0.52436376",
"0.51927006",
"0.5183324",
"0.513183",
"0.51203716",
"0.51011986",
"0.50985307",
"0.50884974",
"0.50867826",
"0.50853604",
"0.5079983",
"0.5077941",
"0.50562346",
"0.5054195",
"0.5018391",
"0.5005324",
"0.49924836",
"0.49678457",
"0.49486393",
"0.49274054",
"0.49212384",
"0.488163",
"0.48537946",
"0.48484525",
"0.4839201",
"0.48357522",
"0.48327827",
"0.48198262",
"0.48161831",
"0.48002762",
"0.47818118",
"0.47727346",
"0.47646716",
"0.47520903",
"0.472264",
"0.4719204",
"0.4710518",
"0.4706002",
"0.4704604",
"0.4696152",
"0.46950683",
"0.4686522",
"0.46845824",
"0.46663547",
"0.4640344",
"0.4639613",
"0.46338934",
"0.462698",
"0.46209857",
"0.46140614",
"0.46139035",
"0.45991284",
"0.4567075",
"0.45656204",
"0.45599413",
"0.45580047",
"0.45538345",
"0.45514047",
"0.45436484",
"0.4540603",
"0.45306334",
"0.4529905",
"0.4526245",
"0.45221958",
"0.4521063",
"0.45167005",
"0.45158058",
"0.4508647",
"0.450715",
"0.45038965",
"0.45023632",
"0.44916388",
"0.4486571",
"0.44849467",
"0.44818994",
"0.44817728",
"0.44778717",
"0.44739422",
"0.44737044",
"0.44709912",
"0.44614613",
"0.4458829",
"0.44573656"
] | 0.60220885 | 2 |
init CSRF blackList data when system start. | public void initCSRFBlackListCache(String needValidation) throws AAException
{
try
{
List<CSRFBlackListModel> list = this.getCSRFBlackListService().searchBlackListForCache(needValidation);
for (CSRFBlackListModel model : list)
{
String displayAction = model.getDisplayAction();
// not use null
if (ValidationUtil.isEmpty(displayAction))
{
displayAction = "";
}
SystemConfigCacheHelper.getInstance().putCSRFBlackListCache(
model.getUrl() + "_" + model.getFuseaction() + "_" + displayAction, model.getNeedValidation());
}
}
catch (Exception re)
{
logger.throwing(CSRFBlackListClient.class.getName(), "initCSRFBlackListCache", re);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initCSRFBlackListFromFileCache() throws AAException\r\n\t{\r\n\t\tInputStream inputStream = this.getClass().getResourceAsStream(\"aa_sys_csrf_url.properties\");\r\n\t\tProperties props = new Properties();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tprops.load(inputStream);\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\tlogger.error(\"Error load white list from aa_sys_csrf_url.properties\");\r\n\t\t}\r\n\t\tSet<Object> keys = props.keySet();\r\n\t\tfor (Object o : keys)\r\n\t\t{\r\n\t\t\tString key = (String) o;\r\n\t\t\tString value = (String) props.get(o);\r\n\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(key, value);\r\n\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(\"/i18n\" + key, value);\r\n\t\t}\r\n\t}",
"public void init() throws ServletException {\n\t\tList<User> list = new ArrayList<>();\n\t\t\n\t\t//store the list in ServletContext domain\n\t\tthis.getServletContext().setAttribute(\"list\", list);\n\t}",
"@Override\n public void init() {\n ServletContext context = getServletContext();\n KeyLoader loader = new KeyLoader();\n\n context.setAttribute(\"translateKey\", loader.getKey(TRANSLATE));\n context.setAttribute(\"authKey\", loader.getKeyBytes(AUTH));\n context.setAttribute(\"servletRoles\", getServletRoles());\n }",
"@Override\r\n public void init() throws ServletException {\n \tUtilisateurManager utilisateurManager = new UtilisateurManager();\r\n\t\tList<Utilisateur> listeIdPseudo = new ArrayList<Utilisateur>();\r\n\t\tlisteIdPseudo = utilisateurManager.getlisteIdPseudo();\r\n\t\tSystem.out.println(\"liste \"+ listeIdPseudo);\r\n\t\tServletContext servletContext;\r\n\t\tthis.getServletContext().setAttribute(\"listeIdPseudo\", listeIdPseudo);\r\n\t\t\r\n \t\r\n\t\t\r\n\t\t\r\n\t\t//getServletContext().setAttribute(\"listeIdPseudo\", \"listeIdPseudo\");\r\n \t\r\n \t\r\n \tsuper.init();\r\n }",
"public void init() {\n\t\tList<Order> entries = new ArrayList<>();\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tgetServletContext().setAttribute(\"entries\", entries);\n\t}",
"protected void onInit() {\n super.onInit();\n securityManager = (com.sustain.security.SustainSecurityManager) getBean(\"securityManager\");\n }",
"private static void initialize()\n {\n\tif (cookieHandler == null)\n\t{\n\t BrowserService service = ServiceProvider.getService();\n\t cookieHandler = service.getCookieHandler();\n\t}\n }",
"protected void init() { \n ServletContext servletContext = getServletContext();\n applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\n String names[] = applicationContext.getBeanDefinitionNames();\n\n for (String name : names) {\n System.out.println(\"name:\" + name);\n }\n }",
"@PostConstruct\r\n\tpublic void init() {\n\t\tzeroLeggedOAuthProviderProcessingFilter = new ZeroLeggedOAuthProviderProcessingFilter(\r\n\t\t\t\toauthConsumerDetailsService, oauthNonceServices, oauthProcessingFilterEntryPoint,\r\n\t\t\t\toauthAuthenticationHandler, oauthProviderTokenServices, true);\r\n\t}",
"public void init() throws ServletException\n {\n super.init();\n logger.debug(\"@@ init unartig action servlet WITH STRUTS\");\n logger.debug(\"Calling init on Registry\");\n Registry.init(getServletConfig());\n\n try\n {\n logger.info(\"Init security\");\n CryptoUtil.setPrng(SecureRandom.getInstance(\"SHA1PRNG\"));\n new TreeGenerator().generateTreeItems();\n logger.info(\"new navigation tree for tigra tree menu generated!\");\n } catch (UnartigException e)\n {\n logger.error(\"Exception while generating menu tree : \",e);\n throw new ServletException(\"cannot write tree menu\",e);\n } catch (NoSuchAlgorithmException e)\n {\n logger.error(\"Exception while creating SecureRandom instance\",e);\n throw new ServletException(\"initialization failed\",e);\n }\n PhotoOrderService orderService = PhotoOrderService.getInstance();\n // no service needed to batch-process orders currently:\n// orderService.startService();\n// System.out.println(\"UnartigActionServlet.init : STARTED ORDER SERVICE !\");\n\n //Initialize SecureRandom\n //This is a lengthy operation, to be done only upon\n //initialization of the application\n try {\n SecureRandom prng = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n\n }",
"public void init() throws ServletException {\n\t\tModel model = new Model(getServletConfig());\r\n\t\tAction.add(new LoginAction(model));\r\n\t\tAction.add(new ManageTweet(model));\r\n\t}",
"private void init()\n {\n \t// Make page stateless.\n setStatelessHint(true);\n\n // Add registration form.\n RegistrationForm registrationForm = new RegistrationForm(REGISTRATION_FORM);\n add(registrationForm);\n // AjaxFormValidatingBehavior.addToAllFormComponents(registrationForm, \"onblur\");\n }",
"void initSafeties(){\n gyroSafety();\n tensorFlowSafety();\n\n telemetry.addLine(\"Init finalized successfully\");\n telemetry.update();\n }",
"@Override\n public void init(ServletConfig servletConfig) throws ServletException {\n ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletConfig.getServletContext());\n userService = applicationContext.getBean(UserService.class);\n\n //initialize JSR 303 validator\n ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n validator = factory.getValidator();\n\n resourceBundle = ResourceBundle.getBundle(\"donationlist\");\n }",
"public WebConnector() {\n\t\tsuper.setFieldValues();\n\t\tagentIdToSessionId = new HashMap<>();\n\t\tsessions = new HashMap<>();\n\t\tsecureRandom = new SecureRandom();\n\t\tthis.logger.setLevel(Level.SEVERE);\n\t}",
"public void init()\n {\n context = getServletContext();\n parameters = (Siu_ContainerLabel)context.getAttribute(\"parameters\");\n }",
"@Override\n\tpublic void init() throws ServletException\n\t{\n\t\tsuper.init();\n\t\t\n\t\tActiveUsers = (HashMap<String, User>) getServletContext().getAttribute(\"ActiveUsers\");\n\t\tMessages = (ArrayList<Message>) getServletContext().getAttribute(\"Messages\");\n\t\t\n\t\tif(ActiveUsers == null)\n\t\t{\n\t\t\tActiveUsers = new HashMap<String, User>();\n\t\t\tgetServletContext().setAttribute(\"ActiveUsers\", ActiveUsers);\n\t\t}\n\t\t\n\t\tif(Messages == null)\n\t\t{\n\t\t\tMessages = new ArrayList<Message>();\n\t\t\tgetServletContext().setAttribute(\"Messages\", Messages);\n\t\t}\n\t}",
"@Override\n public void onStartup(ServletContext aServletContext) throws ServletException {\n super.onStartup(aServletContext);\n registerHiddenFieldFilter(aServletContext);\n }",
"private void init() {\n\t\temail_login=(EditText)findViewById(R.id.et_email_login);\n\t\tpassword_login=(EditText)findViewById(R.id.et_password_login);\n\t\t\n\t\t\n\t\tlogin_login=(Button)findViewById(R.id.bt_login_login);\n\n\t\tregister_login=(TextView)findViewById(R.id.tv_register_login);\n\t\tforget_login=(TextView)findViewById(R.id.tv_forgetpasw_login);\n\t\tlogin_remind=(TextView)findViewById(R.id.tv_remind_login);\n\t\t\n\t\tregister_login.setOnClickListener(this);\n\t\tforget_login.setOnClickListener(this);\n\t\tlogin_login.setOnClickListener(this);\n\t\t\n\t\tif(!LocalStorage.getBoolean(this, Constant.CAN_LOGIN)){\t\t\n\t\t\tlogin_remind.setText(getResources().getString(R.string.config_login));\t\t\n\t\t}else{\n\t\t\temail_login.addTextChangedListener(textwatcher);\n\t\t\tpassword_login.addTextChangedListener(textwatcher);\n\t\t}\n\t\tlogin_login.setEnabled(false);\n\t}",
"public void init() {\n\t\t\n\t\t\n\t\tprepareGaborFilterBankConcurrent();\n\t\t\n\t\tprepareGaborFilterBankConcurrentEnergy();\n\t}",
"@Override\n\tpublic void onStartup(ServletContext servletContext)\n\t\t\tthrows ServletException {\n\t\tsuper.onStartup(servletContext);//master line where whole framework works\n\t\t//configure global objects/tasks if required\n\t}",
"public void init() throws ServletException {\n\t\tSystem.out.println(\"=====start loginServler=========\");\n\t}",
"@PostConstruct\n protected void init() {\n direccionRegionalList = new ArrayList<InstitucionRequerida>();\n direccionRegionalList = institucionRequeridaServicio.getDireccionRegionalList();\n gadList = new ArrayList<InstitucionRequerida>();\n gadList = institucionRequeridaServicio.getGADList();\n registroMixtoList = new ArrayList<InstitucionRequerida>();\n registroMixtoList = institucionRequeridaServicio.getRegistroMixtoList();\n }",
"public void init() {\n\n\t\tString rootdir = null;\n\t\ttry {\n\t\t\trootdir = ServletActionContext.getServletContext().getRealPath(\"/\");\n\t\t} catch (Exception ex) {\n\n\t\t}\n\n\t\tif (rootdir == null) {\n\t\t\trootdir = \"/Users/huangic/Documents/jetty-6.1.22/webapps/TransWeb\";\n\t\t}\n\n\t\tlogger.debug(rootdir);\n\t\tString classesdir = rootdir + \"/WEB-INF/classes/\";\n\t\tthis.xmlBatchRule = ReadXML(classesdir\n\t\t\t\t+ \"applicationContext-BatchRule.xml\");\n\t\tthis.xmlDB = ReadXML(classesdir + \"applicationContext-DB.xml\");\n\t\tthis.xmlSystem = ReadXML(classesdir + \"applicationContext-system.xml\");\n\n\t}",
"private static void initForProd() {\r\n try {\r\n appTokenManager = new AppTokenManager();\r\n app = new CerberusApp(301L, \"3dd25f8ef8429ffe\",\r\n \"526fbde088cc285a957f8c2b26f4ca404a93a3fb29e0dc9f6189de8f87e63151\");\r\n appTokenManager.addApp(app);\r\n appTokenManager.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Before\r\n\tpublic void init() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tmockMvc = MockMvcBuilders.standaloneSetup(tokenController).build();\r\n\r\n\t\t// mockMvc = MockMvcBuilders.webAppContextSetup(context).build();\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }",
"private void init() {\n\t\tutils = new MmustUtils(Authenticate.this);\n\t\treceiver = new AuthReceiver();\n\t\t\n\t\tetRegno = (EditText)findViewById(R.id.authenticate_editText_reg_no);\n\t\tetPassword = (EditText)findViewById(R.id.authenticate_editText_password);\n\t\tetPassword.addTextChangedListener(this);\n\t\t\n\t\tbtAuth = (Button)findViewById(R.id.authenticate_button_auth);\n\t\tbtAuth.setOnClickListener(this);\n\t\t\n\t\tivPeek = (ImageView)findViewById(R.id.authenticate_imageView_view_password);\n\t\tivPeek.setVisibility(ImageView.GONE);\n\t\tivPeek.setOnClickListener(this);\n\t\t\n\t\t\n\t\tpbAuthenticating = (ProgressBar)findViewById(R.id.authenticate_progressBar_authenticating);\n\t\tpbAuthenticating.setVisibility(ProgressBar.GONE);\n\t\t\n\t\ttvLoginFail = (TextView)findViewById(R.id.authenticate_textView_login_fail);\n\t\ttvLoginFail.setVisibility(TextView.GONE);\n\t\t\n\t\tgetRegisteredEmails();\n\t\t\n\t}",
"@Override\r\n\tpublic void initData() {\n\t\tThreadUtils.getSinglePool().execute(new Runnable() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tIntent intent =null;\r\n\t\t\t\t\tChainApplication application = (ChainApplication) getApplicationContext();\r\n\t\t\t\t\tUser user = application.getUserInfo();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(StringUtils.isEmpty(user.getUser_Name()) && StringUtils.isEmpty(HttpManager.getInstance().getToken(HttpManager.KEY_TOKEN))){\r\n\t\t\t\t\t\tintent = new Intent(getActivity(),LoginActivity.class);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tintent = new Intent(getActivity(), MainActivity.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t\t\n\t}",
"public static void init() {\r\n\t\tsetPolicy(BPF.getInstance().getConfig().routes_setting()\r\n\t\t\t\t.getQueuing_policy());\r\n\t}",
"void verifyCSRFToken(HttpServletRequest request) throws IntrusionException;",
"private void init() {\n sensorEnabled = false;\n contextEventHistory = new ArrayList<ContextEvent>(CONTEXT_EVENT_HISTORY_SIZE);\n }",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init() throws ServletException {\n\t\t// Put your code here\n\t}"
] | [
"0.65721214",
"0.61133564",
"0.5823774",
"0.57313013",
"0.56989354",
"0.56095564",
"0.55686855",
"0.5550478",
"0.5468677",
"0.5449453",
"0.5439758",
"0.5437999",
"0.5435378",
"0.54321563",
"0.5419816",
"0.54100573",
"0.5392133",
"0.5352932",
"0.5299946",
"0.52984875",
"0.5292844",
"0.52824837",
"0.5274429",
"0.5271871",
"0.5265865",
"0.52436805",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5241362",
"0.5236515",
"0.5205812",
"0.5199421",
"0.51946694",
"0.5192982",
"0.5182942",
"0.5175865",
"0.5164588",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218",
"0.5159218"
] | 0.5260672 | 25 |
init CSRF blackList data from aa_sys_csrf_url.properties. | public void initCSRFBlackListFromFileCache() throws AAException
{
InputStream inputStream = this.getClass().getResourceAsStream("aa_sys_csrf_url.properties");
Properties props = new Properties();
try
{
props.load(inputStream);
}
catch (IOException e)
{
logger.error("Error load white list from aa_sys_csrf_url.properties");
}
Set<Object> keys = props.keySet();
for (Object o : keys)
{
String key = (String) o;
String value = (String) props.get(o);
SystemConfigCacheHelper.getInstance().putCSRFBlackListCache(key, value);
SystemConfigCacheHelper.getInstance().putCSRFBlackListCache("/i18n" + key, value);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void verifyCSRFToken(HttpServletRequest request) throws IntrusionException;",
"String getCSRFToken();",
"String addCSRFToken(String href);",
"@Override\n public void init() {\n ServletContext context = getServletContext();\n KeyLoader loader = new KeyLoader();\n\n context.setAttribute(\"translateKey\", loader.getKey(TRANSLATE));\n context.setAttribute(\"authKey\", loader.getKeyBytes(AUTH));\n context.setAttribute(\"servletRoles\", getServletRoles());\n }",
"@Override\n public void init(ServletConfig servletConfig) throws ServletException {\n ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletConfig.getServletContext());\n userService = applicationContext.getBean(UserService.class);\n\n //initialize JSR 303 validator\n ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n validator = factory.getValidator();\n\n resourceBundle = ResourceBundle.getBundle(\"donationlist\");\n }",
"public WebConnector() {\n\t\tsuper.setFieldValues();\n\t\tagentIdToSessionId = new HashMap<>();\n\t\tsessions = new HashMap<>();\n\t\tsecureRandom = new SecureRandom();\n\t\tthis.logger.setLevel(Level.SEVERE);\n\t}",
"private void registerCSRFUser() {\n\n RestAssured.given()\n .when()\n .relaxedHTTPSValidation()\n .formParam(\"username\", \"csrf-\" + this.getUser())\n .formParam(\"password\", \"password\")\n .formParam(\"matchingPassword\", \"password\")\n .formParam(\"agree\", \"agree\")\n .post(url(\"register.mvc\"));\n\n }",
"public MyWebAuthenticationDetails(HttpServletRequest request) {\n super(request);\n HttpSession session = request.getSession();\n this.savedVerifyCode = (String) session.getAttribute(verifyCode);\n this.requestVerifyCode = request.getParameter(verifyCode);\n if (this.savedVerifyCode != null) {\n session.removeAttribute(verifyCode);\n }\n }",
"public void init() throws ServletException {\n\t\tList<User> list = new ArrayList<>();\n\t\t\n\t\t//store the list in ServletContext domain\n\t\tthis.getServletContext().setAttribute(\"list\", list);\n\t}",
"protected void initialize() throws AspException\n {\n super.initialize();\n\n try {\n /* Check if this is a POST */\n if (!request.getMethod().equalsIgnoreCase(\"POST\"))\n {\n return;\n }\n /* Check if this is an understood content type */\n if (!request.getContentType().\n equalsIgnoreCase(\"application/x-www-form-urlencoded\")) {\n return;\n }\n int len = request.getContentLength();\n Reader in;\n Map htValues;\n try {\n in = request.getReader();\n htValues = ParseQueryString.parse(in, len);\n } catch (IOException ex) {\n throw new AspException(\"Input error: \" + ex);\n }\n Tools.convertToMultiValue(this, htValues, false);\n \n emptyValue = new Tools.MultiValue();\n } finally {\n setReadOnly();\n }\n }",
"public void initIstance(HttpServletRequest request) {\n \tname = request.getParameter(\"name\");\n priceMin = request.getParameter(\"priceMin\");\n priceMax = request.getParameter(\"priceMax\");\n code = request.getParameter(\"code\");\n description = request.getParameter(\"description\");\n String hiddenStr = request.getParameter(\"hidden\");\n hidden = hiddenStr != null;\n typeIdes = request.getParameterValues(\"type\");\n }",
"@Override\r\n public void init() throws ServletException {\n \tUtilisateurManager utilisateurManager = new UtilisateurManager();\r\n\t\tList<Utilisateur> listeIdPseudo = new ArrayList<Utilisateur>();\r\n\t\tlisteIdPseudo = utilisateurManager.getlisteIdPseudo();\r\n\t\tSystem.out.println(\"liste \"+ listeIdPseudo);\r\n\t\tServletContext servletContext;\r\n\t\tthis.getServletContext().setAttribute(\"listeIdPseudo\", listeIdPseudo);\r\n\t\t\r\n \t\r\n\t\t\r\n\t\t\r\n\t\t//getServletContext().setAttribute(\"listeIdPseudo\", \"listeIdPseudo\");\r\n \t\r\n \t\r\n \tsuper.init();\r\n }",
"public void init() throws ServletException\n {\n super.init();\n logger.debug(\"@@ init unartig action servlet WITH STRUTS\");\n logger.debug(\"Calling init on Registry\");\n Registry.init(getServletConfig());\n\n try\n {\n logger.info(\"Init security\");\n CryptoUtil.setPrng(SecureRandom.getInstance(\"SHA1PRNG\"));\n new TreeGenerator().generateTreeItems();\n logger.info(\"new navigation tree for tigra tree menu generated!\");\n } catch (UnartigException e)\n {\n logger.error(\"Exception while generating menu tree : \",e);\n throw new ServletException(\"cannot write tree menu\",e);\n } catch (NoSuchAlgorithmException e)\n {\n logger.error(\"Exception while creating SecureRandom instance\",e);\n throw new ServletException(\"initialization failed\",e);\n }\n PhotoOrderService orderService = PhotoOrderService.getInstance();\n // no service needed to batch-process orders currently:\n// orderService.startService();\n// System.out.println(\"UnartigActionServlet.init : STARTED ORDER SERVICE !\");\n\n //Initialize SecureRandom\n //This is a lengthy operation, to be done only upon\n //initialization of the application\n try {\n SecureRandom prng = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n\n }",
"@Override\r\n\tpublic void init(FilterConfig config) throws ServletException {\n\t\tConfigManager.init(config.getServletContext(), false);\r\n\t\tString temp=config.getInitParameter(SECURITY_CLASS_KEY);\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tClass<ISecurity> secClass=(Class<ISecurity>)Class.forName(temp);\r\n\t\t\t\tthis.guard=secClass.getConstructor().newInstance(new Object[0]);\r\n\t\t\t\ttemp=null;\r\n\t\t\t}\r\n\t\t\ttemp=config.getInitParameter(VALIDATOR_CLASS_KEY);\r\n\t\t\tif(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tClass<IValidParam> vpmClass=(Class<IValidParam>)Class.forName(temp);\r\n\t\t\t\tthis.validator=vpmClass.getConstructor().newInstance(new Object[0]);\r\n\t\t\t\ttemp=null;\r\n\t\t\t}\r\n\t\t\ttemp=config.getInitParameter(REQUEST_HANDLER_KEY);\r\n\t\t\tif(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tClass<IRequestHandler> rhClass=(Class<IRequestHandler>)Class.forName(temp);\r\n\t\t\t\tthis.handler=rhClass.getConstructor().newInstance(new Object[0]);\r\n\t\t\t\ttemp=null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttemp=config.getInitParameter(ERROR_HANDLER_KEY);\r\n\t\t\tif(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tClass<IErrorHandler> rhClass=(Class<IErrorHandler>)Class.forName(temp);\r\n\t\t\t\tthis.errHandler=rhClass.getConstructor().newInstance(new Object[0]);\r\n\t\t\t\ttemp=null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(ClassNotFoundException cfe)\r\n\t\t{\r\n\t\t\tthrow new ServletException(cfe.getMessage());\r\n\t\t}\r\n\t\tcatch(IllegalAccessException iae)\r\n\t\t{\r\n\t\t\tthrow new ServletException(iae.getMessage());\r\n\t\t}\r\n\t\tcatch(InvocationTargetException ite)\r\n\t\t{\r\n\t\t\tthrow new ServletException(ite.getMessage());\r\n\t\t}\r\n\t\tcatch(InstantiationException ie)\r\n\t\t{\r\n\t\t\tthrow new ServletException(ie.getMessage());\r\n\t\t}\r\n\t\tcatch(NoSuchMethodException nse)\r\n\t\t{\r\n\t\t\tthrow new ServletException(nse.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n public void init(HttpSecurity http) throws Exception {\n http\n // disable csrf because of API mode\n .csrf().disable().sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n\n .and()\n // manage routes securisation here\n .authorizeRequests().antMatchers(HttpMethod.OPTIONS).permitAll()\n\n // manage routes securisation here\n .and().authorizeRequests().antMatchers(HttpMethod.OPTIONS).permitAll()\n\n .antMatchers(\"/logout\", \"/\", \"/unsecured\").permitAll() //\n // .antMatchers(\"/**/catalog\").authenticated() //\n // .antMatchers(\"/**/catalog\").hasRole(\"CATALOG_MANAGER\") //\n\n .anyRequest().authenticated();\n\n }",
"protected Tag makeCsrfTokenInputTag(Http.Request request) {\n return input().isHidden().withValue(getCsrfToken(request)).withName(\"csrfToken\");\n }",
"private WebRequest() {\n initFields();\n }",
"@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(),\"CSRF success: \" + response.toString(), Toast.LENGTH_SHORT).show();\n HashMap<String, String> params = new HashMap<String, String>();\n try{\n params.put(\"X-Csrf-Token\",response.getString(\"token\"));\n }catch (Exception ex){\n\n }\n\n }",
"@Bean\n\t@ConditionalOnProperty(name = KEY_XSRF_PREFIX + \".enabled\", matchIfMissing = false)\n\t@ConfigurationProperties(prefix = KEY_XSRF_PREFIX)\n\tpublic XsrfProperties xsrfProperties() {\n\t\treturn new XsrfProperties();\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n System.out.println(\"Formulario inicializado\");\n armarListaCheck();\n armarGrupoEstado();\n cargarCmbColores();\n }",
"@Override\n\t public void configure(WebSecurity web) {\n\t web.httpFirewall(allowUrlEncodedSlashHttpFirewall());\n\t }",
"protected void initialize() throws AspException\n {\n try {\n super.initialize();\n /* Fill the hashtable with the predefined server variable\n names. */\n String REQUEST_METHOD = req.getMethod();\n if (REQUEST_METHOD != null) \n this.put(\"REQUEST_METHOD\", REQUEST_METHOD);\n String URL = req.getRequestURI();\n if (URL != null)\n this.put(\"URL\", URL);\n String SERVER_PROTOCOL = req.getProtocol();\n if (SERVER_PROTOCOL != null)\n this.put(\"SERVER_PROTOCOL\", SERVER_PROTOCOL);\n String SCRIPT_NAME = req.getServletPath();\n if (SCRIPT_NAME != null)\n this.put(\"SCRIPT_NAME\", SCRIPT_NAME);\n String PATH_INFO = req.getPathInfo();\n if (PATH_INFO != null)\n this.put(\"PATH_INFO\", PATH_INFO);\n String PATH_TRANSLATED = req.getPathTranslated();\n if (PATH_TRANSLATED != null)\n this.put(\"PATH_TRANSLATED\", PATH_TRANSLATED);\n String QUERY_STRING = req.getQueryString();\n if (QUERY_STRING != null)\n this.put(\"QUERY_STRING\", QUERY_STRING);\n int ContentLength = req.getContentLength();\n if (ContentLength == -1) ContentLength = 0;\n Integer CONTENT_LENGTH = new Integer(ContentLength);\n this.put(\"CONTENT_LENGTH\", CONTENT_LENGTH);\n String CONTENT_TYPE = req.getContentType();\n if (CONTENT_TYPE != null)\n this.put(\"CONTENT_TYPE\", CONTENT_TYPE);\n String SERVER_NAME = req.getServerName();\n if (SERVER_NAME != null)\n this.put(\"SERVER_NAME\", SERVER_NAME);\n this.put(\"SERVER_PORT\",\n new Integer(req.getServerPort()));\n String REMOTE_USER = req.getRemoteUser();\n if (REMOTE_USER != null)\n this.put(\"REMOTE_USER\", REMOTE_USER);\n String REMOTE_ADDR = req.getRemoteAddr();\n if (REMOTE_ADDR != null)\n this.put(\"REMOTE_ADDR\", REMOTE_ADDR);\n String REMOTE_HOST = req.getRemoteHost();\n if (REMOTE_HOST != null)\n this.put(\"REMOTE_HOST\", REMOTE_HOST);\n String AUTH_TYPE = req.getAuthType();\n if (AUTH_TYPE != null)\n this.put(\"AUTH_TYPE\", AUTH_TYPE);\n /* Fill the hashtable with all of the included server headers,\n mangling the name (prepending with HTTP_ and converting\n -'s to _'s. */\n Enumeration enNames = req.getHeaderNames();\n while (enNames.hasMoreElements()) {\n String name = (String)enNames.nextElement();\n String value = req.getHeader(name);\n String newName = \"HTTP_\" + name.toUpperCase();\n newName = newName.replace('-', '_');\n this.put(newName, value);\n }\n } finally {\n setReadOnly();\n }\n }",
"WithCreate withSecurityToken(SourceControlSecurityTokenProperties securityToken);",
"public static String getTokenFromRequest(final HttpServletRequest httpServletRequest)\n\t{\n\t\tfinal String requestCsrfToken = httpServletRequest.getParameter(CSRF_PARAM_NAME);\n\n\t\tif (requestCsrfToken == null)\n\t\t{\n\t\t\treturn httpServletRequest.getHeader(CSRF_PARAM_NAME);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn requestCsrfToken;\n\t\t}\n\t}",
"public interface HTTPUtilities\n{\n\n final static String REMEMBER_TOKEN_COOKIE_NAME = \"rtoken\";\n final static int MAX_COOKIE_LEN = 4096; // From RFC 2109\n\tfinal static int MAX_COOKIE_PAIRS = 20;\t\t\t// From RFC 2109\n\tfinal static String CSRF_TOKEN_NAME = \"ctoken\";\n\tfinal static String ESAPI_STATE = \"estate\";\n\n\tfinal static int PARAMETER = 0;\n\tfinal static int HEADER = 1;\n\tfinal static int COOKIE = 2;\n\n\n\t/**\n * Calls addCookie with the *current* request.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n */\n void addCookie(Cookie cookie);\n\n\t/**\n * Add a cookie to the response after ensuring that there are no encoded or\n * illegal characters in the name and name and value. This method also sets\n * the secure and HttpOnly flags on the cookie.\n *\n * @param cookie\n */\n void addCookie(HttpServletResponse response, Cookie cookie);\n\n\t/**\n * Adds the current user's CSRF token (see User.getCSRFToken()) to the URL for purposes of preventing CSRF attacks.\n * This method should be used on all URLs to be put into all links and forms the application generates.\n *\n * @param href the URL to which the CSRF token will be appended\n * @return the updated URL with the CSRF token parameter added\n */\n String addCSRFToken(String href);\n\n /**\n * Calls addHeader with the *current* request.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n */\n void addHeader(String name, String value);\n\n /**\n * Add a header to the response after ensuring that there are no encoded or\n * illegal characters in the name and name and value. This implementation\n * follows the following recommendation: \"A recipient MAY replace any linear\n * white space with a single SP before interpreting the field value or\n * forwarding the message downstream.\"\n * http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2\n *\n * @param name\n * @param value\n */\n void addHeader(HttpServletResponse response, String name, String value);\n\n\t/**\n * Calls assertSecureRequest with the *current* request.\n\t * @see {@link HTTPUtilities#assertSecureRequest(HttpServletRequest)}\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tvoid assertSecureRequest() throws AccessControlException;\n\n\t/**\n * Calls assertSecureChannel with the *current* request.\n\t * @see {@link HTTPUtilities#assertSecureChannel(HttpServletRequest)}\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tvoid assertSecureChannel() throws AccessControlException;\n\n\t/**\n\t * Ensures that the request uses both SSL and POST to protect any sensitive parameters\n\t * in the querystring from being sniffed, logged, bookmarked, included in referer header, etc...\n\t * This method should be called for any request that contains sensitive data from a web form.\n *\n * @param request\n * @throws AccessControlException if security constraints are not met\n\t */\n void assertSecureRequest(HttpServletRequest request) throws AccessControlException;\n\n\t/**\n\t * Ensures the use of SSL to protect any sensitive parameters in the request and\n\t * any sensitive data in the response. This method should be called for any request\n\t * that contains sensitive data from a web form or will result in sensitive data in the\n\t * response page.\n *\n * @param request\n * @throws AccessControlException if security constraints are not met\n\t */\n void assertSecureChannel(HttpServletRequest request) throws AccessControlException;\n\n\t/**\n * Calls changeSessionIdentifier with the *current* request.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n */\n\tHttpSession changeSessionIdentifier() throws AuthenticationException;\n\n\t/**\n * Invalidate the existing session after copying all of its contents to a newly created session with a new session id.\n * Note that this is different from logging out and creating a new session identifier that does not contain the\n * existing session contents. Care should be taken to use this only when the existing session does not contain\n * hazardous contents.\n *\n * @param request\n * @return the new HttpSession with a changed id\n * @throws AuthenticationException the exception\n */\n HttpSession changeSessionIdentifier(HttpServletRequest request) throws AuthenticationException;\n\n /**\n\t * Clears the current HttpRequest and HttpResponse associated with the current thread.\n *\n\t * @see ESAPI#clearCurrent()\n\t */\n void clearCurrent();\n\n /**\n\t * Decrypts an encrypted hidden field value and returns the cleartext. If the field does not decrypt properly,\n\t * an IntrusionException is thrown to indicate tampering.\n *\n\t * @param encrypted hidden field value to decrypt\n\t * @return decrypted hidden field value stored as a String\n\t */\n\tString decryptHiddenField(String encrypted);\n\n /**\n\t * Takes an encrypted querystring and returns a Map containing the original parameters.\n *\n\t * @param encrypted the encrypted querystring to decrypt\n\t * @return a Map object containing the decrypted querystring\n\t * @throws EncryptionException\n\t */\n Map<String, String> decryptQueryString(String encrypted) throws EncryptionException;\n\n /**\n * Calls decryptStateFromCookie with the *current* request.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n */\n Map<String, String> decryptStateFromCookie() throws EncryptionException;\n\n /**\n * Retrieves a map of data from a cookie encrypted with encryptStateInCookie().\n *\n * @param request\n * @return a map containing the decrypted cookie state value\n\t * @throws EncryptionException\n */\n Map<String, String> decryptStateFromCookie(HttpServletRequest request) throws EncryptionException;\n\n /**\n * Encrypts a hidden field value for use in HTML.\n *\n * @param value the cleartext value of the hidden field\n * @return the encrypted value of the hidden field\n * @throws EncryptionException\n */\n\tString encryptHiddenField(String value) throws EncryptionException;\n\n\t/**\n\t * Takes a querystring (everything after the question mark in the URL) and returns an encrypted string containing the parameters.\n *\n\t * @param query the querystring to encrypt\n\t * @return encrypted querystring stored as a String\n\t * @throws EncryptionException\n\t */\n\tString encryptQueryString(String query) throws EncryptionException;\n\n\t/**\n\t * Calls encryptStateInCookie with the *current* response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n void encryptStateInCookie(Map<String, String> cleartext) throws EncryptionException;\n\n /**\n * Stores a Map of data in an encrypted cookie. Generally the session is a better\n * place to store state information, as it does not expose it to the user at all.\n * If there is a requirement not to use sessions, or the data should be stored\n * across sessions (for a long time), the use of encrypted cookies is an effective\n * way to prevent the exposure.\n *\n * @param response\n * @param cleartext\n * @throws EncryptionException\n */\n void encryptStateInCookie(HttpServletResponse response, Map<String, String> cleartext) throws EncryptionException;\n\n /**\n\t * Calls getCookie with the *current* response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tString getCookie(String name) throws ValidationException;\n\n\t/**\n * A safer replacement for getCookies() in HttpServletRequest that returns the canonicalized\n * value of the named cookie after \"global\" validation against the\n * general type defined in ESAPI.properties. This should not be considered a replacement for\n * more specific validation.\n *\n * @param request\n * @param name\n * @return the requested cookie value\n */\n\tString getCookie(HttpServletRequest request, String name) throws ValidationException;\n\n /**\n * Returns the current user's CSRF token. If there is no current user then return null.\n *\n * @return the current users CSRF token\n */\n String getCSRFToken();\n\n\t/**\n * Retrieves the current HttpServletRequest\n *\n * @return the current request\n */\n HttpServletRequest getCurrentRequest();\n\n\t/**\n * Retrieves the current HttpServletResponse\n *\n * @return the current response\n */\n HttpServletResponse getCurrentResponse();\n\n\t/**\n\t * Calls getFileUploads with the *current* request, default upload directory, and default allowed file extensions\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tList getFileUploads() throws ValidationException;\n\n /**\n\t * Call getFileUploads with the specified request, default upload directory, and default allowed file extensions\n\t */\n\tList getFileUploads(HttpServletRequest request) throws ValidationException;\n\n /**\n\t * Call getFileUploads with the specified request, specified upload directory, and default allowed file extensions\n\t */\n List getFileUploads(HttpServletRequest request, File finalDir) throws ValidationException;\n\n\n /**\n * Extract uploaded files from a multipart HTTP requests. Implementations must check the content to ensure that it\n * is safe before making a permanent copy on the local filesystem. Checks should include length and content checks,\n * possibly virus checking, and path and name checks. Refer to the file checking methods in Validator for more\n * information.\n * <p/>\n\t * This method uses {@link HTTPUtilities#getCurrentRequest()} to obtain the {@link HttpServletRequest} object\n *\n * @param request\n * @return List of new File objects from upload\n * @throws ValidationException if the file fails validation\n */\n List getFileUploads(HttpServletRequest request, File destinationDir, List allowedExtensions) throws ValidationException;\n\n\n\t/**\n\t * Calls getHeader with the *current* request.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tString getHeader(String name) throws ValidationException;\n\n /**\n * A safer replacement for getHeader() in HttpServletRequest that returns the canonicalized\n * value of the named header after \"global\" validation against the\n * general type defined in ESAPI.properties. This should not be considered a replacement for\n * more specific validation.\n *\n * @param request\n * @param name\n * @return the requested header value\n */\n\tString getHeader(HttpServletRequest request, String name) throws ValidationException;\n\n\t/**\n\t * Calls getParameter with the *current* request.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tString getParameter(String name) throws ValidationException;\n\n /**\n * A safer replacement for getParameter() in HttpServletRequest that returns the canonicalized\n * value of the named parameter after \"global\" validation against the\n * general type defined in ESAPI.properties. This should not be considered a replacement for\n * more specific validation.\n *\n * @param request\n * @param name\n * @return the requested parameter value\n */\n String getParameter(HttpServletRequest request, String name) throws ValidationException;\n\n\t/**\n\t * Calls killAllCookies with the *current* request and response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tvoid killAllCookies();\n\n /**\n * Kill all cookies received in the last request from the browser. Note that new cookies set by the application in\n * this response may not be killed by this method.\n *\n * @param request\n * @param response\n */\n void killAllCookies(HttpServletRequest request, HttpServletResponse response);\n\n\t/**\n\t * Calls killCookie with the *current* request and response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tvoid killCookie(String name);\n\n /**\n * Kills the specified cookie by setting a new cookie that expires immediately. Note that this\n * method does not delete new cookies that are being set by the application for this response.\n *\n * @param request\n * @param name\n * @param response\n */\n void killCookie(HttpServletRequest request, HttpServletResponse response, String name);\n\n\t/**\n\t * Calls logHTTPRequest with the *current* request and logger.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n\tvoid logHTTPRequest();\n\n /**\n * Format the Source IP address, URL, URL parameters, and all form\n * parameters into a string suitable for the log file. Be careful not\n * to log sensitive information, and consider masking with the\n * logHTTPRequest( List parameterNamesToObfuscate ) method.\n *\n * @param request\n * @param logger the logger to write the request to\n */\n void logHTTPRequest(HttpServletRequest request, Logger logger);\n\n /**\n * Format the Source IP address, URL, URL parameters, and all form\n * parameters into a string suitable for the log file. The list of parameters to\n * obfuscate should be specified in order to prevent sensitive information\n * from being logged. If a null list is provided, then all parameters will\n * be logged. If HTTP request logging is done in a central place, the\n * parameterNamesToObfuscate could be made a configuration parameter. We\n * include it here in case different parts of the application need to obfuscate\n * different parameters.\n *\n * @param request\n * @param logger the logger to write the request to\n * @param parameterNamesToObfuscate the sensitive parameters\n */\n void logHTTPRequest(HttpServletRequest request, Logger logger, List parameterNamesToObfuscate);\n\n\t/**\n\t * Calls sendForward with the *current* request and response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n void sendForward(String location) throws AccessControlException, ServletException, IOException;\n\n /**\n * This method performs a forward to any resource located inside the WEB-INF directory. Forwarding to\n * publicly accessible resources can be dangerous, as the request will have already passed the URL\n * based access control check. This method ensures that you can only forward to non-publicly\n * accessible resources.\n *\n * @param request\n * @param response\n * @param location the URL to forward to, including parameters\n * @throws AccessControlException\n * @throws ServletException\n * @throws IOException\n */\n void sendForward(HttpServletRequest request, HttpServletResponse response, String location) throws AccessControlException, ServletException, IOException;\n\n\n\t/**\n\t * Calls sendRedirect with the *current* response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n void sendRedirect(String location) throws AccessControlException, IOException;\n\n\n /**\n * This method performs a forward to any resource located inside the WEB-INF directory. Forwarding to\n * publicly accessible resources can be dangerous, as the request will have already passed the URL\n * based access control check. This method ensures that you can only forward to non-publicly\n * accessible resources.\n *\n * @param response\n * @param location the URL to forward to, including parameters\n * @throws AccessControlException\n * @throws ServletException\n * @throws IOException\n */\n void sendRedirect(HttpServletResponse response, String location) throws AccessControlException, IOException;\n\n\t/**\n\t * Calls setContentType with the *current* request and response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n void setContentType();\n\n /**\n\t * Set the content type character encoding header on every HttpServletResponse in order to limit\n\t * the ways in which the input data can be represented. This prevents\n\t * malicious users from using encoding and multi-byte escape sequences to\n\t * bypass input validation routines.\n * <p/>\n\t * Implementations of this method should set the content type header to a safe value for your environment.\n * The default is text/html; charset=UTF-8 character encoding, which is the default in early\n\t * versions of HTML and HTTP. See RFC 2047 (http://ds.internic.net/rfc/rfc2045.txt) for more\n\t * information about character encoding and MIME.\n * <p/>\n\t * The DefaultHTTPUtilities reference implementation sets the content type as specified.\n *\n * @param response The servlet response to set the content type for.\n */\n void setContentType(HttpServletResponse response);\n\n /**\n * Stores the current HttpRequest and HttpResponse so that they may be readily accessed throughout\n * ESAPI (and elsewhere)\n *\n * @param request the current request\n * @param response the current response\n */\n void setCurrentHTTP(HttpServletRequest request, HttpServletResponse response);\n\n\n\t/**\n\t * Calls setHeader with the *current* response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n void setHeader(String name, String value);\n\n /**\n * Add a header to the response after ensuring that there are no encoded or\n * illegal characters in the name and value. \"A recipient MAY replace any\n * linear white space with a single SP before interpreting the field value\n * or forwarding the message downstream.\"\n * http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2\n *\n * @param name\n * @param value\n */\n void setHeader(HttpServletResponse response, String name, String value);\n\n\n\t/**\n\t * Calls setNoCacheHeaders with the *current* response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n void setNoCacheHeaders();\n\n\n /**\n * Set headers to protect sensitive information against being cached in the browser. Developers should make this\n * call for any HTTP responses that contain any sensitive data that should not be cached within the browser or any\n * intermediate proxies or caches. Implementations should set headers for the expected browsers. The safest approach\n * is to set all relevant headers to their most restrictive setting. These include:\n * <p/>\n * <PRE>\n * Cache-Control: no-store<BR>\n * Cache-Control: no-cache<BR>\n * Cache-Control: must-revalidate<BR>\n * Expires: -1<BR>\n * </PRE>\n * <p/>\n * Note that the header \"pragma: no-cache\" is intended only for use in HTTP requests, not HTTP responses. However, Microsoft has chosen to\n * directly violate the standards, so we need to include that header here. For more information, please refer to the relevant standards:\n * <UL>\n * <LI><a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1\">HTTP/1.1 Cache-Control \"no-cache\"</a>\n * <LI><a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.2\">HTTP/1.1 Cache-Control \"no-store\"</a>\n * <LI><a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32\">HTTP/1.0 Pragma \"no-cache\"</a>\n * <LI><a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21\">HTTP/1.0 Expires</a>\n * <LI><a href=\"http://support.microsoft.com/kb/937479\">IE6 Caching Issues</a>\n * <LI><a href=\"http://support.microsoft.com/kb/234067\">Microsoft directly violates specification for pragma: no-cache</a>\n * <LI><a href=\"https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/Mozilla_networking_preferences#Cache\">Firefox browser.cache.disk_cache_ssl</a>\n * <LI><a href=\"https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/Mozilla_networking_preferences\">Mozilla</a>\n * </UL>\n *\n * @param response\n */\n void setNoCacheHeaders(HttpServletResponse response);\n\n\t/**\n\t * Calls setNoCacheHeaders with the *current* response.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n String setRememberToken(String password, int maxAge, String domain, String path);\n\n\n /**\n\t * Set a cookie containing the current User's remember me token for automatic authentication. The use of remember me tokens\n\t * is generally not recommended, but this method will help do it as safely as possible. The user interface should strongly warn\n * the user that this should only be enabled on computers where no other users will have access.\n * <p/>\n * Implementations should save the user's remember me data in an encrypted cookie and send it to the user.\n * Any old remember me cookie should be destroyed first. Setting this cookie should keep the user\n\t * logged in until the maxAge passes, the password is changed, or the cookie is deleted.\n\t * If the cookie exists for the current user, it should automatically be used by ESAPI to\n * log the user in, if the data is valid and not expired.\n * <p/>\n\t * The ESAPI reference implementation, DefaultHTTPUtilities.setRememberToken() implements all these suggestions.\n * <p/>\n * The username can be retrieved with: User username = ESAPI.authenticator().getCurrentUser();\n *\n * @param request\n * @param password the user's password\n * @param response\n * @param maxAge the length of time that the token should be valid for in relative seconds\n\t * @param domain the domain to restrict the token to or null\n\t * @param path the path to restrict the token to or null\n\t * @return encrypted \"Remember Me\" token stored as a String\n\t */\n String setRememberToken(HttpServletRequest request, HttpServletResponse response, String password, int maxAge, String domain, String path);\n\n\n\t/**\n\t * Calls verifyCSRFToken with the *current* request.\n *\n\t * @see {@link HTTPUtilities#setCurrentHTTP(HttpServletRequest, HttpServletResponse)}\n\t */\n void verifyCSRFToken();\n\n /**\n * Checks the CSRF token in the URL (see User.getCSRFToken()) against the user's CSRF token and\n\t * throws an IntrusionException if it is missing.\n *\n * @param request\n * @throws IntrusionException if CSRF token is missing or incorrect\n\t */\n void verifyCSRFToken(HttpServletRequest request) throws IntrusionException;\n\n /**\n * Gets a typed attribute from the session associated with the calling thread. If the\n * object referenced by the passed in key is not of the implied type, a ClassCastException\n * will be thrown to the calling code.\n *\n * @param key\n * The key that references the session attribute\n * @param <T>\n * The implied type of object expected.\n * @return\n * The requested object.\n * @see #getSessionAttribute(javax.servlet.http.HttpSession, String)\n */\n <T> T getSessionAttribute( String key );\n\n /**\n * Gets a typed attribute from the passed in session. This method has the same\n * responsibility as {link #getSessionAttribute(String} however only it references\n * the passed in session and thus performs slightly better since it does not need\n * to return to the Thread to get the {@link HttpSession} associated with the current\n * thread.\n *\n * @param session\n * The session to retrieve the attribute from\n * @param key\n * The key that references the requested object\n * @param <T>\n * The implied type of object expected\n * @return The requested object\n */\n <T> T getSessionAttribute( HttpSession session, String key );\n\n /**\n * Gets a typed attribute from the {@link HttpServletRequest} associated\n * with the caller thread. If the attribute on the request is not of the implied\n * type, a ClassCastException will be thrown back to the caller.\n *\n * @param key The key that references the request attribute.\n * @param <T> The implied type of the object expected\n * @return The requested object\n */\n <T> T getRequestAttribute( String key );\n\n /**\n * Gets a typed attribute from the {@link HttpServletRequest} associated\n * with the passed in request. If the attribute on the request is not of the implied\n * type, a ClassCastException will be thrown back to the caller.\n *\n * @param request The request to retrieve the attribute from\n * @param key The key that references the request attribute.\n * @param <T> The implied type of the object expected\n * @return The requested object\n */\n <T> T getRequestAttribute( HttpServletRequest request, String key );\n}",
"@Override\n protected Filter[] getServletFilters() {\n return new Filter[]{ new DelegatingFilterProxy(\"springSecurityFilterChain\") };\n }",
"SecurityToken loadByTokenValue(String tokenValue);",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n usuDto = (UsuariosDTO) AppContext.getInstance().get(\"usuarioContrasena\");\n lblNombre.setText(usuDto.getNombreCompleto());\n lblCedula.setText(usuDto.getCedula());\n if (Token.getInstance().getUsuario().getRolId().getCodigo().equals(\"ROLE_ADMIN\")) {\n btnCambiar.setDisable(true);\n }\n llenarReglas();\n llenarListaNodos();\n desarrollo();\n }",
"public void init()\n {\n context = getServletContext();\n parameters = (Siu_ContainerLabel)context.getAttribute(\"parameters\");\n }",
"public PreOauth2SSOGatewayFilter() {\n super(Config.class);\n }",
"@Override\n\tprotected void initFilterBean() throws ServletException {\n\n\t\t// Check if the init-param were loaded and if so populate the list. We\n\t\t// use an array first to load the strings as they are immutable and\n\t\t// hence we cannot change individual elements in List\n\t\tif (this.excludeServletPaths != null) {\n\t\t\tString[] excludeServletPathsArray = this.excludeServletPaths\n\t\t\t\t\t.split(FILTER_EXCLUDE_SEPARATOR);\n\t\t\tif (excludeServletPathsArray != null) {\n\t\t\t\tthis.excludeServletPathsList = new ArrayList<String>();\n\t\t\t\t// Remove the \"*\" wild card\n\t\t\t\tfor (String servletPath : excludeServletPathsArray) {\n\t\t\t\t\tthis.excludeServletPathsList.add(servletPath.replace(\"*\",\n\t\t\t\t\t\t\t\"\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tLOGGER.info(\"Retrieved the exclude servlet path list: \"\n\t\t\t\t\t+ this.excludeServletPathsList);\n\t\t}\n\n\t\tif (this.excludeFileExtensionPatterns != null) {\n\t\t\tString[] excludeFileExtensionPatternsArray = this.excludeFileExtensionPatterns\n\t\t\t\t\t.split(FILTER_EXCLUDE_SEPARATOR);\n\t\t\tif (excludeFileExtensionPatternsArray != null) {\n\t\t\t\tthis.excludeFileExtensionPatternsList = new ArrayList<String>();\n\t\t\t\t// Remove the \"*\" wild card\n\t\t\t\tfor (String fileExtension : excludeFileExtensionPatternsArray) {\n\t\t\t\t\tthis.excludeFileExtensionPatternsList.add(fileExtension\n\t\t\t\t\t\t\t.replace(\"*\", \"\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tLOGGER.info(\"Retrieved the exclude file extension list: \"\n\t\t\t\t\t+ this.excludeFileExtensionPatternsList);\n\t\t}\n\n\t\tsuper.initFilterBean();\n\t}",
"public String getSecurityToken()\r\n {\r\n return getAttribute(\"token\");\r\n }",
"@BeforeAll\n\tstatic void TM_RF() {\n\t\tpassword = \"Stardust\";\n\t\ttokenManager = new TokenManager();\n\n\t\t// this assertion gives no throws, so we commented it\n\t\t//Assertions.assertThrows(TokenManagementException.class, () -> tm.readTokenRequestFromJSON(filePath));\n\t}",
"private void init()\n {\n \t// Make page stateless.\n setStatelessHint(true);\n\n // Add registration form.\n RegistrationForm registrationForm = new RegistrationForm(REGISTRATION_FORM);\n add(registrationForm);\n // AjaxFormValidatingBehavior.addToAllFormComponents(registrationForm, \"onblur\");\n }",
"@Override\n\tprotected AuthenticationToken createToken(ServletRequest request, ServletResponse response) throws Exception {\n\t\treturn null;\n\t}",
"public SecurityMB() {\n }",
"public static void initialize() {\n Security.addProvider(new OAuth2Provider());\n }",
"public void init() throws ServletException {\n\t\tModel model = new Model(getServletConfig());\r\n\t\tAction.add(new LoginAction(model));\r\n\t\tAction.add(new ManageTweet(model));\r\n\t}",
"@PostConstruct\r\n\tpublic void init() {\n\t\tzeroLeggedOAuthProviderProcessingFilter = new ZeroLeggedOAuthProviderProcessingFilter(\r\n\t\t\t\toauthConsumerDetailsService, oauthNonceServices, oauthProcessingFilterEntryPoint,\r\n\t\t\t\toauthAuthenticationHandler, oauthProviderTokenServices, true);\r\n\t}",
"public void setWebKey(String s)\n {\n ScDecoder x = new ScDecoder(s);\n _firstFlightId = (Integer)x.get();\n _secondFlightId = (Integer)x.get();\n _thirdFlightId = (Integer)x.get();\n _fourthFlightId = (Integer)x.get();\n _fifthFlightId = (Integer)x.get();\n _consignmentNumber = (String)x.get();\n _consignmentExpectedDestinationAirportCode = (String)x.get();\n _upuTagOriginCountryCode = (String)x.get();\n _upuTagOriginLocationCode = (String)x.get();\n _upuTagOriginOfficeOfExchangeQualifier = (String)x.get();\n _upuTagDestinationCountryCode = (String)x.get();\n _upuTagDestinationLocationCode = (String)x.get();\n _upuTagDestinationOfficeOfExchangeQualifier = (String)x.get();\n _upuTagMailCategoryCode = (String)x.get();\n _upuTagMailSubClassCode = (String)x.get();\n _upuTagMailClassCode = (String)x.get();\n _upuTagDispatchYear = (String)x.get();\n _upuTagDispatchSerialNumber = (String)x.get();\n _upuTagReceptacleSerialNumber = (String)x.get();\n _upuTagHighestNumberedReceptacleIndicator = (String)x.get();\n _upuTagInsuredOrRegisteredIndicator = (String)x.get();\n _upuTagWeight = (JwKilogram)x.get();\n }",
"public interface SecurityConstants {\n\n /**\n * 默认的处理验证码的url前缀\n */\n String DEFAULT_VALIDATE_CODE_URL_PREFIX = \"/code\";\n\n /**\n * 当请求需要身份认证时,默认跳转的url\n */\n String DEFAULT_UNAUTHENTICATION_URL = \"/authentication/require\";\n\n /**\n * 默认的用户名密码登录请求处理url\n */\n String DEFAULT_SIGN_IN_PROCESSING_URL_FORM = \"/oauth/login\";\n\n /**\n * 默认的手机验证码登录请求处理url\n */\n String DEFAULT_SIGN_IN_PROCESSING_URL_MOBILE = \"/oauth/mobile\";\n\n /**\n * 默认获取token的url\n */\n String DEFAULT_GET_TOKEN_URL = \"/oauth/token\";\n\n /**\n * 验证短信验证码时,http请求中默认的携带短信验证码信息的参数的名称\n */\n String DEFAULT_PARAMETER_NAME_CODE_SMS = \"smsCode\";\n /**\n * 发送短信验证码 或 验证短信验证码时,传递手机号的参数的名称\n */\n String DEFAULT_PARAMETER_NAME_MOBILE = \"mobile\";\n /**\n * 验证图片验证码时,http请求中默认的携带图片验证码信息的参数的名称\n */\n String DEFAULT_PARAMETER_NAME_CODE_IMAGE = \"imageCode\";\n}",
"protected void onInit() {\n super.onInit();\n securityManager = (com.sustain.security.SustainSecurityManager) getBean(\"securityManager\");\n }",
"public OAuthServlet() {\r\n\t\tsuper();\r\n\t}",
"public void initCSRFBlackListCache(String needValidation) throws AAException\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tList<CSRFBlackListModel> list = this.getCSRFBlackListService().searchBlackListForCache(needValidation);\r\n\t\t\tfor (CSRFBlackListModel model : list)\r\n\t\t\t{\r\n\t\t\t\tString displayAction = model.getDisplayAction();\r\n\t\t\t\t// not use null\r\n\t\t\t\tif (ValidationUtil.isEmpty(displayAction))\r\n\t\t\t\t{\r\n\t\t\t\t\tdisplayAction = \"\";\r\n\t\t\t\t}\r\n\t\t\t\tSystemConfigCacheHelper.getInstance().putCSRFBlackListCache(\r\n\t\t\t\t\tmodel.getUrl() + \"_\" + model.getFuseaction() + \"_\" + displayAction, model.getNeedValidation());\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception re)\r\n\t\t{\r\n\t\t\tlogger.throwing(CSRFBlackListClient.class.getName(), \"initCSRFBlackListCache\", re);\r\n\t\t}\r\n\r\n\t}",
"private boolean getCSRF()\n throws IOException {\n CookieManager cookieManager = new CookieManager();\n CookieHandler.setDefault(cookieManager);\n HttpURLConnection conn = null;\n\n conn = (HttpURLConnection) url.openConnection();\n\n conn.setUseCaches(false); // Don't use a Cached Copy\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Connection\", \"Keep-Alive\");\n conn.getContent();\n conn.disconnect();\n\n /// parse the returned object for the CSRF token\n CookieStore cookieJar = cookieManager.getCookieStore();\n List<HttpCookie> cookies = cookieJar.getCookies();\n String csrf = null;\n for (HttpCookie cookie : cookies) {\n Log.d(\"cookie\", \"\" + cookie);\n if (cookie.getName().equals(\"csrftoken\")) {\n csrf = cookie.getValue();\n break;\n }\n }\n if (csrf == null) {\n Log.d(MainActivity.TAG, \"Unable to get CSRF\");\n return false;\n }\n Log.d(MainActivity.TAG, \"Received cookie: \" + csrf);\n\n addFormField(\"csrfmiddlewaretoken\", csrf);\n return true;\n }",
"protected void initialize() throws AspException\n {\n try {\n super.initialize();\n /* Parse out all of the param/value pairs */\n Map paramValues = Tools.parseQueryString(wholeString);\n Tools.convertToMultiValue(this, paramValues, true);\n } finally {\n setReadOnly();\n }\n }",
"@Override\n public void init(ServletConfig config) throws ServletException {\n super.init(config);\n\n final ServletContext context = config.getServletContext(); \n redirectOnSuccess =Auth0Constants.AUTH0_LOGIN_SUCCESS.getValue();\n redirectOnFail =Auth0Constants.AUTH0_LOGIN_FAILURE.getValue();\n auth0Namespace =Auth0Constants.AUTH0_NAMESPACE.getValue();\n auth0Issuer =Auth0Constants.AUTH0_ISSUER.getValue();\n auth0URL =Auth0Constants.AUTH0_URL.getValue();\n \n try {\n authAPI = new AuthenticationControllerProvider(config).getAuthAPI();\n\n Auth0KeyProvider provider = new Auth0KeyProvider(auth0URL);\n \n verifier = new Auth0Verifier(auth0Issuer, \n provider.getPublicKey(null)); \n }\n catch (com.auth0.jwk.JwkException e) {\n logger.warn(\"JwkException in init \", e);\n throw new ServletException(\"Couldn't create the AuthenticationController instance. Check the configuration.\", e);\n }\n catch (UnsupportedEncodingException e) {\n throw new ServletException(\"Couldn't create the AuthenticationController instance. Check the configuration.\", e);\n }\n }",
"@PostConstruct\n\tpublic void setup() throws ServletException {\n\t\tif (StringUtils.isEmpty(adminId) || StringUtils.isEmpty(adminPwd)) {\n\t\t\tthrow new ServletException(\"System admin ID/password are not defined in properties file.\");\n\t\t}\n\n\t\tsecret = adminId + \":\" + adminPwd;\n\t}",
"protected static void loadFilters(){ \n if ( System.getProperty(ASYNC_FILTER) != null){\n StringTokenizer st = new StringTokenizer(\n System.getProperty(ASYNC_FILTER),\",\");\n \n sharedAsyncFilters = new String[st.countTokens()]; \n int i = 0;\n while (st.hasMoreTokens()){\n sharedAsyncFilters[i++] = st.nextToken(); \n } \n } \n }",
"@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\n\t\t// Cái csrf là cái middle gì đó nó được RUN khi extends\n\t\t// WebSecurityConfigurerAdapter\n\t\t// Cái này có tác dụng Ngăn chặn cái gì đó (hiện tại đang thấy nó đang ngăn chặn\n\t\t// method POST, không ngăn chặn GET)\n\t\t// đoạn code http.csrf().ignoringAntMatchers sẽ là từ bỏ việc ngăn chặn, tức là\n\t\t// cho nó hoạt động\n\t\thttp.csrf().disable(); // TẮT lệnh này cũng bị lỗi 405\n\t\t// BẬT lệnh này bị lỗi 405\n\t\t// http.csrf().ignoringAntMatchers(\"/ajax/**\");\n\n\t\t// Các trang không yêu cầu login\n\t\thttp.authorizeRequests().antMatchers(\"/\", \"/login\", \"/logout\", \"/admin/login\").permitAll();\n\n\t\t// Trang /userInfo yêu cầu phải login với vai trò ROLE_USER hoặc ROLE_ADMIN.\n\t\t// Nếu chưa login, nó sẽ redirect tới trang /login.\n\t\thttp.authorizeRequests().antMatchers(\"/checkout/payment\").access(\"hasAnyRole('ROLE_USER', 'ROLE_ADMIN')\");\n\t\thttp.authorizeRequests().antMatchers(\"/comment/**\").access(\"hasAnyRole('ROLE_USER', 'ROLE_ADMIN')\");\n\t\thttp.authorizeRequests().antMatchers(\"/account/**\").access(\"hasAnyRole('ROLE_USER', 'ROLE_ADMIN')\");\n\n\t\t// Trang chỉ dành cho ADMIN\n\t\thttp.authorizeRequests().antMatchers(\"/admin/**\").access(\"hasRole('ROLE_ADMIN')\");\n\t\thttp.authorizeRequests().antMatchers(\"/api/v1/admin/**\").access(\"hasRole('ROLE_ADMIN')\");\n\n\t\t// Khi người dùng đã login, với vai trò XX.\n\t\t// Nhưng truy cập vào trang yêu cầu vai trò YY,\n\t\t// Ngoại lệ AccessDeniedException sẽ ném ra.\n\t\thttp.authorizeRequests().and().exceptionHandling().accessDeniedPage(\"/403\");\n\n\t\t// Cấu hình cho Login Form.\n\t\thttp.authorizeRequests().and().formLogin()\n\t\t\t\t// Chỉ định Url sẽ được submit login\n\t\t\t\t// Khi submit URL này thì Security sẽ gọi Provider đã được setup ở\n\t\t\t\t// configureGlobal để xử lý check\n\t\t\t\t// .loginProcessingUrl(\"/j_spring_security_check\") // Submit URL\n\t\t\t\t.loginProcessingUrl(\"/login-check\") // Submit URL\n\t\t\t\t.loginPage(\"/login\")//\n\t\t\t\t.defaultSuccessUrl(\"/home\")//\n\t\t\t\t.failureUrl(\"/login?error=true\")//\n\t\t\t\t.usernameParameter(\"username\")//\n\t\t\t\t.passwordParameter(\"password\");\n//\t\t\t\t.successHandler(authenticationSuccessHandler);\n\n\t\t// Cấu hình cho Logout Page.\n\t\thttp.authorizeRequests().and().logout().logoutUrl(\"/logout\").logoutSuccessUrl(\"/home\");\n\n\t\t// Cấu hình Remember Me.\n\t http.authorizeRequests().and() //\n\t .rememberMe()\n\t // .alwaysRemember(true) // default : false : ko remember, phải chọn remember\n\t .rememberMeParameter(\"remember-me\") // default : remember-me\n\t .rememberMeCookieName(\"RememberMeApp\") // default : remember-me\n\t .tokenRepository(this.persistentTokenRepository()) //\n\t .tokenValiditySeconds(1 * 24 * 60 * 60); // custom 24h // default : 2 weeks\n\t}",
"@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\tSystem.out.println(\"Starting webSecurity configure\");\n\n\t\t// Liberar os frames do h2, mesmo com as urls liberadas os frames são\n\t\t// bloqueados.\n\t\thttp.headers().frameOptions().disable();\n\n\t\thttp.cors().and().csrf().disable().authorizeRequests().antMatchers(PUBLIC_MATCHERS).permitAll()\n\t\t\t\t.antMatchers(HttpMethod.GET, PUBLIC_MATCHERS_GET).permitAll()\n\t\t\t\t.antMatchers(HttpMethod.POST, PUBLIC_MATCHERS_POST).permitAll().anyRequest().authenticated();\n\t\thttp.addFilter(new JwtAuthenticationFilter(authenticationManager(), jwtUtil));// registrar o filtro de\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// authenticação\n\t\thttp.addFilter(new JWTAuthorizationFilter(authenticationManager(), jwtUtil, userDetail)); // registra o filtro\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// de authorização\n\t\t// this disables session creation on Spring Security\n\t\thttp.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);\n\n\t}",
"public static void initApiSession(HttpServletRequest request, IApplicationSettings settings)\n {\n \n ViewLearningToolRequestParams parameters = getParams(request.getParameterMap());\n ValidateQueryString(request, settings, parameters);\n // Store received parameters to the session state\n storeParametersToSession(parameters, request.getSession(), settings.getApplicationKey(), settings.getSharedSecret());\n }",
"@Override\n public void configure(HttpSecurity http) throws Exception {\n\n String[] unsecuredResources = new String[] { \"/login\", \"/security/**\", \"/services/rest/login\",\n \"/services/rest/logout\" };\n\n http\n //\n .userDetailsService(this.userDetailsService)\n // define all urls that are not to be secured\n .authorizeRequests().antMatchers(unsecuredResources).permitAll().anyRequest().authenticated().and()\n\n // activate crsf check for a selection of urls (but not for login & logout)\n .csrf().requireCsrfProtectionMatcher(new CsrfRequestMatcher()).and()\n\n // configure parameters for simple form login (and logout)\n .formLogin().successHandler(new SimpleUrlAuthenticationSuccessHandler()).defaultSuccessUrl(\"/\")\n .failureUrl(\"/login.html?error\").loginProcessingUrl(\"/j_spring_security_login\").usernameParameter(\"username\")\n .passwordParameter(\"password\").and()\n // logout via POST is possible\n .logout().logoutSuccessUrl(\"/login.html\").and()\n\n // register login and logout filter that handles rest logins\n .addFilterAfter(getSimpleRestAuthenticationFilter(), BasicAuthenticationFilter.class)\n .addFilterAfter(getSimpleRestLogoutFilter(), LogoutFilter.class);\n\n if (this.corsEnabled) {\n http.addFilterBefore(getCorsFilter(), CsrfFilter.class);\n }\n }",
"@Override\n public void configure(WebSecurity web) throws Exception {\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //init form input\r\n initFormDataCompanyBalance();\r\n //refresh data form input (transfer)\r\n dataCompanyBalanceTransferHandle();\r\n }",
"@PostConstruct\n protected void init() {\n direccionRegionalList = new ArrayList<InstitucionRequerida>();\n direccionRegionalList = institucionRequeridaServicio.getDireccionRegionalList();\n gadList = new ArrayList<InstitucionRequerida>();\n gadList = institucionRequeridaServicio.getGADList();\n registroMixtoList = new ArrayList<InstitucionRequerida>();\n registroMixtoList = institucionRequeridaServicio.getRegistroMixtoList();\n }",
"public void cleanCSRFBlackListCache() throws AAException\r\n\t{\r\n\t\tSystemConfigCacheHelper.getInstance().cleanCSRFBlackListCache();\r\n\r\n\t\tthis.initCSRFBlackListCache(null);\r\n\t}",
"Update withSecurityToken(SourceControlSecurityTokenProperties securityToken);",
"public InboundSecurityRules() {\n }",
"@Override\n protected javax.servlet.Filter[] getServletFilters() {\n DelegatingFilterProxy delegateFilterProxy = new DelegatingFilterProxy();\n delegateFilterProxy.setTargetBeanName(\"springSecurityFilterChain\");\n return new Filter[] { delegateFilterProxy };\n }",
"private static void initialize()\n {\n\tif (cookieHandler == null)\n\t{\n\t BrowserService service = ServiceProvider.getService();\n\t cookieHandler = service.getCookieHandler();\n\t}\n }",
"@Override\n\tpublic void configure(AuthorizationServerSecurityConfigurer security) throws Exception {\n\t\tsecurity.tokenKeyAccess(\"permitAll()\") //Cualquier cliente puede accesar a la ruta para generar el token\n\t\t.checkTokenAccess(\"isAuthenticated()\"); //Se encarga de validar el token\n\t}",
"@Override\n public void doInit() {\n action = (String) getRequestAttributes().get(\"action\");\n }",
"@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.csrf().disable();\r\n\t}",
"private AuthenticationData() {\n\n }",
"@Override\n\t\tprotected void doFilterInternal(HttpServletRequest request, \n\t\t\t\tHttpServletResponse response, \n\t\t\t\tFilterChain filterChain) throws ServletException, IOException\n\t\t{\n\t\t\tCsrfToken token = (CsrfToken) request.getAttribute(\"_csrf\");\n\t\t\tlog.debug(\"CsrfToken header: \" + token.getHeaderName() +\n\t\t\t\t\t\" CsrfToken parameterName:\" + token.getParameterName() + \n\t\t\t\t\t\" CsrfToken token:\" + token.getToken() +\n\t\t\t\t\t\", filterChain: \" + filterChain.toString());\n\t\t\tlog.debug(\"Request servlet path: \" + request.getServletPath());\t\t\t\n\t\t\tif (\n\t\t\t\t// only care if it's a POST\t \n\t\t\t\t\"POST\".equals(request.getMethod()) &&\t \n\t\t\t\t// make sure we have a token\n\t\t\t\ttoken != null\n\t\t\t\t) {\n\t\t\t\t// CsrfFilter already made sure the token matched. Here, we'll make sure it's not expired\n\t\t\t\ttry {\n\t\t\t\t\tJwts.parser()\n\t\t\t\t\t\t.setSigningKeyResolver(secretService.getSigningKeyResolver())\n\t\t\t\t\t\t.parseClaimsJws(token.getToken());\t\t\t\t\t\n\n\t\t\t\t} catch (JwtException e) {\n\t\t\t\t\t// most likely an ExpiredJwtException, but this will handle any\n\t\t\t\t\tlog.debug(\"Expired token\");\n\t\t\t\t\trequest.setAttribute(\"exception\", e);\n\t\t\t\t\tresponse.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t\t\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"error\");\n\t\t\t\t\tdispatcher.forward(request, response);\n\t\t\t\t}\n\t\t\t} \n\t\t\tfilterChain.doFilter(request, response);\n\t\t}",
"public void init() {\n ServletContext context = getServletContext();\r\n host = context.getInitParameter(\"host\");\r\n port = context.getInitParameter(\"port\");\r\n user = context.getInitParameter(\"user\");\r\n pass = context.getInitParameter(\"pass\");\r\n }",
"public final void resetSecurityVars() {\n String disable = getStr(\"DISABLE\");\n if (getVar(Str.MULTICLASS).equalsIgnoreCase(\"DISABLED\"))\n disable += \", CLASSES\";\n CMSecurity.setAnyDisableVars(disable);\n CMSecurity.setAnyEnableVars(getStr(\"ENABLE\"));\n CMSecurity.setDebugVars(getStr(\"DEBUG\"));\n CMSecurity.setSaveFlags(getStr(\"SAVE\"));\n }",
"public SitoWeb() {\r\n\t\tsuper();\r\n\t\turlBase = null;\r\n\t}",
"private void initRegs(){\n\n keyWordReg = \"\";\n\n for (String seg: keyWordMap.keySet()){\n\n keyWordReg += seg + \"|\";\n\n }\n\n symbolReg = \"[\\\\&\\\\*\\\\+\\\\(\\\\)\\\\.\\\\/\\\\,\\\\-\\\\]\\\\;\\\\~\\\\}\\\\|\\\\{\\\\>\\\\=\\\\[\\\\<]\";\n intReg = \"[0-9]+\";\n strReg = \"\\\"[^\\\"\\n]*\\\"\";\n idReg = \"[a-zA-Z_]\\\\w*\";\n\n tokenPatterns = Pattern.compile(idReg + \"|\" + keyWordReg + symbolReg + \"|\" + intReg + \"|\" + strReg);\n }",
"public AuthenticationFilter() {\n\t\turlRedirect = Params.get(\"LOGIN_URL_REDIRECT\");\n\t\tnextVarName = Params.get(\"LOGIN_URL_REDIRECT_VAR_NAME\");\n\n\t\tdefinedUrlLogin = !Is.empty(urlRedirect);\n\t}",
"@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\thttp.csrf().disable() // Disable csrf for REST API\r\n\t\t\t\t.authorizeRequests()\r\n\t\t\t\t.antMatchers(HttpMethod.POST, SIGN_UP_URL).permitAll() // permit without authentication\r\n\t\t\t\t.antMatchers(HttpMethod.POST, SecurityConstants.FEEDBACK_URL).permitAll()\r\n\t\t\t\t.antMatchers(HttpMethod.GET, SecurityConstants.FEEDBACK_URL).permitAll()\r\n\t\t\t\t.antMatchers(\"/v2/api-docs\",\r\n \"/configuration/ui\",\r\n \"/swagger-resources/**\",\r\n \"/configuration/security\",\r\n \"/swagger-ui.html\",\r\n \"/webjars/**\").permitAll()\r\n\t\t\t\t.anyRequest() // for any other request\r\n\t\t\t\t.authenticated() // do authentication\r\n\t\t\t\t.and().addFilter(getAuthenticaitonFilter()) // Add Authentication Filter\r\n\t\t\t\t.addFilter(new AuthorizationFilter(authenticationManager(), userRepository)).sessionManagement()\r\n\t\t\t\t.sessionCreationPolicy(SessionCreationPolicy.STATELESS);\r\n\t}",
"protected void configure(HttpSecurity http) throws Exception {\n http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and()\n .cors().configurationSource(new CorsConfigurationSource() {\n @Override\n public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {\n CorsConfiguration config = new CorsConfiguration();\n config.setAllowedOrigins(Collections.singletonList(\"http://localhost:4200\"));\n config.setAllowedMethods(Collections.singletonList(\"*\"));\n config.setAllowCredentials(true);\n config.setAllowedHeaders(Collections.singletonList(\"*\"));\n config.setExposedHeaders(Arrays.asList(\"Authorization\"));\n config.setMaxAge(3600L);\n return config;\n }\n }).and().csrf().disable()\n .addFilterBefore(new RequestValidationBeforeFilter(), BasicAuthenticationFilter.class)\n .addFilterAfter(new AuthoritiesLoggingAfterFilter(),BasicAuthenticationFilter.class)\n .addFilterBefore(new JWTTokenValidatorFilter(), BasicAuthenticationFilter.class)\n .addFilterAfter(new JWTTokenGeneratorFilter(), BasicAuthenticationFilter.class)\n .addFilterAt(new AuthoritiesLoggingAtFilter(),BasicAuthenticationFilter.class)\n .authorizeRequests()\n .antMatchers(\"/accounts\").hasRole(\"USER\")\n .antMatchers(\"/balance\").hasAnyRole(\"USER\",\"ADMIN\")\n .antMatchers(\"/loans\").hasRole(\"ROOT\")\n .antMatchers(\"/cards\").authenticated()\n .antMatchers(\"/notice\").permitAll()\n .antMatchers(\"/contact\").permitAll()\n .antMatchers(\"/welcome\").permitAll()\n .and()\n .formLogin()\n .and()\n .httpBasic();\n }",
"private SecurityConsts()\r\n\t{\r\n\r\n\t}",
"@Override\n protected void doFilterInternal(HttpServletRequest request,\n HttpServletResponse response,\n FilterChain filterChain) throws ServletException, IOException {\n if (TcServletUtils.isXmlHttpRequest(request)) {\n Optional<Cookie> cookieOptional = Arrays.stream(request.getCookies())\n .filter(cookie -> Objects.equals(cookie.getName(), XSRF_TOKEN_COOKIE_NAME))\n .findAny();\n // no cookie, yes header -> impossible\n // yes cookie, no header -> not a correct req\n // no cookie, no header -> pass\n // yes cookie, yes header -> go to verify\n if (cookieOptional.isPresent()) {\n Cookie cookie = cookieOptional.get();\n String header = request.getHeader(XSRF_TOKEN_HEADER_NAME);\n if (Objects.isNull(header)) {\n log.warn(\"req [{}] has xsrf cookie but do not pass a xsrf token in xml http req, not a valid req\",\n request.getRequestURI());\n response.sendError(HttpStatus.FORBIDDEN.value(), \"拒绝服务\");\n return;\n }\n if (!Objects.equals(cookie.getValue(), header)) {\n log.warn(\"req [{}] has xsrf cookie and xsrf token but they are not match\", request.getRequestURI());\n response.sendError(HttpStatus.FORBIDDEN.value(), \"拒绝服务\");\n return;\n }\n }\n }\n filterChain.doFilter(request, response);\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //init form input\r\n initFormDataReservationType();\r\n //refresh data form input\r\n setSelectedDataToInputForm();\r\n }",
"private void initResources(ServletContext servletContext) {\n if (pathnames != null) {\n ActionContext ctx = ActionContext.getContext();\n try {\n \n ValidatorResources resources = this.loadResources(servletContext);\n \n \n String prefix = ctx.getActionInvocation().getProxy().getNamespace();\n \n \n servletContext.setAttribute(ValidatorPlugIn.VALIDATOR_KEY + prefix, resources);\n \n servletContext.setAttribute(ValidatorPlugIn.STOP_ON_ERROR_KEY + '.'\n + prefix,\n (this.stopOnFirstError ? Boolean.TRUE : Boolean.FALSE));\n } catch (Exception e) {\n throw new StrutsException(\n \"Cannot load a validator resource from '\" + pathnames + \"'\", e);\n }\n }\n }",
"public void setToken(java.lang.String param){\n localTokenTracker = true;\n \n this.localToken=param;\n \n\n }",
"HttpRequest(){\n HttpHeader.getInstance().loadHeaderList(\"src/main/resources/headerList.txt\");\n }",
"private String prepareSecurityToken() {\r\n\t\tint time = ((int) System.currentTimeMillis() % SECURITY_TOKEN_TIMESTAMP_RANGE);\r\n\t\treturn String.valueOf(time + (new Random().nextLong() - SECURITY_TOKEN_TIMESTAMP_RANGE));\r\n\t}",
"public void init() {\n ServletContext context = getServletContext();\n host = context.getInitParameter(\"host\");\n port = context.getInitParameter(\"port\");\n user = context.getInitParameter(\"user\");\n pass = context.getInitParameter(\"pass\");\n }",
"public void init(FilterConfig config) {}",
"void initSafeties(){\n gyroSafety();\n tensorFlowSafety();\n\n telemetry.addLine(\"Init finalized successfully\");\n telemetry.update();\n }",
"@Override\n\tpublic void init() throws ServletException\n\t{\n\t\tsuper.init();\n\t\t\n\t\tActiveUsers = (HashMap<String, User>) getServletContext().getAttribute(\"ActiveUsers\");\n\t\tMessages = (ArrayList<Message>) getServletContext().getAttribute(\"Messages\");\n\t\t\n\t\tif(ActiveUsers == null)\n\t\t{\n\t\t\tActiveUsers = new HashMap<String, User>();\n\t\t\tgetServletContext().setAttribute(\"ActiveUsers\", ActiveUsers);\n\t\t}\n\t\t\n\t\tif(Messages == null)\n\t\t{\n\t\t\tMessages = new ArrayList<Message>();\n\t\t\tgetServletContext().setAttribute(\"Messages\", Messages);\n\t\t}\n\t}",
"@Override\n\tprotected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)\n\t\t\tthrows ServletException, IOException {\n\t\tresponse.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n\t\tresponse.addHeader(\"Access-Control-Allow-Headers\", \n\t\t\t\t\"Origin, Accept, X-Requested-With, Content-Type,\"\n\t\t\t\t+ \"Access-Control-Request-Method, \"\n\t\t\t\t+ \"Access-Control-Request- Headers,\"\n\t\t\t\t+ \"Authorization\");\n\t\t\n\t\tresponse.addHeader(\"Access-Control-Expose-Headers\", \"Access-Control-Allow-Origin, Access-Control-Allow-Credentials, Authorization\");\n\t\t \n\t\t//Verifier si le token exist dans la requette header et le prefix \n\t\tString jwt = request.getHeader(SecurityConstants.HEADER_STRING);\n\t\tSystem.out.println(jwt);\n\t\tif(request.getMethod().equals(\"OPTIONS\")) {\n\t\t\tresponse.setStatus(HttpServletResponse.SC_OK);\n\t\t} \n\t\telse {\n\t\t\tif(jwt == null || !jwt.startsWith(SecurityConstants.TOKEN_PREFIX)) {\n\t\t\t\tfilterChain.doFilter(request, response);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tClaims claims = Jwts.parser()\n\t\t\t\t.setSigningKey(SecurityConstants.SECRET)\n\t\t\t\t.parseClaimsJws(jwt.replace(SecurityConstants.TOKEN_PREFIX, \"\"))\n\t\t\t\t.getBody();\n\t\t\t\t\n\t\t\t\t// Subject contient le username a recuperer\n\t\t\t\tString username = claims.getSubject();\n\t\t\t\tArrayList<Map<String, String>> roles = (ArrayList<Map<String, String>>) claims.get(\"roles\");\n\t\t\t\t//auhorities define le role de l'utilisateur \n\t\t\t\tCollection<GrantedAuthority> authorities = new ArrayList<>();\n\t\t\t\troles.forEach(r -> {\n\t\t\t\tauthorities.add(new SimpleGrantedAuthority(r.get(\"authority\")));\t\t\n\t\t\t\t});\n\t\t\t\t//Recuperer l'identité de l'utilisateur qui a envoyer la requette \n\t\t\t\tUsernamePasswordAuthenticationToken authenticateUser = \n\t\t\t\t\t\tnew UsernamePasswordAuthenticationToken(username , null, authorities);\n\t\t\t\t\t\tSecurityContextHolder.getContext().setAuthentication(authenticateUser);\n\t\t\t\t\t\tfilterChain.doFilter(request, response);\t\t\t\t\t\n\t\t}\n\t\t\n\t}",
"ApiTokenProperty(String seed) {\n apiToken = Secret.fromString(seed);\n }",
"public void init() {\n\t\tList<Order> entries = new ArrayList<>();\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tgetServletContext().setAttribute(\"entries\", entries);\n\t}",
"protected void configure(HttpSecurity http) throws Exception {\n\n\t\thttp\n\t\t\t\t// .csrf().disable()\n\t\t\t\t.csrf().disable().headers().frameOptions().disable()\n\t\t\t\t// .authorizeRequests()\n\t\t\t\t// .antMatchers(\"*/xomeq/login*\")\n\t\t\t\t// .anonymous()\n\t\t\t\t// .and()\n\t\t\t\t.authorizeRequests().antMatchers(\"/public/**\").permitAll().antMatchers(\"/login*\").permitAll() // Para\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// poder\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// cambiar\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// el\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// lenguaje\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// en\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// el\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// login\n\t\t\t\t// .antMatchers(\"/**\").authenticated()\n\t\t\t\t.and().formLogin().loginPage(\"/login\").failureUrl(\"/login?error=true\").successHandler(successHandler())\n\t\t\t\t// .loginProcessingUrl(\"/rest/login\")\n\t\t\t\t// .defaultSuccessUrl(\"/genome\",true)\n\t\t\t\t.permitAll()\n\n\t\t\t\t// .failureHandler(authenticationFailureHandler)\n\t\t\t\t.and().logout()\n\t\t\t\t// .logoutSuccessUrl(\"/\")\n\t\t\t\t.permitAll();\n\t}",
"@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.csrf().disable()\n // Register our CustomRequestCache that saves unauthorized access attempts, so\n // the user is redirected after login.\n .requestCache().requestCache(new CustomRequestCache())\n // Restrict access to our application.\n .and().authorizeRequests()\n // Allow all flow internal requests.\n .requestMatchers(SecurityUtils::isFrameworkInternalRequest).permitAll() //\n // Allow all requests by logged in users.\n .anyRequest().authenticated()\n // Configure the login page.\n .and().formLogin().loginPage(LOGIN_URL).permitAll()\n .loginProcessingUrl(LOGIN_PROCESSING_URL)\n .failureUrl(LOGIN_FAILURE_URL)\n // Configure logout\n .and()\n .logout(logout -> logout\n .logoutUrl(LOGOUT_URL)\n .logoutSuccessUrl(LOGOUT_SUCCESS_URL)\n .invalidateHttpSession(true)\n .deleteCookies()\n );\n }",
"List<SecuritySchemeRef> securedBy();",
"private void initStandardParams(ServletHolder jerseyServlet) {\n String initClasses = jerseyServlet.getInitParameter(ServerProperties.PROVIDER_CLASSNAMES);\n if (initClasses != null) {\n return;\n }\n\n initClasses = classProvider;\n\n if (this.swaggerId != null) {\n initClasses += \",\" + SWAGGER_INIT_CLASSNAMES_PARAM_VALUE;\n\n jerseyServlet.setInitParameter(SWAGGER_CONTEXT_ID, swaggerId);\n jerseyServlet.setInitParameter(SWAGGER_SCANNER_ID, swaggerId);\n }\n\n jerseyServlet.setInitParameter(ServerProperties.PROVIDER_CLASSNAMES, initClasses);\n\n jerseyServlet.setInitParameter(ServerProperties.METAINF_SERVICES_LOOKUP_DISABLE, \"true\");\n }",
"private void initRequestAttributes(){\n\t\tmThrowedExceptions \t= new ArrayList<Exception>();\n\t\tmResponseCode\t\t= -1;\n\t}",
"public StaffSecurityMetadataSource() {\n loadResourceDefine();\n }",
"public PrivacySettingsWeb() {\n\t}",
"@Before\r\n\tpublic void init() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tmockMvc = MockMvcBuilders.standaloneSetup(tokenController).build();\r\n\r\n\t\t// mockMvc = MockMvcBuilders.webAppContextSetup(context).build();\r\n\t}",
"public static void createFieldAttributes(HttpServletRequest request) {\n LOGGER.debug(\"createFieldAttributes ...\");\n HttpSession session = request.getSession();\n session.setAttribute(\"username\", request.getParameter(\"username\"));\n session.setAttribute(\"password\", request.getParameter(\"password\"));\n session.setAttribute(\"confirm-password\", request.getParameter(\"confirm-password\"));\n session.setAttribute(\"email\", request.getParameter(\"email\"));\n session.setAttribute(\"role\", request.getParameter(\"role\"));\n session.setAttribute(\"table-id\", request.getParameter(\"table-id\"));\n }",
"public static void init() {\r\n\t\tsetPolicy(BPF.getInstance().getConfig().routes_setting()\r\n\t\t\t\t.getQueuing_policy());\r\n\t}",
"private void init() {\n\t\temail_login=(EditText)findViewById(R.id.et_email_login);\n\t\tpassword_login=(EditText)findViewById(R.id.et_password_login);\n\t\t\n\t\t\n\t\tlogin_login=(Button)findViewById(R.id.bt_login_login);\n\n\t\tregister_login=(TextView)findViewById(R.id.tv_register_login);\n\t\tforget_login=(TextView)findViewById(R.id.tv_forgetpasw_login);\n\t\tlogin_remind=(TextView)findViewById(R.id.tv_remind_login);\n\t\t\n\t\tregister_login.setOnClickListener(this);\n\t\tforget_login.setOnClickListener(this);\n\t\tlogin_login.setOnClickListener(this);\n\t\t\n\t\tif(!LocalStorage.getBoolean(this, Constant.CAN_LOGIN)){\t\t\n\t\t\tlogin_remind.setText(getResources().getString(R.string.config_login));\t\t\n\t\t}else{\n\t\t\temail_login.addTextChangedListener(textwatcher);\n\t\t\tpassword_login.addTextChangedListener(textwatcher);\n\t\t}\n\t\tlogin_login.setEnabled(false);\n\t}",
"@Override\n protected Properties getConfiguration(String configPrefix,\n FilterConfig filterConfig) throws ServletException{\n Configuration conf = HttpFSServerWebApp.get().getConfig();\n Properties props = HttpServer2.getFilterProperties(conf,\n new ArrayList<>(Arrays.asList(CONF_PREFIXES)));\n\n String signatureSecretFile = props.getProperty(SIGNATURE_SECRET_FILE, null);\n if (signatureSecretFile == null) {\n throw new RuntimeException(\"Undefined property: \"\n + SIGNATURE_SECRET_FILE);\n }\n\n if (!isRandomSecret(filterConfig)) {\n try (Reader reader = new InputStreamReader(Files.newInputStream(\n Paths.get(signatureSecretFile)), StandardCharsets.UTF_8)) {\n StringBuilder secret = new StringBuilder();\n int c = reader.read();\n while (c > -1) {\n secret.append((char) c);\n c = reader.read();\n }\n\n String secretString = secret.toString();\n if (secretString.isEmpty()) {\n throw new RuntimeException(\n \"No secret in HttpFs signature secret file: \"\n + signatureSecretFile);\n }\n\n props.setProperty(AuthenticationFilter.SIGNATURE_SECRET,\n secretString);\n } catch (IOException ex) {\n throw new RuntimeException(\"Could not read HttpFS signature \"\n + \"secret file: \" + signatureSecretFile);\n }\n }\n setAuthHandlerClass(props);\n String dtkind = WebHdfsConstants.WEBHDFS_TOKEN_KIND.toString();\n if (conf.getBoolean(HttpFSServerWebServer.SSL_ENABLED_KEY, false)) {\n dtkind = WebHdfsConstants.SWEBHDFS_TOKEN_KIND.toString();\n }\n props.setProperty(KerberosDelegationTokenAuthenticationHandler.TOKEN_KIND,\n dtkind);\n return props;\n }",
"@Override\n\tprotected void configure(HttpSecurity httpSecurity) throws Exception {\n\t\t// This code creates rules that requires authentication for all endpoints except\n\t\t// /registration and enables HTTP basic authentication.\n\t\thttpSecurity.cors().and().csrf().disable().authorizeRequests().antMatchers(AUTH_WHITELIST).permitAll()\n\t\t\t\t.antMatchers(HttpMethod.POST, \"/auth/v1/signup\", \"/auth/v1/confirmEmail\").permitAll().anyRequest().authenticated().and()\n\t\t\t\t.addFilter(new AuthenticationFilter(authenticationManager(), tokenUtil))\n\t\t\t\t.addFilter(new AuthorizationFilter(authenticationManager(), tokenUtil)).sessionManagement()\n\t\t\t\t.sessionCreationPolicy(SessionCreationPolicy.STATELESS);\n\t}"
] | [
"0.5360481",
"0.5285418",
"0.5216539",
"0.52068764",
"0.50141716",
"0.49699748",
"0.49696878",
"0.489606",
"0.48900917",
"0.48864868",
"0.480207",
"0.47822875",
"0.4773599",
"0.47235245",
"0.47104466",
"0.4680964",
"0.46788985",
"0.4672976",
"0.46659848",
"0.46634498",
"0.46519816",
"0.4638535",
"0.46345076",
"0.46310845",
"0.46184796",
"0.4615688",
"0.46065685",
"0.4599176",
"0.45974797",
"0.45731926",
"0.45624027",
"0.4548508",
"0.45199084",
"0.4514908",
"0.45085543",
"0.4504081",
"0.44962394",
"0.44811273",
"0.4477213",
"0.4470862",
"0.44567788",
"0.44394624",
"0.44371825",
"0.4435772",
"0.443326",
"0.44329605",
"0.4417421",
"0.44153875",
"0.4406071",
"0.43979242",
"0.4397167",
"0.4390811",
"0.43878207",
"0.43836874",
"0.43763843",
"0.43667898",
"0.436345",
"0.43602005",
"0.43597665",
"0.435807",
"0.4350706",
"0.43485495",
"0.43439946",
"0.43407676",
"0.43381378",
"0.43376902",
"0.43251377",
"0.43236497",
"0.4320243",
"0.43119207",
"0.43102375",
"0.43098834",
"0.43031028",
"0.42965972",
"0.42860973",
"0.42825246",
"0.42801407",
"0.42773363",
"0.42749828",
"0.42746904",
"0.42726153",
"0.4266212",
"0.4261934",
"0.42617542",
"0.42564386",
"0.425575",
"0.4249292",
"0.42485473",
"0.42476696",
"0.4245667",
"0.42437425",
"0.42436478",
"0.4243144",
"0.42406332",
"0.42402655",
"0.42375168",
"0.42333165",
"0.42273164",
"0.42195722",
"0.4218695"
] | 0.69605553 | 0 |
Clean the CSRFBlackList cache | public void cleanCSRFBlackListCache() throws AAException
{
SystemConfigCacheHelper.getInstance().cleanCSRFBlackListCache();
this.initCSRFBlackListCache(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }",
"void clearCache();",
"void clearCache();",
"private void invalidateCache() {\n\t\tLog.d(TAG, \"invalidateCache() is removing in-memory cache\");\n\t\tpackageMapping.clear();\n\t\tvalidCache = false;\n\t}",
"public synchronized static void resetCache() {\n prefixes = null;\n jsonldContext = null;\n }",
"public static void clearAllCache() {\n try {\n sLruCache.evictAll();\n sDiskLruCache.delete();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void clearCache();",
"static void clearCache() {\n CONFIG_VALUES = null;\n RUN_MODE = null;\n }",
"public static void clearCache() {\n CACHE.remove();\n }",
"public void clearCache() {\n/* 105 */ this.cachedRed = null;\n/* 106 */ this.cachedUsr2dev = null;\n/* 107 */ this.cachedGn2dev = null;\n/* 108 */ this.cachedBounds = null;\n/* */ }",
"public void clearCache() {\n\tmyCachedCrum = null;\n\tmyCachedRoot = null;\n\tmyCachedPath = MuSet.make();\n/*\nudanax-top.st:13116:CanopyCache methodsFor: 'operations'!\n{void} clearCache\n\t\"Clear the cache because the canopy has\n\t changed. This ought to destroy the cachedPath. \n\t This must be cleared after every episode!!!!!!\"\n\tmyCachedCrum _ NULL.\n\tmyCachedRoot _ NULL.\n\tmyCachedPath _ MuSet make.!\n*/\n}",
"public void clear() {\n cache.clear();\n }",
"private void cleanBuffersFromCache()\n {\n synchronized (myUsedKeys)\n {\n CacheProvider cache = getCache();\n for (PolylineModelData key : myPreviouslyUsedKeys)\n {\n if (!myUsedKeys.contains(key))\n {\n cache.clearCacheAssociation(key, PolylineDataBuffered.class);\n }\n }\n\n myPreviouslyUsedKeys.clear();\n myPreviouslyUsedKeys.addAll(myUsedKeys);\n }\n }",
"void destroy() {\n destroyCache();\n }",
"public static void clearCache() {\n\t\tclassNamesToPersistIds = null;\n\t\tclassesToPersistIds = null;\n\t}",
"void resetCache();",
"public static void invalidateCache() {\n\t\tclassCache = new HashMap();\n\t}",
"public void clearCache() {\r\n \t\ttagInfoCache.clear();\r\n \t\ttldElementsByPrefix.clear();\r\n \t}",
"@Override\r\n\tprotected void clean() {\n\t\tcacheDataImpl.del(CacheConfig.GROUPMEMBER_USERNAME);//数据库id\r\n\t\tcacheDataImpl.del(CacheConfig.GROUPMEMBER_GROUPID);//\r\n\t\tcacheDataImpl.del(CacheConfig.GROUPMEMBER_GRADE);\r\n\t}",
"private void invalidateCache() {\n\t}",
"public static void clearCache() {\r\n\t\tsInstance.mSettings.clear();\r\n\t}",
"public void clear() {\n this.cache.clear();\n }",
"public static void clearAllCache() {\n page_cache.clear();\n key_relate.clear();\n }",
"public void clear() {\n\t\tthis.cache.clear();\n\t}",
"public void clearCache() {\n\n\t\t// clearing form soft reference\n\t\tif (softCache != null) {\n\t\t\tsoftCache.clear();\n\t\t}\n\n\t\t// clearing from cache directory\n\t\tdeleteCacheFiles();\n\n\t}",
"public static void reset() {\n\t\tCAUGHT.clear();\n\t\tLOAD_CACHE.clear();\n\t}",
"public void cleanDescriptorCache() {\n _descriptorCache = new DescriptorCacheImpl();\n }",
"protected void invalidateCache() {\r\n\tcurrentFilesFresh = false;\r\n }",
"@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }",
"public void clearCache() {\n\t\troutes_.clearCache();\n\t}",
"public void Clean()\n\t{\n\t\tstorage.clear();\n\t}",
"public synchronized void deleteCache() {\n\n for (final File f : Constants.CACHE_LOCATION.listFiles()) {\n if (!f.isDirectory()) {\n f.delete();\n }\n }\n\n logsByCharacterMap = Collections.emptyMap();\n }",
"@Override\n public void clearCache() {\n }",
"private void flushCache()\n {\n cachedDecomposition = null;\n cachedCentroid = null;\n cachedBounds = null;\n }",
"public static void clearCache() {\n sHardBitmapCache.clear();\n sSoftBitmapCache.clear();\n }",
"public static void clearCache() {\n cacheKeys.clear();\n cacheValues.clear();\n }",
"private void collectGarbageInCache() {\n CacheReference r;\n while ((r = (CacheReference)queue.poll()) != null) {\n fontCache.remove(r.getKey());\n }\n }",
"public static void clear() {\n\t\tmemoryCache.clear();\n\n\t\t// Remove everything from file cache\n\t\tFile cachedFileDir = new File(diskCachePath);\n\t\tif (cachedFileDir.exists() && cachedFileDir.isDirectory()) {\n\t\t\tFile[] cachedFiles = cachedFileDir.listFiles();\n\t\t\tfor (File f : cachedFiles) {\n\t\t\t\tif (f.exists() && f.isFile()) {\n\t\t\t\t\tf.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}",
"public void clearCache() {\n constructorCache.clear();\n }",
"public void clear() {\n\t\t//System.err.println(\"FCache::clear() dont know how to clear m_leafCache\");\n\t\tfor (int i = 0; i < m_TopOfBranche.size(); i++) {\n\t\t\tCacheObject o = m_TopOfBranche.elementAt(i);\n\t\t\tif (o != null) {\n\t\t\t\to.m_F = null;\n\t\t\t}\n\t\t}\n\t\t//m_TopOfBranche.removeAllElements();\n\t\tfor (int iNode = 0; iNode < m_BottomOfBrancheID.length; iNode++) {\n\t\t\tclearNode(iNode);\n\t\t}\n\t\tg_nID = 0;\n\t}",
"public abstract void clearCache();",
"public void clearCache() {\n textureCache.clear();\n modelCache.clear();\n blockModelCache.clear();\n }",
"@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }",
"public void clearCache() {\n sHardBitmapCache.clear();\n sSoftBitmapCache.clear();\n }",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}",
"public void clearMemoryCache() {\r\n cache.evictAll();\r\n Log.d(TAG, \"Manually cleaned complete cache.\");\r\n }",
"public static void clearCache(){\n cache.clear();\n cache2.clear();\n }",
"public void clean() {\n\t\tserver.clearPersistentData();\n\t\t_offlineMessages.clear();\n\t\t_onlineClients.clear();\n\t\t_clientFriends.clear();\n\t}",
"private void clearCache() {\r\n for (int i = 1; i < neurons.length; i++) {\r\n for (int j = 0; j < neurons[i].length; j++) {\r\n neurons[i][j].clearCache();\r\n }\r\n }\r\n }",
"private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }",
"public void clearCache() {\n mCache.clear();\n }",
"public void limpaCache()\n\t{\n\t\tpoolMensagens.clear();\n\t}",
"public void clearSofCache() {\n\n\t\tif (views != null) {\n\t\t\tviews.clear();\n\t\t}\n\n\t\tif (imageViews != null) {\n\t\t\timageViews.clear();\n\t\t}\n\t}",
"public void invalidateCache(){\n\t\tfor (Realm realm : realms) {\n\t\t\tif(realm instanceof IClearableRealmCache){\n\t\t\t\tIClearableRealmCache ar = (IClearableRealmCache)realm;\n\t\t\t\tar.clearAllCaches();\n\t\t} \n\t\t\t\n\t\t}\n\t}",
"@Override\n public void removeFromCache(List<NulsDigestData> txHashList) {\n\n }",
"public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}",
"public static void stopCaching() {\n\t\t/*\n\t\t * remove existing cache. Also, null implies that they are not be cached\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.preLoaded == false) {\n\t\t\t\taType.cachedOnes = null;\n\t\t\t}\n\t\t}\n\t}",
"public void invalidateCaches() {\n cfgCache.invalidateAll();\n analysisCache.invalidateAll();\n }",
"public void clearDiskCache()\n {\n clearCache(cacheDirectory);\n }",
"@Override\n\tpublic synchronized void clear() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files != null) {\n\t\t\tfor (File file : files) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tmEntries.clear();\n\t\tmTotalSize = 0;\n\t\tVolleyLog.d(\"Cache cleared.\");\n\t}",
"public void interestCachePurge()\n\t{\n\t\tdouble currentTime = getTime() ;\n\t\tfor(InterestCacheEntry entry:interestCache.values()){\n\t\t\tentry.setPayable(macroLearner.calcPayable(entry.getInterest(),entry.getMaxGradient().getPayment()));\n\t\t\tentry.gradientListPurge(currentTime) ;\n\t\t\t//microLearner.updateTaskExpectedPrice(entry.getInterest().getTaskId());\n\t\t\t/*if ( entry.IsGradientListEmpty() == true ){\n\t\t\t\tit.remove();\n\t\t\t}\t*/\t\t\n\t\t}\n\t}",
"void invalidateCache();",
"public void destroy()\n {\n if ( cacheManager == null )\n {\n return;\n }\n\n LOG.info( \"clearing all the caches\" );\n\n cacheManager.close();\n cacheManager = null;\n //cacheManager.clearAll();\n //cacheManager.shutdown();\n }",
"public static void clean() {\n kryoThreadLocalContext.remove();\n }",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"private void killWebJunk()\n\t{\n\t\tLogger.i(\"Killing all webview cache.\");\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)\n\t\t{\n\t\t\tCookieManager.getInstance().removeAllCookies(null);\n\t\t\tCookieManager.getInstance().removeSessionCookies(null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCookieSyncManager.createInstance(Application.provider().context());\n\t\t\tCookieManager.getInstance().removeAllCookie();\n\t\t\tCookieManager.getInstance().removeSessionCookie();\n\t\t}\n\n\t\tApplication.provider().context().deleteDatabase(\"webview.db\");\n\t\tApplication.provider().context().deleteDatabase(\"webviewCookiesChromium.db.db\");\n\t}",
"public void reset() {\n\t\tfor (Entry<TileCoordinate, DijkstraNode> entry: this.cache.entrySet()) {\n\t\t\tentry.getValue().reset();\n\t\t}\n\t}",
"void clearDocCache(){\n docMainCache.invalidateAll();\n docOptionalCache.invalidateAll();\n docListCache.invalidateAll();\n }",
"private void m50956b() {\n if (!C8626b.m50749b() && !C8626b.m50748a()) {\n try {\n File file = new File(this.f36887b.getExternalFilesDir(null) + \"/.logcache\");\n if (file.exists() && file.isDirectory()) {\n for (File file2 : file.listFiles()) {\n file2.delete();\n }\n }\n } catch (NullPointerException unused) {\n }\n }\n }",
"public void clearSessionCache() {\n ofy().clear();\n }",
"private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}",
"public void flushCaches() {\n LOCAL_SMALL_CACHE.clear();\n LOCAL_LARGE_CACHE.clear();\n }",
"public void cleanCaches() {\n WorkspaceConfig workspace = mvc.model.getWorkspace();\n Set<String> used = new HashSet<>();\n // Get list of queries used by graphs\n for (GraphConfig graph : workspace.graphs) {\n graph.accept(new GraphVisitor() {\n\n @Override\n public void visit(HistogramConfig graph) {\n try {\n used.add(DatabaseQueryFactory.generateSQL(graph.query));\n } catch (Exception e) {\n // just do nothing if it's broken\n }\n }\n\n @Override\n public void visit(LineGraphConfig graph) {\n for (LineConfig line : graph.lines) {\n try {\n used.add(DatabaseQueryFactory.generateSQL(line.query));\n } catch (Exception e) {\n // just do nothing if it's broken\n }\n }\n }\n });\n }\n // Get list of queries used by statistics\n for (StatisticConfig statistic : workspace.statistics) {\n for (Metric metric : Metric.getStatisticTypes()) {\n statistic.query.metric = metric;\n try {\n used.add(DatabaseQueryFactory.generateSQL(statistic.query));\n } catch (Exception e) {\n // just do nothing if it's broken\n }\n }\n statistic.query.metric = null;\n }\n\n // Remove any cache that is not used\n Iterator<String> itrCaches = workspace.caches.keySet().iterator();\n while (itrCaches.hasNext()) {\n String cache = itrCaches.next();\n if (!used.contains(cache)) {\n itrCaches.remove();\n }\n }\n }",
"public static void clearUnSatsCache(){\n\n unsats = getUnSats();\n unsats.clear();\n }",
"private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }",
"public static void clear() {\n SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance();\n sharedPref.clearWeiboPref();\n }",
"@PreDestroy\n\tpublic void destroy() {\n\t cacheTree.destroy();\n\t}"
] | [
"0.73112977",
"0.7094024",
"0.7094024",
"0.70761114",
"0.7075003",
"0.70726776",
"0.7025769",
"0.69980305",
"0.69532233",
"0.69313097",
"0.691149",
"0.6899368",
"0.6873358",
"0.68062705",
"0.67967457",
"0.67708796",
"0.67598593",
"0.6759814",
"0.66987324",
"0.6683162",
"0.66749084",
"0.6673929",
"0.66648614",
"0.66581666",
"0.6643452",
"0.6637649",
"0.6625898",
"0.66226935",
"0.6620223",
"0.66088593",
"0.65887547",
"0.6581561",
"0.65769917",
"0.6576562",
"0.65762776",
"0.6546931",
"0.65456605",
"0.65318626",
"0.65269744",
"0.65210557",
"0.651163",
"0.6498424",
"0.6488171",
"0.64862585",
"0.64823365",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.6479406",
"0.64604014",
"0.64587307",
"0.6444524",
"0.6443517",
"0.6439488",
"0.6437303",
"0.643186",
"0.6423748",
"0.642123",
"0.63998234",
"0.6361388",
"0.63419354",
"0.634101",
"0.6334872",
"0.6334292",
"0.6327609",
"0.6327213",
"0.6325886",
"0.63258517",
"0.63146365",
"0.6304908",
"0.6304908",
"0.6304908",
"0.63046837",
"0.6301287",
"0.6286619",
"0.627915",
"0.62759185",
"0.6274271",
"0.6272122",
"0.62711835",
"0.6244082",
"0.6242032",
"0.62401414",
"0.6227887"
] | 0.84272623 | 0 |
get token key value | public String getTokenKey()
{
return TOKEN_KEY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTokenValue() { return tok; }",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"private int tokenVal()\n\t{\n\t\t//check that token is keyword or special\n\t\tif( core.containsKey(token))\t\t\t\n\t\t{ \n\t\t\t//return the value\n\t\t\treturn core.get(token); \n\t\t}\n\t\telse\n\t\t{\n\t\t\t try{ //see if token is integer\n\t\t\t\t Integer.parseInt(token);\n\t\t\t return INTEGER;\n\t\t\t }\n\t\t\t catch(NumberFormatException e){\n\t\t\t \t //token must be an identifier\n\t\t\t \t return IDENTIFIER;\t \n\t\t\t }\n\t\t}\t\n\t}",
"public String getToken();",
"public String getToken() {\r\n return token;\r\n }",
"public String getToken() {\r\n return token;\r\n }",
"public String getToken() {\n return token.get();\n }",
"public String getToken() {\n return this.token;\n }",
"public java.lang.String getToken(){\r\n return localToken;\r\n }",
"public static String getToken() {\n \treturn mToken;\n }",
"public String getToken()\n {\n return token;\n }",
"public T getToken() {\n return this.token;\n }",
"public String getToken() {\n return this.token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public java.lang.String getToken(){\n return localToken;\n }",
"public String getToken() {\n return this.token;\n }",
"public String getToken() {\n\t\treturn token;\n\t}",
"public String getToken() {\n\t\treturn token;\n\t}",
"public String token() {\n return this.token;\n }",
"String getTokenString();",
"@Override\n\tpublic Token getToken() {\n\t\treturn this.token;\n\t\t\n\t}",
"public String getToken() {\n\n return this.token;\n }",
"public String getToken() {\n return token_;\n }",
"public String getToken() {\n return token_;\n }",
"public String getToken() {\n return token_;\n }",
"public Token getToken() {\n return token;\n }",
"private String getTokenName(int token) {\n try {\n java.lang.reflect.Field [] classFields = sym.class.getFields();\n for (int i = 0; i < classFields.length; i++) {\n if (classFields[i].getInt(null) == token) {\n return classFields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }",
"private String getTokenName(int token) {\n try {\n java.lang.reflect.Field [] classFields = sym.class.getFields();\n for (int i = 0; i < classFields.length; i++) {\n if (classFields[i].getInt(null) == token) {\n return classFields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }",
"private String getTokenName(int token) {\n try {\n java.lang.reflect.Field [] classFields = sym.class.getFields();\n for (int i = 0; i < classFields.length; i++) {\n if (classFields[i].getInt(null) == token) {\n return classFields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }",
"Map<String, String> getTokens();",
"public String getToken() {\n return instance.getToken();\n }",
"public String getToken() {\n return instance.getToken();\n }",
"public String getToken() {\n return instance.getToken();\n }",
"public int getToken() {\n\t\t//previous token remembered?\n\t\tif (token != null)\n\t\t{\t\n\t\t\treturn tokenVal(); \n\t\t}\n\t\telse //need a new token.\n\t\t{\n\t\t\t//get position of next token\n\t\t\tint tokenStart = findTokenStart();\n\t\t\t//remove leading whitespace\n\t\t\tline = line.substring(tokenStart);\n\t\t\t//create char[] representation of line\n\t\t\tchar[] characters = line.toCharArray();\n\t\t\t//get type of token\n\t\t\ttType = getType(characters[0]);\n\t\t\tif (Objects.equals(tType, \"lowercase\"))\n\t\t\t{\n\t\t\t\ttoken = getLowerToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"uppercase\"))\n\t\t\t{\n\t\t\t\ttoken = getIdentifierToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"int\"))\n\t\t\t{\n\t\t\t\ttoken = getIntToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"special\"))\n\t\t\t{\n\t\t\t\ttoken = getSpecialToken(characters);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error this should not be seen\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t//token was found ok.\n\t\t\treturn tokenVal();\n\t\t}\n\t}",
"public Token getToken() {\n\t\treturn token;\n\t}",
"public Token getToken() {\n\t\treturn token;\n\t}",
"public Token getToken() {\n\t\treturn token;\n\t}",
"public Token getToken() {\r\n\t\treturn this.token;\r\n\t}",
"private String getTokenValue(final Specimen objSpecimen, String token)\r\n\t\t\tthrows NameGeneratorException\r\n\t{\r\n//\t\tif(\"SYS_UID\".equals(token))\r\n//\t\t{\r\n//\t\t\tcurrentLabel = currentLabel+1;\r\n//\t\t}\r\n\t\tString mylable = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tmylable = TokenFactory.getInstance(token).getTokenValue(objSpecimen);\r\n\r\n\t\t}\r\n\t\tcatch(TokenNotFoundException exp)\r\n\t\t{\r\n\t\t\tmylable = token;\r\n\t\t}\r\n\t\tcatch(ApplicationException excep)\r\n\t\t{\r\n\t\t\tthrow new NameGeneratorException(excep.getMsgValues());\r\n\t\t}\r\n\t\tif (mylable == null)\r\n\t\t{\r\n\t\t\tmylable = \"\";\r\n\t\t}\r\n\t\treturn mylable;\r\n\t}",
"public Token getToken() {\r\n return _token;\r\n }",
"public String getStringToken()\n\t{\n\t\tgetToken();\n\t\treturn token;\n\t}",
"@Nonnull\n public final String getToken() {\n return this.token;\n }",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"GetToken.Res getGetTokenRes();",
"public Token getToken() {\n return this.token;\n }",
"public String token() {\n return Codegen.stringProp(\"token\").config(config).require();\n }",
"public Token getToken(){\n if(currentToken == -1) return null;\n return tokens.get(currentToken);\n }",
"public String getToken(int index) {\n\t\treturn this.tokenList.get(index);\n\t}",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"@Override\n\tpublic String getValue() {\n\t\treturn this.token.getActualTextValue() ;\n\t}",
"public Token getToken(int index){\n return tokens.get(index);\n }",
"public int getToken_num() {\n return this.token_num;\n }",
"@Override\n\tprotected String getEvaluableToken() {\n\t\treturn TOKEN;\n\t}",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"Object getKey();",
"public DsByteString getToken() {\n return sToken;\n }",
"@java.lang.Override\n public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }",
"@Override\n protected String getEvaluableToken() {\n return TOKEN;\n }",
"public String getSecurityToken()\r\n {\r\n return getAttribute(\"token\");\r\n }",
"public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }"
] | [
"0.7574984",
"0.72500485",
"0.72500485",
"0.72500485",
"0.72500485",
"0.72500485",
"0.72500485",
"0.7189271",
"0.7189271",
"0.7189271",
"0.7189271",
"0.7189271",
"0.70732564",
"0.6977172",
"0.69244665",
"0.69244665",
"0.6873361",
"0.68710625",
"0.6857343",
"0.6831453",
"0.6824231",
"0.6777689",
"0.67758816",
"0.6757668",
"0.6757668",
"0.6757668",
"0.6757668",
"0.6757668",
"0.6743438",
"0.67377967",
"0.6725084",
"0.6725084",
"0.67229706",
"0.6676271",
"0.6591947",
"0.65791243",
"0.65461767",
"0.65461767",
"0.65461767",
"0.65131974",
"0.65092033",
"0.65092033",
"0.65092033",
"0.65078914",
"0.648119",
"0.648119",
"0.648119",
"0.6476282",
"0.64750594",
"0.64750594",
"0.64750594",
"0.6474977",
"0.6460725",
"0.644747",
"0.64313334",
"0.6400396",
"0.6393214",
"0.6393214",
"0.6393214",
"0.6393214",
"0.6393214",
"0.6393214",
"0.6393214",
"0.6393214",
"0.6393214",
"0.6393214",
"0.638102",
"0.6377831",
"0.6371186",
"0.6357823",
"0.6355556",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.63243824",
"0.6260626",
"0.62050945",
"0.6204659",
"0.61940116",
"0.61905974",
"0.61905974",
"0.61905974",
"0.61905974",
"0.61905974",
"0.61905974",
"0.6182625",
"0.6176806",
"0.61737114",
"0.6171425",
"0.6153434",
"0.6139258"
] | 0.7303977 | 1 |
Fonction permettant d'afficher le compteur cpt | public void affiche() {
System.out.println("Valeur: " + cpt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void updateCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}",
"@Override\n\tpublic void createCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}",
"@Override\n\tpublic void updateCpteCourant(CompteCourant cpt) {\n\t\t\n\t}",
"@Override\r\n\tpublic Compte consulterCompte(String codeCpte) {\n\t\treturn dao.consulterCompte(codeCpte);\r\n\t}",
"public void comportement() {\n\t\tif (compteurPas > 0) {\n seDeplacer(deplacementEnCours);\n compteurPas--;\n\n // sinon charge le prochain deplacement\n\t\t} else {\n\t\t // recalcul le chemin si la cible a bouge\n boolean cibleBouger = calculPosCible();\n if (cibleBouger)\n calculerChemin();\n\n if (suiteDeDeplacement.size() > 0) {\n deplacementEnCours = suiteDeDeplacement.pollFirst();\n compteurPas = Case.TAILLE / vitesse;\n // pour le sprite\n if (deplacementEnCours == 'E')\n direction = true;\n else if (deplacementEnCours == 'O')\n direction = false;\n }\n }\n\t\tattaque = attaquer();\n\t}",
"@Override\n\tpublic void createCpteCourant(CompteCourant cpt) {\n\t\t\n\t}",
"@Override\n\tpublic void readCpteCourant(CompteCourant cpt) {\n\t\t\n\t}",
"@Override\n\tpublic void readCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}",
"public static void afficherCatalogueComplet() {\r\n Catalogue.afficher();\r\n System.out.println();\r\n }",
"public Compte getCompte() {\n\t\treturn compte;\n\t}",
"public void afficher (UneCommande22<Integer> cde){ //POURQUOI CETTE MÉTHODE EST STATIQUE??? LA DEPLACER PE DANS COMMANDE\n\t\t\t\tif(cde.taille()==0) {ClientJava1DateUser.affiche(\"\\n\\t\\t COMMANDE EST VIDE\");\n\t\t\t\t}\n\t\t\t\telse {ClientJava1DateUser.affiche(cde.toString());}\t\n\t\t\t}",
"java.lang.String getCit();",
"@Override // Métodos que fazem a anulação\n\tpublic String getCPF() {\n\t\treturn null;\n\t}",
"public void verComprobante() {\r\n if (tab_tabla1.getValorSeleccionado() != null) {\r\n if (!tab_tabla1.isFilaInsertada()) {\r\n Map parametros = new HashMap();\r\n parametros.put(\"ide_cnccc\", Long.parseLong(tab_tabla1.getValorSeleccionado()));\r\n parametros.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n parametros.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n vpdf_ver.setVisualizarPDF(\"rep_contabilidad/rep_comprobante_contabilidad.jasper\", parametros);\r\n vpdf_ver.dibujar();\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Debe guardar el comprobante\", \"\");\r\n }\r\n\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No hay ningun comprobante seleccionado\", \"\");\r\n }\r\n }",
"public String getCpe() {\n return cpe;\n }",
"@Override\r\n\tpublic void retirer(double mt, String cpte, Long codeEmp) {\n\t dao.addOperation(new Retrait(new Date(),mt), cpte, codeEmp);\r\n\t Compte cp=dao.consulterCompte(cpte);\r\n\t cp.setSolde(cp.getSolde()-mt);\r\n\r\n\t}",
"public String getCpf() {\n return cpf;\n }",
"@Override\n\t\tpublic void visitPreDecompose(OntClass c) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void visitPreDecompose(OntClass c) {\n\t\t\t\n\t\t}",
"public void createCompte(Compte compte);",
"public void obtener_proximo_cpte(){\n\t\t_Data data=(_Data) _data;\n\t\tString cb=data.getProximoPGCorrecto();\n\t\t//Pago_frame _frame=(Pago_frame) this._frame;\n\t\tframe.get_txt_idPago().setText(cb);\n\t}",
"private void remplirPriseEnCompte() {\r\n\t\tResultSet result = ctn.lectureData(\"SELECT * FROM PriseEnCompte\");\r\n\t\t// Remplissage tableau et combo Utilisateur\r\n\t\ttry {\r\n\t\t\twhile(result.next()) {\r\n\t\t\t\ttbPriseEnCompte.add(new StructPriseEnCompte(result.getLong(\"idPriseEnCompte\"), result.getString(\"Nom\"), result.getString(\"Description\")));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tctn.closeLectureData();\r\n\t\ttry {\r\n\t\t\tresult.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }",
"public void reversarComprobanteContabilidad() {\r\n String ide_cnccc = ser_comprobante.reversarComprobante(tab_tabla1.getValorSeleccionado(), null);\r\n if (guardarPantalla().isEmpty()) {\r\n utilitario.agregarMensaje(\"Se genero el Comprobante Num: \", ide_cnccc);\r\n }\r\n }",
"Object getComparefile();",
"@Override\n\tpublic void deleteCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}",
"boolean contemProfessor(String cpf);",
"@Override\r\n\tpublic Compte addCompte(Compte cp, Long codeCli, Long codeEmp) {\n\t\treturn dao.addCompte(cp, codeCli, codeEmp);\r\n\t}",
"public String getMotEnCours() {\n\t\treturn null;\n\t}",
"public void setComposicion(String newComposicion) {\n\t\tthis.composicion = newComposicion;\n\t}",
"public String getNomComplet() {\r\n\t\treturn nomComplet;\r\n\t}",
"public void copiarComprobanteContabilidad() {\r\n if (!tab_tabla1.isFilaInsertada()) {\r\n TablaGenerica tab_cabecera = ser_comprobante.getCabeceraComprobante(tab_tabla1.getValorSeleccionado());\r\n TablaGenerica tab_detalle = ser_comprobante.getDetallesComprobante(tab_tabla1.getValorSeleccionado());\r\n tab_tabla1.insertar();\r\n tab_tabla1.setValor(\"IDE_MODU\", tab_cabecera.getValor(\"IDE_MODU\"));\r\n tab_tabla1.setValor(\"IDE_GEPER\", tab_cabecera.getValor(\"IDE_GEPER\"));\r\n tab_tabla1.setValor(\"OBSERVACION_CNCCC\", tab_cabecera.getValor(\"OBSERVACION_CNCCC\"));\r\n tab_tabla1.setValor(\"ide_cntcm\", tab_cabecera.getValor(\"ide_cntcm\"));\r\n for (int i = 0; i < tab_detalle.getTotalFilas(); i++) {\r\n tab_tabla2.insertar();\r\n tab_tabla2.setValor(\"IDE_CNLAP\", tab_detalle.getValor(i, \"IDE_CNLAP\"));\r\n tab_tabla2.setValor(\"IDE_CNDPC\", tab_detalle.getValor(i, \"IDE_CNDPC\"));\r\n tab_tabla2.setValor(\"VALOR_CNDCC\", tab_detalle.getValor(i, \"VALOR_CNDCC\"));\r\n tab_tabla2.setValor(\"OBSERVACION_CNDCC\", tab_detalle.getValor(i, \"OBSERVACION_CNDCC\"));\r\n }\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No se puede copiar el comprobante de contabilidad\", \"El comprobante seleccionado no se encuentra grabado\");\r\n }\r\n }",
"public void filtroCedula(String pCedula){\n \n }",
"public void seleccionarTipoComprobante() {\r\n if (com_tipo_comprobante.getValue() != null) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n } else {\r\n tab_tabla1.limpiar();\r\n tab_tabla2.limpiar();\r\n }\r\n tex_num_transaccion.setValue(null);\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales,tex_num_transaccion\");\r\n }",
"@Override\n\tpublic void deleteCpteCourant(CompteCourant cpt) {\n\t\t\n\t}",
"public String getCPF() {\n return this.CPF;\n }",
"public ControladorCombate(int tipo_simulacion,\r\n Entrenador entrenador1, Entrenador entrenador2, ControladorPrincipal cp){\r\n this.esLider = false;\r\n this.controlador_principal = cp;\r\n this.tipo_simulacion = tipo_simulacion;\r\n this.combate = new Combate();\r\n this.equipo1 = entrenador1.getPokemones();\r\n this.equipo2 = entrenador2.getPokemones();\r\n this.entrenador1 = entrenador1;\r\n this.entrenador2 = entrenador2;\r\n this.vc = new VistaCombate();\r\n this.va = new VistaAtaque();\r\n this.ve = new VistaEquipo();\r\n this.creg = new ControladorRegistros();\r\n String[] nombres1 = new String[6];\r\n String[] nombres2 = new String[6];\r\n for (int i = 0; i < 6; i++) {\r\n nombres1[i]=equipo1[i].getPseudonimo();\r\n nombres2[i]=equipo2[i].getPseudonimo(); \r\n }\r\n this.vpc = new VistaPreviaCombate(tipo_simulacion, entrenador1.getNombre(), entrenador2.getNombre());\r\n this.vpc.agregarListener(this);\r\n this.vpc.setjC_Equipo1(nombres1);\r\n this.vpc.setjC_Equipo2(nombres2);\r\n this.vpc.setVisible(true);\r\n this.termino = false;\r\n resetearEntrenadores();\r\n }",
"@Override\n\tpublic String parler() {\n\t\treturn \"Je suis un Orc\";\n\t}",
"public Object consultaCpf(String cpf, String vestinfo);",
"@Override\n public Coup getCoup(Partie p) {\n List<Coup> coups = p.getTousCoups();\n List<Coup> attaques = new ArrayList();\n for (Coup c : coups) {\n// System.out.println(\"Appliquer coup = \" + c.toString());\n// Partie cloneP = p.clone();\n// cloneP.appliquerCoup(c);\n// System.out.println(p + \" et \" + cloneP);\n// System.out.println(\"Original =\\n\"+p.getJoueurActuel().getEquipe().toString());\n// System.out.println(\"Clone = \\n\"+cloneP.getJoueurActuel().getEquipe().toString());\n if (contientAttaque(c)) {\n// System.out.println(Thread.currentThread().getName() + \": \" + \"Coup possible : \" + c.toString());\n attaques.add(c);\n }\n }\n Coup resultat;\n if (attaques.isEmpty()) {\n resultat = coups.get((int) (Math.random() * (coups.size() - 1)));\n } else {\n resultat = attaques.get((int) (Math.random() * (attaques.size() - 1)));\n }\n// System.out.println(Thread.currentThread().getName() + \": \" + \"Coup calcule = \" + resultat.toString());\n return resultat;\n }",
"@Override\r\n\tpublic void verser(double mt, String cpte, Long codeEmp) {\n dao.addOperation(new Versement(new Date(),mt), cpte, codeEmp);\r\n Compte cp=dao.consulterCompte(cpte);\r\n cp.setSolde(cp.getSolde()+mt);\r\n\t}",
"public void modificarCompraComic();",
"public List<String> verCarrito(){\n\t\treturn this.compras;\n\t}",
"public ComponenteCosto getComponenteCosto()\r\n/* 68: */ {\r\n/* 69: 91 */ return this.componenteCosto;\r\n/* 70: */ }",
"@java.lang.Override\n public int getCp() {\n return cp_;\n }",
"public void affichage() {\n if (blanc){\n System.out.print(\"Cb\");\n }\n else{\n System.out.print(\"Cn\");\n }\t\t\n }",
"public void affiche () {\r\n\t\tSystem.out.println(\"Nom du porteur du compte: \" + this.porteur);\r\n\t\tSystem.out.println(\"numéro du compte: \" + this.IBAN);\r\n\t\tSystem.out.println(\"Solde du compte: \" + this.solde);\r\n\t}",
"public void estableceEquipoComputo() {\n\tsetDispositivo(JOptionPane.showInputDialog(\"Ingrese el nombre del dispositivo a adquirir\"));\n\tsetComercio(JOptionPane.showInputDialog(\"Ingrese el nombre del comercio donde lo comprara\"));\n}",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"public void addCompte(Compte x) {//je mets la methode dajout ici\n\t compte.add(x);\n\t }",
"public ConsumoViaCep() {\n initComponents();\n }",
"private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }",
"Compleja createCompleja();",
"public String afficherInfoFichierTexte(){\n\t\tString fichierComplet = \"\";\n\t\tfor (Joueur j: ListJoueur) {\n\t\t\tfichierComplet += j.afficherFichierTexte();\n\t\t}\n\t\treturn fichierComplet;\n\t}",
"int getCp();",
"int getCp();",
"public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Catalogo_causalLocal getCatalogo_causal();",
"public void setCpe(String cpe) {\n this.cpe = cpe;\n }",
"public Professeur(String nom, int cmVolume, int tdVolume, int tpVolume, int CCVolume, int ETVolume) {\n\n this.nom = nom;\n repartition = new VolumeHorraire(cmVolume, tdVolume, tpVolume, CCVolume, ETVolume);\n }",
"private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}",
"@java.lang.Override\n public int getCp() {\n return cp_;\n }",
"public void setCuentaContableCierre(CuentaContable cuentaContableCierre)\r\n/* 103: */ {\r\n/* 104:119 */ this.cuentaContableCierre = cuentaContableCierre;\r\n/* 105: */ }",
"public String etatParcelle(Parcelle p) {\n\t\tString etat=\"\"; \n//\t\tSystem.out.println(\"-------- Etat parcelle \"+p.getLibelleParcelle());\n\n\t\tif(p.getDateRetraitParcelle()!=null){\n//\t\t\tSystem.out.println(\"-------- Etat Parcelle (RED) dateRetrait : \"+p.getDateRetraitParcelle());\n\t\t\tetat = \"red\";\n\t\t}else if (notHaveTachePlanified(p).equals(\"true\")) {\n//\t\t\tSystem.out.println(\"-------- Etat parcelle GREEN \");\n\n\t\t\tetat = \"green\";\n\t\t}else {\n//\t\t\tSystem.out.println(\"-------- Etat parcelle ORANGE \");\n\n\t\t\tetat = \"orange\";\n\t\t}\n\t\treturn etat;\n\t}",
"private void facturer(UneCommande22<Integer> cde, TableArticle22 tabArt) { //Une commande\n\t\t\t\tif(cde.taille()==0){\n\t\t\t\t\tClientJava1DateUser.affiche(\"\\n\\t COMMANDE EST VIDE\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tClientJava1DateUser.affiche(cde.facturer(tabArt)); // Affiche ligne de commande\n\t\t\t\t}\t\n\t\t\t}",
"public void actualiserAffichage();",
"@Override\r\n\t/**\r\n\t * Actionne l'effet de la carte.\r\n\t * \r\n\t * @param listejoueur\r\n\t * \t\t\tLa liste des joueurs de la partie.\r\n\t * @param cible\r\n\t * \t\t\tLa joueur contre qui l'effet sera joué.\r\n\t * @param table\r\n\t * \t\t\tCollection de cartes situées au centre de la table de jeu.\r\n\t * @param carte\r\n\t * \t\t\tLa carte qui joue l'effet.\r\n\t * @param j\r\n\t * \t\t\tLe joueur qui joue la carte.\r\n\t * @param collection\r\n\t * \t\t\tLe deck de cartes.\r\n\t * @param tourjoueur\r\n\t * \t\t\tLa liste des joueurs selon l'ordre de jeu.\r\n\t */\r\n\tpublic void utiliserEffet(ArrayList<Joueur> listejoueur, int cible, ArrayList<Carte> table, Carte carte,\r\n\t\t\tint j, ArrayList<Carte> collection,ArrayList<Joueur> tourjoueur) {\n\t\tcont = Controller.getInstance();\r\n\t\tint id = carte.getIdentifiantCarte();\r\n\t\tif (id ==9 || id ==10 || id==22 || id==23){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un croyant\");\r\n\t\t\t\t\r\n\t\t\t\tcont.setChoisirCible(true);\r\n\t\t\t\t\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\t\t\r\n\t\t\t\tif (listejoueur.get(cont.getChoixCible()).getNombreCroyantTotal()>0){\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierCroyant(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" n'a aucun croyant a sacrifier \");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\tif (listejoueur.get(joueurCible).getNombreCroyantTotal()>0){\r\n\t\t\t\t\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierCroyant(true);\r\n\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun croyant à sacrifier\");\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( id==11){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un guide\");\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\t\r\n\t\t\t\tif(listejoueur.get(cont.getChoixCible()).getGuidePossede().size()>0){\r\n\t\t\t\t\tfor (int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor(int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierGuide(true);\r\n\t\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\tif (listejoueur.get(joueurCible).getGuidePossede().size()>0){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).setSelectionnee(true); // On rend possible l'utilisation de la carte\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierGuide(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"public void recevoir(IPorcelet p);",
"public void affichageLabyrinthe () {\n\t\t//Affiche le nombre de coups actuel sur la console et sur la fenetre graphique\n\t\tSystem.out.println(\"Nombre de coups : \" + this.laby.getNbCoups() + \"\\n\");\t\t\n\t\tthis.enTete.setText(\"Nombre de coups : \" + this.laby.getNbCoups());\n\n\t\t//Affichage dans la fenêtre et dans la console du labyrinthe case par case, et quand la case est celle ou se trouve le mineur, affiche ce dernier\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tString ligne = new String();\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (i != this.laby.getMineur().getY() || j != this.laby.getMineur().getX()) {\n\t\t\t\t\tligne = ligne + this.laby.getLabyrinthe()[i][j].graphismeCase();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j]=new Case();\n\t\t\t\t\tligne = ligne + this.laby.getMineur().graphismeMineur();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif (grille.getComponentCount() < this.laby.getLargeur()*this.laby.getHauteur()) {\n\t\t\t\t\tgrille.add(new JLabel());\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ligne);\n\t\t}\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getMineur().imageCase(themeJeu));\n\t}",
"protected String decrisToi(){\r\n return \"\\t\"+this.nomVille+\" est une ville de \"+this.nomPays+ \", elle comporte : \"+this.nbreHabitants+\" habitant(s) => elle est donc de catégorie : \"+this.categorie;\r\n }",
"protected Double getCAProfessionnel() {\n List<Facture> facturesProfessionnel = this.factureProfessionnelList;\n Double ca = 0.0; \n for(Facture f : facturesProfessionnel )\n ca = ca + f.getTotalHT();\n \n return ca ; \n \n }",
"public boolean cp() {\n return false;\n }",
"public Complemento getC() {\n return C;\n }",
"public webservice.hospindex.ProductPRDCPT[] getCPT() {\n return CPT;\n }",
"@Override\n\tpublic void ccc() {\n\t\t\n\t}",
"public void afficher() {\n\t\tfor(int i=0;i<this.taille;i++) {\n\t\t\tfor (int j=0;j<this.taille;j++) {\n\t\t\t\tSystem.out.print(grille.get(i).get(j).getTypeOccupation()+\"\");\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}\n\t}",
"@Override\n public void afficher() {\n super.afficher();\n System.out.println(\"Sexe : \" + getSexe());\n System.out.println(\"Numéro de sécurité sociale : \" + getNumeroSecuriteSociale());\n System.out.println(\"Date de naissance : \" + getDateDeNaissance().format(DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG)));\n System.out.println(\"Commentaires : \" + getCommentaires());\n this.adresse.afficher();\n }",
"@Override\n\tpublic String getCouleur() {\n\t\treturn null;\n\t}",
"Activite getActiviteCourante();",
"public void mostrarCompra() {\n }",
"public Controlador(JTextField tfMinutos,JTextField tfKgs, JComboBox cbEjercicios,JLabel laKCalResult) {\n\t\tcoleccionEj = new TiposEjercicios();\n\t\tthis.tfMinutos = tfMinutos;\n\t\tthis.tfKgs = tfKgs;\n\t\tthis.cbEjercicios = cbEjercicios;\n\t\tthis.laKCalResult = laKCalResult;\n\t\t\n\t}",
"public void ajouterCompte(Compte unCompte) {\n\t\tthis.comptes.add(unCompte);\n\t}",
"String getCmt();",
"@Override\n\tpublic String getSolution() {\n\t\treturn \"Ajouter des composants au circuit\";\n\t}",
"public String getCitta() {\n return citta;\n }",
"@Override\r\n\tpublic List<Famille> listCompetences() {\n\t\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n \t\tsession.beginTransaction();\r\n \t\t//on crée une requête\r\n \t\tQuery req=session.createQuery(\"select C from FamilleComp C\");\r\n \t\tList<Famille> famillecomp=req.list();\r\n session.getTransaction().commit();\r\n \t\treturn famillecomp;\r\n\t\t\r\n\t}",
"public void realiserAcahatProduit() {\n\t\t\n\t}",
"public abstract String getTemplCd();",
"public String tipoConta() {\n return \"Conta Comum\";\n }",
"private void carga_tabla_comprobante(JTable tbl_comprobante,String opc) {\n DefaultTableModel model =new DefaultTableModel();\n tbl_comprobante.setModel(model);\n model.addColumn(\"Tipo Trans\");\n model.addColumn(\"Sub Tipo Trans\");\n model.addColumn(\"Tipo Comp\");\n model.addColumn(\"Serie Comp\");\n model.addColumn(\"Nro Comp\");\n model.addColumn(\"Total Comprobante\");\n int[] anchos = {70,100,100,100,100,150};\n for (int i = 0; i < vistaForma_Pag.tbl_comprobante.getColumnCount(); i++) {\n vistaForma_Pag.tbl_comprobante.getColumnModel().getColumn(i).setPreferredWidth(anchos[i]);\n }\n }",
"public String getCompoId() {\n\t return compoId;\r\n\t }",
"public PrecioTotal1(Computador[] pPCs){\n computadores = pPCs;\n }",
"public void actualisePrixDeVente(){\n\t\tArrayList<Catalogue> lis = new ArrayList<Catalogue>();\n\t\tfor (ITransformateur t : this.getTransfos()) {\n\t\t\tlis.add(t.getCatalogue());\n\t\t}\n\t\tthis.setCatalogues(lis);\n\t\tthis.setPrixDeVente();\n\t}",
"public String toString()\n {\n String textoADevolver = \"\";\n if (tareaCompletada)\n {\n textoADevolver += \"HECHA \";\n }\n textoADevolver += descripcion + \" (\" +prioridad+ \").\";\n return textoADevolver;\n }",
"@Override\r\n\tpublic List<ProduitCouleurValue> ListeProduitCouleur(Long pIdProduit) {\n\t\treturn produitCouleurDomaine.ListeProduitCouleur(pIdProduit);\r\n\t}",
"void setCit(java.lang.String cit);",
"@Override\n public Boolean colisionoCon(Policia gr) {\n return true;\n }",
"public void listeDesEmpruntsEnCours();",
"public void compare(ProjetBDD p){\n\t\tdoCorrespondance(p);\n\t\t//on compare les diagrammes en commun\n\t\tfor (int i = 0; i < p.getDiagrammes().size(); i++) {\n\t\t\tdiagrammes.get(i).compareTo(p.getDiagrammes().get(correspondance[i]));\n\t\t}\n\t\t//Si la list1 est la liste de départ et plus longue alors on met les restants dans un état supprimé\n\t\tif (diagrammes.size() > p.getDiagrammes().size()) {\n\t\t\tfor (int i = p.getDiagrammes().size(); i < diagrammes.size(); i++)\n\t\t\t\tdiagrammes.get(i).setEtat(DiagrammeObjets.SUPPR);\n\t\t}\n\t\t//Si la list1 est la liste de départ et plus courte alors on met les restants dans un état ajouté\n\t\telse if (diagrammes.size() > p.getDiagrammes().size()) {\n\t\t\tfor (int i = p.getDiagrammes().size(); i < diagrammes.size(); i++)\n\t\t\t\tdiagrammes.get(i).setEtat(DiagrammeObjets.ADD);\n\t\t}\n\t\telse if (diagrammes.size() == p.getDiagrammes().size()){}\n\t\t//Ne rien faire\n\t\telse\n\t\t\tSystem.out.println(\"ERROR (Comparateur - compare())\");\n\t\twriteDiff();\t\n\t}",
"@Override\r\n\tpublic String obtenerDescripcion() {\n\t\treturn this.combo.obtenerDescripcion() + \"+ Porcion de Carne\";\r\n\t}",
"public String recuperaCultivoByVariedadAsigCA(){\n\t\tlstVariedad = iDAO.recuperaVariedadByInicilizacionEsquema(idInicializacionEsquema, idCultivo);\n\t\treturn SUCCESS;\t\t\n\t}"
] | [
"0.66625786",
"0.6505425",
"0.6409463",
"0.63025314",
"0.6269032",
"0.61679375",
"0.61093175",
"0.6104006",
"0.6059371",
"0.5826131",
"0.57787865",
"0.57382375",
"0.5728531",
"0.5715686",
"0.57144845",
"0.5700959",
"0.56734294",
"0.56724083",
"0.56724083",
"0.5627657",
"0.5606539",
"0.5605848",
"0.5584544",
"0.5576454",
"0.5563757",
"0.5559166",
"0.552548",
"0.55145884",
"0.548129",
"0.54807687",
"0.54307383",
"0.5424131",
"0.54088974",
"0.53926307",
"0.53870994",
"0.5385481",
"0.53854406",
"0.5376919",
"0.5371586",
"0.53635645",
"0.53616154",
"0.5335752",
"0.5326469",
"0.5313571",
"0.53101504",
"0.53092706",
"0.5304787",
"0.5304572",
"0.529907",
"0.5296671",
"0.5294224",
"0.52728033",
"0.5270834",
"0.52705353",
"0.52669394",
"0.52669394",
"0.52653617",
"0.5260055",
"0.52591175",
"0.5252354",
"0.52427727",
"0.52355003",
"0.5228545",
"0.5225963",
"0.52246624",
"0.522223",
"0.5221374",
"0.52026975",
"0.5197973",
"0.5197336",
"0.51926434",
"0.5191624",
"0.5187609",
"0.51830775",
"0.5178972",
"0.51568437",
"0.5145916",
"0.5145458",
"0.51451635",
"0.514064",
"0.51384556",
"0.51347077",
"0.51314753",
"0.51296926",
"0.51178163",
"0.5116027",
"0.5112095",
"0.5111098",
"0.5103678",
"0.5099533",
"0.50993705",
"0.50966376",
"0.5096344",
"0.5093818",
"0.50909734",
"0.50869626",
"0.50817215",
"0.5080121",
"0.5067895",
"0.50638586"
] | 0.6928267 | 0 |
Fonction permettant de retourner le compteur | public int lireCount() {
return cpt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reversarComprobanteContabilidad() {\r\n String ide_cnccc = ser_comprobante.reversarComprobante(tab_tabla1.getValorSeleccionado(), null);\r\n if (guardarPantalla().isEmpty()) {\r\n utilitario.agregarMensaje(\"Se genero el Comprobante Num: \", ide_cnccc);\r\n }\r\n }",
"@Override\n\tpublic void recreo() {\n\n\t}",
"public void comportement() {\n\t\tif (compteurPas > 0) {\n seDeplacer(deplacementEnCours);\n compteurPas--;\n\n // sinon charge le prochain deplacement\n\t\t} else {\n\t\t // recalcul le chemin si la cible a bouge\n boolean cibleBouger = calculPosCible();\n if (cibleBouger)\n calculerChemin();\n\n if (suiteDeDeplacement.size() > 0) {\n deplacementEnCours = suiteDeDeplacement.pollFirst();\n compteurPas = Case.TAILLE / vitesse;\n // pour le sprite\n if (deplacementEnCours == 'E')\n direction = true;\n else if (deplacementEnCours == 'O')\n direction = false;\n }\n }\n\t\tattaque = attaquer();\n\t}",
"public void executer()\r\n\t{\r\n\t\tswitch(this.type)\r\n\t\t{\r\n\t\tcase \"Gain\":\r\n\t\t\tPartie.getJoueurCourant().changeSolde(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Perte\":\r\n\t\t\tPartie.getJoueurCourant().changeSolde(-this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Avancer\":\r\n\t\t\tPartie.getJoueurCourant().deplace(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Aller en prison\":\r\n\t\t\tPartie.getJoueurCourant().setPosition(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Sortie de prison\":\r\n\t\t\tPartie.getJoueurCourant().setEnPrison(false);\r\n\t\t\tbreak;\r\n\t\t}\t\r\n\t}",
"private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }",
"public void rodar(){\n\t\tmeuConjuntoDePneus.rodar();\r\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). ConsultOuvrage() ;}",
"@Override\r\n\t/**\r\n\t * Actionne l'effet de la carte.\r\n\t * \r\n\t * @param listejoueur\r\n\t * \t\t\tLa liste des joueurs de la partie.\r\n\t * @param cible\r\n\t * \t\t\tLa joueur contre qui l'effet sera joué.\r\n\t * @param table\r\n\t * \t\t\tCollection de cartes situées au centre de la table de jeu.\r\n\t * @param carte\r\n\t * \t\t\tLa carte qui joue l'effet.\r\n\t * @param j\r\n\t * \t\t\tLe joueur qui joue la carte.\r\n\t * @param collection\r\n\t * \t\t\tLe deck de cartes.\r\n\t * @param tourjoueur\r\n\t * \t\t\tLa liste des joueurs selon l'ordre de jeu.\r\n\t */\r\n\tpublic void utiliserEffet(ArrayList<Joueur> listejoueur, int cible, ArrayList<Carte> table, Carte carte,\r\n\t\t\tint j, ArrayList<Carte> collection,ArrayList<Joueur> tourjoueur) {\n\t\tcont = Controller.getInstance();\r\n\t\tint id = carte.getIdentifiantCarte();\r\n\t\tif (id ==9 || id ==10 || id==22 || id==23){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un croyant\");\r\n\t\t\t\t\r\n\t\t\t\tcont.setChoisirCible(true);\r\n\t\t\t\t\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\t\t\r\n\t\t\t\tif (listejoueur.get(cont.getChoixCible()).getNombreCroyantTotal()>0){\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierCroyant(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" n'a aucun croyant a sacrifier \");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\tif (listejoueur.get(joueurCible).getNombreCroyantTotal()>0){\r\n\t\t\t\t\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierCroyant(true);\r\n\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun croyant à sacrifier\");\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( id==11){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un guide\");\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\t\r\n\t\t\t\tif(listejoueur.get(cont.getChoixCible()).getGuidePossede().size()>0){\r\n\t\t\t\t\tfor (int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor(int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierGuide(true);\r\n\t\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\tif (listejoueur.get(joueurCible).getGuidePossede().size()>0){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).setSelectionnee(true); // On rend possible l'utilisation de la carte\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierGuide(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"public void reversarComprobante() {\r\n if (tab_tabla1.getTotalFilas() > 0) {\r\n String ide_cnccc_anular = tab_tabla1.getValor(\"ide_cnccc\");\r\n // realizo el asiento de reversa\r\n con.reversar(ide_cnccc_anular, \"Asiento de reversa de la transaccion num: \" + ide_cnccc_anular, con);\r\n String ide_cnccc_nuevo = con.getTab_cabecera().getValor(\"ide_cnccc\");\r\n if (ide_cnccc_nuevo != null && !ide_cnccc_nuevo.isEmpty()) {\r\n // cambio el estado de libro bancos a anulado\r\n utilitario.getConexion().agregarSqlPantalla(\"update tes_cab_libr_banc set ide_teelb=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n // consulto si tiene Documentos por Pagar\r\n TablaGenerica tab_cxp_cab_fact = utilitario.consultar(\"select * from cxp_cabece_factur where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_cxp_cab_fact.getTotalFilas() > 0) {\r\n // cambio elestado a anulado de la factura\r\n utilitario.getConexion().agregarSqlPantalla(\"update cxp_cabece_factur set ide_cpefa=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n cls_cuentas_x_pagar cxp = new cls_cuentas_x_pagar();\r\n // reverso la transaccion CxP\r\n cxp.reversar(ide_cnccc_nuevo, tab_cxp_cab_fact.getValor(0, \"ide_cpcfa\"), \"Reversa CxP de fact. num:\" + tab_cxp_cab_fact.getValor(0, \"numero_cpcfa\") + \" y asiento num:\" + ide_cnccc_anular, null);\r\n // hago reversa de inventario\r\n TablaGenerica tab_inv_cab_inv = utilitario.consultar(\"select * from inv_cab_comp_inve where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_inv_cab_inv.getTotalFilas() > 0) {\r\n cls_inventario inv = new cls_inventario();\r\n inv.reversar_menos(ide_cnccc_nuevo, tab_inv_cab_inv.getValor(0, \"ide_cnccc\"), \"Reversa de comprobante num:\" + ide_cnccc_anular);\r\n }\r\n }\r\n\r\n boolean boo_asiento_costos = false;\r\n String ide_asiento_costos = \"-1\";\r\n // consulto si tiene CXC\r\n\r\n TablaGenerica tab_cxc_cab_fact = utilitario.consultar(\"select * from cxc_cabece_factura where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_cxc_cab_fact.getTotalFilas() > 0) {\r\n // cambio elestado a anulado de la factura cxc si tiene\r\n utilitario.getConexion().agregarSqlPantalla(\"update cxc_cabece_factura set ide_ccefa=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n cls_cuentas_x_cobrar cxc = new cls_cuentas_x_cobrar();\r\n //cxc.reversar(ide_cnccc_nuevo, tab_cxc_cab_fact.getValor(0, \"ide_cccfa\"), \"Reversa CxP de fact. num:\" + tab_cxc_cab_fact.getValor(0, \"secuencial_cccfa\") + \" y asiento num:\" + ide_cnccc_anular);\r\n TablaGenerica tab_inv_cab_inv = utilitario.consultar(\"select * from inv_cab_comp_inve where ide_incci in ( \"\r\n + \"select ide_incci from inv_det_comp_inve where ide_cccfa=\" + tab_cxc_cab_fact.getValor(0, \"ide_cccfa\") + \" GROUP BY ide_incci)\");\r\n if (tab_inv_cab_inv.getTotalFilas() > 0) {\r\n cls_inventario inv = new cls_inventario();\r\n // reverso inventario\r\n inv.reversar_mas(ide_cnccc_nuevo, tab_inv_cab_inv.getValor(0, \"ide_cnccc\"), \"Reversa de comprobante num:\" + ide_cnccc_anular);\r\n // reverso el comprobante de costos\r\n boo_asiento_costos = true;\r\n ide_asiento_costos = tab_inv_cab_inv.getValor(0, \"ide_cnccc\");\r\n }\r\n }\r\n\r\n utilitario.getConexion().guardarPantalla();\r\n tab_tabla1.setFilaActual(con.getTab_cabecera().getValor(\"ide_cnccc\"));\r\n tab_tabla1.ejecutarSql();\r\n if (boo_asiento_costos == true) {\r\n con.limpiar();\r\n con.reversar(ide_asiento_costos, \"Asiento de reversa asiento costos de la transaccion num: \" + ide_cnccc_anular, con);\r\n utilitario.getConexion().guardarPantalla();\r\n }\r\n }\r\n }\r\n }",
"@Override\n public synchronized void demarrer(){\n if(modele.getQuiterJeu()){return;}\n modele.getMoteurJeu().setEtapeJeu(this);\n // apercu dans le termial pour debuger\n System.out.println(\"-----------------nom joueur: \"+modele.getJoueurCourant().getNom());\n System.out.print(\" humain: \"+modele.getJoueurCourant().estHumain());\n System.out.print(\" stand: \"+modele.getJoueurCourant().getMainCourant().getStand());\n System.out.print(\" perdu: \"+modele.getJoueurCourant().getMainCourant().estPerdu());\n System.out.print(\" blackjack: \"+modele.getJoueurCourant().getMainCourant().estBlackJack());\n System.out.println(\" jeu: \"+modele.getJoueurCourant().getMainCourant().getJeu().toString());\n //-------------------------------------------------\n // On ne fait pas une boucle ici pour que l'observer\n // puisse acceder a son observé et se mettre a jour\n //-------------------------------------------------\n new Thread(){\n @Override\n public void run() {\n try {\n // si plus de carte\n if(modele.getPioche().getCartes().size() < 1){\n for(Carte carte:modele.getDefausse().getCartes()){\n carte.setFaceCarte(Face.VERSO);\n modele.getPioche().ajouterDessous(carte);\n }\n modele.getDefausse().vider();\n modele.getPioche().melanger();\n }\n \n \n // si il peut plus jouer\n if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu() \n || modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21()\n || modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){\n \n // si le joueur a une autre main\n if(modele.getJoueurCourant().mainSuivant()){\n Thread.sleep(2000);\n demarrer();\n \n }\n // sinon si il y a un joueur suivant on fait joueur suivant\n else if(modele.joueurSuivant()){\n Thread.sleep(2000);\n demarrer();\n }else{\n modele.getMoteurJeu().setEtapeJeu(etapeSuivant);\n Thread.sleep(2000);\n modele.setMessage(modele.getCroupier().getNom()+\" plays\");\n // on affiche les carte du croupier\n for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){\n carte.setFaceCarte(Face.RECTO);\n }\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++\");\n Thread.sleep(3000);\n demarrerEtapeSuivant();\n\n }\n\n }\n // sinon\n else{\n modele.setMessage(modele.getJoueurCourant().getNom()+\" plays\");\n if(!modele.getJoueurCourant().estHumain()){\n modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse());\n Thread.sleep(3000);\n demarrer();\n }\n \n\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }.start();\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private void remplirPriseEnCompte() {\r\n\t\tResultSet result = ctn.lectureData(\"SELECT * FROM PriseEnCompte\");\r\n\t\t// Remplissage tableau et combo Utilisateur\r\n\t\ttry {\r\n\t\t\twhile(result.next()) {\r\n\t\t\t\ttbPriseEnCompte.add(new StructPriseEnCompte(result.getLong(\"idPriseEnCompte\"), result.getString(\"Nom\"), result.getString(\"Description\")));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tctn.closeLectureData();\r\n\t\ttry {\r\n\t\t\tresult.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void reafficher() {\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}",
"public void mostrarCompra() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"public static void afficherCatalogueComplet() {\r\n Catalogue.afficher();\r\n System.out.println();\r\n }",
"public void changerJoueur() {\r\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). saisirParution() ;}",
"@Override\n\tpublic void RecevoireRequete(Requete requete) {\n\t\tSystem.out.println(\"from \" + requete.getExpediteur().getNom() + \" to \" + requete.getDestinataire());\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"public void verarbeite() {\n\t\t\r\n\t}",
"@Listen(\"onClick =#solicitudReclamo\")\n\t\tpublic void Reclamo() {\n\t\t\tString dir = \"gps/reclamo/frm-reclamo-ordenesEntrega.zul\";\n\t\t\tclearDivApp(dir);\n\t\t\t// Clients.evalJavaScript(\"document.title = 'ServiAldanas'; \");\n\t\t}",
"public void abrirCerradura(){\n cerradura.abrir();\r\n }",
"@Override\n\tpublic void transmetDonnee() {\n\n\t}",
"public void desactivarRecursos() {\n\r\n\t}",
"public void reabrirContrato() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n } else {\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//hospede\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se o contrato já estpa aberto\n System.err.println(\"O contrado desse hospede já encontra-se aberto\");\n\n } else {//caso o contrato encontre-se fechado\n hospedesCadastrados.get(i).getContrato().setSituacao(true);\n System.err.println(\"Contrato reaberto, agora voce pode reusufruir de nossos servicos!\");\n }\n }\n }\n }\n }",
"public void reiniciar() {\n // TODO implement here\n }",
"public void realiserAcahatProduit() {\n\t\t\n\t}",
"@Override\n public void alRechazarOperacion() {\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tjoueur.piocherCarte(partie.getPioche());\n\n\n\n\t\t}",
"@Override\n\tpublic void rafraichirAffichage(ParametresLectureSeule modeleLectureSeule, VueParametresFX vue) {\n\t\tJ.appel(this);\n\t\tChargeurDeVue chargeur = new ChargeurDeVue(\"/fxml/parametres.xml\",\"traductions.chaines\",\"/css/parametres.css\");\n\t\tconteneurPrincipal.getChildren().setAll(chargeur.getParent());\n\t\t\n\t\t\n\t\t\n\t}",
"public void modificarCompraComic();",
"@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }",
"@Override\n\t\t\t\t\t\tpublic void onInvateComplet() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\tpublic void onEndGererCommande()\n\t{\n\t\t\n\t}",
"public void clickSurCarte(CarteModel carteJouer) throws IOException{\n\t\tif (ajm.estJoueurCourant() && !platMod.retourneFinDeManche())\n\t\t{\n\t\t\t//Si le joueur doit piocher une carte chez le joueur précédent\n\t\t\tif (platMod.retournePiocheChezJoueur())\n\t \t{\n\t\t\t\tSystem.out.println(\"Vous piochez chez un joueur\");\n\t\t\t\tnew DialogVuePiocheChezJoueur(jv, platMod); \n\t\t\t\tjv.validate();\n\t\t\t//sinon, c'est qu'il peut jouer une carte de son choix, a condition qu'elle soit valide et qu'il n'est pas à piocher\n\t \t}else if (platMod.peutJouerCarte(carteJouer)){\n\t \t//Si le joueur joue une carte alors qu'il aurait du prévenir \"Carte !\", il pioche deux cartes\n\t \t\tif(((JoueurHumain)ajm).retourneDerCarte())\n\t \t\t{\n\t \t\t\tSystem.out.println(\"Vous piochez deux cartes car vous n'avez pas cliquer sur Carte ! avant de jouer votre avans dernière carte\");\n\t \t\t\tajm.piocherCarteMultiple(platMod.retourneModelPioche(), 2);\n\t \t\t\tplatMod.roulementJoueurCourant();\n\t \t\t//Sinon, sa carte est prit en compte et est joué\n\t \t\t}else{\n\t \t\t\tSystem.out.println(\"Vous jouez la carte : \"+carteJouer.toString());\n\t\t\t\t\tArrayList<CarteModel> listCarteJouable = new ArrayList<CarteModel>(); //La liste ne contient que la carte cliqué valide\n\t\t\t\t\tlistCarteJouable.add(carteJouer);\n\t\t\t\t\tajm.jouer(platMod, listCarteJouable);\n\t\t\t\t\t\n\t\t\t\t\t//Pour le huit et le 15, le passage au joueur suivant se fera après un clic sur l'IHM\n\t\t\t\t\tif (carteJouer.retourneTaille() == 8 || carteJouer.retourneTaille() == 15) \n\t\t\t\t\t\tnew DialogVueChoixCouleur(jv, platMod);\n\t\t\t\t\telse \n\t\t\t\t\t\tplatMod.roulementJoueurCourant();\n\t \t\t}\n\t \t}\n\t\t}\n\t}",
"@Override\n\tpublic TransferCompra finalizarCompra(TransferCompra tCompra){\n\t\t\n\t\t//Creamos la Transaccion y los datos necesarios(lista de articulos a quitar y el iterador para recorrerla)\n\t\tArrayList<Integer> articulosQuitar = new ArrayList<Integer>();\n\t\tTransactionManager.getInstance().nuevaTransaccion();\n\t\tTransactionManager.getInstance().getTransaccion().start();\n\t\t\n\t\tIterator<Entry<Integer, Integer>> it = tCompra.getLineaCompra().entrySet().iterator();\n\t\t\n\t\t//Bucle mientras haya articulos\n\t\twhile (it.hasNext()){\n\t\t\tMap.Entry<Integer, Integer> t = (Map.Entry<Integer, Integer>) it.next();\n\t\t\tTransferVideojuego tb = FactoriaDAO.getInstance().createDAOVideojuego().searchId(t.getKey());\n\t\t\t\n\t\t\tif(tb == null || !tb.getActivo()){\n\t\t\t\ttCompra.setLog(\"Articulo: \" + t.getKey() + \" no ha podido ser agregado\");\n\t\t\t\tarticulosQuitar.add(t.getKey());\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttCompra.setLog(\"Articulo: \" + t.getKey() + \" ha podido ser agregado\");\n\t\t\t\ttCompra.setCosteTotal(tCompra.getCosteTotal() + tb.getPrecio() * t.getValue());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Borramos los articulos\n\t\tfor(int i = 0; i < articulosQuitar.size(); ++i)\n\t\t\ttCompra.removeLineaCompra(articulosQuitar.get(i));\n\t\t\n\t\t//Introducimos rl resultado \n\t\tint resultado = FactoriaDAO.getInstance().createDAOCompra().add(tCompra);\n\t\t//hacemos commit\n\t\tif(resultado == 0)\n {\n TransactionManager.getInstance().getTransaccion().rollback();\n tCompra = null;\n }\n else{\n TransactionManager.getInstance().getTransaccion().commit();\n }\n\t\t//Finalmente cerramos la Transaccion\n\t\tTransactionManager.getInstance().eliminaTransaccion();\n\t\treturn tCompra;\n\t}",
"public void comprar(Carrito carrito){\n\t\tif(carrito.getEstadoVendido()==false){\n\t\t\tif(this.tarjeta.verificarTarjeta(carrito.getCostoCarrito())==true){\n\t\t\t\tSystem.out.println(\"Felicidades \"+this.getNombre()+\", la compra de su carrito \"+carrito.getNombreCarrito()+\" ha sido realizada con exito!\\nSe han debitado $\"+carrito.getCostoCarrito()+\" de su tarjeta.\\n\\nLos productos seran enviados a \"+this.getDireccionEnvio()+\"\\n-------------------------------------------------------\");\n\t\t\t\tcarrito.setEstadoVendido(true);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"El carrito ya fue comprado!\");\n\t}",
"public void actualiserAffichage();",
"public void verComprobante() {\r\n if (tab_tabla1.getValorSeleccionado() != null) {\r\n if (!tab_tabla1.isFilaInsertada()) {\r\n Map parametros = new HashMap();\r\n parametros.put(\"ide_cnccc\", Long.parseLong(tab_tabla1.getValorSeleccionado()));\r\n parametros.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n parametros.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n vpdf_ver.setVisualizarPDF(\"rep_contabilidad/rep_comprobante_contabilidad.jasper\", parametros);\r\n vpdf_ver.dibujar();\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Debe guardar el comprobante\", \"\");\r\n }\r\n\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No hay ningun comprobante seleccionado\", \"\");\r\n }\r\n }",
"public void actualisePrixDeVente(){\n\t\tArrayList<Catalogue> lis = new ArrayList<Catalogue>();\n\t\tfor (ITransformateur t : this.getTransfos()) {\n\t\t\tlis.add(t.getCatalogue());\n\t\t}\n\t\tthis.setCatalogues(lis);\n\t\tthis.setPrixDeVente();\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). rechercheAuteur() ;}",
"public void seleccionarTipoComprobante() {\r\n if (com_tipo_comprobante.getValue() != null) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n } else {\r\n tab_tabla1.limpiar();\r\n tab_tabla2.limpiar();\r\n }\r\n tex_num_transaccion.setValue(null);\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales,tex_num_transaccion\");\r\n }",
"@Override\n\tpublic void atualizar() {\n\t\t\n\t\t \n\t\t String idstring = id.getText();\n\t\t UUID idlong = UUID.fromString(idstring);\n\t\t \n\t\t PedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\tPedidoCompra.setId(idlong);\n\t\t\tPedidoCompra.setAtivo(true);\n//\t\t\tPedidoCompra.setNome(nome.getText());\n\t\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\t\tPedidoCompra.setSaldoinicial(saldoinicial.getText());\n\t\t\tPedidoCompra.setData(new Date());\n\t\t\tPedidoCompra.setIspago(false);\n\t\t\tPedidoCompra.setData_criacao(new Date());\n//\t\t\tPedidoCompra.setFornecedor(fornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\t\n\t\t\t\n\t\t\tgetservice().edit(PedidoCompra);\n\t\t\tupdateAlert(PedidoCompra);\n\t\t\tclearFields();\n\t\t\tdesligarLuz();\n\t\t\tloadEntityDetails();\n\t\t\tatualizar.setDisable(true);\n\t\t\tsalvar.setDisable(false);\n\t\t\t\n\t\t \n\t\t \n\t\tsuper.atualizar();\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tgetControleur(). saisirOuvrage() ;}",
"public void actionPerformed(ActionEvent e){ \r\n\t\r\n\t\t\tif (e.getSource().equals(ajouter)){\r\n\t\t\t\tcont.removeAll();\r\n\t\t\t\tFormulaire f = new Formulaire(FenetrePrincipale.this); // on change le panneau courant pour lui en mettre un nouveau\r\n\t\t\t\tcont.add(f, BorderLayout.CENTER);\r\n\t\t\t\tcont.repaint();\r\n\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\tif (e.getSource().equals(listingComplet)){\r\n\t\t\t\tnew ListeComplete(FenetrePrincipale.this); // creer une nouvelle fenetre qui a juste besoin de connection comme objet\r\n\t\t\t}\r\n\t\t\tif (e.getSource().equals(supprimer)){\r\n\t\t\t\tcont.removeAll();\r\n\t\t\t\tSuppression supprimer = new Suppression(FenetrePrincipale.this);\r\n\t\t\t\tcont.add(supprimer, BorderLayout.CENTER);\r\n\t\t\t\tcont.repaint();\r\n\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\t if (e.getSource().equals(retourPr)){\r\n\t\t\t\tcont.removeAll(); // effacer les anciens affichages (cont = endroit ou on stock l'ensemble des panneau et autres éléments graphiques)\r\n\t\t\t\tAccueil accueil = new Accueil();// initialise la variable av le nouveau panneau a afficher\r\n\t\t\t\tcont.add(accueil, BorderLayout.CENTER);// le réajouter au panneau\r\n\t\t\t\tcont.repaint(); // force la visualisation graphique du panneau (repeindre le containaire)\r\n\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\t if (e.getSource().equals(listingFamille)){\r\n\t\t\t\tcont.removeAll(); // effacer les anciens affichages (cont = endroit ou on stock l'ensemble des panneau et autres éléments graphiques)\r\n\t\t\t\tRechercheFam rech = new RechercheFam(FenetrePrincipale.this);// initialise la variable av le nouveau panneau a afficher\r\n\t\t\t\tcont.add(rech, BorderLayout.CENTER);// le réajouter au panneau\r\n\t\t\t\tcont.repaint(); // force la visualisation graphique du panneau (repeindre le containaire)\r\n\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\t if (e.getSource().equals(listingSection)){\r\n\t\t\t\t\tcont.removeAll(); // effacer les anciens affichages (cont = endroit ou on stock l'ensemble des panneau et autres éléments graphiques)\r\n\t\t\t\t\tRechercheSec rech = new RechercheSec(FenetrePrincipale.this);// initialise la variable av le nouveau panneau a afficher\r\n\t\t\t\t\tcont.add(rech, BorderLayout.CENTER);// le réajouter au panneau\r\n\t\t\t\t\tcont.repaint(); // force la visualisation graphique du panneau (repeindre le containaire)\r\n\t\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t}\r\n\t\t\t if (e.getSource().equals(aide)){\r\n\t\t\t\t\tcont.removeAll(); // effacer les anciens affichages (cont = endroit ou on stock l'ensemble des panneau et autres éléments graphiques)\r\n\t\t\t\t\tAide aide = new Aide();// initialise la variable av le nouveau panneau a afficher\r\n\t\t\t\t\tcont.add(aide, BorderLayout.CENTER);// le réajouter au panneau\r\n\t\t\t\t\tcont.repaint(); // force la visualisation graphique du panneau (repeindre le containaire)\r\n\t\t\t\t\tFenetrePrincipale.this.setVisible(true);\r\n\t\t\t }\r\n\t\t}",
"@Override\r\n public List<CompteRenduDTO> retournerCompteRendus() {\r\n throw new UnsupportedOperationException(\"Not supported yet.\");\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). rechercheMotCle() ;}",
"public void annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"@Override\n\tpublic void coba() {\n\t\t\n\t}",
"public Repartidor(String nombre, String apellido, String direccion, String telefono, String cedula) {\n super(nombre, apellido, direccion, telefono, cedula);\n this.disponible = true; //empieza siendo disponible luego cuando lo utilicemos pasara a no estarlo y asi...\n this.salario = 50; //establecemos un salario inicial de 50 al que luego le adicionaremos segun la cantidad de envios que haya realizado con exito \n }",
"public void action() {\n\t\t\ttreinador.Correu();\r\n\t\t\ttreinador.Perdeu();\r\n\t\t\treturn;\r\n\t\t}",
"public void doAfterCompose(Component comp) throws Exception {\n\t\tsuper.doAfterCompose(comp);\r\n\r\n\t\t//cargaListaFechaProduccionActiva();\r\n\t\t//cargarListaTurno();\r\n\t\tcargarListaTurnoLabor();\r\n\t\tcargarLimpiarControles();\r\n\t\t\r\n\t}",
"private void controladorNuevoColectivo(Controlador controlador){\n this.contNuevoColectivo = controlador.getNuevoColectivo();\n nuevoColectivo.setControlCreateCollective(contNuevoColectivo);\n }",
"public void afficherEcranSelectionJoueur() {\n gestionnaireJoueurs.chargerJoueurs();\n ecranSelectionJoueur.rechargerListeJoueur();\n CardLayout cl = (CardLayout) (container.getLayout());\n cl.show(container, \"EcranSelectionJoueur\");\n }",
"@Override public void realizarCobro(Persona persona){\n\tpersona.cuenta.retiro(120);\n }",
"private void remplirMaterielData() {\n\t}",
"@Override\r\npublic void doAfterCompose(Component comp) throws Exception {\n\tsuper.doAfterCompose(comp);\r\n\tactualizarLista(\"\");\r\n}",
"public void fecharConta() {\n\t\tcliente.setConta(new Conta());\r\n\t\tRepositorioCliente repositorioCliente = new FabricaRepositorio().getRepCliente();\r\n\t\trepositorioCliente.editar((ClienteIndividual)cliente);\r\n//\t\tGerenciadorContaImpl contaImpl = new GerenciadorContaImpl();\r\n//\t\ttry {\r\n//\t\t\tcontaImpl.fecharConta(cliente);\r\n//\t\t} catch (OperacaoInvalidaException e) {\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t}",
"public void actualizar() {\n\n\t}",
"private void valider() {\n\n\t\t/**\n\t\t * Renvoie un tableau de caractères qui sera transformé en chaine de caractère\n\t\t **/\n\n\t\tString passewordTraduit = new String(passeword.getPassword());\n\n\t\t/**\n\t\t * login.getText() récupère le contenu de la barre de saisie\n\t\t **/\n\t\t\n\t\tString user = login.getText();\n\t\tString passwd = passewordTraduit;\n\t\t/**\n\t\t *Permettra de savoir si la connexion à la BDD SQL c'est bien passée.\n\t\t */\n\t\tboolean reussite;\n\t\t/**\n\t\t * On va créer la BDD si elle n'existe pas\n\t\t */\n\t\t\n\t\treussite = Initialisation.getInstance().creerBDD(user, passwd);\n\t\t/**\n\t\t * On set le password et l'utilisateur pour que les paramètres de connexion soient les bons\n\t\t */\n\t\tInitialisation.getInstance().setPasswd(passwd);\n\t\tInitialisation.getInstance().setUser(user);\n\t\tModification.getInstance().setPasswd(passwd);\n\t\tModification.getInstance().setUser(user);\n\t\tif(reussite) {\n\t\t\t/**\n\t\t\t *Si tout c'est bien passé on regarde si l'utilisateur existe dans le fichier et dans le cas contraire on le crée.\n\t\t\t */\n\t\t\tif(personnesDejaInscrite.getInstance().getMaListDePersonneInscrite().get(user) == null) {\n\t\t\t\tpersonnesDejaInscrite.getInstance().getMaListDePersonneInscrite().put(user, new CompteAdministrateur(passwd));\n\t\t\t\tpersonnesDejaInscrite.getInstance().sauvegarder();\n\t\t\t}\n\t\t\tFenetreLogin.getInstance().dispose();\n\t\t\tFenetreFond.getInstance().changerFenetre(login.getText());\n\t\t\t/**\n\t\t\t *On remet les champs à nul pour que quand on se déconnecte on est pas le login et le mot de passe de l'utilisateur précédent.\n\t\t\t */\n\t\t\tlogin.setText(\"\");\n\t\t\tpasseword.setText(\"\");\n\t\t}\n\t\n\t}",
"private void remplirFabricantData() {\n\t}",
"public void carroRemovido(){\n System.out.println(\"Su carro fue removido exitosamente\");\n }",
"public void estableceEquipoComputo() {\n\tsetDispositivo(JOptionPane.showInputDialog(\"Ingrese el nombre del dispositivo a adquirir\"));\n\tsetComercio(JOptionPane.showInputDialog(\"Ingrese el nombre del comercio donde lo comprara\"));\n}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void doButtonBearbeiten() {\n\t\tif (this.anzeige.getSelectedRow() >= 0) {\n\t\t\tswitch (this.getType()) {\n\t\t\tcase 0:\n\t\t\t\tfinal TabellenspaltenModel ts = (TabellenspaltenModel) this.tabelle.getTabellenspalteAt(this.anzeige\n\t\t\t\t\t\t.getSelectedRow());\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern Tabellenspalte \") + ts.getName(), ts, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\ttabelle.removeTabellenspalte(ts);\n\t\t\t\t\t\tts.setTabelle(tabelle);\n\t\t\t\t\t\ttabelle.addTabellenspalte(ts);\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tfinal ToStringContainer tsc = (ToStringContainer) this.tabelle.getToStringMembers()[this.anzeige\n\t\t\t\t\t\t.getSelectedRow()];\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern ToStringContainer\"), tsc, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tfinal ToStringContainer tsc0 = (ToStringContainer) this.tabelle.getComboStringMembers()[this.anzeige\n\t\t\t\t\t\t.getSelectedRow()];\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern ToStringContainer\"), tsc0, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tfinal OrderMember omm = (OrderMember) this.tabelle.getSelectionViewOrderMembers()[this.anzeige\n\t\t\t\t\t\t.getSelectedRow()];\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern OrderMember\"), omm, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tfinal SelectionMember smm = (SelectionMember) this.tabelle.getAuswahlMembers().elementAt(\n\t\t\t\t\t\tthis.anzeige.getSelectedRow());\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern SelectionMember\"), smm, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void reiniciarRodada(int lugar, int quantidadePalitosRestantes) {\n LugarModelo lugarModelo = listaLugares.get(lugar - 1);\n lugarModelo.getNumeroPalpite().setVisible(false);\n Platform.runLater(() -> lugarModelo.getMao().setText(\"\"));\n lugarModelo.getMao().getGraphic().getStyleClass().remove(\"mao-fechada\");\n lugarModelo.getMao().getGraphic().getStyleClass().add(\"mao-aberta\");\n lugarModelo.getQuantidadePalitosRestantes().setText(\"Palitos Restante: \" + quantidadePalitosRestantes);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n private void enregistrerCours()\n {\n cours.setTitre(vueModifierCoursChampTitre.getText().toString());\n cours.setHeure(vueModifierCoursChampHeure.getHour() + \":\" + vueModifierCoursChampHeure.getMinute());\n\n //coursDAO = CoursDAO.getInstance();\n\n coursDAO.modifierCours(cours);\n\n }",
"@Override\r\n\tpublic void actualiser(ObservableButton o) {\n\t\tcompteur++;\r\n\t\ttext.setText(\"Nombre de clic : \"+compteur);\r\n\t\t\r\n\t}",
"public void activarVista(){\r\n\tvista.getVerVistaAutorObra().addActionListener(r->{\r\n\t\tCrearVista.crearVIstaAutorObra(con);\r\n\t\tvista.getTable().removeAll();\r\n\t\tlistaArte= new ArrayList<ObraArte>();\r\n\t\tlistaArte.removeAll(listaArte);\r\n\t\tlistaArte=SeleccionarDatosVista.getTodosRegistros(con);\r\n\t\ttableModelArteVista= new TableModelArteVista(listaArte, CABECERA);\r\n\t\tvista.getTable().setModel(tableModelArteVista);\r\n\t\tvista.getTxtBarraStatus().setText(\"VISTA CREADA. DICHA VISTA NO ES EDITABLE.\");\r\n\t\tvista.getButton_Modificar().setEnabled(false);\r\n\t\tvista.getButtonBorrar().setEnabled(false);\r\n\t\tvista.getMntmBorrarFila().setEnabled(false);\r\n\t\tvista.getButtonInsertarNuevo().setEnabled(false);\r\n\t\tvista.getLabelSize().setText(vista.getTable().getRowCount()+\" elementos.\");\r\n\t\t\r\n\t});\r\n}",
"private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}",
"public void comprar() {\n\t\tSystem.out.println(\"Comprar \"+cantidad+\" de \"+itemName);\n\t}",
"public void modifier(){\r\n try {\r\n //affectation des valeur \r\n echeance_etudiant.setIdEcheanceEtu(getViewEtudiantInscripEcheance().getIdEcheanceEtu()); \r\n \r\n echeance_etudiant.setAnneeaca(getViewEtudiantInscripEcheance().getAnneeaca());\r\n echeance_etudiant.setNumetu(getViewEtudiantInscripEcheance().getNumetu());\r\n echeance_etudiant.setMatricule(getViewEtudiantInscripEcheance().getMatricule());\r\n echeance_etudiant.setCodeCycle(getViewEtudiantInscripEcheance().getCodeCycle());\r\n echeance_etudiant.setCodeNiveau(getViewEtudiantInscripEcheance().getCodeNiveau());\r\n echeance_etudiant.setCodeClasse(getViewEtudiantInscripEcheance().getCodeClasse());\r\n echeance_etudiant.setCodeRegime(getViewEtudiantInscripEcheance().getCodeRegime());\r\n echeance_etudiant.setDrtinscri(getViewEtudiantInscripEcheance().getInscriptionAPaye());\r\n echeance_etudiant.setDrtforma(getViewEtudiantInscripEcheance().getFormationAPaye()); \r\n \r\n echeance_etudiant.setVers1(getViewEtudiantInscripEcheance().getVers1());\r\n echeance_etudiant.setVers2(getViewEtudiantInscripEcheance().getVers2());\r\n echeance_etudiant.setVers3(getViewEtudiantInscripEcheance().getVers3());\r\n echeance_etudiant.setVers4(getViewEtudiantInscripEcheance().getVers4());\r\n echeance_etudiant.setVers5(getViewEtudiantInscripEcheance().getVers5());\r\n echeance_etudiant.setVers6(getViewEtudiantInscripEcheance().getVers6()); \r\n \r\n //modification de l'utilisateur\r\n echeance_etudiantFacadeL.edit(echeance_etudiant); \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur de modification capturée : \"+e);\r\n } \r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). saisirExemplaire() ;}",
"@Override\n\tpublic void exec() {\n\t\tauto.changerEtat(\"trS\");\n\t}",
"public RegistrarCompra() {\n initComponents();\n tabelaFornecedor.setModel(modelFornecedor);\n\n }",
"@Override\n\tpublic void chocoContraPared() {}",
"public void aplicarDescuento();",
"public void borrarTablaCompleta() {\r\n\tvista.getBorrarTabla().addActionListener(r->{\r\n\t\tFile bd= new File(\"Database.db\");\r\n\t\tif(bd.exists() && bd.length()>10){\r\n\t\t\tBorrarDatos.borraTablaEntera(con);\r\n\t\t\tvista.getTxtBarraStatus().setText(\"TABLA ELIMINADA\");\r\n\t\t\ttableModelArte=null;\r\n\t\t\tautoRefresh();\r\n\t\t}else{\r\n\t\t\tvista.getTxtBarraStatus().setText(\"NO HAY NINGUNA TABLA QUE ELIMINAR\");\r\n\t\t}\r\n\t});\r\n\t}",
"@Override\n\tpublic void goToUICMantCliente(String modo) {\n\t\tif (modo.equalsIgnoreCase(constants.modoNuevo())) {\n\t\t\tuiHomeCliente.getUIMantCliente().setModo(modo);\n\t\t\tuiHomeCliente.getUIMantCliente().activarCampos();\n\t\t\tuiHomeCliente.getUIMantCliente().setTituloOperacion(\"Insertar\");\n\t\t\tuiHomeCliente.getContainer().showWidget(1);\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().refreshScroll();\n\t\t} else if (modo.equalsIgnoreCase(constants.modoEditar())) {\n\t\t\tClienteProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\t\t//Window.alert(bean.getIdCliente());\n\t\t\tif (bean == null){\n\t\t\t\t//Dialogs.alert(constants.alerta(), constants.seleccioneCliente(), null);\n\t\t\t\t//Window.alert(constants.seleccioneCliente());\n\t\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\t\tnot.showPopup();\n\t\t\t\treturn;\n\t\t\t}\t\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().setModo(modo);\n\t\t\tuiHomeCliente.getUIMantCliente().setBean(bean);\n\t\t\tuiHomeCliente.getUIMantCliente().activarCampos();\n\t\t\tuiHomeCliente.getUIMantCliente().setTituloOperacion(\"Actualizar\");\n\t\t\tuiHomeCliente.getContainer().showWidget(1);\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().refreshScroll();\n\t\t} else if (modo.equalsIgnoreCase(constants.modoDesactivar())) {\n\t\t\tClienteProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\t\t//Window.alert(bean.getIdCliente());\n\t\t\tif (bean == null){\n\t\t\t\t//Dialogs.alert(constants.alerta(), constants.seleccioneCliente(), null);\n\t\t\t\t//Window.alert(constants.seleccioneCliente());\n\t\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\t\tnot.showPopup();\n\t\t\t\treturn;\n\t\t\t}\t\t\t\t\n\t\t\tuiHomeCobrador.getUIMantCliente().setModo(modo);\n\t\t\tuiHomeCobrador.getUIMantCliente().setBean(bean);\n\t\t\tuiHomeCobrador.getUIMantCliente().activarCampos();\n\t\t\tuiHomeCobrador.getUIMantCliente().setTituloOperacion(\"Desactivar\");\n\t\t\tuiHomeCobrador.getContainer().showWidget(4);\t\t\t\n\t\t\tuiHomeCobrador.getUIMantCliente().refreshScroll();\n\t\t}else if (modo.equalsIgnoreCase(constants.modoEliminar())) {\n\t\t\tClienteProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\t\t//Window.alert(bean.getIdCliente());\n\t\t\tif (bean == null){\n\t\t\t\t//Dialogs.alert(constants.alerta(),constants.seleccioneCliente(), null);\n\t\t\t\t//Window.alert(constants.seleccioneCliente());\n\t\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\t\tnot.showPopup();\n\t\t\t\treturn;\n\t\t\t}\t\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().setModo(modo);\n\t\t\tuiHomeCliente.getUIMantCliente().setBean(bean);\n\t\t\tuiHomeCliente.getUIMantCliente().activarCampos();\n\t\t\tuiHomeCliente.getUIMantCliente().setTituloOperacion(\"Eliminar\");\n\t\t\tuiHomeCliente.getContainer().showWidget(1);\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().refreshScroll();\n\t\t}\n\n\t}",
"public vcRecepcion() {\n initComponents();\n setTitle(\"RentCarSystem | Consulta Recepcion\");\n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setExtendedState(MAXIMIZED_BOTH);\n mcr = new mcRecepcion();\n mcr.allRecepciones();\n setVisible(true);\n }",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\tif (e.getSource() == barra.btnuevo\r\n\t\t\t\t\t|| e.getSource() == barra.btmodifi) {\r\n\t\t\t\tif (e.getSource() == barra.btnuevo) {\r\n\t\t\t\t\ttfrif.setText(\"\");\r\n\t\t\t\t\ttfrazon.setText(\"\");\r\n\t\t\t\t\ttfdireccion.setText(\"\");\r\n\t\t\t\t\ttftelefono.setText(\"\");\r\n\t\t\t\t\ttfcorreo.setText(\"\");\r\n\t\t\t\t\tcbCiudad.setSelectedItem(-1);\r\n\t\t\t\t\tultimo = actual;\r\n\t\t\t\t\tactual = new Facturacion();\r\n\t\t\t\t}\r\n\t\t\t\tbarra.Edicion();\r\n\t\t\t\ttfrif.grabFocus();\r\n\r\n\t\t\t\ttfrif.setEditable(true);\r\n\t\t\t\ttfrazon.setEditable(true);\r\n\t\t\t\ttfdireccion.setEditable(true);\r\n\t\t\t\ttftelefono.setEditable(true);\r\n\t\t\t\ttfcorreo.setEditable(true);\r\n\t\t\t\tcbCiudad.setEditable(true);\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btgrabar) {\r\n\t\t\t\tif (tfrif.getText().trim().equals(\"\")\r\n\t\t\t\t\t\t|| tfrazon.getText().trim().equals(\"\")\r\n\t\t\t\t\t\t|| tfdireccion.getText().trim().equals(\"\")) {\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\t\"Debe completar todos los Datos del Persona\\nIngreso de Nuevo Persona\");\r\n\t\t\t\t\ttfrif.grabFocus();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tactual.setRif(tfrif.getText().trim());\r\n\t\t\t\t\tactual.setRazon(tfrazon.getText().trim());\r\n\t\t\t\t\tactual.setDireccion(tfdireccion.getText().trim());\r\n\t\t\t\t\tactual.setTelefono(tftelefono.getText().trim());\r\n\t\t\t\t\tactual.setFacCiudad(ModCiudad.getElemento(cbCiudad.getSelectedIndex()));\r\n\t\t\t\t\tactual.setFacOficina(principal.ofic);\r\n\t\t\t\t\tif (cbCiudad.getSelectedIndex()>-1)\r\n\t\t\t\t\t\tactual.setFacCiudad(ModCiudad.getElemento(cbCiudad.getSelectedIndex()));\r\n\t\t\t\t\tactual.setCorreo(tfcorreo.getText().trim());\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tsesion.saveOrUpdate(actual);\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btGrabar!!!Errores de Base de Datos!!!\\n\" + e2\r\n\t\t\t\t\t\t\t\t\t\t+ \" \", \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if (pac!=null) { JOptionPane.showMessageDialog(new\r\n\t\t\t\t\t * JFrame(),\r\n\t\t\t\t\t * \"Número de Cédula ya existe!!!\",\"Database Error!\"\r\n\t\t\t\t\t * ,JOptionPane.ERROR_MESSAGE); tfcedula.grabFocus(); }\r\n\t\t\t\t\t */\r\n\t\t\t\t\tbarra.Consulta();\r\n\t\t\t\t\tif (cierra)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tAdminFactura.setFacturacion(actual);\r\n\t\t\t\t\t\tcerrarventana();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// refreshPersona();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btcancel) {\r\n\t\t\t\tif (cierra)\r\n\t\t\t\t{\r\n//\t\t\t\t\tAdminFactura.setFacturacion(actual); corregido el 12/01/2012 estaba dando error, ya que si cancela la ventana no debe grabar nada en AdminFactura.setFacturacion()\r\n\t\t\t\t\tcerrarventana();\r\n\t\t\t\t}\r\n\t\t\t\tif (buscando) {\r\n\t\t\t \tlbbuscando.setText(\"\");\r\n\t\t\t\t\tbuscando = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (actual.equals(new Persona())) actual = ultimo;\r\n\t\t\t\tbarra.Consulta();\r\n\t\t\t\trefreshFacturacion();\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btbuscar) {\r\n\t\t\t\tbarrabusca();\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btanteri) {\r\n\t\t\t\tif (buscando){\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero>0?--puntero:puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tFacturacion per = null;\r\n\t\t\t\t\tint text = actual.getCodigo();\r\n\t\t\t\t\tString q = \"from Facturacion where CodOficina = \"+principal.ccodoff+\" and codigo < :text order by codigo desc\";\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tQuery queryResult = sesion\r\n\t\t\t\t\t\t\t\t.createQuery(q);\r\n\t\t\t\t\t\tqueryResult.setInteger(\"text\", text);\r\n\t\t\t\t\t\tqueryResult.setMaxResults(1);\r\n\t\t\t\t\t\tper = (Facturacion) queryResult.uniqueResult();\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btAnterior!!!Errores de Base de Datos!!!\\n\" + e2 + \" \"\r\n\t\t\t\t\t\t\t\t\t\t+ text, \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (per != null) {\r\n\t\t\t\t\t\tactual = per;\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btsiguie) {\r\n\t\t\t\tif (buscando){\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero<busqueda.size()-1?++puntero:puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tFacturacion per = null;\r\n\t\t\t\t\tint text = actual.getCodigo();\r\n\t\t\t\t\tString q = \"from Facturacion where CodOficina = \"+principal.ccodoff+\" and codigo > :text order by codigo asc\";\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tQuery queryResult = sesion\r\n\t\t\t\t\t\t\t\t.createQuery(q);\r\n\t\t\t\t\t\tqueryResult.setInteger(\"text\", text);\r\n\t\t\t\t\t\tqueryResult.setMaxResults(1);\r\n\t\t\t\t\t\tper = (Facturacion) queryResult.uniqueResult();\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btsiguie!!!Errores de Base de Datos!!!\\n\" + e2 + \" \"\r\n\t\t\t\t\t\t\t\t\t\t+ text, \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (per != null) {\r\n\t\t\t\t\t\tactual = per;\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (e.getSource() == barra.btultimo) {\r\n\t\t\t\tif (buscando)\r\n\t\t\t\t{\r\n\t\t\t\t\tpuntero = busqueda.size()-1;\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tactual = obtenerUltimo();\r\n\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btsalir) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t}",
"public RegistroCompra() {\n initComponents();\n buscarProveedor();\n }",
"public void act() \n {\n verificaClique();\n }",
"void celebrer();",
"public void effacerUtilisateur() {\r\n this.modele.effacerUtilisateur(this.modele);\r\n this.modele = new Utilisateurs();\r\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public void cancelarFactura(){\n this.cliente = new Cliente();\n this.factura = new Factura();\n this.listDetalle = new ArrayList<>();\n this.numeroFactura = null;\n }",
"public void afficher (UneCommande22<Integer> cde){ //POURQUOI CETTE MÉTHODE EST STATIQUE??? LA DEPLACER PE DANS COMMANDE\n\t\t\t\tif(cde.taille()==0) {ClientJava1DateUser.affiche(\"\\n\\t\\t COMMANDE EST VIDE\");\n\t\t\t\t}\n\t\t\t\telse {ClientJava1DateUser.affiche(cde.toString());}\t\n\t\t\t}",
"public ControladorCombate(int tipo_simulacion,\r\n Entrenador entrenador1, Entrenador entrenador2, ControladorPrincipal cp){\r\n this.esLider = false;\r\n this.controlador_principal = cp;\r\n this.tipo_simulacion = tipo_simulacion;\r\n this.combate = new Combate();\r\n this.equipo1 = entrenador1.getPokemones();\r\n this.equipo2 = entrenador2.getPokemones();\r\n this.entrenador1 = entrenador1;\r\n this.entrenador2 = entrenador2;\r\n this.vc = new VistaCombate();\r\n this.va = new VistaAtaque();\r\n this.ve = new VistaEquipo();\r\n this.creg = new ControladorRegistros();\r\n String[] nombres1 = new String[6];\r\n String[] nombres2 = new String[6];\r\n for (int i = 0; i < 6; i++) {\r\n nombres1[i]=equipo1[i].getPseudonimo();\r\n nombres2[i]=equipo2[i].getPseudonimo(); \r\n }\r\n this.vpc = new VistaPreviaCombate(tipo_simulacion, entrenador1.getNombre(), entrenador2.getNombre());\r\n this.vpc.agregarListener(this);\r\n this.vpc.setjC_Equipo1(nombres1);\r\n this.vpc.setjC_Equipo2(nombres2);\r\n this.vpc.setVisible(true);\r\n this.termino = false;\r\n resetearEntrenadores();\r\n }",
"public void estDisponible() {\n\n\t}",
"public void buscarGestor(){\r\n\t\t\r\n\t}",
"public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Etablissement) eta.next();\n jCbListeEtablissement.addItem(unEtablissement.getEtaNom());\n }\n bChargeListe = true;\n }",
"private void cargarProveedor() {\n panelComprar.setVisible(true);\n mat_pro.llenarTablaMaterialesDeProveedor(conector, tablaMateriales, p.getPro_rif());\n this.compras.clear();\n actualizarTabla();\n }",
"public ComprasRealizadas() {\n initComponents();\n tablaCompraDefault = (DefaultTableModel) tablaCompra.getModel();//conveirto la tabla\n tablaComprasDefault = (DefaultTableModel) tablaCompras.getModel();\n }",
"@Override\n public void curar(Curandero curandero, Pieza receptor) {\n }",
"public void recibeOrden() {\r\n\t\tSystem.out.println(\"Ordene mi General\");\r\n\t}",
"public String soumettreRv(){\n\t\t// Traitement ici ...\n\t\t// Un exemple d'utilisation du service\n\t\tserviceRv.ajouterRendezVous(this.getRv());\n\t\treturn REDIRECT;\n\t}",
"@Override\n public void conectarReloj() {\n proxyDisplay = new ObserverProxy();\n despliegueGrafico = new RelojDigitalGrafico(cronometro);\n cronometro.addObserver(proxyDisplay);\n cronometro.addObserver(despliegueGrafico);\n }",
"public void redo() {\n\t\tparent.requestChange(new ModelChangeRequest(this.getClass(), parent,\n\t\t\t\t\"create\") {\n\t\t\t@Override\n\t\t\tprotected void _execute() throws Exception {\n\t\t\t\tgetLogger().debug(\"Redo create component\");\n\t\t\t\teditor.selectPage((CompositeActor) parent);\n\t\t\t\tif (child instanceof NamedObj) {\n\t\t\t\t\tComponentUtility.setContainer(child, parent);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}"
] | [
"0.68525773",
"0.68162173",
"0.6730869",
"0.66594213",
"0.6616266",
"0.64098155",
"0.63639206",
"0.63493776",
"0.6329824",
"0.6327926",
"0.6314916",
"0.6310987",
"0.6308914",
"0.62578243",
"0.6232532",
"0.6228084",
"0.622384",
"0.6190554",
"0.61840224",
"0.6152496",
"0.61446786",
"0.6141177",
"0.6136243",
"0.61350894",
"0.6130347",
"0.6125928",
"0.61220926",
"0.61079204",
"0.6083458",
"0.6081614",
"0.6063958",
"0.60466045",
"0.60361266",
"0.6030335",
"0.6018443",
"0.60075027",
"0.59954304",
"0.59814274",
"0.597973",
"0.59686196",
"0.5956475",
"0.5954138",
"0.5951597",
"0.59447217",
"0.5939473",
"0.59348303",
"0.59215176",
"0.59007835",
"0.5888026",
"0.5883854",
"0.5879242",
"0.58770096",
"0.587341",
"0.5871993",
"0.58718234",
"0.58715385",
"0.5868494",
"0.5867274",
"0.5859626",
"0.5857018",
"0.5856895",
"0.5852797",
"0.5846201",
"0.58209366",
"0.5814939",
"0.5809608",
"0.57990164",
"0.5793692",
"0.5788503",
"0.57821417",
"0.5772281",
"0.5770724",
"0.57695067",
"0.5768436",
"0.5768189",
"0.576727",
"0.5764016",
"0.57626724",
"0.57526743",
"0.5742771",
"0.5738453",
"0.5727663",
"0.5726185",
"0.57260346",
"0.5725253",
"0.5724248",
"0.57234067",
"0.5722108",
"0.57185173",
"0.57165074",
"0.57159454",
"0.5713204",
"0.5713065",
"0.57114595",
"0.5711019",
"0.5709507",
"0.570734",
"0.5704366",
"0.5703454",
"0.5702452",
"0.5697175"
] | 0.0 | -1 |
constructor that initialize the size of the array and set pointer to 0 | public MinHeap(int size)
{
data = new String [size];
pointer = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Array() {\n\t\tarray = new int[0];\n\t}",
"public void init() {\n for (Point[] p : prev) {\n Arrays.fill(p, null);\n }\n }",
"public void initializeArray(){\n if(topOfStack==-1){\n for(int i=0;i<this.arr.length;i++){\n this.arr[i]=Integer.MIN_VALUE;\n }\n }\n }",
"void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }",
"public WeetArray() {\n count = 0;\n nullCount = 0;\n }",
"public void clear()\n\t{\n\t\tarraySize = 0;\n\t}",
"public SuperArray() { \n \t_data = new Comparable[10];\n \t_lastPos = -1; //flag to indicate no lastpos yet\n \t_size = 0;\t\n }",
"public void zero() {\n fill(0);\n }",
"public Array()\n {\n assert DEFAULT_CAPACITY > 0;\n\n array = new Object[DEFAULT_CAPACITY];\n }",
"private void setPointsAs0() {\n\n for (int counter = 0; counter < countOfPoints; counter++) {\n points[counter] = new Point(0,0);\n }\n\n }",
"public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }",
"void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }",
"public InputArray() \n\t{\n\t\tinputArray = null;\n\t}",
"public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}",
"@Override\n public void clear() {\n array.reset();\n }",
"public void initialize(int size);",
"public CircularQueueUsingArray() {\n\t\tarray = new int[size];\n\t}",
"void reset() {\n this.pointer = 0;\n }",
"private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }",
"public void reset() {\n\t\tlength = 0;\n\t}",
"public BigNum()\r\n { \r\n myArray = new int[SIZE];\r\n for (int i = 0; i < SIZE; i++)\r\n {\r\n myArray[i] = 0;\r\n }\r\n }",
"public CircularArray() {\n\t\tthis(DEFAULT_SIZE);\n\t}",
"public DynamicArray() {\n this(16);\n }",
"public MyArray() {\n this.length = 10;\n this.array = (T[]) Array.newInstance(MyArray.class, length);\n this.size = 0;\n }",
"public CircularArray(int initialSize) {\n\t\tthis.array = new Object[initialSize];\n\t\tthis.index = 0;\n\t\tthis.length = 0;\n\t}",
"Array(int x) {\n\t\tarray = new int[x];\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = 0; // make each index 0\n\t\t}\n\t}",
"public BaseArray(int max) // constructor\n {\n a = new long[max]; // create the array\n nElems = 0; // no items yet\n }",
"ArrayADT() {\n this.size = 10;\n this.base = createArrayInstance(this.size);\n this.length = 0;\n }",
"private void init() {\n\t\thead = -1;\n\t\tnumElements = 0;\n\t}",
"public SimpleArray(int size)\n\t{\n\t\tarray = new int[size];\n\t}",
"@Override\r\n public void clear() {\r\n \r\n this.array = new LinkedList[capacity];\r\n \r\n this.size = 0;\r\n \r\n }",
"@Override\n public void clear() {\n array = null;\n }",
"public void init(int[] a){\n this.array = a;\n moves = 0; \n }",
"@Override\n public void clear() {\n for (int i = 0; i < size; i++) {\n data[i] = null;\n }\n size = 0;\n }",
"public void clear()\n\t{\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = 0;\n\t\t}\n\t}",
"private static ByteBuffer _zeroBuffer( int size, BufferType type )\n {\n ByteBuffer zeroBuf = zeroTL(type).get();\n zeroBuf.clear();\n zeroBuf.limit(size);\n return zeroBuf;\n }",
"public Array(int capacity)\n {\n array = new Object[capacity];\n }",
"private void reset(){\n int j=0;\n for(int i=0; i<array.length; i++){\n if(j == itemCount) {return;}\n if(array[i]!=null){\n temp[j] = array[i];\n j++;\n }\n }\n }",
"public MyArrayList()\n\t{\n\t\tmyArray = new Object[StartSize];\n\t}",
"public Set(){\n setSet(new int[0]);\n }",
"public MyArray() {\n\t\tcapacity = DEFAULT_CAPACITY;\n\t\tnumElements = 0;\n\t\telements = (E[]) new Object[capacity];\n\t}",
"public void initialize() {\n grow(0);\n }",
"public ArrBag()\n {\n count = 0; // i.e. logical size, actual number of elems in the array\n }",
"@Override\n\tpublic void clear() \n\t{\n\t\twhile (size!=0)\n\t\t{\n\t\t\t//to check if need to resize\n\t\t\tif(size==myArray.length/4)\n\t\t\t\tresizeDown();\n\t\t\tmyArray[size-1] = null;\n\t\t\tsize--;\n\t\t}\n\t\tsize=0;\n\t}",
"public void clear() {\n size = 0;\n Arrays.fill(items, null);\n }",
"public ResizingArray() {\r\n super();\r\n this.aObjects = new Object[ResizingArray.DEFAULT_SIZE];\r\n this.aFreeElements = new int[ResizingArray.DEFAULT_SIZE];\r\n }",
"public void setToZero() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n data[i][j] = 0;\n }\n }\n }",
"public void reset() {\n\t\tArrays.fill(distance,0);\n\t\tused.clear();\n\t}",
"public static void initializeCount(int[] count){\n\t\tif (count != null){\n\t\t\tfor (int i = 0; i < count.length; i++)\n\t\t\t\tcount[i] = 0;\n\t\t}\n\t}",
"@Override\n public void clear() {\n size = 0;\n }",
"@Override\n public void clear() {\n size = 0;\n }",
"@Override\n public void clear() {\n size = 0;\n }",
"public ArrayDeque() {\n size = 0;\n array = (T[]) new Object[8];\n nextFirst = 0;\n nextLast = 1;\n }",
"public void setCountToZero() {\r\n \r\n // set count to 0\r\n count = 0;\r\n }",
"private void setArray(byte[] initialArray)\r\n/* 60: */ {\r\n/* 61: 95 */ this.array = initialArray;\r\n/* 62: 96 */ this.tmpNioBuf = null;\r\n/* 63: */ }",
"void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\t\tvoid init() {\n\t\t\tsetNodes(offHeapService.newArray(JudyIntermediateNode[].class, NODE_SIZE, true));\n\t\t}",
"public ulsinArray(int length) {\n intArr = new int[length];\n }",
"public final void clear()\n {\n this.pointer = 0;\n }",
"public void clear()\n \t{\n \t\tint byteLength = getLengthInBytes();\n \t\tfor (int ix=0; ix < byteLength; ix++)\n value[ix] = 0;\n \t}",
"@Override\n public void clear() {\n for (int i = 0; i < this.size; i++) {\n this.data[i] = null;\n }\n\n this.size = 0;\n }",
"public void clear() {\n size = 0;\n }",
"@SuppressWarnings(\"unchecked\")\n private void init(int capacity) {\n buffer = (T[]) new Object[capacity];\n head = 0;\n entries = 0;\n }",
"private void doClear( )\n {\n occupied = 0;\n for( int i = 0; i < array.length; i++ )\n array[ i ] = null;\n }",
"public final void initialize() {\n initialize(0);\n }",
"public void fillArrayWithNeg1(){\n\t\t\n\t\tArrays.fill(this.theArray, \"-1\");\n\t\t\n\t}",
"public void aendereWertFunktioniert(int[] arr) {\n\t\tif (arr.length > 0)\n\t\t\tarr[0] = 0;\n\t}",
"public MyArray(int size) {\n this.length = size;\n this.array = (T[]) Array.newInstance(MyArray.class, length);\n this.size = 0;\n }",
"public ZYArraySet(int initLength){\n if(initLength<0)\n throw new IllegalArgumentException(\"The length cannot be nagative\");\n elements = (ElementType[])new Object[initLength];\n }",
"public void clear() {\r\n\t\tsize = 0;\r\n\t}",
"public NativeIntegerObjectArrayImpl()\n {\n }",
"private void initialize(int[] arr) {\n a = ArraysUtils.sortAndRemoveDuplicates(arr);\n if (a.length != arr.length) {\n throw new IllegalArgumentException(\"Need unique list of numbers\");\n }\n numLeft = new BigInteger(total.toString());\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrBag( int optionalCapacity )\n {\n theArray = (T[]) new Object[optionalCapacity ];\n count = 0; // i.e. logical size, actual number of elems in the array\n }",
"public void clear(){\r\n currentSize = 0;\r\n }",
"public MyVector() {\n\t\tarr = new int[10];\n\t\tend = 0;\n\t}",
"public void clear() {\n\t \toccupied = 0;\n\t for (int i = 0; i < array.length; i++) {\n\t array[i] = null;\n\t }\n\t }",
"public ArrayList() {\n //sets an array with no length\n this.array = (E[]) new Object[0];\n }",
"public ZYArraySet(){\n elements = (ElementType[])new Object[DEFAULT_INIT_LENGTH];\n }",
"@Override\n public boolean clear() {\n this.array = (T[]) new Object[10];\n this.length = 10;\n this.size = 0;\n return true;\n }",
"public TLongArray() {\n\t}",
"public void makeEmpty() {\n defTable = new DList[sizeBucket];\n for(int i=0; i<sizeBucket; i++) {\n defTable[i] = new DList();\n }\n size = 0;\n }",
"public ArrayList()\n {\n list = new int[SIZE];\n length = 0;\n }",
"public void reset_array() {\r\n\t\tfor(int i=0;i<9;i++) {\r\n\t\t\ts[i]=\"\";\r\n\t\t}\r\n\t}",
"public void clear() {\r\n items = Arrays.copyOf(new int[items.length], items.length);\r\n NumItems = 0;\r\n }",
"void init(int size) {\n int numOfElements = size / MAX_BITS;\n if (size % MAX_BITS > 0)\n numOfElements++;\n\n values = new long[numOfElements];\n }",
"public DArray (int max)\n // constructor\n {\n theArray = new long[max];\n // create array\n nElems = 0;\n }",
"void clear(){\n this.queueArray = (T[]) new Object[0];\n this.tail = 0;\n }",
"public ArrayADT() \r\n\t{\r\n\t\tbookArray = new String[MAXSIZE];\r\n\t\tnumItems = 0;\r\n\t}",
"public void createPointersNoBackingArray() {\n int matrixByteSize = rows * cols * Sizeof.DOUBLE;\n\n deviceMPtr = new CUdeviceptr();\n cuMemAlloc(deviceMPtr, matrixByteSize);\n\n matrixPointer = Pointer.to(deviceMPtr);\n rowPointer = Pointer.to(new int[]{rows});\n columnPointer = Pointer.to(new int[]{cols});\n sizePointer = Pointer.to(new int[]{rows * cols});\n }",
"public MyHashMap() {\n arr = new int[100000];\n \n //To initialize the value with -1\n Arrays.fill(arr,-1);\n \n }",
"public ArrayQueue() {\n Object[] arr = new Object[INITIAL_CAPACITY];\n backingArray = (T[]) arr;\n size = 0;\n front = 0;\n }",
"public ArrayQueue() {\n\t\tthis(Integer.MAX_VALUE);\n\t}",
"public ArrayContainer() {\n this(DEFAULT_CAPACITY);\n }",
"public MyArrayList(int length) {\n data = new Object[length];\n }",
"public void makeEmpty(){\n front = null;\n numItems =0;\n }",
"public ByteBuf setZero(int index, int length)\r\n/* 369: */ {\r\n/* 370:382 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 371:383 */ return super.setZero(index, length);\r\n/* 372: */ }",
"public void clear() {\r\n\t\t//this method clears all the arrays and initiallizes them to 0.\r\n Arrays.fill(co,0);\r\n Arrays.fill(degree,0); \r\n Arrays.fill(sinc,0); \r\n Arrays.fill(sind,0); \r\n Arrays.fill(cosc,0); \r\n Arrays.fill(cosd,0); \r\n Arrays.fill(tanc,0); \r\n Arrays.fill(tand,0);\r\n cindex = 0;\r\n sinindex = 0;\r\n cosindex = 0;\r\n tanindex = 0; \r\n\t}",
"public static void clear (int []n) {\n\t\tfor (int i = 0; i < n.length; i++) {\n\t\t\tn[i] = 0;\n\t\t}\n\t}",
"public Stat() {\n\t\tdata = new SuperArray();\n }",
"public GenericDynamicArray() {this(11);}",
"public ExpandableArray() {\n\n\t}"
] | [
"0.71121484",
"0.6781939",
"0.6757722",
"0.674347",
"0.6705608",
"0.66822934",
"0.66426986",
"0.6586127",
"0.65709144",
"0.6492385",
"0.64615315",
"0.6433198",
"0.6414984",
"0.6364821",
"0.6361902",
"0.63585997",
"0.63459754",
"0.6330739",
"0.63263285",
"0.6321603",
"0.63116336",
"0.6305938",
"0.6285293",
"0.62345386",
"0.62171745",
"0.6211381",
"0.6200674",
"0.6197202",
"0.61839247",
"0.61724836",
"0.6141168",
"0.614086",
"0.6127097",
"0.60983706",
"0.60916185",
"0.60834223",
"0.608053",
"0.60745806",
"0.60687256",
"0.6063088",
"0.6061455",
"0.6055019",
"0.6043246",
"0.6041109",
"0.60333157",
"0.6026158",
"0.6019793",
"0.59913594",
"0.59901834",
"0.5988519",
"0.5988519",
"0.5988519",
"0.5982735",
"0.5981352",
"0.59677434",
"0.5964635",
"0.5958961",
"0.59484637",
"0.5942936",
"0.59429157",
"0.59411144",
"0.593857",
"0.5937266",
"0.59088993",
"0.59080535",
"0.58975184",
"0.5875506",
"0.58742785",
"0.58700234",
"0.5869965",
"0.58651006",
"0.58587146",
"0.58529603",
"0.58489674",
"0.584024",
"0.58324677",
"0.5829263",
"0.5828915",
"0.5820876",
"0.5820752",
"0.58174676",
"0.5815751",
"0.5809762",
"0.5805159",
"0.5803582",
"0.5795349",
"0.57902414",
"0.57757884",
"0.5763766",
"0.57632047",
"0.5762596",
"0.5761497",
"0.57536525",
"0.5750376",
"0.57496166",
"0.57465607",
"0.5734813",
"0.5728956",
"0.5722316",
"0.5718649",
"0.57161814"
] | 0.0 | -1 |
put String in the next available spot. while the String is smaller than its parent and not at root, swap with parent | public void insert(String input)
{
int parent = (pointer - 1) / 2;
int child = pointer;
if (pointer < data.length)
{
data[pointer] = input;
pointer++;
}
while (child != 0 && smallerThan(child, parent))
{
//upheap
swap(child, parent);
child = parent;
parent = (child - 1) / 2;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insertHelper(Node oroot, String s){\n\t\tNode newNode = new Node();\n\t\tif(s.length()>0){\t\t\t// if string s is empty return, if not the node's current will first char of string\n\t\t\tnewNode.current = s.charAt(0);\n\t\t}\n\t\telse{\n\t\t\treturn;\n\t\t}\n\t\tboolean flag = true;\t// flag determines if the char already exsit in the tree \n\t\tfor(int i = 0; i<oroot.children.size(); i++){ // loop whole children\n\t\t\tif(oroot.children.get(i).current == s.charAt(0)){\n\t\t\t\tflag = false;\n\t\t\t\tinsertHelper(oroot.children.get(i), s.substring(1));\n\t\t\t}\n\t\t}\n\t\tif(flag){\t\t// if current char is not exsit in the tree\n\t\t\toroot.children.add(newNode);\n\t\t\tinsertHelper(oroot.children.get(oroot.children.size()-1), s.substring(1));\t\n\t\t}\n\t}",
"void insert(String s, int index) {\n Node curr = root;//lets start by root node and insert\n for (int i = 0; i < s.length(); i++) {\n\n // we dont want to override existing key only add new key thats what putifabsent do..\n curr.childrens.putIfAbsent(s.charAt(i), new Node(s.charAt(i)));\n curr.childrens.get(s.charAt(i));\n }\n curr.end = index;\n }",
"private void shiftUp() {\n int index = this.size;\n\n while (hasParent(index) && (parent(index).compareTo(heap[index]) > 0)) {\n swap(index, parentIndex(index));\n index = parentIndex(index);\n }\n }",
"protected void siftUp() {\r\n\t\tint child = theHeap.size() - 1, parent;\r\n\r\n\t\twhile (child > 0) {\r\n\t\t\tparent = (child - 1) >> 1;\t// >> 1 is slightly faster than / 2\r\n\t\t\t\t\t\t\t\t\t\t// => parent = (child - 1) / 2\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tchild = parent;\r\n\t\t}\r\n\t}",
"public void insert(String word) {\n Node temp = this.root;\n while(word.length()!=0){\n char c = word.charAt(0);\n word = word.substring(1);\n int index = (int)c -97;\n if(temp.children[index]==null){\n temp.children[index] = new Node(c);\n }\n temp = temp.children[index];\n }\n temp.isEnd = true;\n \n }",
"java.lang.String getParent();",
"java.lang.String getParent();",
"public static TreeNode insert(TreeNode t, String s)\n { \t\n if(t==null)\n return new TreeNode(s);\n if(s.compareTo(t.getValue()+\"\")<0)\n t.setLeft(insert(t.getLeft(), s));\n else\n t.setRight(insert(t.getRight(), s));\n return t;\n }",
"public void insert(String word) {\n TrieNode parent = root;\n for(int i=0; i<word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n\n // Character doesn't exist at the current level\n if (parent.children[index] == null) {\n TrieNode node = new TrieNode();\n parent.children[index] = node;\n parent = node;\n } else {\n parent = parent.children[index];\n }\n }\n parent.isLeaf = true;\n }",
"private void insertRecursive(TrieNode current, String word, int index) {\n\t\t\n\t\tif(index == word.length()) {\n\t\t\tcurrent.isLeaf = true;\n\t\t\treturn;\n\t\t}\n\t\t Character ch = word.charAt(index);\t \n\t\t\tif (!current.getChild().containsKey(ch)) {\n\t\t\t\tTrieNode newNode = new TrieNode();\n\t\t\t\tcurrent.getChild().put(ch, newNode);\n\t\t\t}\n\t\t\t\n\t\t\tcurrent = current.getChild().get(ch);\n\t\t\t\n insertRecursive(current, word, index++);\n\t}",
"public void expand(String s){\n\t System.out.println(\"expand method is performed\");\n\t this.children.put(s,new Node(s));\t\n\t}",
"private void trickleUp(int index) {\n Map.Entry<String, Double> bottom = this.get(index);\n\n // if bottom < parent, move up\n while (PARENT(bottom).getValue().compareTo(bottom.getValue()) > 0) {\n Collections.swap(this, this.indexOf(bottom), this.indexOf(PARENT(bottom)));\n }\n\n }",
"public V put(String str, V value) \n {\n \tEntry curr = root;\n \tfor (int i=0; i<str.length(); i++)\n \t{\n \t\tchar ch = str.charAt(i);\n \t\tEntry node = curr.child.get(ch);\n \t\tif (node == null)\n \t\t{ \t\t\t\n \t\t\tnode = new Entry(null, curr.depth+1);\n \t\t\tcurr.child.put(ch, node);\n \t\t}\n \t\tcurr = node;\n \t}\n \tif(!curr.EndOfWord)\n \t{\n \t\tcurr.value = value;\n \tcurr.EndOfWord = true;\n \tsize++;\n \t}\n \telse\n \t{\n \t\tSystem.out.println(\"Word is already present.\");\n \t} \t \t\n \treturn curr.value;\n }",
"public void insert(String word) {\n if (word == null) {\n return;\n }\n TrieNode parent = root;\n char[] charArr = word.toCharArray();\n for (int n = 0; n < charArr.length; n++) {\n Map<Character, TrieNode> currentMap = parent.children;\n if (!currentMap.containsKey(charArr[n])) {\n currentMap.put(charArr[n], new TrieNode(charArr[n]));\n }\n parent = currentMap.get(charArr[n]);\n }\n parent.children.put('\\0', null);\n }",
"protected void siftUp(int start) {\r\n\t\tint child = start, parent;\r\n\r\n\t\twhile (child > 0) {\r\n\t\t\tparent = (child - 1) >> 1; // >> 1 is slightly faster than / 2\r\n\t\t\t\t\t\t\t\t\t\t// => parent = (child - 1) / 2\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tchild = parent;\r\n\t\t}\r\n\t}",
"public static TreeNode insert(TreeNode t, String s)\n {\n if (t == null) {\n t = new TreeNode(s);\n return t;\n }\n else {\n if(s.compareTo((String)t.getValue()) <= 0)\n t.setLeft(insert(t.getLeft(), s));\n else\n t.setRight(insert(t.getRight(), s));\n return t;\n }\n }",
"protected void siftDown() {\r\n\t\tint parent = 0, child = (parent << 1) + 1;// preguntar porque 0 y no 1\r\n\t\t\r\n\t\twhile (child < theHeap.size()) {\r\n\t\t\tif (child < theHeap.size() - 1\r\n\t\t\t\t\t&& compare(theHeap.get(child), theHeap.get(child + 1)) > 0)\r\n\t\t\t\tchild++; // child is the right child (child = (2 * parent) + 2)\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tparent = child;\r\n\t\t\tchild = (parent << 1) + 1; // => child = (2 * parent) + 1\r\n\t\t}\r\n\t}",
"protected void trickleUp(int i) {\n\n // root cannot trickleUp\n if (i > 0) {\n T element = this.elements[i];\n int parent = this.parent(i);\n T parentElement = this.elements[parent];\n\n //if the element is less than it's parent, swap\n if (element.compareTo(parentElement) < 0) {\n this.elements[i] = parentElement;\n this.elements[parent] = element;\n\n trickleUp(parent);\n }\n }\n }",
"private void insertInTree(String word, GTreeIF<Node> node) {\n\t\t\t\t\n\t\tif(word.length()>0){\n\t\t\t\t\n\t\t\t\t\tif(node.getNumChildren()==0){\n\t\t\t\t\t\tGTreeIF<Node> subarbol = new GTree<Node>();\n\t\t\t\t\t\tNode hijo = new LetterNode(word.charAt(0));\n\t\t\t\t\t\tsubarbol.setRoot(hijo);\n\t\t\t\t\t\tnode.addChild(node.getNumChildren()+1, subarbol);\n\t\t\t\t\t\tinsertInTree(word.substring(1),node.getChild(node.getNumChildren()));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tLetterNode aux;\n\t\t\t\t\t\tint i=1;\n\t\t\t\t\t\tboolean igual=false;\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif(node.getChild(i).getRoot().getNodeType()==NodeType.LETTERNODE) {\n\t\t\t\t\t\t\t\taux= (LetterNode) node.getChild(i).getRoot();\n\t\t\t\t\t\t\t\tif(aux.getCharacter()==word.charAt(0))\n\t\t\t\t\t\t\t\t\tigual=true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}while(!igual && i<=node.getNumChildren());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(igual)\n\t\t\t\t\t\t\tinsertInTree(word.substring(1),node.getChild(i-1));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tGTreeIF<Node> subarbol2= new GTree<Node>();\n\t\t\t\t\t\t\t\tNode hijo = new LetterNode(word.charAt(0));\n\t\t\t\t\t\t\t\tsubarbol2.setRoot(hijo);\n\t\t\t\t\t\t\t\tboolean inserto=false;\n\t\t\t\t\t\t\t\tint count=1;\n\t\t\t\t\t\t\t\tLetterNode nodoaux;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tif(node.getChild(count).getRoot().getNodeType()==NodeType.LETTERNODE) {\n\t\t\t\t\t\t\t\t\t\tnodoaux=(LetterNode) node.getChild(count).getRoot();\n\t\t\t\t\t\t\t\t\t\tif(nodoaux.getCharacter()>word.charAt(0)) {\n\t\t\t\t\t\t\t\t\t\t\tnode.addChild(count, subarbol2);\n\t\t\t\t\t\t\t\t\t\t\tinserto=true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}while(!inserto && count<=node.getNumChildren());\n\t\t\t\t\t\t\t\tif(!inserto) {\n\t\t\t\t\t\t\t\t\tnode.addChild(count, subarbol2);\n\t\t\t\t\t\t\t\t\tinsertInTree(word.substring(1),node.getChild(count));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tinsertInTree(word.substring(1), node.getChild(i));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint count=1;\n\t\t\t\t\tboolean comprobar=false;\n\t\t\t\t\twhile(!comprobar && node.getNumChildren()>=count) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(node.getChild(count).getRoot().getNodeType()==NodeType.WORDNODE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcomprobar=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t\tif(comprobar==false) {\n\t\t\t\t\t\tGTreeIF<Node> subarbol3 = new GTree<Node>();\n\t\t\t\t\t\tNode hoja = new WordNode();\n\t\t\t\t\t\tsubarbol3.setRoot(hoja);\n\t\t\t\t\t\tnode.addChild(1, subarbol3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}",
"public void insert(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }",
"private void heapifyUp(int index) {\r\n\t\tint parentIndex = (index - 1) / 2;\r\n\t\t\r\n\t\tif (index == 0)\r\n\t\t\treturn;\r\n\t\telse if (heap.get(index).compareTo(heap.get(parentIndex)) > 0) { // if parent is smaller, swap with parent\r\n\t\t\tE temp = heap.get(parentIndex);\r\n\t\t\theap.set(parentIndex, heap.get(index));\r\n\t\t\theap.set(index, temp);\r\n\t\t\t\r\n\t\t\theapifyUp(parentIndex); // check next level up\r\n\t\t}\r\n\t}",
"void shiftUp(int i) {\n\t while(i>1&&patients.get(parent(i)).compareTo(patients.get(i))<0){\n\t\t Patient p=patients.get(i);\n\t\t patients.set(i,patients.get(parent(i)));\n\t\t queueMap.put(patients.get(parent(i)).getName(), i);\n\t\t patients.set(parent(i),p);\n\t\t queueMap.put(p.getName(), parent(i));\n\t\t i=parent(i);\n\t }\n }",
"private void preorderTraverseForToString(Node node) {\n\t\tif (node == null)\n\t\t\treturn;\n\n\t\tthis.order += node + \"\\n\";\n\n\t\t// walk trough left sub-tree\n\t\tpreorderTraverseForToString(node.left);\n\t\t// walk trough right sub-tree\n\t\tpreorderTraverseForToString(node.right);\n\t}",
"public void insert(String word) {\n TrieNode cur = root;\n for (int i = 0 ; i < word.length(); i ++) {\n char ch = word.charAt(i);\n if (! cur.children.containsKey(ch)) {\n TrieNode child = new TrieNode(ch);\n cur.children.put(ch, child);\n }\n cur = cur.children.get(ch);\n }\n cur.isEnd = true;\n }",
"public void insert(String word) {\n Node node = root;\n char[] chars = word.toCharArray();\n for (char c: chars) {\n int idx = c - 'a';\n Node next = node.children[idx];\n if (next == null) {\n next = new Node(null);\n node.children[idx] = next;\n }\n node = next;\n }\n node.val = word;\n }",
"private void swapup(int pos) {\n E tmp = heap.elementAt(parent(pos));\n heap.setElementAt(heap.get(pos),parent(pos));\n heap.setElementAt(tmp,pos);\n }",
"public void insert(String word) {\n TrieNode cur = root;\n for(int i=0; i<word.length(); i++){\n int index = word.charAt(i)-'a';\n if(cur.children[index] == null)\n cur.children[index] = new TrieNode(word.charAt(i));\n cur = cur.children[index];\n if(i == word.length()-1)\n cur.isEnd = true;\n }\n }",
"private V put(StringIterator iter, V value)\n {\n \tEntry curr = root;\n \twhile(iter.hasNext())\n \t{\n \t\tchar ch = iter.next();\n \t\tEntry node = curr.child.get(ch);\n \t\tif (node == null)\n \t\t{ \t\t\t\n \t\t\tnode = new Entry(null, curr.depth+1);\n \t\t\tcurr.child.put(ch, node);\n \t\t}\n \t\tcurr = node;\n \t}\n \tif(!curr.EndOfWord)\n \t{\n \t\tcurr.value = value;\n \tcurr.EndOfWord = true;\n \tsize++;\n \t}\n \telse\n \t{\n \t\tSystem.out.println(\"Word is already present.\");\n \t}\n \treturn curr.value;\n }",
"public void insert(String word) {\n TrieNode current = root;\n for(char c : word.toCharArray()){\n int index = c - 'a';\n if(current.childrens[index] == null)\n current.childrens[index] = new TrieNode(c);\n current = current.childrens[index];\n }\n current.eow = true;\n }",
"public void insert(String word) {\n Node current = root;\n for (int i = 0; i < word.length(); ++i) {\n int c = word.charAt(i) - 'a';\n if (current.children[c] == null)\n current.children[c] = new Node(c);\n current = current.children[c];\n }\n current.isWord = true;\n }",
"private void trickleDown(int index) {\n Map.Entry<String, Double> smallest;\n Map.Entry<String, Double> top = this.get(index);\n int currentSize = this.size();\n\n while (index < currentSize / 2) { // while node has at leat one child\n Map.Entry<String, Double> left = LEFT(this.get(index));\n Map.Entry<String, Double> right = RIGHT(this.get(index));\n\n // find smaller child\n // if right child exists\n if (right != null && left.getValue().compareTo(right.getValue()) > 0) {\n smallest = right;\n } else {\n smallest = left;\n }\n\n // top <= smallest ?\n if (top.getValue().compareTo(smallest.getValue()) <= 0) {\n break;\n }\n\n // shift child up\n int smallestIndex = this.indexOf(smallest);\n Collections.swap(this, index, smallestIndex);\n index = smallestIndex;\n } // end while\n }",
"private void minHeapify(int position) {\n // if root, nothing to do\n if (position == 0) {\n return;\n }\n int parent = (int) Math.floor((position - 1) / 2);\n // if child is smaller than parent, swap them and call the method\n // again on the new parent\n if (((Comparable<E>) array[position]).compareTo(array[parent]) < 0) {\n swap(position, parent);\n minHeapify(parent);\n }\n }",
"public void insert (String val, Node ptr) {\n\n int toIndex = findKeyIndex(val);\n\n // if not full then just insert the key\n if (!full()) {\n insertSimple(val,ptr,toIndex);\n return;\n }\n // otherwise make a new right sibling for the current node, redistribute.\n Node ns = null;\n if (toIndex>lastindex) {\n ns = new InternalNode(degree,null,val,ptr,next,(Node) this);\n } else {\n ns = new InternalNode(degree, null,keys[lastindex], ptrs[lastindex], next,(Node) this);\t\n lastindex--;\n insertSimple(val,ptr,toIndex);\n }\n\n String toParent = redistribute();\n // recursively insert into parent if exists\n if (getParent()!=null) parentref.getNode().insert(toParent, ns);\t\t\t\t\n else new InternalNode(degree,this,toParent,ns,null,null);\n }",
"public void insert(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n currentNode.children.set(currentChar - 'a', new Node(false));\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n currentNode.setIsFinished(true);\n }",
"private String traverseForToString() {\n\t\tif (this.root != null)\n\t\t\tpreorderTraverseForToString(this.root);\n\n\t\treturn this.order;\n\t}",
"public void push(String s)\n\t{\n\t\t\tStringNode newNode = new StringNode(s);\n\t\t\tnewNode.setLink(top);\n\t\t\ttop = newNode;\n\t}",
"public String remove()\n\t{\n\t\tString result = null;\n\t\tif (pointer > 0)\n\t\t{\n\t\t\tif (pointer == 1)\n\t\t\t{\n\t\t\t\tpointer--;\n\t\t\t\tresult = data[pointer];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tString oldRoot = data[0];\n\t\t\t\tString oldLast = data[pointer - 1];\n\t\t\t\tdata[0] = oldLast;\n\t\t\t\tdata[pointer - 1] = oldRoot;\n\t\t\t\tpointer--;\n\t\t\t\tresult = data[pointer];\n\t\t\t\tint parent = 0;\n\t\t\t\t//left child\n\t\t\t\tint childLeft = parent * 2 + 1;\n\n\t\t\t\twhile (childLeft < pointer)\n\t\t\t\t{\n\t\t\t\t\t//right child\n\t\t\t\t\tint childRight = parent * 2 + 2;\n\t\t\t\t\t//assume the mininum of the two children is left child\n\t\t\t\t\tint childMin = childLeft;\n\t\t\t\t\tif (childRight < pointer)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (smallerThan(childRight, childLeft))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchildMin = childRight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (smallerThan(childMin, parent))\n\t\t\t\t\t{\n\t\t\t\t\t\t//downheap\n\t\t\t\t\t\tswap(childMin, parent);\n\t\t\t\t\t\tparent = childMin;\n\t\t\t\t\t\tchildLeft = parent * 2 + 1;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public void trickleUp(TreeHeapNode newNode)\n\t{\n\t\tint bottom = newNode.getKey();\n\t\tTreeHeapNode current = newNode;\n\t\twhile( current.parent != null && current.parent.getKey() < bottom )\n\t\t{\n\t\t\tcurrent.setKey(current.parent.getKey());\n\t\t\tcurrent = current.parent;\n\t\t}\n\t\tcurrent.setKey(bottom);\n\t}",
"public void insert(String word) {\n char [] words=word.toCharArray();\n CharTree t=root;\n for (char c : words) {\n if(t.next[c-97]==null){\n t.next[c-97]=new CharTree();\n }\n t=t.next[c-97];\n }\n t.isend=true;\n }",
"protected int swim(int ind) {\n if (ind == 1) return ind;\n\n int curVal = heap[ind];\n int parentInd = ind / 2;\n int parentVal = heap[parentInd];\n \n if (parentVal < curVal) {\n // move up\n swap(ind, parentInd);\n return swim(parentInd);\n } else {\n return ind;\n }\n }",
"public void insert(String word) {\n Node curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n Node subNode = curr.subNodes[c - 'a'];\n if (subNode == null) {\n subNode = new Node(c);\n curr.subNodes[c - 'a'] = subNode;\n }\n if (i == word.length() - 1) {\n subNode.isWord = true;\n }\n curr = subNode;\n }\n }",
"public void siftUp(int i){\n int child = i;\n if (child==0){\n return;\n }else{\n int parent = (child-1) / 2;\n if(eventArray[parent].eventTime > eventArray[child].eventTime) {\n swap(child, parent);\n siftUp(parent);\n }\n }\n }",
"public void insert(String word) {\n var node = root;\n for(char currentChar : word.toCharArray()){\n if(!node.containsKey(currentChar)) {\n node.put(currentChar, new Node());\n }\n node = node.get(currentChar);\n }\n node.setEnd();\n }",
"public boolean insert(String name, CarPriorityQueue carPQ){\n\t\tStringCharacterIterator i = new StringCharacterIterator(name);\t// New iterator for make model name\n\t\tif (root == null) { \t// First entry into the DLB\n\t\t\troot = new Node(i.current());\t// Set root = new node\n\t\t\tNode cur = root;\t// Set a cur node as root\n\t\t\ti.next();\n\t\t\t// Create children until string is complete, since it's the first entry\n\t\t\twhile (i.getIndex() < i.getEndIndex()) { \t// Iterate through the make and model string\n\t\t\t\tNode newNode = new Node(i.current());\n\t\t\t\tcur.setChild(newNode);\n\t\t\t\tcur = cur.getChild();\n\t\t\t\ti.next();\n\t\t\t}\n\t\t\tcur.setChild(new Node('^'));\t// Set child of entered name as the terminal node\n\t\t\tif (carPQ != null){ \t\t\t// If carPQ is not null set the car in the terminal node\n\t\t\t\tcur = cur.getChild();\n\t\t\t\tcur.setPQ(carPQ);\n\t\t\t}\n\t\t}\n\t\telse {\t// If there are previous entries in the DLB\n\t\t\tNode cur = root;\t// Set cur = root\n\t\t\twhile (i.getIndex() < i.getEndIndex()) { \t// Iterate through the make and model string\n\t\t\t\twhile (i.current() != cur.getVal()) {\n\t\t\t\t\tif (cur.getSibling() == null) {\t// Check all sibling nodes for a match \n\t\t\t\t\t\tNode newNode = new Node(i.current());\n\t\t\t\t\t\tcur.setSibling(newNode);\t\t// If no match found, set a newNode as its sibling\n\t\t\t\t\t\tcur = cur.getSibling();\t\t\t// set cur to be the new sibling\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcur = cur.getSibling();\t\t// If match found, set cur as the sibling\n\t\t\t\t}\n\t\t\t\tif (cur.getChild() == null) {\t\t// If no children, create a child node\n\t\t\t\t\tNode newNode = new Node(i.current());\n\t\t\t\t\tcur.setChild(newNode);\n\t\t\t\t}\n\t\t\t\tcur = cur.getChild();\t// Set cur as the next child\n\t\t\t\ti.next();\t\n\t\t\t}\n\t\t\tcur.setVal('^'); \t\t// After iterating through string, set the last node as the terminal node\n\t\t\tif (carPQ != null){ \t// If name was stored properly, set the car in the terminal node\n\t\t\t\tcur.setPQ(carPQ);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public static void move(SpInsertData spID) {\n SpItem curParent = spID.items[0].parent();\n SpItem newParent;\n SpItem afterChild;\n\n if (spID.result == INS_INSIDE) {\n newParent = spID.referant;\n afterChild = null;\n\n } else {\n newParent = spID.referant.parent();\n afterChild = spID.referant;\n }\n\n if (spID.replaceItems != null) {\n newParent.extract(spID.replaceItems);\n }\n\n curParent.move(spID.items, newParent, afterChild);\n }",
"public void insert(String word) {\n Node curr = root;\n\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n\n if(curr.children[c - 'a'] == null) {\n curr.children[c - 'a'] = new Node(c);\n }\n\n curr = curr.children[c - 'a'];\n }\n\n curr.isWord = true;\n }",
"@Test\r\n public void moveChildToParent() {\r\n command.executeCommand(\"/parent/child/\", \"/\", root, currentDirectory);\r\n assertTrue(root.getDirectoryByAbsolutePath(\"/child\") != null);\r\n }",
"public void insert(String word) {\n char[] chars = word.toCharArray();\n Node theNode = root;\n for (char c : chars) {\n if (!theNode.leaf) theNode.leaf = false;\n if (theNode.children.containsKey(c)) {\n theNode = theNode.children.get(c);\n } else {\n Node newNode = new Node(c);\n theNode.children.put(c, newNode);\n theNode = newNode;\n }\n }\n theNode.leaf = true;\n }",
"public boolean insert(String str)\n\t{\n\t\tif (this.root == null || str == null)\n\t\t\treturn false;\n\n\t\tstr = str.toLowerCase();\n\t\tint strlen = str.length();\n\t\tNode wizard = this.root; // Temporary node variable.\n\t\t\n\t\tfor (int i = 0; i < strlen; i++)\n\t\t{\n\t\t\tif (!Character.isLetter(str.charAt(i))) continue;\n\t\t\tint index = str.charAt(i) - 'a'; // Determines index of next node.\n\t\t\t\n\t\t\tif (wizard.children[index] == null)\n\t\t\t\twizard.children[index] = new Node();\n\n\t\t\twizard = wizard.children[index]; // Wizard jumps foward to next node.\n\t\t}\n\n\t\twizard.count++;\n\n\t\treturn true; // Returns true if insertion is successful.\n\t}",
"private void goUp() {\n\t\ttry {\n\t\t\tif (currentRootPath == null) {\n\t\t\t\treturn; //Invalid path\n\t\t\t}\n\t\t\tfinal Path parent2 = currentRootPath.getPath().getParent();\n\t\t\tif (parent2 == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttxtRootPath.setText(parent2.toString());\n\t\t\tgotoPath();\n\t\t} catch (Exception e) {\n\t\t\tMessageDialog.openError(getShell(), Messages.msgError, e.getMessage());\n\t\t}\n\t}",
"void backtrackTree(StringBuilder sequence1, StringBuilder sequence2, int position) {\n int n = table[0].length;\n if (position == 0) {\n results.add(new StringBuilder[]{new StringBuilder(sequence1), new StringBuilder(sequence2)});\n }\n else {\n List<Integer> listOfParents = parents.get(position);\n for (Integer parent: listOfParents) {\n if (parent == northWest(position)) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append(seq2.charAt(seq2position(position)));\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent / n == position / n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append('_');\n newSeq2.append(seq2.charAt(seq2position(position)));\n position--;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent % n == position % n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append('_');\n position = position - n;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n }\n }\n }",
"private void swim(int k) {\n if (k > 1 && aHeap.get(parent(k)).compareTo(aHeap.get(k)) > 0) {\n swap(k, parent(k));\n swim(parent(k));\n }\n }",
"public void insert(String word) {\n Trie root = this;\n for (char c : word.toCharArray()) {\n if (root.next[c - 'a'] == null) {\n root.next[c - 'a'] = new Trie();\n }\n root = root.next[c - 'a'];\n }\n root.word = word;\n }",
"public void insert(String word){\n //initially curr is root\n TrieNode curr = root;\n for(int i=0; i<word.length(); i++){\n char c = word.charAt(i);\n //if char doesnot exist, add new trienode\n if(curr.children[c-'a'] == null){\n curr.children[c-'a'] = new TrieNode();\n }\n //curr++\n curr = curr.children[c-'a'];\n }\n //set curr.word to the word\n curr.word = word;\n }",
"@Override\n public void insert(String word) {\n root = insertIterative(word, root);\n }",
"void percolateUp(int index) {\n Comparable x = pq[index];\n while (index > 0 && (compare(pq[parent(index)], x) == 1)) {\n pq[index] = pq[parent(index)];\n index = parent(index);\n }\n pq[index] = x;\n }",
"public void insert(String word) {\n Node<String> current = list.getFirst();\n\n while (current != null) {\n String another = (String) current.getValue();\n\n for (int i = 0; i < word.length(); i++) {\n if (word.charAt(i) == another.charAt(i)) {}\n else if (word.charAt(i) < another.charAt(i)) {\n Node<String> node = new Node<String>(word);\n current.getPrevious().setNext(node);\n node.setPrevious(current.getPrevious());\n node.setNext(current);\n current.setPrevious(node);\n return;\n } else { break; }\n }\n current = current.getNext();\n }\n list.getLast().setNext(new Node<String>(word));\n return;\n }",
"private void splitChild(BTNode x, int i, BTNode y) {\n BTNode z = splitChildY(y);\n // Since this node is going to have a new child,\n // create space of new child\n for (int j = x.mCurrentKeyNum; j >= i+1; j--)\n x.mChildren[j+1] = x.mChildren[j];\n\n //if there was a child their we dont want the change the count (just to replace)\n //if (x.mChildren[i+1] != null)\n //x.mCurrentChildrenNum--;\n\n x.mChildren[i+1] = z;\n x.mCurrentChildrenNum++;\n // A key of y will move to this node. Find location of\n // new key and move all greater keys one space ahead\n for (int j = x.mCurrentKeyNum-1; j >= i; j--)\n x.mKeys[j+1] = x.mKeys[j];\n // Copy the middle key of y to this node\n x.mKeys[i] = y.mKeys[t-1];\n x.mCurrentKeyNum++;\n }",
"public void insert(String word) {\n TrieNode ptr = root;\n for(int i = 0;i < word.length();i++) {\n char c = word.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n ptr.child[c - 'a'] = new TrieNode();\n }\n ptr = ptr.child[c - 'a'];\n }\n ptr.is_end = true;\n }",
"private void updateTree(char c) {\n Node currentNode = getNode(c);\n //update nodes until the parent\n updateNodes(currentNode);\n }",
"private void preOrderTraverse(Node<String> node, int depth,StringBuilder sb) {\n\t\t\t\tif(node!=null){\n\t\t\t\t\t\tsb.append(\" \"+node.toString());\n\t\t\t\t\tpreOrderTraverse(node.left, depth + 1, sb);\n\t\t\t\t\n\t\t\t\t\tpreOrderTraverse(node.right, depth + 1, sb);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t}",
"public void insert(String word) {\n\n\t\tTrieNode temp = root;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tint c = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null) {\n\t\t\t\ttemp.childrens[c] = new TrieNode();\n\t\t\t}\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\ttemp.isLeafNode = true;\n\t}",
"public void trickleDown(int parent){\n int leftChild = 2*parent+1;\n int rightChild = 2*parent +2;\n int smallest;\n // pick smallest of the two children\n if (array[leftChild] == null && array[rightChild] != null){\n // if only left available case\n smallest = rightChild;\n }else if (array[rightChild] == null && array[leftChild] != null) {\n // if only right available case\n smallest = leftChild;\n }else if (array[leftChild] == null && array[rightChild] == null){\n // leaves level\n return;\n }else if ((((Comparable<E>)array[leftChild]).compareTo(array[rightChild]) < 0)){\n smallest = leftChild;\n }else{\n smallest = rightChild;\n }\n // if the parent is smaller than the smallest child, stop\n if ((((Comparable<E>)array[parent]).compareTo(array[smallest]) < 0)) {\n return;\n }\n // if the parent is bigger than the smallest child, swap\n swap(parent, smallest);\n // recursive call on the new index of the initial value\n trickleDown(smallest);\n }",
"@Override\n public void insert(final String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n final TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }",
"private void percolateUp(int index) {\n if (index > 0) {\r\n // swap with parent if parent is less than current\r\n int parentIndex = (index - 1) / NUM_CHILDREN;\r\n if (heap[index].compareTo(heap[parentIndex]) < 0) {\r\n // this is less than the parent so swap them\r\n swap(parentIndex, index);\r\n // recurse all the way up\r\n percolateUp(parentIndex);\r\n }\r\n }\r\n }",
"private void shiftDown() {\n int index = 1;\n\n while (hasLeftChild(index)) {\n //compare chield Nodes\n int smallerChild = leftIndex(index);\n\n // shft down with smaller Node if any\n if (hasRightChild(index) && heap[leftIndex(index)].compareTo(heap[rightIndex(index)]) > 0) {\n smallerChild = rightIndex(index);\n }\n\n if (heap[index].compareTo(heap[smallerChild]) > 0) {\n swap(index, smallerChild);\n } else {\n //Nothing to do\n break;\n }\n index = smallerChild;\n }\n }",
"private void insert(Node current, Node newNode)\r\n\t{\r\n\t\t// Prevent the same name from being inserted as a new Node by doing nothing\r\n\t\tif(newNode.getName().equalsIgnoreCase(current.getName()))\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// The name is lexicographically less than the current Node's name\r\n\t\telse if(newNode.getName().compareToIgnoreCase(current.getName()) < 0)\r\n\t\t{\r\n\t\t\t// Spot is open, add name\r\n\t\t\tif(current.getLeftChild() == null)\r\n\t\t\t{\r\n\t\t\t\tcurrent.setLeftChild(newNode);\r\n\t\t\t\tnewNode.setParent(current);\r\n\t\t\t\tincrementCounter();\r\n\t\t\t}\r\n\t\t\t// Spot is occupied, keep searching through the Binary Tree recursively\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tinsert(current.getLeftChild(), newNode);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// The name is lexicographically greater than the current Node's name\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Spot is open, add name\r\n\t\t\tif(current.getRightChild() == null)\r\n\t\t\t{\r\n\t\t\t\tcurrent.setRightChild(newNode);\r\n\t\t\t\tnewNode.setParent(current);\r\n\t\t\t\tincrementCounter();\r\n\t\t\t}\r\n\t\t\t// Spot is occupied, keep searching through the Binary Tree recursively\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tinsert(current.getRightChild(), newNode);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void insert(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n}",
"boolean add(String s, int depth) {\n\n\t\t\t// First case: we are at the end of the string and this is the correct node\n\t\t\tif(depth >= s.length() || (s.charAt(depth) == character.get()) && depth == s.length() - 1) {\n\t\t\t\tAtomicBoolean result = absent;\n\t\t\t\tabsent.set(false);\n\t\t\t\treturn result.get();\n\t\t\t}\n\n\t\t\t// Second case: the next character in the string was found, but this is not the end of the string\n\t\t\t// We continue in member \"suffix\"\n\t\t\tif(s.charAt(depth) == character.get()) {\n\t\t\t\tif (suffix == null || suffix.get().character.get() > s.charAt(depth+1)) \n\t\t\t\t\tsuffix = new AtomicReference<Node>(new Node(s.charAt(depth+1), suffix.get()));\n\t\t\t\treturn suffix.get().add(s, depth+1);\n\t\t\t}\n\n\t\t\t// Third case: the next character in the string was not found\n\t\t\t// We continue in member \"next\"\n\t\t\t// To maintain the order, we may have to add a new node before \"next\" first\n\t\t\tif (next == null || next.get().character.get() > s.charAt(depth))\n\t\t\t\tnext.set(new Node(s.charAt(depth), next.get()));\n\t\n\t\t\treturn next.get().add(s, depth);\n\t\t}",
"public TreeNode str2tree(String s) {\n if (s == null || s.length() == 0) {\n return null;\n }\n Stack<TreeNode> stack = new Stack<>();\n for (int i = 0; i < s.length(); i++) {\n int j = i;\n char c = s.charAt(i);\n if (c == ')') {\n stack.pop();\n } else if (c >= '0' && c <= '9' || c =='-') {\n while (i + 1 < s.length() && s.charAt(i + 1) >= '0' && s.charAt(i + 1) <= '9') {\n i++;\n }\n TreeNode cur = new TreeNode(Integer.valueOf(s.substring(j, i + 1)));\n if (!stack.isEmpty()) {\n TreeNode parent = stack.peek();\n if (parent.left != null) {\n parent.right = cur;\n } else {\n parent.left = cur;\n }\n }\n stack.push(cur);\n }\n }\n return stack.peek();\n }",
"private void lowerPriority(String s) {\n\t\tqueue.add(stack.pop());\n\t\tstack.add(s);\n\t}",
"public void insert(String s){\n\t\tinsertHelper(root, s);\n\t}",
"protected void trickleDown(int i) {\n\n int left = this.leftChild(i);\n int right = this.rightChild(i);\n T element = this.elements[i];\n\n if (left < currentSize && right < currentSize) {\n int min = this.minPosition(right, left);\n\n if ( element.compareTo(this.elements[min]) > 0)\n this.swapTrickleDown(i, min);\n\n } else if (left < currentSize && element.compareTo(this.elements[left]) > 0)\n this.swapTrickleDown(i, left);\n\n }",
"void percolateUp(int index) {\n T x = (T) pq[index];\n while(index>0 && (pq[parent(index)].compareTo(x)==1)) {\n pq[index] = pq[parent(index)];\n index = parent(index);\n pq[index]=x;\n }\n\n }",
"public void swap(int childIndex,int parentIndex);",
"protected void pushDownRoot(int root){\n int heapSize = data.size();\n Bloque value = (Bloque)data.get(root);\n while (root < heapSize) {\n int childpos = left(root);\n if (childpos < heapSize)\n {\n if ((right(root) < heapSize) && (((Bloque)data.get(childpos+1)).compareTo((Bloque)data.get(childpos)) > 0)){\n childpos++;\n }\n // Assert: childpos indexes smaller of two children\n if (((Bloque)data.get(childpos)).compareTo(value) > 0){\n data.set(root,data.get(childpos));\n root = childpos; // keep moving down\n } else { // found right location\n data.set(root,value);\n return;\n }\n } else { // at a leaf! insert and halt\n data.set(root,value);\n return;\n }\n }\n }",
"public static TreeNode<String> treeOf(String s) {\n TreeNode<String> t = null;\n for (char c : s.toCharArray()) {\n t = insert(t, String.valueOf(c));\n }\n return t;\n }",
"public void refresh()\n\t{\n\t\tNode master = new Node(\"Tyler\");\n\t\t//master.add(new Node(\"Test\"));\n\t\tmaster.addParent(new Node(\"Clinton\"));\n\t\tmaster.addParent(new Node(\"Terry\"));\n\t\t\n\t\tmaster.add(\"Justin\", \"Terry\"); \n\t\tmaster.add(\"Justin\", \"Clinton\"); \n\t\t//this adds directly under Terry\n\t\t//maybe do this differently...\n\t\t\n\t\t\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"Diana\"));\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"George\"));\n\t\t\n\t\tmaster.add(new Node(\"Tyler 2.0\"));\n\t\tmaster.add(new Node(\"Tyler 3.0\"));\n\t\tmaster.add(new Node(\"Tyler Jr\"));\n\t\t\n\n\t\tmaster.add(\"Tyler Jr Jr\", \"Tyler 2.0\");\n\t\t\n\t\tmaster.add(\"Tyler 3.0\", \"Tyler Jr 2.0\");\n\t\t\n\t\tmaster.findNode(\"Clinton\").addParent(new Node(\"Eric\"));\n\t\tmaster.findNode(\"Eric\").addParent(new Node(\"Eric's Dad\"));\n\t\t\n\t\t\n\t\tmaster.findNode(\"Tyler Jr Jr\", 6).add(new Node(\"Mini Tyler\"));\n\t\t//master.findNode(\"Clinton\", 2).add(new Node(\"Justin\"));\n\t\t\n\t\t\n\t\tmaster.getParent().get(0).findNode(\"Justin\", 3).add(new Node(\"Mini Justin\"));\n\t\t\n\t\tmaster.add(new Node(\"Laptop\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Keyboard\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Mouse\"));\n\t\t\n\t\tmaster.add(\"Touchpad\", \"Laptop\");\n\t\t//master.add(\"Justin\", \"Eric\");\n\t\t\n\t\tmaster.add(\"Hunger\", \"Tyler\");\n\t\t\n\t\tselectedNode = master;\n\t\tselect(selectedNode);\n\t}",
"protected void percolateUp(int leaf){\n int parent = parent(leaf);\n Bloque value = (Bloque)data.get(leaf);\n while (leaf > 0 && (value.compareTo(data.get(parent)) > 0)){\n data.set(leaf,data.get(parent));\n leaf = parent;\n parent = parent(leaf);\n }\n data.set(leaf,value);\n }",
"public void insert(String i) {\n if (c == null) {\n c = new btNode(i, null, null);\n how_many++;\n return;\n }\n\n btNode p = c;\n btNode prev = p;\n while (p != null && !p.info.equals(i)) {\n prev = p;\n if (p.info.compareTo(i) < 0) {\n p = p.rt;\n } else {\n p = p.lt;\n }\n }\n\n if (p == null) {\n if (prev.info.compareTo(i) < 0) {\n prev.rt = new btNode(i, null, null);\n } else {\n prev.lt = new btNode(i, null, null);\n }\n how_many++;\n } else {\n p.how_many++;\n }\n }",
"private void preorder(String[] content, Node current)\r\n\t{\r\n\t\tif(current != null)\r\n\t\t{\r\n\t\t\t// Write the name of the current Node into the String array\r\n\t\t\tcontent[getArrayCounter()] = current.getName();\r\n\t\t\tincrementArrayCounter();\r\n\t\t\t\r\n\t\t\t// Left recursive traversal\r\n\t\t\tpreorder(content, current.getLeftChild());\r\n\t\t\t// Right recursive traversal\r\n\t\t\tpreorder(content, current.getRightChild());\r\n\t\t}\r\n\t}",
"public void setParentAndCurrentWrd(String queueHead, WordCost wordCost)\n\t{\n\t\tif(parentsList.isEmpty())\n\t\t{\n\t\t\twordCost.setCurrentWord(queueHead);\n\t\t\twordCost.setParent(queueHead);\n\t\t\tthis.parent = queueHead;\n\t\t\tparentsList.add(queueHead);\n\t\t}else{\n\t\t\twordCost.setCurrentWord(queueHead);\n\t\t\twordCost.setParent(this.parent);\n\t\t\tparentsList.add(queueHead);\n\t\t}\n\t}",
"public void insert(String word) {\n Entry tempRoot = root;\n for(int i=0; i<word.length(); i++){\n char ch = word.charAt(i);\n Entry childNode = tempRoot.getChildNode(ch);\n if(childNode == null){\n tempRoot.setChildNode(new Entry(), ch);\n }\n tempRoot = tempRoot.getChildNode(ch);\n }\n\n tempRoot.setIsWord(true);\n }",
"private void dfs(TrieNode node, List<String> prev, String current) {\n if (node.isLeaf) {\n prev.add(current);\n }\n\n for (int i = 0; i < 26; i++) {\n TrieNode child = node.children[i];\n if (child != null) {\n char c = (char) ('A' + i);\n dfs(child, prev, current + c);\n\n }\n\n\n }\n }",
"public void insert(String word) {\n TrieNode curr = root;\n for(char c : word.toCharArray()) {\n int idx = c - 'a';\n if(curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }",
"private Node serchNode(E input, Node current) {\n Node node = null;\n if (current.value.equals(input)) {\n node = current;\n } else {\n List<Node> children = current.children;\n for (Node child : children) {\n node = serchNode(input, child);\n if (node != null) {\n break;\n }\n }\n }\n return node;\n }",
"public void insert(T x)\n\t{\n\t\t//if the input is null, returns null\n\t\tif(x == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//if size == 0, inputs in the first index of the tree\n\t\tif(size == 0)\n\t\t{\n\t\t\tarray[0] = x;\n\t\t\tsize++;\n\t\t\treturn;\n\t\t}\n\n\t\t//declares variable and adds the input to the last index\n\t\tint index = size;\n\t\tarray[index] = x;\n\t\tint parent = (index-1)/2;\n\t\tint gParent = (index-3)/4;\n\t\t//gets the present level after input\n\t\tint level = getLevel(index+1);\n\t\t//if size < 3; does special input\n\t\tif(size <= 3)\n\t\t{\n\t\t\t//checks if the element at 0 is greater than the new one, if yes, swaps\n\t\t\tif(object.compare(array[0], array[index]) > 0)\n\t\t\t{\n\t\t\t\tT temp = array[0];\n\t\t\t\tarray[0] = array[index];\n\t\t\t\tarray[index] = temp;\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//else does nothing. \n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//checks if level is even\n\t\tif(level % 2 == 0)\n\t\t{\n\t\t\t//compares it to its parent and carries out the right action. \n\t\t\tif(object.compare(array[index], array[parent]) == 0)\n\t\t\t{\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[parent]) > 0)\n\t\t\t{\n\n\t\t\t\tT temp = array[parent];\n\t\t\t\tarray[parent] = array[index];\n\t\t\t\tarray[index] = temp;\n\n\n\t\t\t\tint y = parent;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\n\t\t\t\t\tT memp = array[(y -3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = memp;\n\n\t\t\t\t\ty = (y -3)/4;\n\t\t\t\t}\n\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\telse if(object.compare(array[index], array[parent]) < 0)\n\t\t\t{\n\t\t\t\tif(object.compare(array[index], array[gParent]) >= 0)\n\t\t\t\t{\n\t\t\t\t\tsize++;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t//switch till x > grandparent\n\t\t\t\t\tint y = index;\n\t\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y >2)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tT memp = array[(y -3)/4];\n\t\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\t\tarray[y] = memp;\n\n\t\t\t\t\t\ty = (y -3)/4;\n\t\t\t\t\t}\n\n\t\t\t\t\tsize++;\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(object.compare(array[index], array[parent]) == 0)\n\t\t\t{\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[parent]) > 0)\n\t\t\t{\n\t\t\t\tif(object.compare(array[index], array[gParent]) <= 0)\n\t\t\t\t{\n\t\t\t\t\tsize++;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//switch till x < grandparent\n\t\t\t\t\tint y = index;\n\t\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y >2)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tT memp = array[(y -3)/4];\n\t\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\t\tarray[y] = memp;\n\n\t\t\t\t\t\ty = (y -3)/4;\n\t\t\t\t\t}\n\n\t\t\t\t\tsize++;\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[parent]) < 0)\n\t\t\t{\n\t\t\t\tT temp = array[parent];\n\t\t\t\tarray[parent] = array[index];\n\t\t\t\tarray[index] = temp;\n\n\t\t\t\tint y = parent;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y >2)\n\t\t\t\t{\n\n\t\t\t\t\tT memp = array[(y -3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = memp;\n\n\t\t\t\t\ty = (y -3)/4;\n\t\t\t\t}\n\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\n\t\t\t}\n\t\t}\n\n\t}",
"public void insert(String word) {\n\t\t\n\t\tTrieNode current = root;\n\t\t\t\t\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\n\t\t\tCharacter ch = word.charAt(i);\n\t\t\t\n\t\t\tif (!current.getChild().containsKey(ch)) {\n\t\t\t\tTrieNode newNode = new TrieNode();\n\t\t\t\tcurrent.getChild().put(ch, newNode);\n\t\t\t}\n\t\t\t\n\t\t\tcurrent = current.getChild().get(ch);\t\n\t\t}\n\t\t\n\t\tcurrent.isLeaf = true;\t \n\t}",
"public MyStringBuilder2 insert(int offset, String str)\n\t{\n\t\tif(offset > length || offset < 0) {\n\t\t\t//do nothing\n\t\t} else if(offset == length) {\n\t\t\t//append if at the end\n\t\t\tthis.append(str);\n\t\t} else {\n\t\t\tif (offset == 0) {\n\t\t\t\t//add new nodes from the front\n\t\t\t\tCNode newNode = new CNode(str.charAt(0));\n\t\t\t\tnewNode.next = firstC;\n\t\t\t\tfirstC = newNode;\n\t\t\t\toffset++;\n\t\t\t\tlength++;\n\t\t\t\trecursiveInsert(offset, 1, str);\n\t\t\t} else {\n\t\t\t\toffset -= 1;\n\t\t\t\tCNode nodeBefore = getCNodeAt(offset, firstC);\n\t\t\t\tCNode nodeAfter = nodeBefore.next;\n\t\t\t\trecursiveInsertMiddle(0, str, nodeBefore, nodeAfter);\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn this;\n\t}",
"private void leftRotate(Entry<T> child, Entry<T> p) {\n\t\tif(p.parent != null) {\n\t\t\tif(p == p.parent.left)\n\t\t\t\tp.parent.left = child;\n\t\t\telse\n\t\t\t\tp.parent.right = child;\n\t\t}\n\t\tif(child.left != null)\n\t\t\tgetSplay(child.left).parent = p;\n\t\t\n\t\tchild.parent = p.parent;\n\t\tp.parent = child;\n\t\tp.right = child.left;\n\t\tchild.left = p;\n\t}",
"public void insert(String word) {\n TrieNode node = root;\n\n for (char c: word.toCharArray()) {\n if (node.children[c - 'a'] == null) \n node.children[c - 'a'] = new TrieNode();\n\n node = node.children[c - 'a'];\n }\n\n node.word = word;\n }",
"public void insert(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }",
"public void insert(String word) {\n TrieNode p = root;\n for (char c : word.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if (p.children[childIndex] == null) {\n p.children[childIndex] = new TrieNode();\n }\n p = p.children[childIndex];\n }\n p.isWord = true;\n }",
"private void moveToNextSplit() {\n closeCurrentSplit();\n\n if (_splits.hasNext()) {\n StashSplit split = _splits.next();\n String key = String.format(\"%s/%s\", _rootPath, split.getKey());\n _currentIterator = new StashSplitIterator(_s3, _bucket, key);\n } else {\n _currentIterator = null;\n }\n }",
"public void insert(String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }",
"public void insert(String word) {\n \tHashMap<Character, TrieNode> children=root.children;\n \tfor(int i=0;i<word.length();i++)\n \t{\n \t\tchar c=word.charAt(i);\n \t\tTrieNode t;\n \t\tif(children.get(c)!=null)\n \t\t{\n \t\t\tt=children.get(c);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tt=new TrieNode(c);\n \t\t\tchildren.put(c, t);\n \t\t}\n \t\tchildren=t.children;\n \t\tif(i==word.length()-1)\n \t\t\tt.leaf=true;\n \t}\n }",
"private void moveUp() {\r\n if(selectedNode != null && !selectedNode.isRoot()) {\r\n if(!selectedNode.isLeaf()) {\r\n TreePath path = selTreePath;\r\n int i = selectedNode.getParent().getChildCount();\r\n MutableTreeNode parent = (MutableTreeNode)selectedNode.getParent();\r\n int insertIndex = selectedNode.getParent().getIndex(selectedNode);\r\n if(insertIndex < i && insertIndex > 0) {\r\n changeSortOrder((selTreePath.getPathCount())-1,selectedValue,insertIndex);\r\n changeSortOrder((selTreePath.getPathCount())-1,selectedNode.getParent().getChildAt(insertIndex-1).toString(),insertIndex+1);\r\n model.removeNodeFromParent((MutableTreeNode)selectedNode);\r\n model.insertNodeInto((MutableTreeNode)selectedNode, parent, (insertIndex-1));\r\n sponsorHierarchyTree.setSelectionPath(path);\r\n saveRequired = true;\r\n }\r\n }else {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1253\"));\r\n }\r\n }\r\n }",
"private void bubbleUp(int index) {\n // TODO: YOUR CODE HERE\n E elem = getElement(index);\n E parent = getElement(getParentOf(index));\n int curr = index;\n while (parent != null && elem.compareTo(parent) < 0) {\n swap(curr, getParentOf(curr));\n curr = getParentOf(curr);\n if (curr == 1) {\n return;\n }\n parent = getElement(getParentOf(curr));\n }\n }",
"protected Node<T> removeFixupCase1(Node<T> u) {\n\t\tflipRight(u.parent);\n\t\treturn u;\n\t}",
"public void popPushCurPath(int childindex, SoNode node)\n\t {\n\t \t if (node == null) {\n\t \t\t this.currentpath.pop(); // pop off previous or NULL node\n\t \t\t this.currentpath.append(childindex);\n\t \t\t }\n\t \t\t else {\n\t \t\t this.currentpath.replaceTail(node, childindex);\n\t \t\t }\n\t }"
] | [
"0.63857424",
"0.62200415",
"0.57744247",
"0.5772111",
"0.5692136",
"0.5659993",
"0.5659993",
"0.5623765",
"0.560472",
"0.55841386",
"0.55666035",
"0.55599314",
"0.55527455",
"0.55472064",
"0.5536488",
"0.5529583",
"0.54977393",
"0.548428",
"0.5474178",
"0.54709864",
"0.54501694",
"0.5443455",
"0.5432466",
"0.5427598",
"0.5405755",
"0.539172",
"0.53894925",
"0.53638244",
"0.5357887",
"0.53527915",
"0.5344594",
"0.53299236",
"0.5319798",
"0.5314735",
"0.5294158",
"0.5287572",
"0.5280949",
"0.52808815",
"0.52659893",
"0.5247069",
"0.5246995",
"0.5237701",
"0.5236923",
"0.5210051",
"0.52081215",
"0.5207024",
"0.518391",
"0.5182946",
"0.51650894",
"0.51617414",
"0.5160428",
"0.5154272",
"0.51507175",
"0.5140887",
"0.51375455",
"0.5128208",
"0.51276326",
"0.5120696",
"0.5114483",
"0.51122653",
"0.51094496",
"0.5109184",
"0.510559",
"0.510165",
"0.5094472",
"0.50940734",
"0.5089678",
"0.5086686",
"0.50866497",
"0.5085776",
"0.5080359",
"0.5079365",
"0.507901",
"0.50773215",
"0.50736344",
"0.5071926",
"0.5071882",
"0.50673914",
"0.50668424",
"0.5066368",
"0.5061613",
"0.50536245",
"0.50535756",
"0.5052239",
"0.50479347",
"0.50466824",
"0.5041512",
"0.50412524",
"0.50368613",
"0.5025258",
"0.50079155",
"0.5006249",
"0.50060874",
"0.5005408",
"0.50009406",
"0.49993783",
"0.49843025",
"0.4981879",
"0.49813992",
"0.49811506"
] | 0.6162092 | 2 |
remove and return the root element, put the last element in root and put the heap in order | public String remove()
{
String result = null;
if (pointer > 0)
{
if (pointer == 1)
{
pointer--;
result = data[pointer];
}
else
{
String oldRoot = data[0];
String oldLast = data[pointer - 1];
data[0] = oldLast;
data[pointer - 1] = oldRoot;
pointer--;
result = data[pointer];
int parent = 0;
//left child
int childLeft = parent * 2 + 1;
while (childLeft < pointer)
{
//right child
int childRight = parent * 2 + 2;
//assume the mininum of the two children is left child
int childMin = childLeft;
if (childRight < pointer)
{
if (smallerThan(childRight, childLeft))
{
childMin = childRight;
}
}
if (smallerThan(childMin, parent))
{
//downheap
swap(childMin, parent);
parent = childMin;
childLeft = parent * 2 + 1;
}
}
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void heapifyRemove() {\n // this is called after the item at the bottom-left has been put at the root\n // we need to see if this item should swap down\n int node = 0;\n int left = 1;\n int right = 2;\n int next;\n\n // store the item at the root in temp\n T temp = heap[node];\n\n // find out where we might want to swap root \n if ((heap[left] == null) && (heap[right] == null)) {\n next = count; // no children, so no swapping\n return;\n } else if (heap[right] == null) {\n next = left; // we will check left child\n } else if (((Comparable) heap[left]).compareTo(heap[right]) > 0) { // figure out which is the biggest of the two children\n next = left; // left is bigger than right, so check left child\n } else {\n next = right; // check right child\n }\n\n // compare heap[next] to item temp, if bigger, swap, and then repeat process\n while ((next < count) && (((Comparable) heap[next]).compareTo(temp) > 0)) {\n heap[node] = heap[next];\n node = next;\n left = 2 * node + 1; // left child of current node\n right = 2 * (node + 1); // right child of current node\n if ((heap[left] == null) && (heap[right] == null)) {\n next = count;\n } else if (heap[right] == null) {\n next = left;\n } else if (((Comparable) heap[left]).compareTo(heap[right]) > 0) {\n next = left;\n } else {\n next = right;\n }\n }\n heap[node] = temp;\n\n }",
"public Node remove() {\n Node result = peek();\n\n //new root is last leaf\n heap[1] = heap[size];\n heap[size] = null;\n size--;\n\n //reconstruct heap\n shiftDown();\n\n return result;\n }",
"@Override\r\n\tpublic E remove() \r\n\t{\r\n\t\tif(theData.isEmpty())\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t//Save the top of the Heap.\r\n\t\tE result = theData.get(0);\r\n\t\t\r\n\t\t//If only one item then remove it.\r\n\t\tif(theData.size() == 1)\r\n\t\t{\r\n\t\t\ttheData.remove(0);\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Remove the last item from the ArrayList and place it into\r\n\t\t * the first position. \r\n\t\t*/\r\n\t\ttheData.set(0, theData.remove(theData.size() - 1));\r\n\t\t\r\n\t\t//The parent starts at the top.\r\n\t\tint parent = 0;\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tint leftChild = 2 * parent + 1;\r\n\t\t\tif(leftChild >= theData.size())\r\n\t\t\t{\r\n\t\t\t\tbreak; //Out of Heap.\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint rightChild = leftChild + 1;\r\n\t\t\tint minChild = leftChild; //Assume leftChild is smaller.\r\n\t\t\t\r\n\t\t\t//See whether rightChild is smaller.\r\n\t\t\tif(rightChild < theData.size()\r\n\t\t\t\t&& compare(theData.get(leftChild), theData.get(rightChild)) > 0)\r\n\t\t\t{\r\n\t\t\t\tminChild = rightChild;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//assert: minChild is the index of the smaller child.\r\n\t\t\t//Move smaller child up the heap if necessary.\r\n\t\t\tif(compare(theData.get(parent), theData.get(minChild)) > 0)\r\n\t\t\t{\r\n\t\t\t\tswap(parent, minChild);\r\n\t\t\t\tparent = minChild;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tbreak; //Heap property is restored.\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"private int deleteMax() {\n int ret = heap[0];\n heap[0] = heap[--size];\n\n // Move root back down\n int pos = 0;\n while (pos < size / 2) {\n int left = getLeftIdx(pos), right = getRightIdx(pos);\n\n // Compare left and right child elements and swap accordingly\n if (heap[pos] < heap[left] || heap[pos] < heap[right]) {\n if (heap[left] > heap[right]) {\n swap(pos, left);\n pos = left;\n } else {\n swap(pos, right);\n pos = right;\n }\n } else {\n break;\n }\n }\n\n return ret;\n }",
"@Override\n public T remove() throws NoSuchElementException {\n if (size() == 0) {\n // throws NoSuchElementException if the heap is empty\n throw new NoSuchElementException();\n }\n\n // Store the root of heap before it is removed\n T root = heap[0];\n // Replace root with last element in the heap\n heap[0] = heap[size() - 1];\n // Decrease number of elements by 1, removes the old root from heap\n nelems--;\n // Trickle down the new root to the appropriate level in the heap\n trickleDown(0);\n\n // Return the old root\n return root;\n }",
"private void heapifyAdd() {\n // TODO. The general idea of this method is that we are checking whether the \n // most recently added item, which has been put at the end of the array, \n //needs to be swapped with its parent. We do this in a loop, until a swap isn’t needed or we reach the root. This is not recursive.\n\n // Pseudocode:\n // assign newly added item to a temp var.\n // use an index variable to keep track of the index where that value was added\n // while the index isn’t pointing at the root, and while the node at this index is greater than the node at its parent:\n // copy the parent node to the index location (move parent node down the heap)\n // set the index to the parent index\n // when we are at the root, or the parent of current index isn’t bigger, we are done\n // copy the temp variable to the location of the current index. \n T temp;\n int next = count - 1;\n\n temp = heap[next];\n\n while ((next != 0) && (((Comparable) temp).compareTo(heap[(next - 1) / 2]) > 0)) {\n heap[next] = heap[(next - 1) / 2];\n next = (next - 1) / 2;\n }\n heap[next] = temp;\n }",
"public int remove() {\n int result = peek();\n\n // move rightmost leaf to become new root\n elementData[1] = elementData[size];\n size--;\n \n // \"bubble down\" root as necessary to fix ordering\n int index = 1;\n boolean found = false; // have we found the proper place yet?\n while (!found && hasLeftChild(index)) {\n int left = leftChild(index);\n int right = rightChild(index);\n int child = left;\n if (hasRightChild(index) &&\n elementData[right] < elementData[left]) {\n child = right;\n }\n \n if (elementData[index] > elementData[child]) {\n swap(elementData, index, child);\n index = child;\n } else {\n found = true; // found proper location; stop the loop\n }\n }\n \n return result;\n }",
"@Override\n public T removeMax() throws EmptyCollectionException {\n if (count == 0) {\n throw new EmptyCollectionException(\"Heap\");\n }\n T element = heap[0];\n // swap item at top of heap, with last item added\n heap[0] = heap[count - 1];\n // call heapify to see if new root needs to swap down\n heapifyRemove();\n\n count--;\n return element;\n }",
"private PersistentLinkedList<T> pop() {\n //the latest element won't become empty\n int index = this.treeSize - 1;\n Node<T> newRoot = new Node<>(branchingFactor);\n\n Node<T> currentNode = this.root;\n Node<T> currentNewNode = newRoot;\n\n ArrayList<Node<T>> newNodes = new ArrayList<>();\n newNodes.add(newRoot);\n ArrayList<Integer> newNodesIndices = new ArrayList<>();\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n TraverseData traverseData = traverseOneLevel(\n new TraverseData(currentNode, currentNewNode, newRoot, index, b));\n currentNode = traverseData.currentNode;\n currentNewNode = traverseData.currentNewNode;\n newNodes.add(currentNewNode);\n newNodesIndices.add(index / b);\n index = traverseData.index;\n }\n newNodesIndices.add(index);\n\n for (int i = 0; i < branchingFactor && i < index; i++) {\n currentNewNode.set(i, currentNode.get(i));\n }\n currentNewNode.set(index, null);\n\n if (index == 0) {\n int latestIndex = newNodes.size() - 2;\n newNodes.get(latestIndex).set(newNodesIndices.get(latestIndex), null);\n\n for (int i = latestIndex; i > 0; i--) {\n if (newNodesIndices.get(i) == 0) {\n newNodes.get(i - 1).set(newNodesIndices.get(i - 1), null);\n } else {\n break;\n }\n }\n }\n\n if (newNodes.size() > 1) {\n int nonNullChildren = 0;\n for (Node<T> child : newRoot.children) {\n if (child != null) {\n nonNullChildren++;\n }\n }\n if (nonNullChildren == 1) { //need new root\n newRoot = newRoot.get(0);\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth - 1,\n this.base / branchingFactor, this.treeSize - 1, unusedTreeIndices,\n indexCorrespondingToTheFirstElement, indexCorrespondingToTheLatestElement);\n }\n }\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth, this.base,\n this.treeSize - 1, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }",
"private void fixHeap(){\r\n int i = 1;\r\n int v = array[i].value.getYear();\r\n while(hasChildren(i)){\r\n Node left = array[getLeftChildIndex(i)];\r\n Node right = array[getRightChildIndex(i)];\r\n if(left != null){\r\n if(right != null){\r\n if(left.value.getYear() < right.value.getYear()){\r\n if(v > left.value.getYear()){\r\n swap(array[i], left);\r\n i = getLeftChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n else{\r\n if(v > right.value.getYear()){\r\n swap(array[i], right);\r\n i = getRightChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n if(v > left.value.getYear()){\r\n swap(array[i], left);\r\n i = getLeftChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n\r\n }",
"public LeftistHeap() {\n root = null;\n }",
"protected void pushDownRoot(int root){\n int heapSize = data.size();\n Bloque value = (Bloque)data.get(root);\n while (root < heapSize) {\n int childpos = left(root);\n if (childpos < heapSize)\n {\n if ((right(root) < heapSize) && (((Bloque)data.get(childpos+1)).compareTo((Bloque)data.get(childpos)) > 0)){\n childpos++;\n }\n // Assert: childpos indexes smaller of two children\n if (((Bloque)data.get(childpos)).compareTo(value) > 0){\n data.set(root,data.get(childpos));\n root = childpos; // keep moving down\n } else { // found right location\n data.set(root,value);\n return;\n }\n } else { // at a leaf! insert and halt\n data.set(root,value);\n return;\n }\n }\n }",
"protected int removeLast() {\n if (size > 0) {\n return heap[size--];\n }\n return null;\n }",
"private static Node delMin(ArrayList<Node> minHeap) {\n\t\tNode min = minHeap.remove(1);\n\t\t//put last element first\n\t\tint n = minHeap.size();\n\t\tif (n==1) return min;\n\t\tNode last = minHeap.remove(n-1);\n\t\tminHeap.add(1, last);\n\t\t//sink the new top to its right position\n\t\tsink(minHeap);\n\t\treturn min;\n\t}",
"public T deleteMin()\n {\n // to handle empty excpetion\n if(size == 0)\n {\n throw new MyException(\"Heap is empty.\");\n }\n\n // create int hole, set to 0\n int hole = 0;\n // create return value as the item at index hole\n T returnValue = arr[hole];\n // create item to be last item of heap\n T item = arr[size-1];\n // decrement size\n size--;\n // call newHole() method to get newhole\n int newhole = newHole(hole, item);\n while(newhole != -1)\n {\n // set value of arr[newhole] to be arr[hole]\n arr[hole] = arr[newhole];\n // hole is now whatever newhole was\n hole = newhole;\n // update newhole by calling newHole()\n newhole = newHole(hole, item);\n }\n // put item where the hole is in the heap\n arr[hole] = item;\n return returnValue;\n }",
"public E poll() {\r\n if (isEmpty()) {\r\n return null;\r\n }\r\n //first element of heap\r\n E result = theData.get(0).data;\r\n\r\n if (theData.size() == 1 && theData.get(theData.size()-1).count == 1 ) {\r\n theData.remove(0);\r\n return result;\r\n }\r\n //deleting first element of heap\r\n if (theData.get(0).count == 1 ){\r\n theData.set(0, theData.remove(theData.size() - 1));\r\n\r\n fixHeap(0);\r\n }else{ //first element of heap if exist more than 1, decreases count\r\n theData.get(0).count-=1;\r\n }\r\n //fixes heap\r\n fixHeap(0);\r\n\r\n return result;\r\n }",
"public static int delete(int[] arr,int heapSize)//SortedInDecendingOrder(MinHeap)\n\t{\n\t\t/*Replaceing Last Element With Min-Root & Heapifying*/\n\t\t//Replacing\n\t\tint temp=arr[0];\n\t\tarr[0]=arr[heapSize-1];\n\t\theapSize--;\n\t\t//Heapifying\n\t\tint parentIndex=0;\n\t\tint leftIndex=1;\n\t\tint rightIndex=2;\n\t\tint minIndex=parentIndex;\n\t\twhile(leftIndex<heapSize)\n\t\t{\n\t\t\tif(arr[leftIndex]<arr[minIndex])\n\t\t\t\tminIndex=leftIndex;\n\t\t\tif(rightIndex<heapSize && arr[rightIndex]<arr[minIndex])\n\t\t\t\tminIndex=rightIndex;\n\t\t\tif(minIndex!=parentIndex)//SWAP\n\t\t\t{\n\t\t\t\tint t=arr[parentIndex];\n\t\t\t\tarr[parentIndex]=arr[minIndex];\n\t\t\t\tarr[minIndex]=t;\n\t\t\t\tparentIndex=minIndex;\n\t\t\t\tleftIndex=2*parentIndex+1;\n\t\t\t\trightIndex=leftIndex+1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\treturn temp;\n\t}",
"private void heapify() {\n\t\tint currIndex = 0;\n\t\twhile (currIndex < heapSize) {\n\t\t\tT val = lstEle.get(currIndex);\n\t\t\tint leftSubtreeIndex = getLeftSubtree(currIndex);\n\t\t\tint rightSubtreeIndex = getRightSubtree(currIndex);\n\t\t\tT leftChildVal = leftSubtreeIndex < heapSize ? lstEle.get(leftSubtreeIndex) : null;\n\t\t\tT rightChildVal = rightSubtreeIndex < heapSize ? lstEle.get(rightSubtreeIndex) : null;\n\t\t\t\n\t\t\tT minVal = null;\n\t\t\tint minValIndex = -1;\n\t\t\tif(leftChildVal != null && rightChildVal != null){\n\t\t\t\tint compVal = leftChildVal.compareTo(rightChildVal); \n\t\t\t\tif(compVal < 0){\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t}else {\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(leftChildVal != null && leftChildVal.compareTo(val) < 0){\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t}else if (rightChildVal != null && rightChildVal.compareTo(val) < 0 ){\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\tMin Val : \" +minVal +\" --> \" +minValIndex);\n\t\t\t\n\t\t\tlstEle.set(currIndex, minVal);\n\t\t\tcurrIndex = minValIndex;\n\t\t\tlstEle.set(minValIndex, val);\n\t\t\t\n\t\t}\n\n\t}",
"public void deleteMin() {\r\n\t\tif (empty())\r\n\t\t\treturn;\r\n\t\telse {\r\n\t\t\tif (this.size > 0) {\r\n\t\t\t\tthis.size--;\r\n\t\t\t}\r\n\t\t\tif (this.size == 0) {\r\n\t\t\t\tthis.empty = true;\r\n\t\t\t}\r\n\r\n\t\t\tHeapNode hN = this.min;\r\n\t\t\tint rnkCount = 0;\r\n\t\t\tHeapNode hNIterator = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\trnkCount++;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t}\r\n\t\t\tthis.HeapTreesArray[rnkCount] = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\trnkCount--;\r\n\t\t\tBinomialHeap bH = new BinomialHeap();\r\n\t\t\tif (hNIterator != null) {\r\n\t\t\t\tbH.empty = false;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\tbH.HeapTreesArray[rnkCount] = hNIterator;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t\tbH.HeapTreesArray[rnkCount].rightBrother = null;\r\n\t\t\t\tif (hNIterator != null) {\r\n\t\t\t\t\thNIterator.leftBrother = null;\r\n\t\t\t\t}\r\n\t\t\t\trnkCount = rnkCount - 1;\r\n\t\t\t}\r\n\t\t\tthis.min = null;\r\n\t\t\tfor (int i = 0; i < this.HeapTreesArray.length; i++) {\r\n\t\t\t\tif (this.min == null) {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tif (this.HeapTreesArray[i].value < this.min.value) {\r\n\t\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!bH.empty()) {\r\n\t\t\t\tfor (int i = 0; i < bH.HeapTreesArray.length; i++) {\r\n\t\t\t\t\tif (bH.min == null) {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tif (bH.HeapTreesArray[i].value < bH.min.value) {\r\n\t\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.meld(bH);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public Node deleteMin() {\n\t\t// if the heap is empty\n\t\t// return MAXINT as output\n\t\tNode min = new Node(Integer.MAX_VALUE);\n\t\tif(this.head == null)\n\t\t\treturn min;\n\t\t\n\t\t\n\t\tNode prevMin = null;\n\t\tNode curr = this.head;\n\t\tNode prev = null;\n\t\t\n\t\t// find the smallest node\n\t\t// keep track of node who points to this minimum node\n\t\twhile(curr!=null) {\n\t\t\tif(curr.key<min.key) {\n\t\t\t\tmin = curr;\n\t\t\t\tprevMin = prev;\n\t\t\t}\n\t\t\tprev = curr;\n\t\t\tcurr = curr.rightSibling;\n\t\t}\n\t\t\n\t\t// if its the head then move one pointer ahead\n\t\tif(prevMin == null)\n\t\t\tthis.head = min.rightSibling;\n\t\telse {\n\t\t\t// else attach the previous node to the rightSibling of min\n\t\t\tprevMin.rightSibling = min.rightSibling;\n\t\t}\n\t\tmin.rightSibling = null;\n\t\t\n\t\t//return min node\n\t\treturn min;\n\t}",
"public MinHeapNode<T> deleMin() {\n\t\tif(!isEmpty()) { \r\n\t\t\tMinHeapNode<T> min = heap[1]; //min node\r\n\t heap[1] = heap[currentSize--]; //move bottom node to root\r\n\t heapDown(1); //move root down\r\n\t return min; \r\n\t } \r\n\t return null; \r\n\t}",
"public E deleteMax() {\r\n\t\tE max = null;\r\n\t\tif (currentIndex > 0) { // replace the root of heap with the last element on the last level\r\n\t\t\tmax = heap.get(0); // save current max\r\n\t\t\t\r\n\t\t\theap.set(0, heap.get(currentIndex - 1));\r\n\t\t\theap.remove(currentIndex - 1);\r\n\t\t\tcurrentIndex--;\r\n\t\t\t\r\n\t\t\theapifyDown(0); // re-heapify\r\n\t\t}\r\n\t\treturn max; // if tree is empty, returns null\r\n\t}",
"@Override\n public E remove() {\n if (size == 0){\n throw new NoSuchElementException();\n }\n E removed = heap[0];\n heap[0] = heap[--size];\n siftDown(0);\n return removed;\n }",
"public int pop(){\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\tswap(0,size()-1);\n\t\t\tPair p=heap.remove(size()-1);\n\t\t\tlocation.remove(p.element);\n\t\t\tpushDownRoot();\n\t\t\treturn (int) p.element;\n\t\t}\n\t\t\n\t}",
"public FHeapNode removeMax()\r\n {\r\n FHeapNode z = maxNode;\r\n //hmap.remove(maxNode.gethashtag());\t\t\t\t\t\t\t\t\t\t//remove the node from the hashtable\r\n \r\n if (z != null) \r\n\t\t{\r\n \t for (HashMap.Entry<String, FHeapNode> entry : hmap.entrySet()) \r\n {\r\n \tif(entry.getValue() == maxNode)\r\n \t{\r\n \t\thmap.remove(entry.getKey());\r\n \t\tbreak;\r\n \t}\r\n }\r\n \t \r\n int numKids = z.degree;\r\n FHeapNode x = z.child;\r\n FHeapNode tempRight;\r\n\r\n while (numKids > 0) \t\t\t\t\t\t\t\t\t\t\t\t\t// iterate trough all the children of the max node\r\n\t\t\t{\r\n tempRight = x.right; \r\n x.left.right = x.right;\t\t\t\t\t\t\t\t\t\t\t\t// remove x from child list\r\n x.right.left = x.left;\r\n \r\n x.left = maxNode;\t\t\t\t\t\t\t\t\t\t\t\t\t// add x to root list of heap\r\n x.right = maxNode.right;\r\n maxNode.right = x;\r\n x.right.left = x;\r\n \r\n x.parent = null;\t\t\t\t\t\t\t\t\t\t\t\t\t// set parent[x] to null\r\n x = tempRight;\r\n numKids--;\r\n }\r\n\t\t\tz.left.right = z.right;\t\t\t\t\t\t\t\t\t\t\t\t\t// remove z from root list of heap\r\n z.right.left = z.left;\r\n\r\n if (z == z.right)\r\n\t\t\t{\r\n maxNode = null;\r\n } \r\n\t\t\telse \r\n\t\t\t{\r\n maxNode = z.right;\r\n meld();\r\n } \r\n nNodes--;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// decrement size of heap\r\n }\r\n \r\n\r\n return z;\r\n }",
"public int remove() \r\n { \r\n int v = h[1];\r\n hPos[v] = 0; // v is no longer in heap\r\n h[N+1] = 0; // put null node into empty spot\r\n \r\n h[1] = h[N--];\r\n siftDown(1);\r\n \r\n return v;\r\n }",
"protected void siftUp() {\r\n\t\tint child = theHeap.size() - 1, parent;\r\n\r\n\t\twhile (child > 0) {\r\n\t\t\tparent = (child - 1) >> 1;\t// >> 1 is slightly faster than / 2\r\n\t\t\t\t\t\t\t\t\t\t// => parent = (child - 1) / 2\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tchild = parent;\r\n\t\t}\r\n\t}",
"private Node removeElement() {\n if (this.leftChild != null) {\n if (this.rightChild != null) {\n Node current = this.rightChild;\n\n while (current.leftChild != null) {\n current = current.leftChild;\n }\n\n //swap\n E value = this.value;\n this.value = current.value;\n current.value = value;\n\n this.rightChild = this.rightChild.removeElement(current.value);\n return this.balance();\n } else {\n return this.leftChild;\n }\n } else {\n return this.rightChild;\n }\n }",
"private void shiftUp() {\n int index = this.size;\n\n while (hasParent(index) && (parent(index).compareTo(heap[index]) > 0)) {\n swap(index, parentIndex(index));\n index = parentIndex(index);\n }\n }",
"public Node<E> remove_first_node(){\r\n if (theData.size() <= 0) return null;\r\n\r\n Node<E> item = new Node<E>(theData.get(0).getData());\r\n item.data = theData.get(0).getData();\r\n item.count = theData.get(0).getCount();\r\n\r\n if (theData.get(0).count == 1 ){\r\n\r\n if(0 != theData.size()-1){\r\n theData.set(0, theData.remove(theData.size() - 1));\r\n fixHeap(0);\r\n }else {\r\n theData.remove(theData.size() - 1);\r\n }\r\n\r\n\r\n }else{\r\n theData.get(0).count-=1;\r\n remove_first_node();\r\n }\r\n\r\n return item;\r\n }",
"public Task poll() \n\t{\n\t\tif(this.isEmpty())\n\t\t{\n\t\t\tSystem.out.println(\"Cannot remove from an empty list.\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tint parent = 1;\n\t\tint child = 2;\n\t\tTask newTask = heap[1];\n\t\tTask temp = heap[size--];\n\t\t\n\t\twhile(child <= size)\n\t\t{\n\t\t\tif(child < size && heap[child].getPriority() > heap[child + 1].getPriority())\n\t\t\t{\n\t\t\t\tchild++;\n\t\t\t}\n\t\t\tif(temp.getPriority() <= heap[child].getPriority())\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\theap[parent] = heap[child];\n\t\t\tparent = child;\n\t\t\tchild *= 2;\n\t\t\t\n\t\t}\n\t\t\n\t\theap[parent] = temp;\n\t\treturn newTask;\n\t}",
"public T poll() {\n if (size == 0)\n return null;\n int s = --size;\n T result = (T) heap[0];\n T backup = (T) heap[s];\n heap[s] = null; // delete\n if (s != 0)\n siftDown(0, backup);\n return result;\n }",
"public static void adjustHeap(int []arr,int i,int length){\n int temp=arr[i];//first get current value/item\n for(int k=i*2+1;k<length;k=k*2+1){//from the left child of current item,in other word,the 2i+1 item\n if(k+1<length&&arr[k]<arr[k+1]){//if the left child is less than the right child ,let k point to right child\n k++;\n }\n if(arr[k]>temp){//if k item-the max of left-right child is more than i item ,swap it ,and maybe k item and his child need to change\n arr[i]=arr[k];\n i=k;\n }else{\n break;\n }\n }\n arr[i]=temp;//place the temp=arr[i] at right position\n }",
"private A deleteLargest(int subtree) {\n return null; \n }",
"public AnyType deleteMin() throws NoSuchElementException {\n\t\t\n\t\t// if the heap is empty, throw a NoSuchElementException\n\t\tif(this.size() == 0){\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\n\t\t// store the minimum item so that it may be returned at the end\n\t\tAnyType minValue = this.findMin();\n\n\t\t// replace the item at minIndex with the last item in the tree\n\t\tAnyType lastValue = this.array[this.size()-1];\n\t\tthis.array[0] = lastValue;\n\t\tthis.array[this.size() - 1] = null;\n\t\t\n\t\t// update size\n\t\tthis.currentSize--;\n\n\t\t// percolate the item at minIndex down the tree until heap order is restored\n\t\t// It is STRONGLY recommended that you write a percolateDown helper method!\n\t\tthis.percolateDown(0);\n\t\t\n\t\t// return the minimum item that was stored\n\t\treturn minValue;\n\t}",
"protected int removeFirst() throws Exception {\n if (size > 0) {\n int temp = heap[1];\n heap[1] = heap[size];\n heap[size] = 0;\n size--;\n return temp;\n } else {\n throw new Exception(\"No Item in the heap\");\n }\n }",
"void replaceMin(Node root) {\n\t\tarr[0] = root;\n\t\tminHeapify(0);\n\t}",
"void buildHeap() {\n\tfor(int i=parent(size-1); i>=0; i--) {\n\t percolateDown(i);\n\t}\n }",
"private static <T> void siftUp (HeapSet<T> heap, int start) {\r\n\t\tint child = start;\r\n\t\twhile (child > 0) {\r\n\t\t\tint remainder = (child - 1) % 2;\r\n\t\t\tint root = ((child - 1) - remainder) / 2;\r\n\t\t\tif (((Comparable<? super T>) heap._list.get (root)).compareTo (heap._list.get (child)) < 0) {\r\n\t\t\t\tCollections.swap (heap._list, root, child);\r\n\t\t\t\tHeapSet.fireEvent (heap, root, child);\r\n\t\t\t\tchild = root;\r\n\t\t\t} else {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Node<E> remove_min_node(){\r\n if (theData.size() <= 0) return null;\r\n\r\n int index = 0 ;\r\n E min = theData.get(0).getData();\r\n //searching min element\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n index = i;\r\n }\r\n }\r\n\r\n //copying element for return\r\n Node<E> item = new Node<E>(theData.get(index).getData());\r\n item.data = theData.get(index).getData();\r\n item.count = theData.get(index).getCount();\r\n\r\n //removing all occurances\r\n while (theData.get(index).count > 1)\r\n theData.get(index).count-=1;\r\n\r\n if (theData.get(index).count == 1 ){\r\n\r\n if(index != theData.size()-1){\r\n theData.set(index, theData.remove(theData.size() - 1));\r\n fixHeap(index);\r\n }else\r\n theData.remove(theData.size() - 1);\r\n }\r\n return item;\r\n }",
"public Node binomialHeapExtractMin() {\n\t\tNode x = this.deleteMin();\n\t\t\n\t\t// make a new heap\n\t\t// reverse the child list of x and assign it to the head of new heap.\n\t\tBinomialHeap hPrime = new BinomialHeap();\n\t\thPrime.head = reverseLinkedList(x.leftChild);\n\t\t\n\t\t// perform union on the child tree list of x and the original heap\n\t\tBinomialHeap h = this.binomialHeapUnion(hPrime);\n\t\tthis.head = h.head;\n\t\t\n\t\t// return the minimum node\n\t\treturn x;\n\t}",
"public E remove() {\n if (list.size() == 0) return null;\n\n E removeObject = list.get(0);\n list.set(0, list.get(list.size() - 1));\n list.remove(list.size() - 1);\n\n int currentIndex = 0;\n while(currentIndex < list.size()) {\n int leftChildIndex = 2 * currentIndex + 1;\n int rightChildIndex = 2 * currentIndex + 2;\n\n // Find the largest child\n if (leftChildIndex >= list.size()) break;\n int maxIndex = leftChildIndex;\n if (rightChildIndex < list.size()) {\n if (list.get(maxIndex).compareTo(list.get(rightChildIndex)) < 0) {\n maxIndex = rightChildIndex;\n }\n }\n\n // Swap if the current node is less than the largest child\n if (list.get(currentIndex).compareTo(list.get(maxIndex)) < 0) {\n E temp = list.get(maxIndex);\n list.set(maxIndex, list.get(currentIndex));\n list.set(currentIndex, temp);\n currentIndex = maxIndex;\n } else {\n break;\n }\n }\n\n return removeObject;\n }",
"void buildHeap() {\n for (int i = parent(size - 1); i >= 0; i--) {\n percolateDown(i);\n }\n }",
"public Vertex HeapExtractMin() {\n\n if (size == 1) {\n \t\n Vertex min = ver[0];\n size--;\n return min;\n }\n\n // Getting the last element and making it root element of the binary tree\n Vertex min = ver[0];\n Vertex lastItem = ver[size-1];\n ver[0]= lastItem;\n size--;\n // Calling heapMinHeapify to maintain heap property\n heapMinHeapify(0);\n return min;\n }",
"public int delete() {\r\n int ret = heap.get(0);\r\n heap.set(0, heap.get(heap.size() - 1));\r\n heap.remove(heap.size() - 1);\r\n\r\n siftDown(0);\r\n\r\n return ret;\r\n }",
"public void balanceHeaps(){\n \n //If max heap size is greater than min heap then pop the first element and put int min heap\n if(maxHeap.size() > minHeap.size())\n minHeap.add(maxHeap.pollFirst());\n\n }",
"void reheap (int a[], int length, int i) throws Exception {\n boolean done = false;\n int T = a[i];\n int parent = i;\n int child = 2*(i+1)-1;\n while ((child < length) && (!done)) {\n compex(parent, child);\n pause();\n if (child < length - 1) {\n if (a[child] < a[child + 1]) {\n child += 1;\n }\n }\n if (T >= a[child]) {\n done = true;\n }\n else {\n a[parent] = a[child];\n parent = child;\n child = 2*(parent+1)-1;\n }\n }\n a[parent] = T;\n }",
"private void heapDown(int position) {\n\t\tMinHeapNode<T> temp = heap[position]; \r\n\t\tint child; \r\n\t\tfor (; position * 2 <= currentSize; position = child) { \r\n\t\t\tchild = 2 * position; //get child\r\n\t\t\tif (child != currentSize && heap[child + 1].getTime() < heap[child].getTime()) \r\n\t\t\t\tchild++; \r\n\t if (heap[child].getTime() < temp.getTime()) //child < node\r\n\t \theap[position] = heap[child]; //move child up \r\n\t else \r\n\t break; \r\n\t } \r\n\t heap[position] = temp; \r\n\t }",
"protected void siftDown() {\r\n\t\tint parent = 0, child = (parent << 1) + 1;// preguntar porque 0 y no 1\r\n\t\t\r\n\t\twhile (child < theHeap.size()) {\r\n\t\t\tif (child < theHeap.size() - 1\r\n\t\t\t\t\t&& compare(theHeap.get(child), theHeap.get(child + 1)) > 0)\r\n\t\t\t\tchild++; // child is the right child (child = (2 * parent) + 2)\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tparent = child;\r\n\t\t\tchild = (parent << 1) + 1; // => child = (2 * parent) + 1\r\n\t\t}\r\n\t}",
"public static void heapify() {\n //배열을 heap 자료형으로 만든다.\n // 1d 2d 2d 3d 3d 3d 3d 4d\n// int[] numbers = {9, 12, 1, 3, 6, 2, 8, 4};\n // 1depth의 자식노드 numbers[2i], numbers[2i+1]\n int[] numbers = {4, 1, 3, 2, 16, 9, 10, 14, 8, 7};\n int i = 1;\n while (true) {\n int target = numbers[i-1];\n int left = numbers[2*i-1];\n\n if (2*i == numbers.length) {\n if (left > target){\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n print(numbers);\n break;\n }\n int right =numbers[2*i];\n\n if (left > right) {\n if(left > target) {\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n }else if (right > left) {\n if (right > target) {\n numbers[i-1] = right;\n numbers[2*i] = target;\n }\n }\n i++;\n\n print(numbers);\n }\n\n }",
"public void breadthFirstSearch(){\n Deque<Node> q = new ArrayDeque<>(); // In an interview just write Queue ? Issue is java 8 only has priority queue, \n // meaning I have to pass it a COMPARABLE for the Node class\n if (this.root == null){\n return;\n }\n \n q.add(this.root);\n while(q.isEmpty() == false){\n Node n = (Node) q.remove();\n System.out.print(n.val + \", \");\n if (n.left != null){\n q.add(n.left);\n }\n if (n.right != null){\n q.add(n.right);\n }\n }\n }",
"private static <T> void siftDown (HeapSet<T> heap, int start, int size) {\r\n\t\tint root = start;\r\n\t\twhile (root * 2 + 1 < size) {\r\n\t\t\tint child = root * 2 + 1;\r\n\t\t\tif ((child < size - 1) && (((Comparable<? super T>) heap._list.get (child)).compareTo (heap._list.get (child + 1)) < 0))\r\n\t\t\t\t++child;\r\n\t\t\tif (((Comparable<? super T>) heap._list.get (root)).compareTo (heap._list.get (child)) < 0) {\r\n\t\t\t\tCollections.swap (heap._list, root, child);\r\n\t\t\t\tHeapSet.fireEvent (heap, root, child);\r\n\t\t\t\troot = child;\r\n\t\t\t} else {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void setMinHeap() {\n // parentIndex is the last leaf node parentIndex\n int parentIndex = (array.length - 2) / 2;\n // from last parentIndex down on the depth path to the root\n // convert to minHeap\n while (parentIndex >= 0) { // when parentIndex = 0, the root\n minHeapify(parentIndex, array.length);\n // go to next index(parentIndex) on that level\n parentIndex--;\n }\n }",
"boolean remMinEltTester(IHeap Heap, IBinTree Tree){\n\t\t\tLinkedList<Integer> treeResult2 = Tree.getTreeList();\n\t\t\tLinkedList<Integer> newHeapList2 = Heap.getTreeList();\n\t\t\t\n\t\t\tnewHeapList2.sort(null);\n\t\t\t\n\t\t\tif (newHeapList2.size() > 0) {\n\t\t\t\tnewHeapList2.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\ttreeResult2.sort(null);\n\t\t\t\n\t\t\t\n\t\t\treturn ((treeResult2.equals(newHeapList2)) && Heap.isHeap());\n\t\t}",
"private void process(TreeNode root){\n while(root!=null){\n dq.push(root);\n root= root.left;\n }\n }",
"@Override\n protected void downHeap(int k)\n {\n while (2 * k <= this.count)\n {\n //identify which of the 2 children are smaller\n int j = 2 * k;\n if (j < this.count && this.isGreater(j, j + 1))\n {\n j++;\n }\n //if the current value is < the smaller child, we're done\n if (!this.isGreater(k, j))\n {\n break;\n }\n //if not, swap and continue testing\n this.swap(k, j);\n k = j;\n }\n \tthis.elementsToArrayIndex.put(elements[k], k);\n }",
"private void fixHeap(int indexItem){\r\n int child = indexItem;\r\n int parent = get_parent(child);\r\n // Fixing heap for upperbounds\r\n while (parent >= 0 && compare(theData.get(parent).data, theData.get(child).data) < 0) {\r\n swap(parent, child);\r\n child = parent;\r\n parent = get_parent(child);\r\n }\r\n\r\n parent = indexItem;\r\n\r\n // Fixing heap for lowerbounds\r\n while (true) {\r\n int leftChild = get_left_child(parent);\r\n if (leftChild >= theData.size()) {\r\n break;\r\n }\r\n int rightChild = leftChild + 1;\r\n int maxChild = leftChild;\r\n\r\n if (rightChild < theData.size() && compare(theData.get(leftChild).data, theData.get(rightChild).data) < 0) {\r\n maxChild = rightChild;\r\n }\r\n\r\n if (compare(theData.get(parent).data, theData.get(maxChild).data) < 0) {\r\n swap(parent, maxChild);\r\n parent = maxChild;\r\n } else {\r\n break;\r\n }\r\n }\r\n }",
"@Override\r\n public CustomProcess removeBest() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty, cannot remove from empty queue\");\r\n }\r\n CustomProcess best = data[0]; // process to be removed\r\n data[0] = data[size - 1];\r\n data[size - 1] = null;\r\n minHeapPercolateDown(0); // Percolate down on first index\r\n size--;\r\n return best;\r\n }",
"private void minHeapify(int position) {\n // if root, nothing to do\n if (position == 0) {\n return;\n }\n int parent = (int) Math.floor((position - 1) / 2);\n // if child is smaller than parent, swap them and call the method\n // again on the new parent\n if (((Comparable<E>) array[position]).compareTo(array[parent]) < 0) {\n swap(position, parent);\n minHeapify(parent);\n }\n }",
"public void insert(T val) {\n\t\tlstEle.add(val);\n\t\theapSize++;\n\t\t// Need to move up the tree and satisfy the heap property\n\t\tint currIndex = heapSize - 1;\n\t\tint parentIndex = getParent(currIndex);\n\t\tif (parentIndex >= 0) {\n\t\t\tdo {\n\t\t\t\tT parentVal = lstEle.get(parentIndex);\n\t\t\t\tif (parentVal.compareTo(val) > 0) {\n\t\t\t\t\tlstEle.set(parentIndex, val);\n\t\t\t\t\tlstEle.set(currIndex, parentVal);\n\t\t\t\t\tcurrIndex = parentIndex;\n\t\t\t\t\tparentIndex = getParent(currIndex);\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (parentIndex >= 0);\n\t\t}else{\n\t\t\t//do nothing\n\t\t}\n\t\t\n\t}",
"public T extractMin() {\n\t\tif (heapSize > 0) {\n\t\t\tSystem.out.print(\"LIST: \" );\n\t\t\tprintList();\n\t\t\tT retEle = lstEle.get(0);\n\t\t\tSystem.out.println(\"\\tRemoving : \" +retEle);\n\t\t\tlstEle.set(0, lstEle.get(heapSize - 1));\n\t\t\tlstEle.set(heapSize - 1, null);\n\t\t\theapSize--;\n\t\t\theapify();\n\t\t\tSystem.out.print(\"After HEAPIFY : \");\n\t\t\tprintList();\n\t\t\treturn retEle;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public void postorder()\r\n {\r\n postorder(root);\r\n }",
"private BinaryNode<AnyType> remove( AnyType x, BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t == null )\r\n\t\t\treturn t; // Item not found; do nothing\r\n\r\n\t\tint compareResult = x.compareTo( t.element );\r\n\r\n\t\tif( compareResult < 0 )\r\n\t\t\tt.left = remove( x, t.left );\r\n\t\telse if( compareResult > 0 )\r\n\t\t\tt.right = remove( x, t.right );\r\n\t\telse if( t.left != null && t.right != null ) // Two children\r\n\t\t{\r\n\t\t\tt.element = findMin( t.right ).element;\r\n\t\t\tt.right = remove( t.element, t.right );\r\n\t\t}\r\n\t\telse\r\n\t\t\tt = ( t.left != null ) ? t.left : t.right;\r\n\t\treturn t;\r\n\t}",
"public Node<Integer> deleteNode(Node<Integer> root, Integer element) {\n\t\tNode<Integer> temp = null;\n\t\tif (root == null) {\n\t\t\tSystem.out.println(\"Element: \" + element + \"not present in tree.\");\n\t\t\treturn root;\n\t\t} else if (element < root.item) {\n\t\t\troot.left = deleteNode(root.left, element);\n\t\t} else if (element > root.item) {\n\t\t\troot.right = deleteNode(root.right, element);\n\t\t} else {\n\t\t\t// element found\n\t\t\tif (null != root.left && null != root.right) {\n\t\t\t\ttemp = findMax(root.left);\n\t\t\t\troot.item = temp.item;\n\t\t\t\troot.left = deleteNode(root.left, temp.item);\n\t\t\t} else {\n\t\t\t\t// One child node\n\t\t\t\ttemp = root;\n\t\t\t\tif (null == root.left) {\n\t\t\t\t\troot = root.right;\n\t\t\t\t} else if (null == root.right) {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn root;\n\t}",
"public T deleteMin()\n\t{\t\n\t\t//declating variables\n\t\tint minIndex = 0;\n\t\tboolean flag = false;\n\t\tboolean flag2 = false;\n\t\t//if size == 0; returns null\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t//if checks size and deletes accordingly.\n\t\tif(size == 1)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tarray[0] = null;\n\t\t\tsize--;\n\t\t\treturn tempo;\n\n\t\t}\n\n\t\tif(size == 2)\n\t\t{\n\t\t\tT temp = array[0];\n\t\t\tarray[0] = array[1];\n\t\t\tarray[1] = null;\n\t\t\tsize--;\n\t\t\treturn temp;\n\n\t\t}\n\t\tif(size == 3)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tint small = grandChildMin(1, 2);\n\t\t\tarray[0] = array[small];\n\t\t\tif(small == 2)\n\t\t\t{\n\t\t\t\tarray[small] = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray[1] = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t}\n\n\t\t\tsize--;\n\t\t\treturn tempo;\n\t\t}\n\n\t\t//if size > 3 does sophisticated deleting\n\t\tT temp = array[0];\n\t\tarray[0] = array[size-1];\n\t\tarray[size-1] = null;\n\t\tsize--;\n\t\tint index = 0;\n\n\t\t//gets the smallest of the children & grandchildren\n\t\tint smallest = min(index).get(0);\n\t\t//while it has grandchildren, keeps going\n\t\twhile(smallest != 0)\n\t\t{\n\t\t\t//doesn't switch if im less than the smallest grandchild\n\t\t\t//& breaks\n\t\t\tif(object.compare(array[index], array[smallest]) <= 0 )\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//special case when i could switch with child or grandchild\n\t\t\tif( min(index).size() > 1)\n\t\t\t{\n\t\t\t\tflag2 = true;\n\t\t\t}\n\n\t\t\t//switches the locations and updates index\n\t\t\tT lemp = array[index];\n\t\t\tarray[index] = array[smallest];\n\t\t\tarray[smallest] = lemp;\n\t\t\tindex = smallest;\n\t\t\tsmallest = min(smallest).get(0);\n\n\t\t}\n\t\t//if i dont switch, i check if i have to switch then percolate back up\n\t\tif(flag == true)\n\t\t{\n\t\t\tif(object.compare(array[index], array[grandChildMin(2*index+1, 2*index+2)]) > 0)\n\t\t\t{\n\t\t\t\tint mIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\t\tT k = array[mIndex];\n\t\t\t\tarray[mIndex] = array[index];\n\t\t\t\tarray[index] = k;\n\n\t\t\t\tint y = mIndex;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT f = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = f;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[(index-1)/2]) > 0)\n\t\t\t{\n\t\t\t\tT m = array[(index-1)/2];\n\t\t\t\tarray[(index-1)/2] = array[index];\n\t\t\t\tarray[index] = m;\n\t\t\t\tint y = (index-1)/2;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if(flag2 == true)\n\t\t{\n\t\t\tint y = index;\n\n\t\t\tif(getLevel(y+1) % 2 == 1)\n\t\t\t{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\telse if(object.compare(array[index], array[grandChildMin(2*index +1, 2*index+2)]) > 0 && grandChildMin(2*index +1, 2*index+2) != 0)\n\t\t{\n\t\t\tminIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\tT wemp = array[index];\n\t\t\tarray[index] = array[minIndex];\n\t\t\tarray[minIndex] = wemp;\n\n\t\t\tint y = minIndex;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\telse if (object.compare(array[index], array[(index-1)/2]) > 0) \n\t\t{\n\n\t\t\tT femp = array[(index-1)/2];\n\t\t\tarray[(index-1)/2] = array[index];\n\t\t\tarray[index] = femp;\n\n\t\t\tint y = (index-1)/2;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn temp;\n\t}",
"private Node insert(Node root, T element) {\n\t\tif (root == null)\n\t\t\troot = new Node(element);\n\t\t// left side\n\t\telse if (element.compareTo(root.element) < 0) {\n\t\t\troot.left = insert(root.left, element);\n\t\t\troot.left.parent = root;\n\t\t\t// right side\n\t\t} else if (element.compareTo(root.element) >= 0) {\n\t\t\troot.right = insert(root.right, element);\n\t\t\troot.right.parent = root;\n\t\t}\n\n\t\treturn root;\n\t}",
"public void insert(int k) {\n int i = 0;\n\n heapsize = heapsize + 1;\n i = heapsize;\n i = i - 1;\n\n if (heapsize == 1) {\n array[0] = k;\n } else {\n while ((i > 0) && ((array[parent(i)]) > k)) {\n array[i] = array[parent(i)];\n i = parent(i);\n }\n array[i] = k;\n }\n }",
"public T remove(T x) {\n\t\tEntry<T> node = getSplay(find(x));\n\t\tT result;\n\t\tresult = node.element;\n\t\tif(node == null)\n\t\t\treturn null;\n\t\tsplay(node);\n\t\tif(node.left != null && node.right != null) {\n\t\t\tEntry<T> tmp = getSplay(node.left);\n\t\t\twhile(tmp.right != null)\n\t\t\t\ttmp = getSplay(tmp.right);\n\t\t\t\n\t\t\ttmp.right = node.right;\n\t\t\tgetSplay(node.right).parent = tmp;\n\t\t\tgetSplay(node.left).parent = null;\n\t\t\troot = node.right;\n\t\t\t \n\t\t}\n\t\telse if(node.right != null) {\n\t\t\tgetSplay(node.right).parent = null;\n\t\t\troot = node.right;\n\t\t}\n\t\telse if(node.left != null) {\n\t\t\tgetSplay(node.left).parent = null;\n\t\t\troot = node.left;\n\t\t}\n\t\telse {\n\t\t\troot = null;\n\t\t}\n\t\tnode.parent = null;\n node.left = null;\n node.right = null;\n node = null;\n return result;\n\t}",
"protected void heapify(int i) {\n \tE temp;\n\t\tE left = null;\n\t\tE right = null;\n\t\tE current = internal[i];\n\n\t\tif(left(i) < heapSize) left = internal[left(i)];\n\t\tif(right(i) < heapSize ) right = internal[right(i)];\n\n\t\tif(left != null && right != null){\n\t\t\tif(compy.compare(current, right) < 0 && compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tif(compy.compare(right, left) < 0){\n\t\t\t\t\tinternal[i] = left;\n\t\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\t\theapify(left(i));\n\t\t\t\t}else{\n\t\t\t\t\tinternal[i] = right;\n\t\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\t\theapify(right(i));\n\t\t\t\t}\n\t\t\t}else if(compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[left(i)];\n\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\theapify(left(i));\n\t\t\t}else if(compy.compare(current, right) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[right(i)];\n\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\theapify(right(i));\n\t\t\t}\n\t\t}else if(left != null){\n\t\t\tif(compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[left(i)];\n\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\theapify(left(i));\n\t\t\t}\n\t\t}else if(right != null){\n\t\t\tif(compy.compare(current, right) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[right(i)];\n\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\theapify(right(i));\n\t\t\t}\n\t\t}\n }",
"private void heapify(final int i) {\n assert(valid(i));\n if (leaf(i)) return;\n final int v = H[i];\n final int left_child = ls(i);\n final int right_child = rs(i);\n int largest = (v >= H[left_child]) ? i : left_child;\n if (right_child != n && H[largest] < H[right_child])\n largest = right_child;\n assert(valid(largest));\n if (largest != i) {\n H[i] = H[largest]; H[largest] = v;\n heapify(largest);\n }\n }",
"private void maxHeapifyDown(int index) {\n assert index >= 0 && index < heap.size();\n\n while (!isLeaf(index)) {\n int j = leftChildIndex(index);\n\n if ( (j < heap.size() - 1) && (heap.get(j).compareTo(heap.get(j + 1)) < 0) ) {\n j++;\n }\n\n if (heap.get(index).compareTo(heap.get(j)) >= 0) {\n return;\n }\n \n swap(heap, index, j);\n index = j;\n }\n }",
"public void makeHeap() {\r\n\t\t//for (int i = (theHeap.size() >> 1) - 1; i >= 0; i--) {\r\n\t\tfor (int i = (theHeap.size() - 1) >> 1; i >= 0; i--) {\r\n\t\t\tsiftDown(i);\r\n\t\t}\r\n\t}",
"public void deleteMin() {\n root = deleteMin(root);\n }",
"public void deleteMin() {\n root = deleteMin(root);\n }",
"public void insert(E element) {\n\t\theap.add(element); // Put new value at end;\n\t\tint loc = heap.size() - 1; // and get its location\n\n\t\t// Swap with parent until parent not larger\n\t\twhile (loc > 0 && heap.get(loc).compareTo(heap.get(parent(loc))) < 0) {\n\t\t\tswap(heap, loc, parent(loc));\n\t\t\tloc = parent(loc);\n\t\t}\n\t}",
"public void insert(E element) {\n\t\theap.add(element); // Put new value at end;\n\t\tint loc = heap.size()-1; // and get its location\n\n\t\t// Swap with parent until parent not larger\n\t\twhile (loc > 0 && heap.get(loc).compareTo(heap.get(parent(loc))) < 0) {\n\t\t\tswap(heap, loc, parent(loc));\n\t\t\tloc = parent(loc);\n\t\t}\n\t}",
"void minDecrease(int i,int x)\n {\n arr[i]=x;\n while(i!=0 && arr[MyHeap.parent(i)]>arr[i])\n {\n swap(MyHeap.parent(i),i);\n i=MyHeap.parent(i);\n }\n }",
"public TreeNode trimBSTBottomUp(TreeNode root, int L, int R) {\n if(root == null) return null; \n root.left = trimBSTBottomUp(root.left, L, R); \n root.right = trimBSTBottomUp(root.right,L, R); \n if(root.val < L) return root.right; \n if(root.val > R) return root.left; \n return root;\n }",
"protected void heapdown(int i) {\r\n\t\twhile (true) {\r\n\t\t\tint left = left(i);\r\n\t\t\tint right = right(i);\r\n\t\t\tint childToUse = i;\r\n\r\n\t\t\tif (left < list.size() && list.get(i).getValue() > list.get(left).getValue()) {\r\n\t\t\t\tchildToUse = left;\r\n\t\t\t}\r\n\r\n\t\t\tif (right < list.size() && list.get(childToUse).getValue() > list.get(right).getValue()) {\r\n\t\t\t\tchildToUse = right;\r\n\t\t\t}\r\n\r\n\t\t\tif (childToUse == i) {\r\n\t\t\t\tbreak;\r\n\t\t\t} else {\r\n\t\t\t\tswap(i, childToUse);\r\n\t\t\t\ti = childToUse;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private int remove(int index){\n\t\tremovedItem=heap[index];\n\t\theap[index]=INFINITE;\n\t\tshiftUp(index);\n\t\treturn extractMax();\n\t}",
"private static void Heapify(int[] A, int i, int size)\n {\n // get left and right child of node at index i\n int left = LEFT(i);\n int right = RIGHT(i);\n\n int smallest = i;\n\n // compare A[i] with its left and right child\n // and find smallest value\n if (left < size && A[left] < A[i]) {\n smallest = left;\n }\n\n if (right < size && A[right] < A[smallest]) {\n smallest = right;\n }\n\n // swap with child having lesser value and\n // call heapify-down on the child\n if (smallest != i) {\n swap(A, i, smallest);\n Heapify(A, smallest, size);\n }\n }",
"public MinHeap() {\n// contents = new HashMap<>();\n contents= new ArrayList<>();\n backwards = new HashMap<>();\n contents = new ArrayList<>();\n contents.add(null);\n\n// contents.put(0, null);\n backwards.put(null, 0);\n// setContents = new HashSet<>();\n }",
"private void minHeapPercolateUp(int index) {\r\n while (index > 0) {\r\n int parent = (int) Math.floor((index - 1) / 2); // parent index\r\n int compareResult = data[index].compareTo(data[parent]); // integer value of the comparison of\r\n // process at `index` to process at\r\n // index `parent`\r\n if (compareResult >= 0) { // order of heap \"heapified\" for min heap\r\n break;\r\n } else {\r\n swap(index, parent);\r\n index = parent;\r\n }\r\n }\r\n }",
"public List<Integer> postOrder(TreeNode root) {\n\n List<Integer> ans = new ArrayList<>();\n\n if(root==null){\n return ans;\n }\n\n Deque<TreeNode> stack = new LinkedList<>();\n stack.push(root);\n TreeNode pre = new TreeNode(0);\n\n while(!stack.isEmpty()) {\n\n if (stack.peek().left != null && stack.peek().left != pre && stack.peek().right != pre) {\n stack.push(stack.peek().left);\n continue;\n }\n\n if (stack.peek().right != null && stack.peek().right != pre) {\n stack.push(stack.peek().right);\n continue;\n }\n pre = stack.poll();\n ans.add(pre.key);\n }\n\n return ans;\n\n }",
"public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }",
"public AnyType deleteMin() {\n if (isEmpty())\n throw new UnderflowException();\n\n AnyType minItem = root.element;\n root = merge(root.left, root.right);\n\n return minItem;\n }",
"public void removeMin() {\n\t\troot = removeMin(root);\n\t}",
"@Override\n\tpublic boolean remove(Object o) {\n\t\tE e = (E) o;\n\n\t\tif(e == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\n\t\tNode tempRoot = root;\n\t\tNode previous = null;\n\n\t\twhile(tempRoot != null && e.compareTo(tempRoot.value) != 0){\n\t\t\tprevious = tempRoot;\n\t\t\tif( e.compareTo(tempRoot.value) < 0){\n\t\t\t\ttempRoot = tempRoot.left;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttempRoot = tempRoot.right;\n\t\t\t}\n\t\t}\n\t\tif( tempRoot == null){\n\t\t\t// element not found in the tree\n\t\t\treturn false;\n\t\t}\n\n\t\tif(tempRoot.left == null || tempRoot.right == null){\n\t\t\tNode newCurr;\n\t\t\tif(tempRoot.left == null){\n\t\t\t\tnewCurr = tempRoot.right;\n\t\t\t} else {\n\t\t\t\tnewCurr = tempRoot.left;\n\t\t\t}\n\n\t\t\tif(previous == null){\n\t\t\t\tsize -= 1;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif(tempRoot == previous.left){\n\t\t\t\tprevious.left = newCurr;\n\t\t\t} else {\n\t\t\t\tprevious.right = newCurr;\n\t\t\t}\n\t\t} else {\n\t\t\tNode p = null;\n\t\t\tNode temp;\n\n\t\t\ttemp = tempRoot.right;\n\t\t\twhile(temp.left != null){\n\t\t\t\tp = temp;\n\t\t\t\ttemp = temp.left;\n\t\t\t}\n\n\t\t\tif(p != null){\n\t\t\t\tp.left = temp.right;\n\t\t\t} else {\n\t\t\t\ttempRoot.right = temp.right;\n\t\t\t}\n\n\t\t\ttempRoot.value = temp.value;\n\t\t}\n\n\t\tsize -= 1;\n\t\treturn true;\n\t}",
"private void bubbleDown() {\n int pos = 0;\n boolean done = false;\n while (!done) {\n if (rightChild(pos) < heap.size() && isBigger(rightChild(pos), pos)) {\n swapup(rightChild(pos));\n } else if (leftChild(pos) < heap.size() && isBigger(leftChild(pos), pos)) {\n swapup(leftChild(pos));\n } else {\n done = true;\n }\n }\n }",
"public T remove(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"Cannot insert null data.\");\n } else if (root == null) {\n throw new NoSuchElementException(\"Cannot find the data\");\n } else {\n T result;\n if (root.getData().compareTo(data) == 0) {\n result = root.getData();\n T tem;\n if (root.getLeft() != null) {\n tem = getPredecessor(root.getLeft());\n root.setData(tem);\n removeHelper(root, root.getLeft(), tem);\n } else {\n root = root.getRight();\n }\n } else {\n if (root.getData().compareTo(data) > 0) {\n result = removeHelper(root, root.getLeft(), data);\n } else {\n result = removeHelper(root, root.getRight(), data);\n }\n }\n size--;\n return result;\n }\n }",
"protected Tree remove(){\n if(noItems<=0){\n System.out.println(\"Q Empty. Cant remove\");\n return null;\n }else{\n return array[--noItems];\n }\n }",
"public E removeLast() {\n\t\tif (this.maxCapacity == 0) {\n\t\t\tSystem.out.println(\"incorrect Operation \");\n\t\t\tSystem.out.println(\"bottom less Stack\");\n\t\t\treturn null;\n\t\t} \n\t\t\n\t\tif (this.size > 0) {\n\t\t\tNode<E> nextNode = head.getNext();\n\t\t\tNode<E> prevNode = null;\n\t\t\twhile (nextNode != null) {\n\t\t\t\tif (nextNode.getNext() == null) {\n\t\t\t\t\tNode<E> lastNode = nextNode;\n\t\t\t\t\tthis.tail = prevNode;\n\t\t\t\t\tthis.tail.setNext(null);\n\t\t\t\t\tthis.size--;\n\t\t\t\t\treturn lastNode.getElement();\n\t\t\t\t}\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = nextNode.getNext();\n\t\t\t}\n\t\t} \n\t\t\t\n\t\treturn null;\n\t}",
"private void bubbleUp(int index)\n {\n if(index == 0) //Base Case\n return;\n if(isMax == false) //Maxheap\n {\n if(arrayList.get(index).compareTo(arrayList.get((index-1)/2)) >= 0)\n return;\n else\n {\n E tempElement = arrayList.get((index-1)/2);\n arrayList.set((index-1)/2, arrayList.get(index));\n arrayList.set(index, tempElement);\n bubbleUp((index-1)/2);\n }\n }\n else //Minheap\n {\n if(arrayList.get(index).compareTo(arrayList.get((index-1)/2)) <= 0)\n return;\n else\n {\n E tempElement = arrayList.get((index-1)/2);\n arrayList.set((index-1)/2, arrayList.get(index));\n arrayList.set(index, tempElement);\n bubbleUp((index-1)/2);\n }\n }\n }",
"private void heapify(int[] arr, int i, int end){\n \n int largest = i;\n int left = 2 * i + 1;\n int right = 2 * i + 2;\n \n if(left < end && arr[left] > arr[largest]){ // check bounds and compare values\n largest = left;\n }\n \n if(right < end && arr[right] > arr[largest]){\n largest = right;\n }\n \n if(largest != i){\n // perform swap arr[i] and arr[largest]\n swap(arr,largest,i);\n //recursively fix the tree using heapify()\n heapify(arr,largest,end);\n }\n \n }",
"public void bfs(Node root) {\r\n\t\tQueue<Node> q = new LinkedList<Node>();\r\n\t\tint count = 0;\r\n\t\tif (root == null)\r\n\t\t\treturn;\r\n\t\tq.add(root);\r\n\t\twhile (!q.isEmpty()) {\r\n\t\t\tNode n = (Node) q.remove();\r\n\t\t\tSystem.out.print(\" \" + n.data);\r\n\r\n\t\t\tif (n.Lchild != null) {\r\n\r\n\t\t\t\tq.add(n.Lchild);\r\n\t\t\t} else if (n.Rchild != null) {\r\n\t\t\t\tNode t1 = new Node(-1);\r\n\t\t\t\tcount++;\r\n\t\t\t\tq.add(t1);\r\n\t\t\t}\r\n\t\t\tif (n.Rchild != null) {\r\n\t\t\t\tq.add(n.Rchild);\r\n\t\t\t} else if (n.Lchild != null) {\r\n\t\t\t\tNode t1 = new Node(-1);\r\n\t\t\t\tcount++;\r\n\t\t\t\tq.add(t1);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\" + \"the number of gaps :: \" + count);\r\n\t}",
"public int extractMin() {\n\t\t\tif (heap_size <= 0) {\n\t\t\t\treturn Integer.MAX_VALUE;\n\t\t\t} else if (heap_size == 1) {\n\t\t\t\theap_size--;\n\t\t\t\treturn harr[0];\n\t\t\t}\n\n\t\t\tint root = harr[0];\n\t\t\tharr[0] = harr[heap_size - 1];\n\t\t\theap_size--;\n\t\t\tminHeapify(0);\n\n\t\t\treturn root;\n\t\t}",
"public void preorder(TreeNode root) {\n\n\t\tTreeNode current = root;\n\n\t\twhile (current != null) {\n\n\t\t\t// no elements on the left that are less than the current; add it to result.\n\t\t\tif (current.left == null) {\n\t\t\t\tcurrent = current.right;\n\t\t\t}\n\n\t\t\t// start processing the left subtree.\n\t\t\telse {\n\n\t\t\t\tTreeNode predecessor = current.left;\n\n\t\t\t\t// find rightmost value of current's left subtree.\n\t\t\t\twhile (predecessor.right != null && predecessor.right != current.right) {\n\t\t\t\t\tpredecessor = predecessor.right;\n\t\t\t\t}\n\n\t\t\t\t// if no thread between current and its predecessor, add it and add current\n\t\t\t\t// val to the result.\n\t\t\t\tif (predecessor.right == null) {\n\t\t\t\t\tpredecessor.right = current.right;\n\t\t\t\t\tcurrent.right = current.left;\n\t\t\t\t\tcurrent.left = null;\n\t\t\t\t\tcurrent = current.right;\n\t\t\t\t}\n\t\t\t\t// current's left subtree has been processed; remove the thread.\n\t\t\t\telse {\n\t\t\t\t\tcurrent = current.right;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}",
"private Node removeElement(Object value) {\n if (value.equals(this.value)) {\n return this.removeElement();\n }\n\n if (((Comparable)value).compareTo(this.value) < 0) {\n if (this.leftChild != null) {\n this.leftChild = this.leftChild.removeElement(value);\n return this.balance();\n }\n } else {\n if (this.rightChild != null) {\n this.rightChild = this.rightChild.removeElement(value);\n return this.balance();\n }\n }\n return this;\n }",
"public void minHeapify(int rootIndex) {\n final int leftChildIndex = getLeftIndex(rootIndex);\n final int rightChildIndex = getRightIndex(rootIndex);\n int smallestIndex = rootIndex;\n if (leftChildIndex < size && arr[leftChildIndex] < arr[rootIndex]) {\n smallestIndex = leftChildIndex;\n }\n if (rightChildIndex < size && arr[rightChildIndex] < arr[rootIndex]) {\n smallestIndex = leftChildIndex;\n }\n if (smallestIndex != rootIndex) {\n MathUtil.swap(arr, rootIndex, smallestIndex);\n minHeapify(smallestIndex);\n }\n }",
"void MaxInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] < arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }"
] | [
"0.7461604",
"0.7457023",
"0.73579484",
"0.72856927",
"0.72573656",
"0.7172061",
"0.7064726",
"0.7005273",
"0.66883403",
"0.66573685",
"0.66137785",
"0.6609179",
"0.6603306",
"0.65949816",
"0.65793717",
"0.65475523",
"0.6511763",
"0.6493576",
"0.64887863",
"0.6445741",
"0.64254814",
"0.64204425",
"0.63753915",
"0.6374378",
"0.6348824",
"0.6317845",
"0.63050944",
"0.6270606",
"0.62466216",
"0.6234905",
"0.62206185",
"0.62203187",
"0.6212528",
"0.6211692",
"0.6206879",
"0.6175297",
"0.61287886",
"0.61239403",
"0.61165285",
"0.6099083",
"0.6097143",
"0.6058537",
"0.60379297",
"0.60376644",
"0.6035753",
"0.6019327",
"0.600626",
"0.5997518",
"0.5980581",
"0.5954289",
"0.5945931",
"0.5942304",
"0.5935769",
"0.5913827",
"0.5889532",
"0.5885362",
"0.5870758",
"0.58660036",
"0.5861721",
"0.58601993",
"0.5853799",
"0.585208",
"0.58517635",
"0.58479726",
"0.5844394",
"0.5799879",
"0.57810587",
"0.57638633",
"0.57616866",
"0.5760699",
"0.57302994",
"0.5726639",
"0.57252973",
"0.57252973",
"0.57133806",
"0.57111174",
"0.5708926",
"0.5706803",
"0.5704631",
"0.5703971",
"0.56966937",
"0.56923544",
"0.5668335",
"0.5667326",
"0.5666759",
"0.5666617",
"0.5666083",
"0.5664194",
"0.56636304",
"0.5663341",
"0.5655381",
"0.5651046",
"0.56474966",
"0.56466514",
"0.5643342",
"0.5636995",
"0.5636765",
"0.56245774",
"0.5624505",
"0.56232613"
] | 0.7055546 | 7 |
use compareTo() method from String to compare | public boolean smallerThan(int a, int b)
{
if (data[a].compareTo(data[b]) < 0)
return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int compare(String lhs, String rhs) {\n return lhs.compareTo(rhs);\n }",
"public int compareToTo(String anothorString) {\n return 0;\n }",
"public int compareTo(XMLString anotherString) {\n/* 242 */ return this.m_str.compareTo(anotherString.toString());\n/* */ }",
"@Override\n public int compare(String left, String right) {\n return left.compareTo(right);\n }",
"@Test\r\n public void test8() {\r\n String s1 = \"Abc\";\r\n String s2 = \"abc\";\r\n String s3 = \"Abcd\";\r\n System.out.println(s1.compareTo(s2));\r\n System.out.println(s1.compareTo(s3));\r\n }",
"@Override \n\tpublic int compare(String str1, String str2) {\n\t\treturn str2.compareTo(str1);\n\t}",
"@Override\n\t\tpublic int compare(String o1, String o2) {\n\t\t\treturn o1.compareTo(o2);\n\t\t}",
"@Override\n public int compare(String s1, String s2) {\n return s1.compareTo(s2);\n\n }",
"@Override\n\tpublic int compare(String s1, String s2) {\n\t\t// compareTo is a method of the comparaiable interface\n\t\treturn s1.compareTo(s2);\n\t}",
"@Override\r\n\t\tpublic int compare(String arg0, String arg1) {\n\t\t\treturn arg0.compareTo(arg1);\r\n\t\t}",
"@Override\n public int compare(String s, String t1) {\n return t1.charAt(t1.length()-1)-s.charAt(s.length()-1);\n// return s.charAt(4);\n\n }",
"private static int compare(String st1, String st2) {\n if (st1.length() < st2.length()) {\n return -1;\n } else {\n return st1.compareTo(st2);\n }\n }",
"@Override\n public int compare(String o1, String o2) {\n int res = String.CASE_INSENSITIVE_ORDER.compare(o1, o2);\n if (res == 0) {\n res = o1.compareTo(o2);\n }\n return res;\n }",
"@Override\n\tpublic int compare(String s1, String s2) {\n\t\t// if s1 = s2 returns 0\n\t\t// if s1 > s2 returns 1\n\t\t// if s1 < s2 returns -1\n\n\t\tint len1 = s1.length();\n\t\tint len2 = s2.length();\n\n\t\tif (len1 > len2) {\n\t\t\treturn 1;\n\t\t} else if (len1 < len2) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t}",
"private int compare(String str1, String str2) {\n int result;\n\n if (str1 == null) {\n result = (str2 == null) ? 0 : -1;\n\n } else if (str2 == null) {\n result = 1;\n\n } else {\n result = str1.compareTo( str2 );\n }\n return result;\n }",
"@Override\n public int compare(String str1, String str2) {\n String digitRegex = \".*\\\\d+.*\";\n boolean hasDigits1 = str1.matches(digitRegex);\n boolean hasDigits2 = str2.matches(digitRegex);\n int result = -Boolean.valueOf(hasDigits1).compareTo(hasDigits2);\n\n if (result == 0) {\n // Secondary order: length, descending\n result = -Integer.valueOf(str1.length()).compareTo(str2.length());\n }\n\n return result;\n }",
"@Override\r\n\tpublic int compareTo(String o) {\n\t\treturn nomeP.compareTo(o);\r\n\t}",
"public abstract int compare(String s1, String s2) throws NumberFormatException, ParseException;",
"public int compare(String str, String str2) {\n return str.compareTo(str2);\n }",
"public static void main (String[]args){\n\t\t \r\n\t\tString s1= \"ratan\";\r\n\t\tString s2=\"anu\";\r\n\t\tString s3=\"ratan\";\r\n\t\tSystem.out.println(s1.equals(s2));\r\n\t\tSystem.out.println(s1.equals(s3));\r\n\t\tSystem.out.println(s3.equals(s2));\r\n\t\tSystem.out.println(\"Ratan\".equals(\"ratan\"));// ratan as a string or s1 is also work\r\n\t\tSystem.out.println(\"Ratan\".equalsIgnoreCase(s1));\r\n\t\t\r\n\t\t\r\n\t\t// Compareto ---------> return +value or -value\r\n\t\tSystem.out.println(s1.compareTo(s2));\r\n\t\tSystem.out.println(s1.compareTo(s3));\r\n\t\tSystem.out.println(s2.compareTo(s3));\r\n\t\t\r\n\t\tSystem.out.println(\"Ratan\".compareTo(\"ratan\"));// ratan or s1 also work as shown here\r\n\t\tSystem.out.println(\"Ratan\".compareToIgnoreCase(s1));\r\n\r\n}",
"public static int compareString(NodeValue nv1, NodeValue nv2) {\n return calcReturn(nv1.getString().compareTo(nv2.getString())) ;\n }",
"@Override\n\tpublic int compare(String o1, String o2) {\n\t\tif (o1.length() > o2.length()) {\n\t\t\treturn 1;\n\t\t} else if (o1.length() < o2.length()) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\tif (o1.compareTo(o2) > 0) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic int compare(String o1, String o2) {\n\t\t\treturn sort(o1).compareTo(sort(o2));\n\t\t}",
"static int compare(String a, String b) {\n if (a == null) a = \"\";\n if (b == null) b = \"\";\n\n int i = 0;\n while (i < a.length() && i < b.length()) {\n char x = a.charAt(i), y = b.charAt(i);\n if (x != y) return x - y;\n i++;\n }\n return a.length() - b.length();\n }",
"public int compare(String o1, String o2) {\n\t\t\t\t\t\tif (o1.compareTo(o2) > 0) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}",
"private static int cmp( String str1, String str2 )\n \t\t{\n \t\t\tif ( str1==null && str2==null )\n \t\t\t\treturn 0;\n \t\t\tif ( str1==null )\n \t\t\t\treturn -1;\n \t\t\tif ( str2==null )\n \t\t\t\treturn 1;\n \t\t\t\n \t\t\tint p1 = 0;\n \t\t\tint p2 = 0;\n \t\t\tfor ( ;; ) {\n \t\t\t\tif ( p1>=str1.length() ) {\n \t\t\t\t\tif ( p2>=str2.length() )\n \t\t\t\t\t\treturn 0;\n \t\t\t\t\treturn 1;\n \t\t\t\t}\n \t\t\t\tif ( p2>=str2.length() )\n \t\t\t\t\treturn -1;\n \t\t\t\tchar ch1 = str1.charAt(p1);\n \t\t\t\tchar ch2 = str2.charAt(p2);\n \t\t\t\tif ( ch1>='0' && ch1<='9' && ch2>='0' && ch2<='9' ) {\n \t\t\t\t\tint n1 = 0;\n \t\t\t\t\tint n2 = 0;\n \t\t\t\t\twhile ( ch1>='0' && ch1<='9' ) {\n \t\t\t\t\t\tp1++;\n \t\t\t\t\t\tn1 = n1 * 10 + (ch1-'0');\n \t\t\t\t\t\tif ( p1>=str1.length() )\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\tch1 = str1.charAt(p1);\n \t\t\t\t\t}\n \t\t\t\t\twhile ( ch2>='0' && ch2<='9' ) {\n \t\t\t\t\t\tp2++;\n \t\t\t\t\t\tn2 = n2 * 10 + (ch2-'0');\n \t\t\t\t\t\tif ( p2>=str2.length() )\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\tch2 = str2.charAt(p2);\n \t\t\t\t\t}\n \t\t\t\t\tint c = cmp(n1, n2);\n \t\t\t\t\tif ( c!=0 )\n \t\t\t\t\t\treturn c;\n \t\t\t\t} else {\n \t\t\t\t\tif ( ch1<ch2 )\n \t\t\t\t\t\treturn -1;\n \t\t\t\t\tif ( ch1>ch2 )\n \t\t\t\t\t\treturn 1;\n \t\t\t\t\tp1++;\n \t\t\t\t\tp2++;\n \t\t\t\t}\n \t\t\t}\n \t\t}",
"public int compareTo(Object other){\n return this.content.compareTo(((StringContent)other).content);\n }",
"@Override\n\tpublic int compare(String s1, String s2) {\n\t\t// compareTo is a method of the comparaiable interface\n\t\treturn -s1.compareTo(s2);\n\t}",
"@Override\npublic int compare(String first, String second) {\n\tint ans= Integer.compare(first.length(), second.length());\n\t//\n\t\n\t\n\t\n\t\n\treturn ans;\n\t//\n\t\n\t\n}",
"public int compare(String str1, String str2) {\r\n int num1 = Integer.parseInt(str1.substring(4, str1.length()));\r\n int num2 = Integer.parseInt(str2.substring(4, str2.length()));\r\n\r\n return num1 - num2;\r\n\r\n }",
"protected int stringCompare(String s1,String s2)\r\n\t{\r\n\t\tint shortLength=Math.min(s1.length(), s2.length());\r\n\t\tfor(int i=0;i<shortLength;i++)\r\n\t\t{\r\n\t\t\tif(s1.charAt(i)<s2.charAt(i))\r\n\t\t\t\treturn 0;\r\n\t\t\telse if(s1.charAt(i)>s2.charAt(i))\r\n\t\t\t\treturn 1;\t\r\n\t\t}\r\n\t\t//if the first shrotLenghtTH characters of s1 and s2 are same \r\n\t\tif(s1.length()<=s2.length()) //it's a close situation. \r\n\t\t\treturn 0;\r\n\t\telse \r\n\t\t\treturn 1; \r\n\t\t\r\n\t}",
"@Override\n\t\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\t\tif(o1.compareTo(o2) < 0){\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}else if(o1.compareTo(o2) > 0){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn 0;\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\tString[] values = o1.split(\";\");\r\n\t\t\t\t//Take the second string and do the same thing\r\n\t\t\t\tString[] values2 = o2.split(\";\");\r\n\t\t\t\t//Compare strings according to their integer values\r\n\t\t\t\treturn Integer.valueOf(values[0].replace(\"\\\"\", \"\")).compareTo(Integer.valueOf(values2[0].replace(\"\\\"\", \"\")));\r\n\t\t\t}",
"@Override\n public int compare(String o1, String o2) {\n return o1.length() - o2.length();\n }",
"public int compare(String str1, String str2) {\n\t\t\t\ttry{\r\n\t\t\t\t\treturn Integer.parseInt(str1) - Integer.parseInt(str2) > 0 ? 1 : -1;\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e){\r\n\t\t\t\t\tSystem.out.print(e.getMessage());\r\n\t\t\t\t}\t\r\n\t\t\t\treturn 1;\r\n\t\t\t}",
"@Override\n\t\tpublic int compare(String string1, String string2) {\n\t\t\treturn string1.charAt(string1.length() - 1) - string2.charAt(string2.length() - 1);\n\t\t}",
"@Override\r\n\tpublic int compare(String o1, String o2) {\n\t\treturn sortChars(o1).compareTo(sortChars(o2));\r\n\t}",
"public <T> int compareTo(T val)\n {\n return (this.string.compareTo(val.toString()));\n }",
"@Override\n\t\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\t\tif(o1.length()-o2.length() != 0) {\n\t\t\t\t\t\treturn o1.length()-o2.length();\n\t\t\t\t\t}else {\n\t\t\t\t\t\treturn o1.compareTo(o2);\n\t\t\t\t\t}\n\t\t\t\t}",
"public int compareToIgnoreCase(XMLString str) {\n/* 265 */ return this.m_str.compareToIgnoreCase(str.toString());\n/* */ }",
"@Override\r\n\tpublic int compare(String s1, String s2) {\n\t\treturn s1.length() - s2.length();\r\n\t}",
"@Test\n public void testCompareTo_2() {\n LOGGER.info(\"testCompareTo_2\");\n final AtomString atomString1 = new AtomString();\n final AtomString atomString2 = new AtomString(\"Hej\");\n final int actual = atomString1.compareTo(atomString2);\n final int expected = -3;\n assertEquals(expected, actual);\n }",
"public int compare(String o1, String o2) {\n\t\tif(base.get(o1) > base.get(o2)){\n\t\t\treturn 1;\n\t\t}\n\t\telse return -1;\n\t\t//return base.get(o1) - base.get(o2);\n\t}",
"public int compare(String o1, String o2) {\r\n\t\t\t\treturn o1.compareToIgnoreCase(o2);\r\n\t\t\t}",
"@Override\n\t\tpublic int compare(String string1, String string2) {\n\t\t\treturn string1.length() - string2.length();\n\t\t}",
"@Override\r\n\t public int compare(String o1, String o2) { //compare the two Strings\r\n\t\tif (o1 == null || o2 == null) { //if one of them is 0\r\n\t\t return 0;\r\n\t\t}\r\n\t\tBigDecimal o1bd = new BigDecimal(o1); //creating a BigDecimal variable, value equals String o1\r\n\t\tBigDecimal o2bd = new BigDecimal(o2);\r\n\t\treturn o2bd.compareTo(o1bd); \r\n\t }",
"@Override\n public int compare(String s1, String s2) {\n return -s1.compareTo(s2);\n\n }",
"public int CompareTo(String comp){\n\t\t return producto.getNombre().compareTo(comp);\n\t }",
"@Override\n public int compare(String left, String right) {\n int result = 0;\n int length = left.length() > right.length()\n ? right.length() : left.length();\n for (int i = 0; i < length; i++) {\n result = Character.compare(left.charAt(i), right.charAt(i));\n if (result != 0) {\n break;\n }\n }\n if (result == 0) {\n result = left.length() - right.length();\n }\n return result;\n\n }",
"@Override\n public int compare(String o1, String o2) {\n return Integer.compare(o1.length(), o2.length());\n }",
"@Override\n public int compare(String o1, String o2) {\n return Integer.compare(o2.length(), o1.length());\n }",
"@Test\n public void testCompareTo_3() {\n LOGGER.info(\"testCompareTo_3\");\n final AtomString atomString1 = new AtomString(\"Hej\");\n final AtomString atomString2 = new AtomString();\n final int actual = atomString1.compareTo(atomString2);\n final int expected = 3;\n assertEquals(expected, actual);\n }",
"@Override\r\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\tif ((Double.parseDouble(o1)-Double.parseDouble(o2))>0) {\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if ((Double.parseDouble(o1)-Double.parseDouble(o2))<0) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}",
"@Test\n public void testCompareTo_1() {\n LOGGER.info(\"testCompareTo_1\");\n final AtomString atomString1 = new AtomString();\n final AtomString atomString2 = new AtomString();\n final int actual = atomString1.compareTo(atomString2);\n final int expected = 0;\n assertEquals(expected, actual);\n }",
"@Override\n\t\tpublic int compare(String string1, String string2) {\n\t\t\treturn string2.length() - string1.length();\n\t\t}",
"public static void main(String[] args) {\n\t\tString s1=\"xin chao cac ban\";\n\t\tString s2 = \"hello\";\n\t\tString s3=\"hello\";\n\t\tString s4=\"xin chao\";\n\t\tSystem.out.println(s1.compareTo(s2));\n\t\tSystem.out.println(s3.compareTo(s1));\n\t\tSystem.out.println(s1.compareTo(s4));\n\t\tSystem.out.println(s3.compareTo(s2));\n\t\tSystem.out.println(s3.compareToIgnoreCase(s2));\n\t}",
"@Override\r\n\t\t\tpublic int compare(String s1, String s2) {\n\t\t\t\treturn (s1.length() - s2.length());\r\n\t\t\t}",
"@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn Integer.compare(o1.length(),\n\t\t o2.length());\n\t\t\t}",
"@Override\n public int compare(String str1, String str2) {\n int count1 = mSSIDMatchCounts.containsKey(str1) ? mSSIDMatchCounts.get(str1) : 0;\n int count2 = mSSIDMatchCounts.containsKey(str2) ? mSSIDMatchCounts.get(str2) : 0;\n\n\n int result = -Integer.valueOf(count1).compareTo(count2);\n if (result == 0) {\n // Secondary order: lexicographical, ascending\n result = str1.compareTo(str2);\n }\n return result;\n }",
"@Override\n public int compare(String s1, String s2) {\n String soString1 = s1.replaceAll(\"[\\\\d.]\",\"\");\n String soString2 = s2.replaceAll(\"[\\\\d.]\",\"\");\n if (soString1.equals(soString2)){\n Integer soNumero1 = Integer.parseInt(s1.replaceAll(\"\\\\D\", \"\"));\n Integer soNumero2 = Integer.parseInt(s2.replaceAll(\"\\\\D\", \"\"));\n return soNumero1.compareTo(soNumero2) * this.reverse;\n }\n return soString1.compareTo(soString2) * this.reverse;\n }",
"public int String_Compare(String A, String B) {\n\t\t\n\t\tint shorter_length;\n\t\tif(A.length() >= B.length()) {\n\t\t\tshorter_length=B.length();\n\t\t}\n\t\telse {\n\t\t\tshorter_length=A.length();\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t\tint i = 0;\n\t\tint A_char;\n\t\tint B_char;\n\t\t\n\t\twhile(i < shorter_length ) {\n\t\t\tA_char = (int)A.charAt(i);\n\t\t\tB_char = (int)B.charAt(i);\n\n\t\t\tif(A_char != B_char) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\ti+=1;\n\t\t}\n\t\treturn 0;\n\t}",
"public boolean compare(String string) {\n\t\tif (_maoriNumber.equals(string)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\r\n\tpublic int compare(String str0, String str1) {\n\t\tString[] tempStr0 = str0.split(\",\", 2);\r\n\t\tString[] tempStr1 = str1.split(\",\", 2);\r\n\r\n\t\t// Hilbert code comparison\r\n\t\tint hilbertComparedValue = _hibertComp.compare(tempStr0[0], tempStr1[0]);\r\n\r\n\t\tif (hilbertComparedValue != 0) \r\n\t\t{\r\n\t\t\treturn hilbertComparedValue;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\treturn tempStr0[1].compareTo(tempStr1[1]);\r\n\t\t}\t\t\r\n\t}",
"public int compareWithString(String str) {\n if(this.value.length() > str.length())\n return 0;\n String subString = str.substring(0, this.value.length());\n // if it's prefix then return the length of match\n if(subString.equals(this.value))\n return this.value.length();\n // not match return 0\n else\n return 0;\n }",
"public int compare(String a, String b) {\r\n\t\t\t\tint result = map.get(b).compareTo(map.get(a));\r\n\t\t\t\tif(result == 0)\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn result;\r\n\t\t\t}",
"public static boolean b(String str, String str2) {\n int i2 = 0;\n while (i2 < str2.length()) {\n try {\n if (str.charAt(i2) > str2.charAt(i2)) {\n return true;\n }\n if (str.charAt(i2) < str2.charAt(i2)) {\n return false;\n }\n i2++;\n } catch (Throwable unused) {\n }\n }\n return false;\n }",
"@Override\n public int compare(String o1, String o2) {\n return (o1 + o2).compareTo(o2 + o1);\n }",
"@Override\n public int compare(String o1, String o2) {\n int d1 = countChars(o1, '.');\n int d2 = countChars(o2, '.');\n if (d1 != d2) {\n return d1 > d2 ? 1 : -1;\n }\n\n // The less the stars the better: postgresql.org is more specific than *.*.postgresql.org\n int s1 = countChars(o1, '*');\n int s2 = countChars(o2, '*');\n if (s1 != s2) {\n return s1 < s2 ? 1 : -1;\n }\n\n // The longer the better: postgresql.org is more specific than sql.org\n int l1 = o1.length();\n int l2 = o2.length();\n if (l1 != l2) {\n return l1 > l2 ? 1 : -1;\n }\n\n return 0;\n }",
"@Override\n public int compare(Character char1, Character char2) {\n if(char1.charValue() == char2.charValue()){\n return 0;\n }\n int char1Index = findIndex(char1);\n int char2Index = findIndex(char2);\n if(char1Index >= 0 && char2Index >= 0){\n return char1Index < char2Index ? -1: 1;\n }\n // char1 exists in S and char2 doesn't,then char1 should come first.\n if(char1Index >=0 && char2Index == -1){\n return -1;\n }\n else if(char1Index == -1 && char2Index >=0){\n return 1;\n }\n else{\n return 0;\n }\n }",
"@Override\n public int compareTo(ValueString that) {\n final int BEFORE = -1;\n final int EQUAL = 0;\n final int AFTER = 1;\n\n if (this == that) return EQUAL;\n if (that instanceof ValueStringCount) {\n long res = ((ValueStringCount) that)._cnt - this._cnt;\n if (res > 0) return AFTER;\n else if (res < 0) return BEFORE;\n }\n return super.compareTo(that);\n }",
"int compareStrings(String s1, String s2) {\n if (s1 == null) {\n return s2 == null ? 0 : -1;\n } else if (caseInsensitive) {\n return s1.compareToIgnoreCase(s2);\n } else {\n return s1.compareTo(s2);\n }\n }",
"static void perform_cmp(String passed){\n\t\tint type = type_of_cmp(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tcmp_with_reg(passed);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcmp_with_mem(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"public int compareTo(Object var1) {\r\n return this.func_27223_a((J_JsonStringNode)var1);\r\n }",
"public void testCompareStrings() {\n\t\tString one = \"Hello\";\n\t\tString two = \"in the house\";\n\t\t//Gro▀schreibung vor Kleinschreibung\n\t\tassertTrue(comp.compareStrings(one, two) < 0);\n\t\tassertEquals(0, comp.compareStrings(one, one));\n\t\tassertTrue(comp.compareStrings(two, one) > 0);\n\t}",
"public static int compareString(String firstString, String secondString) {\n if (isEmptyString(firstString) || isEmptyString(secondString)) {\n if (isEmptyString(firstString) && isEmptyString(secondString)) {\n return 0;\n } else if (isEmptyString(firstString)) {\n return 1;\n } else if (isEmptyString(secondString)) {\n return -1;\n }\n }\n\n char charOfFirst = firstString.charAt(0);\n char charOfSecond = secondString.charAt(0);\n int result = compareChar(charOfFirst, charOfSecond);\n\n if (result == 0) {\n return compareString(firstString.substring(1), secondString.substring(1));\n }\n\n return result;\n }",
"@Override\n public int compareTo(@Nonnull Letter other) {\n return ComparisonChain.start().compare(this.getContent(), other.getContent()).result();\n }",
"@Override\r\n\tpublic int compareTo(Item another) {\n\t\treturn this.toString().compareTo(another.toString());\r\n\t}",
"public int compare(String a, String b) {\n\t if (base.get(a) >= base.get(b)) {\n\t return -1;\n\t } else {\n\t return 1;\n\t } // returning 0 would merge keys\n\t }",
"public int compareToByName(String first, String last){\r\n // Checks if the names are equal\r\n if(this.getFirstName().equals(first) && this.getLastName().equals(last)){\r\n return 0;\r\n }\r\n // Checks the alphabetical order if the last names are not equal\r\n else if(this.getLastName().equals(last) == false){\r\n // i stores the index of both last names\r\n int i = 0;\r\n /* Goal: To iterate through both last names simultaneously until an unmatching character is found */\r\n while(this.getLastName().charAt(i) == last.charAt(i)){\r\n i = i + 1;\r\n }\r\n if((int)this.getLastName().charAt(i) < (int)last.charAt(i)){\r\n return -1;\r\n }\r\n else if((int)this.getLastName().charAt(i) > (int)last.charAt(i)){\r\n return 1;\r\n }\r\n else\r\n return 7;\r\n }\r\n // Checks the alphabetical order if the last names are equal, but the first names are not\r\n else if(this.getLastName().equals(last) && this.getFirstName().equals(first) == false){\r\n // i stores the index of both first names\r\n int i = 0;\r\n /* Goal: To iterate through both first names simultaneously until an unmatching character is found */\r\n while(this.getFirstName().charAt(i) == first.charAt(i)){\r\n i = i + 1;\r\n }\r\n if((int)this.getFirstName().charAt(i) < (int)first.charAt(i)){\r\n return -1;\r\n }\r\n else if((int)this.getFirstName().charAt(i) > (int)first.charAt(i)){\r\n return 1;\r\n }\r\n else\r\n return 7;\r\n }\r\n else\r\n return 7;\r\n }",
"public int compare(String s1, String s2) {\n\t\t\tif (SpellEx.editDistance(currentWord, s1) > SpellEx.editDistance(currentWord, s2)) {\n\t\t\t\treturn 1;\n\t\t\t} else if (SpellEx.editDistance(currentWord, s1) < SpellEx.editDistance(currentWord, s2)) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif (dict.get(s1) < dict.get(s2)) {\n\t\t\t\treturn 1;\n\t\t\t} else if (dict.get(s1) > dict.get(s2)) {\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\treturn s1.compareTo(s2);\n\t\t\t}\n\t\t}",
"private int compareInternal(String shorter, String longer) {\n int lengthDiff = longer.length() - shorter.length();\n\n for (int compareStartIndexInsideLonger = 0; compareStartIndexInsideLonger <= lengthDiff; compareStartIndexInsideLonger++) {\n String compariosonPartFromLonger = longer.substring(compareStartIndexInsideLonger, compareStartIndexInsideLonger + shorter.length());\n //we have found an answer if they are not equal\n int result = shorter.compareTo(compariosonPartFromLonger);\n if (result != 0) {\n return result;\n }\n }\n\n //the are equal\n return 0;\n }",
"@Override\n\tpublic int compare(Object arg0, Object arg1) {\n\t\treturn arg0.toString().compareTo(arg1.toString());\n\t}",
"public int compare(String a, String b) {\n if (base.get(a) >= base.get(b)) {\n return -1;\n } else {\n return 1;\n } // returning 0 would merge keys\n }",
"public int compare(String s1, String s2) {\n\t\t\tif (dict.get(s1) < dict.get(s2)) {\n\t\t\t\treturn 1;\n\t\t\t} else if (dict.get(s1) > dict.get(s2)) {\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\treturn s1.compareTo(s2);\n\t\t\t}\n\t\t}",
"@Override\n public int compare(String o1, String o2) {\n\n if (o1.equals(o2)) {\n return 0;\n }\n\n String prefix = Strings.commonPrefix(o1, o2);\n if (prefix.length() == 0) {\n // No common prefix\n return o1.compareTo(o2);\n }\n\n if (o1.length() == prefix.length()) {\n return -1;\n }\n\n return o1.compareTo(o2);\n\n }",
"@SuppressWarnings(\"rawtypes\")\r\n\t@Override\r\n\tpublic int compare(WritableComparable a, WritableComparable b)\r\n\t{\n\t\tText left = (Text)a;\r\n\t\tText right = (Text)b;\r\n\t\t\r\n\t\tText realLeft = new Text(left.toString().split(\"-,-\")[1]);\r\n\t\tText realRight = new Text(right.toString().split(\"-,-\")[1]);\r\n\t\t\t\t\r\n\t\tint result = tc.compare(realLeft, realRight);\r\n\t\t\t\t\r\n\t\treturn result;\r\n\t}",
"@Override\n\t\t\t\t\t\tpublic int compare(SearchItem lhs, SearchItem rhs) {\n\t\t\t\t\t\t\tString first = lhs.get_text().toString();\n\t\t\t\t\t\t\tString sec = rhs.get_text().toString();\n\n\t\t\t\t\t\t\tint i1 = first.indexOf(constraint.toString());\n\t\t\t\t\t\t\tint i2 = sec.indexOf(constraint.toString());\n\n\t\t\t\t\t\t\treturn (i1 < i2) ? -1 : (i1 == i2) ? 0 : 1;\n\t\t\t\t\t\t}",
"private static int cmpNotNullFirst( String str1, String str2 )\n \t\t{\n \t\t\tif ( str1==null && str2==null )\n \t\t\t\treturn 0;\n \t\t\tif ( str1==null )\n \t\t\t\treturn 1;\n \t\t\tif ( str2==null )\n \t\t\t\treturn -1;\n \t\t\treturn cmp(str1, str2);\n \t\t}",
"public int compareTo(Citizen another) {\n if (fullName.equals(another.getFullName()))\n return 0;\n else\n if (fullName.compareTo(another.getFullName()) < 0)// alphabetically arranged\n return -1;\n else\n return 1;\n }",
"public static int compareIgnoreCase(String firstString, String secondString){\n\t\tif(firstString.equalsIgnoreCase(secondString)){\n\t\t\treturn 0;\n\t\t}\n\t\tchar[] firstStringCharArray = firstString.toLowerCase().toCharArray();\n\t\tchar[] secondStringCharArray = secondString.toLowerCase().toCharArray();\n\t\tif(firstStringCharArray.length > 0 && !HaikuGenerator.isAWordCharacter(firstStringCharArray[0])\n\t\t\t\t&& secondStringCharArray.length > 0 && HaikuGenerator.isAWordCharacter(secondStringCharArray[0])){\n\t\t\t// First string starts with a non-word character (such as a number) while the second starts with a word-character (such as 'a')\n\t\t\t// -> the second string should be before the first string\n\t\t\treturn -1;\n\t\t}\n\t\tif(firstStringCharArray.length > 0 && HaikuGenerator.isAWordCharacter(firstStringCharArray[0])\n\t\t\t\t&& secondStringCharArray.length > 0 && !HaikuGenerator.isAWordCharacter(secondStringCharArray[0])){\n\t\t\t// First string starts with a word-character (such as 'a') while the second starts with a non-word character (such as a number)\n\t\t\t// -> the first string should be before the second string\n\t\t\treturn 1;\n\t\t}\n\t\tint i = 0;\n\t\twhile(true){\n\t\t\tif(firstStringCharArray[i] < secondStringCharArray[i]){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif(firstStringCharArray[i] > secondStringCharArray[i]){\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif(firstStringCharArray.length == i+1){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif(secondStringCharArray.length == i+1){\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}",
"@Override\n\tpublic int compareTo(Osoba _arg0) {\n\t\treturn (new String(nazwisko_ + imie_).compareToIgnoreCase(new String( _arg0.nazwisko_ + _arg0.imie_)));\n\t}",
"@Override\r\n public int compare(Element e1, Element e2) {\r\n\t\t//FIXME !!!!\r\n\t\treturn -1;\r\n//\t\t// first try to compare by type:\r\n//\t\tint result = compareType(e1, e2);\r\n//\t\tif(result != 0)\r\n//\t\t\treturn result;\r\n//\t\t\r\n//\t\t// results with matching case before results with different case then searched word\r\n//\t\tresult = compareCase(e1, e2);\r\n//\t\tif(result != 0) {\r\n//\t\t\treturn result;\r\n//\t\t}\r\n//\t\t// when they both do/don't match case, compare by label:\r\n//\t\tresult = compareLabel(e1, e2);\r\n//\t\tif(result != 0) {\r\n//\t\t\treturn result;\r\n//\t\t}\r\n//\r\n//\t\t// if the same label as well, compare by hashcode\r\n//\t\tresult = e1.compareTo(e2);\r\n//\t\treturn result;\r\n\r\n\t}",
"public int compare(Object obj1, Object obj2){\n\t\t\n\t\tString s1 = obj1.toString(); // sudha\n\t\tString s2 = obj2.toString(); // rani\n\t\t\n\t\tif(s1.length()>s2.length()){\n\t\t\treturn 100;\n\t\t}else if(s1.length()<s2.length()){\n\t\t\treturn -10;\n\t\t} else{\n\t\t\treturn s1.compareTo(s2);\n\t\t}\n\t\t\n\t}",
"@Override\n public int compare(Event o1, Event o2) {\n char[] event1 = o1.getEvent().toCharArray();\n char[] event2 = o2.getEvent().toCharArray();\n\n int i = 0; // Intiialize counter variable i\n\n while (i < event1.length && i < event2.length) // We reached the end, stop\n {\n if (event1[i] - event2[i] == 0) /* if the two elements are the same, tells us nothing about difference */\n {\n i++; // Keep going\n }\n\n else if (event1[i] - event2[i] < 0) // If true, this->str[i] comes first\n {\n return -1; // Return -1 for sorting\n }\n\n else if (event1[i] - event2[i] > 0) // If true,argStr.str[i] comes first\n {\n return 1;\n }\n }\n\n if (event1.length < event2.length)\n {\n return -1;\n }\n\n else if (event1.length > event2.length)\n {\n return 1;\n }\n\n else\n {\n return 0;\n }\n\n }",
"public int compareTo(String key)\n\t {\n\t return genre.compareTo(key);\n\t }",
"@Override\r\n\t\tpublic int compare(String2DoubleNode o1, String2DoubleNode o2) {\n\t\t\treturn o2.value.compareTo(o1.value);\r\n\t\t}",
"public static void main(String[] args) {\nString a = \"aab\";\nString b = \"baa\";\nSystem.out.println(compare(a,b));\n\t}",
"public static int compareStrings(String s1, String s2) {\n\t if (s1 == null) {\n\t\t return (s2 == null) ? 0 : -1;\n\t } else if (s2 == null) return 1;\n\t return s1.compareTo(s2);\n }",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}",
"private static int alphaNumericCompare( String s1, String s2 )\n\t{\n\t\tString[] words1 = splitIntoAlphasAndNums( s1 );\n\t\tString[] words2 = splitIntoAlphasAndNums( s2 );\n\t\tfor ( int j = 0; j < Math.min( words1.length, words2.length ); j++ )\n\t\t{\n\t\t\tint c;\n\t\t\tfinal String sp1 = words1[ j ];\n\t\t\tfinal String sp2 = words2[ j ];\n\n\t\t\t// First look for special alpha sequences (e.g., \"alpha\" or \"beta\" or \"rc\"):\n\t\t\tint subScore1 = calculateScore( sp1 );\n\t\t\tint subScore2 = calculateScore( sp2 );\n\t\t\tc = subScore1 - subScore2;\n\t\t\tif ( c != 0 )\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\n\t\t\t// Since splitIntoAlphasAndNums() was called, that means that if 1st char is a digit, then\n\t\t\t// all characters are digits:\n\t\t\tif ( startsWithDigit( sp1 ) || startsWithDigit( sp2 ) )\n\t\t\t{\n\t\t\t\tComparable<Long> v1 = toLong( sp1 );\n\t\t\t\tLong v2 = toLong( sp2 );\n\t\t\t\tif ( v1 != null && v2 != null )\n\t\t\t\t{\n\t\t\t\t\tc = v1.compareTo( v2 );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// null == null, and null is smaller than non-null\n\t\t\t\t\tc = v1 == v2 ? 0 : v1 == null ? -1 : 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Both are pure non-numerics, so use regular lexicographic compare:\n\t\t\t\tc = sp1.compareTo( sp2 );\n\t\t\t}\n\n\t\t\tif ( c != 0 )\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\t// Last resort comparision: sub-splitting array length.\n\t\treturn words1.length - words2.length;\n\t}",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[0].compareTo(arg1[0]);\r\n\t\t\t\t\t}"
] | [
"0.77476823",
"0.74351084",
"0.74217474",
"0.731466",
"0.7236494",
"0.7225697",
"0.715148",
"0.71490806",
"0.7123338",
"0.70976645",
"0.70842695",
"0.70543844",
"0.7037736",
"0.7021083",
"0.69968367",
"0.69951767",
"0.69687",
"0.69607335",
"0.6953392",
"0.6943764",
"0.69263184",
"0.69182366",
"0.6900705",
"0.68728197",
"0.68717253",
"0.68647105",
"0.6861344",
"0.683783",
"0.6826709",
"0.6811323",
"0.68021446",
"0.67959046",
"0.67933583",
"0.6780331",
"0.67741084",
"0.67503977",
"0.6719675",
"0.67139596",
"0.67085344",
"0.66851765",
"0.6684799",
"0.6681044",
"0.6674562",
"0.6667117",
"0.6663322",
"0.66622174",
"0.66547537",
"0.6644799",
"0.6632409",
"0.66296566",
"0.6627796",
"0.6615335",
"0.66121405",
"0.6609763",
"0.6604514",
"0.65871316",
"0.6581867",
"0.6541812",
"0.6507311",
"0.6499429",
"0.64810663",
"0.6479015",
"0.64521354",
"0.6448935",
"0.6444614",
"0.6440191",
"0.6432905",
"0.6427766",
"0.641614",
"0.6398777",
"0.635527",
"0.63315564",
"0.6328341",
"0.6286975",
"0.62627155",
"0.62613255",
"0.62555665",
"0.624837",
"0.6212278",
"0.6210622",
"0.6183222",
"0.6167778",
"0.6166513",
"0.6150227",
"0.61389583",
"0.61176014",
"0.6111486",
"0.61079574",
"0.60911757",
"0.6079461",
"0.6079208",
"0.6074897",
"0.60635227",
"0.60460085",
"0.604448",
"0.6033854",
"0.603191",
"0.60317683",
"0.6028458",
"0.6018503",
"0.59916806"
] | 0.0 | -1 |
swap the items between position a and b | public void swap(int a, int b)
{
String tempA = data[a];
String tempB = data[b];
data[a] = tempB;
data[b] = tempA;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static <T,S> void swap(List<T> x, List<S> a2, int a, int b) {\n\t\tT t = x.get(a);\n\t\tx.set(a, x.get(b));\n\t\tx.set(b,t);\n\t\tS t2 = a2.get(a);\n\t\ta2.set(a,a2.get(b));\n\t\ta2.set(b,t2);\n\t}",
"protected static void swapReferences(List<?> array, int a, int b){\n Collections.swap(array, a, b);\n }",
"private void swap(int a, int b) {\n Node newB = aHeap.get(a);\n Node newA = aHeap.get(b);\n aHeap.remove(a);\n aHeap.add(a, newA);\n itemMap.put(aHeap.get(a).getItem(), a);\n aHeap.remove(b);\n aHeap.add(b, newB);\n itemMap.put(aHeap.get(b).getItem(), b);\n }",
"private void switchElements(int a, int b) {\r\n\t\tE temp = c[a];\r\n\t\tc[a] = c[b];\r\n\t\tc[b] = temp;\r\n\t}",
"private static void swap(int x[], int[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"static void swap(List<CustomCharacter> list, int a, int b){\n CustomCharacter temp = getClone(list, a);\n list.set(a, list.get(b));\n list.set(b, temp);\n }",
"private static <T,P> void vecswap(List<T> x, List<P> a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static void vecswap(int x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void swap(byte x[],T[] a2, int a, int b) {\n\t\tbyte t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static void swap(Object[] x, int a, int b)\n {\n Object t = x[a];\n x[a] = x[b];\n x[b] = t;\n }",
"private void swap(int pos1, int pos2) {\n\t\tE temp = apq.get(pos1);\n\t\tapq.set(pos1, apq.get(pos2));\n\t\tapq.set(pos2, temp);\n\n\t\tlocator.set(apq.get(pos1), pos1);\n\t\tlocator.set(apq.get(pos2), pos2);\n\t}",
"public void swap(ArrayList <Comparable> list, int a, int b){\r\n\t\tComparable temp = list.get(a);\r\n\t\tlist.set(a, list.get(b));\r\n\t\tlist.set(b, temp);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Swap\");\r\n\t\tSystem.out.println();\r\n\t}",
"private static <T> void vecswap(byte x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T,P> void vecswap(T x[], int[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static <T,P> void vecswap(T x[], P[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static void vecswap(char x[], char[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"@Override\n\tpublic void swap(int pos1, int pos2) {\n\t}",
"private static <T> void vecswap(int x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static void swap(int[] arry , int a,int b) {\n int temp = arry[a];\n arry[a]=arry[b];\n arry[b]=temp;\n }",
"private static <T> void vecswap(List<T> x, int a, int b, int n) {\n for (int i = 0; i < n; i++, a++, b++) {\n swapElements(x, a, b);\n }\n }",
"private static void vecswap(int x[], int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a, b);\n\t}",
"private static <T,S> void swap(T x[], int[] a2, int a, int b) {\n\t\tT t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static <T,S> void swap(T x[], S[] a2, int a, int b) {\n\t\tT t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tS t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public void swap(int a, int b) {\r\n Node<E> temp = theData.get(a);\r\n theData.set(a,theData.get(b));\r\n theData.set(b,temp);\r\n }",
"private static <T> void vecswap(int x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void vecswap(float x[],T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void vecswap(char x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void swap(int x[], T[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static void swap(int[] arr, int a, int b) {\n int temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }",
"private static void swap(int[] A, int a, int b){\n\t\tint temp = A[a];\n\t\tA[a] = A[b];\n\t\tA[b] = temp;\n\t}",
"private static void vecswap(double x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }",
"private static void vecswap(double x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static void swap(double x[], double[] a2, int a, int b) {\n\t\tdouble t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tdouble t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public void swap(int a, int b) {\n sequence.swap(a, b);\n }",
"private void swap(byte[] bytes, int pos1, int pos2) {\n \t\tbyte temp = bytes[pos1];\n \t\tbytes[pos1] = bytes[pos2];\n \t\tbytes[pos2] = temp;\n \t}",
"public static void swap(int a1, int b1) {\t\t\n\t\tint temp = algorithmThree[a1];\n\t\talgorithmThree[a1] = algorithmThree[b1];\n\t\talgorithmThree[b1] = temp;\n\t}",
"private void swap(T[] arr, int a, int b) {\n T temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }",
"private static <E> void swap(ArrayList<E> a, int i, int j) {\n\t\tE t = a.get(i);\n\t\ta.set(i, a.get(j));\n\t\ta.set(j, t);\n\t}",
"private static <E> void swap(ArrayList<E> a, int i, int j) {\n\t\tE t = a.get(i);\n\t\ta.set(i, a.get(j));\n\t\ta.set(j, t);\n\t}",
"private static <T> void swap(int x[], double[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tdouble t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static void swap(double x[], int[] a2, int a, int b) {\n\t\tdouble t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static <T> void vecswap(long x[], T[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private void swap(int firstIdx, int secondIdx) {\r\n // TODO\r\n }",
"private void swapElement ( int p1, int p2 )\n\t{\n\t}",
"private void swap(int[] a, int index1, int index2) {\n int temp = a[index1];\n a[index1] = a[index2];\n a[index2] = temp;\n }",
"public void swapAdjacentElements(int[] values)\n {\n // your work here\n\n\n\n\n }",
"private static void swap(char x[], char[] a2, int a, int b) {\n\t\tchar t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tchar t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static void swap(int[] a, int x, int y) {\n\t\tint temp = a[x];\n\t\ta[x] = a[y];\n\t\ta[y] = temp;\n\t}",
"private void swap(Comparable[] array, int pos1, int pos2) {\n\t\tComparable tmp = array[pos1];\n\t\tarray[pos1] = array[pos2];\n\t\tarray[pos2] = tmp;\n\t}",
"public void swap(int index1, int index2) {\n \n }",
"private static <T> void swap(long x[], T[] a2, int a, int b) {\n\t\tlong t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public static void inplaceSwap(int a, int b) {\n a = a - b;\n b = a + b;\n a = b - a;\n }",
"private static <T> void swap(float x[], T[] a2,int a, int b) {\n\t\tfloat t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static <T> void vecswap(double x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static void swap(Integer[] a, int x, int y) {\n\t\tInteger temp = a[x];\n\t\ta[x] = a[y];\n\t\ta[y] = temp;\n\t}",
"private static <T> void vecswap(short x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private void swap(int from, int to) {\n E tmp = array[from];\n array[from] = array[to];\n array[to] = tmp;\n }",
"private void swap(int index1, int index2) {\n E element1 = getElement(index1);\n E element2 = getElement(index2);\n setElement(index2, element1);\n setElement(index1, element2);\n }",
"public synchronized void elementSwapped(Object newParam, int index1,\n\t\t\tint index2) {\n\n\t\tif (index1 < index2) {\n\t\t\tswapElements(newParam, index1, index2);\n\t\t} else {\n\t\t\tswapElements(newParam, index2, index1);\n\t\t}\n\n\t}",
"public static void swap(int[] vals, int a, int b)\n\t{\n\t\tint temp = vals[a]; // copy first value to temp to save\n\t\tvals[a] = vals[b]; // put second value in index of the first\n\t\tvals[b] = temp; // put original value where the second value was.\n\t}",
"private synchronized void swapElements(Object newParam, int index1,\n\t\t\tint index2) {\n\n\t\t// the two elements to be swapped\n\t\tLinearElement firstElement = root.getVector().get(index1);\n\t\tLinearElement secondElement = root.getVector().get(index2);\n\n\t\t// the two elements after each of the elements to be swapped\n\t\tLinearElement secondElementNext;\n\t\tLinearElement firstElementNext;\n\t\t/*\n\t\t * There is a corner case where secondElement.previousChild is\n\t\t * firstElement\n\t\t */\n\n\t\t// the first element's previous child before it is reassigned\n\t\tLinearElement tempPrevChild = firstElement.getPreviousChild();\n\n\t\tif (index2 != index1 + 1) {// the elements are not adjacent\n\n\t\t\t// set previous elements for the two nodes\n\t\t\tfirstElement.setPreviousChild(secondElement.getPreviousChild());\n\t\t\tsecondElement.setPreviousChild(tempPrevChild);\n\n\t\t\t// set previous elements for the nodes referencing the swapped nodes\n\t\t\tif (index1 + 1 < root.getVector().size()) {\n\t\t\t\tfirstElementNext = root.getVector().get(index1 + 1);\n\t\t\t\tfirstElementNext.setPreviousChild(secondElement);\n\t\t\t}\n\t\t\tif (index2 + 1 < root.getVector().size()) {\n\t\t\t\tsecondElementNext = root.getVector().get(index2 + 1);\n\t\t\t\tsecondElementNext.setPreviousChild(firstElement);\n\t\t\t}\n\n\t\t} else { // the elements are adjacent\n\t\t\tfirstElement.setPreviousChild(secondElement);\n\t\t\tsecondElement.setPreviousChild(tempPrevChild);\n\n\t\t\t// set previous elements for the nodes referencing the second node\n\t\t\tif (index2 + 1 < root.getVector().size()) {\n\t\t\t\tsecondElementNext = root.getVector().get(index2 + 1);\n\t\t\t\tsecondElementNext.setPreviousChild(firstElement);\n\t\t\t}\n\t\t}\n\n\t\t// swap the elements in root\n\t\troot.getVector().swap(index1, index2);\n\n\t\troot.focusPosition();\n\t}",
"private void swap(int one, int two)\r\n {\r\n//*** one->two\r\n long temp = a[two];\r\n a[one] = a[two];\r\n a[two] = temp;\r\n }",
"void swap(int index_1,int index_2){\n int temp=arr[index_1];\n arr[index_1]=arr[index_2];\n arr[index_2]=temp;\n }",
"public int[] swap(int[] nums, int a, int b) {\n\t\tint temp = nums[a];\n\t\tnums[a] = nums[b];\n\t\tnums[b] = temp;\n\t\treturn nums;\n\t}",
"private void swap(double x[], int a, int b) {\r\n double t = x[a];\r\n x[a] = x[b];\r\n x[b] = t;\r\n }",
"private static <T> void swap(char x[], T[] a2, int a, int b) {\n\t\tchar t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static <T> void swap(int a, int b, T[] arr) {\n T temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }",
"public static void swap(int[] arr, int a, int b) {\n\t\tint temp = arr[a];\n\t\tarr[a] = arr[b];\n\t\tarr[b] = temp;\n\t}",
"private static <T> void swap(List<T> list, int x, int y){\n T temp = list.get(x);\n list.set(x, list.get(y));\n list.set(y, temp);\n }",
"private void vecswap(double x[], int a, int b, int n) {\r\n for (int i = 0; i < n; i++, a++, b++) {\r\n swap(x, a, b);\r\n }\r\n }",
"private static <T> void swap(short x[], T[] a2, int a, int b) {\n\t\tshort t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public static void swap(int[] a, int first, int second) {\r\n\r\n int c; // a catalyst variable used for the swap\r\n c = a[first]; //value of first item assigned to catalyst\r\n a[first] = a[second];//value of second item assigned to first\r\n a[second] = c; //value of catalyst assigned to second item\r\n }",
"private void swap(int[] a, int i, int j) {\n int tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n }",
"static void swap(List l, int i1, int i2) {\n\t\tObject tmp=l.get(i1);\n\t\tl.set(i1, l.get(i2));\n\t\tl.set(i2, tmp);\n\t}",
"private static <T> void swap(double x[], T[] a2, int a, int b) {\n\t\tdouble t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"static void swapPositions(Piece src, Piece dst) {\n\t\t/* Swap the current positions of the pieces */\n\t\tint tempPosition = src.getPosition();\n \tsrc.setPosition(dst.getPosition());\n \tdst.setPosition(tempPosition);\n \t\n \t/* Swap the pieces in jigsawPieces to ensure that it is sorted by currentPosition */\n\t\tPlay.jigsawPieces.set(src.getPosition(), src);\n\t\tPlay.jigsawPieces.set(dst.getPosition(), dst);\n\t}",
"public void swapB(ListUtilities temp){\n\t\t//make temp point to b\n\t\ttemp = this.prevNum;\n\t\t\n\t\t//if b is not first, make \n\t\tif(temp.prevNum != null){\n\t\t\t//make a next be c\n\t\t\ttemp.prevNum.nextNum = this;\n\t\t\t//make c prev be a\n\t\t\tthis.prevNum = temp.prevNum;\n\t\t}else{\n\t\t\t//else make it point at nothing\n\t\t\tthis.prevNum = null;\n\t\t}\n\t\t//if c is not last\n\t\tif(this.nextNum != null){\n\t\t\t//make b next be d\n\t\t\ttemp.nextNum = this.nextNum;\n\t\t\t//make d prev be b\n\t\t\tthis.nextNum.prevNum = temp;\n\t\t}else{\n\t\t\t//else have 1 point at nothing\n\t\t\tthis.nextNum = null;\n\t\t}\n\t\t\n\t\t//make 1 prev be 2\n\t\tthis.nextNum = temp;\n\t\t//make 2 next be 1\n\t\ttemp.prevNum = this;\n\t}",
"public void swapPokemon(int a, int b)\n\t{\n\t\tif(a >= 0 && a < 6 && b >= 0 && b < 6)\n\t\t{\n\t\t\tPokemon temp = m_pokemon[a];\n\t\t\tm_pokemon[a] = m_pokemon[b];\n\t\t\tm_pokemon[b] = temp;\n\t\t\tServerMessage sendSwap = new ServerMessage(ClientPacket.SWAP_PARTY);\n\t\t\tsendSwap.addInt(a);\n\t\t\tsendSwap.addInt(b);\n\t\t\tgetSession().Send(sendSwap);\n\t\t}\n\t}",
"public void swap(ListNode position1, ListNode position2) {\n int temp = position1.data;\n position1.data = position2.data;\n position2.data = temp;\n }",
"public static void swap(int arr[], int position1, int position2) {\n int holder = arr[position1];\n arr[position1] = arr[position2];\n arr[position2] = holder;\n }",
"private void swap(int []a, int i, int j){\n\t\tint temp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\t}",
"private static void swap(String a, String b) {\n\t\tString temp = a;\n\t\ta = b;\n\t\tb = temp;\n\t\tSystem.out.println(\"in swap : a = \" + a + \"; b = \" + b);\n\t\t\n\t}",
"private void swap(int i, int j){\n \t\tint temp = a[i];\n \t\ta[i] = a[j];\n \t\ta[j] = temp;\n }",
"public void swapRows (int pos1, int pos2) {\n\t \tint swap = this.subset[pos1];\n\t \tthis.subset[pos1] = this.subset[pos2];\n\t \tthis.subset[pos2] = swap;\n\t }",
"private void swap(int[] values, int p1, int p2) {\n int temp = values[p1];\n values[p1] = values[p2];\n values[p2] = temp;\n moves++;\n }",
"@Override\n public boolean swap(int position1, int position2) {\n T first = array[position1];\n T second = array[position2];\n array[position1] = second;\n array[position2] = first;\n return true;\n }",
"public static void swap(int[] a, int x, int y) {\n int tmp = a[x];\n a[x] = a[y];\n a[y] = tmp;\n }",
"private static void swap(int[] a, int i, int j) {\n int swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }",
"public void swap(int i, int j) {\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }",
"private int[] swap(int[] a, int i, int j) {\n int tmp;\n tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n return a;\n }",
"static void swap(int[] numbers, int index1, int index2) {\n\t\tint var = numbers[index1];\r\n\t\tnumbers[index1] = numbers[index2];\r\n\t\tnumbers[index2] = var;\r\n\t}",
"public void swap (int index1, int index2)\n {\n if(index1 >= 0 && index2 >= 0\n && index1 < (stocks.size())\n && index2 < (stocks.size()))\n {\n Stock temp = stocks.get(index1);\n Stock second = stocks.set(index1, stocks.get(index2));\n stocks.set(index2, temp);\n }\n }",
"private static void swap(List<Integer> list, int i, int j){\n int temp = list.get(i);\n list.set(i,list.get(j));\n list.set(j, temp);\n }",
"private void swap(int index1, int index2) {\n \t\tNode node1 = getNode(index1);\n \t\tNode node2 = getNode(index2);\n \t\tthis.contents.set(index1, node2);\n \t\tthis.contents.set(index2, node1);\n \t}",
"private static void swap(char[] array, int a, int b) {\r\n // Swaps\r\n char temp = array[a];\r\n array[a] = array[b];\r\n array[b] = temp;\r\n }",
"void onItemMove(int fromPosition, int toPosition) {\n Collections.swap(mItems, fromPosition, toPosition);\n notifyItemMoved(fromPosition, toPosition);\n }",
"public static void swapReferences(Object[] a, int index1, int index2) {\n Object tmp = a[index1];\n a[index1] = a[index2];\n a[index2] = tmp;\n }",
"public synchronized void elementSwapped(Object source, int index1,\n\t\t\tObject other, int index2) {\n\n\t}",
"public static void swapReferences(Object[] a, int index1, int index2) {\n Object[] tmp = (Object[]) a[index1];\n a[index1] = a[index2];\n a[index2] = tmp;\n }"
] | [
"0.7440657",
"0.732325",
"0.7243125",
"0.7199778",
"0.71563303",
"0.7146976",
"0.7121775",
"0.70877355",
"0.70422685",
"0.7031316",
"0.7021376",
"0.7017712",
"0.701293",
"0.7011324",
"0.70109093",
"0.6995295",
"0.69891536",
"0.6988381",
"0.69765085",
"0.6968984",
"0.6957545",
"0.69364786",
"0.69363886",
"0.69360286",
"0.69259435",
"0.69146514",
"0.68983966",
"0.68950355",
"0.68915135",
"0.68887585",
"0.686923",
"0.6834806",
"0.68204254",
"0.68073565",
"0.6798064",
"0.6792449",
"0.6788608",
"0.6781936",
"0.67634326",
"0.67634326",
"0.6760735",
"0.6757199",
"0.6730355",
"0.6730329",
"0.6726946",
"0.67235184",
"0.6715771",
"0.66913474",
"0.66876775",
"0.6683934",
"0.6678066",
"0.66607416",
"0.6659874",
"0.6646229",
"0.6641887",
"0.66212016",
"0.6612589",
"0.6547382",
"0.6530767",
"0.6519558",
"0.65185726",
"0.6512902",
"0.6489642",
"0.6485969",
"0.6470156",
"0.6466194",
"0.6462123",
"0.64592844",
"0.6437846",
"0.6436838",
"0.64164215",
"0.63977534",
"0.63974035",
"0.6396958",
"0.6379142",
"0.6375004",
"0.63722414",
"0.6369389",
"0.63655597",
"0.6350131",
"0.6349622",
"0.6346544",
"0.6338438",
"0.6322574",
"0.63224167",
"0.629546",
"0.6294585",
"0.62900275",
"0.62844867",
"0.6281219",
"0.62726206",
"0.6270066",
"0.626768",
"0.62552655",
"0.6231647",
"0.62229896",
"0.6215834",
"0.6213977",
"0.62126917",
"0.6202358"
] | 0.67969245 | 35 |
/////////////////a test program for MinHeap/////////////////// | public String get(int position)
{
return data[position];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void Minheap()\n {\n for(int i= (size-2)/2;i>=0;i--)\n {\n minHeapify(i);\n }\n }",
"public MinHeap(){\r\n nextAvail = 1;\r\n }",
"@Test\n\tpublic void testHeap() {\n\t\t// merely a suggestion \n\t}",
"@Test\n\tpublic void testGetMin() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\theap.build(testArrayList);\n\t\tassertEquals(3, heap.getMin().key);\n\t\tassertEquals(15, heap.getSize());\n\t}",
"public static void main(String[] args) {\r\n\t\tFastMinHeap<String> stringHeap = new FastMinHeap();\r\n\t\tstringHeap.insert(\"two\", 2);\r\n\t\tstringHeap.insert(\"four\", 4);\r\n\t\tstringHeap.insert(\"one\", 1);\r\n\t\tstringHeap.insert(\"six\", 6);\r\n\t\tstringHeap.insert(\"neg one\", -1);\r\n\t\tSystem.out.println(stringHeap.locations.toString());\r\n\t\tSystem.out.println(\"min: \" + stringHeap.extractMin());\r\n\t\tSystem.out.println(stringHeap.locations.toString());\r\n\t\tSystem.out.println(stringHeap.toString());\r\n\t\tSystem.out.println(stringHeap.locationOf(\"one\"));\r\n\t}",
"public void deleteMin() {\r\n\t\tif (empty())\r\n\t\t\treturn;\r\n\t\telse {\r\n\t\t\tif (this.size > 0) {\r\n\t\t\t\tthis.size--;\r\n\t\t\t}\r\n\t\t\tif (this.size == 0) {\r\n\t\t\t\tthis.empty = true;\r\n\t\t\t}\r\n\r\n\t\t\tHeapNode hN = this.min;\r\n\t\t\tint rnkCount = 0;\r\n\t\t\tHeapNode hNIterator = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\trnkCount++;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t}\r\n\t\t\tthis.HeapTreesArray[rnkCount] = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\trnkCount--;\r\n\t\t\tBinomialHeap bH = new BinomialHeap();\r\n\t\t\tif (hNIterator != null) {\r\n\t\t\t\tbH.empty = false;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\tbH.HeapTreesArray[rnkCount] = hNIterator;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t\tbH.HeapTreesArray[rnkCount].rightBrother = null;\r\n\t\t\t\tif (hNIterator != null) {\r\n\t\t\t\t\thNIterator.leftBrother = null;\r\n\t\t\t\t}\r\n\t\t\t\trnkCount = rnkCount - 1;\r\n\t\t\t}\r\n\t\t\tthis.min = null;\r\n\t\t\tfor (int i = 0; i < this.HeapTreesArray.length; i++) {\r\n\t\t\t\tif (this.min == null) {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tif (this.HeapTreesArray[i].value < this.min.value) {\r\n\t\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!bH.empty()) {\r\n\t\t\t\tfor (int i = 0; i < bH.HeapTreesArray.length; i++) {\r\n\t\t\t\t\tif (bH.min == null) {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tif (bH.HeapTreesArray[i].value < bH.min.value) {\r\n\t\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.meld(bH);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"void MinInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] > arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }",
"@Test\n\tpublic void testExtractMin() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\tdouble[] expected = new double[] { 5, 7, 24, 36, 15, 48, 32, 47, 93, 27, 38, 70, 53, 33, 93 };\n\t\theap.build(testArrayList);\n\t\tassertEquals(3, heap.extractMin().key);\n\t\tassertArrayEquals(expected, heap.getKeyArray());\n\t\tassertEquals(14, heap.getSize());\n\t}",
"private boolean isMinHeap() {\r\n return isMinHeap(1);\r\n }",
"public static void main(String[] args) {\r\n\r\n\t\tNode root = new Node(2);\r\n\t\troot.left = new Node(3);\r\n\t\troot.right = new Node(4);\r\n\t\troot.left.left = new Node(5);\r\n\t\troot.left.right = new Node(6);\r\n\t\troot.right.left = new Node(8);\r\n\t\troot.right.right = new Node(10);\r\n\r\n\t\tif (isHeap(root)) {\r\n\t\t\tSystem.out.print(\"Given Binary Tree is a min-Heap\");\r\n\t\t} else {\r\n\t\t\tSystem.out.print(\"Given Binary Tree is not a min-Heap\");\r\n\t\t}\r\n\r\n\t\tSystem.out.println(isMinHeap(root));\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tint [][] arr = new int[][] {\r\n\t\t\t{8,9,10,12},\r\n\t\t\t{2,5,9,12},\r\n\t\t\t{3,6,10,11},\r\n\t\t\t{1,4,7,8}\r\n\t\t};\t\t\r\n\t\t\r\n\t\tPriorityQueue<HeapNode> heap = new PriorityQueue<>();\r\n\t\tfor(int i=0;i<arr.length;i++)\r\n\t\t{\r\n\t\t\theap.offer(new HeapNode(arr[i][0], i, 0));\r\n\t\t}\r\n\t\tint count=0;\r\n\t\twhile(count<16)\r\n\t\t{\r\n\t\t\tHeapNode min = heap.poll();\r\n\t\t\tSystem.out.println(min.value);\r\n\t\t\tcount++;\r\n\t\t\tint value=0;\r\n\t\t\tint nextIndex=min.index+1;\r\n\t\t\tif(nextIndex < arr[min.k].length)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tvalue=arr[min.k][nextIndex];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvalue=Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t\theap.offer(new HeapNode(value, min.k, nextIndex));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"void minHeapify(int i)\n {\n int lt=MyHeap.left(i);\n int rt=MyHeap.right(i);\n int smallest=i;\n if(lt<size && arr[lt]<arr[i])\n smallest=lt;\n if(rt<size && arr[rt]<arr[smallest])\n smallest=rt;\n if(smallest!=i)\n {\n swap(i,smallest);\n minHeapify(smallest);\n }\n }",
"public MinHeap(int capacity) {\r\n this.capacity = capacity;\r\n minHeap = new HeapNode[capacity + 1];\r\n indexes = new int[capacity];\r\n minHeap[0] = new HeapNode();\r\n minHeap[0].distance = Integer.MIN_VALUE;\r\n minHeap[0].vertex=-1;\r\n currentSize = 0;\r\n }",
"public MinHeap(int size)\n\t{\n\t\tdata = new String [size];\n\t\tpointer = 0;\n\t}",
"@Before\n public void setUpBinaryMinHeaps() {\n empty = new BinaryMinHeap<>();\n emptyArr = new ArrayList<>();\n \n multipleElements = new BinaryMinHeap<>();\n multipleElements.insert(7);\n multipleElements.insert(8);\n multipleElements.insert(5);\n multipleElements.insert(3);\n multipleElements.insert(2);\n multipleElements.insert(6);\n \n multiArr = new ArrayList<>();\n multiArr.add(2);\n multiArr.add(3);\n multiArr.add(6);\n multiArr.add(8);\n multiArr.add(5);\n multiArr.add(7);\n \n }",
"private void heapify() {\n\t\tint currIndex = 0;\n\t\twhile (currIndex < heapSize) {\n\t\t\tT val = lstEle.get(currIndex);\n\t\t\tint leftSubtreeIndex = getLeftSubtree(currIndex);\n\t\t\tint rightSubtreeIndex = getRightSubtree(currIndex);\n\t\t\tT leftChildVal = leftSubtreeIndex < heapSize ? lstEle.get(leftSubtreeIndex) : null;\n\t\t\tT rightChildVal = rightSubtreeIndex < heapSize ? lstEle.get(rightSubtreeIndex) : null;\n\t\t\t\n\t\t\tT minVal = null;\n\t\t\tint minValIndex = -1;\n\t\t\tif(leftChildVal != null && rightChildVal != null){\n\t\t\t\tint compVal = leftChildVal.compareTo(rightChildVal); \n\t\t\t\tif(compVal < 0){\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t}else {\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(leftChildVal != null && leftChildVal.compareTo(val) < 0){\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t}else if (rightChildVal != null && rightChildVal.compareTo(val) < 0 ){\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\tMin Val : \" +minVal +\" --> \" +minValIndex);\n\t\t\t\n\t\t\tlstEle.set(currIndex, minVal);\n\t\t\tcurrIndex = minValIndex;\n\t\t\tlstEle.set(minValIndex, val);\n\t\t\t\n\t\t}\n\n\t}",
"private void setMinHeap() {\n // parentIndex is the last leaf node parentIndex\n int parentIndex = (array.length - 2) / 2;\n // from last parentIndex down on the depth path to the root\n // convert to minHeap\n while (parentIndex >= 0) { // when parentIndex = 0, the root\n minHeapify(parentIndex, array.length);\n // go to next index(parentIndex) on that level\n parentIndex--;\n }\n }",
"public MinPriorityQueue(int cap)\r\n {\r\n heap = (Item[]) new Comparable[cap+1]; // reservamos un espacio adicional\r\n // para el dummy en la posicion 0\r\n size = 0;\r\n }",
"@Test\n public void test() {\n List<Integer> list = Arrays.asList(48, 12, 24, 7, 8, -5, 24, 391, 24, 56, 2, 6, 8, 41);\n Heap minHeap = new Heap(Heap.MIN_HEAP, list);\n List<Integer> expected = Arrays.asList(-5, 2, 6, 7, 8, 8, 24, 391, 24, 56, 12, 24, 48, 41);\n Assert.assertArrayEquals(expected.toArray(), minHeap.heap.toArray());\n Heap maxHeap = new Heap(Heap.MAX_HEAP, list);\n Assert.assertArrayEquals(expected.toArray(), maxHeap.heap.toArray());\n }",
"public MinHeap() {\n\tdata = new ArrayList<Integer>();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic MinHeap() { \r\n\t\theap = new MinHeapNode[1]; \r\n\t }",
"private void minHeapify(int i) {\n int l, r, smallest, temp;\n\n l = leftchild(i);\n r = rightchild(i);\n\n if (r <= heapsize) {\n if (array[l] < array[r]) {\n smallest = l;\n } else {\n smallest = r;\n }\n if (array[i] > array[smallest]) {\n temp = array[i];\n array[i] = array[smallest];\n array[smallest] = temp;\n\n minHeapify(smallest);\n }\n else if ((l == heapsize) && (array[i] > array[l])) {\n temp = array[i];\n array[i] = array[l];\n array[l] = temp;\n\n }\n }\n }",
"private static Node delMin(ArrayList<Node> minHeap) {\n\t\tNode min = minHeap.remove(1);\n\t\t//put last element first\n\t\tint n = minHeap.size();\n\t\tif (n==1) return min;\n\t\tNode last = minHeap.remove(n-1);\n\t\tminHeap.add(1, last);\n\t\t//sink the new top to its right position\n\t\tsink(minHeap);\n\t\treturn min;\n\t}",
"public node_data heapMinimum(){return _a[0];}",
"public Vertex HeapExtractMin() {\n\n if (size == 1) {\n \t\n Vertex min = ver[0];\n size--;\n return min;\n }\n\n // Getting the last element and making it root element of the binary tree\n Vertex min = ver[0];\n Vertex lastItem = ver[size-1];\n ver[0]= lastItem;\n size--;\n // Calling heapMinHeapify to maintain heap property\n heapMinHeapify(0);\n return min;\n }",
"boolean remMinEltTester(IHeap Heap, IBinTree Tree){\n\t\t\tLinkedList<Integer> treeResult2 = Tree.getTreeList();\n\t\t\tLinkedList<Integer> newHeapList2 = Heap.getTreeList();\n\t\t\t\n\t\t\tnewHeapList2.sort(null);\n\t\t\t\n\t\t\tif (newHeapList2.size() > 0) {\n\t\t\t\tnewHeapList2.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\ttreeResult2.sort(null);\n\t\t\t\n\t\t\t\n\t\t\treturn ((treeResult2.equals(newHeapList2)) && Heap.isHeap());\n\t\t}",
"public MinHeap() {\n// contents = new HashMap<>();\n contents= new ArrayList<>();\n backwards = new HashMap<>();\n contents = new ArrayList<>();\n contents.add(null);\n\n// contents.put(0, null);\n backwards.put(null, 0);\n// setContents = new HashSet<>();\n }",
"public T deleteMin()\n {\n // to handle empty excpetion\n if(size == 0)\n {\n throw new MyException(\"Heap is empty.\");\n }\n\n // create int hole, set to 0\n int hole = 0;\n // create return value as the item at index hole\n T returnValue = arr[hole];\n // create item to be last item of heap\n T item = arr[size-1];\n // decrement size\n size--;\n // call newHole() method to get newhole\n int newhole = newHole(hole, item);\n while(newhole != -1)\n {\n // set value of arr[newhole] to be arr[hole]\n arr[hole] = arr[newhole];\n // hole is now whatever newhole was\n hole = newhole;\n // update newhole by calling newHole()\n newhole = newHole(hole, item);\n }\n // put item where the hole is in the heap\n arr[hole] = item;\n return returnValue;\n }",
"private void minHeapify(int v, int heapSize){\n\t\tint smallest;\n\t\tint left = leftChild(v);\n\t\tint right = rightChild(v);\n\t\tif (left<heapSize && _a[left].getWeight()<_a[v].getWeight()){\n\t\t\tsmallest = left;\n\t\t}\n\t\telse{\n\t\t\tsmallest = v;\n\t\t}\n\t\tif (right<heapSize && _a[right].getWeight()<_a[smallest].getWeight()){\n\t\t\tsmallest = right;\n\t\t}\n\t\tif (smallest!=v){\n\t\t\texchange(v, smallest);\n\t\t\tminHeapify(smallest, heapSize);\n\t\t}\t\t\n\t}",
"private void minHeapify(Vertex[] queue, int index, int size) {\r\n\t\tint l = left(index);\r\n\t\tint r = right(index);\r\n\t\tint smallest;\r\n\t\tif (l < size && queue[l].dist < queue[index].dist)\r\n\t\t\tsmallest = l;\r\n\t\telse\r\n\t\t\tsmallest = index;\r\n\t\tif (r < size && queue[r].dist < queue[smallest].dist)\r\n\t\t\tsmallest = r;\r\n\t\tif (smallest != index) {\r\n\t\t\tVertex temp = queue[index];\r\n\t\t\tqueue[index] = queue[smallest];\r\n\t\t\tqueue[index].setHandle(index);\r\n\t\t\ttemp.setHandle(smallest);\r\n\t\t\tqueue[smallest] = temp;\r\n\t\t\tminHeapify(queue, smallest, size);\r\n\t\t}\r\n\t}",
"MinHeap createMinHeap(int capacity)\r\n\t{\r\n\t MinHeap minHeap = new MinHeap();\r\n\t minHeap.size = 0; // current size is 0\r\n\t minHeap.capacity = capacity;\r\n\t minHeap.array = new MinHeapNode[capacity];\r\n\t return minHeap;\r\n\t}",
"private boolean isMinHeap(int k) {\r\n if (k > N) return true;\r\n int left = 2*k, right = 2*k + 1;\r\n if (left <= N && greater(k, left)) return false;\r\n if (right <= N && greater(k, right)) return false;\r\n return isMinHeap(left) && isMinHeap(right);\r\n }",
"public void addMinHeap(E[] arr) {\n //copy input\n System.arraycopy(arr, 0, array, 0, arr.length);\n // from last parent down, check/ establish minHeap\n setMinHeap();\n lastPosition = arr.length;\n array = Arrays.copyOf(array, array.length * 5 / 2); // give space for null leaves to be used in traversals\n }",
"public Heap(boolean isMin) {\r\n // TODO\r\n }",
"public void minHeapInsert(node_data node){\n\t\tresize(1);\n\t\t_a[_size-1] = new NodeData((NodeData) node);\n\t\t_a[_size-1].setWeight(_positiveInfinity);\n\t\theapDecreaseKey(node);\n\t}",
"static void primsMST(SimpleVertex simpleVertex, SimpleVertex parent, PrimsMinHeap heap) {\n\t\tsimpleVertex.parent = parent;\n\n\t\tfor (SimpleVertex vertice : allvertices) {\n\n\t\t\tmap.put(vertice.Vertexname, Integer.MAX_VALUE);\n\n\t\t}\n\n\t\tmap.put(0, 0);\n\t\theap.Min_heapfy(map, simpleVertex);\n\n\t}",
"public Heap(boolean isMin, Collection<ValueType> data) {\r\n // TODO\r\n }",
"void minHeapify(int i) {\n\n\t\tint l = 2*i + 1;\n\t\tint r = 2*i + 2;\n\t\tint smallest = i;\n \n\t\tif(l < size && arr[l].element < arr[smallest].element)\n\t\t\tsmallest = l;\n\n\t\tif(r < size && arr[r].element < arr[smallest].element)\n\t\t\tsmallest = r;\n\n\t\tif(smallest != i) {\n\t\t\t// call method exchange to change \n\t\t\texchange(arr,i,smallest);\n\t\t\tminHeapify(smallest);\n\t\t}\n\t}",
"private int min(int[] children) {\r\n int max = heap.size() - 1;\r\n if (children[0] <= max && children[1] <= max) {\r\n if (heap.get(children[0]) < heap.get(children[1])) {\r\n return children[0];\r\n } else {\r\n return children[1];\r\n }\r\n } else {\r\n return -1;\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tMyPriorityQueue mpq = new MyPriorityQueue();\n\n//\t\tmpq.insert(10);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(5);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(15);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(2);\n//\n//\t\ttestQueue(mpq);\n//\t\t\n//\t\tSystem.out.println(mpq.deleteMin());\n//\n//\t\ttestQueue(mpq);\n\t\t\n\t\tfor(int i = 100; i > 0; i--) {\n\t\t\tmpq.insert(i);\n\t\t}\n\t\t\n\t\tint [] sortedArray = new int[100];\n\t\tint index = 0;\n\t\twhile(!mpq.isEmpty()) {\n\t\t\tsortedArray[index++] = mpq.deleteMin();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i <100; i++) {\n\t\t\tSystem.out.println(sortedArray[i] + \" \");\n\t\t}\n\t}",
"public FastMinHeap() {\r\n\t\tthis.objectHeap = (E[]) new Object[DEFAULT_CAPACITY];\r\n\t\tthis.costHeap = new double[DEFAULT_CAPACITY];\r\n\t\tthis.size = 0;\r\n\t\tthis.capacity = DEFAULT_CAPACITY;\r\n\t\tthis.locations = new FastHashMap();\r\n\t}",
"public Node binomialHeapExtractMin() {\n\t\tNode x = this.deleteMin();\n\t\t\n\t\t// make a new heap\n\t\t// reverse the child list of x and assign it to the head of new heap.\n\t\tBinomialHeap hPrime = new BinomialHeap();\n\t\thPrime.head = reverseLinkedList(x.leftChild);\n\t\t\n\t\t// perform union on the child tree list of x and the original heap\n\t\tBinomialHeap h = this.binomialHeapUnion(hPrime);\n\t\tthis.head = h.head;\n\t\t\n\t\t// return the minimum node\n\t\treturn x;\n\t}",
"private void minHeapify(int parentIndex, int size) {\n // get leftChild and rightChild child of node at index parentIndex\n int leftChild = (2 * parentIndex) + 1;\n int rightChild = (2 * parentIndex) + 2;\n // assume parent is the smallest\n int smallest = parentIndex;\n // compare parent with its leftChild and rightChild to find the value to swap(smallest)\n if (leftChild < size && ((Comparable<E>) array[leftChild]).compareTo(array[parentIndex]) < 0) {\n smallest = leftChild;\n }\n if (rightChild < size && ((Comparable<E>) array[rightChild]).compareTo(array[smallest]) < 0) {\n smallest = rightChild;\n }\n // if the smallest value is not the parent,\n // swap them and continue the procedure on the child,\n // down on depth path to the root\n if (smallest != parentIndex) {\n swap(parentIndex, smallest);\n minHeapify(smallest, size);\n }\n }",
"void MaxInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] < arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }",
"void minDecrease(int i,int x)\n {\n arr[i]=x;\n while(i!=0 && arr[MyHeap.parent(i)]>arr[i])\n {\n swap(MyHeap.parent(i),i);\n i=MyHeap.parent(i);\n }\n }",
"public MinHeapNode<T> deleMin() {\n\t\tif(!isEmpty()) { \r\n\t\t\tMinHeapNode<T> min = heap[1]; //min node\r\n\t heap[1] = heap[currentSize--]; //move bottom node to root\r\n\t heapDown(1); //move root down\r\n\t return min; \r\n\t } \r\n\t return null; \r\n\t}",
"public void minHeapify(int i) {\n\t\t\tint l = left(i);\n\t\t\tint r = right(i);\n\t\t\tint smallest = i;\n\n\t\t\tif (l < heap_size && harr[l] < harr[smallest]) {\n\t\t\t\tsmallest = l;\n\t\t\t}\n\t\t\tif (r < heap_size && harr[r] < harr[smallest]) {\n\t\t\t\tsmallest = r;\n\t\t\t}\n\t\t\tif (smallest != i) {\n\t\t\t\tswap(i, smallest);\n\t\t\t\tminHeapify(smallest);\n\t\t\t}\n\t\t}",
"public Node deleteMin() {\n\t\t// if the heap is empty\n\t\t// return MAXINT as output\n\t\tNode min = new Node(Integer.MAX_VALUE);\n\t\tif(this.head == null)\n\t\t\treturn min;\n\t\t\n\t\t\n\t\tNode prevMin = null;\n\t\tNode curr = this.head;\n\t\tNode prev = null;\n\t\t\n\t\t// find the smallest node\n\t\t// keep track of node who points to this minimum node\n\t\twhile(curr!=null) {\n\t\t\tif(curr.key<min.key) {\n\t\t\t\tmin = curr;\n\t\t\t\tprevMin = prev;\n\t\t\t}\n\t\t\tprev = curr;\n\t\t\tcurr = curr.rightSibling;\n\t\t}\n\t\t\n\t\t// if its the head then move one pointer ahead\n\t\tif(prevMin == null)\n\t\t\tthis.head = min.rightSibling;\n\t\telse {\n\t\t\t// else attach the previous node to the rightSibling of min\n\t\t\tprevMin.rightSibling = min.rightSibling;\n\t\t}\n\t\tmin.rightSibling = null;\n\t\t\n\t\t//return min node\n\t\treturn min;\n\t}",
"public static Vector<Edge> computeMinimumSpanningTreeNodeHeap(Graph g){\r\n\t\t//minimum spanning tree\r\n\t\tVector<Edge> mst = new Vector<Edge>();\r\n\r\n\t\t//defining X\r\n\t\tint qntNodes = g.getNodes().length;\r\n\t\tbelongsToX = new boolean[qntNodes];\r\n\r\n\t\t//initializing X\r\n\t\tbelongsToX[0] = true;\r\n\t\t\r\n\t\t//initializing heap\r\n\t\tHeapNode heap = new HeapNode(qntNodes);\r\n\t\trestoreHeapProperties(g.getNodes()[0], heap);\r\n\r\n\t\t//main loop\r\n\t\tfor(int i = 1; i < qntNodes; i++){\t\t\t\r\n\t\t\t//find minimum edge that crosses the frontier\r\n\t\t\tNode newNode = heap.extractMin();\r\n\t\t\tEdge min = heap.getNodeMinEdge(newNode);\r\n\t\t\t\r\n\t\t\t//add new node to X\r\n\t\t\tbelongsToX[newNode.number] = true;\r\n\r\n\t\t\t//add minimum edge to tree\r\n\t\t\tmst.add(min);\r\n\t\t\t\r\n\t\t\t//restore heap properties\r\n\t\t\trestoreHeapProperties(newNode, heap);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn mst;\r\n\t}",
"public int Delete_Min()\n {\n \tthis.array[0]=this.array[this.getSize()-1];\n \tthis.size--; \n \tthis.array[0].setPos(0);\n \tint numOfCompares = heapifyDown(this, 0);\n \treturn numOfCompares;\n }",
"public boolean isMinHeap(int[] array) {\n int prev = array[0];\n for (int i=1; i<array.length; i++) {\n if (prev > array[i]) {\n return false;\n }\n \n prev = array[i];\n }\n \n return true;\n }",
"private void minHeapify(int position) {\n // if root, nothing to do\n if (position == 0) {\n return;\n }\n int parent = (int) Math.floor((position - 1) / 2);\n // if child is smaller than parent, swap them and call the method\n // again on the new parent\n if (((Comparable<E>) array[position]).compareTo(array[parent]) < 0) {\n swap(position, parent);\n minHeapify(parent);\n }\n }",
"public static void minHeapify(HeapNode harr[], int i, int heap_size) {\n\t\tint l = i * 2 + 1;\n\t\tint r = i * 2 + 2;\n\t\tint smallest = i;\n\t\tif (l < heap_size && harr[l].val < harr[i].val)\n\t\t\tsmallest = l;\n\t\tif (r < heap_size && harr[r].val < harr[smallest].val)\n\t\t\tsmallest = r;\n\t\tif (smallest != i) {\n\t\t\tswap(harr[i], harr[smallest]);\n\t\t\tminHeapify(harr, smallest, heap_size);\n\t\t}\n\t}",
"public int findMin()\n {\n if(isEmpty())\n {\n throw new NoSuchElementException(\"Underflow Exeption\");\n }\n return heap[0];\n }",
"public static void main(String[] args) {\n Maxheap<Integer> maxheap = new Maxheap<>();\n double time=0;\n int opCount = 10000000;\n time = testHeap(maxheap,opCount,true);\n System.out.println(\"Test heapify completed: \"+time+ \"s\");\n time = testHeap(maxheap,opCount,false);\n System.out.println(\"Test completed: \"+time+ \"s\");\n\n\n// time = debugHeap(maxheap,5,true);\n// System.out.println(\"Test completed: \"+time+ \"s\");\n }",
"public FastMinHeap(int initialSize) {\r\n\t\tif (initialSize < 1) {\r\n\t\t\tthrow new RuntimeException(\"Initial size of heap must be >= 1\");\r\n\t\t}\r\n\t\tthis.objectHeap = (E[]) new Object[initialSize];\r\n\t\tthis.costHeap = new double[initialSize];\r\n\t\tthis.size = 0;\r\n\t\tthis.capacity = initialSize;\r\n\t\tthis.locations = new FastHashMap();\r\n\t}",
"public void testFindMin() {\r\n assertNull(tree.findMin());\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n assertEquals(\"act\", tree.findMin());\r\n tree.remove(\"act\");\r\n assertEquals(\"apple\", tree.findMin());\r\n }",
"@Test\n\tpublic void testHeapify() {\n\t\tHeap heap = new Heap(testArrayList);\n\t\theap.heapify(0);\n\t\tArrayList<Integer> expected = new ArrayList<>(\n\t\t\t\tArrays.asList(3, 5, 33, 36, 15, 70, 24, 47, 7, 27, 38, 48, 53, 32, 93));\n\t\tassertEquals(expected, heap.getHeapArray());\n\t}",
"@Test\n public void testDelMin() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n instance.insert(7);\n instance.insert(5);\n instance.insert(6);\n assertEquals(new Integer(5), instance.delMin());\n }",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tPriorityQueue<Integer>heap=new PriorityQueue<Integer>(new comparison());\n\t\tPriorityQueue<Integer>heap1=new PriorityQueue<Integer>();\n\t\tint num=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tfor(int i=0;i<num;i++)\n\t\t{\n\t\t\tint value=sc.nextInt();\n\t\t\theap.add(value);\n\t\t\theap1.add(value);\n\t\t\tif(heap.size()>k)\n\t\t\t{\n\t\t\t\theap.remove();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t\tfor(int i=0;i<k-1;i++)\n\t\t{\n\t\t\theap.remove();\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t}",
"public MinHeapNode(int value, int machine, int index) {\n\t\tthis.value = value;\n\t\tthis.machine = machine;\n\t\tthis.index = index;\n\t}",
"public void downHeap(int pos) throws NoSuchElementException\r\n {\r\n if (pos <= 0 || pos > size)\r\n throw new NoSuchElementException();\r\n\r\n int cur = pos;\r\n while (true) {\r\n int left = 2* cur; // [TODO] indice del hijo izquierdo\r\n int right = 2* cur + 1; // [TODO] indice del hijo derecho\r\n\r\n // [TODO] Si no tiene hijos (es una hoja), detenemos el loop\r\n\r\n if (left > size && right > size)\r\n break;\r\n\r\n int min_idx; // indice (left o right) del hijo mas prioritario\r\n\r\n // [TODO] Compara el hijo izquierdo versus el derecho y determina cual\r\n // es el mas prioritario. Graba su posicion en min_idx. Ojo: el hijo\r\n // derecho puede ser que NO exista, en cuyo caso el mas prioritario es\r\n // el izquierdo\r\n if (heap[right] == null){\r\n min_idx = left;\r\n }else\r\n if (heap[left].compareTo(heap[right]) > 0){\r\n min_idx = left;\r\n }else\r\n min_idx = right;\r\n\r\n\r\n // [TODO] Revisar si la propiedad de heap se cumple para los elementos\r\n // en los indices cur y min_idx. Si no nay violacion de la propiedad\r\n // de heap, terminamos el loop\r\n if (heap[cur].compareTo(heap[min_idx]) > 0)\r\n break;\r\n\r\n // [TODO] Intercambiamos los elementos en los indices cur y min_idx\r\n Item c = heap[cur];\r\n Item hijo = heap[min_idx];\r\n\r\n heap[min_idx] = c;\r\n heap[cur] = hijo;\r\n\r\n // [TODO] Navega hacia el hijo mas prioritario\r\n cur = min_idx;\r\n }\r\n }",
"public Point min() {\n\t\tif (heapSize >= 0)\n\t\t\treturn new Point(heapArr[0]);\n\t\telse\n\t\t\tthrow new RuntimeException(\"MinHeap is empty!\");\n\t}",
"public ArrayHeapMinPQ() {\n heapArray = new ArrayList<>();\n itemMap = new HashMap<>();\n heapArray.add(null); //alway set index 0 null and heap starts from index 1.\n nextIndex = 1;\n }",
"private void minHeapify(int location) {\r\n\t\tint l = left(location);\r\n\t\tint r = right(location);\r\n\t\tint smallest;\r\n\t\tif (l < this.size && this.costHeap[l] < this.costHeap[location]) {\r\n\t\t\tsmallest = l;\r\n\t\t} else {\r\n\t\t\tsmallest = location;\r\n\t\t}\r\n\t\tif (r < this.size && this.costHeap[r] < this.costHeap[smallest]) {\r\n\t\t\tsmallest = r;\r\n\t\t}\r\n\t\tif (smallest != location) {\r\n\t\t\t// exchange i with smallest\r\n\t\t\tE tempE = objectHeap[location];\r\n\t\t\tdouble tempC = this.costHeap[location];\r\n\t\t\tthis.objectHeap[location] = this.objectHeap[smallest];\r\n\t\t\tthis.costHeap[location] = this.costHeap[smallest];\r\n\t\t\tthis.locations.put(this.objectHeap[location], location);\r\n\t\t\tthis.objectHeap[smallest] = tempE;\r\n\t\t\tthis.costHeap[smallest] = tempC;\r\n\t\t\tthis.locations.put(tempE, smallest);\r\n\t\t\tminHeapify(smallest);\r\n\t\t}\r\n\t}",
"public Node binomialHeapMinimum() {\n\t\tNode y = null;\n\t\tNode x = this.head;\n\t\tint min = Integer.MAX_VALUE;\n\t\twhile(x!=null) {\n\t\t\tif (x.key < min) {\n\t\t\t\tmin = x.key;\n\t\t\t\ty = x;\n\t\t\t}\n\t\t\tx = x.rightSibling;\n\t\t}\n\t\treturn y;\n\t}",
"public void balanceHeaps(){\n \n //If max heap size is greater than min heap then pop the first element and put int min heap\n if(maxHeap.size() > minHeap.size())\n minHeap.add(maxHeap.pollFirst());\n\n }",
"public void minHeapify(int i) {\n\t\tint smallest;\n\t\tint l = left(i);\n\t\tint r = right(i);\n\t\tif (l < heapSize && General.pointYCompare(heapArr[l], heapArr[i]) < 0)\n\t\t\tsmallest = l;\n\t\telse\n\t\t\tsmallest = i;\n\t\tif (r < heapSize && General.pointYCompare(heapArr[r], heapArr[smallest]) < 0)\n\t\t\tsmallest = r;\n\t\tif (smallest != i) {\n\t\t\tpointSwap(i, smallest);\n\t\t\tminHeapify(smallest);\n\t\t}\n\t}",
"@Test\n public void canHeapSort(){\n int[] array = {5, 6, 3, 7, 9, 1};\n heapSort(array);\n for (int elem : array) {\n System.out.println(elem + \" \");\n }\n }",
"public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}",
"public static void insertHeap(int x)\n {\n if(s.isEmpty()){\n s.add(x);\n }\n else if(x>s.peek()){\n g.add(x);\n }\n else if(g.isEmpty()){\n g.add(s.poll());\n s.add(x);\n }\n else {\n s.add(x);\n }\n balanceHeaps();\n \n }",
"public E extractMin() {\r\n\t\tif (this.size == 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Heap underflow. Cannot extractMin from an empty heap.\");\r\n\t\t}\r\n\t\tE min = this.objectHeap[0];\r\n\t\tdouble costMin = this.costHeap[0];\r\n\t\tthis.objectHeap[0] = this.objectHeap[this.size - 1];\r\n\t\tthis.costHeap[0] = this.costHeap[this.size - 1];\r\n\t\tthis.size -= 1;\r\n\t\tthis.locations.delete(min);\r\n\t\tthis.locations.put(this.objectHeap[0], 0);\r\n\t\tthis.minHeapify(0);\r\n\t\treturn min;\r\n\t}",
"public void makeHeap() {\r\n\t\t//for (int i = (theHeap.size() >> 1) - 1; i >= 0; i--) {\r\n\t\tfor (int i = (theHeap.size() - 1) >> 1; i >= 0; i--) {\r\n\t\t\tsiftDown(i);\r\n\t\t}\r\n\t}",
"public DHeap_Item Get_Min()\n {\n\treturn array[0];\n }",
"@Test\n\tvoid tesPreorder() {\n\t\tHeap<Integer, Integer> treap = createTreeHeap();\n\t\t//root, left, right\n\t\tassertEquals(\"[5, 4, 2, 1, 3]\", treap.preOrder());\n\t}",
"@Test\n\tpublic void BuildMaxHeaptest1() {\n\t\t Job jarray[]=new Job[5];\n\t\t jarray[0]=new Job(\"job1\",50,1);\n\t\t jarray[1]=new Job(\"job2\",20,2);\n\t\t jarray[2]=new Job(\"job3\",80,3);\n\t\t jarray[3]=new Job(\"job4\",20,4);\n\t\t jarray[4]=new Job(\"job5\",1,5);\n\t\t int i;\n\t\t //= (int)Math.floor(jarray.length);\n\t\t \n\t\t\n\t\t PQHeap.BuildMaxHeap(jarray);\n\t\t\n\t\t for( i = (int)Math.floor(jarray.length); i >0; i-- )\n\t\t \tPQHeap.MaxHeapify(jarray, i);\n\t\n\t\tassertNotEquals(-1, i);\n\t}",
"public Point ExtractMin() {\n\t\tif (heapSize < 0)\n\t\t\tthrow new RuntimeException(\"MinHeap underflow!\");\n\t\tPoint min = new Point(heapArr[0]);\n\t\theapArr[0] = new Point(heapArr[heapSize - 1]);\n\t\theapSize = heapSize - 1;\n\t\tminHeapify(0);\n\t\treturn min;\n\n\t}",
"public Heap getHeap() {\n return minHeap;\n }",
"public LeftistHeap() {\n root = null;\n }",
"private static void Heapify(int[] A, int i, int size)\n {\n // get left and right child of node at index i\n int left = LEFT(i);\n int right = RIGHT(i);\n\n int smallest = i;\n\n // compare A[i] with its left and right child\n // and find smallest value\n if (left < size && A[left] < A[i]) {\n smallest = left;\n }\n\n if (right < size && A[right] < A[smallest]) {\n smallest = right;\n }\n\n // swap with child having lesser value and\n // call heapify-down on the child\n if (smallest != i) {\n swap(A, i, smallest);\n Heapify(A, smallest, size);\n }\n }",
"public static void heapify() {\n //배열을 heap 자료형으로 만든다.\n // 1d 2d 2d 3d 3d 3d 3d 4d\n// int[] numbers = {9, 12, 1, 3, 6, 2, 8, 4};\n // 1depth의 자식노드 numbers[2i], numbers[2i+1]\n int[] numbers = {4, 1, 3, 2, 16, 9, 10, 14, 8, 7};\n int i = 1;\n while (true) {\n int target = numbers[i-1];\n int left = numbers[2*i-1];\n\n if (2*i == numbers.length) {\n if (left > target){\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n print(numbers);\n break;\n }\n int right =numbers[2*i];\n\n if (left > right) {\n if(left > target) {\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n }else if (right > left) {\n if (right > target) {\n numbers[i-1] = right;\n numbers[2*i] = target;\n }\n }\n i++;\n\n print(numbers);\n }\n\n }",
"public Heap12()\n {\n arrayList = new ArrayList<E>(5);\n size = 0;\n isMax = false;\n cap = 5;\n }",
"private int minChild(int ind)\n {\n int bestChild = kthChild(ind, 1);\n int k =2;\n int pos = kthChild(ind, k);\n while ((k <= d) && (pos < heapSize)){\n if(heap[pos] < heap[bestChild])\n {\n bestChild = pos;\n }\n else {\n pos = kthChild(ind, k++);\n }\n }\n return bestChild;\n\n }",
"public int extractMin() {\n\t\t\tif (heap_size <= 0) {\n\t\t\t\treturn Integer.MAX_VALUE;\n\t\t\t} else if (heap_size == 1) {\n\t\t\t\theap_size--;\n\t\t\t\treturn harr[0];\n\t\t\t}\n\n\t\t\tint root = harr[0];\n\t\t\tharr[0] = harr[heap_size - 1];\n\t\t\theap_size--;\n\t\t\tminHeapify(0);\n\n\t\t\treturn root;\n\t\t}",
"@Test\n\tpublic void BuildMaxHeaptest() {\n\t\t Job jarray[]=new Job[5];\n\t\t jarray[0]=new Job(\"job1\",50,1);\n\t\t jarray[1]=new Job(\"job2\",20,2);\n\t\t jarray[2]=new Job(\"job3\",80,3);\n\t\t jarray[3]=new Job(\"job4\",20,4);\n\t\t jarray[4]=new Job(\"job5\",1,5);\n\t\t int i;\n\t\t //= (int)Math.floor(jarray.length);\n\t\t \n\t\n\t\t for( i = (int)Math.floor(jarray.length); i >0; i-- )\n\t\t \tPQHeap.MaxHeapify(jarray, i);\n\t\n\t\tassertNotEquals(-1, i);\n\t}",
"public void minCut(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n setNodesToUnvisited();\n queue.add(graphNode[0]);\n graphNode[0].visited = true;\n while(!queue.isEmpty()){//if queue is empty it means that we have made all the cuts that need to be cut and we cant get anywhere else\n GraphNode node = queue.get();\n int from = node.nodeID;\n for(int i = 0; i < node.succ.size(); i++){//get the successor of each node and then checks each of the edges between the node and that successor\n GraphNode.EdgeInfo info = node.succ.get(i);\n int to = info.to;\n if(graph.flow[from][to][1] == 0){//if it has no flow then it prints out that line\n System.out.printf(\"Edge (%d, %d) transports %d cases\\n\", from, to, graph.flow[from][to][0]);\n } else {//adds it to the queue if it still has flow to it and if we haven't gone there yet\n if(!graphNode[to].visited){\n graphNode[to].visited = true;\n queue.add(graphNode[to]);\n }\n }\n }\n }\n }",
"private static void Heapify(int[] A , int i , int size){\r\n\t\t\r\n\t\tint left = LEFT(i);\r\n\t\tint right = RIGHT(i);\r\n\t\tint smallest =i;\r\n\t\t\r\n\t\t// get left and right child of node at index i \r\n\t\t//& compare A[i] with its left and right child\r\n\t\t\r\n\t\tif(left<size && A[left] < A[i]){\r\n\t\t\tsmallest = left;\r\n\t\t}\r\n\t\tif(right<size && A[right] < A[smallest]){\r\n\t\t\tsmallest = right;\r\n\t\t}\r\n\t\t// swap with child having lesser value and\r\n\t\t// call heapify-down on the child\r\n\t\tif(smallest !=i){\r\n\t\t\tswap(A,i,smallest);\r\n\t\t\tHeapify(A,smallest,size);\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\ttry {\r\n\t\t\tint T = Integer.parseInt(br.readLine());\r\n\t\t\tfor (int t = 0; t < T; t++) {\r\n\t\t\t\tint N = Integer.parseInt(br.readLine());\r\n\t\t\t\tint[] A = new int[N]; // 수열 저장\r\n\t\t\t\tint cnt = 0;\r\n\r\n\t\t\t\tfor (int i = 0; i < N / 10 + 1; i++) {\r\n\t\t\t\t\tString[] arr = br.readLine().split(\" \");\r\n\t\t\t\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\t\t\t\tA[cnt] = Integer.parseInt(arr[j]);\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tArrayList<Integer> result = new ArrayList<Integer>();\r\n\t\t\t\tPriorityQueue<Integer> maxheap = new PriorityQueue<Integer>(Collections.reverseOrder());\r\n\t\t\t\tPriorityQueue<Integer> minheap = new PriorityQueue<Integer>();\r\n\r\n\t\t\t\tfor (int i = 0; i < A.length; i++) {\r\n\t\t\t\t\tif (maxheap.size() == minheap.size())\r\n\t\t\t\t\t\tmaxheap.offer(A[i]);\r\n\t\t\t\t\telse if (maxheap.size() > minheap.size())\r\n\t\t\t\t\t\tminheap.offer(A[i]);\r\n\r\n\t\t\t\t\tif (!maxheap.isEmpty() && !minheap.isEmpty() && minheap.peek() < maxheap.peek()) {\r\n\t\t\t\t\t\tint max = maxheap.poll();\r\n\t\t\t\t\t\tint min = minheap.poll();\r\n\r\n\t\t\t\t\t\tminheap.offer(max);\r\n\t\t\t\t\t\tmaxheap.offer(min);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (i % 2 == 0) {\r\n\t\t\t\t\t\tresult.add(maxheap.peek());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(result.size());\r\n\t\t\t\tfor (int i = 0; i < result.size(); i++) {\r\n\t\t\t\t\tSystem.out.print(result.get(i) + \" \");\r\n\t\t\t\t\tif (i % 10 == 9)\r\n\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public ArrayHeapMinPQ() {\n aHeap.add(null);\n }",
"private static <E extends Comparable<E>> void \n\tminHeapify(ArrayList<E> a, int i) {\n\t\tint left = leftChild(i); // index of node i's left child\n\t\tint right = rightChild(i); // index of node i's right child\n\t\tint smallest; // will hold the index of the node with the smallest element\n\t\t// among node i, left, and right\n\n\t\t// Is there a left child and, if so, does the left child have an\n\t\t// element smaller than node i?\n\t\tif (left <= a.size()-1 && a.get(left).compareTo(a.get(i)) < 0)\n\t\t\tsmallest = left; // yes, so the left child is the largest so far\n\t\telse\n\t\t\tsmallest = i; // no, so node i is the smallest so far\n\n\t\t// Is there a right child and, if so, does the right child have an\n\t\t// element smaller than the larger of node i and the left child?\n\t\tif (right <= a.size()-1 && a.get(right).compareTo(a.get(smallest)) < 0)\n\t\t\tsmallest = right; // yes, so the right child is the largest\n\n\t\t// If node i holds an element smaller than both the left and right\n\t\t// children, then the min-heap property already held, and we need do\n\t\t// nothing more. Otherwise, we need to swap node i with the larger\n\t\t// of the two children, and then recurse down the heap from the larger child.\n\t\tif (smallest != i) {\n\t\t\tswap(a, i, smallest);\n\t\t\tminHeapify(a, smallest);\n\t\t}\n\t}",
"@Test\n public void testInsert() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n instance.insert(5);\n assertEquals(1, instance.size());\n assertEquals(new Integer(5), instance.delMin());\n }",
"void Min_heapfy(Map<Integer, Integer> heapmap, SimpleVertex simpleVertex) {\n\n\t\tfor (int i = 0; i < simpleVertex.neighborhood.size(); i++) {\n\t\t\tSimpleEdge node = simpleVertex.neighborhood.get(i);\n\t\t\theapmap.put(node.two.Vertexname, node.weight);\n\t\t\tmapVertixEdge.put(node.two.Vertexname, node);\n\n\t\t}\n\t\theapmap.remove(simpleVertex.Vertexname);\n\n\t\tfor (Integer v : heapmap.values()) {\n\t\t\tarr[count++] = v;\n\t\t\tSystem.out.println(v);\n\t\t}\n\n\t\t// arr = Arrays.copyOfRange(arr, 1, arr.length);\n\t\tint edgeWeight = new HeapForPrims().Max_heapfy(arr, 1);\n\n\t\tSimpleEdge removeedge = null;\n\t\tIterator<Entry<Integer, SimpleEdge>> it = mapVertixEdge.entrySet().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tEntry<Integer, SimpleEdge> pair = it.next();\n\t\t\tif (pair.getValue().weight == edgeWeight) {\n\t\t\t\tresultedge.add(pair.getValue());\n\t\t\t\tpair.getValue().EdgeVisited = true;\n\t\t\t\tremoveedge = pair.getValue();\n\n\t\t\t}\n\n\t\t}\n\t\twhile (mapVertixEdge.values().remove(removeedge))\n\t\t\t;\n\n\t\tMin_heapfy(heapmap, resultedge.get(resultedge.size() - 1).two);\n\n\t}",
"public int deleteMin() {\n int keyItem = heap[0];\n delete(0);\n return keyItem;\n }",
"public void add(int num) {\n if(minheap.isEmpty() || minheap.size() < k){\r\n minheap.offer(num);\r\n }else{\r\n if(num > minheap.peek()){\r\n minheap.poll();\r\n minheap.offer(num);\r\n }\r\n }\r\n \r\n }",
"public static Vector<Edge> computeMinimumSpanningTreeEdgeHeap(Graph g){\r\n\t\t//minimum spanning tree\r\n\t\tVector<Edge> mst = new Vector<Edge>();\r\n\r\n\t\t//defining X\r\n\t\tint qntNodes = g.getNodes().length;\r\n\t\tbelongsToX = new boolean[qntNodes];\r\n\r\n\t\t//initializing X\r\n\t\tbelongsToX[0] = true;\r\n\t\t\r\n\t\t//initializing heap\r\n\t\tHeap<Edge> heap = new Heap<Edge>(new EdgeComparator());\r\n\t\trestoreHeapProperties(g.getNodes()[0], heap);\r\n\r\n\t\t//main loop\r\n\t\tfor(int i = 1; i < qntNodes; i++){\t\t\t\r\n\t\t\t//find minimum edge that crosses the frontier\r\n\t\t\tEdge min = heap.extractMin();\r\n\r\n\t\t\t//add new node to X\r\n\t\t\tNode newNode = min.n1;\r\n\t\t\tif(belongsToX[min.n1.number] && !belongsToX[min.n2.number]){\r\n\t\t\t\tnewNode = min.n2;\r\n\t\t\t}\r\n\t\t\tbelongsToX[newNode.number] = true;\r\n\r\n\t\t\t//add minimum edge to tree\r\n\t\t\tmst.add(min);\r\n\t\t\t\r\n\t\t\t//restore heap properties\r\n\t\t\trestoreHeapProperties(newNode, heap);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn mst;\r\n\t}",
"public void findShortestPathHeap( Graph gr,String sourceName, String destName)\n {\n \tint vertex_size = gr.vertexMap.values().size();\n \tHeapImpl mh = new HeapImpl(vertex_size);\n Vertex v = getVertex( sourceName );\n Vertex processing;\n for(Vertex ver: gr.vertexMap.values()){\n \tver.reset();\n }\n v.dist=0;\n v.prev=null;\n mh.insert(v);\n while (mh!=null && !mh.isEmpty()){\n \t processing= mh.HeapExtractMin();\n \t if(processing.dist==Integer.MAX_VALUE){\n \t\t break;\n \t }\n \t for(Edge adjEdge: processing.adjEdge.values()){\n \t\t \n \t\t if(!adjEdge.isDown && !adjEdge.adjVertex.isDown ){\n \t\t\t if(adjEdge.adjVertex.dist>(processing.dist+adjEdge.dist)){\n \t\t\t\t //Q.delete(adjEdge.adjVertex);\n \t\t\t\t adjEdge.adjVertex.dist= processing.dist+adjEdge.dist;\n \t\t\t\t adjEdge.adjVertex.prev=processing;\n \t\t\t\t if(adjEdge.adjVertex.vertexPosition==0)\n \t\t\t\t\t adjEdge.adjVertex.vertexPosition= mh.insert( adjEdge.adjVertex);\n \t\t\t\t else\n \t\t\t\t\t mh.decreaseKey(adjEdge.adjVertex.vertexPosition-1, adjEdge.adjVertex);\n \t\t\t\t \n \t\t\t }\n \t\t }\n \t\t \n \t\t \n \t }\n }\n }",
"public int heapMin() {\n return array[0];\n }",
"public static int delete(int[] arr,int heapSize)//SortedInDecendingOrder(MinHeap)\n\t{\n\t\t/*Replaceing Last Element With Min-Root & Heapifying*/\n\t\t//Replacing\n\t\tint temp=arr[0];\n\t\tarr[0]=arr[heapSize-1];\n\t\theapSize--;\n\t\t//Heapifying\n\t\tint parentIndex=0;\n\t\tint leftIndex=1;\n\t\tint rightIndex=2;\n\t\tint minIndex=parentIndex;\n\t\twhile(leftIndex<heapSize)\n\t\t{\n\t\t\tif(arr[leftIndex]<arr[minIndex])\n\t\t\t\tminIndex=leftIndex;\n\t\t\tif(rightIndex<heapSize && arr[rightIndex]<arr[minIndex])\n\t\t\t\tminIndex=rightIndex;\n\t\t\tif(minIndex!=parentIndex)//SWAP\n\t\t\t{\n\t\t\t\tint t=arr[parentIndex];\n\t\t\t\tarr[parentIndex]=arr[minIndex];\n\t\t\t\tarr[minIndex]=t;\n\t\t\t\tparentIndex=minIndex;\n\t\t\t\tleftIndex=2*parentIndex+1;\n\t\t\t\trightIndex=leftIndex+1;\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\treturn temp;\n\t}",
"public Heap(int mx) // constructor\n{\nmaxSize = mx;\ncurrentSize = 0;\nheapArray = new Node[maxSize]; // create array\n}",
"public void enqueue(Item item) throws NoSuchElementException {\r\n // Usar el metodo upHeap para corregir la condicion de\r\n // Min Heap\r\n\r\n\r\n if (size == 0){\r\n heap[1] = item;\r\n size = 1;\r\n return;\r\n }\r\n int cur = size + 1;\r\n int par = cur/2;\r\n\r\n heap[cur] = item;\r\n size++;\r\n\r\n if (heap[cur].compareTo(heap[par]) > 0){\r\n upHeap(cur);\r\n }\r\n\r\n\r\n }",
"public void minHeapify(int rootIndex) {\n final int leftChildIndex = getLeftIndex(rootIndex);\n final int rightChildIndex = getRightIndex(rootIndex);\n int smallestIndex = rootIndex;\n if (leftChildIndex < size && arr[leftChildIndex] < arr[rootIndex]) {\n smallestIndex = leftChildIndex;\n }\n if (rightChildIndex < size && arr[rightChildIndex] < arr[rootIndex]) {\n smallestIndex = leftChildIndex;\n }\n if (smallestIndex != rootIndex) {\n MathUtil.swap(arr, rootIndex, smallestIndex);\n minHeapify(smallestIndex);\n }\n }"
] | [
"0.7863002",
"0.7523119",
"0.7453929",
"0.74355865",
"0.7325679",
"0.73000866",
"0.72376835",
"0.7085417",
"0.7073443",
"0.7040657",
"0.70033467",
"0.6976026",
"0.69673425",
"0.69584006",
"0.69397265",
"0.6931533",
"0.6926841",
"0.6872341",
"0.6868998",
"0.6858182",
"0.6824573",
"0.6819431",
"0.68017083",
"0.67899203",
"0.6776452",
"0.6756508",
"0.67471236",
"0.67436457",
"0.67428243",
"0.6737429",
"0.67114455",
"0.67054844",
"0.66867185",
"0.6657934",
"0.66553146",
"0.6639096",
"0.66179943",
"0.66053367",
"0.6527253",
"0.6509555",
"0.6504629",
"0.6489541",
"0.64763755",
"0.6462385",
"0.64589",
"0.64544344",
"0.64272434",
"0.64222854",
"0.64168835",
"0.64017844",
"0.6394617",
"0.6382407",
"0.6378993",
"0.6378725",
"0.63769966",
"0.6374457",
"0.63442624",
"0.6341358",
"0.6318941",
"0.6318105",
"0.6312906",
"0.6309572",
"0.62970984",
"0.6279698",
"0.62727046",
"0.6269469",
"0.6264766",
"0.62620085",
"0.62580764",
"0.6256308",
"0.6253524",
"0.6251466",
"0.6251291",
"0.62399393",
"0.6236292",
"0.6232872",
"0.6231593",
"0.6217275",
"0.6196934",
"0.61872494",
"0.6179916",
"0.6175457",
"0.6167055",
"0.6143621",
"0.6141128",
"0.6139132",
"0.6126238",
"0.6121278",
"0.6112128",
"0.61114055",
"0.6106358",
"0.61028516",
"0.6097673",
"0.60929364",
"0.60905045",
"0.60869",
"0.60808015",
"0.6080539",
"0.6075031",
"0.607469",
"0.60726935"
] | 0.0 | -1 |
Creates new form XmlSettingsDialog | public XmlSettingsDialog(java.awt.Frame parent) {
super(parent, true);
initComponents(); UIUtil.initComponents(this);
setModal(true);
UIUtil.setInitialWindowLocation(this, parent, 100, 150);
Ok.setIcon(UIUtil.scaleIcon(Ok, okIcon));
cancelButton.setIcon(UIUtil.scaleIcon(cancelButton, cancelIcon));
datePattern.getEditor().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
updateExamples();
}
});
timestampPattern.getEditor().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
updateExamples();
}
});
datePattern.setModel(new DefaultComboBoxModel(datePatternOptions));
timestampPattern.setModel(new DefaultComboBoxModel(timePatternOptions));
timestampPattern.getEditor().setItem("yyyy.MM.dd.-H.mm.ss ");
timestampExample.setText("yyyy.MM.dd.-H.mm.ss ");
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(getString(R.string.permission));\n builder.setMessage(getString(R.string.setting_permission));\n builder.setPositiveButton(getString(R.string.go_setting), (dialog, which) -> {\n dialog.cancel();\n openSettings();\n });\n builder.setNegativeButton(getString(R.string.cancel), (dialog, which) -> dialog.cancel());\n builder.show();\n\n }",
"private void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);\n builder.setTitle(getString(R.string.dialog_permission_title));\n builder.setMessage(getString(R.string.dialog_permission_message));\n builder.setPositiveButton(getString(R.string.go_to_settings), (dialog, which) -> {\n dialog.cancel();\n openSettings();\n });\n builder.setNegativeButton(getString(android.R.string.cancel), (dialog, which) -> dialog.cancel());\n builder.show();\n\n }",
"public void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Need Permissions\");\n builder.setMessage(\"This app needs permission to use this feature. You can grant them in app settings.\");\n builder.setPositiveButton(\"GOTO SETTINGS\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n Add_Event.this.openSettings();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n builder.show();\n }",
"private void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(Ter.this);\n builder.setTitle(\"Need Permissions\");\n builder.setMessage(\"This app needs permission to use this feature. You can grant them in app settings.\");\n builder.setPositiveButton(\"GOTO SETTINGS\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n openSettings();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n builder.show();\n\n }",
"void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}",
"protected void showSettingsChangedDialog() {\n new AlertDialog.Builder(getActivity())\n .setTitle(R.string.dialog_settings_changed_title)\n .setMessage(R.string.dialog_settings_changed_description)\n .setPositiveButton(android.R.string.yes, this)\n .setNegativeButton(android.R.string.no, this)\n .show();\n }",
"public StartSettingsView() {\n\n super();\n super.setTitle(\"Settings\");\n\n this.createPatientsComboBox();\n this.createButtons();\n\n super.setLayouts(0.2f, 0.2f,0,0.6f);\n\n\t}",
"protected void alertBuilder(){\n SettingsDialogFragment settingsDialogFragment = new SettingsDialogFragment();\n settingsDialogFragment.show(getSupportFragmentManager(), \"Settings\");\n }",
"public PreferencesUI(FileObject serviceXml) {\n super(WindowManager.getDefault().getMainWindow(), true);\n Frame parent = WindowManager.getDefault().getMainWindow();\n initComponents();\n setLocation(parent.getX() +\n (parent.getWidth() - getWidth()) / 2, parent.getY() + \n (parent.getHeight() - getHeight()) / 2);\n \n getRootPane().setDefaultButton(cancelButton);\n initData(serviceXml);\n \n setVisible(true);\n }",
"public SettingsForm() {\n initComponents();\n }",
"private void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(BaseActivity.this);\n builder.setTitle(\"Need Permissions\");\n builder.setMessage(\"This app needs permission to use this feature. You can grant them in app settings.\");\n builder.setPositiveButton(\"GOTO SETTINGS\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n openSettings();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n builder.show();\n\n }",
"protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellActivated(ShellEvent e) {\n\t\t\t\tloadSettings();\n\t\t\t}\n\t\t});\n\t\tshell.setSize(450, 160);\n\t\tshell.setText(\"Settings\");\n\t\t\n\t\ttextUsername = new Text(shell, SWT.BORDER);\n\t\ttextUsername.setBounds(118, 10, 306, 21);\n\t\t\n\t\ttextPassword = new Text(shell, SWT.BORDER | SWT.PASSWORD);\n\t\ttextPassword.setBounds(118, 38, 306, 21);\n\t\t\n\t\tCLabel lblLogin = new CLabel(shell, SWT.NONE);\n\t\tlblLogin.setBounds(10, 10, 61, 21);\n\t\tlblLogin.setText(\"Login\");\n\t\t\n\t\tCLabel lblPassword = new CLabel(shell, SWT.NONE);\n\t\tlblPassword.setText(\"Password\");\n\t\tlblPassword.setBounds(10, 38, 61, 21);\n\t\t\n\t\tButton btnSave = new Button(shell, SWT.NONE);\n\t\tbtnSave.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tApplicationSettings as = new ApplicationSettings();\n\t\t as.savePassword(textPassword.getText());\n\t\t as.saveUsername(textUsername.getText());\n\t\t \n\t\t connectionOK = WSHandler.setAutoFillDailyReports(btnAutomaticDailyReport.getSelection());\n\t\t \n\t\t shell.close();\n\t\t if (!(parentDialog == null)) {\n\t\t \tparentDialog.reloadTable();\n\t\t }\n\t\t\t}\n\t\t});\n\t\tbtnSave.setBounds(10, 87, 414, 25);\n\t\tbtnSave.setText(\"Save\");\n\n\t}",
"private AlertDialog getWirelessSettingsDialog(final String message, final String buttonText) {\n\t\tfinal AlertDialog.Builder builder = new AlertDialog.Builder(NFCMediaShare.this);\n\t\tbuilder.setMessage(message).setCancelable(true)\n\t\t\t\t.setPositiveButton(buttonText, new DialogInterface.OnClickListener() {\n//\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final DialogInterface arg0, final int arg1) {\n\t\t\t\t\t\tstartActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.setOnCancelListener(new OnCancelListener() {\n//\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onCancel(final DialogInterface arg0) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\treturn builder.create();\n\t}",
"public static void openSettingsForm(){\n\n }",
"private TabPane createSettingsWindow() {\r\n\t\tint tabHeight = 380, tabWidth = 318, textfieldWidth = 120;\r\n\t\tColor settingsTitleColor = Color.DODGERBLUE;\r\n\t\tColor settingsTextColor = Color.ORANGE;\r\n\t\tFont settingsTitleFont = new Font(\"Aria\", 20);\r\n\t\tFont settingsFont = new Font(\"Aria\", 18);\r\n\t\tFont infoFont = new Font(\"Aria\", 16);\r\n\t\tInsets settingsInsets = new Insets(0, 0, 5, 0);\r\n\t\tInsets topSettingsInsets = new Insets(5, 0, 5, 0);\r\n\t\tInsets paddingAllAround = new Insets(5, 5, 5, 5);\r\n\t\tInsets separatorInsets = new Insets(5, 0, 5, 0);\r\n\t\tfeedbackSettingsLabel.setFont(settingsFont);\r\n\t\tfeedbackSimulationLabel.setFont(settingsFont);\r\n\t\tString updateHelp = \"Enter new values into the textfields\" + System.lineSeparator() + \"and click [enter] to update current values.\";\r\n\r\n//\t\t*** Settings>informationTab ***\r\n\t\tTab infoTab = new Tab(\"Information\");\r\n\t\tinfoTab.setClosable(false);\r\n\t\t\r\n\t\tVBox infoContent = new VBox();\r\n\t\tinfoContent.setPrefSize(tabWidth, tabHeight);\r\n\t\t\r\n\t\tfinal Label proxim8Version = new Label(\"Proxim8 v3.3\");\r\n\t\tproxim8Version.setTextFill(settingsTitleColor);\r\n\t\tproxim8Version.setFont(new Font(\"Aria\", 24));\r\n\t\tfinal Label driveModeLabel = new Label(\"Drive mode:\");\r\n\t\tdriveModeLabel.setTextFill(settingsTitleColor);\r\n\t\tdriveModeLabel.setFont(settingsTitleFont);\r\n\t\tfinal Text driveModeInfo = new Text(\"- measures the distance to the car infront of you\" + System.lineSeparator()\r\n\t\t\t\t\t\t\t\t\t \t + \"- checks if your brakedistance < current distance\");\r\n\t\tdriveModeInfo.setFill(settingsTextColor);\r\n\t\tdriveModeInfo.setFont(infoFont);\r\n\t\tfinal Label blindspotLabel = new Label(\"Blindspot mode:\");\r\n\t\tblindspotLabel.setTextFill(settingsTitleColor);\r\n\t\tblindspotLabel.setFont(settingsTitleFont);\r\n\t\tfinal Text blindspotModeInfo = new Text(\"- checks if there's a car in your blindzone\");\r\n\t\tblindspotModeInfo.setFill(settingsTextColor);\r\n\t\tblindspotModeInfo.setFont(infoFont);\r\n\t\tfinal Label parkingModeLabel = new Label(\"Parking mode:\");\r\n\t\tparkingModeLabel.setTextFill(settingsTitleColor);\r\n\t\tparkingModeLabel.setFont(settingsTitleFont);\r\n\t\tfinal Text parkingModeInfo = new Text(\"- measures the distances around the car\" + System.lineSeparator()\r\n\t\t\t\t\t\t\t\t\t\t\t+ \"- gives a warning incase the distance < door length\");\r\n\t\tparkingModeInfo.setFill(settingsTextColor);\r\n\t\tparkingModeInfo.setFont(infoFont);\r\n\t\t\r\n\t\tinfoContent.getChildren().addAll(proxim8Version, driveModeLabel, driveModeInfo, blindspotLabel, blindspotModeInfo, parkingModeLabel, parkingModeInfo);\r\n\t\tinfoTab.setContent(infoContent);\r\n\t\t\r\n//\t\t*** Settings>settingsTab ***\r\n\t\tTab settingsTab = new Tab(\"Settings\");\r\n\t\tsettingsTab.setClosable(false);\r\n\t\t\r\n\t\tVBox settingsContent = new VBox();\r\n\t\tsettingsContent.setPrefSize(tabWidth, tabHeight);\r\n\t\t\r\n\t\tHBox getAndSetValues = new HBox();\r\n\t\tgetAndSetValues.setPadding(paddingAllAround);\r\n//\t\tSettings>settingsTab>currentValues\r\n\t\tGridPane currentValues = new GridPane();\r\n\t\tfinal Label currentValuesLabel = new Label(\"Current values:\");\r\n\t\tcurrentValuesLabel.setTextFill(settingsTitleColor);\r\n\t\tcurrentValuesLabel.setFont(settingsTitleFont);\r\n\t\t\r\n\t\tfinal Label door = new Label(DOOR_LENGTH + \": \");\r\n\t\tdoor.setTextFill(settingsTextColor);\r\n\t\tdoor.setFont(settingsFont);\r\n\t\tdoor.setPadding(topSettingsInsets);\r\n\t\tfinal Label doorValue = new Label(String.valueOf(carData.getDoorLength()) + \"m\");\r\n\t\tdoorValue.setTextFill(settingsTextColor);\r\n\t\tdoorValue.setFont(settingsFont);\r\n\t\tfinal Label rearDoor = new Label(REAR_DOOR_LENGTH + \": \");\r\n\t\trearDoor.setTextFill(settingsTextColor);\r\n\t\trearDoor.setFont(settingsFont);\r\n\t\trearDoor.setPadding(settingsInsets);\r\n\t\tfinal Label rearDoorValue = new Label(String.valueOf(carData.getRearDoorLength()) + \"m\");\r\n\t\trearDoorValue.setTextFill(settingsTextColor);\r\n\t\trearDoorValue.setFont(settingsFont);\r\n\t\tfinal Label blindZone = new Label(BLIND_ZONE_VALUE + \": \");\r\n\t\tblindZone.setTextFill(settingsTextColor);\r\n\t\tblindZone.setFont(settingsFont);\r\n\t\tblindZone.setPadding(settingsInsets);\r\n\t\tfinal Label blindZoneValue = new Label(String.valueOf(carData.getBlindZoneValue()) + \"m\");\r\n\t\tblindZoneValue.setTextFill(settingsTextColor);\r\n\t\tblindZoneValue.setFont(settingsFont);\r\n\t\tfinal Label frontParkDist = new Label(FRONT_PARK_DISTANCE + \": \");\r\n\t\tfrontParkDist.setTextFill(settingsTextColor);\r\n\t\tfrontParkDist.setFont(settingsFont);\r\n\t\tfrontParkDist.setPadding(settingsInsets);\r\n\t\tfinal Label frontParkDistValue = new Label(String.valueOf(carData.getFrontDistParking()) + \"m\");\r\n\t\tfrontParkDistValue.setTextFill(settingsTextColor);\r\n\t\tfrontParkDistValue.setFont(settingsFont);\r\n\t\tfrontParkDistValue.setPadding(settingsInsets);\r\n\t\t\r\n\t\tcurrentValues.add(currentValuesLabel, 0, 0);\r\n\t\tcurrentValues.add(door, 0, 1);\r\n\t\tcurrentValues.add(doorValue, 1, 1);\r\n\t\t\r\n\t\tcurrentValues.add(rearDoor, 0, 2);\r\n\t\tcurrentValues.add(rearDoorValue, 1, 2);\r\n\t\t\r\n\t\tcurrentValues.add(blindZone, 0, 3);\r\n\t\tcurrentValues.add(blindZoneValue, 1, 3);\r\n\t\t\r\n\t\tcurrentValues.add(frontParkDist, 0, 4);\r\n\t\tcurrentValues.add(frontParkDistValue, 1, 4);\r\n\t\t\r\n//\t\tSettings>settingTab>updateFields\r\n\t\tVBox updateFields = new VBox();\r\n\t\tupdateFields.setPadding(paddingAllAround);\r\n\t\tfinal Label updateLabel = new Label(\"Set new value:\");\r\n\t\tupdateLabel.setTextFill(settingsTitleColor);\r\n\t\tupdateLabel.setFont(settingsTitleFont);\r\n\t\t\r\n\t\tfinal TextField doorLengthField = new TextField();\r\n\t\tdoorLengthField.setPromptText(\"meter\");\r\n\t\tdoorLengthField.setMaxWidth(textfieldWidth);\r\n\t\tdoorLengthField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(doorValue, feedbackSettingsLabel, doorLengthField, DOOR_LENGTH, 0, 10);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfinal TextField rearDoorLengthField = new TextField();\r\n\t\trearDoorLengthField.setPromptText(\"meter\");\r\n\t\trearDoorLengthField.setMaxWidth(textfieldWidth);\r\n\t\trearDoorLengthField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(rearDoorValue, feedbackSettingsLabel, rearDoorLengthField, REAR_DOOR_LENGTH, 0, 10);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfinal TextField blindZoneValueField = new TextField();\r\n\t\tblindZoneValueField.setMaxWidth(textfieldWidth);\r\n\t\tblindZoneValueField.setPromptText(\"meter\");\r\n\t\tblindZoneValueField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(blindZoneValue, feedbackSettingsLabel, blindZoneValueField, BLIND_ZONE_VALUE, 0, 10);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfinal TextField frontParkDistField = new TextField();\r\n\t\tfrontParkDistField.setMaxWidth(textfieldWidth);\r\n\t\tfrontParkDistField.setPromptText(\"meter\");\r\n\t\tfrontParkDistField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(frontParkDistValue, feedbackSettingsLabel, frontParkDistField, FRONT_PARK_DISTANCE, 0, 10);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tupdateFields.getChildren().addAll(updateLabel, doorLengthField, rearDoorLengthField, blindZoneValueField, frontParkDistField);\r\n\t\t\r\n\t\tRegion regionSettings = new Region();\r\n\t\tregionSettings.setPrefWidth(25);\r\n\t\tgetAndSetValues.getChildren().addAll(currentValues, regionSettings, updateFields);\r\n\t\t\r\n\t\tSeparator settingsSeparator = new Separator();\r\n\t\tsettingsSeparator.setPadding(separatorInsets);\r\n\t\t\r\n\t\tfinal Text howToUpdate = new Text(updateHelp);\r\n\t\thowToUpdate.setFill(settingsTextColor);\r\n\t\thowToUpdate.setFont(settingsFont);\r\n\t\t\r\n\t\tSeparator settingsSeparator2 = new Separator();\r\n\t\tsettingsSeparator2.setPadding(separatorInsets);\r\n\t\t\r\n\t\t\r\n\t\tsettingsContent.getChildren().addAll(getAndSetValues, settingsSeparator, howToUpdate, settingsSeparator2, feedbackSettingsLabel);\r\n\t\tsettingsTab.setContent(settingsContent);\r\n\t\t\r\n//\t\t*** Settings>simulate ***\r\n\t\tTab simulateTab = new Tab(\"Simulation\");\r\n\t\tsimulateTab.setClosable(false);\r\n\t\t\r\n\t\tVBox simulateContent = new VBox();\r\n\t\tsimulateContent.setPrefSize(tabWidth, tabHeight);\r\n\t\t\r\n\t\t\r\n\t\tHBox getAndSetSim = new HBox();\r\n\t\tgetAndSetSim.setPadding(paddingAllAround);\r\n//\t\tSettings>simulate>currentValues\r\n\t\tGridPane currentValuesSim = new GridPane();\r\n\t\tfinal Label currentValuesSimLabel = new Label(\"Current values:\");\r\n\t\tcurrentValuesSimLabel.setTextFill(settingsTitleColor);\r\n\t\tcurrentValuesSimLabel.setFont(settingsTitleFont);\r\n\t\t\r\n\t\tfinal Label topSpeed = new Label(TOP_SPEED + \": \");\r\n\t\ttopSpeed.setTextFill(settingsTextColor);\r\n\t\ttopSpeed.setFont(settingsFont);\r\n\t\ttopSpeed.setPadding(topSettingsInsets);\r\n\t\tfinal Label topSpeedValue = new Label(String.valueOf(carData.getTopSpeed()) + \"km/h\");\r\n\t\ttopSpeedValue.setTextFill(settingsTextColor);\r\n\t\ttopSpeedValue.setFont(settingsFont);\r\n\t\t\r\n\t\tcurrentValuesSim.add(currentValuesSimLabel, 0, 0);\r\n\t\tcurrentValuesSim.add(topSpeed, 0, 1);\r\n\t\tcurrentValuesSim.add(topSpeedValue, 1, 1);\r\n\t\t\r\n//\t\tSettings>simulate>updateFields\r\n\t\tVBox updateFieldsSim = new VBox();\r\n\t\tfinal Label updateSimLabel = new Label(\"Set new value:\");\r\n\t\tupdateSimLabel.setTextFill(settingsTitleColor);\r\n\t\tupdateSimLabel.setFont(settingsTitleFont);\r\n\t\t\r\n\t\tfinal TextField topSpeedField = new TextField();\r\n\t\ttopSpeedField.setMaxWidth(textfieldWidth);\r\n\t\ttopSpeedField.setPromptText(\"km/h\");\r\n\t\ttopSpeedField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(topSpeedValue, feedbackSimulationLabel, topSpeedField, TOP_SPEED, Double.valueOf(carSpeed), 999.0);\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tupdateFieldsSim.getChildren().addAll(updateSimLabel, topSpeedField);\r\n\t\t\r\n\t\tRegion simulateRegion = new Region();\r\n\t\tsimulateRegion.setPrefWidth(25);\r\n\t\tgetAndSetSim.getChildren().addAll(currentValuesSim, simulateRegion, updateFieldsSim);\r\n\t\t\r\n\t\tSeparator simulationSeparator = new Separator();\r\n\t\tsimulationSeparator.setPadding(separatorInsets);\r\n\t\t\r\n\t\tfinal Text simulateInfo = new Text(updateHelp);\r\n\t\tsimulateInfo.setFill(settingsTextColor);\r\n\t\tsimulateInfo.setFont(settingsFont);\r\n\t\t\r\n\t\tSeparator simulationSeparator2 = new Separator();\r\n\t\tsimulationSeparator2.setPadding(separatorInsets);\r\n\t\t\r\n\t\t\r\n\t\tsimulateContent.getChildren().addAll(getAndSetSim, simulationSeparator, simulateInfo, simulationSeparator2, feedbackSimulationLabel);\r\n\t\tsimulateTab.setContent(simulateContent);\r\n\t\t\r\n//\t\t*** Settings>checkBoxTab ***\r\n\t\tTab extraFeaturesTab = new Tab(\"Extra features\");\r\n\t\textraFeaturesTab.setClosable(false);\r\n\t\t\r\n\t\tVBox extraFeaturesContent = new VBox();\r\n\t\textraFeaturesContent.setPrefSize(tabWidth, tabHeight);\r\n\t\textraFeaturesContent.setPadding(paddingAllAround);\r\n\t\t\r\n\t\tfinal Label extraFeaturesLabel = new Label(\"Extra features\");\r\n\t\textraFeaturesLabel.setTextFill(settingsTitleColor);\r\n\t\textraFeaturesLabel.setFont(settingsTitleFont);\r\n\t\textraFeaturesLabel.setPadding(topSettingsInsets);\r\n\t\t\r\n\t\tSeparator separatorExtraFeatures = new Separator();\r\n\t\tseparatorExtraFeatures.setPadding(separatorInsets);\r\n\t\t\r\n\t\tInsets checkInsets = new Insets(5, 0, 5, 5);\r\n\t\tfinal CheckBox smartBrake = new CheckBox(\"Smart brake\");\r\n\t\tsmartBrake.setSelected(smartBrakeActivated);\r\n\t\tsmartBrake.setFont(settingsFont);\r\n\t\tsmartBrake.setTextFill(settingsTextColor);\r\n\t\tsmartBrake.setPadding(checkInsets);\r\n\t\tsmartBrake.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tsmartBrakeActivated = ! smartBrakeActivated;\r\n\t\t\t\tvalidateAndUpdate(null, true, feedbackSettingsLabel, \"Successfully updated\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tfinal CheckBox blindspotAlways = new CheckBox(\"Blindspot always\");\r\n\t\tblindspotAlways.setSelected(blindspotAlwaysActivated);\r\n\t\tblindspotAlways.setFont(settingsFont);\r\n\t\tblindspotAlways.setTextFill(settingsTextColor);\r\n\t\tblindspotAlways.setPadding(checkInsets);\r\n\t\tblindspotAlways.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tblindspotAlwaysActivated = ! blindspotAlwaysActivated;\r\n\t\t\t\tvalidateAndUpdate(null, true, feedbackSettingsLabel, \"Successfully updated\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tfinal CheckBox audioWarning = new CheckBox(\"Audio warning\");\r\n\t\taudioWarning.setSelected(audioWarningActivated);\r\n\t\taudioWarning.setFont(settingsFont);\r\n\t\taudioWarning.setTextFill(settingsTextColor);\r\n\t\taudioWarning.setPadding(checkInsets);\r\n\t\taudioWarning.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\taudioWarningActivated = ! audioWarningActivated;\r\n\t\t\t\tvalidateAndUpdate(null, true, feedbackSettingsLabel, \"Successfully updated\");\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\textraFeaturesContent.getChildren().addAll(extraFeaturesLabel, separatorExtraFeatures, smartBrake, blindspotAlways); //, audioWarning);\r\n\t\textraFeaturesTab.setContent(extraFeaturesContent);\r\n\t\t\r\n\t\t\r\n\t\tTabPane settingsWindow = new TabPane();\r\n\t\tsettingsWindow.setVisible(false);\r\n\t\tsettingsWindow.getTabs().addAll(infoTab, settingsTab, simulateTab, extraFeaturesTab);\r\n\t\treturn settingsWindow;\r\n\t}",
"public NewServerConfigDialog(final Shell shell) {\r\n super(shell);\r\n }",
"private SettingsWindow() {\n loadData();\n createListeners();\n }",
"@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tActivity activity = getActivity();\n\t\t// Get the layout inflater\n\t\tLayoutInflater inflater = activity.getLayoutInflater();\n\n\t\t// inflate the view\n\t\t// Inflate and set the layout for the dialog \n\t\t// Pass null as the parent view because its going in the dialog layout \n\t\tView view = inflater.inflate(R.layout.settings, null);\n\t\t\n\t\t// dialog builder\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(activity);\n\t\tbuilder.setView(view)\n\t\t\t .setTitle(R.string.settings)\n\t\t\t\t\n\t\t\t // Add action buttons \n\t\t\t\t\n\t\t\t\t.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { \n\t\t\t \t\n\t\t\t \t@Override \n\t\t\t \tpublic void onClick(DialogInterface dialog, int id) { \n\t\t\t \t\t// Send the positive button event back to the host activity\n\t\t\t \t\tmListener.onSettingsPositiveClick(SettingsDialogFragment.this);\n\t\t\t \t} \n\t\t \t}) \n\t\t \t.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { \n\n\t\t \t\t@Override \n\t\t \t\tpublic void onClick(DialogInterface dialog, int id) { \n\t\t \t\t\t// Send the negative button event back to the host activity\n\t\t\t \t\tmListener.onSettingsNegativeClick(SettingsDialogFragment.this);\n\t\t \t\t} \n\t \t\t}); \n \n\t\tmCheckBoxPlaySound = (CheckBox)view.findViewById(R.id.cbPlaySound);\n\t\tmRadioButtonDrawOne = (RadioButton)view.findViewById(R.id.rbDrawOne);\n\t\tfinal RadioButton radioButtonDrawThree = (RadioButton)view.findViewById(R.id.rbDrawThree);\n\t\tmRadioButtonGreen = (RadioButton)view.findViewById(R.id.rbGreen);\n\t\tfinal RadioButton radioButtonBlue = (RadioButton)view.findViewById(R.id.rbBlue);\n\t\tmCheckBoxPlaySound.setChecked(mIsPlaySound);\n\t\tif (mIsDrawOne)\n\t\t\tmRadioButtonDrawOne.setChecked(true);\n\t\telse\n\t\t\tradioButtonDrawThree.setChecked(true);\n\t\tif (mIsBackgroundGreen)\n\t\t\tmRadioButtonGreen.setChecked(true);\n\t\telse\n\t\t\tradioButtonBlue.setChecked(true);\n\t\t\n\t\treturn builder.create();\n }",
"public DialogoConfiguracion(java.awt.Frame parent, boolean modal) {\n super(parent, modal); \n initComponents();\n jTextFieldServidor.setEnabled(false);\n jTextFieldBD.setEnabled(false);\n jTextFieldUsuario.setEnabled(false);\n jTextFieldPassword.setEnabled(false); \n this.setLocationRelativeTo(parent); \n try {\n FileReader fichProp = new FileReader(\"agenda.cfg\");\n propiedades.load(fichProp); \n if(propiedades.getProperty(\"protocolo\")!=null &&\n propiedades.getProperty(\"protocolo\").equals(\"jdbc:mysql://\")) {\n jRadioButtonMySQL.setSelected(true);\n \n jTextFieldServidor.setEnabled(true);\n jTextFieldBD.setEnabled(true);\n jTextFieldUsuario.setEnabled(true);\n jTextFieldPassword.setEnabled(true); \n \n jTextFieldServidor.setText(propiedades.getProperty(\"servidor\"));\n jTextFieldBD.setText(propiedades.getProperty(\"BD\"));\n jTextFieldUsuario.setText(propiedades.getProperty(\"usuario\"));\n jTextFieldPassword.setText(propiedades.getProperty(\"password\"));\n } else {\n jRadioButtonDerby.setSelected(false);\n \n jTextFieldServidor.setEnabled(false);\n jTextFieldBD.setEnabled(false);\n jTextFieldUsuario.setEnabled(false);\n jTextFieldPassword.setEnabled(false); \n \n jTextFieldServidor.setText(\"\");\n jTextFieldBD.setText(\"\");\n jTextFieldUsuario.setText(\"\");\n jTextFieldPassword.setText(\"\");\n }\n } catch(IOException e) {\n jTextFieldServidor.setText(\"\");\n jTextFieldBD.setText(\"\");\n jTextFieldUsuario.setText(\"\");\n jTextFieldPassword.setText(\"\");\n }\n }",
"public StandardDialog() {\n super();\n init();\n }",
"public Settings() {\n initComponents();\n }",
"public Settings() {\n initComponents();\n }",
"private void createSettingsAlertDialog(final View view, final int i){\n final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n LayoutInflater inflater = this.getLayoutInflater();\n final View dialogView = inflater.inflate(R.layout.alert_dialog_settings, null);\n dialogBuilder.setView(dialogView);\n\n final EditText etInsertInfo = dialogView.findViewById(R.id.et_insert_info);\n etInsertInfo.setText(setTextOfAlertDialog(i));\n\n dialogBuilder.setCancelable(true);\n dialogBuilder.setTitle(view.getTag().toString());\n dialogBuilder.setPositiveButton(R.string.bt_ok, new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n updateContact(i, etInsertInfo.getText().toString());\n mImageAdapter.notifyDataChange(mContact);\n }\n });\n AlertDialog ad = dialogBuilder.create();\n ad.show();\n }",
"public void showSocketSettings() {\n SocketSettingsDialog newFragment = new SocketSettingsDialog (this);\n \tFragmentTransaction ft = getFragmentManager().beginTransaction(); \n newFragment.show(ft, \"dialog\");\n }",
"public SettingsWindow()\n {\n House.seed = System.currentTimeMillis();\n initWindow();\n showWindows();\n }",
"public EditTokenDialog() {\r\n \t\tsuper(\"net/rptools/maptool/client/ui/forms/tokenPropertiesDialog.jfrm\");\r\n \r\n \t\tpanelInit();\r\n \t}",
"public PreferencesDialog() {\r\n\t\tWindow window;\r\n\t\t// if is mac\r\n\t\tif (SystemInfo.isMac()) {\r\n\t\t\twindow = new JFrame(ResourceManager.getString(\"preferences.title\"));\r\n\t\t\t// dispose this dialog if presse close button\r\n\t\t\t((JFrame) window).setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\t// no resizable\r\n\t\t\t((JFrame) window).setResizable(false);\r\n\t\t} else {\r\n\t\t\twindow = new JDialog(MainWindow.getInstance(), ResourceManager.getString(\"preferences.title\"), true);\r\n\t\t\t// dispose this dialog if presse close button\r\n\t\t\t((JDialog) window).setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\r\n\t\t\t// no resizable\r\n\t\t\t((JDialog) window).setResizable(false);\r\n\t\t}\r\n\r\n\t\t// set dialog icon\r\n\t\twindow.setIconImage(ResourceManager.getIcon(\"/icons/16x16/preferences.png\").getImage());\r\n\t\t// contruct dialog UI\r\n\t\tinitComponents(window);\r\n\t\twindow.setMinimumSize(new Dimension(300, 300));\r\n\t\t// adjust window preferred size\r\n\t\twindow.pack();\r\n\t\t// center of screen\r\n\t\twindow.setLocationRelativeTo(null);\r\n\t\t// show\r\n\t\twindow.setVisible(true);\r\n\t}",
"@Override\n public void onClick(View v) {\n SettingDialog.show();\n }",
"private static void changeSettings() {\n\t\t\n\t\tfinal Settings sett = config;\n\t\t\n\t\tfinal JDialog settingsDialog = new JDialog(frame, \"Change settings\");\n\t\t\n\t\tsettingsDialog.getContentPane().setLayout(new BorderLayout());\n\t\tsettingsDialog.setPreferredSize(new Dimension(350,150));\n\t\t\n\t\tJPanel settings = new JPanel();\n\t\tsettings.setLayout(new GridLayout(3,2));\n\t\t\n\t\tJLabel lblDB = new JLabel(\"Update DB dynamically\");\n\t\tJRadioButton rbDB = new JRadioButton();\n\t\trbDB.setSelected(sett.isUpdateDB());\n\t\trbDB.addItemListener(new ItemListener(){\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setUpdateDB(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setUpdateDB(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\t\t\n\t\tJLabel lblGUI = new JLabel(\"Use Graphical User Interface\");\n\t\tJRadioButton rbGUI = new JRadioButton();\n\t\trbGUI.setSelected(sett.isGUI());\n\t\trbGUI.addItemListener(new ItemListener() {\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setGUI(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setGUI(false);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t});\n\t\t\n\t\tJLabel lblFile = new JLabel(\"Working file\");\n\t\tfinal JTextField tfFile = new JTextField(sett.getWorkingFile());\n\t\t\t\t\n\t\tsettings.add(lblDB);\n\t\tsettings.add(rbDB);\n\t\tsettings.add(lblGUI);\n\t\tsettings.add(rbGUI);\n\t\tsettings.add(lblFile);\n\t\tsettings.add(tfFile);\n\t\t\n\t\tJButton btnSave = new JButton(\"Save settings\");\n\t\tbtnSave.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(!saved) {\n\t\t \t\tint option = JOptionPane.showOptionDialog(frame,\n\t\t \t\t\t\t\"Updating the settings will reset the application\\nThere are unsaved changes\\nDo you want to save them now?\",\n\t\t \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n\t\t \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n\t\t \t\tswitch(option) {\n\t\t \t\tcase 0:\n\t\t \t\t\ttoggleSaved(portfolio.save(WORKING_FILE));\n\t\t \t\tdefault:\n\t\t \t\t\tbreak; \t \t\t\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsett.setWorkingFile(tfFile.getText());\n\t\t\t\t\n\t\t\t\tsett.save();\n\t\t\t\tconfig = new Settings(sett);\n\t\t\t\tsettingsDialog.dispose();\n\t\t\t\t\n\t\t\t\tif(!sett.isGUI()){\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\texit = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!sett.isUpdateDB()){\n\t\t\t\t\tportfolio.init(config.getWorkingFile());\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION);\n\t\t\t\t\tbtnRestore.setEnabled(true);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tportfolio.initDB();\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION+\" ** Linked to Database **\");\n\t\t\t\t\tbtnRestore.setEnabled(false);\n\t\t\t\t}\n\t\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\t\tsel.init(portfolio);\n\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsettingsDialog.add(settings, BorderLayout.CENTER);\n\t\tsettingsDialog.add(btnSave, BorderLayout.PAGE_END);\n\t\t\n\t\tsettingsDialog.pack();\n\t\tsettingsDialog.setVisible(true);\t\n\t}",
"public DebugConfigurationDialog() {\n configuration = new DataSourceConfiguration();\n initComponents();\n }",
"private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n jPanel3 = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n datePattern = new javax.swing.JComboBox();\n timestampPattern = new javax.swing.JComboBox();\n rootTag = new javax.swing.JTextField();\n dateExample = new javax.swing.JLabel();\n timestampExample = new javax.swing.JLabel();\n noRootTag = new javax.swing.JCheckBox();\n jPanel2 = new javax.swing.JPanel();\n Ok = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"XML Settings\");\n getContentPane().setLayout(new java.awt.GridBagLayout());\n\n jPanel3.setLayout(new java.awt.GridBagLayout());\n\n jPanel1.setLayout(new java.awt.GridBagLayout());\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n jPanel3.add(jPanel1, gridBagConstraints);\n\n jLabel1.setText(\"Date pattern \");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);\n jPanel3.add(jLabel1, gridBagConstraints);\n\n jLabel2.setText(\"Timestamp pattern \");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n gridBagConstraints.gridy = 10;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);\n jPanel3.add(jLabel2, gridBagConstraints);\n\n jLabel3.setText(\"Root tag\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n gridBagConstraints.gridy = 15;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);\n jPanel3.add(jLabel3, gridBagConstraints);\n\n datePattern.setEditable(true);\n datePattern.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Eintrag 1\", \"Eintrag 2\", \"Eintrag 3\", \"Eintrag 4\" }));\n datePattern.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n datePatternActionPerformed(evt);\n }\n });\n datePattern.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n datePatternKeyTyped(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 10;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);\n jPanel3.add(datePattern, gridBagConstraints);\n\n timestampPattern.setEditable(true);\n timestampPattern.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Eintrag 1\", \"Eintrag 2\", \"Eintrag 3\", \"Eintrag 4\" }));\n timestampPattern.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n timestampPatternActionPerformed(evt);\n }\n });\n timestampPattern.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n timestampPatternKeyTyped(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 10;\n gridBagConstraints.gridy = 10;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);\n jPanel3.add(timestampPattern, gridBagConstraints);\n\n rootTag.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 10;\n gridBagConstraints.gridy = 15;\n gridBagConstraints.gridwidth = 20;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);\n jPanel3.add(rootTag, gridBagConstraints);\n\n dateExample.setText(\"jLabel4\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 8, 0, 8);\n jPanel3.add(dateExample, gridBagConstraints);\n\n timestampExample.setText(\"jLabel5\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 10;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 8, 0, 8);\n jPanel3.add(timestampExample, gridBagConstraints);\n\n noRootTag.setText(\"no root tag\");\n noRootTag.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n noRootTagItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 10;\n gridBagConstraints.gridy = 20;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n jPanel3.add(noRootTag, gridBagConstraints);\n\n jPanel2.setLayout(new java.awt.GridBagLayout());\n\n Ok.setText(\"OK\");\n Ok.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n OkActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 2);\n jPanel2.add(Ok, gridBagConstraints);\n\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;\n jPanel2.add(cancelButton, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 10;\n gridBagConstraints.gridy = 100;\n gridBagConstraints.gridwidth = 20;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(4, 0, 2, 0);\n jPanel3.add(jPanel2, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(2, 4, 2, 4);\n getContentPane().add(jPanel3, gridBagConstraints);\n\n pack();\n }",
"@SuppressWarnings(\"deprecation\")\n \t@Override\n \tprotected Dialog onCreateDialog(int id) {\n \n \t\tAlertDialog.Builder mBuilder = new AlertDialog.Builder(this);\n \t\t\n \t\t// determine which dialog to show\n \t\tswitch(id) {\n \t\tcase sGpsNotEnabledDialog:\n \t\t\tmBuilder.setMessage(R.string.preferences_dialog_invalid_gps_status)\n \t\t\t.setCancelable(false)\n \t\t\t.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n \t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n \t\t\t\t\tIntent mIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n \t\t\t\t\tstartActivity(mIntent);\n \t\t\t\t}\n \t\t\t})\n \t\t\t.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n \t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n \t\t\t\t\tdialog.cancel();\n \t\t\t\t}\n \t\t\t});\n \t\t\treturn mBuilder.create();\n \t\tdefault:\n \t\t\treturn super.onCreateDialog(id);\n \t\t}\n \t}",
"@SuppressLint(\"InflateParams\")\n private void showGoToSettingsDialog() {\n View view = LayoutInflater.from(activity).inflate(R.layout.go_to_setting, null, false);\n TextView message = (TextView) view.findViewById(R.id.fingerprint_required);\n TextView description = (TextView) view.findViewById(R.id.go_to_setting_description);\n message.setText((String) call.argument(\"fingerprintRequired\"));\n description.setText((String) call.argument(\"goToSettingDescription\"));\n Context context = new ContextThemeWrapper(activity, R.style.AlertDialogCustom);\n OnClickListener goToSettingHandler = new OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n stop(false);\n activity.startActivity(new Intent(Settings.ACTION_SECURITY_SETTINGS));\n }\n };\n OnClickListener cancelHandler = new OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n stop(false);\n }\n };\n new AlertDialog.Builder(context).setView(view)\n .setPositiveButton((String) call.argument(\"goToSetting\"), goToSettingHandler)\n .setNegativeButton((String) call.argument(CANCEL_BUTTON), cancelHandler).setCancelable(false).show();\n }",
"protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}",
"public SettingsPanel() {\n initComponents();\n }",
"@Override \r\n \tprotected IDialogSettings getDialogSettings() {\n \t\tIDialogSettings temp = super.getDialogSettings();\t\r\n \t\treturn temp;\r\n \t}",
"private void setUpDialoguebox() {\n\t\tinput = new CTS_GUI_Dialoguebox();\n\t\tinput.setTitle(\"Settings\");\n\t\tBorderPane pane = new BorderPane();\n\t\tLocalTime t = LocalTime.now();\n\t\tLocalDate d = LocalDate.now();\n\t\tuicontrols = new VBox(10);\n\t\tHBox box0 = new HBox(5);\n\t\tbox0.getChildren().addAll(new Label(\"Latitude: \"),new TextField(\"0\"));\n\t\tHBox box1 = new HBox(5);\n\t\tbox1.getChildren().addAll(new Label(\"Longitude: \"),new TextField(\"0\"));\n\t\tHBox box2 = new HBox(5);\n\t\tbox2.getChildren().addAll(new Label(\"Date: \"),new TextField(d.toString()));\n\t\tTextField time = new TextField(t.getHour() + \":\" + t.getMinute() + \":\" + (int) floor(t.getSecond()));\n\t\tHBox box3 = new HBox(5);\n\t\tbox3.getChildren().addAll(new Label(\"Time: \"),time);\n\t\t// Check boxes\n\t\tHBox box5 = new HBox(5);\n\t\tCheckBox c1 = new CheckBox(\"Plot Stars\");\n\t\tc1.setSelected(true);\n\t\tCheckBox c2 = new CheckBox(\"Plot DSOs\");\n\t\tc2.setSelected(true);\n\t\tCheckBox c3 = new CheckBox(\"Plot Constellations\");\n\t\tc3.setSelected(true);\n\t\tCheckBox c4 = new CheckBox(\"Plot Planets\");\n\t\tc4.setSelected(true);\n\t\tbox5.getChildren().addAll(c1,c2,c3,c4);\n\t\t// Color Picker\n\t\t// 0 = Star color, 1 = Low mag star, 2 = Very low mag star.\n\t\t// 3 = DSO, 4 = Sky background, 5 = Circle around sky background\n\t\t// 6 = Overall background, 7 = Lat/long txt color, 8 = Constellation line color.\n\t\tHBox box6 = new HBox(5);\n\t\tTextField colorSet = new TextField(\"255,255,255,1\");\n\t\tButton setcolorbutton = new Button(\"Submit Color\");\n\t\tbox6.getChildren().addAll(new Label(\"Color to Set: \"),colorSet,setcolorbutton,new Label(\"[PREVIEW COLOR]\"));\n\t\tsetcolorbutton.setOnAction((event) -> { colorPickerHander(); });\n MenuBar mainmenu = new MenuBar();\n Menu colorpickermenu = new Menu(\"Set Custom Colors\");\n String[] colorstrs = {\"Star Color\",\"Low Magnituide Star Color\",\"Very Low Magnituide Star Color\", \"Deep Space Object Color\",\"Sky Background Color\",\n \t\t\"Circle Around Sky Background Color\",\"Overall Background Color\", \"Latitude/Longitude Text Color\",\"Constellation Line Color\"};\n for(int x = 0; x < colorstrs.length; x++) {\n \tMenuItem opt = new MenuItem(colorstrs[x]);\n \tint id = x;\n \topt.setOnAction((event) -> { colorSetterId = id; });\n \tcolorpickermenu.getItems().add(opt);\n }\n \n ComboBox<String> consts = new ComboBox<>();\n HashMap<String, String> cdbs = controller.getModelConstellationDBs();\n\n for (String name : cdbs.keySet()) {\n consts.getItems().add(name);\n }\n HBox box7 = new HBox(5);\n box7.getChildren().addAll(new Label(\"Select Constellation Set\"), consts);\n \n consts.getSelectionModel().select(\"Western\");\n mainmenu.getMenus().addAll(colorpickermenu);\n\t\tHBox box4 = new HBox(5);\n\t\tButton but = new Button(\"Cancel\");\n\t\tbut.setPadding(new Insets(5));\n\t\tButton but2 = new Button(\"Submit\");\n\t\tbut2.setPadding(new Insets(5));\n\t\tbox4.getChildren().addAll(but,but2);\n\t\tuicontrols.getChildren().addAll(box0,box1,box2,box3,box5,box6,box7,box4);\n\t\tbut.setOnAction((event) -> { input.close(); });\n\t\tbut2.setOnAction((event) -> {\n\t\t\tuserSelectedConstellationFileName = cdbs.get(consts.getValue());\n\t\t\tlong i = validateInput();\n\t\t\tif (i == 0) {\n\t\t\t\tchartTheStars();\n\t\t\t\tinput.close();\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, getGUIErrorMsg(i));\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n });\n\t\tpane.setTop(mainmenu);\n\t\tpane.setCenter(uicontrols);\n\t\tpane.setPadding(new Insets(10));\n\t\tScene scene = new Scene(pane, 520, 310);\n\t\tinput.setScene(scene);\n\t}",
"public void showSettingsAlert() {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n // Setting Dialog Title\n alertDialog.setTitle(\"GPS is settings\");\n // Setting Dialog Message\n alertDialog.setMessage(\"GPS is not enabled. Do you want to go to settings menu?\");\n // On pressing Settings button\n alertDialog.setPositiveButton(\"Settings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n getActivity().startActivity(intent);\n dialog.cancel();\n }\n });\n // on pressing cancel button\n alertDialog.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n // Showing Alert Message\n// alertDialog.show();\n\n changePassDialog = alertDialog.create();\n\n try {\n changePassDialog.cancel();\n } catch (Exception e) {\n Log.e(TAG, \"Problem with GPS Settings Alert --> \" + e.toString());\n }\n\n changePassDialog.show();\n\n }",
"public PreferencesDialog (JFrame owner)\n {\n this (owner, \"OPENMARKOV User Preferences\",\n OpenMarkovPreferences.OPENMARKOV_NODE_PREFERENCES, true/*\n * ,\n * OpenMarkovPreferences\n * .\n * OPENMARKOV_KERNEL_PREFERENCES\n * , false\n */);\n }",
"protected String getSettingsDialogTitle() {\r\n return \"Server options\";\r\n }",
"public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}",
"public DeviceSettingsPanel(JDialog creator) {\n\n this.creator = creator;\n\n $$$setupUI$$$();\n setLayout(new BorderLayout());\n add(contentPane, BorderLayout.CENTER);\n\n /* Warning label */\n warningLabel.setFont(warningLabel.getFont().deriveFont(Font.BOLD, 14.0F));\n warningLabel.setForeground(new Color(0x993333));\n\n /* load values from Setting */\n this.acceleration.setValue(Settings.getHandlerAcceleration());\n this.deceleration.setValue(Settings.getHandlerDeceleration());\n this.axialAFPosition.setValue(Settings.getHandlerAxialAFPosition());\n this.transverseYAFPosition.setValue(Settings.getHandlerTransverseYAFPosition());\n this.measurementPosition.setValue(Settings.getHandlerMeasurementPosition());\n this.velocity.setValue(Settings.getHandlerVelocity());\n this.measurementVelocity.setValue(Settings.getHandlerMeasurementVelocity());\n this.xAxisCalibration.setValue(Settings.getMagnetometerXAxisCalibration());\n this.yAxisCalibration.setValue(Settings.getMagnetometerYAxisCalibration());\n this.zAxisCalibration.setValue(Settings.getMagnetometerZAxisCalibration());\n this.demagRamp.addItem(new Integer(3));\n this.demagRamp.addItem(new Integer(5));\n this.demagRamp.addItem(new Integer(7));\n this.demagRamp.addItem(new Integer(9));\n int rampValue = Settings.getDegausserRamp();\n if (rampValue == 3 || rampValue == 5 || rampValue == 7 || rampValue == 9) {\n demagRamp.setSelectedItem(new Integer(rampValue));\n } else {\n demagRamp.setSelectedItem(new Integer(3));\n }\n for (int i = 1; i < 10; i++) {\n this.demagDelay.addItem(new Integer(i));\n }\n this.demagDelay.setSelectedItem(new Integer(Settings.getDegausserDelay()));\n this.sampleLoadPosition.setValue(Settings.getHandlerSampleLoadPosition());\n this.backgroundPosition.setValue(Settings.getHandlerBackgroundPosition());\n this.rotation.setValue(Settings.getHandlerRotation());\n this.rotationVelocity.setValue(Settings.getHandlerRotationVelocity());\n this.rotationAcc.setValue(Settings.getHandlerAcceleration());\n this.rotationDec.setValue(Settings.getHandlerDeceleration());\n this.maximumField.setValue(Settings.getDegausserMaximumField());\n\n /* Format Number-only Text Fields */\n MyFormatterFactory factory = new MyFormatterFactory();\n acceleration.setFormatterFactory(factory);\n deceleration.setFormatterFactory(factory);\n velocity.setFormatterFactory(factory);\n measurementVelocity.setFormatterFactory(factory);\n transverseYAFPosition.setFormatterFactory(factory);\n axialAFPosition.setFormatterFactory(factory);\n sampleLoadPosition.setFormatterFactory(factory);\n backgroundPosition.setFormatterFactory(factory);\n measurementPosition.setFormatterFactory(factory);\n rotation.setFormatterFactory(factory);\n rotationVelocity.setFormatterFactory(factory);\n rotationAcc.setFormatterFactory(factory);\n rotationDec.setFormatterFactory(factory);\n xAxisCalibration.setFormatterFactory(factory);\n yAxisCalibration.setFormatterFactory(factory);\n zAxisCalibration.setFormatterFactory(factory);\n maximumField.setFormatterFactory(factory);\n\n /* Find all ports system has */\n Enumeration ports = CommPortIdentifier.getPortIdentifiers();\n\n ArrayList<String> portList = new ArrayList<String>();\n\n if (!ports.hasMoreElements()) {\n System.err.println(\"No comm ports found!\");\n } else {\n while (ports.hasMoreElements()) {\n /*\n * Get the specific port\n */\n CommPortIdentifier portId = (CommPortIdentifier) ports.nextElement();\n\n if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {\n portList.add(portId.getName());\n }\n }\n }\n Collections.sort(portList);\n\n /* Add all port to lists */\n for (int i = 0; i < portList.size(); i++) {\n this.magnetometerPort.addItem(portList.get(i));\n this.handlerPort.addItem(portList.get(i));\n this.demagnetizerPort.addItem(portList.get(i));\n }\n\n /* Select currently used port */\n this.magnetometerPort.setSelectedItem(Settings.getMagnetometerPort());\n this.handlerPort.setSelectedItem(Settings.getHandlerPort());\n this.demagnetizerPort.setSelectedItem(Settings.getDegausserPort());\n\n /* Buttons */\n saveButton.setAction(this.getSaveAction());\n getSaveAction().setEnabled(false);\n cancelButton.setAction(this.getCancelAction());\n\n /* Update listener for FormattedTextFields */\n DocumentListener saveListener = new DocumentListener() {\n public void insertUpdate(DocumentEvent e) {\n if (correctValues()) {\n getSaveAction().setEnabled(true);\n } else {\n getSaveAction().setEnabled(false);\n }\n }\n\n public void removeUpdate(DocumentEvent e) {\n if (correctValues()) {\n getSaveAction().setEnabled(true);\n } else {\n getSaveAction().setEnabled(false);\n }\n }\n\n public void changedUpdate(DocumentEvent e) {\n }\n };\n\n /* Update listener for Comboboxes */\n ActionListener propertiesActionListener = new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if (correctValues()) {\n getSaveAction().setEnabled(true);\n } else {\n getSaveAction().setEnabled(false);\n }\n }\n };\n\n /* Lets set all listeners for changes */\n magnetometerPort.addActionListener(propertiesActionListener);\n demagnetizerPort.addActionListener(propertiesActionListener);\n handlerPort.addActionListener(propertiesActionListener);\n\n xAxisCalibration.getDocument().addDocumentListener(saveListener);\n yAxisCalibration.getDocument().addDocumentListener(saveListener);\n zAxisCalibration.getDocument().addDocumentListener(saveListener);\n\n demagRamp.addActionListener(propertiesActionListener);\n demagDelay.addActionListener(propertiesActionListener);\n\n acceleration.getDocument().addDocumentListener(saveListener);\n deceleration.getDocument().addDocumentListener(saveListener);\n velocity.getDocument().addDocumentListener(saveListener);\n measurementVelocity.getDocument().addDocumentListener(saveListener);\n\n transverseYAFPosition.getDocument().addDocumentListener(saveListener);\n axialAFPosition.getDocument().addDocumentListener(saveListener);\n sampleLoadPosition.getDocument().addDocumentListener(saveListener);\n backgroundPosition.getDocument().addDocumentListener(saveListener);\n measurementPosition.getDocument().addDocumentListener(saveListener);\n\n rotation.getDocument().addDocumentListener(saveListener);\n rotationVelocity.addActionListener(propertiesActionListener);\n rotationAcc.addActionListener(propertiesActionListener);\n rotationDec.addActionListener(propertiesActionListener);\n\n maximumField.addActionListener(propertiesActionListener);\n\n saveButton.setEnabled(correctValues());\n }",
"@Override\n \tpublic ISettingsPage makeSettingsPage() {\n \t\treturn new ProcessSettingsPage(settings);\n \t}",
"private void settings() {\n mainTitle = makeLabel(\"Settings\", true);\n add(mainTitle);\n add(content);\n add(diffSlider);\n add(colourChooser);\n add(mainB);//button to main menu\n diffSlider.requestFocus();\n }",
"public abstract Dialog createDialog(DialogDescriptor descriptor);",
"private AssignFSADialog() {\r\n super(Hub.getMainWindow(), Hub.string(\"TD_assignFSATitle\"));\r\n addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n onEscapeEvent();\r\n }\r\n });\r\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\r\n this.setMinimumSize(new Dimension(300, 10));\r\n\r\n Box mainBox = Box.createHorizontalBox();\r\n mainBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n Box newBox = Box.createVerticalBox();\r\n newBox.add(new JLabel(\" \"));\r\n newBox.add(new JButton(new NewFSAAction()));\r\n mainBox.add(newBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n openModelsCombo = new JComboBox();\r\n openModelsCombo.setRenderer(new JLabelListRenderer());\r\n Box modelsBox = Box.createVerticalBox();\r\n Box titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_openModels\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n modelsBox.add(titleBox);\r\n modelsBox.add(openModelsCombo);\r\n mainBox.add(modelsBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n templatesCombo = new JComboBox();\r\n templatesCombo.setRenderer(new JLabelListRenderer());\r\n Box templatesBox = Box.createVerticalBox();\r\n titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_templates\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n templatesBox.add(titleBox);\r\n templatesBox.add(templatesCombo);\r\n mainBox.add(templatesBox);\r\n\r\n getContentPane().add(mainBox);\r\n\r\n }",
"public GAClusteringConfigurationDialog() {}",
"private void initDialog() {\n }",
"public void showSettingsAlert() {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(LocationChooser.this);\n // Setting Dialog Title\n alertDialog.setTitle(\"GPS settings\");\n // Setting Dialog Message\n alertDialog.setMessage(\"GPS is not enabled. Do you want to enable now?\");\n // On pressing Settings button\n alertDialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(intent);\n }\n });\n // on pressing cancel button\n alertDialog.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n // Showing Alert Message\n alertDialog.show();\n }",
"private void configActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configActionPerformed\n java.awt.EventQueue.invokeLater(() -> {\n if (dialog == null) {\n dialog = new ConfigurationDlg(this, true);\n }\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n dialog.dispose();\n }\n });\n dialog.setVisible(true);\n });\n }",
"private Menu createSettingsMenu() {\r\n\t\tMenu serviceMenu = new Menu(\"Settings\");\r\n\r\n\t\tMenuItem networkSettings = new MenuItem(\"Service\");\r\n\t\tnetworkSettings.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tDaemon.editRunningService(localPeer);\r\n\t\t\t\tchangeDispatcher.stateChanged(new ChangeEvent(localPeer));\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(networkSettings);\r\n\r\n\t\tMenuItem securitySettings = new MenuItem(\"Backup\");\r\n\t\tsecuritySettings.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(securitySettings);\r\n\r\n\t\treturn serviceMenu;\r\n\t}",
"public OutputConfigDialog(AppEditor theParent) {\n\n\t\tsuper(theParent, WINDOW_TITLE, Dialog.ModalityType.APPLICATION_MODAL);\n\n\t\tdoSetup(null, false, false);\n\t}",
"public ACLPropertyDialog() {\n this.setModal(true);\n try {\n jbInit();\n pack();\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}",
"public void showSettingsAlert(){\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"GPS is settings\");\n\n // Setting Dialog Message\n alertDialog.setMessage(\"GPS is not enabled. Do you want to go to settings menu?\");\n\n // On pressing Settings button\n alertDialog.setPositiveButton(\"Settings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int which) {\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n mContext.startActivity(intent);\n }\n });\n\n // on pressing cancel button\n alertDialog.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n }",
"public void showSettingsAlert(){\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"GPS is settings\");\n\n // Setting Dialog Message\n alertDialog.setMessage(\"GPS is not enabled. Do you want to go to settings menu?\");\n\n // On pressing Settings button\n alertDialog.setPositiveButton(\"Settings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int which) {\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n mContext.startActivity(intent);\n }\n });\n\n // on pressing cancel button\n alertDialog.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n }",
"public CreateTremaDbDialogForm(AnActionEvent event) {\n this.event = event;\n this.windowTitle = \"New Trema XML database file\";\n init();\n }",
"public dlgConfiguration(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n }",
"public static synchronized void getSettingsWindow() {\n if (WINDOW == null) {\n WINDOW = new JFrame(\"Settings\");\n WINDOW.setContentPane(new SettingsWindow().settingsPanel);\n WINDOW.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n WINDOW.pack();\n }\n WINDOW.setVisible(true);\n WINDOW.requestFocus();\n }",
"private SPSSDialog(FormDef form)\n\t{\n\t\tthis.form = form;\n\t\tsetup();\n\t}",
"public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"private Pane createSettings() {\n HBox row = new HBox(20);\n row.setAlignment(Pos.CENTER);\n Label langIcon = createIcon(\"icons/language.png\");\n Label themeIcon = createIcon(\"icons/theme.png\");\n\n ComboBox<Language> langSelect = new ComboBox<>();\n langSelect.getItems().addAll(UIController.Language.values());\n langSelect.setValue(UIController.Language.values()[0]);\n langSelect.setOnAction(e -> changeLanguage(langSelect.getValue()));\n\n ComboBox<Theme> themeSelect = new ComboBox<>();\n themeSelect.getItems().addAll(UIController.Theme.values());\n themeSelect.setValue(UIController.Theme.values()[0]);\n themeSelect.setOnAction(e -> changeTheme(themeSelect.getValue()));\n\n row.getChildren().addAll(langIcon, langSelect, themeIcon, themeSelect);\n\n return row;\n }",
"public static void showSettingDialog(Activity activity, String title, String msg){\n new AlertDialog.Builder(activity)\n .setTitle(title)\n .setMessage(msg)\n .setPositiveButton(\"Настройки\", (dialog, which) -> {\n Intent intent = new Intent();\n intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\", activity.getPackageName(), null);\n intent.setData(uri);\n dialog.cancel();\n activity.startActivity(intent);\n })\n .setNegativeButton(\"Продолжить\", (dialog, which) -> dialog.cancel())\n .show();\n }",
"public PreferencesDialog (JFrame owner, String title)\n {\n this (owner, title, OpenMarkovPreferences.OPENMARKOV_NODE_PREFERENCES, true/*\n * ,\n * OpenMarkovPreferences\n * .\n * OPENMARKOV_KERNEL_PREFERENCES\n * ,\n * false\n */);\n }",
"private void createSettingsFile() throws IllegalArgumentException {\r\n\r\n File settingsFile = new File(msAmandaTempFolder, SETTINGS_FILE);\r\n\r\n try {\r\n\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(settingsFile));\r\n\r\n bw.write(\r\n \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" + System.getProperty(\"line.separator\")\r\n + \"<settings>\" + System.getProperty(\"line.separator\")\r\n + \"\\t<search_settings>\" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<enzyme specificity=\\\"\" + enzymeSpecificity + \"\\\">\" + enzymeName + \"</enzyme>\" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<missed_cleavages>\" + missedCleavages + \"</missed_cleavages>\" + System.getProperty(\"line.separator\")\r\n + modificationsAsString\r\n + \"\\t\\t<instrument>\" + instrument + \"</instrument>\" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<ms1_tol unit=\\\"\" + precursorUnit + \"\\\">\" + precursorMassError + \"</ms1_tol> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<ms2_tol unit=\\\"\" + fragmentUnit + \"\\\">\" + fragmentMassError + \"</ms2_tol> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<max_rank>\" + maxRank + \"</max_rank> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<generate_decoy>\" + generateDecoys + \"</generate_decoy> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<PerformDeisotoping>\" + performDeisotoping + \"</PerformDeisotoping> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNoModifs>\" + maxModifications + \"</MaxNoModifs> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNoDynModifs>\" + maxVariableModifications + \"</MaxNoDynModifs> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNumberModSites>\" + maxModificationSites + \"</MaxNumberModSites> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNumberNeutralLoss>\" + maxNeutralLosses + \"</MaxNumberNeutralLoss> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNumberNeutralLossModifications>\" + maxNeutralLossesPerModification + \"</MaxNumberNeutralLossModifications> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MinimumPepLength>\" + minPeptideLength + \"</MinimumPepLength> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaximumPepLength>\" + maxPeptideLength + \"</MaximumPepLength> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<ReportBothBestHitsForTD>\" + reportBothBestHitsForTD + \"</ReportBothBestHitsForTD> \" + System.getProperty(\"line.separator\")\r\n + \"\\t</search_settings> \" + System.getProperty(\"line.separator\")\r\n + System.getProperty(\"line.separator\")\r\n + \"\\t<basic_settings> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<instruments_file>\" + new File(msAmandaFolder, INSTRUMENTS_FILE).getAbsolutePath() + \"</instruments_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<unimod_file>\" + new File(msAmandaFolder, UNIMOD_FILE).getAbsolutePath() + \"</unimod_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<enzyme_file>\" + new File(msAmandaTempFolder, ENZYMES_FILE).getAbsolutePath() + \"</enzyme_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<unimod_obo_file>\" + new File(msAmandaFolder, UNIMOD_OBO_FILE).getAbsolutePath() + \"</unimod_obo_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<psims_obo_file>\" + new File(msAmandaFolder, PSI_MS_OBO_FILE).getAbsolutePath() + \"</psims_obo_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<monoisotopic>\" + monoisotopic + \"</monoisotopic> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<considered_charges>\" + getChargeRangeAsString() + \"</considered_charges> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<LoadedProteinsAtOnce>\" + maxLoadedProteins + \"</LoadedProteinsAtOnce> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<LoadedSpectraAtOnce>\" + maxLoadedSpectra + \"</LoadedSpectraAtOnce> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<data_folder>\" + msAmandaTempFolder + \"</data_folder> \" + System.getProperty(\"line.separator\")\r\n + \"\\t</basic_settings> \" + System.getProperty(\"line.separator\")\r\n + \"</settings>\"\r\n + System.getProperty(\"line.separator\")\r\n );\r\n\r\n bw.flush();\r\n bw.close();\r\n\r\n } catch (IOException ioe) {\r\n\r\n throw new IllegalArgumentException(\r\n \"Could not create MS Amanda settings file. Unable to write file: '\"\r\n + ioe.getMessage()\r\n + \"'!\"\r\n );\r\n\r\n }\r\n }",
"public Dialog() {\n\t}",
"private void initSettingsPanel() {\n JLabel lblName = new JLabel(\"Name:\");\n lblName.setForeground(StyleCompat.textColor());\n\n JTextField fieldName = new JTextField(20);\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblName, fieldName));\n\n JLabel lblVirtOutput = new JLabel(\"VirtualOutput:\");\n lblVirtOutput.setForeground(StyleCompat.textColor());\n\n JComboBox<String> comboVirtOutputs = new JComboBox<>();\n for(Device device : instance.getInterface().getDeviceManager().getDevices()) {\n if(device instanceof VirtualOutput) {\n if(handler != null && instance.getHandlerByVirtualOutput(device.getId()) == handler) {\n comboVirtOutputs.addItem(device.getId());\n comboVirtOutputs.setSelectedIndex(comboVirtOutputs.getItemCount() - 1);\n } else if(!instance.isVirtualOutputUsed(device.getId())) {\n comboVirtOutputs.addItem(device.getId());\n }\n }\n }\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblVirtOutput, comboVirtOutputs));\n\n JLabel lblDeviceId = new JLabel(\"OpenRGB Device ID (index):\");\n lblDeviceId.setForeground(StyleCompat.textColor());\n\n JFormattedTextField fieldDeviceId = new JFormattedTextField(UserInterfaceUtil.getIntFieldFormatter());\n fieldDeviceId.setColumns(5);\n JButton btnAddDeviceId = new JButton(\"Add device\");\n UiUtilsCompat.configureButton(btnAddDeviceId);\n btnAddDeviceId.addActionListener(e -> {\n if(fieldDeviceId.getValue() == null) return;\n int value = (int) fieldDeviceId.getValue();\n if(value < 0 || listDevices.contains(value)) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Invalid ID or list contains already ID.\"));\n return;\n }\n listDevices.add(value);\n fieldDeviceId.setText(\"\");\n updateDeviceListPanel();\n });\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblDeviceId, fieldDeviceId, btnAddDeviceId));\n\n if(instance.getOpenRGB().isConnected()) {\n // show info label, remove all and add all button\n int deviceCount = instance.getOpenRGB().getControllerCount();\n\n JLabel lblCountInfo = new JLabel(\"There are \" + deviceCount + \" devices available.\");\n lblCountInfo.setForeground(StyleCompat.textColor());\n\n JButton btnAddAll = new JButton(\"Add all\");\n UiUtilsCompat.configureButton(btnAddAll);\n btnAddAll.addActionListener(e -> {\n for(int i = 0; i < deviceCount; i++) {\n if(!listDevices.contains(i))\n listDevices.add(i);\n }\n updateDeviceListPanel();\n });\n\n JButton btnRemoveAll = new JButton(\"Remove all\");\n UiUtilsCompat.configureButton(btnRemoveAll);\n btnRemoveAll.addActionListener(e -> {\n listDevices.clear();\n updateDeviceListPanel();\n });\n\n // add components to panel\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblCountInfo, btnAddAll, btnRemoveAll));\n } else {\n // show hint message\n JLabel lblHint = new JLabel(\"(i) Go back and connect the client to receive live data from the SDK server.\");\n lblHint.setForeground(StyleCompat.textColorDarker());\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblHint));\n }\n\n panelDeviceList = new JPanel();\n panelDeviceList.setBackground(StyleCompat.panelDarkBackground());\n panelDeviceList.setLayout(new BoxLayout(panelDeviceList, BoxLayout.Y_AXIS));\n panelDeviceList.setAlignmentX(Component.LEFT_ALIGNMENT);\n panelSettings.add(Box.createVerticalStrut(10));\n panelSettings.add(panelDeviceList);\n updateDeviceListPanel();\n\n if(handler != null) {\n // set stored values\n fieldName.setText(handler.getName());\n }\n\n JButton btnAdd = new JButton(handler == null ? \"Add OpenRGB Device\" : \"Save OpenRGB Device\");\n UiUtilsCompat.configureButton(btnAdd);\n btnAdd.setAlignmentX(Component.LEFT_ALIGNMENT);\n btnAdd.setMaximumSize(new Dimension(Integer.MAX_VALUE, 50));\n btnAdd.setMinimumSize(new Dimension(100, 50));\n\n btnAdd.addActionListener(e -> {\n // create value holder\n ValueHolder holder = new ValueHolder(\n fieldName.getText(),\n (String) comboVirtOutputs.getSelectedItem(),\n listDevices);\n\n if(validateInput(holder.getName(), holder.getOutputId())) {\n // get output\n VirtualOutput output = OpenRgbPlugin.getVirtualOutput(instance.getInterface().getDeviceManager(), holder.getOutputId());\n if (output == null) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Could not find virtual output for id \" + holder.getOutputId()));\n return;\n }\n\n if(handler != null) { // set values to output handler\n handler.setName(holder.getName());\n handler.setDevices(listDevices);\n handler.setVirtualOutput(output);\n } else { // create new output handler\n // create new handler\n OutputHandler handler = instance.createHandler(holder, output);\n // add handler to set\n instance.addHandler(handler);\n }\n\n // go back\n context.navigateDown();\n }\n });\n\n panelSettings.add(Box.createVerticalGlue());\n panelSettings.add(btnAdd);\n }",
"void setSettings(ControlsSettings settings);",
"protected void createDialogSize ()\n {\n }",
"public RelationshipDialog() {\n super(getRTParent(), \"Add Relationship...\", true);\n getContentPane().setLayout(new BorderLayout(5,5));\n JPanel center = new JPanel(new GridLayout(5,2,5,5));\n center.add(new JLabel(\"From\")); \n center.add(new JLabel(\"To\"));\n\n String blanks[] = KeyMaker.blanks(getRTParent().getRootBundles().getGlobals());\n center.add(from_cb = new JComboBox(blanks));\n center.add(to_cb = new JComboBox(blanks));\n\n center.add(from_symbol_cb = new JComboBox(Utils.SHAPE_STRS));\n center.add(to_symbol_cb = new JComboBox(Utils.SHAPE_STRS));\n center.add(from_typed_cb = new JCheckBox(\"Field Typed\", false));\n center.add(to_typed_cb = new JCheckBox(\"Field Typed\", false));\n center.add(ignore_ns_cb = new JCheckBox(\"Ignore Not Sets\", true));\n getContentPane().add(\"Center\", center);\n\n getContentPane().add(\"North\", style_cb = new JComboBox(STYLE_STRS));\n\n JPanel bottom = new JPanel(new FlowLayout());\n JButton add_bt, cancel_bt;\n bottom.add(add_bt = new JButton(\"Add\"));\n bottom.add(cancel_bt = new JButton(\"Cancel\"));\n getContentPane().add(\"South\", bottom);\n\n // Add listeners\n cancel_bt.addActionListener(new ActionListener() { \n public void actionPerformed(ActionEvent ae) { setVisible(false); dispose(); } } );\n add_bt.addActionListener(new ActionListener() { \n public void actionPerformed(ActionEvent ae) {\n setVisible(false); dispose();\n\t addRelationship((String) from_cb.getSelectedItem(), \n\t (String) from_symbol_cb.getSelectedItem(),\n\t \t\t from_typed_cb.isSelected(),\n\t (String) to_cb.getSelectedItem(), \n\t (String) to_symbol_cb.getSelectedItem(),\n\t\t \t to_typed_cb.isSelected(),\n (String) style_cb.getSelectedItem(), \n\t\t\t ignore_ns_cb.isSelected(), \n\t\t\t false);\n } } );\n pack(); setVisible(true);\n }",
"protected void createSettingsComponents() {\r\n periodTimeComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_PERIOD_TIME, MIN_PERIOD_TIME, MAX_PERIOD_TIME, 1 ) );\r\n maxNumberOfPlayersComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_MAX_NUMBER_OF_PLAYERS, MIN_MAX_NUMBER_OF_PLAYERS, MAX_MAX_NUMBER_OF_PLAYERS, 1 ) );\r\n mapWidthComponent = new JComboBox( MAP_WIDTH_NAMES );\r\n mapHeightComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_MAP_HEIGHT, MIN_MAP_HEIGHT, MAX_MAP_HEIGHT, 1 ) );\r\n welcomeMessageComponent = new JTextArea( 10, 20 );\r\n gameTypeComponent = new JComboBox( GAME_TYPE_NAMES );\r\n isKillLimitComponent = new JCheckBox( \"Kill limit:\" );\r\n killLimitComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_KILL_LIMIT, MIN_KILL_LIMIT, MAX_KILL_LIMIT, 1 ) );\r\n isTimeLimitComponent = new JCheckBox( \"Time limit:\" );\r\n timeLimitComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_TIME_LIMIT, MIN_TIME_LIMIT, MAX_TIME_LIMIT, 1 ) );\r\n passwordComponent = new JTextField( 10 );\r\n amountOfWallRubblesComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_WALL_RUBBLES, MIN_AMOUNT_OF_WALL_RUBBLES, MAX_AMOUNT_OF_WALL_RUBBLES, 1 ) );\r\n amountOfBloodComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_BLOOD, MIN_AMOUNT_OF_BLOOD, MAX_AMOUNT_OF_BLOOD, 1 ) );\r\n amountOfWallComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_WALL, MIN_AMOUNT_OF_WALL, MAX_AMOUNT_OF_WALL, 1 ) );\r\n amountOfStoneComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_STONE, MIN_AMOUNT_OF_STONE, MAX_AMOUNT_OF_STONE, 1 ) );\r\n amountOfWaterComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_WATER, MIN_AMOUNT_OF_WATER, MAX_AMOUNT_OF_WATER, 1 ) );\r\n }",
"@SuppressLint(\"InflateParams\")\n @Override @NonNull\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n builder.setTitle(R.string.settings_manual_input_dialog_title)\n .setView(inflater.inflate(R.layout.dialog_settings_manual_input, null))\n .setPositiveButton(R.string.settings_manual_input_dialog_ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Send the positive button event back to the host activity\n\n String tokenName = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_name)).getText().toString();\n String token = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_value)).getText().toString();\n String issuerUrl = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_url)).getText().toString();\n mListener.onSettingsManualInputDialogOkClick(tokenName, token, issuerUrl);\n }\n })\n .setNegativeButton(R.string.settings_manual_input_dialog_cancel, null);\n\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"public void showSettingsAlert() {\r\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext);\r\n alertDialog.setTitle(mContext.getResources().getString(R.string.gps_settings_title));\r\n alertDialog.setMessage(mContext.getResources().getString(R.string.gps_settings_body));\r\n alertDialog.setCancelable(false);\r\n alertDialog.setPositiveButton(mContext.getResources().getString(R.string.action_settings), new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\r\n ((Activity) mContext).startActivityForResult(intent, REQUEST_LOCATION_CODE);\r\n }\r\n });\r\n alertDialog.show();\r\n }",
"private void createConnectionConfigurationDialog(String message) {\n\t\tmainWindow.readConnectionConfigurationFromDialog(message);\n\t}",
"public abstract void initDialog();",
"public JDialogParticleAnalysisNew() { }",
"public void showSettingsAlert() {\n\n AlertDialog.Builder alertDialog =\n new AlertDialog.Builder(mContext);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"GPS is settings\");\n\n // Setting Dialog Message\n alertDialog.setMessage(\"GPS is not enabled. Do you want to go to settings menu?\");\n\n // On pressing Settings button\n alertDialog.setPositiveButton(\"Settings\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(\n Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n mContext.startActivity(intent);\n }\n });\n\n // on pressing cancel button\n alertDialog.setNegativeButton(\"Cancel\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface aDialog, int which) {\n aDialog.cancel();\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n\n /*Notifications.ShowMessageBox(\n this.mContext,\n \"GPS is not enabled. Do you want to go to settings menu?\",\n \"GPS is setting\",\n \"\");*/\n }",
"public GenerateNodesDialog(GUI p){\n\t\tsuper(p, \"Create new Nodes\", true);\n\t\tGuiHelper.setWindowIcon(this);\n\t\tcancel.addActionListener(this);\n\t\tok.addActionListener(this);\n\t\t\n\t\tFont f = distributionModelComboBox.getFont().deriveFont(Font.PLAIN);\n\t\tdistributionModelComboBox.setFont(f);\n\t\tnodeTypeComboBox.setFont(f);\n\t\tconnectivityModelComboBox.setFont(f);\n\t\tinterferenceModelComboBox.setFont(f);\n\t\tmobilityModelComboBox.setFont(f);\n\t\treliabilityModelComboBox.setFont(f);\n\n\t\t// Detect ESCAPE button\n\t\tKeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();\n\t\tfocusManager.addKeyEventPostProcessor(new KeyEventPostProcessor() {\n\t\t\tpublic boolean postProcessKeyEvent(KeyEvent e) {\n\t\t\t\tif(!e.isConsumed() && e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n\t\t\t\t\tGenerateNodesDialog.this.setVisible(false);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.setLocationRelativeTo(p);\n\t\tthis.parent = p;\n\t}",
"private void createThemeDialog() {\n\n\t\tAlertDialog.Builder alb = new AlertDialog.Builder(this);\n\t\talb.setTitle(getString(R.string.choose_theme));\n\t\talb.setCancelable(true);\n\n\t\tString[] items;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n\t\t\titems = new String[]{getString(R.string.light), getString(R.string.dark),\n\t\t\t\t\tgetString(R.string.time), getString(R.string.system)};\n\t\t} else {\n\t\t\titems = new String[]{getString(R.string.light), getString(R.string.dark),\n\t\t\t\t\tgetString(R.string.time)};\n\t\t}\n\n\t\tAtomicInteger newTheme = new AtomicInteger(currentTheme);\n\n\t\talb.setSingleChoiceItems(items, currentTheme, (dialog, which) -> newTheme.set(which));\n\n\t\talb.setPositiveButton(getString(R.string.set_theme), (dialog, which) -> {\n\t\t\tcurrentTheme = newTheme.get();\n\t\t\tchangeTheme();\n\t\t});\n\n\t\talb.show();\n\t}",
"@Override\n\tprotected void handleSettings(ClickEvent event) {\n\t\t\n\t}",
"public FDRSettingsPanel() {\n initComponents();\n }",
"TvShowScraperNfoSettingsPanel() {\n checkBoxListener = e -> checkChanges();\n comboBoxListener = e -> checkChanges();\n\n // UI init\n initComponents();\n initDataBindings();\n\n // data init\n\n // implement checkBoxListener for preset events\n settings.addPropertyChangeListener(evt -> {\n if (\"preset\".equals(evt.getPropertyName())) {\n buildComboBoxes();\n }\n });\n\n buildCheckBoxes();\n buildComboBoxes();\n }",
"public SettingsPage() {\n\t\tPageFactory.initElements(driver, this);\n\t}",
"private void initDescriptor(WizardDescriptor settings) {\n settings.putProperty(ConfigureProjectPanel.IS_PROJECT_DIR_USED, null);\n settings.putProperty(ConfigureProjectPanel.PROJECT_DIR, null);\n settings.putProperty(ConfigureProjectPanel.PROJECT_NAME, null);\n settings.putProperty(ConfigureProjectPanel.SOURCES_FOLDER, null);\n settings.putProperty(ConfigureProjectPanel.LOCAL_SERVERS, null);\n settings.putProperty(ConfigureProjectPanel.PHP_VERSION, null);\n settings.putProperty(ConfigureProjectPanel.ENCODING, null);\n settings.putProperty(RunConfigurationPanel.VALID, null);\n settings.putProperty(RunConfigurationPanel.RUN_AS, null);\n settings.putProperty(RunConfigurationPanel.COPY_SRC_FILES, null);\n settings.putProperty(RunConfigurationPanel.COPY_SRC_TARGET, null);\n settings.putProperty(RunConfigurationPanel.COPY_SRC_TARGETS, null);\n settings.putProperty(RunConfigurationPanel.COPY_SRC_ON_OPEN, null);\n settings.putProperty(RunConfigurationPanel.URL, null);\n settings.putProperty(RunConfigurationPanel.INDEX_FILE, null);\n settings.putProperty(RunConfigurationPanel.REMOTE_CONNECTION, null);\n settings.putProperty(RunConfigurationPanel.REMOTE_DIRECTORY, null);\n settings.putProperty(RunConfigurationPanel.REMOTE_UPLOAD, null);\n settings.putProperty(RunConfigurationPanel.HOSTNAME, null);\n settings.putProperty(RunConfigurationPanel.PORT, null);\n settings.putProperty(RunConfigurationPanel.ROUTER, null);\n settings.putProperty(PhpFrameworksPanel.VALID, null);\n settings.putProperty(PhpFrameworksPanel.EXTENDERS, null);\n settings.putProperty(PhpExtenderPanel.VALID, null);\n settings.putProperty(RemoteConfirmationPanel.REMOTE_FILES, null);\n settings.putProperty(RemoteConfirmationPanel.REMOTE_CLIENT, null);\n }",
"private Settings manageSettings(Data loadedData) {\n Dialog<Settings> dialog = new Dialog<>();\n dialog.setTitle(\"Settings\");\n dialog.setHeaderText(\"Please specify the settings for the file you are uploading.\");\n\n Label label1 = new Label(\"ZAMS phase is: \");\n Label label2 = new Label(\"Include phases: \");\n\n //ZAMS\n ChoiceBox choiceBox = new ChoiceBox();\n choiceBox.getItems().add(\"-\");\n choiceBox.setValue(\"-\");\n choiceBox.getItems().addAll(loadedData.getCurrentPhases());\n\n //Phases\n List<CheckBox> phaseBoxes = new ArrayList<>();\n List<Short> availablePhases = new ArrayList<>(loadedData.getCurrentPhases());\n GridPane allowedPhasesPane = new GridPane();\n availablePhases.sort(Comparator.naturalOrder());\n if (Data.getCurrentData().getCurrentPhases().size() > 12) {\n allowedPhasesPane.add(new Label(\"Too many\"), 0, 0);\n allowedPhasesPane.add(new Label(\"phases!\"), 0, 1);\n } else {\n for (int i = 0; i < availablePhases.size(); i++) {\n CheckBox checkBox = new CheckBox(availablePhases.get(i).toString());\n phaseBoxes.add(checkBox);\n allowedPhasesPane.add(checkBox, i % 3, i / 3);\n checkBox.setSelected(true);\n }\n }\n\n GridPane grid = new GridPane();\n grid.add(label1, 1, 1);\n grid.add(choiceBox, 2, 1);\n grid.add(label2, 1, 2);\n grid.add(allowedPhasesPane, 2, 2);\n dialog.getDialogPane().setContent(grid);\n\n ButtonType buttonTypeOk = new ButtonType(\"Upload file\", ButtonBar.ButtonData.OK_DONE);\n dialog.getDialogPane().getButtonTypes().add(buttonTypeOk);\n\n dialog.setResultConverter(new Callback<ButtonType, Settings>() {\n @Override\n public Settings call(ButtonType b) {\n if (b==buttonTypeOk) {\n HashSet<Short> selectedPhases = new HashSet<>();\n for (CheckBox checkBox : phaseBoxes) {\n if (checkBox.isSelected()) { selectedPhases.add(Short.parseShort(checkBox.getText())); }\n }\n Short zams = null;\n if (choiceBox.getValue() != \"-\") {\n zams = Short.parseShort(choiceBox.getValue().toString());\n }\n return new Settings(selectedPhases, zams, false);\n }\n return null;\n }\n });\n\n Stage stage = (Stage) dialog.getDialogPane().getScene().getWindow();\n stage.getIcons().add(new Image(this.getClass().getResource(\"/settings.png\").toString()));\n\n dialog.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node\n -> ((Label)node).setMinHeight(Region.USE_PREF_SIZE)); //fix for broken linux dialogues\n Optional<Settings> result = dialog.showAndWait();\n return result.orElse(null);\n }",
"public ClassChoiceDialog(Context context) {\n // 通过LayoutInflater来加载一个xml的布局文件作为一个View对象\n this.context = context;\n initialView();\n dialog = builder.create();\n initListener();\n\n }",
"private ConfigDialog(JFrame frame, GameScreen gameScreen) {\n super(frame, \"Configurations\", true);\n\n darkSquare = new SimpleColorChooser(\n new Color[]{new Color(0, 0, 0), new Color(40, 40, 60),\n new Color(0, 0, 60), new Color(0, 60, 0), new Color(0, 60, 60),\n new Color(22, 49, 119), new Color(100, 23, 18),\n new Color(55, 55, 0), new Color(90, 90, 90)});\n lightSquare = new SimpleColorChooser(\n new Color[]{Color.WHITE, new Color(255, 255, 204),\n new Color(255, 204, 204), new Color(255, 225, 174),\n new Color(255, 204, 102), new Color(204, 255, 255),\n new Color(218, 218, 218), new Color(255, 202, 169),\n new Color(255, 223, 236)});\n background = new SimpleColorChooser(\n new Color[]{Color.WHITE, Color.BLACK, Color.DARK_GRAY,\n new Color(255, 204, 51), new Color(0, 102, 255),\n new Color(51, 255, 0)});\n border = new SimpleColorChooser(\n new Color[]{Color.RED, Color.MAGENTA, Color.PINK, Color.ORANGE, Color.BLUE,\n Color.YELLOW, Color.CYAN, new Color(189, 37, 141),\n new Color(74, 204, 47)});\n\n showCoordinates = new JCheckBox(\"Show coordinates\");\n showCoordinates.setSelected(true);\n showCoordinates.setFont(font);\n resetCoordinates = true;\n JPanel coord = new JPanel(new FlowLayout(FlowLayout.LEFT));\n coord.add(showCoordinates);\n\n pieceFont = new FontChooser();\n JPanel choosePieces = new JPanel();\n choosePieces.add(pieceFont);\n\n JButton okButton = new JButton(\"OK\");\n okButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n gameScreen.setBackground(background.getSelectedColor());\n gameScreen.setChessboardColor(border.getSelectedColor());\n gameScreen.setLightSquareColor(lightSquare.getSelectedColor());\n gameScreen.setDarkSquareColor(darkSquare.getSelectedColor());\n gameScreen.setCoordinateDrawing(showCoordinates.isSelected());\n gameScreen.setPieceFont(pieceFont.getPieceFont());\n gameScreen.repaint();\n resetCoordinates = showCoordinates.isSelected();\n setVisible(false);\n }\n });\n\n JButton cancelButton = new JButton(\"CANCEL\");\n cancelButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n reset();\n setVisible(false);\n }\n });\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 8, 8));\n buttonPanel.add(okButton);\n buttonPanel.add(cancelButton);\n\n JPanel borderPanel = new JPanel(new BorderLayout());\n borderPanel.add(coord, BorderLayout.SOUTH);\n borderPanel.add(border, BorderLayout.CENTER);\n\n JTabbedPane tabbed = new JTabbedPane();\n tabbed.setTabPlacement(JTabbedPane.LEFT);\n tabbed.setFont(font);\n tabbed.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));\n tabbed.addTab(\"Light Square Color\", lightSquare);\n tabbed.addTab(\"Dark Square Color\", darkSquare);\n tabbed.addTab(\"Border Color\", borderPanel);\n tabbed.addTab(\"Background Color\", background);\n tabbed.addTab(\"Piece Style\", pieceFont);\n\n JPanel content = new JPanel(new BorderLayout());\n content.add(buttonPanel, BorderLayout.SOUTH);\n content.add(tabbed, BorderLayout.CENTER);\n setContentPane(content);\n pack();\n setResizable(false);\n int xp = frame.getX() + (frame.getWidth() - getWidth()) / 2;\n int yp = frame.getY() + (frame.getHeight() - getHeight()) / 2;\n setLocation(xp, yp);\n }",
"public void callSetupDialog(JDialog jParent, MainWindow oMain) {\n AllometryParameterEdit oWindow = new AllometryParameterEdit(jParent, m_oManager, oMain, this);\n oWindow.pack();\n oWindow.setLocationRelativeTo(null);\n oWindow.setVisible(true);\n }",
"private CovarianceTopicSettings(javax.swing.JDialog parent) {\n super(parent);\n initComponents();\n }",
"protected WindowFeaturesNodeDialog() {\n super();\n \n addDialogComponent(new DialogComponentNumber(\n new SettingsModelIntegerBounded(\n WindowFeaturesNodeModel.CFGKEY_WINDOWSIZE,\n WindowFeaturesNodeModel.DEFAULT_CFGKEY_WINDOWSIZE,\n Integer.MIN_VALUE, Integer.MAX_VALUE),\n \"Window Size:\", /*step*/ 1, /*componentwidth*/ 5));\n \n }",
"protected abstract JDialog createDialog();",
"public RegisterDialog(JFrame parent) {\n super(parent, true);\n initComponents();\n setResizable(false);\n }",
"public void showSettingsAlert() {\r\n final android.support.v7.app.AlertDialog.Builder alertDialogBuilder = new android.support.v7.app.AlertDialog.Builder(mContext);\r\n\r\n alertDialogBuilder.setTitle(\"Alerta!\");\r\n alertDialogBuilder.setMessage(\"Para o melhor funcionamento deste aplicativo é necessário que o GPS esteja ativado. Deseja Ativar agora?\");\r\n alertDialogBuilder.setPositiveButton(\" SIM \", new DialogInterface.OnClickListener() {\r\n\r\n public void onClick(DialogInterface dialog, int which) {\r\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\r\n mContext.startActivity(intent);\r\n }\r\n });\r\n alertDialogBuilder.show();\r\n }",
"public SaddamWindow(SaddamDocument aDocument) {\n super(aDocument);\n setSize(600, 500);\n\ttheDoc = aDocument;\n \tnullDevices = new Vector<String>();\n\tnullDevices.add(\"Pick Sequence\");\n\tnullSignals = new Vector<String>();\n\tnullSignals.add(\"Pick Device Type\");\n\tnullValues = new Vector<String>();\n\tnullValues.add(\"No Values Available\");\n\tactionChoices = new Vector<String>();\n\tactionChoices.add(\"Set Value\");\n\tactionChoices.add(\"Increment Value\");\n\tactionChoices.add(\"Multiply Value\");\t\n\tactionChoice = new JComboBox<String>(actionChoices);\n\t\n makeContent();\n Container container = getContentPane();\n\tcontainer.add(mainPanel);\n\t\n }",
"public SettingsMenuPanel() {\n initComponents();\n changed.setVisible(false);\n }",
"public SettingsFragment(){}",
"public ReorganizeDialog() { }",
"private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}",
"protected Dialog onCreateDialog(int id) {\n if (id == 1) {\n AlertDialog.Builder adb = new AlertDialog.Builder(this);\n // заголовок\n adb.setTitle(\"PIN Removed\");\n // сообщение\n adb.setMessage(\"There will be no PIN entry screen when Application starts up.\");\n // иконка\n adb.setIcon(android.R.drawable.ic_dialog_info);\n adb.setNeutralButton(\"Ok\", myClickListener);\n // создаем диалог\n return adb.create();\n }\n return super.onCreateDialog(id);\n }",
"public PHConstDialog() {\n\t\tinitComponents();\n\t}"
] | [
"0.65357226",
"0.6219732",
"0.62152386",
"0.61635107",
"0.6124313",
"0.61132795",
"0.61107296",
"0.6101374",
"0.6099501",
"0.607723",
"0.60769874",
"0.60753363",
"0.6022113",
"0.60134",
"0.6000094",
"0.5965648",
"0.5951771",
"0.59419215",
"0.5935888",
"0.5926234",
"0.58960795",
"0.58960795",
"0.5883065",
"0.5858543",
"0.58437246",
"0.58125573",
"0.58045167",
"0.578711",
"0.57768345",
"0.57607824",
"0.57493705",
"0.5646459",
"0.562621",
"0.56124336",
"0.5600699",
"0.55894387",
"0.55789083",
"0.5572167",
"0.5567722",
"0.5567046",
"0.5563706",
"0.5552236",
"0.5551658",
"0.554483",
"0.55344397",
"0.5525302",
"0.5522428",
"0.5519143",
"0.5497593",
"0.54853284",
"0.5476218",
"0.5469798",
"0.54585004",
"0.5451653",
"0.54355234",
"0.54355234",
"0.5433957",
"0.5427896",
"0.5423677",
"0.5419137",
"0.5419008",
"0.5415099",
"0.5409721",
"0.5403684",
"0.5399269",
"0.5398015",
"0.53973514",
"0.53884315",
"0.5385591",
"0.53790504",
"0.537862",
"0.5358255",
"0.5356111",
"0.5353504",
"0.5346766",
"0.5345822",
"0.5341223",
"0.5337558",
"0.5336438",
"0.5335384",
"0.5335241",
"0.53272045",
"0.532572",
"0.5323184",
"0.5316524",
"0.5314989",
"0.5314282",
"0.53102726",
"0.5309115",
"0.5308494",
"0.5307183",
"0.53051436",
"0.5296809",
"0.5293903",
"0.52935874",
"0.5290968",
"0.5274197",
"0.5266706",
"0.52579135",
"0.52552104"
] | 0.6868342 | 0 |
Edits the XML settings of a data model. | public boolean edit(DataModel dataModel) {
DataModel.XmlSettings xmlSettings = dataModel.getXmlSettings();
datePattern.getEditor().setItem(xmlSettings.datePattern);
timestampPattern.getEditor().setItem(xmlSettings.timestampPattern);
rootTag.setText(xmlSettings.rootTag);
noRootTag.setSelected("".equals(xmlSettings.rootTag));
rootTag.setEditable(!"".equals(xmlSettings.rootTag));
updateExamples();
okClicked = false;
setVisible(true);
if (okClicked) {
boolean change = false;
String newDatePattern = datePattern.getEditor().getItem().toString();
String newTimestampPattern = timestampPattern.getEditor().getItem().toString();
String newRootTag = rootTag.getText().trim();
if (noRootTag.isSelected()) {
newRootTag = "";
}
if (!newDatePattern.equals(xmlSettings.datePattern)) {
xmlSettings.datePattern = newDatePattern;
change = true;
}
if (!newTimestampPattern.equals(xmlSettings.timestampPattern)) {
xmlSettings.timestampPattern = newTimestampPattern;
change = true;
}
if (!newRootTag.equals(xmlSettings.rootTag)) {
xmlSettings.rootTag = newRootTag;
change = true;
}
return change;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void tryEditSettings(SettingsModel settingsModel) {\n interactor.editSettings(settingsModel);\n }",
"public void updateModel() {\n\t\t// Set the mode to validation\n\t\tmode = UPDATE;\n\t\t// Traverses the source and updates the model when UML elements are\n\t\t// missing\n\t\tinspect();\n\t}",
"public void setXml(java.lang.String newXml);",
"void set(Model model);",
"void setDataModelOracle( Path project,\n DataModelOracle oracle );",
"void setModel(Model model);",
"void updateModelFromView();",
"@Override\n\tpublic void saveSettings() {\n\n\t}",
"@Override\n\t\tpublic void setModel(int model) {\n\t\t\t\n\t\t}",
"public EditDataModel(DataModel dataModel) {\n this.dataModel = dataModel;\n }",
"void updateViewFromModel();",
"public void setDataXml(DataXml dataXml) {\r\n this.dataXml = dataXml;\r\n }",
"private void setControlModel(String setting, Object value) {\n\t\tHub.dataModel.put(setting, value);\n\t\tLog.d(TAG, \"Control model updated.\");\n\t}",
"public static void editXML(String dim) throws Exception {\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder builder = builderFactory.newDocumentBuilder();\n\t\tString fileName = PropertiesFile.getInstance().getProperty(\"input_qualifier\")+ \".xml\";\n\t\tDocument xmlDocument = builder.parse(new File(getFullyQualifiedFileName(fileName)));\n\n\t\t/*\n\t\t * String expression = \"ConfigFramework/DCDpp/Servers/Server/Zone\"; XPath xPath\n\t\t * = XPathFactory.newInstance().newXPath(); NodeList nodeList = (NodeList)\n\t\t * xPath.compile(expression).evaluate(xmlDocument, XPathConstants.NODESET); Node\n\t\t * zone = nodeList.item(0);\n\t\t * \n\t\t * String zoneRange = zone.getTextContent(); zoneRange = zoneRange.substring(0,\n\t\t * zoneRange.lastIndexOf(\".\") + 1) + dim; zone.setTextContent(zoneRange);\n\t\t */\n\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\tDOMSource domSource = new DOMSource(xmlDocument);\n\t\tString s = getOutputFolderName() + \"/\" + fileName;\n\t\tStreamResult streamResult = new StreamResult(new File(s));\n\t\ttransformer.transform(domSource, streamResult);\n\n\t}",
"@Override\r\n public void setModel(String model) {\n }",
"void updateModel() {\n updateModel(false);\n }",
"void setSettings(ControlsSettings settings);",
"public void edit() throws Exception {\n super.assertModelsExist();\n for (Model model : models) {\n gotoEditPage(model);\n populateValues(model);\n save(model);\n handlePostErrors();\n }\n }",
"void setModel(Model m);",
"public void update( final T model )\n\t{\n\t\tthis.dao.save( model );\n\t}",
"private void saveSettings() {\n SettingsModel settingsModel = new SettingsModel();\n settingsModel.saveState(NJNPStartActivity.this);\n\n File NJNPSettingsDirectory = new File(NJNPConstants.DIRECTORY_PATH + NJNPConstants.SETTINGS_FOLDER);\n NJNPSettingsDirectory.mkdirs();\n\n File file = new File(NJNPSettingsDirectory.getPath(), NJNPConstants.SETTINGS_FILE_NAME);\n\n FileOutputStream fos = null;\n ObjectOutputStream os = null;\n try {\n fos = new FileOutputStream(file);\n os = new ObjectOutputStream(fos);\n os.writeObject(settingsModel);\n os.close();\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"File not found exception when saving settings: \" + e.getMessage());\n } catch (IOException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"IO Exception when saving settings: \" + e.getMessage());\n }\n\n }",
"protected void saveValues() {\n dataModel.persist();\n }",
"public void saveXMLConfig() {\n\n\t\t// Get the Carma namespace\n\t\tNamespace ns = Namespace.getNamespace(\"Carma\",\n\t\t\t\t\"http://www.mmarray.org\");\n\n\t\t// Update NameServers. First remove them all, then add since\n\t\t// the number of them could have changed\n\t\tElement nameserversElement = _root.getChild(\"pdbi\", ns)\n\t\t .getChild(\"nameServers\", ns);\n\t\tnameserversElement.removeChildren(\"nameServer\", ns);\n\n\t\t// Set the new children one at a time\n\t\tfor (int i = 0; i < _nameservers.size(); i++) {\n\t\t\t nameserversElement.addContent( new Element(\"nameServer\", ns).\n\t\t\t addContent(new Element(\"identifier\", ns).\n\t\t\t\t setText((String)_nameservers.get(i))));\n\t\t}\n\n\t\t// Update NameServerPorts. First remove them all, then add since\n\t\t// the number of them could have changed\n\t\tElement nameserverPortsElement = _root.getChild(\"pdbi\", ns)\n\t\t .getChild(\"nameServerPorts\", ns);\n\t\tnameserverPortsElement.removeChildren(\"nameServerPort\", ns);\n\n\t\t// Set the new children one at a time\n\t\tfor (int i = 0; i < _nameserverPorts.size(); i++) {\n\t\t\t nameserverPortsElement.addContent( new Element(\"nameServerPort\",\n\t\t\t ns).\n\t\t\t addContent(new Element(\"pidentifier\", ns).\n\t\t\t\t setText((String)_nameserverPorts.get(i))));\n\t\t}\n\n\t\t// Update obsRecord Event Channel Name\n\t\t_root.getChild(\"server\", ns)\n\t\t .getChild(\"obsRecordEventChannelName\", ns)\n\t\t .setText(_obsRecordEventChannelName);\n\t}",
"public void editConfig(DatabaseConfig databaseConfig) {\n }",
"@Override\r\n\tpublic void setModel() {\n\t}",
"void updateSettings(ModelSettings settings) {\n this.newItemPositionFirst = ModelSettings.NewItemPosition.FIRST.equals(settings.getNewItemPosition());\n }",
"@FXML\n\tprivate void onSaveBtn() {\n\t\tSettings settings = Settings.getSingleton();\n\t\t//Set rule setting\n\t\tif(ruleBox.getValue() == \"Standard\") {\n\t\t\tsettings.setRuleType(RuleType.STANDARD);\n\t\t} else {\n\t\t\tsettings.setRuleType(RuleType.CHALLENGE);\n\t\t}\n\t\t\n\t\t//Set number of walls setting\n\t\tsettings.setWalls(wallBox.getValue());\n\t\t//Set show label\n\t\tsettings.setShowLabels(indicateLabel.isSelected());\n\t\t//Set show ghost trails\n\t\t//settings.setShowTrail(ghostTrail.isSelected());\n\t\t\n\t\t//Set board height and width\n\t\tswitch(boardBox.getValue()) {\n\t\tcase \"7x7\":\n\t\t\tsettings.setBoardHeight(7);\n\t\t\tsettings.setBoardWidth(7);\t\t\t\n\t\t\tbreak;\n\t\tcase \"9x9\":\n\t\t\tsettings.setBoardHeight(9);\n\t\t\tsettings.setBoardWidth(9);\t\t\t\n\t\t\tbreak;\n\t\tcase \"11x11\":\n\t\t\tsettings.setBoardHeight(11);\n\t\t\tsettings.setBoardWidth(11);\t\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsettings.setBoardHeight(9);\n\t\t\t\tsettings.setBoardWidth(9);\n\t\t\t\tbreak;\n\t\t}\n\t\t//Set tile size\n\t\tsettings.setTileSize(tileBox.getValue());\n\t}",
"private void updateSettings() {\n Settings.System.putInt(getActivity().getContentResolver(),\n Settings.System.QS_COLUMNS_PORTRAIT, portColumnsValue);\n Settings.System.putInt(getActivity().getContentResolver(),\n Settings.System.QS_ROWS_PORTRAIT, portRowsValue);\n Settings.System.putInt(getActivity().getContentResolver(),\n Settings.System.QS_COLUMNS_LANDSCAPE, landColumnsValue);\n Settings.System.putInt(getActivity().getContentResolver(),\n Settings.System.QS_ROWS_LANDSCAPE, landRowsValue);\n }",
"protected void modelChanged() {\n // create a view hierarchy\n ViewFactory f = rootView.getViewFactory();\n Document doc = editor.getDocument();\n Element elem = doc.getDefaultRootElement();\n setView(f.create(elem));\n }",
"public void editSimulationParameters() {\r\n \t\tdialogFactory.getDialog(new SimulationPanel(model, model, model, this), \"Define Simulation Parameters\");\r\n \t}",
"void setElementValue(SetElementValue cmd);",
"@Test \n\tpublic void testUpdateSetting() throws Exception\n\t{\n\t}",
"@Test\n\t@Override\n\tpublic void testUpdateObjectOKXml() throws Exception {\n\t}",
"@FXML\n public void editSet(MouseEvent e) {\n AnchorPane root = null;\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/learn_update.fxml\"));\n try {\n root = loader.load();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n LearnUpdateController controller = loader.getController();\n controller.initData(txtTitle.getText(), rootController, learnController, apnLearn);\n rootController.setActivity(root);\n root.requestFocus();\n }",
"@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}",
"private void setModelToChanged() {\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"public void setValuesFromXML_local(Document dom) {\n\n\t}",
"public void editCoordinatesInConfiguration(int x, int y, int id) {\n Configuration configuration = dataModel.getConfiguration(id);\n Coordinates coordinates = dataModel.createCoords(x, y);\n dataModel.setCoordinatesToConfiguration(coordinates, configuration);\n }",
"boolean setSettings(Settings sm);",
"private void saveSettings() {\n \tLog.i(\"T4Y-Settings\", \"Save mobile settings\");\n \t\n \tmobileSettings.setAllowAutoSynchronization(autoSynchronizationCheckBox.isChecked());\n mobileSettings.setAllowAutoScan(autoScanCheckBox.isChecked());\n mobileSettings.setAllowAutoSMSNotification(autoSMSNotificationCheckBox.isChecked());\n \n \tmainApplication.setMobileSettings(mobileSettings);\n }",
"public void saveUserSettings(DataRecord data) throws ProcessManagerException {\r\n try {\r\n userSettings.update(data, processModel.getUserInfos().toRecordTemplate(\r\n currentRole, getLanguage(), false));\r\n userSettings.save();\r\n \r\n Workflow.getUserManager()\r\n .resetUserSettings(getUserId(), getComponentId());\r\n } catch (WorkflowException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_SAVE_USERSETTINGS\");\r\n }\r\n }",
"private void edit() {\n\n\t}",
"void xsetValue(org.apache.xmlbeans.XmlInt value);",
"@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}",
"@FXML private void doSave(ActionEvent event) {\n\t\tmodel.save();\n\t}",
"public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}",
"public void update(E model) {\n\t\tgetHibernateTemplate().update(model);\r\n\t}",
"public void savetoxml() throws FileNotFoundException, JAXBException {\n xml_methods.save(player);\n }",
"public void setSettings(Settings settings)\r\n\t{\r\n\t\tthis.settings = settings;\r\n\t}",
"public void editOperation() {\n\t\t\r\n\t}",
"public void setModel(OntModel model) {\n\t\tthis.model = model;\n\t}",
"private static void changeSettings() {\n\t\t\n\t\tfinal Settings sett = config;\n\t\t\n\t\tfinal JDialog settingsDialog = new JDialog(frame, \"Change settings\");\n\t\t\n\t\tsettingsDialog.getContentPane().setLayout(new BorderLayout());\n\t\tsettingsDialog.setPreferredSize(new Dimension(350,150));\n\t\t\n\t\tJPanel settings = new JPanel();\n\t\tsettings.setLayout(new GridLayout(3,2));\n\t\t\n\t\tJLabel lblDB = new JLabel(\"Update DB dynamically\");\n\t\tJRadioButton rbDB = new JRadioButton();\n\t\trbDB.setSelected(sett.isUpdateDB());\n\t\trbDB.addItemListener(new ItemListener(){\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setUpdateDB(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setUpdateDB(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\t\t\n\t\tJLabel lblGUI = new JLabel(\"Use Graphical User Interface\");\n\t\tJRadioButton rbGUI = new JRadioButton();\n\t\trbGUI.setSelected(sett.isGUI());\n\t\trbGUI.addItemListener(new ItemListener() {\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setGUI(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setGUI(false);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t});\n\t\t\n\t\tJLabel lblFile = new JLabel(\"Working file\");\n\t\tfinal JTextField tfFile = new JTextField(sett.getWorkingFile());\n\t\t\t\t\n\t\tsettings.add(lblDB);\n\t\tsettings.add(rbDB);\n\t\tsettings.add(lblGUI);\n\t\tsettings.add(rbGUI);\n\t\tsettings.add(lblFile);\n\t\tsettings.add(tfFile);\n\t\t\n\t\tJButton btnSave = new JButton(\"Save settings\");\n\t\tbtnSave.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(!saved) {\n\t\t \t\tint option = JOptionPane.showOptionDialog(frame,\n\t\t \t\t\t\t\"Updating the settings will reset the application\\nThere are unsaved changes\\nDo you want to save them now?\",\n\t\t \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n\t\t \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n\t\t \t\tswitch(option) {\n\t\t \t\tcase 0:\n\t\t \t\t\ttoggleSaved(portfolio.save(WORKING_FILE));\n\t\t \t\tdefault:\n\t\t \t\t\tbreak; \t \t\t\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsett.setWorkingFile(tfFile.getText());\n\t\t\t\t\n\t\t\t\tsett.save();\n\t\t\t\tconfig = new Settings(sett);\n\t\t\t\tsettingsDialog.dispose();\n\t\t\t\t\n\t\t\t\tif(!sett.isGUI()){\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\texit = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!sett.isUpdateDB()){\n\t\t\t\t\tportfolio.init(config.getWorkingFile());\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION);\n\t\t\t\t\tbtnRestore.setEnabled(true);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tportfolio.initDB();\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION+\" ** Linked to Database **\");\n\t\t\t\t\tbtnRestore.setEnabled(false);\n\t\t\t\t}\n\t\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\t\tsel.init(portfolio);\n\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsettingsDialog.add(settings, BorderLayout.CENTER);\n\t\tsettingsDialog.add(btnSave, BorderLayout.PAGE_END);\n\t\t\n\t\tsettingsDialog.pack();\n\t\tsettingsDialog.setVisible(true);\t\n\t}",
"private static void initSettings(TransferITModel model) {\n if (settingsfile.exists()) {\n try {\n ObjectInputStream objectInputStream = new ObjectInputStream(new FileInputStream(settingsfile));\n Object[] readObjects = new Object[6];\n for (int x = 0; x < readObjects.length; x++) {\n readObjects[x] = objectInputStream.readUnshared();\n if (readObjects[x] == null) {\n return;\n }\n }\n model.putAll((Properties) readObjects[0]);\n\n model.setHostHistory((HashSet<String>) readObjects[1]);\n\n model.setUsernameHistory((HashMap<String, String>) readObjects[2]);\n\n model.setPasswordHistory((HashMap<String, String>) readObjects[3]);\n\n model.setUsers((HashMap<String, String>) readObjects[4]);\n\n model.setUserRights((HashMap<String, Boolean>) readObjects[5]);\n\n\n\n } catch (IOException ex) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n model.addUser(\"anon\", \"anon\", false);\n }\n }",
"public void updateCurrentValues(AnyUriModel model) {\r\n this.model = model;\r\n resetValuesFromModel();\r\n }",
"@Override\r\n public String update(final String id, final String xmlData) throws ContentModelNotFoundException,\r\n OptimisticLockingException, SystemException, ReadonlyVersionException, MissingAttributeValueException,\r\n InvalidXmlException, InvalidContentException {\r\n \r\n setContentModel(id);\r\n final DateTime startTimestamp = getContentModel().getLastFedoraModificationDate();\r\n checkLatestVersion();\r\n \r\n // parse incomming XML\r\n final StaxParser sp = new StaxParser();\r\n // check optimistic locking criteria! and ID in root element?\r\n sp.addHandler(new OptimisticLockingHandler(getContentModel().getId(), Constants.CONTENT_MODEL_OBJECT_TYPE,\r\n getContentModel().getLastModificationDate()));\r\n // get name and description\r\n final ContentModelPropertiesHandler cmph = new ContentModelPropertiesHandler(sp);\r\n sp.addHandler(cmph);\r\n // get md-record definitions\r\n final MdRecordDefinitionHandler mrdh =\r\n new MdRecordDefinitionHandler(sp, \"/content-model/md-record-definitions\");\r\n sp.addHandler(mrdh);\r\n // get resource definitions\r\n final ResourceDefinitionHandler rdh = new ResourceDefinitionHandler(sp, \"/content-model/resource-definitions\");\r\n sp.addHandler(rdh);\r\n // get content-streams\r\n final ContentStreamsHandler csh = new ContentStreamsHandler(sp, \"/content-model/content-streams\");\r\n sp.addHandler(csh);\r\n \r\n try {\r\n sp.parse(xmlData);\r\n }\r\n catch (final WebserverSystemException e) {\r\n throw e;\r\n }\r\n catch (final MissingAttributeValueException e) {\r\n throw e;\r\n }\r\n catch (final InvalidXmlException e) {\r\n throw e;\r\n }\r\n catch (final InvalidContentException e) {\r\n throw e;\r\n }\r\n catch (final OptimisticLockingException e) {\r\n throw e;\r\n }\r\n catch (final Exception e) {\r\n XmlUtility.handleUnexpectedStaxParserException(null, e);\r\n }\r\n \r\n final String description = getContentModel().getDescription() != null ? getContentModel().getDescription() : \"\";\r\n \r\n if (!getContentModel().getTitle().equals(cmph.getProperties().getObjectProperties().getTitle())\r\n || !description.equals(cmph.getProperties().getObjectProperties().getDescription())) {\r\n // update DC (title, description)\r\n final Datastream dc = getContentModel().getDc();\r\n final StaxParser dcParser = new StaxParser();\r\n \r\n final TreeMap<String, StartElementWithText> updateElementsDc = new TreeMap<String, StartElementWithText>();\r\n \r\n updateElementsDc.put(Elements.ELEMENT_DC_TITLE, new StartElementWithText(Elements.ELEMENT_DC_TITLE,\r\n Constants.DC_NS_URI, Constants.DC_NS_PREFIX, cmph.getProperties().getObjectProperties().getTitle(),\r\n null));\r\n \r\n updateElementsDc.put(Elements.ELEMENT_DC_DESCRIPTION, new StartElementWithText(\r\n Elements.ELEMENT_DC_DESCRIPTION, Constants.DC_NS_URI, Constants.DC_NS_PREFIX, cmph\r\n .getProperties().getObjectProperties().getDescription(), null));\r\n \r\n final DcUpdateHandler dcUpdateHandler = new DcUpdateHandler(updateElementsDc, dcParser);\r\n \r\n dcParser.addHandler(dcUpdateHandler);\r\n final HashMap<String, String> extractPathes = new HashMap<String, String>();\r\n final MultipleExtractor me = new MultipleExtractor(extractPathes, dcParser);\r\n extractPathes.put(\"/dc\", null);\r\n dcParser.addHandler(me);\r\n final byte[] dcNewBytes;\r\n try {\r\n dcParser.parse(dc.getStream());\r\n final ByteArrayOutputStream dcUpdated = (ByteArrayOutputStream) me.getOutputStreams().get(\"dc\");\r\n dcNewBytes = dcUpdated.toByteArray();\r\n }\r\n catch (final Exception e) {\r\n throw new XmlParserSystemException(e);\r\n }\r\n final String dcNew;\r\n try {\r\n dcNew = new String(dcNewBytes, XmlUtility.CHARACTER_ENCODING);\r\n }\r\n catch (final UnsupportedEncodingException e) {\r\n throw new EncodingSystemException(e);\r\n }\r\n \r\n final Datastream newDs;\r\n try {\r\n newDs =\r\n new Datastream(\"DC\", getContentModel().getId(), dcNew.getBytes(XmlUtility.CHARACTER_ENCODING),\r\n MimeTypes.TEXT_XML);\r\n }\r\n catch (final UnsupportedEncodingException e) {\r\n throw new WebserverSystemException(e);\r\n }\r\n getContentModel().setDc(newDs);\r\n \r\n }\r\n \r\n final String sdexIdMidfix = getContentModel().getId().replaceAll(\":\", Constants.COLON_REPLACEMENT_PID) + '-';\r\n final String sdefIdPrefix = \"sdef:\" + sdexIdMidfix;\r\n // String sdepIdPrefix = \"sdep:\" + sdexIdMidfix;\r\n final Map<String, ResourceDefinitionCreate> resourceDefinitions = rdh.getResourceDefinitions();\r\n \r\n // update RELS-EXT\r\n // FIXME store operation names in ContentModel and remove and add\r\n // services in one pass or just remove if really gone\r\n \r\n // delete service entries which are in Fedora but not send\r\n final Map<String, List<StartElementWithChildElements>> deleteFromRelsExt =\r\n new HashMap<String, List<StartElementWithChildElements>>();\r\n final List<StartElementWithChildElements> deleteElementList = new ArrayList<StartElementWithChildElements>();\r\n \r\n for (final ResourceDefinitionCreate resourceDefinition : getContentModel().getResourceDefinitions().values()) {\r\n if (!resourceDefinitions.containsKey(resourceDefinition.getName())) {\r\n final StartElementWithChildElements element =\r\n new StartElementWithChildElements(\"hasService\", Constants.FEDORA_MODEL_NS_URI, null, null, null,\r\n null);\r\n element.addAttribute(new Attribute(\"resource\", Constants.RDF_NAMESPACE_URI, null, resourceDefinition\r\n .getFedoraId(getContentModel().getId())));\r\n deleteElementList.add(element);\r\n }\r\n }\r\n deleteFromRelsExt.put(\"/RDF/Description/hasService\", deleteElementList);\r\n final byte[] tmpRelsExt = Utility.updateRelsExt(null, deleteFromRelsExt, null, getContentModel(), null);\r\n \r\n // add services to RELS-EXT\r\n final List<StartElementWithChildElements> addToRelsExt = new ArrayList<StartElementWithChildElements>();\r\n for (final ResourceDefinitionCreate resourceDefinition : resourceDefinitions.values()) {\r\n // FIXME do update existing resource definitions\r\n if (!getContentModel().getResourceDefinitions().containsKey(resourceDefinition.getName())) {\r\n final StartElementWithChildElements hasServiceElement = new StartElementWithChildElements();\r\n hasServiceElement.setLocalName(\"hasService\");\r\n hasServiceElement.setPrefix(Constants.FEDORA_MODEL_NS_PREFIX);\r\n hasServiceElement.setNamespace(Constants.FEDORA_MODEL_NS_URI);\r\n final Attribute resource =\r\n new Attribute(\"resource\", Constants.RDF_NAMESPACE_URI, Constants.RDF_NAMESPACE_PREFIX,\r\n Constants.IDENTIFIER_PREFIX + sdefIdPrefix + resourceDefinition.getName());\r\n hasServiceElement.addAttribute(resource);\r\n addToRelsExt.add(hasServiceElement);\r\n }\r\n }\r\n \r\n // TODO remove services from RELS-EXT\r\n // (<hasService\r\n // rdf:resource=\"info:fedora/sdef:escidoc_9003-trans\"\r\n // xmlns=\"info:fedora/fedora-system:def/model#\"/>)\r\n getContentModel().setRelsExt(Utility.updateRelsExt(addToRelsExt, null, tmpRelsExt, getContentModel(), null));\r\n \r\n // Metadata Record Definitions\r\n final List<MdRecordDefinitionCreate> mdRecordDefinitions = mrdh.getMdRecordDefinitions();\r\n // update DS-COMPOSITE\r\n final Map<String, Object> valueMap = new HashMap<String, Object>();\r\n valueMap.put(\"MD_RECORDS\", mdRecordDefinitions);\r\n final String dsCompositeModelContent =\r\n ContentModelFoXmlProvider.getInstance().getContentModelDsComposite(valueMap);\r\n getContentModel().setDsCompositeModel(dsCompositeModelContent);\r\n // TODO create, delete, update *_XSD datastreams\r\n for (final MdRecordDefinitionCreate mdRecordDefinition : mdRecordDefinitions) {\r\n final String name = mdRecordDefinition.getName();\r\n final String xsdUrl = mdRecordDefinition.getSchemaHref();\r\n getContentModel().setOtherStream(\r\n name + \"_xsd\",\r\n new Datastream(name + \"_xsd\", getContentModel().getId(), xsdUrl,\r\n de.escidoc.core.common.business.fedora.Constants.STORAGE_EXTERNAL_MANAGED, MimeTypes.TEXT_XML));\r\n }\r\n \r\n // Resource Definitions\r\n // services are already added to RELS-EXT\r\n // TODO delete sdef+sdep\r\n // create service definitions and deployments or update xslt\r\n \r\n for (final ResourceDefinitionCreate resourceDefinition : resourceDefinitions.values()) {\r\n final String sdefId = sdefIdPrefix + resourceDefinition.getName();\r\n if (this.tripleStoreUtility.exists(sdefId)) {\r\n // check if href for xslt is changed\r\n // /cmm/content-model/escidoc:40013/resource-\\\r\n // definitions/resource-definition/trans/xslt\r\n if (resourceDefinition.getXsltHref().equalsIgnoreCase(\r\n \"/cmm/content-model/\" + getContentModel().getId() + \"/resource-definitions/resource-definition/\"\r\n + resourceDefinition.getName() + \"/xslt/content\")) {\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Do not update xslt.\");\r\n }\r\n }\r\n else {\r\n final ModifiyDatastreamPathParam path = new ModifiyDatastreamPathParam(sdefId, \"xslt\");\r\n final ModifyDatastreamQueryParam query = new ModifyDatastreamQueryParam();\r\n query.setDsLabel(\"Transformation instructions for operation '\" + resourceDefinition.getName()\r\n + \"'.\");\r\n query.setMimeType(MimeTypes.TEXT_XML);\r\n query.setDsLocation(resourceDefinition.getXsltHref());\r\n this.fedoraServiceClient.modifyDatastream(path, query, null);\r\n }\r\n }\r\n else {\r\n // create\r\n final String sdefFoxml = getSDefFoXML(resourceDefinition);\r\n final IngestPathParam path = new IngestPathParam();\r\n final IngestQueryParam query = new IngestQueryParam();\r\n this.fedoraServiceClient.ingest(path, query, sdefFoxml);\r\n final String sdepFoxml = getSDepFoXML(resourceDefinition);\r\n this.fedoraServiceClient.ingest(path, query, sdepFoxml);\r\n }\r\n }\r\n \r\n // Content Streams\r\n final List<ContentStreamCreate> contentStreams = csh.getContentStreams();\r\n setContentStreams(contentStreams);\r\n \r\n /*\r\n * \r\n */\r\n \r\n // check if modified\r\n final String updatedXmlData;\r\n final DateTime endTimestamp = getContentModel().getLastFedoraModificationDate();\r\n if (!startTimestamp.isEqual(endTimestamp) || getContentModel().isNewVersion()) {\r\n // object is modified\r\n getUtility().makeVersion(\"ContentModelHandler.update()\", null, getContentModel());\r\n getContentModel().persist();\r\n \r\n updatedXmlData = retrieve(getContentModel().getId());\r\n fireContentModelModified(getContentModel().getId(), updatedXmlData);\r\n }\r\n else {\r\n updatedXmlData = render();\r\n }\r\n \r\n return updatedXmlData;\r\n }",
"void applyChanges() {\n trainFunction.setAlias(txtAlias.getText());\n trainFunction.getConfiguration().setAddress(txtAddress.getValue());\n\n trainFunction.getConfiguration().setBit(selectBit.getSelected().orElse(null));\n }",
"@Override\n\tpublic void setModel(Object o) {\n\t\t\n\t}",
"public void saveModel() {\n\t}",
"public void saveChanges ()\n\t{\n\t\n\t\tAppContext.cartogramWizard.setAdvancedOptionsEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\n\t\tAppContext.cartogramWizard.setCreateGridLayer(\n\t\t\tmGridLayerCheckBox.isSelected());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString gridSizeString = mGridSizeTextField.getText();\n\t\t\tInteger gridSizeInt = new Integer(gridSizeString);\n\t\t\tAppContext.cartogramWizard.setDeformationGridSize(\n\t\t\t\tgridSizeInt.intValue());\n\t\t}\n\t\tcatch (NumberFormatException e1)\n\t\t{\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString gridSizeString = mCartogramGridSizeTextField.getText();\n\t\t\tInteger gridSizeInt = new Integer(gridSizeString);\n\t\t\tAppContext.cartogramWizard.setCartogramGridSizeInX(\n\t\t\t\tgridSizeInt.intValue());\n\t\t\tAppContext.cartogramWizard.setCartogramGridSizeInY(\n\t\t\t\tgridSizeInt.intValue());\n\t\t}\n\t\tcatch (NumberFormatException e2)\n\t\t{\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString diffusionGridSizeString = \n\t\t\t\t(String)mDiffusionGridMenu.getSelectedItem();\n\t\t\t\n\t\t\tInteger diffusionGridSizeInt = new Integer(diffusionGridSizeString);\n\t\t\t\n\t\t\tAppContext.cartogramWizard.setDiffusionGridSize(\n\t\t\t\tdiffusionGridSizeInt);\n\t\t}\n\t\tcatch (NumberFormatException e3)\n\t\t{\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString iterationsString = mDiffusionIterationsTextField.getText();\n\t\t\tInteger iterationsInt = new Integer(iterationsString);\n\t\t\tAppContext.cartogramWizard.setDiffusionIteratations(\n\t\t\t\titerationsInt.intValue());\n\t\t}\n\t\tcatch (NumberFormatException e4)\n\t\t{\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\n\t}",
"private void resetValuesFromModel() {\r\n addressType.setSelectedItem(model.getType());\r\n address.setText(model.getAddress());\r\n }",
"public void saveData(){\r\n file.executeAction(modelStore);\r\n }",
"int updateByPrimaryKey(MrpConfigSettingsEntity record);",
"private void setModel(IAnnotationModel model) {\n \t\tif (fModel != model) {\n \t\t\tif (fModel != null)\n \t\t\t\tfModel.removeAnnotationModelListener(this);\n \t\t\tfModel= model;\n \t\t\tif (fModel != null) {\n \t\t\t\ttry {\n \t\t\t\t\tfIsSettingModel= true;\n \t\t\t\t\tfModel.addAnnotationModelListener(this);\n \t\t\t\t} finally {\n \t\t\t\t\tfIsSettingModel= false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"void setEditore(String editore);",
"@Override\n\tpublic void notifySettingChanged() {\n\t}",
"public void setIndexEditAttributeValue() throws ServiceException {\r\n\t\t\tString index = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"index\");\r\n\t\t\tif(CommonUtils.isStringNotEmpty(index)){\r\n\t\t\t\tLong record = Integer.valueOf(index).longValue();\r\n\t\t\t\twsrdModel.setIndex(record);\r\n\t\t\t\tUiAirplaneModel model = uiAirplaneModel.getAirplaneList().get(Integer.valueOf(index));\r\n\t\t\t\t\r\n\t\t\t\tif(ObjectUtil.isListNotEmpty(model.getApNamesList())){\r\n\t\t\t\t\tfor(UiAirplaneModel val : model.getApNamesList()){\r\n\t\t\t\t\t\tval.setInputDisplayItem(false);\r\n\t\t\t\t\t\tval.setOutputDisplayItem(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tuiAirplaneModel.setSelectedEditGrp(showGroupsName(model));\r\n\t\t\t\tuiAirplaneModel.setApNamesList(model.getApNamesList());\r\n\t\t\t}else{\r\n\t\t\t\twsrdModel.setIndex(null);\r\n\t\t\t\tUiAirplaneModel model = uiAirplaneModel.getNewAirplane().get(0);\r\n\t\t\t\tloadAirPopup(model.getAirplaneNames());\r\n\t\t\t\tuiAirplaneModel.setSelectedGrp(showGroupsName(model));\r\n\t\t\t}\r\n\t\t\twsrdModel.setDuplicateErrorMsg(\"showPop1('AirplaneNamesPanel')\");\r\n\t\t}",
"public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"@Override\n\tpublic void settingsChanged(AbstractSettings settings) {\n\t}",
"public void apply() {\n // apply general settings\n if (generalModeKeepRadioButton.isSelected()) {\n settings.getGeneralSettings().setMode(Mode.KEEP);\n } else if (generalModeUpdateRadioButton.isSelected()) {\n settings.getGeneralSettings().setMode(Mode.UPDATE);\n } else if (generalModeReplaceRadioButton.isSelected()) {\n settings.getGeneralSettings().setMode(Mode.REPLACE);\n }\n\n settings.getGeneralSettings().getLevels().clear();\n if (generalLevelTypeCheckbox.isSelected()) {\n settings.getGeneralSettings().getLevels().add(Level.TYPE);\n }\n if (generalLevelMethodCheckbox.isSelected()) {\n settings.getGeneralSettings().getLevels().add(Level.METHOD);\n }\n if (generalLevelFieldCheckbox.isSelected()) {\n settings.getGeneralSettings().getLevels().add(Level.FIELD);\n }\n\n settings.getGeneralSettings().getVisibilities().clear();\n if (generalVisibilityPublicCheckbox.isSelected()) {\n settings.getGeneralSettings().getVisibilities().add(Visibility.PUBLIC);\n }\n if (generalVisibilityProtectedCheckbox.isSelected()) {\n settings.getGeneralSettings().getVisibilities().add(Visibility.PROTECTED);\n }\n if (generalVisibilityDefaultCheckbox.isSelected()) {\n settings.getGeneralSettings().getVisibilities().add(Visibility.DEFAULT);\n }\n if (generalVisibilityPrivateCheckbox.isSelected()) {\n settings.getGeneralSettings().getVisibilities().add(Visibility.PRIVATE);\n }\n\n settings.getGeneralSettings().setOverriddenMethods(generalOtherOverriddenMethodsCheckbox.isSelected());\n settings.getGeneralSettings().setSplittedClassName(generalOtherSplittedClassName.isSelected());\n\n // apply templates settings\n settings.getTemplateSettings().setClassTemplates(classTemplatesTable.getSettings());\n settings.getTemplateSettings().setConstructorTemplates(constructorTemplatesTable.getSettings());\n settings.getTemplateSettings().setMethodTemplates(methodTemplatesTable.getSettings());\n settings.getTemplateSettings().setFieldTemplates(fieldTemplatesTable.getSettings());\n }",
"public void _setModel(T model) {\n _model = model;\n }",
"public void setDataModel(DataModel dataModel) {\n\t\tif (dm != null) {\n\t\t\tdm.removeSelectionChangeListener(this); \n\t\t\t// move listening from old DataModel to new one.\n\t\t}\n\t\tdm = dataModel;\n\t\tif (dm != null) {\n\t\t\tdm.addSelectionChangeListener(this);\n\t\t}\n\t\trowNumbersModel.setDataModel(dm);\n\t\trebuildFormElements();\n\t}",
"void changeSetting(int idx) {\n currentIdx = idx;\n }",
"private void editKnowledge(EditView editView) {\n\n if (!checkIfKnowledgeBaseLoaded()) {\n return;\n }\n\n try {\n URL editUrl = getClass().getResource(\"/fxml/Edit.fxml\");\n Context.getInstance().setCurrentEditView(editView);\n\n AnchorPane editViewPane = FXMLLoader.load(editUrl);\n BorderPane border = MainFrame.getRoot();\n\n border.setCenter(editViewPane);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public boolean update(ModelObject obj);",
"public void saveUserSettings() {\n\t}",
"void setDataModelFactory (DataModelFactory factory);",
"@FXML\n private void saveSettings()\n {\n boolean changes = false;\n String newUsername = changeUsernameField.getText();\n\n if (checkChangeUsernameValidity(newUsername) && checkUsername(newUsername, changeUsernameErrorLabel)) {\n changeUsername(newUsername);\n changeUsernameField.setPromptText(newUsername);\n updateProfileLabels();\n changes = true;\n }\n if (bufferImage != null)\n {\n controllerComponents.getAccount().setProfilePicture(bufferImage);\n updateProfilePictures();\n changes = true;\n }\n bufferImage = null;\n if (changes)\n {\n saveFeedbackLabel.setText(\"Changes saved.\");\n } else\n {\n saveFeedbackLabel.setText(\"You have not made any changes.\");\n }\n }",
"public void setSettings(final String settings);",
"public void updateModel()\n {\n if (beanModel instanceof EnterTillPayrollPayOutBeanModel)\n {\n EnterTillPayrollPayOutBeanModel model = (EnterTillPayrollPayOutBeanModel) beanModel;\n model.setAmount(amountField.getText());\n model.setSelectedReasonCode(reasonCodeField.getSelectedIndex());\n model.setPaidTo(paidToField.getText());\n model.setEmployeeID(employeeIDField.getText());\n model.setAddressLine(0, addressLine1Field.getText());\n model.setAddressLine(1, addressLine2Field.getText());\n model.setAddressLine(2, addressLine3Field.getText());\n model.setSelectedApprovalCodeIndex(approvalCodeField.getSelectedIndex());\n model.setComment(commentField.getText());\n }\n }",
"public void ustaw(){\n\t driver.initialize(this);\n\t driver.edit(new DodajSerwisDTO());\n\t }",
"public void registerModification (int type) {\n final boolean forceUpdate = true;\r\n\r\n ConfigFile topFileConfig = (ConfigFile)getConfigs().get(ConfigGroup.TOP_MODEL_FILE);\r\n // In case of spurious events ignore them (possible?)\r\n if (!topFileConfig.isUserSpecified())\r\n return;\r\n\r\n // Update the run directory whenever the top file is updated\r\n ConfigFile runDirConfig = (ConfigFile)getConfigs().get(ConfigGroup.RUN_DIR);\r\n if (forceUpdate/* || !runDirConfig.isUserSpecified()*/)\r\n runDirConfig.setValue(topFileConfig.getValueFile().getParent(), true);\r\n runDir.updateValue();\r\n\r\n // Update the top level model name\r\n ConfigString topNameConfig = (ConfigString)getConfigs().get(ConfigGroup.TOP_MODEL_NAME);\r\n if (forceUpdate/* || !topNameConfig.isUserSpecified()*/)\r\n {\r\n String name = topFileConfig.getValueFile().getName();\r\n name = name.indexOf('.') > 0 ? name.substring(0, name.lastIndexOf('.')):name;\r\n topNameConfig.setValue(name, true);\r\n }\r\n topName.updateValue();\r\n\r\n // Ensure that the model path contains the run directory\r\n ConfigList modelPathConfig = (ConfigList)getConfigs().get(ConfigGroup.MODEL_PATH);\r\n if (!modelPathConfig.getValue().contains(runDirConfig.getValue()))\r\n {\r\n // The contract for setValue on collections is to append\r\n modelPathConfig.addValue(Collections.singletonList(runDirConfig.getValue()), modelPathConfig.isUserSpecified());\r\n }\r\n modelPath.updateValue();\r\n\r\n // Update the model parameters\r\n ConfigMap paramsConfig = (ConfigMap)getConfigs().get(ConfigGroup.TOP_MODEL_PARAMS);\r\n if (forceUpdate/* || !paramsConfig.isUserSpecified()*/)\r\n {\r\n String[] modelPathArr = (String[])modelPathConfig.getValue().toArray(new String[0]);\r\n try {\r\n List<TopModelParamParse.ModelParameter> params = TopModelParamParse.parseModel(topNameConfig.getValue(), modelPathArr);\r\n Map map = new HashMap();\r\n for (ModelParameter mp : params)\r\n map.put(mp.getName(), mp.getValue());\r\n paramsConfig.setValue(map, false);\r\n } catch (TopModelParamParse.ModelAnalysisException exc) {\r\n Logging.dbg().severe(\"Error loading top model \" + exc);\r\n }\r\n }\r\n modelParams.updateValue();\r\n }",
"public void SaveButtonOnClickListener(View view) {\n String defaultObjectOwner = ((EditText)findViewById(R.id.settings_default_object_owner_field)).getText().toString().trim();\n presenter.SaveSettings(defaultObjectOwner);\n }",
"@Override\n\tpublic void setModel(TenantsEntity model) {\n\t\t\n\t}",
"public void updateSettings(){\n\n // load in configuration variables\n layout = plugin.getConfig().getString(\"layout\");\n enabled = plugin.getConfig().getBoolean(\"enabled\");\n minTemp = plugin.getConfig().getInt(\"min-temperature\");\n maxTemp = plugin.getConfig().getInt(\"max-temperature\");\n peakTime = plugin.getConfig().getInt(\"peak-time\");\n tickrate = plugin.getConfig().getLong(\"tickrate\");\n worldName = plugin.getConfig().getString(\"world-name\");\n\n }",
"public synchronized static void saveSettings() {\n try {\n ObjectOutputStream objectOutputStream = null;\n try {\n objectOutputStream = new ObjectOutputStream(new FileOutputStream(settingsfile));\n objectOutputStream.writeUnshared(transferITModel.getProperties());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getHostHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUsernameHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getPasswordHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUsers());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUserRights());\n objectOutputStream.reset();\n objectOutputStream.flush();\n } catch (IOException ex1) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex1);\n }\n objectOutputStream.close();\n } catch (IOException ex) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void updatePreferences() {\n\n Toast.makeText(this, \"enter your data\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(this, SipSettingsActivity.class));\n\n }",
"public abstract void modelStructureChanged();",
"@FXML\n private void settingsClick(){\n mainContainer.getChildren().setAll(settings);\n }",
"public void testEditValue() throws Exception, Throwable {\n System.out.println(\"editValue\");\n Builder builder = new Builder();\n Document document = builder.build(this.doc, \"\");\n String issueId = \"http://linkedgov.org/data/dwp-electricity-use/1/issue/1\";\n Document out = (Document) PrivateAccessor.invoke(TaskUpdater.class,\n \"editValue\",\n new Class[] {Document.class, String.class, String.class, String.class},\n new Object[] {(Document) document.copy(), issueId, \"99.50\", null});\n \n Model main = (Model) PrivateAccessor.invoke(TaskUpdater.class,\n \"getMainGraphFromDocument\",\n new Class[] {Document.class},\n new Object[] {out});\n assertEquals(2, main.size());\n }",
"private void editMode() {\n\t\t// Set the boolean to true to indicate in edit mode\n\t\teditableEditTexts();\n\t\thideEditDelete();\n\t\thideEmail();\n\t\tshowSaveAndAdd();\n\t\tshowThatEditable();\n\t}",
"@Override\r\n protected XMLSave createXMLSave() {\r\n prepareSave();\r\n return super.createXMLSave();\r\n }",
"@Test\n\t@Override\n\tpublic void testUpdateObjectWrongIdXml() throws Exception {\n\t}",
"public void updatePersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tserializeToFile(file);\n\t\tupdatePersistentSettings();\n\t}",
"public void save(){\n\t\tlowresModelManager.save();\n\t}",
"private static synchronized void changeXML(Path filepath, File conf, String name){\n try {\n // Строим объектную модель исходного XML файла\n DocumentBuilder db = DocumentBuilderFactory.newInstance()\n .newDocumentBuilder();\n Document doc = db.parse(conf);\n doc.normalize();\n \n NodeList appenders = doc.getElementsByTagName(\"appender\");\n for (int i = 0; i < appenders.getLength(); i++) {\n Node appender = appenders.item(i);\n //if this node is suitable appender, then change TextContext 'file'\n if (isMyRollingFileAppender(appender, name)) {\n NodeList childNodes = appender.getChildNodes();\n for (int j = 0; j < childNodes.getLength(); j++) {\n Node nextChild = childNodes.item(j);\n if (nextChild.getNodeName().equals(\"file\")) {\n nextChild.setTextContent(filepath.toString());\n break;\n }\n }\n break;\n }\n }\n // Write changes to XML-file\n Transformer transformer = TransformerFactory.newInstance()\n .newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(conf);\n transformer.transform(source, result);\n \n } catch (SAXException | IOException | ParserConfigurationException\n | TransformerConfigurationException ex) {\n System.out.println(\"Ошибка ввода-вывода при изменении XML-файла: \"+ex.getMessage());\n } catch (TransformerException ex) {\n System.out.println(\"Ошибка в траносформации XML \"+ex.getMessage());\n }\n }",
"@Override\n public void Update(Model model) {\n\n }",
"@Override\r\n\tpublic void setModelId(int modelId) {\n\r\n\t}",
"@Override\n\tpublic int update(Object model) {\n\t\treturn 0;\n\t}",
"@Override\n\tprotected void handleSettings(ClickEvent event) {\n\t\t\n\t}"
] | [
"0.58109444",
"0.56761324",
"0.560267",
"0.55858994",
"0.55332536",
"0.5443239",
"0.5426989",
"0.53850543",
"0.5371969",
"0.52728564",
"0.5250403",
"0.52395415",
"0.5211123",
"0.5210683",
"0.5208698",
"0.5207558",
"0.5170323",
"0.51373553",
"0.51369923",
"0.51088405",
"0.5103618",
"0.508907",
"0.5086259",
"0.50753033",
"0.5060713",
"0.5048051",
"0.5047969",
"0.50456023",
"0.5019578",
"0.5015092",
"0.5005089",
"0.49929747",
"0.4981992",
"0.49559304",
"0.4946071",
"0.49398112",
"0.49379134",
"0.49340326",
"0.493055",
"0.492503",
"0.49238822",
"0.4915233",
"0.49141645",
"0.49138877",
"0.48975497",
"0.4894496",
"0.48677275",
"0.48630854",
"0.48605007",
"0.48488352",
"0.4848521",
"0.48383453",
"0.48351318",
"0.48191786",
"0.48114732",
"0.480974",
"0.48080114",
"0.4805632",
"0.4802402",
"0.47865698",
"0.4785666",
"0.47796822",
"0.47737098",
"0.47707614",
"0.47650096",
"0.47607714",
"0.47607562",
"0.47557983",
"0.47513717",
"0.4748149",
"0.47400331",
"0.47347227",
"0.4730742",
"0.4730095",
"0.4721093",
"0.47194305",
"0.47056383",
"0.47031775",
"0.47024274",
"0.4700721",
"0.47003043",
"0.46988922",
"0.46963844",
"0.46923313",
"0.46891665",
"0.4686311",
"0.46734953",
"0.46645233",
"0.4660314",
"0.46561718",
"0.46527514",
"0.46525863",
"0.46478772",
"0.4645539",
"0.4645172",
"0.46433285",
"0.46389654",
"0.4638071",
"0.46290764",
"0.46210557"
] | 0.6457255 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. //GENBEGIN:initComponents | private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
jPanel3 = new javax.swing.JPanel();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
datePattern = new javax.swing.JComboBox();
timestampPattern = new javax.swing.JComboBox();
rootTag = new javax.swing.JTextField();
dateExample = new javax.swing.JLabel();
timestampExample = new javax.swing.JLabel();
noRootTag = new javax.swing.JCheckBox();
jPanel2 = new javax.swing.JPanel();
Ok = new javax.swing.JButton();
cancelButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("XML Settings");
getContentPane().setLayout(new java.awt.GridBagLayout());
jPanel3.setLayout(new java.awt.GridBagLayout());
jPanel1.setLayout(new java.awt.GridBagLayout());
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
jPanel3.add(jPanel1, gridBagConstraints);
jLabel1.setText("Date pattern ");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 5;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel3.add(jLabel1, gridBagConstraints);
jLabel2.setText("Timestamp pattern ");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 10;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel3.add(jLabel2, gridBagConstraints);
jLabel3.setText("Root tag");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 15;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel3.add(jLabel3, gridBagConstraints);
datePattern.setEditable(true);
datePattern.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Eintrag 1", "Eintrag 2", "Eintrag 3", "Eintrag 4" }));
datePattern.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
datePatternActionPerformed(evt);
}
});
datePattern.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
datePatternKeyTyped(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 10;
gridBagConstraints.gridy = 5;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel3.add(datePattern, gridBagConstraints);
timestampPattern.setEditable(true);
timestampPattern.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Eintrag 1", "Eintrag 2", "Eintrag 3", "Eintrag 4" }));
timestampPattern.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
timestampPatternActionPerformed(evt);
}
});
timestampPattern.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
timestampPatternKeyTyped(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 10;
gridBagConstraints.gridy = 10;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel3.add(timestampPattern, gridBagConstraints);
rootTag.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 10;
gridBagConstraints.gridy = 15;
gridBagConstraints.gridwidth = 20;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel3.add(rootTag, gridBagConstraints);
dateExample.setText("jLabel4");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 20;
gridBagConstraints.gridy = 5;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 8, 0, 8);
jPanel3.add(dateExample, gridBagConstraints);
timestampExample.setText("jLabel5");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 20;
gridBagConstraints.gridy = 10;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 8, 0, 8);
jPanel3.add(timestampExample, gridBagConstraints);
noRootTag.setText("no root tag");
noRootTag.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
noRootTagItemStateChanged(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 10;
gridBagConstraints.gridy = 20;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
jPanel3.add(noRootTag, gridBagConstraints);
jPanel2.setLayout(new java.awt.GridBagLayout());
Ok.setText("OK");
Ok.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
OkActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 2);
jPanel2.add(Ok, gridBagConstraints);
cancelButton.setText("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cancelButtonActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
jPanel2.add(cancelButton, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 10;
gridBagConstraints.gridy = 100;
gridBagConstraints.gridwidth = 20;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 2, 0);
jPanel3.add(jPanel2, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new java.awt.Insets(2, 4, 2, 4);
getContentPane().add(jPanel3, gridBagConstraints);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public Form() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public FormPemilihan() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public FormCompra() {\n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"public FormListRemarking() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public Interfax_D() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 630, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 431, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jLabel23 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n jLabel25 = new javax.swing.JLabel();\n jLabel26 = new javax.swing.JLabel();\n jLabel27 = new javax.swing.JLabel();\n jLabel28 = new javax.swing.JLabel();\n jLabel29 = new javax.swing.JLabel();\n axTextField = new javax.swing.JTextField();\n bxTextField = new javax.swing.JTextField();\n cxTextField = new javax.swing.JTextField();\n dxTextField = new javax.swing.JTextField();\n siTextField = new javax.swing.JTextField();\n diTextField = new javax.swing.JTextField();\n spTextField = new javax.swing.JTextField();\n bpTextField = new javax.swing.JTextField();\n pcTextField = new javax.swing.JTextField();\n ir1TextField = new javax.swing.JTextField();\n ir2TextField = new javax.swing.JTextField();\n marTextField = new javax.swing.JTextField();\n ivtpTextField = new javax.swing.JTextField();\n mbrTextField = new javax.swing.JTextField();\n ir3TextField = new javax.swing.JTextField();\n ir4TextField = new javax.swing.JTextField();\n xTextField = new javax.swing.JTextField();\n yTextField = new javax.swing.JTextField();\n aTextField = new javax.swing.JTextField();\n bTextField = new javax.swing.JTextField();\n pswTextField = new javax.swing.JTextField();\n imrTextField = new javax.swing.JTextField();\n sbusTextField = new javax.swing.JTextField();\n dbusTextField = new javax.swing.JTextField();\n systemABUSTextField = new javax.swing.JTextField();\n systemDBUSTextField = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n jSeparator2 = new javax.swing.JSeparator();\n jSeparator3 = new javax.swing.JSeparator();\n jSeparator4 = new javax.swing.JSeparator();\n okButton = new javax.swing.JButton();\n jLabel30 = new javax.swing.JLabel();\n jLabel31 = new javax.swing.JLabel();\n\n setTitle(\"RegisterDialog\");\n setFocusable(false);\n setMinimumSize(new java.awt.Dimension(688, 285));\n setName(\"\"); // NOI18N\n\n jLabel1.setText(\"AX\");\n\n jLabel2.setText(\"BX\");\n\n jLabel3.setText(\"CX\");\n\n jLabel4.setText(\"DX\");\n\n jLabel5.setText(\"SI\");\n\n jLabel6.setText(\"DI\");\n\n jLabel7.setText(\"SP\");\n\n jLabel8.setText(\"BP\");\n\n jLabel9.setText(\"PC\");\n\n jLabel10.setText(\"IR1\");\n\n jLabel11.setText(\"IR2\");\n\n jLabel12.setText(\"MAR\");\n\n jLabel13.setText(\"MBR\");\n\n jLabel14.setText(\"IVTP\");\n\n jLabel15.setText(\"IR3\");\n\n jLabel16.setText(\"IR4\");\n\n jLabel17.setText(\"X\");\n\n jLabel18.setText(\"Y\");\n\n jLabel19.setText(\"A\");\n\n jLabel20.setText(\"B\");\n\n jLabel21.setText(\"PSW\");\n\n jLabel22.setText(\"IMR\");\n\n jLabel23.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel23.setText(\"CPU\");\n\n jLabel24.setText(\"sBUS\");\n\n jLabel25.setText(\"dBUS\");\n\n jLabel26.setText(\"ABUS\");\n\n jLabel27.setText(\"DBUS\");\n\n jLabel28.setText(\"bin.\");\n\n jLabel29.setText(\"bin.\");\n\n axTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n axTextField.setText(\"0000\");\n axTextField.setFocusable(false);\n axTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n axTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n bxTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n bxTextField.setText(\"0000\");\n bxTextField.setFocusable(false);\n bxTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n bxTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n cxTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n cxTextField.setText(\"0000\");\n cxTextField.setFocusable(false);\n cxTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n cxTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n dxTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n dxTextField.setText(\"0000\");\n dxTextField.setFocusable(false);\n dxTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n dxTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n siTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n siTextField.setText(\"0000\");\n siTextField.setFocusable(false);\n siTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n siTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n diTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n diTextField.setText(\"0000\");\n diTextField.setFocusable(false);\n diTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n diTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n spTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n spTextField.setText(\"0000\");\n spTextField.setFocusable(false);\n spTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n spTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n bpTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n bpTextField.setText(\"0000\");\n bpTextField.setFocusable(false);\n bpTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n bpTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n pcTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n pcTextField.setText(\"0000\");\n pcTextField.setFocusable(false);\n pcTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n pcTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ir1TextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ir1TextField.setText(\"0000\");\n ir1TextField.setFocusable(false);\n ir1TextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ir1TextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ir2TextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ir2TextField.setText(\"0000\");\n ir2TextField.setFocusable(false);\n ir2TextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ir2TextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n marTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n marTextField.setText(\"0000\");\n marTextField.setFocusable(false);\n marTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n marTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ivtpTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ivtpTextField.setText(\"0000\");\n ivtpTextField.setFocusable(false);\n ivtpTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ivtpTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n mbrTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n mbrTextField.setText(\"0000\");\n mbrTextField.setFocusable(false);\n mbrTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n mbrTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ir3TextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ir3TextField.setText(\"0000\");\n ir3TextField.setFocusable(false);\n ir3TextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ir3TextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ir4TextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ir4TextField.setText(\"0000\");\n ir4TextField.setFocusable(false);\n ir4TextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ir4TextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n xTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n xTextField.setText(\"0000\");\n xTextField.setFocusable(false);\n xTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n xTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n yTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n yTextField.setText(\"0000\");\n yTextField.setFocusable(false);\n yTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n yTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n aTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n aTextField.setText(\"0000\");\n aTextField.setFocusable(false);\n aTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n aTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n bTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n bTextField.setText(\"0000\");\n bTextField.setFocusable(false);\n bTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n bTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n pswTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n pswTextField.setText(\"0000000000000000\");\n pswTextField.setFocusable(false);\n pswTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n pswTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n imrTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n imrTextField.setText(\"0000\");\n imrTextField.setFocusable(false);\n imrTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n imrTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n sbusTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n sbusTextField.setText(\"0000\");\n sbusTextField.setFocusable(false);\n sbusTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n sbusTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n dbusTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n dbusTextField.setText(\"0000\");\n dbusTextField.setFocusable(false);\n dbusTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n dbusTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n systemABUSTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n systemABUSTextField.setText(\"0000\");\n systemABUSTextField.setFocusable(false);\n systemABUSTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n systemABUSTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n systemDBUSTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n systemDBUSTextField.setText(\"0000\");\n systemDBUSTextField.setFocusable(false);\n systemDBUSTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n systemDBUSTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonActionPerformed(evt);\n }\n });\n\n jLabel30.setFont(new java.awt.Font(\"Tahoma\", 0, 14));\n jLabel30.setText(\"interne \\nmagistrale\");\n\n jLabel31.setFont(new java.awt.Font(\"Tahoma\", 0, 14));\n jLabel31.setText(\"sistemske magistrale\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addComponent(dxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(18, 18, 18)\n .addComponent(cxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(bxTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(axTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(siTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(diTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(spTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(bpTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel14)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(ivtpTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel12)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel13))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(pcTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(mbrTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(marTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(imrTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel21)\n .addGap(18, 18, 18)\n .addComponent(pswTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel29))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16)\n .addComponent(jLabel15)\n .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(ir1TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(ir2TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(ir3TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(ir4TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel19)\n .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 7, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(xTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(yTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(aTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(bTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)))\n .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel30)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)\n .addComponent(jLabel24)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(dbusTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(sbusTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel31)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel26)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(systemDBUSTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(systemABUSTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jSeparator4)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pcTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(marTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(mbrTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(siTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(diTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(spTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(bpTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel14)\n .addComponent(ivtpTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(axTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(bxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(cxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(dxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))))\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel21)\n .addComponent(pswTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel28))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel22)\n .addComponent(imrTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabel29)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel24)\n .addComponent(sbusTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel25)\n .addComponent(dbusTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel26)\n .addComponent(systemABUSTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel27)\n .addComponent(systemDBUSTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(okButton))\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17)\n .addComponent(xTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(yTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel19)\n .addComponent(aTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel20)\n .addComponent(bTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(ir1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(ir2TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel15)\n .addComponent(ir3TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16)\n .addComponent(ir4TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(71, 71, 71)\n .addComponent(jLabel23))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 760, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 446, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 731, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 638, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSeparator1 = new javax.swing.JSeparator();\n jLabel4 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jLabel27 = new javax.swing.JLabel();\n jLabel26 = new javax.swing.JLabel();\n jLabel25 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jSeparator2 = new javax.swing.JSeparator();\n jLabel16 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jTextField7 = new javax.swing.JTextField();\n jLabel18 = new javax.swing.JLabel();\n jPasswordField1 = new javax.swing.JPasswordField();\n jPasswordField2 = new javax.swing.JPasswordField();\n jButton4 = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jButton5 = new javax.swing.JButton();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jLabel21 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Settings\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jSeparator1.setForeground(new java.awt.Color(102, 0, 153));\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Tux TV 1280-1024.jpg\"))); // NOI18N\n\n jTextField1.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jButton2.setForeground(new java.awt.Color(51, 51, 255));\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Blue-young-icon.png\"))); // NOI18N\n jButton2.setText(\"Search\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 18));\n jLabel3.setForeground(new java.awt.Color(51, 51, 255));\n jLabel3.setText(\"<html>Logged In <font color=green>●\");\n\n jLabel2.setBackground(new java.awt.Color(204, 204, 255));\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 18));\n jLabel2.setOpaque(true);\n\n jButton1.setBackground(new java.awt.Color(255, 153, 153));\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 14));\n jButton1.setForeground(new java.awt.Color(255, 0, 0));\n jButton1.setText(\"Log Out\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel5.setForeground(new java.awt.Color(153, 0, 153));\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"<html><u>Home\");\n jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel5MouseClicked(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel7.setForeground(new java.awt.Color(153, 0, 153));\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel7.setText(\"<html><u>Friends\");\n jLabel7.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel7MouseClicked(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel8.setForeground(new java.awt.Color(153, 0, 153));\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel8.setText(\"<html><u>Messages\");\n jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel8MouseClicked(evt);\n }\n });\n\n jLabel9.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel9.setForeground(new java.awt.Color(153, 0, 153));\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel9.setText(\"<html><u>Notifications\");\n jLabel9.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel9MouseClicked(evt);\n }\n });\n\n jLabel10.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel10.setForeground(new java.awt.Color(153, 0, 153));\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel10.setText(\"<html><u>Profile\");\n jLabel10.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel10MouseClicked(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel6.setForeground(new java.awt.Color(0, 0, 255));\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel6.setText(\"<html><u>Settings\");\n\n jLabel14.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel14.setText(\"E-Mail:\");\n\n jLabel15.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel15.setText(\"Phone Number:\");\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel12.setText(\"Name:\");\n\n jLabel13.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel13.setText(\"UserName:\");\n\n jTextField3.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField3.setForeground(new java.awt.Color(102, 0, 102));\n jTextField3.setEnabled(false);\n\n jTextField2.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField2.setForeground(new java.awt.Color(102, 0, 102));\n jTextField2.setEnabled(false);\n\n jTextField4.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField4.setForeground(new java.awt.Color(102, 0, 102));\n jTextField4.setEnabled(false);\n\n jTextField5.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField5.setForeground(new java.awt.Color(102, 0, 102));\n jTextField5.setEnabled(false);\n\n jLabel27.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel27.setForeground(new java.awt.Color(0, 0, 255));\n jLabel27.setText(\"<html><u>Edit\");\n jLabel27.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel27MouseClicked(evt);\n }\n });\n\n jLabel26.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel26.setForeground(new java.awt.Color(0, 0, 255));\n jLabel26.setText(\"<html><u>Edit\");\n jLabel26.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel26MouseClicked(evt);\n }\n });\n\n jLabel25.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel25.setForeground(new java.awt.Color(0, 0, 255));\n jLabel25.setText(\"<html><u>Edit\");\n jLabel25.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel25MouseClicked(evt);\n }\n });\n\n jLabel24.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel24.setForeground(new java.awt.Color(0, 0, 255));\n jLabel24.setText(\"<html><u>Edit\");\n jLabel24.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel24MouseClicked(evt);\n }\n });\n\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 2, 18)); // NOI18N\n jButton3.setForeground(new java.awt.Color(0, 153, 51));\n jButton3.setText(\"Update Info\");\n jButton3.setEnabled(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jSeparator2.setForeground(jSeparator1.getForeground());\n\n jLabel16.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel16.setText(\"Old Password:\");\n\n jLabel17.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel17.setText(\"New Password:\");\n\n jTextField7.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField7.setForeground(new java.awt.Color(102, 0, 102));\n\n jLabel18.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel18.setText(\"ReType New Password:\");\n\n jButton4.setFont(new java.awt.Font(\"Tahoma\", 3, 18));\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/3.png\"))); // NOI18N\n jButton4.setText(\"Change\");\n jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel11.setForeground(new java.awt.Color(0, 0, 255));\n jLabel11.setText(\"<html><u>Wanna See Your Security Code?\");\n jLabel11.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel11MouseClicked(evt);\n }\n });\n\n jButton5.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jButton5.setForeground(new java.awt.Color(255, 51, 51));\n jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagesFCG7ZZJL.jpg\"))); // NOI18N\n jButton5.setText(\"Delete My Account\");\n jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n jLabel19.setFont(new java.awt.Font(\"Tahoma\", 0, 1));\n\n jLabel20.setFont(new java.awt.Font(\"Tahoma\", 0, 1));\n\n jLabel21.setFont(new java.awt.Font(\"Tahoma\", 0, 1));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 636, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 437, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(78, 78, 78)\n .addComponent(jLabel19)\n .addGap(40, 40, 40)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel9)\n .addGap(18, 18, 18)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(136, 136, 136)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel12)\n .addComponent(jLabel13))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField3)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(103, 103, 103)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel14)\n .addComponent(jLabel15))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField5)\n .addComponent(jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel27)\n .addComponent(jLabel26)\n .addComponent(jLabel25))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5))\n .addComponent(jLabel24))\n .addGap(2, 2, 2))\n .addGroup(layout.createSequentialGroup()\n .addGap(264, 264, 264)\n .addComponent(jButton3))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 636, Short.MAX_VALUE)))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPasswordField2)\n .addComponent(jPasswordField1)\n .addComponent(jTextField7, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(100, 100, 100)\n .addComponent(jLabel20)\n .addGap(73, 73, 73))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel21)\n .addGap(21, 21, 21))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(199, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 295, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(162, 162, 162))\n .addGroup(layout.createSequentialGroup()\n .addGap(271, 271, 271)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(261, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel19)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, Short.MAX_VALUE))\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel24))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel13)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel25))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel26)\n .addComponent(jLabel14))\n .addGap(12, 12, 12)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel27)\n .addComponent(jLabel15))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(51, 51, 51)\n .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel11))\n .addGroup(layout.createSequentialGroup()\n .addGap(59, 59, 59)\n .addComponent(jLabel21)))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 731, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 475, Short.MAX_VALUE)\n );\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public Magasin() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public soal2GUI() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public Soru1() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public ValidFrequencyForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jTextField8 = new javax.swing.JTextField();\n jTextField9 = new javax.swing.JTextField();\n jTextField10 = new javax.swing.JTextField();\n jTextField11 = new javax.swing.JTextField();\n jTextField12 = new javax.swing.JTextField();\n jTextField13 = new javax.swing.JTextField();\n jTextField14 = new javax.swing.JTextField();\n jTextField16 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton1 = new javax.swing.JButton();\n jLabel18 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jFormattedTextField1 = new javax.swing.JFormattedTextField();\n jFormattedTextField2 = new javax.swing.JFormattedTextField();\n jFormattedTextField3 = new javax.swing.JFormattedTextField();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jButton4 = new javax.swing.JButton();\n jFormattedTextField4 = new javax.swing.JFormattedTextField();\n jLabel23 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Personal Profile\");\n\n jLabel1.setFont(new java.awt.Font(\"Lucida Grande\", 1, 24)); // NOI18N\n jLabel1.setText(\"Personal Information\");\n\n jLabel2.setText(\"Name\");\n\n jLabel3.setText(\"Address\");\n\n jLabel4.setText(\"Date of Birth\");\n jLabel4.setToolTipText(\"\");\n\n jLabel5.setText(\"Contact\");\n\n jLabel6.setText(\"Fax Number\");\n\n jLabel7.setText(\"Email\");\n\n jLabel8.setText(\"SSN\");\n\n jLabel9.setText(\"Medical Record No\");\n\n jLabel10.setText(\"Health Plan No\");\n\n jLabel11.setText(\"Bank Acc No\");\n\n jLabel12.setText(\"License No\");\n\n jLabel13.setText(\"Vehicle Identifiers\");\n\n jLabel14.setText(\"Device Identifiers\");\n jLabel14.setToolTipText(\"\");\n\n jLabel15.setText(\"LinkedIn\");\n\n jLabel16.setText(\"IP Address\");\n\n jLabel17.setText(\"Identifier\");\n\n jButton2.setText(\"Submit\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jTextArea1.setBounds(new java.awt.Rectangle(0, 0, 240, 120));\n jScrollPane1.setViewportView(jTextArea1);\n\n jButton1.setText(\"Clear\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel18.setText(\"Image\");\n\n jButton3.setText(\"Upload\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jFormattedTextField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT))));\n\n try {\n jFormattedTextField2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"###-###-####\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n\n try {\n jFormattedTextField3.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"###-##-####\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n\n jLabel22.setText(\"Biometrics\");\n\n jButton4.setText(\"Upload\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n try {\n jFormattedTextField4.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"###.###.###.###\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel21)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel22))\n .addComponent(jLabel18)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel8)\n .addComponent(jLabel9)\n .addComponent(jLabel10)\n .addComponent(jLabel11)\n .addComponent(jLabel12)\n .addComponent(jLabel13)\n .addComponent(jLabel14)\n .addComponent(jLabel15)\n .addComponent(jLabel16)\n .addComponent(jLabel17))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1)\n .addComponent(jTextField2)\n .addComponent(jFormattedTextField1)\n .addComponent(jFormattedTextField2)\n .addComponent(jTextField5)\n .addComponent(jTextField6)\n .addComponent(jFormattedTextField3)\n .addComponent(jTextField8)\n .addComponent(jTextField9)\n .addComponent(jTextField10)\n .addComponent(jTextField11)\n .addComponent(jTextField12)\n .addComponent(jTextField13)\n .addComponent(jTextField14)\n .addComponent(jFormattedTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)\n .addComponent(jTextField16))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)\n .addComponent(jLabel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel20))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel24)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(146, 146, 146)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1))\n .addGroup(layout.createSequentialGroup()\n .addGap(423, 423, 423)\n .addComponent(jLabel1)))\n .addContainerGap(566, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jLabel1)\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jFormattedTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10)\n .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11)\n .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel12)\n .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel13)\n .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel14)\n .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel15)\n .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16)\n .addComponent(jFormattedTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel17)\n .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jScrollPane1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(jButton3)\n .addComponent(jLabel20))\n .addGap(7, 7, 7)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel22)\n .addComponent(jButton4)\n .addComponent(jLabel24))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel21)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton1))\n .addContainerGap(18, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public HW3() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public PatientRegForm() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n formKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n formKeyReleased(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public p0() {\n initComponents();\n }",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 394, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 278, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jTextField1 = new javax.swing.JTextField();\r\n jButton1 = new javax.swing.JButton();\r\n jTextField2 = new javax.swing.JTextField();\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n jLabel5 = new javax.swing.JLabel();\r\n jLabel6 = new javax.swing.JLabel();\r\n jLabel7 = new javax.swing.JLabel();\r\n jTextField3 = new javax.swing.JTextField();\r\n jTextField4 = new javax.swing.JTextField();\r\n jTextField5 = new javax.swing.JTextField();\r\n jTextField6 = new javax.swing.JTextField();\r\n jTextField7 = new javax.swing.JTextField();\r\n jTextField8 = new javax.swing.JTextField();\r\n jButton2 = new javax.swing.JButton();\r\n jButton3 = new javax.swing.JButton();\r\n jButton4 = new javax.swing.JButton();\r\n lbhora = new javax.swing.JLabel();\r\n jButton5 = new javax.swing.JButton();\r\n jLabel8 = new javax.swing.JLabel();\r\n jButton6 = new javax.swing.JButton();\r\n jLabel9 = new javax.swing.JLabel();\r\n jMenuBar1 = new javax.swing.JMenuBar();\r\n jMenu1 = new javax.swing.JMenu();\r\n jMenuItem4 = new javax.swing.JMenuItem();\r\n jMenuItem5 = new javax.swing.JMenuItem();\r\n jMenu2 = new javax.swing.JMenu();\r\n jMenuItem9 = new javax.swing.JMenuItem();\r\n jMenuItem10 = new javax.swing.JMenuItem();\r\n jMenuItem11 = new javax.swing.JMenuItem();\r\n jMenuItem13 = new javax.swing.JMenuItem();\r\n jMenuItem14 = new javax.swing.JMenuItem();\r\n jMenu3 = new javax.swing.JMenu();\r\n jMenuItem15 = new javax.swing.JMenuItem();\r\n jMenuItem16 = new javax.swing.JMenuItem();\r\n jMenuItem17 = new javax.swing.JMenuItem();\r\n jMenu4 = new javax.swing.JMenu();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jTextField1.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField1ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 12, 490, 30));\r\n\r\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/search-icon-60x60.png\"))); // NOI18N\r\n jButton1.setBorderPainted(false);\r\n jButton1.setContentAreaFilled(false);\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 0, -1, -1));\r\n\r\n jTextField2.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField2ActionPerformed(evt);\r\n }\r\n });\r\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField2KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField2, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 80, 340, 30));\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel1.setText(\"NOMBRE\");\r\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 90, 72, -1));\r\n\r\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel2.setText(\"DOMICILIO\");\r\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 150, 70, -1));\r\n\r\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel3.setText(\"CIUDAD\");\r\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 290, 60, -1));\r\n\r\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel4.setText(\"TELEFONO\");\r\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 240, 70, -1));\r\n\r\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel5.setText(\"C.P.\");\r\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 360, -1, -1));\r\n\r\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel6.setText(\"R.F.C.\");\r\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 190, -1, -1));\r\n\r\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel7.setText(\"E-MAIL\");\r\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 410, 50, -1));\r\n\r\n jTextField3.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField3.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField3ActionPerformed(evt);\r\n }\r\n });\r\n jTextField3.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField3KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 130, 510, 30));\r\n\r\n jTextField4.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField4.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField4ActionPerformed(evt);\r\n }\r\n });\r\n jTextField4.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField4KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField4, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 290, 250, 30));\r\n\r\n jTextField5.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField5.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField5ActionPerformed(evt);\r\n }\r\n });\r\n jTextField5.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField5KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField5, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 340, 250, 30));\r\n\r\n jTextField6.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField6.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField6ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField6, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 400, 250, 30));\r\n\r\n jTextField7.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField7.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField7ActionPerformed(evt);\r\n }\r\n });\r\n jTextField7.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField7KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField7, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 180, 250, 30));\r\n\r\n jTextField8.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField8.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField8ActionPerformed(evt);\r\n }\r\n });\r\n jTextField8.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField8KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField8, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 230, 250, 30));\r\n\r\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/add-icon.png\"))); // NOI18N\r\n jButton2.setBorderPainted(false);\r\n jButton2.setContentAreaFilled(false);\r\n jButton2.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton2ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 540, 70, 80));\r\n\r\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/edit_60_328965.png\"))); // NOI18N\r\n jButton3.setBorderPainted(false);\r\n jButton3.setContentAreaFilled(false);\r\n jButton3.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton3ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 550, 80, 70));\r\n\r\n jButton4.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/delete_action_discard.png\"))); // NOI18N\r\n jButton4.setBorderPainted(false);\r\n jButton4.setContentAreaFilled(false);\r\n jButton4.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton4ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 550, 70, 70));\r\n\r\n lbhora.setFont(new java.awt.Font(\"SansSerif\", 1, 24)); // NOI18N\r\n lbhora.setForeground(new java.awt.Color(240, 240, 240));\r\n lbhora.setText(\"00:00:00\");\r\n getContentPane().add(lbhora, new org.netbeans.lib.awtextra.AbsoluteConstraints(1180, 10, -1, 44));\r\n\r\n jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/logout.png\"))); // NOI18N\r\n jButton5.setBorder(null);\r\n jButton5.setBorderPainted(false);\r\n jButton5.setContentAreaFilled(false);\r\n jButton5.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton5ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(1280, 10, -1, -1));\r\n\r\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/giphy.gif\"))); // NOI18N\r\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(1110, 90, -1, -1));\r\n\r\n jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/CLEAN-AIR-ICON2.png\"))); // NOI18N\r\n jButton6.setBorderPainted(false);\r\n jButton6.setContentAreaFilled(false);\r\n jButton6.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton6ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton6, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 550, -1, -1));\r\n\r\n jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/fondo gris.jpg\"))); // NOI18N\r\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1350, 760));\r\n\r\n jMenuBar1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"PLANTAS\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 12))); // NOI18N\r\n\r\n jMenu1.setText(\"CAPTURA DE DATOS\");\r\n jMenu1.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n\r\n jMenuItem4.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem4.setText(\"CLIENTES\");\r\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem4ActionPerformed(evt);\r\n }\r\n });\r\n jMenu1.add(jMenuItem4);\r\n\r\n jMenuItem5.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem5.setText(\"USUARIOS\");\r\n jMenuItem5.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem5ActionPerformed(evt);\r\n }\r\n });\r\n jMenu1.add(jMenuItem5);\r\n\r\n jMenuBar1.add(jMenu1);\r\n\r\n jMenu2.setText(\"PRODUCTOS\");\r\n jMenu2.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n\r\n jMenuItem9.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem9.setText(\"COMPONENTES\");\r\n jMenuItem9.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem9ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem9);\r\n\r\n jMenuItem10.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem10.setText(\"MATERIALES\");\r\n jMenuItem10.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem10ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem10);\r\n\r\n jMenuItem11.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem11.setText(\"FORMULA\");\r\n jMenuItem11.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem11ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem11);\r\n\r\n jMenuItem13.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem13.setText(\"PROCESO\");\r\n jMenuItem13.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem13ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem13);\r\n\r\n jMenuItem14.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem14.setText(\"OPB\");\r\n jMenuItem14.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem14ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem14);\r\n\r\n jMenuBar1.add(jMenu2);\r\n\r\n jMenu3.setText(\"PRODUCCION\");\r\n jMenu3.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n\r\n jMenuItem15.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem15.setText(\"ORDENES\");\r\n jMenuItem15.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem15ActionPerformed(evt);\r\n }\r\n });\r\n jMenu3.add(jMenuItem15);\r\n\r\n jMenuItem16.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem16.setText(\"OPERACION\");\r\n jMenu3.add(jMenuItem16);\r\n\r\n jMenuItem17.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem17.setText(\"DATOS DESPUES DE LA OPERACION\");\r\n jMenu3.add(jMenuItem17);\r\n\r\n jMenuBar1.add(jMenu3);\r\n\r\n jMenu4.setText(\"REPORTES\");\r\n jMenu4.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuBar1.add(jMenu4);\r\n\r\n setJMenuBar(jMenuBar1);\r\n\r\n pack();\r\n }",
"private void initComponents() {//GEN-BEGIN:initComponents\n\n FormListener formListener = new FormListener();\n\n addMouseListener(formListener);\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n addSponsorLogoLabel = new javax.swing.JLabel();\n addSponsorLabel = new javax.swing.JLabel();\n addSponsorNameInput = new javax.swing.JTextField();\n addSponsorNameLabel = new javax.swing.JLabel();\n addSponsorFnameInput = new javax.swing.JTextField();\n addSponsorFnameLabel = new javax.swing.JLabel();\n addSponsorLnameInput = new javax.swing.JTextField();\n addSponsorLnameLabel = new javax.swing.JLabel();\n addSponsorPhoneInput = new javax.swing.JTextField();\n addSponsorPhoneLabel = new javax.swing.JLabel();\n addSponsorPledgeInput = new javax.swing.JTextField();\n addSponsorPledgeLabel = new javax.swing.JLabel();\n addSponsorBackButton = new javax.swing.JButton();\n addSponsorSubmitButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n addSponsorLogoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/eventplanner/horizonlogoTiny.png\"))); // NOI18N\n\n addSponsorLabel.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n addSponsorLabel.setText(\"Add Sponsor\");\n\n addSponsorNameLabel.setText(\"Name of Sponsor:\");\n\n addSponsorFnameLabel.setText(\"First Name:\");\n\n addSponsorLnameLabel.setText(\"Last Name:\");\n\n addSponsorPhoneLabel.setText(\"Phone:\");\n\n addSponsorPledgeLabel.setText(\"Pledge:\");\n\n addSponsorBackButton.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n addSponsorBackButton.setText(\"Back\");\n addSponsorBackButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addSponsorBackButtonActionPerformed(evt);\n }\n });\n\n addSponsorSubmitButton.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n addSponsorSubmitButton.setText(\"Submit\");\n addSponsorSubmitButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addSponsorSubmitButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(71, 71, 71)\n .addComponent(addSponsorLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(addSponsorLogoLabel))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(143, 143, 143)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(addSponsorNameLabel)\n .addComponent(addSponsorFnameLabel)\n .addComponent(addSponsorLnameLabel)\n .addComponent(addSponsorPhoneLabel)\n .addComponent(addSponsorPledgeLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(addSponsorNameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorFnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorLnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPhoneInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPledgeInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(152, 152, 152)\n .addComponent(addSponsorSubmitButton)\n .addGap(33, 33, 33)\n .addComponent(addSponsorBackButton)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(42, 42, 42))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(addSponsorLogoLabel))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(41, 41, 41)\n .addComponent(addSponsorLabel)\n .addGap(29, 29, 29)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorNameLabel)\n .addComponent(addSponsorNameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorFnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorFnameLabel))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(addSponsorLnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorLnameLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorPhoneInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPhoneLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorPledgeInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPledgeLabel))\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorSubmitButton)\n .addComponent(addSponsorBackButton))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n businessNameJLabel = new javax.swing.JLabel();\n enterpriseNameJLabel = new javax.swing.JLabel();\n networkNameJLabel = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n organizationNameJLabel = new javax.swing.JLabel();\n jSeparator2 = new javax.swing.JSeparator();\n titleJLabel = new javax.swing.JLabel();\n drugNameJLabel = new javax.swing.JLabel();\n drugNameJTextField = new javax.swing.JTextField();\n backJButton = new javax.swing.JButton();\n addToCatalogJButton = new javax.swing.JButton();\n statusJLabel = new javax.swing.JLabel();\n statusJTextField = new javax.swing.JTextField();\n\n businessNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 20)); // NOI18N\n businessNameJLabel.setText(\"Drug Tracking System\");\n\n enterpriseNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 20)); // NOI18N\n enterpriseNameJLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n enterpriseNameJLabel.setMinimumSize(new java.awt.Dimension(170, 24));\n enterpriseNameJLabel.setPreferredSize(new java.awt.Dimension(170, 24));\n\n networkNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 20)); // NOI18N\n networkNameJLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n networkNameJLabel.setMaximumSize(new java.awt.Dimension(195, 24));\n networkNameJLabel.setMinimumSize(new java.awt.Dimension(195, 24));\n networkNameJLabel.setPreferredSize(new java.awt.Dimension(195, 24));\n\n organizationNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 20)); // NOI18N\n organizationNameJLabel.setMinimumSize(new java.awt.Dimension(170, 24));\n organizationNameJLabel.setPreferredSize(new java.awt.Dimension(190, 24));\n\n titleJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 26)); // NOI18N\n titleJLabel.setText(\"Drug Details\");\n\n drugNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 0, 16)); // NOI18N\n drugNameJLabel.setText(\"Drug Name\");\n\n drugNameJTextField.setEditable(false);\n drugNameJTextField.setFont(new java.awt.Font(\"Times New Roman\", 0, 13)); // NOI18N\n drugNameJTextField.setMinimumSize(new java.awt.Dimension(120, 26));\n drugNameJTextField.setPreferredSize(new java.awt.Dimension(120, 26));\n\n backJButton.setFont(new java.awt.Font(\"Times New Roman\", 1, 15)); // NOI18N\n backJButton.setText(\"Back\");\n backJButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n backJButton.setPreferredSize(new java.awt.Dimension(80, 30));\n backJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButtonActionPerformed(evt);\n }\n });\n\n addToCatalogJButton.setFont(new java.awt.Font(\"Times New Roman\", 1, 15)); // NOI18N\n addToCatalogJButton.setText(\"Add To Catalog\");\n addToCatalogJButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n addToCatalogJButton.setEnabled(false);\n addToCatalogJButton.setPreferredSize(new java.awt.Dimension(80, 30));\n addToCatalogJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addToCatalogJButtonActionPerformed(evt);\n }\n });\n\n statusJLabel.setFont(new java.awt.Font(\"Times New Roman\", 0, 16)); // NOI18N\n statusJLabel.setText(\"Status\");\n\n statusJTextField.setEditable(false);\n statusJTextField.setFont(new java.awt.Font(\"Times New Roman\", 0, 13)); // NOI18N\n statusJTextField.setMinimumSize(new java.awt.Dimension(120, 26));\n statusJTextField.setPreferredSize(new java.awt.Dimension(120, 26));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jSeparator2)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(organizationNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(businessNameJLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(enterpriseNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 211, Short.MAX_VALUE)\n .addComponent(networkNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(273, 273, 273)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(titleJLabel))\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(statusJLabel)\n .addGap(18, 18, 18)\n .addComponent(statusJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(drugNameJLabel)\n .addGap(18, 18, 18)\n .addComponent(drugNameJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(backJButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(addToCatalogJButton, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(311, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(businessNameJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(enterpriseNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(networkNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(organizationNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(titleJLabel)\n .addGap(75, 75, 75)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(drugNameJLabel)\n .addComponent(drugNameJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(statusJLabel)\n .addComponent(statusJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(backJButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addToCatalogJButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(201, Short.MAX_VALUE))\n );\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ScheduleForm() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \r\n private void initComponents() {\r\n \r\n setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createLineBorder(Color.black), javax.swing.BorderFactory.createBevelBorder(BevelBorder.LOWERED)));\r\n \r\n setEnabled(false);\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\r\n this.setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 396, Short.MAX_VALUE));\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 324, Short.MAX_VALUE));\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \n private void initComponents() {\n\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n mouseClickedHandler(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n mouseExitedHandler(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n mouseEnteredHandler(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public intrebarea() {\n initComponents();\n }"
] | [
"0.7393088",
"0.7393088",
"0.7393088",
"0.7352474",
"0.7332488",
"0.73308676",
"0.7295957",
"0.7267518",
"0.72273046",
"0.72161627",
"0.7160379",
"0.71560824",
"0.7151832",
"0.71421707",
"0.7137452",
"0.7133948",
"0.7120324",
"0.7120062",
"0.71157074",
"0.71115243",
"0.7089322",
"0.7088895",
"0.70651454",
"0.7058715",
"0.70340484",
"0.7031334",
"0.70241183",
"0.7023073",
"0.7019024",
"0.7013034",
"0.70061463",
"0.6966644",
"0.69623893",
"0.6959665",
"0.6959251",
"0.6959251",
"0.6958742",
"0.695337",
"0.6953146",
"0.69418335",
"0.6935513",
"0.69319904",
"0.69310623",
"0.69295734",
"0.6927169",
"0.69246554",
"0.69193244",
"0.6917069",
"0.691618",
"0.6911954",
"0.6911954",
"0.6911954",
"0.69090873",
"0.6907113",
"0.6900428",
"0.68977445",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68962014",
"0.68959945",
"0.6892309",
"0.68882644",
"0.68882644",
"0.68882644",
"0.68882644",
"0.68882644",
"0.68882644",
"0.68882644",
"0.68882644",
"0.68882644",
"0.6887651",
"0.6885166",
"0.6872858",
"0.6872717",
"0.686986",
"0.6864066",
"0.6861363",
"0.6857519",
"0.68535316",
"0.68498087",
"0.68476814",
"0.68465066",
"0.68411946",
"0.68402016",
"0.6839009",
"0.6832324",
"0.6829333",
"0.6827806",
"0.6819443",
"0.6816743",
"0.6814938"
] | 0.0 | -1 |
Returns the comment identifier. | public String getCommentId() {
return commentId.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getCommentId();",
"public int getCommentId();",
"public Integer getCommentId() {\n return commentId;\n }",
"public Integer getCommentId() {\n return commentId;\n }",
"java.lang.String getLegacyCommentId();",
"public Long getCommentId() {\n return commentId;\n }",
"com.google.protobuf.ByteString\n getCommentIdBytes();",
"public Integer getBookCommentId() {\n return bookCommentId;\n }",
"public String getComment() {\n Object ref = comment_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n comment_ = s;\n }\n return s;\n }\n }",
"public String getComment() {\n Object ref = comment_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n comment_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public final String getComment() {\n return comment;\n }",
"public String getComment() {\n\t\treturn comment;\n\t}",
"public String getComment() {\n\t\treturn comment;\n\t}",
"public String getComment() {\r\n\t\treturn comment;\r\n\t}",
"String getComment();",
"String getComment();",
"com.google.protobuf.ByteString\n getLegacyCommentIdBytes();",
"public Integer getAcCommentsId() {\n return acCommentsId;\n }",
"public String getComment() {\n return comment ;\n }",
"public String get_comment() throws Exception {\n\t\treturn this.comment;\n\t}",
"public String getComment() {\n\t\tif (comment != null)\n\t\t\treturn ProteomeXchangeFilev2_1.COM + TAB\n\t\t\t// + \"comment\" + TAB\n\t\t\t\t\t+ comment;\n\t\treturn null;\n\t}",
"public String getComment() {\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getComment() \" );\n Via via=(Via)sipHeader;\n return via.getComment();\n }",
"public java.lang.String getComment() {\r\n return comment;\r\n }",
"public java.lang.String getComment() {\n return comment;\n }",
"public java.lang.String getComment() {\n return comment;\n }",
"public java.lang.String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public abstract char getCommentChar();",
"public String getComment()\n {\n return comment;\n }",
"public String getCommentText() {\r\n\r\n\t\treturn commentText;\r\n\t}",
"public String getComment() {\n return this.comment;\n }",
"public String getComment() {\n \t\t\t\t\t\t\t\t\treturn null;\n \t\t\t\t\t\t\t\t}",
"String getComment() {\n final StringBuilder sb = new StringBuilder();\n sb.append(indent(1)).append(\"/**\").append(EOL);\n sb.append(indent(1)).append(\" * \").append(\"{@code\").append(EOL);\n\n // Unwrapped so that you can search through the descriptor\n // file for a message and not have to worry about line breaks\n final String ws = formatString; // wrapText(formatString, 70);\n\n final String[] sa = ws.split(EOL);\n for (final String s : sa) {\n sb.append(indent(1)).append(\" * \").append(s).append(EOL);\n }\n\n sb.append(indent(1)).append(\" * \").append(\"}\").append(EOL);\n sb.append(indent(1)).append(\" */\").append(EOL);\n return sb.toString();\n }",
"public ST getComment() { \r\n\t\tST retVal = this.getTypedField(48, 0);\r\n\t\treturn retVal;\r\n }",
"String getComment() {\n//\t\t\tm1();\n\t\t\treturn \"small\";\n\t\t}",
"public com.google.protobuf.ByteString\n getCommentBytes() {\n Object ref = comment_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n comment_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getComment();",
"public String getComment();",
"public String getComment();",
"public String getComment();",
"public String getComment();",
"public String getComment();",
"public String getCommentText() {\n\t return this.commentText;\n\t}",
"public String getComment() throws SQLException {\n\t\tloadFromDB();\n\t\treturn rev_comment;\n\t}",
"public com.google.protobuf.ByteString\n getCommentBytes() {\n Object ref = comment_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n comment_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"java.lang.String getIdentifier();",
"public String getFileComment()\r\n {\r\n return sFileComment;\r\n }",
"public String getIdentifier()\n\t{\n\t\treturn mIdentifier;\n\t}",
"public int getIdentifier()\n {\n return identifier;\n }",
"public String getIdentifier() {\r\n\t\treturn this.identifier;\r\n\t}",
"public String getIdentifier()\n {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getjComment() {\n return jComment;\n }",
"public String getIdentifier() {\n\t\treturn identifier;\n\t}",
"public String getIdentifier() {\n return identifier;\n }",
"public int getIdentifier();",
"public String getIdentifier() {\n/* 222 */ return getValue(\"identifier\");\n/* */ }",
"int getIdentifier();",
"String getCommentStringValue(Object comment);",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"public int getDisableComment() {\n return disableComment_;\n }",
"@Override\r\n public final Integer getIdentifier() {\r\n return getIdent();\r\n }",
"public String getComment(){\n return comment;\n }",
"@Override\r\n\tpublic Comment getCommentById(long idComment) {\n\t\treturn null;\r\n\t}",
"@Accessor(qualifier = \"commentCharacter\", type = Accessor.Type.GETTER)\n\tpublic Character getCommentCharacter()\n\t{\n\t\tfinal Character value = getPersistenceContext().getPropertyValue(COMMENTCHARACTER);\n\t\treturn value != null ? value : Character.valueOf('#');\n\t}",
"public String getComment(){\n return this.comment;\n }",
"@NonNull String identifier();",
"@Nullable\n public String getIdentifier()\n {\n return identifier;\n }",
"@NotNull\n public String getIdentifier() {\n return this.identifier;\n }",
"public Optional<String> getComment() {\n\t\treturn Optional.ofNullable(_comment);\n\t}",
"public Comment() {\n\t\tthis._id = UUID.randomUUID();\n\t\tthis.timestamp = System.currentTimeMillis();\n\t}",
"public String getIdentifierString();",
"public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n identifier_ = s;\n }\n return s;\n }\n }",
"@NonNull\n public String getIdentifier() {\n return mProto.id;\n }",
"public String getIdentifier();",
"public String getIdentifier();",
"public String getComment(int commentType, Address address);",
"public ST getPsl48_Comment() { \r\n\t\tST retVal = this.getTypedField(48, 0);\r\n\t\treturn retVal;\r\n }",
"public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n identifier_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getDisableComment() {\n return instance.getDisableComment();\n }",
"public String id() {\n return definition.getString(ID);\n }"
] | [
"0.8502466",
"0.7804902",
"0.7642719",
"0.7642719",
"0.7590102",
"0.7512871",
"0.7428961",
"0.6782861",
"0.6745473",
"0.67218834",
"0.6720088",
"0.6716095",
"0.6716095",
"0.66888297",
"0.6660752",
"0.6660752",
"0.6655467",
"0.66409963",
"0.66382617",
"0.6619963",
"0.6565634",
"0.65252817",
"0.6513326",
"0.65077055",
"0.65077055",
"0.65077055",
"0.6506359",
"0.6506359",
"0.6506359",
"0.6506359",
"0.6506359",
"0.6506359",
"0.6506359",
"0.64750534",
"0.6453626",
"0.64497924",
"0.63938355",
"0.6387305",
"0.6350478",
"0.6346859",
"0.6335766",
"0.6324675",
"0.63052255",
"0.63052255",
"0.63052255",
"0.63052255",
"0.63052255",
"0.63052255",
"0.6301961",
"0.62938",
"0.62933415",
"0.62814087",
"0.62704664",
"0.6253254",
"0.6212779",
"0.62113863",
"0.6198625",
"0.6169233",
"0.6169233",
"0.6169233",
"0.6169233",
"0.6169233",
"0.6169233",
"0.6169233",
"0.6169233",
"0.6162383",
"0.6151523",
"0.6141206",
"0.6139459",
"0.61344343",
"0.6133825",
"0.610608",
"0.6100962",
"0.6100962",
"0.6100962",
"0.6100962",
"0.6100962",
"0.6100962",
"0.6100962",
"0.60983056",
"0.6096369",
"0.60948896",
"0.6092512",
"0.6091032",
"0.6069558",
"0.60574526",
"0.60543084",
"0.6051694",
"0.60409373",
"0.60373634",
"0.6032982",
"0.60308194",
"0.602791",
"0.6014713",
"0.6014713",
"0.60110873",
"0.6009178",
"0.599087",
"0.59850353",
"0.59727556"
] | 0.8234515 | 1 |
Returns the issue identifier string. | public String getIssueIdOrKeyString() {
return issueIdOrKey.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@UML(identifier=\"issueIdentification\", obligation=OPTIONAL, specification=ISO_19115)\n String getIssueIdentification();",
"public String issue() {\n return mIssue;\n }",
"String getIssue();",
"String getIssueName();",
"@Schema(description = \"The ID of the issue this worklog is for.\")\n public String getIssueId() {\n return issueId;\n }",
"public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n identifier_ = s;\n }\n return s;\n }\n }",
"String getIssueDetail();",
"@NonNull String identifier();",
"public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n identifier_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getIssueNumber() {\r\n return issueNumber;\r\n }",
"public String toString()\n\t{\treturn \"Issue\" ;\n\t}",
"public String getIdentifierString();",
"public String getIssueID(String filename, String extensionSymbol) {\n\t\tif (filename == null) {\n\n\t\t\treturn null;\n\n\t\t}\n\t\treturn filename.split(extensionSymbol)[1];\n\t}",
"public String getStringIdentifier() { return \"\"; }",
"java.lang.String getIdentifier();",
"String getIssueURI();",
"public String idToString() {\r\n StringBuffer buffer = new StringBuffer();\r\n buffer.append(\"IQ id(\");\r\n buffer.append(importQueueId);\r\n buffer.append(\").\");\r\n return buffer.toString();\r\n }",
"public String getIssueStatusName(int issueId)\n {\n return getIssueStatusName(issueId,\"\");\n }",
"@ApiModelProperty(value = \"The ID of the issue.\")\n public String getId() {\n return id;\n }",
"public java.lang.Object getIssueTypeID() {\n return issueTypeID;\n }",
"java.lang.String getMessageInfoID();",
"public String getIdAsString(String key) {\n Object obj = ids.get(key);\n if (obj == null) {\n return \"\";\n }\n return String.valueOf(obj);\n }",
"java.lang.String getMessageId();",
"String getNotificationID();",
"private String getConflictId(org.apache.maven.artifact.Artifact artifact) {\n StringBuilder buffer = new StringBuilder(128);\n buffer.append(artifact.getGroupId());\n buffer.append(':').append(artifact.getArtifactId());\n if (artifact.getArtifactHandler() != null) {\n buffer.append(':').append(artifact.getArtifactHandler().getExtension());\n }\n else {\n buffer.append(':').append(artifact.getType());\n }\n if (artifact.hasClassifier()) {\n buffer.append(':').append(artifact.getClassifier());\n }\n return buffer.toString();\n }",
"public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}",
"@Nullable\n public String getIdentifier()\n {\n return identifier;\n }",
"public com.google.protobuf.ByteString\n getIdentifierBytes() {\n java.lang.Object ref = identifier_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n identifier_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"@ApiModelProperty(value = \"deprecated (only for backwards compatibility)\")\n public Long getIssueId() {\n return issueId;\n }",
"public String getIdentifier() {\n/* 222 */ return getValue(\"identifier\");\n/* */ }",
"public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }",
"private String getIdentificationString() {\n\t\tif (clientController.client.visitorID.getVal() != null)\n\t\t\treturn clientController.client.visitorID.getVal().intern();\n\t\tif (clientController.client.logedInSubscriber.getVal() != null)\n\t\t\treturn clientController.client.logedInSubscriber.getVal().personalID;\n\t\treturn null;\n\t}",
"java.lang.String getStringId();",
"java.lang.String getStringId();",
"public String getIdentifier() {\n\t\treturn config.getUIName()+\"[\"+getIndex()+\"]\";\n\t}",
"com.google.protobuf.ByteString\n getIssueURIBytes();",
"public String getIdentifier() {\n return identifier;\n }",
"public java.lang.String getIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(IDENTIFIER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"@NotNull\n public String getIdentifier() {\n return this.identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier() {\r\n\t\treturn this.identifier;\r\n\t}",
"public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public java.lang.String getMessageInfoID() {\n java.lang.Object ref = messageInfoID_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n messageInfoID_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getIdentifier()\n {\n return identifier;\n }",
"public java.lang.String getId() {\n\t\t\t\t\tjava.lang.Object ref = id_;\n\t\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\t\tid_ = s;\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t\t}\n\t\t\t\t}",
"public String getIdentifier() {\n\t\treturn identifier;\n\t}",
"public String getId() {\n String id = name.replaceAll(\" \", \"-\");\n id = id.replaceAll(\"_\", \"-\");\n return id.toLowerCase();\n }",
"public String getId() {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"n=\");\n\t\tif ( nodeId != null ) {\n\t\t\tbuilder.append(nodeId);\n\t\t}\n\t\tbuilder.append(\";c=\");\n\t\tif ( created != null ) {\n\t\t\tbuilder.append(created);\n\t\t}\n\t\tbuilder.append(\";s=\");\n\t\tif ( sourceId != null ) {\n\t\t\tbuilder.append(sourceId);\n\t\t}\n\t\treturn DigestUtils.sha1Hex(builder.toString());\n\t}",
"public com.google.protobuf.ByteString\n getIdentifierBytes() {\n java.lang.Object ref = identifier_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n identifier_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@NonNull\n public String getIdentifier() {\n return mProto.id;\n }",
"public String getIdentifier();",
"public String getIdentifier();",
"public java.lang.String getMessageInfoID() {\n java.lang.Object ref = messageInfoID_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n messageInfoID_ = s;\n }\n return s;\n }\n }",
"org.hl7.fhir.Identifier getIdentifier();",
"public String getStringID() {\r\n\t\treturn uri.getPath();\r\n\t}",
"public String getProblemId() {\n return this.problemId;\n }",
"public StrColumn getIprId() {\n return delegate.getColumn(\"ipr_id\", DelegatingStrColumn::new);\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@NotNull\n public String getDisplayName() {\n // The ID is deliberately kept in a pretty user-readable format but we could\n // consider prepending layout/ on ids that don't have it (to make the display\n // more uniform) or ripping out all layout[-constraint] prefixes out and\n // instead prepending @ etc.\n return myId;\n }",
"public String getIdentification ()\n {\n return this.toString();\n }",
"String getId(IApiComponent component) throws CoreException {\n StringBuffer buffer = new StringBuffer();\n //$NON-NLS-1$\n buffer.append(component.getSymbolicName()).append(\" \").append('(').append(component.getVersion()).append(')');\n return buffer.toString();\n }",
"@XmlElement(name = \"identifier\", namespace = Namespaces.SRV)\n final String getIdentifier() {\n if (LEGACY_XML) {\n final ScopedName name = getScopedName();\n if (name != null) {\n return name.tip().toString();\n }\n }\n return null;\n }",
"public String getIdString() {\n return idString;\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getKey() {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (getLineNo() != null) {\r\n\t\t\tbuilder.append(getLineNo());\r\n\t\t} else if (this.getEntityId() != null) {\r\n\t\t\tbuilder.append(getEntityId());\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"long getMsgId();",
"java.lang.String getID();",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public StrColumn getJournalIssue() {\n return delegate.getColumn(\"journal_issue\", DelegatingStrColumn::new);\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n id_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n jobId_ = s;\n }\n return s;\n }\n }",
"private String getReporter(final Issue issue) {\r\n\t\tfinal BasicUser reporterUser = issue.getReporter();\r\n\r\n\t\tfinal String reporter = reporterUser != null ? reporterUser\r\n\t\t\t\t.getDisplayName() : NULL_REPORTER_USER;\r\n\t\treturn reporter;\r\n\t}",
"public java.lang.String getProjectId() {\n java.lang.Object ref = projectId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n projectId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"java.lang.String getArtifactId();"
] | [
"0.7666598",
"0.70898104",
"0.70806146",
"0.69269425",
"0.68688816",
"0.67759365",
"0.67165804",
"0.6716379",
"0.6710427",
"0.66901433",
"0.6626284",
"0.6598398",
"0.6374053",
"0.63491917",
"0.6286683",
"0.62169695",
"0.6203057",
"0.6183508",
"0.61620384",
"0.61101216",
"0.6092459",
"0.60485333",
"0.60302824",
"0.602193",
"0.6016736",
"0.6002929",
"0.5999501",
"0.59977084",
"0.5996655",
"0.5996655",
"0.5996655",
"0.5996655",
"0.5996655",
"0.5996655",
"0.5996655",
"0.59885025",
"0.5983498",
"0.5977632",
"0.5966586",
"0.5948068",
"0.5948068",
"0.59340924",
"0.5915705",
"0.5908507",
"0.58938974",
"0.58908993",
"0.588685",
"0.588685",
"0.588685",
"0.588685",
"0.588685",
"0.588685",
"0.588685",
"0.588685",
"0.58827174",
"0.58816385",
"0.5879885",
"0.5879838",
"0.5872714",
"0.5868272",
"0.58666044",
"0.58644634",
"0.5857064",
"0.58436334",
"0.58128405",
"0.58128405",
"0.5810115",
"0.58087504",
"0.5801179",
"0.57987833",
"0.5792605",
"0.5773874",
"0.5773874",
"0.577137",
"0.576756",
"0.5767056",
"0.57545125",
"0.5748117",
"0.5743654",
"0.5741588",
"0.5741588",
"0.5741588",
"0.5741588",
"0.5741588",
"0.5741588",
"0.5741588",
"0.5741588",
"0.57380784",
"0.57272875",
"0.57272875",
"0.5726061",
"0.5725559",
"0.5721731",
"0.5721265",
"0.57144654",
"0.5709754",
"0.5707667",
"0.56901485",
"0.5688107",
"0.56864136"
] | 0.77517384 | 0 |
/ double x1; double x2; double x3; double y1; double y2; double y3; double mod; mod = 3; x1 = 7.67; y1 = 3.65; Rectangulo r0 = new Rectangulo(x1, y1, mod); r0.printCoordenadas(); x2 = 5.32; y2 = 3.65; Rectangulo r1 = new Rectangulo(x2, y2, mod); r1.printCoordenadas(); y3 =0; Rectangulo r2 = new Rectangulo(x1, y3, mod); r2.printCoordenadas(); Rectangulo r3 = new Rectangulo(x2, y3, mod); r3.printCoordenadas(); System.out.println(""); r0.imprimeCoordenadasMod(); r1.imprimeCoordenadasMod(); r2.imprimeCoordenadasMod(); r3.imprimeCoordenadasMod(); | public static void main(String[] args) {
int pos = 3;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Rectangulo(){}",
"void imprimeValores(){\n System.out.println(\"coordenada del raton:(\"+pratonl[0][0]+\",\"+pratonl[0][1]+\")\");\n System.out.println(\"coordenada del queso:(\"+pquesol[0][0]+\",\"+pquesol[0][1]+\")\");\n imprimeCalculos();//imprime la diferencia entre las X y las Y de las coordenadas\n movimiento();\n }",
"public Rectangulo()\n\t{\n\t\tthis.alto = 0;\n\t\tthis.ancho = 0;\n\t\tthis.area = 0;\n\t}",
"private void posicionInicial(int ancho){\r\n posicionX = ancho;\r\n Random aleatroio = new Random();\r\n int desplazamiento = aleatroio.nextInt(150)+100;\r\n \r\n \r\n cazaTie = new Rectangle2D.Double(posicionX, desplazamiento, anchoEnemigo, alturaEnemigo);\r\n }",
"public static void main(String[] args) {\n Poligono p=new Rectangulo();\r\n //ESta tambien es correcta pero menos poderosa\r\n Rectangulo r=new Rectangulo();\r\n //Asignamos sus valores de base y altura\r\n r.b=4;\r\n r.h=3;\r\n //Imprimimos el resultado del calculo\r\n System.out.println(\"Tu resultado es \"+r.calcularArea());\r\n //Creamos un corculo\r\n Circulo c=new Circulo();\r\n c.r=4;\r\n System.out.println(\"El circulo \"+c.calcularArea());\r\n \r\n Triangulo t=new Triangulo();\r\n t.b=5;\r\n t.h=6;\r\n System.out.println(\"El area del riangulo es \"+t.calcularArea());\r\n \r\n \r\n }",
"public static void main(String[] args) {\n Rectangulo R = new Rectangulo();\n R.setAltura(4);\n R.setBase(6);\n R.getAltura();\n R.getBase();\n R.area();\n R.perimetro();\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Ingrese la base nueva del rectangulo: \");\n double base = scanner.nextDouble();\n R.setBase(base);\n System.out.println(\"Ingrese la altura nueva del rectangulo: \");\n double altura = scanner.nextDouble();\n R.setAltura(altura);\n System.out.println(\"Area con nuevos valores: \");\n R.area();\n Rectangulo R1 = new Rectangulo();\n System.out.println(\" \\nRectangulo 1 : \");\n R1.getBase();\n R1.getAltura();\n }",
"Punto(){\r\n x=0;\r\n y=0;\r\n }",
"public void darCoordenadasIniciales() \r\n\t{\t\r\n\t\tint coordenadasX = 0;\r\n\t\tint coordenadasY = 1;\r\n\t\tint orientacion = 2;\r\n\t\t\r\n\t\tfor (int x = 0; x<palabras.size();x++) \r\n\t\t{\r\n\t\t\tpalabras.get(x).get(0).setX(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasX)));\r\n\t\t\tpalabras.get(x).get(0).setY(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasY)));\r\n\t\t\tpalabras.get(x).get(0).setOrientacion(manejadorArchivos.getPalabras().get(orientacion));\r\n\t\t\t\r\n\t\t\t coordenadasX = coordenadasX +4;\r\n\t\t\t coordenadasY = coordenadasY + 4;\r\n\t\t\t orientacion = orientacion + 4;\r\n\t\t}\r\n\t}",
"public void dibujarSubformula(Nodo act, int x, int y, int x2, int y2, JPanel p, Color colorP) {\n\n Graphics2D g = (Graphics2D) p.getGraphics();\n\n if (colorP != null) {\n System.out.println(\"diferente de null\");\n color = colorP;\n }\n\n if (act == null) {\n return;\n } else {\n int ancho = act.valor.length();\n\n g.setColor(Color.BLACK);\n g.drawLine(x + 15, y + 3, x2 + 15, y2 + 30);\n\n System.out.println(color.toString());\n g.setColor(color);\n\n //el dibujo del circulo dependiendo la cantidad de letras y simbolos\n if (ancho >= 0 && ancho <= 2) {\n g.setColor(color);\n g.fillOval(x, y, 30, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) + 11, (y) + 20);\n\n System.out.println(\"0 y 2\");\n }\n\n if (ancho >= 3 && ancho <= 5) {\n g.setColor(color);\n g.fillOval(x, y, 40, 33);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) + 5, (y) + 20);\n System.out.println(\"3 y 8\");\n }\n if (ancho >= 6 && ancho <= 8) {\n g.setColor(color);\n g.fillOval(x - 18, y, 55, 30);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) - 11, (y) + 20);\n System.out.println(\"3 y 8\");\n }\n if (ancho >= 9 && ancho <= 13) {\n g.setColor(color);\n g.fillOval(x - 25, y + 3, 85, 30);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 30) + 12, (y) + 25);\n System.out.println(\"9 y 13\");\n }\n if (ancho >= 14 && ancho <= 18) {\n g.setColor(color);\n g.fillOval(x - 25, y + 10, 115, 30);\n System.out.println(\"14 y 18\");\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 20) + 12, (y) + 30);\n\n }\n if (ancho >= 19 && ancho <= 23) {\n g.setColor(color);\n g.fillOval(x - 52, y + 1, 132, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 50), (y) + 20);\n System.out.println(\"19 y 23\");\n\n }\n if (ancho >= 24 && ancho <= 27) {\n g.setColor(color);\n g.fillOval(x - 58, y + 10, 148, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 55), (y) + 30);\n System.out.println(\"24 y 27\");\n\n }\n\n if (act.getNodoIzq() != null) {\n dibujarSubformula(act.getNodoIzq(), (x) - (anchoX(act.altura())), y + 100, x, y, p, color);\n\n }\n if (act.getNodoDer() != null) {\n dibujarSubformula(act.getNodoDer(), (x) + (anchoX(act.altura())), y + 100, x, y, p, color);\n }\n\n }\n }",
"public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}",
"void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }",
"public Girasol(int x,int y){\n super(x,y);\n this.setComportamiento(\"Crea 20 soles cada 2 turnos\");\n this.setVidas(1);\n this.impresion=\"G(\"+this.getVidas()+\")\";\n this.setDaño(0);\n this.setFrecuencia(2);\n }",
"public static void imprimirCamino(int dimension, int nodoFuente, int nodoDestino){\n if (dimension < 1){\n System.out.println(\"Se ha llamado al programa con una dimension invalida\");\n System.out.println(\"Ejecute el programa con el parametro \\\"--help\\\" para obtener mas informacion acerca de como llamar correctamente al programa. \");\n }\n else{\n if (((0 > nodoFuente) || (nodoFuente >= (Math.pow(2,dimension)))) || ((0 > nodoDestino) || (nodoDestino >= (Math.pow(2,dimension))))){\n System.out.println(\"Se ha llamado al programa con valores de nodos fuente y/o destino incorrecto\");\n System.out.println(\"Ejecute el programa con el parametro \\\"--help\\\" para obtener mas informacion acerca de como llamar correctamente al programa. \");\n }\n else{\n // Los parametros ingresados son validos\n int nodoVecinoTemporario = nodoFuente;\n int dimensionActual = dimension;\n \n int xorEntreNodos = nodoFuente ^ nodoDestino; // xorEntreNodos mantiene el resultado de la operacion a nivel de bit XOR entre nodoFuente y nodoDestino\n \n System.out.printf(\"A continuacion se muestra el camino realizado por un paquete desde el nodo fuente %d al nodo destino %d\\n\", nodoFuente, nodoDestino);\n \n System.out.printf(\"[ %d \", nodoFuente);\n \n // Para determinar por cuales nodos viaja el mensaje para ir desde el nodo fuente al nodo destino trabajamos con la representacion binaria de los nodos.\n // Al realizar la operacion a nivel de bit XOR entre el nodo fuente y el nodo destino obtenemos un numero que en su representacion binaria indica los distintos movimientos que debemos hacer.\n // Asi, sea \"nm ... n3 n2 n1\" el valor de la operacion XOR con m el valor de la dimension del hypercubo, si nm (esto es el digito en la posicion m del resultado) es uno indica que en ese nivel el mensaje debe viajar al vecino en dicha dimension.\n // Si dicho digito es cero entonces en dicha dimension el mensaje no debe viajar a ningun vecino.\n \n // Asi lo que hacemos es iterar sobre las dimensiones, comenzando en la mayor.\n // Si en dicha dimension el resultado del XOR indica que se debe mover a un nodo vecino realizamos una operacion para que el nodo actual se convierta en el nodo vecino destino temporal.\n // Asi hasta llegar al nodo destino (si se llega al destino antes de recorrer todas las dimensiones) o hasta que se recorran todas las dimensiones.\n while (dimensionActual != 0){\n // Si el nodo aux es igual al nodo destino cortamos el bucle\n if (nodoVecinoTemporario == nodoDestino){\n break;\n }\n \n // Controlamos si en la dimension actual debemos viajar al nodo vecino.\n // Si el resultado del XOR entre los nodos en la dimension actual es uno entramos en el cuerpo de la condicion. (Esto lo controlamos con la siguiente sentencia: (xorEntreNodos & (int)(Math.pow(2, dimensionActual - 1))) != 0)\n if ((xorEntreNodos & (int)(Math.pow(2, dimensionActual - 1))) != 0){ \n // Significa que en esa dimension debo cambiar de nodo al otro nodo de la dimension. \n \n // La operacion de XOR a nivel de bits invierte los bits del primer operando en la posiciones donde el segundo operando tiene un uno.\n // Asi logramos que viaje al nodo vecino invirtiendo los bits.\n nodoVecinoTemporario = nodoVecinoTemporario ^ (int)(Math.pow(2, dimensionActual - 1)); \n \n System.out.printf(\"-> %d \", nodoVecinoTemporario);\n }\n dimensionActual--;\n \n }\n System.out.printf(\"]\");\n }\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner num = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Introduzca primero la X del primer punto y luego la Y\");\n\t\tPunto a = new Punto(num.nextInt(), num.nextInt());\n\t\t\n\t\tSystem.out.println(\"Introduzca primero la X del segundo punto y luego la Y\");\n\t\tPunto b = new Punto(num.nextInt(), num.nextInt());\n\t\t\n\t\tSystem.out.println(\"Introduzca primero la X del tercer punto y luego la Y\");\n\t\tPunto c = new Punto(num.nextInt(), num.nextInt());\n\t\t\n\t\tSystem.out.println(\"Introduzca primero la X del último punto y luego la Y\");\n\t\tPunto d = new Punto(num.nextInt(), num.nextInt());\n\t\t\n\t\tPunto [] puntosr = {a,b,c,d};\n\t\t\n\t\tRectangulo r1 = new Rectangulo();\n\t\tr1.setPuntos(puntosr);\n\t\t\n\t\tSystem.out.println(r1.Superficie());\n\t\t//Continuar expandiendo\n\t\t\n\t}",
"public Rectangle getRectangulo() {\n\t\treturn new Rectangle(\n\t\t\t\t(int)x -clanchura,\n\t\t\t\t(int)y - claltura,\n\t\t\t\tclanchura,\n\t\t\t\tclaltura\n\t\t\t);\n\t}",
"public void aggiornaPropulsori(){\n xPropulsore1=new int[]{xCord[0],xCord[0]};\n yPropulsore1=new int[]{yCord[0],yCord[0]+15}; \n xPropulsore2=new int[]{xCord[2],xCord[2]}; \n yPropulsore2=new int[]{yCord[2],yCord[2]+15};\n \n }",
"void imprimeCalculos(){\n int a,b;\n a=calculaX();\n b=calculaY();\n System.out.println(\"Valor de X=\"+a);\n System.out.println(\"Valor de Y=\"+b);\n if(a==0){\n proporcion=0;\n }else{\n proporcion=(b/a);\n System.out.println(\"Valor de proporcion es: \"+proporcion);\n }\n }",
"public static void main (String[] args)\r\n {\n Coordenada utm = new Coordenada(new Datum(6378388D, 6356911.94612795),\r\n\t\t\t 481742, 4770800, 700, (byte)29, true);\r\n //System.out.println(\"lon=\"+utm.getLon()+\" lat=\"+utm.getLat());\r\n //System.out.println(utm.getGrados(utm.getLon())+\"¦ \"+utm.getMinutos(utm.getLon())+\"' \"+utm.getSegundos(utm.getLon())+\"\\\" \"+utm.getGrados(utm.getLat())+\"¦ \"+utm.getMinutos(utm.getLat())+\"' \"+utm.getSegundos(utm.getLat())+\"\\\"\");\r\n @SuppressWarnings(\"unused\")\r\n Coordenada res;\r\n res = utm.CambioDeDatum(new Datum(6378137D, 6356752.31424518));\r\n\r\n //System.out.println(\"Coordenadas en Datum destino: X=\"+res.X+\" Y=\"+res.Y);\r\n //System.out.println(\"lon=\"+res.getLon()+\" lat=\"+res.getLat());\r\n //System.out.println(res.getGrados(res.getLon())+\"¦ \"+res.getMinutos(res.getLon())+\"' \"+res.getSegundos(res.getLon())+\"\\\" \"+res.getGrados(res.getLat())+\"¦ \"+res.getMinutos(res.getLat())+\"' \"+res.getSegundos(res.getLat())+\"\\\"\");\r\n\t\t\t\t \r\n }",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"public Rectangulo(int alto, int ancho) {\n\t\tthis.alto = alto;\n\t\tthis.ancho = ancho;\n\t\tthis.area = alto * ancho;\n\t\t\n\t\tthis.pos = new Punto();\n\t}",
"public void dirigirHaciaPunto(int x, int y){ \r\n\r\n\tint coordenadaXObjetivo;\r\n\tint coordenadaYObjetivo;\r\n\tint distanciaEnX;\r\n\tint distanciaEnY;\r\n\tint incrementoDesplazamiento = 1;\t\t\r\n\t\t\t\t\t\t\r\n\tcoordenadaXObjetivo = x;\t\r\n\tdistanciaEnX = coordenadaXObjetivo - this.x;\r\n\t\t\t\t\t\r\n\tcoordenadaYObjetivo = y;\t\r\n\tdistanciaEnY = coordenadaYObjetivo - this.y;\r\n\t\r\n\tif(distanciaEnX <= 0){\r\n\t\tif (distanciaEnX == 0){\r\n\t\t\tif(distanciaEnY < 0){\r\n\t\t\t\tthis.y -= incrementoDesplazamiento; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse{\r\n\t\t\tif(distanciaEnY <= 0){\r\n\t\t\t\tif(distanciaEnY == 0){\r\n\t\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\t\tthis.y -= incrementoDesplazamiento;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\telse{\r\n\t\tif(distanciaEnY <= 0){\r\n\t\t\tif(distanciaEnY == 0){\r\n\t\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse{\r\n\t\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\t\tthis.y -= incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse{\r\n\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t}\r\n\t}\r\n\t\r\n\tif((this.x >= x - incrementoDesplazamiento) && (this.x <= x + incrementoDesplazamiento) && \r\n\t\t\t(this.y >= y - incrementoDesplazamiento) && (this.y <= y + incrementoDesplazamiento)){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.entroAlCirculo = true;\r\n\t\t\r\n\t\t}\t\t\t\t\t\t\t\t\t\r\n\t}",
"private void imprimir() {\n\t\ttry {\n\t\t\tPrintWriter pr = new PrintWriter(super.salida);\n\t\t\tfor (Nodo nodo : this.solucion) {\n\t\t\t\tpr.println(nodo.getPosicionX() + \" \" + nodo.getPosicionY());\n\t\t\t}\n\t\t\tpr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void darCoordenadas() {\r\n\t\t\r\n\t\tfor(int x = 0; x<palabras.size(); x++) {\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"V\")) {\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaY++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"H\") ) {\r\n\t\t\t\t\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaX++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"static void testRectangle(Point a, Point b, Point c, Point d){\n Rectangle rect1 = new Rectangle(a,b,c,d);\n System.out.print(\"Perimeter of rectangle=\"+rect1.calculatePerimeter());\n System.out.printf(\"->%b\\n\", String.format(\"%.2f\", rect1.calculatePerimeter()).equals(\"16.00\"));\n System.out.print(\"Area of rectangle=\"+rect1.calculateArea());\n System.out.printf(\"->%b\\n\", String.format(\"%.2f\", rect1.calculateArea()).equals(\"16.00\"));\n System.out.println(rect1); //prints the return value from rect1.toString()\n }",
"public void controlla_collisioni() {\n\n for (int i = punti; i > 0; i--) {\n\n if ((i > 4) && (x[0] == x[i]) && (y[0] == y[i])) {\n in_gioco = false;\n }\n }\n\n if (y[0] >= ALTEZZA+85) { //devo aggungere +85 perche' l'area di gioco comincia dal punto 100,100\n in_gioco = false;\n }\n\n if (y[0] <= 100) {\n in_gioco = false;\n }\n\n if (x[0] >= LARGHEZZA+85) {\n in_gioco = false;\n }\n\n if (x[0] <= 100) {\n in_gioco = false;\n }\n }",
"public static Solide octaedre (){\n\t\tPoint a = new Point(-25, 0,-25);\r\n\t\tPoint b = new Point(-25, 0,25);\r\n\t\tPoint c = new Point(25, 0,-25);\r\n\t\tPoint d = new Point(25,0,25);\r\n\t\t// La hauteur d'une des 2 pyramide vaut longueur d'un cote * (1/ racine de 2)\r\n\t\tfloat hauteur = (float) (50/Math.sqrt(2));\r\n\t\t// on se sert de la hauteur pour donnee les coordonees des sommets manquant\r\n\t\tPoint e = new Point(0, hauteur,0);\r\n\t\tPoint f = new Point(0,-hauteur,0);\r\n\r\n\r\n\t\tArrayList<Point> po = new ArrayList<Point>();\r\n\t\tArrayList<Arete> ar = new ArrayList<Arete>();\r\n\t\tArrayList<Face> lf = new ArrayList<Face>();\r\n\t\t\r\n\t\tPoint[][] pts = new Point[][] {\r\n\t\t\t{a, b, e}, \r\n\t\t\t{a, f, b}, \r\n\t\t\t{a, e, c},\r\n\t\t\t{a, c, f}, \r\n\t\t\t{d, c, e}, \r\n\t\t\t{d, f, c}, \r\n\t\t\t{b, d, e},\r\n\t\t\t{b, f, d}\r\n\t\t};\r\n\t\t\r\n\t\tfor (int i = 0; i < 8; i++) {\r\n\t\t\tFace h = new Face(ar);\r\n\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t\t\t\tpo.add(pts[i][j]);\r\n\t\t\t}\r\n\t\t\th.face(po);\r\n\t\t\tpo.clear();\r\n\t\t\tlf.add(h);\r\n\t\t}\r\n\r\n\t\tSolide t= new Solide(lf);\r\n\t\treturn t;\r\n\t}",
"public void moverPelota(Rectangle2D limites, boolean colisionR1, boolean colisionR2) {\r\n x += nuevoX;\r\n y += nuevoY;\r\n\r\n \r\n\r\n if (colisionR1) {\r\n nuevoX = -nuevoX;\r\n x = 20;\r\n }\r\n if (colisionR2) {\r\n nuevoX = -nuevoX;\r\n x = 755;\r\n }\r\n\r\n if (x < limites.getMinX()) {\r\n score2++; //la puntuación del jugador2 aumenta en uno\r\n \r\n x = limites.getCenterX();\r\n y = limites.getCenterY();\r\n nuevoX = -nuevoX;\r\n }\r\n\r\n if (x + anchoRectangulo >= limites.getMaxX()) {\r\n score1++; //la puntuación del jugador1 aumenta en uno\r\n \r\n x = limites.getCenterX();\r\n y = limites.getCenterY();\r\n nuevoX = -nuevoX;\r\n }\r\n\r\n if (y < limites.getMinY()) {\r\n\r\n y = limites.getMinY();\r\n\r\n nuevoY = -nuevoY;\r\n }\r\n\r\n if (y + altoRectangulo >= limites.getMaxY()) {\r\n\r\n y = limites.getMaxY() - altoRectangulo;\r\n\r\n nuevoY = -nuevoY;\r\n }\r\n\r\n }",
"public static void main(String[] args) {\n\n Quadrat q1 = new Quadrat(5);\n Triangle t1 = new Triangle(2,3);\n Cercle c1 = new Cercle (2);\n Rectangle r1 = new Rectangle(2,2);\n\n\n System.out.print(q1.getArea()+\"\\n\");\n System.out.print(t1.getArea()+\"\\n\");\n System.out.print(c1.getArea()+\"\\n\");\n System.out.print(r1.getArea()+\"\\n\");\n\n Figura[] f = new Figura[4];\n f[0]=q1;\n f[1]=t1;\n f[2]= c1;\n f[3]=r1;\n\n\n System.out.println(\"Suma de àrees:\"+ Figures.sumaareas((f)));\n Figures.ordenar(f);\n for (int i = 0; i < f.length;i++)\n System.out.println(f[i]);\n\n\n\n\n\n\n }",
"int aDonde(int x,int y,int x1,int y1){\n \n int m;\n //revision si la posicion del queso es la misma que la del raton \n if(llegue(x,y,x1,y1)==1){\n System.out.println(\"llegue al queso\");\n // retrazo.stop();\n //GB=10; \n return 5;\n }else{\n if(x1==x){//movimiento horizontal en la misma fila \n //System.out.println(\"\");\n m=moverseY(y,y1);//si 0 a la izquierda 1 a la derecha \n \n if(m==0){\n System.out.println(\"el raton se tiene que mover hacia la Izquierda\");\n return 4;\n }else{\n System.out.println(\"el raton se tiene que mover hacia la Derecha\");\n return 2;\n }\n }else{\n if(x1<x){//movimiento hacia arriba\n System.out.println(\"el raton se tiene que mover hacia Arriba\");\n return 1;\n }else{//movimiento hacia abajo\n System.out.println(\"el raton se tiene que mover hacia Abajo\");\n return 3;\n }\n }//fin arriba y abajo\n } //fin if movimiento horizontal \n }",
"public Regras()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1100, 457, 1); \n prepare();\n if(MenuPrincipal.mundo == 1) //se o mundo anterior tiver sido MenuPrincipal\n som1 = MenuPrincipal.som2; //a música ficar com a mesma opção do mundo Menu Principal (a tocar ou sem som)}\n else if(MenuPrincipal.mundo == 3) //se o mundo anterior tiver sido MundoJogo\n som1 = MundoJogo.som3; //a música ficar com a mesma opção do mundo MundoJogo (a tocar ou sem som)\n imgsom2 = MenuPrincipal.imgsom1; //atualiza a imagem da coluna para ser igual à do mundo MenuPrincipal (mute/unmute)\n MenuPrincipal.mundo = 2; //atualizar 'mundo' para indicar que o mundo atual é o mundo Regras\n }",
"public int[] choisir(int[] coord)\r\n {\r\n int[] res = new int[3]; //tableau a rendre\r\n int x = coord[0];\r\n int y = coord[1]; //récupération des coordonnées\r\n int[] voisinage= new int[4]; //tableau qui regardera les cases adjacentes à la case cherchée\r\n voisinage[0] = getValHaut(x,y);\r\n voisinage[1] = getValDroite(x,y);\r\n voisinage[2] = getValBas(x,y);\r\n voisinage[3] = getValGauche(x,y);\r\n System.out.println(\"je choisis la case \"+x+\" \"+y+\"\");\r\n for(int i = 0; i<voisinage.length; i++ ) //parcours des possibilités si on joue sans créer d'opportunités adverses\r\n {\r\n if (Vision[x][y][i+1] == 0) //si il n'y a pas de trait déja tracé\r\n {\r\n if (voisinage[i] != 2) //si la case adjacente n'a pas déja deux traits dessinés\r\n {\r\n switch (i) //switch pour réagir selon la case a jouer\r\n {\r\n case 0:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n\r\n case 1:\r\n res[0]=x+1;\r\n res[1]=y;\r\n break;\r\n\r\n case 2:\r\n res[0]=x;\r\n res[1]=y+1;\r\n break;\r\n\r\n case 3:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n }\r\n //fin du switch sur i\r\n\r\n res[2]=i%2;\r\n return res;\r\n }\r\n //fin du si la case adjacente a déja 2 traits dessinés\r\n }\r\n //si il n'y a pas de trait déja tracé\r\n }\r\n //fin du for de parcours des possibilités de jouers sans créer d'opportunités adverses\r\n\r\n for(int i=0; i<voisinage.length ; i++ ) //Parcours des possibilités sans recherche d'opportunités\r\n {\r\n if (Vision[x][y][i+1] == 0) {\r\n switch (i) //switch pour réagir selon la case a jouer\r\n {\r\n case 0:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n\r\n case 1:\r\n res[0]=x+1;\r\n res[1]=y;\r\n break;\r\n\r\n case 2:\r\n res[0]=x;\r\n res[1]=y+1;\r\n break;\r\n\r\n case 3:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n }\r\n //fin du switch sur i\r\n\r\n res[2]=i%2;\r\n return res;\r\n }\r\n }\r\n //fin du parcours de possibilité sans recherche\r\n return tabVide;\r\n }",
"public void setInitialPosition()\n {\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.a2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.b2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.c2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.d2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.e2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.f2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.g2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.h2);\n //Se colocan los peones negros en la séptima fila\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.a7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.b7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.c7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.d7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.e7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.f7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.g7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.h7);\n //Se colocan las torres blancas en a1 y h1\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.a1);\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.h1);\n //Se colocan las torres negras en a8 y h9\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.a8);\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.h8);\n //Se colocan los caballos blancos en b1 y g1\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.b1);\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.g1);\n //Se colocan los caballos negros en b8 y g8\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.b8);\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.g8);\n //Se colocan los alfiles blancos en c1 y f1\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.c1);\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.f1);\n //Se colocan los alfiles negros en c8 y f8\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.c8);\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.f8);\n //Se coloca la dama blanca en d1\n putGenericPiece(GenericPiece.QUEEN,Colour.WHITE,Square.d1);\n //Se coloca la dama negra en d8\n putGenericPiece(GenericPiece.QUEEN,Colour.BLACK,Square.d8);\n //Se coloca el rey blanco en e1\n putGenericPiece(GenericPiece.KING,Colour.WHITE,Square.e1);\n //Se coloca el rey negro en e8\n putGenericPiece(GenericPiece.KING,Colour.BLACK,Square.e8);\n \n //Se permiten los enroques para ambos jugadores\n setCastlingShort(Colour.WHITE,true);\n setCastlingShort(Colour.BLACK,true);\n setCastlingLong(Colour.WHITE,true);\n setCastlingLong(Colour.BLACK,true);\n \n //Se da el turno a las blancas\n setTurn(Colour.WHITE);\n \n gamePositionsHash.clear();\n gamePositionsHash.put(zobristKey.getKey(), 1);\n }",
"public void resta(){\r\n\t\tSystem.out.println(\"Esta es la :\");\r\n\t\tSystem.out.println(this.getX() - this.getY());\r\n\t}",
"public double Baricentro() {\n if (puntos.size() <= 2) {\n return 0;\n } else {\n // Inicializacion de las areas\n double areaPonderada = 0;\n double areaTotal = 0;\n double areaLocal;\n // Recorrer la lista conservando 2 puntos\n Punto2D antiguoPt = null;\n for (Punto2D pt : puntos) {\n if (antiguoPt != null) {\n // Cálculo deñ baricentro local\n if (antiguoPt.y == pt.y) {\n // Es un rectángulo, el baricentro esta en\n // centro\n areaLocal = pt.y * (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n } else {\n // Es un trapecio, que podemos descomponer en\n // un reactangulo con un triangulo\n // rectangulo adicional\n // Separamos ambas formas\n // Primer tiempo: rectangulo\n areaLocal = Math.min(pt.y, antiguoPt.y) + (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n //Segundo tiempo: triangulo rectangulo\n areaLocal = (pt.x - antiguoPt.x) * Math.abs(pt.y - antiguoPt.y) / 2.0;\n areaTotal += areaLocal;\n if (pt.y > antiguoPt.y) {\n // Baricentro a 1/3 del lado pt\n areaPonderada += areaLocal * (2.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n } else {\n // Baricentro a 1/3 dek lado antiguoPt\n areaPonderada += areaLocal * (1.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n }\n }\n }\n antiguoPt = pt;\n }\n // Devolvemos las coordenadas del baricentro\n return areaPonderada / areaTotal;\n }\n }",
"public int resta(){\r\n return x-y;\r\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Unesite koordinatu prve tacke x1: \");\r\n\t\tdouble x1=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu prve tacke y1: \");\r\n\t\tdouble y1=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu druge tacke x2: \");\r\n\t\tdouble x2=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu druge tacke y2: \");\r\n\t\tdouble y2=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu trece tacke x3: \");\r\n\t\tdouble x3=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu trece tacke y3: \");\r\n\t\tdouble y3=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu cetvrte tacke x4: \");\r\n\t\tdouble x4=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu cetvrte tacke x4: \");\r\n\t\tdouble y4=provjera();\r\n\t\t\r\n\t\t//kreiranje objekata\r\n\t\tLinearEquation linear= LinearEquation.getIntersectingPoint(x1, y1, x2, y2, x3, y3, x4, y4);\r\n\t\t\r\n\t\t//ispis rezultata\r\n\t\tif(linear.isSolvable()){\r\n\t\t\tSystem.out.print(\"Presjek dvije prave je u tacki sa koordinatama x=\" + linear.getX()+ \" i y=\" + linear.getY());\r\n\t\t}else{\r\n\t\t\tSystem.out.print(\"Prave su paralelne!!!\");\r\n\t\t}\r\n\t\t\r\n\t\tunos.close();\r\n\t}",
"public static void main(String[] args){\n\t\tDrawingPanel panel = new DrawingPanel(100, 138);\n\t\tGraphics g = panel.getGraphics();\n g.fillOval(0,1,2,3);\n g.fillRect(4,5,6,7);\n g.fillArc(8,7,10,11,12,13);\n int count = 0;\n\t\tString StringLine1, StringLine2, StringLine3, StringLine4, StringLine5, StringLine6, StringLine7, StringLine8, StringLine9, StringLine10, StringLine11, StringLine12, StringLine13, StringLine14, StringLine15, StringLine16, StringLine17, StringLine18, StringLine19, StringLine20, StringLine21, StringLine22, StringLine23, StringLine24, StringLine25, StringLine26, StringLine27, StringLine28, StringLine29, StringLine30, StringLine31, StringLine32, StringLine33, StringLine34, StringLine35, StringLine36, StringLine37, StringLine38, StringLine39, StringLine40, StringLine41, StringLine42, StringLine43, StringLine44, StringLine45, StringLine46, StringLine47, StringLine48, StringLine49, StringLine50, StringLine51, StringLine52, StringLine53, StringLine54, StringLine55, StringLine56, StringLine57, StringLine58, StringLine59, StringLine60, StringLine61, StringLine62, StringLine63, StringLine64, StringLine65, StringLine66, StringLine67, StringLine68, StringLine69, StringLine70, StringLine71, StringLine72, StringLine73, StringLine74, StringLine75, StringLine76, StringLine77, StringLine78, StringLine79, StringLine80, StringLine81, StringLine82, StringLine83, StringLine84, StringLine85, StringLine86, StringLine87, StringLine88, StringLine89, StringLine90, StringLine91, StringLine92, StringLine93, StringLine94, StringLine95, StringLine96, StringLine97, StringLine98, StringLine99, StringLine100;\n\t\tStringLine1\t\t = \"999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine2\t\t = \"999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine3\t\t = \"999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine4\t\t = \"999999999999999999999999999999999999999955555555559999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine5\t\t = \"999999999999999999999999999999999955555555555555555555555555999999999999999936666888888899999999999999999999999999999999999999999999999999\";\n\t\tStringLine6\t\t = \"999999999999999999999999999999955555555555555555555555555555555555549996336747663368666668999999999999999999999999999999999999999999999999\";\n\t\tStringLine7\t\t = \"999999999999999999999999999995555555555555555555555555555555555555151736641446333367886366889999999999999999999999999999999999999999999999\";\n\t\tStringLine8\t\t = \"999999999999999999999999999555555555555555555555555555555555555555555178411517686368444788887899999999999999999999999999999999999999999999\";\n\t\tStringLine9\t\t = \"999999999999999999999999995555555555555555555555555555555555555555555551555511448336477887663689999999999999999999999999999999999999999999\";\n\t\tStringLine10\t = \"999999999999999999999999955555555555555555555555555555555555555555555555555555511144783636868887999999999999999999999999999999999999999999\";\n\t\tStringLine11\t = \"999999999999999999999995555555555555555555555555555555555555555555555555555555555551144686366667899999999999999999999999999999999999999999\";\n\t\tStringLine12\t = \"999999999999999999999955555555555555555555555555555555555555555555551111111111111111111114444686699999999999999999999999999999999999999999\";\n\t\tStringLine13\t = \"999999999999999999999555555555555555555555555555555555551555555111414444411111111111111111111111499999999999999999999999999999999999999999\";\n\t\tStringLine14\t = \"999999999999999999995555555555555555555551555111111111151111111414444444444411111111111111111111111199999999999999999999999999999999999999\";\n\t\tStringLine15\t = \"999999999999999999955555555555555555555515511511111111111111114144444444444444411111111111111111111111119999999999999999999999999999999999\";\n\t\tStringLine16\t = \"999999999999999995555555555555555555551111111111111111141111411111444477777777477444111111111111111111111111999999999999999999999999999999\";\n\t\tStringLine17\t = \"999999999999999955555555555555555555115111111414441441411114111144447777787777777777774414444444111111111111119999999999999999999999999999\";\n\t\tStringLine18\t = \"999999999999999555555555555555555511111111111144444444114411111114747777888878888888777444444444444111111111111199999999999999999999999999\";\n\t\tStringLine19\t = \"999999999999995555555555555555551111114141414414144141441111441147477878888888868888888774444444444444441414111119999999999999999999999999\";\n\t\tStringLine20\t = \"999999999999955555555555555511111114441447474444441441111144411477744777778886688688888777444444444474444444444411199999999999999999999999\";\n\t\tStringLine21\t = \"999999999999555555555555555515111414444774747477444444444474411444444174777888866686888877777747747774774744447441119999999999999999999999\";\n\t\tStringLine22\t = \"999999999999555555555555551111114177474477477774777444417774111441444414778888666666688888887777777777777774444744411199999999999999999999\";\n\t\tStringLine23\t = \"999999999995555555555555551511144441447777777777777777477774111744111147787888666666888888888888877778778777774444441119999999999999999999\";\n\t\tStringLine24\t = \"999999999955555555555555515114171144774777777777777777777841114444111177888868686666668688868888888888888888877444414411499999999999999999\";\n\t\tStringLine25\t = \"999999999955555555555555151111117474477777777777777777788841114841111177886666686363666688888686868886888888777747441111149999999999999999\";\n\t\tStringLine26\t = \"999999999555555555555555151114174447747777777777777777886811116641114117866666666336663666686666666666868888888877744441111999999999999999\";\n\t\tStringLine27\t = \"999999999555555555555551511111774777777777777777777888886411446711436477866663663333336366666666666666668888888888877444411199999999999999\";\n\t\tStringLine28\t = \"999999995555555555555511111144417477777777777777787878868411148711333447866633336333333336363636666366668686666666688777441119999999999999\";\n\t\tStringLine29\t = \"999999995555555555555511111471447777777877777777788888668411118641113648666363333333333333336666333366666333633366636888848411999999999999\";\n\t\tStringLine30\t = \"999999955555555555555115111147477777778778777778878888668411117611441447636333333333333333333333333363633666666636666687887441199999999999\";\n\t\tStringLine31\t = \"999999955555555555551111111474777777788887887778787888667411118711111437333663333333333333333333333666668688866666666866888774119999999999\";\n\t\tStringLine32\t = \"999999555555555555551151141747477777888888887878888888687711118411153448333363333333333333333333666866888666668886668868688777441999999999\";\n\t\tStringLine33\t = \"999999555555555555511111417747777777888888888888888886888411118611114346663633333333333333333363688888666636684786888886868884844499999999\";\n\t\tStringLine34\t = \"999995555555555555555111444477777777886888888888888686687411118711444446663333333333336333333668888868666666644877888778868887774449999999\";\n\t\tStringLine35\t = \"999995555555555555551114447777777788888888888888888666667411118711333486886333333333386333666888688686666666847777788878888888776744999999\";\n\t\tStringLine36\t = \"999995555555555555551144474777777878886688888886866886668741117471633488863333333336886366868666668866686636417777488878888886687744999999\";\n\t\tStringLine37\t = \"999955555555555555551744777777778888866666686888666666688874117474167877886333333688866687747786668666866668444777447888888888888884499999\";\n\t\tStringLine38\t = \"999955555555555555554444777777787888666666666666668666666674117747417888863336666877887744444447886886666668444777747888788668688887449999\";\n\t\tStringLine39\t = \"999955555555555555551447777777878886666666666668866666633374417677844788663668888777744477787744868888666667744777744478888688888877749999\";\n\t\tStringLine40\t = \"999955555555555555551777777777788866666663666366666633333384114687837783368888777777778788887474766668663667744777777478888668886888844999\";\n\t\tStringLine41\t = \"999955555555555555551477778777788888666366663366866633333641114867866636688887777777778788867187788786633667711777777447888688886868784999\";\n\t\tStringLine42\t = \"999955555555555555554777787787888886666666666366666333333644411768787887777777477747777787784186788886666687711777777744888688886686884499\";\n\t\tStringLine43\t = \"999555555555555555554777878888788866663666363666663333333374414777777774444447774474444477444173888686668667744777788774788888866668674499\";\n\t\tStringLine44\t = \"999555555555555555555787788878888866666663633663666633333381144777777444444447444447444447777116686888663667744478866744786886666666884499\";\n\t\tStringLine45\t = \"999555555555555555551778878888888666633366333663666633333387788777774447474747774777777777887411887866333337446478766847786666663666688499\";\n\t\tStringLine46\t = \"999555555555555555554778888888886666633633633663666633333366666887888877777777877788878888638871166663666336744778863874776666333363687499\";\n\t\tStringLine47\t = \"999555555555555555551478788888866666636666333633666663333333666666668888888866888888888686336674176666636633744477866844776666366336687499\";\n\t\tStringLine48\t = \"999955555555555555555177778888666666663663333663666663333333333333366688888866666666666633336884443646664333871478866874788666663366684499\";\n\t\tStringLine49\t = \"999955555555555555555177888868686666663663633663366833333333333333336888888888668666666668636874463666666633774178863744788666633366684449\";\n\t\tStringLine50\t = \"999955555555555555555147888888666666666666333633638633333336666636666888877868866888888888888771466633636338771478866747886666366336687439\";\n\t\tStringLine51\t = \"999995555555555555555577887786686866636363636633366863333666666663668877777787777778887888887711888866633368741778888747766666633366684499\";\n\t\tStringLine52\t = \"999995555555555555555177777886866666663663336633366633336666636668744474444444447477778877874118888766866668741487868447886666663333687499\";\n\t\tStringLine53\t = \"999995555555555555555177878888666666633636366633636633333367863847777744744477447444777777774186747866666668711787787448886666663636684499\";\n\t\tStringLine54\t = \"999995555555555555551147888888886666663636638666336633333384467448888774777777774774444777764168777888868668744777884478886686666368684499\";\n\t\tStringLine55\t = \"999995555555555555515147788788868666666666666863666333336874474488887668777777777777444478867188487778888668714777777486866666666666674499\";\n\t\tStringLine56\t = \"999955555555555555555577778878888686666636666666663633333874444688866333668888777777777777887474487788666668414777774868686666866668744999\";\n\t\tStringLine57\t = \"999955555555555555555517788888888888866663666666666633333811117688867766336666688777744447777744788888866666411777747668666668688688744999\";\n\t\tStringLine58\t = \"999955555555555555555117777888878888666636666866666633633711118687774788863333366877777774744147688886886688411777476688866666886684749999\";\n\t\tStringLine59\t = \"999955555555555555555117777878888888666636668668666663333441118844747788786333333368886666887633688886688886417777886888886686886888449999\";\n\t\tStringLine60\t = \"999955555555555555555517777788888888866666666886666666663711118747187787788363333333666633333333667886668666418777866686666666686887499999\";\n\t\tStringLine61\t = \"999955555555555555555514777777878888688866888888866666683411118771433447876636333333336666333333336886666666747778868868868868868874999999\";\n\t\tStringLine62\t = \"999955555555555555555514477777778888886866888788888866683711118471433846886636666333333333333333333688886636344888688886866888664469999999\";\n\t\tStringLine63\t = \"999955555555555555555514747778788888888888888878888866636411118741444667666363363333333333333333333368886636384766688888688668444499999999\";\n\t\tStringLine64\t = \"999995555555555555555554447777778788888888887788788866368411118741114444633333633333333333333333333336888886668666668868686884644999999999\";\n\t\tStringLine65\t = \"999995555555555555555554447777777778887888878778788888668711116411111344663333633333333333333333366666366888686666668866888646449999999999\";\n\t\tStringLine66\t = \"999995555555555555555511144477777788788878887777788886666411118841151464666333333333333333333663333666866688686336686888876444499999999999\";\n\t\tStringLine67\t = \"999999555555555555555511114477777777877787877777778888666411116771111444766636333333333333336636666888888886666366868786444441999999999999\";\n\t\tStringLine68\t = \"999999555555555555555511114444747777777777777777777888668411116771111344766636336333333333366366666668688888888888887744441419999999999999\";\n\t\tStringLine69\t = \"999999555555555555555551511444477777777777777777777888688411118441133674786666663333333333666666666686888777888777874444411119999999999999\";\n\t\tStringLine70\t = \"999999955555555555555551151144447777777777777777778778888111116744163444768666666633333336366666866688888878777777444444441499999999999999\";\n\t\tStringLine71\t = \"999999955555555555555555115114444447777777777777777878868114446844114814768866663636636366668666888888887887787747444444444999999999999999\";\n\t\tStringLine72\t = \"999999995555555555555555511111444477777777777777777778788114447841411114888886866666666666668688888887888777777444444444449999999999999999\";\n\t\tStringLine73\t = \"999999995555555555555555555111444444447777777777777777776411417874111114887888686666366668888888888887877877444474746444499999999999999999\";\n\t\tStringLine74\t = \"999999999555555555555555555511414444774777777777777777778811117844411144778788866666668688888888788787778774778874484449999999999999999999\";\n\t\tStringLine75\t = \"999999999555555555555555555551144444477747777777777777777811111444444444477788866666888888877777777777777777787747744499999999999999999999\";\n\t\tStringLine76\t = \"999999999955555555555555555555111414477774777777777777777771111174444444777888868666688888877777777777874477444444449999999999999999999999\";\n\t\tStringLine77\t = \"999999999955555555555555555555511144444777777777777777474774111148787777788878888888888877777777777744444444444444999999999999999999999999\";\n\t\tStringLine78\t = \"999999999995555555555555555555555111444747777477744444444447411117447778788888888888887777747444444444444444444499999999999999999999999999\";\n\t\tStringLine79\t = \"999999999999555555555555555555555551144144744444444444444444444144777778888878888887877744444444444444444444149999999999999999999999999999\";\n\t\tStringLine80\t = \"999999999999955555555555555555555555511144144414444444444414444444447788787877777777444444414444411414114149999999999999999999999999999999\";\n\t\tStringLine81\t = \"999999999999995555555555555555555555555511414444474474444444144444474777777777747444444444441111144441444999999999999999999999999999999999\";\n\t\tStringLine82\t = \"999999999999999555555555555555555555555551511141744444444444444444777777777744444444414114114444441144999999999999999999999999999999999999\";\n\t\tStringLine83\t = \"999999999999999955555555555555555555555555551111414144444444444477474774744444444441441141441111114999999999999999999999999999999999999999\";\n\t\tStringLine84\t = \"999999999999999995555555555555555555555555555551111411411444444444444444444444444114144414111414643999999999999999999999999999999999999999\";\n\t\tStringLine85\t = \"999999999999999999555555555555555555555555555555555511511111111414444444444444444444111111114786336999999999999999999999999999999999999999\";\n\t\tStringLine86\t = \"999999999999999999955555555555555555555555555555555555555555555155555111111515555555111146488777888899999999999999999999999999999999999999\";\n\t\tStringLine87\t = \"999999999999999999999555555555555555555555555555555555555555555555555555555555555551114444887777778999999999999999999999999999999999999999\";\n\t\tStringLine88\t = \"999999999999999999999955555555555555555555555555555555555555555555555555555555551833688778888888889999999999999999999999999999999999999999\";\n\t\tStringLine89\t = \"999999999999999999999995555555555555555555555555555555555555555555555555555555144763336447448688699999999999999999999999999999999999999999\";\n\t\tStringLine90\t = \"999999999999999999999999555555555555555555555555555555555555555555555555517777866666368747778876999999999999999999999999999999999999999999\";\n\t\tStringLine91\t = \"999999999999999999999999995555555555555555555555555555555555555555555555547778863333338868868799999999999999999999999999999999999999999999\";\n\t\tStringLine92\t = \"999999999999999999999999999555555555555555555555555555555555555555555555173868888633338888766999999999999999999999999999999999999999999999\";\n\t\tStringLine93\t = \"999999999999999999999999999995555555555555555555555555555555555555555544414663688886878886999999999999999999999999999999999999999999999999\";\n\t\tStringLine95\t = \"999999999999999999999999999999999555555555555555555555555555555555555555559999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine94\t = \"999999999999999999999999999999955555555555555555555555555555555555555555555549999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine96\t = \"999999999999999999999999999999999999555555555555555555555555555555555555999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine97\t = \"999999999999999999999999999999999999999555555555555555555555555555555999999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine98\t = \"999999999999999999999999999999999999999999999555555555555555555559999999999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine99\t = \"999999999999999999999999999999999999999999999999990555555555559999999999999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tStringLine100\t = \"999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\";\n\t\tstringIntaker(g, StringLine1, count); count++; stringIntaker(g, StringLine2, count); count++; stringIntaker(g, StringLine3, count); count++; stringIntaker(g, StringLine4, count); count++; stringIntaker(g, StringLine5, count); count++; stringIntaker(g, StringLine6, count); count++; stringIntaker(g, StringLine7, count); count++; stringIntaker(g, StringLine8, count); count++; stringIntaker(g, StringLine9, count); count++; stringIntaker(g, StringLine10, count); count++; stringIntaker(g, StringLine11, count); count++; stringIntaker(g, StringLine12, count); count++; stringIntaker(g, StringLine13, count); count++; stringIntaker(g, StringLine14, count); count++; stringIntaker(g, StringLine15, count); count++; stringIntaker(g, StringLine16, count); count++; stringIntaker(g, StringLine17, count); count++; stringIntaker(g, StringLine18, count); count++; stringIntaker(g, StringLine19, count); count++; stringIntaker(g, StringLine20, count); count++; stringIntaker(g, StringLine21, count); count++; stringIntaker(g, StringLine22, count); count++; stringIntaker(g, StringLine23, count); count++; stringIntaker(g, StringLine24, count); count++; stringIntaker(g, StringLine25, count); count++; stringIntaker(g, StringLine26, count); count++; stringIntaker(g, StringLine27, count); count++; stringIntaker(g, StringLine28, count); count++; stringIntaker(g, StringLine29, count); count++; stringIntaker(g, StringLine30, count); count++; stringIntaker(g, StringLine31, count); count++; stringIntaker(g, StringLine32, count); count++; stringIntaker(g, StringLine33, count); count++; stringIntaker(g, StringLine34, count); count++; stringIntaker(g, StringLine35, count); count++; stringIntaker(g, StringLine36, count); count++; stringIntaker(g, StringLine37, count); count++; stringIntaker(g, StringLine38, count); count++; stringIntaker(g, StringLine39, count); count++; stringIntaker(g, StringLine40, count); count++; stringIntaker(g, StringLine41, count); count++; stringIntaker(g, StringLine42, count); count++; stringIntaker(g, StringLine43, count); count++; stringIntaker(g, StringLine44, count); count++; stringIntaker(g, StringLine45, count); count++; stringIntaker(g, StringLine46, count); count++; stringIntaker(g, StringLine47, count); count++; stringIntaker(g, StringLine48, count); count++; stringIntaker(g, StringLine49, count); count++; stringIntaker(g, StringLine50, count); count++; stringIntaker(g, StringLine51, count); count++; stringIntaker(g, StringLine52, count); count++; stringIntaker(g, StringLine53, count); count++; stringIntaker(g, StringLine54, count); count++; stringIntaker(g, StringLine55, count); count++; stringIntaker(g, StringLine56, count); count++; stringIntaker(g, StringLine57, count); count++; stringIntaker(g, StringLine58, count); count++; stringIntaker(g, StringLine59, count); count++; stringIntaker(g, StringLine60, count); count++; stringIntaker(g, StringLine61, count); count++; stringIntaker(g, StringLine62, count); count++; stringIntaker(g, StringLine63, count); count++; stringIntaker(g, StringLine64, count); count++; stringIntaker(g, StringLine65, count); count++; stringIntaker(g, StringLine66, count); count++; stringIntaker(g, StringLine67, count); count++; stringIntaker(g, StringLine68, count); count++; stringIntaker(g, StringLine69, count); count++; stringIntaker(g, StringLine70, count); count++; stringIntaker(g, StringLine71, count); count++; stringIntaker(g, StringLine72, count); count++; stringIntaker(g, StringLine73, count); count++; stringIntaker(g, StringLine74, count); count++; stringIntaker(g, StringLine75, count); count++; stringIntaker(g, StringLine76, count); count++; stringIntaker(g, StringLine77, count); count++; stringIntaker(g, StringLine78, count); count++; stringIntaker(g, StringLine79, count); count++; stringIntaker(g, StringLine80, count); count++; stringIntaker(g, StringLine81, count); count++; stringIntaker(g, StringLine82, count); count++; stringIntaker(g, StringLine83, count); count++; stringIntaker(g, StringLine84, count); count++; stringIntaker(g, StringLine85, count); count++; stringIntaker(g, StringLine86, count); count++; stringIntaker(g, StringLine87, count); count++; stringIntaker(g, StringLine88, count); count++; stringIntaker(g, StringLine89, count); count++; stringIntaker(g, StringLine90, count); count++; stringIntaker(g, StringLine91, count); count++; stringIntaker(g, StringLine92, count); count++; stringIntaker(g, StringLine93, count); count++; stringIntaker(g, StringLine94, count); count++; stringIntaker(g, StringLine95, count); count++; stringIntaker(g, StringLine96, count); count++; stringIntaker(g, StringLine97, count); count++; stringIntaker(g, StringLine98, count); count++; stringIntaker(g, StringLine99, count); count++; stringIntaker(g, StringLine100, count); \n\t}",
"public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }",
"private void aretes_aO(){\n\t\tthis.cube[40] = this.cube[7]; \n\t\tthis.cube[7] = this.cube[25];\n\t\tthis.cube[25] = this.cube[46];\n\t\tthis.cube[46] = this.cube[34];\n\t\tthis.cube[34] = this.cube[40];\n\t}",
"public static void main(String[] args) {\n OverlappingRectangle overlappingRectangle = new OverlappingRectangle();\n int field = overlappingRectangle.overlap(2,1,5,5,3,2,5,7);\n System.out.println(field);\n\n int field1 = overlappingRectangle.overlap(-1, -1, 10, 10, -1, 0, 3, 9);\n System.out.println(field1);\n\n int field2 = overlappingRectangle.overlap(-12, -4, -1, -2, 0, 0, 100, 3000);\n System.out.println(field2);\n }",
"public void setPosicion(){\n ejeX = 0;\n ejeY = 0;\n }",
"@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }",
"public void resetCoordinates(){\n pos=0;\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE;}\n else{\n this.coordinates[0]=0;}\n if(this.pIndex%3==0){\n this.coordinates[1]=0;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE;} \n }",
"public static void main(String[] args){\n\tRectangle[] RecArray = new Rectangle[10];\n\n\t/* Here are the 10 rectangles\n\tRecArray[0] x[0]\n\tRecArray[1] x[1]\n\tRecArray[2]\n\t....\n\tRecArray[9] */\n\n\n\t//initialize each rectangle with random width and random height\n\t//for (int i=0; i<10; i++)\n\t//RecArray[i] = new\n\t//Rectangle(Math.random()*100, Math.random()*100);\n\n\t//initialize each rectangle with the specified width and height\n\tRecArray[0] = new Rectangle (2,3);\n\tRecArray[1] = new Rectangle (12,33);\n\tRecArray[2] = new Rectangle (20,33);\n\tRecArray[3] = new Rectangle (52,38);\n\tRecArray[4] = new Rectangle (22,37);\n\tRecArray[5] = new Rectangle (223,387);\n\tRecArray[6] = new Rectangle (112,23);\n\tRecArray[7] = new Rectangle (78,78);\n\tRecArray[8] = new Rectangle (23,67);\n\tRecArray[9] = new Rectangle (12,89);\n\n\t//print the ten rectangles and their areas\n\tfor(int i =0; i<10; i++)\n\tSystem.out.println(\"Rectangle \"\n\t+ i + \" is \" + RecArray[i] + \" and its area is \"\n\t+ RecArray[i] .getArea());\n\n\n }",
"public void ejercicio01() {\r\n\t\tcabecera(\"01\",\"Seleccion de opciones\");\r\n\r\n\t\tRectangulo rectangulo=new Rectangulo(10,5);\r\n\t\tSystem.out.println(\"Introduce una opcion (1 - Area, 2 - Perimetro):\");\r\n\t\t// Inicio modificacion\r\n \r\n int opcionSelecionada = Teclado.readInteger();\r\n\r\n if (opcionSelecionada==1) {\r\n \tSystem.out.println(rectangulo.getArea());\r\n }else{\r\n \tSystem.out.println(rectangulo.getPerimetro());\r\n }\r\n\t\t\r\n\t\t// Fin modificacion\r\n\t}",
"public static void main(String[] args) {\n int numeros[] = {2, 3, 4, 2, 4, 5, 6, 2, 1, 2};\n //Creamos segundo arreglo con iguall tamaño que el arreglo nùmeros\n int cuadrados[] = new int[numeros.length];\n //Arreglo para almacenar el proceso de la operación\n String procesos[] = new String[numeros.length];\n //Creamos ciclo de repeticiòn para recorrer arreglo \n for (int indice = 0; indice < numeros.length; indice++) {\n int cuadrado = numeros[indice] * numeros[indice];\n //Almacenamos el proceso de la opreaciòn en el arreglo cuadrados\n cuadrados[indice] = cuadrado;\n \n //Almacenar resultado en el arreglo procesos\n procesos[indice] = numeros[indice] + \"x\" + numeros[indice];\n }\n //Ciclo de repetición para mostrar arreglos\n String print_numeros = \"numeros - \";\n String print_cuadrados = \"cuadrados - \";\n String print_procesos = \"procesoss - \";\n for (int indice = 0; indice < numeros.length; indice++) {\n print_numeros = print_numeros + numeros[indice] + \", \";\n print_cuadrados = print_cuadrados + cuadrados[indice] + \", \";\n print_procesos = print_procesos + procesos[indice] + \", \";\n\n }\n System.out.println(print_numeros);\n System.out.println(print_cuadrados);\n System.out.println(print_procesos);\n \n //suma solo numeros pares\n int acumulador_pares=0;\n for (int indice = 0; indice < 10; indice++) {\n boolean par= detectar_par(numeros[indice]);\n if (par == true) {\n acumulador_pares = acumulador_pares + numeros[indice];\n \n }\n }\n System.out.println(\"La suma de los nùmeros pares es: \"+acumulador_pares);\n \n }",
"public PghModulo() {\r\n }",
"public static void main (String[] args){\n objetos = new City(\"Field.txt\");\n\t objetos.showThingCounts(true);\n \n \n // Thing a1 = new Thing( objetos, 1, 6);\n// Thing a2 = new Thing( objetos, 1, 7);\n int yRelativa = 0;\n int xRelativa = 0;\n \n for (int i = 0; i < 10; i++) {\n new Wall(objetos, -i, xRelativa, Direction.WEST);\n }\n for (int i = 1; i < 10; i++) {\n new Wall(objetos, -i, xRelativa+9, Direction.EAST);\n }\n \n for (int i = 0; i < 10; i++) {\n new Wall(objetos, yRelativa, i, Direction.SOUTH);\n }\n \n for (int i = 0; i < 10; i++) {\n new Wall(objetos, yRelativa-9, i, Direction.NORTH);\n }\n \n //Direction.NORTH, EAST, SOUTH, WEST\n //Definicion de la ubicacion del robot, Ciudad, posicion, Direccion, Numero things en el bolso.\n //ascensor3 = new Robot(City aCity, int aStreet, int anAvenue, Direction aDirection) \n ascensor1 = new Ascensor(objetos, yRelativa,xRelativa, Direction.EAST,0);\n ascensor2 = new Ascensor(objetos, yRelativa,xRelativa+1, Direction.EAST,0);\n //portero = new Ascensor(objetos, yRelativa,xRelativa+2, Direction.EAST,0);\n \n createUsuarioPrimerPiso(objetos, yRelativa, xRelativa+2,6);\n createUsuarioPrimerPiso(objetos, yRelativa, xRelativa+3,6);\n \n createUsuarioPrimerPiso(objetos, yRelativa, xRelativa+6,6);\n \n// Usuario u1 = new Usuario (objetos, yRelativa, xRelativa+2,6);\n// Usuario u2 = new Usuario (objetos, yRelativa, xRelativa+3,6);\n// Usuario u3 = new Usuario (objetos, yRelativa, xRelativa+4,6);\n// Usuario u4 = new Usuario (objetos, yRelativa, xRelativa+5,6);\n// Usuario u5 = new Usuario (objetos, yRelativa, xRelativa+6,6);\n// Usuario u6 = new Usuario (objetos, yRelativa, xRelativa+7,6);\n// Usuario u7 = new Usuario (objetos, yRelativa, xRelativa+8,6);\n// Usuario u8 = new Usuario (objetos, yRelativa, xRelativa+9,6);\n// Usuario u9 = new Usuario (objetos, yRelativa, xRelativa+10,6);\n// Usuario u10 = new Usuario (objetos, yRelativa, xRelativa+11,6);\n\n cargarPasajeros(ascensor1);\n\n// while(ascensor1.getAvenue()!=xRelativa){\n// ascensor1.move();\n// }\n// //turnRight(ascensor1);\n\n \n\n while (ascensor1.getDirection()!=Direction.NORTH){\n ascensor1.turnLeft();\n }\n //******DESDE ESTE PUNTO (LINEA 160) HASTA LA LINEA 204 SE HACE EL MOVIMIENTO DE UN USUARIO DE MANERA EXPLICITA\n // Los usuarios que usa están contenidos en las líneas (134-143)\n \n// while((ascensor1.getStreet()*-1)!= u1.getPisoDeseado()){\n// ascensor1.move(); \n// }\n// turnRight(ascensor1);\n// ascensor1.move();\n// ascensor1.move();\n// while(ascensor1.canPickThing()==true){\n// ascensor1.move();\n// }\n// if(ascensor1.canPickThing()==false){\n// ascensor1.putThing();\n// }\n// regresarAlOrigen(ascensor1);\n// \n// while (ascensor1.getDirection()!=Direction.NORTH){\n// ascensor1.turnLeft();\n// }\n// \n// while((ascensor1.getStreet()*-1)!= u2.getPisoDeseado()){\n// ascensor1.move(); \n// }\n// turnRight(ascensor1);\n// ascensor1.move();\n// ascensor1.move();\n// while(ascensor1.canPickThing()==true){\n// ascensor1.move();\n// }\n// if(ascensor1.canPickThing()==false){\n// ascensor1.putThing();\n// }\n// regresarAlOrigen(ascensor1);\n// \n// while((ascensor1.getStreet()*-1)!= u3.getPisoDeseado()){\n// ascensor1.move(); \n// }\n// turnRight(ascensor1);\n// ascensor1.move();\n// ascensor1.move();\n// while(ascensor1.canPickThing()==true){\n// ascensor1.move();\n// }\n// if(ascensor1.canPickThing()==false){\n// ascensor1.putThing();\n// }\n// regresarAlOrigen(ascensor1);\n \n //************************\n \n //public synchronized void\n\t //Mover una interseccion en el sentido al cual este apuntando el objeto.\n// for (int i = 0; i < 8; i++) {\n// if(portero.canPickThing()==false){\n// \n// new Thing (objetos, portero.getStreet() , portero.getAvenue());\n// }\n// \n// \n// portero.move();\n// }\n// portero.move();\n// portero.move();\n \n \n \n\n \n \n \n// //Tomando decisiones, Si puedo tomar un Thing\n// boolean puedeTomar = estudiante.canPickThing();\n// \n// //Tomar un Thing\n// if(puedeTomar == true)\n// estudiante.pickThing();\n// \n// //Especifica el numero de Thing que tiene en robot en el bolso\n// int numeroThings = estudiante.countThingsInBackpack();\n// \n// //Poner Thing, se debe validar que tenga things en el bolso\n// estudiante.putThing();\n// \n// //Si el frente esta libre de Wall\n// estudiante.frontIsClear();\n// \n// //Invocando una funcion\n// creacionFuncion(4);\n// \n// //Toman un Thing\n// estudiante.pickThing();\n// \n// \n\t}",
"public Rectangulo(double base, double altura) {\n\t\tthis.base = base;\n\t\tthis.altura = altura;\n\t}",
"public String raiz1 (){\r\n //primero, invocamos el determiante\r\n float det=determinante(); //se asigna al determinante de arriba\r\n String sol=\"raiz 1\"; //la solucion la evuelve como string\r\n if (det<0){\r\n sol=\"Raiz imaginaria\";\r\n }else {\r\n float r1= (float)(-b+ Math.sqrt(det) )/(2*a); \r\n //tambien aplicamos casting pata Math, con (float)\r\n sol=\"Raiz 1: \"+r1; //texto + valor agregado\r\n }\r\n return sol;\r\n \r\n //Uno para R1 y otro para R2 \r\n }",
"public static void main (String args[]){\n Scanner leitor = new Scanner(System.in);\n \n //Define as variáveis locais\n int x, y;\n \n //Lê:\n System.out.print(\"Informe o primeiro valor: \");\n x = leitor.nextInt();\n \n System.out.print(\"Informe o segundo valor: \");\n y = leitor.nextInt();\n \n //Cria a intância da classe Matematica utilizando o construtor\n Matematica mat = new Matematica(x, y);\n \n //Imprime o resultado das operações através de \n //chamadasaos métodos da classe Matematica\n System.out.println(\"--------------------\"); //Apenas para organiar a saída\n System.out.println(\"O valor da soma é: \" + mat.soma());\n System.out.println(\"O valor da subtração é: \" + mat.subtrai());\n System.out.println(\"O valor da multiplicação é: \" + mat.multiplica());\n System.out.println(\"O valor da divisão é: \" + mat.divide());\n System.out.println(\"--------------------\"); //Apenas para organiar a saída\n }",
"public void primerPunto() {\n\t\tp = new PuntoAltaPrecision(this.xCoord, this.yCoord);\n\t\t// Indicamos la trayectoria por la que va la pelota\n\t\tt = new TrayectoriaRecta(1.7f, p, false);\n\t}",
"public void attrito(){\n yCord[0]+=4;\n yCord[1]+=4;\n yCord[2]+=4;\n //e riaggiorna i propulsori (che siano attivati o no) ricalcolandoli sulla base delle coordinate dell'astronave, cambiate\n aggiornaPropulsori();\n \n }",
"public Piste(int x, int y, int ala_x, int ala_y, int yla_x, int yla_y){\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.minX=ala_x;\n\t\tthis.minY=ala_y;\n\t\tthis.maxX=yla_x;\n\t\tthis.maxY=yla_y;\n\t}",
"public void posiziona_bersaglio() {\n do{\n int r = (int) (Math.random() * POSIZIONI_RANDOM);\n bersaglio_x = ((r * DIMENSIONE_PUNTO));\n }while(bersaglio_x<102 || bersaglio_x>LARGHEZZA);\n do{\n int r = (int) (Math.random() * POSIZIONI_RANDOM);\n bersaglio_y = ((r * DIMENSIONE_PUNTO));\n }while(bersaglio_y<102 || bersaglio_y>ALTEZZA);\n //System.out.println (\"x : \"+bersaglio_x+\" y : \"+bersaglio_y);\n }",
"private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }",
"public Rect getRectplayer1()\n {return new Rect(x+ width*9/25,\ty +height*1/20,\n x+ width*9/25 + width*27/100, y +height*1/20 +height*7/50);}",
"public static void main(String[] args) throws Exception {\n Circulo c[] = new Circulo[3];\n c[0] = new Circulo(5);\n c[1] = new Circulo(6);\n c[2] = new Circulo(7);\n System.out.println(c[0].area());\n System.out.println(c[0].perimetro());\n System.out.println(c[1].area());\n System.out.println(c[1].perimetro());\n System.out.println(c[2].area());\n System.out.println(c[2].perimetro());\n\n // vetor de retangulos e suas devidas implementacoes\n Retangulo r[] = new Retangulo[3];\n\n r[0] = new Retangulo(5, 3);\n r[1] = new Retangulo(45, 8);\n r[2] = new Retangulo(5, 5);\n System.out.println(r[0].area());\n System.out.println(r[0].perimetro());\n System.out.println(r[1].area());\n System.out.println(r[1].perimetro());\n System.out.println(r[2].area());\n System.out.println(r[2].perimetro());\n\n Quadrado q[] = new Quadrado[3];\n\n q[0] = new Quadrado(5);\n q[1] = new Quadrado(8);\n q[2] = new Quadrado(3);\n System.out.println(q[0].area());\n System.out.println(q[0].perimetro());\n System.out.println(q[1].area());\n System.out.println(q[1].perimetro());\n System.out.println(q[2].area());\n System.out.println(q[2].perimetro());\n\n }",
"public void actualiza(){\r\n //pregunto si se presiono una tecla de dirección\r\n if(bTecla) {\r\n int iX = basPrincipal.getX();\r\n int iY = basPrincipal.getY();\r\n if(iDir == 1) {\r\n iY -= getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 2) {\r\n iX += getWidth() / iMAXANCHO;\r\n }\r\n if(iDir == 3) {\r\n iY += getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 4) {\r\n iX -= getWidth() / iMAXANCHO;\r\n }\r\n //limpio la bandera\r\n bTecla = false;\r\n \r\n //asigno posiciones en caso de no salirme\r\n if(iX >= 0 && iY >= 0 && iX + basPrincipal.getAncho() <= getWidth()\r\n && iY + basPrincipal.getAlto() <= getHeight()) {\r\n basPrincipal.setX(iX);\r\n basPrincipal.setY(iY);\r\n } \r\n }\r\n \r\n //Muevo los chimpys\r\n for(Base basChimpy : lklChimpys) {\r\n basChimpy.setX(basChimpy.getX() - iAceleracion);\r\n }\r\n \r\n //Muevo los diddys\r\n for(Base basDiddy : lklDiddys) {\r\n basDiddy.setX(basDiddy.getX() + iAceleracion);\r\n }\r\n\r\n }",
"private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }",
"public void drawWorld(int var1) {\n boolean var24 = field_759;\n int var2 = this.field_736[var1] * this.field_737[var1];\n int[] var3 = this.spritePixels[var1];\n int[] var4 = new int['\\u8000'];\n int var5 = 0;\n int var6;\n if(var24) {\n var6 = var3[var5];\n ++var4[((var6 & 16252928) >> 9) + ((var6 & '\\uf800') >> 6) + ((var6 & 248) >> 3)];\n ++var5;\n }\n\n while(var5 < var2) {\n var6 = var3[var5];\n ++var4[((var6 & 16252928) >> 9) + ((var6 & '\\uf800') >> 6) + ((var6 & 248) >> 3)];\n ++var5;\n }\n\n int[] var25 = new int[256];\n var25[0] = 16711935;\n int[] var7 = new int[256];\n int var8 = 0;\n int var10;\n int var11;\n if(var24 || var8 < '\\u8000') {\n do {\n int var9 = var4[var8];\n if(var9 > var7[255]) {\n var10 = 1;\n if(var24 || var10 < 256) {\n do {\n if(var9 > var7[var10]) {\n var11 = 255;\n if(var24 || var11 > var10) {\n do {\n var25[var11] = var25[var11 - 1];\n var7[var11] = var7[var11 - 1];\n --var11;\n } while(var11 > var10);\n }\n\n var25[var10] = ((var8 & 31744) << 9) + ((var8 & 992) << 6) + ((var8 & 31) << 3) + 263172;\n var7[var10] = var9;\n if(!var24) {\n break;\n }\n }\n\n ++var10;\n } while(var10 < 256);\n }\n }\n\n var4[var8] = -1;\n ++var8;\n } while(var8 < '\\u8000');\n }\n\n byte[] var26 = new byte[var2];\n var10 = 0;\n if(!var24 && var10 >= var2) {\n this.spriteColoursUsed[var1] = var26;\n this.spriteColourList[var1] = var25;\n this.spritePixels[var1] = null;\n } else {\n do {\n var11 = var3[var10];\n int var12 = ((var11 & 16252928) >> 9) + ((var11 & '\\uf800') >> 6) + ((var11 & 248) >> 3);\n int var13 = var4[var12];\n if(var13 == -1) {\n int var14 = 999999999;\n int var15 = var11 >> 16 & 255;\n int var16 = var11 >> 8 & 255;\n int var17 = var11 & 255;\n int var18 = 0;\n if(var24 || var18 < 256) {\n do {\n int var19 = var25[var18];\n int var20 = var19 >> 16 & 255;\n int var21 = var19 >> 8 & 255;\n int var22 = var19 & 255;\n int var23 = (var15 - var20) * (var15 - var20) + (var16 - var21) * (var16 - var21) + (var17 - var22) * (var17 - var22);\n if(var23 < var14) {\n var14 = var23;\n var13 = var18;\n }\n\n ++var18;\n } while(var18 < 256);\n }\n\n var4[var12] = var13;\n }\n\n var26[var10] = (byte)var13;\n ++var10;\n } while(var10 < var2);\n\n this.spriteColoursUsed[var1] = var26;\n this.spriteColourList[var1] = var25;\n this.spritePixels[var1] = null;\n }\n }",
"public void draw() {\n background(0); // Color de Fondo - Negro\n // Se mencionan cada una de las funciones a utilizar en la class.\n a.movbolitas1(); // a.funcion es para las funciones principales.\n a.bolita2();\n a.movbolitas();\n a.bolita1();\n a.triangulo();\n a.triangulo1();\n c.movbolitas(); // c.funcion y m.funci\\u00f3n es para las mismas\n // funciones anteriores que se repetir\\u00e1n\n c.bolita1();\n c.movbolitas();\n c.bolita2();\n m.movbolitas();\n m.bolita1();\n m.movbolitas1();\n m.bolita2();\n a.circulos();\n}",
"public static void main(String[] args) {\n Rectangle myRect; //ISSUE 2: No existe la clase Rectangle\n //SOLVE 2: Se creo la clase Rectangle dentro del mismo paquete\n //ISSUE 2.1: No se ha instanciado myRectangle\n myRect = new Rectangle();//SOLVE 2.1: Se instancio my Rect\n myRect.width = 40; //ISSUE 3: No existe un atributo que se llame width dentro de la clase Rectangle\n //SOLVE 3: Se creo la propiedad width a la clase rectangle\n myRect.height = 50; //ISSUE 4: No existe un atributo que se llame height dentro de la clase Rectangle\n //SOLVE 4: Se creo la propiedad hright a la clase rectangle\n System.out.println(\"myRect's area is \" + myRect.area()); //ISSUE 5: No existe el metodo Area dentro de la clase Rectangle\n //SOLVE 5: Se creo el metodo Area en la clase rectangle que multiplica width por height\n }",
"public static void main(String[] args) {\n\n Board myboard = new Board(8,8);\n System.out.println(myboard.drawBoard());\n myboard.boardToLetters();\n //System.out.println(myboard.drawBoard());\n // myboard.boardToFigures();\n // System.out.println(myboard.drawBoard());\n\n System.out.println(\"------------------- Movimientos Posibles\");\n //myboard.obtenerPiezasPorColor();\n\n Coordinate coordinate = new Coordinate(4,3);\n Piece pieza = myboard.obtenerPiezaCoordenadas(coordinate);\n Movimientos movimientos = new Movimientos(pieza, myboard);\n ArrayList<Coordinate> listaMovimientos = new ArrayList<>(movimientos.obtenerMovimientos());\n\n //System.out.println(piece.toString());\n for(Coordinate coordenadas : listaMovimientos)\n {\n System.out.println(coordenadas.toString());\n }\n\n if(listaMovimientos.isEmpty())\n {\n System.out.println(\"Esta vacia\");\n }\n }",
"@Test\n public void testcalPerimeterRectangle4() {\n double ex = 8;\n \n startPoint.setX(-1);\n startPoint.setY(-1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calPerimeterRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"public static void main(String[] args) {\n FiguraGeometrica figura = new Rectangulo(\"Rectangulo\");\n figura.dibujar();\n System.out.println(\"figura = \" + figura);\n \n }",
"public void paintNormalized(){\n\t\t\n\t\tint min = 99999;\n\t\tint max = 0;\n\t\t\n\t\tfor (int i=0; i < ranges.size(); i++){\n\t\t\tif ((ranges.elementAt(i).getMin()) < min){\n\t\t\t\tmin = ranges.elementAt(i).getMin();\n\t\t\t}\n\t\t\tif ((ranges.elementAt(i).getMax()) > max){\n\t\t\t\tmax = ranges.elementAt(i).getMax();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Once I've got them, the paint is simple, because Positioner.getAssociatedPosition() returns\n\t\t// the exact pixel where the color has to be painted\n\t\t\n\t\tPositioner positions = new Positioner(drawingPanel.getHeight(), min, max);\n\t\t\n\t\tint i = 1;\n\t\tBufferedImage img = new BufferedImage(drawingPanel.getWidth(), drawingPanel.getHeight(), BufferedImage.TYPE_INT_ARGB);\n\t\t\t\t\n\t\twhile (i <= ranges.size()){\n\t\t\tpaintBufferedSolid(ranges.elementAt(ranges.size()-i).getColor(),positions.getAssociatedPosition(ranges.elementAt(ranges.size()-i).getMax()) , positions.getAssociatedPosition(ranges.elementAt(ranges.size()-i).getMin()), img);\n\t\t\ti++;\n\t\t}\n\n\t\t\t\n\t\t\n\t\tdrawingPanel.getGraphics().drawImage(img, 0, 0, img.getWidth(), img.getHeight(), null);\n\t\t\n\t\t// Painting the ranges\n\t\t\n\t\trangesPanel.removeAll();\t\t\t// Clears rangePanel\n\t\t\n\t\tJLabel currentRange;\n\t\t\n\t\tcurrentRange = new JLabel(Integer.toString(ranges.elementAt(0).getMin()));\n\t\tcurrentRange.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tcurrentRange.setBounds(35, rangesPanel.getHeight()-16, 60, 16);\n\t\t\n\t\t\n\t\trangesPanel.add(currentRange);\n\t\tint last = rangesPanel.getHeight()-16;\n\t\tint aux;\n\t\tfor (int j = 0; j < ranges.size(); j++){\n\t\t\taux = positions.getAssociatedPosition(ranges.elementAt(j).getMax());\n\t\t\tcurrentRange = new JLabel(Integer.toString(ranges.elementAt(j).getMax()));\n\t\t\tcurrentRange.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tif (aux+16 < last){\n\t\t\t\tcurrentRange.setBounds(35, aux, 60, 16);\n\t\t\t\tlast = aux;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcurrentRange.setBounds(35, last-16, 60, 16);\n\t\t\t\tlast = last - 16;\n\t\t\t}\n\t\t\t\t\n\t\t\trangesPanel.add(currentRange);\n\t\t}\n\t\t\n\t\trangesPanel.repaint();\n\t}",
"public void testOctaedre() {\n\t\t\t\n\t\t\tSolide i = Octaedre.octaedre();\n\t\t\t\n\t\t\t/* creation de points qui ont les memes coordonnees que ceux qui \n\t\t\t * constituent notre solide (car octaedre() n'a pas de parametres)\n\t\t\t */\n\t\t\t\n\t\t\tPoint p1 = new Point(-25, 0,-25);\n\t\t\tPoint p2 = new Point(-25, 0,25);\n\t\t\tPoint p3 = new Point(25, 0,-25);\n\t\t\tPoint p4 = new Point(25,0,25);\n\t\t\tfloat hauteur = (float) (50/Math.sqrt(2));\n\t\t\t// on se sert de la hauteur pour donnee les coordonees des sommets manquant\n\t\t\tPoint p5 = new Point(0, hauteur,0);\n\t\t\tPoint p6 = new Point(0,-hauteur,0);\n\t\t\t\n\t\t\t//On teste si les points de l'octaedre i sont bien les memes que ceux créés\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getAbscisse()==(p1.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(1).getAbscisse()==(p2.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(5).getAbscisse()==(p3.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(3).getAbscisse()==(p4.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(2).getAbscisse()==(p5.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(0).getAbscisse()==(p6.getAbscisse()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getOrdonnee()==(p1.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(1).getOrdonnee()==(p2.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(5).getOrdonnee()==(p3.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(3).getOrdonnee()==(p4.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(2).getOrdonnee()==(p5.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(0).getOrdonnee()==(p6.getOrdonnee()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getProfondeur()==(p1.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(1).getProfondeur()==(p2.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(5).getProfondeur()==(p3.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(3).getProfondeur()==(p4.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(2).getProfondeur()==(p5.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(0).getProfondeur()==(p6.getProfondeur()));\n\t\t\t\n\t\t\t//On teste si les faces de l'octaedre contiennent bien les points créés\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(0).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(1).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(2).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(3).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p6));\n\t\t\n\t\t\tassertTrue(i.getFaces().get(4).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(5).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(6).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(7).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p6));\n\t\t\t\n\t\t\t\n\t\t\t\n\t}",
"@Test\n public void testcalPerimeterRectangle1() {\n double ex = 8;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calPerimeterRectangle(startPoint, endPoint);\n assertEquals(ex, ac, 0);\n }",
"public static void main(String[] args) {\n Rectangle box = new Rectangle(10, 10);\n //print X and Y\n System.out.println(\"Box 1: X = \" + box.getX() + \" || Y = \" + box.getY() );\n System.out.println(\"Box1 = \" + box + \"\\n\");\n \n box.translate(10,0);\n //print X and Y\n System.out.println(\"Box 2: X = \" + box.getX() + \" || Y = \" + box.getY() );\n System.out.println(\"Box2 = \" + box + \"\\n\");\n \n box.translate(0, 10);\n //print X and Y\n System.out.println(\"Box 3: X = \" + box.getX() + \" || Y = \" + box.getY() );\n System.out.println(\"Box3 = \" + box + \"\\n\");\n \n box.translate(-10, 0);\n //print X and Y\n System.out.println(\"Box 4: X = \" + box.getX() + \" || Y = \" + box.getY() );\n System.out.println(\"Box4 = \" + box + \"\\n\");\n \n\t}",
"@Test\n public void testcalPerimeterRectangle3() {\n double ex = -8;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calPerimeterRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"Rectangle getRect(){\n \treturn new Rectangle(x,y,70,25);\n }",
"Rey(){\r\n \r\n color_rey=Color.BLANCO;\r\n posicion_rey.fila=1;\r\n posicion_rey.columna='e';\r\n \r\n }",
"public void init(){\n\t\tsetSize (800,600);\n\t\t//el primer parametro del rectangulo en el ancho\n\t\t//y el alto\n\t\trectangulo = new GRect(120,80);\n\t\t\n\t}",
"void createRectangles();",
"public void duplicarAlcance(int i) {\n \talcance=i;\n this.setPosicionX(this.getPosicionX()*alcance);\n this.setPosicionY(this.getPosicionY()*alcance);\n }",
"private void prepare()\n {\n //getWorld().removeObject(wrong_ant);\n<<<<<<< HEAD\n \n \n Label q1 = new Label (\"What is 20 x 0?\", 50);\n \n Label question1answera = new Label (\"0\", 35);\n Label question1answerb = new Label (\"20\", 35);\n Label question1answerc = new Label (\"1\", 35);\n Label question1answerd = new Label (\"2\", 35);\n \n q1.setFillColor(Color.BLACK);\n q1.setLineColor(Color.WHITE);\n addObject(q1, 300, 100);\n \n\n \n Ant ant = new Ant();\n addObject(ant,350,325);\n question1answera.setFillColor(Color.WHITE);\n question1answera.setLineColor(Color.BLACK);\n addObject(question1answera, 350,325);\n \n Wrong_ant wrong_ant = new Wrong_ant();\n addObject(wrong_ant,500,625);\n question1answerb.setFillColor(Color.WHITE);\n question1answerb.setLineColor(Color.BLACK);\n addObject(question1answerb, 500,625);\n \n Wrong_ant wrong_ant1 = new Wrong_ant();\n addObject(wrong_ant1,650,625);\n question1answerc.setFillColor(Color.WHITE);\n question1answerc.setLineColor(Color.BLACK);\n addObject(question1answerc, 650,625);\n \n Wrong_ant wrong_ant2 = new Wrong_ant();\n addObject(wrong_ant2,700,425);\n question1answerd.setFillColor(Color.WHITE);\n question1answerd.setLineColor(Color.BLACK);\n addObject(question1answerd, 700,425);\n \n Ground ground100 = new Ground();\n addObject(ground100, 700, 445);\n \n \n \n=======\n Wrong_ant wrong_ant = new Wrong_ant();\n addObject(wrong_ant,500,625);\n Ant ant = new Ant();\n addObject(ant,350,325);\n Wrong_ant wrong_ant1 = new Wrong_ant();\n addObject(wrong_ant1,650,625);\n Wrong_ant wrong_ant2 = new Wrong_ant();\n addObject(wrong_ant2,700,425);\n Ground ground100 = new Ground();\n addObject(ground100, 700, 445);\n>>>>>>> d7cbdd938f8ba43d2dbfc3e0fb0f8f0d05399bf0\n //wrong_ant.setLocation(712,374);\n //Wrong_ant wrong_ant2 = new Wrong_ant();\n //addObject(wrong_ant2,568,380);\n //wrong_ant2.setLocation(559,373);\n //Wrong_ant wrong_ant3 = new Wrong_ant();\n //addObject(wrong_ant3,600,600);\n //wrong_ant3.setLocation(680,215);\n //Ant ant = new Ant();\n //addObject(ant,500,625);\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n Wall wall2 = new Wall();\n addObject(wall2, 93, 373);\n Wall wall3 = new Wall();\n addObject(wall3, 153, 361);\n Wall wall4 = new Wall();\n addObject(wall4, 249, 347);\n Wall wall5 = new Wall();\n addObject(wall5, 306, 344);\n Wall wall6 = new Wall();\n addObject(wall6, 397, 335);\n Wall wall7 = new Wall();\n addObject(wall7, 501, 333);\n Wall wall8 = new Wall();\n addObject(wall8, 562, 338);\n Wall wall9 = new Wall();\n addObject(wall9, 428, 273);\n Wall wall10 = new Wall();\n addObject(wall10, 334, 273);\n Wall wall11 = new Wall();\n addObject(wall11, 207, 267);\n wall.setLocation(25, 376);\n wall2.setLocation(75, 376);\n wall3.setLocation(125, 376);\n wall4.setLocation(175, 376);\n wall11.setLocation(225, 376);\n wall5.setLocation(275, 376);\n wall10.setLocation(325, 376);\n P2 p2 = new P2();\n addObject(p2, 133, 321);\n wall6.setLocation(375, 376);\n wall9.setLocation(425, 376);\n wall7.setLocation(475, 376);\n wall8.setLocation(525, 376);\n Wall wall12 = new Wall();\n addObject(wall12, 584, 384);\n wall12.setLocation(575, 376);\n Wall wall13 = new Wall();\n addObject(wall13, 283, 331);\n wall13.setLocation(275, 326);\n Wall wall14 = new Wall();\n addObject(wall14, 346, 314);\n Wall wall15 = new Wall();\n addObject(wall15, 423, 310);\n Wall wall16 = new Wall();\n addObject(wall16, 346, 233);\n wall14.setLocation(325, 326);\n wall15.setLocation(375, 326);\n wall16.setLocation(425, 326);\n wall16.setLocation(325, 276);\n Wall wall17 = new Wall();\n addObject(wall17, 433, 283);\n wall17.setLocation(425, 276);\n Wall wall18 = new Wall();\n addObject(wall18, 433, 215);\n wall18.setLocation(425, 226);\n removeObject(wall17);\n Ground ground = new Ground();\n addObject(ground, 242, 315);\n ground.setLocation(235, 308);\n Ground ground2 = new Ground();\n addObject(ground2, 161, 314);\n Ground ground3 = new Ground();\n addObject(ground3, 100, 313);\n Ground ground4 = new Ground();\n addObject(ground4, 105, 275);\n ground2.setLocation(205, 319);\n ground3.setLocation(175, 331);\n ground4.setLocation(145, 343);\n p2.setLocation(80, 319);\n Wall wall19 = new Wall();\n addObject(wall19, 33, 332);\n wall19.setLocation(25, 326);\n Wall wall20 = new Wall();\n addObject(wall20, 31, 283);\n Wall wall21 = new Wall();\n addObject(wall21, 29, 220);\n Wall wall22 = new Wall();\n addObject(wall22, 39, 156);\n Wall wall23 = new Wall();\n addObject(wall23, 34, 100);\n Wall wall24 = new Wall();\n addObject(wall24, 43, 46);\n Wall wall25 = new Wall();\n addObject(wall25, 127, 122);\n wall20.setLocation(25, 276);\n wall21.setLocation(25, 226);\n wall22.setLocation(25, 176);\n wall23.setLocation(25, 126);\n wall24.setLocation(25, 76);\n wall25.setLocation(25, 25);\n wall24.setLocation(25, 75);\n wall23.setLocation(25, 125);\n wall22.setLocation(25, 175);\n wall21.setLocation(25, 225);\n wall20.setLocation(25, 275);\n wall19.setLocation(25, 326);\n wall.setLocation(25, 375);\n wall19.setLocation(25, 325);\n wall2.setLocation(75, 375);\n wall3.setLocation(125, 375);\n wall4.setLocation(175, 375);\n wall11.setLocation(225, 375);\n wall5.setLocation(275, 375);\n wall10.setLocation(325, 375);\n wall6.setLocation(375, 375);\n wall9.setLocation(425, 375);\n wall7.setLocation(475, 375);\n wall8.setLocation(525, 375);\n wall12.setLocation(575, 375);\n ground4.setLocation(145, 342);\n ground3.setLocation(175, 330);\n ground2.setLocation(205, 318);\n ground.setLocation(235, 307);\n wall13.setLocation(275, 325);\n wall14.setLocation(325, 325);\n wall15.setLocation(375, 325);\n wall16.setLocation(325, 275);\n wall18.setLocation(425, 225);\n Wall wall26 = new Wall();\n addObject(wall26, 569, 314);\n wall26.setLocation(575, 325);\n Wall wall27 = new Wall();\n addObject(wall27, 577, 273);\n Wall wall28 = new Wall();\n addObject(wall28, 572, 216);\n Wall wall29 = new Wall();\n addObject(wall29, 571, 158);\n Wall wall30 = new Wall();\n addObject(wall30, 560, 110);\n Wall wall31 = new Wall();\n addObject(wall31, 560, 66);\n Wall wall32 = new Wall();\n addObject(wall32, 555, 17);\n wall27.setLocation(575, 275);\n wall28.setLocation(575, 225);\n wall29.setLocation(575, 176);\n wall30.setLocation(575, 126);\n wall31.setLocation(575, 76);\n wall32.setLocation(575, 25);\n wall31.setLocation(575, 75);\n wall30.setLocation(575, 125);\n wall29.setLocation(576, 174);\n wall29.setLocation(575, 174);\n wall28.setLocation(575, 224);\n wall27.setLocation(575, 274);\n wall26.setLocation(575, 325);\n wall27.setLocation(575, 275);\n wall28.setLocation(575, 225);\n wall29.setLocation(575, 175);\n Wall wall33 = new Wall();\n addObject(wall33, 237, 63);\n wall33.setLocation(99, 29);\n wall33.setLocation(74, 25);\n wall33.setLocation(75, 25);\n Wall wall34 = new Wall();\n addObject(wall34, 166, 39);\n wall34.setLocation(125, 25);\n Wall wall35 = new Wall();\n addObject(wall35, 197, 37);\n wall35.setLocation(175, 24);\n wall35.setLocation(175, 25);\n Wall wall36 = new Wall();\n addObject(wall36, 227, 37);\n wall36.setLocation(225, 25);\n Wall wall37 = new Wall();\n addObject(wall37, 290, 63);\n wall37.setLocation(275, 25);\n Wall wall38 = new Wall();\n addObject(wall38, 340, 67);\n wall38.setLocation(325, 25);\n Wall wall39 = new Wall();\n addObject(wall39, 369, 79);\n wall39.setLocation(375, 25);\n Wall wall40 = new Wall();\n addObject(wall40, 458, 89);\n wall40.setLocation(425, 25);\n Wall wall41 = new Wall();\n addObject(wall41, 497, 87);\n wall41.setLocation(475, 25);\n Wall wall42 = new Wall();\n addObject(wall42, 497, 87);\n wall42.setLocation(525, 25);\n Wall wall43 = new Wall();\n addObject(wall43, 432, 182);\n wall43.setLocation(425, 175);\n Wall wall44 = new Wall();\n addObject(wall44, 426, 120);\n wall44.setLocation(425, 125);\n wall43.setLocation(475, 274);\n wall44.setLocation(525, 274);\n wall44.setLocation(525, 275);\n wall43.setLocation(475, 275);\n wall43.setLocation(475, 275);\n Wall wall45 = new Wall();\n addObject(wall45, 476, 212);\n wall45.setLocation(475, 225);\n removeObject(wall45);\n Wall wall46 = new Wall();\n addObject(wall46, 331, 230);\n wall46.setLocation(325, 225);\n Wall wall47 = new Wall();\n addObject(wall47, 334, 167);\n wall47.setLocation(325, 175);\n removeObject(wall46);\n Ground ground5 = new Ground();\n addObject(ground5, 342, 164);\n ground5.setLocation(335, 157);\n Ground ground6 = new Ground();\n addObject(ground6, 308, 159);\n wall47.setLocation(323, 173);\n wall47.setLocation(325, 175);\n Ground ground7 = new Ground();\n addObject(ground7, 316, 202);\n ground7.setLocation(330, 212);\n removeObject(ground7);\n ground6.setLocation(315, 157);\n Wall wall48 = new Wall();\n addObject(wall48, 325, 224);\n wall48.setLocation(325, 225);\n removeObject(wall48);\n removeObject(wall47);\n Wall wall49 = new Wall();\n addObject(wall49, 254, 182);\n wall49.setLocation(275, 175);\n Ground ground8 = new Ground();\n addObject(ground8, 289, 164);\n Ground ground9 = new Ground();\n addObject(ground9, 248, 167);\n ground8.setLocation(285, 157);\n ground9.setLocation(265, 157);\n ground9.setLocation(265, 157);\n removeObject(wall49);\n Ground ground10 = new Ground();\n addObject(ground10, 531, 236);\n ground10.setLocation(527, 226);\n ground10.setLocation(525, 226);\n ground10.setLocation(525, 225);\n Ground ground11 = new Ground();\n addObject(ground11, 515, 165);\n ground11.setLocation(525, 194);\n Ground ground12 = new Ground();\n addObject(ground12, 519, 159);\n ground12.setLocation(525, 159);\n ground11.setLocation(525, 193);\n ground12.setLocation(525, 158);\n ground12.setLocation(525, 157);\n ground11.setLocation(525, 192);\n Ground ground13 = new Ground();\n addObject(ground13, 497, 144);\n ground13.setLocation(491, 141);\n ground13.setLocation(495, 142);\n Ground ground14 = new Ground();\n addObject(ground14, 468, 124);\n ground14.setLocation(465, 127);\n Ground ground15 = new Ground();\n addObject(ground15, 432, 124);\n ground15.setLocation(435, 112);\n Ground ground16 = new Ground();\n addObject(ground16, 410, 114);\n ground16.setLocation(405, 98);\n Wall wall50 = new Wall();\n addObject(wall50, 365, 132);\n wall50.setLocation(369, 125);\n ground16.setLocation(405, 107);\n ground15.setLocation(435, 117);\n ground14.setLocation(465, 129);\n ground15.setLocation(435, 118);\n ground15.setLocation(435, 119);\n ground14.setLocation(465, 130);\n ground15.setLocation(435, 120);\n ground14.setLocation(465, 131);\n ground13.setLocation(495, 143);\n ground13.setLocation(495, 143);\n wall50.setLocation(375, 130);\n Ground ground17 = new Ground();\n addObject(ground17, 385, 113);\n ground17.setLocation(382, 107);\n ground17.setLocation(365, 107);\n Ground ground18 = new Ground();\n addObject(ground18, 387, 115);\n ground18.setLocation(386, 107);\n removeObject(ground17);\n Ground ground19 = new Ground();\n addObject(ground19, 368, 130);\n ground19.setLocation(365, 107);\n wall50.setLocation(351, 247);\n removeObject(wall50);\n Ground ground20 = new Ground();\n addObject(ground20, 297, 94);\n ground20.setLocation(323, 121);\n removeObject(ground20);\n Wall wall51 = new Wall();\n addObject(wall51, 232, 182);\n wall51.setLocation(222, 174);\n wall51.setLocation(225, 175);\n wall2.setLocation(25, 425);\n wall3.setLocation(25, 475);\n wall4.setLocation(25, 525);\n wall11.setLocation(25, 575);\n wall5.setLocation(25, 625);\n wall10.setLocation(25, 675);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(74, 675);\n wall9.setLocation(124, 675);\n wall6.setLocation(75, 675);\n wall9.setLocation(125, 675);\n wall7.setLocation(475, 375);\n wall7.setLocation(475, 375);\n wall7.setLocation(475, 375);\n wall7.setLocation(475, 375);\n wall7.setLocation(475, 375);\n wall7.setLocation(175, 675);\n wall8.setLocation(225, 675);\n wall12.setLocation(575, 375);\n wall12.setLocation(575, 375);\n wall12.setLocation(575, 375);\n wall12.setLocation(275, 675);\n wall26.setLocation(325, 675);\n wall43.setLocation(475, 275);\n wall27.setLocation(375, 675);\n wall28.setLocation(425, 675);\n wall29.setLocation(475, 675);\n wall30.setLocation(525, 675);\n wall31.setLocation(575, 675);\n Wall wall52 = new Wall();\n addObject(wall52, 634, 571);\n Wall wall53 = new Wall();\n addObject(wall53, 743, 590);\n Wall wall54 = new Wall();\n addObject(wall54, 709, 522);\n Wall wall55 = new Wall();\n addObject(wall55, 813, 540);\n Wall wall56 = new Wall();\n addObject(wall56, 862, 598);\n Wall wall57 = new Wall();\n addObject(wall57, 912, 528);\n Wall wall58 = new Wall();\n addObject(wall58, 974, 596);\n wall52.setLocation(625, 675);\n wall54.setLocation(709, 522);\n wall54.setLocation(675, 675);\n wall53.setLocation(725, 675);\n wall55.setLocation(775, 675);\n wall56.setLocation(825, 675);\n wall57.setLocation(875, 675);\n wall58.setLocation(925, 675);\n Wall wall59 = new Wall();\n addObject(wall59, 917, 608);\n wall59.setLocation(975, 675);\n Wall wall60 = new Wall();\n addObject(wall60, 953, 636);\n Wall wall61 = new Wall();\n addObject(wall61, 979, 580);\n Wall wall62 = new Wall();\n addObject(wall62, 925, 543);\n Wall wall63 = new Wall();\n addObject(wall63, 983, 504);\n Wall wall64 = new Wall();\n addObject(wall64, 925, 459);\n Wall wall65 = new Wall();\n addObject(wall65, 973, 406);\n Wall wall66 = new Wall();\n addObject(wall66, 919, 359);\n Wall wall67 = new Wall();\n addObject(wall67, 965, 308);\n Wall wall68 = new Wall();\n addObject(wall68, 916, 276);\n Wall wall69 = new Wall();\n addObject(wall69, 960, 223);\n Wall wall70 = new Wall();\n addObject(wall70, 916, 181);\n Wall wall71 = new Wall();\n addObject(wall71, 968, 153);\n Wall wall72 = new Wall();\n addObject(wall72, 915, 109);\n Wall wall73 = new Wall();\n addObject(wall73, 968, 63);\n wall73.setLocation(975, 25);\n wall73.setLocation(975, 25);\n wall72.setLocation(975, 75);\n wall71.setLocation(976, 125);\n wall70.setLocation(924, 181);\n wall71.setLocation(975, 125);\n wall70.setLocation(975, 175);\n wall69.setLocation(975, 225);\n wall68.setLocation(975, 275);\n wall67.setLocation(975, 325);\n wall66.setLocation(975, 375);\n wall65.setLocation(975, 425);\n wall64.setLocation(975, 475);\n wall63.setLocation(975, 525);\n wall63.setLocation(975, 525);\n wall61.setLocation(975, 575);\n wall60.setLocation(975, 625);\n wall62.setLocation(925, 25);\n Wall wall74 = new Wall();\n addObject(wall74, 879, 88);\n Wall wall75 = new Wall();\n addObject(wall75, 833, 35);\n Wall wall76 = new Wall();\n addObject(wall76, 789, 107);\n Wall wall77 = new Wall();\n addObject(wall77, 724, 28);\n Wall wall78 = new Wall();\n addObject(wall78, 690, 109);\n Wall wall79 = new Wall();\n addObject(wall79, 649, 39);\n wall79.setLocation(625, 25);\n wall78.setLocation(675, 25);\n wall77.setLocation(725, 24);\n wall77.setLocation(725, 25);\n wall76.setLocation(777, 22);\n wall76.setLocation(775, 25);\n wall75.setLocation(825, 25);\n wall74.setLocation(875, 25);\n wall13.setLocation(275, 625);\n wall14.setLocation(325, 625);\n wall15.setLocation(375, 625);\n wall16.setLocation(325, 575);\n ground.setLocation(235, 607);\n ground2.setLocation(205, 618);\n ground3.setLocation(175, 631);\n ground4.setLocation(145, 643);\n ground4.setLocation(145, 642);\n ground3.setLocation(175, 630);\n wall43.setLocation(433, 518);\n Wall wall80 = new Wall();\n addObject(wall80, 440, 612);\n wall80.setLocation(375, 575);\n wall43.setLocation(425, 525);\n wall80.setLocation(375, 475);\n wall18.setLocation(475, 525);\n wall18.setLocation(485, 525);\n wall43.setLocation(425, 525);\n wall80.setLocation(475, 575);\n wall18.setLocation(525, 575);\n wall44.setLocation(525, 525);\n wall51.setLocation(525, 475);\n wall44.setLocation(236, 337);\n ground10.setLocation(531, 417);\n wall44.setLocation(525, 425);\n ground10.setLocation(535, 407);\n ground10.setLocation(600, 482);\n wall51.setLocation(382, 377);\n wall44.setLocation(523, 469);\n wall51.setLocation(368, 434);\n wall44.setLocation(525, 525);\n ground10.setLocation(529, 428);\n wall44.setLocation(575, 575);\n wall51.setLocation(477, 476);\n wall44.setLocation(526, 437);\n wall51.setLocation(575, 575);\n wall44.setLocation(627, 425);\n Wall wall81 = new Wall();\n addObject(wall81, 681, 558);\n wall81.setLocation(625, 575);\n wall44.setLocation(625, 525);\n ground10.setLocation(626, 507);\n ground10.setLocation(625, 507);\n wall44.setLocation(625, 475);\n ground11.setLocation(625, 457);\n wall44.setLocation(624, 425);\n wall44.setLocation(625, 425);\n ground12.setLocation(625, 407);\n wall44.setLocation(404, 355);\n ground13.setLocation(595, 392);\n ground14.setLocation(565, 378);\n wall44.setLocation(555, 375);\n ground15.setLocation(536, 363);\n ground15.setLocation(533, 364);\n ground15.setLocation(535, 363);\n ground16.setLocation(505, 348);\n Wall wall82 = new Wall();\n addObject(wall82, 440, 341);\n wall82.setLocation(555, 325);\n Wall wall83 = new Wall();\n addObject(wall83, 469, 322);\n wall83.setLocation(505, 325);\n wall82.setLocation(455, 375);\n Wall wall84 = new Wall();\n addObject(wall84, 398, 381);\n wall84.setLocation(586, 220);\n wall83.setLocation(405, 375);\n ground18.setLocation(475, 333);\n wall44.setLocation(555, 375);\n wall44.setLocation(538, 455);\n ground18.setLocation(805, 539);\n ground18.setLocation(475, 348);\n wall44.setLocation(505, 375);\n wall82.setLocation(455, 375);\n ground16.setLocation(505, 357);\n ground15.setLocation(535, 369);\n ground14.setLocation(565, 380);\n ground14.setLocation(565, 381);\n ground15.setLocation(535, 370);\n ground18.setLocation(475, 357);\n wall82.setLocation(396, 421);\n ground18.setLocation(495, 357);\n wall44.setLocation(455, 375);\n wall82.setLocation(355, 375);\n ground5.setLocation(757, 587);\n ground5.setLocation(764, 642);\n ground19.setLocation(783, 642);\n wall82.setLocation(775, 621);\n ground19.setLocation(785, 642);\n ground5.setLocation(765, 642);\n wall82.setLocation(775, 610);\n ground19.setLocation(735, 638);\n ground5.setLocation(785, 642);\n ground19.setLocation(765, 642);\n wall82.setLocation(690, 585);\n ground6.setLocation(775, 627);\n ground9.setLocation(815, 642);\n ground8.setLocation(805, 627);\n p2.setLocation(100, 621);\n wall84.setLocation(925, 625);\n wall84.setLocation(441, 456);\n wall84.setLocation(355, 375);\n wall82.setLocation(675, 575);\n Wall wall85 = new Wall();\n addObject(wall85, 43, 46);\n wall85.setLocation(856, 618);\n wall85.turn(20);\n }",
"private void aretes_aR(){\n\t\tthis.cube[13] = this.cube[52]; \n\t\tthis.cube[52] = this.cube[19];\n\t\tthis.cube[19] = this.cube[1];\n\t\tthis.cube[1] = this.cube[28];\n\t\tthis.cube[28] = this.cube[13];\n\t}",
"public void imprimir() {\n\t\r\n\tSystem.out.println(\"El circulo tiene un perimetro de \"+ this.perimetro + \" y un area de \"+ this.area);\r\n\t\r\n\t}",
"public void movimiento(Point inicio,Point llegada, String color, int nomFicha){\n \n /*if(this.tablero[inicio.x][inicio.y]==0){\n JOptionPane.showMessageDialog(null, \"no hay nada en esa posición\");\n }*/\n \n this.tablero[inicio.x][inicio.y]=0;\n this.tablero[llegada.x][llegada.y]=nomFicha;\n if (color==\"blanco\"){\n this.posiBlancas[inicio.x][inicio.y]=0;\n this.posiBlancas[llegada.x][llegada.y]=nomFicha;\n this.posiNegras[llegada.x][llegada.y]=0;\n }else{\n this.posiNegras[inicio.x][inicio.y]=0;\n this.posiNegras[llegada.x][llegada.y]=nomFicha;\n this.posiBlancas[llegada.x][llegada.y]=0;\n }\n\n }",
"void Death(){\r\n if (vie==0){\r\n this.plateau[this.x][this.y]='0';\r\n }\r\n }",
"private int resolver(int x, int y, int pasos) {\n \n \tif(visitado[x][y]){ // si ya he estado ahi vuelvo (como si fuera una pared el sitio en el que ya he estado)\n \t\treturn 0;\n \t}\n \tvisitado[x][y]=true; // marcamos el sitio como visitado y lo pintamos de azul\n \tStdDraw.setPenColor(StdDraw.BLUE);\n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \tif(x==Math.round(N/2.0)&& y== Math.round(N/2.0)){// Si estoy en la posicion central cambio encontrado y lo pongo true.\n \t\ttotal=pasos;\n \t\tencontrado=true;\n \t\treturn total;\n \t}\n \tif(encontrado)return total;\n \t\n \tdouble random = Math.random()*11;//creo un numero aleatorio\n \t\n \tif(random<3){\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);// voy pal norte y vuelvo a empezar el metodo con un paso mas\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \t}\n \tif (random >=3 && random<6){\n \t\tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \t}\n \tif(random>=6 && random<9){\n \t\tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \t}\n \tif(random >=9){\n \t\tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \t}\n \t\n \tif(encontrado){\n \t\treturn total;\n \t}\n \tStdDraw.setPenColor(StdDraw.GRAY);// si no puedo ir a ningún lado lo pinto de gris \n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \treturn 0;// vuelvo al punto anterior \n \n }",
"void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}",
"NavePosicao(int frame, double angulo) {\r\n\t\tthis.frame = frame;\r\n\t\tthis.angulo = angulo;\r\n }",
"private void coins_a1R(){\n\t\tthis.cube[13] = this.cube[51]; \n\t\tthis.cube[51] = this.cube[20];\n\t\tthis.cube[20] = this.cube[2];\n\t\tthis.cube[2] = this.cube[29];\n\t\tthis.cube[29] = this.cube[13];\n\t}",
"public Cuadro getCuadro(final int x, final int y){\r\n if(x < 0 || y < 0 || x >= ancho || y >=alto){ //permite la salida del array para que se pueda \"salir\" del mapa generado.\r\n return Cuadro.VACIO;\r\n }\r\n switch (cuadros[x + y * ancho]) {\r\n case 0:\r\n return Cuadro.TIERRA;\r\n case 1:\r\n return Cuadro.AGUA;\r\n case 2:\r\n return Cuadro.BANDERA_P1;\r\n case 3:\r\n return Cuadro.BANDERA_P2;\r\n case 4:\r\n return Cuadro.DETALLE_PARED1;\r\n case 5:\r\n return Cuadro.ESPINO_INF_CON_DETALLE;\r\n case 6:\r\n return Cuadro.ESPINO_INF_SIN_DETALLE;\r\n case 7:\r\n return Cuadro.ESPINO_SUP;\r\n case 8:\r\n return Cuadro.ESPINO_SUP_TORRE;\r\n case 9:\r\n return Cuadro.ESPINO_SUP_TORRE_DETALLE;\r\n case 10:\r\n return Cuadro.ESQUINA_INF_TORRE_DER;\r\n case 11:\r\n return Cuadro.ESQUINA_INF_TORRE_IZ;\r\n case 12:\r\n return Cuadro.ESQUINA_SUP_DER_TIERRA;\r\n case 13:\r\n return Cuadro.ESQUINA_SUP_DER_TIERRA_INF;\r\n case 14:\r\n return Cuadro.ESQUINA_SUP_DER_TIERRA_MED;\r\n case 15:\r\n return Cuadro.ESQUINA_SUP_DER_TIERRA_MED2;\r\n case 16:\r\n return Cuadro.ESQUINA_SUP_IZ_TIERRA;\r\n case 17:\r\n return Cuadro.ESQUINA_SUP_IZ_TIERRA_INF;\r\n case 18:\r\n return Cuadro.ESQUINA_SUP_IZ_TIERRA_MEDIO;\r\n case 19:\r\n return Cuadro.ESQUINA_SUP_IZ_TIERRA_MEDIO2;\r\n case 20:\r\n return Cuadro.ESQUINA_SUP_TORRE_DER;\r\n case 21:\r\n return Cuadro.ESQUINA_SUP_TORRE_DER_MEDIO;\r\n case 22:\r\n return Cuadro.ESQUINA_SUP_TORRE_DER_MEDIO2;\r\n case 23:\r\n return Cuadro.ESQUINA_SUP_TORRE_DER_MEDIO3;\r\n case 24:\r\n return Cuadro.ESQUINA_SUP_TORRE_IZ;\r\n case 25:\r\n return Cuadro.ESQUINA_SUP_TORRE_IZ_MEDIO;\r\n case 26:\r\n return Cuadro.ESQUINA_SUP_TORRE_IZ_MEDIO2;\r\n case 27:\r\n return Cuadro.ESQUINA_SUP_TORRE_IZ_MEDIO3;\r\n case 28:\r\n return Cuadro.HUECO_CUEVA;\r\n case 29:\r\n return Cuadro.INF_MED_TIERRA;\r\n case 30:\r\n return Cuadro.INF_TORRE;\r\n case 31:\r\n return Cuadro.MED_MED_TIERRA;\r\n case 32:\r\n return Cuadro.MURO_INF;\r\n case 33:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_INF_DER;\r\n case 34:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_INF_IZ;\r\n case 35:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_INF_MED;\r\n case 36:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_SUP_DER;\r\n case 37:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_SUP_IZ;\r\n case 38:\r\n return Cuadro.ORILLA_POSTERIOR_CURV;\r\n case 39:\r\n return Cuadro.ORILLA_POSTERIOR_RECT;\r\n case 40:\r\n return Cuadro.PARED_CON_DETALLE;\r\n case 41:\r\n return Cuadro.PARED_CON_DETALLE_SIN_BORDE;\r\n case 42:\r\n return Cuadro.PARED_SIN_DETALLE;\r\n case 43:\r\n return Cuadro.POSTE_FRONTAL;\r\n case 44:\r\n return Cuadro.POSTE_POSTERIOR;\r\n case 45:\r\n return Cuadro.PUENTE_AGUA_DER;\r\n case 46:\r\n return Cuadro.PUENTE_AGUA_IZ;\r\n case 47:\r\n return Cuadro.PUENTE_AGUA_MEDIO;\r\n case 48:\r\n return Cuadro.PUENTE_ORILLA_DER;\r\n case 49:\r\n return Cuadro.PUENTE_ORILLA_IZ;\r\n case 50:\r\n return Cuadro.PUENTE_ORILLA_MED;\r\n case 51:\r\n return Cuadro.PUERTA_ABAJO;\r\n case 52:\r\n return Cuadro.PUERTA_ARRIBA;\r\n case 53:\r\n return Cuadro.SUP_MED_TIERRA;\r\n default:\r\n return Cuadro.VACIO;\r\n }\r\n }",
"@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }",
"public void iniciar(){\nSystem.out.println(\"El primer contador comenzara en el número 0\");\ncontador=0;\nSystem.out.println(\"El segundo contador comenzara en el número 100\");\ncontador2=100;}",
"@Test\n public void testcalPerimeterRectangle2() {\n double ex = 8;\n \n startPoint.setX(-1);\n startPoint.setY(-1);\n endPoint.setX(-3);\n endPoint.setY(-3);\n \n double ac = rec.calPerimeterRectangle(startPoint, endPoint);\n assertEquals(ex, ac, 0);\n }",
"public Wall(int x1, int y1,int x2,int y2) {\r\n\tthis.x1 = x1 + TRANSLATION;\r\n\tthis.x2 = x2 + TRANSLATION;\r\n\tthis.y1 = y1 + TRANSLATION;\r\n\tthis.y2 = y2 + TRANSLATION;\r\n\tbustedWall = false; \r\n}",
"public void Colision2(Rect rect1, Rect rect2, Rect rect3){\r\n\r\n if (Rect.intersects(rect1, rect2)) {\r\n xPos =0;\r\n yPos = 0;\r\n Puntos += 100;\r\n }\r\n else if(Rect.intersects(rect2,rect3)){\r\n yPos = 0;\r\n xPos = 0;\r\n vidas--;\r\n Puntos = Puntos-50;\r\n\r\n }\r\n }",
"public Ground(int x, int y)\n {\n // initialise instance variables\n xleft= x;\n ybottom= y;\n \n }",
"@Override\n public void paint(Graphics g){\n GraficasEstatus cantidad=new GraficasEstatus();\n super.paint(g);\n if(bandera==true){\n \n int nuevoingreso=cantidad.nuevoIngreso();\n int noreparado=cantidad.noReparado();\n int enrevision=cantidad.enRevision();\n int reparado=cantidad.reparado();\n int entregado=cantidad.entregado();\n int otro=cantidad.otro();\n \n int valormayor=mayorValor(nuevoingreso, noreparado, enrevision, reparado, entregado, otro);\n \n int ningreso=nuevoingreso*400/valormayor;\n int nreparados=noreparado*400/valormayor;\n int erevision=enrevision*400/valormayor;\n int reparados=reparado*400/valormayor;\n int entregados=entregado*400/valormayor;\n int otros=otro*400/valormayor;\n \n g.setColor(new Color(255,170,0));\n g.fillRect(100, 100, ningreso, 40);\n g.drawString(\"Nuevo ingreso\", 10, 118);\n g.drawString(\"Cantida \"+nuevoingreso, 10, 133);\n \n g.setColor(new Color(255,0,0));\n g.fillRect(100, 150, nreparados, 40);\n g.drawString(\"No reparados\", 10, 168);\n g.drawString(\"Cantida \"+noreparado, 10, 180);\n \n g.setColor(new Color(0,0,255));\n g.fillRect(100, 200, erevision, 40);\n g.drawString(\"En revision\", 10, 218);\n g.drawString(\"Cantida \"+enrevision, 10, 233);\n \n g.setColor(new Color(0,150,255));\n g.fillRect(100, 250, reparados, 40);\n g.drawString(\"Reparados\", 10, 268);\n g.drawString(\"Cantida \"+reparado, 10, 280);\n \n g.setColor(new Color(0,130,0));\n g.fillRect(100, 300, entregados, 40);\n g.drawString(\"Entregados\", 10, 318);\n g.drawString(\"Cantida \"+entregado, 10, 333);\n \n g.setColor(new Color(150,100,100));\n g.fillRect(100, 350, otros, 40);\n g.drawString(\"Otro\", 10, 368);\n g.drawString(\"Cantida \"+otro, 10, 380);\n \n }\n }",
"public JPanel graficarMem (){\r\n\t\tJPanel panel = new JPanel(){\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\t// dibujo la memoria\r\n\t\t\t\tint xpoints[] = { 20, 20, 140, 140};\r\n\t\t\t\tint ypoints[] = { 0, 15 * tamaņo,15 * tamaņo, 0 };\r\n\t\t\t\tint npoints = 4;\r\n\t\t\t\tg.drawPolygon(xpoints, ypoints, npoints);\r\n\t\t\t\t\r\n\t\t\t\t// dibujo las lineas de separacion de los espacios de la memoria\r\n\t\t\t\tint altura = 0;\r\n\t\t\t\tint sumaEspacios = 0;\r\n\t\t\t\tg.drawString(sumaEspacios + \"\", 0, 15);\r\n\t\t\t\tfor(int i = 0; i < numEspacios; i++){\r\n\t\t\t\t\taltura += espacios[i].getTamaņo() * 15;\r\n\t\t\t\t\tsumaEspacios += espacios[i].getTamaņo();\r\n\t\t\t\t\tg.drawString(sumaEspacios + \"\", 0, altura);\r\n\t\t\t\t\tg.drawString(espacios[i].getTamaņo() + \"\", 140, altura - (espacios[i].getTamaņo() * 15) / 2);\r\n\t\t\t\t\tg.drawLine(20, altura, 140, altura);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// dibujo las variables de los espacios\r\n\t\t\t\tint altura1 = 0;\r\n\t\t\t\tBasicStroke Bs = new BasicStroke(2f);\r\n\t\t\t\tGraphics2D g2D = (Graphics2D) g;\r\n\t\t\t\tg2D.setStroke(Bs);\r\n\t\t\t\tfor (int i = 0; i < numEspacios; i++) {\r\n\t\t\t\t\tint tamV = 0;\r\n\t\t\t\t\tint tamE = espacios[i].getTamaņo() * 15;\r\n\t\t\t\t\tint alturaV = altura1; \r\n\t\t\t\t\tfor (int j = 0; j < espacios[i].getVarEnMem().size(); j++) {\r\n\t\t\t\t\t\ttamV = espacios[i].getVarEnMem().get(j).getTamaņo() * 15;\r\n\t\t\t\t\t\tint puntosY[] = { alturaV, alturaV + tamV, alturaV + tamV, alturaV};\r\n\t\t\t\t\t\tg2D.setColor(espacios[i].getVarEnMem().get(j).getColor());\r\n\t\t\t\t\t\tif (espacios[i].getVarEnMem().get(j).getTamaņo() > 1) {\r\n\t\t\t\t\t\t\tg2D.drawString(espacios[i].getVarEnMem().get(j).getNombre() + \" \" + espacios[i].getVarEnMem().get(j).getTamaņo() + \"M\", 90, alturaV + (tamV / 2));\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tg2D.drawString(espacios[i].getVarEnMem().get(j).getNombre() + \" \" + espacios[i].getVarEnMem().get(j).getTamaņo() + \"M\", 90, alturaV + tamV);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg2D.drawPolygon(xpoints, puntosY, npoints);\r\n\t\t\t\t\t\talturaV += tamV; \r\n\t\t\t\t\t}\r\n\t\t\t\t\taltura1 += tamE;\r\n\t\t\t\t}\r\n\t\t\t\tg2D.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\tpanel.setPreferredSize(new Dimension(160, 15*this.getTamaņo() + 10));\r\n\t\t\r\n\t\treturn panel;\r\n\t}",
"public void generete() {\n int minQuantFig = 1,\r\n maxQuantFig = 10,\r\n minNum = 1,\r\n maxNum = 100,\r\n minColor = 0,\r\n maxColor = (int)colors.length - 1,\r\n\r\n // Initialize figures property for random calculations\r\n randomColor = 0,\r\n randomFigure = 0,\r\n\r\n // Squere property\r\n randomSideLength = 0,\r\n\r\n // Circle property\r\n randomRadius = 0,\r\n \r\n // IsoscelesRightTriangle property \r\n randomHypotenus = 0,\r\n \r\n // Trapizoid properties\r\n randomBaseA = 0,\r\n randomBaseB = 0,\r\n randomAltitude = 0;\r\n\r\n // Generate random number to set figueres's quantaty\r\n setFigureQuantaty( generateWholoeNumInRange(minQuantFig, maxQuantFig) );\r\n\r\n for( int i = 0; i < getFigureQuantaty(); i++ ) {\r\n\r\n // Convert double random value to int and close it in range from 1 to number of elements in array\r\n randomFigure = (int)( Math.random() * figures.length );\r\n \r\n randomColor = generateWholoeNumInRange( minColor, maxColor ); // Get random color's index from colors array\r\n\r\n // Create new figure depending on randomFigure \r\n switch (figures[randomFigure]) {\r\n\r\n case \"Circle\":\r\n\r\n randomRadius = generateWholoeNumInRange( minNum, maxNum ); // Get random value of circle's radius;\r\n\r\n Circle newCircle = new Circle( colors[randomColor], randomRadius ); // Initialize Circle with random parameters\r\n\r\n newCircle.drawFigure();\r\n \r\n break;\r\n\r\n case \"Squere\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n Squere newSquere = new Squere( colors[randomColor], randomSideLength ); // Initialize Circle with random parameters\r\n\r\n newSquere.drawFigure();\r\n\r\n break;\r\n\r\n case \"Triangle\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n randomHypotenus = generateWholoeNumInRange( minNum, maxNum ); // Get random value of hypotenus;\r\n\r\n IsoscelesRightTriangle newTriangle = new IsoscelesRightTriangle( colors[randomColor], randomSideLength, randomHypotenus ); // Initialize Circle with random parameters\r\n\r\n newTriangle.drawFigure();\r\n\r\n break;\r\n\r\n case \"Trapezoid\":\r\n\r\n randomBaseA = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side A;\r\n\r\n randomBaseB = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side B;\r\n\r\n randomAltitude = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's altitude;\r\n\r\n Trapezoid newTrapezoid = new Trapezoid( colors[randomColor], randomBaseA, randomBaseB, randomAltitude ); // Create new Trapezoid with random parameters\r\n\r\n newTrapezoid.drawFigure();\r\n\r\n break;\r\n\r\n };\r\n };\r\n }",
"public static void clearXY()\r\n{\r\n\tx = 0;\r\n\ty = 0; \r\n\t\r\n}",
"public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tRectaangle rec = new Rectaangle();\n\t\tCircle ci = new Circle();\n\t\tArea are;\n\t\tare = rec;\n\t\tSystem.out.println(\"area of rectangle is \"+ are.calculation(15,10));\n\t\tare = ci;\n\t\tSystem.out.println(\"area of circle is \"+ are.calculation(16, 0));\n\t\t\n\t}",
"public Jugador(float x, float y, Colisiones colision, Main main,float wReescalado,float hReescalado) {\n this.x = x;\n this.y = y;\n this.colisiones=colision;\n this.main=main;\n this.wReescalado=wReescalado;\n this.hReescalado=hReescalado;\n rectangles=colisiones.getRect();//Obtengo el array de rectangulo en colisiones\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));//Asigno a texture el archivo png de mi personaje\n jugadorVista = \"\";//Agigno comillas a jugador vista\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());//Creo el rectangulo de mi jugador con las propiedades de texture\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);//Divido mi texture region en las partes indicadas para asignarlas a la matria\n //Los valores de la division de tpm equivalen al numero de filas y numero de columnas de mi png(En mi caso tengo 4 filas que son los diferentes movimientos y 4 columnas una para cada movimiento)\n //Ejemplo:Fila 1-->Movimiento a la derecha: Columna 1-->Quieto Columna -->Mueve un pie: Columna 3 --->Muevo el otro pie: Columna 4-->Vuelvo a estar quieto\n regions = new TextureRegion[4];//Asigno al array regions la longuitud por la que haya dividido en ancho my imagen\n for (int b = 0; b < regions.length; b++) {//Con este bucle voy cargando las imagenes y da la ilusion de que anda\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);//Inicializamos el constructor pasandole por parametros el tiempo que dura y el array\n tiempo = 0f;\n }\n }",
"Oval(int width, int height, int x, int y){\n setWidth(width);\n setHeight(height);\n setX(x);\n setY(y);\n }",
"public void revisaColisionMapa() {\n\t\tactualCol = (int)x / tamTile;\n\t\tactualRen = (int)y / tamTile;\n\t\t\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\t\t\n\t\txtemp = x;\n\t\tytemp = y;\n\t\t\n\t\tcalcularEsquinas(x, ydest);\n\t\tif(dy < 0) {\n\t\t\tif(arribaIzq || arribaDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = actualRen * tamTile + claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\tif(dy > 0) {\n\t\t\tif(abajoIzq || abajoDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tcayendo = false;\n\t\t\t\tytemp = (actualRen + 1) * tamTile - claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcalcularEsquinas(xdest, y);\n\t\tif(dx < 0) {\n\t\t\tif(arribaIzq || abajoIzq) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = actualCol * tamTile + clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif(dx > 0) {\n\t\t\tif(arribaDer || abajoDer) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (actualCol + 1) * tamTile - clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!cayendo) {\n\t\t\tcalcularEsquinas(x, ydest + 1);\n\t\t\tif(!abajoIzq && !abajoDer) {\n\t\t\t\tcayendo = true;\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.6699462",
"0.66065323",
"0.6588666",
"0.64153254",
"0.63823265",
"0.6118609",
"0.60475504",
"0.6042135",
"0.6027376",
"0.5936941",
"0.5929685",
"0.5929071",
"0.58428746",
"0.5786203",
"0.5690202",
"0.5576661",
"0.5559665",
"0.5540196",
"0.5528619",
"0.55277395",
"0.55239433",
"0.55130786",
"0.550546",
"0.5504372",
"0.5495394",
"0.5490373",
"0.54594386",
"0.5451348",
"0.54435164",
"0.54228497",
"0.54043424",
"0.5402835",
"0.54004645",
"0.538627",
"0.5381075",
"0.53672373",
"0.53526217",
"0.5343974",
"0.53375",
"0.5333034",
"0.53262085",
"0.5319038",
"0.5317862",
"0.5311701",
"0.53108275",
"0.5306549",
"0.530209",
"0.52981913",
"0.52922255",
"0.52889025",
"0.52827877",
"0.52776015",
"0.5253189",
"0.5247926",
"0.5241853",
"0.5236884",
"0.52300245",
"0.5229859",
"0.5228903",
"0.5227928",
"0.52244544",
"0.5218405",
"0.5218145",
"0.5217449",
"0.52165127",
"0.5209475",
"0.52077514",
"0.520559",
"0.5199181",
"0.5198029",
"0.519448",
"0.51928157",
"0.5192148",
"0.51795906",
"0.5173983",
"0.51614785",
"0.51602757",
"0.5158118",
"0.515801",
"0.5157021",
"0.51561826",
"0.51461947",
"0.5143358",
"0.51367784",
"0.51353616",
"0.5134777",
"0.513232",
"0.5131882",
"0.51266176",
"0.5126085",
"0.5125932",
"0.51254904",
"0.5121814",
"0.5117641",
"0.51148236",
"0.51146555",
"0.5114076",
"0.51120836",
"0.51015174",
"0.5092437",
"0.5086043"
] | 0.0 | -1 |
Returns the children of the specified node. Must not contain null. | @NotNull
public abstract JBIterable<T> children(@NotNull T root); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Node<T>> children();",
"public @NonNull List<@NonNull Node<@Nullable T>> getChildren() {\n return Collections.unmodifiableList(this.children);\n }",
"public JodeList children(String nodeName) {\n return this.children().filter(nodeName);\n }",
"public JodeList children() {\n return new JodeList(node.getChildNodes());\n }",
"private List<Node<E>> getChildrenForNode(Node<E> node) {\n ArrayList<Node<E>> list = new ArrayList<>();\n for (Node<E> child : node.getChilden()) {\n list.add(child);\n }\n return list;\n }",
"private List<SimpleNode> getChildren(SimpleNode node) {\n Class<?> nodeType = node.getClass();\n List<SimpleNode> children = new ArrayList<>();\n for (int i = 0; i < node.jjtGetNumChildren(); i++) {\n children.addAll(flatten(node.jjtGetChild(i), nodeType));\n }\n return children;\n }",
"public Node[] getChildren() {\n\t\treturn children.toArray(new Node[0]);\n\t}",
"public static ArrayList<Node> getAllChildren(Node node) {\r\n ArrayList<Node> list = new ArrayList<Node>();\r\n if (node == null)\r\n return list;\r\n\r\n for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {\r\n list.add(child);\r\n }\r\n\r\n return list;\r\n }",
"Node[] getChildren(Node node);",
"public List<TreeNode> getChildren ()\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"getChildren of \" + this);\r\n }\r\n\r\n return children;\r\n }",
"public Iterator<ParseTreeNode> children() {\r\n if ((_children == null) || (_children.size() == 0)) {\r\n return NULL_ITERATOR;\r\n }\r\n return _children.iterator();\r\n }",
"public Node[] getChildren(){return children;}",
"public Node[] getChildren(){\n return children.values().toArray(new Node[0]);\n }",
"public List<Node> getChildren() {\r\n\t\t\tchildren.reset();\r\n\t\t\treturn children;\r\n\t\t}",
"Collection<DendrogramNode<T>> getChildren();",
"public ArrayList<Node> getChildren() {\n return children;\n }",
"@Nonnull\n Iterable<? extends T> getChildren();",
"public ArrayList<Node> getChildren() { return this.children; }",
"public List<EntityHierarchyItem> children() {\n return this.innerProperties() == null ? null : this.innerProperties().children();\n }",
"public Enumeration<Node> children() { return null; }",
"public ArrayList<Node> getChildren(){\n return children;\n }",
"public static Stream<Node> childNodesOf(@Nonnull final Node node) {\n\t\treturn streamOf(node.getChildNodes());\n\t}",
"@Override\r\n\tpublic List<TreeNode> getChildren() {\n\t\tif(this.children==null){\r\n\t\t\treturn new ArrayList<TreeNode>();\r\n\t\t}\r\n\t\treturn this.children;\r\n\t}",
"@Override\n\tpublic TreeNode[] getChildren() {\n\t\treturn this.children ;\n\t}",
"public java.util.List<Node> getChildren(String... args) throws ChildNotFoundException {\n\t\tjava.util.List<Node> children = new ArrayList<Node>();\n\t\tfor(Node node : selected_nodes) {\n\t\t\ttry {\n\t\t\t\tchildren.addAll(node.getChildren(args));\n\t\t\t} catch (ChildNotFoundException e) {}\n\t\t}\n\t\tif(children.isEmpty()) {\n\t\t\tthrow new ChildNotFoundException(\"No children found with that path\");\n\t\t}\n\t\treturn children;\n\t}",
"public ParseTree[] getChildren() {\n\t\treturn children;\n\t}",
"public List<PafDimMember> getChildren() {\r\n\t\t\r\n\t\tList<PafDimMember> childList = null;\r\n\t\t\r\n\t\t// If no children are found, return empty array list\r\n\t\tif (children == null) {\r\n\t\t\tchildList = new ArrayList<PafDimMember>();\r\n\t\t} else {\r\n\t\t\t// Else, return pointer to children\r\n\t\t\tchildList = children;\r\n\t\t}\r\n\t\treturn childList;\r\n\t}",
"public List<TreeNode> getChildrenNodes();",
"protected final synchronized Iterator<T> children() {\n if( children == null ) {\n children = Collections.emptyList();\n }\n \n return children.iterator();\n }",
"@Override\r\n\tpublic List<Node> getChildren() {\r\n\t\treturn null;\r\n\t}",
"public java.util.List<BinomialTree<KEY, ITEM>> children()\n\t{\n\t\treturn _children;\n\t}",
"public Vector getChildren()\r\n\t{\r\n\t\treturn m_children;\r\n\t}",
"public List<String> getChildren() {\n\t\treturn null;\n\t}",
"@Override\n public List<TreeNode<N>> children() {\n return Collections.unmodifiableList(children);\n }",
"@Override\n\tpublic Set<HtmlTag> getChildren()\n\t{\n\t\tImmutableSet.Builder<HtmlTag> childrenBuilder = ImmutableSet.builder();\n\t\tfor(TreeNode<? extends HtmlTag> child : node.getChildren())\n\t\t{\n\t\t\tchildrenBuilder.add(child.getValue());\n\t\t}\n\t\treturn childrenBuilder.build();\n\t}",
"public List<TreeNode> getChildren() {\n\t\treturn children;\n\t}",
"public Vector<GraphicalLatticeElement> getChildren() {\n\t\tVector<GraphicalLatticeElement> children = new Vector<GraphicalLatticeElement>();\n\t\tif (childrenEdges != null)\n\t\t\tfor (int i = 0; i < childrenEdges.size(); i++) {\n\t\t\t\tEdge edge = childrenEdges.elementAt(i);\n\t\t\t\tchildren.add(edge);\n\t\t\t\tchildren.add(edge.getDestination());\n\t\t\t}\n\t\t\n\t\treturn children;\n\t}",
"public static DocumentFragment extractChildren(final Node node) throws DOMException {\n\t\treturn extractChildren(node, true); //extract the childen by removing them\n\t}",
"public XMLElement[] getChildren()\n/* */ {\n/* 532 */ int childCount = getChildCount();\n/* 533 */ XMLElement[] kids = new XMLElement[childCount];\n/* 534 */ this.children.copyInto(kids);\n/* 535 */ return kids;\n/* */ }",
"public abstract List<Node> getChildNodes();",
"List<HNode> getChildren(Long id);",
"@JsProperty\n NodeList getChildNodes();",
"public Collection<ChildType> getChildren();",
"@Override\n\tpublic List<Node> chilren() {\n\t\treturn children;\n\t}",
"public List<FileNode> getChildren() {\r\n return this.children;\r\n }",
"public ArrayList<BTreeNode<E>> getChildren() {\n\t\treturn children;\n\t}",
"public ListNode[] getChildren(){\n\t\tListNode[] ret = new ListNode[length()];\n\t\tListNode temp = firstNode;\n\t\tfor(int i = 0; i < ret.length && temp != null; i++){\n\t\t\tret[i] = temp;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn ret;\n\t}",
"public List<String> children() {\n return this.children;\n }",
"public SeleniumQueryObject children() {\n\t\treturn ChildrenFunction.children(this, elements);\n\t}",
"public Vector getChildren() {\n return this.children;\n }",
"@DISPID(4)\n\t// = 0x4. The runtime will prefer the VTID if present\n\t@VTID(10)\n\tcom.gc.IList children();",
"public LinkedList<Node> getChildren() { \r\n LinkedList<Node> nodes = new LinkedList<>();\r\n for(int i=0;i<=size;i++)\r\n nodes.add(children[i]);\r\n return nodes;\r\n }",
"public List<XML2JSONObject> getChildren() {\r\n return _childs;\r\n }",
"public ArrayList<LexiNode> getChilds(){\n\t\treturn childs;\n\t}",
"public Iterator<String> listChildren(T node){\n\t\tT target = node;\n\t\tSet<Edge<T,E>> alledges = this.graph.getEdges(target);\n\t\tList<String> children = new ArrayList<String>();\n\t\tfor(Edge<T, E> e : alledges) {\n\t\t\tchildren.add(e.getChild()+\"(\"+e.getName()+\")\");\n\t\t}\n\t\tCollections.sort(children);\n\t\tIterator<String> itr = children.iterator();\n\t\treturn itr;\n\t}",
"@NotNull\n @Override\n public TreeElement[] getChildren() {\n return callChildren(this, navigationItem);\n }",
"public AST[] getChildren()\r\n {\n \tif (children == null) {\r\n \t\tList<AST> temp = new java.util.ArrayList<AST>();\r\n \t\ttemp.addAll(fields);\r\n \t\ttemp.addAll(predicates);\r\n \t\ttemp.addAll(constructors);\r\n \t\ttemp.addAll(methods);\r\n \t\tchildren = (AST[]) temp.toArray(new AST[0]);\r\n \t}\r\n \treturn children;\r\n }",
"public ArrayList<PiptDataElement> getChildren()\n {\n\treturn children;\n }",
"public JodeList children(Predicate<Jode> filter) {\n return this.children().filter(filter);\n }",
"public ResultMap<BaseNode> listChildren();",
"Iterable<Position<E>> children(Position<E> p) throws IllegalArgumentException;",
"public ArrayList getChildren()\n {\n return children;\n }",
"public List<Element> getChildElements() {\n return getChildNodes().stream().filter(n -> n instanceof Element)\n .map(n -> (Element) n).collect(Collectors.toUnmodifiableList());\n }",
"public List getChildren(iNamedObject no)\n\t{\n\t\tif (no instanceof iNamedGroup)\n\t\t{\n\t\t\treturn ((iNamedGroup) no).getChildrenList();\n\t\t}\n\t\treturn emptyVec;\n\t}",
"public static ArrayList<Node> getChildrenByTagName(Node node, String name) {\r\n ArrayList<Node> list = new ArrayList<Node>();\r\n if (node == null)\r\n return list;\r\n\r\n for (Node child = node.getFirstChild(); child != null; child = child\r\n .getNextSibling()) {\r\n if (child.getNodeName().equals(name))\r\n list.add(child);\r\n }\r\n\r\n return list;\r\n }",
"public Vector<Node> getChildren(){\n\t\t Vector<Node> children = new Vector<>(0);\n\t\t Iterator<Link> l= myLinks.iterator();\n\t\t\twhile(l.hasNext()){\n\t\t\t\tLink temp=l.next();\n\t\t\t\tif(temp.getM().equals(currNode))\n\t\t\t\t children.add(temp.getN());\n\t\t\t\tif(temp.getN().equals(currNode))\n\t\t\t\t children.add(temp.getM());\n\t\t\t}\n\t\treturn children;\n\t}",
"public List<ChronologElement> getChildren() {\r\n return children;\r\n }",
"public List<GuiElementBase> getChildren()\n\t\t{ return Collections.unmodifiableList(children); }",
"public Enumeration enumerateChildren() {\n return this.children.elements();\n }",
"public List<NamespaceNode> getChildNodes() {\n return childNodes;\n }",
"public Vector getChildren() {\n return null;\n }",
"public Human[] getChildren() {\n return children;\n }",
"public Collection<VisualLexiconNode> getChildren() {\n \t\treturn children;\n \t}",
"public ArrayList<Node> getChildren() {\n if (children != null) return children;\n children = new ArrayList<>();\n for (Move m : state.getLegalMoves()) {\n Node child = new Node(this, m);\n children.add(child);\n }\n return children;\n }",
"public List<HtmlMap<T>> getChildren()\n\t{\n\t\treturn m_children;\n\t}",
"public String getChildren() {\n return children;\n }",
"public Element[] getChildren(Element element) {\n return DocumentHelper.getChildren(element, getNamespaceURI());\n }",
"@SuppressWarnings(\"unchecked\")\n public Iterator<Post> getChildren() {\n if(this.resource != null) {\n java.util.List<Resource> childrenList = IteratorUtils.toList(this.resource.getChildren().iterator());\n Iterator<Resource> reverseChildren = new ReverseListIterator(childrenList);\n return ResourceUtil.adaptTo(reverseChildren, Post.class);\n } else {\n return null;\n }\n }",
"public String getChildren() {\n\t\treturn children;\n\t}",
"public Object[] getChildren(Object parentElement) {\n\t\treturn null;\r\n\t}",
"public static void computeChildren() {\n\t\tArrayList<BNNode> children = new ArrayList<BNNode>();\n\t\t// For each node, build an array of children by checking which nodes have it as a parent.\n\t\tfor (BNNode node : nodes) {\n\t\t\tchildren.clear();\n\t\t\tfor (BNNode node2 : nodes) {\n\t\t\t\tif (node == node2)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (BNNode node3 : node2.parents)\n\t\t\t\t\tif (node3 == node)\n\t\t\t\t\t\tchildren.add(node2);\n\t\t\t}\n\t\t\tnode.children = new BNNode[children.size()];\n\t\t\tnode.children = (BNNode[]) children.toArray(node.children);\n\t\t}\n\t}",
"protected abstract List<T> getChildren();",
"public String[] listChildren()\n/* */ {\n/* 519 */ int childCount = getChildCount();\n/* 520 */ String[] outgoing = new String[childCount];\n/* 521 */ for (int i = 0; i < childCount; i++) {\n/* 522 */ outgoing[i] = getChild(i).getName();\n/* */ }\n/* 524 */ return outgoing;\n/* */ }",
"@objid (\"808c084f-1dec-11e2-8cad-001ec947c8cc\")\n public final List<GmNodeModel> getChildren() {\n return new ArrayList<>(this.children);\n }",
"public ListIterator getChildNodes(FONode childNode) {\n if (childNodes != null) {\n int i = childNodes.indexOf(childNode);\n if (i >= 0) {\n return childNodes.listIterator(i);\n }\n }\n return null;\n }",
"public Set<VfsFile> getChildren()\n {\n return children;\n }",
"public ArrayList<Node> getList(){\n \treturn this.children;\n }",
"public List<PlanNode> getChildren() {\n return childrenView;\n }",
"ArrayList<Expression> getChildren();",
"public List<RealObject> getChildren();",
"@Override\n public LinkedList<ApfsElement> getChildren() {\n return this.children;\n }",
"@Override\n public List<String> getChildren(String path) {\n return null;\n }",
"public Collection<BaseGenerator> \n getChildren() \n {\n return Collections.unmodifiableCollection(pChildren.values());\n }",
"public List<IContentNode> getChilds(int start, int limit);",
"public ArrayList<ExpandableListItems_Child> getChildren()\n {\n return children;\n }",
"public List<TWidget> getChildren() {\n return children;\n }",
"@Override\n\tpublic Object[] getChildren(Object parentElement) {\n\t\tObject[] children = this.getList(parentElement, POCOutlineContentProvider.KEY_CHILDREN);\n\t\treturn children != null ? children : new Object[0];\n\t}",
"@objid (\"808c0847-1dec-11e2-8cad-001ec947c8cc\")\n public final List<GmNodeModel> getChildren(String role) {\n ArrayList<GmNodeModel> ret = new ArrayList<>(this.children.size());\n for (GmNodeModel c : this.children) {\n if (role.equals(c.getRoleInComposition())) {\n ret.add(c);\n }\n }\n return ret;\n }",
"private List<AxiomTreeNode> getChildNodeList(AxiomTreeNode t) {\n\n List<AxiomTreeNode> list = new ArrayList<AxiomTreeNode>();\n\n for (int i = 0; i < t.getChildCount(); i++) {\n\n list.add((AxiomTreeNode) t.getChildAt(i));\n }\n\n return list;\n }",
"public Item2Vector<Concept> getChildren() { return children; }"
] | [
"0.73041797",
"0.7111973",
"0.7084668",
"0.7081285",
"0.7073014",
"0.7033339",
"0.6998985",
"0.69512695",
"0.69324094",
"0.68005383",
"0.6798158",
"0.67867726",
"0.675064",
"0.67328936",
"0.67264086",
"0.67163724",
"0.669906",
"0.66485876",
"0.6598168",
"0.6597319",
"0.65629363",
"0.65384847",
"0.65294766",
"0.6528842",
"0.6520596",
"0.65083295",
"0.6494195",
"0.64798284",
"0.647721",
"0.64437807",
"0.64356077",
"0.63952285",
"0.63942",
"0.63911676",
"0.63620096",
"0.635597",
"0.6349362",
"0.63136566",
"0.62942576",
"0.62283313",
"0.62211883",
"0.62083024",
"0.6193746",
"0.6191809",
"0.6185308",
"0.61840034",
"0.6182852",
"0.61594814",
"0.6158148",
"0.6153902",
"0.61251384",
"0.6109491",
"0.61006826",
"0.60679084",
"0.6033025",
"0.60297",
"0.60273534",
"0.6018445",
"0.60139924",
"0.60129386",
"0.60032105",
"0.5996093",
"0.5951288",
"0.59279764",
"0.5917977",
"0.5911108",
"0.5880718",
"0.585631",
"0.5847116",
"0.58367944",
"0.5831687",
"0.5810383",
"0.5808843",
"0.58032346",
"0.57946545",
"0.5783989",
"0.5778547",
"0.5767926",
"0.5760532",
"0.5760516",
"0.5760478",
"0.5746116",
"0.5732696",
"0.57143855",
"0.5711922",
"0.57012135",
"0.568298",
"0.5678799",
"0.5658036",
"0.56572753",
"0.5653672",
"0.565285",
"0.5623516",
"0.56149226",
"0.5608763",
"0.560023",
"0.55739",
"0.5572471",
"0.5557679",
"0.55496544"
] | 0.61411685 | 50 |
Do not remove check paymentMethodSearch, sometimes in recovery status is null. | private void trackScreen() {
if (paymentMethodSearch != null) {
if (selectedSearchItem == null) {
trackInitialScreen();
} else {
trackChildScreen();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkPaymentMethod() {\n toolbar.setTitle(R.string.payment_method);\n PaymentMethodFragment paymentMethodFragment = new PaymentMethodFragment();\n displaySelectedFragment(paymentMethodFragment);\n }",
"@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}",
"public boolean verifyPaymentMethodDisabled() {\n\t\treturn !divPaymentMethod.isEnabled();\n\t}",
"@Override\n\tpublic void checkWayBillRfcStatus(String originalWaybillNo) {\n\t\t\n\t}",
"@Override\n\tpublic boolean isExistRepayment(String originalWaybillNo) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean queryExcepSignResultByWaybillNo(String originalWaybillNo) {\n\t\treturn false;\n\t}",
"private void defaultPaymentShouldNotBeFound(String filter) throws Exception {\n restPaymentMockMvc.perform(get(\"/api/payments?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }",
"void setIgnoreForRecovery(boolean value) {\n ignoreForRecovery = value;\n }",
"private void m9894b() {\n if (this.f9489a == null) {\n throw new IllegalStateException(\"PaymentMethod not set.\");\n }\n }",
"@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();",
"public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}",
"@com.jg.JgMethodChecked(author = 20, fComment = \"checked\", lastDate = \"20140429\", reviewer = 20, vComment = {com.jg.EType.INTENTCHECK})\n public final void b(com.tencent.mm.plugin.gwallet.a.c r6, android.content.Intent r7) {\n /*\n r5 = this;\n r0 = 1;\n r1 = 0;\n r2 = \"MicroMsg.GWalletUI\";\n r3 = new java.lang.StringBuilder;\n r4 = \"Purchase finished: \";\n r3.<init>(r4);\n r3 = r3.append(r6);\n r4 = \", purchase: \";\n r3 = r3.append(r4);\n r3 = r3.append(r7);\n r3 = r3.toString();\n com.tencent.mm.sdk.platformtools.v.d(r2, r3);\n if (r7 != 0) goto L_0x0051;\n L_0x0025:\n r7 = new android.content.Intent;\n r2 = \"com.tencent.mm.gwallet.ACTION_PAY_RESPONSE\";\n r7.<init>(r2);\n r2 = \"RESPONSE_CODE\";\n r3 = r6.gDS;\n r7.putExtra(r2, r3);\n L_0x0035:\n r2 = r5.gDv;\n r2.sendBroadcast(r7);\n r2 = r6.iY();\n if (r2 != 0) goto L_0x005a;\n L_0x0040:\n r2 = r6.gDS;\n r3 = 7;\n if (r2 != r3) goto L_0x0058;\n L_0x0045:\n r2 = r0;\n L_0x0046:\n if (r2 != 0) goto L_0x005a;\n L_0x0048:\n if (r0 == 0) goto L_0x0050;\n L_0x004a:\n r0 = r5.gDv;\n r2 = 0;\n com.tencent.mm.plugin.gwallet.GWalletUI.a(r0, r1, r2);\n L_0x0050:\n return;\n L_0x0051:\n r2 = \"com.tencent.mm.gwallet.ACTION_PAY_RESPONSE\";\n r7.setAction(r2);\n goto L_0x0035;\n L_0x0058:\n r2 = r1;\n goto L_0x0046;\n L_0x005a:\n r0 = r1;\n goto L_0x0048;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.gwallet.GWalletUI.2.b(com.tencent.mm.plugin.gwallet.a.c, android.content.Intent):void\");\n }",
"synchronized boolean ignoreForRecovery() {\n return ignoreForRecovery;\n }",
"@org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();",
"boolean isSearchOk() {\n return false;\n }",
"public void skipVerify() {\n\tskipVerify = true;\n }",
"boolean hasPayment();",
"boolean hasPayment();",
"public void noSearch() {\n\t\tprintMsg(\"검색결과없음\");\n\t\t//굳이 필요는 없지만 편의성\n\t\t//System.out.println(\"검색결과없음\");\n\t}",
"@Override\n\tboolean isRegistedMethodNotNeed() {\n\t\treturn true;\n\t}",
"private void clearSearchingOptionValues() {\n noticeSerialNo = null;\n pinOrNic = null;\n searchStartDate = null;\n searchEndDate = null;\n }",
"public Payment findByStatus(Boolean paymentStatus) {\n\t\treturn null;\r\n\t}",
"public boolean checkpay(){\n return pay;\n }",
"private boolean handleRightBtnIfInVerify(){\n \t\tif(!detail.getValueByKey(\"status\").equals(\"0\")){\n \t\t\tpd = ProgressDialog.show(GoodDetailView.this.getContext(), \"提示\", \"请稍候...\");\n \t\t\tpd.setCancelable(true);\n \t\t\tnew Thread(new RequestThread(REQUEST_TYPE.REQUEST_TYPE_DELETE)).start();\n \n \t\t\treturn true;\t\n \t\t}\n \t\treturn false;\n \t}",
"@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();",
"@Override\r\npublic void checkBalance() {\n\t\r\n}",
"@Override\n\tpublic void checkMaintenanceStatus() {\n\t}",
"public void genRepCheck(){\r\n if (tx_cb.getValue() == null || paModules.getValue() == null || mainExciterSW.getValue() == null\r\n || filter.getValue() == null || switchPatch.getValue() == null || testLoad.getValue() == null\r\n || mainAntFeed.getValue() == null)\r\n genRep.setDisable(true);\r\n else\r\n genRep.setDisable(false);\r\n }",
"private void defaultPaymentShouldBeFound(String filter) throws Exception {\n restPaymentMockMvc.perform(get(\"/api/payments?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(payment.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].type\").value(hasItem(DEFAULT_TYPE.toString())))\n .andExpect(jsonPath(\"$.[*].cartName\").value(hasItem(DEFAULT_CART_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].cardNumber\").value(hasItem(DEFAULT_CARD_NUMBER.toString())))\n .andExpect(jsonPath(\"$.[*].expiryMonth\").value(hasItem(DEFAULT_EXPIRY_MONTH)))\n .andExpect(jsonPath(\"$.[*].expiryYear\").value(hasItem(DEFAULT_EXPIRY_YEAR)))\n .andExpect(jsonPath(\"$.[*].cvc\").value(hasItem(DEFAULT_CVC)))\n .andExpect(jsonPath(\"$.[*].holderName\").value(hasItem(DEFAULT_HOLDER_NAME.toString())));\n }",
"public boolean verifyChangePayorDisabled() {\n\t\treturn !btnChangePayor.isEnabled();\n\t}",
"public Boolean checkDisabled() {\r\n\t\treturn searchRepository.checkDisabled();\r\n\t}",
"protected String doVerifyState() {\n\t\treturn null;\n\t}",
"public void notifyNoAcctReport (COPSPdpOSReqStateMan man);",
"public List<Check> getNotPayCheck(String phonenumber) {\n\t\tList<Check> checks=checkDao.getNotPayCheck(phonenumber);\n\t\treturn checks;\n\t}",
"public CheckBalanceUpcoming() {\n this.upcomingPayment = -1;\n }",
"@Test\n public void testQueRequests() {\n PaymentMethodViewModel viewModel = new PaymentMethodViewModel(\n getAvailablePaymentMethods\n );\n\n // And I don't have internet connection\n viewModel.setIsNetworkAvailable(false);\n\n // When I request payment methods\n viewModel.getAvailablePaymentMethods();\n\n // Then I should not request the payment method list\n Mockito.verify(getAvailablePaymentMethods, Mockito.times(0)).execute(\n Mockito.any()\n );\n\n // And failures should be NetworkFailure\n assertThat(viewModel.getFailureLiveData().getValue())\n .isInstanceOf(CheckoutFailure.ConnectivityError.class);\n\n // When I get internet connectivity\n viewModel.setIsNetworkAvailable(true);\n\n // Then I should request payment methods automatically\n Mockito.verify(getAvailablePaymentMethods, Mockito.times(1))\n .execute(Mockito.any());\n }",
"public void radarLostContact() {\n if (status == 1 || status == 18) {\n status = 0;\n flightCode = \"\";\n passengerList = null;\n faultDescription = \"\";\n itinerary = null;\n gateNumber = -1;\n }//END IF\n }",
"private void searchRefrigerator() {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i] instanceof Refrigerator) {\r\n\t\t\t\tSystem.out.println(products[i].toString());\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"냉장고가 없습니다.\");\r\n\t}",
"public boolean savepayment(Payment payment) {\n\t\treturn false;\n\t}",
"boolean isInvoiceNotLinkedWithAnyGR(GoodsReceipt invoice) throws ServiceException {\n boolean isNotLinkedWithAnyGR = true;\n\n List invoiceList = accGoodsReceiptobj.isInvoiceNotLinkedWithAnyGR(invoice);//PI->GR\n isNotLinkedWithAnyGR = (boolean) invoiceList.get(0);\n if (isNotLinkedWithAnyGR) {\n if (accGoodsReceiptobj.isLinkingOfGRInPI(invoice)) {//i.e GR->PI linking is available?\n isNotLinkedWithAnyGR=false; \n }\n }\n return isNotLinkedWithAnyGR;\n }",
"@Override\n public Map<String, Object> getModemSearchCondition() {\n return null;\n }",
"@Override\n\tpublic boolean checkEWaybillNoExceptPDAPending(String waybillNo) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic void checkeoDeBateria() {\n\n\t}",
"PaymentMethod getPaymentMethod();",
"public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_noalrertchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey without alret\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alretnonchecked(smrProfile); \n\t\t\t \t}",
"public void checkUnresultedReferral() {\n info(\"We will check, if there is already unresulted referral\");\n BaseWingsSteps.logInAs(Roles.STAFF);\n StaffHomeForm staffHomeForm = new StaffHomeForm();\n if (!staffHomeForm.checkUnresultedReferralsPresent()) {\n Participant participant = new Participant(AccountUtils.getParticipantAccount());\n JobOrder jobOrder = new JobOrder(AccountUtils.getEmployerAccount());\n User staff = new User(Roles.STAFF);\n ReferralSteps.createReferral(participant, jobOrder, staff);\n ReferralSteps.setUnresultedReferralCreationDate(participant);\n BaseWingsSteps.logInAs(Roles.STAFF);\n }\n\n logStep(\"Select unresulted referral->Details->Edit\");\n staffHomeForm.selectUnresultedReferrals();\n }",
"private void defaultIndActivationShouldNotBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }",
"io.opencannabis.schema.commerce.Payments.PaymentStatus getStatus();",
"public void performRecovery();",
"private void clearPayment() { payment_ = null;\n bitField0_ = (bitField0_ & ~0x00000001);\n }",
"public void setCheckMethod(String checkMethod) {\r\n this.checkMethod = checkMethod == null ? null : checkMethod.trim();\r\n }",
"public boolean isNotNullPaymentGatewayApi() {\n return genClient.cacheValueIsNotNull(CacheKey.paymentGatewayApi);\n }",
"@Override\n\tpublic boolean queryBeLdpHandOveredByWaybillNo(String originalWaybillNo) {\n\t\treturn false;\n\t}",
"abstract protected boolean checkMethod();",
"private boolean verifyDocType() {\n if (getC_DocType_ID() == 0) {\n return false;\n }\n //\n Boolean invoiceSO = null;\n //\tCheck Invoice First\n if (getC_Invoice_ID() > 0) {\n String sql = \"SELECT idt.IsSOTrx \"\n + \"FROM C_Invoice i\"\n + \" INNER JOIN C_DocType idt ON (i.C_DocType_ID=idt.C_DocType_ID) \"\n + \"WHERE i.C_Invoice_ID=?\";\n PreparedStatement pstmt = null;\n try {\n pstmt = DB.prepareStatement(sql, get_TrxName());\n pstmt.setInt(1, getC_Invoice_ID());\n ResultSet rs = pstmt.executeQuery();\n if (rs.next()) {\n invoiceSO = new Boolean(\"Y\".equals(rs.getString(1)));\n }\n rs.close();\n pstmt.close();\n pstmt = null;\n } catch (Exception e) {\n log.log(Level.SEVERE, sql, e);\n }\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n pstmt = null;\n } catch (Exception e) {\n pstmt = null;\n }\n }\t//\tInvoice\n\n //\tDocumentType\n Boolean paymentSO = null;\n PreparedStatement pstmt = null;\n String sql = \"SELECT IsSOTrx \"\n + \"FROM C_DocType \"\n + \"WHERE C_DocType_ID=?\";\n try {\n pstmt = DB.prepareStatement(sql, get_TrxName());\n pstmt.setInt(1, getC_DocType_ID());\n ResultSet rs = pstmt.executeQuery();\n if (rs.next()) {\n paymentSO = new Boolean(\"Y\".equals(rs.getString(1)));\n }\n rs.close();\n pstmt.close();\n pstmt = null;\n } catch (Exception e) {\n log.log(Level.SEVERE, sql, e);\n }\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n pstmt = null;\n } catch (Exception e) {\n pstmt = null;\n }\n //\tNo Payment info\n if (paymentSO == null) {\n return false;\n }\n setIsReceipt(paymentSO.booleanValue());\n\n //\tWe have an Invoice .. and it does not match\n if (invoiceSO != null\n && invoiceSO.booleanValue() != paymentSO.booleanValue()) {\n return false;\n }\n //\tOK\n return true;\n }",
"public boolean isSetRecovery() {\n return this.recovery != null;\n }",
"public List<PaymentStatus> getAllPaymentStatuses() throws ContestManagementException {\n return null;\r\n }",
"public List<PaymentStatus> getAllPaymentStatuses() throws ContestManagementException {\n return null;\r\n }",
"boolean hasSerializedPaymentDetails();",
"@Override\n\tpublic Object[] advSearchCondition() {\n\t\treturn null;\n\t}",
"@Override\n public void onVerifyPhoneNumberSuccessfully(PhoneVerification verification) {\n// if (BuildConfig.DEBUG){// TODO: 26/10/2017 this hard code should be removed later\n// gotoPhoneSignInScreen();\n// return;\n// }\n if (verification.isExists){\n gotoPhoneSignInScreen();\n }else{\n showConfirmDialog(verification.otpToken);\n }\n }",
"public void noReceipt() {\n\t\tpause(1000);\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t .until(ExpectedConditions.presenceOfElementLocated(By.id(\"salescompleteBtn\")));\n\t\ttemp.click();\n\t}",
"void setPaymentMethod(PaymentMethod paymentMethod);",
"private void defaultInvoiceShouldNotBeFound(String filter) throws Exception {\n restInvoiceMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restInvoiceMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }",
"UserPayment validate(String cardHolderName,String cardType,String securityCode,String paymentType);",
"@Override\n public void onFailedSearch() {\n infoUsersNotHaveData();\n }",
"public synchronized int checkGiftCardValues(String profileId) {\r\n if (getIsCheckValueButtonClicked() == false) {\r\n try {\r\n setIsCheckValueButtonClicked(true);\r\n GiftCard tempGiftCard = null;\r\n boolean validInquiryAttempt = true;\r\n ArrayList tempGiftCardList = new ArrayList();\r\n \r\n if (profileId == null || profileId.equals(\"\")) {\r\n return PROFILE_ID_NOT_FOUND;\r\n }\r\n \r\n for (int i = 0; i < getGiftCardList().size(); i++) {\r\n tempGiftCard = getGiftCardListItem(i);\r\n // System.out.println(\"The entered Card Number is : \" + tempGiftCard.getCardNumber());\r\n if (!tempGiftCard.getIsBlank()) {\r\n String tempGcNumber = tempGiftCard.getCardNumber();\r\n if (tempGcNumber.startsWith(\"80\") || tempGcNumber.startsWith(\"81\") || tempGcNumber.startsWith(\"82\") || tempGcNumber.startsWith(\"83\")) {\r\n // System.out.println(\"Inside the check for incircle cards : \" + tempGcNumber);\r\n validInquiryAttempt = false;\r\n tempGiftCard.setIsValid(false);\r\n tempGiftCard.setTransactionStatus(56);\r\n } else {\r\n // System.out.println(\"Outsie the check for incircle cards : \" + tempGiftCard.getCardNumber());\r\n if (giftCardModCheck(tempGiftCard)) {\r\n // System.out.println(\"The entered Card Number is : \" + tempGiftCard.getCardNumber());\r\n // System.out.println(\"inside the ModCheck condition : \" + tempGiftCard.getCardNumber());\r\n tempGiftCard.setAmountAvailable(0.0d);\r\n tempGiftCard.setIsValid(true);\r\n tempGiftCardList.add(tempGiftCard);\r\n } else {\r\n // System.out.println(\"inside else loop where transaction is set for -1 : \" + tempGiftCard.getCardNumber());\r\n validInquiryAttempt = false;\r\n tempGiftCard.setIsValid(false);\r\n tempGiftCard.setTransactionStatus(-1);\r\n }\r\n }\r\n } else {\r\n tempGiftCard.setIsValid(true);\r\n }\r\n }\r\n \r\n if (isLoggingDebug()) {\r\n logDebug(\"getGiftCardBalancerService-->\" + getGiftCardBalanceService() + \"<---\");\r\n }\r\n // Calling gift card service if atleast one gift card is valid.\r\n if (tempGiftCardList.size() != 0) {\r\n try {\r\n tempGiftCardList = (ArrayList) getGiftCardBalanceService().checkGiftCardBalance(profileId, tempGiftCardList);\r\n } catch (Exception e) {\r\n return GIFT_CARD_SYSTEM_UNAVAILABLE;\r\n }\r\n }\r\n // Logic to add the valid cards from the service to the giftcardList as they may be invalid cards in the giftcardList\r\n List<GiftCard> tempList = new ArrayList<GiftCard>();\r\n for (int i = 0; i < getGiftCardList().size(); i++) {\r\n for (int k = 0; k < tempGiftCardList.size(); k++) {\r\n GiftCard giftCardCurrent = getGiftCardListItem(i);\r\n GiftCard giftCardFromService = (GiftCard) tempGiftCardList.get(k);\r\n if (giftCardCurrent.getCardNumber().equals(giftCardFromService.getCardNumber()) && giftCardCurrent.getCid().equals(giftCardFromService.getCid())) {\r\n if (!tempList.contains(giftCardFromService)) {\r\n giftCardCurrent.setAmountAvailable(giftCardFromService.getAmountAvailable());\r\n giftCardCurrent.setTransactionStatus(giftCardFromService.getTransactionStatus());\r\n tempList.add(giftCardFromService);\r\n } else {\r\n getGiftCardList().remove(i);\r\n }\r\n }\r\n }\r\n }\r\n \r\n if (isLoggingDebug()) {\r\n for (int i = 0; i < getGiftCardList().size(); i++) {\r\n logDebug(\"giftcard--\" + i + \"--->\" + getGiftCardListItem(i) + \"<-----\");\r\n }\r\n }\r\n \r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n switch (tempGiftCard.getTransactionStatus()) {\r\n case GiftCard.AMOUNT_OVER_BALANCE:\r\n case GiftCard.CANCELED:\r\n case GiftCard.NM_MERCH_ONLY:\r\n case GiftCard.ALREADY_ON_FILE:\r\n case GiftCard.NOT_EQUAL_TO_INIT_VALUE:\r\n case GiftCard.BALANCE_NOT_TRUE:\r\n case GiftCard.NOT_BEEN_SOLD:\r\n case GiftCard.LOST_OR_STOLEN:\r\n case GiftCard.EXPIRED:\r\n case GiftCard.INVALID_CIN:\r\n case GiftCard.NOT_ADDING_VALUE:\r\n case GiftCard.DIV_04_ONLY:\r\n case GiftCard.DIV_05_ONLY:\r\n case GiftCard.REFUND_ONLY:\r\n case GiftCard.INVALID_INCIRCLE_CARD:\r\n case GiftCard.CARD_NOT_ON_FILE:\r\n validInquiryAttempt = false;\r\n tempGiftCard.setIsValid(false);\r\n break;\r\n \r\n case GiftCard.INVALID_TRANSACTION_TYPE:\r\n case GiftCard.HOST_COMMUNICATION_ERROR:\r\n case GiftCard.FILES_NOT_OPEN:\r\n case GiftCard.BAD_FILE:\r\n return GIFT_CARD_SYSTEM_UNAVAILABLE;\r\n \r\n case GiftCard.OK:\r\n default:\r\n }\r\n }\r\n \r\n if (validInquiryAttempt) {\r\n // if( !getGiftCardPageType().equals(STATIC_INQUIRY) ) {\r\n if (isLoggingDebug()) {\r\n logDebug(\"sorting.................\");\r\n }\r\n sortByGiftCardAmounts(getGiftCardList());\r\n // }\r\n return NO_ERRORS;\r\n } else {\r\n setInvalidCardErrorCount(getInvalidCardErrorCount() + 1);\r\n return INVALID_CARD_NUMBER;\r\n }\r\n } finally {\r\n setIsCheckValueButtonClicked(false);\r\n }\r\n } else {\r\n return NO_ERRORS;\r\n }\r\n }",
"@Override\n protected void onResume() {\n super.onResume();\n clearScanResults();\n if (mCheckBt) {\n checkEnableBt();\n Log.d(TAG, \"onResume: 搜寻ACTIVITY回到后台!!\");\n }\n }",
"public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}",
"@java.lang.Override\n public boolean hasPayment() {\n return instance.hasPayment();\n }",
"private void m1866c() {\n /*\n r10 = this;\n r2 = 0;\n r1 = 1;\n r0 = \"DCVpnService\";\n r3 = \"startVPN\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n monitor-enter(r10);\n r0 = r10.f1317a;\t Catch:{ all -> 0x0065 }\n if (r0 == 0) goto L_0x0017;\n L_0x000e:\n r0 = \"DCVpnService\";\n r1 = \"startVPN: already started\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n L_0x0016:\n return;\n L_0x0017:\n r0 = 1;\n r10.f1317a = r0;\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n r0 = \"DCVpnService\";\n r3 = \"startVPN: about to build\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n r0 = com.ppu.fba.FirewallApplication.m1851a();\n r0 = android.preference.PreferenceManager.getDefaultSharedPreferences(r0);\n r3 = \"data_caching_on\";\n r3 = r0.getBoolean(r3, r2);\n r4 = \"ad_blocking_on\";\n r4 = r0.getBoolean(r4, r1);\n r5 = \"malware_shield_on\";\n r6 = r0.getBoolean(r5, r2);\n if (r3 == 0) goto L_0x0068;\n L_0x003e:\n r5 = r1;\n L_0x003f:\n if (r4 == 0) goto L_0x006a;\n L_0x0041:\n r4 = r1;\n L_0x0042:\n if (r6 == 0) goto L_0x006c;\n L_0x0044:\n r0 = r1;\n L_0x0045:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x0054;\n L_0x0049:\n r3 = new com.ppu.fba.g;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x006e }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x006e }\n L_0x0054:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x00b6;\n L_0x0058:\n r10.f1317a = r2;\n r0 = \"DCVpnService\";\n r1 = \"builder failed: stopSelf() now\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\n r10.stopSelf();\n goto L_0x0016;\n L_0x0065:\n r0 = move-exception;\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n throw r0;\n L_0x0068:\n r5 = r2;\n goto L_0x003f;\n L_0x006a:\n r4 = r2;\n goto L_0x0042;\n L_0x006c:\n r0 = r2;\n goto L_0x0045;\n L_0x006e:\n r3 = move-exception;\n r3 = new com.ppu.fba.q;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x007b }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x007b }\n goto L_0x0054;\n L_0x007b:\n r3 = move-exception;\n r6 = \"state\";\n r7 = \"vpnFail\";\n r8 = new java.lang.StringBuilder;\n r8.<init>();\n r9 = \"excEst: \";\n r8 = r8.append(r9);\n r9 = r3.getMessage();\n if (r9 != 0) goto L_0x00b1;\n L_0x0091:\n r3 = \"null\";\n L_0x0093:\n r3 = r8.append(r3);\n r3 = r3.toString();\n r8 = 0;\n r3 = com.google.analytics.tracking.android.MapBuilder.createEvent(r6, r7, r3, r8);\n r3 = r3.build();\n com.ppu.fba.p009d.Log1.LogAction(r3);\n r3 = com.ppu.fba.R.string.error_vpn_establish;\n r3 = android.widget.Toast.makeText(r10, r3, r1);\n r3.show();\n goto L_0x0054;\n L_0x00b1:\n r3 = r3.getMessage();\n goto L_0x0093;\n L_0x00b6:\n r3 = r10.m1868e();\n r10.startForeground(r1, r3);\n r3 = \"DCVpnService\";\n r6 = \"init\";\n com.ppu.fba.p009d.Log1.LogF1(r3, r6);\n r3 = r10.f1322g;\n r3 = r3.getFd();\n r6 = r10.getFilesDir();\n r6 = r6.getAbsolutePath();\n r0 = com.ppu.fba.NativeWrapper.jni_dicki(r3, r6, r5, r4, r0);\n if (r0 == 0) goto L_0x00e4;\n L_0x00d8:\n r0 = \"DCVpnService\";\n r2 = \"account_init failed!!!!!\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r2);\n r10.stopForeground(r1);\n goto L_0x0016;\n L_0x00e4:\n r10.f1321f = r2;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.d;\n r1.<init>(r10);\n r2 = \"t4\";\n r0.<init>(r1, r2);\n r10.f1324i = r0;\n r0 = r10.f1324i;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.e;\n r1.<init>(r10);\n r2 = \"t0\";\n r0.<init>(r1, r2);\n r10.f1323h = r0;\n r0 = r10.f1323h;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.f;\n r1.<init>(r10);\n r2 = \"t1\";\n r0.<init>(r1, r2);\n r10.f1319d = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.o;\n r1.<init>(r10);\n r2 = \"t2\";\n r0.<init>(r1, r2);\n r10.f1320e = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.p;\n r1.<init>(r10);\n r2 = \"t3\";\n r0.<init>(r1, r2);\n r10.f1318c = r0;\n r0 = r10.f1319d;\n r0.start();\n r0 = r10.f1320e;\n r0.start();\n r0 = r10.f1318c;\n r0.start();\n goto L_0x0016;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ppu.fba.FirewallVpnService.c():void\");\n }",
"private void checkOnlinePaymentAlreadyExistWithCreatedState(PaymentFeeLink paymentFeeLink) {\n Date ninetyMinAgo = new Date(System.currentTimeMillis() - 90 * 60 * 1000);\n Optional<Payment> existedPayment = paymentFeeLink.getPayments().stream()\n .filter(payment -> payment.getPaymentStatus().getName().equalsIgnoreCase(\"created\")\n && payment.getPaymentProvider().getName().equalsIgnoreCase(\"gov pay\")\n && payment.getDateCreated().compareTo(ninetyMinAgo) >= 0)\n .sorted(Comparator.comparing(Payment::getDateCreated).reversed())\n .findFirst();\n\n if (!existedPayment.isEmpty()) {\n delegatingPaymentService.cancel(existedPayment.get(), paymentFeeLink.getCcdCaseNumber(),paymentFeeLink.getEnterpriseServiceName());\n }\n }",
"@Override\n\tpublic String queryLostFindGoods(String waybillNo) {\n\t\treturn null;\n\t}",
"@Ignore\n public void testDisapproveReason() throws Exception {\n\n }",
"public void submit() {\n if (edtCardNo.getText().toString().equals(\"\")\n || edtCVV.getText().toString().equals(\"\")\n && seccode) {\n Toast.makeText(getApplicationContext(), \"Please fill all fields \",\n Toast.LENGTH_LONG).show();\n }else if (edtCardNo.getText().toString().equals(\"\") && !seccode) {\n Toast.makeText(getApplicationContext(), \"Please fill all fields \",\n Toast.LENGTH_LONG).show();\n } else {\n\n pMethod = payMethod(edtCardNo.getText().toString());\n if(!pMethod.equals(\"\")){\n String securityCode= \"\";\n if(seccode){\n securityCode = edtCVV.getText().toString();\n }\n\n makePayment();\n\n }else {\n Toast.makeText(getApplicationContext(),\n \"Please input correct card number\",\n Toast.LENGTH_LONG).show();\n }\n }\n }",
"private boolean checkout() {\n if (OrderMenuUI.incompleteOrders == null || OrderMenuUI.incompleteOrders.size() == 0) {\n System.out.println(\"No orders ready for checkout. Cancelling Operation\");\n return false;\n }\n HashMap<Integer, Order> tOrders = new HashMap<>();\n OrderMenuUI.incompleteOrders.forEach((s) -> {\n Table c = s.getTable();\n if (c == null) return;\n tOrders.put(c.getTableNum(), s);\n });\n tOrders.put(-1, null);\n OrderMenuUI.printOrderList(OrderMenuUI.incompleteOrders, \"Ready for Checkout\", true);\n int tableNo = ScannerHelper.getIntegerInput(\"Select Table to checkout (-1 to cancel): \", new ArrayList<>(tOrders.keySet()), \"Invalid Table Number. Please select a valid table number or enter -1 to cancel\");\n if (tableNo == -1) {\n System.out.println(\"Checkout Operation Cancelled\");\n return false;\n }\n Order o = tOrders.get(tableNo);\n double total = printOrderDetails(o);\n System.out.println();\n System.out.println(\"Payment Mode\");\n System.out.println(\"1) Cash\");\n System.out.println(\"2) NETS\");\n System.out.println(\"3) Debit/Credit Card\");\n System.out.println(\"4) EZ-Link\");\n System.out.println(\"0) Cancel\");\n int choice = ScannerHelper.getIntegerInput(\"Select Payment Mode (0 to cancel): \", -1, 5);\n double paid;\n Invoice.PaymentType paymentType;\n switch (choice) {\n case 1:\n paid = requestCashPayment(total);\n paymentType = Invoice.PaymentType.PAYMENT_CASH;\n break;\n case 2:\n paymentType = Invoice.PaymentType.PAYMENT_NETS;\n paid = total; // All card payments are presumed paid fully\n break;\n case 3:\n paymentType = Invoice.PaymentType.PAYMENT_CARD;\n paid = total; // All card payments are presumed paid fully\n break;\n case 4:\n paymentType = Invoice.PaymentType.PAYMENT_EZLINK;\n paid = total; // All card payments are presumed paid fully\n break;\n case 0:\n System.out.println(\"Operation Cancelled\");\n return false;\n default:\n throw new MenuChoiceInvalidException(\"Checkout Payment\");\n }\n System.out.println(\"Payment Complete! Payment Mode: \" + paymentType.toString());\n if (paymentType == Invoice.PaymentType.PAYMENT_CASH) {\n System.out.println(\"Change: $\" + String.format(\"%.2f\", (paid - total)));\n }\n\n System.out.println(\"Generating Receipt...\");\n o.markPaid();\n OrderMenuUI.incompleteOrders.remove(o);\n ArrayList<String> receipt = generateReceipt(o, total, paid, paymentType);\n System.out.println();\n receipt.forEach(System.out::println);\n String receiptName = \"-\";\n if (writeReceipt(receipt, o.getOrderID())) {\n receiptName = o.getOrderID() + \".txt\";\n }\n Invoice i = new Invoice(o, receiptName, paymentType, total, paid);\n MainApp.invoices.add(i);\n System.out.println(\"\\n\");\n System.out.println(\"Returning to Main Menu...\");\n return true;\n }",
"public void setPaymentMethod(String paymentMethod) {\n\t\tthis.paymentMethod = paymentMethod;\n\t}",
"protected NbaSearchVO lookupWork() throws NbaBaseException {\t//SPR2992 changed method signature\n\t\t//NBA213 deleted code\n\t\t\tNbaSearchVO searchVO = new NbaSearchVO();\n\t\t\tString entryPoints[] = { NbaVpmsAdaptor.EP_REIN_PRIMARY_SEARCH_FIELDS, NbaVpmsAdaptor.EP_REIN_SECONDARY_SEARCH_FIELDS };\n\t\t\tfor (int i = 0; i < entryPoints.length; i++) {\n\t\t\t\tNbaVpmsResultsData data = getDataFromVpms(entryPoints[i]);\n\t\t\t\t//begin SPR2806\n\t\t\t\tArrayList aList = data.getResultsData();\n\t\t\t\t//check if sufficient lob data is present on work, if not just skip this matching criteria\n\t\t\t\tif (!checkLobPresence(getWork().getNbaLob(), aList)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tsetLookupDataFound(true);\t//SPR2992\t\t\t\t\t\n\t\t\t\tsearchVO.setNbaLob(getNbaLobForLookup(aList));\n\t\t\t\t//Code moved ALS5171\n\t\t\t\t// end SPR2806\n\t\t\t\tif (getWork().getTransaction().getWorkType().equalsIgnoreCase(A_WT_REINSURANCE)) {\n\t\t\t\t\tsearchVO.setWorkType(A_WT_TEMP_REINSURANCE);\n\t\t\t\t\tsearchVO.setStatus(A_STATUS_REINSURANCE_INDEXED);//ALS5171\n\t\t\t\t} else {\n\t\t\t\t\tsearchVO.setWorkType(A_WT_REINSURANCE);\n\t\t\t\t\tif(isAdditionalInfo) {//ALS5494\n\t\t\t\t\t\tsearchVO.setQueue(END_QUEUE);//ALS5494\n\t\t\t\t\t}else {\n\t\t\t\t\t\tsearchVO.setStatus(A_STATUS_REINSURANCE_ORDERED);//ALS5171\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsearchVO.setResultClassName(\"NbaTransactionSearchResultVO\");\n\t\t\t\tsearchVO = lookupWork(getUser(), searchVO);\t//SPR3009, NBA213\n\t\t if (searchVO.isMaxResultsExceeded()){\t//NBA146\n\t\t throw new NbaBaseException(NbaBaseException.SEARCH_RESULT_EXCEEDED_SIZE, NbaExceptionType.FATAL);\t//NBA146\n\t\t }\t//NBA146\n\t\t\t\tif (!(searchVO.getSearchResults().isEmpty())) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn searchVO;\n\t\t//NBA213 deleted code\n\t}",
"VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }",
"private boolean allocatePaySelection() {\n /**\n *\n * \t\tModificación para diferenciar\n *\tcobros/pagos en Consulta de Asignación\n *\n */\n MAllocationHdr alloc;\n\n if (isReceipt()) {\n alloc = new MAllocationHdr(getCtx(), false, getDateTrx(), getC_Currency_ID(),\n Msg.translate(getCtx(), \"IsReceipt\") + \": \" + getDocumentNo() + \" [n]\", get_TrxName());\n } else {\n alloc = new MAllocationHdr(getCtx(), false, getDateTrx(), getC_Currency_ID(),\n Msg.translate(getCtx(), \"C_Payment_ID\") + \": \" + getDocumentNo() + \" [n]\", get_TrxName());\n }\n alloc.setAD_Org_ID(getAD_Org_ID());\n\n String sql = \"SELECT psc.C_BPartner_ID, psl.C_Invoice_ID, psl.IsSOTrx, \" //\t1..3\n + \" psl.PayAmt, psl.DiscountAmt, psl.DifferenceAmt, psl.OpenAmt \"\n + \"FROM C_PaySelectionLine psl\"\n + \" INNER JOIN C_PaySelectionCheck psc ON (psl.C_PaySelectionCheck_ID=psc.C_PaySelectionCheck_ID) \"\n + \"WHERE psc.C_Payment_ID=?\";\n PreparedStatement pstmt = null;\n try {\n pstmt = DB.prepareStatement(sql, get_TrxName());\n pstmt.setInt(1, getC_Payment_ID());\n ResultSet rs = pstmt.executeQuery();\n while (rs.next()) {\n int C_BPartner_ID = rs.getInt(1);\n int C_Invoice_ID = rs.getInt(2);\n if (C_BPartner_ID == 0 && C_Invoice_ID == 0) {\n continue;\n }\n boolean isSOTrx = \"Y\".equals(rs.getString(3));\n BigDecimal PayAmt = rs.getBigDecimal(4);\n BigDecimal DiscountAmt = rs.getBigDecimal(5);\n BigDecimal WriteOffAmt = rs.getBigDecimal(6);\n BigDecimal OpenAmt = rs.getBigDecimal(7);\n BigDecimal OverUnderAmt = OpenAmt.subtract(PayAmt).subtract(DiscountAmt).subtract(WriteOffAmt);\n //\n if (alloc.get_ID() == 0 && !alloc.save(get_TrxName())) {\n log.log(Level.SEVERE, \"Could not create Allocation Hdr\");\n rs.close();\n pstmt.close();\n return false;\n }\n MAllocationLine aLine = null;\n if (isSOTrx) {\n aLine = new MAllocationLine(alloc, PayAmt,\n DiscountAmt, WriteOffAmt, OverUnderAmt);\n } else {\n aLine = new MAllocationLine(alloc, PayAmt.negate(),\n DiscountAmt.negate(), WriteOffAmt.negate(), OverUnderAmt.negate());\n }\n aLine.setDocInfo(C_BPartner_ID, 0, C_Invoice_ID);\n aLine.setC_Payment_ID(getC_Payment_ID());\n if (!aLine.save(get_TrxName())) {\n log.log(Level.SEVERE, \"Could not create Allocation Line\");\n }\n }\n rs.close();\n pstmt.close();\n pstmt = null;\n } catch (Exception e) {\n log.log(Level.SEVERE, \"allocatePaySelection\", e);\n }\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n pstmt = null;\n } catch (Exception e) {\n pstmt = null;\n }\n\n //\tShould start WF\n boolean ok = true;\n if (alloc.get_ID() == 0) {\n log.fine(\"No Allocation created - C_Payment_ID=\"\n + getC_Payment_ID());\n ok = false;\n } else {\n alloc.processIt(DocAction.ACTION_Complete);\n ok = alloc.save(get_TrxName());\n m_processMsg = \"@C_AllocationHdr_ID@: \" + alloc.getDocumentNo();\n }\n return ok;\n }",
"@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}",
"public void searchCriteria(WebDriver driver) throws InterruptedException\r\n\t {\r\n\t\t try\r\n\t\t {\r\n\t\t\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \r\n\t\t\t driver.findElement(By.id(\"filter_purchaserEmail\")).clear();\r\n\t driver.findElement(By.id(\"filter_purchaserEmail\")).sendKeys(purchaserEmail);\r\n\t \r\n\t driver.findElement(By.id(\"filter_code\")).clear();\r\n\t driver.findElement(By.id(\"filter_code\")).sendKeys(code);\r\n\t \r\n\t driver.findElement(By.id(\"search\")).click();\r\n\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t\t \r\n\t redeemerEmail = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[3]\")).getText();\r\n\t System.out.println(\"redeemerEmail:\"+redeemerEmail);\r\n\t \r\n\t creditsOnGifts = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[6]\")).getText();\r\n\t System.out.println(\"creditsOnGifts:\"+creditsOnGifts);\r\n\t \r\n\t codeActive = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[7]\")).getText();\r\n\t System.out.println(\"codeActive:\"+codeActive);\r\n\t \r\n\t Thread.sleep(10000);\r\n\t //driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t refunded = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[8]/span\")).getText();\r\n\t System.out.println(\"refunded:\"+refunded);\r\n\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \r\n\t //Condition to check view more details\r\n\t if(redeemerEmail.equalsIgnoreCase(TestConstants.NOT_REDEEMED) && codeActive.equalsIgnoreCase(TestConstants.STATUS_YES) && refunded.equalsIgnoreCase(TestConstants.STATUS_NO))\r\n\t {\r\n\t \t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \t System.out.println(\"Before View More Detail\");\r\n\t \t driver.findElement(By.xpath(\"//a[contains(text(),'View More Detail')]\")).click();\r\n\t \t System.out.println(\"After View More Detail\");\r\n\t \t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t }\r\n\t \r\n\t System.out.println(\"Try block\");\r\n\t }catch(NoSuchElementException e)\r\n\t\t {\r\n\t \t e.printStackTrace();\r\n\t \t System.out.println(\"Catch block\");\r\n\t\t }\r\n\t}",
"@Override\n public void onVerificationFailed(FirebaseException e) {\n if (e instanceof FirebaseAuthInvalidCredentialsException) {\n Log.d(constants.PhoneRegTag, \"Invalid Credentials\");\n } else if (e instanceof FirebaseTooManyRequestsException) {\n Log.d(constants.PhoneRegTag, \"SMS Verification Pin needed\");\n }\n }",
"final void checkForComodification() {\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"public boolean hasPayment() {\n return paymentBuilder_ != null || payment_ != null;\n }",
"@Override\n\tpublic List<IopenApplication> findIopenApplicationsWhereFeePaidButStatusNotChanged(String tipRec, String paidEstado,\n\t\t\tString applicationStage) {\n\n\t\tfinal String query = \"Select i From IopenApplication i, Recibo r Where i.expediente.numExp = r.numFact \"\n\t\t\t\t+ \"And r.tipRec = :tipRec And r.estRec = :paidEstado And i.expediente.estado = :applicationStage\";\n\n\t\tfinal List<IopenApplication> iopenApplications = entityManager.createQuery(query).setParameter(\"tipRec\", tipRec)\n\t\t\t\t.setParameter(\"paidEstado\", paidEstado).setParameter(\"applicationStage\", applicationStage)\n\t\t\t\t.getResultList();\n\n\t\treturn iopenApplications;\n\t}",
"@Override\n\tpublic List<String> unpaidOnlinePay(List<String> waybillNos) {\n\t\treturn null;\n\t}",
"public boolean hasPayment() {\n return payment_ != null;\n }",
"io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();",
"@Override\n\tpublic void validatePopulateAndSendNotification(NotificationModel verificationStatusModel) throws ServiceException {\n\t\t\n\t}",
"public void reset(){\n paycheckController.reset();\n }",
"@Test\r\n public void testGetPaymentDetails() {\r\n }",
"private void searchForDesignateService(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.searchForDesignateService(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.searchForDesignateService(java.lang.String):void\");\n }",
"private void defaultListWrkStatusShouldNotBeFound(String filter) throws Exception {\n restListWrkStatusMockMvc.perform(get(\"/api/list-wrk-statuses?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restListWrkStatusMockMvc.perform(get(\"/api/list-wrk-statuses/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }",
"void check()\n {\n final ScopeSymbolValidator validator = new ScopeSymbolValidator();\n for (ServiceMethod method : methods)\n validator.validate(method.getName(), method);\n }",
"@Disabled\n @Test\n void processDepositValidatorPubkeysContainsPubkey() {\n }",
"public boolean getDocumentConfirmation(ConnectionProvider conn, String strRecordId) {\n boolean confirmation = false;\n OBContext.setAdminMode();\n try {\n FIN_Payment payment = OBDal.getInstance().get(FIN_Payment.class, strRecordId);\n OBCriteria<FinAccPaymentMethod> obCriteria = OBDal.getInstance().createCriteria(\n FinAccPaymentMethod.class);\n obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT, payment.getAccount()));\n obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD,\n payment.getPaymentMethod()));\n obCriteria.setFilterOnReadableClients(false);\n obCriteria.setFilterOnReadableOrganization(false);\n List<FinAccPaymentMethod> lines = obCriteria.list();\n List<FIN_FinancialAccountAccounting> accounts = payment.getAccount()\n .getFINFinancialAccountAcctList();\n for (FIN_FinancialAccountAccounting account : accounts) {\n if (confirmation)\n return confirmation;\n if (payment.isReceipt()) {\n if ((\"INT\").equals(lines.get(0).getUponReceiptUse())\n && account.getInTransitPaymentAccountIN() != null)\n confirmation = true;\n else if ((\"DEP\").equals(lines.get(0).getUponReceiptUse())\n && account.getDepositAccount() != null)\n confirmation = true;\n else if ((\"CLE\").equals(lines.get(0).getUponReceiptUse())\n && account.getClearedPaymentAccount() != null)\n confirmation = true;\n } else {\n if ((\"INT\").equals(lines.get(0).getUponPaymentUse())\n && account.getFINOutIntransitAcct() != null)\n confirmation = true;\n else if ((\"WIT\").equals(lines.get(0).getUponPaymentUse())\n && account.getWithdrawalAccount() != null)\n confirmation = true;\n else if ((\"CLE\").equals(lines.get(0).getUponPaymentUse())\n && account.getClearedPaymentAccountOUT() != null)\n confirmation = true;\n }\n // For payments with Amount ZERO always create an entry as no transaction will be created\n if (payment.getAmount().compareTo(ZERO) == 0) {\n confirmation = true;\n }\n }\n } catch (Exception e) {\n // TODO no logging... ??\n return confirmation;\n } finally {\n OBContext.restorePreviousMode();\n }\n return confirmation;\n }",
"private static Map<String, Object> storePaymentApplication(Delegator delegator, GenericValue paymentApplication, Locale locale) {\n Map<String, Object> results = ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE,\n \"AccountingSuccessful\", locale));\n boolean debug = true;\n if (debug) {\n Debug.logInfo(\"Start updating the paymentApplication table \", MODULE);\n }\n\n if (DECIMALS == -1 || ROUNDING == null) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingAritmeticPropertiesNotConfigured\", locale));\n }\n\n // check if a record already exists with this data\n List<GenericValue> checkAppls = null;\n try {\n checkAppls = EntityQuery.use(delegator).from(\"PaymentApplication\")\n .where(\"invoiceId\", paymentApplication.get(\"invoiceId\"),\n \"invoiceItemSeqId\", paymentApplication.get(\"invoiceItemSeqId\"),\n \"billingAccountId\", paymentApplication.get(\"billingAccountId\"),\n \"paymentId\", paymentApplication.get(\"paymentId\"),\n \"toPaymentId\", paymentApplication.get(\"toPaymentId\"),\n \"taxAuthGeoId\", paymentApplication.get(\"taxAuthGeoId\"))\n .queryList();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n if (!checkAppls.isEmpty()) {\n if (debug) {\n Debug.logInfo(checkAppls.size() + \" records already exist\", MODULE);\n }\n // 1 record exists just update and if different ID delete other record and add together.\n GenericValue checkAppl = checkAppls.get(0);\n // if new record add to the already existing one.\n if (paymentApplication.get(\"paymentApplicationId\") == null) {\n // add 2 amounts together\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\")\n .add(checkAppl.getBigDecimal(\"amountApplied\")).setScale(DECIMALS, ROUNDING));\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else if (paymentApplication.getString(\"paymentApplicationId\").equals(checkAppl.getString(\"paymentApplicationId\"))) {\n // update existing record in-place\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\"));\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else { // two existing records, an updated one added to the existing one\n // add 2 amounts together\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\")\n .add(checkAppl.getBigDecimal(\"amountApplied\")).setScale(DECIMALS, ROUNDING));\n // delete paymentApplication record and update the checkAppls one.\n if (debug) {\n Debug.logInfo(\"Delete paymentApplication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.remove();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n // update amount existing record\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n }\n } else {\n if (debug) {\n Debug.logInfo(\"No records found with paymentId, invoiceid..etc probaly changed one of them...\", MODULE);\n }\n // create record if ID null;\n if (paymentApplication.get(\"paymentApplicationId\") == null) {\n paymentApplication.set(\"paymentApplicationId\", delegator.getNextSeqId(\"PaymentApplication\"));\n if (debug) {\n Debug.logInfo(\"Create new paymentAppication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.create();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else {\n // update existing record (could not be found because a non existing combination of paymentId/invoiceId/invoiceSeqId/ etc... was\n // provided\n if (debug) {\n Debug.logInfo(\"Update existing paymentApplication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n }\n }\n return results;\n }"
] | [
"0.5661856",
"0.5462607",
"0.51752925",
"0.51731527",
"0.51274914",
"0.506335",
"0.5057433",
"0.50412273",
"0.5002626",
"0.49882635",
"0.49491185",
"0.49221942",
"0.49145427",
"0.48964125",
"0.4895467",
"0.48901477",
"0.48768297",
"0.48768297",
"0.4757479",
"0.4756531",
"0.47478405",
"0.47429577",
"0.47310045",
"0.4713666",
"0.47065252",
"0.47058785",
"0.46827978",
"0.4676617",
"0.4675254",
"0.46611425",
"0.46574873",
"0.4641503",
"0.46370643",
"0.4630959",
"0.4629373",
"0.46282908",
"0.46270958",
"0.46211836",
"0.46112517",
"0.4608608",
"0.46052533",
"0.46026513",
"0.45801243",
"0.4574902",
"0.45748383",
"0.45727196",
"0.45654964",
"0.45604897",
"0.45602846",
"0.4558749",
"0.45477024",
"0.45474437",
"0.45438635",
"0.4538869",
"0.4535047",
"0.45347822",
"0.45241216",
"0.4522576",
"0.4522576",
"0.45141083",
"0.45081633",
"0.44977918",
"0.4491322",
"0.44892865",
"0.44879588",
"0.44875395",
"0.44865707",
"0.44855067",
"0.44853848",
"0.44847",
"0.44817337",
"0.44809452",
"0.44780475",
"0.44771656",
"0.4475975",
"0.447365",
"0.4466231",
"0.44639426",
"0.4463878",
"0.4462082",
"0.44619933",
"0.4459054",
"0.4458377",
"0.4456467",
"0.44547287",
"0.44512254",
"0.44380933",
"0.44370243",
"0.44320768",
"0.44259012",
"0.44205034",
"0.44201416",
"0.44193387",
"0.4415152",
"0.44148996",
"0.44109353",
"0.44103912",
"0.44081697",
"0.44070783",
"0.43972886"
] | 0.44355047 | 88 |
private List posts = new ArrayList(); | @Autowired
public PostService(PostRepository postsDao) {
this.postsDao = postsDao;
// createDummyList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Post> getPosts(){return this.posts;}",
"public void setPosts(List<Post> posts){\n this.posts = posts;\n }",
"List<PostInfo> getPostList();",
"public List<BlogPost> getPosts();",
"public Post()\n {\n nachrichten = new ArrayList<Nachricht>();\n }",
"@Override\n\tpublic List<Post> list() {\n\t\treturn null;\n\t}",
"public List<Blog> list();",
"public ArrayList<Post> viewAllPosts()\n\n {\n postList = new ArrayList<Post>();\n\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE 1\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst())\n {\n do\n {\n Post post = new Post();\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setPostedAt(c.getString(c.getColumnIndex(\"postedAt\")));\n post.setPostID(Integer.valueOf(c.getString(c.getColumnIndex(\"postID\"))));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n postList.add(post);\n } while (c.moveToNext());\n }\n\n else\n {\n Log.i(TAG, \"There are no posts in the DB.\");\n }\n c.close();\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return postList;\n }",
"private Posts() {\n }",
"List<Post> getAllPost() throws Exception;",
"private void initializeData() {\n posts = new ArrayList<>();\n posts.add(new Posts(\"Emma Wilson\", \"23 years old\", R.drawable.logo));\n posts.add(new Posts(\"Lavery Maiss\", \"25 years old\", R.drawable.star));\n posts.add(new Posts(\"Lillie Watts\", \"35 years old\", R.drawable.profile));\n }",
"@Override\r\n\tpublic List<Post> hotPosts() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.hotPosts();\r\n\t\t\r\n\t}",
"public List<Post> getCreatedPosts() {\n return createdPosts;\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"public ArrayList<Posto> getPostos() {\n return postos;\n }",
"public List<Posts> listPosts() {\n\t\treturn this.findAll();\n\t}",
"public ArrayList<String> loadPosts() {\n\t\tSAVE_FILE = PUSH_POSTS;\n\t\tArrayList<String> posts = loadIds();\n\t\treturn posts;\n\t}",
"private void loadPosts(final List<AnipalAbstractPost> posts){\n Query q1 = FirebaseDatabase.getInstance().getReference(\"UserPosts\")\n .child(MainActivity.currentUser.getUserUUID()).orderByChild(\"timestamp\")\n .limitToLast(5);\n q1.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n AnipalAbstractPost post ;\n for(DataSnapshot snap : dataSnapshot.getChildren()){\n if(snap.hasChild(\"photoURL\")){\n // Photo post\n post = snap.getValue(AnipalPhotoPost.class);\n post.findUser(post.getUserUUID());\n }else{\n // Donation post\n post = snap.getValue(AnipalDonationPost.class);\n post.findUser(post.getUserUUID());\n }\n posts.add(post);\n }\n\n Collections.reverse(posts);\n postAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"public void initAllPosts(){\n\t\tdbAdapter = new DBAdapter(getActivity());\n\t\tdbAdapter.open();\n\t\tCursor c = dbAdapter.getAllPosts();\n\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\tsetListAdapter(cursorAdapter);\n\t\t\n\t}",
"public ContactList()\n {\n myList = new ArrayList<>();\n }",
"private void readPosts() {\n FirebaseDatabase.getInstance().getReference().child(\"Posts\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n postList.clear();\n for(DataSnapshot dataSnapshot:snapshot.getChildren())\n {\n Post post = dataSnapshot.getValue(Post.class);\n for(String id : followingList)\n {\n if(post.getPublisher().equals(id))\n {\n postList.add(post);\n }\n }\n }\n postAdapter.notifyDataSetChanged();\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }",
"public List<Post> retriveAllPosts()\n\t {\n\t\t List<Post> Posts =(List<Post>) Postrepository.findAll();\n\t\t \n\t\t for(Post Post :Posts)\n\t\t {\n\t\t\t //l.info(\"Post +++ :\" +Post);\n\t\t }\n\t\t return Posts;\n\t\t\t \n\t }",
"@Override\n public List<Post> postList() {\n List<Post> savedPosts = (List<Post>) postRepository.findAll();\n Set<Long> userIdList = savedPosts.stream().map(Post::getUserId).collect(Collectors.toSet());\n\n User[] rateResponse = sender.getUsersByUserId(userIdList);\n\n HashMap<Long, User> userHashMap = new LinkedHashMap<>();\n for (User user : rateResponse) {\n userHashMap.put(user.getUserId(), user);\n }\n for (Post savedPost : savedPosts) {\n savedPost.setUser(userHashMap.get(savedPost.getUserId()));\n }\n return savedPosts;\n }",
"public Collection getPosts() throws DatabaseException;",
"public Iterable<Post> listAllPosts();",
"ListOfBooks(){\n \tlist = new LinkedList<Book>();\n }",
"@Inject\n public LocalApiImpl() {\n entityList= new ArrayList<>();\n for (int i=0; i<10; i++){\n PostEntity postEntity = new PostEntity();\n postEntity.setPostId(i);\n entityList.add(postEntity);\n }\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"@Override\n public int getItemCount() {\n return blogArrayList.size();\n }",
"void displayAllPosts();",
"private List<Text> getPosts() {\n\t\tList<Text> result = new ArrayList<>();\n\t\tObservableList<Post> postList = PostDAO.searchPosts(String.valueOf(friendsID));\n\t\tfor(Post post : postList) {\n\t\t\tString postTime = post.getPostTime();\n\t\t\tString content = post.getPostContent();\n\t\t\tString editTime = post.getEditTime();\n\t\t\tString toPost;\n\t\t\tif(editTime != null) {\n\t\t\t\ttoPost = \"Post on \" + postTime + \" Last edit on \" + editTime + \"\\n\" + content + \"\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttoPost = \"Post on \" + postTime + \"\\n\" + content + \"\\n\";\n\t\t\t}\n\t\t\tText text = new Text(toPost);\n\t\t\tresult.add(text);\n\t\t}\n\t\treturn result;\n\t}",
"public List<Post> getLikedPosts() {\n return likedPosts;\n }",
"public void initPosPosts(){\n\t\tdbAdapter = new DBAdapter(getActivity());\n\t\tdbAdapter.open();\n\t\tCursor c = dbAdapter.getPosPosts();\n\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\tsetListAdapter(cursorAdapter);\n\t}",
"List<Post> findAllPosts();",
"public List<Article> getList() {\n return list;\n }",
"public void setCreatedPosts(List<Post> createdPosts) {\n this.createdPosts = createdPosts;\n }",
"public MusicScore ()\n {\n score = new ArrayList<Note>();\n }",
"public ArrayList<AshirBlogPostingHelper> getAllPots() {\n String query = \"SELECT * FROM \" + NAME_OF_TABLE;\n ArrayList<AshirBlogPostingHelper> ashirPostsList = new ArrayList<AshirBlogPostingHelper>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(query, null);\n if (c != null) {\n while (c.moveToNext()) {\n String post = c.getString(c.getColumnIndex(Col_2));\n try {\n byte[] getImageFromDb = c.getBlob(c.getColumnIndex(Col_3));\n AshirBlogPostingHelper postHelper = new AshirBlogPostingHelper();\n\n postHelper.setDataPost(post);\n postHelper.setImage(getImageFromDb);\n\n ashirPostsList.add(postHelper);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n\n db.close();\n return ashirPostsList;\n\n }",
"public TableModelPosto(ArrayList<Posto> listPostos) {\n postos = listPostos;\n }",
"@GetMapping(\"\")\n public ResponseEntity <List<Post>>listAllPosts() {\n return ResponseEntity.ok(postService.listAllPosts());\n }",
"@Override\r\n\tpublic List<Post> getAllPost() {\n\t\tString hql = \"from Post\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql);\r\n\t}",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n if (posts.size() == 0) {\n Toast.makeText(getContext(), \"You've reached the end of all posts!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"public void help (ArrayList<Post> post)\n {\n adminRecView = findViewById(R.id.adminRecView);\n posts = post;\n ModRecAdapter adapt = new ModRecAdapter(posts, this);\n adminRecView.setAdapter(adapt);\n adminRecView.setLayoutManager(new LinearLayoutManager(this));\n }",
"public List getAllBlogPosts(){\n return blogPostFacade.findAll();\n }",
"@GetMapping(\"/feed\")\n private ResponseEntity<List<Post>> getPosts() {\n User user = getCurrentUser();\n logger.info(\"Not null \" + (user == null));\n List<Post> posts = postService.findAllByUser(user);\n return new ResponseEntity<>(posts, HttpStatus.OK);\n }",
"public static Result posts() {\n\t\tPost post = new Post();\n\t\tUser user = UserController.loggedInUser();\n\t\tif (user != null) {\n\t\t\tpost.city= user.city;\n\t\t\tpost.state = user.state;\n\t\t\tpost.country = user.country;\n\t\t\tpost.zipcode = user.zipcode;\n\t\t\tpost.createdBy = user.userName;\t\t\t\n\t\t}\n\t\t//TODO:Use bind() instead of the above to avoid 0.0 in price field\n\t\treturn ok(index.render(Post.listPosts(), form(Post.class).fill(post), user));\n\t}",
"@OneToMany(mappedBy = \"creator\", fetch = FetchType.LAZY,\n cascade = CascadeType.PERSIST, orphanRemoval = true)\n @OrderBy(\"createdAt\")\n public List<BlogEntry> getEntries() {\n return entries;\n }",
"private MyAlbumList() {\n albums = new ArrayList<Album>();\n }",
"public List()\n {\n list = new Object [10];\n }",
"public void initNegPosts(){\n\t\t\tdbAdapter = new DBAdapter(getActivity());\n\t\t\tdbAdapter.open();\n\t\t\tCursor c = dbAdapter.getNegPosts();\n\t\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\t\tsetListAdapter(cursorAdapter);\n\t\t}",
"private void CreateStudentList() {\r\n\t\tStudentList=new ArrayList<Student>();\t\r\n}",
"public void setEntries(List<BlogEntry> entries) {\n this.entries = entries;\n }",
"protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"@Override\n public void onRefresh() {\n fetchPosts();\n }",
"private MealsList() {\n meals = new ArrayList<>();\n }",
"@Override\n public List<Post> refresh() {\n try {\n this.posts = manager.refreshFeed(this.user.getEmail());\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return posts;\n }",
"List() {\n this.length = 0;\n }",
"NewsMakerList() {\n\t\tthis.newsMakers = new ArrayList<NewsMaker>();\n\t}",
"@GET(\"posts/\")\n Call<List<Post>>getPosts();",
"public static ArrayList<Post> ParsePosts(JSONObject jsonTotalObject)\n {\n ArrayList<Post> posts = new ArrayList<>();\n try\n {\n JSONArray postArray = jsonTotalObject.getJSONArray(\"posts\");\n for(int i = 0 ;i<postArray.length();i++)\n {\n JSONObject object = postArray.getJSONObject(i);\n Post post = new Post();\n // Notice,use \"opt\" instead of \"get\" to avoid null value exception\n post.setTitle(object.optString(\"title\"));\n post.setId(object.optInt(\"id\"));\n post.setThumbnailUrl(Settings.DEFAULT_THUMBNAIL_URL);\n post.setUrl(object.optString(\"url\"));\n // Set to zero if there's no comment.\n post.setCommentCount(object.optInt(\"comment_count\", 0));\n post.setDate(object.optString(\"date\", \"N/A\"));\n post.setExcerpt(object.optString(\"excerpt\",\"N/A\"));\n post.setContent(object.optString(\"content\",\"N/A\"));\n // Care that author is not a String,it is a JSONObject\n JSONObject author = object.getJSONObject(\"author\");\n post.setAuthor(author.optString(\"name\", \"N/A\"));\n // if the post has it's thumbnail image,use it,or just keep default\n JSONObject featuredImages = object.optJSONObject(\"thumbnail_images\");\n if(featuredImages != null)\n {\n post.setFeaturedImageUrl(featuredImages.optJSONObject(\"full\")\n .optString(\"url\", Settings.DEFAULT_THUMBNAIL_URL));\n }\n posts.add(post);\n }\n return posts;\n }\n catch (JSONException e)\n {\n Log.e(TAG,\"JSONException when loading Posts\",e);\n e.printStackTrace();\n return null;\n }\n }",
"@Override\n\tpublic List<Post> getNewPosts(int number) throws Exception {\n\t\treturn null;\n\t}",
"public MyStack() {\n \tlist = new ArrayList<Integer>();\n }",
"protected void queryPosts()\n {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e)\n {\n if(e != null)\n {\n Log.e(TAG, \"Issue with getting posts\", e);\n }\n for(Post post : posts)\n {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username\" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n swipeContainer.setRefreshing(false);\n adapter.notifyDataSetChanged();\n\n }\n });\n }",
"public void addAll(List<Post> list) {\n posts.addAll(list);\n notifyDataSetChanged();\n }",
"public void addAll(List<Post> list) {\n posts.addAll(list);\n notifyDataSetChanged();\n }",
"public void addAll(List<Post> list) {\n posts.addAll(list);\n notifyDataSetChanged();\n }",
"public void addAll(List<Post> list) {\n posts.addAll(list);\n notifyDataSetChanged();\n }",
"public PostsAdapter(Context context, List<Post> posts) {\n this.context = context;\n this.posts = posts;\n }",
"MyAdapter(List<FakeNews> myList) {\n list = myList;\n }",
"@RequestMapping(value = \"/posts\", method = RequestMethod.GET)\n\tpublic String postsPage(Model model) {\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tmodel.addAttribute(\"username\", auth.getName());\n\t\tmodel.addAttribute(\"title\", \"WeSpeak | Bài viết kinh nghiệm\");\n\n\t\tList<Post> list = postDAO.listPostActive(1);\n\t\tmodel.addAttribute(\"postModel\", list);\n\t\tif (list != null) {\n\t\t\tList<Post> listImportant = new ArrayList<Post>();\n\t\t\tif (list.size() <= 4)\n\t\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\t\tlistImportant.add(list.get(i));\n\t\t\telse\n\t\t\t\tfor (int i = 0; i < 4; i++)\n\t\t\t\t\tlistImportant.add(list.get(i));\n\n\t\t\tmodel.addAttribute(\"postListImportant\", listImportant);\n\t\t}\n\t\treturn \"postsPage\";\n\t}",
"private static List<Post> parseResults(ResultSet results) throws SQLException {\r\n\tList<Post> postList = new LinkedList<Post>();\r\n\r\n\twhile (results.next()) {\r\n\t Post p = new Post();\r\n\r\n\t p.id = results.getInt(\"id\");\r\n\t p.author = results.getString(\"author\");\r\n\t \r\n\t long date = results.getInt(\"date\") * 1000L; // milliseconds\r\n\t p.date = new Date(date);\r\n\t \r\n\t p.isPublic = results.getInt(\"isPublic\") == 1;\r\n\t p.setContent(results.getString(\"content\"));\r\n\r\n\t postList.add(p);\r\n\t}\r\n\r\n\treturn postList;\r\n }",
"public LatestPost() {\n\t}",
"List<Note> list();",
"public void addPost(Post post) {\n if (this.posts == null) {\n this.posts = new ArrayList<>();\n }\n this.posts.add(post);\n }",
"List<Post> getPostForUser(String email) throws Exception;",
"public List<Object> getListForum();",
"public TaskList (ArrayList<Task> tasks){ this.tasks = tasks;}",
"public List<Post> getMyPostById(int id) {\n\t\treturn pm.getMyPostById(id);\r\n\t}",
"public ArrayList<User> getArrayList(){\n return userlist;\n }",
"public ArrayList<PostInfo> getPost() throws SQLException {\n ArrayList<PostInfo> postInfoList = new ArrayList<>();\n String sql = \"SELECT * FROM `post` WHERE `status` = 1 ORDER BY `post_time` DESC\";\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n postInfoList.add(new PostInfo(resultSet.getInt(\"post_id\"), resultSet.getInt(\"place_id\"), resultSet.getString(\"post_text\"),\n resultSet.getDate(\"post_time\"), resultSet.getInt(\"status\"), resultSet.getInt(\"user_id\"), resultSet.getInt(\"editor_id\")));\n }\n return postInfoList;\n }",
"protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n //get all the post objects from the database\n query.include(Post.KEY_USER);\n //set the limit to 20 posts being retrieved\n query.setLimit(POSTS_QUERY_LIMIT);\n\n query.addDescendingOrder(Post.KEY_CREATED_KEY);\n\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n // e == null if success\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"public void showPosts() {\n\t\tpostsList.getItems().clear();\n\t\tList<Text> toPost = getPosts();\n\t\tfor(Text text : toPost) {\n\t\t\tSystem.out.println(text);\n\t\t\ttext.wrappingWidthProperty().bind(postsList.widthProperty());\n\t\t\tpostsList.getItems().add(text);\n\t\t}\n\t}",
"Sharks() {\n sharks = new ArrayList<Shark>(); // Initialize the ArrayList\n }",
"private void assignPosts(List<Post> posts) {\n\t\ttextPosts = Lists.newArrayList();\n\t\tphotoPosts = Lists.newArrayList();\n\t\tvideoPosts = Lists.newArrayList();\n\t\tfor (Post post : posts) {\n\t\t\tif (post instanceof TextPost) {\n\t\t\t\ttextPosts.add((TextPost)post);\n\t\t\t} else if (post instanceof PhotoPost) {\n\t\t\t\tphotoPosts.add((PhotoPost)post);\n\t\t\t} else if (post instanceof VideoPost) {\n\t\t\t\tvideoPosts.add((VideoPost)post);\n\t\t\t}\n\t\t}\n\t}",
"public ListStack() {\n\t\tlist = new ArrayList<>();\n\t}",
"@Override\n protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n Log.d(TAG, \"ParseUser\" + ParseUser.getCurrentUser().toString());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null){\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n for (Post post: posts){\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"@Override\r\n\tpublic List<Post> latastPosts(int bankuaihao) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.latastPosts(bankuaihao);\r\n\t\t\r\n\t}",
"protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }",
"public list() {\r\n }",
"private void queryPost() {\n tv_search.setText(\"Recently Added Posts:\");\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.setLimit(15);\n query.addDescendingOrder(Post.KEY_CREATED);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if(e!= null){\n Log.e(tag, \"Issue with getting post\", e);\n return;\n }\n adaptor.clear();\n adaptor.addAll(posts);\n //allPost.addAll(posts);\n //adaptor.notifyDataSetChanged();\n //swipeRefreshLayout.setRefreshing(false);\n\n //user just created a post\n if (isJustCreatedNewPost == true)\n {\n //reset bool\n isJustCreatedNewPost = false;\n// //subscribe user to their new post channel\n// String postChannel = \"POST_\"+posts.get(0).getObjectId();\n// ParsePush.subscribeInBackground(postChannel);\n\n }\n }\n });\n }",
"List<Post> findAll();",
"public void setLikedPosts(List<Post> likedPosts) {\n this.likedPosts = likedPosts;\n }",
"public List(final SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n this.resource = resourceResolver.getResource(\"/content/htlblog/posts\");\n }",
"private void queryPosts() {\n ParseQuery<OutfitPost> query = ParseQuery.getQuery(OutfitPost.class);\n // only include data referred by user key\n query.include(OutfitPost.KEY_USER);\n query.whereEqualTo(OutfitPost.KEY_USER, ParseUser.getCurrentUser());\n // limit query to latest 20 items\n query.setLimit(20);\n // order posts by creation date (newest first)\n query.addDescendingOrder(OutfitPost.KEY_CREATED_KEY);\n // start an asynchronous call for posts\n query.findInBackground(new FindCallback<OutfitPost>() {\n @Override\n public void done(List<OutfitPost> posts, ParseException e) {\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n // Save oldest post in query for loading more posts\n if (posts.size() > 0) {\n oldestPost = posts.get(posts.size() - 1).getCreatedAt();\n }\n // update adapter with posts list\n adapter.clear();\n adapter.addAll(posts);\n }\n });\n }",
"private void loadHisPosts() {\n//linearlayout for recycleview\n LinearLayoutManager layoutManager=new LinearLayoutManager(ThereProfileActivity.this);\n layoutManager.setStackFromEnd(true);\n layoutManager.setReverseLayout(true);\n //set this layout to rycleview\n postRecycleview.setLayoutManager(layoutManager);\n //init post list\n DatabaseReference reference= FirebaseDatabase.getInstance().getReference(\"Posts\");\n //query to load photo\n Query query=reference.orderByChild(\"uid\").equalTo(uid);\n //get all data from this referece\n query.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n postList.clear();\n for(DataSnapshot ds:dataSnapshot.getChildren()){\n ModelPost modelPost=ds.getValue(ModelPost.class);\n // add to list\n postList.add(modelPost);\n //adapter\n adapterPosts=new AdapterPosts(ThereProfileActivity.this,postList);\n //set this to recycleview\n postRecycleview.setAdapter(adapterPosts);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Toast.makeText(ThereProfileActivity.this, \"\"+databaseError.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }",
"public Post() {\n\t\t\n\t}",
"public Highscore() {\n scores = new ArrayList<Score>();\n }",
"public void addAll(List<Post> postList) {\n posts.addAll(postList);\n notifyDataSetChanged();\n }"
] | [
"0.82350117",
"0.782302",
"0.7779116",
"0.7544066",
"0.7390721",
"0.73142654",
"0.7019232",
"0.67308813",
"0.67076623",
"0.66511863",
"0.6590027",
"0.6571023",
"0.65693116",
"0.6558425",
"0.6558425",
"0.6535269",
"0.64847916",
"0.64636457",
"0.6453146",
"0.6415342",
"0.63971287",
"0.6380505",
"0.63479745",
"0.6319833",
"0.63152003",
"0.63144904",
"0.629686",
"0.6288469",
"0.62754476",
"0.62754476",
"0.62684274",
"0.62307686",
"0.62291193",
"0.621488",
"0.6210163",
"0.620587",
"0.6154388",
"0.6127242",
"0.61246413",
"0.6103781",
"0.61036354",
"0.6094298",
"0.60920703",
"0.609089",
"0.6088456",
"0.60667634",
"0.6057681",
"0.60479516",
"0.6042918",
"0.6023107",
"0.60200894",
"0.6016757",
"0.60158646",
"0.600399",
"0.59962434",
"0.599505",
"0.5989911",
"0.59758425",
"0.5974873",
"0.5969653",
"0.596795",
"0.5965716",
"0.59595835",
"0.5947903",
"0.5933596",
"0.59286284",
"0.5927216",
"0.5927216",
"0.5927216",
"0.5927216",
"0.59237444",
"0.59094316",
"0.58940977",
"0.588885",
"0.587549",
"0.58714134",
"0.5867144",
"0.58588463",
"0.5843424",
"0.5842628",
"0.58288974",
"0.58183104",
"0.5813089",
"0.58121395",
"0.5811246",
"0.5809444",
"0.58024603",
"0.5799141",
"0.5796073",
"0.5777035",
"0.5766723",
"0.5758739",
"0.57579225",
"0.5754344",
"0.57537603",
"0.5737522",
"0.5729077",
"0.57276034",
"0.5719406",
"0.57188886",
"0.57185674"
] | 0.0 | -1 |
return posts.get((int) (id 1)); | public Post findOne(long id) {
return postsDao.findById(id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Post getPostByID(long postId);",
"T get(Integer id);",
"public BlogPost getPostById(Long id);",
"T getById(int id);",
"@Override\r\n\tpublic Post getPostById(int id) {\n\t\treturn getHibernateTemplate().get(Post.class, id);\r\n\t}",
"Optional<Post> getPost(String postId) throws Exception;",
"Post findById(int id);",
"T get(ID id);",
"T findById(Integer id);",
"Forumpost selectByPrimaryKey(Integer postid);",
"T getById(ID id);",
"int getPostId();",
"T get(PK id);",
"Object get(ID id) throws Exception;",
"public Post getByID(int id) throws SQLException {\r\n\tString sql = \"SELECT * FROM posts WHERE id = ?\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\tst.setInt(1, id);\r\n\t\r\n\tResultSet results = st.executeQuery();\r\n\tList<Post> parsed = parseResults(results);\r\n\t\r\n\treturn (parsed.size() == 1) ?\r\n\t\tparsed.get(0) :\r\n\t\t null;\r\n }",
"E getById(long id);",
"public abstract T findOne(int id);",
"T findById(ID id) ;",
"T getById(Long id);",
"T getById(PK id);",
"Item findById(String id);",
"T getbyId(I id);",
"public Post findById(Integer i) {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tPost p = session.get(Post.class, i);\n\t\ttrans.commit();\n\t\treturn p;\n\t}",
"PmPost selectByPrimaryKey(String postId);",
"public Data findById(Object id);",
"@GetMapping(\"posts/{id}\")\n public Post getById(@PathVariable Long id){\n return postService.getById(id)\n .orElseThrow(()->new ResponseStatusException(HttpStatus.NOT_FOUND));\n }",
"Blog read(int id);",
"public Post getPost(int postID)\n {\n Post post = null;\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE postID=\"+\"'\"+postID+\"'\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst()) {\n post = new Post();\n post.setPostID(c.getColumnIndex(\"postID\"));\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n }\n else\n {\n Log.i(TAG, \"This postID doesn't exist in the DB.\");\n }\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n Log.i(TAG, \"Error in getting post from DB.\");\n\n }\n return post;\n }",
"public BlogEntry findBlogEntry(Long id);",
"public Product get(String id);",
"String get(String id);",
"T findOne(I id);",
"public News getByid(News news);",
"public abstract T byId(ID id);",
"public Item getItemById(Integer itemId);",
"D getById(K id);",
"@GET(\"posts/{id}\")\n public Call<Post> getPost(@Path(\"id\") int postId);",
"T findById(long pk);",
"M getById(Serializable id) throws DataAccessException;",
"@Override\n public Movie getFromId (Integer id) {return this.movies.get(id);}",
"@Override\r\n\tpublic Post searchInfById(Post post2) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tResultSet resultSet=postDao.selectById(post2);\r\n\t\tPost post=new Post();\r\n\t\ttry {\r\n\t\t\tif(resultSet.next()) {\r\n\t\t\t\tpost.setPostId(resultSet.getInt(1));\r\n\t\t\t\tpost.setPostName(resultSet.getString(3));\r\n\t\t\t\tpost.setUserId(resultSet.getInt(2));\r\n\t\t\t\tpost.setPostProperty(resultSet.getInt(4));\r\n\t\t\t\tpost.setPostEnterNum(resultSet.getInt(5));\r\n\t\t\t\tpost.setPostTime(resultSet.getDate(6));\r\n\t\t\t\tpost.setPostScore(resultSet.getDouble(7));\r\n\t\t\t\tpost.setScoreCount(resultSet.getInt(8));\r\n\t\t\t\tpost.setLastComTime(resultSet.getDate(9));\r\n\t\t\t\tpost.setResId(resultSet.getInt(10));\r\n\t\t\t\tpost.setResPath(resultSet.getString(12));\r\n\t\t\t\tpost.setUserName(resultSet.getString(14));\r\n\t\t\t\tpost.setUserLevel(resultSet.getInt(16));\r\n\t\t\t\tpost.setUserStatus(resultSet.getInt(17));\r\n\t\t\t\tpost.setPropertyName(resultSet.getString(19));\r\n\t\t\t\tpost.setLocation(resultSet.getString(22));\r\n\t\t\t\tpost.setPhone(resultSet.getString(23));\r\n\t\t\t\tpost.setPostCode(resultSet.getInt(24));\r\n\t\t\t\tpost.setEmail(resultSet.getString(25));\r\n\t\t\t\tpost.setGender(resultSet.getString(26));\r\n\t\t\t\tpost.setHobby(resultSet.getString(27));\r\n\t\t\t\tpost.setMajor(resultSet.getString(28));\r\n\t\t\t\tpost.setScore(resultSet.getInt(29));\r\n\t\t\t\tpost.setNickName(resultSet.getString(30));\r\n\t\t\t\tpost.setUserRegion(resultSet.getString(31));\r\n\t\t\t\tpost.setUserPhoto(resultSet.getString(32));\r\n\t\t\t\tpost.setComCount(resultSet.getInt(39));\r\n\t\t\t\t\r\n\t\t\t\treturn post;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public Numbers findById(long id);",
"void displayPostWithId(String id);",
"@GetMapping(\"/{id}\")\n public ResponseEntity<Post> getPostById(@PathVariable Long id){\n Post post = postService.getPostById(id);\n return ResponseEntity.ok(post);\n }",
"public long getPostId();",
"public T getByID(int id) {\n\t\treturn this.data.get(id);\n\t}",
"public E findById(Serializable pk) ;",
"public T get( final int id )\n\t{\n\t\treturn this.dao.findById( id ).get();\n\t}",
"@Override\n\tpublic Object getById(Integer id) {\n\t\treturn null;\n\t}",
"Book getBookById(Integer id);",
"E findById(K id);",
"@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}",
"public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\n return null;\n }",
"public Matiere findById(Integer id){\n return matiereRepository.getOne(id);\n }",
"public abstract T findEntityById(int id);",
"T findOne(Long id);",
"Integer getLikes(Integer id);",
"@Override\n\tpublic T getEntryById(Serializable id) {\n\t\treturn (T) this.hibernateTemplate.get(this.classt, id);\n\t}",
"public abstract T findByID(ID id) ;",
"V get(K id);",
"public VBeatPostModel getPost(String postId){\n List<VBeatPostModel> postList = AppLocalDB.getInstance().db.postDao().getPost(postId);\n\n if(postList.size() == 0) {\n return null;\n } else {\n return postList.get(0);\n }\n\n }",
"public T get(int objectId) throws SQLException;",
"public Limit get(int id);",
"public Integer getId(){return id;}",
"NewsItem obtainNewsItemById(long id) throws ObjectRetrievalFailureException;",
"public Todo fetchByPrimaryKey(long todoId);",
"@Override\n\tpublic T get(ID id) {\n\t\tOptional<T> obj = getDao().findById(id);\n\t\tif (obj.isPresent()) {\n\t\t\treturn obj.get();\n\t\t}\t\t\n\t\treturn null;\n\t}",
"QuestionOne selectByPrimaryKey(Integer id);",
"T readOne(int id);",
"public o selectById(long id);",
"@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}",
"@Override\n\tpublic NewsCollection findOne(Integer id) {\n\t\treturn newsCollectionMapper.findOne(id);\n\t}",
"E findById(N id);",
"@Override\n\tpublic T getById(long id) {\n\t\treturn null;\n\t}",
"Article selectByPrimaryKey(String id);",
"public T getReultById(int id){\n return result_now.get(id);\n }",
"public Blog getBlogById(String blogId);",
"@Override\r\n\tpublic Article select(Integer id) {\n\t\treturn dao.select(id);\r\n\t}",
"SwipersDO selectByPrimaryKey(Integer id);",
"@Override\n\tpublic Eleve findById(int id) {\n\t\treturn map.get(id);\n\t}",
"Optional<T> find(long id);",
"public Item get(int i);",
"private BaseItem getItemById(int id) {\n\t\tfor (BaseItem item : mItems) {\n\t\t\tif (item.mId == id) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn getDefault();\n\t}",
"PageFunc selectByPrimaryKey(Integer id);",
"@Override\r\n\tpublic Object findById(long id) {\n\t\treturn null;\r\n\t}",
"E find(Id id) throws RepositoryException;",
"Note getOneEntity(Long id);",
"Tag findById(int id);",
"Prueba selectByPrimaryKey(Integer id);",
"Object get(int i);",
"public Item getByID(Integer id) {\r\n Item item = null;\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n item = (Item) session.get(Item.class, id);\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return item;\r\n }",
"public abstract Optional<Object> getByID(@PathVariable(\"id\") int id);",
"public PostingsEntry get( int i ) {\n\t return list.get(i);\n }",
"public int getId(){return id;}",
"public ArrayList<PostInfo> searchPost(int id) throws SQLException {\n //pl is postList\n ArrayList<PostInfo> pl = new ArrayList<>();\n String sql = \"SELECT * FROM `post` WHERE `post_id` = ?\";\n preparedStatement = connection.prepareStatement(sql);\n preparedStatement.setInt(1, id);\n resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n pl.add(new PostInfo(resultSet.getInt(\"post_id\"), resultSet.getInt(\"place_id\"), resultSet.getString(\"post_text\"),\n resultSet.getDate(\"post_time\"), resultSet.getInt(\"status\"), resultSet.getInt(\"user_id\"), resultSet.getInt(\"editor_id\")));\n }\n\n return pl;\n }",
"Article findArticleById(String id);",
"@Transactional\r\n\tpublic Blog findById(String id) {\n\t\tString hql = \"from Blog where id=\" + \"'\" + id + \"'\";\r\n\t\tQuery query =(Query) sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\tList<Blog> listBlog= (List<Blog>) query.getResultList();\r\n\t\tif (listBlog!= null && !listBlog.isEmpty()) {\r\n\t\t\treturn listBlog.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Product getByID(int id) {\n if (!isValidID(id)) {\n System.out.println(\"Ese item no existe\");\n return null;\n }\n\n Product r = null;\n try {\n r = products[id].clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n return r;\n }",
"priorizedListObject find( int id ) throws DAOException;",
"public Items findByPrimaryKey(int id) throws ItemsDaoException;"
] | [
"0.7383078",
"0.7244938",
"0.7165286",
"0.70999914",
"0.7018613",
"0.697044",
"0.69665384",
"0.6846478",
"0.68321675",
"0.68307084",
"0.6787862",
"0.67844325",
"0.6780118",
"0.6755906",
"0.6755243",
"0.6742461",
"0.6739956",
"0.66906047",
"0.6659792",
"0.66301304",
"0.66298306",
"0.66254205",
"0.66099125",
"0.6589911",
"0.6582018",
"0.6574305",
"0.6565019",
"0.6531628",
"0.6516808",
"0.6516554",
"0.65059835",
"0.6488101",
"0.64570385",
"0.64136374",
"0.63932127",
"0.6381586",
"0.6373693",
"0.6372187",
"0.6370828",
"0.63668966",
"0.63620883",
"0.63608515",
"0.63586503",
"0.6352463",
"0.6350415",
"0.63440996",
"0.6344021",
"0.6329164",
"0.6291415",
"0.6279209",
"0.62770134",
"0.6275658",
"0.62744737",
"0.62737143",
"0.626821",
"0.6264463",
"0.62632984",
"0.6258262",
"0.6242425",
"0.62266153",
"0.62247473",
"0.62157166",
"0.6215089",
"0.6210934",
"0.6210365",
"0.6194074",
"0.6191158",
"0.61890125",
"0.6165519",
"0.61597806",
"0.6146082",
"0.61347437",
"0.6122416",
"0.61067617",
"0.6095818",
"0.60772914",
"0.6075507",
"0.6059325",
"0.6057855",
"0.6054868",
"0.6029352",
"0.60234606",
"0.6022925",
"0.6020632",
"0.6014414",
"0.6010623",
"0.600516",
"0.6002794",
"0.6001398",
"0.5990056",
"0.59880006",
"0.5983974",
"0.5983276",
"0.5969958",
"0.5968337",
"0.596445",
"0.59624964",
"0.5950891",
"0.59484714",
"0.59411913"
] | 0.68646485 | 7 |
post.setId(posts.size() + 1); posts.add(post); | public Post save(Post post) {
return postsDao.save(post);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Post add(Post entity) {\n\t\treturn null;\n\t}",
"public void postReview(Review review)\n\t{\n\t\t// The new review ID is the last review ID + 1\n\t\treview.setId(list.get(list.size()-1).getId() + 1);\n\t\t\n\t\t// Add the review to the list\n\t\tlist.add(review);\n\t}",
"@Override\r\n\tpublic void addPost(Post post) {\n\t\tgetHibernateTemplate().save(post);\r\n\t}",
"int getPostId();",
"@Transactional(propagation = Propagation.REQUIRED, readOnly = false)\n\t@Override\n\tpublic void addPost(Post post) {\n\t\tpostDao.addPost(post);\n\t}",
"void setPostId(int postId);",
"void add( ModelObject modelObject, Long id );",
"public List<Post> getPosts(){return this.posts;}",
"public long getPostId();",
"public void setPosts(List<Post> posts){\n this.posts = posts;\n }",
"private void setId() {\n id = count++;\n }",
"private void fetchMorePosts() {\n long lastPostTimestamp = prismPostArrayList.get(prismPostArrayList.size() - 1).getTimestamp();\n //toast(\"Fetching more pics\");\n databaseReferenceAllPosts\n .orderByChild(Key.POST_TIMESTAMP)\n .startAt(lastPostTimestamp + 1)\n .limitToFirst(Default.IMAGE_LOAD_COUNT)\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n PrismPost prismPost = Helper.constructPrismPostObject(postSnapshot);\n prismPostArrayList.add(prismPost);\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (prismPostArrayList.size() > 0) {\n mainContentRecyclerViewAdapter\n .notifyItemInserted(prismPostArrayList.size());\n }\n }\n });\n\n }\n populateUserDetailsForAllPosts(false);\n } else {\n Log.i(Default.TAG_DB, Message.NO_DATA);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(Default.TAG_DB, databaseError.getMessage(), databaseError.toException());\n }\n });\n }",
"public int generateId(){\n return repository.getCount()+1;\n }",
"public void setPostId(long postId);",
"public void addPost(Post post) {\n if (this.posts == null) {\n this.posts = new ArrayList<>();\n }\n this.posts.add(post);\n }",
"public void add()\n {\n set(++ current);\n }",
"public void doneOrder(){\n setId(++count);\n }",
"@PostMapping(\"/addPost\")\n public ResponseEntity addNewPost(@RequestBody Post post){\n postService.postNewInfo(post);\n return new ResponseEntity(HttpStatus.OK);\n }",
"public void savePost(VBeatPostModel post) {\n AppLocalDB.getInstance().db.postDao().insertAll(post);\n }",
"int insert(PmPost record);",
"public void add(Posto p) {\n postos.add(p);\n fireTableRowsInserted(postos.size() - 1, postos.size() - 1);\n }",
"public Integer getPostId() {\n return postId;\n }",
"void savePost(Post post);",
"@Inject\n public LocalApiImpl() {\n entityList= new ArrayList<>();\n for (int i=0; i<10; i++){\n PostEntity postEntity = new PostEntity();\n postEntity.setPostId(i);\n entityList.add(postEntity);\n }\n }",
"Post save(Post post) throws Exception;",
"@Override\n public void updateToNextDoc() {\n if(idx < postingList.size())\n idx += postingList.get(idx+1)+2;\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n int last = numPostsByTime;\n try {\n for(DataSnapshot singleSnapshot : dataSnapshot.getChildren()){\n post = singleSnapshot.getValue(Post.class);\n Log.d(\"TAG\", \"post: \"+post.getTitle()+\" - \"+post.getId());\n// Log.d(\"TAG\", \"epaai: \"+ post.getId());\n// if(dataSnapshot.getChildrenCount() == numPostsByTime){\n// if (last > 1){\n// postAdapter.addBottomListItem(post);\n// last--;\n// }else{\n// lastPositionId = post.getId();\n// }\n// }else{\n// postAdapter.addBottomListItem(post);\n// lastPost = true;\n// }\n\n if (last == numPostsByTime){\n lastPositionId = post.getId();\n last--;\n }else{\n postAdapter.addListItem(post, posts.size());\n }\n }\n } catch (Exception ex) {\n Log.e(\"oops\", ex.getMessage());\n }\n }",
"public int getPostId() {\r\n\t\treturn postId;\r\n\t}",
"int insertSelective(PmPost record);",
"public synchronized void add(int index, T obj) {\n\t\tfor(int i = mIds.size(); i > index; i--) {\n\t\t\tmObjects.put(i, mObjects.get(i - 1));\n\t\t}\n\t\t// Add object to actual end of list\n\t\tmObjects.put(index, obj);\n\t\t// Add null for that object to id list\n\t\tmIds.add(index, null);\n\t\tif(mAutoCommit) AndSync.save(obj);\n\t}",
"public long getPostId() {\n return postId;\n }",
"private static int getNextID() {\n return persons.get(persons.size() - 1).getId() + 1;\n }",
"private void updateDocPostingList(int docId){\n int i = getIndexForDocument(docId);\n if(i==-1){\n // document does not exist in posting list. Error out.\n System.err.println(\"Document not in List\");\n updateDocPostingList(this.postingList.get(0));\n }\n int size = this.postingList.get(i+1);\n this.docPostingList = new int[size];\n int k = 0;\n for(int j = i+2; j<size+i+2;j++)\n this.docPostingList[k++] = this.postingList.get(j);\n this.pos = 0;\n\n }",
"public void addID(int id){\n IDList.add(id);\n }",
"@Override\n\tpublic Post createPost(Post post) {\n\t\treturn postDao.createPost(post);\n\t}",
"public int add(Post post) throws SQLException {\r\n\tString sql = \"INSERT INTO posts VALUES ( null, ?, ?, ?, ? )\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\r\n\t// convert date and publicity to fit in the database\r\n\tint date = (int) Math.floor(post.date.getTime() / 1000);\r\n\tint isPublic = post.isPublic ? 1 : 0;\r\n\t\r\n\tst.setString(1, post.author);\r\n\tst.setInt(2, date);\r\n\tst.setInt(3, isPublic);\r\n\tst.setString(4, post.getContent());\r\n\r\n\tst.execute();\r\n\tint result = st.getUpdateCount();\r\n\treturn result;\r\n }",
"public int getId(){return id;}",
"public List<PostEntry> savePost(String username, int postid, String title, String body){\n Connection c = null;\n PreparedStatement ps = null; \n ResultSet rs = null;\n\n boolean ret = true;\n\n //check if postid exists.\n if(postid>0 && findPost(username, postid)==null){\n return null;\n }\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n int changed;\n if(postid>0){\n //UPDATE\n System.out.println(\"update post!\");\n ps = c.prepareStatement(\"UPDATE Posts SET title=?, body=?, modified=? WHERE username=? AND postid=?\");\n ps.setString(1, title);\n ps.setString(2, body);\n ps.setTimestamp(3, new Timestamp(System.currentTimeMillis())); //set modified to current time\n ps.setString(4, username);\n ps.setInt(5, postid);\n\n changed = ps.executeUpdate();\n }\n else {\n //get largest postid and add 1 to get newID\n\n System.out.println(\"new post!\");\n ps = c.prepareStatement(\"SELECT MAX(postid) FROM Posts WHERE username=?\");\n ps.setString(1, username);\n\n rs = ps.executeQuery();\n int newID = 1;\n if(rs.next()){\n newID = rs.getInt(1) + 1;\n }\n ps.close();\n\n ps = c.prepareStatement(\"INSERT INTO Posts (username, postid, title, body, modified, created) VALUES(?,?,?,?,?,?)\");\n ps.setString(1, username);\n ps.setInt(2, newID);\n ps.setString(3, title);\n ps.setString(4, body);\n ps.setTimestamp(5, new Timestamp(System.currentTimeMillis())); //set modified to current time\n ps.setTimestamp(6, new Timestamp(System.currentTimeMillis())); //set created to current time\n \n changed = ps.executeUpdate();\n }\n\n if(changed==0){\n ret = false;\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n //return list data\n if(ret)\n return findList(username);\n else\n return null;\n }",
"public int getId(){ return id; }",
"public void add(int id, String name, String author, int issueDate, int returnDate) {\n\tBook book = new Book();\n\tbook.id = id;\n\tbook.name = name;\n\tbook.author = author;\n\tbook.issueDate = issueDate;\n\tbook.returnDate = returnDate;\n\tlist.add(book);\n\tSystem.out.println(\"Successfully added: \"+book.id);\n}",
"public void setId(int id){ this.id = id; }",
"public Integer getId(){return id;}",
"private void add() {\n\n\t}",
"public void setPostId(Integer postId) {\n this.postId = postId;\n }",
"private void updatePostPut() {\n PostModel model = new PostModel(12, null, \"This is the newest one.\");\n Call<PostModel> call = jsonPlaceHolderAPI.putPosts(5, model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"public void addAll(int index, List<Post> list) {\n posts.addAll(index, list);\n notifyItemInserted(index);\n //notifyDataSetChanged();\n }",
"public void tagOneBased() {\n for (Item e: items) {\n e.setTag(new Integer(e.getId()+1));\n }\n }",
"protected void onAdd( E entity, int index )\r\n\t{\r\n\t\t\r\n\t}",
"@Override\n public void onPostAdded(final Post post) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n post.setFullView(false);\n post.processData();\n post.setCallbackManager(manager);\n\n manager.addCallback(new CallbackManager.Callback<BaseGlobalPostListFragment>() {\n @Override\n public void execute(BaseGlobalPostListFragment object) {\n object.postsAdapter.add(0, post);\n object.offset++;\n }\n });\n }\n }).start();\n }",
"public void increase()\n {\n setCount(getCount() + 1);\n }",
"public static void addedPost(PostXML postXML) {\n }",
"int insert(VoteList record);",
"@Override\n\tpublic List<Post> getNewPosts(int number) throws Exception {\n\t\treturn null;\n\t}",
"private void setId(Integer id) { this.id = id; }",
"public void add() {\n\n }",
"public void add() {\n\t\t\n\t}",
"@Override\n\tpublic void set(int id, Post entity) {\n\t\t\n\t}",
"public int id() {return id;}",
"private void insertData() {\n for (int i = 0; i < 3; i++) {\n RecipeEntity books = factory.manufacturePojo(RecipeEntity.class);\n em.persist(books);\n data.add(books);\n }\n }",
"public int getId() {return Id;}",
"int updateByPrimaryKey(WpPosts record);",
"public Page<Post> getNewPosts(){\n Pageable page = new PageRequest(0, 3, Sort.Direction.DESC, \"createdAt\");\n System.out.println(\"getNewPosts\");\n // Page<Post> posts = postRepository.findTop10OrderByCreatedAtOrderByCreatedAtDesc(page);\n // List<Post> p = postRepository.getNewestPosts();\n\n Page<Post> pp = postRepository.findAll(page);\n\n for (Post p :pp){\n logger.info(\"getNewPosts -> \" + p);\n }\n return pp;\n/* for (Post p :posts){\n System.out.println(\"p->\" + p);\n }\n if (posts != null)\n return posts;\n return null;*/\n }",
"private static void add() {\n\tcount.incrementAndGet();\n}",
"public int getId() {\n return id;\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}",
"@PostMapping(\"/posts\")\n ResponseEntity<?> createPost(@RequestBody Post post) {\n post.setOwner(SecurityContextHolder.getContext().getAuthentication().getName());\n post.setDateCreated(LocalDateTime.now());\n\n EntityModel<Post> newPost = modelAssembler.toModel(postRepository.save(post));\n return ResponseEntity.created(newPost.getRequiredLink(IanaLinkRelations.SELF).toUri()).body(newPost);\n }",
"public void insert(\n ContentObject object\n )\n {\n if(index == -1)\n {index = 0;}\n\n objects.add(index,object);\n refresh();\n }",
"public int getId() {return id;}",
"public int insertNewElement() {\r\n\t\treturn insertElements(Arrays.asList(getNewObject()));\r\n\t}",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void add() {\n }",
"public void setId(long id) {\n id_ = id;\n }",
"public void addElement(Replicated obj)\r\n\t{\n\t\tinsert(obj, seq.size());\r\n\t}",
"public void add(E entity);",
"public Link add(Link link);",
"@Override\n public List<Post> postList() {\n List<Post> savedPosts = (List<Post>) postRepository.findAll();\n Set<Long> userIdList = savedPosts.stream().map(Post::getUserId).collect(Collectors.toSet());\n\n User[] rateResponse = sender.getUsersByUserId(userIdList);\n\n HashMap<Long, User> userHashMap = new LinkedHashMap<>();\n for (User user : rateResponse) {\n userHashMap.put(user.getUserId(), user);\n }\n for (Post savedPost : savedPosts) {\n savedPost.setUser(userHashMap.get(savedPost.getUserId()));\n }\n return savedPosts;\n }",
"public void addPostEvent()\r\n\t{\r\n\t\tfor(Event recordedEvent : eventsCount)\r\n\t\t{\r\n\t\t\tif(recordedEvent.getRequestType().equals(RequestMethod.POST))\r\n\t\t\t{\r\n\t\t\t\trecordedEvent.setAccessCount(recordedEvent.getAccessCount() + 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}",
"private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }",
"void addHadithBookNo(Object newHadithBookNo);",
"@PostMapping(\"/\")\n private ResponseEntity<Post> createPost(@RequestBody Post post) {\n User user = getCurrentUser();\n post.setCreated(new Date());\n post.setUserId(user.getId());\n post = postService.add(post);\n\n return new ResponseEntity<>(post, HttpStatus.OK);\n }",
"Forumpost selectByPrimaryKey(Integer postid);",
"private void loadPosts(final List<AnipalAbstractPost> posts){\n Query q1 = FirebaseDatabase.getInstance().getReference(\"UserPosts\")\n .child(MainActivity.currentUser.getUserUUID()).orderByChild(\"timestamp\")\n .limitToLast(5);\n q1.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n AnipalAbstractPost post ;\n for(DataSnapshot snap : dataSnapshot.getChildren()){\n if(snap.hasChild(\"photoURL\")){\n // Photo post\n post = snap.getValue(AnipalPhotoPost.class);\n post.findUser(post.getUserUUID());\n }else{\n // Donation post\n post = snap.getValue(AnipalDonationPost.class);\n post.findUser(post.getUserUUID());\n }\n posts.add(post);\n }\n\n Collections.reverse(posts);\n postAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"public long getId(){return this.id;}",
"int insert(BlogDetails record);",
"private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }",
"void setId(Integer id);",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }"
] | [
"0.64173216",
"0.6222068",
"0.6159105",
"0.6043592",
"0.6003162",
"0.5970013",
"0.58904296",
"0.58519006",
"0.5848514",
"0.5848238",
"0.58055323",
"0.5804105",
"0.577815",
"0.5777983",
"0.5756973",
"0.5689499",
"0.56829774",
"0.56815356",
"0.5680428",
"0.5665539",
"0.5659127",
"0.5653799",
"0.5649821",
"0.5590007",
"0.5580126",
"0.5569681",
"0.5559618",
"0.5553435",
"0.5542345",
"0.5538476",
"0.5526282",
"0.5524639",
"0.5514057",
"0.5511056",
"0.5502709",
"0.55013096",
"0.5470082",
"0.54606456",
"0.54540366",
"0.54403484",
"0.5432905",
"0.5401826",
"0.5396237",
"0.5395507",
"0.53934956",
"0.53915644",
"0.5381701",
"0.53736764",
"0.5366454",
"0.5343139",
"0.533806",
"0.533735",
"0.53341466",
"0.5329377",
"0.53292215",
"0.53201926",
"0.53192884",
"0.53172004",
"0.5315821",
"0.5313683",
"0.53106433",
"0.5307004",
"0.5298717",
"0.5286067",
"0.5283414",
"0.5283414",
"0.5282983",
"0.52813244",
"0.5279843",
"0.5276608",
"0.5276307",
"0.5271961",
"0.5271961",
"0.5271298",
"0.526617",
"0.52446735",
"0.52398425",
"0.5234373",
"0.52268016",
"0.52260965",
"0.52254933",
"0.52254933",
"0.52254933",
"0.52254933",
"0.52254933",
"0.52254933",
"0.5220418",
"0.5220418",
"0.5220418",
"0.52204",
"0.5216507",
"0.52110636",
"0.5209691",
"0.52046955",
"0.5203358",
"0.52024436",
"0.52021474",
"0.5199635",
"0.5195601",
"0.5195601"
] | 0.5548335 | 28 |
================================================================= Add new class ================================================================= | public void onAddClassClick(View view) {
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle(R.string.class_in_popup_title);
alert.setMessage(R.string.class_in_popup_msg);
// Set an EditText view to get user input
final EditText input = new EditText(this);
alert.setView(input);
alert.setPositiveButton(R.string.btn_ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
String newClass = input.getText().toString();
// Only accept non-empty strings
if (newClass.length() > 0) {
addNewClass(newClass);
}
}
});
alert.setNegativeButton(R.string.btn_cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
Log.i(TAG, "Canceled class name input");
}
});
alert.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addClass(Class c) { // adding a single class\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_ID, c.getID());\n\t\tvalues.put(KEY_TAKENIN, c.getTakenIn());\n\n\t\t/*\n\t\t * values.put(KEY_ID, 1234567890); values.put(KEY_MAJORN, \"123\");\n\t\t * values.put(KEY_CLASSN, \"123\"); values.put(KEY_TITLE, \"123\");\n\t\t * values.put(KEY_UNITS, 123); values.put(KEY_DESCRIPTION, \"123\");\n\t\t * values.put(KEY_FALL, 1); values.put(KEY_SPRING, 0);\n\t\t */\n\t\t// Inserting Row\n\t\tdb.insert(TABLE_USERCLASSES, null, values);\n\t\tdb.close(); // Closing database connection\n\t}",
"public void addClass(String classId) {\n\t\t\r\n\t}",
"public static void addNewClass(Class c, int userId)\n\t{\n\t\tString classCode = c.getClassCode();\n\t\tString className = c.getClassName();\n\t\tString sql = \"INSERT INTO Class (classCode, className, instructorID) \"\n\t\t\t\t+ \"VALUES (?, ?, ?)\";\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setString(1, classCode);\n\t\t\tps.setString(2, className);\n\t\t\tps.setInt(3, userId);\n\t\t\tps.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public boolean addClass(String cls) {\n\t\tContentValues newClass = new ContentValues();\n\t\tnewClass.put(DbContract.Classes.ATTRIBUTE_NAME, cls);\n\t\t\n\t\ttry {\n\t\t\ttheDb.insertOrThrow(DbContract.Classes.TABLE_NAME, null, newClass);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t\treturn false;\n\t\t}\n\t\t//Successful (supposedly)\n\t\tSystem.out.println(cls + \" added to Class table.\");\n\t\treturn true;\n\t}",
"void addClass(ClassDefinition cd) throws ResultException, DmcValueException {\n\n// if (checkAndAdd(cd.getObjectName(),cd,classDefs) == false){\n// \tResultException ex = new ResultException();\n// \tex.addError(clashMsg(cd.getObjectName(),cd,classDefs,\"class names\"));\n// \tthrow(ex);\n// }\n \n classDefinitions.add(cd);\n \n // This name is used to identify references to the class\n DotName refName \t= new DotName((DotName) cd.getDotName().getParentName(),\"ClassDefinitionREF\");\n \n if (debugClassAdditions)\n \tDebugInfo.debug(\"Adding class: \" + cd.getDotName() + \" \" + refName);\n \n if (checkAndAddDOT(cd.getDotName(),cd,globallyUniqueMAP,refName) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsgDOT(cd.getObjectName(),cd,globallyUniqueMAP,\"definition names\"));\n throw(ex);\n }\n\n // TODO: revisit abbreviations - this was originally required for LDAP naming, which, if\n // it's ever done, should be handled in the LDAP mechanisms.\n// if (cd.getAbbrev() != null){\n// // We have an abbreviation - so it must also be unique and\n// // added to the appropriate maps\n// \tDefinitionName abbrevName = new DefinitionName(cd.getAbbrev());\n// if (checkAndAdd(abbrevName,cd,classDefs) == false){\n// \tResultException ex = new ResultException();\n// \tex.addError(clashMsg(abbrevName,cd,classDefs,\"class abbreviations\"));\n// \tthrow(ex);\n// }\n// \n// DotName dotAbbrevName = new DotName(cd.getDefinedIn().getName() + \".\" + cd.getAbbrev());\n// \n// if (checkAndAddDOT(dotAbbrevName,cd,globallyUniqueMAP,null) == false){\n// DefinitionName errName = new DefinitionName(cd.getDefinedIn().getName() + \".\" + cd.getAbbrev());\n// \tResultException ex = new ResultException();\n// \tex.addError(clashMsgDOT(errName,cd,globallyUniqueMAP,\"definition names\"));\n// throw(ex);\n// }\n// \n// classAbbrevs.put(abbrevName,cd);\n// }\n \n ///////////////////////////////////////////////////////////////////////\n \n if (cd.getDmdID() == null){\n \tResultException ex = new ResultException(\"Missing dmdID for class: \" + cd.getName());\n \tex.setLocationInfo(cd.getFile(), cd.getLineNumber());\n \tthrow(ex);\n }\n\n if (cd.getDefinedIn() == null){\n \tResultException ex = new ResultException(\"definedIn missing for class: \" + cd.getName());\n \tex.setLocationInfo(cd.getFile(), cd.getLineNumber());\n \tthrow(ex);\n }\n else{\n \tif (performIDChecks){\n\t \tif ( (cd.getDefinedIn().getSchemaBaseID() == null) ||\n\t \t\t (cd.getDefinedIn().getSchemaIDRange() == null) ){\n\t \tResultException ex = new ResultException(\"schemaBaseID or schemaIDRange missing for schema: \" + cd.getDefinedIn().getName());\n\t \tthrow(ex);\n\t \t}\n \t}\n \t\n }\n \n if (performIDChecks){\n\t // Bump up the DMD ID by the amount of schemaBaseID\n\t int base = cd.getDefinedIn().getSchemaBaseID();\n\t int range = cd.getDefinedIn().getSchemaIDRange();\n\t int current = base + cd.getDmdID();\n\t \n\t if (current > (base+range)){\n\t \tResultException ex = new ResultException(\"Number of classes exceeds schema ID range: \" + cd.getName());\n\t \tex.moreMessages(\"The dmdID must be less than \" + range);\n\t \tex.setLocationInfo(cd.getFile(), cd.getLineNumber());\n\t \tthrow(ex); \t\n\t }\t \t\n\n\t cd.setDmdID(base + current);\n }\n \n if (classesByID.get(cd.getDmdID()) != null){\n \tResultException ex = new ResultException();\n \tex.addError(clashingIDsMsg(cd.getDmdID(),cd,classesByID,\"dmdID\"));\n \tthrow(ex);\n }\n classesByID.put(cd.getDmdID(), cd);\n \n ///////////////////////////////////////////////////////////////////////\n\n if (cd.getObjectName().getNameString().length() > longestClassName)\n longestClassName = cd.getObjectName().getNameString().length();\n\n // Another bit of trickiness here. We don't resolve references for the entire schema\n // until we've loaded the whole thing, but, in this case, we need to pre-resolve\n // the ClassDefinition - which should be okay, because classes are the last things\n // that're loaded.\n try {\n\t\t\tcd.resolveReferences(this,currentResolver);\n\t\t} catch (DmcValueExceptionSet e) {\t\t\t\n\t\t\tResultException ex = new ResultException();\n\t\t\tex.addError(\"Unresolved references in ClassDefinition: \" + cd.getName());\n\t\t\tex.addError(cd.toOIF());\n\t\t\t\n\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t}\n\t\t\tthrow(ex);\n\t\t}\n \n if (cd.getDerivedFrom() != null){\n cd.getDerivedFrom().updateDerived(cd);\n }\n \n cd.setDmoImport(cd.getDefinedIn().getSchemaPackage() + \".generated.dmo.\" + cd.getName() + \"DMO\");\n cd.setDmoClass(cd.getName() + \"DMO\");\n \n cd.setDmwImport(cd.getDefinedIn().getDmwPackage() + \".generated.dmw.\" + cd.getName() + \"DMW\");\n cd.setDmwClass(cd.getName() + \"DMW\");\n \n cd.setDmwIteratorImport(cd.getDefinedIn().getDmwPackage() + \".generated.dmw.\" + cd.getName() + \"IterableDMW\");\n cd.setDmwIteratorClass(cd.getName() + \"IterableDMW\");\n \n cd.setDmtImport(cd.getDefinedIn().getSchemaPackage() + \".generated.types.DmcType\" + cd.getName() + \"REF\");\n cd.setDmtREFImport(cd.getDefinedIn().getSchemaPackage() + \".generated.types.\" + cd.getName() + \"REF\");\n cd.setDmtClass(cd.getName() + \"REF\");\n \n if (cd.getUseWrapperType() == WrapperTypeEnum.EXTENDED){\n \tif (cd.getSubpackage() == null)\n \tcd.setDmeImport(cd.getDefinedIn().getDmwPackage() + \".extended.\" + cd.getName()); \t\t\n \telse\n \tcd.setDmeImport(cd.getDefinedIn().getDmwPackage() + \".extended.\" + cd.getSubpackage() + \".\" + cd.getName());\n cd.setDmeClass(cd.getName());\n }\n else{\n cd.setDmeImport(\"THE WRAPPER FOR \" + cd.getName() + \" ISN'T EXTENDED - YOU'VE GOT A CODE GENERATION ERROR! DWEEB!\"); \t\t\n cd.setDmeClass(\"THE WRAPPER FOR \" + cd.getName() + \" ISN'T EXTENDED - YOU'VE GOT A CODE GENERATION ERROR! DWEEB!\");\n }\n \n if (cd.getClassType() == ClassTypeEnum.AUXILIARY){\n \tcd.setDmoAuxClass(cd.getName() + \"DMO\");\n \tcd.setDmoAuxClassImport(cd.getDefinedIn().getSchemaPackage() + \".generated.auxw.\" + cd.getName() + \"DMO\");\n \t\n \tif (cd.getDefinedIn().getDmwPackage() != null){\n \tcd.setDmwAuxClass(cd.getName());\n \tcd.setDmwAuxClassImport(cd.getDefinedIn().getDmwPackage() + \".generated.auxw.\" + cd.getName());\n \t}\n }\n \n // And now, set the java class that will be used with the DmwObjectFactory\n if (cd.getJavaClass() == null){\n \tif (cd.getUseWrapperType() == WrapperTypeEnum.BASE)\n \t\tcd.setJavaClass(cd.getDmwImport());\n \telse if (cd.getUseWrapperType() == WrapperTypeEnum.EXTENDED){\n \t\tcd.setJavaClass(cd.getDmeImport());\n \t}\n }\n \n // Add the class to our java class to class definition map\n classesByJavaClass.put(cd.getJavaClass(), cd);\n \n Iterator<AttributeDefinition> adit = null;\n if ( (adit = cd.getMay()) != null){\n while(adit.hasNext()){\n AttributeDefinition ad = adit.next();\n ad.addUsingClass(cd);\n }\n }\n\n if ( (adit = cd.getMust()) != null){\n while(adit.hasNext()){\n AttributeDefinition ad = adit.next();\n ad.addUsingClass(cd);\n }\n }\n \n Iterator<ActionDefinition> acdit = null;\n if ( (acdit = cd.getActions()) != null){\n while(acdit.hasNext()){\n ActionDefinition ad = acdit.next();\n ad.addUsingClass(cd);\n }\n }\n \n \t////////////////////////////////////////////////////////////////////////////////\n \t// CREATE INTERNAL TYPE FOR REFERENCES\n \n if (cd.getClassType() != ClassTypeEnum.AUXILIARY){\n\t // Things get a little tricky here - we want to be able to refer to objects without\n\t // having to manually define wrapper types for them, so we create internal TypeDefinitions\n\t // for them. The internal type is DmcType<classname>REF.\n\t \n\t TypeDefinition td = new TypeDefinition();\n\t \n\t td.setInternallyGenerated(true);\n\t td.setName(cd.getName());\n\t \n\t // The name of a class definition is schema.class.ClassDefinition\n\t // For the associated type, it will be schema.class.TypeDefinition\n\t DotName typeName \t= new DotName((DotName) cd.getDotName().getParentName(),\"TypeDefinition\");\n//\t DotName nameAndTypeName \t= new DotName(td.getName() + \".TypeDefinition\");\n\t \n\t td.setDotName(typeName);\n//\t td.setNameAndTypeName(nameAndTypeName);\n\t \n\t td.addDescription(\"This is an internally generated type to allow references to \" + cd.getName() + \" values.\");\n\t td.setIsEnumType(false);\n\t td.setIsRefType(true);\n\t \n\t if (cd.getIsNamedBy() != null){\n\t \t// We only need a helper class when we have named objects - regular old object references\n\t \t// can get by without this\n\t \ttd.setHelperClassName(cd.getDefinedIn().getSchemaPackage() + \".generated.types.\" + cd.getName() + \"REF\");\n\t \t\n\t \t// TODO: MAKE THIS A RULE\n\t \tif (cd.getIsNamedBy().getValueType() != ValueTypeEnum.SINGLE){\n\t \t\tResultException ex = new ResultException();\n\t \t\tex.addError(\"The naming attribute: \" + cd.getIsNamedBy().getName() + \" for class: \" + cd.getName() + \" must be valueType SINGLE\");\n\t \t\tex.result.lastResult().fileName(cd.getIsNamedBy().getFile());\n\t \t\tex.result.lastResult().lineNumber(cd.getIsNamedBy().getLineNumber());\n\t \t\tthrow(ex);\n\t \t}\n\t }\n\t \n\t td.setTypeClassName(cd.getDmtImport());\n\t td.setPrimitiveType(cd.getDmoImport());\n\t td.setDefinedIn(cd.getDefinedIn());\n\t \n\t if (cd.getJavaClass() != null){\n\t \t// Tricky stuff needed for code generation. If the ClassDefinition has a javaClass specified,\n\t \t// it means that the object is wrapped and we need this javaClass to know what the auxHolder\n\t \t// type should be in the generated wrapper class.\n\t \ttd.setAuxHolderImport(cd.getJavaClass());\n\t }\n\t \n\t td.setDmwIteratorClass(cd.getDmwIteratorClass());\n\t td.setDmwIteratorImport(cd.getDmwIteratorImport());\n\t \n\t // Set a reference to the original class so that we can get any of its info\n\t // if required.\n\t td.setOriginalClass(cd);\n\n\t // Set the class's internally generated type so that we can resolve references\n\t // to the class used as a type\n\t cd.setInternalTypeRef(td);\n\t \n\t // We add the new type to the schema's list of internally generated types\n\t cd.getDefinedIn().addInternalTypeDefList(td);\n\t \n\t internalTypeDefs.put(td.getName(), td);\n\t \n\t if (checkAndAddDOT(td.getDotName(),td,globallyUniqueMAP,null) == false){\n\t \tResultException ex = new ResultException();\n\t \tex.addError(clashMsgDOT(td.getObjectName(),td,globallyUniqueMAP,\"definition names\"));\n\t \tthrow(ex);\n\t }\n\n }\n\n if (extensions.size() > 0){\n \tfor(SchemaExtensionIF ext : extensions.values()){\n \t\text.addClass(cd);\n \t}\n }\n\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"add new class\");\n\n\t}",
"@Override\n public boolean adminAddClass(ShibbolethAuth.Token token, int courseID, String courseName, int courseCredits,\n int courseCapacity, String term, int instructorID, String firstDay, String lastDay, String classBeginTime,\n String classEndTime, String weekDays, String location, String type, String prerequisite, String description,\n String department) {\n\n try {\n return adminAddClass1(token, courseID, courseName, courseCredits, courseCapacity, term, instructorID,\n firstDay, lastDay, classBeginTime, classEndTime, weekDays, location, type, prerequisite,\n description, department);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n\n return false;\n\n }\n }",
"public void createClass(String className)\r\n\t{\r\n\t\tString longName;\r\n\t\tif(className.contains(\"#\"))\r\n\t\t\tlongName = className;\r\n\t\tif(className.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(className);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + className;\r\n\t\t\r\n\t\tONT_MODEL.createClass(longName);\r\n\t}",
"NewClass1 createNewClass1();",
"protected void addClass ( Class<? extends Object> c ) {\n if ( log.isDebugEnabled() ) {\n log.debug(\"Adding class: \" + c.getName()); //$NON-NLS-1$\n }\n synchronized ( this.dynamicEntityClasses ) {\n this.dynamicEntityClasses.add(c);\n }\n\n }",
"public void addNewInstance(String className, String instanceName) {\n\t\tOntClass ontClass = model.getOntClass(getDefaultNS()+className);\n\t\tif(ontClass==null) throw new IllegalArgumentException(\"Class: '\"+className+\"' not found\");\n\t\tmodel.createIndividual(getDefaultNS()+instanceName, ontClass);\n\t}",
"private Add() {}",
"private Add() {}",
"public void addAuxClass(IJavaClassFile newAuxClass);",
"@Override\n\tpublic void addClazz(Clazz clazz) {\n\t\tclazzDao.addClazz(clazz);\n\t}",
"public void addClass(String className) {\n classes.add(className);\n }",
"public void addClass(String className) \n\t{\n\t\tstoreViewState();\n\t\tproject.addClass(className);\n\t\tcheckStatus();\n\t}",
"org.landxml.schema.landXML11.ClassificationDocument.Classification addNewClassification();",
"Class createClass();",
"@Override\n public boolean studentAddClass(Token token, int courseID, String grading, String courseTerm) {\n // TODO Auto-generated method stub\n Student student = new Student();\n return student.studentAddClass(token, courseID, grading, courseTerm);\n\n }",
"public void addGraphicalClass(A_Class c) {\r\n\r\n\t\t//update ui\r\n\t\tG_Class frame1 = new G_Class(c, this);\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tListenerGclass listener = new ListenerGclass(frame1, this);\r\n\t\t\r\n\t\tlistClasses.put(c, frame1);\r\n\t\tthis.add(frame1);\r\n\t\t\r\n\t\tthis.repaint();\r\n\t\tSystem.out.println(diagram.display());\r\n\t}",
"@FXML\r\n\tpublic void addClass(ActionEvent event) {\r\n\t\ttry {\r\n\t\t\tclasses.insert(Integer.parseInt(currentUser[0]), newclass.getText(), Integer.parseInt(credit.getText()),\r\n\t\t\t\t\tgrade.getText());\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void addNew() {\n\t\t\n\t\tTag t = new Tag();\n\t\tt.setName(name);\n\t\tt.setColor(color);\n\t\t\n\t\tDAO.getInstance().addTag(t);\n\t\t\n\t\tname = null;\n\t\tcolor = null;\n\t\t\n\t}",
"com.exacttarget.wsdl.partnerapi.ObjectDefinition addNewObjectDefinition();",
"private void add() {\n\n\t}",
"@Override\n\tpublic void add() {\n\t\t\n\t}",
"public void addClassItem(WjrClassItem classItem) {\r\n checkNotNull(classItem, \"The classItem parameter is null.\");\r\n\r\n String className = classItem.getClassName();\r\n checkState(\r\n !classItems.containsKey(className),\r\n \"The %s has already existed.\",\r\n className);\r\n\r\n classItems.put(className, classItem);\r\n }",
"public void add(ClassFile classFile) {\n throwIfClassNameDoesNotMatch(classFile, classFilePath);\n list.add(classFile);\n }",
"public static NewExpression new_(Class type) { throw Extensions.todo(); }",
"public void setClass_(String newValue);",
"ClassInstanceCreationExpression getClass_();",
"public void consulterClassement() {\n\t\t\n\t}",
"public void createClass(final String classId, \n\t\t\tfinal String className, final String classDescription) \n\t\t\tthrows ServiceException {\n\t\t\n\t\ttry {\n\t\t\tclassQueries.createClass(classId, className, classDescription);\n\t\t}\n\t\tcatch(DataAccessException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}",
"public void add() {\n }",
"void setClassType(String classType);",
"public void processAdding() {\n\t\t\n\t\tString iD = idIn.getText();\n\t\tString clName = classIn.getText();\n\t\tString tutName = tutorIn.getText();\n\n\t\tif (tutName.isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a tutor name\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\telse if (clName.isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a class name\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\telse {\n\n\t\t\tint full = fitnessProg.getFirstAvailableClassTime();\n\n\t\t\tif (full == 1) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"There are no available class times\",\n\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\n\t\t\telse {\n\n\t\t\t\tfc = fitnessProg.getFitnessClassWithID(iD);\n\n\n\t\t\t\tif (fc == null){\n\n\t\t\t\t\tint availableTime = fitnessProg.getFirstAvailableClassTime();\n\t\t\t\t\tFitnessClass newFC = new FitnessClass();\n\t\t\t\t\tnewFC.setClassID(iD);\n\t\t\t\t\tnewFC.setClassName(clName);\n\t\t\t\t\tnewFC.setStartTime(availableTime);\n\t\t\t\t\tnewFC.setTutorName(tutName);\n\t\t\t\t\tint [] newAttRecords = {0,0,0,0,0};\n\t\t\t\t\tnewFC.setAttendanceRecords(newAttRecords);\n\t\t\t\t\tfitnessProg.addFitnessClass(newFC);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"There is already a class scheduled with this ID\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void add() {\n\n }",
"void addAnnotatedClass( Class clazz );",
"public void add();",
"public void add() {\n\t\t\n\t}",
"private void processClassParentNode(Element node) {\n ClassDataItem cls = new ClassDataItem(node.attributeValue(\"name\"), node.attributeValue(DESCRIPTION_ATTRIBUTE));\n\n Iterator childNodes = node.elementIterator();\n\n while (childNodes.hasNext()) {\n cls.addChildNode(((Element) childNodes.next()).attributeValue(\"name\"));\n }\n\n classes.add(cls);\n }",
"Object getClass_();",
"Object getClass_();",
"void registerInstantiating (ClassType c) {\r\n if (instantiating_classes == null) \r\n instantiating_classes = new ClassList ();\r\n else if (instantiating_classes.contains (c)) \r\n return;\r\n\r\n instantiating_classes.add (c);\r\n }",
"public void addMainClass(MainClassItem classItem) {\n\t\tmainClassItem=classItem;\n\t\tclassItem.parentTable=this;\n\t}",
"public void addClass();",
"private void addOp(Class op){\n try {\n //Create a new instance and add it to the list\n Operation operation = (Operation)op.newInstance();\n operations.put(operation.getTextualRepresentation(), operation);\n } catch (InstantiationException | IllegalAccessException ex) {\n Logger.getLogger(RPC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"ClassBody addMember(ClassMember member);",
"public ClassNode(OClass clas) {\n\t\tname = clas.getName();\n\t\tsource = clas;\n\t}",
"public static void addNewVersion(Class<?> original, Class<?> version) {\n int code = original.getName().hashCode();\n versionOf.put(version.getName().hashCode(), original);\n versions.put(code, version);\n List<Class<?>> versionsList = allVersions.get(code);\n if (versionsList == null)\n versionsList = new ArrayList<>();\n for (Class<?> clazz : versionsList)\n versions.put(clazz.getName().hashCode(), version);\n versionsList.add(version);\n allVersions.put(code, versionsList);\n\n }",
"@Override\n\t/**\n\t * sets the class ID for the created class, the class ID is the\n\t * primary method for identifying a class's name and all of its methods,\n\t * variables, and comments \n\t * \n\t * @param s \n\t */\n\tpublic void setClassID(int s) {\n\t\tID = s;\n\t}",
"@Override\n\tpublic void visit(OWLClass cls) {\n\t\taddFact(RewritingVocabulary.CLASS, cls.getIRI());\n\t}",
"void addInstance(Instance instance);",
"public Curstomers_add() {\n\t\tsuper();\n\t}",
"public A3Add(){}",
"void addClasses(String... classNames) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException;",
"public void addClass(ClassItem _classItem) {\n\t\tclassItem.add(_classItem);\n\t\t_classItem.parentTable=this;\n\t}",
"public void addClass(SassyClass myClass) {\n\t\tif(!this.classMap.containsKey(myClass.getClassName())) {\n\t\t\tthis.classMap.put(myClass.getClassName(), myClass);\n\t\t}\n\t}",
"int add(T objectToCreate);",
"abstract void add();",
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type addNewType();",
"public abstract void addFeatureClasses(FeatureClassContainer container);",
"private void verifyClassName() {\n\t\t\n\t\tif (classNameTF.getText().isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Class Name\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tClass newClass = new Class(classNameTF.getText());\n\t\t\tteacher.addClass(newClass);\n\t\t\ttAddClassWindow.dispose();\n\t\t\ttPortalWindow.dispose();\n\t\t\tteacherPortalScreen();\n\t\t}\n\t}",
"Klassenstufe createKlassenstufe();",
"@Override\r\n public void addDomainClass(AgeClass dmCls)\r\n {\n\r\n domain.add(dmCls);\r\n }",
"@Override\n\tpublic void addClasse(Classe m) {\n\t\tclasseRepo.save(m);\n\t}",
"private void installBasicClasses() {\n \tAbstractSymbol filename \n \t = AbstractTable.stringtable.addString(\"<basic class>\");\n \t\n \t// The following demonstrates how to create dummy parse trees to\n \t// refer to basic Cool classes. There's no need for method\n \t// bodies -- these are already built into the runtime system.\n \n \t// IMPORTANT: The results of the following expressions are\n \t// stored in local variables. You will want to do something\n \t// with those variables at the end of this method to make this\n \t// code meaningful.\n \n \t// The Object class has no parent class. Its methods are\n \t// cool_abort() : Object aborts the program\n \t// type_name() : Str returns a string representation \n \t// of class name\n \t// copy() : SELF_TYPE returns a copy of the object\n \n \tclass_c Object_class = \n \t new class_c(0, \n \t\t TreeConstants.Object_, \n \t\t TreeConstants.No_class,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0, \n \t\t\t\t\t TreeConstants.cool_abort, \n \t\t\t\t\t new Formals(0), \n \t\t\t\t\t TreeConstants.Object_, \n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.type_name,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.copy,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \t\n \t// The IO class inherits from Object. Its methods are\n \t// out_string(Str) : SELF_TYPE writes a string to the output\n \t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n \t// in_string() : Str reads a string from the input\n \t// in_int() : Int \" an int \" \" \"\n \n \tclass_c IO_class = \n \t new class_c(0,\n \t\t TreeConstants.IO,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_string,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_int,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_string,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_int,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The Int class has no methods and only a single attribute, the\n \t// \"val\" for the integer.\n \n \tclass_c Int_class = \n \t new class_c(0,\n \t\t TreeConstants.Int,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// Bool also has only the \"val\" slot.\n \tclass_c Bool_class = \n \t new class_c(0,\n \t\t TreeConstants.Bool,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The class Str has a number of slots and operations:\n \t// val the length of the string\n \t// str_field the string itself\n \t// length() : Int returns length of the string\n \t// concat(arg: Str) : Str performs string concatenation\n \t// substr(arg: Int, arg2: Int): Str substring selection\n \n \tclass_c Str_class =\n \t new class_c(0,\n \t\t TreeConstants.Str,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.str_field,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.length,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.concat,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg, \n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.substr,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int))\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg2,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t/* Do somethind with Object_class, IO_class, Int_class,\n Bool_class, and Str_class here */\n nameToClass.put(TreeConstants.Object_.getString(), Object_class);\n nameToClass.put(TreeConstants.IO.getString(), IO_class);\n nameToClass.put(TreeConstants.Int.getString(), Int_class);\n nameToClass.put(TreeConstants.Bool.getString(), Bool_class);\n nameToClass.put(TreeConstants.Str.getString(), Str_class);\n adjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.IO.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Int.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Bool.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Str.getString(), new ArrayList<String>() );\n // Do the same for other basic classes\n basicClassList = new Classes(0);\n basicClassList.appendElement(Object_class);\n basicClassList.appendElement(IO_class);\n basicClassList.appendElement(Int_class);\n basicClassList.appendElement(Bool_class);\n basicClassList.appendElement(Str_class);\n \n }",
"public static void register(Class<?> c) {\r\n\t\tassert c != null;\t\t\r\n\t\tclasses.add(c);\t//appends c to the end of the list\r\n\t}",
"@Override\n\tpublic void VisitClassNode(BunClassNode Node) {\n\n\t}",
"public void addDynmaicClass(String id, _AJAXHandler instance) {\n\n\t}",
"public void addAuxClasss(Collection auxClasss);",
"public void addClass(String className){\n getElement().addClassName(className);\n }",
"@Override\n public void onRPClassAddAttribute(RPClass rpclass,\n String name, Definition.Type type) {\n }",
"public final native void classFollows(String name, Element newNode, Element oldNode) /*-{ this.classFollows(name, newNode, oldNode); }-*/;",
"public interface ClassContainer {\n\n void addLoadableClass(String className, byte[] classData);\n}",
"@Override\n public void onRPClassAddAttribute(RPClass rpclass,\n String name, Definition.Type type, byte flags) {\n }",
"public void setClassName(String className) { this.className=className; }",
"@Override\n\tpublic <T> void insertOne(T entityClass) throws Exception {\n\t\t\n\t}",
"public static void put(String shortName, Class cl) {\n\t\tc.put(shortName, cl);\t\t\n\t}",
"public void addDescriptor(final String className, final XMLClassDescriptor descriptor) {\n if ((className == null) || (className.length() == 0)) {\n String message = \"Class name to insert ClassDescriptor must not be null\";\n LOG2.warn(message);\n throw new IllegalArgumentException(message);\n }\n \n if (descriptor == null) {\n if (LOG2.isDebugEnabled()) {\n LOG2.debug(\"Adding class name to missing classes: \" + className);\n }\n _missingTypes.add(className);\n return;\n }\n \n if (LOG2.isDebugEnabled()) {\n LOG2.debug(\"Adding descriptor class for: \" \n + className + \" descriptor: \" + descriptor);\n }\n _typeMap.put(className, descriptor);\n \n String xmlName = descriptor.getXMLName();\n // ignore descriptors with an empty XMLName\n if (xmlName == null || xmlName.length() == 0) {\n return;\n }\n \n // ignore descriptors with the internal XMLName\n if (INTERNAL_CONTAINER_NAME.equals(xmlName)) {\n return;\n }\n \n List descriptorList = this.getDescriptorList(descriptor.getXMLName());\n if (!descriptorList.contains(descriptor)) {\n descriptorList.add(descriptor);\n }\n _missingTypes.remove(className);\n }",
"public void addClassifier(String name, Classifier cl)\n {\n\t\tif (m_ClassifierTypes.containsKey(name) || m_Classifiers.containsKey(name))\n\t\t\tthrow new IllegalArgumentException(\"A classifier named \"+name+\" already added.\");\n m_Classifiers.put(name, cl);\n }",
"public Classe() {\r\n }",
"public void addPlugin(String key, T pluginClass);",
"com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();",
"DescribedClass createDescribedClass();",
"public void inAClass(AClass node) {\n TIdentifier id = node.getIdentifier();\n \n if (node.getExtension() == null && \n ! id.getText().equals(\"Object\")) {\n node.setExtension(\n new AExtension(new TIdentifier(\"Object\",id.getLine(),id.getPos())));\n }\n }",
"@Override\n\tpublic void outAClass(AClass node) {\n\t\tcreateConstructor();\n\t\tString directory = this.fileName.substring(0,\n\t\t\t\tthis.fileName.lastIndexOf(File.separatorChar));\n\t\ttry{\n\t\t\tcg.getJavaClass().dump( directory +\"/\" + node.getType().getText() + \".class\");\n\t\t}catch (IOException e ){\n\t\t\tErrorList.add(node,\"Could not save file : \" + e.getMessage() , fileName); \n\t\t}\n\t\tcurrentClass = null; \n\t}",
"stars.StarType addNewStar();",
"protected JBuilderRenameClassRefactoring()\n\t{\n\t\tsuper();\n\t}",
"@Override\n <T> void add(T object);",
"NamedClass createNamedClass();",
"public OOP_207(){\n\n }",
"void add(T instance);",
"public void initForAddNew() {\r\n\r\n\t}",
"public synchronized void defineClass(String fullClassName, byte[] bytes)\r\n {\r\n try\r\n {\r\n defineClass(fullClassName, bytes, 0, bytes.length);\r\n }\r\n finally\r\n {\r\n }\r\n }",
"public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }",
"public AddResource() {\n }",
"protected void setClassType(String name, Class<?> clazz) {\n\t\tmapClass.put(name, clazz);\n\t}",
"public void add(String nome, Object obj);",
"public void AddNewSkill()\n\t{\n\t\t\n\t}",
"public ClassNode(MappingNode mapNode) {\n\t\tname = mapNode.getList();\n\t\tsource = mapNode;\n\t}"
] | [
"0.7141683",
"0.6686575",
"0.66184366",
"0.6600355",
"0.64496547",
"0.64275163",
"0.62900466",
"0.6271587",
"0.6224619",
"0.6197611",
"0.6191896",
"0.61246055",
"0.61246055",
"0.6116423",
"0.61075574",
"0.60790694",
"0.6065051",
"0.6046913",
"0.6021976",
"0.6021489",
"0.59803003",
"0.5966306",
"0.5958067",
"0.59453857",
"0.594376",
"0.5939529",
"0.5933385",
"0.58867776",
"0.5841497",
"0.5833624",
"0.5830799",
"0.58272505",
"0.58272487",
"0.5812504",
"0.58120674",
"0.5802446",
"0.578653",
"0.57600045",
"0.5760002",
"0.5756217",
"0.5747702",
"0.57459277",
"0.57459277",
"0.574568",
"0.57422096",
"0.57402784",
"0.57245725",
"0.571898",
"0.57139134",
"0.5710755",
"0.56966895",
"0.56800705",
"0.56777567",
"0.5675411",
"0.56641495",
"0.5664061",
"0.5663172",
"0.5660135",
"0.5651273",
"0.5628283",
"0.56275386",
"0.56221354",
"0.56198514",
"0.5618211",
"0.56098354",
"0.55958945",
"0.5589436",
"0.5587206",
"0.55740345",
"0.5572099",
"0.5569",
"0.5565",
"0.555878",
"0.5546785",
"0.5539031",
"0.5532549",
"0.5531929",
"0.55298835",
"0.55293906",
"0.5526016",
"0.5524823",
"0.55165976",
"0.5493989",
"0.5493423",
"0.5489828",
"0.5487969",
"0.54856396",
"0.54834366",
"0.54745597",
"0.5472701",
"0.54653263",
"0.5445553",
"0.5440064",
"0.5433569",
"0.5423035",
"0.5420304",
"0.5413278",
"0.5395073",
"0.5392033",
"0.5389502",
"0.53892535"
] | 0.0 | -1 |
Create new training image | public void onClick(View view) {
FaceImg faceImg = new TrainImg(classId, that, FACE_IMG_W, FACE_IMG_H);
mCurFaceImg = faceImg;
faceImg.capture();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createNewImageFile(){\n fillNewImage();\n\n try {\n ImageIO.write(newImage, imageFileType, new File(k + \"_Colored_\" + fileName.substring(0,fileName.length() - 4) + \".\" + imageFileType));\n } catch (IOException e){\n e.printStackTrace();\n }\n \n }",
"IMG createIMG();",
"public void WritePredictionImages() {\r\n\r\n\t\tString str = new String();\r\n\r\n\t\tModelSimpleImage img = new ModelSimpleImage();\r\n\t\tCDVector texture = new CDVector();\r\n\t\tint n = m_pModel.Rc().NRows();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\r\n\t\t\tm_pModel.Rc().Row(n - i - 1, texture); // take largest first\r\n\t\t\timg = m_pModel.ShapeFreeImage(texture, img);\r\n\t\t\t// str.format(\"Rc_image%02i.bmp\", i );\r\n\t\t\tstr = \"Rc_image\" + i + \".xml\";\r\n\t\t\tModelImage image = new ModelImage(img, str);\r\n\t\t\timage.saveImage(\"\", str, FileUtility.XML, false);\r\n\t\t}\r\n\t\tn = m_pModel.Rt().NRows();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\r\n\t\t\tm_pModel.Rt().Row(i, texture);\r\n\t\t\timg = m_pModel.ShapeFreeImage(texture, img);\r\n\t\t\t// str.format(\"Rt_image%02i.bmp\", i );\r\n\t\t\tstr = \"Rt_image\" + i + \".xml\";\r\n\t\t\tModelImage image = new ModelImage(img, str);\r\n\t\t\timage.saveImage(\"\", str, FileUtility.XML, false);\r\n\t\t}\r\n\t}",
"Image createImage();",
"public void createImage() {\n\t\tBufferedImage crab1ststep = null;\n\t\tBufferedImage crab2ndstep = null;\n\t\tBufferedImage crabhalf = null;\n\t\tBufferedImage crabfull = null;\n\t\tBufferedImage eye6 = null;\n\t\tBufferedImage eye5 = null;\n\t\tBufferedImage eye4 = null;\n\t\tBufferedImage eye3 = null;\n\t\tBufferedImage eye2 = null;\n\t\tBufferedImage eye1 = null;\n\t\tBufferedImage eyeClosed = null;\n\t\ttry {\n\t\t crabImage = ImageIO.read(new File(\"src/images/crab.png\"));\n\t\t crab1ststep = ImageIO.read(new File(\"src/images/crab1ststep.png\"));\n\t\t crab2ndstep = ImageIO.read(new File(\"src/images/crab2ndstep.png\"));\n\t\t crabhalf = ImageIO.read(new File(\"src/images/crabhalf.png\"));\n\t\t crabfull = ImageIO.read(new File(\"src/images/crabfull.png\"));\n\t\t crabWin = ImageIO.read(new File(\"src/images/crabwin.png\"));\n\t\t crabLose = ImageIO.read(new File(\"src/images/crablose.png\"));\n\t\t eye6 = ImageIO.read(new File(\"src/images/crab_eye6.png\"));\n\t\t eye5 = ImageIO.read(new File(\"src/images/crab_eye5.png\"));\n\t\t eye4 = ImageIO.read(new File(\"src/images/crab_eye4.png\"));\n\t\t eye3 = ImageIO.read(new File(\"src/images/crab_eye3.png\"));\n\t\t eye2 = ImageIO.read(new File(\"src/images/crab_eye2.png\"));\n\t\t eye1 = ImageIO.read(new File(\"src/images/crab_eye1.png\"));\n\t\t eyeClosed = ImageIO.read(new File(\"src/images/eyes_closed.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"bad\");\n\t\t}\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\t\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\t\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n\t}",
"private void createTestImage()\n {\n initialImage = new byte[3 * size / 2];\n for (int i = 0; i < size; i++)\n {\n initialImage[i] = (byte) (40 + i % 199);\n }\n\n for (int i = size; i < 3 * size / 2; i += 2)\n {\n initialImage[i] = (byte) (40 + i % 200);\n initialImage[i + 1] = (byte) (40 + (i + 99) % 200);\n }\n }",
"public void fillNewImage(){\n newImage = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);\n\n // Fill the new image with the pixels\n for(int i = 0; i < imageHeight; i++)\n for(int j = 0; j < imageWidth; j++){\n //System.out.println(\"pixel[\" + i + \"][\" + j + \"]\");\n newImage.setRGB(j, i, kCenters[assignedCluster[i][j]].getRGB());\n //newImage.setRGB(j, i, kCenters[0].getRGB());\n }\n }",
"TrainingTest createTrainingTest();",
"public abstract Image gen();",
"public Image createImage() {\n if (source == null) {\n source = new MemoryImageSource(width, height, cModel, pixels, 0, width);\n source.setAnimated(true);\n }\n Image img = Toolkit.getDefaultToolkit().createImage(source);\n return img;\n }",
"public void makeGrayscale() {\n PixelReader pr = img.getPixelReader();\n WritableImage gray = new WritableImage((int) w, (int) h);\n PixelWriter pw = gray.getPixelWriter();\n int count = 0;\n for (int i = 0; i < (int) h; i++) {\n for (int j = 0; j < (int) w; j++) {\n count += 1;\n Color color = pr.getColor(j, i);\n //Reading each pixel and converting to Grayscale\n pw.setColor(j, i, new Color((color.getRed() * 0.3 + color.getGreen() * 0.59 + color.getBlue() * 0.11),\n (color.getRed() * 0.3 + color.getGreen() * 0.59 + color.getBlue() * 0.11),\n (color.getRed() * 0.3 + color.getGreen() * 0.59 + color.getBlue() * 0.11),\n 1.0));\n holderImg = gray;\n }\n }\n }",
"private void generate() {\n preGenerate();\n\n SpriteGrid grid = new SpriteGrid(specState);\n IOHelper.pixelsToBitmap(grid.draw(), sprite);\n\n }",
"@Nonnull\n private BufferedImage createImage() {\n return new BufferedImage(getWidth(), getHeight(), getImageType().getType());\n }",
"public Image generate() {\n generateStripes(rainbow, 7, vertical);\n return new ImageRGB(data);\n }",
"void trainingBatch(GenerateRandom rnd);",
"private void createImage()\n {\n GreenfootImage image = new GreenfootImage(width, height);\n setImage(\"Player.png\");\n }",
"private void createImageModel(final Resource resource) {\n this.createImageModel(resource, false);\n }",
"private void createImage(BufferedImage image) {\n texId.setId(glGenTextures());\n loaded = true;\n\n try {\n int[] pixels = new int[image.getHeight() * image.getWidth()];\n\n image.getRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0, image.getWidth());\n\n Window.console.println(\"Texture num : \" + texId.getId() + \" , loaded with path : \" + texId.getPath());\n\n ByteBuffer buffer = BufferUtils.createByteBuffer(image.getHeight() * image.getWidth() * 4);\n\n for (int i = 0; i < image.getHeight(); i++) {\n for (int j = 0; j < image.getWidth(); j++) {\n int pixel = pixels[i * image.getWidth() + j];\n buffer.put((byte) ((pixel >> 16) & 0xFF)); // RED\n buffer.put((byte) ((pixel >> 8) & 0xFF)); // GREEN\n buffer.put((byte) (pixel & 0xFF)); // BLUE\n buffer.put((byte) ((pixel >> 24) & 0xFF)); // ALPHA\n }\n }\n\n buffer.flip();\n\n this.width = image.getWidth();\n this.height = image.getHeight();\n\n setParam(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n setParam(GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\n upload(buffer);\n GameManager.texManager.add(texId);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }",
"@Test\n\tpublic void testUpdateImage() {\n\n\t\tip = new ImagePlus();\n\t\t//assertNull(ip.img);\n\t\tip.updateImage();\n\t\t//assertNull(ip.img);\n\n\t\tip = new ImagePlus(DataConstants.DATA_DIR + \"head8bit.tif\");\n\t\t//assertNull(ip.img);\n\t\tip.updateImage();\n\t\t//assertNotNull(ip.img);\n\t}",
"public void fitToModel(final List<Mat> newFaceImages, final String lable, final int lableCount) {\n\n recognizer.setLabelInfo(lableCount, lable);\n\n final List<Mat> images = new ArrayList<>();\n final opencv_core.Mat lableMatrix = new opencv_core.Mat(newFaceImages.size(), 1, CV_32SC1);\n final IntBuffer labels = lableMatrix.createBuffer();\n newFaceImages.forEach(image -> {\n //resize the image\n Imgproc.resize(\n image, image, new Size(FACE_WIDTH, FACE_HEIGHT)\n );\n //convert to grayscale\n Imgproc.cvtColor(\n image, image, Imgproc.COLOR_RGB2GRAY\n );\n //add image and lables to test\n images.add(image);\n labels.put(\n images.size() - 1, lableCount\n );\n });\n\n //if the model does not exist we need to train the recognizer\n if(needsTrain) {\n recognizer.train(images, ImageOps.toMat(lableMatrix));\n needsTrain = false;\n return;\n }\n\n //otherwise just to update the model\n recognizer.update(images, ImageOps.toMat(lableMatrix));\n }",
"public com.agbar.service.model.ImgImportadas create(long imageId);",
"public void startTrainingMode() {\n\t\t\r\n\t}",
"public void generatePixelLabeledImage(DecisionForest classifier, String filename, \n\t\t\tLabelledImageType imageType, ClassLabel clazz) \n\t\t\tthrows MalformedForestException, IOException, MalformedProbabilityDistributionException, InterruptedException {\n\t\t\n\t\t// Get the file extension, if no extension then throw exception immediately\n\t\tString extension = \"\";\n\t\tint l = filename.lastIndexOf('.');\n\t\tif (l > 0) {\n\t\t extension = filename.substring(l+1);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"No file extension for the file.\");\n\t\t}\n\t\t\n\t\t// Create an RGB image that we will output for our pixel labeling\n\t\tint width = dataCube.length;\n\t\tint height = dataCube[0].length;\n\t\tBufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR);\n\t\t\n\t\t// Iterate through each pixel, classify/label each pixel, and write it to the new image\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tArrayList<Double> arr = new ArrayList<>(dataCube[i][j].length);\n\t\t\t\tfor (int k = 0; k < dataCube[i][j].length; k++) {\n\t\t\t\t\tarr.add(k, (double) dataCube[i][j][k]);\n\t\t\t\t}\n\t\t\t\tNDRealVector v = new NDRealVector(arr);\n\t\t\t\tProbabilityDistribution probabilities = classifier.classify(v);\n\t\t\t\tif (imageType == LabelledImageType.PROBABILITY) {\n\t\t\t\t\timage.setRGB(i, j, interpolatedColour(probabilities, classifier.getClasses()));\n\t\t\t\t} else if (imageType == LabelledImageType.SINGLE_CLASS_PROBABILITY) {\n\t\t\t\t\timage.setRGB(i, j, singleProbColour(probabilities, clazz));\n\t\t\t\t} else if (imageType == LabelledImageType.MOST_LIKELY) {\n\t\t\t\t\timage.setRGB(i, j, mostlikelyColour(probabilities, classifier.getClasses()));\n\t\t\t\t} else if (imageType == LabelledImageType.ENTROPY) {\n\t\t\t\t\timage.setRGB(i, j, entropyColour(probabilities));\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t\n\t\t// Write the image to file\n\t\tFile file = new File(filename);\n\t\tImageIO.write(image, extension, file);\n\t}",
"public IImage createImage(IImage source) {\n return null;\r\n }",
"void storeTraining(Training training);",
"private void loadDataTraining(String location) throws IOException {\r\n\r\n File parentDir = new ClassPathResource(location).getFile();\r\n \ttrainWriter.write(\"Data folder found.\");\r\n\r\n // Divide all data to training and testing datasets\r\n FileSplit filesInDir = new FileSplit(parentDir, allowedExtensions, randNumGen);\r\n \r\n // Create ParentPathLabelGenerator, that will parse the parent dir and use the name of the subdirectories as label/class names\r\n ParentPathLabelGenerator labelMaker = new ParentPathLabelGenerator();\r\n BalancedPathFilter pathFilter = new BalancedPathFilter(randNumGen, allowedExtensions, labelMaker);\r\n trainWriter.write(\"Label generators created.\");\r\n \r\n // Split the image files into train and test. Specify the train test split as 80%,20%\r\n InputSplit[] filesInDirSplit = filesInDir.sample(pathFilter, 80, 20);\r\n InputSplit trainDataInputSplit = filesInDirSplit[0];\r\n InputSplit testDataInputSplit = filesInDirSplit[1];\r\n trainWriter.write(\"Data splited to train and test parts as 80% and 20%.\");\r\n \r\n /*\r\n * Specifying a new record reader (one for testing on dataset, one for testing on real data, one for training)\r\n * with the height and width you want the images to be resized to.\r\n * Note that the images in this example are all of different size\r\n * They will all be resized to the height and width specified below\r\n * */\r\n ImageRecordReader trainRecordReader = new ImageRecordReader(inputShape[1],inputShape[2],inputShape[0],labelMaker);\r\n trainRecordReader.initialize(trainDataInputSplit);\r\n\r\n ImageRecordReader testRecordReader = new ImageRecordReader(inputShape[1],inputShape[2],inputShape[0], labelMaker);\r\n testRecordReader.initialize(testDataInputSplit);\r\n trainWriter.write(\"Data iterators created successfully.\");\r\n \r\n // Get the number of labels, ImageRecordReader founded in dir and check it\r\n int outputNum = trainRecordReader.numLabels();\r\n\r\n // Init iterators with datasets\r\n trainIterator = new RecordReaderDataSetIterator(trainRecordReader, batchSizeTraining, labelIndex, outputNum);\r\n trainIterator.setCollectMetaData(true);\r\n testIterator = new RecordReaderDataSetIterator(testRecordReader, batchSizeTesting, labelIndex, outputNum);\r\n testIterator.setCollectMetaData(true);\r\n trainWriter.write(\"Data iterators setted to collect metadata.\");\r\n }",
"public PixImage toPixImage() {\n // Replace the following line with your solution.\n\t PixImage image=new PixImage(getWidth(),getHeight());\n\t \n\t DList<int[]> runs_new=new DList<int[]>();\n\t\t\t for(RunIterator i=this.iterator();i.hasNext();) {\n\t\t\t int[] run = i.next();\n\t\t\t for (int t= 0; t < run[0]; t++) {\n\t\t\t \t runs_new.addLast(run);\n\t\t\t System.out.print(\"(\" + run[1]+\" \"+ run[2]+\" \"+run[3]+\")\");\n\t\t } \n\t }\t\n int position=1;\n for(int j=0;j<height;j++) {\n\t for(int i=0;i<width;i++) {\n\t\t\n\t\t DListNode<int[]> run_new=runs_new.nth(position);\n\t\t position++;\n\t\t \n\t\t image.setPixel(i, j, (short) run_new.item[1], (short) run_new.item[2], (short) run_new.item[3]);\n\t }\n }\n\t\t \n\t\t \n\t return image;\n }",
"private Sprite createSprite(Image image)\n\t{\n\t\tSprite sprite = new Sprite(image, image.getWidth(), image.getHeight());\n\t\treturn sprite;\n\t}",
"public Image creerImage() {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n\t\ttry {\r\n\t\t\t// Transfert de l image dans le buffer de bytes\r\n\t\t\tImageIO.write(monImage.getImage(), \"png\", baos);\r\n\t\t\t\r\n\t\t\t// Creation d une instance d Image iText\r\n\t\t\tImage image = Image.getInstance(baos.toByteArray());\r\n\t\t\treturn image;\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (BadElementException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}",
"public MakeProfile(){\r\n try{\r\n i = ImageIO.read(new File(\"../images/New Profile.png\"));\r\n repaint();\r\n }\r\n catch(IOException e){\r\n }\r\n \r\n }",
"private void createImgSample() throws IOException {\n\t\tSystem.out.print(\"[INFO][PLUGIN][REPLY]:Creating IMG Sample...\");\n\t\tURL url = new URL(\"http://w23.loxa.edu.tw/mm974401/SmallNight2019.png\");\n\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\n\t\tcon.setRequestProperty(\"User-agent\", \" Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\");\n\t\tBufferedInputStream in = new BufferedInputStream(con.getInputStream());\n\t\tbyte[] data = new byte[1024];\n\t\tnew File(\"reply/img/Sample\").mkdir();\n\t\tFile sampImg = new File(\"reply/img/Sample/SmallNight2019.png\");\n\t\tFileOutputStream fos = new FileOutputStream(sampImg);\n\t\tint n;\n\t\twhile((n=in.read(data,0,1024))>=0) \n\t\t\tfos.write(data,0,n);\n\t\tfos.flush();\n\t\tfos.close();\n\t\tin.close();\n\t\tFileWriter sampCmd = new FileWriter(\"reply/cmd/SampleImg.yml\");\n\t\tsampCmd.write(\"img\\n\");\n\t\tsampCmd.write(\"Sample\\n\");\n\t\tsampCmd.write(\"sample||Sample||TEST||test\\n\");\n\t\tsampCmd.write(\"break\\n\");\n\t\tsampCmd.flush();\n\t\tsampCmd.close();\n\t\tSystem.out.println(\"DONE!\");\n\t}",
"public IImage createImage(String name) throws IOException {\n return null;\r\n }",
"public BufferedImage create() {\n checkDimensions();\n final BufferedImage image = createImage();\n getImagePainter().paint(image);\n return image;\n }",
"private File createImageFile(String mode) throws IOException {\n String imageFileName = getImageFileName(mode);\n\n File storageDir;\n if(mode.equals(getString(R.string.training_on))){\n storageDir = getActivity().getExternalFilesDir(null);\n } else {\n storageDir = getActivity().getExternalCacheDir();\n }\n\n File image;\n image = new File(storageDir, imageFileName+\".jpg\");\n\n return image;\n }",
"private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifier = TensorFlowImageClassifier.create(\n getAssets(),\n MODEL_FILE,\n LABEL_FILE,\n INPUT_SIZE,\n IMAGE_MEAN,\n IMAGE_STD,\n INPUT_NAME,\n OUTPUT_NAME);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }",
"public void ImageCreate(){\n Picasso.get().load(url).into(imageView);\n }",
"void save(Images image);",
"@Override\r\n\t\tpublic MyImage createMyImage(MyImage myimage) {\r\n\t\t\t\r\n\t\t\treturn myimg.createMyImage(myimage);\r\n\t\t}",
"public Image() {\n\t\tsuper();\n\t\taddNewAttributeList(NEW_ATTRIBUTES);\n\t\taddNewResourceList(NEW_RESOURCES);\n\t}",
"public Sprite(Texture newImage){\n\t\timages = new Texture[1];\n\t\timages[0] = newImage;\n\t}",
"public static void main(String[] args) {\n\t\tString datasource=trainer();\n\t\tMat testImage2=new Mat();\n\t\t\n\t\t// VideoCapture capture = new VideoCapture(0);\n\t//\topencv_imgproc.cvtColor(testImage2,testImage2,Imgproc.COLOR_GRAY2RGB);\n \n // Mat testImage = imread(\"C:\\\\Users\\\\Nikki singh\\\\Downloads\\\\nikki's_sample\\\\nikki#1_6.png\", IMREAD_GRAYSCALE); //THIS S STATIC FUNCTION\n\n File root = new File(datasource);\n\n FilenameFilter imgFilter = new FilenameFilter() {\n public boolean accept(File dir, String name) {\n name = name.toLowerCase();\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n }\n };\n\n File[] imageFiles = root.listFiles(imgFilter);\n\n MatVector images = new MatVector(imageFiles.length);\n\n Mat labels = new Mat(imageFiles.length, 1, CV_32SC1);\n IntBuffer labelsBuf = labels.createBuffer();\n //System.out.println(labelsBuf.arrayOffset());\n int counter = 0;\n for (File image : imageFiles) {\n Mat img =imread(image.getAbsolutePath(),IMREAD_GRAYSCALE);\n // Imgproc.resize(img, img, new Size(500,500)); //WE WILL SORT IT OUT LATER\n System.out.println(image.getName().replace(\".png\", \"\"));\n int label = Integer.parseInt(image.getName().replace(\".png\", \"\").split(\"#\")[1].split(\"_\")[0]);\n\n images.put(counter, img);\n \n labelsBuf.put(counter, label);\n\n counter++;\n }\n // System.out.println(labelsBuf.asReadOnlyBuffer().arrayOffset());\n // FaceRecognizer faceRecognizer = FisherFaceRecognizer.create();\n // FaceRecognizer faceRecognizer = EigenFaceRecognizer.create();\n FaceRecognizer faceRecognizer = LBPHFaceRecognizer.create();\n\n faceRecognizer.train(images, labels);\n test(faceRecognizer);\n \n\t}",
"public ImageConverter() {\n this.source = new Mat();\n this.convertedImage = new Mat();\n }",
"public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }",
"@SuppressWarnings(\"unused\")\n\tprivate void cloneImage() {\n//\t\tColorModel cm = offimg.getColorModel();\n//\t\t boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();\n//\t\t WritableRaster raster = offimg.copyData(null);\n//\t\t offimg2 = new BufferedImage(cm, raster, isAlphaPremultiplied, null);\n//\t\t BufferedImage currentImage = new BufferedImage(width,height,BufferedImage.TYPE_3BYTE_BGR);\n\n\t//Fastest method to clone the image (DOES NOT WORK for MACOS)\n//\t\t int[] frame = ((DataBufferInt)offimg.getRaster().getDataBuffer()).getData();\n//\t\t int[] imgData = ((DataBufferInt)offimg2.getRaster().getDataBuffer()).getData();\n//\t\t System.arraycopy(frame,0,imgData,0,frame.length);\n\t}",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"MAZE_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }",
"public abstract void fit(BinaryData trainingData);",
"public void train() throws Exception;",
"private boolean createNewTest() {\n\t\tFileOutputStream fout;\t\t\n\t\ttry {\n\t\t\tfout = new FileOutputStream(this.sampleName);\n\t\t\tfor (int k = 0; k < this.sizeOfFile; k++) {\n\t\t\t\tfout.write(this.testBytes[k]);\n\t\t\t}\n\t\t\tfout.close();\n\t\t}\n\t\t// Catches any error conditions\n\t\tcatch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to write image\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private void createUpdateImage(Item item) throws Exception {\r\n //cria a imagem\r\n new Image().saveImage(item.getImagem(), item.getNome());\r\n \t}",
"@Override\n\tpublic Image creer(Image entity) throws InvalideGstoreException {\n\t\treturn imageRepository.save(entity);\n\t}",
"private void imageInitiation() {\n ImageIcon doggyImage = new ImageIcon(\"./data/dog1.jpg\");\n JLabel dogImage = new JLabel(doggyImage);\n dogImage.setSize(700,500);\n this.add(dogImage);\n }",
"private File createImageFile() throws IOException{\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\"+timeStamp;\n File image = File.createTempFile(imageFileName, \".jpg\", this.savePath);\n \n return image;\n }",
"private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }",
"public void writeImage() {\n // Write generated image to a file\n try {\n // Save as JPEG\n File file = new File(\"Images/\" + name + \"INS\" + System.currentTimeMillis() + \".jpg\");\n ImageIO.write(bufferedImage, \"jpg\", file);\n\t\t\t\t\n\n } catch (IOException e) {\n }\n }",
"public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }",
"public Set instantiate() throws IOException {\n String chars = ((JTextArea)wizard.getProperty(\"imageTextArea\")).getText();\n BufferedImage imageWithChars = (BufferedImage)wizard.getProperty(\"image\"); // this returns BufferedImage\n Dimension resolution = (Dimension) wizard.getProperty(\"resolution\");\n String trainingSetName = (String) wizard.getProperty(\"trainigSetName\");\n String neuralNetworkName = (String) wizard.getProperty(\"networkName\");\n String neurons = (String) wizard.getProperty(\"neurons\");\n String transferFunction = (String) wizard.getProperty(\"transferFunction\");\n\n ImageIO.write(imageWithChars, \"jpg\",new File(\"imageWithText.jpg\")); // write chars image to file to see how it looks\n\n // create training set and neural network\n TextRecognitionManager tcrManager = TextRecognitionManager.getInstance(); \n tcrManager.createTrainingSet(imageWithChars, chars, resolution, trainingSetName);\n tcrManager.createNeuralNetwork(neuralNetworkName,transferFunction , resolution, neurons);\n \n // open chars recognition top component (used for testing)\n TopComponent tc = WindowManager.getDefault().findTopComponent(\"TCRTopComponent\");\n tc.open();\n \n // maybe return ts and nn files here in order to open corrresponding project folders...\n return Collections.EMPTY_SET;\n }",
"public void testConvolution() {\n ConvolutionLayer cl1 = new ConvolutionLayer(28, 28, 32, 5, 1, 1, ActivationFunction.RELU);\r\n cl1.setName(\"Conv1\");\r\n PoolLayer pl1 = new PoolLayer(28, 28, 32, 2, 2, 1);\r\n pl1.setName(\"Pool1\");\r\n ConvolutionLayer cl2 = new ConvolutionLayer(14, 14, 32, 64, 5, 1, 1, ActivationFunction.LEAKYRELU);\r\n cl2.setName(\"Conv2\");\r\n PoolLayer pl2 = new PoolLayer(14, 14, 64, 2, 2, 1);\r\n pl2.setName(\"Pool2\");\r\n Layer full = new Layer(pl2.getNrOfOutputs(), 1, 10, ActivationFunction.CESIGMOID);\r\n full.setName(\"full\");\r\n full.setDropRate(.3f);\r\n\r\n DeepLayer dl = new DeepLayer(new LearningRateConst(LEARNING_RATE), cl1, pl1, cl2, pl2, full);\r\n dl.setCostFunction(new CrossEntropyCostFunction());\r\n\r\n BinImageReader bir = new BinImageReader(\"/data/train-images.idx3-ubyte.bin\");\r\n fmatrix images = bir.getResult();\r\n System.out.println(images.getSizeAsString());\r\n\r\n BinLabelReader blr = new BinLabelReader(\"/data/train-labels.idx1-ubyte.bin\");\r\n fmatrix trainSetLabels = blr.getResult();\r\n System.out.println(trainSetLabels.getSizeAsString());\r\n\r\n Random r = new Random(System.currentTimeMillis());\r\n dl.randomizeWeights(r, -.1f, .1f);\r\n\r\n int maxImage = images.getNrOfColumns();\r\n fmatrix image = new fmatrix(1, images.getNrOfColumns());\r\n fmatrix target = new fmatrix(1, 10);\r\n\r\n System.out.println(image.getSizeAsString());\r\n String weightFolder = \"weights/\" + dl.getTrainingStartTimeAsFolder();\r\n for (int i = 0; i < TRAIN_ITERATIONS; ++i) {\r\n target.reset();\r\n for (int b = 0; b < 1; ++b) {\r\n int nextImage = r.nextInt(maxImage);\r\n images.getRow(nextImage, b, image);\r\n\r\n int digit = (int) trainSetLabels.get(0, nextImage);\r\n target.set(b, digit, 1);\r\n }\r\n dl.train(i, image, target, TrainingMode.BATCH);\r\n// if (i == 0) {\r\n// dl.writeOutputImages();\r\n// }\r\n if (i % BATCH_SIZE == 0) {\r\n dl.adaptWeights(i, BATCH_SIZE);\r\n }\r\n\r\n if (i % WEIGHT_DEBUG_CYCLE == 0) {\r\n dl.writeWeightImages(weightFolder, i);\r\n }\r\n }\r\n\r\n dl.writeWeightImages(weightFolder, TRAIN_ITERATIONS);\r\n testDigitRecognition(dl, 1, r);\r\n }",
"public IImage createImage(IImage image, int x, int y, int width, int height, int transform) {\n return null;\r\n }",
"public TiledImage getNewImage() {\n return this.newImage;\n }",
"public void startImage() {\r\n\t\tm_blocks = new Vector<BlockList>();\r\n\t\tm_feature.clear();\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tBlockList blockList = new BlockList();\r\n\t\t\tm_blocks.add(blockList);\r\n\t\t}\r\n\t}",
"public boolean generateImageFromText();",
"private Image createImage(String image_file) {\n\t\tImage img = new Image(image_file);\n\t\treturn img;\n\t}",
"private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"GIS\");\n File image = null;\n\n if(!storageDir.exists()){\n\n storageDir.mkdirs();\n\n }\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }catch (Exception e){\n\n e.printStackTrace();\n\n }\n // Save a file: path for use with ACTION_VIEW intents\n\n return image;\n }",
"public interface Features {\n /**\n * Loads the image at the given filename into the controller's model.\n *\n * @param filename the location of the image to load\n * @throws IOException if the provided file path is invalid\n */\n void loadPhoto(String filename) throws IOException;\n\n /**\n * Loads a generated rainbow image into the controller's model.\n *\n * @param width width of image to generate in pixels\n * @param height height of image to generate in pixels\n * @param isHorizontal True for horizontal stripes, else vertical stripes\n */\n void loadRainbow(int width, int height, boolean isHorizontal);\n\n /**\n * Loads a generated checker board image into the controller's model.\n *\n * @param tileSize the side length of tiles for the generated image in pixels.\n */\n void loadCheckerBoard(int tileSize);\n\n /**\n * Saves the current state of the image in the controller's model to the specified file location.\n *\n * @param filename the location to save the image\n * @throws IOException if the provided file path is invalid\n */\n void saveToFile(String filename) throws IOException;\n\n /**\n * Applies the blur effect to the image loaded in the controller's model.\n */\n void blur();\n\n /**\n * Applies the sharpen effect to the image loaded in the controller's model.\n */\n void sharpen();\n\n /**\n * Applies the greyscale effect to the image loaded in the controller's model.\n */\n void greyscale();\n\n /**\n * Applies the sepia effect to the image loaded in the controller's model.\n */\n void sepia();\n\n /**\n * Applies the dither effect to the image loaded in the controller's model.\n */\n void dither();\n\n /**\n * Applies the Mosaic effect to the image loaded in the controller's model.\n *\n * @param seeds number of panes to generate in mosaic\n */\n void mosaic(int seeds);\n\n /**\n * reverts the controller's model to the image prior to the most recent effect.\n *\n * @throws IllegalStateException if no changes yet to undo\n */\n void undo();\n\n /**\n * reverts the controller's model to the image after the most recent effect.\n *\n * @throws IllegalStateException if no undos yet to restore\n */\n void redo();\n\n /**\n * Retrieves a copy of the image data stored in the controller's model image.\n *\n * @return a copy of the image data stored in the controller's model image\n */\n BufferedImage outputImage();\n\n /**\n * Runs the batch script commands provided in the given readable.\n *\n * @throws IOException if any issues with accessing the Readable\n */\n void executeScript(Readable script) throws IOException;\n}",
"public Save(BufferedImage image){\n\tthis.new_buff_image = image;\n }",
"public String getTrainPic() {\r\n return trainPic;\r\n }",
"void lSetImage(Image img);",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public void train(){\n recoApp.training(idsToTest);\n }",
"public void createImages(){\n for(String s : allPlayerMoves){\n String a = \"Left\";\n for(int i = 0; i < 2; i++) {\n ArrayList<Image> tempImg = new ArrayList();\n boolean done = false;\n int j = 1;\n while(!done){\n try{\n tempImg.add(ImageIO.read(new File(pathToImageFolder+s+a+j+\".png\")));\n j++;\n } catch (IOException ex) {\n done = true;\n }\n }\n String temp = s.replace(\"/\",\"\") + a;\n playerImages.put(temp, tempImg);\n a = \"Right\";\n }\n }\n imagesCreated = true;\n }",
"public static void createImages()\n {\n //Do if not done before\n if(!createdImages)\n {\n createdImages = true;\n for(int i=0; i<rightMvt.length; i++)\n {\n rightMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n leftMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n rightMvt[i].scale(rightMvt[i].getWidth()*170/100, rightMvt[i].getHeight()*170/100);\n leftMvt[i].scale(leftMvt[i].getWidth()*170/100, leftMvt[i].getHeight()*170/100);\n }\n for(int i=0; i<leftMvt.length; i++)\n {\n leftMvt[i].mirrorHorizontally();\n }\n for(int i=0; i<upMvt.length; i++)\n {\n upMvt[i] = new GreenfootImage(\"sniperEnemyUp\"+i+\".png\");\n downMvt[i] = new GreenfootImage(\"sniperEnemyDown\"+i+\".png\");\n upMvt[i].scale(upMvt[i].getWidth()*170/100, upMvt[i].getHeight()*170/100);\n downMvt[i].scale(downMvt[i].getWidth()*170/100, downMvt[i].getHeight()*170/100);\n }\n }\n }",
"public Sprite(Texture[] newImageArray) throws Exception{\n\t\timages = newImageArray;\n\t\tcheckSizes();\n\t}",
"private void createFeatures() {\n\t\tfeatures = new Feature[NUM_FEATURES];\n\n\t\t// Create dummy feature\n\t\tfeatures[0] = new DummyFeature(width, height, 0, 0 - THRESHOLD);\n\n\t\t// Create the rest of the features\n\t\tfor (int i = 1; i < NUM_FEATURES; i++) {\n\t\t\tfeatures[i] = new Feature(width, height, i);\n\t\t}\n\t}",
"private void enhanceImage(){\n }",
"private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifier = TensorFlowImageClassifier.create(\n getAssets(),\n MODEL_PATH,\n LABEL_PATH,\n INPUT_SIZE,\n QUANT);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }",
"public void testConvolution2() {\n ConvolutionLayer cl1 = new ConvolutionLayer(28, 28, 32, 5, 1, 1,ActivationFunction.LEAKYRELU);\r\n cl1.setName(\"Conv1\");\r\n PoolLayer pl1 = new PoolLayer(28, 28, 32, 2, 2,1);\r\n pl1.setName(\"Pool1\");\r\n\r\n FuzzyficationLayer fl = new FuzzyficationLayer(pl1.getNrOfOutputs(), 10, 1);\r\n\r\n Layer full = new Layer(fl.getNrOfOutputs(), 0, 10, ActivationFunction.CESIGMOID);\r\n full.setName(\"full\");\r\n full.setDropRate(.003f);\r\n\r\n DeepLayer dl = new DeepLayer(new LearningRateConst(LEARNING_RATE), cl1, pl1, fl, full);\r\n dl.setCostFunction(new CrossEntropyCostFunction());\r\n\r\n BinImageReader bir = new BinImageReader(\"/data/train-images.idx3-ubyte.bin\");\r\n fmatrix images = bir.getResult();\r\n System.out.println(images.getSizeAsString());\r\n\r\n BinLabelReader blr = new BinLabelReader(\"/data/train-labels.idx1-ubyte.bin\");\r\n fmatrix trainSetLabels = blr.getResult();\r\n System.out.println(trainSetLabels.getSizeAsString());\r\n\r\n Random r = new Random(System.currentTimeMillis());\r\n dl.randomizeWeights(r, -.1f, .1f);\r\n\r\n int maxImage = images.getNrOfColumns();\r\n fmatrix image = new fmatrix(1, images.getNrOfColumns());\r\n fmatrix target = new fmatrix(1, 10);\r\n\r\n System.out.println(image.getSizeAsString());\r\n String weightFolder = \"weights/\" + dl.getTrainingStartTimeAsFolder();\r\n for (int i = 0; i < TRAIN_ITERATIONS; ++i) {\r\n target.reset();\r\n for (int b = 0; b < 1; ++b) {\r\n int nextImage = r.nextInt(maxImage);\r\n images.getRow(nextImage, b, image);\r\n\r\n int digit = (int) trainSetLabels.get(0, nextImage);\r\n target.set(b, digit, 1);\r\n }\r\n dl.train(i, image, target, TrainingMode.BATCH);\r\n// if (i == 0) {\r\n// dl.writeOutputImages();\r\n// }\r\n if (i % BATCH_SIZE == 0) {\r\n dl.adaptWeights(i, BATCH_SIZE);\r\n }\r\n\r\n if (i % WEIGHT_DEBUG_CYCLE == 0) {\r\n dl.writeWeightImages(weightFolder, i);\r\n }\r\n }\r\n dl.writeWeightImages(weightFolder, TRAIN_ITERATIONS);\r\n\r\n DeepLayerWriter dlw = new DeepLayerWriter();\r\n Path export = Paths.get(System.getProperty(\"user.home\"), \".nn\", weightFolder, \"final.nn\");\r\n dlw.writeDeepLayer(export, dl);\r\n testDigitRecognition(dl, 1, r);\r\n }",
"private void recreateBitmap() {\n if (sprite != null) {\n sprite.recycle();\n }\n sprite = Bitmap.createBitmap(specState.targetWidth,\n specState.targetHeight,\n Bitmap.Config.ARGB_8888);\n spriteDrawable = new BitmapDrawable(getResources(), sprite);\n spriteDrawable.getPaint().setFilterBitmap(false);\n preview.setImageDrawable(spriteDrawable);\n }",
"public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}",
"public ImageProcessor(Pic a) {\n image = a;\n }",
"BufferedImage outputImage();",
"private Bitmap createStationImage(Station station) {\n Bitmap stationImageSmall;\n ImageHelper imageHelper;\n if (station != null && station.getStationImageFile().exists()) {\n // get image from collection\n stationImageSmall = BitmapFactory.decodeFile(station.getStationImageFile().toString());\n } else {\n // get default image\n stationImageSmall = null;\n }\n imageHelper = new ImageHelper(stationImageSmall, mActivity);\n\n return imageHelper.createCircularFramedImage(192, R.color.transistor_grey_lighter);\n }",
"@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"public void testSetImage() {\n byte[] image = new byte[] {1, 2, 3};\n byte[] expResult = new byte[] {1, 2, 3};\n CLImage instance = new CLImage();\n instance.setImage(image);\n assertEquals(expResult.length, instance.image.length);\n for (int i = 0; i < expResult.length; ++i)\n {\n assertEquals(expResult[i], instance.image[i]);\n }\n }",
"Person addImage(String name, String imagePath);",
"private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}",
"public Training() {\n\n }",
"public void makeImage(String path, int width, int height, int pt, int pb, int pl, int pr) {\n //BufferedImage \n img2 = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2 = img2.createGraphics();\n //int newWidth = bufImg(path).getWidth() - (pl - pr);\n //int newHeight = bufImg(path).getHeight() - (pt - pb);\n // bufImg(path).getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);\n //(img,0,0,width,height,sx1,sy1,sx2,sy2,null);\n //g2.drawImage(bufImg(path), pl, pt, pr, pb, 0, 0, newWidth,newHeight, null);\n saveImage(img2, path);\n }",
"@MediumTest\n public void test_1314_1() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/no_start.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }",
"private TailoredImage doProcess(BufferedImage sourceImg) throws IOException {\n\t\tint width = sourceImg.getWidth();\n\t\tint height = sourceImg.getHeight();\n\t\t// Check maximum effective width height\n\t\tisTrue((width <= sourceMaxWidth && height <= sourceMaxHeight),\n\t\t\t\tString.format(\"Source image is too big, max limits: %d*%d\", sourceMaxWidth, sourceMaxHeight));\n\t\tisTrue((width >= sourceMinWidth && height >= sourceMinHeight),\n\t\t\t\tString.format(\"Source image is too small, min limits: %d*%d\", sourceMinWidth, sourceMinHeight));\n\n\t\t// 创建背景图,TYPE_4BYTE_ABGR表示具有8位RGBA颜色分量的图像(支持透明的BufferedImage),正常取bufImg.getType()\n\t\tBufferedImage primaryImg = new BufferedImage(sourceImg.getWidth(), sourceImg.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);\n\t\t// 创建滑块图\n\t\tBufferedImage blockImg = new BufferedImage(sourceImg.getWidth(), sourceImg.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);\n\t\t// 随机截取的坐标\n\t\tint maxX0 = width - blockWidth - (circleR + circleOffset);\n\t\tint maxY0 = height - blockHeight;\n\t\tint blockX0 = current().nextInt((int) (maxX0 * 0.25), maxX0); // *0.25防止x坐标太靠左\n\t\tint blockY0 = current().nextInt(circleR, maxY0); // 从circleR开始是为了防止上边的耳朵显示不全\n\t\t// Setup block borders position.\n\t\tinitBorderPositions(blockX0, blockY0, blockWidth, blockHeight);\n\n\t\t// 绘制生成新图(图片大小是固定,位置是随机)\n\t\tdrawing(sourceImg, blockImg, primaryImg, blockX0, blockY0, blockWidth, blockHeight);\n\t\t// 裁剪可用区\n\t\tint cutX0 = blockX0;\n\t\tint cutY0 = Math.max((blockY0 - circleR - circleOffset), 0);\n\t\tint cutWidth = blockWidth + circleR + circleOffset;\n\t\tint cutHeight = blockHeight + circleR + circleOffset;\n\t\tblockImg = blockImg.getSubimage(cutX0, cutY0, cutWidth, cutHeight);\n\n\t\t// Add watermark string.\n\t\taddWatermarkIfNecessary(primaryImg);\n\n\t\t// 输出图像数据\n\t\tTailoredImage img = new TailoredImage();\n\t\t// Primary image.\n\t\tByteArrayOutputStream primaryData = new ByteArrayOutputStream();\n\t\tImageIO.write(primaryImg, \"PNG\", primaryData);\n\t\timg.setPrimaryImg(primaryData.toByteArray());\n\n\t\t// Block image.\n\t\tByteArrayOutputStream blockData = new ByteArrayOutputStream();\n\t\tImageIO.write(blockImg, \"PNG\", blockData);\n\t\timg.setBlockImg(blockData.toByteArray());\n\n\t\t// Position\n\t\timg.setX(blockX0);\n\t\timg.setY(blockY0 - circleR >= 0 ? blockY0 - circleR : 0);\n\t\treturn img;\n\t}",
"public void setTempImage()\n {\n URL url = this.getClass().getResource(lastselection.getImage());\n\t\tImage image = Toolkit.getDefaultToolkit().getImage(url);\n\t\ttempImage = new PImage(image);\n\t\ttempImage.setBounds(0,0,65,170);\n\t\ttempImage.setTransparency(0);\n\t\tlayer.addChild(tempImage);\n\t}",
"private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }",
"public Training() {\n }",
"public void setup() {\r\n smooth();\r\n // TODO: Try other images.\r\n img = loadImage(\"frog.jpg\");\r\n\r\n // Create and initialize the 2D array from individual pixels\r\n // in the image. Note that img.pixels is a 2D array - it contains\r\n // all the rows of the images strung in a long line, one row after an\r\n // other.\r\n pixelArray = new int[img.width][img.height];\r\n for (int i = 0; i < img.width; i++) {\r\n for (int j = 0; j < img.height; j++) {\r\n pixelArray[i][j] = img.pixels[j * img.width + i];\r\n }\r\n }\r\n }",
"@PostMapping(\"/partner-imgs\")\n @Timed\n public ResponseEntity<PartnerImg> createPartnerImg(@RequestBody PartnerImg partnerImg) throws URISyntaxException {\n log.debug(\"REST request to save PartnerImg : {}\", partnerImg);\n if (partnerImg.getId() != null) {\n throw new BadRequestAlertException(\"A new partnerImg cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n PartnerImg result = partnerImgService.save(partnerImg);\n return ResponseEntity.created(new URI(\"/api/partner-imgs/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@Before\n public void setUp() {\n int[][][] testImage = new int[4][4][3];\n image = new ImageImpl(testImage);\n }",
"@Test\n\tpublic void testGetImage() {\n\n\t\tip = new ImagePlus();\n\t\t//assertNull(ip.img);\n\t\tassertNull(ip.getImage());\n\n\t\tip = new ImagePlus(DataConstants.DATA_DIR + \"gray8-3x2-sub1.tif\");\n\t\t//assertNull(ip.img);\n\t\tassertNotNull(ip.getImage());\n\t}",
"private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}",
"public void displayNewImage() {\n\t\tthis.canvas.display();\n\t}"
] | [
"0.6553355",
"0.6319604",
"0.6172495",
"0.6018228",
"0.5978696",
"0.59335506",
"0.5843887",
"0.5787206",
"0.57141465",
"0.5651774",
"0.55369264",
"0.54908264",
"0.54790777",
"0.5451293",
"0.54157275",
"0.54045784",
"0.5391099",
"0.5330991",
"0.53248644",
"0.5305577",
"0.5288349",
"0.5271815",
"0.5270578",
"0.5250893",
"0.52474725",
"0.5201377",
"0.51910096",
"0.5182572",
"0.5171082",
"0.51660746",
"0.5150135",
"0.5141704",
"0.5135932",
"0.5132907",
"0.51202834",
"0.5119872",
"0.51195973",
"0.51163256",
"0.51111007",
"0.51059",
"0.5085905",
"0.5066812",
"0.5065761",
"0.5061074",
"0.5056345",
"0.50529903",
"0.50480187",
"0.50480163",
"0.5045822",
"0.5039187",
"0.50315106",
"0.50288755",
"0.5019087",
"0.50172454",
"0.5012621",
"0.5008208",
"0.49889055",
"0.49860615",
"0.49788177",
"0.49748412",
"0.4972024",
"0.49695256",
"0.4968906",
"0.4968121",
"0.4965068",
"0.4962753",
"0.4962322",
"0.49265042",
"0.49185792",
"0.4910306",
"0.49097988",
"0.49071386",
"0.4901469",
"0.4900765",
"0.48972717",
"0.48968711",
"0.48934743",
"0.48916814",
"0.4886354",
"0.48847082",
"0.48811218",
"0.48807633",
"0.48795488",
"0.48788834",
"0.48787707",
"0.48675862",
"0.48661137",
"0.4862705",
"0.4858972",
"0.48581657",
"0.4844847",
"0.48446816",
"0.4838296",
"0.48375425",
"0.48304617",
"0.48297796",
"0.48248956",
"0.48215088",
"0.48178044",
"0.4815324",
"0.4812088"
] | 0.0 | -1 |
================================================================= Capture face images ================================================================= | @Override
public void onActivityResult(int requestCode, int resultCode, Intent intent)
{
if(requestCode==REQUEST_IMAGE_CAPTURE && resultCode==RESULT_OK)
{
mCurFaceImg.process();
}
super.onActivityResult(requestCode, resultCode, intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }",
"private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }",
"private void detectAndFrame(final Bitmap imageBitmap) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n ByteArrayInputStream inputStream =\n new ByteArrayInputStream(outputStream.toByteArray());\n\n DetectTask detectTask = new DetectTask();\n\n try{\n ImageView imageView = findViewById(R.id.imageView1);\n Face[] faces = detectTask.execute(inputStream).get();\n if (faces.length == 0){\n Log.d(TAG, \"Detection Failed, nobody is detected\");\n }else{\n imageView.setImageBitmap(\n drawFaceRectanglesOnBitmap(imageBitmap, faces));\n facialID = faces[0].faceId;\n }\n }catch (Exception e){\n Log.d(TAG, e.toString());\n }\n }",
"public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}",
"@Override\r\n\t\tpublic void run() {\r\n\t\t\t/* face detector only needs grayscale image */\r\n\t\t\tgrayToRgb(graybuff_,rgbs_);\t\t\t\t\t\t\t\t\t\t// jni method\r\n//\t\t\tgray8toRGB32(graybuff_,previewWidth_,previewHeight_,rgbs);\t\t// java method\r\n\t\t\tfloat aspect = (float)previewHeight_/(float)previewWidth_;\r\n\t\t\tint w = prevSettingWidth_;\r\n\t\t\tint h = (int)(prevSettingWidth_*aspect);\r\n\t\t\tfloat xScale = (float)previewWidth_/(float)prevSettingWidth_;\r\n\t\t\tfloat yScale = (float)previewHeight_/(float)prevSettingHeight_;\r\n\t\t\tBitmap bmp = Bitmap.createScaledBitmap(\r\n\t\t\t\t\t\tBitmap.createBitmap(rgbs_,previewWidth_,previewHeight_,Bitmap.Config.RGB_565),\r\n\t\t\t\t\t\tw,h,false);\r\n//\t\t\tLog.i(TAG,\"downscale w=\"+bmp.getWidth()+\",h=\"+bmp.getHeight());\r\n\t\t\tint prevfound=0,trackfound=0;\r\n\t\t\tfor(int i=0; i<MAX_FACE; i++){\r\n\t\t\t\tFaceResult face = faces_[i];\r\n\t\t\t\tfloat eyedist = face.eyesDistance();\r\n\t\t\t\tif(eyedist==0.0f)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tPointF midEyes = new PointF(); \r\n\t\t\t\tface.getMidPoint(midEyes);\r\n\t\t\t\tprevfound++;\r\n\t\t\t\tPointF lt = new PointF(midEyes.x-eyedist*2.5f,midEyes.y-eyedist*2.5f);\r\n\t\t\t\tRect rect = new Rect((int)(lt.x),(int)(lt.y),(int)(lt.x+eyedist*5.0f),(int)(lt.y+eyedist*5.0f));\r\n\t\t\t\t/* fix to fit */\r\n\t\t\t\trect.left = rect.left < 0 ? 0 : rect.left;\r\n\t\t\t\trect.right = rect.right > w ? w : rect.right;\r\n\t\t\t\trect.top = rect.top < 0 ? 0 : rect.top;\r\n\t\t\t\trect.bottom = rect.bottom > h ? h : rect.bottom;\r\n\t\t\t\tif(rect.left >= rect.right || rect.top >= rect.bottom )\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t/* crop */\r\n\t\t\t\tBitmap facebmp = Bitmap.createBitmap(bmp,rect.left,rect.top,rect.width(),rect.height());\r\n\t\t\t\tFaceDetector.Face[] trackface = new FaceDetector.Face[1];\r\n\t\t\t\tFaceDetector tracker = new FaceDetector( facebmp.getWidth(),facebmp.getHeight(),1); \r\n\t\t\t\tint found = tracker.findFaces(facebmp, trackface);\r\n\t\t\t\tif(found!=0){\r\n\t\t\t\t\tPointF ptTrack = new PointF();\r\n\t\t\t\t\ttrackface[0].getMidPoint(ptTrack);\r\n\t\t\t\t\tptTrack.x += (float)rect.left;\r\n\t\t\t\t\tptTrack.y += (float)rect.top;\r\n\t\t\t\t\tptTrack.x *= xScale;\r\n\t\t\t\t\tptTrack.y *= yScale;\r\n\t\t\t\t\tfloat trkEyedist = trackface[0].eyesDistance()*xScale;\r\n\t\t\t\t\tfaces_[i].setFace(ptTrack,trkEyedist);\r\n\t\t\t\t\ttrackfound++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(prevfound==0||prevfound!=trackfound){\r\n\t\t\t\tFaceDetector.Face[] fullResults = new FaceDetector.Face[MAX_FACE];\r\n\t\t\t\tfdet_.findFaces(bmp, fullResults);\r\n\t\t\t\t/* copy result */\r\n\t\t\t\tfor(int i=0; i<MAX_FACE; i++){\r\n\t\t\t\t\tif(fullResults[i]==null)\r\n\t\t\t\t\t\tfaces_[i].clear();\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tPointF mid = new PointF();\r\n\t\t\t\t\t\tfullResults[i].getMidPoint(mid);\r\n\t\t\t\t\t\tmid.x *= xScale;\r\n\t\t\t\t\t\tmid.y *= yScale;\r\n\t\t\t\t\t\tfloat eyedist = fullResults[i].eyesDistance()*xScale;\r\n\t\t\t\t\t\tfaces_[i].setFace(mid,eyedist);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/* post message to UI */\r\n\t\t\thandler_.post(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\toverlayLayer_.postInvalidate();\r\n\t\t\t\t\t// turn off thread lock\r\n\t\t\t\t\tisThreadWorking_ = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult recognize = mFacePlus.recognize(groupid_long, fileSrc);\n\t\t\t\tLog.e(TAG,fileSrc);\n//\t\t\t\t\tRecognizeReturn result = (RecognizeReturn) recognize.data;\n\t\t\t\tif(recognize.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + recognize.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tRecognizeReturn data = (RecognizeReturn) recognize.data;\n\t\t\t\t//一张图片里有几张脸\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tif(size==0){\n\t\t\t\t\tLog.e(TAG,\"图片没能识别出脸\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,\"识别出\"+size+\"张脸\");\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\t//第i张脸在group中的置信度 ,第0个置信度最高\n\t\t\t\t\tList<Person> personList = data.faceList.get(i).getCandidatePersonList();\n\t\t\t\t\tPerson person = personList.get(0);\n\t\t\t\t\tLog.e(TAG,\"该图片第\"+i+\"张脸最有可能是\"+person.getName());\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult detect = mFacePlus.detect(fileSrc);\n//\t\t\t\t\tResult detect = mFacePlus.detectByPicUrl(\"http://a4.att.hudong.com/86/42/300000876508131216423466864_950.jpg\");\n\t\t\t\tif(detect.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + detect.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tDetectReturn data = (DetectReturn) detect.data;\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\tFace face = data.faceList.get(i);\n\t\t\t\t\tfaceid = face.getId();\n\t\t\t\t\tLog.e(TAG,faceid);\n\t\t\t\t}\n\t\t\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the image, we should send it to the global value\n mFaceImages.set(mCurrentIndex, faceImage);\n // modify the progressDialog\n runOnUiThread(() -> {\n mProgressDialog.dismiss();\n if (faceImage == null) {\n mImageViews.get(mCurrentIndex).setImageResource(R.drawable.ic_head);\n // snakeBarShow can replace Toast\n snakeBarShow(getString(R.string.no_face_detected));\n }\n });\n });\n }",
"@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n /*apply image effects to new frame*/\n Mat mat= hangman.decapitate(inputFrame);\n\n /*check if users clicked the capture button and if external storage is writable for save it*/\n if(isToSaveBitmap && isExternalStorageWritable()){\n isToSaveBitmap=false;\n Bitmap bmp;\n try {\n bmp = Bitmap.createBitmap(mat.cols(), mat.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(mat, bmp);\n File dir = getAlbumStorageDir(\"hangman\");\n String path =dir.getPath()+File.separator+ \"hangman\" +System.currentTimeMillis() + \".JPG\";\n File capture= new File(path);\n\n OutputStream out = null;\n try {\n capture.createNewFile();\n out = new FileOutputStream(capture);\n bmp.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n\n /*Inform the media store that a new image was saved*/\n ContentValues values = new ContentValues();\n values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis());\n values.put(MediaStore.Images.Media.MIME_TYPE, \"image/jpeg\");\n values.put(MediaStore.MediaColumns.DATA, path);\n getBaseContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n\n /*if app was called with intent image capture */\n if(intentImageCapture){\n Intent result = new Intent(\"com.example.RESULT_ACTION\");\n result.setData(Uri.fromFile(capture));\n result.putExtra(Intent.EXTRA_STREAM,capture);\n result.setType(\"image/jpg\");\n setResult(Activity.RESULT_OK, result);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n catch (CvException e) {\n Log.e(\"Exception\", e.getMessage());\n e.printStackTrace();\n }\n }\n return mat;\n }",
"public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }",
"static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }",
"public static void main(String[] args) {\n System.loadLibrary(Core.NATIVE_LIBRARY_NAME);\n VideoCapture VC = new VideoCapture();\n if(!VC.open(0)) {\n System.out.println(\"Open Video Error\");\n }\n while (true){\n Mat img = new Mat();\n if(!VC.read(img)){\n return;\n }\n Mat rgb = new Mat();\n Mat gray = new Mat();\n Imgproc.cvtColor(img,rgb,Imgproc.COLOR_BGRA2RGB);\n Imgproc.cvtColor(rgb,gray,Imgproc.COLOR_BGR2GRAY);\n CascadeClassifier CC = new CascadeClassifier(\"E:/2020/opencv/opencv/build/etc/haarcascades/haarcascade_frontalface_default.xml\");\n MatOfRect rect = new MatOfRect();\n CC.detectMultiScale(gray,rect);\n for(Rect r : rect.toArray()){\n Imgproc.rectangle(img,new Point(r.x,r.y),new Point(r.x + r.width,r.y + r.height),new Scalar(255,0,0));\n }\n HighGui.imshow(\"imshow\",img);\n HighGui.waitKey(10);\n }\n }",
"@Override\n public void onClick(View v) {\n if(captureButton.getText()==\"Take Picture\") {\n // get an image from the camera\n theCamera.takePicture(null, null, takenPicture);\n captureButton.setText(\"Add Mask\");\n }\n //in picture mode, change to mask mode\n else if(captureButton.getText() == \"Add Mask\"){\n //detect faces and count\n FaceDetector face_detector = new FaceDetector(somebmp.getWidth(), somebmp.getHeight(),MAX_FACES);\n faces = new FaceDetector.Face[MAX_FACES];\n num_faces = face_detector.findFaces(somebmp, faces);\n String count_faces = String.valueOf(num_faces);\n Log.i(\"face_detection\",count_faces);\n\n //argb 8888 for quality\n cvsbitmap = Bitmap.createBitmap(somebmp.getWidth(), somebmp.getHeight(),Bitmap.Config.ARGB_8888);\n canvas = new Canvas(cvsbitmap);\n drawMask(canvas);\n captureButton.setText(\"Show Preview\");\n }\n //in mask mode, change to picture mode\n else if(captureButton.getText()==\"Show Preview\") {\n if(num_faces>0)\n //remove mask\n preview.removeView(addMask);\n else\n //remove error\n preview.removeView(errorText);\n theCamera.startPreview();\n captureButton.setText(\"Take Picture\");\n }\n }",
"private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }",
"public void capture()\r\n\t{ \r\n\t VideoCapture camera = new VideoCapture();\r\n\t \r\n\t camera.set(12, -20); // change contrast, might not be necessary\r\n\t \r\n\t //CaptureImage image = new CaptureImage();\r\n\t \r\n\t \r\n\t \r\n\t camera.open(0); //Useless\r\n\t if(!camera.isOpened())\r\n\t {\r\n\t System.out.println(\"Camera Error\");\r\n\t \r\n\t // Determine whether to use System.exit(0) or return\r\n\t \r\n\t }\r\n\t else\r\n\t {\r\n\t System.out.println(\"Camera OK\");\r\n\t }\r\n\t\t\r\n\t\t \r\n\t\tboolean success = camera.read(capturedFrame);\r\n\t\tif (success)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tprocessWithContours(capturedFrame, processedFrame);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t //image.processFrame(capturedFrame, processedFrame);\r\n\t\t // processedFrame should be CV_8UC3\r\n\t\t \r\n\t\t //image.findCaptured(processedFrame);\r\n\t\t \r\n\t\t //image.determineKings(capturedFrame);\r\n\t\t \r\n\t\t int bufferSize = processedFrame.channels() * processedFrame.cols() * processedFrame.rows();\r\n\t\t byte[] b = new byte[bufferSize];\r\n\t\t \r\n\t\t processedFrame.get(0,0,b); // get all the pixels\r\n\t\t // This might need to be BufferedImage.TYPE_INT_ARGB\r\n\t\t img = new BufferedImage(processedFrame.cols(), processedFrame.rows(), BufferedImage.TYPE_INT_RGB);\r\n\t\t int width = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);\r\n\t\t int height = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT);\r\n\t\t //img.getRaster().setDataElements(0, 0, width, height, b);\r\n\t\t byte[] a = new byte[bufferSize];\r\n\t\t System.arraycopy(b, 0, a, 0, bufferSize);\r\n\r\n\t\t Highgui.imwrite(\"camera.jpg\",processedFrame);\r\n\t\t System.out.println(\"Success\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unable to capture image\");\r\n\t\t\r\n\t camera.release();\r\n\t}",
"public void onClick(View view) {\n FaceImg faceImg = new TrainImg(classId, that, FACE_IMG_W, FACE_IMG_H);\n mCurFaceImg = faceImg;\n faceImg.capture();\n }",
"private native int applyFaceDetection2(byte[] data,int len,int width,int height);",
"private void captureImages() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n imageFileUri = FileUtil.getOutputMediaFileUri(FileUtil.MEDIA_TYPE_IMAGE); // create a file to save the image\n intent.putExtra(MediaStore.EXTRA_OUTPUT, imageFileUri); // set the image file name\n\n // start the image capture Intent\n startActivityForResult(intent, FileUtil.CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }",
"private void getSampleImage() {\n\t\t_helpingImgPath = \"Media\\\\\"+_camType.toString()+_downStream.toString()+_camProfile.toString()+\".bmp\";\n//\t\tswitch( _downStream ){\n//\t\tcase DownstreamPage.LEVER_NO_DOWNSTREAM:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.LEVER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_OUTER_CAM:\n//\t\t\t\tbreak;\t\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_CRANK:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_FOUR_JOIN:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_PUSHER_TUGS:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_CRANK:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.SLIDER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_OUTER_CAM:\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_DOUBLE_SLIDE:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_NO_DOWNSTREAM:\n//\t\t\tbreak;\n//\t\t}\n\t\t\n\t}",
"private void takePicture() {\n\n captureStillPicture();\n }",
"private void previewCapturedImage() {\n try {\n imageProfile.setVisibility(View.VISIBLE);\n Log.d(\"preview\", currentPhotoPath);\n final Bitmap bitmap = CameraUtils.scaleDownAndRotatePic(currentPhotoPath);\n imageProfile.setImageBitmap(bitmap);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }",
"public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }",
"public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}",
"public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }",
"private void previewCapturedImage(){\n \ttry{\n \t\timgPreview.setVisibility(View.VISIBLE);\n \t\t\n \t\t//Bitmap Factory\n \t\tBitmapFactory.Options options = new BitmapFactory.Options();\n \t\t\n \t\t//Downsizing image as it throws OutOfMemory Exception for large images\n \t\toptions.inSampleSize = 4;\n \t\t\n \t\tfinal Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(), options);\n \t\t\n \t\timgPreview.setImageBitmap(bitmap);\n \t}catch(NullPointerException e){\n \t\te.printStackTrace();\n \t}catch(OutOfMemoryError e){\n \t\te.printStackTrace();\n \t}\n }",
"public RoeImage takePicture() \r\n {\r\n // return variable\r\n RoeImage result = new RoeImage();\r\n \r\n // take picture \r\n this.cam.read(this.frame);\r\n \r\n // update timestamp for image capturing\r\n this.timestamp = System.currentTimeMillis();\r\n \r\n // add picture to result\r\n result.SetImage(this.frame);\r\n \r\n // add timestamp of captured image\r\n result.setTimeStamp(this.timestamp);\r\n\r\n // the image captured with properties\r\n return result;\r\n }",
"private native int releaseFaceDetection();",
"@Override\r\n\tpublic BufferedImage transform(BufferedImage image){\n\t\tMat mat = Mat2BufImg.BufImg2Mat(image, BufferedImage.TYPE_3BYTE_BGR, CvType.CV_8UC3);\r\n\t\t//人脸识别\r\n\t\ttry {\r\n\t\t\t//mat --> bufferimage\r\n\t\t\treturn Mat2BufImg.Mat2BufImg(detectFace(mat),\".png\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn image;\r\n\t}",
"private void takePicture() {\n\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, REQUEST_CAMERA);\n\n }",
"public CaptureImage()\r\n\t{\r\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n\t\tcapturedFrame = new Mat();\r\n\t\tprocessedFrame = new Mat();\r\n\t\tboard = new byte[32];\r\n\t\tfor (int i=0;i<board.length;i++){\r\n\t\t\tboard[i] = 0;\r\n\t\t}\r\n\t\tcaptured = new byte[12];\r\n\t}",
"@Override\n public void onPreviewFrame(final byte[] data, Camera camera) {\n\n if (mPausing) {\n//\t\t\tmCardScanner.isRecognizing = false;\n return;\n }\n\n if (mCameraState != IDLE) {\n mCameraDevice.setOneShotPreviewCallback(CameraActivity.this);\n return;\n } else {\n//\t\t\tmCardScanner.isRecognizing = true;\n }\n // generate jpeg image.\n final int width = camera.getParameters().getPreviewSize().width;\n final int height = camera.getParameters().getPreviewSize().height;\n final int format = camera.getParameters().getPreviewFormat();\n Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n final int deviceWidth = size.x;\n final int deviceHeight = size.y;\n\n//\t\tif(safeToTakePicture) {\n//\t\t\tsafeToTakePicture = false;\n Thread recogThread = new Thread(new Runnable() {\n int ret;\n int faceret = 0; // detecting face return value\n Bitmap bmCard;\n\n //\n @Override\n public void run() {\n\n YuvImage temp = new YuvImage(data, format, width, height, null);\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n temp.compressToJpeg(new Rect(0, 0, temp.getWidth(), temp.getHeight()), 100, os);\n\n //getting original bitmap of scan result\n Bitmap bmp_org = BitmapFactory.decodeByteArray(os.toByteArray(), 0, os.toByteArray().length);\n Matrix matrix = new Matrix();\n matrix.postRotate(mDisplayOrientation);\n\n\n Bitmap bmp1 = Bitmap.createBitmap(bmp_org, 0, 0, bmp_org.getWidth(), bmp_org.getHeight(), matrix, true);\n\n //Crop image before scan , send crop image to OCR SDK\n if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n //Crop image as per Frame size in landscape mode\n bmCard = Bitmap.createScaledBitmap(bmp1, 757, 428, false);\n } else {\n //Crop image in center crop in portrait mode\n bmCard = BitmapUtil.centerCrop(bmp1, bmp1.getWidth(), bmp1.getHeight() / 3);\n }\n\n bmp_org.recycle();\n bmp1.recycle();\n\n /*//{{{debug\n if (RecogEngine.g_recogResult.recType == RecType.INIT)\n bmCard = BitmapFactory.decodeResource(getResources(), R.drawable.a);\n else if (RecogEngine.g_recogResult.recType == RecType.FACE)\n bmCard = BitmapFactory.decodeResource(getResources(), R.drawable.b);\n //}}}*/\n _mutex.lock();\n if (RecogEngine.g_recogResult.recType == RecType.INIT) {\n ret = mCardScanner.doRunData(bmCard, RecogEngine.facepick, mDisplayRotation, RecogEngine.g_recogResult);\n if (ret <= 0 && mRecCnt > 2) {\n // Bitmap docBmp = null;\n\n if (mRecCnt % 4 == 1)\n faceret = mCardScanner.doRunFaceDetect(bmCard, RecogEngine.g_recogResult);\n }\n mRecCnt++; //counter increases\n } else if (RecogEngine.g_recogResult.recType == RecType.FACE) { //have to do mrz\n ret = mCardScanner.doRunData(bmCard, RecogEngine.facepick, mDisplayRotation, RecogEngine.g_recogResult);\n } else if (RecogEngine.g_recogResult.recType == RecType.MRZ) { //have to do face\n if (mRecCnt > 2) {\n Bitmap docBmp = bmCard;\n\n if (mRecCnt % 5 == 1)\n ret = mCardScanner.doRunFaceDetect(docBmp, RecogEngine.g_recogResult);\n }\n mRecCnt++;\n }\n _mutex.unlock();\n\n CameraActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (ret > 0) {\n mRecCnt = 0; //counter sets 0\n Bitmap docBmp = bmCard;\n\n if ((RecogEngine.g_recogResult.recType == RecType.MRZ && !RecogEngine.g_recogResult.bRecDone) ||\n (RecogEngine.g_recogResult.recType == RecType.FACE && RecogEngine.g_recogResult.bRecDone)) {\n if (RecogEngine.g_recogResult.bFaceReplaced) {\n RecogEngine.g_recogResult.docFrontBitmap = docBmp.copy(Bitmap.Config.ARGB_8888, false);\n RecogEngine.g_recogResult.docBackBitmap = null;\n } else\n RecogEngine.g_recogResult.docBackBitmap = docBmp.copy(Bitmap.Config.ARGB_8888, false);\n }\n\n if (RecogEngine.g_recogResult.recType == RecType.BOTH ||\n RecogEngine.g_recogResult.recType == RecType.MRZ && RecogEngine.g_recogResult.bRecDone)\n RecogEngine.g_recogResult.docFrontBitmap = docBmp.copy(Bitmap.Config.ARGB_8888, false);\n\n docBmp.recycle();\n\n if (RecogEngine.g_recogResult.bRecDone) {\n showResultActivity();\n } else {\n mScanTitle.setText(\"Scan Front Side of Document\");\n flipImage();\n\n if (!mPausing && mCameraDevice != null) {\n mCameraDevice.setOneShotPreviewCallback(CameraActivity.this);\n }\n\n mHandler.sendMessageDelayed(\n mHandler.obtainMessage(TRIGER_RESTART_RECOG),\n TRIGER_RESTART_RECOG_DELAY);\n }\n } else {\n Log.d(TAG, \"failed to ocr card image\");\n if (mRecCnt > 3 && faceret > 0) //detected only face, so need to detect mrz\n {\n mRecCnt = 0; //counter sets 0\n faceret = 0;\n RecogEngine.g_recogResult.recType = RecType.FACE;\n\n mScanTitle.setText(\"Scan Back Side of Document\");\n flipImage();\n\n Bitmap docBmp = bmCard;\n /* if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n //Do some stuff\n docBmp = BitmapUtil.centerCrop(bmCard, bmCard.getWidth() / 3, bmCard.getHeight() / 2);\n // RecogEngine.g_recogResult.docBitmap = BitmapUtil.centerCrop(bmCard, rel_main.getWidth()/5, rel_main.getHeight()/3);\n } else {\n // RecogEngine.g_recogResult.docBitmap = BitmapUtil.centerCrop(bmCard, rel_main.getWidth()/2, rel_main.getHeight()/3);\n docBmp = BitmapUtil.centerCrop(bmCard, bmCard.getWidth(), bmCard.getHeight() / 3);\n }*/\n RecogEngine.g_recogResult.docFrontBitmap = docBmp.copy(Bitmap.Config.ARGB_8888, false);\n docBmp.recycle();\n }\n\n if (!mPausing && mCameraDevice != null) {\n mCameraDevice.setOneShotPreviewCallback(CameraActivity.this);\n }\n\n mHandler.sendMessageDelayed(\n mHandler.obtainMessage(TRIGER_RESTART_RECOG),\n TRIGER_RESTART_RECOG_DELAY);\n }\n }\n\n });\n }\n });\n recogThread.start();\n//\t\t}\n }",
"private void captureImage() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n try {\n mImageFile = createImageFile();\n } catch (IOException ex) {\n Log.e(TAG, ex.getLocalizedMessage(), ex);\n }\n\n // Continue only if the File was successfully created\n if (mImageFile != null) {\n// intent.putExtra(MediaStore.EXTRA_OUTPUT,\n// Uri.fromFile(mImageFile));\n startActivityForResult(intent, IMAGE_CAPTURE_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.error_capture_image, Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, R.string.no_cam_app, Toast.LENGTH_SHORT).show();\n }\n }",
"public static void main(String[] args){\n String absolutePath = null;\n try {\n absolutePath = new File(\"./src/main/resources/opencv_contrib/opencv_java420.dll\").getCanonicalPath();\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n System.load(absolutePath);\n\n FaceRecognitionTests test = new FaceRecognitionTests();\n\n //test.treatAllPhotos();\n //test.train();\n //test.save();\n\n test.load();\n\n System.out.println(\"percentage correct : \" + test.testAll() * 100 + \"%\");\n\n /*\n Mat imageTest = Imgcodecs.imread(\"photo\\\\testing\\\\20\\\\20_P04A+000E+00.pgm\", Imgcodecs.IMREAD_GRAYSCALE);\n RecognitionResult testResult = test.recognize(imageTest);\n\n System.out.println(\"suposed result : 20, actual result : \" + testResult.label[0] + \" with confidence : \" + testResult.confidence[0]);\n */\n }",
"public void upload() {\n try {\n BufferedImage bufferedProfile = ImageIO.read(profilePicture.getInputStream());\n FaceImage face = new FaceImage(bufferedProfile);\n\n if (face.foundFace()) {\n\n face.setNoCropMultiplier(1);\n face.setAdditionPadding(20);\n face.setDimension(128, 128);\n BufferedImage profilePicture = face.getScaledProfileFace();\n\n File outfile = new File(Settings.NEW_PROFILE_IMAGE_PATH.replace(\"~~username~~\", student.getUserName()));\n ImageIO.write(profilePicture, \"png\", outfile);\n\n success = true;\n\n student.setProfilePicturePath(\"profile/\" + student.getUserName() + \".png\");\n save();\n\n } else {\n FacesContext.getCurrentInstance().addMessage(\"imageContainer:file\", new FacesMessage(\"Kein Gesicht gefunden!\"));\n\n }\n\n } catch (IOException e) {\n System.err.println(\"something went wrong \" + e.getMessage());\n }\n\n }",
"@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }",
"public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }",
"@Override\n\t\tpublic void onPreviewFrame(byte[] data, Camera camera) {\n\n\t\t\tlong t=System.currentTimeMillis();\n\n\t\t\tmYuv.put(0, 0, data);\n\t\t\tMat mRgba = new Mat();\n\t\t\tImgproc.cvtColor(mYuv, mRgba, Imgproc.COLOR_YUV420sp2RGB, 4);\n\n\t\t\tBitmap bmp = Bitmap.createBitmap(CAMERA_HEIGHT, CAMERA_WIDTH, Bitmap.Config.ARGB_8888);\n\n\t\t\tif (Utils.matToBitmap(mRgba, bmp)){\n\t\t\t\tMatrix m=new Matrix();\n\t\t\t\tif(cameraIndex==0)\n\t\t\t\t\tm.setRotate(90);\n\t\t\t\telse{\n\t\t\t\t\tm.setRotate(-90);\n\t\t\t\t\tm.postScale(-1, 1);\n\t\t\t\t}\n\t\t\t\tBitmap mBit=Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), m, true);\n\t\t\t\tMat mbit=Utils.bitmapToMat(mBit);\n\t\t\t\tMat mGray=new Mat();\n\t\t\t\tlong t2=System.currentTimeMillis();\n\t\t\t\tLog.d(TAG, \"catch time:\"+(t2-t));\n\t\t\t\tImgproc.cvtColor(mbit, mGray, Imgproc.COLOR_RGBA2GRAY);\n\t\t\t\tFace face=ph.detectFace_and_eyes(mGray, 1.0f);\n\t\t\t\tlong t3=System.currentTimeMillis();\n\t\t\t\tLog.d(TAG, \"detectFace_and_eyes time:\"+(t3-t2));\n\t\t\t\tm.reset();\n\t\t\t\tm.postScale(2, 2);\n\t\t\t\tBitmap bmshow=Bitmap.createBitmap(mBit, 0, 0, mBit.getWidth(), mBit.getHeight(), m, true);\n\t\t\t\tCanvas canvas=mHolder.lockCanvas();\n\t\t\t\tcanvas.drawBitmap(bmshow, 0, 0, null);\n\n\n\t\t\t\tif(face!=null){\n\t\t\t\t\tPaint paint=new Paint();\n\t\t\t\t\tpaint.setStrokeWidth(3);\n\t\t\t\t\tpaint.setStyle(Style.STROKE);\n\t\t\t\t\tpaint.setColor(Color.GREEN);\n\t\t\t\t\tcanvas.drawRect(getRect(face.face_area), paint);\n\n\t\t\t\t\tpaint.setColor(Color.CYAN);\n\t\t\t\t\tcanvas.drawRect(getRect(face.left_eye), paint);\n\t\t\t\t\tcanvas.drawRect(getRect(face.right_eye), paint); \n\n\t\t\t\t\tif(face.enable){\n\t\t\t\t\t\t\n\t\t\t\t\t\tMat faceimg=ph.makefaceimg(mGray, face);\n\t\t\t\t\t\tif(faceimg!=null){\n\t\t\t\t\t\t\tMessage.obtain(handler, 0x0100, faceimg).sendToTarget();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.d(TAG, \"prehandle time:\"+(System.currentTimeMillis()-t3));\n\t\t\t\t\t}\n\t\t\t\t}\t \n\t\t\t\tmFps.measure();\n\t\t\t\tmFps.draw(canvas, (canvas.getWidth() - bmp.getWidth()) / 2, 0);\n\n\t\t\t\tmHolder.unlockCanvasAndPost(canvas);\n\t\t\t\tmGray.release();\n\t\t\t\tmbit.release();\n\t\t\t\tmBit.recycle();\n\t\t\t}\n\t\t\tmRgba.release();\n\t\t\tbmp.recycle();\n\n\t\t\tt=System.currentTimeMillis()-t;\n\t\t\tLog.d(TAG, \"time:\"+t+\"ms\");\n\t\t}",
"public CameraPanel() {\n initComponents();\n jLabel1.setText(\"<html>Select Camera one<br>by one & press<br>Capture Button.\");\n System.loadLibrary(\"opencv_java330\"); \n facedetector = new CascadeClassifier(\"haarcascade_frontalface_alt.xml\");\n facedetections = new MatOfRect();\n \n }",
"private void captureImage() {\n //Information about intents: http://developer.android.com/reference/android/content/Intent.html\n //Basically used to start up activities or send data between parts of a program\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Obtains the unique URI which sets up and prepares the image file to be taken, where it is to be placed,\n //and errors that may occur when taking the image.\n fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);\n //Stores this information in the Intent (which can be usefully passed on to the following Activity)\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n // start the image capture Intent (opens up the camera application)\n startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n }",
"private void captureImage() {\n String imagename = \"urPics.jpg\";\n File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + File.separator + imagename);\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n FileUri = Uri.fromFile(file);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, FileUri);\n // start the image capture Intent\n startActivityForResult(intent, REQUEST_CODE_CAMERA);\n }",
"@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }",
"private void captureImage() {\n\t\tIntent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE );\n\t\tmFileUri = getOutputMediaFileUri(); // create a file to save the image\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, mFileUri); // set the image file name\n\t\t// start the image capture Intent\n\t\tstartActivityForResult( intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE );\n\t}",
"private void clickpic() {\n if (getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // Open default camera\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\n // start the image capture Intent\n startActivityForResult(intent, 100);\n\n\n } else {\n Toast.makeText(getApplication(), \"Camera not supported\", Toast.LENGTH_LONG).show();\n }\n }",
"public void camara(){\n Intent fotoPick = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n String fecha = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\").format(new Date());\n Uri uriSavedImage=Uri.fromFile(new File(getExternalFilesDir(Environment.DIRECTORY_DCIM),\"inmueble_\"+id+\"_\"+fecha+\".jpg\"));\n fotoPick.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);\n startActivityForResult(fotoPick,TAKE_PICTURE);\n\n }",
"public interface CaptureViewer {\n public void displayImage(Bitmap image);\n\n public void imageCleared();\n}",
"public static void main(String[] args) {\n\t\tString datasource=trainer();\n\t\tMat testImage2=new Mat();\n\t\t\n\t\t// VideoCapture capture = new VideoCapture(0);\n\t//\topencv_imgproc.cvtColor(testImage2,testImage2,Imgproc.COLOR_GRAY2RGB);\n \n // Mat testImage = imread(\"C:\\\\Users\\\\Nikki singh\\\\Downloads\\\\nikki's_sample\\\\nikki#1_6.png\", IMREAD_GRAYSCALE); //THIS S STATIC FUNCTION\n\n File root = new File(datasource);\n\n FilenameFilter imgFilter = new FilenameFilter() {\n public boolean accept(File dir, String name) {\n name = name.toLowerCase();\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n }\n };\n\n File[] imageFiles = root.listFiles(imgFilter);\n\n MatVector images = new MatVector(imageFiles.length);\n\n Mat labels = new Mat(imageFiles.length, 1, CV_32SC1);\n IntBuffer labelsBuf = labels.createBuffer();\n //System.out.println(labelsBuf.arrayOffset());\n int counter = 0;\n for (File image : imageFiles) {\n Mat img =imread(image.getAbsolutePath(),IMREAD_GRAYSCALE);\n // Imgproc.resize(img, img, new Size(500,500)); //WE WILL SORT IT OUT LATER\n System.out.println(image.getName().replace(\".png\", \"\"));\n int label = Integer.parseInt(image.getName().replace(\".png\", \"\").split(\"#\")[1].split(\"_\")[0]);\n\n images.put(counter, img);\n \n labelsBuf.put(counter, label);\n\n counter++;\n }\n // System.out.println(labelsBuf.asReadOnlyBuffer().arrayOffset());\n // FaceRecognizer faceRecognizer = FisherFaceRecognizer.create();\n // FaceRecognizer faceRecognizer = EigenFaceRecognizer.create();\n FaceRecognizer faceRecognizer = LBPHFaceRecognizer.create();\n\n faceRecognizer.train(images, labels);\n test(faceRecognizer);\n \n\t}",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public static BufferedImage contornarFace(BufferedImage pImage) {\n System.out.println(\"\\nRunning DetectFaceDemo\");\n\n // Create a face detector from the cascade file in the resources\n // directory.\n int rows = pImage.getWidth();\n int cols = pImage.getHeight();\n int type = CvType.CV_16UC1;\n Mat image = new Mat(rows, cols, type);\n\n // Detect faces in the image.\n // MatOfRect is a special container class for Rect\n CascadeClassifier faceDetector = new CascadeClassifier();\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n Rect[] facesArray = faceDetections.toArray();\n for (int i = 0; i < facesArray.length; i++) {\n Core.rectangle(image, facesArray[i].tl(), facesArray[i].br(), new Scalar(200, 200, 200), 3);\n }\n return matTOImg(image);\n\n }",
"protected int getFace() {\n return face;\n }",
"protected void startCamera() {\n profileImageCaptured = new File(\n Environment.getExternalStorageDirectory() + \"/\" + \"temp.png\");\n if (profileImageCaptured.exists())\n profileImageCaptured.delete();\n\n outputFileUri = Uri.fromFile(profileImageCaptured);\n Intent intent = new Intent(\n android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n intent.putExtra(\"return-data\", true);\n startActivityForResult(intent, CAMERA_REQUEST);\n\n }",
"private void captureStillPicture() {\n try {\n final Activity activity = getActivity();\n if (null == activity || null == mCameraDevice) {\n return;\n }\n // This is the CaptureRequest.Builder that we use to take a picture.\n final CaptureRequest.Builder captureBuilder =\n mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);\n captureBuilder.addTarget(mImageReader.getSurface());\n\n // Use the same AE and AF modes as the preview.\n captureBuilder.set(CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n setAutoFlash(captureBuilder);\n\n // Orientation\n int rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation));\n\n CameraCaptureSession.CaptureCallback CaptureCallback\n = new CameraCaptureSession.CaptureCallback() {\n\n @Override\n public void onCaptureCompleted(@NonNull CameraCaptureSession session,\n @NonNull CaptureRequest request,\n @NonNull TotalCaptureResult result) {\n Log.e(TAG, \"Saved:\" + mFile);\n Log.d(TAG, mFile.toString());\n unlockFocus();\n }\n };\n\n mCaptureSession.stopRepeating();\n mCaptureSession.abortCaptures();\n mCaptureSession.capture(captureBuilder.build(), CaptureCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"public void takePictureFromCamera() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, CAMERA_REQUEST_CODE);\n\n }",
"public void takePicture() {\n LightMeter lightMeter = new LightMeter(film.getSpeed());\n shutter.setSeconds(lightMeter.getRecommendedSpeed());\n aperture.setSize(lightMeter.getRecommendedAperture());\n shutter.trigger();\n }",
"@Override\n public void imageFromCamera() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n }\n }",
"private void openCamera() {\n Intent intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // intent.setAction(Intent.ACTION_PICK);\n // intent.putExtra(MediaStore.EXTRA_OUTPUT,Image_uri);\n startActivityForResult(intent, camera_image_code);\n\n }",
"public void prepareVisionProcessing(){\n usbCamera = CameraServer.getInstance().startAutomaticCapture();\n /*\n MjpegServer mjpegServer1 = new MjpegServer(\"serve_USB Camera 0\", 1181);\n mjpegServer1.setSource(usbCamera);\n\n // Creates the CvSink and connects it to the UsbCamera\n CvSink cvSink = new CvSink(\"opencv_USB Camera 0\");\n cvSink.setSource(usbCamera);\n\n // Creates the CvSource and MjpegServer [2] and connects them\n CvSource outputStream = new CvSource(\"Blur\", PixelFormat.kMJPEG, 640, 480, 30);\n MjpegServer mjpegServer2 = new MjpegServer(\"serve_Blur\", 1182);\n mjpegServer2.setSource(outputStream);\n */\n }",
"public void detect(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new MainActivity.DetectionTask().execute(inputStream);\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }",
"@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try{\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n false, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n null);\n } catch (Exception e) {\n publishProgress(e.getMessage());\n return null;\n }\n }",
"protected void setProfileCameraImage(Intent intent, int resultCode) {\n\n mImagePicker = new ImagePicker();\n profileBitmap = (Bitmap) intent.getExtras().get(\"data\");\n mProfileImage = (ImageView) findViewById(R.id.profilePicture);\n\n //Uri mCapturedImageUri = intent.getData();\n\n try {\n String[] ids = mCameraManager.getCameraIdList();\n //Log.e(TAG, \"Ids of Camera \" + Arrays.toString(ids));\n\n for (String id : ids) {\n CameraCharacteristics props = mCameraManager.getCameraCharacteristics(id);\n assertNotNull(\"Can't get camera characteristics for camera \" + id, props);\n\n Integer lensFacing = props.get(CameraCharacteristics.LENS_FACING);\n assertNotNull(\"Can't get lens facing info\", lensFacing);\n\n //Camera device faces the opposite direction as the device's screen\n if (lensFacing == CameraCharacteristics.LENS_FACING_BACK) {\n assertTrue(\"System doesn't have back camera feature\",\n mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS));\n try {\n //Bitmap bp = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mCapturedImageUri);\n Bitmap bp = ImagePicker.getImageFromResult(this, resultCode, intent);\n assert bp != null;\n mProfileImage.setImageBitmap(bp);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //Camera device faces the same direction as the device's screen\n } else if (lensFacing == CameraCharacteristics.LENS_FACING_FRONT) {\n assertTrue(\"System doesn't have front camera feature\",\n mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT));\n try {\n //Bitmap bp = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mCapturedImageUri);\n Bitmap bp = ImagePicker.getImageFromResult(this, resultCode, intent);\n assert bp != null;\n mProfileImage.setImageBitmap(bp);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n } else {\n fail(\"Unknown camera lens facing \" + lensFacing.toString());\n }\n }\n\n }catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"public void onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline r20) {\n /*\n r19 = this;\n r0 = r19\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"onCreateCameraPipeline\"\n r1.d(r2)\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n r2 = r20\n r1.f73l = r2\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r1 = r1.IL1Iii\n com.arashivision.insta360.basemedia.model.FileType r1 = r1.getFileType()\n com.arashivision.insta360.basemedia.model.FileType r2 = com.arashivision.insta360.basemedia.model.FileType.FISH_EYE\n r3 = 1\n r4 = 0\n if (r1 != r2) goto L_0x0059\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r1 = r1.IL1Iii\n com.arashivision.insta360.basemedia.model.viewconstraint.Constraint r1 = r1.getConstraint()\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r2 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r2 = r2.IL1Iii\n int[] r2 = r2.getConstraintRatio()\n if (r1 == 0) goto L_0x0059\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r5 = r0.f577a\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r6 = r5.I11L\n float r5 = r1.getDefaultDistance()\n double r9 = (double) r5\n float r5 = r1.getDefaultFov()\n double r11 = (double) r5\n r5 = r2[r3]\n float r5 = (float) r5\n r2 = r2[r4]\n float r2 = (float) r2\n float r5 = r5 / r2\n double r13 = (double) r5\n float r2 = r1.getXScale()\n double r7 = (double) r2\n float r1 = r1.getYScale()\n double r1 = (double) r1\n r15 = 4607182418800017408(0x3ff0000000000000, double:1.0)\n r17 = r7\n r7 = r15\n r15 = r17\n r17 = r1\n r6.setGyroStabilizerFovDistance2(r7, r9, r11, r13, r15, r17)\n L_0x0059:\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n r1.setLoading(r4)\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n if (r1 == 0) goto L_0x00cf\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r2 = r1.ILil\n if (r2 == 0) goto L_0x006d\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r2 = r2.getCameraRenderSurfaceInfo()\n if (r2 == 0) goto L_0x006d\n r4 = r3\n L_0x006d:\n if (r4 != 0) goto L_0x0077\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Custom surface is null\"\n L_0x0073:\n r1.e(r2)\n goto L_0x00c5\n L_0x0077:\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r2 = r1.I11L\n if (r2 != 0) goto L_0x0080\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Render is null\"\n goto L_0x0073\n L_0x0080:\n boolean r2 = r1.llliI\n if (r2 == 0) goto L_0x0089\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Already render surface\"\n goto L_0x0073\n L_0x0089:\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender$CameraRenderSurfaceInfo r2 = new com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender$CameraRenderSurfaceInfo\n r2.<init>()\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n int r4 = r4.renderWidth\n r2.renderWidth = r4\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n int r4 = r4.renderHeight\n r2.renderHeight = r4\n a.a.a.a.e.a.e.l r4 = r1.f60IL\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r5 = r1.ILil\n int r5 = r5.getRenderModelType()\n com.arashivision.graphicpath.render.rendermodel.RenderModelType r4 = r4.a(r5)\n int r4 = r4.getType()\n r2.renderModeType = r4\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n android.view.Surface r4 = r4.mSurface\n r2.mSurface = r4\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r4 = r1.I11L\n r4.startCameraRenderSurface(r2)\n r1.llliI = r3\n L_0x00c5:\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.listener.IBasePlayerViewListener r1 = r1.f741\n if (r1 == 0) goto L_0x00ce\n r1.onLoadingFinish()\n L_0x00ce:\n return\n L_0x00cf:\n r1 = 0\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.e.a.f.h.onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline):void\");\n }",
"private void profilePicImageChooser() {\n Intent pickIntent = new Intent();\n pickIntent.setType(\"image/*\");\n pickIntent.setAction(Intent.ACTION_GET_CONTENT);\n\n Intent takePhotoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n String pickTitle = \"Select or take a new Picture\";\n Intent chooserIntent = Intent.createChooser(pickIntent, pickTitle);\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{takePhotoIntent});\n startActivityForResult(chooserIntent, HPIApp.Prefs.CODE_IMAGE_SELECT);\n }",
"@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }",
"public void takePicture()\n {\n\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n startActivityForResult(cameraIntent, TAKE_PHOTO_CODE);\n }",
"protected void createCameraPreview() {\n try {\n SurfaceTexture texture = textureView.getSurfaceTexture();\n assert texture != null;\n texture.setDefaultBufferSize(imageDimension.getWidth(), imageDimension.getHeight());\n Surface surface = new Surface(texture);\n captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n captureRequestBuilder.addTarget(surface);\n cameraDevice.createCaptureSession(Collections.singletonList(surface), new CameraCaptureSession.StateCallback(){\n @Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {\n Toast.makeText(MainActivity.this, \"Configuration change\", Toast.LENGTH_SHORT).show();\n }\n }, null);\n } catch (CameraAccessException e) {\n Toast.makeText(MainActivity.this, \"Camera Surface failed to load.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }",
"public void toTakeAPicture(View view) {\n requestCameraPermissions();\n Intent launchCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(launchCamera, Constants.CAM_REQUEST);\n\n\n\n }",
"public void processImage() {\n\n\n ++timestamp;\n final long currTimestamp = timestamp;\n byte[] originalLuminance = getLuminance();\n tracker.onFrame(\n previewWidth,\n previewHeight,\n getLuminanceStride(),\n sensorOrientation,\n originalLuminance,\n timestamp);\n trackingOverlay.postInvalidate();\n\n // No mutex needed as this method is not reentrant.\n if (computingDetection) {\n readyForNextImage();\n return;\n }\n computingDetection = true;\n LOGGER.i(\"Preparing image \" + currTimestamp + \" for detection in bg thread.\");\n\n rgbFrameBitmap.setPixels(getRgbBytes(), 0, previewWidth, 0, 0, previewWidth, previewHeight);\n\n if (luminanceCopy == null) {\n luminanceCopy = new byte[originalLuminance.length];\n }\n System.arraycopy(originalLuminance, 0, luminanceCopy, 0, originalLuminance.length);\n readyForNextImage();\n\n final Canvas canvas = new Canvas(croppedBitmap);\n canvas.drawBitmap(rgbFrameBitmap, frameToCropTransform, null);\n // For examining the actual TF input.\n if (SAVE_PREVIEW_BITMAP) {\n ImageUtils.saveBitmap(croppedBitmap);\n }\n\n runInBackground(\n new Runnable() {\n @Override\n public void run() {\n LOGGER.i(\"Running detection on image \" + currTimestamp);\n final long startTime = SystemClock.uptimeMillis();\n final List<Classifier.Recognition> results = detector.recognizeImage(croppedBitmap);\n lastProcessingTimeMs = SystemClock.uptimeMillis() - startTime;\n\n cropCopyBitmap = Bitmap.createBitmap(croppedBitmap);\n final Canvas canvas = new Canvas(cropCopyBitmap);\n final Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(2.0f);\n\n float minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n switch (MODE) {\n case TF_OD_API:\n minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n break;\n }\n\n final List<Classifier.Recognition> mappedRecognitions =\n new LinkedList<Classifier.Recognition>();\n //boolean unknown = false, cervix = false, os = false;\n\n for (final Classifier.Recognition result : results) {\n final RectF location = result.getLocation();\n if (location != null && result.getConfidence() >= minimumConfidence) {\n\n //if (result.getTitle().equals(\"unknown\") && !unknown) {\n // unknown = true;\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n\n /*} else if (result.getTitle().equals(\"Cervix\") && !cervix) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n cervix = true;\n\n } else if (result.getTitle().equals(\"Os\") && !os) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n os = true;\n }*/\n\n\n }\n }\n\n tracker.trackResults(mappedRecognitions, luminanceCopy, currTimestamp);\n trackingOverlay.postInvalidate();\n\n\n computingDetection = false;\n\n }\n });\n\n\n }",
"private void onImageProcessed() {\n /* creating random bitmap and then using in TextureView.getBitmap(bitmap) instead of simple TextureView.getBitmap() will not cause lags & memory leaks */\n if (captureBitmap == null) {\n captureBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);\n }\n captureBitmap = Bitmap.createScaledBitmap(targetView.getBitmap(captureBitmap), captureW, captureH, false);\n\n if (captureProcessor != null) {\n if (isThreadingEnabled) {\n cameraThreadHandler.Queue(captureBitmap);\n }\n else {\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n }\n /*\n else if (!skipNextFrame){\n long time = System.currentTimeMillis();\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n time = System.currentTimeMillis() - time;\n if (time > 0.035)\n skipNextFrame = true;\n }\n else {\n skipNextFrame = false;\n }*/\n }\n }",
"public String getFace() {\r\n return face;\r\n }",
"public String getFace() {\r\n return face;\r\n }",
"@Override\n public void onClick(View arg0) {\n try {\n mPreview.captureImage();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\n protected Face[] doInBackground(InputStream... params) {\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n false, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n null);\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n callBackService.failed(new Error(e.getMessage(),imageFace.getRequestTake()));\n return null;\n }\n }",
"FaceListAdapter(Face[] detectionResult) {\n faces = new ArrayList<>();\n faceThumbnails = new ArrayList<>();\n mIdentifyResults = new ArrayList<>();\n\n if (detectionResult != null) {\n faces = Arrays.asList(detectionResult);\n for (Face face: faces) {\n try {\n // Crop face thumbnail with five main landmarks drawn from original image.\n faceThumbnails.add(ImageHelper.generateFaceThumbnail(\n mBitmap, face.faceRectangle));\n } catch (IOException e) {\n // Show the exception when generating face thumbnail fails.\n setInfo(e.getMessage());\n }\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n if (requestCode == ZoomSDK.REQUEST_CODE_VERIFICATION) {\n ZoomVerificationResult result = data.getParcelableExtra(ZoomSDK.EXTRA_VERIFY_RESULTS);\n\n // CASE: you did not set a public key before attempting to retrieve a facemap.\n // Retrieving facemaps requires that you generate a public/private key pair per the instructions at https://dev.zoomlogin.com/zoomsdk/#/zoom-server-guide\n if (result.getStatus() == ZoomVerificationStatus.ENCRYPTION_KEY_INVALID) {\n AlertDialog alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(getString(R.string.public_key_not_set));\n alertDialog.setMessage(getString(R.string.key_not_set));\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, getString(android.R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n } else if (result.getStatus() == ZoomVerificationStatus.USER_PROCESSED_SUCCESSFULLY) {\n handleVerificationSuccessResult(result);\n }\n } else if (requestCode == CAPTURE_IMAGE) {\n File f = new File(Environment.getExternalStorageDirectory().toString());\n File ttt = null;\n for (File temp : f.listFiles()) {\n if (temp.getName().equals(\"temp.jpg\")) {\n ttt = temp;\n break;\n }\n }\n if (ttt == null)\n return;\n\n Bitmap bmp = rotateImage(ttt.getAbsolutePath());\n ttt.delete();\n face2 = bmp.copy(Bitmap.Config.ARGB_8888, true);\n ivUserProfile2.setImageBitmap(face2);\n ivUserProfile2.setVisibility(View.VISIBLE);\n\n //if (RecogEngine.g_recogResult.faceBitmap != null) {\n if (imageFile != null) {\n //Bitmap nBmp = RecogEngine.g_recogResult.faceBitmap.copy(Bitmap.Config.ARGB_8888, true);\n Bitmap nBmp = decodeFileFromPath(imageFile.getAbsolutePath()).copy(Bitmap.Config.ARGB_8888, true);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectLeftFace(buff.array(), w, h);\n }\n\n if (face2 != null) {\n Bitmap nBmp = face2;\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n\n AsyncTask.execute(new Runnable() {\n @Override\n public void run() {\n // preload sdk resources so the UI is snappy (optional)\n ZoomSDK.preload(PanAadharResultActivity.this);\n }\n });\n }",
"public void doVideoCapture() {\n /*\n r6 = this;\n r0 = r6.mPaused;\n if (r0 != 0) goto L_0x0043;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 != 0) goto L_0x0009;\n L_0x0008:\n goto L_0x0043;\n L_0x0009:\n r0 = r6.mMediaRecorderRecording;\n if (r0 == 0) goto L_0x0042;\n L_0x000d:\n r0 = r6.mNeedGLRender;\n if (r0 == 0) goto L_0x0029;\n L_0x0011:\n r0 = r6.isSupportEffects();\n if (r0 == 0) goto L_0x0029;\n L_0x0017:\n r0 = r6.mCameraDevice;\n r1 = 0;\n r0.enableShutterSound(r1);\n r0 = r6.mAppController;\n r0 = r0.getCameraAppUI();\n r1 = r6.mPictureTaken;\n r0.takePicture(r1);\n goto L_0x0041;\n L_0x0029:\n r0 = r6.mSnapshotInProgress;\n if (r0 != 0) goto L_0x0041;\n L_0x002d:\n r0 = java.lang.System.currentTimeMillis();\n r2 = r6.mLastTakePictureTime;\n r2 = r0 - r2;\n r4 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321;\n r2 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r2 >= 0) goto L_0x003c;\n L_0x003b:\n return;\n L_0x003c:\n r6.mLastTakePictureTime = r0;\n r6.takeASnapshot();\n L_0x0041:\n return;\n L_0x0042:\n return;\n L_0x0043:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.doVideoCapture():void\");\n }",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"@SuppressLint(\"UnsafeExperimentalUsageError\")\n @Override\n public void analyze(@NonNull ImageProxy image_proxy) {\n ArrayList<Recognition> detections = _detector.DetectImage(image_proxy);\n\n // draw the bounding boxes\n _obj_tracker.ObjectTrackerDraw(detections);\n\n image_proxy.close();\n\n }",
"@Override\n public void onPictureTaken(byte[] bytes, Camera camera) {\n Intent intent = new Intent(getActivity(), ShowCaptureActivity.class);\n intent.putExtra(\"capture\", bytes);\n startActivity(intent);\n return;\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n if (requestCode == CAMERA_REQUEST_CODE && resultCode == RESULT_OK) {\n bitmap = (Bitmap) data.getExtras().get(\"data\");\n imageView.setImageBitmap(bitmap);\n callCloudVision(bitmap, feature);\n }\n }",
"@Override\n public FacialLandmarkResult run(Mat frame) {\n return runByDetections(frame, new ResultList<>(Collections.singletonList(\n new ObjectDetectionResult(0, \"face\", 1.0f, 0, 0, frame.size().width(), frame.size().height())\n ))).get(0);\n }",
"@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try{\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n false, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n null);\n } catch (Exception e) {\n Log.e(LOG_TAG1,\"error in background in DetectionTask\");\n doneSignal.countDown();\n return null;\n }\n }",
"private void takePhoto() {\n Intent cameraIntent = new Intent(Intent.ACTION_PICK);\n cameraIntent.setType(\"image/*\");\n //startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);\n startActivityForResult(cameraIntent, GALLERY_PIC_REQUEST);\n }",
"public void onLaunchCamera(View view) {\n Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\n\n data.insertAnImage(OptionID.get(alg), null);\n Cursor imageCursor = data.getImageData(OptionID.get(alg));\n imageCursor.moveToNext();\n intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(getPhotoFileUri(imageCursor.getString(0))))); // set the image file name\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }",
"@Override\n\tpublic void requestImageReceived(CatchoomImage image)\n\t{\n\t\t\n//\t\tstartActivity(new Intent(RecognitionOnlyActivity.this, MainActivityVedio.class));\n\t\t\n\t\tBitmap bitmap = image.toBitmap();\n\t\t\n\t\tBitmap bitmapone = getBitmapFromAsset(\"accendo_logo.png\");\n\t\t\n\t\t/*if (bitmap.getWidth() == bitmapone.getWidth() && bitmap.getHeight() == bitmapone.getHeight())\n\t\t{*/\n\t int[] pixels1 = new int[bitmap.getWidth() * bitmap.getHeight()];\n\t int[] pixels2 = new int[bitmapone.getWidth() * bitmapone.getHeight()];\n\t bitmap.getPixels(pixels1, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(), bitmap.getHeight());\n\t bitmapone.getPixels(pixels2, 0, bitmapone.getWidth(), 0, 0, bitmapone.getWidth(), bitmapone.getHeight());\n\t if (!Arrays.equals(pixels1, pixels2)) \n\t {\n\t resultUrl=\"http://www.accendotechnologies.com/\";\n\t startActivity(new Intent(RecognitionOnlyActivity.this, VideoActivity.class));\n\t }\n\t else \n\t {\n\t \tresultUrl=\"\";\n\t }\n//\t } else\n//\t {\n//\t \tresultUrl=\"\";\n//\t }\n//\t\t\n\t\t\n\t\n\t\t\n//\t\tString imageName = image.toString();\n//\t\tString[] splitName = imageName.split(\"@\", imageName.length());\n//\t\tToast.makeText(getApplicationContext(), \"Image Name is \"+splitName[1], Toast.LENGTH_LONG).show();\n//\t\tf = new File(Environment.getExternalStorageDirectory()+\"/\"+splitName[1]+\".jpg\");\n//\t\ttry\n//\t\t{\n//\t\t\tFileOutputStream fout = new FileOutputStream(f);\n//\t\t\tbitmap.compress(Bitmap.CompressFormat.JPEG, 100, fout); \n//\t\t\tfout.flush();\n//\t\t\tfout.close();\n//\t\t}catch(Exception e)\n//\t\t{\n//\t\t\te.printStackTrace();\n//\t\t}\n//\t\t\n//\t\tImageAsync imasc = new ImageAsync();\n//\t\timasc.execute(f.toString());\n//\t\t\n//\t\tbitmap.recycle();\n//\t\t\n\t\t\n\t\t\n\n\t\t\n//\t\tmCloudRecognition.searchWithImage(COLLECTION_TOKEN,image);\n//\t\tstartActivity(new Intent(RecognitionOnlyActivity.this, MainActivityVedio.class));\n\t\t/**\n\t\t * chary\n\t\t * Need to write service code to send image.\n\t\t */\n\t\t\n\t}",
"private void openCVImage(){\n Imgcodecs codec = new Imgcodecs();\n image = codec.imread(currentPhotoPath, Imgcodecs.IMREAD_COLOR);\n }",
"protected void setCertificateCameraImage(Intent intent, int resultCode) {\n\n mImagePicker = new ImagePicker();\n certificateBitmap = (Bitmap) intent.getExtras().get(\"data\");\n mCertificateImage = (ImageView) findViewById(R.id.certificateImage);\n\n //Uri mCapturedImageUri = intent.getData();\n\n try {\n String[] ids = mCameraManager.getCameraIdList();\n //Log.e(TAG, \"Ids of Camera \" + Arrays.toString(ids));\n\n for (String id : ids) {\n CameraCharacteristics props = mCameraManager.getCameraCharacteristics(id);\n assertNotNull(\"Can't get camera characteristics for camera \" + id, props);\n\n Integer lensFacing = props.get(CameraCharacteristics.LENS_FACING);\n assertNotNull(\"Can't get lens facing info\", lensFacing);\n\n //Camera device faces the opposite direction as the device's screen\n if (lensFacing == CameraCharacteristics.LENS_FACING_BACK) {\n assertTrue(\"System doesn't have back camera feature\",\n mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS));\n try {\n //Bitmap bp = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mCapturedImageUri);\n Bitmap bp = ImagePicker.getImageFromResult(this, resultCode, intent);\n assert bp != null;\n mCertificateImage.setImageBitmap(bp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //Camera device faces the same direction as the device's screen\n } else if (lensFacing == CameraCharacteristics.LENS_FACING_FRONT) {\n assertTrue(\"System doesn't have front camera feature\",\n mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT));\n try {\n //Bitmap bp = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mCapturedImageUri);\n Bitmap bp = ImagePicker.getImageFromResult(this, resultCode, intent);\n assert bp !=null;\n mCertificateImage.setImageBitmap(bp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }else {\n fail(\"Unknown camera lens facing \" + lensFacing.toString());\n }\n }\n }catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n mRgba = inputFrame.rgba();\n Imgproc.resize(mRgba, mRgba, new Size(100,100));\n // Rotate mRgba 90 degrees\n Core.transpose(mRgba, mRgbaT);\n Imgproc.resize(mRgbaT, mRgbaF, mRgbaF.size(), 0,0, 0);\n Core.flip(mRgbaF, mRgba, 1 );\n //Blurs for smoother edgges\n Imgproc.blur(mRgba, mRgba, new Size(8,8));\n\n //Adds the counter to the instantiation of each object as it counts the frame number\n Object blue = new Object(\"blue\", counter);\n Object green = new Object(\"green\", counter);\n Object red = new Object(\"red\", counter);\n\n Mat threshold = new Mat();\n Mat HSV = new Mat();\n //Changes from BGR to HSV as HSV allow much easier colour ranges for creating a binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_RGB2HSV);\n //Creates blue binary mat\n Core.inRange(HSV, blue.HSVMin, blue.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(blue,threshold,HSV,mRgba, blue.type, counter);\n\n //TODO disabled the green markers for now\n /*\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, green.HSVMin, green.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(green,threshold,HSV,mRgba, green.type, counter);\n */\n //creates red binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, red.HSVMin, red.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(red,threshold,HSV,mRgba, red.type, counter);\n\n //Colours the line that registers if a step has occured accordingly\n if(redGreenLine || blueGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(0, 255, 0), 2);\n }\n else if(!redGreenLine && !redGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(255, 0, 0), 2);\n }\n //Will write each frame to storage once the reoord button is pressed. This is used for setting ground truth data\n if(enableVideo) {\n Mat output = new Mat();\n Imgproc.cvtColor(mRgba, output, Imgproc.COLOR_RGB2BGR);\n Imgproc.resize(output, output, new Size(100,100));\n Imgcodecs.imwrite(fileName + BUILDING_NAME + FLOOR_NUMBER + \"(\" + startLat + \",\" + startLong + \")\" + \"to\" + \"(\" + endLat + \",\" + endLong + \")\" + Integer.toString(counter) + \".bmp\", output);\n }\n\n counter++;\n\n return mRgba; // This function must return\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n // choose a image\n if (requestCode == RequestCode.CHOOSE_IMAGE) {\n if (resultCode == RESULT_OK) {\n if (data != null) {\n Uri dataUri = data.getData();\n if (dataUri != null) {\n // get a random name\n File imgFile = SpaceUtils.newUsableFile();\n mSelectPath = imgFile.getPath();\n Log.v(\"path\",mSelectPath);\n // the image intent just return a simple image\n // the Ucrop(裁剪) is solved after the image intent\n UCrop.Options options = new UCrop.Options();\n options.setCompressionQuality(100);\n UCrop.of(dataUri, Uri.fromFile(imgFile))\n .withOptions(options)\n .withMaxResultSize(mImageSize.x, mImageSize.y)\n .withAspectRatio(3, 4)\n .start(this, RequestCode.CROP_IMAGE);\n }\n }\n }\n } else if (requestCode == RequestCode.CROP_IMAGE) {\n // crop a image\n if (resultCode == RESULT_OK) {\n if (data != null) {\n Glide.with(this).load(mSelectPath).into(mImageViews.get(mCurrentIndex));\n startDetectFaceInfo();\n }\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"public void getImageFromCamera() {\n String capturedPath = \"image_\" + System.currentTimeMillis() + \".jpg\";\n File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()\n + \"/DCIM\", capturedPath);\n file.getParentFile().mkdirs();\n mCapturedImageUri = Uri.fromFile(file);\n\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageUri);\n startActivityForResult(intent, CAPTURE_IMAGE_REQUEST_CODE);\n }",
"private void captureImage() {\n\n if (ContextCompat.checkSelfPermission(Main2Activity.this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(Main2Activity.this, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0);\n } else {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n try {\n\n photoFile = createImageFile();\n //displayMessage(getBaseContext(), photoFile.getAbsolutePath());\n //Log.i(\"path_check\", photoFile.getAbsolutePath());\n\n // Continue only if the File was successfully created\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(Main2Activity.this,\n \"com.example.mobileai.fileprovider\",\n photoFile);\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, requestCode);\n }\n } catch (Exception ex) {\n // Error occurred while creating the File\n //displayMessage(getBaseContext(), ex.getMessage().toString());\n }\n\n\n } else {\n // displayMessage(getBaseContext(), \"Null\");\n }\n }\n\n\n }",
"public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}",
"private void ShowCurrentFace() \n {\n if( m_DoneInit )\n {\n String file = \"/tsbtool_gui/facepackage/\"+String.format(\"%02x.BMP\",m_ImageNumber).toUpperCase();\n //new javax.swing.ImageIcon(getClass().getResource(\"/tsbtool_gui/facepackage/00.png\")\n Image face = GetImage(file);\n if( face != null )\n {\n mFaceBox.setIcon( new ImageIcon( face));\n m_FaceLabel.setText(String.format(\"%02x\",m_ImageNumber).toUpperCase());\n }\n else\n JOptionPane.showMessageDialog(this, \"Problem with \"+file);\n AutoUpdateRoster();\n }\n }",
"private Mat processFrame(Mat frame) {\n Imgproc.cvtColor(frame, frame, Imgproc.COLOR_RGBA2RGB);\n // Forward image through network.\n Mat blob = Dnn.blobFromImage(frame, IN_SCALE_FACTOR,\n new Size(IN_WIDTH, IN_HEIGHT),\n new Scalar(MEAN_VAL, MEAN_VAL, MEAN_VAL), false, false);\n net.setInput(blob);\n Mat detections = net.forward();\n int cols = frame.cols();\n int rows = frame.rows();\n Size cropSize;\n if ((float)cols / rows > WH_RATIO) {\n cropSize = new Size(rows * WH_RATIO, rows);\n } else {\n cropSize = new Size(cols, cols / WH_RATIO);\n }\n int y1 = (int)(rows - cropSize.height) / 2;\n int y2 = (int)(y1 + cropSize.height);\n int x1 = (int)(cols - cropSize.width) / 2;\n int x2 = (int)(x1 + cropSize.width);\n Mat subFrame = frame.submat(y1, y2, x1, x2);\n cols = subFrame.cols();\n rows = subFrame.rows();\n detections = detections.reshape(1, (int)detections.total() / 7);\n for (int i = 0; i < detections.rows(); ++i) {\n double confidence = detections.get(i, 2)[0];\n if (confidence > THRESHOLD) {\n int classId = (int)detections.get(i, 1)[0];\n int xLeftBottom = (int)(detections.get(i, 3)[0] * cols);\n int yLeftBottom = (int)(detections.get(i, 4)[0] * rows);\n int xRightTop = (int)(detections.get(i, 5)[0] * cols);\n int yRightTop = (int)(detections.get(i, 6)[0] * rows);\n // Draw rectangle around detected object.\n Imgproc.rectangle(subFrame, new Point(xLeftBottom, yLeftBottom),\n new Point(xRightTop, yRightTop),\n new Scalar(0, 255, 0));\n String label = classNames[classId] + \": \" + confidence;\n int[] baseLine = new int[1];\n Size labelSize = Imgproc.getTextSize(label, Core.FONT_HERSHEY_SIMPLEX, 0.5, 1, baseLine);\n // Draw background for label.\n Imgproc.rectangle(subFrame, new Point(xLeftBottom, yLeftBottom - labelSize.height),\n new Point(xLeftBottom + labelSize.width, yLeftBottom + baseLine[0]),\n new Scalar(255, 255, 255), Core.FILLED);\n // Write class name and confidence.\n Imgproc.putText(subFrame, label, new Point(xLeftBottom, yLeftBottom),\n Core.FONT_HERSHEY_SIMPLEX, 0.5, new Scalar(0, 0, 0));\n }\n }\n\n return frame;\n }",
"public S<T> camImg(int code){\n\t Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\t activity.startActivityForResult(intent, code);\n\t return this;\n\t }",
"@Override\n public void onPreviewFrame(byte[] data, Camera camera) {\n\n Camera.Parameters parameters = camera.getParameters();\n int width = parameters.getPreviewSize().width;\n int height = parameters.getPreviewSize().height;\n\n mCamera.addCallbackBuffer(data);\n\n if (yuvType == null) {\n yuvType = new Type.Builder(rs, Element.U8(rs)).setX(data.length);\n in = Allocation.createTyped(rs, yuvType.create(), Allocation.USAGE_SCRIPT);\n\n rgbaType = new Type.Builder(rs, Element.RGBA_8888(rs)).setX(width).setY(height);\n out = Allocation.createTyped(rs, rgbaType.create(), Allocation.USAGE_SCRIPT);\n }\n\n in.copyFrom(data);\n\n yuvToRgbIntrinsic.setInput(in);\n yuvToRgbIntrinsic.forEach(out);\n\n Bitmap mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n out.copyTo(mBitmap);\n\n mBitmap = GlobalUtils.rotateBitmapOnOrientation(mBitmap,ctx);\n\n liveCamera.setVisibility(VISIBLE);\n\n if(PROCESS_IMAGE) {\n\n if(PROCESSING_TYPE == 1) {\n Rect2d rect2d = new Rect2d(100, 100, 100, 100);\n imageProcessing.RunDetection(mBitmap);\n liveCamera.setImageBitmap(mBitmap);\n }else{\n //Rect2d rect2d = new Rect2d(100, 100, 100, 100);\n liveCamera.setImageBitmap(mBitmap);\n\n }\n\n } else{\n liveCamera.setImageBitmap(mBitmap);\n }\n\n }",
"public void oncapture(CaptureEvent captureEvent) {\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\t// recharger les parametres de la photo\n\t\ttry {\n\t\t\tloadParamPhoto();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbyte[] data = captureEvent.getData();\n\n\t\tFile targetFolder = new File(folder_temp);\n\n\t\t// generer un nom de fichier unique\n\t\tString fileUrl = FileUtility.getUidFileName(\"photo-cam.png\");\n\n\t\t// ServletContext servletContext = (ServletContext)\n\t\t// FacesContext.getCurrentInstance().getExternalContext().getContext();\n\t\t// String arquivoFoto = servletContext.getRealPath(File.separator +\n\t\t// \"temp\" +File.separator + fileUrl);\n\n\t\t// System.err.println(\"handle: url----------\" + arquivoFoto);\n\n\t\tFileImageOutputStream imageOutput;\n\t\ttry {\n\t\t\timageOutput = new FileImageOutputStream(new File(targetFolder, fileUrl));\n\n\t\t\t// imageOutput = new FileImageOutputStream(new File(arquivoFoto));\n\n\t\t\timageOutput.write(data, 0, data.length);\n\t\t\timageOutput.close();\n\n\t\t\t//\n\t\t\tsetUrl(fileUrl);\n\t\t\tdossierEtudiantDto.setPhoto(fileUrl);\n\t\t\tthis.photo_attache_capture = true;\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_success_upload_file\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t} catch (IOException e) {\n\t\t\tthis.photo_attache_capture = false;\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_in_writing_captured_image\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void pickFromCamera() {\n Intent startCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startCamera.putExtra(MediaStore.EXTRA_OUTPUT, uriImage);\n startActivityForResult(startCamera, IMAGE_PICK_CAMERA_CODE);\n\n }",
"public int getFace(){\n return face;\n }",
"public boolean needFaceDetection() {\n return true;\n }",
"private void cameraIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(context.getPackageManager()) != null) {\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,\n Uri.fromFile(photoFile));\n ((MessageActivity) context).startActivityForResult(takePictureIntent, CAMERA_REQUEST);\n }\n }\n }"
] | [
"0.6713818",
"0.6645874",
"0.6432312",
"0.63734174",
"0.63617545",
"0.632911",
"0.63112605",
"0.6247004",
"0.6210535",
"0.61755955",
"0.61688715",
"0.61197215",
"0.61098903",
"0.6104567",
"0.61023724",
"0.60987854",
"0.6095338",
"0.6083552",
"0.6064038",
"0.6048589",
"0.5985172",
"0.59488386",
"0.5941363",
"0.59302366",
"0.5896974",
"0.58685505",
"0.5850659",
"0.5838846",
"0.58360606",
"0.5822924",
"0.5822717",
"0.578965",
"0.57895744",
"0.57850295",
"0.5769976",
"0.5749655",
"0.57376903",
"0.57277",
"0.5709626",
"0.56977695",
"0.56916916",
"0.56881225",
"0.56710047",
"0.5656503",
"0.56500864",
"0.56497645",
"0.56288034",
"0.56226987",
"0.56197065",
"0.5606762",
"0.56057924",
"0.5602804",
"0.5602536",
"0.5601771",
"0.5584286",
"0.55773073",
"0.5569964",
"0.5569334",
"0.55552745",
"0.5551367",
"0.5544434",
"0.55437404",
"0.55400425",
"0.5513275",
"0.5504212",
"0.54900426",
"0.54889405",
"0.5488207",
"0.54860383",
"0.54860383",
"0.5485127",
"0.54804665",
"0.54766405",
"0.54732543",
"0.5471827",
"0.5469535",
"0.5468895",
"0.5467514",
"0.54675",
"0.54645723",
"0.5460651",
"0.545355",
"0.5446765",
"0.5446142",
"0.5445299",
"0.54372734",
"0.5436901",
"0.54354507",
"0.5431235",
"0.5421397",
"0.5415679",
"0.5414808",
"0.54089814",
"0.53981924",
"0.539403",
"0.5393797",
"0.5390946",
"0.53908896",
"0.538753",
"0.5386797"
] | 0.62057614 | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.