query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Writes a typeinstance association. JTM provides no shortcut like "instanceOf" at the topic level to indicate that a topic is an instance of another topic, all typeinstance relationships must be encoded as associations.
private void _writeTypeInstance(final Topic type, final Topic instance) throws IOException { _out.startObject(); _writeKeyValue("type", _TMDM_TYPE_INSTANCE); _out.key("roles"); _out.startArray(); _out.startObject(); _writeKeyValue("type", _TMDM_TYPE); _writeKeyValue("player", _topicRef(type)); _out.endObject(); _out.startObject(); _writeKeyValue("type", _TMDM_INSTANCE); _writeKeyValue("player", _topicRef(instance)); _out.endObject(); _out.endArray(); _out.endObject(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setInstanceType(String instanceType) {\n this.instanceType = instanceType;\n }", "public void associate(Object obj, Class type);", "TypeAssociation getAssocieCommeSujetInstanceObjet();", "public static void publishInstance(bjDealerDataWriter typedWriter, bjDealer pubInstance)\n\t{\n\t\tpubInstance.seqno = DealerMain.seqno;\n\t\ttypedWriter.register_instance(pubInstance); // pass assignments into publisher\n\t\tTimer.wait(100);\n\t\tint status = typedWriter.write(pubInstance, HANDLE_NIL.value); // send the message instance\n\t\tErrorHandler.checkStatus(status, \"bjDealerDataWriter.write\"); // make sure it got sent?\n\t\t//System.out.println(\" status value: \" + status);\n\t\tDealerMain.seqno++;\n\t}", "private void _writeTopic(final Topic topic) throws IOException {\n // Ignore the topic if it is the default name type and it has no further\n // characteristics\n if (topic.equals(_defaultNameType)) {\n return;\n }\n _out.startObject();\n _writeItemIdentifiers(topic);\n _writeLocators(\"subject_identifiers\", topic.getSubjectIdentifiers());\n _writeLocators(\"subject_locators\", topic.getSubjectLocators());\n Set<Name> names = topic.getNames();\n if (!names.isEmpty()) {\n _out.key(\"names\");\n _out.startArray();\n for (Name name: names) {\n _writeName(name);\n }\n _out.endArray();\n }\n Set<Occurrence> occs = topic.getOccurrences();\n if (!occs.isEmpty()) {\n _out.key(\"occurrences\");\n _out.startArray();\n for (Occurrence occ: occs) {\n _writeOccurrence(occ);\n }\n _out.endArray();\n }\n _out.endObject();\n }", "public final void rule__TIAssignment__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2825:1: ( ( ( rule__TIAssignment__Instance_typeAssignment_2 ) ) )\n // InternalBSQL2Java.g:2826:1: ( ( rule__TIAssignment__Instance_typeAssignment_2 ) )\n {\n // InternalBSQL2Java.g:2826:1: ( ( rule__TIAssignment__Instance_typeAssignment_2 ) )\n // InternalBSQL2Java.g:2827:2: ( rule__TIAssignment__Instance_typeAssignment_2 )\n {\n before(grammarAccess.getTIAssignmentAccess().getInstance_typeAssignment_2()); \n // InternalBSQL2Java.g:2828:2: ( rule__TIAssignment__Instance_typeAssignment_2 )\n // InternalBSQL2Java.g:2828:3: rule__TIAssignment__Instance_typeAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__TIAssignment__Instance_typeAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getTIAssignmentAccess().getInstance_typeAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setInstanceType(String InstanceType) {\n this.InstanceType = InstanceType;\n }", "public void setInstanceTypes(java.util.Collection<String> instanceTypes) {\n if (instanceTypes == null) {\n this.instanceTypes = null;\n return;\n }\n\n this.instanceTypes = new com.amazonaws.internal.SdkInternalList<String>(instanceTypes);\n }", "void addInstance(Instance instance);", "private void _writeType(final Typed typed) throws IOException {\n _writeKeyValue(\"type\", _topicRef(typed.getType()));\n }", "@Override\n\tpublic void saveTopicType(TopicType topicType) throws Exception {\n\n\t}", "public final void rule__TableInstance__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2744:1: ( ( ( rule__TableInstance__Ti_typeAssignment_2 ) ) )\n // InternalBSQL2Java.g:2745:1: ( ( rule__TableInstance__Ti_typeAssignment_2 ) )\n {\n // InternalBSQL2Java.g:2745:1: ( ( rule__TableInstance__Ti_typeAssignment_2 ) )\n // InternalBSQL2Java.g:2746:2: ( rule__TableInstance__Ti_typeAssignment_2 )\n {\n before(grammarAccess.getTableInstanceAccess().getTi_typeAssignment_2()); \n // InternalBSQL2Java.g:2747:2: ( rule__TableInstance__Ti_typeAssignment_2 )\n // InternalBSQL2Java.g:2747:3: rule__TableInstance__Ti_typeAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__TableInstance__Ti_typeAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getTableInstanceAccess().getTi_typeAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void writeClass( TypeItem type, XMLWriter out ) {\n\t\t\n\t\tout.start(\n\t\t\t(type instanceof ClassItem)?\"class\":\"interface\",\n\t\t\tnew String[]{\"name\",type.name});\n\t\t\n\t\tif( type.getSuperType()!=null )\n\t\t\tout.element(\"extends\",\n\t\t\t\tnew String[]{\"name\",type.getSuperType().getTypeName()});\n\t\t\n\t\twriteType( type, out );\n\n\t\t\n\t\t// output miscellaneous information which may be useful.\n\t\tout.start(\"info\");\n\t\tout.start(\"derivedTypes\");\n\t\twriteDerivedTypes(\"class\",type,grammar.iterateClasses(),out);\n\t\twriteDerivedTypes(\"interface\",type,grammar.iterateInterfaces(),out);\n\t\tout.end(\"derivedTypes\");\n\t\tout.end(\"info\");\n\t\t\n\t\t\n\t\tout.end(\"class\");\n\t}", "public void addInstances (InstanceList training)\n\t{\n\t\tSystem.out.println(\"LabeledLDA Model : Adding training instances ..%\");\n\t\t//Data Alphabet\n\t\talphabet = training.getDataAlphabet();\n\t\tnumTypes = alphabet.size();\n\t\tbetaSum = beta * numTypes;\n\t\t\n\t\t// We have one topic for every possible label.\n\t\tlabelAlphabet = training.getTargetAlphabet();\n\t\tnumTopics = labelAlphabet.size();\n\t\toneDocTopicCounts = new int[numTopics];\n\t\ttokensPerTopic = new int[numTopics];\n\t\ttypeTopicCounts = new int[numTypes][numTopics];\n\n\t\t//topicAlphabet = AlphabetFactory.labelAlphabetOfSize(numTopics); //generate d0,d1 [3shan target string w hwa 3wzo label]\n topicAlphabet = new LabelAlphabet();\n\t\tfor (int i = 0; i < numTopics; i++) {\n\t\t\tString target = labelAlphabet.lookupObject(i).toString();\n topicAlphabet.lookupLabel(target);\n\t\t}\n //System.out.println(topicAlphabet);\n\n for (Instance instance : training)\n\t\t{\n\t\t\tFeatureSequence tokens = (FeatureSequence) instance.getData(); //read data featureSequence\n\t\t\tLabelSequence topicSequence = new LabelSequence(topicAlphabet, new int[ tokens.size() ]);\n FeatureVector labels = (FeatureVector) instance.getTarget(); //read target featurevector\n\n\t\t\tint[] topics = topicSequence.getFeatures();\n\t\t\tfor (int position = 0; position < tokens.size(); position++)\n\t\t\t{\n\t\t\t\tint topic = labels.indexAtLocation(random.nextInt(labels.numLocations()));\n\t\t\t\ttopics[position] = topic;\n\t\t\t\ttokensPerTopic[topic]++;\n\t\t\t\tint type = tokens.getIndexAtPosition(position);\n\t\t\t\ttypeTopicCounts[type][topic]++;\n\t\t\t}\n\t\t\tTopicAssignment t = new TopicAssignment(instance, topicSequence);\n\t\t\tdata.add(t);\n\t\t}\n\t\t/*\n for (Instance instance : training)\n {\n FeatureSequence tokens = (FeatureSequence) instance.getData();\n LabelSequence topicSequence = new LabelSequence(topicAlphabet, new int[ tokens.size() ]);\n\n int[] topics = topicSequence.getFeatures();\n for (int position = 0; position < topics.length; position++) {\n int topic = random.nextInt(numTopics);\n topics[position] = topic;\n }\n TopicAssignment t = new TopicAssignment(instance, topicSequence);\n data.add(t);\n }\n\n buildInitialTypeTopicCounts();\n initializeHistograms();\n\t\t */\n\t\tSystem.out.println(\"Data loaded.\");\n\t}", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "void writeConcreteType(Class<?> type);", "private void addTypeableInstances() {\r\n \r\n if (currentModuleTypeInfo.isExtension()) {\r\n //don't add instances again for an adjunct module.\r\n return;\r\n }\r\n \r\n final ModuleName currentModuleName = currentModuleTypeInfo.getModuleName();\r\n //this uses the fact that Prelude.Typeable is a public class, and all modules must import the Prelude.\r\n final TypeClass typeableTypeClass = currentModuleTypeInfo.getVisibleTypeClass(CAL_Prelude.TypeClasses.Typeable);\r\n \r\n SortedSet<TypeClass> constraintSet = TypeClass.makeNewClassConstraintSet();\r\n constraintSet.add(typeableTypeClass);\r\n constraintSet = Collections.unmodifiableSortedSet(constraintSet);\r\n \r\n for (int i = 0, nTypeConstructors = currentModuleTypeInfo.getNTypeConstructors(); i < nTypeConstructors; ++i) {\r\n \r\n final TypeConstructor typeCons = currentModuleTypeInfo.getNthTypeConstructor(i);\r\n \r\n //we only add a Typeable instance for type constructors all of whose type arguments have arity *.\r\n if (typeCons.getKindExpr().isSimpleKindChain()) {\r\n \r\n final int arity = typeCons.getTypeArity(); \r\n final TypeExpr[] args = new TypeExpr[arity];\r\n \r\n for (int j = 0; j < arity; ++j) {\r\n \r\n args[j] = TypeVar.makeTypeVar(null, constraintSet, false);\r\n }\r\n \r\n final TypeConsApp typeConsApp = new TypeConsApp(typeCons, args);\r\n \r\n final ClassInstance classInstance = new ClassInstance(currentModuleName, typeConsApp, typeableTypeClass, null, ClassInstance.InstanceStyle.INTERNAL);\r\n \r\n currentModuleTypeInfo.addClassInstance(classInstance);\r\n }\r\n } \r\n }", "private ClassInstance addCurrentClassInstance(ParseTreeNode instanceNameNode, TypeExpr instanceType, TypeClass typeClass) {\r\n\r\n ClassInstance classInstance = new ClassInstance (currentModuleTypeInfo.getModuleName(), instanceType, typeClass, null, InstanceStyle.EXPLICIT); \r\n \r\n //There cannot be duplicate C-T instances in any class imported either directly or indirectly into the module\r\n //where this C-T instance is defined. an instance is identified by the pair (C, T). There cannot be 2 instances for the\r\n //same pair (C, T) in scope in the program. For example, instance Eq a => Ord (Tree a) and instance Ord a => Ord (Tree a)\r\n //are not both allowed. \r\n // \r\n //To elaborate, an instance, such as Ord Date defined in a module cannot be defined within any module imported, either\r\n //directly or indirectly into the module. For example, if module C imports module B and module B imports module A,\r\n //and within module A, the instance Ord Date is defined, then Ord Date, cannot be defined in module C, even though\r\n //module C doesn't import module A directly. One way to think of this is that instances have universal scope. \r\n \r\n ClassInstance otherInstance = currentModuleTypeInfo.getVisibleClassInstance(classInstance.getIdentifier());\r\n if (otherInstance != null) { \r\n \r\n //an instance, such as Ord Date, can be defined only once within a module.\r\n //instances such as \"(Eq a) => Ord Maybe a\", \"Ord Maybe a\" and \"Ord a => Ord Maybe a\"\r\n //all have the same instance identifiers Ord Maybe, and are not allowed. These\r\n //are called overlapping instances. We distinguish the error messages for clarity. \r\n \r\n String declName = classInstance.getNameWithContext();\r\n String otherDeclName = otherInstance.getNameWithContext();\r\n MessageKind message; \r\n if (instanceType instanceof RecordType) {\r\n //universal record instance\r\n \r\n // The instance {classInstance.getNameWithContext()} overlaps with the record instance {otherInstance.getNameWithContext()} defined in module {otherInstance.getModuleName()}.\r\n message = new MessageKind.Error.RecordInstancesOverlap(classInstance.getNameWithContext(), otherInstance.getNameWithContext(), otherInstance.getModuleName());\r\n \r\n } else {\r\n //type constructor instances\r\n \r\n if (declName.equals(otherDeclName)) { \r\n message = new MessageKind.Error.InstanceAlreadyDefined(declName, otherInstance.getModuleName());\r\n } else {\r\n message = new MessageKind.Error.InstanceOverlapsWithInstanceInModule(declName, otherDeclName, otherInstance.getModuleName());\r\n }\r\n }\r\n \r\n compiler.logMessage(new CompilerMessage(instanceNameNode, message)); \r\n }\r\n \r\n currentModuleTypeInfo.addClassInstance(classInstance); \r\n \r\n return classInstance; \r\n }", "public HasID put(@SuppressWarnings(\"rawtypes\") Class type, HasID value);", "public final void entryRuleInstance() throws RecognitionException {\n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:63:1: ( ruleInstance EOF )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:64:1: ruleInstance EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getInstanceRule()); \n }\n pushFollow(FOLLOW_ruleInstance_in_entryRuleInstance67);\n ruleInstance();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getInstanceRule()); \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleInstance74); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public void add(Map<Variable, Object> instance) {\n\t\tthis.listInstance.add(instance);\n\t}", "public static void setInstance(SymTypeExpressionDeSer theInstance) {\n if (null == theInstance) { //in this case, \"reset\" to default type\n instance = new SymTypeExpressionDeSer();\n }\n else {\n instance = theInstance;\n }\n }", "public static boolean instanceType(FileInputStream f){\n if(observer != null){\n observer.parser.setCurrentRule(\"instanceType\", true);\n }\n CToken t = new CToken();\n\n t = getUsePeek(f);\n \n if(!t.token.equals(\"instance\")){\n return false;\n }\n CScanner.needToUsePeekedToken = false; \n //token == instance\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n //identifier\n if(!t.type.equals(\"Identifier\")){\n System.err.format(\"Syntax Error: In rule InstanceType unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n } //if not an identifer\n //else, we all good\n if(observer != null){\n observer.parser.setCurrentRule(\"instanceType\", false);\n }\n return true;\n }", "public static void writeMessageType(OutputStream os, short type) throws IOException {\n os.write((byte)(type & 0xFF));\n os.write((byte)((type >> 8) & 0xFF));\n }", "public PathElementIF createTopic(String type, String id);", "public void toInstance(T instance);", "public static void addContentType( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, CONTENTTYPE, value);\r\n\t}", "public void insertInstanceInNode(int index_node, Instance instance) {\r\n \r\n noduri.get(index_node).instances.add(0, instance);\r\n noduri.get(index_node).dimensiune++;\r\n }", "public String getInstanceType() {\n return this.instanceType;\n }", "private void write( TypeItem type ) throws SAXException, IOException {\n\t\t\t\t\n\t\tDocumentHandler outHandler = new XMLSerializer(\n\t\t\tcontroller.getOutput(type),\n\t\t\tnew OutputFormat(\"xml\",null,true) );\n\t\tXMLWriter out = new XMLWriter(outHandler);\n\t\t\t\t\n\t\toutHandler.setDocumentLocator( new LocatorImpl() );\n\t\toutHandler.startDocument();\n\t\toutHandler.processingInstruction(\"xml-stylesheet\",\n\t\t\t\"type='text/xsl' href='classFileDebug.xsl'\");\n\t\twriteClass( type, out );\n\t\toutHandler.endDocument();\n\t}", "public final void rule__TIAssignment__Instance_typeAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:3513:1: ( ( RULE_ID ) )\n // InternalBSQL2Java.g:3514:2: ( RULE_ID )\n {\n // InternalBSQL2Java.g:3514:2: ( RULE_ID )\n // InternalBSQL2Java.g:3515:3: RULE_ID\n {\n before(grammarAccess.getTIAssignmentAccess().getInstance_typeIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getTIAssignmentAccess().getInstance_typeIDTerminalRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Association associate(Node targetNode, QName associationTypeQName);", "public void instanceAdded(Contextual<?> bean, CreationalContext<?> context, Object instance);", "public void setAssociationType(String associationType) {\n this.associationType = associationType;\n }", "@Override\n public void setOutputType(TypeInformation<T> outTypeInfo, ExecutionConfig executionConfig) {\n Preconditions.checkState(\n elements != null,\n \"The output type should've been specified before shipping the graph to the cluster\");\n checkIterable(elements, outTypeInfo.getTypeClass());\n TypeSerializer<T> newSerializer = outTypeInfo.createSerializer(executionConfig);\n if (Objects.equals(serializer, newSerializer)) {\n return;\n }\n serializer = newSerializer;\n try {\n serializeElements();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }", "public <T> void serialize(T obj, Class<T> type, OutputStream os) throws SerializationException;", "private void _writeAssociation(final Association assoc) throws IOException {\n Set<Role> roles = assoc.getRoles();\n if (roles.isEmpty()) {\n return;\n }\n _out.startObject();\n _writeReifier(assoc);\n _writeItemIdentifiers(assoc);\n _writeType(assoc);\n _writeScope(assoc);\n _out.key(\"roles\");\n _out.startArray();\n for (Role role: roles) {\n _writeRole(role);\n }\n _out.endArray();\n _out.endObject();\n }", "public Builder setType(com.google.cloud.datafusion.v1beta1.Instance.Type value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n type_ = value.getNumber();\n onChanged();\n return this;\n }", "private static String constructClassInstanceTriples(Class subjectClass, Property uniqueIdentifierProperty,\n\t\t\tArrayList<InsertionPropertyValue> instancePropertyValueList) {\n\n\t\t/*\n\t\t * triplesBuilder is used to build instance triples\n\t\t */\n\t\tStringBuilder triplesBuilder = new StringBuilder();\n\n\t\t/*\n\t\t * tempBuilder is a tempBuilder to hold triples.\n\t\t * \n\t\t * I used this String builder because the subjectUniqueIdentifier is the\n\t\t * value of uniqueIdentifierPrefixedPropertyName and to construct right\n\t\t * triples it must begin with the subjectUniqueIdentifier so tempBuilder\n\t\t * will hold all the triples then at the end I will append it to\n\t\t * triplesBuilder that will have the subjectUniqueIdentifier\n\t\t */\n\t\tStringBuilder tempBuilder = new StringBuilder();\n\n\t\tString subjectUniqueIdentifier = \"\";\n\n\t\t/*\n\t\t * check if the last propertyValue is the uniqueIdentifierPropertyValue\n\t\t */\n\t\tint size = instancePropertyValueList.size();\n\n\t\t/*\n\t\t * iterate over instancePropertyValueList to construct triples\n\t\t */\n\t\tint count = 0;\n\t\tString uniqueIdentifierPrefixedPropertyName = uniqueIdentifierProperty.getPrefix().getPrefix()\n\t\t\t\t+ uniqueIdentifierProperty.getName();\n\n\t\tfor (InsertionPropertyValue propertyValue : instancePropertyValueList) {\n\n\t\t\t/*\n\t\t\t * finding subjectUniqueIdentifier\n\t\t\t */\n\t\t\tif (propertyValue.getPropertyName().equals(uniqueIdentifierPrefixedPropertyName)) {\n\t\t\t\tsubjectUniqueIdentifier = propertyValue.getValue().toString().toLowerCase().replace(\" \", \"\");\n\t\t\t\tpropertyValue.setValue(getValue(uniqueIdentifierProperty, propertyValue.getValue()));\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * checking if the propertyValue is the last one to end the\n\t\t\t * statement with .\n\t\t\t */\n\t\t\tif (count == size - 1) {\n\t\t\t\ttempBuilder.append(\n\t\t\t\t\t\tpropertyValue.getPropertyName() + \" \" + propertyValue.getValue().toString() + \" . \\n\");\n\t\t\t} else {\n\t\t\t\ttempBuilder.append(\n\t\t\t\t\t\tpropertyValue.getPropertyName() + \" \" + propertyValue.getValue().toString() + \" ; \\n\");\n\t\t\t}\n\n\t\t\tcount++;\n\t\t}\n\n\t\t/*\n\t\t * add subjectUniqueIdentifier and add triple that tells that\n\t\t * subjectUniqueIdentifier is of type subjectClass\n\t\t */\n\t\ttriplesBuilder.append(Prefix.IOT_PLATFORM.getPrefix() + subjectUniqueIdentifier + \" a \"\n\t\t\t\t+ subjectClass.getPrefix().getPrefix() + subjectClass.getName() + \" ; \\n\");\n\n\t\t/*\n\t\t * get all superClasses of subjectClass to identify that the new\n\t\t * instance is also an instance of all superClasses of subjectClass\n\t\t */\n\n\t\tfor (Class superClass : subjectClass.getSuperClassesList()) {\n\t\t\ttriplesBuilder.append(\" a \" + superClass.getPrefix().getPrefix() + superClass.getName() + \" ; \\n\");\n\n\t\t}\n\n\t\t/*\n\t\t * add rest of triples by appending tempBuilder\n\t\t */\n\n\t\ttriplesBuilder.append(tempBuilder.toString());\n\n\t\treturn triplesBuilder.toString();\n\n\t}", "public void addAssociation(String mPackage, Class type, RefObject a, RefObject b) throws CreationException {\n\t\t\n\t\ttrace.addTrace(TraceType.CREATION, \"Create Association of type \" + type.getSimpleName() + \" in target model.\");\n\t\t\n\t\tRefPackage pkg = loadBasePackage(mPackage);\n\t\tCollection<RefAssociation> assos = pkg.refAllAssociations();\n\t\tfor(RefAssociation ass:assos) {\n\t\t\t/* \n\t\t\t * The return type of java.lang.Class.getInterfaces()\n\t\t\t * has changed in Java 1.6.\n\t\t\t * To compile this file using Java 1.6 or later, change the\n\t\t\t * generic of the List 'interfaces' from List<Class> to\n\t\t\t * List<Class<?>>. \n\t\t\t */\n\t\t\tList<Class> interfaces = Arrays.asList(ass.getClass().getInterfaces());\n\t\t\tif(interfaces.contains(type)) {\n\t\t\t\tMethod add = null;\n\t\t\t\tMethod[] methods = ass.getClass().getMethods();\n\t\t\t\tfor(Method m : methods) {\n\t\t\t\t\tif (m.getName().equals(\"add\")) {\n\t\t\t\t\t\tadd = m;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (add == null) {\n\t\t\t\t\tthrow new CreationException(ADD_METHOD_NOT_FOUND + type.getSimpleName());\n\t\t\t\t}\n\t\t\t\n\t\t\t\tObject[] parameters = {a,b};\n\t\t\t\ttry {\n\t\t\t\t\tadd.invoke(ass, parameters);\n\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\t\t\n\t\t}", "public Association associate(Node otherNode, QName associationTypeQName, Directionality directionality, ObjectNode object);", "public void save(Object instance);", "protected void convertInstance(Instance instance) throws Exception {\n\t\tdouble[] newVals = new double[getOutputFormat().numAttributes()];\n\t\tfor (int i = 0; i < m_SelectedAttributes.length; i++) {\n\t\t\tint current = m_SelectedAttributes[i];\n\t\t\tnewVals[i] = instance.value(current);\n\t\t}\n\n\t\tif (instance instanceof SparseInstance) {\n\t\t\tpush(new SparseInstance(instance.weight(), newVals));\n\t\t} else {\n\t\t\tpush(new Instance(instance.weight(), newVals));\n\t\t\t// njjDataB1.add(new Instance(instance.weight(), newVals));\n\t\t}\n\t}", "public Association associate(Node otherNode, QName associationTypeQName, Directionality directionality);", "void writeObj(MyAllTypesSecond aRecord, StrategyI xmlStrat);", "public TopicImpl(UUID identifier, Serializable version, String name, Taxonomy type) {\n\n super(identifier, version);\n this.name = name;\n this.type = type;\n }", "private void writeObject(ObjectOutputStream out) throws IOException {\n out.writeObject(avroObject.getSchema().toString());\n DatumWriter<T> writer = new GenericDatumWriter<>();\n writer.setSchema(avroObject.getSchema());\n Encoder encoder = EncoderFactory.get().binaryEncoder(out, null);\n writer.write(avroObject, encoder);\n encoder.flush();\n }", "public final void addInstance(CharacterInstance instance) {\n instances.add(instance);\n }", "@Test\r\n public void addEventTicketInstance() {\r\n System.out.println(\"addEventTicketInstance begin\");\r\n\r\n // Read an event ticket instance from a JSON file.\r\n HwWalletObject instance =\r\n JSONObject.parseObject(CommonUtil.readJSONFile(\"EventTicketInstance.json\"), HwWalletObject.class);\r\n\r\n // Validate parameters.\r\n boolean isValidInstance = HwWalletObjectUtil.validateInstance(instance);\r\n if (!isValidInstance) {\r\n System.out.println(\"Invalid instance parameters.\");\r\n return;\r\n }\r\n\r\n // Post the new event ticket instance to HMS wallet server.\r\n String urlSegment = \"eventticket/instance\";\r\n HwWalletObject responseInstance =\r\n walletBuildService.postHwWalletObjectToWalletServer(urlSegment, CommonUtil.toJson(instance));\r\n System.out.println(\"Posted event ticket instance: \" + CommonUtil.toJson(responseInstance));\r\n }", "public void storeAssociation(Association association) {\n\n Connection connection = IdentityDatabaseUtil.getDBConnection();\n PreparedStatement prepStmt = null;\n\n try {\n\n// if (!isAssociationExist(connection, association.getHandle())) {\n prepStmt = connection.prepareStatement(OpenIDSQLQueries.STORE_ASSOCIATION);\n prepStmt.setString(1, association.getHandle());\n prepStmt.setString(2, association.getType());\n prepStmt.setTimestamp(3, new java.sql.Timestamp(association.getExpiry().getTime()));\n prepStmt.setString(4, Base64.encode(association.getMacKey().getEncoded()));\n prepStmt.setString(5, associationStore);\n prepStmt.execute();\n connection.commit();\n if(log.isDebugEnabled()) {\n log.debug(\"Association \" + association.getHandle() + \" successfully stored in the database\");\n }\n// } else {\n// log.debug(\"Association \" + association.getHandle() + \" already exist in the database.\");\n// }\n connection.commit();\n } catch (SQLException e) {\n log.error(\"Failed to store the association \" + association.getHandle(), e);\n } finally {\n IdentityDatabaseUtil.closeStatement(prepStmt);\n IdentityDatabaseUtil.closeConnection(connection);\n }\n }", "public PlugwiseMQTTDeviceInfo(String macAddress, String type)\n\t{\n\t\tthis.macAddress = macAddress;\n\t\tthis.type = type;\n\t}", "public static void addContentType(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.add(model, instanceResource, CONTENTTYPE, value);\r\n\t}", "public void applyInstance(TSPLibInstance instance) {\n clearTargets();\n clearPredictions();\n final NodeCoordinates nodeData;\n switch (instance.getDisplayDataType()) {\n case TWOD_DISPLAY:\n nodeData = instance.getDisplayData();\n break;\n case COORD_DISPLAY:\n nodeData = (NodeCoordinates) instance.getDistanceTable();\n //only try to display 2d nodes for now; maybe use jgrapht for more?\n if(nodeData.get(nodeData.listNodes()[0]).getPosition().length == 2) {\n break;\n }\n default:\n return;\n }\n\n setVertices(Arrays.stream(nodeData.listNodes()).mapToObj(i -> nodeData.get(i).getPosition()).collect(Collectors.toList()));\n\n// //clip the logical bounds to remove excess min x/y\n// Bounds logicalBounds = getLogicalBounds();\n// for (Vertex each: vertexLayer) {\n// each.setLocation(each.getLocation().subtract(logicalBounds.getMinX(), logicalBounds.getMinY()));\n// }\n vertexLayer.requestRedraw();\n\n //add targets\n addTargetEdges(\n instance.getTours()\n .stream()\n .flatMap(\n eachTour -> eachTour.toEdges()\n .stream()\n .map(eachEdge -> new int[]{eachEdge.getId1(), eachEdge.getId2()})\n )\n .collect(Collectors.toList())\n );\n\n getDragContext().setTransformAutomatically(true);\n }", "public final void mT__63() throws RecognitionException {\n try {\n int _type = T__63;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:63:7: ( 'instanceStates' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:63:9: 'instanceStates'\n {\n match(\"instanceStates\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public Association associate(Node targetNode, QName associationTypeQName, ObjectNode object);", "void setForPersistentMapping_Type(Type type) {\n this.type = type;\n }", "public static void setContentType( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, CONTENTTYPE, value);\r\n\t}", "private void addTopic(TopicMapIF tm, TMObjectMatcherIF matcher,\n Collection topics) {\n if (matcher instanceof TypeSpecification) {\n TypeSpecification m = (TypeSpecification) matcher;\n TopicIF type = getTopic(tm, m.getClassMatcher());\n if (type != null) {\n ClassInstanceIndexIF typeIndex = (ClassInstanceIndexIF)\n tm.getIndex(\"net.ontopia.topicmaps.core.index.ClassInstanceIndexIF\");\n topics.addAll(typeIndex.getTopics(type));\n }\n \n } else {\n TopicIF topic = getTopic(tm, matcher);\n if (topic != null)\n topics.add(topic);\n }\n }", "public void saveMappingType(MappingType mapping, String path) throws IOException {\t\n\t\tResource res = resourceSet.createResource(URI.createFileURI(path));\n\t\tDocumentRootImpl rootObject = getRootObject(mapping);\n\t\tres.getContents().add(rootObject);\n\t\tres.save(null);\n\t}", "@Override\r\n\tpublic double classifyInstance(Instance instance) throws Exception {\n\t\tdouble[] hist = bop.bagToArray(bop.buildBag(instance));\r\n\r\n\t\t// stuff into Instance\r\n\t\tInstances newInsts = new Instances(matrix, 1); // copy attribute data\r\n\t\tnewInsts.add(new SparseInstance(1.0, hist));\r\n\r\n\t\treturn knn.classifyInstance(newInsts.firstInstance());\r\n\t}", "@Override\n public abstract void serializeWithType(JsonGenerator jgen, SerializerProvider ctxt,\n TypeSerializer typeSer)\n throws JacksonException;", "public void writeId(final Object instance, final ObjectStreamWriter writer)\n {\n Objects.requireNonNull(instance);\n Objects.requireNonNull(writer);\n final String id = registry.get(instance);\n Objects.requireNonNull(id);\n writer.writeObject(id);\n }", "@Test(description = \"export interface with two types\")\n public void exportWithTwoTypes()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final TypeData type1 = data.getType(\"TestType1\");\n final TypeData type2 = data.getType(\"TestType2\");\n final InterfaceData inter = data.getInterface(\"TestInterface\")\n .addType(type1)\n .addType(type2);\n data.create();\n\n inter.checkExport(inter.export());\n }", "public void setInstancesPerType(int instancesPerType)\n {\n this.instancesPerType = instancesPerType;\n }", "public static String perTypeWithinFieldForTarget(UnresolvedType aspectType) {\n \t\treturn makeName(aspectType.getNameAsIdentifier(), \"ptwAspectInstance\");\n \t}", "public static void addToMap(AxiomType<? extends OWLAxiom> axiomType, Class<? extends OWLAxiomHGDB> axiomClassHGDB) {\r\n\t\tif (m.containsKey(axiomType)) throw new IllegalArgumentException(\"axiomType already mapped \" + axiomType); \r\n\t\tif (mReverse.containsKey(axiomClassHGDB)) throw new IllegalArgumentException(\"axiomClassHGDB already mapped \" + axiomClassHGDB);\r\n\t\tif (axiomType == null || axiomClassHGDB == null) throw new IllegalArgumentException(\"null not allowed\");\r\n\t\tif (Modifier.isAbstract(axiomClassHGDB.getModifiers())) throw new IllegalArgumentException(\"axiomClassHGDB must not be abstract\" + axiomClassHGDB);\r\n\t\tif (! HGLink.class.isAssignableFrom(axiomClassHGDB)) throw new IllegalArgumentException(\"axiomClassHGDB must implement HGLink\" + axiomClassHGDB);\r\n\t\tm.put(axiomType, axiomClassHGDB);\r\n\t\tmReverse.put(axiomClassHGDB, axiomType);\r\n\t}", "public void addInstance(double[] instance) {\n\t\tinstances.add(instance.clone());\n\t}", "private void _writeOccurrence(final Occurrence occ) throws IOException {\n _out.startObject();\n _writeReifier(occ);\n _writeItemIdentifiers(occ);\n _writeType(occ);\n _writeScope(occ);\n _writeDatatypeAware(occ);\n _out.endObject();\n }", "public final void entryRuleTypeAssertion() throws RecognitionException {\r\n try {\r\n // InternalGo.g:2630:1: ( ruleTypeAssertion EOF )\r\n // InternalGo.g:2631:1: ruleTypeAssertion EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeAssertionRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleTypeAssertion();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeAssertionRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public double classifyInstance(Instance instance) throws Exception {\n\n /* check the instance */\n if (m_Train.equalHeaders(instance.dataset()) == false){\n throw new Exception(\"NNge.classifyInstance : Incompatible instance types !\");\n }\n\t\n Exemplar matched = nearestExemplar(instance); \n if(matched == null){\n throw new Exception(\"NNge.classifyInstance : NNge hasn't been trained !\");\n }\n return matched.classValue();\n }", "private void createOutputLayer(Instances instances) throws Exception {\r\n\t\toutputs.clear();\r\n\t\tfor (int classIndex = 0; classIndex < numClasses; classIndex++) {\r\n\t\t\tString name;\r\n\t\t\tif (configuration.isNumeric()) {\r\n\t\t\t\tname = instances.classAttribute().name();\r\n\t\t\t} else {\r\n\t\t\t\tname = instances.classAttribute().value(classIndex);\r\n\t\t\t}\r\n\t\t\tOutputNode output = new OutputNode(name, classIndex, configuration);\r\n\t\t\t\r\n\t\t\tInnerNode temp = new InnerNode(String.valueOf(nextId), random);\r\n\t\t\tnextId++;\r\n\t\t\taddNode(temp);\r\n\t\t\tNeuralNode.connect(temp, output);\r\n\t\t\t\r\n\t\t\toutputs.add(output);\r\n\t\t}\r\n\r\n\t}", "public void setType(Class type) {\n\t this.type = type;\n\t }", "void addAssociation(AssociationEnd association);", "public GetSpotPlacementScoresRequest withInstanceTypes(java.util.Collection<String> instanceTypes) {\n setInstanceTypes(instanceTypes);\n return this;\n }", "public String getInstanceType() {\n return this.InstanceType;\n }", "public DsoaComponentInstanceDescription(ComponentTypeDescription type, DsoaComponentInstanceManager instance) {\n super(type, instance);\n }", "public void setUAInstance(UA instance)\n\t{\n\t\tif(ua == null)\n\t\t{\n\t\t\tua = instance;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Error(\"Can't set an object's UA instance more than once\");\n\t\t}\n\t}", "public final void entryRuleTableInstance() throws RecognitionException {\n try {\n // InternalBSQL2Java.g:329:1: ( ruleTableInstance EOF )\n // InternalBSQL2Java.g:330:1: ruleTableInstance EOF\n {\n before(grammarAccess.getTableInstanceRule()); \n pushFollow(FOLLOW_1);\n ruleTableInstance();\n\n state._fsp--;\n\n after(grammarAccess.getTableInstanceRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public PostBibTeXParser(final Class<? extends BibTex> pubInstanceToCreate) {\n\t\tthis();\n\t\tthis.pubInstanceToCreate = pubInstanceToCreate;\n\t}", "@SuppressWarnings(\"all\")\n protected static boolean writeObjectType(Output out, Object obj) {\n if (obj instanceof ObjectMap || obj instanceof BeanMap) {\n out.writeObject((Map) obj);\n } else if (obj instanceof Map) {\n out.writeMap((Map) obj);\n } else if (obj instanceof RecordSet) {\n out.writeRecordSet((RecordSet) obj);\n } else {\n out.writeObject(obj);\n }\n return true;\n }", "public void successfulCreation(String type) {\n switch (type) {\n case \"Attendee\":\n System.out.println(\"Attendee Created\");\n break;\n case \"Organizer\":\n System.out.println(\"Organizer Created\");\n break;\n case \"Speaker\":\n System.out.println(\"Speaker Created\");\n break;\n case \"VIP\":\n System.out.println(\"VIP Created\");\n break;\n }\n }", "void instanceCreated(String pid, IDefinition definition);", "private static void writeType(XMLStreamWriter w, RepositoryConnection con, IRI uri, IRI type) \n\t\tthrows XMLStreamException {\n\t\tif (con.hasStatement(uri, RDF.TYPE, type, true)) {\n\t\t\tw.writeEmptyElement(\"rdf:type\");\n\t\t\tw.writeAttribute(\"rdf:resource\", type.stringValue());\n\t\t}\n\t}", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type addNewType();", "public void setType(Serializable type) {\n\t\tthis.type = type;\n\t}", "public void moveToArchive(FlowNode archiveFlowNode, String instanceId) {\n\t\tinstanceOf.clear();\n\t\taddAsInstanceOf(archiveFlowNode, instanceId);\n\t}", "public final void rule__TableInstance__Ti_typeAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:3483:1: ( ( ruleTIAssignment ) )\n // InternalBSQL2Java.g:3484:2: ( ruleTIAssignment )\n {\n // InternalBSQL2Java.g:3484:2: ( ruleTIAssignment )\n // InternalBSQL2Java.g:3485:3: ruleTIAssignment\n {\n before(grammarAccess.getTableInstanceAccess().getTi_typeTIAssignmentParserRuleCall_2_0()); \n pushFollow(FOLLOW_2);\n ruleTIAssignment();\n\n state._fsp--;\n\n after(grammarAccess.getTableInstanceAccess().getTi_typeTIAssignmentParserRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static void write(org.omg.CORBA.portable.OutputStream ostream, gestionVoeu.EtudiantFactory value)\n {\n ostream.write_Object((org.omg.CORBA.portable.ObjectImpl)value);\n }", "@POST\n @Path(\"/actions\")\n public void setActionType(ActionType actionType) {\n definitionsService.setActionType(actionType);\n }", "public void save_arff(Instances instances) throws IOException {\n\t\tArffSaver saver = new ArffSaver();\n\t\tsaver.setInstances(instances);\n\t\tsaver.setFile(new File(arff_path + \"\\\\\" + taskdata_name + \".arff\"));\n\t\tsaver.writeBatch();\n\n\t\tif (enableDebug)\n\t\t\tSystem.out.println(\"[DEBUG] ARFF saved on \" + arff_path + \"\\\\\" + taskdata_name + \".arff\");\n\t}", "protected void writeType ()\n {\n stream.println (\" public org.omg.CORBA.TypeCode _type ()\");\n stream.println (\" {\");\n stream.println (\" return \" + helperClass + \".type ();\");\n stream.println (\" }\");\n stream.println ();\n }", "public void setSchemaInstance(String schemaInstance) {\n\t\t\r\n\t}", "private ClassInstance checkDerivedOutputableInstance(TypeConstructor typeCons,\r\n TypeConsApp instanceType,\r\n TypeClass typeClass, SourceRange position) throws UnableToResolveForeignEntityException {\r\n \r\n if (!typeClass.getName().equals(CAL_Prelude.TypeClasses.Outputable)) {\r\n throw new IllegalStateException();\r\n }\r\n \r\n if (TypeConstructor.getBuiltInType(typeCons.getName()) != null) {\r\n throw new IllegalStateException(\"The built-in type \" + typeCons.getName() + \" cannot derive the Outputable type class.\"); \r\n }\r\n \r\n ModuleName currentModuleName = currentModuleTypeInfo.getModuleName();\r\n \r\n ForeignTypeInfo foreignTypeInfo = typeCons.getForeignTypeInfo(); \r\n \r\n if (foreignTypeInfo != null) {\r\n \r\n // foreign types\r\n \r\n Class<?> foreignType = foreignTypeInfo.getForeignType();\r\n \r\n if(foreignType.isPrimitive()) {\r\n \r\n if(foreignType == boolean.class) {\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputBoolean},\r\n InstanceStyle.DERIVING); \r\n \r\n } else if (foreignType == byte.class) {\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputByte},\r\n InstanceStyle.DERIVING);\r\n \r\n } else if (foreignType == char.class) {\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputChar},\r\n InstanceStyle.DERIVING);\r\n \r\n } else if (foreignType == short.class) {\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputShort},\r\n InstanceStyle.DERIVING);\r\n \r\n } else if (foreignType == int.class) {\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputInt},\r\n InstanceStyle.DERIVING);\r\n \r\n } else if (foreignType == long.class) {\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputLong},\r\n InstanceStyle.DERIVING);\r\n \r\n } else if (foreignType == float.class) {\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputFloat},\r\n InstanceStyle.DERIVING);\r\n \r\n } else if (foreignType == double.class) {\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputDouble},\r\n InstanceStyle.DERIVING);\r\n \r\n } else {\r\n throw new IllegalStateException(\"A type that claims to be primitive is not one of the known primitive types\");\r\n }\r\n \r\n } else {\r\n // Defer to Prelude.outputJObject for non-primitive foreign values\r\n return new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {CAL_Prelude_internal.Functions.outputJObject}, \r\n InstanceStyle.DERIVING);\r\n } \r\n \r\n } else {\r\n \r\n // Types declared using an algebraic data definition\r\n \r\n // The instance function will use an AlgebraicValue container object\r\n TypeExpr jObjectTypeExpr = TypeExpr.makeNonParametricType(currentModuleTypeInfo.getVisibleTypeConstructor(CAL_Prelude.TypeConstructors.JObject));\r\n TypeExpr outputTypeExpr = TypeExpr.makeFunType(instanceType, jObjectTypeExpr);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeAlgebraicOutputInstanceMethod(typeCons), outputTypeExpr, position);\r\n \r\n return new ClassInstance(currentModuleName, instanceType, typeClass, null, InstanceStyle.DERIVING);\r\n }\r\n }", "@Override\r\n\tpublic void write(DataOutput out) throws IOException {\n\t\tout.writeShort(this.classType);\r\n\t\tout.writeShort(this.skinType);\r\n\t}", "public void setEntryType(final Class<?> entryType) {\r\n\t\tthis.entryType = entryType;\r\n\t}", "public void setGroundInstancesAsAxioms(Explainer explainer, Vector concepts)\n {\n if (!use_ground_instances)\n return;\n explainer.use_ground_instances = true;\n explainer.ground_instances_as_axioms = \"\";\n for (int i=0; i<concepts.size(); i++)\n {\n Concept concept = (Concept)concepts.elementAt(i);\n if (concept.is_user_given)\n {\n for (int j=0; j<concept.datatable.size(); j++)\n {\n Row row = (Row)concept.datatable.elementAt(j);\n for (int k=0; k<row.tuples.size(); k++)\n {\n Vector tuple = (Vector)row.tuples.elementAt(k);\n Vector ground_letters = (Vector)tuple.clone();\n ground_letters.insertElementAt(row.entity, 0);\n String add_to = concept.writeDefinition(\"tptp\",ground_letters);\n if (!add_to.trim().equals(\"\"))\n explainer.ground_instances_as_axioms = explainer.ground_instances_as_axioms + add_to.trim() + \".\\n\";\n }\n if (concept.arity==1 && row.tuples.size()==0)\n {\n Vector ground_letters = new Vector();\n ground_letters.addElement(row.entity);\n String add_to = concept.writeDefinition(\"tptp\",ground_letters);\n if (!add_to.trim().equals(\"\"))\n explainer.ground_instances_as_axioms = explainer.ground_instances_as_axioms + \"~(\" + add_to.trim() + \").\\n\";\n }\n }\n }\n }\n }", "public void setType(final AngelType type) {\n this.type = type;\n }", "@Override\n\tpublic String typeKey() {\n\t return \"class\";\n\t}", "public ClassNode(OInstance instance) {\n\t\tname = instance.getName();\n\t\tsource = instance;\n\t}", "public final void instanceOfExpression() throws RecognitionException {\n int instanceOfExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"instanceOfExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(769, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 114) ) { return ; }\n // Java.g:770:5: ( relationalExpression ( 'instanceof' type )? )\n dbg.enterAlt(1);\n\n // Java.g:770:9: relationalExpression ( 'instanceof' type )?\n {\n dbg.location(770,9);\n pushFollow(FOLLOW_relationalExpression_in_instanceOfExpression4538);\n relationalExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(770,30);\n // Java.g:770:30: ( 'instanceof' type )?\n int alt135=2;\n try { dbg.enterSubRule(135);\n try { dbg.enterDecision(135);\n\n int LA135_0 = input.LA(1);\n\n if ( (LA135_0==104) ) {\n alt135=1;\n }\n } finally {dbg.exitDecision(135);}\n\n switch (alt135) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:770:31: 'instanceof' type\n {\n dbg.location(770,31);\n match(input,104,FOLLOW_104_in_instanceOfExpression4541); if (state.failed) return ;\n dbg.location(770,44);\n pushFollow(FOLLOW_type_in_instanceOfExpression4543);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(135);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 114, instanceOfExpression_StartIndex); }\n }\n dbg.location(771, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"instanceOfExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }" ]
[ "0.5060203", "0.4993496", "0.48938432", "0.48326826", "0.47450843", "0.4720847", "0.4672573", "0.46637663", "0.46070543", "0.4601724", "0.4540818", "0.45090213", "0.44459832", "0.4425804", "0.44065344", "0.43807516", "0.43719298", "0.4347132", "0.43418688", "0.4283663", "0.42775568", "0.42441922", "0.42299032", "0.4226853", "0.42205346", "0.42192042", "0.42133713", "0.42120728", "0.42108777", "0.4196655", "0.4193654", "0.41896924", "0.4189409", "0.41858315", "0.41512015", "0.41323873", "0.41169944", "0.41020912", "0.40882877", "0.4076267", "0.40417865", "0.40409255", "0.40264028", "0.40230215", "0.4022221", "0.4020926", "0.400809", "0.39938903", "0.39908358", "0.39873856", "0.3986511", "0.39765143", "0.3974801", "0.39705187", "0.3969103", "0.39685705", "0.39681125", "0.39567506", "0.39527082", "0.39524856", "0.3933907", "0.39315113", "0.39288428", "0.39277202", "0.392579", "0.39053893", "0.39016154", "0.39010584", "0.3894558", "0.3888896", "0.38835636", "0.3879971", "0.3877544", "0.38756114", "0.387014", "0.38686496", "0.38615364", "0.38479736", "0.38379237", "0.383148", "0.38287368", "0.38250935", "0.38242194", "0.3816229", "0.38137275", "0.3805995", "0.38055766", "0.37990406", "0.3797897", "0.3795147", "0.37936398", "0.3787888", "0.3779797", "0.37785113", "0.37705708", "0.37701917", "0.37695155", "0.3767021", "0.37600702", "0.37525976" ]
0.74922097
0
Serializes the reifier iff the reifier is not null.
private void _writeReifier(Reifiable reifiable) throws IOException { Topic reifier = reifiable.getReifier(); if (reifier == null) { return; } _writeKeyValue("reifier", _topicRef(reifier)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String serialize() {\n\t\treturn null;\n\t}", "@Override\r\n\t\t\tpublic void serializar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic String serialize(Annotation annotation) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void serializar() {\n\r\n\t}", "public abstract String serialise();", "public void serialize() {\n\t\t\n\t}", "public GenericData.Record serialize() {\n return null;\n }", "@Override\r\n\tpublic String serialize(AnnotationTree tree) {\n\t\treturn null;\r\n\t}", "String serialize();", "public void serialize() {\n FileOutputStream fileOutput = null;\n ObjectOutputStream outStream = null;\n // attempts to write the object to a file\n try {\n clearFile();\n fileOutput = new FileOutputStream(data);\n outStream = new ObjectOutputStream(fileOutput);\n outStream.writeObject(this);\n } catch (Exception e) {\n } finally {\n try {\n if (outStream != null)\n outStream.close();\n } catch (Exception e) {\n }\n }\n }", "private void serialize() {\r\n if (newFile) {\r\n this.newFile = this.serializeAs();\r\n } else if (!newFile && !path.equals(\"\")) {\r\n sr.save(this.path);\r\n }\r\n }", "@Override\n\tpublic String toJSON() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "Object writeReplace() {\n return NodeSerialization.from(this);\n }", "public abstract JsonElement serialize();", "java.lang.String getSer();", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "@Override\r\n\tpublic String toJsonString() {\n\t\treturn null;\r\n\t}", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public boolean isSerialized() {\n return serialized;\n }", "public javax.slee.resource.Marshaler getMarshaler() {\r\n \t\treturn null;\r\n \t}", "public String serialize(Object obj) throws PdfFillerAPIException {\n try {\n if (obj != null)\n return mapper.toJson(obj);\n else\n return null;\n } catch (Exception e) {\n throw new PdfFillerAPIException(400, e.getMessage());\n }\n }", "public String serialize() {\n switch (type) {\n case LIST:\n return serializeList();\n\n case OBJECT:\n return serializeMap();\n\n case UNKNOWN:\n return serializeUnknown();\n }\n return \"\";\n }", "@Override\r\n\tpublic String serialize(List<Annotation> annotations)\r\n\t\t\tthrows UnsupportedOperationException {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,\n\t\t\t\tSerializerFeature.WriteNonStringKeyAsString,\n\t\t\t\tSerializerFeature.WriteNullListAsEmpty,\n\t\t\t\tSerializerFeature.WriteNullNumberAsZero,\n\t\t\t\tSerializerFeature.WriteNullStringAsEmpty);\n\t}", "public java.lang.String getSer() {\n java.lang.Object ref = ser_;\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 ser_ = s;\n }\n return s;\n }\n }", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\treturn this.toJSONString(0);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public java.lang.String getSer() {\n java.lang.Object ref = ser_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ser_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public byte[] serialize() {\n try {\n ByteArrayOutputStream b = new ByteArrayOutputStream();\n ObjectOutputStream o = new ObjectOutputStream(b);\n o.writeObject(this);\n return b.toByteArray();\n } catch (IOException ioe) {\n return null;\n }\n }", "private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }", "@Override\n public void serializeAsElement(Object object, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws Exception {\n JsonSerializer<Object> jsonSerializer;\n Object object2 = this._accessorMethod == null ? this._field.get(object) : this._accessorMethod.invoke(object, new Object[0]);\n if (object2 == null) {\n if (this._nullSerializer == null) {\n jsonGenerator.writeNull();\n return;\n }\n this._nullSerializer.serialize(null, jsonGenerator, serializerProvider);\n return;\n }\n JsonSerializer<Object> jsonSerializer2 = jsonSerializer = this._serializer;\n if (jsonSerializer == null) {\n Class class_ = object2.getClass();\n PropertySerializerMap propertySerializerMap = this._dynamicSerializers;\n jsonSerializer2 = jsonSerializer = propertySerializerMap.serializerFor(class_);\n if (jsonSerializer == null) {\n jsonSerializer2 = this._findAndAddDynamic(propertySerializerMap, class_, serializerProvider);\n }\n }\n if (this._suppressableValue != null) {\n if (MARKER_FOR_EMPTY == this._suppressableValue) {\n if (jsonSerializer2.isEmpty(object2)) {\n this.serializeAsPlaceholder(object, jsonGenerator, serializerProvider);\n return;\n }\n } else if (this._suppressableValue.equals(object2)) {\n this.serializeAsPlaceholder(object, jsonGenerator, serializerProvider);\n return;\n }\n }\n if (object2 == object && this._handleSelfReference(object, jsonGenerator, serializerProvider, jsonSerializer2)) return;\n {\n if (this._typeSerializer == null) {\n jsonSerializer2.serialize(object2, jsonGenerator, serializerProvider);\n return;\n }\n }\n jsonSerializer2.serializeWithType(object2, jsonGenerator, serializerProvider, this._typeSerializer);\n }", "public void serializeClassifier(ObjectOutputStream oos) {\n try {\n // first write the ClassifierCombiner part to disk\n super.serializeClassifier(oos);\n // write whether to use SUTime\n oos.writeBoolean(useSUTime);\n // write whether to use NumericClassifiers\n oos.writeBoolean(applyNumericClassifiers);\n } catch (IOException e) {\n throw new RuntimeIOException(e);\n }\n }", "public String toXML() {\n return null;\n }", "@Override\n void onValueWrite(SerializerElem e, Object o) {\n\n }", "Serializer<T> getSerializer();", "public String toXML() {\n return null;\n }", "@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}", "public Object writeReplace() {\n return new SerializedForm(this.prototype.getAlgorithm(), this.bytes, this.toString);\n }", "protected Object writeReplace() {\r\n\t\tList<DestructionAwareBeanPostProcessor> serializablePostProcessors = null;\r\n\t\tif (beanPostProcessors != null) {\r\n\t\t\tserializablePostProcessors = new ArrayList<DestructionAwareBeanPostProcessor>();\r\n\t\t\tfor (DestructionAwareBeanPostProcessor postProcessor : beanPostProcessors) {\r\n\t\t\t\tif (postProcessor instanceof Serializable) {\r\n\t\t\t\t\tserializablePostProcessors.add(postProcessor);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new DisposableBeanAdapter(bean, beanName, invokeDisposableBean, \r\n\t\t\tnonPublicAccessAllowed, destroyMethodName, serializablePostProcessors);\r\n\t}", "public boolean restorable() {\n return restorable;\n }", "public com.google.protobuf.ByteString\n getSerBytes() {\n java.lang.Object ref = ser_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ser_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic Enregistrable getEnregistrable() {\n\t\treturn null;\n\t}", "public ByteBuf serialize() {\n\t\tByteBuf buffer = Unpooled.buffer();\n\t\twriteFully(buffer);\n\t\treturn buffer;\n\t}", "@Override\n public String toString() {\n ObjectMapper mapper = new ObjectMapper();\n try {\n return mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n return null;\n }\n }", "public void setSerializer(Object serializer);", "@Override\r\n\tpublic Object toJSonObject() {\n\t\treturn null;\r\n\t}", "@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n }", "@JsonIgnore\n\tpublic String getAsJSON() {\n\t\ttry {\n\t\t\treturn TransportService.mapper.writeValueAsString(this); // thread-safe\n\t\t} catch (JsonGenerationException e) {\n\t\t\tlog.error(e, \"JSON Generation failed\");\n\t\t} catch (JsonMappingException e) {\n\t\t\tlog.error(e, \"Mapping from Object to JSON String failed\");\n\t\t} catch (IOException e) {\n\t\t\tlog.error(e, \"IO failed\");\n\t\t}\n\t\treturn null;\n\t}", "public String serialize()\n {\n return String.format(\"invuln=%b, flying=%b, canfly=%b, instabuild=%b, flyspeed=%.4f, walkspped=%.4f\", new Object[] {Boolean.valueOf(this.func_149112_c()), Boolean.valueOf(this.func_149106_d()), Boolean.valueOf(this.func_149105_e()), Boolean.valueOf(this.func_149103_f()), Float.valueOf(this.func_149101_g()), Float.valueOf(this.func_149107_h())});\n }", "public String toJsonString() {\n\t\tString json = null;\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\n\t\tmapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(this);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn json;\n\t}", "public boolean speichereRechnung(Rechnung r) throws IOException {\n try {\n oos.writeObject(r);\n return true;\n } catch (IOException e) {\n return false;\n }\n }", "@Override\n\tpublic Data toData() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String encode() {\n\t\treturn null;\r\n\t}", "public boolean isSerialized(Resource subject, String predicate,\r\n\t\t\tObject object) {\n\t\treturn !(serTypes.get(object).full == 0\r\n\t\t\t\t&& serTypes.get(object).reduced == 0\r\n\t\t\t\t&& serTypes.get(object).optional > 0\r\n\t\t\t\t&& serTypes.get(subject).full == 0 && serTypes.get(subject).reduced > 0);\r\n\t}", "void serialize(Submission submission, Node instance, SerializerRequestWrapper serializerRequestWrapper, \n String defaultEncoding) throws Exception;", "public com.google.protobuf.ByteString\n getSerBytes() {\n java.lang.Object ref = ser_;\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 ser_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic String toString() {\n\t\tif (repr == null)\n\t\t\trepr = toString(null);\n\n\t\treturn repr;\n\t}", "String toJSON();", "public byte[] serialize();", "public void encodeWithCoder(com.webobjects.foundation.NSCoder coder){\n return; //TODO codavaj!!\n }", "@Override\n\tpublic Object retrieveSerializedObject() {\n\t\treturn explanation;\n\t}", "public boolean serialize(POPBuffer buffer) {\n\t\tod.serialize(buffer);\n\t\tpopAccessPoint.serialize(buffer);\t\t\n\t\tint ref = addRef();\n\t\tbuffer.putInt(ref);\n\t\treturn true;\n\t}", "public String toJson() {\n return this.toJson(SerializationFormattingPolicy.None);\n }", "@Override\n\tpublic int getSerializationId() {\n\t\treturn SERIALIZATION_ID;\n\t}", "public String jsonify() {\n return gson.toJson(this);\n }", "static <T extends JSONSerializable> String serialize(T serializable) throws Exception { return serializable.jsonSerialize(); }", "@Override\r\n public String dumpOf ()\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n\r\n if (evaluation != null) {\r\n sb.append(String.format(\" evaluation=%s%n\", evaluation));\r\n }\r\n\r\n Shape physical = (getShape() != null) ? getShape().getPhysicalShape() : null;\r\n if (physical != null) {\r\n sb.append(String.format(\" physical=%s%n\", physical));\r\n }\r\n\r\n if (forbiddenShapes != null) {\r\n sb.append(String.format(\" forbiddenShapes=%s%n\", forbiddenShapes));\r\n }\r\n\r\n if (timeRational != null) {\r\n sb.append(String.format(\" rational=%s%n\", timeRational));\r\n }\r\n\r\n return sb.toString();\r\n }", "@Override\n\tpublic JSONObject toJson() {\n\t\treturn null;\n\t}", "private void serializeMixed(final Mixed mixed, final StringBuffer buffer)\n {\n serializeObject(mixed.getValue(), buffer);\n }", "public boolean isCompatibleSerialization() {\n return compatibleSerialization;\n }", "public boolean isRestorable() {\n\t\treturn isRestorable;\n\t}", "@Override\n\tpublic byte[] serialize(Object obj) throws SerializationException {\n\t\tif(obj==null) \n\t\t{\n\t\t\treturn EMPTY_BYTE_ARRAY;\n\t\t}\n\t\treturn serializingConverter.convert(obj);\n\t}", "public String serialize(Node15 root) {\n\t if(root == null) return \"\";\n\t serializeT(root);\n\t return sb.toString();\n\t }", "public interface InstanceSerializer {\n\n /**\n * Serialize instance into the <tt>SerializerWrapperObject</tt>\n *\n * @param submission submission information.\n * @param instance instance to serialize.\n * @param serializerRequestWrapper object to write into.\n * @param defaultEncoding use this encoding in case user did not provide one.\n */\n void serialize(Submission submission, Node instance, SerializerRequestWrapper serializerRequestWrapper, \n String defaultEncoding) throws Exception;\n\n}", "T getNullRepresentation();", "public ObjectSerializationEncoder() {\n // Do nothing\n }", "SerializeFactory getSerializeFactory();", "@Override\n public byte[] serialize() throws IOException {\n throw new UnsupportedOperationException(\"Not implemented\");\n }", "public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }", "@Override\n\tpublic byte[] toBytes() {\n\t\treturn null;\n\t}", "@Override\n public void serializeAsField(Object object, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws Exception {\n JsonSerializer<Object> jsonSerializer;\n Object object2 = this._accessorMethod == null ? this._field.get(object) : this._accessorMethod.invoke(object, new Object[0]);\n if (object2 == null) {\n if (this._nullSerializer == null) return;\n {\n jsonGenerator.writeFieldName(this._name);\n this._nullSerializer.serialize(null, jsonGenerator, serializerProvider);\n }\n return;\n }\n JsonSerializer<Object> jsonSerializer2 = jsonSerializer = this._serializer;\n if (jsonSerializer == null) {\n Class class_ = object2.getClass();\n PropertySerializerMap propertySerializerMap = this._dynamicSerializers;\n jsonSerializer2 = jsonSerializer = propertySerializerMap.serializerFor(class_);\n if (jsonSerializer == null) {\n jsonSerializer2 = this._findAndAddDynamic(propertySerializerMap, class_, serializerProvider);\n }\n }\n if (this._suppressableValue != null) {\n if (MARKER_FOR_EMPTY == this._suppressableValue) {\n if (jsonSerializer2.isEmpty(object2)) return;\n } else if (this._suppressableValue.equals(object2)) {\n return;\n }\n }\n if (object2 == object && this._handleSelfReference(object, jsonGenerator, serializerProvider, jsonSerializer2)) return;\n {\n jsonGenerator.writeFieldName(this._name);\n if (this._typeSerializer == null) {\n jsonSerializer2.serialize(object2, jsonGenerator, serializerProvider);\n return;\n }\n }\n jsonSerializer2.serializeWithType(object2, jsonGenerator, serializerProvider, this._typeSerializer);\n }", "@Override\n public String toJson(Object object) {\n if (null == object) {\n return null;\n }\n return JSON.toJSONString(object, SerializerFeature.DisableCircularReferenceDetect);\n }", "@Override\n public String toString() {\n return InternalNodeSerializer.toString(this);\n }", "@Override\r\n\t@JsonIgnore\r\n\tpublic byte[] asBytes() {\n\t\treturn null;\r\n\t}", "public String serialize(Object object) {\n\t\treturn serialize(object, false);\n\t}", "public abstract <T> SerializationStream writeObject(T t);", "boolean isSerializeResponse();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getPayloadData() != null)\n sb.append(\"PayloadData: \").append(getPayloadData());\n sb.append(\"}\");\n return sb.toString();\n }", "public final void serialize(OutputStream out){\n }", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }", "OutputStream serialize(OutputStream toSerialize);", "void writeObject(OutputSerializer out) throws java.io.IOException;", "public final ByteBuffer serialize() {\n return this.b.asReadOnlyBuffer().order(this.b.order());\n }", "private static Serializer getSerializer() {\n\t\tConfiguration config = new Configuration();\n\t\tProcessor processor = new Processor(config);\n\t\tSerializer s = processor.newSerializer();\n\t\ts.setOutputProperty(Property.METHOD, \"xml\");\n\t\ts.setOutputProperty(Property.ENCODING, \"utf-8\");\n\t\ts.setOutputProperty(Property.INDENT, \"yes\");\n\t\treturn s;\n\t}", "public String toJson() { return new Gson().toJson(this); }", "public boolean writeReferenceOrNull(Output output, Object obj, boolean z) {\n if (obj == null) {\n if (Log.TRACE || (Log.DEBUG && this.depth == 1)) {\n Util.log(\"Write\", null);\n }\n output.writeVarInt(0, true);\n return true;\n } else if (!this.referenceResolver.useReferences(obj.getClass())) {\n if (z) {\n output.writeVarInt(1, true);\n }\n return false;\n } else {\n int writtenId = this.referenceResolver.getWrittenId(obj);\n String str = \": \";\n String str2 = \"kryo\";\n if (writtenId != -1) {\n if (Log.DEBUG) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Write object reference \");\n sb.append(writtenId);\n sb.append(str);\n sb.append(Util.string(obj));\n Log.debug(str2, sb.toString());\n }\n output.writeVarInt(writtenId + 2, true);\n return true;\n }\n int addWrittenObject = this.referenceResolver.addWrittenObject(obj);\n output.writeVarInt(1, true);\n if (Log.TRACE) {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"Write initial object reference \");\n sb2.append(addWrittenObject);\n sb2.append(str);\n sb2.append(Util.string(obj));\n Log.trace(str2, sb2.toString());\n }\n return false;\n }\n }", "@Override\n public void serializeAsField(Object bean, JsonGenerator jgen, SerializerProvider prov)\n throws Exception {\n Object value = get(bean);\n if (value == null) {\n if (!_suppressNulls) {\n jgen.writeFieldName(_name);\n prov.defaultSerializeNull(jgen);\n }\n return;\n }\n // For non-nulls, first: simple check for direct cycles\n if (value == bean) {\n _reportSelfReference(bean);\n }\n if (_suppressableValue != null && _suppressableValue.equals(value)) {\n return;\n }\n\n JsonSerializer<Object> ser = _serializer;\n if (ser == null) {\n Class<?> cls = value.getClass();\n PropertySerializerMap map = _dynamicSerializers;\n ser = map.serializerFor(cls);\n if (ser == null) {\n ser = _findAndAddDynamic(map, cls, prov);\n }\n }\n\n if (_typeSerializer != null) {\n // If we are using a specific serializer, then assume it is fully functional already\n jgen.writeFieldName(_name);\n ser.serializeWithType(value, jgen, prov, _typeSerializer);\n return;\n }\n\n wrapperName = nameInfo.getWrapperName();\n startWrapping(jgen);\n wrappedName = nameInfo.getWrappedName();\n if (wrappedName != null) {\n serializeInnerField(value, jgen, prov, ser);\n } else {\n /* No specific wrappedName */\n Map<Class<?>, QName> nameMap = nameInfo.getWrappedNameMap();\n if ((nameMap != null) && (value instanceof ArrayList)) {\n serializeXmlElementsArray((ArrayList<?>)value, jgen, prov, nameMap);\n } else if ((nameInfo.isKeyValuePairs()) && (value instanceof ArrayList)) {\n serializeZmailKeyValuePairs((ArrayList<?>) value, jgen, prov);\n } else if (nameInfo.isAnyAttributeAllowed() && java.util.Map.class.isAssignableFrom(value.getClass())) {\n serializeXmlAnyAttributes((Map<?,?>) value, jgen, prov);\n } else {\n if (value instanceof ArrayList) {\n serializeXmlAnyElementsArray((ArrayList<?>) value, jgen, prov);\n } else {\n jgen.writeFieldName(_name);\n ser.serialize(value, jgen, prov);\n }\n }\n finishWrapping(jgen);\n }\n }", "private byte[] serialize(RealDecisionTree object){\n try{\n // Serialize data object to a file\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(\"MyObject.ser\"));\n out.writeObject(object);\n out.close();\n\n // Serialize data object to a byte array\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n out = new ObjectOutputStream(bos) ;\n out.writeObject(object);\n out.close();\n\n // Get the bytes of the serialized object\n byte[] buf = bos.toByteArray();\n return buf;\n } catch (IOException e) {\n System.exit(1);\n }\n\n return null;\n }", "void saveData() throws SerializerException;" ]
[ "0.63773763", "0.5821228", "0.5737477", "0.5685735", "0.5669803", "0.56626844", "0.5662091", "0.5605998", "0.53956604", "0.53538465", "0.5344624", "0.5264918", "0.52602184", "0.5218539", "0.52129394", "0.52105707", "0.51983577", "0.5196029", "0.5196029", "0.51879156", "0.5187496", "0.5165134", "0.5151989", "0.5144582", "0.51398957", "0.5122087", "0.5109364", "0.50998676", "0.509758", "0.50668", "0.5047606", "0.50193286", "0.5017185", "0.5014672", "0.5011008", "0.50099283", "0.4941504", "0.49398446", "0.49358898", "0.4935327", "0.49348718", "0.4931148", "0.49198315", "0.49145493", "0.49143007", "0.48980722", "0.48940417", "0.48871398", "0.48832113", "0.48780388", "0.48761553", "0.4869788", "0.48688778", "0.48593977", "0.48515046", "0.48471487", "0.4845047", "0.48315912", "0.4827312", "0.4819855", "0.48057", "0.48045173", "0.47947973", "0.47889993", "0.4785573", "0.47655347", "0.47333664", "0.47138208", "0.46987048", "0.4696959", "0.46957228", "0.46847937", "0.46814454", "0.4679097", "0.46744248", "0.4663086", "0.46502352", "0.463466", "0.46273553", "0.4622981", "0.46162912", "0.46148902", "0.46019983", "0.45845306", "0.45832196", "0.45780045", "0.45749348", "0.4573567", "0.4569002", "0.45679572", "0.4567137", "0.4564052", "0.45619693", "0.4559507", "0.4554174", "0.45501325", "0.45456508", "0.45427337", "0.45424274", "0.45391968" ]
0.5971752
1
Writes a key/value pair.
private void _writeKeyValue(String key, String value) throws IOException { _out.key(key); _out.value(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void write(K key, V value);", "public void emit(String key, String value) throws IOException {\r\n writer.writeKV(key, value);\r\n }", "@Override\r\n public void write(final K key, final V value) throws IOException {\r\n m_Text.append(key.toString()+ \"\\t\" + value.toString());\r\n }", "void writeEntry(String key, int value, boolean mandatory) throws IOException;", "private static void writePair(final StringBuffer buffer, final String key,\n \t\t\tfinal String value) {\n \t\tbuffer.append(key);\n \t\tbuffer.append('=');\n \t\tbuffer.append(value.replace(\"\\\\\", \"\\\\\\\\\").replace(\">\", \"\\\\>\").replace(\n \t\t\t\t\"<\", \"\\\\<\"));\n \t\tbuffer.append(\"\\\\p\");\n \t}", "void writeEntry(String key, char value, boolean mandatory) throws IOException;", "public void putKV(String key, String value) throws Exception;", "void writeEntry(String key, String value, Unit unit, boolean mandatory) throws IOException;", "public void write() throws IOException {\n // No pairs to write\n if(map.size() == 0 || !isDirty) {\n System.err.println(\"preferences is already updated..\");\n return;\n }\n\n try(BufferedWriter bufferedWriter = Files.newBufferedWriter(fileName,\n StandardOpenOption.TRUNCATE_EXISTING,\n StandardOpenOption.CREATE))\n {\n for(Map.Entry<String, String> entry : map.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n\n // Writes the current pair value in the format of 'key=value'\n bufferedWriter.write(String.format(\"%s=%s\\n\", key, value));\n }\n }\n\n isDirty = false;\n }", "@Override \r\n\t@SuppressWarnings(\"unchecked\")\r\n\tpublic <K, V> void write(String namedOutput, K key, V value,\r\n\t\t\tString baseOutputPath) throws IOException, InterruptedException {\r\n\t\tcheckNamedOutputName(context, namedOutput, false);\r\n\t\tcheckBaseOutputPath(baseOutputPath);\r\n\t\tif (!namedOutputs.contains(namedOutput)) {\r\n\t\t\tthrow new IllegalArgumentException(\"Undefined named output '\" +\r\n\t\t\t\t\tnamedOutput + \"'\");\r\n\t\t}\r\n\t\tTaskAttemptContext taskContext = getContext(namedOutput);\r\n\t\tgetRecordWriter(taskContext, baseOutputPath).write(key, value);\r\n\t}", "public boolean put(String key, String value);", "void writeEntry(String key, List<String> value, boolean mandatory) throws IOException;", "void put(K key, V value);", "void put(K key, V value);", "protected abstract void put(K key, V value);", "void put(String key, Object value);", "void writeEntry(String key, Enum<?> value, boolean mandatory) throws IOException;", "void putValue(String key, Object data);", "V put(K key, V value);", "public abstract V put(K key, V value);", "public void put(String key, T value);", "boolean put(K key, V value);", "String put(Integer key, String value);", "void put(@NonNull String key, @NonNull T value);", "Object put(Object key, Object value);", "public V put(K key, V value);", "public void put(Key key, Value val);", "V put(final K key, final V value);", "@Override\n\t\tpublic void write(K key, V value) throws IOException, InterruptedException {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t//System.out.println(key.toString()+\":\"+value.toString());\n\t\t\tConfiguration conf = HBaseConfiguration.create();\n\t\t\t//conf.set(\"hbase.zookeeper.quorum\", \"10.105.245.143,10.105.245.144,10.105.245.147\");\n\t\t\tString mess[] = key.toString().split(\":\");\n\t\t\tString time = mess[0];\n\t\t\tString nation = mess[1];\n\t\t\tString nationid = PeopleCountByNation.asmap.get(nation);\n\t\t\tconf.set(\"hbase.zookeeper.quorum\", \"localhost\");\n\t\t\tint sum = Integer.parseInt(value.toString());\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tHTable table = new HTable(conf,\"nation\".getBytes());\n\t\t\tPut put = new Put(Bytes.toBytes(time+nationid));\n\t\t\tput.add(Bytes.toBytes(\"n\"),Bytes.toBytes(\"n\"),Bytes.toBytes(sum));\n\t\t\ttable.put(put);\n\t\t /* String record = value.toString();\n\t\t String mess [] = record.split(\"----\");\n\t\t String recordmess [] = mess[0].split(\"////\");\n\t\t HTable table = new HTable(conf,\"sort\".getBytes());\n\t\t //System.out.println(key.toString());\n\t\t Put put = new Put(Bytes.toBytes(key.toString()));\n\t\t put.add(Bytes.toBytes(\"title\"),Bytes.toBytes(recordmess[0]),Bytes.toBytes(mess[1]));\n\t\t table.put(put);*/\n\t\t \n\t\t //将数据存储在 hbase 中,这次存储的是word与title的集合\n\t\t \n\t\t \n\t\t \n\t\t}", "void writeEntry(String key, double value, Unit unit, boolean mandatory) throws IOException;", "@Override\n public void putValue(String key, Object value) {\n\n }", "protected abstract void write (Object val);", "void writeEntry(String key, Double value, Unit unit, boolean mandatory) throws IOException;", "public abstract void Put(WriteOptions options, Slice key, Slice value) throws IOException, BadFormatException, DecodeFailedException;", "public void writeRecord(KeyValue<Writable<?>, Writable<?>> kv, String kvDelimiter) throws IOException {\n\t long fileLength = f.length();\n\t raf.seek(fileLength);\n\t\traf.writeBytes(kv.getKey() + kvDelimiter + kv.getValue()+\"\\r\\n\");\n\t}", "public <T> SerializationStream writeKey( T key) {\n return writeObject(key);\n }", "@Override\n public void put(String key, String value) throws KVException {\n \tSocket sock = null;\n \ttry {\n \t\tif (key == null || key.isEmpty()) throw new KVException(ERROR_INVALID_KEY);\n \t\tif (value == null || value.isEmpty()) throw new KVException(ERROR_INVALID_VALUE);\n \t\t\n \t\tsock = connectHost();\n\n \t\tKVMessage outMsg = new KVMessage(PUT_REQ);\n \t\toutMsg.setKey(key);\n \t\toutMsg.setValue(value);\n \t\toutMsg.sendMessage(sock);\n\n \t\tKVMessage inMsg = new KVMessage(sock);\n \t\tString message = inMsg.getMessage();\n \t\t//assertTrue(message != null);\n \t\tif(message == null) throw new KVException(ERROR_COULD_NOT_RECEIVE_DATA);\n \t\tif(!message.equals(SUCCESS)) throw new KVException(message);\n \t\t\n \t} catch (KVException kve) {\n \t\tSystem.err.println(kve.getKVMessage().getMessage());\n \t\tthrow kve;\n \t} finally {\n \t\tif(sock != null) closeHost(sock);\n \t}\n }", "public <T> void write(MDSKey id, T value) {\n try {\n table.put(new Put(id.getKey()).add(COLUMN, serialize(value)));\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }", "public void set(String keyInput, String valueInput) {\n\t\tfileData.put(keyInput, valueInput);\n\t\ttry {\n\t\t\twriteToFile();\n\t\t}\n\t\tcatch (IOException anything) {\n\t\t\tSystem.out.println(\"Couldn't write to file \" + path + \". Error: \" + anything.getMessage());\n\t\t}\n\t}", "public void put(String key, String value) {\n\n\t\t//get the old value of the key\n\t\tString oldValue = get(key);\n\t\t\n\t\t//get this file's text\n\t\tString text = FileIO.read(this.getPath());\n\t\t\n\t\t//if it's the first time you're putting this key in, add a new key-value line\n\t\tif(oldValue==null) {\n\t\t\ttext+=key+\" : \"+value+\"\\n\";\n\t\t}else {\n\t\t\t//else replace oldValue with new value\n\t\t\ttext = text.replace(key+\" : \"+oldValue, key+\" : \"+value);\n\t\t}\n\t\t\n\t\t//push changes\n\t\tFileIO.write(this.getPath(), text);\n\t\t\n\t}", "public void save(String filename) throws IOException {\r\n String newline = System.getProperty(\"line.separator\");\r\n FileWriter out = new FileWriter(filename);\r\n Enumeration e = keyvaluepairs.keys();\r\n while (e.hasMoreElements()) {\r\n String key = (String) e.nextElement();\r\n out.write(key + \"=\" + (String) keyvaluepairs.get(key) + newline);\r\n }\r\n out.close();\r\n }", "@Override\n public KVMessage put(String key, String value) {\n KVMessage rtn;\n persistWithoutUniqueCheck(key, value);\n rtn = new Message(KVMessage.StatusType.PUT_SUCCESS, key, value, null);\n return rtn;\n }", "protected void writeData( int id, String key, RMItem value )\n {\n synchronized(m_transactionHT) {\n \tRMHashtable trHT = (RMHashtable) m_transactionHT.get(id);\n trHT.put(key, value);\n }\n }", "void put(String key, String value) throws StorageException, ValidationException, KeyValueStoreException;", "public void setValue(K key, V value);", "@Override\n\t\tpublic void write(DataOutput arg0) throws IOException {\n\t\t\tk.write(arg0);\n\t\t\tv.write(arg0);\n\t\t}", "void set(K key, V value);", "public void write(KEYOUT key, VALUEOUT value\n ) throws IOException, InterruptedException {\n\t \n\t int disableHashing_flag=0;\n\t \n\t disableHashing_flag = this.getConfiguration().getInt(\"mapred.job.disableHashing\", 0);\n\t \n//\t System.out.println(\"___________inside write() in TaskInputOutputContextImpl.java_______________Thread.currentThread().getStackTrace() = \");\n//\t for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {System.out.println(\"ste = \"+ste);}\n\t \n\t String reducerORmapper = this.local_taskID.split(\"_\")[3];\n\t \n\t //System.out.println(\"\\n\\n\\n\\nENTERED write\\n\\n\\n\\n\\n\");\n\t \n//\t if(key !=null)\n//\t {\n//\t\t System.out.println(\"key = \"+key); \n//\t }\n//\t if(value !=null)\n//\t {\n//\t\t System.out.println(\"value = \"+value); \n//\t }\n\t \n\t \n\t if(reducerORmapper.equals(\"r\") && disableHashing_flag==0) //&& key !=null && value !=null )\n\t {\n\t\t //KV=key.toString()+value.toString();\n\t\t if(key !=null && value!=null)\n\t\t {\n\t\t\t KV=key.toString()+value.toString();\n\t\t }else\n\t\t if(value !=null)\n\t\t {\n\t\t\t KV=value.toString();\n\t\t }\n\t\t //total_hash+=KV.hashCode();//This was the old way of doing the hashes and it worked perfectly\n\t\t //This old hash value was an integer, now it is becoming a String\n\t\t //Reducer.external_total_hash=total_hash;\n\t\t MessageDigest messageDigest;\n\t\ttry {\n\t\t\tmessageDigest = MessageDigest.getInstance(\"SHA-256\");\n\t\t\tbyte[] hash = messageDigest.digest(KV.getBytes(\"UTF-8\"));\n\t\t\t\n\t\t\t//System.out.println(\"firstKey = \"+firstKey);\n\t\t\t\n\t\t\tif(firstKey==0)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"1 ENTERED firstKey==0\");\n\t\t\t\tReducer.external_total_hash_byteArray=new byte[hash.length];\t\t\t\t\n\t\t\t}\n\t\t\t//messageDigest.update(KV.getBytes());\n\t\t\t//String encryptedString = new String(messageDigest.digest());\n\t\t\t//total_hash_string+=encryptedString;\n\t\t\t//Reducer.external_total_hash_string=total_hash_string;\n\t\t for(int i=0; i< hash.length;i++){//(byte b : hash) {\n\t\t \tif(firstKey==0)\n\t\t \t{\t\t \t\t\n\t\t \t\tSystem.out.println(\"2 ENTERED firstKey==0\");\n\t\t \t\tReducer.external_total_hash_byteArray[i]=hash[i];//Integer.toHexString(hash[i] & 0xff);\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\tReducer.external_total_hash_byteArray[i]=(byte)(Reducer.external_total_hash_byteArray[i]+hash[i]);\n\t\t \t}\n\t\t }\n\t\t\t//Reducer.external_total_hash_byteArray+=hash;\n\t\t\t \n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t\tfirstKey++;\n\t\t \n//\t\t System.out.println(\"this.local_taskID = \"+this.local_taskID);\n//\t\t System.out.println(\"++++++ inside write in TaskInputOutputContextImpl key.toString() = \"\n//\t\t +key.toString()+\" value.toString() = \"+value.toString()+\" KV.hashCode() = \"+KV.hashCode()\n//\t\t + \" total_hash = \"+total_hash + \" Reducer.external_total_hash = \"+Reducer.external_total_hash);\n\t }\n\t \n\t //System.out.println(\"Reducer.finalValue = \"+Reducer.finalValue);\n output.write(key, value);\n \n// if(conf.getInt(MRJobConfig.BFT_FLAG, 1)==3)//TODO NEED TO ADD CASE 2\n// {\n//\t\t\n// \t int local_NUM_REPLICAS = conf.getInt(MRJobConfig.NUM_REPLICAS,4); \n// \t String reducerORmapper = this.local_taskID.split(\"_\")[3];\n// \t int reducerNumber = Integer.parseInt(this.local_taskID.split(\"_\")[4]);\n// \t int unreplicatedReducerNumber = (int) Math.floor(reducerNumber/local_NUM_REPLICAS);\n// \t \n// \t \n// \t \n// \n// try {\n// \tString KV=\"\"; int i=0; long totalHash=0; String stringToSend=\"\"; String stringReceived=\"\";\n// \t//System.out.println(\"+++ entered try\");\n// \twhile (context.nextKey()) {\n// reduce(context.getCurrentKey(), context.getValues(), context);\n// \n// if(reducerORmapper.equals(\"r\"))\n// {\n// \t //KV+=context.getCurrentKey().toString()+context.getCurrentValue().toString();// first hashing method\n// \t KV=context.getCurrentKey().toString()+context.getCurrentValue().toString();\n// \t totalHash+=KV.hashCode();\n// \t //System.out.println(\"key = \"+context.getCurrentKey()+\" value = \"+context.getCurrentValue()+\n// \t //\t\t\" KV.hashCode() = \"+KV.hashCode()+\" totalHash = \"+totalHash);\n// \t //KV=\"p\";\n// }\n// \n// // If a back up store is used, reset it\n// Iterator<VALUEIN> iter = context.getValues().iterator();\n// if(iter instanceof ReduceContext.ValueIterator) {((ReduceContext.ValueIterator<VALUEIN>)iter).resetBackupStore();} \n// \n// \n// i++;\n// }\n// \n// \n// \n// if(reducerORmapper.equals(\"r\"))\n// {\n// \t \n// \t System.out.println(\"ENTERED if(reducerORmapper.equals(\\\"r\\\"))\");\n// \t \n// \t totalHash=0;//just for now for testing \t \n// \t stringToSend=reducerNumber+\" \"+this.local_taskID+\" \"+totalHash;\n// \t \n// \t \n// \t try {\n// \t\t\tclientSocket = new Socket(\"mc07.cs.purdue.edu\", 2222);//(\"mc07.cs.purdue.edu\", 2222);\n// \t\t\tinputLine = new BufferedReader(new InputStreamReader(System.in));\n// \t\t\tos = new PrintStream(clientSocket.getOutputStream());\n// \t\t\tis = new DataInputStream(clientSocket.getInputStream());\n// \t\t} catch (UnknownHostException e) {\n// \t\t\tSystem.err.println(\"Don't know about host mc07.cs.purdue.edu\");\n// \t\t} catch (IOException e) {\n// \t\t\tSystem.err.println(\"Couldn't get I/O for the connection to the host mc07.cs.purdue.edu\");\n// \t\t\tSystem.out.println(\"e.getMessage() = \"+e.getMessage());\n// \t\t\tSystem.out.println(\"e.toString() = \"+e.toString());\n// \t\t\tSystem.out.println(\"e.getCause() = \"+e.getCause()); \t\t\t\n// \t\t}\n//\n// \t\t\n// \t\tif (clientSocket != null && os != null && is != null) {\n// \t\t\ttry {\n//\n// \t\t\t\tos.println(stringToSend);\n// \t\t\t\tString responseLine;\n// \t\t\t\tSystem.out.println(\"Before while\");\n// \t\t\t\twhile(true){\n// \t\t\t\t\tSystem.out.println(\"Entered while\");\n// \t\t\t\t\tresponseLine = is.readLine();\n// \t\t\t\t\tSystem.out.println(\"responseLine = \"+responseLine);\n// \t\t\t\t\tif(responseLine!=null && !responseLine.isEmpty())\n// \t\t\t\t\t{\n// \t\t\t\t\t\t//add if stmt for checking the server address, but first open a socket here for each Reducer for accepting server address\n// \t\t\t\t\t\t//clientSocket = serverSocket.accept();(put it above)\n// \t\t\t\t\t\tif (Integer.parseInt(responseLine)==unreplicatedReducerNumber)\n// \t\t\t\t\t\t{\t\n// \t\t\t\t\t\t\tSystem.out.println(\"Entered XXX------\");\n// \t\t\t\t\t\t\tbreak;\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/* WORKING PERFECTLY .... need to uncomment class MultiThreadChatClient\n// \t\t\t\t // Create a thread to read from the server\n// \t\t\t\tnew Thread(new MultiThreadChatClient(unreplicatedReducerNumber)).start();//try sending is,closed if this didn't work\n// \t\t\t\tos.println(stringToSend);\n// \t\t\t\t\n// \t\t\t\t while (true) {\n// \t\t\t\t\tsynchronized(lock){//CHECK IF THIS CAUSES AN OVERHEAD\n// \t\t\t\t\tif(closed)\n// \t\t\t\t\t\t{\n// \t\t\t\t\t\t\tSystem.out.println(\"ENTERED if(closed)\");\n// \t\t\t\t\t\t\tbreak;\n// \t\t\t\t\t\t}\n// \t\t\t\t\t}\n// \t\t\t\t}*/\n// \t\t\t\t//os.println(\"ok\");\n// \t\t\t\tSystem.out.println(\"AFTER THE TWO WHILES\");\n// \t\t\t\tos.close();\n// \t\t\t\tis.close();\n// \t\t\t\tclientSocket.close();\n// \t\t\t} \n// \t\t\tcatch (IOException e) {\n// \t\t\t\tSystem.err.println(\"IOException: \" + e);\n// \t\t\t}\n// \t\t}\n// \t\t \n// \t\t \t \n// \t\t KV=\"\";stringToSend=\"\";totalHash=0;\n// }\n// \n// \n// \n// } \n// \n// }\n \n }", "public void writeKeyData(File f) throws IOException;", "public int put(int key, String value) {\n int retval = 0;\n\n String sql = \"INSERT INTO data_map(data_key, data_val) VALUES(?, ?)\";\n\n try (Connection con = this.connect();\n PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, key);\n pstmt.setString(2, value);\n retval = pstmt.executeUpdate();\n }\n catch (SQLException e) {\n retval = -1;\n }\n\n return retval;\n }", "void put(int partitionID, String key, String value);", "public Value put(Key key, Value thing) ;", "private void writeToFile() throws IOException {\n\t\tFileWriter write = new FileWriter(path);\n\t\tPrintWriter print_line = new PrintWriter(write);\n\t\t\n\t\tEnumeration<String> fd_key_Enum = fileData.keys();\n\t\tEnumeration<String> fd_value_Enum = fileData.elements();\n\t\twhile (fd_key_Enum.hasMoreElements() && fd_value_Enum.hasMoreElements()) {\n\t\t\tprint_line.printf(\"%s\" + \"%n\", fd_key_Enum.nextElement() + \":\" + fd_value_Enum.nextElement());\n\t\t}\n\t\t\n\t\tprint_line.close();\n\t\twrite.close();\n\t}", "public static void write(Context context, String key, String value) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\tsp.edit().putString(key, value).commit();\n\t}", "void put(String name, Object value);", "void addEntry(K key, V value);", "void set(String key, Object value);", "void put(String key, int value) throws StorageException, ValidationException, KeyValueStoreException;", "public V put(K key, V value) throws InvalidKeyException;", "public boolean put(K key, V value)\r\n\t{\r\n\t\treturn data.addUpdate(new Entry(key, value));\r\n\t}", "@Override\n void postValueWrite(SerializerElem e, String key) {\n\n }", "public static String printKeyValue(String key, String value) {\n\n return StringHelper.addRightPadding(key, StringHelper.RIGHT_PADDING_WIDTH) + value + \"\\n\";\n\n }", "@Override\n public void write(WritableComparable key, Tuple value)\n throws IOException, InterruptedException {\n if(mode == Mode.SINGLE_STORE) {\n if (!(value instanceof NonWritableTuple)) {\n storeDecorator.putNext(value);\n }\n } else {\n throw new IOException(\"Internal Error: Unexpected code path\");\n }\n }", "public void write(String value) {\n try {\n out.println(value);\n out.flush();\n System.out.println(value);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected void writeWrite ()\n {\n stream.println (\" public void _write (org.omg.CORBA.portable.OutputStream o)\");\n stream.println (\" {\");\n if (entry instanceof ValueBoxEntry)\n {\n TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;\n SymtabEntry mType = member.type ();\n if (mType instanceof StringEntry)\n stream.println (\" o.write_string (value);\");\n\n else if (mType instanceof PrimitiveEntry)\n {\n String name = entry.name ();\n stream.println (\" \" + name + \" vb = new \" + name + \" (value);\");\n stream.println (\" \" + helperClass + \".write (o, vb);\");\n }\n\n else\n stream.println (\" \" + helperClass + \".write (o, value);\");\n }\n else\n stream.println (\" \" + helperClass + \".write (o, value);\");\n stream.println (\" }\");\n stream.println ();\n }", "public void put(String key, T value) {\r\n\t\troot = put (root, key, value, 0);\r\n\t}", "public int storeAttribute(String key, String value);", "public void put(String key, Object value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public void _write(org.omg.CORBA.portable.OutputStream ostream)\r\n {\r\n PropositionHelper.write(ostream,value);\r\n }", "void put(String key, boolean value) throws StorageException, ValidationException, KeyValueStoreException;", "<T> void put(String key, T data);", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final String value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putString(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "public void write(int pVal) throws IOException {\n mPrintWriter.write(pVal);\n }", "public abstract void write(O value) throws IOException;", "public void put(@NonNull final String key, final Serializable value) {\n put(key, value, -1);\n }", "public synchronized void put(String key,String val){\n map.put(key, val); \n }", "public void put(String key, String value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "void put(K key, V value, long expireMs);", "@Override\r\n\tpublic void addKeyValuePair(String key, String value) {\r\n\t\t\r\n\t\t// if key is empty\r\n if (key == null || key.equals(\" \") || value == null || value.equals(\" \")) {\r\n System.out.println(\"Key cannot be Empty\");\r\n return;\r\n }\r\n // create new Node to be inserted\r\n Node newNode = new Node(new Data(key, value));\r\n // call recursive function traverse from root to correct Position to add newNode\r\n this.root = insertRecursively(this.root, newNode);\r\n return;\r\n\t\t\r\n\t}", "public void persist(String key, Object value)\r\n\t{\r\n\t\tgetPersistenceMap().put(key, value);\r\n\t}", "public void addWritten(byte[] value) {\n\n writeSetLock.lock();\n writeSet.add(new TimestampValuePair(ets, value));\n writeSetLock.unlock();\n }", "public boolean put(byte[] key, byte[] value) throws Exception;", "void writeString(String value);", "public V put(K key, V value) {\n System.out.println(\"SimpleTreeMap.put\");\n return mMap.put(key, value);\n }", "@Override\n\tpublic void put(S key, T val) {\n\t\t\n\t}", "private void writeKey(K key, int ei) {\n int keySize = keySerializer.calculateSize(key);\n Slice s = memoryManager.allocateSlice(keySize, MemoryManager.Allocate.KEY);\n // byteBuffer.slice() is set so it protects us from the overwrites of the serializer\n keySerializer.serialize(key, s.getByteBuffer().slice());\n\n setEntryFieldInt(ei, OFFSET.KEY_BLOCK, s.getBlockID());\n setEntryFieldInt(ei, OFFSET.KEY_POSITION, s.getByteBuffer().position());\n setEntryFieldInt(ei, OFFSET.KEY_LENGTH, keySize);\n }", "void updateEntry(K key, V value);", "public void put(String key, Serializable value) throws PrivilegedOperationException\n {\n List<Serializable> payload = Stream.of(key, value).collect(Collectors.toList());\n\n Request req = new Request(payload, \"put\", id);\n Response resp = sender.sendMessage(req, TIMEOUT);\n\n if(!resp.responseCode())\n {\n throw new PrivilegedOperationException(resp.getResponseMessage());\n }\n }", "public void put(K key, V value) {\n Entry<K, V> entry = segment.put(key, value);\n\n // Time-based eviction strategy is highly important, so creation time\n // tracking is a must. \n long time = System.currentTimeMillis();\n\n //{@see Ticker} is used to reuse timestamp\n // and save some CPU cycles for read opetion. \n ticker.setNextTick(time);\n\n // Update creation time in order to avoid entry removal\n entry.setCreationTime(time);\n\n // Perform a bit of a clean-up. Write performance is critical, so no \n // heavy lifting is supposed to happen here. \n cleanUp();\n }", "ValueType put(long key, ValueType entry);", "public void put(@NonNull final String key, final String value) {\n put(key, value, -1);\n }", "@Override\n\t\tprotected void map(Object key, Text value,\n\t\t\t\tMapper<Object, Text, MyKey, Text>.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tString line[] = value.toString().split(\"\\t\");\n\t\t\tif(line.length<2)return;\n\t\t\tk.setK(new Text(line[0]));\n\t\t\tk.setV(new Text(line[1]));\n\t\t\tcontext.write(k,new Text(line[1]));\n\t\t}", "void register(String name, K key, V value);", "void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }", "public void put(int key, int value) {\n store[key] = value; // update operation= overwritten \n }", "public void put(String key, boolean value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public void put(Value key, Value value) {\n\t\tstorage.put(key, value);\n\t}", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final Integer value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putInt(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic void setKeyValueInfo(KeyValueInfo kv) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"setKeyValueInfo\");\n\t\tif (!this.isCloudChannelLive()) {\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n\t\t\t\t\t\"User is not online\");\n\t\t}\n\t\tJSONObject joReq = new JSONObject();\n\t\tJSONObject pl = new JSONObject();\n\t\ttry {\n\t\t\tjoReq.put(\"PL\", pl);\n\t\t\tjoReq.put(\"CID\", 30511);\n\t\t\tjoReq.put(\"SID\", getsid());\n\t\t\tpl.put(\"key\", kv.key);\n\t\t\tpl.put(\"value\", kv.value);\n\n\t\t\tString req = joReq.toString();\n\n\t\t\tString rsp = HttpProxy.reqByHttpPost(req);\n\t\t\tJSONObject jo = new JSONObject(rsp);\n\n\t\t\tif (jo.isNull(\"RC\")) {\n\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_KEYVALUE,\n\t\t\t\t\t\t\"can not set keyvalue\");\n\t\t\t}\n\t\t\tif (jo.getInt(\"RC\") != 1) {\n\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_KEYVALUE,\n\t\t\t\t\t\t\"can not set keyValue\");\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_KEYVALUE,\n\t\t\t\t\t\"can not set keyValue\");\n\t\t}\n\t}", "public void writeLocalKeyVal(String key, String val, String version){\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(DBHelper.KEY_FIELD, key);\n\t\tvalues.put(DBHelper.VALUE_FIELD, val);\n\t\tvalues.put(DBHelper.VERSION_FIELD, version);\n\t\tdbHelper.insert(values);\n\t}" ]
[ "0.80352813", "0.7141569", "0.6949223", "0.68496746", "0.67862576", "0.66410494", "0.6564504", "0.63627934", "0.6326303", "0.6146525", "0.60858893", "0.6075557", "0.60395634", "0.60395634", "0.59656185", "0.59186023", "0.58790654", "0.5858207", "0.58556217", "0.58499026", "0.5835776", "0.5811815", "0.5761022", "0.5741894", "0.57254255", "0.5694297", "0.5690508", "0.568616", "0.5656721", "0.5652611", "0.5639004", "0.5624096", "0.5616728", "0.5598671", "0.55915487", "0.55908483", "0.558236", "0.55697554", "0.5568779", "0.5562368", "0.55573136", "0.5514931", "0.551438", "0.5503572", "0.54735667", "0.5471217", "0.54692364", "0.5467899", "0.54473174", "0.544441", "0.5439736", "0.54392946", "0.5384999", "0.53735477", "0.5361212", "0.53481174", "0.5335991", "0.5294108", "0.52939874", "0.528966", "0.52885956", "0.52877486", "0.52774835", "0.52737546", "0.52700293", "0.5262145", "0.5259832", "0.5257723", "0.5241763", "0.523898", "0.5210699", "0.5210095", "0.52085537", "0.5201705", "0.5200717", "0.51997066", "0.5198973", "0.51984197", "0.51969457", "0.518253", "0.5181197", "0.51739514", "0.5172382", "0.5170961", "0.51652145", "0.516148", "0.5158317", "0.5157152", "0.5153383", "0.51318365", "0.51306033", "0.51296204", "0.51248735", "0.5124277", "0.5120625", "0.5117009", "0.5115117", "0.5111942", "0.5110558", "0.5106165" ]
0.79608357
1
Returns an IRI which is usable to as reference to the specified topic.
private String _topicRef(Topic topic) { Set<Locator> locs = topic.getSubjectIdentifiers(); if (!locs.isEmpty()) { return "si:" + locs.iterator().next().toExternalForm(); } locs = topic.getSubjectLocators(); if (!locs.isEmpty()) { return "sl:" + locs.iterator().next().toExternalForm(); } locs = topic.getItemIdentifiers(); if (!locs.isEmpty()) { return "ii:" + locs.iterator().next().toExternalForm(); } return "ii:" + _baseIRI + "#" + topic.getId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTopic();", "String getTopic();", "public String getID()\n {\n return \"topic=\" + id;\n }", "Topic getTopic();", "long getTopic();", "public Topic readTopic(int topicId);", "@Override\n public String getTopic() {\n Object ref = topic_;\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 topic_ = s;\n return s;\n }\n }", "public Topic retrieveTopic(String topic) //from hashmap\r\n\t{\r\n\t\treturn topics.get(topic);\r\n\t}", "public String getTopic() {\n return topic;\n }", "String getNewTopic();", "public String getTopic() {\n return topic;\n }", "public String getTopic() {\n Object ref = topic_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n topic_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getTopic() {\n return this.topic;\n }", "public String getTopic() {\n\t\treturn topic;\n\t}", "String getOldTopic();", "public void setTopic( String topic ) {\n this.topic = topic;\n }", "String getTopicArn();", "public void setTopic(String topic) {\n this.topic = topic;\n }", "public static /* synthetic */ long m125927a(Topic topic) {\n return topic.headerCard.superTopic.question.f40362id;\n }", "public long getTopic() {\n return topic_;\n }", "com.google.ads.googleads.v6.resources.TopicConstant getTopicConstant();", "public static /* synthetic */ String m125945e(Topic topic) {\n return topic.headerCard.wallpaper.imageUrl;\n }", "public void setTopic(String topic) {\n\t\tthis.topic = topic;\n\t}", "public void setTopic(String topic) {\n\t\tthis.topic = topic;\n\t}", "public abstract void updateTopic(String topic);", "public long getTopic() {\n return topic_;\n }", "@Override\n public com.google.protobuf.ByteString\n getTopicBytes() {\n Object ref = topic_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n topic_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "void to(String topic);", "public PathElementIF createTopic(String type, String id);", "Publication getPubliRef();", "public Topic findTopic() {\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Enter the name of the Topic:\");\r\n String identifier = input.nextLine().trim();\r\n List<Topic> topicList;\r\n try {\r\n topicList = server.getTopics();\r\n } catch (RemoteException f) {\r\n System.err.println(\"Couldn't Connect to Server...\");\r\n return null;\r\n }\r\n try {\r\n for (Topic t : topicList ) {\r\n String topicName = t.getTopicName().toLowerCase();\r\n if (topicName.equals(identifier.toLowerCase())) {\r\n return t;\r\n }\r\n }\r\n System.out.println(\"Topic is not listed.\");\r\n\r\n } catch (NumberFormatException e) {\r\n System.err.println(\"This is not a Name\");\r\n }\r\n return null;\r\n }", "java.lang.String getConceptId();", "void setTopic(String topic);", "public void setTopic(Topic topic) {\n this.topic = topic;\n }", "VoteTopic getVoteTopicById(String voteTopicEncodedId);", "public static /* synthetic */ String m125944d(Topic topic) {\n return topic.headerCard.superTopic.superButton.text;\n }", "public Topic getTopic() {\n return topic;\n }", "public Topic getTopic() {\n\t\treturn topic;\n\t}", "String getReference();", "String getReference();", "@Override\n public synchronized Future<RpcResult<Void>> readTopic(ReadTopicInput input) {\n String topicId = input.getTopicId().getValue();\n // if requested TopicId has not been requested before then it is added into to register\n if (registeredTopic.contains(topicId) == false) {\n registeredTopic.add(topicId);\n LOG.info(\"UserAgent start read notification with TopicId {}\", topicId);\n }\n return immediateFuture(RpcResultBuilder.success((Void) null).build());\n }", "private TopicIF getTopic(TopicMapIF tm, TMObjectMatcherIF matcher) {\n if (matcher instanceof InternalTopicRefMatcher) {\n InternalTopicRefMatcher m = (InternalTopicRefMatcher) matcher;\n LocatorIF loc = tm.getStore().getBaseAddress()\n .resolveAbsolute(m.getRelativeURI());\n return (TopicIF) tm.getObjectByItemIdentifier(loc);\n \n } else if (matcher instanceof SourceLocatorMatcher) {\n SourceLocatorMatcher m = (SourceLocatorMatcher) matcher;\n return (TopicIF) tm.getObjectByItemIdentifier(m.getLocator());\n\n } else if (matcher instanceof SubjectIndicatorMatcher) {\n SubjectIndicatorMatcher m = (SubjectIndicatorMatcher) matcher;\n return tm.getTopicBySubjectIdentifier(m.getLocator());\n\n } else\n throw new OntopiaRuntimeException(\"INTERNAL ERROR: Illegal topic class\" +\n \" matcher: \" + matcher);\n }", "String getISOPref();", "@Override\n\t\t\t\tpublic void addTopic(String topic) {\n\t\t\t\t\t\tsendData(\"<new><name>\" + topic +\"</name></new>\");\n\t\t\t\t}", "com.flipkart.vbroker.proto.TopicSubscription getTopicSubscription();", "Object getRefid();", "public URI getId();", "public URI getId();", "public Topic readTopicByCode(String code);", "com.google.ads.googleads.v6.resources.TopicConstantOrBuilder getTopicConstantOrBuilder();", "public String getTopic() {\r\n return null;\r\n }", "String getIssueURI();", "UserTopic selectByPrimaryKey(Integer userid);", "public String getResourceId();", "public com.google.protobuf.ByteString\n getTopicBytes() {\n Object ref = topic_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n topic_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String subscriptionId();", "private void subscribeToTopic(String topic) {\n try {\n mqttAndroidClient.subscribe(topic, 0, null, new IMqttActionListener() {\n @Override\n public void onSuccess(IMqttToken asyncActionToken) {\n Log.w(\"MQTT\",\"Subscribed!\");\n }\n\n @Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Log.w(\"MQTT\", \"Subscribe fail!\");\n }\n });\n } catch (MqttException ex) {\n System.err.println(\"Exception whilst subscribing\");\n ex.printStackTrace();\n }\n }", "public String getReferenceId();", "protected TopicMapObject identifyByVariable(JellyContext ctx)\n throws JellyTagException {\n\n // name of variable supplied?\n if (variable == null)\n return null;\n\n Object o = ctx.getVariable(variable);\n String identifier = \"Variable \" + variable;\n return getReference(o, identifier);\n\n }", "public static /* synthetic */ String m125946f(Topic topic) {\n return topic.headerCard.title;\n }", "public\n String getTopicBindingName() {\n return topicBindingName;\n }", "public String getTopicName() {\n return topicName;\n }", "public String getURIDefinition(String prefix) {\n\t\treturn prefixToURIMap.get(prefix);\n\t}", "public void createTopic(String topic) {\n\n\t}", "public String getReference();", "public String getReference();", "public void subscribe(String topic, String inboundPortURI) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "private String getItemNameFromTopic(String topicDefinition, String actualTopic) {\n\n String itemName = \"error-parsing-name-from-topic\";\n if (StringUtils.isEmpty(actualTopic) || actualTopic.indexOf('/') == -1) {\n return itemName;\n }\n\n String[] definitionParts = topicDefinition.split(\"/\");\n String[] actualParts = actualTopic.split(\"/\");\n\n for (int i = 0; i < definitionParts.length; i++) {\n if (definitionParts[i].equalsIgnoreCase(\"+\")) {\n itemName = actualParts[i];\n break;\n }\n }\n return itemName;\n }", "String publisherIdentifier();", "public String getTopicName() {\n if (topicName.isPresent()) {\n return topicName.get();\n }\n return null;\n }", "int getResourceId();", "String getResourceID();", "public EI getHealthDocumentReferenceIdentifier() { \r\n\t\tEI retVal = this.getTypedField(19, 0);\r\n\t\treturn retVal;\r\n }", "public interface Constant {\n\n interface Topic{\n String DEFAULT_TOPIC= \"mqtt/send/luffy\";\n }\n}", "UserTopic selectByPrimaryKey(Integer id);", "public void subscribe(String topic, MessageFilterI filter, String inboundPortURI) {\n\n\t}", "protected TopicMapObject identifyByID(TopicMap tm) {\n\n // id of a topic supplied?\n if (id == null)\n return null;\n\n return tm.getObjectByID(id);\n\n }", "public String getTopicHandle() {\n return this.topicHandle;\n }", "public static /* synthetic */ String m125707d(Topic topic) {\n return topic.headerCard.title;\n }", "String getHelpTopic(String topic)\n {\n // Open the file fdbhelp*.txt that is a sibling of this class file.\n // (Note: build.xml copies it into the classes directory.)\n InputStream helpStream = Help.getResourceAsStream();\n if (helpStream == null)\n return getLocalizationManager().getLocalizedTextString(\"noHelpFileFound\"); //$NON-NLS-1$\n\n // Read the help file line-by-line, looking for topic lines like [Break].\n // Build an array of the lines within the section for the specified topic.\n topic = \"[\" + topic + \"]\"; //$NON-NLS-1$ //$NON-NLS-2$\n Vector<String> lines = new Vector<String>();\n BufferedReader r = null;\n try\n {\n r = new BufferedReader(new InputStreamReader(helpStream, \"UTF-8\")); //$NON-NLS-1$\n String line;\n // Read lines until we find the specified topic line.\n while ((line = r.readLine()) != null)\n {\n if (line.startsWith(topic))\n break;\n }\n // Read lines until we find the next topic line.\n while ((line = r.readLine()) != null)\n {\n if (line.startsWith(\"[\")) //$NON-NLS-1$\n break;\n lines.add(line);\n }\n }\n catch(FileNotFoundException fnf)\n\t\t{\n\t\t\terr(fnf.getLocalizedMessage());\n\t\t}\n catch(IOException e)\n\t\t{\n\t\t\terr(e.getLocalizedMessage());\n\t\t}\n finally\n {\n \tif (r != null)\n\t\t\t\ttry { r.close(); } catch (IOException e) { e.printStackTrace(); }\n }\n\n // Concatenate the lines, leaving out the first and last ones\n // which are supposed to be blank. They're only there to make\n // fdbhelp*.txt more readable.\n StringBuilder helpText = new StringBuilder();\n int n = lines.size();\n for (int i = 1; i < n - 1; i++)\n {\n String line = lines.get(i);\n helpText.append(line);\n if (i != n - 2)\n helpText.append(m_newline);\n }\n\n return helpText.toString();\n }", "public String getURI(int index) {\n return libsbmlJNI.XMLNamespaces_getURI__SWIG_0(swigCPtr, this, index);\n }", "String resourceGuid();", "public static String getIDFromW3CEndPointReference(\n W3CEndpointReference endpointReference) {\n if (endpointReference == null) {\n return null;\n }\n\n int j0 = endpointReference.toString().indexOf(\"<job \") + 5;\n j0 = endpointReference.toString().indexOf(\">\", j0) + 1;\n\n int j1 = endpointReference.toString().indexOf(\"</job>\");\n return endpointReference.toString().substring(j0, j1);\n }", "public DefaultAuthor(int id, Topic topic)\n\t\tthrows TarlException {\n\t\tif (topic == null)\n\t\t\tthrow (new TarlException(new String(\n\t\t\t \"Authors need to have a valid topic\\n\")));\n\n\t\tthis.id = id;\n\t\tthis.topic = topic;\n\t}", "com.google.ads.googleads.v6.resources.TopicView getTopicView();", "public abstract String getRefKey();", "public Topic getTopic(String id) {\n\t\treturn topicRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException(id));\n\t}", "public boolean isTopic(String topic) {\n\t\treturn false;\n\t}", "public String getResourceName(String ref){\n\t\treturn getResourceName(ref, true);\n\t}", "public String getTopic() {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_topic == null)\n jcasType.jcas.throwFeatMissing(\"topic\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_topic);}", "String partnerTopicFriendlyDescription();", "public static String getFullNamespaceName(String topicUri) {\n // Get tenant/namespace string\n // - topicUri : persistent://<tenant>/<namespace>/<topic>\n // - tmpStr : <tenant>/<namespace>/<topic>\n // - fullNsName : <tenant>/<namespace>\n\n String tmpStr = StringUtils.substringAfter(topicUri,\"://\");\n return StringUtils.substringBeforeLast(tmpStr, \"/\");\n }", "java.lang.String getRef();", "public boolean getTopic(String topic)throws Exception{\r\n\r\n\t\tAdminClient adminClient = AdminClient.create(propTopic);\r\n\r\n\t\tListTopicsOptions listTopicsOptions = new ListTopicsOptions();\r\n\t\tlistTopicsOptions.listInternal(true);\r\n\t\t\r\n\t\tSystem.out.println(adminClient.listTopics(listTopicsOptions).names().get());\r\n\t\tSystem.out.println();\r\n\t\tSet<String> topicsList = adminClient.listTopics(listTopicsOptions).names().get();\r\n\t\t\r\n\t\tif(topicsList.contains(topic))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public void subscribe(final Topic topic) {\r\n new Thread(new Runnable() {\r\n public void run() {\r\n int attempts = 0;\r\n while(++attempts < 20){\r\n try {\r\n if(server.addSubscriber((PubSubAgent.this.agentID), topic)){\r\n subscriberTopics.add(topic);\r\n System.out.print(\"Subscribed.\");\r\n return;\r\n }\r\n } catch (RemoteException e) {\r\n System.err.println(\"Could not connect to server. Retrying...\");\r\n try {\r\n Thread.sleep(1200);\r\n } catch (InterruptedException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }\r\n System.err.println(\"Couldn't subscribe to \" + topic.getTopicID() + \" - \" + topic.getTopicName());\r\n }\r\n }).start();\r\n }", "public void mo110582a(Topic topic) {\n m125716j();\n this.f88305c.setText(C25382r.m123889a(new C25382r.AbstractC25387e() {\n /* class com.zhihu.android.topic.platfrom.$$Lambda$TopicFragment$pYgrdsywRofB9NlDjKoUu5Rm4cY */\n\n @Override // com.zhihu.android.topic.p1945h.C25382r.AbstractC25387e\n public final String get() {\n return TopicFragment.m125707d(Topic.this);\n }\n }));\n TopicCommonUtil.m123935a(this.f88309g, this.f90231x.mo109391a(this.f88309g, topic));\n m125701b(topic);\n m125725t();\n m125717l();\n this.f90231x.mo109394a(topic);\n m125726u();\n TopicApmUtil.m123915d();\n TopicApmUtil.m123911a(true);\n }", "public interface IdentifierIndexIF extends IndexIF {\n \n /**\n * PUBLIC: Returns all the item identifiers of all the objects in the topicmap.\n * @return all the item identifiers of all the objects in the topicmap.\n * @since 5.4.0\n */\n Collection<LocatorIF> getItemIdentifiers();\n\n /**\n * PUBLIC: Returns all the item identifiers of all the objects in the topicmap that start with\n * the provided prefix.\n * @return all the matched item identifiers\n * @since 5.4.0\n */\n Collection<LocatorIF> getItemIdentifiersByPrefix(String prefix);\n \n /**\n * PUBLIC: Returns all the subject identifiers of all the topics in the topicmap.\n * @return all the subject identifiers of all the topics in the topicmap.\n * @since 5.4.0\n */\n Collection<LocatorIF> getSubjectIdentifiers();\n\n /**\n * PUBLIC: Returns all the subject identifiers of all the topics in the topicmap that start with\n * the provided prefix.\n * @return all the matched subject identifiers\n * @since 5.4.0\n */\n Collection<LocatorIF> getSubjectIdentifiersByPrefix(String prefix);\n \n}", "@Override\n\tpublic Topic getTopic(String categoryId, String forumId, String topicId,\n\t\t\tString userRead) throws Exception {\n\t\treturn null;\n\t}", "private TopicModel getFileTopic() {\n return topic.getModel().getCompositeValueModel().getTopic(FILE);\n }", "String translateNamespacePrefixToUri(String prefix, Object element);" ]
[ "0.62834793", "0.62834793", "0.6280863", "0.60954016", "0.5957849", "0.5955355", "0.5898314", "0.57047474", "0.56981856", "0.5644421", "0.56178147", "0.5596301", "0.559058", "0.5588452", "0.5574919", "0.55378735", "0.550792", "0.54836756", "0.5438086", "0.5425816", "0.5413976", "0.53933287", "0.53577495", "0.53577495", "0.5355776", "0.53506374", "0.53009796", "0.52935606", "0.52918065", "0.5269519", "0.52566534", "0.5250288", "0.5246213", "0.51949227", "0.51946986", "0.5183229", "0.51796705", "0.5178497", "0.51780087", "0.51780087", "0.51497924", "0.51455754", "0.5131762", "0.51235044", "0.51204014", "0.5107759", "0.5102766", "0.5102766", "0.5072615", "0.5056813", "0.5047627", "0.5042066", "0.5022319", "0.5014668", "0.50145775", "0.50143105", "0.5004102", "0.5000637", "0.49975732", "0.49842867", "0.49806213", "0.49777383", "0.49652815", "0.495535", "0.49549288", "0.49549288", "0.4938081", "0.49295583", "0.49061665", "0.49014437", "0.48973823", "0.4887525", "0.4886606", "0.48837906", "0.48674238", "0.4864015", "0.4863319", "0.4863042", "0.48409787", "0.48270524", "0.4825136", "0.48123443", "0.481137", "0.4800439", "0.4790749", "0.47884512", "0.4787435", "0.4785293", "0.47813386", "0.47686517", "0.47675973", "0.4761754", "0.47544986", "0.47515172", "0.47429535", "0.4738672", "0.47384465", "0.4712201", "0.47091022", "0.46955526" ]
0.8112269
0
/ Building a search query
@Override public Flowable<Row> streamMarcRecordIds(ParseLeaderResult parseLeaderResult, ParseFieldsResult parseFieldsResult, RecordSearchParameters searchParameters, String tenantId) { SelectJoinStep searchQuery = DSL.selectDistinct(RECORDS_LB.EXTERNAL_ID).from(RECORDS_LB); appendJoin(searchQuery, parseLeaderResult, parseFieldsResult); appendWhere(searchQuery, parseLeaderResult, parseFieldsResult, searchParameters); if (searchParameters.getOffset() != null) { searchQuery.offset(searchParameters.getOffset()); } if (searchParameters.getLimit() != null) { searchQuery.limit(searchParameters.getLimit()); } /* Building a count query */ SelectJoinStep countQuery = DSL.select(countDistinct(RECORDS_LB.EXTERNAL_ID)).from(RECORDS_LB); appendJoin(countQuery, parseLeaderResult, parseFieldsResult); appendWhere(countQuery, parseLeaderResult, parseFieldsResult, searchParameters); /* Join both in one query */ String sql = DSL.select().from(searchQuery).rightJoin(countQuery).on(DSL.trueCondition()).getSQL(ParamType.INLINED); return getCachedPool(tenantId) .rxGetConnection() .flatMapPublisher(conn -> conn.rxBegin() .flatMapPublisher(tx -> conn.rxPrepare(sql) .flatMapPublisher(pq -> pq.createStream(10000) .toFlowable() .filter(row -> !enableFallbackQuery || row.getInteger(COUNT) != 0) .switchIfEmpty(streamMarcRecordIdsWithoutIndexersVersionUsage(conn, parseLeaderResult, parseFieldsResult, searchParameters)) .map(this::toRow)) .doAfterTerminate(tx::commit))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CampusSearchQuery generateQuery();", "public String buildSearchQuery() throws Exception\r\n { \r\n String query;\r\n \r\n searchContext.setText(getSearchString());\r\n \r\n if(!locations.isEmpty())\r\n {\r\n searchContext.setLocations(locations);\r\n }\r\n\r\n if (ext != null) {\r\n for (AdvancedSearchOptions option : ext.getAdvOptionsExtensions()) {\r\n option.setSearchParam(searchContext);\r\n }\r\n }\r\n \r\n // we always want to exclude CAT ignore & hidden rendition aspects\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_IGNORE);\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_HIDDEN_RENDITION);\r\n\r\n // we always want to exclude thumbnail types\r\n searchContext.addTypeToExclude(VeloConstants.TYPE_THUMBNAIL);\r\n \r\n query = searchContext.buildQuery(2);\r\n logger.debug(\"AdvancedSearchQuery:\" + query);\r\n \r\n return query;\r\n \r\n }", "SearchResponse query(SearchRequest request, Map<SearchParam, String> params);", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "List<SearchResult> search(SearchQuery searchQuery);", "TSearchQuery prepareSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "public String buildFilterString(SearchCriteria search){\n System.out.println(search);\n\n int i = 0;\n if(search.getTitle().equals(\"title\")){\n i++;\n }\n if(search.getAuthor().equals(\"author\")){\n i++;\n }\n if(search.getPublisher().equals(\"publisher\")){\n i++;\n }\n if(search.getLanguage().equals(\"language\")){\n i++;\n }\n if(search.getFormat().equals(\"format\")){\n i++;\n }\n if(search.getIsbn10().equals(\"isbn10\")){\n i++;\n }\n if(search.getIsbn13().equals(\"isbn13\")){\n i++;\n }\n\n String filter = \"SELECT * from testdb.book WHERE\";\n System.out.println(filter);\n System.out.println(\"number of filters \" + i);\n if(search.getTitle().equals(\"title\")){\n i--;\n System.out.println(filter);\n\n filter += \" title LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n\n filter += \" OR\";\n\n }\n }\n if(search.getAuthor().equals(\"author\")){\n i--;\n filter += \" author LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n\n filter += \" OR\";\n\n }\n }\n if(search.getPublisher().equals(\"publisher\")){\n i--;\n filter += \" publisher LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter +=\" OR\";\n\n }\n }\n if(search.getLanguage().equals(\"language\")){\n i--;\n filter += \" language LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getFormat().equals(\"format\")){\n i--;\n filter += \" format LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getIsbn10().equals(\"isbn10\")){\n i--;\n filter += \" isbn10 LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getIsbn13().equals(\"isbn13\")){\n\n filter += \" isbn13 LIKE '%\" + search.getSearch() + \"%'\";\n\n }\n System.out.println(\"END \" + filter);\n return filter;\n }", "TSearchQuery createSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "protected StringBuilder generateQuery() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" FROM \") \n .append(dao.getParameterClass(0).getName())\n .append(\" d WHERE (:incorrectEvent = '' OR d.incorrectEvent.id = :incorrectEvent) \")\n .append(\"AND (d.createDate BETWEEN :dateFrom AND :dateTo ) \")\n .append(\"AND ( ((:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName) \")\n .append(\" OR (:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName)) \")\n .append(\" OR (:search='' OR d.searchField LIKE :search) ) \");\n return sb;\n }", "List<TypePatientPropertyCondition> search(String query);", "List<Corretor> search(String query);", "public Query( String queryString ) {\r\n\tStringTokenizer tok = new StringTokenizer( queryString );\r\n\twhile ( tok.hasMoreTokens() ) {\r\n\t terms.add( tok.nextToken() );\r\n\t weights.add( new Double(1) );\r\n\t} \r\n }", "Search getSearch();", "java.lang.String getQuery();", "java.lang.String getQuery();", "public String getANDClause()\n {\n StringBuilder builder = new StringBuilder();\n\n String colName;\n String term;\n\n for (int i = 0; i < columnNames.length; i++)\n {\n colName = columnNames[i];\n\n String[] terms = Spans.prepareStrings(keywords);\n\n builder.append(\"(\");\n for(int j = 0; j < terms.length; j++)\n {\n term = terms[j];\n builder.append(colName + \" LIKE '%\"+ term + \"%'\" );\n\n if (j != terms.length - 1)\n {\n builder.append(\" AND \");\n }\n }\n builder.append(\")\");\n\n if (i != columnNames.length - 1)\n {\n builder.append(\" OR \");\n }\n }\n\n return builder.toString();\n }", "List<ShipmentInfoPODDTO> search(String query);", "List<Cemetery> search(String query);", "private String getQueryString(String searchType) {\n String queryString;\n\n if (searchType.equals(\"employeeId\")) {\n queryString = \"SELECT * FROM employees WHERE emp_id = ?\";\n } else if (searchType.equals(\"firstName\")) {\n queryString = \"SELECT * FROM employees WHERE first_name LIKE ?\";\n } else {\n queryString = \"SELECT * FROM employees WHERE last_name LIKE ?\";\n }\n\n\n return queryString;\n }", "List<OwnerOperatorDTO> search(String query);", "List<ResultDTO> search(String query);", "private static SolrQuery getSolrQuery(OrganizationSearch4Solr request, int start, int end) {\n\t\tSolrQuery query = new SolrQuery();\r\n\t\tquery.setHighlight(true).setStart(start);\r\n query.setTermsLimit(500);\r\n query.setRows(20000);\r\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"wt\", \"json\");\r\n map.put(\"indent\", \"true\");\r\n StringBuilder queryPrams = new StringBuilder();\r\n queryPrams.append(\"{!q.op=OR}+isOutOfBusiness:false AND \");\r\n if (!StringUtils.isEmpty(request.getOrgId())) {\r\n \tqueryPrams.append(\"organizationId:\" + request.getOrgId() + \" AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getSiteinstanceId())) {\r\n \tqueryPrams.append(\"siteInstanceId:\" + request.getSiteinstanceId() + \" AND \");\r\n }\r\n List<String> orgIdList = request.getOrgIdList();\r\n if (orgIdList != null && orgIdList.size() > 0) {\r\n \tString idsString = \"+organizationId:(\";\r\n \tfor (String orgId : orgIdList) {\r\n \tidsString += orgId + \" \";\r\n\t\t\t}\r\n \tidsString = idsString.substring(0, idsString.length()-1) + \")\";\r\n \tqueryPrams.append(idsString + \" AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getTaxID())) {\r\n \tqueryPrams.append(\"taxIds:(\\\"\" + request.getTaxID() + \"\\\") AND \");\r\n }\r\n String orgName = request.getOrgName();\r\n if (!StringUtils.isEmpty(orgName)) {\r\n \torgName = \"(\"+ orgName +\")\";\r\n \t\t// LATIN\r\n \t\tqueryPrams.append(\"(+(organizationExtendedName:\" + orgName + \" \");\r\n \t\t// NOLATIN\r\n \t\tqueryPrams.append(\"organizationNonLatinExtendedName:\" + orgName + \" \");\r\n \t\t// ReportingName\r\n \t\tqueryPrams.append(\"organizationReportingName:\" + orgName + \" \");\r\n \t\t// LegalName\r\n \t\tqueryPrams.append(\"organizationLegalName:\" + orgName + \" \");\r\n \t\t// tradeName\r\n \t\tqueryPrams.append(\"tradeStyleNames:\" + orgName + \")) AND \");\r\n }\r\n String cityName = request.getCityName();\r\n if (!StringUtils.isEmpty(cityName)) {\r\n \t\t// LATIN\r\n \t\tqueryPrams.append(\"(+(latinCity:(\\\"\" + cityName + \"\\\") \");\r\n \t\t// NOLATIN\r\n \t\tqueryPrams.append(\"nonlatinCity:(\\\"\" + cityName + \"\\\"))) AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getPostalCode())) {\r\n queryPrams.append(\"postalCode:(\" + request.getPostalCode() + \"*) AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getCountryCode())) {\r\n queryPrams.append(\"countryCode:(\" + request.getCountryCode() + \") AND \");\r\n }\r\n String state = request.getStateProvinceName();\r\n if (!StringUtils.isEmpty(state)) {\r\n \tif(state.matches(\"\\\\p{ASCII}+\")){\r\n \t\t// LATIN\r\n queryPrams.append(\"state:(\\\"\" + state + \"\\\") AND \");\r\n \t}else{\r\n \t\t// NOLATIN\r\n queryPrams.append(\"state:(\\\"\" + state + \"\\\") AND \");\r\n \t}\r\n }\r\n\r\n queryPrams.append(\" *:* \");\r\n \r\n SolrParams params = new MapSolrParams(map);\r\n \r\n query.add(params);\r\n query.setQuery(queryPrams.toString());\r\n\t\treturn query;\r\n\t}", "SearchResponse search(SearchRequest searchRequest) throws IOException;", "List<Revenue> search(String query);", "TSearchResults createSearchResults(TSearchQuery searchQuery);", "@Test\n public void testSearchFilter_WithoutAddedSearchBase_WithoutParensInQuery_WithoutParensInParam() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n BridgeError expectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "SearchResponse search(Pageable pageable, QueryBuilder query, Collection<AggregationBuilder> aggregations);", "@In String search();", "SearchResponse search(Pageable pageable, QueryBuilder query, AggregationBuilder aggregation);", "List<DataTerm> search(String searchTerm);", "SpellResponse spellQuery(SearchRequest request, Map<SearchParam, String> params);", "public static interface SearchType\n\t{\n\t\t/**\n\t\t * Creates a search of this type with the given query\n\t\t * \n\t\t * @param search The search query\n\t\t * @param builder The search builder that is compiling the search\n\t\t * @return The compiled search object representing the given query\n\t\t */\n\t\tpublic abstract Search create(String search, SearchBuilder builder);\n\n\t\t/** @return All headers that may begin a search of this type */\n\t\tpublic abstract String [] getHeaders();\n\t}", "@Test\n public void testSearchFilter_WithoutAddedSearchBase_WithoutParensInQuery_WithParensInParam() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "abstract public void search();", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "@Test\n public void testSearchFilter_WithAddedSearchBase_NoQueryParens() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"OU=Users(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "Page<T> search(Pageable pageable, QueryBuilder query);", "public abstract String createQuery();", "public Search createSearch(String searchText)\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder(searchText);\n\t\t\ttrim(sb);\n\t\t\tSearch current = null;\n\t\t\twhile(sb.length() > 0)\n\t\t\t{\n\t\t\t\tboolean not = false;\n\t\t\t\tif(sb.length() > 1 && lower(sb.charAt(0)) == 'o' && lower(sb.charAt(1)) == 'r')\n\t\t\t\t{ // OR operator\n\t\t\t\t\tsb.delete(0, 2);\n\t\t\t\t\tExpressionSearch exp = exp(false);\n\t\t\t\t\texp.add(current);\n\t\t\t\t\tcurrent = exp;\n\t\t\t\t\ttrim(sb);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 2 && lower(sb.charAt(0)) == 'a' && lower(sb.charAt(1)) == 'n'\n\t\t\t\t\t&& lower(sb.charAt(2)) == 'd')\n\t\t\t\t{\n\t\t\t\t\tsb.delete(0, 3);\n\t\t\t\t\ttrim(sb);\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 1 && sb.charAt(0) == '!')\n\t\t\t\t{\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\ttrim(sb);\n\t\t\t\t\tnot = true;\n\t\t\t\t}\n\n\t\t\t\tSearch next;\n\t\t\t\tif(sb.charAt(0) == '(')\n\t\t\t\t{\n\t\t\t\t\tint c = goPastParen(sb, 0);\n\t\t\t\t\tString nextExpr = sb.substring(1, c).trim();\n\t\t\t\t\tif(nextExpr.length() == 0)\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Empty parenthetical expression\");\n\t\t\t\t\tnext = createSearch(nextExpr);\n\t\t\t\t\tsb.delete(0, c + 1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tnext = parseNext(sb);\n\t\t\t\tif(not)\n\t\t\t\t{\n\t\t\t\t\tNotSearch notS = not();\n\t\t\t\t\tnotS.setOperand(next);\n\t\t\t\t\tnext = notS;\n\t\t\t\t}\n\n\t\t\t\tif(current instanceof ExpressionSearch\n\t\t\t\t\t&& ((ExpressionSearch) current).getOperandCount() == 1)\n\t\t\t\t\t((ExpressionSearch) current).add(next);\n\t\t\t\telse if(current != null)\n\t\t\t\t{\n\t\t\t\t\tExpressionSearch exp = exp(true);\n\t\t\t\t\texp.addOps(current, next);\n\t\t\t\t\tcurrent = exp;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcurrent = next;\n\n\t\t\t\ttrim(sb);\n\t\t\t}\n\t\t\tif(current instanceof ExpressionSearch)\n\t\t\t\t((ExpressionSearch) current).simplify();\n\t\t\treturn current;\n\t\t}", "private String buildQuery(String ... sql) {\n\t\tfinal StringBuffer sb = new StringBuffer();\n\t\t\n\t\tfor (String s : sql) {\n\t\t\tsb.append(ParsingUtil.QUERY + \" \" + s + \"\\n\");\n\t\t}\n\t\t\n\t\treturn sb.toString(); \n\t}", "private SearchQuery(String _query, WebSearchType webSearchType) {\n this._query = _query;\n this._Web_search = webSearchType;\n }", "public MagicSearch createMagicSearch();", "void searchForProducts(String searchQuery) {\n if (searchQuery.isEmpty()) {\n searchQuery = \"%\";\n } else {\n searchQuery = \"%\" + searchQuery + \"%\";\n }\n filter.postValue(searchQuery);\n }", "public synchronized String querySearch(String query) {\n Set<Restaurant> matching;\n try {\n matching = getMatches(query);\n } catch (IllegalArgumentException e) {\n return \"ERR: INVALID_QUERY\";\n }\n if (matching.isEmpty()) {\n return \"ERR: NO_MATCH\";\n } else {\n return gson.toJson(matching);\n }\n }", "private void appendSearchParam(String query, HttpUrl.Builder urlBuilder) {\n urlBuilder.addQueryParameter(\"generator\", \"search\")\n .addQueryParameter(\"gsrwhat\", \"text\")\n .addQueryParameter(\"gsrnamespace\", \"6\")\n .addQueryParameter(\"gsrlimit\", \"25\")\n .addQueryParameter(\"gsrsearch\", query);\n }", "public void parseQueryStringAndSearch(String searchString) {\n char[] chars = searchString.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n Queue<Character> queue;\n int k;\n if (Character.isDigit(chars[i])) {\n k = Integer.parseInt(String.valueOf(chars[i]));\n i++;\n queue = new LinkedList<>();\n while (i < chars.length && chars[i] != ')') {\n queue.add(chars[i]);\n i++;\n }\n i++;\n String query = queryToString(queue);\n String[] terms = query.split(\" \");\n //System.out.println(query + \" and k: \" + k);\n positionIntersects(indexMap.get(analyzeTerm(terms[0])), indexMap.get(analyzeTerm(terms[1])), k);\n } else {\n queue = new LinkedList<>();\n while (i < chars.length && !Character.isDigit(chars[i])) {\n queue.add(chars[i]);\n i++;\n }\n i--;\n String query = queryToString(queue);\n String[] terms = query.trim().split(\" \");\n termQuerySearch(terms);\n }\n\n }\n\n }", "List<ResultDTO> searchUser(String query);", "public Query createQuery() {\n\n String queryString = getQueryString();\n\n if (debug == true) {\n logger.info( \"Query String: {0}\", queryString);\n logger.info( \"Parameters: Max Results: {0}, First result: {1}, Order By: {2}, Restrictions: {3}, Joins: {4}\", new Object[]{maxResults, firstResult, orderBy, normalizedRestrictions, joins});\n }\n\n Query query = entityManager.createQuery(queryString);\n\n List<QueryParameter> parameters = getQueryParameters();\n for (QueryParameter parameter : parameters) {\n //dates (Date and Calendar)\n if (parameter.getTemporalType() != null && (parameter.getValue() instanceof Date || parameter.getValue() instanceof Calendar)) {\n if (parameter.getValue() instanceof Date) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Date) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Date) parameter.getValue(), parameter.getTemporalType());\n }\n }\n } else if (parameter.getValue() instanceof Calendar) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n }\n }\n }\n } else {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), parameter.getValue());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), parameter.getValue());\n }\n }\n }\n }\n\n if (maxResults != null) {\n query.setMaxResults(maxResults);\n }\n if (firstResult != null) {\n query.setFirstResult(firstResult);\n }\n return query;\n }", "protected abstract String createSnpSearchQueryStr(HashMap<String,String> paramMap);", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "String getQuery();", "public static SearchQuery buildFullTextQuery(String searchData, PageRequest pageRequest) {\n QueryBuilder builder = generateDefaultQueryBuilderForFullTextSearch(searchData);\n FunctionScoreQueryBuilder functionBuilder = QueryBuilders.functionScoreQuery(builder);\n functionBuilder.add(ScoreFunctionBuilders\n .exponentialDecayFunction(Constants.DB_FIELD_RECEIVED_DATE, DEFAULT_DECAY_FOR_RECEIVED_DATE));\n\n return new NativeSearchQueryBuilder().withQuery(functionBuilder).withPageable(pageRequest).build();\n }", "public void search() {\n try {\n for(int i = 0; i < this.queries.size(); i++){\n search(i);\n // in case of error stop\n if(!this.searchOK(i)){\n System.out.println(\"\\t\" + new Date().toString() + \" \" + db + \" Search for rest queries cancelled, because failed for query \" + i + \" : \" + this.queries.get(i));\n break;\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(EntrezSearcher.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void createSearch(boolean realSearch) {\n\n\t\tString sqlQuery = new String();\n\n\t\tif (useLucene.isSelected()) {\n\n\t\t\tif (datachoose.getSelectedIndex() == data_ABOVE) {\n\t\t\t\t// need to reference the above data.\n\t\t\t\tString usp = (String) winG.getSelectedUser();\n\t\t\t\tString dates[] = winG.getDateRange_toptoolbar();\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email where sender = '\" + usp + \"' or rcpt = '\" + usp\n\t\t\t\t\t\t+ \"' and dates BETWEEN '\" + dates[winGui.startDate] + \"' AND '\" + dates[winGui.endDate]\n\t\t\t\t\t\t+ \"' \";\n\n\t\t\t} else if (datachoose.getSelectedIndex() == data_ALL) {\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email where type like 'text%'\";\n\t\t\t} else {\n\t\t\t\t// need to pop up sql\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email \" + queryText.getText().trim();\n\t\t\t}\n\n\t\t\tString results[][];\n\t\t\t// actual fetch of data\n\t\t\ttry {\n\t\t\t\tsynchronized (DBConnect) {\n\t\t\t\t\tresults = DBConnect.getSQLData(sqlQuery);\n\t\t\t\t}\n\t\t\t} catch (SQLException sqle) {\n\t\t\t\tsqle.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!realSearch) {\n\n\t\t\t\tJOptionPane.showMessageDialog(SearchEMT.this, \"The number of returned mailrefs are: \" + results.length);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tBusyWindow bw = new BusyWindow(\"Search Engine Setup\", \"Running\",true);\n\t\t\tbw.setMax(results.length);\n\t\t\tbw.setVisible(true);\n\t\t\t// need to setup prefetch cache\n\t\t\ttry {\n\t\t\t\tPreparedStatement ps = DBConnect\n\t\t\t\t\t\t.prepareStatementHelper(\"select hash,filename,type,body from message where mailref=?\");\n\n\t\t\t\t// real search need to build index here\n\t\t\t\t// TODO: see about adding path between folder and name\n\t\t\t\tIndexWriter writer = null;\n\t\t\t\t// stopanalyzer\n\t\t\t\t//writer = new IndexWriter(indexfolder + indexName.getText().trim(), new StandardAnalyzer(), true);\n\t\t\t\twriter = new IndexWriter(getIndexFileName(indexName.getText()), analyzer, true);\n\n\t\t\t\tDate start = new Date();\n\t\t\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\t\t\tbw.progress(i);\n\n\t\t\t\t\tps.setString(1, results[i][0]);\n\n\t\t\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tString type = rs.getString(3).toLowerCase();\n\n\t\t\t\t\t\tif (type.startsWith(\"image\") || type.startsWith(\"video\") || type.startsWith(\"audio\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tString hash = rs.getString(1);\n\t\t\t\t\t\tString name = rs.getString(2);\n\n\t\t\t\t\t\t// make a new, empty document\n\t\t\t\t\t\tDocument doc = new Document();\n\n\t\t\t\t\t\t// Add the path of the file as a field named \"path\". Use\n\t\t\t\t\t\t// a Text field, so\n\t\t\t\t\t\t// that the index stores the path, and so that the path\n\t\t\t\t\t\t// is searchable\n\t\t\t\t\t\tdoc.add(new Field(\"path\", hash,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Date\", results[i][1],Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Type\", type,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Name\", name,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Mailref\", new String(results[i][0]),Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\t// Add the last modified date of the file a field named\n\t\t\t\t\t\t// \"modified\". Use a\n\t\t\t\t\t\t// Keyword field, so that it's searchable, but so that\n\t\t\t\t\t\t// no attempt is made\n\t\t\t\t\t\t// to tokenize the field into words.\n\t\t\t\t\t\t// doc.add(Field.Keyword(\"modified\",\n\t\t\t\t\t\t// DateField.timeToString(f.lastModified())));\n\n\t\t\t\t\t\t// Add the contents of the file a field named\n\t\t\t\t\t\t// \"contents\". Use a Text\n\t\t\t\t\t\t// field, specifying a Reader, so that the text of the\n\t\t\t\t\t\t// file is tokenized.\n\t\t\t\t\t\t// ?? why doesn't FileReader work here ??\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tjava.sql.Blob blob = rs.getBlob(4);\n\t\t\t\t\t\t\tint c;\n\t\t\t\t\t\t\tbyte buf[] = new byte[512];//\n\n\t\t\t\t\t\t\tInputStream is = blob.getBinaryStream();\n\t\t\t\t\t\t\tStringBuffer small2 = new StringBuffer(256);\n\t\t\t\t\t\t\twhile ((c = is.read(buf)) != -1) {\n\t\t\t\t\t\t\t\tsmall2.append(new String(buf, 0, c));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString bodytext = small2.toString();\n\n\t\t\t\t\t\t\tdoc.add(new Field(\"contents\", bodytext,Field.Store.YES, Field.Index.TOKENIZED));\n\n\t\t\t\t\t\t\t// now to insert this doc.\n\t\t\t\t\t\t\twriter.addDocument(doc);\n\t\t\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\t\t\tioe.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbw.setTitle(\"optimizing\");\n\t\t\t\twriter.optimize();\n\t\t\t\twriter.close();\n\n\t\t\t\tDate end = new Date();\n\n\t\t\t\tSystem.out.print(end.getTime() - start.getTime());\n\t\t\t\tSystem.out.println(\" total milliseconds\");\n\n\t\t\t\tbw.setVisible(false);\n\n\t\t\t} catch (SQLException se) {\n\t\t\t\tse.printStackTrace();\n\t\t\t\treturn;\n\t\t\t} catch (IOException eio) {\n\t\t\t\teio.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t} else {\n\t\t\t// we use emt indexing\n\t\t\t// TODO: create code here\n\n\t\t}\n\t}", "List<Codebadge> search(String query);", "public SearchResponse search(SearchRequest request) throws SearchServiceException;", "public String toQuery() {\n // determine ordering\n String ordering = \"\";\n if (ratingFirst) {\n ordering += \"ORDER BY rating\" + (ratingDescend ? \" DESC, \" : \", \") +\n (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\");\n } else {\n ordering += \"ORDER BY \" + (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\")\n + \", rating\" + (ratingDescend ? \" DESC\" : \"\");\n }\n\n // determine pagination offsets\n String pagination = \"\";\n if (pageNumber > 1) {\n pagination += \"\\nLIMIT 100\\nOFFSET \" + (convertToBase() - 1) * 100 + \";\";\n }\n\n return query + ordering + pagination;\n }", "Query createQuery(final String query);", "String getWhereClause();", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "public Query<T, R> build() {\n // if criteria.size == 0, rootCriterion = null\n Criterion rootCriterion = null;\n if (criteria.size() == 1) {\n rootCriterion = criteria.get(0);\n } else if (criteria.size() > 1) {\n rootCriterion = Restrictions.and(criteria\n .toArray(new Criterion[criteria.size()]));\n }\n return new QueryImpl<T, R>(entityClass, returnType, rootCriterion,\n orderings, maxResults, returnFields);\n }", "private void Searchdata() {\r\n Connection con;\r\n String searchby;\r\n String sortby;\r\n String keyword;\r\n \r\n searchby = (String)cboSearchby.getSelectedItem();\r\n sortby = (String)cboSortby.getSelectedItem();\r\n keyword = txfSearch.getText();\r\n try {\r\n con = ClassSQL.getConnect();\r\n Statement stmt = con.createStatement();\r\n String sql = Searchstmt(searchby,sortby,keyword);\r\n // System.out.println(sql); //for testing purposes\r\n stmt.executeQuery(sql);\r\n con.close();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n // Place code in here that will always be run.\r\n }\r\n }", "public abstract List createQuery(String query);", "@Test\n public void testSearchFilter_WithAddedSearchBaseAsParam() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search Base Append\\\"]%>(<%=parameter[\\\"Search String\\\"]%>)\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n parameters.put(\"Search Base Append\", \"OU=Users\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "public Search(Connection con, String inpt) {\n index = 0;\n conn = con;\n results = new ArrayList<>();\n input = inpt;\n query(conn, input);\n }", "private Query getQuery(String index, String type, String query){\r\n\t\tSearchQuery esQuery = new SearchQuery();\r\n\t\tesQuery.setIndex(this.indexName);\r\n\t\t\r\n\t\tif(StringUtils.isNotEmpty(type))\r\n\t\t\tesQuery.setType(type);\r\n\t\t\r\n\t\tesQuery.setQuery(query);\r\n\t\t\r\n\t\treturn esQuery;\t\t\r\n\t}", "public String asWhereClause() {\r\n LinkedList<String> whereClause = new LinkedList<>();\r\n \r\n if (noInduk != null && !noInduk.isEmpty())\r\n whereClause.add(noIndukColName + \" LIKE '%\" + noInduk + \"%'\");\r\n \r\n if (currentLevel != null)\r\n whereClause.add(currentLevelColName + \" LIKE '%\" + currentLevel.asWhereClause() + \"%'\");\r\n \r\n if (biodata != null){\r\n String wc = biodata.asWhereClause();\r\n if(wc != null && !wc.isEmpty())\r\n whereClause.add(wc);\r\n }\r\n \r\n if (tanggalMasuk != null)\r\n whereClause.add(tanggalMasukColName + \" LIKE '%\" + tanggalMasuk.asWhereClause(true) + \"%'\");\r\n \r\n if (tanggalLulus != null)\r\n whereClause.add(tanggalLulusColName + \" LIKE '%\" + tanggalLulus.asWhereClause(true) + \"%'\");\r\n if (gelombang != null)\r\n whereClause.add(gelombangColName + \" = '\" + gelombang + \"'\");\r\n if (statusPendaftaran != null)\r\n whereClause.add(statusPendaftaranColName + \" = '\" + statusPendaftaran + \"'\");\r\n if (lastUpdateDate != null)\r\n whereClause.add(lastUpdateDateColName + \" LIKE '%\" + lastUpdateDate.asWhereClause(true) + \"%'\");\r\n return whereClause.isEmpty()? \"\" : StringUtils.join(whereClause, \" AND \");\r\n }", "SearchResultCompany search(String keywords);", "private String createWhere() {\n String where = \"\";\n if (getLatitude() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + LATITUDE + \"=\" + getLatitude(\"\");\n } // if getLatitude\n if (getLongitude() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + LONGITUDE + \"=\" + getLongitude(\"\");\n } // if getLongitude\n if (getDepth() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + DEPTH + \"=\" + getDepth(\"\");\n } // if getDepth\n if (getTemperatureMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + TEMPERATURE_MIN + \"=\" + getTemperatureMin(\"\");\n } // if getTemperatureMin\n if (getTemperatureMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + TEMPERATURE_MAX + \"=\" + getTemperatureMax(\"\");\n } // if getTemperatureMax\n if (getSalinityMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SALINITY_MIN + \"=\" + getSalinityMin(\"\");\n } // if getSalinityMin\n if (getSalinityMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SALINITY_MAX + \"=\" + getSalinityMax(\"\");\n } // if getSalinityMax\n if (getOxygenMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + OXYGEN_MIN + \"=\" + getOxygenMin(\"\");\n } // if getOxygenMin\n if (getOxygenMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + OXYGEN_MAX + \"=\" + getOxygenMax(\"\");\n } // if getOxygenMax\n if (getNitrateMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + NITRATE_MIN + \"=\" + getNitrateMin(\"\");\n } // if getNitrateMin\n if (getNitrateMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + NITRATE_MAX + \"=\" + getNitrateMax(\"\");\n } // if getNitrateMax\n if (getPhosphateMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + PHOSPHATE_MIN + \"=\" + getPhosphateMin(\"\");\n } // if getPhosphateMin\n if (getPhosphateMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + PHOSPHATE_MAX + \"=\" + getPhosphateMax(\"\");\n } // if getPhosphateMax\n if (getSilicateMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SILICATE_MIN + \"=\" + getSilicateMin(\"\");\n } // if getSilicateMin\n if (getSilicateMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + SILICATE_MAX + \"=\" + getSilicateMax(\"\");\n } // if getSilicateMax\n if (getChlorophyllMin() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + CHLOROPHYLL_MIN + \"=\" + getChlorophyllMin(\"\");\n } // if getChlorophyllMin\n if (getChlorophyllMax() != FLOATNULL) {\n if (!where.equals(\"\")) {\n where = where + \" and \";\n } // if where\n where = where + CHLOROPHYLL_MAX + \"=\" + getChlorophyllMax(\"\");\n } // if getChlorophyllMax\n if (dbg) System.out.println (\"<br>where = \" + where); // debug\n return (!where.equals(\"\") ? where : null);\n }", "public void search() {\r\n \t\r\n }", "private Search() {}", "public String makeQuery(String searchTerms) {\n\t\tfinal StringBuffer query = new StringBuffer();\n\t\tfinal Matcher m = Pattern.compile(\"\\\\{([^}]*)\\\\}\").matcher(Template);\n\t\twhile (m.find()) {\n\t\t\tString name = m.group(1);\n\t\t\tif (name == null || name.length() == 0 || name.contains(\":\")) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tfinal boolean optional = name.endsWith(\"?\");\n\t\t\tif (optional) {\n\t\t\t\tname = name.substring(0, name.length() - 1);\n\t\t\t}\n\t\t\tname = name.intern();\n\t\t\tif (name == \"searchTerms\") {\n\t\t\t\tm.appendReplacement(query, searchTerms);\n\t\t\t} else if (name == \"count\") {\n\t\t\t\tm.appendReplacement(query, String.valueOf(ItemsPerPage));\n\t\t\t} else if (optional) {\n\t\t\t\tm.appendReplacement(query, \"\");\n\t\t\t} else if (name == \"startIndex\") {\n\t\t\t\tif (IndexOffset > 0) {\n\t\t\t\t\tm.appendReplacement(query, String.valueOf(IndexOffset));\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else if (name == \"startPage\") {\n\t\t\t\tif (PageOffset > 0) {\n\t\t\t\t\tm.appendReplacement(query, String.valueOf(PageOffset));\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else if (name == \"language\") {\n\t\t\t\tm.appendReplacement(query, \"*\");\n\t\t\t} else if (name == \"inputEncoding\" || name == \"outputEncoding\") {\n\t\t\t\tm.appendReplacement(query, \"UTF-8\");\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tm.appendTail(query);\n\t\treturn query.toString();\n\t}", "String buildQuery(String field, String val, int from, int size,\n\t\t\tDomeoPermissions permissions3) {\n\t\tStringBuffer sb = new StringBuffer(\"{ \");\n\n\t\t// Check for starting position (from) and max results (size)\n\t\tif ((from > -1) && (size > -1)) {\n\t\t\tsb.append(\"\\\"from\\\" : \" + from + \", \\\"size\\\" : \" + size + \", \");\n\t\t} else if (from > -1) { // from only, no size\n\t\t\tsb.append(\"\\\"from\\\" : \" + from + \", \");\n\t\t} else if (size > -1) { // size only, no from\n\t\t\tsb.append(\"\\\"size\\\" : \" + size + \", \");\n\t\t}\n\n\t\tif (permissions3 == null) {\n\t\t\tsb.append(\"\\\"fields\\\" : [\\\"_id\\\"], \\\"query\\\" : { \\\"match\\\" : { \\\"\"\n\t\t\t\t\t+ field + \"\\\": \\\"\" + val + \"\\\" } } } \");\n\t\t} else {\n\t\t\tString filter = permissions3.buildQueryFilter();\n\t\t\tsb.append(\"\\\"fields\\\" : \\\"[_id]\\\", \\\"query\\\" : { \\\"match\\\" : { \\\"\"\n\t\t\t\t\t+ field + \"\\\": \\\"\" + val + \"\\\" } } \" + filter + \" } \");\n\t\t}\n\t\treturn sb.toString();\n\t}", "String query();", "private String _buildWhereCondition(Vector conditions){\n String strConditions = \"\";\n if(conditions != null){\n strConditions = clsPopulateFunctions.joinVector(conditions, \" AND \");\n }\n return strConditions;\n }", "public SearchQueryBuilder(String query, String searchType) {\n this(query, SearchTypeService.getSearchModel(searchType));\n }", "private JsonObject search(JsonObject request) {\n\t\t\tJsonObject result = new JsonObject();\n\t\t\tJsonArray artists = new JsonArray();\n\t\t\tJsonArray titles = new JsonArray();\n\t\t\tJsonArray tags = new JsonArray();\n\t\t\tJsonArray arSimilars = new JsonArray();\n\t\t\tJsonArray tiSimilars = new JsonArray();\n\t\t\tJsonArray taSimilars = new JsonArray();\n\t\t\t//Individually search by artist, by title and by tag. \n\t\t\tartists = request.getAsJsonArray(\"searchByArtist\");\n\t\t\ttitles = request.getAsJsonArray(\"searchByTitle\");\n\t\t\ttags = request.getAsJsonArray(\"searchByTag\");\n\t\t\t//If the request contains \"artist\", we search each artist's similar song, and add it to a JsonArray.\n\t\t\tif(artists != null && artists.size() >= 1) {\n\t\t\t\tfor(JsonElement artist: artists) {\n\t\t\t\t\tarSimilars.add(this.sl.searchByArtist(artist.getAsString()));\t\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByArtist\".\n\t\t\t\tresult.add(\"searchByArtist\", arSimilars);\n\t\t\t}\n\t\t\t//If the request contains \"tag\", we search each tag's similar song, and add it to a JsonArray.\n\t\t\tif(tags != null && tags.size() >= 1) {\n\t\t\t\tfor(JsonElement tag: tags) {\t\t\t\t\n\t\t\t\t\ttaSimilars.add(this.sl.searchByTag(tag.getAsString()));\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByTag\".\n\t\t\t\tresult.add(\"searchByTag\", taSimilars);\n\t\t\t}\t\t\n\t\t\t//If the request contains title, we search each title's similar song, and add it to a JsonArray\n\t\t\tif(titles != null && titles.size() >= 1) {\t\t\t\n\t\t\t\tfor(JsonElement title: titles) {\n\t\t\t\t\ttiSimilars.add(this.sl.searchByTitle(title.getAsString()));\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByTiltle\".\n\t\t\t\tresult.add(\"searchByTitle\", tiSimilars);\n\t\t\t}\n\t\t\treturn result;\n\t\t}", "public void search(Map<String, String> searchParam);", "public abstract Search create(String search, SearchBuilder builder);", "public List<Recipe> search(String queryText, Category category, CookingMethod cookingMethod);", "@NonNull\n public String getQuery() {\n return searchView.getQuery().toString();\n }", "TSearchResults searchWithQuery(TSearchQuery searchQuery, SearchParametersAPI overrideParameters, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);", "@Override\n public List<Vehicle> searchByQuery(String q) {\n List<AggregationOperation> operations = new ArrayList<>();\n operations.addAll(getVehicleAggregations());\n operations.add(\n Aggregation.addFields()\n .addFieldWithValue(\n \"yearString\", ConvertOperators.ToString.toString(\"cars.vehicles.year\"))\n .build());\n\n Query query = new Query();\n query.addCriteria(Criteria.where(\"cars.vehicles.model\").regex(\".*\" + q + \".*\"));\n Criteria criteria = new Criteria();\n\n Criteria modelCriteria = new Criteria(\"cars.vehicles.model\");\n BsonRegularExpression modelRegex = new BsonRegularExpression(\".*\" + q + \".*\");\n modelCriteria.regex(modelRegex);\n Criteria makeCriteria = new Criteria(\"cars.vehicles.make\");\n BsonRegularExpression makeRegex = new BsonRegularExpression(\".*\" + q + \".*\");\n makeCriteria.regex(makeRegex);\n\n Criteria yearCriteria = new Criteria(\"yearString\");\n BsonRegularExpression yearRegex = new BsonRegularExpression(\".*\" + q + \".*\");\n yearCriteria.regex(yearRegex);\n criteria.orOperator(modelCriteria, makeCriteria, yearCriteria);\n operations.add(match(criteria));\n operations.add(getVehicleProjection());\n operations.add(sort(Sort.Direction.DESC, \"date_added\"));\n TypedAggregation<Warehouse> aggregation =\n Aggregation.newAggregation(Warehouse.class, operations);\n return mongoTemplate.aggregate(aggregation, Vehicle.class).getMappedResults();\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n prepareBooks(engine.search(query.toLowerCase(),filter));\n return false;\n }", "private String buildSoqlQuery(String entityName, String selectQueryFragment, Date startDate, Date endDate) {\r\n\t\tStringBuilder completeQuery = new StringBuilder(\"\");\r\n\t\tcompleteQuery.append(selectQueryFragment);\r\n\t\tcompleteQuery.append(ConstantesBulkApi.ALL_ENTITIES_FROM_CLAUSE);\r\n\t\tcompleteQuery.append(entityName);\r\n\t\t\r\n\t\tswitch (entityName) {\r\n\t\t\tcase ConstantesBulkApi.ENTITY_ADDRESS:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.ADDRESS_ENTITY_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_REPEATED_CASES:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.WITHOUT_COUNTRY_ENTITIES_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_GROUP:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.WITHOUT_COUNTRY_ENTITIES_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_CASE_COMMENT:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.CASE_COMMENT_ENTITY_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_CASE_HISTORY:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.CASE_HISTORY_ENTITY_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_TASK:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.TASK_ENTITY_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.ALL_ENTITIES_BASIC_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif (ConstantesBulkApi.ENTITY_CASE_HISTORY.equals(entityName)) {\r\n\t\t\tcompleteQuery.append(\"AND (\").append(ConstantesBulkApi.OBJECT_CREATED_DATE_WHERE_CLAUSE);\r\n\t\t} else if (ConstantesBulkApi.ENTITY_REPEATED_CASES.equals(entityName) || ConstantesBulkApi.ENTITY_GROUP.equals(entityName)) {\r\n\t\t\tcompleteQuery.append(\" (\").append(ConstantesBulkApi.OBJECT_LAST_MODIFIED_DATE_WHERE_CLAUSE);\r\n\t\t} else {\r\n\t\t\tcompleteQuery.append(\"AND (\").append(ConstantesBulkApi.OBJECT_LAST_MODIFIED_DATE_WHERE_CLAUSE);\r\n\t\t}\r\n \t\tcompleteQuery.append(\" >= \").append(Utils.parseDateToString(startDate));\r\n\t\tif (ConstantesBulkApi.ENTITY_CASE_HISTORY.equals(entityName)) {\r\n\t\t\tcompleteQuery.append(\" AND \").append(ConstantesBulkApi.OBJECT_CREATED_DATE_WHERE_CLAUSE);\r\n\t\t} else {\r\n\t\t\tcompleteQuery.append(\" AND \").append(ConstantesBulkApi.OBJECT_LAST_MODIFIED_DATE_WHERE_CLAUSE);\r\n\t\t}\r\n\t\tcompleteQuery.append(\" <= \").append(Utils.parseDateToString(endDate)).append(\")\");\r\n\t\tLOGGER.debug(\"Consulta a realizar: \" + completeQuery);\r\n\t\treturn completeQuery.toString();\r\n\t}", "@SuppressWarnings(\"rawtypes\")\n\tprivate void buildQuery(SearchRequestBuilder searchReq, List<TableRelation> relations,\n\t QueryBuilder query, AggregationBuilder aggregation, List<OrderBy> orderings,\n\t int limit, boolean useCache, boolean requestScore) {\n\t\tString[] types = new String[relations.size()];\n\t\tfor(int i=0; i<relations.size(); i++) types[i] = relations.get(i).getTable(); \n\t\tSearchRequestBuilder req = searchReq.setTypes(types);\n\t\t\n\t\t// add filters and aggregations\n\t\tif(aggregation != null){\n\t\t\t// when aggregating the query must be a query and not a filter\n\t\t\tif(query != null)\treq.setQuery(query);\n\t\t\treq.addAggregation(aggregation);\n\t\t\t\n\t\t// ordering does not work on aggregations (has to be done in client)\n\t\t}else if(query != null){\n\t\t\tif(requestScore) req.setQuery(query); // use query instead of filter to get a score\n\t\t\telse req.setPostFilter(query);\n\t\t\t\n\t\t\t// add order\n\t\t\tfor(OrderBy ob : orderings){\n\t\t\t\treq.addSort(ob.getField(), ob.getOrder());\n\t\t\t}\n\t\t} else req.setQuery(QueryBuilders.matchAllQuery());\n\t\t\n\t\tint fetchSize = Utils.getIntProp(props, Utils.PROP_FETCH_SIZE, 10000);\n\t\t// add limit and determine to use scroll\n\t\tif(aggregation != null) {\n\t\t\treq = req.setSize(0);\n\t\t} else if(determineLimit(limit) > 0 && determineLimit(limit) < fetchSize){\n\t\t\treq.setSize(determineLimit(limit) );\n\t\t} else if (orderings.isEmpty()){ // scrolling does not work well with sort\n\t\t\treq.setSize(fetchSize); \n\t\t\treq.addSort(\"_doc\", SortOrder.ASC);\n\t\t\treq.setScroll(new TimeValue(Utils.getIntProp(props, Utils.PROP_SCROLL_TIMEOUT_SEC, 60)*1000));\n\t\t}\n\t\t\n\t\t// use query cache when this was indicated in FROM clause\n\t\tif(useCache) req.setRequestCache(true);\n\t\treq.setTimeout(TimeValue.timeValueMillis(Utils.getIntProp(props, Utils.PROP_QUERY_TIMEOUT_MS, 10000)));\n\t}", "String buildPhraseQuery(String field, String val, int from, int size,\n\t\t\tDomeoPermissions permissions3) {\n\t\tStringBuffer sb = new StringBuffer(\"{ \");\n\n\t\t// Check for starting position (from) and max results (size)\n\t\tif ((from > -1) && (size > -1)) {\n\t\t\tsb.append(\"\\\"from\\\" : \" + from + \", \\\"size\\\" : \" + size + \", \");\n\t\t} else if (from > -1) { // from only, no size\n\t\t\tsb.append(\"\\\"from\\\" : \" + from + \", \");\n\t\t} else if (size > -1) { // size only, no from\n\t\t\tsb.append(\"\\\"size\\\" : \" + size + \", \");\n\t\t}\n\n\t\tif (permissions3 == null) {\n\t\t\tsb.append(\"\\\"fields\\\" : [\\\"_id\\\"], \\\"query\\\" : { \\\"match_phrase\\\" : { \\\"\"\n\t\t\t\t\t+ field + \"\\\": \\\"\" + val + \"\\\" } } } \");\n\t\t} else {\n\t\t\tString filter = permissions3.buildQueryFilter();\n\t\t\tsb.append(\"\\\"fields\\\" : \\\"[_id]\\\", \\\"query\\\" : { \\\"match_phrase\\\" : { \\\"\"\n\t\t\t\t\t+ field + \"\\\": \\\"\" + val + \"\\\" } } \" + filter + \" } \");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "Page<T> search(Pageable pageable, String query);", "private void search(String querySearch) {\n searchResult = new ArrayList<>();\n for (MonitoringModel item : searchList) {\n if (item.getPROG_ID().toLowerCase().contains(querySearch) || item.getPROG_ID().contains(querySearch) ||\n item.getKEPUTUSAN().toLowerCase().contains(querySearch) || item.getKEPUTUSAN().contains(querySearch) ||\n Common.formatTgl(item.getTGL_TARGET()).toLowerCase().contains(querySearch) || Common.formatTgl(item.getTGL_TARGET()).contains(querySearch) ||\n Common.formatStatusMonitoringToString(item.getLAST_STATUS()).toLowerCase().contains(querySearch) || Common.formatStatusMonitoringToString(item.getLAST_STATUS()).contains(querySearch)) {\n searchResult.add(item);\n }\n }\n if (searchResult.isEmpty())\n tvEmptySearch.setText(\"No results found for '\" + querySearch + \"'\");\n else\n tvEmptySearch.setText(\"\");\n\n searchAdapter = new ListAdapter(getContext(), searchResult);\n rvList.setAdapter(searchAdapter);\n }", "@Test\n public void testSearchFilter_WithoutAddedSearchBase_WithParens() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"(<%=parameter[\\\"Search String\\\"]%>)\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "List<LectureDTO> search(String query);", "SearchResult<TimelineMeta> search(SearchQuery searchQuery);", "public void prepareQuery(boolean fromtext, boolean totext) {\n if (fromtext) {\n fromquery = prepareTextQuery(fromedittext.getText().toString());\n } else {\n fromquery = \"https://maps.googleapis.com/maps/api/place/textsearch/json?location=\" +\n lat + \",\" + lng + \"&radius=\" + RAD +\n \"&type=\" + fromitem +\n \"&key=\" + apikey;\n }\n\n if (totext) {\n toquery = prepareTextQuery(toedittext.getText().toString());\n } else {\n toquery = \"https://maps.googleapis.com/maps/api/place/textsearch/json?location=\" +\n lat + \",\" + lng + \"&radius=\" + RAD +\n \"&type=\" + toitem +\n \"&key=\" + apikey;\n }\n }", "@Test\n public void testSearchFilter_WithAddedSearchBase() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"OU=Users(<%=parameter[\\\"Search String\\\"]%>)\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "public SearchQuery build() {\n this._Web_search.set_maxDepth(_maxDepth);\n this._Web_search.set_maxResults(_maxResults);\n this._Web_search.set_threshold(_threshold);\n this._Web_search.set_beamWidth(_beamWidth);\n if (heuristicSearchType == null) {\n this._Web_search.setHeuristicSearchType(Enums.HeuristicSearchType.BEST_FIRST);\n } else {\n this._Web_search.setHeuristicSearchType(heuristicSearchType);\n }\n\n return new SearchQuery(this._query, this._Web_search);\n }", "@Override\n // String land, String[] kommune, String[] postnr, String[] lokalitet, String[] vej\n public Collection<KommuneEntity> search(SearchParameters parameters) {\n StringList hql = new StringList();\n StringList join = new StringList();\n ConditionList conditions = new ConditionList(ConditionList.Operator.AND);\n\n hql.append(\"select distinct \"+KommuneEntity.databaseKey+\" from KommuneEntity as \"+KommuneEntity.databaseKey);\n join.setPrefix(\"join \");\n\n conditions.addCondition(KommuneEntity.landCondition(parameters));\n\n conditions.addCondition(KommuneEntity.kommuneCondition(parameters));\n if (parameters.has(Key.LOKALITET)) {\n join.append(KommuneEntity.joinLokalitet());\n conditions.addCondition(LokalitetEntity.lokalitetCondition(parameters));\n }\n if (parameters.has(Key.POST)) {\n Pair<String[],Condition> post = KommuneEntity.joinPost();\n join.append(post.getLeft());\n conditions.addCondition(post.getRight());\n conditions.addCondition(PostNummerEntity.postCondition(parameters));\n }\n if (parameters.has(Key.VEJ)) {\n join.append(KommuneEntity.joinVej());\n conditions.addCondition(VejstykkeEntity.vejCondition(parameters));\n }\n if (parameters.hasGlobalCondition()) {\n // Add any further restrictions from the global condition\n conditions.addCondition(parameters.getGlobalCondition().whereField(\"kommune\"));\n }\n\n // our conditions list should now be complete\n\n if (conditions.hasRequiredJoin()) {\n join.append(conditions.getRequiredJoin());\n }\n\n // our join list should now be complete\n\n if (join.size()>0) {\n hql.append(join.join(\" \"));\n }\n if (conditions.size() > 0) {\n hql.append(\"where\");\n hql.append(conditions.getWhere());\n }\n // Append order clause\n hql.append(\"order by \"+KommuneEntity.databaseKey+\".kode\");\n\n return this.query(hql, conditions, parameters.getGlobalCondition());\n }", "public abstract S getSearch();", "public java.lang.CharSequence getQuery() {\n return query;\n }", "public List<Product> search(String searchString);" ]
[ "0.7985988", "0.703659", "0.6983679", "0.67783934", "0.6764428", "0.6755167", "0.6747615", "0.6706109", "0.66114944", "0.66092443", "0.6601369", "0.6552577", "0.647412", "0.641837", "0.641837", "0.6411479", "0.64027166", "0.63708794", "0.6364236", "0.63494027", "0.63492393", "0.632988", "0.6326639", "0.6324327", "0.62957907", "0.62380505", "0.6227581", "0.6213245", "0.61981165", "0.6175168", "0.6145539", "0.6119816", "0.61044633", "0.60949475", "0.60922146", "0.6064844", "0.60638124", "0.60486525", "0.60189766", "0.6017351", "0.6016569", "0.60142183", "0.6010789", "0.6010231", "0.6009708", "0.60070825", "0.6003792", "0.59955585", "0.5989046", "0.59887743", "0.59711456", "0.59560496", "0.59505755", "0.59503585", "0.59493476", "0.59463483", "0.59417945", "0.5940784", "0.59396416", "0.593199", "0.5928374", "0.5927554", "0.5922587", "0.5917094", "0.59151286", "0.5904746", "0.5898765", "0.58968294", "0.5895343", "0.5890643", "0.58844763", "0.5884297", "0.58828723", "0.5877774", "0.5873755", "0.58640254", "0.5861515", "0.585838", "0.5856002", "0.5853552", "0.585243", "0.58456117", "0.5844766", "0.583948", "0.58359045", "0.5826708", "0.58227366", "0.5822554", "0.58173263", "0.5800671", "0.5788205", "0.57867277", "0.5784886", "0.5774995", "0.5769605", "0.57677704", "0.57549053", "0.5750087", "0.574863", "0.5748518", "0.57428306" ]
0.0
-1
Deletes old versions of Marc Indexers based on tenant ID.
@Override public Future<Boolean> deleteMarcIndexersOldVersions(String tenantId) { return executeInTransaction(txQE -> acquireLock(txQE, INDEXERS_DELETION_LOCK_NAMESPACE_ID, tenantId.hashCode()) .compose(isLockAcquired -> { if (Boolean.FALSE.equals(isLockAcquired)) { LOG.info("deleteMarcIndexersOldVersions:: Previous marc_indexers old version deletion still ongoing, tenantId: '{}'", tenantId); return Future.succeededFuture(false); } return deleteMarcIndexersOldVersions(txQE, tenantId); }), tenantId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n @Secured(SecurityRoles.ADMINISTRATOR)\n public void reindex() {\n revisionDao.deleteAll();\n // OK, launches a new indexation\n indexFromLatest();\n }", "public void deleteVersions(SQLTenant tenant, String uniqueIdentifier) {\n oma.select(VersionedFile.class)\n .eq(VersionedFile.TENANT, tenant)\n .eq(VersionedFile.UNIQUE_IDENTIFIER, uniqueIdentifier)\n .delete();\n }", "@Override\n public void onTenantDelete(int i) {\n }", "void makeLinksWithStudiesDeleted(Long tenantId, Long dataSourceId);", "public void deleteAllVersions(String namespace, String id) throws StageException;", "@Override\n public void deleteIdPs(String tenantDomain) throws IdentityProviderManagementException {\n\n // Invoking the pre listeners.\n Collection<IdentityProviderMgtListener> listeners = IdPManagementServiceComponent.getIdpMgtListeners();\n for (IdentityProviderMgtListener listener : listeners) {\n if (listener.isEnable() && !listener.doPreDeleteIdPs(tenantDomain)) {\n return;\n }\n }\n\n // Delete metadata strings of each IDP\n int tenantId = IdentityTenantUtil.getTenantId(tenantDomain);\n List<IdentityProvider> identityProviders = getIdPs(tenantDomain);\n for (IdentityProvider identityProvider : identityProviders) {\n deleteMetadataStrings(identityProvider.getIdentityProviderName(), tenantId);\n }\n\n dao.deleteIdPs(tenantId);\n\n // Invoking the post listeners.\n for (IdentityProviderMgtListener listener : listeners) {\n if (listener.isEnable() && !listener.doPostDeleteIdPs(tenantDomain)) {\n return;\n }\n }\n }", "public int deleteExpiredVersions() {\n // Get session and begin transaction\n Session session = DBHelper.getSession();\n Transaction transaction = session.beginTransaction();\n\n // Query for the document\n Query query = session.getNamedQuery(Version.DELETE_WITH_DELETION_DATE_BEFORE_QUERY);\n query.setParameter(Version.DELETE_WITH_DELETION_DATE_BEFORE_QUERY_PARAM, LocalDate.now());\n int deletionCount = query.executeUpdate();\n\n // Commit and close\n transaction.commit();\n session.close();\n\n logger.info(\"Deleted \" + deletionCount + \" versions past their retention date!\");\n return deletionCount;\n }", "@Override\r\n \t\t\tpublic void deleteSessionsOfTenant(long tenantId) {\n \t\t\t\t\r\n \t\t\t}", "public void deleteOldVersionConsults(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n final HashMap<String, String> headers =\n getHeaderWithAccessToken(mSharecareToken.accessToken);\n final String endPoint =\n String.format(ALL_CONSULTS_ENDPOINT, mSharecareToken.accountID);\n this.beginRequest(endPoint, ServiceMethod.GET, headers, null,\n (String)null, ServiceResponseFormat.GSON,\n new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(\n final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result =\n checkResultFromAuthService(json);\n if (result.success)\n {\n final JsonElement response = getResponseFromJson(json);\n if (response != null && response.isJsonArray())\n {\n final JsonArray responseArray =\n response.getAsJsonArray();\n for (final JsonElement element : responseArray)\n {\n if (element.isJsonObject())\n {\n final JsonObject consult =\n element.getAsJsonObject();\n final String docID =\n getStringFromJson(consult, ID);\n if (consult.get(METADATA) != null\n && consult.get(METADATA).isJsonObject())\n {\n final JsonObject metadata =\n consult.get(METADATA)\n .getAsJsonObject();\n // Check version number.\n final String version =\n getStringFromJson(metadata, VERSION);\n final String type =\n getStringFromJson(metadata, TYPE);\n\n // Delete if version number is older\n // than OLDEST_SUPPORTED_VERSION\n // and type is session, userData, or\n // poptList.\n if (!StringHelper\n .isNullOrEmpty(version)\n && version\n .compareToIgnoreCase(OLDEST_SUPPORTED_VERSION) < 0\n && (type.equals(SESSION)\n || type.equals(FND_LIST)\n || type.equals(USER_DATA) || type\n .equals(POPT_LIST)))\n {\n deleteConsultWithSessionDocumentID(\n docID, null);\n }\n }\n }\n }\n }\n }\n LogError(\"deleteOldVersionConsults\", result);\n return result;\n }\n }, completion);\n }", "boolean deleteIndex(String indexName);", "protected void deleteTenantMeta() {\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n TenantInfo tenantInfo = getTenantInfo();\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n if (tenantInfo.getTenantStatus() == TenantStatus.DROPPED) {\n adapter.deleteTenantMeta(adminSchemaName, tenantInfo.getTenantId());\n } else {\n throw new IllegalStateException(\"Cannot delete tenant meta data until status is \" + TenantStatus.DROPPED.name());\n }\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n\n }", "private void deletes() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Delete delete: deletes) {\n \tdelete.init();\n }\n \n //DBPeer.updateTableIndexes(); //Set min max of indexes not implemented yet\n }", "void initiateRemoveIndexes(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "@AfterClass\n\tpublic static void cleanIndex() {\n\t\tEntityTest et = new EntityTest(id, \"EntityTest\");\n\t\tRedisQuery.remove(et, id);\n\t}", "void deleteTrackerListVersion(final Integer id);", "void deleteContentVersion(ContentIdentifier id) throws NotAuthorizedException;", "IndexDeleted deleteAllIndexes() throws ElasticException;", "private void deleteMetadataStrings(String idpName, int tenantId) throws IdentityProviderManagementException {\n\n for (MetadataConverter metadataConverter : IdpMgtServiceComponentHolder.getInstance().getMetadataConverters()) {\n if (metadataConverter.canDelete(tenantId, idpName)) {\n metadataConverter.deleteMetadataString(tenantId, idpName);\n }\n }\n }", "@Test\n @Ignore(\"Already ran, all mentioned ids deleted\")\n public void deleteOrganisationsFromVertecBasedOnMerger() {\n List<Long> idsToDel = new ArrayList<>();\n idsToDel.add(9469332L);\n idsToDel.add(26062339L);\n idsToDel.add(20810990L);\n idsToDel.add(710236L);\n idsToDel.add(20729447L);\n idsToDel.add(12185089L);\n idsToDel.add(710253L);\n idsToDel.add(22639820L);\n\n for (Long id : idsToDel) {\n String uri = baseURI + \"/organisation/\" + id;\n\n Long recId = deleteFromVertec(uri, Long.class).getBody();\n\n assertEquals(\"Could not deactivate Organisation\", id, recId);\n }\n\n\n }", "public void delete(String namespace, String id, long version) throws StageException;", "@Indexable(type = IndexableType.DELETE)\n\t@Override\n\tpublic MonthlyTrading deleteMonthlyTrading(MonthlyTrading monthlyTrading) {\n\t\treturn monthlyTradingPersistence.remove(monthlyTrading);\n\t}", "@Override\n\tpublic void forceDelete(String tenantId, String serverId) {\n\t\tSystem.out.println(\"force delete \" + tenantId + \"'s server \" + serverId + \"!!\");\n\t}", "void removeIndexForRepository(long repositoryId);", "void clearAllIndexes();", "@Test\n @DisplayName(\n \"Should purge older schema entries, keeping only last SchemaSourceDao#NUMBER_OF_RETAINED_SCHEMA_VERSIONS versions\")\n public void purgeOldSchemaEntriesOnInsert() {\n\n int numberOfSchemasAboveThreshold = 5;\n int numberOfVersionsToInsert =\n NUMBER_OF_RETAINED_SCHEMA_VERSIONS + numberOfSchemasAboveThreshold;\n\n // when deploying schemas\n List<UUID> schemasVersions = new ArrayList<>();\n UUID lastVersion = null;\n for (int i = 0; i < numberOfVersionsToInsert; i++) {\n lastVersion =\n client.deploySchema(\n keyspaceId.asInternal(),\n lastVersion == null ? null : lastVersion.toString(),\n SCHEMA_CONTENTS);\n schemasVersions.add(lastVersion);\n }\n\n // then the last NUMBER_OF_RETAINED_SCHEMA_VERSIONS schemas should be present\n List<UUID> removedVersions = schemasVersions.subList(0, numberOfSchemasAboveThreshold);\n List<UUID> presentVersions =\n schemasVersions.subList(numberOfSchemasAboveThreshold, schemasVersions.size());\n // all removed versions should return 404\n for (UUID version : removedVersions) {\n client.getSchemaFile(\n keyspaceId.asInternal(), version.toString(), Response.Status.NOT_FOUND.getStatusCode());\n }\n // rest of the schemas should be present\n for (UUID version : presentVersions) {\n assertThat(client.getSchemaFile(keyspaceId.asInternal(), version.toString())).isNotNull();\n }\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete TenantSuperAdmin : {}\", id);\n tenantSuperAdminRepository.deleteById(id);\n }", "private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}", "public void deleteAll(UUID accId) {\n txMgr.doInTransaction(() -> {\n Set<UUID> notebooksIds = datasourcesIdx.delete(accId);\n\n datasourceTbl.deleteAll(notebooksIds);\n });\n }", "public String removeDSIndex(String dsID, String dschemaID, String attriName);", "public void myanwDelete(int idx) {\n\t\tdao.myanwDelete(idx);\r\n\t}", "@Scheduled(fixedRate = 5000)\n public void refreshAllIndex() {\n\n HashMap<String, String> dictlist = new HashMap<>();\n\n //get the file list\n try {\n dictlist = FileUtil.subFolderList(fieryConfig.getIndexpath());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //load all index if not contain on folder\n for (Map.Entry<String, String> e : dictlist.entrySet()) {\n String foldername = e.getKey();\n String folderpath = e.getValue();\n if (!readerList.containsKey(foldername)) {\n log.info(\"start load index foldername:\" + foldername + \" abspath:\" + folderpath);\n //open index\n boolean ret = this.openIndex(foldername, folderpath);\n\n //warning this may cause bug\n //loaded fail? clean it\n if (!ret) {\n FileUtil.deleteDir(folderpath);\n }\n }\n }\n\n\n /////////////////////\n // recycle expire index\n /////////////////////\n for (Map.Entry<String, DirectoryReader> e : readerList.entrySet()) {\n String dbname = e.getKey();\n\n try {\n Long dbtime = Long.parseLong(dbname);\n\n if (dbtime < DateTimeHepler.getBeforDay(fieryConfig.getKeepdataday())) {\n //closed all\n if (analyzerList.containsKey(dbname)) {\n analyzerList.get(dbname).close();\n analyzerList.remove(dbname);\n }\n if (directorList.containsKey(dbname)) {\n directorList.get(dbname).close();\n directorList.remove(dbname);\n }\n if (readerList.containsKey(dbname)) {\n readerList.get(dbname).close();\n readerList.remove(dbname);\n }\n\n //remove the folder\n FileUtil.deleteDir(fieryConfig.getIndexpath() + \"/\" + dbname);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n\n\n /////////////////////\n // refresh already loaded index\n /////////////////////\n for (Map.Entry<String, DirectoryReader> e : readerList.entrySet()) {\n\n String dbname = e.getKey();\n DirectoryReader diskReader = e.getValue();\n\n try {\n Date start = new Date();\n\n DirectoryReader tmp = DirectoryReader.openIfChanged(diskReader);\n if (tmp != null) {\n diskReader.close();\n diskReader = tmp;\n readerList.put(dbname, diskReader);\n Date end = new Date();\n log.info(\"Reload Index:\" + dbname + \" cost:\" + (end.getTime() - start.getTime()) + \" totalcount:\" + diskReader.numDocs());\n }\n\n } catch (Exception exx) {\n exx.printStackTrace();\n log.error(exx.getMessage());\n }\n }\n /////////////////////\n //refresh the all in one searcher\n /////////////////////\n\n this.reloadSearch();\n\n }", "public void deleteIndex() throws Exception {\n\n\t\tRetryingRunnable runnable = new RetryingRunnable() \n\t\t{\t\n\t\t\tpublic void run() throws Exception \n\t\t\t{\n\t\t\t\tIndexWriter w = createIndexWriter(true); // open for writing and close (make empty)\n\t\t\t\tw.deleteAll();\n\t\t\t\tw.commit();\n\t\t\t\tw.close(true);\n\t\t\t\t\n\t\t\t\tDirectory dir = getIndexDir();\n\t\t\t\tfor(String file: dir.listAll())\n\t\t\t\t{\n\t\t\t\t\tif( dir.fileExists(file) ) // still exits\n\t\t\t\t\t{\n\t\t\t\t\t\tdir.sync(file);\n\t\t\t\t\t\tdir.deleteFile(file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdir.close();\n\t\t\t}\n\t\t\t\n\t\t\tpublic boolean handleException(Throwable e) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\tchangeListener.onIndexReset(); // close searcher because index is deleted\n\t\t\n\t\trunRetryingRunnable(runnable); // delete index with retry\n\t}", "@Override\r\n\tpublic void delete(int r_idx) throws Exception {\n\r\n\t}", "@Test\n @Ignore\n public void testDelete_Index() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(entity);\n assertFalse(instance.exists(identifier));\n }", "@Indexable(type = IndexableType.DELETE)\n\t@Override\n\tpublic MonthlyTrading deleteMonthlyTrading(long monthlyTradingId)\n\t\tthrows PortalException {\n\t\treturn monthlyTradingPersistence.remove(monthlyTradingId);\n\t}", "public void deleteAllVersions() {\n throw new UnsupportedOperationException();\n }", "private void clearExpiredFiles(long checkpointId) throws IOException {\n NavigableMap<Long, List<Path>> outOfDateMetas = expiredFiles.headMap(checkpointId, true);\n for (List<Path> paths : outOfDateMetas.values()) {\n for (Path meta : paths) {\n fileSystem.delete(meta, true);\n }\n }\n outOfDateMetas.clear();\n }", "protected void dropDetachedPartitionTables() {\n\n TenantInfo tenantInfo = getTenantInfo(); \n \n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, tenantInfo.getTenantSchema());\n PhysicalDataModel pdm = new PhysicalDataModel();\n gen.buildSchema(pdm);\n\n dropDetachedPartitionTables(pdm, tenantInfo);\n }", "@Override\n\tpublic void clearIndex(String indexName) {\n\t\t\n\t}", "private void delete(String id, String index, EzSecurityToken token) throws TException {\n EzElastic.Client elasticService = getElasticServiceClient();\n try {\n elasticService.deleteWithType(id, index, getElasticServiceToken(token));\n } finally {\n pool.returnToPool(elasticService);\n }\n }", "int deleteByPrimaryKey(String vendorid);", "void deleteAllPaymentTerms() throws CommonManagementException;", "public abstract void deselectAllIndexes();", "IndexDeleted deleteIndex(String names) throws ElasticException;", "@Override\n public void deleteVersion(String instanceId, String tag) {\n InstanceManifest im = readInstance(instanceId);\n Manifest.Key key = new Manifest.Key(InstanceManifest.getRootName(instanceId), tag);\n RemoteService master = mp.getControllingMaster(hive, im.getManifest());\n try (Activity deploy = reporter.start(\"Deleting Ver. \" + tag + \" of \" + im.getConfiguration().name);\n NoThrowAutoCloseable proxy = reporter.proxyActivities(master)) {\n MasterRootResource root = ResourceProvider.getVersionedResource(master, MasterRootResource.class, context);\n if (getDeploymentStates(instanceId).installedTags.contains(tag)) {\n throw new WebApplicationException(\"Version \" + tag + \" is still installed, cannot delete\",\n Status.EXPECTATION_FAILED);\n }\n\n root.getNamedMaster(group).deleteVersion(instanceId, tag);\n\n // now delete also on the central...\n if (minion.getMode() == MinionMode.CENTRAL) {\n InstanceManifest.delete(hive, key);\n }\n }\n\n syncInstance(minion, rc, group, instanceId);\n if (minion.getMode() != MinionMode.CENTRAL) {\n changes.remove(ObjectChangeType.INSTANCE, key);\n }\n }", "void deleteAllDiscounts();", "public void markVersionDelete() throws JNCException {\n markLeafDelete(\"version\");\n }", "@Override\n\tpublic int deleteMembers(String idx) throws Exception {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void delete(int id) {\n\t\tconsigMetalDtRepository.delete(id);\r\n\t\t\r\n\t}", "void deleteByDomainIds(List<String> domainIds) throws SrdmDataAccessException;", "public void myqnaDelete(int idx) {\n\t\tdao.myqnaDelete(idx);\r\n\t}", "void deleteTrackerSearches(final Integer id);", "@Test\n public void deleteDoctor() {\n\t\tList<Doctor> doctors = drepository.findByName(\"Katri Halonen\");\n\t\tassertThat(doctors).hasSize(1);\n \tdrepository.deleteById((long) 3);\n \tdoctors = drepository.findByName(\"Katri Halonen\");\n \tassertThat(doctors).hasSize(0);\n }", "private Reindex() {}", "private Reindex() {}", "public void deleteAllTransactions();", "public void execute(XDBSessionContext client) throws Exception {\n database = client.getSysDatabase();\n\n SysColumn sysCol = aSqlAlterDropColumn.getParent().getTable()\n .getSysColumn(aSqlAlterDropColumn.getColumnName());\n\n int colid = sysCol.getColID();\n\n // We need to delete any Index created on this column.\n // Info for that is in xsysindexes, xsysindexkeys, xsysconstraints\n //\n // PROCEDURE\n // 1. Identify any index created on this coulumn by\n // Select idxid from xsysindexkeys where colid = xxx\n //\n // 2. for all such indexes found\n //\n // 2.1 delete from xyscontraints where idxid = idxid\n //\n // 2.2 delete from xsysindexkeys where .idxid = idxid\n //\n // 2.3 delete from xsysindexes where .idxid = idxid\n //\n // 3. delete col info from xsyscol\n\n // setp 1\n String sql_1 = \"SELECT idxid from xsysindexkeys where colid=\" + colid;\n // ResultSet rs = aSqlStatement.executeQuery(sql_1);\n ResultSet rs = MetaData.getMetaData().executeQuery(sql_1);\n\n // step2\n // delete all indexes and index-constraints defined on this column\n String sql_2_1, sql_2_2, sql_2_3;\n\n while (rs.next()) {\n int idxid = rs.getInt(\"idxid\");\n\n // step 2.1\n sql_2_1 = \"DELETE FROM xsysconstraints WHERE idxid=\" + idxid;\n // aSqlStatement.executeUpdate(sql_2_1);\n MetaData.getMetaData().executeUpdate(sql_2_1);\n\n // step 2.2\n sql_2_2 = \"DELETE FROM xsysindexkeys WHERE idxid=\" + idxid;\n // aSqlStatement.executeUpdate(sql_2_2);\n MetaData.getMetaData().executeUpdate(sql_2_2);\n\n // step 2.3\n sql_2_3 = \"DELETE FROM xsysindexes WHERE idxid=\" + idxid;\n // aSqlStatement.executeUpdate(sql_2_3);\n MetaData.getMetaData().executeUpdate(sql_2_3);\n }\n\n // step 3\n String sql_3 = \"DELETE FROM xsyscolumns where colid = \" + colid;\n // aSqlStatement.executeUpdate(sql_3);\n MetaData.getMetaData().executeUpdate(sql_3);\n }", "int deleteByExample(TdxCompanyTaxArrearsExample example);", "private void deleteOldData() {\n Date today = SunshineDateUtils.getNormalizedUtcDateForToday();\n weatherDao.deleteOldWeather(today);\n }", "int deleteByPrimaryKey(Integer adminId);", "public void clean() {\n Long now = System.currentTimeMillis();\n for (Iterator<Long> iterator = this.deleted.iterator(); iterator.hasNext();) {\n Long l = iterator.next();\n if (l < now) {\n iterator.remove();\n }\n }\n }", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "void cleanUpExpiredSessions() {\n try (TarantoolClient client = clientSource.getClient()) {\n client.select(getSpace(client), SPACE_EXPIRY_INDEX, Integer.MAX_VALUE, 0, Iter.LE);\n client.setLong(System.currentTimeMillis());\n Result result = client.execute();\n Set<UUID> ids = new HashSet<>();\n while (result.next()) {\n ids.add(new UUID(result.getLong(2), result.getLong(3)));\n }\n ids.forEach(id -> deleteById(id, client));\n if (logger.isDebugEnabled()) {\n logger.debug(\"Cleaned up \" + ids.size() + \" expired sessions\");\n }\n }\n }", "public void delete(long setId) throws ServerException;", "@Override\n\tpublic int deleteFromLicenseBizPrdtByPrimaryKey(Integer id) {\n\t\treturn licenseBizPrdtMapper.deleteByPrimaryKey(id);\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodEntrySet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.entrySet() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "public void removeOldArchive(long timestamp) throws PersistenceException {\n super.removeOldObjectsInArchive(timestamp);\n }", "public void DeleteCust(String id);", "public void deleteByCustomerListId(Long customerListId);", "public void deleteAllToken() throws BusinessException;", "private void undoVersionInRoot() throws IOException {\n Put p = new Put(HRegionInfo.FIRST_META_REGIONINFO.getRegionName());\n\n p.add(HConstants.CATALOG_FAMILY, HConstants.META_VERSION_QUALIFIER,\n Bytes.toBytes(META_VERSION_092));\n\n // TODO wire this MetaEditor.putToRootTable(ct, p);\n LOG.info(\"Downgraded -ROOT- meta version=\" + META_VERSION_092);\n }", "private static void removeOldEntries(final Ignite ignite, final String dataCacheName,\n final Map<String, EntryProcessorResult<Long>> currentVersions) {\n\n IgniteCache<PlatformDotNetEntityFrameworkCacheKey, PlatformDotNetEntityFrameworkCacheEntry> cache =\n ignite.cache(dataCacheName);\n\n Set<PlatformDotNetEntityFrameworkCacheKey> keysToRemove = new TreeSet<>();\n\n ClusterNode localNode = ignite.cluster().localNode();\n\n for (Cache.Entry<PlatformDotNetEntityFrameworkCacheKey, PlatformDotNetEntityFrameworkCacheEntry> cacheEntry :\n cache.localEntries(CachePeekMode.ALL)) {\n // Check if we are on a primary node for the key, since we use CachePeekMode.ALL\n // and we don't want to process backup entries.\n if (!ignite.affinity(dataCacheName).isPrimary(localNode, cacheEntry.getKey()))\n continue;\n\n long[] versions = cacheEntry.getKey().versions();\n String[] entitySets = cacheEntry.getValue().entitySets();\n\n for (int i = 0; i < entitySets.length; i++) {\n EntryProcessorResult<Long> curVer = currentVersions.get(entitySets[i]);\n\n if (curVer != null && versions[i] < curVer.get())\n keysToRemove.add(cacheEntry.getKey());\n }\n }\n\n cache.removeAll(keysToRemove);\n }", "@Override\n\tpublic void onTenantRename(int tenantId, String oldDomainName,\n String newDomainName) throws StratosException {\n\t}", "public Iterable<IndexUpdate> getIndexDeletes(TableState state, IndexMetaData context, byte[] regionStartKey, byte[] regionEndKey) throws IOException;", "public static void scriptDelete() {\n List<BeverageEntity> beverages = (List<BeverageEntity>) adminFacade.getAllBeverages();\n for (int i = 0; i < beverages.size(); i++) {\n System.out.println(\"delete : \" + beverages.get(i));\n adminFacade.removeBeverage(beverages.get(i));\n }\n List<DecorationEntity> decos = (List<DecorationEntity>) adminFacade.getAllDecorations();\n for (int i = 0; i < decos.size(); i++) {\n System.out.println(\"delete : \" + decos.get(i));\n adminFacade.removeDecoration(decos.get(i));\n }\n\n /* Check that there isn't any other cocktails, and delete remaining */\n List<CocktailEntity> cocktails = (List<CocktailEntity>) adminFacade.getAllCocktails();\n if (cocktails.size() > 0) {\n System.err.println(\"Les cocktails n'ont pas été tous supprimés... \"\n + cocktails.size() + \" cocktails restants :\");\n }\n for (int i = 0; i < cocktails.size(); i++) {\n CocktailEntity cocktail = adminFacade.getCocktailFull(cocktails.get(i));\n System.err.println(cocktail.getName() + \" : \"\n + cocktail.getDeliverables());\n adminFacade.removeCocktail(cocktail);\n }\n\n /* Remove client accounts */\n List<ClientAccountEntity> clients = (List<ClientAccountEntity>) adminFacade.getAllClients();\n for (int i = 0; i < clients.size(); i++) {\n adminFacade.removeClient(clients.get(i));\n }\n\n /* Remove addresses */\n List<AddressEntity> addresses = (List<AddressEntity>) adminFacade.getAllAddresses();\n for (int i = 0; i < addresses.size(); i++) {\n adminFacade.removeAddress(addresses.get(i));\n }\n\n /* TODO :\n * * Remove orders\n */\n }", "@Override\n\tpublic int deleteByPrimaryKey(String id) {\n\t\treturn siteReservoirInfoMapper.deleteByPrimaryKey(id);\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete MantisApprover : {}\", id);\n mantisApproverRepository.delete(id);\n }", "@Override\n public void delete(ClientAuditTrailHolder oldObj_) throws Exception\n {\n\n }", "public void deleteIndex() throws IOException {\n synchronized (getLock()) {\n flush();\n if (ZimbraLog.index_add.isDebugEnabled()) {\n ZimbraLog.index_add.debug(\"Deleting index \" + luceneDirectory);\n }\n\n String[] files;\n try {\n files = luceneDirectory.listAll();\n } catch (NoSuchDirectoryException ignore) {\n return;\n } catch (IOException e) {\n ZimbraLog.index_add.warn(\"Failed to delete index: %s\",\n luceneDirectory, e);\n return;\n }\n\n for (String file : files) {\n luceneDirectory.deleteFile(file);\n }\n }\n }", "@Override\n\tpublic int deleteFromLicenseBizOrderByPrimaryKey(Integer id) {\n\t\treturn licenseBizOrderMapper.deleteByPrimaryKey(id);\n\t}", "@Override\n public void delete(String instance) {\n InstanceManifest im = readInstance(instance);\n List<InstanceVersionDto> versions = listVersions(instance);\n RemoteService master = mp.getControllingMaster(hive, im.getManifest());\n try (Activity deploy = reporter.start(\"Deleting \" + im.getConfiguration().name);\n NoThrowAutoCloseable proxy = reporter.proxyActivities(master)) {\n MasterRootResource root = ResourceProvider.getVersionedResource(master, MasterRootResource.class, context);\n InstanceStatusDto status = root.getNamedMaster(group).getStatus(instance);\n for (String app : status.getAppStatus().keySet()) {\n if (status.isAppRunningOrScheduled(app)) {\n throw new WebApplicationException(\"Application still running, cannot delete: \" + app,\n Status.EXPECTATION_FAILED);\n }\n }\n\n // cleanup is done periodically in background, still uninstall installed\n // versions to prevent re-start of processes later\n for (InstanceVersionDto dto : versions) {\n root.getNamedMaster(group).uninstall(dto.key);\n }\n\n root.getNamedMaster(group).delete(instance);\n }\n\n syncInstance(minion, rc, group, instance);\n\n versions.forEach(v -> changes.remove(ObjectChangeType.INSTANCE, v.key));\n }", "public void unIndex(final Term idTerm) {\n\t\ttry {\n\t\t\t_reopenToken = _trackingIndexWriter.deleteDocuments(idTerm);\n\t\t\tlog.debug(\"{}={} term matching records un-indexed from lucene\",idTerm.field(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t idTerm.text());\n\t\t} catch(IOException ioEx) {\n\t\t\tlog.error(\"Error in un-index lucene operation: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t \t\t \t\t ioEx);\t\t\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\t_indexWriter.commit(); \n\t\t\t} catch (IOException ioEx) {\n\t\t\t\tlog.error(\"Error while commiting changes to Lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t \t\t\t\t\t ioEx);\n\t\t\t}\n\t\t}\n\t}", "public void removeOldRecords();", "@Test\n void testDeleteEntriesByDate() {\n jpaTm()\n .transact(\n () -> {\n Spec11ThreatMatchDao.deleteEntriesByDate(jpaTm(), TODAY);\n ImmutableList<Spec11ThreatMatch> persistedToday =\n Spec11ThreatMatchDao.loadEntriesByDate(jpaTm(), TODAY);\n assertThat(persistedToday).isEmpty();\n });\n\n // Verify that all other entries were not removed\n jpaTm()\n .transact(\n () -> {\n ImmutableList<Spec11ThreatMatch> persistedYesterday =\n Spec11ThreatMatchDao.loadEntriesByDate(jpaTm(), YESTERDAY);\n assertThat(persistedYesterday)\n .comparingElementsUsing(immutableObjectCorrespondence(\"id\"))\n .containsExactlyElementsIn(getThreatMatchesYesterday());\n });\n }", "void deleteDag(Long id);", "int delWaybillByIdStore(Long id_store);", "@GetMapping(\"/delete\")\n public String delete(@RequestParam(\"index\") int index) {\n crudHocVien.delete(index);\n return \"redirect:/show\";\n }", "void deleteCustomerById(int customerId);", "public synchronized static void cleanOldFiles() {\n\t\tGregorianCalendar yesterday = new GregorianCalendar();\n\t\tyesterday.roll(GregorianCalendar.HOUR_OF_DAY,-4);\n\t\tcleanOldFiles(yesterday.getTime());\n\t}", "int deleteByPrimaryKey(Integer adminid);", "public void removeAlgorithmOldRootTx(String rootTxId);", "public int deleteByPrimaryKey(Integer rowid) {\r\n ZyCorporation key = new ZyCorporation();\r\n key.setRowid(rowid);\r\n int rows = getSqlMapClientTemplate().delete(\"zy_corporation.deleteByPrimaryKey\", key);\r\n return rows;\r\n }", "@Override\n\tpublic void delete(Integer transactionId) {\n\n\t}", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "public void delete() {\r\n\t\tfor (int i = 0; i <= DatabaseUniverse.getDatabaseNumber(); i++) {\r\n\t\t\tif (this.equals(DatabaseUniverse.getDatabases(i))) {\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().set(i, null);\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().remove(i);\r\n\t\t\t\tDatabaseUniverse.setDatabaseNumber(-1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int deleteByPrimaryKey(Long catalogId);", "@RequestMapping(value = \"/{dataViewId}\", method = RequestMethod.DELETE)\n public void deleteDataView(@PathVariable String dataViewId) {\n System.exit(0);\n\n }", "@Override\n\tpublic void deleteAll() throws Exception {\n\t\t\n\t}", "void deleteByOrgId(String csaOrgId);", "@Override\r\n\tpublic void delete(int id) {\n\t\tstnLooseMtRepository.delete(id);\r\n\t\t}" ]
[ "0.590462", "0.56968486", "0.5686371", "0.5571511", "0.5376356", "0.5365956", "0.52771944", "0.52632505", "0.5250094", "0.52455205", "0.52326614", "0.52211845", "0.5147375", "0.5089081", "0.5075607", "0.5058985", "0.50077546", "0.49911076", "0.4981155", "0.49719584", "0.49431357", "0.49338934", "0.4903447", "0.48407367", "0.48288944", "0.4826516", "0.4820117", "0.48197794", "0.47948578", "0.47941482", "0.4787653", "0.47853416", "0.47823957", "0.47726026", "0.47562784", "0.4735102", "0.47209203", "0.47100887", "0.47096652", "0.47027278", "0.46922663", "0.46840724", "0.46722323", "0.46683604", "0.46649152", "0.46614015", "0.4658012", "0.46511367", "0.46489456", "0.46340865", "0.46243283", "0.4623476", "0.46217704", "0.45959637", "0.45959637", "0.4592331", "0.45880046", "0.45843545", "0.45742825", "0.4568862", "0.45664594", "0.45658985", "0.45640457", "0.45629302", "0.4560323", "0.45555082", "0.45549637", "0.45542935", "0.45409352", "0.45403934", "0.45358914", "0.45328793", "0.4531844", "0.4529149", "0.45288822", "0.45274982", "0.4522395", "0.4519187", "0.4514344", "0.45091274", "0.45058948", "0.45046905", "0.4504327", "0.45040306", "0.45010045", "0.4496642", "0.44959953", "0.44942895", "0.44827884", "0.44803473", "0.44803447", "0.44759583", "0.44747794", "0.44711706", "0.44695306", "0.44653183", "0.44629708", "0.44590938", "0.44522607", "0.4448952" ]
0.7051438
0
/ Code to avoid the occurrence of records when limit equals to zero
private RecordCollection toRecordCollectionWithLimitCheck(QueryResult result, int limit) { // Validation to ignore records insertion to the returned recordCollection when limit equals zero if (limit == 0) { return new RecordCollection().withTotalRecords(asRow(result.unwrap()).getInteger(COUNT)); } else { return toRecordCollection(result); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearLimit() { limit_ = null;\n \n }", "public long limit();", "public void setLimit(int limit) {\n this.limit=limit;\n }", "private void limitRows()\n {\n paginate(currentPage, getResultsPerPage());\n }", "public void setLimit(int limit) {\n this.limit = limit;\n }", "public boolean limitHit() {\r\n return (count >= maxCount);\r\n }", "public void setLimit(int limit) {\n this.limit = limit;\n }", "void setMaxResults(int limit);", "public void setLimit(Integer limit) {\n this.limit = limit;\n }", "@SuppressWarnings(\"unchecked\")\n public Q limit(int limit) {\n this.limit = limit;\n return (Q) this;\n }", "public void setLimit(Long limit) {\n this.limit = limit;\n }", "public void setLimit(int limit) {\n\t\tthis.limit = limit;\n\t}", "public void setLimit(int limit) {\n\tLimit = limit;\n }", "public void setReportLimit(long limit)\n {\n if (limit < 0L) {\n this.rptLimitCount = -1L;\n } else\n if (limit == 0L) {\n this.rptLimitCount = 1L;\n } else {\n this.rptLimitCount = limit;\n }\n //Print.logInfo(\"Report record limit: %d\", this.rptLimitCount);\n }", "public boolean hasLimit() {\n return result.hasLimit();\n }", "public void setNilLimit()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNonNegativeInteger target = null;\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().add_element_user(LIMIT$6);\r\n }\r\n target.setNil();\r\n }\r\n }", "Limit createLimit();", "boolean isLimited();", "public AisPacketStream limit(long limit) {\n if (limit < 1) {\n throw new IllegalArgumentException(\"Limit must be at least 1, was: \" + limit);\n }\n final AtomicLong l = new AtomicLong(limit);\n return filter(new Predicate<AisPacket>() {\n public boolean test(AisPacket element) {\n if (l.getAndDecrement() <= 0) {\n throw AisPacketStream.CANCEL;\n }\n return true;\n }\n });\n }", "public void setLimit(Long Limit) {\n this.Limit = Limit;\n }", "public void setLimit(Long Limit) {\n this.Limit = Limit;\n }", "public void setLimitStart(Integer limitStart) {\r\n this.limitStart=limitStart;\r\n }", "int getLimit();", "int getLimit();", "int getMaxRecords();", "public ListInfrastructure limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public void xsetLimit(org.apache.xmlbeans.XmlNonNegativeInteger limit)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNonNegativeInteger target = null;\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().add_element_user(LIMIT$6);\r\n }\r\n target.set(limit);\r\n }\r\n }", "private void optimizeLimitCount() {\n TreeNode currentTreeNode = treeLeaf;\n while (!(currentTreeNode instanceof SourceTreeNode)) {\n if (currentTreeNode instanceof CountGlobalTreeNode) {\n CountGlobalTreeNode countGlobalTreeNode = CountGlobalTreeNode.class.cast(currentTreeNode);\n if (countGlobalTreeNode.getAfterRequirementList().isEmpty() &&\n countGlobalTreeNode.getBeforeRequirementList().isEmpty() &&\n countGlobalTreeNode.getInputNode() instanceof RangeGlobalTreeNode) {\n RangeGlobalTreeNode rangeGlobalTreeNode = RangeGlobalTreeNode.class.cast(countGlobalTreeNode.getInputNode());\n if (rangeGlobalTreeNode.getAfterRequirementList().isEmpty() &&\n rangeGlobalTreeNode.getBeforeRequirementList().isEmpty() &&\n rangeGlobalTreeNode.getLow() == 0 &&\n rangeGlobalTreeNode.getHigh() > 0) {\n countGlobalTreeNode.setLimitCount(rangeGlobalTreeNode.getHigh());\n countGlobalTreeNode.setInputNode(rangeGlobalTreeNode.getInputNode());\n if (countGlobalTreeNode.getInputNode() instanceof EdgeTreeNode) {\n ((EdgeTreeNode) countGlobalTreeNode.getInputNode()).setFetchPropFlag(true);\n }\n }\n }\n }\n currentTreeNode = UnaryTreeNode.class.cast(currentTreeNode).getInputNode();\n }\n }", "public void setLimitStart(int limitStart) {\n this.limitStart=limitStart;\n }", "public void setLimitStart(int limitStart) {\n this.limitStart=limitStart;\n }", "public void setLimitStart(int limitStart) {\n this.limitStart=limitStart;\n }", "public SearchBuilder<T> limit(final int limit) {\n\t\treturn take(limit);\n\t}", "@Override\n\tpublic IDBResultSet selectByLimit(ITableDBContext context, Table table, IDBFilter filter, long startRow, int count)\n\t\t\tthrows Throwable {\n\t\tthrow new Warning(\"not impl\");\n\t}", "public void truncate() {\n if (this.size > this.limit) {\n removeFirst();\n }\n }", "private boolean requestLimitReached() {\n\t\treturn (requestCount >= maximumRequests);\n\t}", "public void setMaxResults(int val) throws HibException;", "public DeleteCollectionProxy limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public DeleteCollectionBuild limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public DeleteCollectionInfrastructure limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListProxy limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public Builder clearLimit() { copyOnWrite();\n instance.clearLimit();\n return this;\n }", "void setLimit(int limit);", "public boolean hasLimit() {\n return instance.hasLimit();\n }", "protected abstract boolean reachedContractLimit(int size);", "public boolean hasLimit() {\n return limit_ != null;\n }", "public ListBuild limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public void setLimit(double limit) {\n\t\tthis.limit = limit;\n\t }", "@Override\r\n public Boolean limitInserts(Long id) {\n long limit = 8;\r\n try {\r\n Query query = manager.createQuery(\"select count(n) from \" + Oferta.class.getName() + \" n where id_empresa = :id\");\r\n query.setParameter(\"id\", id);\r\n long result = (Long) query.getSingleResult();\r\n if (result >= limit) {\r\n return false;\r\n }\r\n return true;\r\n } catch (NoResultException ex) {\r\n log.error(ex);\r\n return false;\r\n }\r\n }", "public ListIngress limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "private void raiseLimitException() {\n\t\t\tthrow new DataBufferLimitException(\"Exceeded limit on max bytes to buffer : \" + getMaxInMemorySize());\n\t\t}", "@Override\n public boolean getMoreResults(int current) throws SQLException {\n return false;\n }", "@Override\n\tboolean allow() {\n\t\tlong curTime = System.currentTimeMillis()/1000 * 1000;\n\t\tlong boundary = curTime - 1000;\n\t\tsynchronized (log) {\n\t\t\t//1. Remove old ones before the lower boundary\n\t\t\twhile (!log.isEmpty() && log.element() <= boundary) {\n\t\t\t\tlog.poll();\n\t\t\t}\n\t\t\t//2. Add / log the new time\n\t\t\tlog.add(curTime);\n\t\t\tboolean allow = log.size() <= maxReqPerUnitTime;\n\t\t\tSystem.out.println(curTime + \", log size = \" + log.size()+\", allow=\"+allow);\n\t\t\treturn allow;\n\t\t}\n\t}", "public boolean getMoreResults(int current) throws SQLException {\n return false;\r\n }", "public Builder limit(long limit) {\n this.limit = limit;\n return this;\n }", "public ListDNS limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public void truncate(int limit);", "public MapReduceToCollectionOperation limit(final int limit) {\n this.limit = limit;\n return this;\n }", "public DeleteCollectionOperatorHub limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public DeleteCollectionIngress limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "String limitSubquery();", "public SearchBuilder<T> take(final int limit) {\n\t\tthis.limit = limit;\n\t\treturn this;\n\t}", "public double getLimit() {return limit;}", "public boolean isNilLimit()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNonNegativeInteger target = null;\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null) return false;\r\n return target.isNil();\r\n }\r\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 Builder clearIsLimited() {\n \n isLimited_ = false;\n onChanged();\n return this;\n }", "public void checkErrorLimit(int increment) {\n errorCounter += increment;\n if (errorCounter >= AppyAdService.getInstance().maxErrors()) {\n setAdProcessing(false);\n // todo ????\n }\n }", "@Test\r\n void limitMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().limit(2);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", 2, afterStreamList.size());\r\n }", "public void setMaxRows(int max) throws SQLException {\n\r\n }", "public void setMaxRecords(Integer maxRecords) {\n this.maxRecords = maxRecords;\n }", "public void setMaxRecords(Integer maxRecords) {\n this.maxRecords = maxRecords;\n }", "Limits limits();", "FindEntriesCondition(long maxSize) {\n this.maxSize = maxSize;\n this.endTime = -1;\n }", "protected void checkRowNumLimit(PmTableImpl<PmBean<?>, ?> pm, long numOfItemsToValidate) {\n if (numOfItemsToValidate > itemNumWarningLimit) {\n LOG.warn(pm.getPmRelativeName() + \": Performance warning - In memory validation for \" + numOfItemsToValidate + \" row PMs started.\");\n }\n }", "ChangeObserver<T> limit(int maxChanges);", "private void limitChecking() {\n if (!export) {\n String maxNumberOfRows = ConfigurationService.getAsString(summaryReportConfig.reportDefinition.getGroup(), \"max_number_of_rows\");\n String maxNumberOfColumns = ConfigurationService.getAsString(summaryReportConfig.reportDefinition.getGroup(), \"max_number_of_columns\");\n if (isEmptyOrNull(maxNumberOfRows) || isEmptyOrNull(maxNumberOfColumns)) {\n throw new UserException(\"It is not possible to read \\\"Max Table Summary Columns\\\" and \\\"Max Table Summary Rows\\\" configuration.\");\n }\n\n Long maxProperty1 = Long.valueOf(maxNumberOfRows);\n if (!summaryReportConfig.isTwoDimension()) {\n if (properties1.size() > maxProperty1) {\n logger.info(\"Property \" + groupByList.get(0).getLabel() + \" has [\" + properties1.size()\n + \"] items that exceed the allowed limit of [\" + maxProperty1 + \"]\");\n throw new UserException(\"Report results exceed configured Max Row display limit.\"\n + \" Do you want to export results instead?\"); // max rows\n }\n } else {\n Long maxProperty2 = Long.valueOf(maxNumberOfColumns);\n if ((properties1.size() > maxProperty1) && (properties2.size() > maxProperty2)) {\n logger.info(\"Property \" + groupByList.get(0).getLabel() + \" has [\" + properties1.size()\n + \"] items that exceed the allowed limit of [\" + maxProperty1 + \"] \\n\"\n + \"Property \" + groupByList.get(1).getLabel() + \" has [\" + properties2.size()\n + \"] items that exceed the allowed limit of [\" + maxProperty2 + \"]\");\n throw new UserException(\"Report results exceed configured Max Column and Max Row display limits. \"\n + \"Do you want to export results instead?\"); // max columns and rows\n } else if (properties1.size() > maxProperty1) {\n logger.info(\"Property \" + groupByList.get(0).getLabel() + \" has [\" + properties1.size()\n + \"] items that exceed the allowed limit of [\" + maxProperty1 + \"]\");\n throw new UserException(\"Report results exceed configured Max Row display limit. \"\n + \"Do you want to export results instead?\"); // max rows\n } else if (properties2.size() > maxProperty2) {\n logger.info(\"Property \" + groupByList.get(1).getLabel() + \" has [\" + properties2.size()\n + \"] items that exceed the allowed limit of [\" + maxProperty2 + \"]\");\n throw new UserException(\"Report results exceed configured Max Column display limit. \"\n + \"Do you want to export results instead?\"); // max columns\n }\n }\n }\n }", "private void checkStartLimit(int start, int limit) {\r\n if (start > limit) {\r\n throw new IllegalArgumentException(\r\n \"Start is greater than limit. start:\" + start + \"; limit:\" + limit);\r\n }\r\n if (start < 0) {\r\n throw new IllegalArgumentException(\"Start is negative. start:\" + start);\r\n }\r\n if (limit > length()) {\r\n throw new IllegalArgumentException(\"Limit is greater than length. limit:\" + limit);\r\n }\r\n }", "public DeleteCollectionScheduler limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public synchronized void limitNextBytes() {\n limitNextBytes(1);\n }", "public void setMaxRecords(int maxRecords) {\n this.maxRecords = maxRecords;\n }", "boolean hasMaxCount();", "public void setLimitEnd(int limitEnd) {\n this.limitEnd=limitEnd;\n }", "public void setLimitEnd(int limitEnd) {\n this.limitEnd=limitEnd;\n }", "private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }", "private void notEligibleForRealMax() {\n eligibleForRealMax = false;\n }", "public void setSelectionLimit(long limit)\n {\n if (limit < 0L) {\n this.selLimitCount = -1L;\n } else\n if (limit == 0L) {\n this.selLimitCount = 1L;\n } else {\n this.selLimitCount = limit;\n }\n }", "public void setLimitEnd(Integer limitEnd) {\r\n this.limitEnd=limitEnd;\r\n }", "public DeleteCollectionDNS limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "int getNotInCount();", "public T caseLimit(Limit object) {\r\n\t\treturn null;\r\n\t}", "protected Limit getLimit() {\n return new Limit(skip, limit);\n }", "static void handlePaginated(IPlaceFinder finder, int limit) {\n LocalTime firstReqTime = LocalTime.now();\n findPagedResults(finder, limit, 0);\n int offset = limit;\n while(scanner.hasNextLine()) {\n String input = scanner.nextLine();\n if (ValidInput.MORE.getInput().equals(input)) {\n // checks if the current call is no later than 5 minutes of first request\n if (firstReqTime.plusMinutes(5L).isAfter(LocalTime.now())) {\n findPagedResults(finder, limit, offset);\n offset = offset + limit;\n //makes a new call if the first request is older than 5 mins\n } else {\n MessageOut.gettingNewResults();\n findPagedResults(finder, limit, 0);\n offset = limit;\n }\n } else if (ValidInput.END.getInput().equals(input)) {\n break;\n } else {\n MessageOut.notValidInput();\n }\n }\n }", "public ListScheduler limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public boolean queryAfterZeroResults() {\n/* 264 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private static ArrayList<Result> pruneResults(ArrayList<Result> pruneThis, int limit){\n\t\tArrayList<Result> sortednodups = sortByScore(pruneThis);\n\t\tArrayList<Result> pruned = new ArrayList<Result>();\n\t\tfor (int i = 0; i<limit && i < pruneThis.size(); i++){\n\t\t\tpruned.add(sortednodups.get(i));\n\t\t}\n\t\treturn pruned; \n\t}", "private void limit(order ord, ArrayList<order> lim){\n //B\n if (ord.BS.equals(\"B\")){\n System.out.println(\"ord:\" + ord.BS + \" \" + ord.qty + \" \" + ord.price + \" \" + ord.sequence);\n for(int i = 0; i < lim.size(); i++){\n if (ord.price > lim.get(i).price){\n lim.add(i, ord);\n reportClient(i, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n break;\n }\n\n if (lim.size()-1 == i){\n lim.add(ord);\n reportClient(i, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n break;\n }\n }\n if (lim.size() == 0) {\n lim.add(ord);\n reportClient(0, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n }\n }\n\n //S\n if (ord.BS.equals(\"S\")){\n System.out.println(\"ord:\" + ord.BS + \" \" + ord.qty + \" \" + ord.price + \" \" + ord.sequence);\n for(int i = 0; i < lim.size(); i++){\n if (ord.price < lim.get(i).price){\n lim.add(i, ord);\n reportClient(i, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n break;\n }\n\n if (lim.size()-1 == i){\n lim.add(ord);\n reportClient(i, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n break;\n }\n }\n if (lim.size() == 0) {\n lim.add(ord);\n reportClient(0, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n }\n }\n\n allOrder.add(ord);\n //Print\n //System.out.println(\"limit:\" + ord.BS + \" \" + ord.qty + \" \" + ord.price);\n for(int i = 0; i < lim.size(); i++) \n System.out.println(lim.get(i).BS + lim.get(i).price);\n\n }", "public void setLimit_reached(boolean limit_reached) {\n this.limit_reached = limit_reached;\n }", "int maxNumberOfPutRows();", "public boolean hasNext()\n/* */ {\n/* 73 */ return this.m_offset < this.m_limit;\n/* */ }", "String getLimit(boolean hasWhereClause, long limit);", "@Override\n\tpublic boolean isUnlimited() {\n\t\treturn false;\n\t}" ]
[ "0.62034506", "0.61172515", "0.61082184", "0.60792714", "0.60734814", "0.60448587", "0.6044458", "0.60302484", "0.5997513", "0.59642535", "0.59220415", "0.59100413", "0.5904492", "0.58617705", "0.58189726", "0.5751369", "0.57324487", "0.56969935", "0.569168", "0.56664765", "0.56664765", "0.5630011", "0.56256735", "0.56256735", "0.5611271", "0.5592917", "0.5590024", "0.55885553", "0.55849105", "0.55849105", "0.55849105", "0.5577258", "0.5571132", "0.55650115", "0.5559499", "0.555208", "0.5542958", "0.55370057", "0.5517973", "0.551672", "0.5512024", "0.5489293", "0.54774016", "0.5473615", "0.5468594", "0.5461367", "0.54590094", "0.5452429", "0.54517424", "0.5433153", "0.54321486", "0.5422265", "0.540859", "0.5407752", "0.5405272", "0.5402487", "0.5377562", "0.5342052", "0.53403926", "0.5336145", "0.5333021", "0.531836", "0.52902305", "0.5285836", "0.52819985", "0.52808225", "0.52763534", "0.52757275", "0.5266202", "0.5266202", "0.525275", "0.5252697", "0.52526915", "0.5250636", "0.5243773", "0.52407235", "0.52395344", "0.52393717", "0.52364177", "0.52356285", "0.52351665", "0.52351665", "0.52199054", "0.52103335", "0.5209816", "0.52087635", "0.52015144", "0.51917225", "0.5190447", "0.5185062", "0.518077", "0.51683265", "0.51613736", "0.51602703", "0.5160221", "0.5159791", "0.51597774", "0.5157088", "0.51557344", "0.5138223" ]
0.7040243
0
TODO Autogenerated method stub
@Override public <E> void add(Attr<E> newAttr) { }
{ "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 <E> Attr<E> find(String attrName) { return null; }
{ "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 <E> Attr<E> remove(String attrName) { return null; }
{ "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 <E> Iterator<Attr<E>> attrs() { return null; }
{ "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
Creates a new PaxosExecution within the given PaxosInstance for the given initiator. A PaxosRound with round number 0 is also created and its timeout is started
public PaxosExecution(PaxosInstance a_instance, String a_initiator, Vector a_roundLeaders) { this.m_initiator = a_initiator; this.m_paxosInstance = a_instance; m_roundLeaders = a_roundLeaders; createRound(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract T create(final double idealStartTime);", "SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.Execution>\n createExecution(com.google.cloud.aiplatform.v1.CreateExecutionRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateExecutionMethod(), getCallOptions()), request);\n }", "public PaxosRound createRound()\n {\n return createRound(0);\n }", "public IExecution createExecution(Context context,\n Map<String, Object> parameters) throws LawException {\n \tEvent event = new Event(getId(), Masks.CLOCK_ACTIVATION, getId());\n \tevent.setContent(parameters);\n context.fire(event);\n \n // return the ClockExecution\n return new ClockExecution(context, timeout, type,this,parameters);\n }", "public ExecutionFactoryImpl() {\n\t\tsuper();\n\t}", "public com.google.cloud.aiplatform.v1.Execution createExecution(\n com.google.cloud.aiplatform.v1.CreateExecutionRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateExecutionMethod(), getCallOptions(), request);\n }", "public boolean startProcess (Properties ctx, ProcessInfo pi, Trx trx);", "public void createExecution(\n com.google.cloud.aiplatform.v1.CreateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateExecutionMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public Execution(\n\t\t\tExecutor executor,\n\t\t\tExecutionVertex vertex,\n\t\t\tint attemptNumber,\n\t\t\tlong globalModVersion,\n\t\t\tlong startTimestamp,\n\t\t\tTime rpcTimeout) {\n\n\t\tthis.executor = checkNotNull(executor);\n\t\tthis.vertex = checkNotNull(vertex);\n\t\tthis.attemptId = new ExecutionAttemptID();\n\t\tthis.rpcTimeout = checkNotNull(rpcTimeout);\n\n\t\tthis.globalModVersion = globalModVersion;\n\t\tthis.attemptNumber = attemptNumber;\n\n\t\tthis.stateTimestamps = new long[ExecutionState.values().length];\n\t\tmarkTimestamp(CREATED, startTimestamp);\n\n\t\tthis.partitionInfos = new ArrayList<>(16);\n\t\tthis.producedPartitions = Collections.emptyMap();\n\t\tthis.terminalStateFuture = new CompletableFuture<>();\n\t\tthis.releaseFuture = new CompletableFuture<>();\n\t\tthis.taskManagerLocationFuture = new CompletableFuture<>();\n\n\t\tthis.assignedResource = null;\n\t}", "public SimResult start() {\n\t\tSimResultBuilder srb = new SimResultBuilder();\n\t\tList<Long> durations = new ArrayList<Long>();\n\t\tList<Long> tardinesses = new ArrayList<Long>();\n\t\tsrb.overallStartTime(System.currentTimeMillis());\n\t\t(new AddInputs()).run();\n\t\tsrb.overallCompletionTime(System.currentTimeMillis());\n\t\tfor (Result<BaseClusterSimWorkflow> r : results) {\n\t\t\tdurations.add(r.getLifeTimeDuration());\n\t\t\ttardinesses.add(r.getTardiness());\n\t\t}\n\t\tsrb.duration(durations);\n\t\tsrb.tardiness(tardinesses);\n\t\tsrb.executionStatus(ExecutionStatus.SUCCESSFUL);\n\t\treturn srb.build();\n\t}", "default void createExecution(\n com.google.cloud.aiplatform.v1.CreateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateExecutionMethod(), responseObserver);\n }", "@Test(groups = {\"rest-commands\"}, dependsOnMethods = {\"createStandaloneInstanceTest\"})\n public void startInstanceTest() {\n GlassFishServer server = glassFishServer();\n Command command = new CommandStartInstance(STANDALONE_INSTANCE);\n try {\n Future<ResultString> future =\n ServerAdmin.<ResultString>exec(server, command);\n try {\n ResultString result = future.get();\n //assertNotNull(result.getValue());\n assertEquals(result.state, TaskState.COMPLETED);\n } catch ( InterruptedException | ExecutionException ie) {\n fail(\"CommandStartInstance command execution failed: \" + ie.getMessage());\n }\n } catch (GlassFishIdeException gfie) {\n fail(\"CommandStartInstance command execution failed: \" + gfie.getMessage());\n }\n }", "public PaxosRound createRound(int a_round)\n {\n PaxosRound result = new PaxosRound(this, a_round, getNextRoundLeader(a_round));\n m_rounds.put(new Integer(a_round), result);\n return result;\n }", "public PaxosInstance(PaxosAcceptor a_acceptor, String a_instanceNumber)\n {\n this.m_instanceNumber = a_instanceNumber;\n this.m_acceptor = a_acceptor;\n }", "public static ProcessExecution createEntity(EntityManager em) {\n ProcessExecution processExecution = new ProcessExecution()\n .execution(DEFAULT_EXECUTION);\n return processExecution;\n }", "@Test\n\tpublic void testStartInstance_1()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tSAPInstance aInstance = new SAPInstance();\n\t\tOperationOptions aOptions = new OperationOptions();\n\n\t\tOperationResult result = fixture.startInstance(aInstance, aOptions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public void persistPrijava(DelegateExecution delegateExecution) {\n PrijavaEntity prijavaEntity = new PrijavaEntity();\n\n // Get all process variables\n Map<String, Object> variables = delegateExecution.getVariables();\n\n // Set order attributes\n prijavaEntity.setStudent((String) variables.get(\"student\"));\n prijavaEntity.setIndeks((String) variables.get(\"indeks\"));\n prijavaEntity.setIspit((String) variables.get(\"ispit\"));\n\n // Persist order instance and flush. After the flush the\n // id of the order instance is set.\n entityManager.persist(prijavaEntity);\n entityManager.flush();\n\n // Remove no longer needed process variables\n delegateExecution.removeVariables(variables.keySet());\n\n // Add newly created order id as process variable\n delegateExecution.setVariable(\"prijavaId\", prijavaEntity.getId());\n }", "@Test(expected = org.apache.axis.NoEndPointException.class)\n\tpublic void testStartInstance_5()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub((URL) null, new DeployWSServiceLocator());\n\t\tSAPInstance aInstance = new SAPInstance();\n\t\tOperationOptions aOptions = new OperationOptions();\n\n\t\tOperationResult result = fixture.startInstance(aInstance, aOptions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "private static SimpleProcessExecutor newSimpleProcessExecutor() {\n return new SimpleProcessExecutor(new TestProcessManagerFactory().newProcessManager());\n }", "Operacion createOperacion();", "@Test\n public void testTransientProcessInstanceDeclaringProcessInterfaceStandardImpl() throws Exception\n {\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_PROCESS_INTERFACE, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_MODEL_REF.times(1),\n SELECT_PREFERENCE.times(7));\n }", "@Test(expected = java.rmi.RemoteException.class)\n\tpublic void testStartInstance_2()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tSAPInstance aInstance = new SAPInstance();\n\t\tOperationOptions aOptions = new OperationOptions();\n\n\t\tOperationResult result = fixture.startInstance(aInstance, aOptions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public static Process createEntity() {\n Process process = new Process()\n .name(DEFAULT_NAME)\n .isRunning(DEFAULT_IS_RUNNING)\n .createdAt(DEFAULT_CREATED_AT)\n .updatedAt(DEFAULT_UPDATED_AT);\n return process;\n }", "public static void test_4a() {\r\n try {\r\n System.out.println(\"\\n\\nTest Case - 4A :\\n\\n\");\r\n TestNetwork n = new TestNetwork(5, 5, 2);\r\n Paxos p = new Paxos(n);\r\n p.runPaxos();\r\n Thread.sleep(1000);\r\n n.change_DPmode(1, 1); // All proposers are Distinguished\r\n n.dup_msg(0, 2); // Duplicate messages sent by proposer 0\r\n n.dup_msg(1, 2); // Duplicate messages sent by proposer 1\r\n n.dup_msg(3, 2); // Duplicate messages sent by proposer 3\r\n Thread.sleep(5000);\r\n n.terminate_run();\r\n Thread.sleep(2000);\r\n System.out.println(\"\\n\\nTERMINATED PAXOS RUN-4A\");\r\n n.printTrace();\r\n } catch(Exception e) {}\r\n}", "public TestOrchestrator(final NativeTest testTask, TestOrchestratorFactory factory) {\n if (testTask == null) {\n throw new IllegalArgumentException(\"testTask == null!\");\n }\n if (factory == null) {\n throw new IllegalArgumentException(\"factory == null!\");\n }\n\n this.testTask = testTask;\n this.factory = factory;\n }", "public SimResult start(final int PoolSize) {\n\t\tthis.POOL_SIZE = PoolSize;\n\t\tSimResultBuilder srb = new SimResultBuilder();\n\t\tList<Long> durations = new ArrayList<Long>();\n\t\tList<Long> tardinesses = new ArrayList<Long>();\n\t\tsrb.overallStartTime(System.currentTimeMillis());\n\t\t(new AddInputs()).run();\n\t\tsrb.overallCompletionTime(System.currentTimeMillis());\n\t\tfor (Result<BaseClusterSimWorkflow> r : results) {\n\t\t\tdurations.add(r.getLifeTimeDuration());\n\t\t\ttardinesses.add(r.getTardiness());\n\t\t}\n\t\tsrb.duration(durations);\n\t\tsrb.tardiness(tardinesses);\n\t\tsrb.executionStatus(ExecutionStatus.SUCCESSFUL);\n\t\treturn srb.build();\n\t}", "ShipmentTimeEstimate createShipmentTimeEstimate();", "private TransactionSchedulerResult scheduleSignTransaction(HederaClient hederaClient, TransactionReceipt existingReceipt) throws TimeoutException {\n // the same tx has already been submitted, submit just the signature\n // get the receipt for the transaction\n try {\n this.transactionId = TransactionId.generate(AccountId.fromString(Objects.requireNonNull(env.get(\"OPERATOR_ID\"))));\n log.debug(\"Signing schedule id {}, transaction id {} with key for public key {}\", existingReceipt.scheduleId, this.transactionId.toString(), shortKey(hederaClient.operatorPublicKey()));\n ScheduleSignTransaction scheduleSignTransaction = new ScheduleSignTransaction()\n .setTransactionId(this.transactionId)\n .setScheduleId(existingReceipt.scheduleId);\n\n TransactionResponse response = scheduleSignTransaction.freezeWith(hederaClient.client()).execute(hederaClient.client());\n\n try {\n TransactionReceipt receipt = response.getReceipt(hederaClient.client());\n return handleResponse(hederaClient, receipt, existingReceipt.scheduleId);\n } catch (ReceiptStatusException receiptStatusException) {\n return handleResponse(hederaClient, receiptStatusException.receipt, existingReceipt.scheduleId);\n }\n\n } catch (TimeoutException e) {\n log.error(\"Exception fetching receipt\", e);\n throw e;\n } catch (PrecheckStatusException precheckStatusException) {\n log.debug(precheckStatusException.status);\n switch (precheckStatusException.status) {\n case SCHEDULE_ALREADY_EXECUTED:\n return new TransactionSchedulerResult(/* success= */true, Status.SUCCESS, existingReceipt.scheduleId);\n case DUPLICATE_TRANSACTION:\n return new TransactionSchedulerResult(/* success= */false, precheckStatusException.status);\n default:\n return new TransactionSchedulerResult(/* success= */false, precheckStatusException.status);\n }\n }\n }", "public static JSqVM sq_open(int initialStackSize) throws JSquirrelException {\r\n\t\tlong handle = sq_open_native(initialStackSize);\r\n\t\tif (handle == 0)\r\n\t\t\tthrow new JSquirrelException(\"Could not create a new Squirrel VM.\");\r\n\t\treturn new JSqVM(handle);\r\n\t}", "P createP();", "public PromiseFactoryImpl() {\n\t\tsuper();\n\t}", "@DISPID(20)\n\t// = 0x14. The runtime will prefer the VTID if present\n\t@VTID(31)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject startExecution(java.lang.String serverName);", "@Test\n void scCreation() {\n StandardCalc sc = new StandardCalc();\n }", "public void setInitiator(ObjectType init) { initiator = init; }", "public static IScriptResult createResult(SceResultsType srt) {\r\n \treturn new Result(srt);\r\n }", "@Test\r\n\tpublic void testProcessInstanceExec()\r\n\t{\r\n\t\tthis.processDefinition = this.jbpmService.parseXMLResource(PROCESS_FILE);\r\n\r\n\t\tthis.jbpmService.deployProcessDefinition(this.processDefinition);\r\n\r\n\t\t// Create the instance based on the latest definition\r\n\t\tProcessInstance processInstance = this.jbpmService.createProcessInstance(this.processDefinition.getName());\r\n\r\n\t\t// Make sure instance was created\r\n\t\tassertNotNull(\"Error: jbpmService failed to create process instance for process definition \\\"\"\r\n\t\t\t\t\t\t\t\t\t+ this.processDefinition.getName() + \"\\\".\", processInstance);\r\n\r\n\t\t// Should be at start node initially\r\n\t\tassertEquals(START_NODE_NAME, processInstance.getRootToken().getNode().getName());\r\n\r\n\t\t// Let's start the process execution\r\n\t\tthis.jbpmService.signalProcessInstance(processInstance.getId());\r\n\r\n\t\t// Now the process should be in the middle state.\r\n\t\t// Reload the instance through the service so root token gets updated\r\n\t\tprocessInstance = this.jbpmService.getProcessInstance(processInstance.getId());\r\n\t\tassertEquals(MIDDLE_NODE_NAME, processInstance.getRootToken().getNode().getName());\r\n\r\n\t\t// Leave middle node and transition to the end node.\r\n\t\tthis.jbpmService.signalProcessInstance(processInstance.getId());\r\n\r\n\t\t// After signal, should be at end-state of simple process\r\n\t\tassertTrue(this.jbpmService.hasProcessInstanceEnded(processInstance.getId()));\r\n\r\n\r\n\t\t// Verify we can retrieve state from database\r\n\t\t// Again, reload the instance through the service so root token is updated\r\n\t\tprocessInstance = this.jbpmService.getProcessInstance(processInstance.getId());\r\n\t\tassertEquals(END_NODE_NAME, processInstance.getRootToken().getNode().getName());\r\n\t}", "Start createStart();", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testStartInstance_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tSAPInstance aInstance = new SAPInstance();\n\t\tOperationOptions aOptions = new OperationOptions();\n\n\t\tOperationResult result = fixture.startInstance(aInstance, aOptions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "Run createRun();", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testStartInstance_3()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tSAPInstance aInstance = new SAPInstance();\n\t\tOperationOptions aOptions = new OperationOptions();\n\n\t\tOperationResult result = fixture.startInstance(aInstance, aOptions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Test\n public void testStartTaskReadyByPotentialOwner() throws HTException {\n\n Task t = createTask_TwoPotentialOwners();\n this.services.startTask(t.getId(), \"user1\");\n \n org.junit.Assert.assertEquals(\"user1\", t.getActualOwner().getName());\n org.junit.Assert.assertEquals(Status.IN_PROGRESS, t.getStatus());\n }", "Process createProcess();", "@Test\n public void testTransientProcessInstanceWithForkOnTraversal() throws Exception\n {\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_FORKED, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_PREFERENCE.times(7));\n }", "@Test(groups = {\"rest-commands\"})\n public void createStandaloneInstanceTest() {\n GlassFishServer server = glassFishServer();\n Command command = new CommandCreateInstance(STANDALONE_INSTANCE, null,\n TestDomainV4Constants.NODE_NAME);\n try {\n Future<ResultString> future =\n ServerAdmin.<ResultString>exec(server, command);\n try {\n ResultString result = future.get();\n //assertNotNull(result.getValue());\n assertEquals(result.state, TaskState.COMPLETED);\n } catch ( InterruptedException | ExecutionException ie) {\n fail(\"CommandCreateInstance command execution failed: \" + ie.getMessage());\n }\n } catch (GlassFishIdeException gfie) {\n fail(\"CommandCreateInstance command execution failed: \" + gfie.getMessage());\n }\n }", "Instance createInstance();", "@Test\n @Deployment(resources = \"ex3a.bpmn\")\n public void testHappyPath() {\n Map<String, Object> variables = new HashMap<>();\n variables.put(\"approved\", true);\n // Start process with Java API and variables\n ProcessInstance processInstance = runtimeService().startProcessInstanceByKey(\"TwitterQAProcessEx3a\", variables);\n // Make assertions on the process instance\n assertThat(processInstance).isEnded();\n }", "T setStartTimeout(Integer timeout);", "public Invoice(final @Nullable String description,\n final boolean restricted,\n final Set<InvoiceRestriction> restrictions,\n final String script,\n final boolean timeoutEnabled,\n final long timeoutInMilliseconds,\n final String version) {\n this.description = description;\n this.restricted = restricted;\n Objects.requireNonNull(restrictions, \"Execution restriction set cannot be null\");\n this.restrictions = new HashSet<>(restrictions);\n Objects.requireNonNull(script, \"Execution script cannot be null\");\n this.script = script;\n this.timeoutEnabled = timeoutEnabled;\n if (timeoutInMilliseconds < 0) {\n throw new IllegalArgumentException(\"Execution timeout value cannot be negative\");\n }\n this.timeoutInMilliseconds = timeoutInMilliseconds;\n Objects.requireNonNull(version, \"Execution version cannot be null\");\n if (version.isEmpty()) {\n throw new IllegalArgumentException(\"Execution version cannot be empty\");\n }\n this.version = version;\n }", "public jbt.execution.core.ExecutionTask createExecutor(\r\n\t\t\tjbt.execution.core.BTExecutor executor,\r\n\t\t\tjbt.execution.core.ExecutionTask parent) {\r\n\t\treturn new server.ai.jbt.actions.execution.ComputeWatchPoint(this,\r\n\t\t\t\texecutor, parent);\r\n\t}", "public static VoteSession createFakeVoteSession() {\n\t\tLocalDateTime dt = LocalDateTime.now();\n return VoteSession.builder()\n \t\t.voteSessionId(faker.number().randomNumber())\n .dateTimeToStart(dt)\n .dateTimeToEnd(dt.plusMinutes(1))\n .status(\"standby\")\n .voteTopicId(VoteTopicUtils.createFakeVoteTopic())\n .build();\n \n }", "private void initializeExecution(Execution exec) throws IllegalAccessException {\n\t\tstateField.set(exec, ExecutionState.CANCELING);\n\t\t\n\t\t// assign a resource\n\t\tresourceField.set(exec, resource);\n\t}", "public Execution(String symbol, OrderSide side, double quantity,\n\t\t\tdouble price, String orderId, String parentOrderId, String strategyId, String execId) {\n\t\tsuper(symbol, side, quantity, price);\n\t\tput(OrderField.ORDER_ID.value(), orderId);\n\t\tput(OrderField.PARENT_ORDER_ID.value(), parentOrderId);\n\t\tput(OrderField.STRATEGY_ID.value(), strategyId);\n\t\tput(OrderField.EXECID.value(), execId);\n\t}", "public void execute(PvmExecutionImpl execution) {\n\n PvmActivity activityToStart = execution.getNextActivity();\n execution.setNextActivity(null);\n\n PvmExecutionImpl propagatingExecution = execution.createConcurrentExecution();\n\n // set next activity on propagating execution\n propagatingExecution.setActivity(activityToStart);\n concurrentExecutionCreated(propagatingExecution);\n }", "public PaxosExecution getExecution(PaxosMessage a_msg)\n {\n PaxosExecution result = (PaxosExecution) m_executions.get(a_msg.getInitiator());\n if (result == null)\n {\n error(\"Unknown PaxosExecution requested! (\" + a_msg.getInitiator()\n + \"), problably inconsistent InfoService\");\n }\n return result;\n }", "public void spawnInvincibilityPickup() {\n\n Random random = new Random();\n\n invincibilityTimer.cancel();\n invincibilityTimer.purge();\n invincibilityTimer = new Timer();\n invincibilityTimer.schedule(\n new TimerTask() {\n @Override\n public void run() {\n Pickup pickup = new InvincibilityPickup(canvas);\n pickup.spawn();\n activePickups.add(pickup);\n spawnInvincibilityPickup();\n }\n }, (random.nextInt(INVINCIBILITY_MAX_SPAWN_TIME - INVINCIBILITY_MIN_SPAWN_TIME) + INVINCIBILITY_MIN_SPAWN_TIME));\n }", "@Test\n public void testTransientProcessInstanceDeclaringProcessInterfaceAlternativeImpl() throws Exception\n {\n final int modelOid = setUpAlternativePrimaryImplementation();\n\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_PROCESS_INTERFACE, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_MODEL_REF.times(1));\n\n tearDownAlternativePrimaryImplementation(modelOid);\n }", "public static TaskExecution createEntity(EntityManager em) {\n TaskExecution taskExecution = new TaskExecution()\n .jobOrderTimestamp(DEFAULT_JOB_ORDER_TIMESTAMP)\n .taskExecutionStatus(DEFAULT_TASK_EXECUTION_STATUS)\n .taskExecutionStartTimestamp(DEFAULT_TASK_EXECUTION_START_TIMESTAMP)\n .taskExecutionEndTimestamp(DEFAULT_TASK_EXECUTION_END_TIMESTAMP);\n return taskExecution;\n }", "public Asistencia(Investigador inv ) throws SQLException{\r\n this.inv = inv;\r\n Calendar now = Calendar.getInstance(); //trae el calendario\r\n horaEntrada = new Timestamp(now.getTime().getTime());\r\n horaSalida = null;\r\n this.ps = null;\r\n doEntrada(); //setea la id\r\n\r\n }", "public Alarm getTestProcessAlarm() {\n\t\treturn new Alarm(getTestProperties().getTestTimeoutInSeconds(),\n\t\t\t\tThread.currentThread());\n\t}", "private MavenRuntime createRuntime(ClassLoader bootClassLoader, ClassLoader hostClassLoader) throws MojoExecutionException {\n \n try {\n \n Class<?> runtimeClass = bootClassLoader.loadClass(\"org.fabric3.test.runtime.MavenRuntimeImpl\");\n MavenRuntime runtime = MavenRuntime.class.cast(runtimeClass.newInstance());\n \n MonitorFactory monitorFactory = new MavenMonitorFactory(getLog(), \"f3\");\n runtime.setMonitorFactory(monitorFactory);\n runtime.setHostClassLoader(hostClassLoader);\n \n runtime.setMBeanServer(MBeanServerFactory.createMBeanServer());\n \n return runtime;\n } catch (Exception e) {\n throw new MojoExecutionException(e.getMessage(), e);\n }\n \n }", "public void startEvaluator() {\n // Timer beenden und Bewertung anzeigen\n Main.getFenster().getHandler().getTrainer().getTestscreen().getTimer().cancel();\n Main.getFenster().getHandler().getTrainer().getTestscreen().getTimer().purge();\n evaluator = new Evaluator();\n }", "public PrestamoAuto(int noCliente, String nombre, int noCuenta, double capPrestado, int plazoInversion) {\r\n this.noCliente = noCliente;\r\n this.nombre = nombre;\r\n this.noCuenta = noCuenta;\r\n this.capPrestado = capPrestado;\r\n this.plazoInversion = plazoInversion;\r\n }", "abstract void startRound();", "public ServerProcesse(ServerProcesse source) {\n if (source.ConcurrentExecutions != null) {\n this.ConcurrentExecutions = new Long(source.ConcurrentExecutions);\n }\n if (source.LaunchPath != null) {\n this.LaunchPath = new String(source.LaunchPath);\n }\n if (source.Parameters != null) {\n this.Parameters = new String(source.Parameters);\n }\n }", "ProcessInstance startProcess(String processId, Map<String, Object> params);", "public static Activity pestControl() {\n Position veteranBoat = new Position(2638, 2653);\n BooleanSupplier isOnIsland = Game.getClient()::isInInstancedScene;\n\n Function<Position, Activity> moveTo = position -> Activity.newBuilder()\n .withName(\"Moving to position: \" + position)\n .addPreReq(() -> Movement.isWalkable(position))\n .addPreReq(() -> position.distance(Players.getLocal()) > 5)\n .addSubActivity(Activities.toggleRun())\n .addSubActivity(() -> Movement.walkTo(position))\n .thenPauseFor(Duration.ofSeconds(4))\n .maximumDuration(Duration.ofSeconds(20))\n .untilPreconditionsFail()\n .build();\n\n Activity boardShip = Activity.newBuilder()\n .withName(\"Boarding ship to start game\")\n .addPreReq(() -> SceneObjects.getNearest(\"Gangplank\") != null)\n .addPreReq(() -> !isOnIsland.getAsBoolean())\n .addPreReq(() -> Players.getLocal().getX() >= 2638)\n .tick()\n .addSubActivity(Activities.moveTo(veteranBoat))\n .addSubActivity(() -> SceneObjects.getNearest(\"Gangplank\").interact(\"Cross\"))\n .thenPauseFor(Duration.ofSeconds(3))\n .build();\n\n Activity waitForGameToStart = Activity.newBuilder()\n .withName(\"Waiting for game to start\")\n .addPreReq(() -> !isOnIsland.getAsBoolean())\n .addPreReq(() -> Players.getLocal().getX() < 2638)\n .addSubActivity(() -> Time.sleepUntil(isOnIsland, 1000 * 60 * 10))\n .build();\n\n Activity goToSpawnSpot = Activity.newBuilder()\n .withName(\"Going to my fav spot\")\n .addPreReq(isOnIsland)\n .addSubActivity(() -> moveTo.apply(Players.getLocal().getPosition().translate(0, -31)).run())\n .build();\n\n Activity killStuff = Activity.newBuilder()\n .withName(\"killing stuff\")\n .addPreReq(isOnIsland)\n .addPreReq(() -> Npcs.getNearest(npc -> true) != null)\n .addPreReq(() -> Npcs.getNearest(npc -> true).containsAction(\"Attack\"))\n .addSubActivity(() -> Npcs.getNearest(npc -> true).interact(\"Attack\"))\n .thenSleepUntil(() -> Players.getLocal().getTarget() == null)\n .build();\n\n return Activity.newBuilder()\n // TODO(dmattia): Check for world 344\n .withName(\"Pest Control\")\n .addSubActivity(boardShip)\n .addSubActivity(waitForGameToStart)\n .addSubActivity(goToSpawnSpot)\n .addSubActivity(killStuff)\n .build();\n }", "public Round createRound(Tournament tournament) {\r\n\t\tRound round = new Round(calculateNextRound(tournament));\r\n\t\tcopyAllTournamentPlayers(tournament, round);\r\n\t\treturn round;\r\n\t}", "protected void setInitiator(Initiator initiator, Host host) {\n initiator.setHost(host.getId());\n initiator.setHostName(host.getHostName());\n Cluster cluster = getCluster(host);\n initiator.setClusterName(cluster != null ? cluster.getLabel() : \"\");\n }", "public void startSimulation() {\n\t\t// process the inputs\n\t\ttry {\n\t\t\tthis.numberOfServers = Integer.parseInt(frame.getNumberOfQueues());\n\t\t\tthis.minProcessingTime = Integer.parseInt(frame.getMinServiceTime());\n\t\t\tthis.maxProcessingTime = Integer.parseInt(frame.getMaxServiceTime());\n\t\t\tthis.numberOfClients = Integer.parseInt(frame.getNumberOfClients());\n\t\t\tthis.timeLimit = Integer.parseInt(frame.getSimulationInterval());\n\t\t\tthis.selectionPolicy = frame.getSelectionPolicy();\n\t\t\tthis.minArrivingTime = Integer.parseInt(frame.getMinArrivingTime());\n\t\t\tthis.maxArrivingTime = Integer.parseInt(frame.getMaxArrivingTime());\n\t\t\tthis.maxTasksPerServer = Integer.parseInt(frame.getTasksPerServer());\n\t\t\tthis.simulationSpeed = Integer.parseInt(frame.getSimulationSpeed());\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tgenerateNRandomTasks();\n\t\tscheduler = new Scheduler(this.numberOfServers, this.maxTasksPerServer, this);\n\t\tscheduler.changeStrategy(this.selectionPolicy);\n\t\tscheduler.setMaxTasksPerServer(this.maxTasksPerServer);\n\t\t// initialise emptyQueueTime\n\t\temptyQueueTime = new int[this.numberOfServers];\n\t\tfor (int i = 0; i < this.numberOfServers; i++)\n\t\t\tthis.emptyQueueTime[i] = 0;\n\n\t\tThread th = new Thread(this);\n\t\tth.start();\n\t}", "private Punch(int id, byte terminalID, String badgeID, Long originalTimeStamp, byte punchTypeID) {\n this.id = id;\n this.terminalID = terminalID;\n this.badgeID = badgeID;\n this.punchTypeID = punchTypeID;\n \n verifyPunchTypeID();\n \n // set time to system if not pre-provided\n this.originalTimeStamp = (originalTimeStamp != null ? originalTimeStamp : System.currentTimeMillis());\n \n buildPunchTypeTitle();\n \n adjustmentType = null;\n adjustedTimeStamp = null;\n }", "SpaceInvaderTest createSpaceInvaderTest();", "private void startProcess() {\r\n \t\tstartCount++;\r\n \t\tString threadName = Thread.currentThread().getName() + \"-starter-\" + startCount;\r\n \t\tThread starter = new Thread(threadName) {\r\n \t\t\t@Override\r\n \t\t\tpublic void run() {\r\n \t\t\t\tstartupThrotle.acquireUninterruptibly();\r\n \t\t\t\tlong startTime = System.currentTimeMillis();\r\n \t\t\t\tMaximaProcess mp = makeProcess();\r\n \t\t\t\tstartupTimeHistory.add(System.currentTimeMillis() - startTime);\r\n \t\t\t\tmp.deactivate();\r\n \t\t\t\tpool.add(mp);\r\n \t\t\t\tstartupThrotle.release();\r\n \t\t\t}\r\n \t\t};\r\n \t\tstarter.start();\r\n \t}", "private String CreateInvoice() throws Exception {\n\n\t\tgetDriver().get(\"https://stg.autobrain.com/worker/retail_fulfillment/new_invoice\");\n\n\t\t// Add Quantity\n\t\tString s = prop.getProperty(\"no_of_devices\");\n\t\tint quantity = Integer.parseInt(s);\n\n\t\tfor (int i = 0; i < quantity; i++) {\n\t\t\tVisibilityOfElementByXpath(\"//div[@class='input-group number-picker']/span[2]/button\", 15).click();\n\t\t\tThread.sleep(500);\n\t\t}\n\n\t\t// Get invoice auto-generated number\n\t\tinvoice_id_before = VisibilityOfElementByXpath(\"//code[@class='name-preview']\", 15).getText();\n\t\tinvoice_id_before = invoice_id_before.replace(\"#\", \"\");\n\n\t\t// Description\n\t\tVisibilityOfElementByID(\"invoice_description\", 15).sendKeys(\"testing_\" + invoice_id_before);\n\n\t\t// Select account type\n\t\tSelect select = new Select(VisibilityOfElementByID(\"invoice_account_type\", 15));\n\n\t\tif (prop.getProperty(\"account_type\").equalsIgnoreCase(\"Autobrain Family\")) {\n\t\t\tinvoice_account_type = \"personal\";\n\t\t}\n\n\t\telse if (prop.getProperty(\"account_type\").equalsIgnoreCase(\"Autobrain Business\")) {\n\t\t\tinvoice_account_type = \"business\";\n\t\t}\n\n\t\tselect.selectByVisibleText(invoice_account_type);\n\n\t\t// Submit button\n\t\twait(getDriver(), 10).until(ExpectedConditions.visibilityOfElementLocated(By.name(\"commit\"))).click();\n\n\t\t// Validate invoice created\n\t\t// Get invoice auto-generated number\n\t\tString invoice_id_after = VisibilityOfElementByXpath(\"//code[@class='name-preview']\", 15).getText();\n\n\t\tif (!invoice_id_before.equals(invoice_id_after)) {\n\t\t\tSystem.out.println(\"Invoice created successfully!\");\n\t\t}\n\n\t\telse if (invoice_id_before.equals(invoice_id_after)) {\n\t\t\tAssert.assertEquals(true, false, \"Invoice not created successfully!\");\n\t\t}\n\n\t\treturn invoice_name = \"testing_\" + invoice_id_before;\n\n\t}", "public static Process start(ProcessBuilder builder) {\n try {\n return builder.start();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public _cls_script_13( AutomatonInstance ta,UserAccount _ua,UserInfo _ui) {\nparent = _cls_script_12._get_cls_script_12_inst( _ua,_ui);\nthis.ta = ta;\n}", "public static SetupIntent create(Map<String, Object> params, RequestOptions options)\n throws StripeException {\n String path = \"/v1/setup_intents\";\n return getGlobalResponseGetter()\n .request(\n BaseAddress.API,\n ApiResource.RequestMethod.POST,\n path,\n params,\n SetupIntent.class,\n options,\n ApiMode.V1);\n }", "public static SetupIntent create(SetupIntentCreateParams params) throws StripeException {\n return create(params, (RequestOptions) null);\n }", "@Override\r\n\tpublic void execute(DelegateExecution execution) throws Exception {\n\t\tLOGGER.info(\" ... EquifaxServiceTask invoked \");\r\n\t\texecution.setVariable(\"equifaxScore\", 640);\r\n\t\tLOGGER.info(\" ... EquifaxServiceTask Score Generated\");\r\n\r\n\t}", "public void create() {\n if (created)\n return;\n\n PlayerConnection player = getPlayer();\n player.sendPacket(createObjectivePacket(0, objectiveName));\n player.sendPacket(setObjectiveSlot());\n int i = 0;\n while (i < lines.length)\n sendLine(i++);\n\n created = true;\n }", "@Override\n protected void executeTest() {\n ClientConnection<Event> harry = register(0, \"Harry\", this.monstertype, \"Active\", 1, 0);\n ClientConnection<Event> statist23 = register(1, \"Statist23\", CreatureType.KOBOLD, \"Passive\", 0, 0);\n\n assertRegisterEvent(harry.nextEvent(), 1, \"Statist23\", CreatureType.KOBOLD, \"Passive\", 0, 0);\n assertRegisterEvent(statist23.nextEvent(), 0, \"Harry\", this.monstertype, \"Active\", 1, 0);\n\n // round 1 begins\n assertRoundBegin(assertAndMerge(harry, statist23), 1);\n\n for (int i = 0; i < this.stepsBeforeTurn; i++) {\n assertActNow(assertAndMerge(harry, statist23), 0);\n harry.sendMove(Direction.EAST);\n assertMoved(assertAndMerge(harry, statist23), 0, Direction.EAST);\n }\n assertActNow(assertAndMerge(harry, statist23), 0);\n harry.sendMove(this.lastDirection);\n assertKicked(assertAndMerge(harry, statist23), 0);\n\n assertActNow(assertAndMerge(harry, statist23), 1);\n statist23.sendDoneActing();\n assertDoneActing(assertAndMerge(harry, statist23), 1);\n\n assertRoundEnd(assertAndMerge(harry, statist23), 1, 0);\n assertWinner(assertAndMerge(harry, statist23), \"Passive\");\n }", "@Test\n public void testScaleUpEphemeral() throws Exception {\n Atomix atomix1 = startAtomix(1, Arrays.asList(2), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n Atomix atomix2 = startAtomix(2, Arrays.asList(1), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n Atomix atomix3 = startAtomix(3, Arrays.asList(1), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n }", "public final void initialCompute() {\n\n\t\t// Create and initialize the prover\n\t\tProver p = UtilFactory.getPrototype().newProver();\n\t\tProverSettings proverSettings = ProverSettings.get();\n\t\tif (\"OpenGeoProver\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tif (\"Wu\".equalsIgnoreCase(proverSettings.proverMethod)) {\n\t\t\t\tp.setProverEngine(ProverEngine.OPENGEOPROVER_WU);\n\t\t\t} else if (\"Area\".equalsIgnoreCase(proverSettings.proverMethod)) {\n\t\t\t\tp.setProverEngine(ProverEngine.OPENGEOPROVER_AREA);\n\t\t\t}\n\t\t} else if (\"Botana\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.BOTANAS_PROVER);\n\t\t} else if (\"Recio\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.RECIOS_PROVER);\n\t\t} else if (\"PureSymbolic\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.PURE_SYMBOLIC_PROVER);\n\t\t} else if (\"Auto\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.AUTO);\n\t\t}\n\t\tp.setTimeout(proverSettings.proverTimeout);\n\t\tp.setConstruction(cons);\n\t\tp.setStatement(root);\n\t\t// Compute extra NDG's:\n\t\tp.setReturnExtraNDGs(true);\n\n\t\t// Adding benchmarking:\n\t\tdouble startTime = UtilFactory.getPrototype().getMillisecondTime();\n\t\tp.compute(); // the computation of the proof\n\t\tint elapsedTime = (int) (UtilFactory.getPrototype().getMillisecondTime()\n\t\t\t\t- startTime);\n\t\t/*\n\t\t * Don't remove this. It is needed for automated testing. (String match\n\t\t * is assumed.)\n\t\t */\n\t\tLog.debug(\"Benchmarking: \" + elapsedTime + \" ms\");\n\n\t\tProofResult proofresult = p.getProofResult();\n\t\tExtendedBoolean result = p.getYesNoAnswer();\n\n\t\tLog.debug(\"STATEMENT IS \" + proofresult + \" (yes/no: \" + result + \")\");\n\n\t\tif (proofresult == ProofResult.PROCESSING) {\n\t\t\tlist.setUndefined();\n\t\t\treturn;\n\t\t}\n\n\t\tlist.setDefined(true);\n\t\tlist.clear();\n\n\t\tif (!ExtendedBoolean.UNKNOWN.equals(result)) {\n\t\t\tBoolean unreadable = false;\n\n\t\t\tif (proofresult == ProofResult.TRUE_NDG_UNREADABLE || proofresult == ProofResult.TRUE_ON_COMPONENTS) {\n\t\t\t\tunreadable = true;\n\t\t\t}\n\n\t\t\tGeoBoolean answer = new GeoBoolean(cons);\n\t\t\tanswer.setValue(result.boolVal());\n\t\t\tlist.add(answer);\n\t\t\tif (result.boolVal()) {\n\t\t\t\tHashSet<NDGCondition> ndgresult = p.getNDGConditions();\n\t\t\t\tGeoList ndgConditionsList = new GeoList(cons);\n\t\t\t\tndgConditionsList.clear();\n\t\t\t\tndgConditionsList.setDrawAsComboBox(true);\n\t\t\t\tIterator<NDGCondition> it = ndgresult.iterator();\n\t\t\t\tTreeSet<GeoText> sortedSet = new TreeSet<>(\n\t\t\t\t\t\tGeoText.getComparator());\n\n\t\t\t\t// Collecting the set of NDG conditions.\n\t\t\t\t// The OGP data collector may left some unreadable conditions\n\t\t\t\t// so we make sure if the condition is readable.\n\t\t\t\twhile (!unreadable && it.hasNext()) {\n\t\t\t\t\tGeoText ndgConditionText = new GeoText(cons);\n\t\t\t\t\tNDGCondition ndgc = it.next();\n\t\t\t\t\t// Do not print unnecessary conditions:\n\t\t\t\t\tif (ndgc.getReadability() > 0) {\n\t\t\t\t\t\tndgc.rewrite(cons);\n\t\t\t\t\t\tStringBuilder s = null;\n\n\t\t\t\t\t\tif (relTool) {\n\t\t\t\t\t\t\tRelationNumerical rn = new RelationNumerical(kernel);\n\t\t\t\t\t\t\tString cond = ndgc.getCondition();\n\t\t\t\t\t\t\tif (\"AreParallel\".equals(cond)) {\n\t\t\t\t\t\t\t\t// non-parallism in 2D means intersecting\n\t\t\t\t\t\t\t\t// FIXME: this is not true for 3D\n\t\t\t\t\t\t\t\ts = sb(rn.intersectString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\ttrue, getLoc()));\n\t\t\t\t\t\t\t} else if (\"AreCollinear\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn\n\t\t\t\t\t\t\t\t\t\t.triangleNonDegenerateString(\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[0],\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[2],\n\t\t\t\t\t\t\t\t\t\t\t\tgetLoc()));\n\t\t\t\t\t\t\t} else if (\"AreEqual\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.equalityString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\tfalse, getLoc()));\n\t\t\t\t\t\t\t} else if (\"ArePerpendicular\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.perpendicularString(\n\t\t\t\t\t\t\t\t\t\t(GeoLine) ndgc.getGeos()[0],\n\t\t\t\t\t\t\t\t\t\t(GeoLine) ndgc.getGeos()[1], false,\n\t\t\t\t\t\t\t\t\t\tgetLoc()));\n\t\t\t\t\t\t\t} else if (\"AreCongruent\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.congruentSegmentString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\tfalse, getLoc()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (s == null || !relTool) {\n\t\t\t\t\t\t\tGeoElement[] geos = ndgc.getGeos();\n\t\t\t\t\t\t\tif (geos == null) { // formula with quantities\n\t\t\t\t\t\t\t\ts = sb(ndgc.getCondition());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts = sb(getLoc()\n\t\t\t\t\t\t\t\t\t\t.getCommand(ndgc.getCondition()));\n\t\t\t\t\t\t\t\ts.append(\"[\");\n\t\t\t\t\t\t\t\tfor (int i = 0; i < ndgc\n\t\t\t\t\t\t\t\t\t\t.getGeos().length; ++i) {\n\t\t\t\t\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\t\t\t\t\ts.append(',');\n\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\t * There can be a case when the underlying\n\t\t\t\t\t\t\t\t\t * prover sends such objects which cannot be\n\t\t\t\t\t\t\t\t\t * understood by GeoGebra. In this case we\n\t\t\t\t\t\t\t\t\t * use the \"Objects\" word. In this case we\n\t\t\t\t\t\t\t\t\t * normally return ProveResult.UNKNOWN to\n\t\t\t\t\t\t\t\t\t * not confuse the student, but for sure, we\n\t\t\t\t\t\t\t\t\t * still do the check here as well.\n\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\tGeoElement geo = ndgc.getGeos()[i];\n\t\t\t\t\t\t\t\t\tif (geo != null) {\n\t\t\t\t\t\t\t\t\t\ts.append(ndgc.getGeos()[i]\n\t\t\t\t\t\t\t\t\t\t\t\t.getLabelSimple());\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.append(Unicode.ELLIPSIS);\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\ts.append(\"]\");\n\t\t\t\t\t\t\t\tif (relTool) {\n\t\t\t\t\t\t\t\t\ts.insert(0, getLoc().getMenu(\"not\") + \" \");\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\n\t\t\t\t\t\tndgConditionText.setTextString(s.toString());\n\t\t\t\t\t\tndgConditionText.setLabelVisible(false);\n\t\t\t\t\t\tndgConditionText.setEuclidianVisible(false);\n\t\t\t\t\t\tsortedSet.add(ndgConditionText);\n\t\t\t\t\t}\n\t\t\t\t\t// For alphabetically ordering, we need a sorted set here:\n\t\t\t\t}\n\t\t\t\t// Copy the sorted list into the output:\n\t\t\t\tIterator<GeoText> it2 = sortedSet.iterator();\n\t\t\t\twhile (it2.hasNext()) {\n\t\t\t\t\tndgConditionsList.add(it2.next());\n\t\t\t\t}\n\n\t\t\t\tif (unreadable) {\n\t\t\t\t\tGeoText ndgConditionText = new GeoText(cons);\n\t\t\t\t\tString cond = Unicode.ELLIPSIS + \"\";\n\t\t\t\t\tndgConditionText.setTextString(cond);\n\t\t\t\t\tndgConditionText.setLabelVisible(false);\n\t\t\t\t\tndgConditionText.setEuclidianVisible(false);\n\t\t\t\t\tsortedSet.add(ndgConditionText);\n\t\t\t\t\tndgConditionsList.add(ndgConditionText);\n\t\t\t\t}\n\n\t\t\t\t// Put this list to the final output (if non-empty):\n\t\t\t\tif (ndgConditionsList.size() > 0) {\n\t\t\t\t\tlist.add(ndgConditionsList);\n\t\t\t\t}\n\n\t\t\t\tif (proofresult == ProofResult.TRUE_ON_COMPONENTS) {\n\t\t\t\t\tGeoText classification = new GeoText(cons);\n\t\t\t\t\tString c = \"c\";\n\t\t\t\t\tclassification.setTextString(c);\n\t\t\t\t\tclassification.setLabelVisible(false);\n\t\t\t\t\tclassification.setEuclidianVisible(false);\n\t\t\t\t\tlist.add(classification);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Don't remove this. It is needed for testing the web platform. (String\n\t\t * match is assumed.)\n\t\t */\n\t\tLog.debug(\"OUTPUT for ProveDetails: \" + list);\n\n\t}", "public static Simulator createSimulator(final int duration) {\n return new Simulator(duration);\n }", "Execution getProcessInstance();", "public Performer create(Performer p) throws EVDBRuntimeException, EVDBAPIException {\n\t\tif (p.getSpid() != null) {\n\t\t\tthrow new EVDBRuntimeException(\"Create called on an performer with an existing SPID\");\n\t\t}\n\t\t\n\t\treturn createOrModify(p);\n\t}", "Reproducible newInstance();", "public Maestro()\r\n\t{\r\n\t\tint i;\r\n\t\tint hora = 0;\r\n\t\tint minutos = 0;\r\n\t\tint segundos = 0;\r\n\t\tint milisegundos = 0;\r\n\t\tthis.reloj = new Reloj(\"Reloj Servidor\",hora,minutos,segundos,milisegundos);\r\n\t\tthis.reloj.start();\r\n\r\n\t\tthis.s_BD = new Sincronizador_BD(this.Conect);\r\n\t\tthis.s_BD.start();\r\n\t}", "ExecRunner(ProcessBuilder builder) {\n if (builder == null) {\n throw new NullPointerException();\n }\n this.builder = builder;\n }", "public static ExecutionFactory init() {\n\t\ttry {\n\t\t\tExecutionFactory theExecutionFactory = (ExecutionFactory)EPackage.Registry.INSTANCE.getEFactory(ExecutionPackage.eNS_URI);\n\t\t\tif (theExecutionFactory != null) {\n\t\t\t\treturn theExecutionFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ExecutionFactoryImpl();\n\t}", "public void createResident(Resident resident);", "private static void spawnInstance(){\n\t\tString instanceType = null;\n\t\tString imageId = null; \n\t\tint numInstances = 0;\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Name of key to use?\");\n\t\tkeyname = in.next();\n\t\t\n\t\tSystem.out.println(\"Instance type? (use d for default: t2.micro)\");\n\t\tinstanceType = in.next();\n\t\t\n\t\tif(instanceType.equals(\"d\")){\n\t\t\tinstanceType = INSTANCE_TYPE;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Image id? (use d for default: ami-b5a7ea85, Amazon Linux AMI)\");\n\t\timageId = in.next();\n\t\t\n\t\tif(imageId.equals(\"d\")){\n\t\t\timageId = IMAGE_ID; \n\t\t}\n\t\t\n\t\tSystem.out.println(\"Number of instances?\");\n\t\tnumInstances = in.nextInt();\n\n\t\tin.close();\n\t\n\t\tRunInstancesRequest req = new RunInstancesRequest();\n\t\t\n\t String group = GROUP;\n\t \n\t req.withImageId(imageId)\n\t .withInstanceType(instanceType)\n\t .withMinCount(numInstances)\n\t .withMaxCount(numInstances)\n\t .withKeyName(keyname)\n\t .withSecurityGroups(group);\n\t \n\t RunInstancesResult reqRes = ec2.runInstances(req);\n\t Reservation res = reqRes.getReservation();\n\t System.out.println(\"Reservation number is \" + res.getReservationId());\n\t try {\n \t\tSystem.out.println(\"Just a moment while the instance is spun up...\");\n\t\t\tTimeUnit.SECONDS.sleep(10);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(\"Instantiation failed!\");\n\t\t}\n \t\tString ip = listLiveInstances();\n \t\tSystem.out.println(\"\");\n \t\tSystem.out.println(\"Connect with 'ssh -i \" + keyname + \".pem ec2-user@\" + ip +\"'\");\n \t\tSystem.out.println(\"If connection fails, run with -l option and check status.\");\n \t\tSystem.exit(0);\n\t}", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n launchAgent(coordinator);\n\n pause(1000);\n }\n\n Set<Player> players = new HashSet<Player>();\n Player primaryPlayer = null;\n\n //now launch all human player avatar agents, each of them will be initialized as agent having a GUI frame\n Iterator<GameSpecification.PlayerSpecification> playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n int launchedHumanPlayers = 0;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.HumanPlayerSpecification){\n\n HumanPlayerAvatar humanPlayerAvatar = new HumanPlayerAvatar(spec.getName());\n\n launchAgent(humanPlayerAvatar,true);\n\n players.add(humanPlayerAvatar);\n\n launchedHumanPlayers++;\n\n if (null == primaryPlayer){\n primaryPlayer=humanPlayerAvatar;\n }\n\n }\n }\n\n //launch computer player agents. If no human players have been launched, the first computer player will display a GUI frame.\n playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n boolean first = true;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.ComputerPlayerSpecification){\n\n ChooseAmountStrategy chooseAmountStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getChooseAmountStrategy();\n\n SelectOpponentStrategy selectOpponentStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getSelectOpponentStrategy();\n \n ComputerPlayer computerPlayer = new ComputerPlayer(spec.getName(),spec.getPictureFileName(), chooseAmountStrategy, selectOpponentStrategy);\n\n chooseAmountStrategy.setPlayer(computerPlayer);\n\n selectOpponentStrategy.setPlayer(computerPlayer);\n\n launchAgent(computerPlayer, launchedHumanPlayers == 0 && first);\n\n players.add(computerPlayer);\n\n if (null == primaryPlayer){\n primaryPlayer=computerPlayer;\n }\n\n first = false;\n\n }\n }\n\n //request new game from coordinator\n AgentAddress coordinatorAddress;\n\n while((coordinatorAddress = getAgentWithRole(\"investment_game\",\"tout_le_monde\",\"coordinator\"))==null){\n pause(750);\n }\n\n String requestGameSpec = \"<new_game> <for> \"+gameSpecification.getPlayerSpecifications().size()+\" <players> <having> \"+gameSpecification.getRounds()+\" <rounds> <invite> 0 <computer_players>\";\n\n ActMessage reply = (ActMessage)sendMessageWithRoleAndWaitForReply(coordinatorAddress,new ActMessage(\"request_game\",requestGameSpec),\"jeromes_assistant\");\n\n if (reply.getAction().equals(\"game_initialized\")){\n\n final String gameId = reply.getContent();\n\n //let players join the game\n Iterator<Player> playerIterator = players.iterator();\n\n while (playerIterator.hasNext()){\n\n final Player player = playerIterator.next();\n final boolean isPrimaryPlayer = player.equals(primaryPlayer);\n\n new Thread(){\n @Override\n public void run() {\n player.joinGame(gameId,isPrimaryPlayer,player.getPicturePath());\n }\n }.start();\n\n }\n }else{\n //TODO throw Exception\n }\n\n }", "@Test\n public void testGameProcess() {\n // set test player data\n mTournament.setPlayerCollection(getTestPlayersData());\n\n int roundNumber = mTournament.calculateRoundsNumber(mTournament.getPlayersCount());\n for (int i = 0; i < roundNumber; ++i) {\n Round round = mTournament.createNewRound();\n assertTrue(\"State of new round must be CREATED\", round.getState() == State.CREATED);\n\n // tests can't create new round because not all rounds are completed\n Round falseRound = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, falseRound);\n\n round.startRound();\n assertTrue(\"State of starting round must be RUNNING\", round.getState() == State.RUNNING);\n\n randomiseResults(round.getMatches());\n round.endRound();\n assertTrue(\"State of ending round must be COMPLETED\", round.getState() == State.COMPLETED);\n\n // tests that ended round can't be started again\n round.startRound();\n assertTrue(\"State of ended round must be COMPLETED\", round.getState() == State.COMPLETED);\n }\n // tests can't create one more round because game is over at this point\n Round round = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, round);\n\n }", "void createSimulationTaskWithServerParametersTest() throws BrokerNotFoundException, ParameterValidationException {\n IdProvider idProvider = Mockito.mock(IdProvider.class);\n BrokerTypeRepository brokerTypeRepository = Mockito.mock(BrokerTypeRepository.class);\n SimulationParameterValidator parameterValidator = Mockito.mock(SimulationParameterValidator.class);\n SimulationTaskFactory taskFactory = new SimpleSimulationTaskFactory(idProvider, brokerTypeRepository, parameterValidator);\n\n String id = \"123456abcdef\";\n Mockito.when(idProvider.getAnyId()).thenReturn(id);\n\n Job job = Mockito.mock(Job.class);\n\n String brokerName1 = \"Tanja\";\n String brokerName2 = \"Hans\";\n String brokerName3 = \"Ronja\";\n List<String> brokerNames = Stream.of(brokerName1, brokerName2, brokerName3).collect(Collectors.toList());\n\n Map<String, String> parameterMap = new HashMap<>();\n parameterMap.put(\"test.parameter.fivehundred\", \"500\");\n parameterMap.put(\"value.of\", \"Hans Peter Ludwig\");\n parameterMap.put(\"some.uri\", \"https://www.youtube.com/watch?v=4MEKu2TcEHM\");\n parameterMap.put(\"a.very.important.date\", \"2020-02-02\");\n\n BrokerType brokerType1 = Mockito.mock(BrokerType.class);\n Mockito.when(brokerTypeRepository.has(brokerName1)).thenReturn(true);\n Mockito.when(brokerTypeRepository.findByName(brokerName1)).thenReturn(brokerType1);\n BrokerType brokerType2 = Mockito.mock(BrokerType.class);\n Mockito.when(brokerTypeRepository.has(brokerName2)).thenReturn(true);\n Mockito.when(brokerTypeRepository.findByName(brokerName2)).thenReturn(brokerType2);\n BrokerType brokerType3 = Mockito.mock(BrokerType.class);\n Mockito.when(brokerTypeRepository.has(brokerName3)).thenReturn(true);\n Mockito.when(brokerTypeRepository.findByName(brokerName3)).thenReturn(brokerType3);\n\n SimulationTask task = taskFactory.create(job, brokerNames, parameterMap);\n\n Assertions.assertEquals(id, task.getId());\n Assertions.assertEquals(job, task.getJob());\n\n Assertions.assertTrue(task.getBrokers().contains(brokerType1));\n Assertions.assertTrue(task.getBrokers().contains(brokerType2));\n Assertions.assertTrue(task.getBrokers().contains(brokerType3));\n\n Assertions.assertEquals(\"500\", task.getParameters().get(\"test.parameter.fivehundred\"));\n Assertions.assertEquals(\"Hans Peter Ludwig\", task.getParameters().get(\"value.of\"));\n Assertions.assertEquals(\"https://www.youtube.com/watch?v=4MEKu2TcEHM\", task.getParameters().get(\"some.uri\"));\n Assertions.assertEquals(\"2020-02-02\", task.getParameters().get(\"a.very.important.date\"));\n }", "public static SetupIntent create(Map<String, Object> params) throws StripeException {\n return create(params, (RequestOptions) null);\n }", "@Test\n\tpublic void createAccountRRSPInvestmentTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnRrspInvestments.setSelected(true);\n\t\tdata.setRdbtnRrspInvestments(rdbtnRrspInvestments);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.RRSP_INVESTMENTS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "private static SerAcqImplEvaluation getSerAcqImplEvalObject(\n\t\t\tdouble noOfActSerAcquisition, double noOfActSerAcqWithSecSpec) {\n\t\tSerAcqImplEvaluation serAcqImplEvaluation = new SerAcqImplEvaluation(\n\t\t\t\tnoOfActSerAcquisition, noOfActSerAcqWithSecSpec);\n\n\t\treturn serAcqImplEvaluation;\n\t}", "public boolean startProcess(Properties ctx, ProcessInfo pi, Trx trx) {\n log.info(\"startProcess - \" + pi.getRecord_ID());\n boolean retValue = false;\n //\n if (pi.getRecord_ID() != get_ID()) {\n log.log(Level.SEVERE, \"startProcess - Not same Payment - \" + pi.getRecord_ID());\n return false;\n }\n // Process it\n retValue = processOnline();\n save();\n return retValue; // Payment processed\n }" ]
[ "0.5197669", "0.49235788", "0.47986653", "0.47764188", "0.4741409", "0.46622583", "0.46083125", "0.45742851", "0.4534282", "0.45121518", "0.44739705", "0.44661066", "0.4459304", "0.44272378", "0.44027993", "0.43731666", "0.43231604", "0.4307302", "0.42050955", "0.41891724", "0.41883215", "0.41844392", "0.41673946", "0.4157968", "0.4148334", "0.41338146", "0.41337398", "0.41282094", "0.41277856", "0.4127331", "0.41211897", "0.41182595", "0.41129932", "0.4108747", "0.40898624", "0.40795207", "0.40788123", "0.407843", "0.40780503", "0.40725553", "0.4048319", "0.40478492", "0.40400892", "0.40318394", "0.40247202", "0.40235654", "0.40218252", "0.4021741", "0.40169635", "0.40165463", "0.40029195", "0.40014082", "0.3999424", "0.39935955", "0.3981099", "0.3979797", "0.39777565", "0.3974751", "0.39743137", "0.39691266", "0.3958991", "0.39517653", "0.39499786", "0.3940739", "0.393489", "0.39252314", "0.39246368", "0.39216208", "0.39212224", "0.39184728", "0.3918306", "0.39112803", "0.3906356", "0.3906179", "0.38974372", "0.3895906", "0.3888716", "0.38881332", "0.3883578", "0.3881927", "0.38778818", "0.3873323", "0.38703364", "0.38694057", "0.38668582", "0.38656968", "0.38637638", "0.3853563", "0.3852812", "0.3845936", "0.3844455", "0.3843035", "0.38393638", "0.38358447", "0.38345474", "0.38335645", "0.3819815", "0.38173306", "0.38128614", "0.38036907" ]
0.72003776
0
Returns the round with the given round number or null if there is no such round exists
public PaxosRound getRound(int a_round) { PaxosRound result = (PaxosRound) m_rounds.get(new Integer(a_round)); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ChesspairingRound getRound(int roundNumber) {\n\t\tList<ChesspairingRound> rounds = mTournament.getRounds();\n\t\tfor (ChesspairingRound round : rounds) {\n\t\t\tif (round.getRoundNumber() == roundNumber) {\n\t\t\t\treturn round;\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalStateException(\n\t\t\t\t\"Tournament in inconsistent state! Not able to find roundNumber = \" + roundNumber);\n\t}", "public int getCurrentRound() {\n\t\treturn roundNumber;\n\t}", "public Integer getRound() {\n return round;\n }", "public int getRoundNumber() {\n return roundNumber;\n }", "public int getCurrentRound()\n\t{\n \treturn currentRound;\n\t}", "public int getRound()\r\n\t{\r\n\t\treturn this.round;\r\n\t}", "public int getRound() {\n return round;\n }", "public Round getRound(){\n return mRound;\n }", "public PaxosRound createRound(int a_round)\n {\n PaxosRound result = new PaxosRound(this, a_round, getNextRoundLeader(a_round));\n m_rounds.put(new Integer(a_round), result);\n return result;\n }", "public static int numInRound(int round) {\n\t\treturn (int) (Math.pow(2, round - 1));\n\t}", "public static List<Match> getRound(int roundNum) {\n\t\tList<Match> round = new ArrayList<Match>();\n\t\tint numInRound = numInRound(roundNum);\n\t\tint roundStart = numInRound - 1;\n\t\tfor (int i = 0; i < numInRound; i++)\n\t\t\tround.add(matches[roundStart + i]);\n\t\treturn round;\n\t}", "public synchronized int getCurrentRoundNumber()\r\n {\r\n return currentRoundNumber;\r\n }", "public int getCurrentGameRound(){\n\t\treturn currentGameRound;\n\t}", "public static Round currentRound(Group group)\n\t{\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tRound round = (Round)session.createSQLQuery(\"{call get_current_round(:group_id)}\").addEntity(Round.class).setParameter(\"group_id\", group.getId()).uniqueResult();\n\t\tround.setMatches(MatchDAO.listByRound(round));\n\t\treturn round;\n\t}", "public int getRoundNum(){\n return gameRounds;\n }", "public void setRound(int round) {\r\n this.round = round;\r\n }", "public JLabel getPlaceLabel(int round) {\n\t\t\n\t\tJLabel tempButton = null;\t//create a temp variable to return depending on which integer is passed to this function\n\t\t\n\t\tif(round == 1) {\n\t\t\ttempButton = firstRacePlaceLabel;\n\t\t}\n\t\t\n\t\tif(round == 2) {\n\t\t\ttempButton = secondRacePlaceLabel;\n\t\t}\n\t\t\n\t\tif(round == 3) {\n\t\t\ttempButton = semiFinalRacePlaceLabel;\n\t\t}\n\t\t\n\t\tif(round == 4) {\n\t\t\ttempButton = finalRacePlaceLabel;\n\t\t}\n\t\t\n\t\treturn tempButton;\n\t}", "public int getRoundID() {\n return rounds.get(currentRound).getRoundID();\n }", "public int getNround()\n {\n \treturn this.nround;\n }", "public PaxosRound createRound()\n {\n return createRound(0);\n }", "public ArrayList<Move> getRound(int round) {\r\n\t\tint startIndex;\r\n\t\tint endIndex;\r\n\t\t\r\n\t\tArrayList<Move> moves = new ArrayList<Move>();\r\n\t\t\r\n\t\t// Guard against negatives\r\n\t\tif (round < 0) {\r\n\t\t\tround = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif (round >= offsets.size()) {\r\n\t\t\tround = offsets.size() - 1;\r\n\t\t\tendIndex = offsets.size();\r\n\t\t} else {\r\n\t\t\tendIndex = offsets.get(round+1);\r\n\t\t}\r\n\t\t\r\n\t\tstartIndex = offsets.get(round);\r\n\t\t\r\n\t\tfor(int i = startIndex; i < endIndex; i++) {\r\n\t\t\tmoves.add(this.getResults().get(i));\r\n\t\t}\r\n\t\t\r\n\t\treturn moves;\r\n\t}", "public Round(int roundNo) {\n\t\tthis.niceMoves = new ArrayList<Move>();\n\t\tthis.roundNo = roundNo;\n\t}", "public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}", "@Nullable\n/* */ public Floor getFloor(int floorLevel) {\n/* 6423 */ if (this.floors != null)\n/* */ {\n/* 6425 */ for (Floor floor : this.floors) {\n/* */ \n/* 6427 */ if (floor.getFloorLevel() == floorLevel)\n/* 6428 */ return floor; \n/* */ } \n/* */ }\n/* 6431 */ return null;\n/* */ }", "public String getNextRoundLeader(int a_round)\n {\n int i = 0;\n for (; i < m_roundLeaders.size(); i++)\n {\n if (getInitiator().equals(m_roundLeaders.get(i)))\n break;\n }\n int index = (i + a_round) % m_roundLeaders.size();\n String g = (String) m_roundLeaders.get(index);\n return g;\n }", "public void setRoundNum(int roundNum){\n gameRounds = roundNum;\n }", "private void setRound(ChesspairingRound round) {\n\t\tint rNumber = round.getRoundNumber();\n\t\tif (rNumber < 1) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tList<ChesspairingRound> rounds = mTournament.getRounds();\n\t\tif (rounds.size() >= rNumber) {\n\t\t\trounds.remove(rNumber - 1);\n\t\t}\n\t\trounds.add(rNumber - 1, round);\n\t}", "public int calculate(java.util.List<Round> rounds, int index, Round round);", "public JButton getLockButton(int round) {\n\t\t\n\t\tJButton tempButton = null;\t//create a temp variable to return depending on which integer is passed to this function\n\t\t\n\t\tif(round == 1) {\n\t\t\ttempButton = firstRaceLockButton;\n\t\t}\n\t\t\n\t\tif(round == 2) {\n\t\t\ttempButton = secondRaceLockButton;\n\t\t}\n\t\t\n\t\tif(round == 3) {\n\t\t\ttempButton = semiFinalRaceLockButton;\n\t\t}\n\t\t\n\t\tif(round == 4) {\n\t\t\ttempButton = finalRaceLockButton;\n\t\t}\n\t\t\n\t\treturn tempButton;\n\t}", "public int rConst(int round) {\n\n int rci = 0;\n\n if(round == 1) rci = 1;\n else if(round > 1 && rConst(round-1) < 0x80) rci = ((2 * rConst(round-1)));\n else if(round > 1 && rConst(round-1) >= 0x80) rci = (byte)((2 * rConst(round-1)) ^ 0x1b);\n else rci = 0;\n\n return rci;\n }", "public Round getActualRound() {\n\t\treturn actualRound;\n\t}", "public static int playOneRound(String name1, int roundNumber) {\n\t\t\n\t\t//if the round number that was an input is not a number between 1 and 6\n\t\tif ((roundNumber < 1) || (roundNumber > 6)) {\n\t\t\t\n\t\t\t//the program prints an error and returns -1\n\t\t\tSystem.out.println(\"Error: invalid input\");\n\t\t\treturn -1; \n\t\t} else {\n\t\t\n\t\t//otherwise, the dice roll method is called three times and stored as an integer each time\t\n\t\tint dieOne = diceRoll(); \n\t\tint dieTwo = diceRoll();\n\t\tint dieThree = diceRoll(); \n\t\t\n\t\t//these values are used as input to get the score of the round, which is stored as an integer\n\t\tint points = getScore(dieOne, dieTwo, dieThree, roundNumber); \n\t\t\n\t\t//the program displays what the player rolled and their score\n\t\tSystem.out.println(name1 + \" rolled \" + dieOne + \" \" + dieTwo + \" \" + dieThree + \" and scored \" + points + \" points\");\t\n\t\n\t\t//the number of points the player received is returned\n\t\treturn points;\n\t\t}\n\t}", "private void nextRound() {\n\t\n\t\t\n\t\tcfight++;\n\t\tif(cfight>=maxround)\n\t\t{\n\t\tcfight=0;\n\t\t\n\t\tround++;\n\t\t\tmaxround/=2;\n\t\t}\n\t\t\n\tif(round<4)\n\t{\n\tcontrollPCRound();\n\t}\n\telse\n\t{\n\t\tint sp=0;\n\t\tint round=0;\n\t\tfor(int i=0; i<fighter.length; i++)\n\t\t{\n\t\t\tif(spieler[i]>0)\n\t\t\t{\n\t\t\t\tsp++;\n\t\t\t\tif(fround[i]>round)\n\t\t\t\t{\n\t\t\t\tround=fround[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\tif(geld==false)\n\t{\n\t\tgeld=true;\n\t\tif(sp==1)\n\t\t{\n\t\tZeniScreen.addZenis(round*3500);\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint w=round*4000-500*sp;\n\t\t\tif(w<1)\n\t\t\t{\n\t\t\t\tw=100;\n\t\t\t}\n\t\t\tZeniScreen.addZenis(w);\t\n\t\t}\n\t}\n\t}\n\t\n\t\n\t}", "public LookupAccountTransactions round(Long round) {\n addQuery(\"round\", String.valueOf(round));\n return this;\n }", "private static String findNumber() {\n\t\treturn null;\r\n\t}", "public int getMaxRound() {\n return maxRound;\n }", "public int getLargestRoundNumber() {\n\t\tint result = -1;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT MAX(drawCnt) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next())\n\t\t\t\tresult = this.rs.getInt(1);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public Round createRound(Tournament tournament) {\r\n\t\tRound round = new Round(calculateNextRound(tournament));\r\n\t\tcopyAllTournamentPlayers(tournament, round);\r\n\t\treturn round;\r\n\t}", "private double roundUnit(double unit)\n {\n double ones = Math.pow(10, Math.ceil(Math.log10(unit)));\n double twos = Math.pow(10, Math.ceil(Math.log10(unit / 2))) * 2;\n double fives = Math.pow(10, Math.ceil(Math.log10(unit / 5))) * 5;\n\n return Math.min(Math.min(ones, twos), fives);\n }", "@Override\r\n\tpublic void setRound(int round) {\n\t\tthis.round = \"Round: \"+round;\r\n\t\tupdate();\r\n\t}", "public static double round(double number) {\r\n //MiscStuff.writeToLog(number);\r\n Double d = new Double(number);\r\n String str = d.toString();\r\n str.trim();\r\n \r\n if(str.indexOf('.') + 3 < str.length()) {\r\n if(!str.equals(\"NaN\") && !str.equals(\"Infinity\") \r\n && !str.equals(\"-Infinity\")) {\r\n \r\n \r\n int i = str.indexOf('.');\r\n String str1 = str.substring(0, i + 3);\r\n d = new Double(str1);\r\n \r\n //MiscStuff.writeToLog(\" \" + str + \" \" + d);\r\n \r\n if(!str.substring(i+3).equals(\"\") ) {\r\n int rounder = new Integer(str.substring(i+3, i+4));\r\n \r\n if(5 <= rounder) {\r\n Double d2 = (10 - rounder) * .001;// d + new Float(.01);\r\n d = number + d2;\r\n //MiscStuff.writeToLog(\"Rounder \" + rounder + \" \" + d2);\r\n \r\n String str2 = d.toString();\r\n str2.trim();\r\n \r\n if(str2.indexOf('.') + 3 < str2.length()) \r\n d = Math2.round(d); //don't get stuck....\r\n }\r\n }\r\n \r\n number = d; \r\n }\r\n \r\n else {\r\n //MiscStuff.writeToLog(number); \r\n }\r\n }\r\n \r\n return number;\r\n }", "private IFloor getFloor(int floorId) {\n \tIFloor floor = null;\n \tfor(int i=0;i<floors.size();i++) {\n \t\tif(floors.get(i).getFloorID() == floorId) {\n \t\t\tfloor = floors.get(i);\n \t\t\tbreak;\n \t\t}\n \t}\n \treturn floor;\n }", "public Match getMatch(int matchNum){\n\t\tfor(Match match : matches){\n\t\t\tif(match.number == matchNum){\n\t\t\t\treturn match;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Player round() {\n chooseFighter(player1, player2);\n // It's not allowed to construct a Fighter with Health (or Attack) equals 0\n\n Player winner = fight();\n\n gameOver = winner.scoreAPoint(winningScoreLimit);\n\n return winner;\n }", "public void logRound(int round){\n\t\tcountRounds++;\n\t\tlog += String.format(\"ROUND %d\", round);\n\t\tlineBreak();\n\t}", "public static double round(double number, int n) {\n\t\tif (Double.isNaN(number))\n\t\t\treturn Float.NaN;\n\t\t\n\t\tlong d = (long) Math.pow(10, n);\n\t\treturn (double) Math.round(number * d) / d;\n\t}", "public static String nextRound() {\n return \"Starting next round.\";\n }", "public static long kRounding(){\n\t\tScanner kbd = new Scanner(System.in); //see fairgame\n\t\tint input = kbd.nextInt();\n\t\tint Nput = input;\n\t\tint rounding = kbd.nextInt();\n\n\t\tint div2 = 0;\n\t\tint div5 = 0;\n\n\t\twhile (input % 2 == 0){\n\t\t\tdiv2++;\n\t\t\tinput = input/2;\n\t\t}\n\t\twhile (input % 5 == 0){\n\t\t\tdiv5++;\n\t\t\tinput = input/5;\n\t\t}\n\n\t\tint multiplierTwo = 1;\n\t\tint multiplierFive = 1;\n\t\tif(rounding - div2 > 0){\n\t\t\tmultiplierTwo = (int) Math.pow(2, rounding - div2);\n\t\t}\n\t\tif(rounding - div5 > 0){\n\t\t\tmultiplierFive = (int) Math.pow(5, rounding - div5)\n\t\t}\n\n\t\treturn multiplierTwo*(long)multiplierFive*(long)Nput;\n\t}", "public final PlayingCard chooseRoundCard(HeartsGraphics g){\n\t\treturn hand.get(hand.indexOf(chooseCard(g)));\n\t}", "public int getCurrentFloor();", "public Floor nextFloorDown() {\n Floor next = Floor.FIRST; // default value\n switch(_number){\n case 2: next = Floor.FIRST;\n break;\n case 3: next = Floor.SECOND;\n break;\n case 4: next = Floor.THIRD;\n break;\n case 5: next = Floor.FOURTH;\n break;\n case 6: next = Floor.FIFTH;\n break;\n case 7: next = Floor.SIXTH;\n break;\n\n }\n return next;\n\n }", "@Query(\"SELECT * FROM Round WHERE round_id= :roundId\")\n LiveData<Round> getByRoundId(long roundId);", "public static double round1(double n) {\r\n return Math.round(n * 10.0) / 10.0;\r\n }", "public static String round() {\n\t\t\n\t\t// Check if inputs are valid, provides a random input if not.\n\t\tif (PlayerBean.PLAYERONE < 1 || PlayerBean.PLAYERONE > 3) {\n\t\t\thandleInput(String.valueOf(PlayerBean.PLAYERONE), \"playerOne\");\n\t\t}\n\t\tif (PlayerBean.PLAYERTWO < 1 || PlayerBean.PLAYERTWO > 3) {\n\t\t\thandleInput(String.valueOf(PlayerBean.PLAYERTWO), \"playerTwo\");\n\t\t}\n\t\t\n\t\t// See if i is a tie or which player wins.\n\t\tif (PlayerBean.PLAYERONE == PlayerBean.PLAYERTWO) {\n\t\t\tScoreBean.addTie();\n\t\t\tresult = \"tie\";\n\t\t} else {\n\t\t\tcheckResult();\n\t\t}\n\t\t\n\t\t// return JSON response.\n\t\tString pattern\t= \"{\\\"Player1\\\":\\\"%s\\\",\\\"Player2\\\":\\\"%s\\\",\\\"Result\\\":\\\"%s\\\"}\";\n\t\treturn String.format(pattern, printChoice[PlayerBean.PLAYERONE-1], printChoice[PlayerBean.PLAYERTWO-1], result);\n\t\t\n\t}", "public int getTriggerRound() {\n return triggerRound;\n }", "public Floor nextFloorUp() {\n Floor next = Floor.FIRST; // default value\n switch(_number){\n case 1: next = Floor.SECOND;\n break;\n case 2: next = Floor.THIRD;\n break;\n case 3: next = Floor.FOURTH;\n break;\n case 4: next = Floor.FIFTH;\n break;\n case 5: next = Floor.SIXTH;\n break;\n case 6: next = Floor.SEVENTH;\n break;\n\n }\n return next;\n }", "public void setRound(final int value) {\n round = value;\n }", "public int getFloor();", "public int calculateNextRound(Tournament tournament) {\r\n\t\treturn tournament.getRounds().size() + 1;\r\n\t}", "public Player roundWinner() {\n\t\tfor(Player player : gamePlayers){\n\t\t\tEvaluator eval = new Evaluator(player, communityCards);\n\t\t\t\n\t\t\tplayer.setHandRank(eval.evaluate());\n\t\t\tplayersByHandRank.add(player);\n\t\t}\n\t\t\n\t\t//lambdas are magic. Sorts players from lowest to highest rank starting with the lowest at the first\n\t\t//index, and the highest at the last.\n\t\tCollections.sort(playersByHandRank, (p1, p2) -> p1.getHandRank().compareTo(p2.getHandRank()));\n\t\t\n\t\t//TODO: Needs to evaluate high card in case of two or more players have the same high hand rank.\n\t\t//the evaluate method in Evaluator sets high card == to the highest card in a pairSet, flush, or straight,\n\t\t//but needs to be able to add it in the event HIGH_CARD is the highest hand a player has.\n\n\t\treturn playersByHandRank.get(playersByHandRank.size() -1);\n\t}", "public interface RoundScoreCalculator {\n\n\t/**\n\t * Generic interface used to calculate final score for an specific bowling round\n\t * \n\t * @param rounds List of rounds\n\t * @param index Indicates round number in the list\n\t * @param round Bowling round\n\t * @return int Final score of the round\n\t */\n\tpublic int calculate(java.util.List<Round> rounds, int index, Round round);\n}", "private double roundNumber(double in_number, int precision) {\r\n\t\tdouble round_precision = Math.pow(10, (double) precision);\r\n\t\treturn Math.round(in_number * round_precision) / round_precision;\r\n\t}", "public static Double round(Double theVal, Long periods)\n {\n\tDouble val = theVal;\n\tif(val == null)\n\t{\n\t return null;\n\t}\n\tBigDecimal result = roundToBigDecimal(BigDecimal.valueOf(theVal).doubleValue(),periods);\n\treturn result.doubleValue();\n }", "public void logRoundWinner(Player player, int round){\n\t\tif(player instanceof HumanPlayer)\n\t\t\tlog += String.format(\"%nUSER WINS ROUND %d\", round);\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) player;\n\t\t\tlog += String.format(\"%n%s WINS ROUND %d\", ai.getName().toUpperCase(), round);\n\t\t\tString win = ai.getName();\n\t\t\tif(win.equals(\"ai player1\"))\n\t\t\t{\n\t\t\t\troundWins[1]=roundWins[1]+1;\n\t\t\t}\n\t\t\telse if(win.equals(\"ai player2\"))\n\t\t\t{\n\t\t\t\troundWins[2]=roundWins[2]+1;\n\t\t\t}\n\t\t\telse if(win.equals(\"ai player3\"))\n\t\t\t{\n\t\t\t\troundWins[3]=roundWins[3]+1;\n\t\t\t}\n\t\t\telse if(win.equals(\"ai player4\"))\n\t\t\t{\n\t\t\t\troundWins[4]=roundWins[4]+1;\n\t\t\t}\n\t\t\t/*switch(win)\n\t\t\t{\n\t\t\tcase \"ai player1\":{\n\t\t\t\troundWins[1]=roundWins[1]+1;\n\t\t\t}\n\t\t\tcase \"ai player2\":{\n\t\t\t\troundWins[2]=roundWins[2]+1;\n\t\t\t}\n\t\t\tcase \"ai player3\":{\n\t\t\t\troundWins[3]=roundWins[3]+1;\n\t\t\t}\n\t\t\tcase \"ai player4\":{\n\t\t\t\troundWins[4]=roundWins[4]+1;\n\t\t\t}\n\t\t\t}*/\n\t\t}\n\t\tlineBreak();\n\t}", "public JLabel getTimeFlag(int round) {\n\t\t\n\t\tJLabel tempLabel = new JLabel(\"\");\n\t\t\n\t\tif(round == 1) {\n\t\t\tflagFirstRaceTime = tempLabel;\n\t\t}\n\t\tif(round == 2) {\n\t\t\tflagSecondRaceTime = tempLabel;\n\t\t}\n\t\tif(round == 3) {\n\t\t\tflagSemiFinalRaceTime = tempLabel;\n\t\t}\n\t\tif(round == 4) {\n\t\t\tflagFinalRaceTime = tempLabel;\n\t\t}\n\t\t\n\t\treturn tempLabel;\n\t}", "public Floor getFloor(String buildingName, int floorNum){\n // TODO: Replace return statement of getFloorByBuilding with actual get method from server\n try {\n return demoFloors.get(buildingName)[floorNum];\n } catch (Exception e){\n return null;\n }\n }", "public static final int round(final double a) {\r\n\r\n if (a < 0) {\r\n return ((int) (a - 0.5d));\r\n } else {\r\n return ((int) (a + 0.5d));\r\n }\r\n }", "public static int getScore(int dieOne, int dieTwo, int dieThree, int roundNumber) {\n\t\t\n\t\t// if all three die match the round number, 21 points are scored\n\t\tif ((dieOne == dieTwo) && (dieTwo == dieThree) && (dieThree == roundNumber)) {\n\t\t\treturn 21;\n\t\t\n\t\t// if all three die match each other, 5 points are scored\t\n\t\t} else if ((dieOne == dieTwo) && (dieTwo == dieThree)) {\n\t\t\treturn 5; \n\t\n\t\t// if two of the die match the round number, 2 points are scored\n\t\t}else if (((dieOne == roundNumber) && (dieTwo == roundNumber)) || ((dieTwo == roundNumber) && (dieThree == roundNumber)) || ((dieOne== roundNumber) && (dieThree == roundNumber))) {\n\t\t\treturn 2;\n\t\t\t\n\t\t//if one of the die match the round number, 1 point is scored\t\n\t\t} else if ((dieOne == roundNumber) || (dieTwo == roundNumber) || (dieThree == roundNumber)) {\n\t\t\treturn 1;\n\t\t\n\t\t// if none of the above occur, the player scores 0 points\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "abstract GameRound setupRound();", "public static int round(float a) {\t\n\t\treturn (int)floor(a + 0.5f);\n\t}", "private int round2(double candidate) {\n\tif (candidate > 0.5) {\n\t return(1);\n\t}\n\n\treturn(0);\n }", "public void playRound() {\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tif (theModel.setActivePlayer(winningPlayer) == true) {\r\n\t\t\t\t// theModel.selectCategory();\r\n\t\t\t\t// so at this point we have returned strings?\r\n\t\t\t\ttheModel.displayTopCard();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.selectCategory()));\r\n\t\t\t\t\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\t\t\t\r\n\t\t\t\t//System.out.println(\"this should be the human having won round\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcheckIfHumanPlayerInGame();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.autoCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round: \" + RoundID);\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\r\n\t\t\t\t//System.out.println(\"this should be the ai \" + winningPlayer.getName() + \"who has won the last round\");\r\n\t\t\t\t// return true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@PostMapping(\"/startRound/{gameId}/{UID}\")\n public Round startARound() {\n return new Round();\n }", "public static int round(double a) {\n return (int) Math.floor(a + 0.5f);\n }", "public int getRoundScore() {\n return score;\n }", "public Stock getStock(String symbol) {\n\t\tif(!checkStock(symbol)) return null;\n\t\tfor(Stock s : stockList) {\n\t\t\tif(s.getSymbol().equals(symbol))\n\t\t\t\treturn s;\n\t\t}\n\t\treturn null;\n\t}", "public Round(ArrayList<Move> niceMoves, int roundNo) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = roundNo;\n\t}", "private GameResponse playNextRound() {\n if(gameResponse.getPoint() == 0) {\n gameResponse.setMessage(null);\n roll();\n gameResponse.setPoint(currentRoll);\n if (WINS.contains(gameResponse.getPoint())) {\n completeRound(GameEnum.WON);\n return gameResponse;\n } else if (LOSES.contains(gameResponse.getPoint())) {\n completeRound(GameEnum.LOST);\n return gameResponse;\n }\n } else {\n roll();\n if (currentRoll == gameResponse.getPoint()) {\n completeRound(GameEnum.WON);\n return gameResponse;\n } else if (currentRoll == 7) {\n completeRound(GameEnum.LOST);\n return gameResponse;\n }\n }\n return gameResponse;\n }", "public int getGotoFloor();", "private Scorestreak getScorestreak(Player player) {\n Game game = Dogfight.instance.getGame(player);\n\n if (game != null) {\n return game.getScoreRegistry().getScorestreak(player);\n }\n\n return null; //No game found\n }", "private int round1(double candidate) {\n\tif (candidate > 0.85) {\n\t return(1);\n\t} else if (candidate < 0.15) {\n\t return(0);\n\t}\n\t\n\treturn(-1);\n }", "public int getMinFloor();", "public int getRound() {\n\t\treturn myHistory.size() + opponentHistory.size();\n\t}", "private double round(double data) {\n\n\t\treturn Math.rint(data / m_Precision) * m_Precision;\n\t}", "public Integer getDestinationFloor() {\n return switch (this.currentState){\n case UP -> this.jobs.isEmpty() ? this.currentFloor : this.jobs.last();\n case DOWN -> this.jobs.isEmpty() ? this.currentFloor : this.jobs.first();\n case IDLE -> null;\n };\n }", "public static int numberOfRounds() {\n System.out.print(\"Entrez le nombre de rounds de cette partie : \");\n while (true) {\n try {\n int rounds = new Scanner(System.in).nextInt();\n if (rounds > 0) return rounds;\n } catch (Exception ignored) {\n }\n System.out.println(\"Entrez un entier supérieur à 0 : \");\n }\n }", "private void roundNumber(String roundingFormat){\n float num1 = 0;\n num1 = Float.parseFloat(txtBox.getText());\n DecimalFormat format = new DecimalFormat(roundingFormat);\n txtBox.setText(String.valueOf(format.format(num1)));\n }", "@Test\n public void testGetRoundById() {\n Game testGame = new Game();\n \n testGame.setCorrectSolution(\"1234\");\n testGame.setGameOver(false);\n gameDao.addGame(testGame);\n \n Round testRound1 = new Round();\n testRound1.setGameId(testGame.getGameId());\n testRound1.setUserGuess(\"3214\");\n testRound1.setTime(LocalDateTime.now());\n testRound1.setResult(\"RESULT\");\n testRound1 = roundDao.addRound(testRound1);\n \n Round roundBackFromDao = roundDao.getRoundById(testRound1.getRoundId());\n \n assertEquals(testRound1, roundBackFromDao);\n }", "SoccerPlayer find(Integer number);", "public void handleNextRound() {\n\t\t\r\n\t}", "@Override\r\n\t@Basic\r\n\tpublic Point getPositionOfSquare(Square square) {\r\n\t\tfor (Map.Entry<Point, Square> e : squares.entrySet()) {\r\n\t\t\tif (e.getValue() == square)\r\n\t\t\t\treturn e.getKey();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static Player getWinnerIfPresent(Game game) {\r\n\r\n Map<Player,Integer> scoreMap = new HashMap<>();\r\n\r\n for (Player player : game.getPlayers()) {\r\n int numFrames = player.getFrames().size();\r\n if (numFrames == 10\r\n && player.getFrames().get(numFrames -1).getWasScored()) {\r\n scoreMap.put(player,player.getFrames().get(numFrames -1).getScore());\r\n }\r\n\r\n }\r\n\r\n //set the winner\r\n Optional<Map.Entry<Player, Integer>> entry = scoreMap.entrySet().stream().max(Map.Entry.comparingByValue());\r\n if (entry.isPresent()) {\r\n entry.get().getKey().setWinner(true);\r\n game.setOver(true);\r\n return entry.get().getKey();\r\n }\r\n\r\n return null;\r\n }", "public int deleteRoundPrognostic(int chaId, int round) {\n\ttry {\n\t //** crear la frase DELETE SQL de tabla1\n\t String sql = \"DELETE FROM prognostics WHERE pro_cha_id = ? AND pro_round = ?\";\n\t PreparedStatement ps = conn.prepareStatement(sql);\n\t ps.setInt(1, chaId);\n\t ps.setInt(2, round);\n\t log.debug(\"deleteRoundPrognostic: \" + ps.toString());\n\t return ps.executeUpdate();\n\t} catch (SQLException ex) {\n\t log.error(ex);\n\t}\n\treturn 0;\n }", "public static Currency round(Currency c) {\r\n return c.round();\r\n }", "private Double roundNumber(final Number number, final int decimalPlaces) {\n\r\n\t\tfinal Double dcPlacesB10 = Math.pow(10, decimalPlaces);\r\n\r\n\t\tfinal Double res = Math.round(number.doubleValue() * dcPlacesB10) / dcPlacesB10;\r\n\r\n\t\treturn res;\r\n\t}", "static ReadShellPreference nearest() {\n return NEAREST;\n }", "public MetricResolution getNearestResolution( int seconds ) {\n\t\tMetricResolution best = null;\n\t\tfor( MetricResolution res : resolutions ) {\n\t\t\tif( res.getSeconds() < seconds ) {\n\t\t\t\tif( best == null || best.getSeconds() < res.getSeconds() ) {\n\t\t\t\t\tbest = res;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn best != null ? best : getFinestResolution();\n\t}", "public static double roundPrice(double pNumber){\n\t\tBigDecimal bd = new BigDecimal(Double.toString(pNumber));\n\t\tbd = bd.setScale(2, BigDecimal.ROUND_HALF_UP);\n\t\treturn bd.doubleValue();\n\t}", "public static int round(float a) {\n return (int) Math.floor(a + 0.5f);\n }", "public void setCurrentGameRound(int round){\n\t\tcurrentGameRound = round;\n\t\trepaint();\n\t}" ]
[ "0.706985", "0.6473156", "0.63552904", "0.63256705", "0.62587506", "0.61881304", "0.6158528", "0.6154913", "0.61379415", "0.61305416", "0.6094091", "0.59730935", "0.5972442", "0.59553933", "0.5839919", "0.5769147", "0.5675565", "0.5571954", "0.5564044", "0.55400056", "0.5516276", "0.54991347", "0.54821026", "0.54421115", "0.5425406", "0.54196733", "0.5403376", "0.5330604", "0.52939504", "0.52772117", "0.5251637", "0.52344793", "0.52045214", "0.51743513", "0.5128719", "0.5013471", "0.4973752", "0.4973529", "0.49592412", "0.48981473", "0.48619592", "0.48618987", "0.48513335", "0.4850572", "0.4849835", "0.4844099", "0.48369953", "0.48247194", "0.4818734", "0.47963455", "0.47957283", "0.47948802", "0.47874174", "0.47776496", "0.477525", "0.47620222", "0.47506437", "0.47345734", "0.4690836", "0.4678478", "0.46737856", "0.46718264", "0.4664581", "0.46459886", "0.4644942", "0.46432522", "0.46386287", "0.46295637", "0.4620989", "0.45957512", "0.45949292", "0.45938495", "0.45908082", "0.45842654", "0.45780334", "0.45777416", "0.45768052", "0.45750827", "0.456129", "0.4551782", "0.45461702", "0.45093086", "0.44942406", "0.44939342", "0.44935915", "0.44935554", "0.4492635", "0.4483733", "0.44822595", "0.44629285", "0.4455533", "0.44490483", "0.4443173", "0.444191", "0.44386446", "0.4435286", "0.4432951", "0.44313937", "0.44268146", "0.44252834" ]
0.7516556
0
Creates and returns a new PaxosRound with the given round number
public PaxosRound createRound(int a_round) { PaxosRound result = new PaxosRound(this, a_round, getNextRoundLeader(a_round)); m_rounds.put(new Integer(a_round), result); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PaxosRound createRound()\n {\n return createRound(0);\n }", "public PaxosRound getRound(int a_round)\n {\n PaxosRound result = (PaxosRound) m_rounds.get(new Integer(a_round));\n return result;\n }", "public void setRound(int round) {\r\n this.round = round;\r\n }", "public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}", "public Round createRound(Tournament tournament) {\r\n\t\tRound round = new Round(calculateNextRound(tournament));\r\n\t\tcopyAllTournamentPlayers(tournament, round);\r\n\t\treturn round;\r\n\t}", "public Round(int roundNo) {\n\t\tthis.niceMoves = new ArrayList<Move>();\n\t\tthis.roundNo = roundNo;\n\t}", "private void newRound() {\r\n\t\tballoonsThisRound = currentRoundNumber * balloonsPerRound * 5;\r\n\t\tcurrentRound = new Round(balloonTypes, 0.3f, balloonsThisRound);\r\n\t\tcurrentRoundNumber++;\r\n\r\n\t\tSystem.out.println(\"Begining Round: \" + currentRoundNumber);\r\n\t}", "public void setRound(final int value) {\n round = value;\n }", "public void setUpNewRound(){\n int newRound = getRoundNum() + 1;\n getRound().getPlayer(0).clearPiles();\n getRound().getPlayer(1).clearPiles();\n mRound = new Round(players);\n setRoundNum(newRound);\n mRound.beginRound();\n }", "@Override\r\n\tpublic void setRound(int x) {\n\t\troundNum = x;\r\n\t\tupdate();\r\n\t}", "public Round(ArrayList<Move> niceMoves, int roundNo) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = roundNo;\n\t}", "public void setRoundNum(int roundNum){\n gameRounds = roundNum;\n }", "private void setRound(ChesspairingRound round) {\n\t\tint rNumber = round.getRoundNumber();\n\t\tif (rNumber < 1) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tList<ChesspairingRound> rounds = mTournament.getRounds();\n\t\tif (rounds.size() >= rNumber) {\n\t\t\trounds.remove(rNumber - 1);\n\t\t}\n\t\trounds.add(rNumber - 1, round);\n\t}", "public int getRound() {\n return round;\n }", "public int getRoundNumber() {\n return roundNumber;\n }", "abstract GameRound setupRound();", "public RoundTimer(int roundTime) {\n\t\ttimer = new Timer();\n\t\tthis.timeLeft = roundTime;\n\t}", "public Round(ArrayList<Move> niceMoves) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = 1;\n\t}", "@Override\r\n\tpublic void setRound(int round) {\n\t\tthis.round = \"Round: \"+round;\r\n\t\tupdate();\r\n\t}", "public Round getRound(){\n return mRound;\n }", "public Integer getRound() {\n return round;\n }", "public int getRound()\r\n\t{\r\n\t\treturn this.round;\r\n\t}", "private static int newNumber()\n\t{\n\t\tdouble initial = Math.random();\n\t\tdouble rangeAdjusted = initial * (10000 - 1001) + 1000;\n\t\tint rounded = (int)Math.round(rangeAdjusted);\n\t\treturn rounded;\n\t}", "public int getCurrentRound() {\n\t\treturn roundNumber;\n\t}", "public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer2()+1);\n\t\t}\n\t\t//On check si c'est le dernier round\n\t\tif (round != ROUNDMAX) {\n\t\tthis.round++;\n\t\t//On change un round sur deux le premier joueur de la manche\n\t\t\n\t\tif (0==round%2) {\n\t\t\t\n\t\t\tthis.setActivePlayer(player2);\n\t\t}else {\n\t\t\n\t\t\tthis.setActivePlayer(player1);\n\t\t}\n\t\t}else {\n\t\t\t//Sinon la partie est gagne\n\t\t\tdraw.win = true;\n\t\t}\n\t\t}", "private ChesspairingRound getRound(int roundNumber) {\n\t\tList<ChesspairingRound> rounds = mTournament.getRounds();\n\t\tfor (ChesspairingRound round : rounds) {\n\t\t\tif (round.getRoundNumber() == roundNumber) {\n\t\t\t\treturn round;\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalStateException(\n\t\t\t\t\"Tournament in inconsistent state! Not able to find roundNumber = \" + roundNumber);\n\t}", "public int getCurrentRound()\n\t{\n \treturn currentRound;\n\t}", "@Override\n protected PieceBuilder.LastStep<RoundPiece> newBuilder() {\n return newBuilderTypeStep().round();\n }", "private double roundNumber(double in_number, int precision) {\r\n\t\tdouble round_precision = Math.pow(10, (double) precision);\r\n\t\treturn Math.round(in_number * round_precision) / round_precision;\r\n\t}", "public void incrementCurrentRoundNumber() {\n\t\t\n\t\tcurrentRoundnumber = currentRoundnumber +1;\n\t}", "private void newRound(){\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\tSystem.out.println(\"PREPPING ROUND \" + round + \" SETUP. Game Logic round (should be aligned) : \" + gameLogic.getRound());\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\n\t\tSystem.out.println(\"PRINTING LEADSUIT OF NEW ROUND \" + gameLogic.getLeadSuitCard());\n\t\tgameLogic.initialiseDeck();\n\t\tgameLogic.setDealer(round);\n\t\t\n\t\tSystem.out.println(\"Players Hand (Should be empty): \" + gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getHand());\n\t\t\n\t\tgameLogic.setPlayersHand(round);\n\t\tgameLogic.setTrumpCard();\n\t\tgameLogic.setPlayerOrder(round);\n\t\tgameLogic.getTableHand().clearTableHand();\n\n\t\twaitingUser = false;\n\t\tif (waitingUser()){\n\t\t\twaitingUser = true;\n\t\t}\n\n\t\tcurrentPlayer = gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getPlayerId();\n\n\t\tdisplayRoundUI();\n\t\tdisplayTrumpUI();\n\t\tdisplayCardUI();\n\t\tdisplayAvailableBidsUI();\n\t\tdisplayTableHandUI();\n\n\t\tSystem.out.println(\"BEGIN ROUND \" + round);\n\t\ttodoThread();\n\t}", "public int getRoundNum(){\n return gameRounds;\n }", "public void beginRound() {\r\n\t\tnewRound();\r\n\t}", "public IconBuilder round() {\n\t\tthis.shape = IconShape.ROUND;\n\t\treturn this;\n\t}", "public Money round(RoundingType roundingType) {\n\n if (amount != null) {\n amount = amount.setScale(0, roundingType.getRoundingKey());\n amount = amount.setScale(2, roundingType.getRoundingKey());\n\n }\n\n return this;\n }", "public static double roundPrice(double pNumber){\n\t\tBigDecimal bd = new BigDecimal(Double.toString(pNumber));\n\t\tbd = bd.setScale(2, BigDecimal.ROUND_HALF_UP);\n\t\treturn bd.doubleValue();\n\t}", "public synchronized int getCurrentRoundNumber()\r\n {\r\n return currentRoundNumber;\r\n }", "private double roundToOneDecimal(double num) {\n\t\treturn (int)((10 * num) + 0.5) / 10.0;\n\t}", "private void nextRound() {\n\t\n\t\t\n\t\tcfight++;\n\t\tif(cfight>=maxround)\n\t\t{\n\t\tcfight=0;\n\t\t\n\t\tround++;\n\t\t\tmaxround/=2;\n\t\t}\n\t\t\n\tif(round<4)\n\t{\n\tcontrollPCRound();\n\t}\n\telse\n\t{\n\t\tint sp=0;\n\t\tint round=0;\n\t\tfor(int i=0; i<fighter.length; i++)\n\t\t{\n\t\t\tif(spieler[i]>0)\n\t\t\t{\n\t\t\t\tsp++;\n\t\t\t\tif(fround[i]>round)\n\t\t\t\t{\n\t\t\t\tround=fround[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\tif(geld==false)\n\t{\n\t\tgeld=true;\n\t\tif(sp==1)\n\t\t{\n\t\tZeniScreen.addZenis(round*3500);\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint w=round*4000-500*sp;\n\t\t\tif(w<1)\n\t\t\t{\n\t\t\t\tw=100;\n\t\t\t}\n\t\t\tZeniScreen.addZenis(w);\t\n\t\t}\n\t}\n\t}\n\t\n\t\n\t}", "@Test\n public void testBigDecimalConstructorDefaultRounding() {\n new Money(new BigDecimal(\"1.231\"), Currency.getInstance(\"USD\"));\n }", "NumberValue createNumberValue();", "public static int numInRound(int round) {\n\t\treturn (int) (Math.pow(2, round - 1));\n\t}", "private RoundOffUtil()\n {\n\n }", "public RoundManager(Balloon[] balloonTypes, int balloonsPerRound, float spawnTime) {\r\n\t\tthis.balloonTypes = balloonTypes;\r\n\t\tthis.balloonsPerRound = balloonsPerRound;\r\n\t\tthis.timeBetweenRounds = 0;\r\n\t\tthis.currentRoundNumber = 0;\r\n\t\tthis.spawnTime = spawnTime;\r\n\t\tthis.currentRound = null;\r\n\r\n\t\tthis.balloonsThisRound = currentRoundNumber * balloonsPerRound * 50;\r\n\r\n\t\t// newRound();\r\n\r\n\t}", "void newRound() {\n // Increase the round number on every round.\n round++;\n\n // Write to the log file\n\t logger.log(divider);\n logger.log(\"\\nRound \" + round + \" starting.\");\n logger.log(\"Active player: \" + activePlayer.getName());\n\n // Log player name and topmost card for all players.\n for (Player player : players) {\n logger.log(player.getName() + \"'s card: \" + player.getTopMostCard()\n .toString());\n }\n\n setGameState(GameState.NEW_ROUND_INITIALISED);\n }", "public void setCurrentGameRound(int round){\n\t\tcurrentGameRound = round;\n\t\trepaint();\n\t}", "public int getNround()\n {\n \treturn this.nround;\n }", "public void startRound(int round) {\n\t\tif (round != 1) {\n\t\t\tSystem.out.println(\" Vous avez effectuez votre : \" + round + \" ème attaques\\n\");\n\t\t} else {\n\t\t\tSystem.out.println(\" Vous avez effectuez votre : \" + round + \" ère attaque\\n\");\n\t\t}\n\n\t}", "public LookupAccountTransactions round(Long round) {\n addQuery(\"round\", String.valueOf(round));\n return this;\n }", "public void setNumberRounds(int numberRounds) {\n this.numberRounds = numberRounds;\n }", "public static String nextRound() {\n return \"Starting next round.\";\n }", "public RoundPieceFactory(Storage<Piece> storage) {\n super(storage);\n }", "private void updateShapeFactory(int value) {\n ShapeFactory.setRoundness(value);\n }", "public static NewPricePG newPricePG(PricePG prototype) {\n return new PricePGImpl(prototype);\n }", "public static Number step1Rounding(Number value) {\r\n return rounder.performRounding(value);\r\n }", "private void roundNumber(String roundingFormat){\n float num1 = 0;\n num1 = Float.parseFloat(txtBox.getText());\n DecimalFormat format = new DecimalFormat(roundingFormat);\n txtBox.setText(String.valueOf(format.format(num1)));\n }", "public GameSettingBuilder setMaxRound(int maxRound) {\n this.maxRound = maxRound;\n return this;\n }", "private void nextRound() {\r\n action = 0;\r\n if (round == GameConstants.ROUNDS) {\r\n round = 0;\r\n if (phase == 0) {\r\n vc = null;\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n }\r\n phase++;\r\n } else {\r\n round++;\r\n }\r\n }", "public void setRoundScore(int roundScore) {\n\t\tthis.roundScore = roundScore;\n\t}", "public static List<Match> getRound(int roundNum) {\n\t\tList<Match> round = new ArrayList<Match>();\n\t\tint numInRound = numInRound(roundNum);\n\t\tint roundStart = numInRound - 1;\n\t\tfor (int i = 0; i < numInRound; i++)\n\t\t\tround.add(matches[roundStart + i]);\n\t\treturn round;\n\t}", "abstract void startRound();", "public ArrayList<Move> getRound(int round) {\r\n\t\tint startIndex;\r\n\t\tint endIndex;\r\n\t\t\r\n\t\tArrayList<Move> moves = new ArrayList<Move>();\r\n\t\t\r\n\t\t// Guard against negatives\r\n\t\tif (round < 0) {\r\n\t\t\tround = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif (round >= offsets.size()) {\r\n\t\t\tround = offsets.size() - 1;\r\n\t\t\tendIndex = offsets.size();\r\n\t\t} else {\r\n\t\t\tendIndex = offsets.get(round+1);\r\n\t\t}\r\n\t\t\r\n\t\tstartIndex = offsets.get(round);\r\n\t\t\r\n\t\tfor(int i = startIndex; i < endIndex; i++) {\r\n\t\t\tmoves.add(this.getResults().get(i));\r\n\t\t}\r\n\t\t\r\n\t\treturn moves;\r\n\t}", "public PencilPen() {\n this(10.0);\n }", "public Round createRoundComplete(Tournament tournament) {\r\n\t\tRound newRound = createRound(tournament);\r\n\t\tcalculatePausedPlayers(tournament, newRound);\r\n\t\tcreateAllRoundMatches(tournament, newRound);\r\n\t\treturn newRound;\r\n\t}", "public void setRoundOffValue (java.math.BigDecimal roundOffValue) {\n\t\tthis.roundOffValue = roundOffValue;\n\t}", "public static NewStockPG newStockPG(StockPG prototype) {\n return new StockPGImpl(prototype);\n }", "public abstract Quantity<Q> create(Number value, Unit<Q> unit);", "public static NewPaymentPG newPaymentPG(PaymentPG prototype) {\n return new PaymentPGImpl(prototype);\n }", "@PostMapping(\"/startRound/{gameId}/{UID}\")\n public Round startARound() {\n return new Round();\n }", "public void newRound(){\r\n clearRandomDirections();\r\n this.currentAmountToPutIn++;\r\n initializeNewRound();\r\n //reset timer;\r\n }", "protected double round(double value, int precision) {\n int scale = (int) Math.pow(10, precision);\n return (double) Math.round(value * scale) / scale;\n }", "public static double round(double number, int n) {\n\t\tif (Double.isNaN(number))\n\t\t\treturn Float.NaN;\n\t\t\n\t\tlong d = (long) Math.pow(10, n);\n\t\treturn (double) Math.round(number * d) / d;\n\t}", "public ChesspairingTournament generateNextRound(ChesspairingTournament tournament) {\n\t\tthis.mTournament = tournament;\n\t\tthis.mTournament.setParringSummary(Tools.buildParringStarted());\n\t\t// more tan 1 players\n\t\tif (mTournament.getPlayers().size() < 2) {\n\t\t\tthrow new IllegalStateException(\"Please ad at least 2 players or more\");\n\t\t}\n\n\t\t// more rounds than totalRounds? For the moment I do not want to deal\n\t\t// with this use case\n\t\tif (mTournament.getTotalRounds() <= mTournament.getRounds().size()) {\n\t\t\tthrow new IllegalStateException(\"You are trying to generate more rounds than totalRounds\");\n\t\t}\n\n\t\tboolean validationOk = validateOrder();\n\t\tif (!validationOk) {\n\t\t\treturn mTournament;\n\t\t}\n\n\t\tList<ChesspairingRound> rounds = this.mTournament.getRounds();\n\t\tif (rounds.size() <= 0) {\n\t\t\tgenerateFirstRound();\n\t\t\treturn this.mTournament;\n\t\t}\n\n\t\t// make sure that the next round can be generated\n\t\tif (!canIGenerateNextRound()) {\n\t\t\tmTournament.getParringSummary().setShortMessage(PairingSummary.PARRING_NOT_OK);\n\t\t\tmTournament.getParringSummary().setLongMessage(\"You can not generate the next round!\");\n\t\t\treturn mTournament;\n\t\t}\n\n\t\tint roundNumber = mTournament.getRounds().size();\n\t\tcomputeInitialTournamentState(roundNumber);\n\n\t\tcomputeNextRound(roundNumber + 1);\n\t\t// order games points,elo,index\n\n\t\tList<ChesspairingGame> games = this.generatedRound.getGames();\n\t\t// index\n\t\t// the smallest index first\n\t\tCollections.sort(games, new Comparator<ChesspairingGame>() {\n\t\t\t@Override\n\t\t\tpublic int compare(ChesspairingGame o1, ChesspairingGame o2) {\n\t\t\t\tint indexO1 = getHighestIndex(o1);\n\t\t\t\tint indexO2 = getHighestIndex(o2);\n\t\t\t\treturn Integer.compare(indexO1, indexO2);\n\t\t\t}\n\t\t});\n\n\t\t// the highest elo first\n\t\tCollections.sort(games, new Comparator<ChesspairingGame>() {\n\t\t\t@Override\n\t\t\tpublic int compare(ChesspairingGame o1, ChesspairingGame o2) {\n\t\t\t\tint eloO1 = getHighestElo(o1);\n\t\t\t\tint eloO2 = getHighestElo(o2);\n\t\t\t\t// the highest value should be ordered first so wee multiply by\n\t\t\t\t// -1\n\t\t\t\treturn -1 * Integer.compare(eloO1, eloO2);\n\t\t\t}\n\t\t});\n\n\t\t// the highest points first\n\t\tCollections.sort(games, new Comparator<ChesspairingGame>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(ChesspairingGame o1, ChesspairingGame o2) {\n\t\t\t\tDouble pointsO1 = getHighestPoints(o1);\n\t\t\t\tDouble pointsO2 = getHighestPoints(o2);\n\t\t\t\treturn -1 * Double.compare(pointsO1, pointsO2);\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * number the games\n\t\t */\n\t\tint i = 1;\n\t\tfor (ChesspairingGame game : games) {\n\t\t\tgame.setTableNumber(i++);\n\t\t}\n\t\t//if buy game ad this game also to the games list\n\t\tif (this.buyGame != null){\n\t\t\tthis.buyGame.setTableNumber(i);\n\t\t\tgames.add(this.buyGame);\n\t\t}\n\t\t// add the generated round to the tournament\n\t\tthis.setRound(this.generatedRound);\n\t\treturn this.mTournament;\n\t}", "public void play(){\n\n gameRounds++;\n mRound = new Round(players);\n mRound.beginRound();\n\n }", "Posn getGamePiece(Posn p) {\n return new Posn(p.x / GamePiece.GAMEPIECE_SIZE, p.y / GamePiece.GAMEPIECE_SIZE);\n }", "public static double round1(double n) {\r\n return Math.round(n * 10.0) / 10.0;\r\n }", "public int getCurrentGameRound(){\n\t\treturn currentGameRound;\n\t}", "private double roundDecimal(double value, int precision) {\n \tdouble precisionMultiple = Math.pow(10, precision);\n \treturn Math.round(value * precisionMultiple) / precisionMultiple;\n }", "public Pi() {\n // the expressions on the right side of each of the following \n // assignment statements must use PI in them...\n intValue = (int) Math.floor(PI);\n longValue = (long) Math.ceil(PI);\n floatValue = (float)PI;\n doubleValue = PI;\n }", "public static BigDecimal round(BigDecimal val) {\n return val.setScale(DECIMAL_NUMBER, RoundingMode.HALF_UP);\n }", "public TournamentMode(int rounds) {\n\n\t\tthis.rounds = rounds;\n\t\tdealer = Director.getInstance().getDealer();\n\t}", "public String roundUp(){\n return \"Numero original: \" + this._X + \" numero redondeado hacia arriba \" + (int)Math.ceil(this._X);\n }", "public static int playOneRound(String name1, int roundNumber) {\n\t\t\n\t\t//if the round number that was an input is not a number between 1 and 6\n\t\tif ((roundNumber < 1) || (roundNumber > 6)) {\n\t\t\t\n\t\t\t//the program prints an error and returns -1\n\t\t\tSystem.out.println(\"Error: invalid input\");\n\t\t\treturn -1; \n\t\t} else {\n\t\t\n\t\t//otherwise, the dice roll method is called three times and stored as an integer each time\t\n\t\tint dieOne = diceRoll(); \n\t\tint dieTwo = diceRoll();\n\t\tint dieThree = diceRoll(); \n\t\t\n\t\t//these values are used as input to get the score of the round, which is stored as an integer\n\t\tint points = getScore(dieOne, dieTwo, dieThree, roundNumber); \n\t\t\n\t\t//the program displays what the player rolled and their score\n\t\tSystem.out.println(name1 + \" rolled \" + dieOne + \" \" + dieTwo + \" \" + dieThree + \" and scored \" + points + \" points\");\t\n\t\n\t\t//the number of points the player received is returned\n\t\treturn points;\n\t\t}\n\t}", "public void fillRoundRectangle(RectangleShape rectangle, int radius);", "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 ToggleButton createRoundWinBtn(int scoreToWin) {\n ToggleButton roundWinBtn = new ToggleButton(\"First to \" + scoreToWin);\n roundWinBtn.setPrefWidth(100);\n\n roundWinBtn.setOnAction(e -> {\n endScore = scoreToWin;\n });\n return roundWinBtn;\n }", "@Test\n public void testGameProcess() {\n // set test player data\n mTournament.setPlayerCollection(getTestPlayersData());\n\n int roundNumber = mTournament.calculateRoundsNumber(mTournament.getPlayersCount());\n for (int i = 0; i < roundNumber; ++i) {\n Round round = mTournament.createNewRound();\n assertTrue(\"State of new round must be CREATED\", round.getState() == State.CREATED);\n\n // tests can't create new round because not all rounds are completed\n Round falseRound = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, falseRound);\n\n round.startRound();\n assertTrue(\"State of starting round must be RUNNING\", round.getState() == State.RUNNING);\n\n randomiseResults(round.getMatches());\n round.endRound();\n assertTrue(\"State of ending round must be COMPLETED\", round.getState() == State.COMPLETED);\n\n // tests that ended round can't be started again\n round.startRound();\n assertTrue(\"State of ended round must be COMPLETED\", round.getState() == State.COMPLETED);\n }\n // tests can't create one more round because game is over at this point\n Round round = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, round);\n\n }", "PRSquare(int x, int y) {\n this.x = x;\n this.y = y;\n }", "P createP();", "public static NewShipperPG newShipperPG(ShipperPG prototype) {\n return new ShipperPGImpl(prototype);\n }", "public void setActualRound(Round actualRound) {\n\t\tthis.actualRound = actualRound;\n\t}", "public Rng(int sides) {\n\t\tthis();\n\t\tthis.sides = sides;\n\t}", "public static final Function<Date,Date> round(final int calendarField) {\r\n return new Round(calendarField);\r\n }", "public NumberP(NumberP numberP)\n\t{\n\t\tif (numberP == null)\n\t\t{\n\t\t\tError = ErrorTypesNumber.InvalidInput;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tBaseTenExponent = numberP.BaseTenExponent;\n\t\t\tValue = numberP.Value;\n\t\t\tOriginalString = numberP.OriginalString;\n\t\t\tConfig = new ParseConfig(numberP.Config);\n\t\t\tError = numberP.Error;\n\t\t}\n\t}", "public static double round(double number) {\r\n //MiscStuff.writeToLog(number);\r\n Double d = new Double(number);\r\n String str = d.toString();\r\n str.trim();\r\n \r\n if(str.indexOf('.') + 3 < str.length()) {\r\n if(!str.equals(\"NaN\") && !str.equals(\"Infinity\") \r\n && !str.equals(\"-Infinity\")) {\r\n \r\n \r\n int i = str.indexOf('.');\r\n String str1 = str.substring(0, i + 3);\r\n d = new Double(str1);\r\n \r\n //MiscStuff.writeToLog(\" \" + str + \" \" + d);\r\n \r\n if(!str.substring(i+3).equals(\"\") ) {\r\n int rounder = new Integer(str.substring(i+3, i+4));\r\n \r\n if(5 <= rounder) {\r\n Double d2 = (10 - rounder) * .001;// d + new Float(.01);\r\n d = number + d2;\r\n //MiscStuff.writeToLog(\"Rounder \" + rounder + \" \" + d2);\r\n \r\n String str2 = d.toString();\r\n str2.trim();\r\n \r\n if(str2.indexOf('.') + 3 < str2.length()) \r\n d = Math2.round(d); //don't get stuck....\r\n }\r\n }\r\n \r\n number = d; \r\n }\r\n \r\n else {\r\n //MiscStuff.writeToLog(number); \r\n }\r\n }\r\n \r\n return number;\r\n }", "public static int roundTo(int value, int unit) {\n if (value < 0 || unit < 1) {\n throw new IllegalArgumentException();\n }\n \n return ((value + unit/2) / unit) * unit;\n }", "public JsonResponse(String status, int round) {\n this.status = status;\n this.round = round;\n }", "private int xRounded(Summit s, PanoramaParameters p) {\n GeoPoint obsPos = p.observerPosition();\n double azimuthToSummit = obsPos.azimuthTo(s.position());\n return (int) round(p.xForAzimuth(azimuthToSummit));\n }", "public static double round(double theVal, int periods)\n {\n\tBigDecimal result = roundToBigDecimal(BigDecimal.valueOf(theVal),periods);\n\treturn result.doubleValue();\n }", "public static float Round(float Rval, int Rpl) {\r\n\t\tfloat p = (float) Math.pow(10, Rpl);\r\n\t\tRval = Rval * p;\r\n\t\tfloat tmp = Math.round(Rval);\r\n\t\treturn (float) tmp / p;\r\n\t}" ]
[ "0.8102282", "0.6454583", "0.6216657", "0.61616856", "0.61128545", "0.60877264", "0.59969807", "0.5908528", "0.5649885", "0.56239265", "0.56161267", "0.5575764", "0.5535451", "0.54109615", "0.5403501", "0.5367833", "0.53473866", "0.53226936", "0.53217", "0.53184825", "0.52810055", "0.5259932", "0.5237948", "0.52005446", "0.5189904", "0.51703656", "0.49854967", "0.49506047", "0.49431875", "0.49264374", "0.49075177", "0.48970434", "0.48957816", "0.48873356", "0.48477516", "0.48383853", "0.48303983", "0.48213425", "0.47941187", "0.47925085", "0.4791576", "0.47748786", "0.47587457", "0.4750466", "0.47408706", "0.47324207", "0.47173336", "0.47141972", "0.46696997", "0.46656904", "0.46537185", "0.4592255", "0.45780078", "0.45603487", "0.45532426", "0.4550088", "0.45491162", "0.45404124", "0.45078525", "0.4507301", "0.4500538", "0.44977167", "0.4455738", "0.44441587", "0.4434343", "0.44281688", "0.4423262", "0.4417525", "0.44161323", "0.4414133", "0.4412711", "0.44099647", "0.44090202", "0.43909973", "0.43845078", "0.43823844", "0.43823192", "0.43778366", "0.4377651", "0.4341895", "0.4334848", "0.43286085", "0.43130276", "0.4309966", "0.43070394", "0.4304423", "0.42941895", "0.42893246", "0.4281339", "0.42697892", "0.42677644", "0.42641973", "0.4259405", "0.42549688", "0.42484492", "0.4243064", "0.42380175", "0.42361793", "0.42324474", "0.42170805" ]
0.7716057
1
Creates a PaxosRound with round number 0
public PaxosRound createRound() { return createRound(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}", "public PaxosRound createRound(int a_round)\n {\n PaxosRound result = new PaxosRound(this, a_round, getNextRoundLeader(a_round));\n m_rounds.put(new Integer(a_round), result);\n return result;\n }", "public static numero getZero()\n {\n return new numero(ZERO);\n }", "default A isZero() {\n return satisfiesNumberCondition(new NumberCondition<>(0, EQUAL_TO));\n }", "@Override\r\n\tprotected Integer zero() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic double calcularPrecio() {\n\t\treturn 0;\n\t}", "@Test\n public void testZeroPrice() {\n double expectedValue = new BigDecimal(0.0, new MathContext(5)).doubleValue();\n double actualValue = MarkupCalculator.determinePrice(new BigDecimal(0.0),\n BigInteger.valueOf(5),\n ProductType.FOOD)\n .round(new MathContext(5)).doubleValue();\n \n Assert.assertEquals(\"failure - zero price test produced the wrong result\",\n expectedValue, \n actualValue, 0.001);\n }", "private RoundOffUtil()\n {\n\n }", "protected void setNumbertoZero() {\n\t\tnumber = 0;\n\t}", "public void setScoreZero() {\n this.points = 10000;\n }", "public static BigDecimal nullToZero(BigDecimal b)\n {\n if(isEmptyDecimal(b))\n {\n return BigDecimal.ZERO;\n }\n else\n {\n return b;\n }\n }", "@Override\n public int getDecimalDigits() { return 0; }", "@Test\n public void testBigDecimalConstructorDefaultRounding() {\n new Money(new BigDecimal(\"1.231\"), Currency.getInstance(\"USD\"));\n }", "public void setRound(int round) {\r\n this.round = round;\r\n }", "public void zero();", "public static TextPos fromBaseZeroValue(int value) {\n return new TextPos(TextPos.BASE_ZERO, value);\n }", "@Override\r\n\tpublic void setRound(int x) {\n\t\troundNum = x;\r\n\t\tupdate();\r\n\t}", "public Round(int roundNo) {\n\t\tthis.niceMoves = new ArrayList<Move>();\n\t\tthis.roundNo = roundNo;\n\t}", "public void setRound(final int value) {\n round = value;\n }", "public final void setZero() {\n \t\n\t\tthis.m00 = 0.0F;\n\t\tthis.m01 = 0.0F;\n\t\tthis.m02 = 0.0F;\n\t\tthis.m10 = 0.0F;\n\t\tthis.m11 = 0.0F;\n\t\tthis.m12 = 0.0F;\n\t\tthis.m20 = 0.0F;\n\t\tthis.m21 = 0.0F;\n\t\tthis.m22 = 0.0F;\n }", "double roundOff (double value) {\n\t\treturn Math.floor((value + EPSILON) * 100) / 100;\n\t}", "public Rational()\n\t{\n\t\tthis.setNumer(0);\n\t\tthis.setDenom(0);\n\t}", "@Test\n public void roundOffDecimalPoints() throws IOException {\n BigDecimal actual = Utils.roundOffDecimalPoints(new BigDecimal(1), 2, 2);\n Assert.assertEquals(\"100.00\", actual.toString());\n }", "public static Money zeroForLocalCurrency() {\n return zeroFor(Currency.getInstance(Locale.getDefault()));\n }", "public static int decimals() {\n return 0;\n }", "public static BigDecimal emptyDecimalToZero(BigDecimal myNumber)\n {\n if(myNumber == null || ConstantsCommon.EMPTY_BIGDECIMAL_VALUE.equals(myNumber))\n {\n \t return BigDecimal.ZERO;\n }\n else\n {\n \t return myNumber;\n }\n }", "public void zero() {\r\n\t\tthis.x = 0.0f;\r\n\t\tthis.y = 0.0f;\r\n\t}", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "public PaxosRound getRound(int a_round)\n {\n PaxosRound result = (PaxosRound) m_rounds.get(new Integer(a_round));\n return result;\n }", "public void zero() {\n fill(0);\n }", "private double roundToOneDecimal(double num) {\n\t\treturn (int)((10 * num) + 0.5) / 10.0;\n\t}", "public void styleforZero() {\r\n\t\t\r\n\t\tsuper.styleforZero();\r\n\t\t\r\n\t}", "PriceModel getZeroPriceModel();", "private int xRounded(Summit s, PanoramaParameters p) {\n GeoPoint obsPos = p.observerPosition();\n double azimuthToSummit = obsPos.azimuthTo(s.position());\n return (int) round(p.xForAzimuth(azimuthToSummit));\n }", "private void setPointsAs0() {\n\n for (int counter = 0; counter < countOfPoints; counter++) {\n points[counter] = new Point(0,0);\n }\n\n }", "@Test\n public void testZeroA() {\n assertEquals(0, PiGenerator.powerMod(0, 5, 42));\n }", "public void testGetDigitsNumberIsZero() {\n\t\tNumberConverter test = new NumberConverter(0);\n\t\tassertEquals(\"Should have returned ones digit as 0\",\n\t\t\t\ttest.getNthDigit(1), 0);\n\t\tassertEquals(\"Should have returned tens digit as 0\",\n\t\t\t\ttest.getNthDigit(2), 0);\n\t\tassertEquals(\"Should have returned hundreds digit as 0\",\n\t\t\t\ttest.getNthDigit(3), 0);\n\t}", "private static int newNumber()\n\t{\n\t\tdouble initial = Math.random();\n\t\tdouble rangeAdjusted = initial * (10000 - 1001) + 1000;\n\t\tint rounded = (int)Math.round(rangeAdjusted);\n\t\treturn rounded;\n\t}", "public void testZeroBid(){\n\n Bid bid = null;\n try {\n bid = new Bid(new Thing(new User()), new User(), 0);\n } catch (Exception e){\n fail();\n }\n assertEquals(0, bid.getAmount());\n assertEquals(\"0.00\", bid.valueOf());\n assertEquals(\"$0.00\", bid.toString());\n }", "public static Money zeroFor(Currency currency) {\n return new Money(BigDecimal.ZERO, currency);\n }", "public RoundTimer(int roundTime) {\n\t\ttimer = new Timer();\n\t\tthis.timeLeft = roundTime;\n\t}", "public Builder clearPValue() {\n \n pValue_ = 0D;\n onChanged();\n return this;\n }", "@Override\n\tpublic double perimetro() {\n\t\treturn 0;\n\t}", "@Override\n\t\tpublic ObjectType operator(OperatorType type) {\n\t\t\treturn new NumberType(0.0).operator(type);\n\t\t}", "@Override\r\n\tpublic double getGrossPrice() {\n\t\treturn 0;\r\n\t}", "public int getRound() {\n return round;\n }", "public String roundDown(){\n return \"Numero original: \" + this._X + \" numero redondeado hacia abajo \" + (int)Math.floor(this._X);\n }", "public Balance() {\r\n value = BigDecimal.ZERO;\r\n }", "public IconBuilder round() {\n\t\tthis.shape = IconShape.ROUND;\n\t\treturn this;\n\t}", "public Round(ArrayList<Move> niceMoves) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = 1;\n\t}", "CompT zero();", "public Round(ArrayList<Move> niceMoves, int roundNo) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = roundNo;\n\t}", "public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }", "public boolean isZero() {return false;}", "public String roundUp(){\n return \"Numero original: \" + this._X + \" numero redondeado hacia arriba \" + (int)Math.ceil(this._X);\n }", "public void resetZero() {\n\t\tset((byte) (get() & ~(1 << 7)));\n\t}", "@Test\n\tpublic void testPotencia0() {\n\t\tdouble resultado=Producto.potencia(0, 8);\n\t\tdouble esperado=0;\n\t\t\n\t\tassertEquals(esperado,resultado);\n\t}", "@Override\r\n\tpublic double getRadius() {\n\t\treturn 0;\r\n\t}", "public Builder clearPrecision() {\n \n precision_ = 0;\n onChanged();\n return this;\n }", "public int getRound()\r\n\t{\r\n\t\treturn this.round;\r\n\t}", "private static String leftPadZeroes(String s, int nZeroes){\r\n if (s.indexOf(\".\") == -1) {\r\n s = String.format(\"%\" + String.valueOf(nZeroes) +\"s\", s);\r\n } else {\r\n s = String.format(\"%\" + String.valueOf(s.length() - s.indexOf(\".\") + nZeroes) +\"s\", s);\r\n }\r\n s = s.replace(\" \", \"0\");\r\n\r\n return s;\r\n }", "public void zeroSpeed() {\n controlRotator.proportionalSpeedSetter(0.0);\n }", "@Override\n public S isZero() {\n rule.addConstraint(new IsEqualAccordingToCompareToConstraint<>(zero()));\n return myself;\n }", "private void removeLeadingZeroes() {\n // Iterate the number until that appears a number greater than 0\n while (number.size() > 0 && number.get(number.size() - 1) == 0) {\n number.remove(number.size() - 1);\n }\n\n // If the list is empty so the number is zero\n if (number.isEmpty()) {\n number.add(0);\n isPositive = true;\n }\n }", "public ToZeroRampGenerator() { \r\n }", "public void setRoundOffValue (java.math.BigDecimal roundOffValue) {\n\t\tthis.roundOffValue = roundOffValue;\n\t}", "@Override\r\n\tpublic double getNettoPrice() {\n\t\treturn 0;\r\n\t}", "private Zeroes() {\n // This space intentionally left blank.\n }", "public int ZERO() {\n return getInt(setting.ZERO);\n }", "private void newRound() {\r\n\t\tballoonsThisRound = currentRoundNumber * balloonsPerRound * 5;\r\n\t\tcurrentRound = new Round(balloonTypes, 0.3f, balloonsThisRound);\r\n\t\tcurrentRoundNumber++;\r\n\r\n\t\tSystem.out.println(\"Begining Round: \" + currentRoundNumber);\r\n\t}", "public void beginRound() {\r\n\t\tnewRound();\r\n\t}", "@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}", "public Boolean isZERO(Ring ring) {\r\n return (re.isZero(ring) && im.isZero(ring));\r\n }", "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 void setUpNewRound(){\n int newRound = getRoundNum() + 1;\n getRound().getPlayer(0).clearPiles();\n getRound().getPlayer(1).clearPiles();\n mRound = new Round(players);\n setRoundNum(newRound);\n mRound.beginRound();\n }", "private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }", "@Test\n public void testFirstPositiveRegionFromZeroX(){\n precisionAssertEquals(\n \"Test [x = 0.02]: first positive region from zero X\",\n -26465.8,\n systemFunctions.calculate(0.02)\n );\n precisionAssertEquals(\n \"Test [x = 0.1]: first positive region from zero X\",\n -675.99,\n systemFunctions.calculate(0.1)\n );\n precisionAssertEquals(\n \"Test [x = 0.2]: first positive region from zero Xt\",\n -60.0068,\n systemFunctions.calculate(0.2)\n );\n precisionAssertEquals(\n \"Test [x = 0.3]: first positive region from zero Xt\",\n -8.64993,\n systemFunctions.calculate(0.3)\n );\n precisionAssertEquals(\n \"Test [x = 0.4]: first positive region from zero Xt\",\n -0.999078,\n systemFunctions.calculate(0.4)\n );\n precisionAssertEquals(\n \"Test [x = 0.5]: first positive region from zero Xt\",\n 0.487504,\n systemFunctions.calculate(0.5)\n );\n precisionAssertEquals(\n \"Test [x = 0.55]: first positive region from zero Xt\",\n 0.714449,\n systemFunctions.calculate(0.55)\n );\n }", "@Test\n public void testFirstPositiveRegionFromZeroX(){\n precisionAssertEquals(\n \"Test [x = 0.02]: first positive region from zero X\",\n -26465.8,\n systemFunctions.calculate(0.02)\n );\n precisionAssertEquals(\n \"Test [x = 0.1]: first positive region from zero X\",\n -675.99,\n systemFunctions.calculate(0.1)\n );\n precisionAssertEquals(\n \"Test [x = 0.2]: first positive region from zero Xt\",\n -60.0068,\n systemFunctions.calculate(0.2)\n );\n precisionAssertEquals(\n \"Test [x = 0.3]: first positive region from zero Xt\",\n -8.64993,\n systemFunctions.calculate(0.3)\n );\n precisionAssertEquals(\n \"Test [x = 0.4]: first positive region from zero Xt\",\n -0.999078,\n systemFunctions.calculate(0.4)\n );\n precisionAssertEquals(\n \"Test [x = 0.5]: first positive region from zero Xt\",\n 0.487504,\n systemFunctions.calculate(0.5)\n );\n precisionAssertEquals(\n \"Test [x = 0.55]: first positive region from zero Xt\",\n 0.714449,\n systemFunctions.calculate(0.55)\n );\n }", "public Integer getRound() {\n return round;\n }", "public PencilPen() {\n this(10.0);\n }", "@Test\n public void testZeroB() {\n assertEquals(1, PiGenerator.powerMod(5, 0, 42));\n }", "public void setDefault(int floorNum) {\n\t\t\n\t\tDEFAULT = floorNum;\n\t\tcurrFloor = DEFAULT;\n\t}", "@Override\n public double getValue() {\n return 0;\n }", "public Pi() {\n // the expressions on the right side of each of the following \n // assignment statements must use PI in them...\n intValue = (int) Math.floor(PI);\n longValue = (long) Math.ceil(PI);\n floatValue = (float)PI;\n doubleValue = PI;\n }", "void setZeroStart();", "public static Vector4 zero()\n {\n return new Vector4(0,0,0,0);\n }", "@Test\n public void testCreate() {\n Geldbetrag zero = factory.create();\n assertEquals(Geldbetrag.ZERO, zero);\n }", "public void setZero(final boolean value) {\n\t\tif (value) { \n\t\t\tsetZero();\n\t\t}\n\t\telse {\n\t\t\tresetZero();\n\t\t}\n\t}", "@Test\r\n\tpublic void multiplicationwithZeroExample() {\r\n\t\tOldFashionPound call = new OldFashionPound();\r\n\t\tString result = call.multiplication(\"5p 17s 8d\", 0);\r\n\t\tString expected = (\"0p 0s 0d\");\r\n\t\tAssert.assertEquals(expected, result);\r\n\t}", "private JRadioButton getJRadioButtonButtZero() {\r\n\t\tif (buttZero == null) {\r\n\t\t\tbuttZero = new JRadioButton();\r\n\t\t\tbuttZero.setText(\"Zero\");\r\n\t\t\tbuttZero.setToolTipText(\"filling borders with zeros\");\r\n\t\t\tbuttZero.addActionListener(this);\r\n\t\t\tbuttZero.setActionCommand(\"parameter\");\r\n\t\t}\r\n\t\treturn buttZero;\r\n\t}", "public double getPickRadius() {\n\t\treturn 0;\n\t}", "@Test\n public void zero() {\n \n BowlingGame bowlinggame = new BowlingGame();\n \n bowlinggame.getScore();\n assertEquals(0, bowlinggame.getScore());\n \n }", "public LargerRandomNumberBigDecimal() {\n mValue = new BigDecimal(0);\n }", "public Round getRound(){\n return mRound;\n }", "public void setTopLeftPadding(int roundImgPadding) {\n\t\tthis.mTopLeftPadding = roundImgPadding;\n\t}", "public static double nullToZero(Double d)\n {\n if(d == null)\n {\n return 0;\n }\n else\n {\n return d.doubleValue();\n }\n }", "private static String removeZeroDecimal(String s) {\r\n // Make sure to add check for existance of decimal sign to\r\n // prevent StringIndexOutOfBoundsException\r\n if (s.indexOf(\".\") != -1 && s.substring(s.indexOf(\".\"), s.length()).equals(\".0\"))\r\n s = s.replace(\".0\", \"\");\r\n return s;\r\n }", "@Test(expected = ArithmeticException.class)\n\tpublic void divisionByZeroTest() {\n\t\tMathOperation division = new Division();\n\t\tdivision.operator(TWENTY, ZERO);\n\t}", "public double t0() {\n\t\treturn 0;\n\t}" ]
[ "0.58268195", "0.57222813", "0.55645764", "0.5454309", "0.53932065", "0.5389639", "0.5321591", "0.5258297", "0.5234384", "0.52051085", "0.51751614", "0.5174799", "0.5150408", "0.51365066", "0.5121832", "0.51148266", "0.50872344", "0.50679636", "0.50441587", "0.5027279", "0.49750414", "0.49609083", "0.49608713", "0.49562114", "0.49552518", "0.49402332", "0.49286947", "0.4912878", "0.4912878", "0.4912811", "0.49068102", "0.48827335", "0.4863075", "0.485478", "0.48527542", "0.48466185", "0.48466104", "0.48233697", "0.48217988", "0.48072362", "0.47988787", "0.47987399", "0.47983626", "0.47702473", "0.4768001", "0.47595394", "0.47553384", "0.4732106", "0.472436", "0.47241968", "0.47088423", "0.47070608", "0.46967334", "0.46952957", "0.4691558", "0.468702", "0.4685638", "0.4683864", "0.4669702", "0.4664009", "0.46532527", "0.4640929", "0.4637439", "0.46284553", "0.46217135", "0.46200144", "0.4616882", "0.4603585", "0.4603552", "0.4588605", "0.45850566", "0.4578446", "0.4573689", "0.45708984", "0.45708588", "0.45669115", "0.45554313", "0.45527986", "0.45527986", "0.45384464", "0.45328543", "0.45320132", "0.4531506", "0.45212874", "0.4520731", "0.45206344", "0.45155406", "0.45137715", "0.45105577", "0.45022297", "0.45007834", "0.44982055", "0.4495063", "0.44948053", "0.44924238", "0.4483496", "0.44823638", "0.4481725", "0.44800648", "0.44792497" ]
0.8062155
0
Returns this executions initiators id
public String getInitiator() { return m_initiator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private long getInitId() {\n if (self.getQuorumVerifier().getVotingMembers().containsKey(self.getMyId())) {\n return self.getMyId();\n } else {\n return Long.MIN_VALUE;\n }\n }", "public UUID executionId();", "String getExecId();", "public int getExecutionInstance() {\n return executionInstance;\n }", "public String getExecId() {\n Object ref = execId_;\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 execId_ = s;\n }\n return s;\n }\n }", "UUID getInitiativeId();", "public String getExecId() {\n Object ref = execId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public Long getExecutorId() {\n return executorId;\n }", "public Long getExecutorId() {\n return executorId;\n }", "public com.google.protobuf.ByteString\n getExecIdBytes() {\n Object ref = execId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n execId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getExecIdBytes();", "String experimentId();", "public static int getIdcounter() {\n return idcounter;\n }", "public com.google.protobuf.ByteString\n getExecIdBytes() {\n Object ref = execId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n execId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long generateContainerId() {\n return this.containerIdCounter.incrementAndGet();\n }", "String getUniqueID();", "public String createUniqueScriptInstanceIdentifier() {\n\n\t\tLOGGER.debug(\"Creating a unique script instance identifier\");\n\n\t\t// generate a random name for the connection\n\t\tCalendar myCalendar = Calendar.getInstance();\n\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"yyyyMMddHHmmssS\");\n\t\tString scriptIdentifier = \"scriptInstance\"\n\t\t\t\t+ dateFormatter.format(myCalendar.getTime())\n\t\t\t\t+ randomNameSequence;\n\t\trandomNameSequence = randomNameSequence + 1;\n\n\t\tLOGGER.info(\"Generated unique script instance identifier [\"\n\t\t\t\t+ scriptIdentifier + \"]\");\n\n\t\treturn scriptIdentifier;\n\t}", "public int getUniqueID() { \n return -1;\n }", "protected int getUniqueID() {\n\t\treturn uniqueID;\n\t}", "public String getUniqueID();", "public InstanceConfigId getId() {\n return id;\n }", "public static String id()\n {\n return _id;\n }", "public static int getIdCounter() {\n return idCounter;\n }", "public String getIdentification() {\n return \"richfaces-selenium-script-id\" + this.javaScript.hashCode();\n }", "public Long getId() {\n\t\treturn EventHandlerClass.DEFAULT_ID;\n\t}", "public String getTestExecutionId() {\n return this.testExecutionId;\n }", "public String getInstId() {\r\n return instId;\r\n }", "public String getUniqueId() {\n return getCurrentInstance().getViewRoot().createUniqueId();\n }", "@ApiModelProperty(example = \"0\", value = \"User ID who started the Process\")\n public Long getProcessInstanceInitQuserId() {\n return processInstanceInitQuserId;\n }", "public String runId() {\n return this.runId;\n }", "public int generateId(){\n return repository.getCount()+1;\n }", "String getExecRefId();", "public Long[] getInitiatorIDs() { return this.initiatorIDs; }", "private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }", "public int id() {\r\n\t\treturn ID;\r\n\t}", "public String generateActivationId() {\n return UUID.randomUUID().toString();\n }", "public Integer getIdInstituicao() {\n\t\treturn idInstituicao;\n\t}", "int getIdInstance();", "String getInstanceID();", "public static int getCurrentId() {\n return currentId;\n }", "public int getId() {\n\t\t\treturn 0;\n\t\t}", "public String[] getInitiators() { return this.initiators; }", "public int getId() {\n\t\treturn config >> 8;\n\t}", "ExperimenterId getExperimenterId();", "public String getIDName() {\n return \"FailureIDGenerator\";\n }", "public int getId() {\n return instance.getId();\n }", "@Override\r\n public Serializable getRequiredSimulationId() {\r\n return this.m_func.getRequiredSimulationId();\r\n }", "int getLogId();", "String getCreatorId();", "public String getUniqueId() {\n\t\treturn m_serverName + \" - \" + m_userId + \" - \" + m_timestampMillisecs;\n\t}", "public Integer getsId() {\n return sId;\n }", "String getContentGeneratorId();", "public String getBaseId() {\n return baseId;\n }", "long getInstanceID();", "public int getCurrentServerId() {\n return currentServerId;\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public String getUniqueID() {\n return this.uniqueID;\n }", "public int getId() {\n return instance.getId();\n }", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "String getUniqueId();", "public int getIdRpcAttempt() {\n\t\t\treturn idRpcAttempt;\n\t\t}", "public int getID() {\n\t\treturn 0;\n\t}", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}", "public int getLoginId() {\n return loginId_;\n }", "public int getLoginId() {\n return loginId_;\n }", "public int getLoginId() {\n return loginId_;\n }", "public int getLoginId() {\n return loginId_;\n }", "public int getLoginId() {\n return loginId_;\n }", "public static int getNumeroId(){\r\n idConsecutivo++;\r\n return idConsecutivo;\r\n }", "public String uniqueId() {\n return this.uniqueId;\n }", "public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }", "public Builder setExecId(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n execId_ = value;\n onChanged();\n return this;\n }", "public int getUniqueId() {\r\n\t\treturn uniqueId;\r\n\t}", "public int getInstanceId(){\n\t\treturn this._instanceId;\n\t}", "public long getSequenceId()\n {\n return sequence_id_;\n }", "public String generateID() {\n return IDPREFIX + nextidint++;\n }", "public String getCredentialsId() {\n return settings.CredentialsId;\n }", "public String getId() {\n\t\treturn Integer.toString(this.hashCode());\n\t}", "public String getUniqueID ( ) { return _uniqueID; }", "public java.lang.Object getInitiatingResourceID() {\n return initiatingResourceID;\n }", "public int getId() {\n if (!this.registered)\n return -1;\n return id;\n }", "private synchronized int generateJobID() {\n\t\t/* generate JobID */\n\t\tint jobID = lastJobID;\n\t\tlastJobID += 1;\n\t\treturn jobID;\n\t}", "public Integer getLastUpdatorId() {\n return lastUpdatorId;\n }", "public long getExecutionForTest() throws IOException, URISyntaxException {\n ConnectionManager.refreshSession();\n executionCycleDOM = ConnectionManager.getTestExecutionForIssue(issue.getIdAsLong());\n executionId = executionCycleDOM.getIdByVersion(versionId);\n logger.info(\"EXECUTION ID : \" + executionId);\n return executionId;\n }", "@ApiModelProperty(value = \"Organization ID who started the Process\")\n public Long getProcessInstanceInitQgroupId() {\n return processInstanceInitQgroupId;\n }", "public String getMaternalID();", "static String getSessionId() {\n if (SESSION_ID == null) {\n // If there is no runtime value for SESSION_ID, try to load a\n // value from persistent store.\n SESSION_ID = Prefs.INSTANCE.getEventPlatformSessionId();\n\n if (SESSION_ID == null) {\n // If there is no value in the persistent store, generate a new value for\n // SESSION_ID, and write the update to the persistent store.\n SESSION_ID = generateRandomId();\n Prefs.INSTANCE.setEventPlatformSessionId(SESSION_ID);\n }\n }\n return SESSION_ID;\n }", "public String getIdGeneratorDatabaseUsername(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.username\");\n \t}", "private long getInitLastLoggedZxid() {\n if (self.getLearnerType() == LearnerType.PARTICIPANT) {\n return self.getLastLoggedZxid();\n } else {\n return Long.MIN_VALUE;\n }\n }", "public int getId() {\n // some code goes here\n int id = f.getAbsoluteFile().hashCode();\n //System.out.println(id);\n return id;\n }", "public int getID() {\n return graphConfig.getIndex();\n }", "public Long getBaseId() {\n return baseId;\n }", "public int getLastScrnSetId()\n\t{\n\t\treturn lastScrnSetId;\n\t}", "public int getAutorizacion_Id() {\n return autorizacion_Id;\n }" ]
[ "0.700159", "0.6442379", "0.6437566", "0.6070867", "0.59549826", "0.5944417", "0.59369326", "0.59069633", "0.59069633", "0.5854743", "0.58417386", "0.5800329", "0.5782637", "0.577817", "0.5768916", "0.5732986", "0.5709925", "0.56599694", "0.5652656", "0.56429636", "0.56390095", "0.55931544", "0.55871236", "0.5582636", "0.5578128", "0.5578027", "0.5577079", "0.5572879", "0.55574757", "0.5543271", "0.55431217", "0.5537731", "0.553572", "0.5529583", "0.551832", "0.55122286", "0.5507024", "0.55029017", "0.54804134", "0.5471712", "0.54702646", "0.54568326", "0.545042", "0.5448469", "0.544095", "0.5438512", "0.54307085", "0.5428569", "0.54233813", "0.54180443", "0.54104745", "0.54097795", "0.5408869", "0.5408508", "0.5404308", "0.5403856", "0.5403856", "0.5403856", "0.5403856", "0.5403856", "0.5403856", "0.5403856", "0.53904116", "0.5389992", "0.53859305", "0.5379755", "0.53736025", "0.53676224", "0.5359567", "0.5356987", "0.53550965", "0.53550965", "0.53550965", "0.53550965", "0.53550965", "0.535076", "0.5348835", "0.53460443", "0.5342821", "0.5337838", "0.533301", "0.5327331", "0.5326113", "0.5324444", "0.53235745", "0.53228337", "0.5320463", "0.5320248", "0.5320023", "0.53190845", "0.5318324", "0.5316845", "0.5316195", "0.5315892", "0.531236", "0.5310863", "0.53102785", "0.5301786", "0.52910936", "0.5288134", "0.5279554" ]
0.0
-1
Returns the PaxosInstance this execution belongs to
public PaxosInstance getPaxosInstance() { return m_paxosInstance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getExecutionInstance() {\n return executionInstance;\n }", "Execution getProcessInstance();", "public static final PikaxProcessor getInstance() {\n\t\tif (instance == null) {\n\t\t\treturn newInstance();\n\t\t}\n\t\treturn instance;\n\t}", "public PaxosExecution getExecution(PaxosMessage a_msg)\n {\n PaxosExecution result = (PaxosExecution) m_executions.get(a_msg.getInitiator());\n if (result == null)\n {\n error(\"Unknown PaxosExecution requested! (\" + a_msg.getInitiator()\n + \"), problably inconsistent InfoService\");\n }\n return result;\n }", "public ProcessInstance getCurrentProcessInstance() {\r\n return currentProcessInstance;\r\n }", "public Process getProcess()\n {\n return proc;\n }", "public static Process getProcess() {\r\n return (m_Proc);\r\n }", "public ContextInstance getContextInstance() {\n\t\treturn token.getProcessInstance().getContextInstance();\r\n\t}", "private @CheckForNull CpsFlowExecution getExecutionBlocking() {\n FlowExecutionOwner owner = ((FlowExecutionOwner.Executable) run).asFlowExecutionOwner();\n if (owner == null) {\n return null;\n }\n try {\n FlowExecution exec = owner.get();\n return exec instanceof CpsFlowExecution ? (CpsFlowExecution) exec : null;\n } catch (IOException ioe) {\n LOGGER.log(Level.WARNING, \"Error fetching execution for replay\", ioe);\n }\n return null;\n }", "public static SPSSDialog getCurrentInstance()\n\t{\n\t\treturn instance;\n\t}", "public static PostgresResultParameterProcessor getInstance() {\n return instance;\n }", "public static final IOpipeExecution currentExecution()\n\t{\n\t\tIOpipeExecution rv = IOpipeService.__execution();\n\t\tif (rv == null)\n\t\t\treturn new __NoOpExecution__(!IOpipeService._THAWED.get());\n\t\treturn rv;\n\t}", "public T getObjProcess() {\n return objProcess;\n }", "public Process getProcess(){\n\t\treturn p;\n\t}", "public T getInstance() {\n return instance;\n }", "public abstract Process getProcess();", "public WorkflowExecutionInfo getExecutionInfo() {\n return executionInfo;\n }", "public final Process getProcess() {\n return process;\n }", "public Object getOperatorInstance() {\n return operatorInstance;\n }", "Process getProcess() {\n return process;\n }", "public int getBaseInstance() {\n return baseInstance;\n }", "public int getBaseInstance() {\n return baseInstance;\n }", "public static ProcessInstance findProcessInstance(ActionContext ctx, long processInstanceId) throws Exception {\n\t\tUser user = (User) ctx.session().getAttribute(com.epm.acmi.struts.Constants.loggedUser);\n\n\t\tEPMHelper epmHelper = null;\n\t\tWFSession wfSession = null;\n\t\tProcessInstance pi = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tepmHelper = new EPMHelper();\n\t\t\twfSession = epmHelper.connectAsUser(user.getUserId(), user.getPassword());\n\t\t\t\n\t\t\tif (processInstanceId != -1)\n\t\t\t\tpi = WFObjectFactory.getProcessInstance(processInstanceId, wfSession);\t\n\t\t} finally\n\t\t{\n\t\t\tif (epmHelper != null)\n\t\t\t\tepmHelper.disconnect(wfSession);\n\t\t}\n\t\t\n\t\treturn pi;\n\t}", "public Process getProcess() {\n return this.process;\n }", "Process getProcess();", "public Process getCurrent(){\n\t\tProcess p = currentProcess;\n\t\tcurrentProcess = null;\n\t\tgui.setIoActive(null);\n\t\treturn p;\n\t}", "public static HeapMemory instance() {\n return theInstance;\n }", "public static Main getInstance() {\n return instance;\n }", "public Executor getExecutor() {\n return execution.getExecutor();\n }", "public static Executor getInstance() {\n Object object = sDirectExecutor;\n if (object != null) {\n return sDirectExecutor;\n }\n object = DirectExecutor.class;\n synchronized (object) {\n DirectExecutor directExecutor = sDirectExecutor;\n if (directExecutor == null) {\n sDirectExecutor = directExecutor = new DirectExecutor();\n }\n return sDirectExecutor;\n }\n }", "public static Main getInstance() {\r\n return instance;\r\n }", "public static ProcessRegistry getInstance() {\n return INSTANCE;\n }", "public Process getProcess() {\n\t\treturn process;\n\t}", "public Process getProcess() {\n \t\treturn process;\n \t}", "public Executor getExecutor() {\n Object o = getReference(\"ant.executor\");\n if (o == null) {\n String classname = getProperty(\"ant.executor.class\");\n if (classname == null) {\n classname = DefaultExecutor.class.getName();\n }\n log(\"Attempting to create object of type \" + classname, MSG_DEBUG);\n try {\n o = Class.forName(classname, true, coreLoader).newInstance();\n } catch (ClassNotFoundException seaEnEfEx) {\n //try the current classloader\n try {\n o = Class.forName(classname).newInstance();\n } catch (Exception ex) {\n log(ex.toString(), MSG_ERR);\n }\n } catch (Exception ex) {\n log(ex.toString(), MSG_ERR);\n }\n if (o == null) {\n throw new BuildException(\n \"Unable to obtain a Target Executor instance.\");\n }\n setExecutor((Executor) o);\n }\n return (Executor) o;\n }", "public static TaskManager getInstance()\n {\n return gInstance;\n }", "private @CheckForNull CpsFlowExecution getExecutionLazy() {\n FlowExecutionOwner owner = ((FlowExecutionOwner.Executable) run).asFlowExecutionOwner();\n if (owner == null) {\n return null;\n }\n FlowExecution exec = owner.getOrNull();\n return exec instanceof CpsFlowExecution ? (CpsFlowExecution) exec : null;\n }", "@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}", "public FlowNode getFlowNodeOfHasInstanceRelationship() {\n\t\treturn this.getHasInstanceRelationship().getNode();\n\t}", "public static InfoCommand getInstance(){\n\t return instance;\n\t}", "public java.util.List<SeriesInstance> getInstance() { \n\t\tif (myInstance == null) {\n\t\t\tmyInstance = new java.util.ArrayList<SeriesInstance>();\n\t\t}\n\t\treturn myInstance;\n\t}", "public PDDeviceNProcess getProcess() {\n/* 93 */ COSDictionary process = (COSDictionary)this.dictionary.getDictionaryObject(COSName.PROCESS);\n/* 94 */ if (process == null)\n/* */ {\n/* 96 */ return null;\n/* */ }\n/* 98 */ return new PDDeviceNProcess(process);\n/* */ }", "cn.infinivision.dataforce.busybee.pb.meta.Execution getExecution();", "public ServiceProcess getProcess() {\n\t\treturn this.process;\n\t}", "public com.sforce.soap.enterprise.QueryResult getProcessInstances() {\r\n return processInstances;\r\n }", "public ProcessInfo getResult()\n\t{\n\t\treturn m_pi;\n\t}", "public java.util.List<SeriesInstance> getInstanceElement() { \n\t\tif (myInstance == null) {\n\t\t\tmyInstance = new java.util.ArrayList<SeriesInstance>();\n\t\t}\n\t\treturn myInstance;\n\t}", "public List<ProcessInstance> getProcessInstances() {\r\n return this.processInstances;\r\n }", "public static SalesOrderDataSingleton getInstance()\n {\n // Return the instance\n return instance;\n }", "private ManufactureProcess getRunningManufactureProcess() {\n\t\tManufactureProcess result = null;\n\n\t\tint skillLevel = getEffectiveSkillLevel();\n\t\tIterator<ManufactureProcess> i = workshop.getProcesses().iterator();\n\t\twhile (i.hasNext() && (result == null)) {\n\t\t\tManufactureProcess process = i.next();\n\t\t\tif ((process.getInfo().getSkillLevelRequired() <= skillLevel) && (process.getWorkTimeRemaining() > 0D)) {\n\t\t\t\tresult = process;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n public T getInstance() {\n return instance;\n }", "public static Ontology getInstance() {\n return theInstance;\n }", "public static Ontology getInstance() {\n return theInstance;\n }", "public ContainerExec exec() {\n return this.exec;\n }", "public String getServicingOrderProcedureInstanceReference() {\n return servicingOrderProcedureInstanceReference;\n }", "public Task getTaskInstance() {\n\t\treturn taskInstance;\n\t}", "public Component getSelf(ExecutionCtrl exec);", "private QTP getQtpInstance() throws Exception {\n return (this.qtpInstance == null) ? new QTP() : this.qtpInstance;\n }", "public static Casino getInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tcreateInstance();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public static SingleObject getInstance(){\n return instance;\n }", "public static OI getInstance() {\n\t\treturn INSTANCE;\n\t}", "public Instance selectTestInstance() {\n\t\tInstance testInstance = new Instance(RF_testInstances.lastInstance());\n\t\t////System.out.println(\"-selecting last instance in test set RF_testInstances, done\");\n\n\t\t// Specify that the instance belong to the training set \n\t\t// in order to inherit from the set description \n\t\ttestInstance.setDataset(RF_trainingInstances);\n\t\t//System.out.println(\"-selected last instance in test set: \" + testInstance.toString() );\n\n\t\treturn testInstance;\n\t}", "public InternalServiceProcess getInternalServiceProcess();", "public org.omg.uml.behavioralelements.commonbehavior.Instance getInstance();", "public Executor getExecutor() {\n return executor;\n }", "MaximaProcess getProcess() {\r\n \t\trequestTimeHistory.add(System.currentTimeMillis());\r\n \r\n \t\t// Start a new one as we are going to take one...\r\n \t\tif (startupThrotle.availablePermits() > 0) {\r\n \t\t\tstartProcess();\r\n \t\t}\r\n \r\n \t\tMaximaProcess mp = null;\r\n \t\twhile (mp == null) {\r\n \t\t\ttry {\r\n \t\t\t\tmp = pool.take();\r\n \t\t\t} catch (InterruptedException e) {\r\n \t\t\t\t// If we failed to get one, wait a bit.\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t\ttry {\r\n \t\t\t\t\tThread.sleep(3);\r\n \t\t\t\t} catch (InterruptedException ee) {\r\n \t\t\t\t\tee.printStackTrace();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\tusedPool.add(mp);\r\n \t\tmp.activate();\r\n \r\n \t\treturn mp;\r\n \t}", "public Promocion getPromocion() {\n return promocion.get();\n }", "public static BESDyno getInstance() {\n if (instance == null) {\n instance = new BESDyno();\n }\n return instance;\n }", "public static SingleObject getInstance()\r\n {\r\n return instance;\r\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public WebDriver getDriverInstance() throws Exception {\n\t\tDesiredCapabilities caps = new DesiredCapabilities();\n\n\t\tString browser = (System.getProperty(\"browser\") != null\n\t\t\t\t&& !(System.getProperty(\"browser\").equals(\"${browser}\"))) ? (System.getProperty(\"browser\"))\n\t\t\t\t\t\t: (getConfiguration().getBrowserName());\n\t\tthis.browser = browser;\n\n\t\tbaseUrl = (System.getProperty(\"instanceUrl\") != null\n\t\t\t\t&& !(System.getProperty(\"instanceUrl\").equals(\"${instanceUrl}\"))) ? System.getProperty(\"instanceUrl\")\n\t\t\t\t\t\t: getConfiguration().getURL();\n\n\t\tboolean isBrowserStackExecution = (System.getProperty(\"isBrowserstackExecution\") != null\n\t\t\t\t&& !(System.getProperty(\"isBrowserstackExecution\").equals(\"${isBrowserstackExecution}\")))\n\t\t\t\t\t\t? (System.getProperty(\"isBrowserstackExecution\").equals(\"true\"))\n\t\t\t\t\t\t: getConfiguration().isBrowserStackExecution();\n\t\tSystem.out.println(\"Is Browser Stack execution: \" + System.getProperty(\"isBrowserstackExecution\") + \" : \"\n\t\t\t\t+ isBrowserStackExecution);\n\n\t\tboolean isRemoteExecution = (System.getProperty(\"isRemoteExecution\") != null\n\t\t\t\t&& !(System.getProperty(\"isRemoteExecution\").equals(\"${isRemoteExecution}\")))\n\t\t\t\t\t\t? (System.getProperty(\"isRemoteExecution\").equals(\"true\"))\n\t\t\t\t\t\t: getConfiguration().isRemoteExecution();\n\t\tSystem.out\n\t\t\t\t.println(\"Is Remote execution: \" + System.getProperty(\"isRemoteExecution\") + \" : \" + isRemoteExecution);\n\n\t\tif (isBrowserStackExecution) {\n\t\t\tString browserVersion, os, osVersion, platform, device, browserStackUserName = \"\", browserStackAuthKey = \"\",\n\t\t\t\t\tisEmulator = \"false\";\n\n\t\t\tif (System.getProperty(\"isJenkinsJob\") != null && System.getProperty(\"isJenkinsJob\").equals(\"true\")) {\n\t\t\t\t// isBrowserStackExecution=((System.getProperty(\"isBrowserstackExecution\")!=null)&&(System.getProperty(\"isBrowserstackExecution\").equals(\"true\")));\n\t\t\t\tReporter.log(\"starting from is jenkins job\", true);\n\t\t\t\tbaseUrl = System.getProperty(\"instanceUrl\");\n\t\t\t\tReporter.log(baseUrl + \"\", true);\n\n\t\t\t\tbrowserVersion = System.getProperty(\"browserVersion\");\n\t\t\t\tReporter.log(browserVersion + \"\", true);\n\n\t\t\t\tos = System.getProperty(\"os\");\n\t\t\t\t;\n\t\t\t\tReporter.log(os + \"\", true);\n\n\t\t\t\tosVersion = System.getProperty(\"osVersion\");\n\t\t\t\tReporter.log(osVersion + \"\", true);\n\n\t\t\t\tplatform = System.getProperty(\"platform\");\n\t\t\t\tReporter.log(platform + \"\", true);\n\n\t\t\t\tdevice = System.getProperty(\"device\");\n\t\t\t\tReporter.log(device + \"\", true);\n\n\t\t\t\tbrowser = System.getProperty(\"browser\");\n\t\t\t\tReporter.log(browser + \"\", true);\n\n\t\t\t\tbrowserStackUserName = System.getProperty(\"broswerStackUserName\").trim();\n\t\t\t\tReporter.log(browserStackUserName + \"\", true);\n\n\t\t\t\tbrowserStackAuthKey = System.getProperty(\"broswerStackAuthKey\").trim();\n\t\t\t\tReporter.log(browserStackAuthKey + \"\", true);\n\n\t\t\t\tisEmulator = System.getProperty(\"isEmulator\").trim();\n\t\t\t\tReporter.log(isEmulator + \"\", true);\n\n\t\t\t\tReporter.log(\"stopping from is jenkins job\", true);\n\t\t\t} else {\n\n\t\t\t\tbrowserVersion = (System.getProperty(\"browserVersion\") != null\n\t\t\t\t\t\t&& !(System.getProperty(\"browserVersion\").equals(\"${browserVersion}\")))\n\t\t\t\t\t\t\t\t? (System.getProperty(\"browserVersion\"))\n\t\t\t\t\t\t\t\t: getConfiguration().getBrowserStackBrowserVersion();\n\t\t\t\tos = getConfiguration().getBrowserStackOS();\n\t\t\t\tosVersion = getConfiguration().getBrowserStackOSVersion();\n\t\t\t\tplatform = getConfiguration().getBrowserStackPlatform();\n\t\t\t\tdevice = getConfiguration().getBrowserStackDevice();\n\t\t\t\tisEmulator = getConfiguration().getBrowserStackIsEmulator();\n\t\t\t}\n\n\t\t\tif (browser.equalsIgnoreCase(\"IE\")) {\n\t\t\t\tcaps.setCapability(\"browser\", \"IE\");\n\t\t\t} else if (browser.equalsIgnoreCase(\"GCH\") || browser.equalsIgnoreCase(\"chrome\")) {\n\t\t\t\tcaps.setCapability(\"browser\", \"Chrome\");\n\t\t\t} else if (browser.equalsIgnoreCase(\"safari\")) {\n\t\t\t\tcaps.setCapability(\"browser\", \"Safari\");\n\t\t\t} else if (browser.equalsIgnoreCase(\"android\") || browser.equalsIgnoreCase(\"iphone\")\n\t\t\t\t\t|| browser.equalsIgnoreCase(\"ipad\")) {\n\t\t\t\tcaps.setCapability(\"browserName\", browser);\n\t\t\t\tcaps.setCapability(\"platform\", platform);\n\t\t\t\tcaps.setCapability(\"device\", device);\n\t\t\t\tif (isEmulator.equals(\"true\")) {\n\t\t\t\t\tcaps.setCapability(\"emulator\", isEmulator);\n\t\t\t\t}\n\t\t\t\tcaps.setCapability(\"autoAcceptAlerts\", \"true\");\n\t\t\t} else {\n\t\t\t\tcaps.setCapability(\"browser\", \"Firefox\");\n\t\t\t}\n\t\t\tif (!(browser.equalsIgnoreCase(\"android\"))) {\n\t\t\t\tif (browserVersion != null && !browserVersion.equals(\"\") && !browserVersion.equals(\"latest\")) {\n\t\t\t\t\tcaps.setCapability(\"browser_version\", browserVersion);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (osVersion != null && !(browser.equalsIgnoreCase(\"android\"))) {\n\t\t\t\tcaps.setCapability(\"os\", os);\n\t\t\t\tif (os.toLowerCase().startsWith(\"win\")) {\n\t\t\t\t\tcaps.setCapability(\"os\", \"Windows\");\n\t\t\t\t} else if (os.toLowerCase().startsWith(\"mac-\") || os.toLowerCase().startsWith(\"os x-\")) {\n\t\t\t\t\tcaps.setCapability(\"os\", \"OS X\");\n\t\t\t\t}\n\n\t\t\t\tif (os.equalsIgnoreCase(\"win7\")) {\n\t\t\t\t\tosVersion = \"7\";\n\t\t\t\t} else if (os.equalsIgnoreCase(\"win8\")) {\n\t\t\t\t\tosVersion = \"8\";\n\t\t\t\t} else if (os.equalsIgnoreCase(\"win8.1\") || os.equalsIgnoreCase(\"win8_1\")) {\n\t\t\t\t\tosVersion = \"8.1\";\n\t\t\t\t} else if (os.toLowerCase().startsWith(\"mac-\") || os.toLowerCase().startsWith(\"os x-\")) {\n\t\t\t\t\tosVersion = os.split(\"-\")[1];\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"OS Version:\" + osVersion);\n\t\t\t\tcaps.setCapability(\"os_version\", osVersion);\n\t\t\t}\n\t\t\tcaps.setCapability(\"resolution\", \"1920x1080\");\n\t\t\tcaps.setCapability(\"browserstack.debug\", \"true\");\n\n\t\t\tSystem.out.println(\"AppLibrary Build: \" + System.getProperty(\"Build\"));\n\t\t\tSystem.out.println(\"AppLibrary Project: \" + System.getProperty(\"Suite\"));\n\t\t\tSystem.out.println(\"AppLibrary Name: \" + currentTestName);\n\t\t\tcaps.setCapability(\"build\", System.getProperty(\"Build\"));\n\t\t\tcaps.setCapability(\"project\", System.getProperty(\"Suite\"));\n\t\t\tcaps.setCapability(\"name\", currentTestName);\n\n\t\t\ttry {\n\t\t\t\tdriver = new RemoteWebDriver(new URL(\"http://\"\n\t\t\t\t\t\t+ (browserStackUserName.equals(\"\") ? getConfiguration().getBrowserStackUserName()\n\t\t\t\t\t\t\t\t: browserStackUserName)\n\t\t\t\t\t\t+ \":\" + (browserStackAuthKey.equals(\"\") ? getConfiguration().getBrowserStackAuthKey()\n\t\t\t\t\t\t\t\t: browserStackAuthKey)\n\t\t\t\t\t\t+ \"@hub.browserstack.com/wd/hub\"), caps);\n\t\t\t\t((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector());\n\t\t\t} catch (Exception e) {\n\t\t\t\tReporter.log(\"Issue creating new driver instance due to following error: \" + e.getMessage() + \"\\n\"\n\t\t\t\t\t\t+ e.getStackTrace(), true);\n\t\t\t\tthrow e;\n\t\t\t}\n\n\t\t\tcurrentSessionID = ((RemoteWebDriver) driver).getSessionId().toString();\n\n\t\t} else if (isRemoteExecution) {\n\t\t\tSystem.out.println(\"Remote execution set up\");\n\t\t\tString remoteGridUrl = (System.getProperty(\"remoteGridUrl\") != null\n\t\t\t\t\t&& !(System.getProperty(\"remoteGridUrl\").equals(\"${remoteGridUrl}\")))\n\t\t\t\t\t\t\t? (System.getProperty(\"remoteGridUrl\"))\n\t\t\t\t\t\t\t: getConfiguration().getRemoteGridUrl();\n\t\t\tString os = (System.getProperty(\"os\") != null && !(System.getProperty(\"os\").equals(\"${os}\")))\n\t\t\t\t\t? (System.getProperty(\"os\"))\n\t\t\t\t\t: getConfiguration().getOS();\n\t\t\tString deviceName = (System.getProperty(\"deviceName\") != null\n\t\t\t\t\t&& !(System.getProperty(\"deviceName\").equals(\"${deviceName}\"))) ? (System.getProperty(\"deviceName\"))\n\t\t\t\t\t\t\t: getConfiguration().getDeviceName();\n\t\t\tString deviceVersion = (System.getProperty(\"deviceVersion\") != null\n\t\t\t\t\t&& !(System.getProperty(\"deviceVersion\").equals(\"${deviceVersion}\")))\n\t\t\t\t\t\t\t? (System.getProperty(\"deviceVersion\"))\n\t\t\t\t\t\t\t: getConfiguration().getDeviceVersion();\n\t\t\tString version = (System.getProperty(\"browserVersion\") != null\n\t\t\t\t\t&& !(System.getProperty(\"browserVersion\").equals(\"${browserVersion}\")))\n\t\t\t\t\t\t\t? (System.getProperty(\"browserVersion\"))\n\t\t\t\t\t\t\t: getConfiguration().getBrowserVersion();\n\t\t\tbrowser = (browser.equalsIgnoreCase(\"ie\") || browser.equalsIgnoreCase(\"internet explorer\")\n\t\t\t\t\t|| browser.equalsIgnoreCase(\"iexplore\")) ? \"internet explorer\" : browser;\n\t\t\tcaps.setBrowserName(browser.toLowerCase());\n\n\t\t\tif (os.equalsIgnoreCase(\"win7\") || os.equalsIgnoreCase(\"vista\")) {\n\t\t\t\tcaps.setPlatform(Platform.VISTA);\n\t\t\t} else if (os.equalsIgnoreCase(\"win8\")) {\n\t\t\t\tcaps.setPlatform(Platform.WIN8);\n\t\t\t} else if (os.equalsIgnoreCase(\"win8.1\") || os.equalsIgnoreCase(\"win8_1\")) {\n\t\t\t\tcaps.setPlatform(Platform.WIN8_1);\n\t\t\t} else if (os.equalsIgnoreCase(\"mac\")) {\n\t\t\t\tcaps.setPlatform(Platform.MAC);\n\t\t\t} else if (os.equalsIgnoreCase(\"android\")) {\n\t\t\t\tcaps.setCapability(\"platformName\", \"ANDROID\");\n\t\t\t\tcaps.setBrowserName(StringUtils.capitalize(browser.toLowerCase()));\n\t\t\t\tcaps.setCapability(\"deviceName\", deviceName);\n\t\t\t\tcaps.setCapability(\"platformVersion\", deviceVersion);\n\t\t\t} else if (os.equalsIgnoreCase(\"ios\")) {\n\t\t\t\tcaps.setCapability(\"platformName\", \"iOS\");\n\t\t\t\tcaps.setCapability(\"deviceName\", deviceName);\n\t\t\t\tcaps.setCapability(\"platformVersion\", deviceVersion);\n\t\t\t\tif (browser.equalsIgnoreCase(\"safari\")) {\n\t\t\t\t\tcaps.setBrowserName(\"Safari\");\n\t\t\t\t} else {\n\t\t\t\t\tcaps.setCapability(\"app\", \"safari\");\n\t\t\t\t\tcaps.setBrowserName(\"iPhone\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcaps.setPlatform(Platform.ANY);\n\t\t\t}\n\n\t\t\tif (version != null && !(version.equalsIgnoreCase(\"\") && !(version.equalsIgnoreCase(\"null\")))) {\n\t\t\t\t// caps.setVersion(version);\n\t\t\t}\n\t\t\tSystem.out.println(caps.asMap());\n\t\t\tdriver = new RemoteWebDriver(new URL(remoteGridUrl), caps);\n\t\t\t((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector());\n\t\t\tSystem.out.println(\"Session ID: \" + ((RemoteWebDriver) driver).getSessionId());\n\t\t} else {\n\t\t\tif (browser.equalsIgnoreCase(\"IE\")) {\n\t\t\t\tString driverPath = getConfiguration().getIEDriverPath();\n\t\t\t\tif ((driverPath == null) || (driverPath.trim().length() == 0)) {\n\t\t\t\t\tdriverPath = \"IEDriverServer.exe\";\n\t\t\t\t}\n\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\", driverPath);\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n\t\t\t\t\t\tfalse);\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, false);\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, true);\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.IGNORE_ZOOM_SETTING, true);\n\t\t\t\tdriver = new InternetExplorerDriver(capabilities);\n\n\t\t\t} else if (browser.equalsIgnoreCase(\"GCH\") || browser.equalsIgnoreCase(\"chrome\")) {\n\t\t\t\tString driverPath = getConfiguration().getChromeDriverPath();\n\t\t\t\tif ((driverPath == null) || (driverPath.trim().length() == 0)) {\n\t\t\t\t\tdriverPath = \"chromedriver.exe\";\n\t\t\t\t}\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverPath);\n\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\toptions.addArguments(\"--test-type\");\n\t\t\t\toptions.addArguments(\"chrome.switches\", \"--disable-extensions\");\n\t\t\t\toptions.addArguments(\"start-maximized\");\n\t\t\t\tdriver = new ChromeDriver();\n\t\t\t} else if (browser.equalsIgnoreCase(\"safari\")) {\n\t\t\t\tdriver = new SafariDriver();\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tSystem.setProperty(\"webdriver.firefox.profile\", \"default\");\n\t\t\t\tdriver = new FirefoxDriver();\n\t\t\t}\n\n\t\t}\n\n\t\tdriver.manage().timeouts().implicitlyWait(GLOBALTIMEOUT, TimeUnit.SECONDS);\n\t\t// isExecutionOnMobile = this.browser.equalsIgnoreCase(\"iPhone\") ||\n\t\t// this.browser.equalsIgnoreCase(\"android\");\n\t\t// if (!isExecutionOnMobile) {\n\t\t// driver.manage().window().maximize();\n\t\t// }\n\t\treturn driver;\n\n\t}", "protected PObject createIndependentObject() {\n return createIndependentObjects(1).get(0);\n }", "public int getId() {\n return instance.getId();\n }", "public static IRuntime getRuntime() {\n return SchedulableProcess.runtime.get();\n }", "public ProcessProvider getComponent() {\n return component;\n }", "public ExecutionType executionType() {\n return this.executionType;\n }", "public SeriesInstance getInstanceFirstRep() {\n\t\tif (getInstance().isEmpty()) {\n\t\t\treturn addInstance();\n\t\t}\n\t\treturn getInstance().get(0); \n\t}", "public WorkflowExecutionConfiguration getExecutionConfiguration() {\n return executionConfiguration;\n }", "public static Partie getInstance() {\r\n\t\tif(instance==null) {\r\n\t\t\tinitInstance(2, 2);\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public static ToolRegistery getInstance(){\n\t\treturn InstanceKeeper.instance;\n\t}", "public ExecutionManager getManager() {\n return manager;\n }", "static OpenSamlImplementation getInstance() {\n\t\treturn instance;\n\t}", "public static VMWrap current() throws IOException {\n\t\t// Get pid of self process\n\t\tString name = ManagementFactory.getRuntimeMXBean().getName();\n\t\tString pid = name.substring(0, name.indexOf('@'));\n\t\treturn process(pid);\n\t}", "public UUID instanceId() {\n return this.instanceId;\n }", "public static synchronized ChoseActivity getInstance() {\n return mInstance;\n }", "private static ExecutionService getInstance() {\r\n\t\treturn \r\n\t\t\t\tnew ExecutionService() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void buy(String security, double price, int volume) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(\"buy is\"+price+volume);\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void sell(String security, double price, int volume) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(\"sell is\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t};\r\n\t}", "protected abstract Executable getExecutable();", "public static MiBancoOperacional getInstance(Context context) {\n if(instance == null) {\n instance = new MiBancoOperacional(context);\n }\n return instance;\n }", "public ServerInstance getServerInstance() {\n return serverInstance;\n }", "public Object getObject() {\n return getObject(null);\n }", "public int getId() {\n return instance.getId();\n }", "public java.lang.String getEXECUTION()\n {\n \n return __EXECUTION;\n }", "int getIdInstance();", "public static IndicieSeznam getInstance() {\n\n return ourInstance;\n }" ]
[ "0.70904785", "0.65914637", "0.6510925", "0.61428505", "0.6004738", "0.5851339", "0.58500415", "0.58262986", "0.5734824", "0.5713195", "0.5699949", "0.56986535", "0.56878704", "0.5678086", "0.5655324", "0.56115335", "0.5595351", "0.5588178", "0.55842304", "0.5574621", "0.55399626", "0.55399626", "0.55261225", "0.5494732", "0.54931843", "0.54841995", "0.54811954", "0.54809076", "0.54783696", "0.5473046", "0.5441474", "0.5433237", "0.5431851", "0.5401329", "0.5376671", "0.53622", "0.53479344", "0.53130287", "0.53087205", "0.5287698", "0.5279652", "0.52787834", "0.5248834", "0.5245695", "0.52456766", "0.5240804", "0.5237672", "0.5227138", "0.52167594", "0.52157855", "0.5211486", "0.52111584", "0.52111584", "0.52110577", "0.5205652", "0.5205483", "0.5200955", "0.5183543", "0.518224", "0.5180476", "0.5168952", "0.5163716", "0.5158614", "0.51549596", "0.5148385", "0.514489", "0.5144442", "0.51256007", "0.5120309", "0.5109435", "0.5109435", "0.5109435", "0.5109435", "0.5109435", "0.5109435", "0.5109435", "0.5105597", "0.51047146", "0.5104285", "0.5100489", "0.5098931", "0.50979775", "0.50965405", "0.5094454", "0.50911355", "0.5085126", "0.5077282", "0.50681084", "0.50616485", "0.5061448", "0.5057857", "0.5054337", "0.50536394", "0.5047519", "0.50457555", "0.50412464", "0.5039604", "0.5038301", "0.5037222", "0.5029188" ]
0.73362964
0
Aborts all active rounds
public void cancel() { Enumeration en = m_rounds.keys(); while (en.hasMoreElements()) { PaxosRound tmp = (PaxosRound) m_rounds.get(en.nextElement()); tmp.abort(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void abort() {\n isAborted = true;\n cancelCommands();\n cancel(true);\n }", "public synchronized void abort() {\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}", "public void stopGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tif(this.round == 0)\r\n\t\t{\r\n\t\t\t++this.round;\r\n\t\t}\r\n\t}", "public void abort() throws StreamingException, TxnBatchFailure, InterruptedException {\n synchronized (txnBatchLock) {\n abortTxn();\n nextTxn(true); // roll to next\n }\n }", "private void abortTxn() throws InterruptedException {\n LOG.info(\"Aborting Txn id {} on End Point {}\", txnBatch.getCurrentTxnId(), endPoint);\n try {\n callWithTimeout(new CallRunner<Void>() {\n @Override\n public Void call() throws StreamingException, InterruptedException {\n txnBatch.abort(); // could block\n return null;\n }\n });\n } catch (InterruptedException e) {\n throw e;\n } catch (TimeoutException e) {\n LOG.warn(\"Timeout while aborting Txn \" + txnBatch.getCurrentTxnId() + \" on EndPoint: \" + endPoint, e);\n } catch (Exception e) {\n LOG.warn(\"Error aborting Txn \" + txnBatch.getCurrentTxnId() + \" on EndPoint: \" + endPoint, e);\n // Suppressing exceptions as we don't care for errors on abort\n }\n }", "@Override\n public void abort() { \n abortFlag = true ;\n }", "void cancelAllSimulations(String jobId);", "void cancelStaleSimulations();", "public void endRound() {\n if (!myTurn()) {\n return;\n }\n if (this.board.getWinners().size() > 0 && this.playerId == board.getPlayers().get(board.getPlayers().size() - 1).playerId) {\n this.board.setRunning(false);\n }\n // currentPlayerNumber = (currentPlayerNumber + 1) % players.size();\n // current = players.get(currentPlayerNumber);\n this.removableBlockades = new ArrayList<>();\n coins = (float) 0;\n bought = false;\n specialAction.setDraw(0);\n specialAction.setRemove(0);\n specialAction.setSteal(0);\n history = new ArrayList<>();\n //for (int i = tmpDiscardPile.size(); i > 0; i--){\n // discardPile.add(tmpDiscardPile.remove(0));\n //}\n discardPile.addAll(tmpDiscardPile);\n tmpDiscardPile = new ArrayList<Card>();\n draw();\n board.endRound();\n }", "void abort() {\n\n // Revision number = 0 indicates an aborted transaction.\n this.targetRevisionNumber.set( 0L );\n\n // Clean up aborted revisions ...\n for ( AbstractVersionedItem versionedItem : this.versionedItemsWritten ) {\n versionedItem.removeAbortedRevision();\n }\n\n this.versionedItemsRead.clear();\n this.versionedItemsWritten.clear();\n\n // Trigger any clean up that is possible from no longer needing our source version.\n this.cleanUpOlderRevisions();\n\n }", "public void cancelAllRequests() {\n mPwsClient.cancelAllRequests();\n }", "public void _cancelAllRequests() throws Open4GLException\n {\n m_QuarixProgressOOConnectorImpl._cancelAllRequests();\n }", "public synchronized void cancel() {\n }", "void concludeRound() {\n\n ArrayList<Card> currentTopCards = getCurrentTopCards();\n transferCards(roundWinner, currentTopCards);\n eliminatePlayers();\n\n logger.log(\"Communal Deck: \" + deck);\n logger.log(divider);\n for (Player player : players) {\n logger.log(\"Hand: \" + player);\n }\n\n logger.log(\"Round complete.\");\n\n setGameState(GameState.ROUND_COMPLETE);\n }", "private void cancel() {\n recoTransaction.cancel();\n }", "public void cancelAll() {\n this.disposables.dispose();\n }", "protected void abortScheduledTasks() {\r\n\r\n\t\tfor (ParallelTask<?> task : scheduledSubtasks) {\r\n\t\t\ttask.cancel();\r\n\t\t}\r\n\r\n\t\tscheduledSubtasks.clear();\r\n\t}", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "@Override\n public void reset() {\n cancelAll();\n }", "public void abort() {\n reservedSpace.clear();\n this.abortRequested = true;\n stop();\n }", "public void endRound() {\n\t\tif (roundNumber>maxRounds) {\n\t\t\tSystem.out.println(\"hae �etta er MAX ROUNDS! LEIKUR �TTI A� VERA B�INN\");\n\t\t\tendGame();\n\t\t} else {\n\t\t\tSystem.out.println(\"�ETTA er r�tt leikur er ekki b�inn round: \"+ getCurrentRound());\n\t\t\tmatchResults = core.simulateNextRound();\n\t\t\tSystem.out.println(\"B�INN A� SIMULATA ROUND \");\n\t\t\tFootballPlayer[] players = core.getAllFootballPlayers();\n\t\t\tfor (int i = 0; i<players.length; i++) {\n\t\t\t\tStatistics[] stats = players[i].getStats();\n\t\t\t\tSystem.out.println(players[i].getName() + \" \" + stats[1].getGoals());\n\t\t\t}\n\t\t\tcalculatePoints();\n\t\t\troundNumber++;\n\t\t}\n\t\tusers.get(0).setTransferFinished(false);\n\t\tusers.get(1).setTransferFinished(false);\n\t}", "void cancelProduction();", "public void cancelAllClients(){\n clientsPool.shutdownNow();\n }", "private void cancel() {\n\t\tfinish();\n\t}", "public void cancel() {\n\t}", "public void abortSimulation() {\n while(movingMonitorThread.isAlive()) {\n movingMonitorThread.interrupt();\n try {\n Thread.currentThread().sleep(50);\n } catch (InterruptedException e) {\n throw new SimulationAbortError(e);\n }\n }\n\n while(threadGroup.activeCount() > 0) {\n threadGroup.interrupt();\n try {\n Thread.currentThread().sleep(50);\n } catch (InterruptedException e) {\n throw new SimulationAbortError(e);\n }\n }\n\n agents.clear();\n SynchronizedAgent.clear();\n\tvertexAgentsNumber.clear();\n }", "public void cancel() {\n\t\tcancel(false);\n\t}", "public void aborted() {\n System.out.println(\"Aborted\");\n }", "@Override\n public void abort() {\n giocoinesecuzione = null;\n }", "private void abortTransformations() {\n for (Integer num : this.mTransformedViews.keySet()) {\n TransformState currentState = getCurrentState(num.intValue());\n if (currentState != null) {\n currentState.abortTransformation();\n currentState.recycle();\n }\n }\n }", "private void abortOrder() {\n OrderDataService.cancelOrder(eventUid, isMarkedSeats, order);\n\n String orderInvalidMessage = \"שים לב! לא נותרו כרטיסים בכמות שבחרת. במידה ולא אזלו הכרטיסים, נסה שוב\";\n Toast.makeText(PaymentActivity.this, orderInvalidMessage, Toast.LENGTH_LONG).show();\n final Intent detailActivityIntent = new Intent(this, EventDetailsActivity.class);\n detailActivityIntent.putExtra(\"eventUid\", eventUid);\n\n // Send user back to event details activity after toast was shown for long enough\n Thread thread = new Thread(){\n @Override\n public void run() {\n try {\n Thread.sleep(2500);\n startActivity(detailActivityIntent);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n };\n\n thread.start();\n }", "@Test\n public void abortAllPendingSisImportsTest() {\n String accountId = null;\n // Boolean response = api.abortAllPendingSisImports(accountId);\n\n // TODO: test validations\n }", "public void tryCancelAllElections() {\n if (zkClient.isClosed()) {\n return;\n }\n Collection<ElectionContext> values = electionContexts.values();\n synchronized (electionContexts) {\n values.forEach(\n context -> {\n try {\n context.cancelElection();\n context.close();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n } catch (KeeperException e) {\n log.warn(\"Error on cancelling elections of {}\", context.leaderPath, e);\n }\n });\n }\n }", "public void cancel() {\n requestQueue.cancelAll(CURRENT_SHOPLIST_TAG);\n }", "public void cancel() {\n\t\tinterrupt();\n\t}", "public void cancel(){\n cancelled = true;\n }", "public void cancel(){\n\t\tstartTime = -1;\n\t\tplayersFinished = new ArrayList<>();\n\t\tplayersFinishedMarked = new ArrayList<Player>();\n\t\tDNFs = new ArrayList<>();\n\t\ttempNumber = 0;\n\t\tmarkedNum = 0;\n\t\t//normally we'd mark started racers as such, but we are don't know how many started.\n\t}", "@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "public synchronized void abort(int trxnId)\n {\n ResourceManager rm;\n for (Enumeration e = transactionTouch.keys(); e.hasMoreElements();) {\n rm = (ResourceManager)e.nextElement();\n try {\n rm.abort(trxnId);\n } catch (Exception x)\n {\n System.out.println(\"EXCEPTION:\");\n System.out.println(x.getMessage());\n x.printStackTrace();\n }\n }\n transactionTouch.remove(trxnId);\n lm.UnlockAll(trxnId);\n }", "public void cancelAll() {\n terminateScheduleTask();\n for (CancellableCommand request : outstandingRequests) {\n request.onCancelled();\n }\n outstandingRequests.clear();\n }", "public void cancelAllImages() {\n int size = currentImageRequests.size();\n for (int i = 0; i < size; i++) {\n currentImageRequests.valueAt(i).cancel();\n }\n }", "public void cancel() {\n\t\tcancelled = true;\n\t}", "public void cancel()\n\t{\n\t}", "public boolean cancel();", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n\tpublic void stateMachineAbort() {\n\t}", "@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void abort(Executor executor) throws SQLException {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void cancel() {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "void abortChallenge();", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n }", "public void cancel() {\n target.setAllowFlight(false);\n target.setWalkSpeed(0.01F);\n target.setFlySpeed(0.01F);\n targets.remove(target);\n\n JavaUtils.broadcastStage(\"done\",this);\n }", "protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }", "public void incrementAbortedTrades() {\n abortedTrades++;\n }", "@Override\n public void abort(RuntimeStep exe) {\n }", "@Override\n\tpublic void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {\n\t}", "void cancelOriginal();", "public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}", "private void cancelTasks() {\n\t\ttimer.cancel();\n\t\ttimer.purge();\n\t}", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n }", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void abortOptimizedBurstShot() {\n this.mCameraDevice.abortBurstShot();\n if (1 != this.mAppController.getSupportedHardwarelevel(this.mCameraId)) {\n lightlyRestartPreview();\n }\n }", "@Override\n\tpublic void cancelTransaction() {\n\t\t\n\t}", "public abstract boolean cancel();", "public void endGame()\r\n {\r\n for (Cell c : gameBoard.bombList)\r\n {\r\n if (c.isBomb())\r\n {\r\n if (c.getText() == \"X\")\r\n {\r\n c.setId(\"correctFlag\");\r\n }\r\n else\r\n {\r\n c.setId(\"bombClicked\");\r\n }\r\n }\r\n else if (c.getText() == \"X\")\r\n {\r\n c.setId(\"incorrectFlag\");\r\n }\r\n c.setDisable(true);\r\n }\r\n if (gameBoard.emptyRemaining == 0)\r\n {\r\n win();\r\n }\r\n else\r\n {\r\n lose();\r\n }\r\n System.out.println(\"Game Over...\");\r\n scoreBoard.resetBtn.setDisable(false);\r\n }", "@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "public void cancel() {\n btCancel().push();\n }", "private void cancelFetch() {\n cancelOperation(QUERY_NEW_CALLS_TOKEN);\n cancelOperation(QUERY_OLD_CALLS_TOKEN);\n }", "public void cancel();", "public void cancelTrip() {\n\t\n\t\t// TODO - fill in here\n\t\tIntent intent = new Intent();\n\t\tsetResult(RESULT_CANCELED,intent);\n\t\tfinish();\n\t}", "private static void doWeTerminate() {\n if(nrOfResults == nrOfWorks){\n //clear this round\n nrOfWorks = 0;\n nrOfResults = 0;\n finished = true;\n return;\n }\n }", "protected void end() {\n\t\tcrossLine.cancel();\n\t\tapproachSwitch.cancel();\n\t\tdriveToSwitch.cancel();\n\t\tdriveToScale.cancel();\n\t\tapproachScale.cancel();\n\t\tturnTowardsSwitchOrScale.cancel();\n\t\t\n\t\tdrivetrain.stop();\n\t}", "public void abort() throws IOException;", "public static void cancelPendingOperations()\n {\n DELEGATE.cancelPendingOperations();\n }", "public void quitGame() {\n\t\tif (this.status == GameStatus.quit) throw new GameNotInProgressException(\"Cannot quit a game that has already been quit.\");\n \tboard.quit();\n \tupdateStatus();\n }", "private void cancelAllTasks() {\n if(artistTask != null) {\n artistTask.cancel(true);\n artistTask = null;\n }\n }", "public void cancel() {\n this.currentCompactedKVs = this.totalCompactingKVs = 0;\n }" ]
[ "0.6712838", "0.65581936", "0.65374124", "0.64106065", "0.6363701", "0.634371", "0.62770146", "0.62466353", "0.6244759", "0.6199459", "0.61689806", "0.6164067", "0.614501", "0.61320794", "0.6101712", "0.60876024", "0.60652167", "0.6054831", "0.6054831", "0.6054831", "0.6054831", "0.6054831", "0.6054831", "0.6033314", "0.60232425", "0.6016416", "0.6007722", "0.5980939", "0.59654766", "0.59618026", "0.5945507", "0.5931028", "0.5915781", "0.5915062", "0.5898342", "0.5889921", "0.5888749", "0.5887283", "0.5882021", "0.58734536", "0.5873164", "0.58599377", "0.58552325", "0.5848398", "0.58458245", "0.58408487", "0.5821333", "0.5820891", "0.5817383", "0.581541", "0.5812167", "0.5812167", "0.5812167", "0.5812167", "0.58104634", "0.58104634", "0.58104634", "0.58104634", "0.58104634", "0.5805698", "0.5805698", "0.5805698", "0.5801943", "0.57797956", "0.5746086", "0.57424796", "0.5741544", "0.57309234", "0.57096916", "0.57088983", "0.5708074", "0.5706422", "0.5704047", "0.5696264", "0.56956965", "0.5687113", "0.56829846", "0.56800574", "0.56773704", "0.5673257", "0.56608796", "0.56608796", "0.56608796", "0.56560034", "0.56496596", "0.5619437", "0.56066847", "0.5580093", "0.55752146", "0.5563432", "0.5562485", "0.5556485", "0.5554078", "0.55510396", "0.5550667", "0.5537034", "0.5535877", "0.5529528", "0.5529158", "0.5524266" ]
0.7865504
0
Decides the given proposal for this execution
public void decide(String a_proposal) { this.m_paxosInstance.addDecision(this.getInitiator(), a_proposal); m_decided = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProposal() {\n return proposal;\n }", "private ClaimOrConcession(int proposal) {\n this.proposal = proposal;\n }", "public void setProposalNo(java.lang.String proposalNo) {\n this.proposalNo = proposalNo;\n }", "public java.lang.String getProposalNo() {\n return proposalNo;\n }", "public void run() {\n\t\t\t\t\t\t\tProposal p = getSelectedProposal();\n\t\t\t\t\t\t\tif (p != null) {\n\t\t\t\t\t\t\t\tString description = p.getDescription();\n\t\t\t\t\t\t\t\tif (description != null) {\n\t\t\t\t\t\t\t\t\tif (infoPopup == null) {\n\t\t\t\t\t\t\t\t\t\tinfoPopup = new InfoPopupDialog(getShell());\n\t\t\t\t\t\t\t\t\t\tinfoPopup.open();\n\t\t\t\t\t\t\t\t\t\tinfoPopup.getShell()\n\t\t\t\t\t\t\t\t\t\t\t\t.addDisposeListener(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DisposeListener() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void widgetDisposed(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDisposeEvent event) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinfoPopup = null;\n\t\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\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinfoPopup.setContents(p.getDescription());\n\t\t\t\t\t\t\t\t} else if (infoPopup != null) {\n\t\t\t\t\t\t\t\t\tinfoPopup.close();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpendingDescriptionUpdate = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public Path getProposalPath() { return proposalPath; }", "public String getProposalId() {\n return this.proposalId;\n }", "public void setProposalPath(Path proposalPath) { this.proposalPath = proposalPath; }", "public final void addProposal(ProposedPromiseDrop proposal) {\r\n if (proposal != null) {\r\n synchronized (f_seaLock) {\r\n if (f_proposals == null) {\r\n f_proposals = new ArrayList<>(1);\r\n }\r\n f_proposals.add(proposal);\r\n }\r\n }\r\n }", "String propose() {\r\n Person person = preferences[pointer];\r\n partner = determinePartner(person);\r\n String result;\r\n if (partner == null) {\r\n result = person.name + \" rejects. \";\r\n } else if (ex == null || ex.isEmpty()) {\r\n result = person.name + \" accepts. \";\r\n } else {\r\n result = person.name + \" dumps \" + ex + \", gets engaged to \" + name + \".\";\r\n }\r\n pointer++;\r\n ex = \"\";\r\n return name + \" proposes to \" + person.name + \". \" + result;\r\n }", "@Override\r\npublic Object execute()\r\n{\r\n\tfinal Article proposal = new Article(this.currentBetterProposal.getIdentifier());\r\n\r\n\tfinal float currentPrice = ((Article)this.currentBetterProposal).getPrice();\r\n\r\n\tif(currentPrice>=this.hightPrice)\r\n\t\treturn null;\r\n\telse\r\n\t{\r\n\t\tfinal float price = (1+this.taux)*currentPrice; //ajouter taux % du prix actuel\r\n\r\n\t\tif (price < this.hightPrice)\r\n\t\t\tproposal.setPrice(price);\r\n\t\telse\r\n\t\t\tproposal.setPrice(this.hightPrice);\r\n\r\n\t\treturn proposal;\r\n\t}\r\n}", "private Proposal getSelectedProposal() {\n\t\tif (isValid()) {\n\t\t\tint index = proposalTable.getSelectionIndex();\n\t\t\tif (proposalList == null || index < 0 || index >= getTableLength()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tint proposalIndex = 0;\n\t\t\tfor (Proposal proposal : proposalList.getTopProposalList()) {\n\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\treturn proposal;\n\t\t\t\t}\n\t\t\t\tproposalIndex++;\n\t\t\t}\n\t\t\tfor (String provider : proposalList.getProviderList()) {\n\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tproposalIndex++;\n\t\t\t\tfor (Proposal proposal : proposalList.getProposals(provider)) {\n\t\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\t\treturn proposal;\n\t\t\t\t\t}\n\t\t\t\t\tproposalIndex++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private void showProposalDescription() {\n\t\t// If we do not already have a pending update, then\n\t\t// create a thread now that will show the proposal description\n\t\tif (!pendingDescriptionUpdate) {\n\t\t\t// Create a thread that will sleep for the specified delay\n\t\t\t// before creating the popup. We do not use Jobs since this\n\t\t\t// code must be able to run independently of the Eclipse\n\t\t\t// runtime.\n\t\t\tRunnable runnable = new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tpendingDescriptionUpdate = true;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(POPUP_DELAY);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t\tif (!isValid()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tgetShell().getDisplay().syncExec(new Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// Query the current selection since we have\n\t\t\t\t\t\t\t// been delayed\n\t\t\t\t\t\t\tProposal p = getSelectedProposal();\n\t\t\t\t\t\t\tif (p != null) {\n\t\t\t\t\t\t\t\tString description = p.getDescription();\n\t\t\t\t\t\t\t\tif (description != null) {\n\t\t\t\t\t\t\t\t\tif (infoPopup == null) {\n\t\t\t\t\t\t\t\t\t\tinfoPopup = new InfoPopupDialog(getShell());\n\t\t\t\t\t\t\t\t\t\tinfoPopup.open();\n\t\t\t\t\t\t\t\t\t\tinfoPopup.getShell()\n\t\t\t\t\t\t\t\t\t\t\t\t.addDisposeListener(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DisposeListener() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void widgetDisposed(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDisposeEvent event) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinfoPopup = null;\n\t\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\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinfoPopup.setContents(p.getDescription());\n\t\t\t\t\t\t\t\t} else if (infoPopup != null) {\n\t\t\t\t\t\t\t\t\tinfoPopup.close();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpendingDescriptionUpdate = false;\n\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};\n\t\t\tThread t = new Thread(runnable);\n\t\t\tt.start();\n\t\t}\n\t}", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "public Proposal(String value) {\n this(value, null);\n }", "long getProposalId();", "@Override\n public void doExecute(ProcessBundle bundle) throws Exception {\n\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n final String unifiedProposalId = (String) bundle.getParams().get(\"Escm_Proposalmgmt_ID\")\n .toString();\n EscmProposalMgmt unifiedProposal = OBDal.getInstance().get(EscmProposalMgmt.class,\n unifiedProposalId);\n\n final String clientId = (String) bundle.getContext().getClient();\n String userId = (String) bundle.getContext().getUser();\n String tabId = (String) bundle.getParams().get(\"tabId\");\n String roleId = (String) bundle.getContext().getRole();\n String orgId = unifiedProposal.getOrganization().getId();\n\n String histStatus = \"\", comments = (String) bundle.getParams().get(\"comments\").toString();\n boolean errorFlag = false, headerUpdate = false;\n String DocStatus = unifiedProposal.getProposalappstatus();\n\n if (DocStatus.equals(\"INC\")) {\n OBDal.getInstance().rollbackAndClose();\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_AlreadyPreocessed_Approved@\");\n bundle.setResult(result);\n return;\n }\n\n // OBError error = UnifiedProposalReactivateMethods\n // .proposalReactivateValidation(unifiedProposalId, clientId, orgId, userId, roleId, tabId);\n // if (error.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n // bundle.setResult(error);\n // return;\n // }\n\n Connection con = OBDal.getInstance().getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = null;\n List<String> proposalList = new ArrayList<String>();\n\n try {\n\n query = \" select escm_proposalmgmt_id from escm_proposalmgmt_line \"\n + \" where escm_proposalmgmt_line_id in (select escm_unifiedproposalines_v_id \"\n + \" from escm_unifiedproposalines_v where escm_proposalmgmt_id = ?) \"\n + \" group by escm_proposalmgmt_id \";\n\n ps = con.prepareStatement(query);\n ps.setString(1, unifiedProposalId);\n\n rs = ps.executeQuery();\n\n // Get proposal id list\n while (rs.next()) {\n proposalList.add(rs.getString(\"escm_proposalmgmt_id\"));\n }\n\n // Reactivate validation\n // Check PO is created for awarded proposals\n boolean hasError = false;\n String proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalReactivateMethods.proposalReactivateValidation(proposalId,\n clientId, proposal.getOrganization().getId(), userId, roleId, tabId);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Escm_Proposalhasorder@\");\n bundle.setResult(result);\n return;\n }\n\n // Update line info if any error occurs\n hasError = false;\n proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.encumbranceValidationReject(proposal, vars);\n if (error1.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Efin_Encum_Used_Cannot_Rej@\");\n bundle.setResult(result);\n return;\n }\n\n // Skip new version (todo)\n // Check bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, true, proposalList);\n if (error1.getType().equals(\"error\")) {\n bundle.setResult(error1);\n return;\n }\n }\n\n // If no error occurs, do encumbrance changes\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.updateProposalEncumbranceReject(proposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n // update bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n\n boolean isFullyAwarded = UnifiedProposalActionMethod.isProposalFullyAwarded(proposalList);\n if (isFullyAwarded) {\n\n OBError error1 = UnifiedProposalRejectMethods.changeEncumStageRej(unifiedProposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n\n } else {\n // reactivate split encumbrance\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposalMgmt = OBDal.getInstance().get(EscmProposalMgmt.class,\n proposalId);\n UnifiedProposalRejectMethods.reactivateSplitBid(proposalMgmt, false, proposalList);\n }\n\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, false, proposalList);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // log.error(\"Exception in isDirectApproval \" + e.getMessage());\n } finally {\n // close db connection\n try {\n if (rs != null)\n rs.close();\n if (ps != null)\n ps.close();\n } catch (Exception e) {\n }\n }\n\n // update proposal Management header status based on reject\n if (!errorFlag) {\n\n headerUpdate = UnifiedProposalReactivateMethods\n .updateUnifiedProposalReactivate(unifiedProposal);\n\n if (headerUpdate) {\n OBDal.getInstance().save(unifiedProposal);\n\n // insert the Action history\n if (!StringUtils.isEmpty(unifiedProposalId)) {\n JSONObject historyData = new JSONObject();\n histStatus = \"REA\";// Reactivate\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", unifiedProposalId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", histStatus);\n historyData.put(\"NextApprover\", \"\");\n historyData.put(\"HistoryTable\", ApprovalTables.Proposal_Management_History);\n historyData.put(\"HeaderColumn\",\n ApprovalTables.Proposal_Management_History_HEADER_COLUMN);\n historyData.put(\"ActionColumn\",\n ApprovalTables.Proposal_Management_History_DOCACTION_COLUMN);\n\n UnifiedProposalActionMethod.InsertApprovalHistory(historyData);\n }\n\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT_DIRECT);\n\n }\n }\n\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", \"@Escm_Ir_complete_success@\");\n bundle.setResult(result);\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n OBDal.getInstance().rollbackAndClose();\n log.debug(\"Exeception in UnifiedProposalReactivate:\" + e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "public void setProposalId(String proposalId) {\n this.proposalId = proposalId;\n }", "public void setProposition(String string);", "public boolean hasObjective(){ return this.hasParameter(1); }", "private void showProposalDevelopment(){\r\n try{\r\n \r\n ProposalBaseWindow propFrame = null;\r\n if ( (propFrame = (ProposalBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.PROPOSAL_BASE_FRAME_TITLE))!= null ) {\r\n if( propFrame.isIcon() ){\r\n propFrame.setIcon(false);\r\n }\r\n propFrame.setSelected(true);\r\n return;\r\n }\r\n propFrame = new ProposalBaseWindow(mdiForm );\r\n propFrame.setVisible( true );\r\n }catch(Exception exception){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n }\r\n }", "public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,\n\t\t\tint documentOffset) {\n\t\tboolean dotActivation = false;\n\n\t\tVector<ICompletionProposal> result = new Vector<ICompletionProposal>();\n\t\t// ICompletionProposal[] result= new\n\t\t// ICompletionProposal[fgProposals.length];\n\t\tIDocument doc = viewer.getDocument();\n\n\t\tFindReplaceDocumentAdapter frd = new FindReplaceDocumentAdapter(doc);\n\n\t\tint pos = documentOffset;\n\t\tdo {\n\t\t\tpos--;\n\t\t} while (pos >= 0 && !Character.isWhitespace(frd.charAt(pos)));\n\t\tpos++;\n\n\t\tString stp = \"\";\n\t\tif (pos >= 0)\n\t\t\tstp = frd.subSequence(pos, documentOffset).toString();\n\n\t\t// See if we have . activation\n\t\tif (frd.charAt(documentOffset - 1) == '.') {\n\t\t\tString props[] = dotActivation(stp, result);\n\t\t\tfor (int i = 0; i < props.length; i++) {\n\t\t\t\tString val = props[i];\n\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\tval,\n\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t// fgProposals[i], info,\n\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\tresult.add(new CompletionProposal(val, documentOffset, 0,\n\t\t\t\t\t\tval.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t}\n\n\t\t} else {\n\t\t\t// System.out.println(\"String part:\" + stp);\n\t\t\tSet<String> comps = fgProposals.keySet();\n\t\t\tIterator<String> compitr = comps.iterator();\n\t\t\twhile (compitr.hasNext()) {\n\t\t\t\t// CompletionToken comp = comps.nextElement();\n\t\t\t\t// String val = comp.getKey();\n\t\t\t\tString val = compitr.next();\n\t\t\t\t// If there are too many matches (and it becomes annoying) then\n\t\t\t\t// remove the two calls to toLowerCase() below\n\t\t\t\t// if (val.toLowerCase().startsWith(stp.toLowerCase())) {\n\t\t\t\tif (val.startsWith(stp)) {\n\n\t\t\t\t\tString rep = val.substring(stp.length());\n\t\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\t\tval,\n\t\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t\t// fgProposals[i], info,\n\t\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\t\t\n\t\t\t\t\t// Do not show proposals with . if the stump does not have a .\n\t\t\t\t\tif(!((stp.indexOf('.') == -1) && val.indexOf('.') != -1)) {\n\t\t\t\t\t\tresult.add(new CompletionProposal(rep, documentOffset, 0,\n\t\t\t\t\t\t\t\trep.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// adding an empty string to ensure that the completion dialog appears\n\t\tif (result.size() == 0) {\n\t\t\tresult.add(new CompletionProposal(\n\t\t\t\t\t\"\", documentOffset, 0, 0, null, \"\", null, null)); //$NON-NLS-1$\n\t\t}\n\n\t\treturn result.toArray(new ICompletionProposal[result.size()]);\n\t}", "public DevelopmentProposal getDevelopmentProposal() {\n return developmentProposal;\n }", "private void selectProposal(int index) {\n\t\tAssert.isTrue(index >= 0, \"Proposal index should never be negative\"); //$NON-NLS-1$\n\t\tif (!isValid() || proposalList == null || index >= getTableLength()) {\n\t\t\treturn;\n\t\t}\n\t\tproposalTable.setSelection(index);\n\t\tproposalTable.showSelection();\n\n\t\tshowProposalDescription();\n\t}", "GoalSpecification createGoalSpecification();", "public void setProposals(ICompletionProposal[] preComputedProposals) {\n fPreComputedProposals = preComputedProposals;\n }", "private boolean canCreateProposal( Person user ) {\n\t\tApplicationTask task = new ApplicationTask( TaskName.CREATE_PROPOSAL );\n\t\tTaskAuthorizationService taskAuthenticationService = KraServiceLocator.getService( TaskAuthorizationService.class );\n\t\treturn taskAuthenticationService.isAuthorized( user.getPrincipalId(), task );\n\t}", "public void setDevelopmentProposal(DevelopmentProposal developmentProposal) {\n this.developmentProposal = developmentProposal;\n }", "public int compareTo(IProposal proposal) {\n return getDisplay().compareToIgnoreCase(proposal.getDisplay());\n }", "public Proposal getAttackedProposal() {\n\t\treturn this.targetProposal;\n\t}", "public interface Participation {\n\n /** alternative owner, but as long as this person is not the owner. \n * This person is allowed to make comments, but nothing else. */\n String CANDIDATE = \"candidate\";\n\n /** the person with ultimate responsibility over a task. */\n String OWNER = \"owner\";\n\n /** person that will be using the result of this task. This person is \n * allowed to make comments, but nothing else. */\n String CLIENT = \"client\";\n\n /** person that is allowed to watch-but-not-touch this task */\n String VIEWER = \"viewer\";\n\n /** a person that was assigned to a task, but got replaced because of \n * absence or another reason. This way, a trace can be left in case \n * this person returns and wants to take back his tasks that got \n * reassigned. */\n String REPLACED_ASSIGNEE = \"replaced-assignee\";\n\n /** the unique id for this participation that is used as a reference in the service methods */\n String getId();\n\n /** userId for this participation. \n * null in case this is a {@link #getGroupId() group participation}. */\n String getUserId();\n\n /** groupId for this participation. \n * null in case this is a {@link #getUserId() user participation}. */\n String getGroupId();\n\n /** see constants for default participations */\n String getType();\n}", "private String resolveProposal(MessageIntent intent, Conversation conv)\n throws IOException, IllegalStateException {\n switch (intent) {\n case AFFIRMATIVE:\n // save time\n conv.setState(Conversation.STATE_SET);\n // generate message\n return WordLattice.fromFile(\"apptset.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n\n case NEGATIVE:\n // block out time\n scheduleManager.invalidateBlock(conv.getAppointmentTime(), conv);\n // repropose\n return proposeTime(conv, true);\n\n case CANCEL:\n // archive the conversation\n conv.setState(Conversation.STATE_ARCHIVED);\n\n // signoff\n return WordLattice.fromFile(\"signoff.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n\n default:\n \n Server.logger.log(Level.SEVERE, String.format(\"Got signal %s\", intent));\n throw new IllegalStateException(\"Reached an illegal action out of S1\");\n }\n }", "private void claim(int proposal) {\n this.claimStatus = new ClaimOrConcession(proposal);\n }", "public Long getInstProposalId() {\n return instProposalId;\n }", "public final void initialCompute() {\n\n\t\t// Create and initialize the prover\n\t\tProver p = UtilFactory.getPrototype().newProver();\n\t\tProverSettings proverSettings = ProverSettings.get();\n\t\tif (\"OpenGeoProver\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tif (\"Wu\".equalsIgnoreCase(proverSettings.proverMethod)) {\n\t\t\t\tp.setProverEngine(ProverEngine.OPENGEOPROVER_WU);\n\t\t\t} else if (\"Area\".equalsIgnoreCase(proverSettings.proverMethod)) {\n\t\t\t\tp.setProverEngine(ProverEngine.OPENGEOPROVER_AREA);\n\t\t\t}\n\t\t} else if (\"Botana\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.BOTANAS_PROVER);\n\t\t} else if (\"Recio\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.RECIOS_PROVER);\n\t\t} else if (\"PureSymbolic\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.PURE_SYMBOLIC_PROVER);\n\t\t} else if (\"Auto\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.AUTO);\n\t\t}\n\t\tp.setTimeout(proverSettings.proverTimeout);\n\t\tp.setConstruction(cons);\n\t\tp.setStatement(root);\n\t\t// Compute extra NDG's:\n\t\tp.setReturnExtraNDGs(true);\n\n\t\t// Adding benchmarking:\n\t\tdouble startTime = UtilFactory.getPrototype().getMillisecondTime();\n\t\tp.compute(); // the computation of the proof\n\t\tint elapsedTime = (int) (UtilFactory.getPrototype().getMillisecondTime()\n\t\t\t\t- startTime);\n\t\t/*\n\t\t * Don't remove this. It is needed for automated testing. (String match\n\t\t * is assumed.)\n\t\t */\n\t\tLog.debug(\"Benchmarking: \" + elapsedTime + \" ms\");\n\n\t\tProofResult proofresult = p.getProofResult();\n\t\tExtendedBoolean result = p.getYesNoAnswer();\n\n\t\tLog.debug(\"STATEMENT IS \" + proofresult + \" (yes/no: \" + result + \")\");\n\n\t\tif (proofresult == ProofResult.PROCESSING) {\n\t\t\tlist.setUndefined();\n\t\t\treturn;\n\t\t}\n\n\t\tlist.setDefined(true);\n\t\tlist.clear();\n\n\t\tif (!ExtendedBoolean.UNKNOWN.equals(result)) {\n\t\t\tBoolean unreadable = false;\n\n\t\t\tif (proofresult == ProofResult.TRUE_NDG_UNREADABLE || proofresult == ProofResult.TRUE_ON_COMPONENTS) {\n\t\t\t\tunreadable = true;\n\t\t\t}\n\n\t\t\tGeoBoolean answer = new GeoBoolean(cons);\n\t\t\tanswer.setValue(result.boolVal());\n\t\t\tlist.add(answer);\n\t\t\tif (result.boolVal()) {\n\t\t\t\tHashSet<NDGCondition> ndgresult = p.getNDGConditions();\n\t\t\t\tGeoList ndgConditionsList = new GeoList(cons);\n\t\t\t\tndgConditionsList.clear();\n\t\t\t\tndgConditionsList.setDrawAsComboBox(true);\n\t\t\t\tIterator<NDGCondition> it = ndgresult.iterator();\n\t\t\t\tTreeSet<GeoText> sortedSet = new TreeSet<>(\n\t\t\t\t\t\tGeoText.getComparator());\n\n\t\t\t\t// Collecting the set of NDG conditions.\n\t\t\t\t// The OGP data collector may left some unreadable conditions\n\t\t\t\t// so we make sure if the condition is readable.\n\t\t\t\twhile (!unreadable && it.hasNext()) {\n\t\t\t\t\tGeoText ndgConditionText = new GeoText(cons);\n\t\t\t\t\tNDGCondition ndgc = it.next();\n\t\t\t\t\t// Do not print unnecessary conditions:\n\t\t\t\t\tif (ndgc.getReadability() > 0) {\n\t\t\t\t\t\tndgc.rewrite(cons);\n\t\t\t\t\t\tStringBuilder s = null;\n\n\t\t\t\t\t\tif (relTool) {\n\t\t\t\t\t\t\tRelationNumerical rn = new RelationNumerical(kernel);\n\t\t\t\t\t\t\tString cond = ndgc.getCondition();\n\t\t\t\t\t\t\tif (\"AreParallel\".equals(cond)) {\n\t\t\t\t\t\t\t\t// non-parallism in 2D means intersecting\n\t\t\t\t\t\t\t\t// FIXME: this is not true for 3D\n\t\t\t\t\t\t\t\ts = sb(rn.intersectString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\ttrue, getLoc()));\n\t\t\t\t\t\t\t} else if (\"AreCollinear\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn\n\t\t\t\t\t\t\t\t\t\t.triangleNonDegenerateString(\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[0],\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[2],\n\t\t\t\t\t\t\t\t\t\t\t\tgetLoc()));\n\t\t\t\t\t\t\t} else if (\"AreEqual\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.equalityString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\tfalse, getLoc()));\n\t\t\t\t\t\t\t} else if (\"ArePerpendicular\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.perpendicularString(\n\t\t\t\t\t\t\t\t\t\t(GeoLine) ndgc.getGeos()[0],\n\t\t\t\t\t\t\t\t\t\t(GeoLine) ndgc.getGeos()[1], false,\n\t\t\t\t\t\t\t\t\t\tgetLoc()));\n\t\t\t\t\t\t\t} else if (\"AreCongruent\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.congruentSegmentString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\tfalse, getLoc()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (s == null || !relTool) {\n\t\t\t\t\t\t\tGeoElement[] geos = ndgc.getGeos();\n\t\t\t\t\t\t\tif (geos == null) { // formula with quantities\n\t\t\t\t\t\t\t\ts = sb(ndgc.getCondition());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts = sb(getLoc()\n\t\t\t\t\t\t\t\t\t\t.getCommand(ndgc.getCondition()));\n\t\t\t\t\t\t\t\ts.append(\"[\");\n\t\t\t\t\t\t\t\tfor (int i = 0; i < ndgc\n\t\t\t\t\t\t\t\t\t\t.getGeos().length; ++i) {\n\t\t\t\t\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\t\t\t\t\ts.append(',');\n\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\t * There can be a case when the underlying\n\t\t\t\t\t\t\t\t\t * prover sends such objects which cannot be\n\t\t\t\t\t\t\t\t\t * understood by GeoGebra. In this case we\n\t\t\t\t\t\t\t\t\t * use the \"Objects\" word. In this case we\n\t\t\t\t\t\t\t\t\t * normally return ProveResult.UNKNOWN to\n\t\t\t\t\t\t\t\t\t * not confuse the student, but for sure, we\n\t\t\t\t\t\t\t\t\t * still do the check here as well.\n\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\tGeoElement geo = ndgc.getGeos()[i];\n\t\t\t\t\t\t\t\t\tif (geo != null) {\n\t\t\t\t\t\t\t\t\t\ts.append(ndgc.getGeos()[i]\n\t\t\t\t\t\t\t\t\t\t\t\t.getLabelSimple());\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.append(Unicode.ELLIPSIS);\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\ts.append(\"]\");\n\t\t\t\t\t\t\t\tif (relTool) {\n\t\t\t\t\t\t\t\t\ts.insert(0, getLoc().getMenu(\"not\") + \" \");\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\n\t\t\t\t\t\tndgConditionText.setTextString(s.toString());\n\t\t\t\t\t\tndgConditionText.setLabelVisible(false);\n\t\t\t\t\t\tndgConditionText.setEuclidianVisible(false);\n\t\t\t\t\t\tsortedSet.add(ndgConditionText);\n\t\t\t\t\t}\n\t\t\t\t\t// For alphabetically ordering, we need a sorted set here:\n\t\t\t\t}\n\t\t\t\t// Copy the sorted list into the output:\n\t\t\t\tIterator<GeoText> it2 = sortedSet.iterator();\n\t\t\t\twhile (it2.hasNext()) {\n\t\t\t\t\tndgConditionsList.add(it2.next());\n\t\t\t\t}\n\n\t\t\t\tif (unreadable) {\n\t\t\t\t\tGeoText ndgConditionText = new GeoText(cons);\n\t\t\t\t\tString cond = Unicode.ELLIPSIS + \"\";\n\t\t\t\t\tndgConditionText.setTextString(cond);\n\t\t\t\t\tndgConditionText.setLabelVisible(false);\n\t\t\t\t\tndgConditionText.setEuclidianVisible(false);\n\t\t\t\t\tsortedSet.add(ndgConditionText);\n\t\t\t\t\tndgConditionsList.add(ndgConditionText);\n\t\t\t\t}\n\n\t\t\t\t// Put this list to the final output (if non-empty):\n\t\t\t\tif (ndgConditionsList.size() > 0) {\n\t\t\t\t\tlist.add(ndgConditionsList);\n\t\t\t\t}\n\n\t\t\t\tif (proofresult == ProofResult.TRUE_ON_COMPONENTS) {\n\t\t\t\t\tGeoText classification = new GeoText(cons);\n\t\t\t\t\tString c = \"c\";\n\t\t\t\t\tclassification.setTextString(c);\n\t\t\t\t\tclassification.setLabelVisible(false);\n\t\t\t\t\tclassification.setEuclidianVisible(false);\n\t\t\t\t\tlist.add(classification);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Don't remove this. It is needed for testing the web platform. (String\n\t\t * match is assumed.)\n\t\t */\n\t\tLog.debug(\"OUTPUT for ProveDetails: \" + list);\n\n\t}", "@Override\n public Proposal propose(Random rand)\n {\n \n savedValue = variable.getIntegerValue();\n double [] incrementIdx = Multinomial.generate(rand, 1, \n uniformDiscreteProbs(NUM_STATES));\n double [] stepsVector = steps(NUM_STATES);\n \n int increment = 0; \n \n for(int i = 0; i < (2 * NUM_STATES); i++)\n increment += (int) incrementIdx[i] * stepsVector[i];\n \n final int newValue = savedValue + increment;\n variable.setValue(newValue);\n return new ProposalRealization();\n }", "public void sortProposals() {\n\n\t}", "@Override\r\n\tpublic void selectionChanged(ICompletionProposal proposal, boolean smartToggle) {\n\t\ttry {\r\n\t\tTracer.info(this, \"Selection changed\" + proposal.getDisplayString());\r\n\t\tTracer.info(this, \"Selection contxt\" + proposal.getContextInformation());\r\n\r\n\t\t\r\n//\t\tSystem.out.println(proposal.getAdditionalProposalInfo());\r\n//\t\tif (proposal instanceof ICompletionProposalExtension2) {\r\n//\t\t\tICompletionProposalExtension2 anExtension2 = (ICompletionProposalExtension2) proposal;\r\n//\t\t\t\r\n//\t\t}\r\n//\t\tSystem.out.println(proposal.getContextInformation().getInformationDisplayString());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {\n\t\tDatabaseNode activeDatabaseNode = DatabaseView.getActiveDatabase();\n\t\tif (activeDatabaseNode == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString[] proposals = null;\n\t\tif (activeDatabaseNode != connectionModelCache) {\n\t\t\ttableNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = tableNamesCache;\n\t\t} else {\n\t\t\tdatabaseNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = databaseNamesCache;\n\t\t}\n\n\t\treturn getProposals(proposals, documentOffset);\n\t}", "private PieceType handlePromotion() {\n List<String> choices = new ArrayList<>();\n choices.add(\"Queen\");\n choices.add(\"Knight\");\n choices.add(\"Rook\");\n choices.add(\"Bishop\");\n\n ChoiceDialog<String> dialog = new ChoiceDialog<>(\"Queen\", choices);\n dialog.setTitle(\"Choice Dialog\");\n dialog.setHeaderText(\"♟ Your pawn has been promoted!\");\n dialog.setContentText(\"Please choose a type to promote to:\");\n\n PieceType returnPiece;\n Side currentSide = controller.getCurrentSide();\n Optional<String> result = dialog.showAndWait();\n if (result.isPresent()) {\n if (result.get().equals(\"Queen\")) {\n returnPiece = ChessPiece.ChessPieceType.QUEEN;\n } else if (result.get().equals(\"Knight\")) {\n returnPiece = ChessPiece.ChessPieceType.KNIGHT;\n } else if (result.get().equals(\"Rook\")) {\n returnPiece = ChessPiece.ChessPieceType.ROOK;\n } else {\n returnPiece = ChessPiece.ChessPieceType.BISHOP;\n }\n promotedPiece = result.get();\n } else {\n returnPiece = ChessPiece.ChessPieceType.QUEEN;\n Alert alert = new Alert(AlertType.WARNING);\n alert.setTitle(\"Interactive Chess\");\n alert.setHeaderText(\"You did not make a choice\");\n alert.setContentText(\"The default choice QUEEN will be used\");\n alert.showAndWait();\n promotedPiece = \"Queen\";\n }\n promotionEventHappened = true;\n\n return returnPiece;\n }", "public void proposalUpdated(IProposal proposal) throws RemoteException {\n\t\tlogger.create().block(\"proposalUpdated\").info().level(1).msg(\n\t\t\t\t\"Adding updateProposal request to update queue for proposal: pid: \" + proposal.getID() + \", name:\"\n\t\t\t\t\t\t+ proposal.getName()).send();\n\t\t// will need to grab content if we dont already have this -\n\t\t// eg the proposal may have been disabled before but now enabled.\n\n\t\tupdateList.add(new ProposalUpdatedNotification(proposal));\n\n\t}", "public Proposal(String value, String display) {\n this.value = value;\n this.display = display;\n if (this.value == null || this.value.length() == 0) {\n this.value = EMPTY;\n }\n if (this.display != null && this.display.length() == 0) {\n this.display = null;\n }\n }", "public Idea getProposedIdea() {\n\t\treturn proposedIdea;\n\t}", "public java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> process(java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> proposals) {\n\t\treturn proposals;\r\n\t}", "public String loadPropositions() {\n System.out.println(\"inside loadPropositions ::\");\n logger.info(PropValApproveBean.class, \"PropValApproveBean()\", \"Start loadPropositions\", null);\n Integer pgWUId = null;\n //This should work from the BPM UI Task.\n pgWUId = (Integer) JSFUtils.resolveExpression(\"#{bindings.WorkUnitId.inputValue}\");\n \n //This is for testing on local\n if(AdfFacesContext.getCurrentInstance().getPageFlowScope().get(\"workUnitId\")!= null) { \n pgWUId = Integer.parseInt(AdfFacesContext.getCurrentInstance().getPageFlowScope().get(\"workUnitId\").toString());\n } \n DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();\n\n DCIteratorBinding iter1 = (DCIteratorBinding) bindings.findIteratorBinding(\"PropertyIdentificationIterator\");\n iter1.executeQuery();\n Row row1 = iter1.getCurrentRow();\n\n String ain = (String) row1.getAttribute(\"AIN\");\n \n System.out.println(\"ain -----\"+ain);\n ADFUtils.setPageFlowValue(\"ain\", ain);\n logger.info(PropValApproveBean.class, \"PropValApproveBean()\", \"End loadPropositions\", null);\n return \"loadProp\";\n }", "@GetMapping(\"/updateProposalbyEmpId/{propId}\")\n\t public Proposal updateAccepted(@PathVariable int propId)\n\t {\n\t \tProposal res = employeeService.updateIsAccepted(propId);\n\t \tif(res.getPropId()==0)\n\t \t{\n\t \t\tthrow new InvalidProposalException(\"No accepted proposals available for propId \"+propId);\n\t \t}\n\t \telse\n\t \t{\n\t \t\treturn res;\n\t \t}\n\t \t\n\t }", "private String getString(Proposal proposal) {\n\t\tif (proposal == null) {\n\t\t\treturn EMPTY;\n\t\t}\n\t\t// if (labelProvider == null) {\n\t\t// return proposal.getLabel() == null ? proposal.getContent()\n\t\t// : proposal.getLabel();\n\t\t// }\n\t\t// return labelProvider.getText(proposal);\n\t\treturn proposal.getValue();\n\t}", "@Override\n public double proposal() {\n Tree tree = treeInput.get();\n\n Node node;\n if (useNodeNumbers) {\n int leafNodeCount = tree.getLeafNodeCount();\n int i = Randomizer.nextInt(leafNodeCount);\n node = tree.getNode(i);\n } else {\n int i = Randomizer.nextInt(taxonIndices.length);\n node = tree.getNode(taxonIndices[i]);\n }\n\n double value = node.getHeight();\n\n if (value == 0.0) {\n return Double.NEGATIVE_INFINITY;\n }\n double newValue = value;\n\n boolean drawFromDistribution = samplingDateTaxonNames.contains(node.getID());\n if (drawFromDistribution) {\n SamplingDate taxonSamplingDate = samplingDatesInput.get().get(samplingDateTaxonNames.indexOf(node.getID()));\n double range = taxonSamplingDate.getUpper() - taxonSamplingDate.getLower();\n newValue = taxonSamplingDate.getLower() + Randomizer.nextDouble() * range;\n } else {\n if (useGaussian) {\n newValue += Randomizer.nextGaussian() * windowSize;\n } else {\n newValue += Randomizer.nextDouble() * 2 * windowSize - windowSize;\n }\n }\n\n\n Node fake = null;\n double lower, upper;\n\n if (((ZeroBranchSANode)node).isDirectAncestor()) {\n fake = node.getParent();\n lower = getOtherChild(fake, node).getHeight();\n if (fake.getParent() != null) {\n upper = fake.getParent().getHeight();\n } else upper = Double.POSITIVE_INFINITY;\n } else {\n //lower = Double.NEGATIVE_INFINITY;\n lower = 0.0;\n upper = node.getParent().getHeight();\n }\n\n if (newValue < lower || newValue > upper) {\n return Double.NEGATIVE_INFINITY;\n }\n\n if (newValue == value) {\n // this saves calculating the posterior\n return Double.NEGATIVE_INFINITY;\n }\n\n if (fake != null) {\n fake.setHeight(newValue);\n }\n node.setHeight(newValue);\n\n if (newValue < 0) {\n for (int i=0; i<tree.getNodeCount(); i++){\n double oldHeight = tree.getNode(i).getHeight();\n tree.getNode(i).setHeight(oldHeight-newValue);\n }\n } else {\n boolean dateShiftDown = true;\n for (int i=0; i< tree.getLeafNodeCount(); i++){\n if (tree.getNode(i).getHeight() == 0){\n dateShiftDown = false;\n break;\n }\n }\n if (dateShiftDown) {\n ArrayList<Double> tipNodeHeights= new ArrayList<Double>();\n for (int i=0; i<tree.getLeafNodeCount(); i++){\n tipNodeHeights.add(tree.getNode(i).getHeight());\n }\n Collections.sort(tipNodeHeights);\n double shiftDown = tipNodeHeights.get(0);\n for (int i=0; i<tree.getNodeCount(); i++){\n double oldHeight = tree.getNode(i).getHeight();\n tree.getNode(i).setHeight(oldHeight-shiftDown);\n }\n }\n }\n\n boolean check = true;\n for (int i=0; i<tree.getNodeCount(); i++){\n if (tree.getNode(i).getHeight() < 0) {\n System.out.println(\"Negative height found\");\n System.exit(0);\n }\n if (tree.getNode(i).getHeight() == 0) {\n check = false;\n }\n }\n if (check) {\n System.out.println(\"There is no 0 height node\");\n System.exit(0);\n }\n\n //tree.setEverythingDirty(true);\n\n return 0.0;\n }", "public Proposal withStatus(ProposalStatus status) {\n this.status = status.toString();\n return this;\n }", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}", "public Proposal withDescription(String description) {\n setDescription(description);\n return this;\n }", "public synchronized void prepareRequest(ProposalNum proposalNum, A agent) {\n if (highestPrepare == null || proposalNum.greaterThan(highestPrepare)) {\n highestPrepare = proposalNum;\n sendPromise(agent, proposalNum, highestAccepted, value);\n }\n }", "public void requestNewPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToMakeNew = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToMakeNew = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO MAKE A NEW POSE\r\n if (continueToMakeNew)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n continueToMakeNew = promptForNew();\r\n\r\n if (continueToMakeNew)\r\n {\r\n // NOW THAT WE'VE SAVED, LET'S MAKE SURE WE'RE IN THE RIGHT MODE\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \t\r\n PoseurStateManager poseurStateManager = singleton.getStateManager().getPoseurStateManager();\r\n \r\n PoseList pl = singleton.getSpriteType().getAnimations().get(singleton.getAnimationState());\r\n pl.addPose(poseID, poseDuration);\r\n poseurStateManager.setState(PoseurState.SELECT_SHAPE_STATE);\r\n \t\tsingleton.getStateManager().setState(EditorState.POSEUR_STATE);\r\n }\r\n }\r\n }", "public String getDevProposalNumber() {\n return devProposalNumber;\n }", "public static void reactivateSplitPR(JSONObject resultEncum, EscmProposalMgmt proposal,\n Boolean isCancel, EscmProposalmgmtLine proposalmgmtline) {\n List<EfinBudgetManencumlines> manenculine = new ArrayList<EfinBudgetManencumlines>();\n EfinBudgetManencum encumbrance = null;\n EfinBudgetManencumlines srcEncumLines = null;\n List<EfinBudManencumRev> revList = null;\n try {\n if (proposal != null)\n encumbrance = proposal.getEfinEncumbrance();\n else\n encumbrance = proposalmgmtline.getEscmProposalmgmt().getEfinEncumbrance();\n\n // From PR\n if (proposal != null) {\n\n Map<EfinBudgetManencumlines, Double> proposalLineMap = proposal\n .getEscmProposalmgmtLineList().stream().filter(b -> b.getEfinBudgmanencumline() != null)\n .collect(Collectors.groupingBy(EscmProposalmgmtLine::getEfinBudgmanencumline,\n Collectors.summingDouble(a -> a.getLineTotal().doubleValue())));\n\n for (Map.Entry<EfinBudgetManencumlines, Double> entry : proposalLineMap.entrySet()) {\n\n BigDecimal requisitionLineAmt = BigDecimal.ZERO;\n\n for (EscmProposalmgmtLine proposalLine : proposal.getEscmProposalmgmtLineList()) {\n\n if (proposalLine.getEfinBudgmanencumline() != null\n && proposalLine.getEfinBudgmanencumline().getId().equals(entry.getKey().getId())) {\n for (EscmProposalsourceRef sourceRef : proposalLine.getEscmProposalsourceRefList()) {\n RequisitionLine reqline = sourceRef.getRequisitionLine();\n requisitionLineAmt = requisitionLineAmt\n .add(sourceRef.getReservedQuantity().multiply(reqline.getUnitPrice()));\n }\n }\n }\n\n BigDecimal revAmtSum = BigDecimal.ZERO;\n\n EfinBudgetManencumlines newEncumlines = entry.getKey();\n\n OBQuery<EfinBudManencumRev> revAmtQuery = OBDal.getInstance().createQuery(\n EfinBudManencumRev.class, \" as e where e.sRCManencumline.id = :proposalEncumLineID\");\n revAmtQuery.setNamedParameter(\"proposalEncumLineID\", newEncumlines.getId());\n\n if (revAmtQuery != null) {\n List<EfinBudManencumRev> revAmtList = revAmtQuery.list();\n if (revAmtList.size() > 0) {\n\n Map<EfinBudgetManencumlines, Double> encumLineRevAmtMap = revAmtList.stream()\n .filter(b -> b.getManualEncumbranceLines() != null)\n .collect(Collectors.groupingBy(EfinBudManencumRev::getManualEncumbranceLines,\n Collectors.summingDouble(a -> (a.getRevamount().negate()).doubleValue())));\n\n for (Map.Entry<EfinBudgetManencumlines, Double> revision : encumLineRevAmtMap\n .entrySet()) {\n\n EfinBudgetManencumlines oldEncumLines = revision.getKey();\n\n revAmtSum = BigDecimal.valueOf(revision.getValue());\n\n if (resultEncum.has(\"type\") && resultEncum.getString(\"type\").equals(\"SPLIT\")) {\n if (revAmtSum.compareTo(requisitionLineAmt) > 0) {\n oldEncumLines.setAPPAmt(oldEncumLines.getAPPAmt().add(requisitionLineAmt));\n oldEncumLines.setRemainingAmount(oldEncumLines.getRemainingAmount()\n .add(revAmtSum.subtract(requisitionLineAmt)));\n OBDal.getInstance().save(oldEncumLines);\n\n } else {\n oldEncumLines.setAPPAmt(oldEncumLines.getAPPAmt().add(revAmtSum));\n OBDal.getInstance().save(oldEncumLines);\n }\n }\n if (resultEncum.has(\"type\") && resultEncum.getString(\"type\").equals(\"MERGE\")) {\n oldEncumLines.setAPPAmt(oldEncumLines.getAPPAmt().add(revAmtSum));\n OBDal.getInstance().save(oldEncumLines);\n }\n }\n\n }\n }\n }\n }\n\n if (!isCancel) {\n // update encumbrance line is null\n if (proposal != null) {\n for (EscmProposalmgmtLine ln : proposal.getEscmProposalmgmtLineList()) {\n ln.setEfinBudgmanencumline(null);\n OBDal.getInstance().save(ln);\n }\n // update the bid management header status as \"In Active\"\n proposal.setEfinEncumbrance(null);\n proposal.setEfinIsbudgetcntlapp(false);\n encumbrance.setBusinessPartner(null);\n OBDal.getInstance().save(proposal);\n } else {\n proposalmgmtline.setEfinBudgmanencumline(null);\n OBDal.getInstance().save(proposalmgmtline);\n // update the bid management header status as \"In Active\"\n proposalmgmtline.getEscmProposalmgmt().setEfinEncumbrance(null);\n proposalmgmtline.getEscmProposalmgmt().setEfinIsbudgetcntlapp(false);\n encumbrance.setBusinessPartner(null);\n OBDal.getInstance().save(proposal);\n }\n }\n\n if (encumbrance != null) {\n // fetching revision record based on newly created encumbrance lines\n OBQuery<EfinBudManencumRev> revQuery = OBDal.getInstance()\n .createQuery(EfinBudManencumRev.class, \" as e where e.sRCManencumline.id in \"\n + \" ( select e.id from Efin_Budget_Manencumlines e where e.manualEncumbrance.id=:encumId)\");\n revQuery.setNamedParameter(\"encumId\", encumbrance.getId());\n revList = revQuery.list();\n if (revList.size() > 0) {\n for (EfinBudManencumRev rev : revList) {\n srcEncumLines = rev.getSRCManencumline();\n if (!isCancel) {\n rev.setSRCManencumline(null);\n OBDal.getInstance().save(rev);\n OBDal.getInstance().flush();\n }\n }\n\n // if (proposal.getEfinEncumbrance() != null)\n // encumbrance = proposal.getEfinEncumbrance();\n manenculine = encumbrance.getEfinBudgetManencumlinesList();\n if (!isCancel) {\n encumbrance.setDocumentStatus(\"DR\");\n OBDal.getInstance().save(encumbrance);\n }\n if (manenculine.size() > 0) {\n for (EfinBudgetManencumlines line : manenculine) {\n if (!isCancel)\n OBDal.getInstance().remove(line);\n else {\n line.setAPPAmt(line.getAPPAmt().add(line.getRevamount().negate()));\n BidManagementDAO.insertEncumbranceModification(line, line.getRevamount().negate(),\n null, \"PRO\", null, null);\n }\n }\n if (!isCancel)\n OBDal.getInstance().remove(encumbrance);\n }\n for (EfinBudManencumRev rev : revList) {\n EfinBudgetManencumlines lines = rev.getManualEncumbranceLines();\n log.debug(\"getAccountingCombination:\" + lines.getAccountingCombination());\n // lines.setAPPAmt(lines.getAPPAmt().add(rev.getRevamount().negate()));\n\n if (!isCancel) {\n lines.getEfinBudManencumRevList().remove(rev);\n } else {\n BidManagementDAO.insertEncumbranceModification(lines, rev.getRevamount().negate(),\n srcEncumLines, \"PRO\", null, null);\n }\n }\n }\n }\n } catch (Exception e) {\n log.error(\"Exception in reactivateSplitPR \" + e.getMessage());\n }\n }", "public void proposalAdded(IProposal proposal) throws RemoteException {\n\t\tlogger.create().block(\"proposalAdded\").info().level(1).msg(\n\t\t\t\t\"Adding addProposal request to update queue for proposal: pid:\" + proposal.getID() + \", name: \"\n\t\t\t\t\t\t+ proposal.getName()).send();\n\t\t// will need to grab all its content ?\n\t}", "public void editPAParameters() {\r\n \t\tdialogFactory.getDialog(new ParametricAnalysisPanel(model, model, model, this), \"Define What-if analysis parameters\");\r\n \t}", "public void setProposition(PropositionDefinition.Builder prop) {\r\n\t\t\tthis.proposition = prop;\r\n\t\t\tthis.setPropId(prop.getId());\r\n\t\t}", "public Deplacement getProchainMouvement();", "public TideParameters getInput() {\n\n TideParameters result = new TideParameters();\n\n String input = minPepLengthTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMinPeptideLength(Integer.valueOf(input));\n }\n input = maxPepLengthTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMaxPeptideLength(Integer.valueOf(input));\n }\n\n input = minPrecursorMassTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMinPrecursorMass(Double.valueOf(input));\n }\n input = maxPrecursorMassTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMaxPrecursorMass(Double.valueOf(input));\n }\n\n result.setMonoisotopicPrecursor(monoPrecursorCmb.getSelectedIndex() == 0);\n result.setClipNtermMethionine(removeMethionineCmb.getSelectedIndex() == 0);\n\n// input = minPtmsPerPeptideTxt.getText().trim();\n// if (!input.equals(\"\")) {\n// result.setMinVariableModificationsPerPeptide(Integer.valueOf(input));\n// }\n \n input = maxPtmsPerPeptideTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMaxVariableModificationsPerPeptide(Integer.valueOf(input));\n }\n\n input = maxVariablePtmsPerTypeTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMaxVariableModificationsPerTypePerPeptide(Integer.valueOf(input));\n }\n\n result.setDigestionType((String) enzymeTypeCmb.getSelectedItem());\n result.setPrintPeptides(peptideListCmb.getSelectedIndex() == 0);\n result.setDecoyFormat((String) decoyFormatCombo.getSelectedItem());\n result.setRemoveTempFolders(removeTempFoldersCmb.getSelectedIndex() == 0);\n result.setKeepTerminalAminoAcids((String) keepTerminalAaCombo.getSelectedItem());\n\n input = decoySeedTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setDecoySeed(Integer.valueOf(input));\n }\n\n result.setComputeExactPValues(exactPvalueCombo.getSelectedIndex() == 0);\n result.setComputeSpScore(spScoreCombo.getSelectedIndex() == 0);\n\n input = minSpectrumMzTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMinSpectrumMz(Double.valueOf(input));\n }\n input = maxSpectrumMzTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMaxSpectrumMz(Double.valueOf(input));\n }\n\n input = minPeaksTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMinSpectrumPeaks(Integer.valueOf(input));\n }\n\n result.setSpectrumCharges((String) chargesCombo.getSelectedItem());\n result.setRemovePrecursor(removePrecursorPeakCombo.getSelectedIndex() == 0);\n\n input = removePrecursorPeakToleranceTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setRemovePrecursorTolerance(Double.valueOf(input));\n }\n\n result.setUseFlankingPeaks(useFlankingCmb.getSelectedIndex() == 0);\n result.setUseNeutralLossPeaks(useNeutralLossCmb.getSelectedIndex() == 0);\n\n input = mzBinWidthTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMzBinWidth(Double.valueOf(input));\n }\n\n input = mzBinOffsetTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setMzBinOffset(Double.valueOf(input));\n }\n\n input = numberMatchesTxt.getText().trim();\n if (!input.equals(\"\")) {\n result.setNumberOfSpectrumMatches(Integer.valueOf(input));\n }\n\n int selectedIndex = outputFormatCombo.getSelectedIndex();\n result.setTextOutput(selectedIndex == 0);\n result.setSqtOutput(selectedIndex == 1);\n result.setPepXmlOutput(selectedIndex == 2);\n result.setMzidOutput(selectedIndex == 3);\n result.setPinOutput(selectedIndex == 4);\n\n return result;\n }", "abstract int estimationParameter1();", "public interface Answer extends EObject {\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model\n\t * @generated\n\t */\n\tDouble accept(Object proposal);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model\n\t * @generated\n\t */\n\tString validate(Object proposal);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model\n\t * @generated\n\t */\n\tProposal<?> createProposal();\n}", "boolean hasAccountBudgetProposal();", "PolicyDecision getDecision();", "private void updatePreferences() {\n\n /* Update preferences of the agent */\n patientAgent.updatePreferredAllocations();\n List<AllocationState> newPreferredAllocations = patientAgent.getAllocationStates();\n preferredAllocationsIterator = patientAgent.getAllocationStates().iterator();\n currentSize = patientAgent.getAllocationStates().size();\n\n if (newPreferredAllocations.isEmpty() || iterationsWithNoImprovementCount >= maxIterationsNum) {\n /* We shut down the behaviour if there are no better appointments\n or we exceeded the possible number of non-improving algorithm iterations\n */\n isHappyWithAppointment = true;\n\n } else if (newPreferredAllocations.size() >= currentSize) {\n\n /* No improvement has been made in our algorithm */\n iterationsWithNoImprovementCount++;\n } else {\n\n /* Improved the appointment, resetting the counter */\n iterationsWithNoImprovementCount = 0;\n }\n\n\n }", "public abstract LearningEditProposal getBestEdit (boolean onlyAllowedEdits, boolean onlyPositiveEdits);", "@Override\r\n\t\t\tpublic List<Integer> finalEvaluation(\r\n\t\t\t\t\tList<Map<String, String>> proposalsContent,\r\n\t\t\t\t\tList<Integer> proposalEvaluation) {\r\n\t\t\t\treturn null;\r\n\t\t\t}", "private void recomputeProposals(ContentProposalList newProposalList) {\n\t\tif (newProposalList == null)\n\t\t\tnewProposalList = getEmptyProposalArray();\n\t\tif (newProposalList.fullLength() == 0 && newProposalList.allResponded()) {\n\t\t\tthis.proposalList = newProposalList;\n\t\t\tclose();\n\t\t} else {\n\t\t\tsetProposals(newProposalList);\n\t\t}\n\t}", "private void proposeSwap(AllocationState preferredAllocation, DFAgentDescription appointmentAgentDescription) {\n String timestamp = System.currentTimeMillis() + \"\";\n\n /* Object allocationSwap contains information about swap proposal for some other agent */\n AgentAllocationSwap allocationSwap = new AgentAllocationSwap();\n allocationSwap.setCurrentAllocation(patientAgent.getCurrentAllocation());\n allocationSwap.setDesiredAllocation(preferredAllocation.getAppointment());\n allocationSwap.setTimestamp(timestamp);\n\n /* Setting exchange agent */\n AID exchangePartnerAgent;\n\n /* Required appointment is not held by anyone, so we must receive a response from hospital agent */\n if (preferredAllocation.getAppointmentStatus().equals(GlobalAgentConstants.APPOINTMENT_QUERY_RESPONSE_STATUS_FREE)) {\n exchangePartnerAgent = appointmentAgentDescription.getName();\n } else {\n /* otherwise, appointment is held by other agent */\n exchangePartnerAgent = new AID(preferredAllocation.getAppointmentHolder(), AID.ISGUID);\n }\n\n /* actual request sending */\n requestSwapWithAgent(exchangePartnerAgent, allocationSwap, timestamp);\n }", "@Override\n\tpublic List<ICompletionProposal> computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {\n\t\treturn Arrays.asList(assistant.computeCompletionProposals(context.getViewer(), context.getInvocationOffset()));\n\t}", "public void setProposedIdea(Idea proposedIdea) {\n\t\tif (this.proposedIdea != null)\n\t\t\tthrow new IllegalArgumentException(\"Can't set idea twice\");\n\t\tthis.proposedIdea = proposedIdea;\n\t}", "private void acceptCurrentProposal(boolean addToHistory) {\n\t\t// Close before accepting the proposal. This is important\n\t\t// so that the cursor position can be properly restored at\n\t\t// acceptance, which does not work without focus on some controls.\n\t\t// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=127108\n\t\tProposal proposal = getSelectedProposal();\n\t\tif (proposal != null) {\n\t\t\tadapter.proposalAccepted(proposal, addToHistory);\n\t\t\tclose();\n\t\t}\n\t}", "public synchronized void acceptRequest(ProposalNum proposalNum, Object value) {\n if (highestPrepare == null || proposalNum.greaterThanOrEqual(highestPrepare)) {\n this.value = value;\n System.out.println(\"Value accepted: \" + this.value);\n }\n }", "public void setProposer(String proposer) {\r\n\t\tthis.proposer = proposer;\r\n\t}", "private void asyncRecomputeProposals() {\n\t\tfooter.setText(\"Searching...\");\n\t\tif (isValid()) {\n\t\t\tsynchronized (uniqueId) {\n\t\t\t\tif (uniqueId == Long.MAX_VALUE)\n\t\t\t\t\tuniqueId = Long.MIN_VALUE;\n\t\t\t\tuniqueId++;\n\t\t\t}\n\t\t\tfinal Long currentId = new Long(uniqueId);\n\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tadapter.getProposals(new IContentProposalSearchHandler() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleResult(\n\t\t\t\t\t\t\t\tfinal ContentProposalList proposalList) {\n\t\t\t\t\t\t\tif (control != null && !control.isDisposed()) {\n\t\t\t\t\t\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tif (currentId.equals(uniqueId))\n\t\t\t\t\t\t\t\t\t\t\trecomputeProposals(proposalList);\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}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleTooltips(List<TooltipData> tooltips) {\n\t\t\t\t\t\t\tadapter.handleTooltipData(tooltips);\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}", "cosmos.gov.v1beta1.ProposalStatus getStatus();", "public int open() {\n\t\tint value = super.open();\n\t\tif (popupCloser == null) {\n\t\t\tpopupCloser = new PopupCloserListener();\n\t\t}\n\t\tpopupCloser.installListeners();\n\t\tProposal p = getSelectedProposal();\n\t\tif (p != null) {\n\t\t\tshowProposalDescription();\n\t\t}\n\t\treturn value;\n\t}", "void askDefaultProduction();", "public static Map<Integer, Proposal> getProposals() { return proposals; }", "public JComponent showProposalSpecialForm(){ \r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n java.awt.GridBagConstraints gridBagConstraints; \r\n \r\n //Added for COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - start\r\n //Getting the data for parameters \r\n //Added for Coeus Enhancement Case #1799 - start: step 2\r\n //CoeusVector cvParameters = queryEngine.executeQuery(queryKey,CoeusParameterBean.class,CoeusVector.FILTER_ACTIVE_BEANS);\r\n for (int index=0;index<cvParameters.size();index++) {\r\n CoeusParameterBean coeusParameterBean=(CoeusParameterBean)cvParameters.elementAt(index);\r\n if(CoeusConstants.ENABLE_PROTOCOL_TO_DEV_PROPOSAL_LINK.equals(coeusParameterBean.getParameterName())){\r\n enableProtocolToDevProposalLink = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n }else if(CoeusConstants.LINKED_TO_IRB_CODE.equals(coeusParameterBean.getParameterName())){\r\n linkedToIRBCode = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n }else if(CoeusConstants.ENABLE_IACUC_TO_DEV_PROPOSAL_LINK.equals(coeusParameterBean.getParameterName())){\r\n enableIacucToDevProposalLink = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n }else if(CoeusConstants.LINKED_TO_IACUC_CODE.equals(coeusParameterBean.getParameterName())){\r\n linkedToIACUCCode = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n }\r\n }\r\n specialReviewForm.setEnableProtocolLink(enableProtocolToDevProposalLink);\r\n specialReviewForm.setEnableIacucProtocolLink(enableIacucToDevProposalLink);\r\n //Added for COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - end\r\n \r\n //specialReviewForm.btnStartProtocol.addActionListener(this);\r\n setSpecialReviewCode();\r\n\r\n\r\n\r\n\r\n //End Coeus Enhancement Case #1799 step 2\r\n \r\n //Commented for the Coeus Enhancement case:#1823 ,for making the special review as a tab page\r\n// btnOk = new javax.swing.JButton();\r\n// btnCancel = new javax.swing.JButton();\r\n// \r\n// btnOk.setMnemonic('O');\r\n// btnOk.setText(\"OK\");\r\n// btnOk.setFont(CoeusFontFactory.getLabelFont());\r\n// btnOk.setMaximumSize(new java.awt.Dimension(106, 26));\r\n// btnOk.setMinimumSize(new java.awt.Dimension(106, 26));\r\n// btnOk.setPreferredSize(new java.awt.Dimension(85, 26));\r\n// gridBagConstraints = new java.awt.GridBagConstraints();\r\n// gridBagConstraints.gridx = 0;\r\n// gridBagConstraints.gridy = 0;\r\n// gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\r\n// gridBagConstraints.insets = new java.awt.Insets(0, 0, 3, 0);\r\n// \r\n// //Disable OK if DISPLAY_MODE\r\n// boolean enabled = functionType != DISPLAY_MODE ? true : false;\r\n// btnOk.setEnabled(enabled); \r\n// \r\n// btnCancel.setMnemonic('C');\r\n// btnCancel.setText(\"Cancel\");\r\n// btnCancel.setFont(CoeusFontFactory.getLabelFont());\r\n// btnCancel.setMaximumSize(new java.awt.Dimension(106, 26));\r\n// btnCancel.setMinimumSize(new java.awt.Dimension(106, 26));\r\n// btnCancel.setPreferredSize(new java.awt.Dimension(85, 26)); \r\n// gridBagConstraints = new java.awt.GridBagConstraints();\r\n// gridBagConstraints.gridx = 0;\r\n// gridBagConstraints.gridy = 1;\r\n// gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\r\n// gridBagConstraints.insets = new java.awt.Insets(0, 0, 3, 0);\r\n// btnOk.addActionListener( new ActionListener(){\r\n// public void actionPerformed(java.awt.event.ActionEvent actionEvent) {\r\n// try{\r\n// if(isSaveRequired()){\r\n// if(specialReviewForm.validateData()){\r\n// //Get Deleted/Non deleted records from SpecialReviewForm\r\n// vecSpecialReviewData = specialReviewForm.getSpecialReviewData();\r\n// //Merge the Deleted and Non deleted records\r\n// setFormData();\r\n// vecSpecialReviewData = getFormData();\r\n// dlgParentComponent.dispose();\r\n// }\r\n// }\r\n// else\r\n// {\r\n// dlgParentComponent.dispose();\r\n// }\r\n// }catch(Exception e){\r\n// //e.printStackTrace();\r\n// CoeusOptionPane.showErrorDialog(e.getMessage());\r\n// } \r\n// }\r\n// });\r\n// btnCancel.addActionListener( new ActionListener(){\r\n// public void actionPerformed(java.awt.event.ActionEvent actionEvent) {\r\n// try{\r\n// performWindowClosing();\r\n// }catch(Exception e){\r\n// CoeusOptionPane.showErrorDialog(e.getMessage());\r\n// }\r\n// }\r\n// });\r\n \r\n// String strSponsor = \"\";\r\n// if (ProposalDetailAdminForm.SPONSOR_CODE != null)\r\n// {\r\n// strSponsor = ProposalDetailAdminForm.SPONSOR_CODE +\" : \" +ProposalDetailAdminForm.SPONSOR_DESCRIPTION;\r\n// }\r\n \r\n// specialReviewForm.setProposalDescription(proposalNumber,strSponsor); \r\n \r\n /*Commented the Coeus Enhancement case:#1823 ,for making the special review asa tab page*/\r\n// specialReviewForm.setButtonsReference(btnOk,btnCancel);\r\n \r\n JComponent cmpMain = (JComponent)specialReviewForm.showSpecialReviewForm(CoeusGuiConstants.getMDIForm());\r\n dlgParentComponent = new CoeusDlgWindow(CoeusGuiConstants.getMDIForm(), \"Special Review\", true);\r\n dlgParentComponent.getContentPane().add(cmpMain);\r\n dlgParentComponent.pack();\r\n dlgParentComponent.setResizable(false); \r\n Dimension screenSize\r\n = Toolkit.getDefaultToolkit().getScreenSize();\r\n Dimension dlgSize = dlgParentComponent.getSize(); \r\n dlgParentComponent.setLocation(screenSize.width/2 - (dlgSize.width/2),\r\n screenSize.height/2 - (dlgSize.height/2)); \r\n \r\n specialReviewForm.requestDefaultFocusForComponent();\r\n \r\n //Commented the Coeus Enhancement case:#1823 ,for making the special review asa tab page\r\n \r\n// //Added By sharath - Bug Fix hit X Btn. Save Cnfrm Clicked yes. Show Err Msg. close - START\r\n// //Fix : After Displaying Err Msg Don't Close the Dialog. Keep it in Focus.\r\n// dlgParentComponent.setDefaultCloseOperation(CoeusDlgWindow.DO_NOTHING_ON_CLOSE);\r\n// //Added By sharath - Bug Fix hit X Btn. Save Cnfrm Clicked yes. Show Err Msg. close - END\r\n// \r\n// dlgParentComponent.addEscapeKeyListener(new AbstractAction(\"escPressed\"){\r\n// public void actionPerformed(ActionEvent ae){\r\n// try{\r\n// performWindowClosing();\r\n//\r\n// }catch(Exception e){\r\n// CoeusOptionPane.showErrorDialog(e.getMessage());\r\n// }\r\n// }\r\n// });\r\n// dlgParentComponent.addWindowListener(new WindowAdapter(){\r\n// \r\n// public void windowOpened(WindowEvent we){\r\n// btnCancel.requestFocusInWindow();\r\n// btnCancel.setFocusable(true);\r\n// }\r\n// \r\n// public void windowClosing(WindowEvent we){\r\n// try{\r\n// performWindowClosing();\r\n// \r\n// }catch(Exception e){\r\n// CoeusOptionPane.showErrorDialog(e.getMessage());\r\n// }\r\n// //return;\r\n// }\r\n// });\r\n //dlgParentComponent.show();\r\n return cmpMain;\r\n }", "@Override\n public void action() {\n DFAgentDescription appointmentAgentDescription = dfSubscription.getAgentDescription();\n List<AllocationState> preferredAllocations = patientAgent.getAllocationStates();\n\n if (patientAgent.getCurrentAllocation() == GlobalAgentConstants.APPOINTMENT_UNINITIALIZED) {\n /* Patient agent has not got any appointment from the hospital agent yet */\n return;\n\n } else if (preferredAllocations.isEmpty()) {\n /* Patient Agent has its most preferred appointment */\n isHappyWithAppointment = true;\n\n } else if (appointmentAgentDescription != null) {\n\n /* Loop executed when action is executed for the first time */\n if (preferredAllocationsIterator == null) {\n /* Querying patient preferences */\n preferredAllocationsIterator = patientAgent.getAllocationStates().iterator();\n currentSize = patientAgent.getAllocationStates().size();\n }\n\n\n if (!preferredAllocationsIterator.hasNext()) {\n /* Condition executed when no more swaps available */\n updatePreferences();\n\n } else if (expectedMessageTemplate == null) {\n\n /* We are not expecting any response, we can make another swap proposal */\n proposeSwap(preferredAllocationsIterator.next(), appointmentAgentDescription);\n\n } else {\n /* Some message has been sent, awaiting a response */\n ACLMessage expectedMessage = patientAgent.receive(expectedMessageTemplate);\n if (expectedMessage != null) {\n boolean wasSwapSuccessful = receiveResponse(expectedMessage, appointmentAgentDescription);\n expectedMessageTemplate = null;\n currentlyProposedAllocationSwap = null;\n\n /* If swap has been successful, we need to update our preference list\n as the patient agent has got new appointment */\n if (wasSwapSuccessful) {\n updatePreferences();\n }\n }\n }\n }\n }", "protected IPlanningGoal selectGoal(){ \n List<IPlanningGoal> relevantGoals = representation.getRelevantGoals(body);\n \n //If we have failed to find plans for high priority goals and environment has not changed, lets try some \n //lower priority ones\n if(numFailuresSinceLastImportantEnvChange < relevantGoals.size()){\n return relevantGoals.get(numFailuresSinceLastImportantEnvChange);\n } else {\n //tried all relevant goals but all failed, lets try it once more\n representation.setMarker(body);\n numFailuresSinceLastImportantEnvChange = 0;\n return relevantGoals.get(0);\n }\n }", "ExchangePlanSelectionRule createExchangePlanSelectionRule();", "ContentProposalPopup(ContentProposalAdapter adapter, String infoText,\n\t\t\tContentProposalList proposalList) {\n\t\t// IMPORTANT: Use of SWT.ON_TOP is critical here for ensuring\n\t\t// that the target control retains focus on Mac and Linux. Without\n\t\t// it, the focus will disappear, keystrokes will not go to the\n\t\t// popup, and the popup closer will wrongly close the popup.\n\t\t// On platforms where SWT.ON_TOP overrides SWT.RESIZE,\n\t\t// we will live with this.\n\t\t// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=126138\n\t\tsuper(adapter.getControl().getShell(), SWT.RESIZE | SWT.ON_TOP | SWT.NO_FOCUS, false,\n\t\t\t\tfalse, false, false, false, null, infoText);\n\t\tthis.adapter = adapter;\n\t\tthis.control = adapter.getControl();\n\t\t\n\t\t// this.labelProvider = adapter.getLabelProvider();\n\t\tthis.partialContentImage = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/mglass-16.png\");\n\t\tthis.partialContentImageSelected = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/mglass-16-white.png\");\n\t\tthis.functionContentImage = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/function-16.png\");\n\t\tthis.functionContentImageSelected = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/function-16-white.png\");\n\t\tthis.nonSelectableItems = new ArrayList<Integer>();\n\n\t\tthis.proposalList = proposalList;\n\t\t// When the popup is opened & the content is not already completed, we\n\t\t// want to handle this behaviour\n\t\tif (!adapter.isPreventTopProposalSelection())\n\t\t\thandleTopProposals = true;\n\t}", "public Proposal withProposedByMemberName(String proposedByMemberName) {\n setProposedByMemberName(proposedByMemberName);\n return this;\n }", "public String getDesiredPose() {\n\t\treturn desiredPose;\n\t}", "public abstract boolean promulgationDataDefined();", "private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }", "public void execute()\n {\n // obtain object references\n ttlAG = (TTL_Autoguider)TTL_Autoguider.getInstance();\n AUTOGUIDE a = (AUTOGUIDE)command;\n AGS_State desired = null;\n pmc = new AltAzPointingModelCoefficients();\n telescope.getMount().getPointingModel().addCoefficients( pmc );\n\n // start of command execution\n Timestamp start = telescope.getTimer().getTime();\n\n try\n {\n AutoguideMode mode = a.getAutoguideMode();\n\n // Guide on the Brightest guide star\n if( mode == AutoguideMode.BRIGHTEST )\n {\n\tttlAG.guideOnBrightest();\n\tdesired = AGS_State.E_AGS_ON_BRIGHTEST;\n }\n\n // Gide on a guide star between magnitudes i1 and i2\n else if( mode == AutoguideMode.RANGE )\n {\n\tint i1 = (int)\n\t ( Math.rint\n\t ( a.getFaintestMagnitude() ) * 1000.0 );\n\n\tint i2 = (int)\n\t ( Math.rint\n\t ( a.getBrightestMagnitude() ) * 1000.0 );\n\n\tttlAG.guideOnRange( i1, i2 );\n\tdesired = AGS_State.E_AGS_ON_RANGE;\n }\n\n // Guide on teh Nth brightest star\n else if( mode == AutoguideMode.RANK )\n {\n\tttlAG.guideOnRank( a.getBrightnessRank() );\n\tdesired = AGS_State.E_AGS_ON_RANK;\n }\n\n // Guide on the star at pixel coords X,Y\n else if( mode == AutoguideMode.PIXEL )\n {\n\tint i1 = (int)\n\t ( Math.rint( a.getXPixel() * 1000.0 ) );\n\n\tint i2 = (int)\n\t ( Math.rint( a.getYPixel() * 1000.0 ) );\n\n\tttlAG.guideOnPixel( i1, i2 );\n\tdesired = AGS_State.E_AGS_ON_PIXEL;\n }\n\n\n // wait for AGS state change and see if it's the desired one\n // after 200 seconds\n int sleep = 5000;\n while( ( ttlAG.get_AGS_State() == AGS_State.E_AGS_WORKING )&&\n\t ( slept < TIMEOUT ) )\n {\n\n\ttry\n\t{\n\t Thread.sleep( sleep );\n\t slept += sleep;\n\t}\n\tcatch( InterruptedException ie )\n\t{\n\t logger.log( 1, logName, ie.toString() );\n\t}\n }\n\n AGS_State actual = ttlAG.get_AGS_State();\n if( actual != desired )\n {\n\tString s = ( \"after \"+slept+\"ms AGS has acheived \"+actual.getName()+\n\t\t \" state, desired state is \"+desired.getName() );\n\tcommandDone.setErrorMessage( s );\n\tlogger.log( 1, logName, s );\n\treturn;\n }\n\n\n // get x,y of guide star depending on mode and check for age of\n // returned centroids - centroids MUST have been placed SINCE this\n // cmd impl was started.\n TTL_AutoguiderCentroid centroid;\n\n // sleep for 0.5 sec to check values have been updated\n int updateSleep = 500;\n do\n {\n\ttry\n\t{\n\t Thread.sleep( 500 );\n\t slept += 500;\n\t}\n\tcatch( InterruptedException ie )\n\t{\n\t logger.log( 1, logName, ie.toString() );\n\t}\n\n\tcentroid = ttlAG.getCentroidData();\n }\n while( centroid.getTimestamp().getSeconds() < start.getSeconds() );\n\n guideStar = ttlAG.getGuideTarget( centroid );\n\n }\n catch( TTL_SystemException se )\n {\n\n }\n\n stopGuiding = false;\n new Thread( this ).start();\n\n commandDone.setSuccessful( true );\n }", "public void setProposer(Integer proposer) {\r\n this.proposer = proposer;\r\n }", "private WorkflowPlan choosePlan(Set<WorkflowPlan> evaluatedPlans) {\n WorkflowPlan plan = evaluatedPlans.iterator().next();\n return plan;\n }", "@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}", "private void selectPhenotype(String option) {\r\n if (option.equals(\"null\") || option.equals(currentPhenotype)){\r\n return;\r\n } \r\n \r\n setDatasets((VerifiedSNP) getController().getActiveSNP(), option);\r\n currentPhenotype = option; \r\n }", "private void setProposals(ContentProposalList newProposalList) {\n\t\tif (newProposalList == null) {\n\t\t\tnewProposalList = getEmptyProposalArray();\n\t\t}\n\t\tthis.proposalList = newProposalList;\n\t\tif (!isValid())\n\t\t\treturn;\n\n\t\t// Reset item width\n\t\tmaxItemWidth = 0;\n\t\tnonSelectableItems.clear();\n\t\tint proposalIndex = proposalList.getTopProposalList().size();\n\t\tfor (String provider : proposalList.getProviderList()) {\n\t\t\tnonSelectableItems.add(proposalIndex);\n\t\t\tproposalIndex += proposalList.getProposals(provider).length + 1;\n\t\t}\n\n\t\t// If there is a table\n\t\tif (isValid()) {\n\t\t\tif (USE_VIRTUAL) {\n\t\t\t\t// Set and clear the virtual table. Data will be\n\t\t\t\t// provided in the SWT.SetData event handler.\n\t\t\t\tproposalTable.setItemCount(getTableLength());\n\t\t\t\tproposalTable.clearAll();\n\t\t\t\tinitializeTextLayouts();\n\t\t\t} else {\n\t\t\t\t// Populate the table manually\n\t\t\t\tproposalTable.setRedraw(false);\n\t\t\t\tproposalTable.setItemCount(getTableLength());\n\t\t\t\tTableItem[] items = proposalTable.getItems();\n\n\t\t\t\tint index = 0;\n\t\t\t\tfor (Proposal proposal : newProposalList.getTopProposalList()) {\n\t\t\t\t\tTableItem item = items[index];\n\t\t\t\t\titem.setText(\" \" + getString(proposal));\n\t\t\t\t\titem.setImage(getImage(proposal, false));\n\t\t\t\t\titem.setData(proposal);\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\tfor (String provider : newProposalList.getProviderList()) {\n\t\t\t\t\tTableItem item = items[index];\n\t\t\t\t\tint count = newProposalList.getCount(provider);\n\t\t\t\t\tString text = provider + \" (\" + count + \" matching items)\";\n\t\t\t\t\titem.setText(text);\n\t\t\t\t\t// Data == null => not selectable\n\t\t\t\t\titem.setData(null);\n\n\t\t\t\t\tDisplay display = Display.getCurrent();\n\t\t\t\t\tColor color = display.getSystemColor(SWT.COLOR_GRAY);\n\t\t\t\t\tFontData fontData = item.getFont().getFontData()[0];\n\t\t\t\t\tFont font = new Font(display, new FontData(\n\t\t\t\t\t\t\tfontData.getName(), fontData.getHeight(),\n\t\t\t\t\t\t\tSWT.ITALIC | SWT.BOLD));\n\t\t\t\t\titem.setBackground(color);\n\t\t\t\t\titem.setFont(font);\n\n\t\t\t\t\tindex++;\n\t\t\t\t\tfor (Proposal proposal : newProposalList\n\t\t\t\t\t\t\t.getProposals(provider)) {\n\t\t\t\t\t\titem.setText(\" \" + getString(proposal));\n\t\t\t\t\t\titem.setImage(getImage(proposal, false));\n\t\t\t\t\t\titem.setData(proposal);\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tproposalTable.setRedraw(true);\n\t\t\t}\n\t\t\tif (infoPopup != null) {\n\t\t\t\tinfoPopup.close();\n\t\t\t}\n\t\t}\n\t\tfooter.setText(\"\");\n\t\t\n\t\tif (handleTopProposals) {\n\t\t\tadapter.handleTopProposals(newProposalList);\n\t\t\t// First to respond win otherwise if all reponded,\n\t\t\t// we stop handle\n\t\t\tif (adapter.hasSelectedTopProposal()\n\t\t\t\t\t|| newProposalList.allResponded()) {\n\t\t\t\thandleTopProposals = false;\n\t\t\t}\n\t\t}\n\t\t// Select the top proposal that was displayed, if any\n\t\tproposalTable.deselectAll();\n\t\tif (adapter.hasSelectedTopProposal()) {\n\t\t\tint index = proposalList.getTopProposalList().indexOf(\n\t\t\t\t\tadapter.getSelectedTopProposal());\n\t\t\tif (index >= 0)\n\t\t\t\tselectProposal(index);\n\t\t}\n\t\tif (AutoCompleteUIPlugin.isRAP())\n\t\t\tadjustTableBounds();\n\t}", "public void setSelectionStrategy( IAnswerSelectionStrategy iass );", "@Override\n\tpublic void approveAcceptedOffer(String matriculation) {\n\t\tofferman.approveAcceptedOffer(matriculation);\n\t\t\n\t}", "public void chooseForMe() {\n }", "@Override\n\tpublic String responsable() {\n\t\treturn \"Programador Pepito\";\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<Proposal> findOne(Long id) {\n log.debug(\"Request to get Proposal : {}\", id);\n return proposalRepository.findOneWithEagerRelationships(id);\n }", "private SuggestionBehaviors chooseBehavior(String nlQuestion,\n Interpretations interpretations,\n SuggestionParams params,\n String concreteLang) throws GrammarLookupFailure {\n\n boolean continuePossible = params.isEnableContinue() && nlQuestion.endsWith(CONTINUE_HINT);\n boolean alterPossible = params.isEnableAlter() && !nlQuestion.endsWith(CONTINUE_HINT);\n\n SuggestionBehaviors result = SuggestionBehaviors.DoNotSuggest;\n\n for (Interpretation interpretation : interpretations.getInterpretations()) {\n List<NameResult> nameTypes = interpretation.getNameResults();\n String template = templateCandidate(nlQuestion, nameTypes);\n List<TreeResult> suggestRules = grammarSuggester.suggestRules(\n template, concreteLang, nameTypes, 1, false, 0);\n\n if (suggestRules.isEmpty()) {\n continue;\n }\n\n Suggestion bestSuggestion = getBestLinearization(suggestRules.get(0).getLinearizations(),\n interpretation, interpretations.getWordTypes(), false);\n\n // the query is complete: give alter or continue suggestions if enabled\n if (template.trim().equalsIgnoreCase(bestSuggestion.getText().trim())\n && interpretations.isAllNamesComplete()) {\n if (continuePossible) {\n result = SuggestionBehaviors.Continue;\n }\n else if (alterPossible) {\n result = SuggestionBehaviors.Alter;\n }\n else {\n if (result != SuggestionBehaviors.Continue && result != SuggestionBehaviors.Alter) {\n result = SuggestionBehaviors.ReturnOriginal;\n }\n }\n }\n //the query is invalid or partial: give correct/complete suggestions\n else if (result == SuggestionBehaviors.DoNotSuggest) {\n result = SuggestionBehaviors.CorrectComplete;\n }\n }\n\n return result;\n }" ]
[ "0.6880457", "0.6475646", "0.5898633", "0.5808563", "0.5795159", "0.5774769", "0.5753348", "0.5719346", "0.56790066", "0.56706375", "0.56293535", "0.557212", "0.5566831", "0.5546895", "0.53835523", "0.5315035", "0.52979594", "0.5294491", "0.5286439", "0.5278842", "0.52438694", "0.5191413", "0.51833594", "0.51145893", "0.5101213", "0.509822", "0.5092659", "0.5079691", "0.50499237", "0.50312334", "0.50254637", "0.5022362", "0.50155455", "0.5006895", "0.49958283", "0.4986601", "0.49661088", "0.49521473", "0.49214506", "0.4910462", "0.48946708", "0.4892833", "0.4883168", "0.48812297", "0.48689404", "0.4860073", "0.48387948", "0.48340955", "0.48337245", "0.4826753", "0.48240113", "0.48188007", "0.47922656", "0.47897393", "0.47864708", "0.4764853", "0.47569373", "0.47543538", "0.47442946", "0.47412953", "0.47396004", "0.4739285", "0.47348988", "0.4729613", "0.4720522", "0.47197974", "0.4711319", "0.47073543", "0.4688891", "0.46870342", "0.46801794", "0.46775436", "0.4673326", "0.46661952", "0.4651618", "0.46383777", "0.46339175", "0.46093497", "0.4607518", "0.4605685", "0.4605249", "0.46012905", "0.45996073", "0.4594287", "0.45924628", "0.4590779", "0.45882082", "0.45857766", "0.4578548", "0.45780537", "0.45699525", "0.45585945", "0.4542785", "0.45394406", "0.4538379", "0.45345432", "0.45281255", "0.45201874", "0.45155185", "0.4513431" ]
0.68395764
1
Indicates if this execution has been decided
public boolean isDecided() { return m_decided; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isExecuted()\n {\n return executed;\n }", "boolean hasExecution();", "public boolean hasBeenExecuted() {\n\t\treturn executed;\n\t}", "public boolean isExecuting(){\n return !pausing;\n }", "public boolean isOperationExecuted() {\n return currentItemState == ItemProcessingState.EXECUTED;\n }", "public boolean isDecided() {\n return decided;\n }", "public boolean shouldExecute() {\n\t\treturn true;\n\t}", "public boolean shouldExecute() {\n return this.goalOwner.getTeam() == null ? false : super.shouldExecute();\n }", "@Override\n public boolean shouldExecute() {\n for(int i = 0; i < routines.length; i++) {\n if(routines[i].shouldExecuteRoutine()) {\n activeRoutine = i;\n getSettler().setSettlerStatus(routines[i].getStatus());\n break;\n }\n }\n return true;\n }", "boolean hasIsPerformOf();", "public boolean operationWaiting(){\n\t\tif (var2Set) return true; else return false;\n\t}", "public boolean shouldContinueExecuting() {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }", "public boolean shouldContinueExecuting()\n {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }", "public boolean getReadyToRun();", "@Override\n\t\tpublic boolean shouldContinueExecuting() {\n\t\t\treturn false;\n\t\t}", "public boolean hasExecutor() {\n return result.hasExecutor();\n }", "boolean isSetCurrentrun();", "public boolean takeControl() {\n\t\tif (!sharedState.isFindingObject()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// returns true if the shared state return in 1\r\n\t\treturn sharedState.getCurrentBehaviour()==1; \r\n\t}", "public boolean shouldExecute() {\n return this.entity.getAttackTarget() != null && this.isBowInMainhand();\n }", "public boolean shouldContinueExecuting() {\n return (this.shouldExecute() || !this.entity.getNavigator().noPath()) && this.isBowInMainhand();\n }", "public boolean shouldContinueExecuting() {\n return ShulkerEntity.this.getAttackTarget() == null && this.peekTime > 0;\n }", "@Override\n public boolean canExecute() {\n return true;\n }", "public static boolean hasActionExecute() {\n return doGetActionExecute() != null;\n }", "boolean hasExecBroker();", "public abstract boolean isCompleted();", "@Override\n public boolean isFinished() {\n return controller.atSetpoint();\n }", "boolean hasCurrentAction();", "abstract boolean shouldTaskActivate();", "boolean hasExecId();", "public boolean hasBeenStarted() {\n return getLastAnswer() != null;\n }", "protected boolean isFinished() {\n\t\tif(switchSide) {\n\t\t\treturn !launchCubeSwitch.isRunning() && state == 4;\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\treturn !launchCubeScale.isRunning() && state == 4;\n\t\t}\n\t\telse {\n\t\t\treturn !crossLine.isRunning() && timer.get() > 1;\n\t\t}\n\t}", "public boolean shouldExecute()\n {\n if (this.runDelay <= 0)\n {\n if (!this.theRaider.world.getGameRules().getBoolean(\"mobGriefing\"))\n {\n return false;\n }\n\n this.currentTask = -1;\n this.wantsToReapStuff = true;\n }\n\n return super.shouldExecute();\n }", "protected boolean isFinished() {\n //return controller.onTarget();\n return true;\n }", "protected boolean isFinished() {\n \tif(Robot.oi.btnIdle.get()) {\n \t\treturn CommandUtils.stateChange(this, new Idle());\n \t}\n\n \tif( Robot.oi.btnShoot.get()) {\n \t\treturn CommandUtils.stateChange(this, new Shooting()); \n \t}\n \t\n \tif(Robot.oi.btnUnjam.get()){\n \t\treturn CommandUtils.stateChange(this, new Unjam());\n \t}\n return false;\n }", "protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }", "public Boolean isExecEnable() {\n return execEnable;\n }", "boolean hasPerformAt();", "public boolean shouldExecute() {\n return ShulkerEntity.this.world.getDifficulty() == Difficulty.PEACEFUL ? false : super.shouldExecute();\n }", "public abstract boolean isComplete();", "protected boolean isFinished(){\r\n return true;\r\n }", "boolean isSetInterpretation();", "boolean targettedSubmit() {\n return PageFlowContext.getOperationParameters().getProperty(\"submitTarget\") != null;\n }", "public boolean isSetExecTradeDirection() {\n return this.execTradeDirection != null;\n }", "boolean isExecuteAccess();", "public abstract boolean isTrigger();", "public boolean is_completed();", "public boolean isSetResult() {\n return this.result != null;\n }", "protected boolean isFinished() {\n\t\treturn pid.onTarget();\n\t}", "@Override\n public boolean isWaitingForTurnPhase() {return true;}", "public boolean is_set_predictResult() {\n return this.predictResult != null;\n }", "boolean hasAutomatic();", "public boolean shouldExecute()\n {\n return !super.shouldExecute() ? false : (!this.theEntity.worldObj.getGameRules().getGameRuleBooleanValue(\"mobGriefing\") ? false : !this.field_151504_e.func_150015_f(this.theEntity.worldObj, this.entityPosX, this.entityPosY, this.entityPosZ));\n }", "boolean isImmediate();", "public boolean nextConditionMet() {\n return true;\n }", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "boolean isAlreadyTriggered();", "boolean hasCommand();", "boolean hasCommand();", "boolean hasAction();", "boolean hasAction();", "boolean hasExecutionTime();", "boolean hasTask();", "boolean hasOperation();", "@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n return m_onTarget;\n }", "boolean isSetupDone();", "public boolean conditionFulfilled();", "@Override\r\n protected boolean isFinished() {\n if (super.isFinished()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public boolean isProcessing (){\n\t\treturn this._processing>0;\n\t}", "boolean hasStartingInfo();", "private boolean triggered() {\n\t\treturn true;\n\t}", "public abstract boolean isFinished ();", "public boolean isOperation() {\n return operation != null;\n }", "boolean isSetTarget();", "protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }", "protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }", "@Override\n public final boolean isRunning() {\n return (this.running && runningAllowed());\n }", "public boolean isAsked() {\n\t\treturn isAsked;\n\t}", "boolean hasInvoke();", "public abstract boolean hasBeenPickedUp();", "boolean experimentCompleted();", "public boolean hasFullyTurned() {\r\n return turningPID.onTarget();\r\n }", "boolean hasActionCommand();", "public boolean hasObjective(){ return this.hasParameter(1); }", "public boolean shouldExecute() {\n if (this.runDelay <= 0) {\n if (!net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(bean.world, bean)) {\n return false;\n }\n\n this.currentTask = -1;\n if(plantAndCollect)\n this.hasFarmItem = ((EntityWorkBean)bean).isFarmItemInInventory();\n else this.hasFarmItem = false;\n this.wantsToReapStuff = true; //this.villager.wantsMoreFood();\n }\n\n return super.shouldExecute();\n }", "protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }", "public boolean isFinished(){\n return true;\n }", "public boolean hasExecId() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }", "public boolean isMet();", "protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }", "boolean isSetParlay();", "boolean hasLastAction();", "boolean hasIsComplete();", "boolean hasIsComplete();", "protected boolean isCommandExecuting() {\n // long start = System.nanoTime();\n // boolean inCommand = false;\n // for (StackTraceElement e : Thread.currentThread().getStackTrace()) {\n // if (e.getMethodName().equals(\"handleCommand\")) {\n // inCommand = true;\n // break;\n // }\n // }\n // long now = System.nanoTime();\n // double elapsedMillis = (now - start) * 1e-6;\n // getLogger().info(\"handleCommand: \" + inCommand + \" elapsed ms: \" +\n // elapsedMillis);\n\n try {\n Field playerCommandState = Bukkit.getServer().getClass().getField(\"playerCommandState\");\n return playerCommandState.getBoolean(Bukkit.getServer());\n } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException ex) {\n getLogger().severe(\"This plugin needs to be updated for the current server (EasyRider.isCommandExecuting()).\");\n return false;\n }\n }", "public boolean canSubmit()\n {\n return (_state == ActivityState.RUNNING);\n }", "boolean isCompleted();", "public boolean getIsInfectedOnThisStep() {\n return isInfectedOnThisStep;\n }", "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 }", "protected boolean isFinished() {\n \tif(timeSinceInitialized() >= 1.75){\n \t\treturn true;\n \t}\n return false;\n }" ]
[ "0.73285824", "0.72607416", "0.7022175", "0.6993957", "0.69652474", "0.67889035", "0.6631992", "0.65738785", "0.6475675", "0.64149743", "0.6387202", "0.6374593", "0.6339978", "0.63194555", "0.6268232", "0.6259023", "0.6230352", "0.6205601", "0.6205123", "0.6198623", "0.6192811", "0.61854887", "0.6179136", "0.61714184", "0.6153378", "0.6151716", "0.6149507", "0.61351603", "0.61206627", "0.6096742", "0.60904413", "0.6080586", "0.60804427", "0.6077969", "0.60747683", "0.60673535", "0.6033349", "0.60303473", "0.6022217", "0.6021927", "0.6015481", "0.60102624", "0.599369", "0.5989633", "0.59828484", "0.5982354", "0.5966642", "0.59641683", "0.59593356", "0.5956256", "0.59501195", "0.5926019", "0.5922612", "0.5922532", "0.59139246", "0.59089524", "0.59029484", "0.59029484", "0.5900896", "0.5900896", "0.58943295", "0.5894324", "0.58909214", "0.5888974", "0.5888974", "0.5887788", "0.5882254", "0.58767205", "0.58571565", "0.58526915", "0.58514255", "0.58503574", "0.58438593", "0.5841559", "0.5841271", "0.58405817", "0.5838562", "0.58358175", "0.5835437", "0.5832136", "0.5828688", "0.58283293", "0.58279234", "0.5824289", "0.5824264", "0.5821801", "0.5820992", "0.58155876", "0.58155423", "0.58155316", "0.5814857", "0.5808709", "0.58076775", "0.58061886", "0.58061886", "0.57995456", "0.5797804", "0.5796337", "0.5793558", "0.5791019", "0.5786541" ]
0.0
-1
Returns the ID of the next rounds leader. This will only be needed if the previous round gets frozen
public String getNextRoundLeader(int a_round) { int i = 0; for (; i < m_roundLeaders.size(); i++) { if (getInitiator().equals(m_roundLeaders.get(i))) break; } int index = (i + a_round) % m_roundLeaders.size(); String g = (String) m_roundLeaders.get(index); return g; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getNextPlayer() {\n int nextPlayerID = ((currentTurn + turnOrder) % numPlayers);\n nextPlayerID = (((nextPlayerID + numPlayers) % numPlayers)); // handles negative numbers\n return nextPlayerID;\n }", "public int nextId() throws IllegalIdRequestException {\r\n\t\tif (currentId < players.size()) {\r\n\t\t\treturn currentId++;\r\n\t\t} else {\r\n\t\t\tthrow new IllegalIdRequestException(\"all available IDs have been assigned to players.\");\r\n\t\t}\r\n\t}", "private static int getNextID() {\n return persons.get(persons.size() - 1).getId() + 1;\n }", "private int nextValidID() {\n return nextId++;\n }", "NodeId getLeaderId();", "private String getNext() {\n \t\t\n \t\tArrayList<String> reel = game.getType().getReel();\n \t\t\n \t\tRandom generator = new Random();\n \t\tint id = generator.nextInt(reel.size());\n \t\t\n \t\tString nextID = reel.get(id);\n \t\tString[] idSplit = nextID.split(\"\\\\:\");\n \t\t\n \t\tif (idSplit.length == 2) {\n \t\t\treturn nextID;\n \t\t}else {\n \t\t\tString newID;\n \t\t\tnewID = Integer.parseInt(idSplit[0]) + \":0\";\n \t\t\t\n \t\t\treturn newID;\n \t\t}\n \t}", "public int getNextWormholeID()\n \t{\n \t\tint maxId = -1;\n \t\tfor (final Integer id : aWormholes.keySet()) {\n \t\t\tmaxId = Math.max(maxId, id);\n \t\t}\n \t\treturn maxId + 1;\n \t}", "private static int nextID() {\r\n\t\treturn ID++;\r\n\t}", "protected abstract long getNextID(long ID);", "public int getRoundID() {\n return rounds.get(currentRound).getRoundID();\n }", "public PlayerId next() {\n return (this.ordinal() == (ALL.size() - 1)) ? ALL.get(0) : ALL.get(this.ordinal() + 1);\n }", "int nextId();", "private synchronized long nextId() {\n\t\treturn ++curID;\n\t}", "public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }", "static synchronized int nextID() {\n\t\treturn g_nID++;\n\t}", "public int getCurrentTurnID() {\n return rounds.get(currentRound).getTurnID();\n }", "public String getNextId() {\n while (!isIdFree(this.nextId)) {\n this.nextId += 1;\n }\n return Integer.toString(this.nextId);\n }", "public int nextPlayer() {\n\t\tplayer = (player + 1) % playerCount;\n\t\treturn player;\n\t}", "private int getNextSessionID() {\n\t\treturn sessionNum++;\n\t}", "private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}", "public String getNextId() {\n while (!this.isIdFree(this.nextId)) {\n this.nextId += 1;\n }\n return Integer.toString(this.nextId);\n }", "public long getNextObjectID() {\n return (Long) getProperty(\"nextObjectID\");\n }", "public abstract ID nextId();", "public UUID rollWinner() {\r\n\t\tint ticketCount = 0;\r\n\t\tfor(int value : tickets.values()) {\r\n\t\t\tticketCount += value;\r\n\t\t}\r\n\t\tif(ticketCount < minParticipantCount) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\r\n\t\tList<UUID> ticketList = getParticipants();\r\n\t\tRandom r = new Random();\r\n\t\tUUID winner = ticketList.get(r.nextInt(ticketList.size()));\r\n\t\treturn winner;\r\n\t}", "public Integer getSafeNextId() {\n return safeNextId;\n }", "public int get_next(boolean optimized) {\n\t\tint id = future_moves.get(0).get(0);\n\t\tfuture_moves.remove(0);\n\t\treturn id;\n\t\t\n\t}", "@Override\n public int getNextPlayer()\n {\n // Checks if the current player's ID is 0, as in player 1\n if (currentPlayer == 0)\n {\n //If the current player's ID is 0, change it to be 1, as in player 2\n currentPlayer = 1;\n }\n else\n {\n /*\n * The the current player's ID isn't 0, as in it's player 2, set the\n * ID to be 0, player 1\n */\n currentPlayer = 0;\n }\n\n // Return the current player's value after it's been changed\n return currentPlayer;\n }", "@Override\n public int getNextPlayer() {\n //TODO Implement this method\n if(isPlayerOne){\n return 0;\n }else {\n return 1;\n }\n }", "private synchronized static String getNextNumber() {\n String toReturn;\n String number = String.valueOf(Math.round(Math.random() * 89999) + 10000);\n if(meetings.containsKey(number)) {\n toReturn = getNextNumber();\n } else {\n toReturn = number;\n }\n return toReturn;\n }", "int getParticipantNum(long runningSportId);", "public int[] getNext() {\n if (currentRound == -1 || currentHeat == -1 || rounds.size() == 0) {\n return new int[] {-1, -1};\n }\n\n int[] next = new int[2];\n\n // Check if current round has another heat\n int cRoundSize = rounds.get(currentRound).length();\n if (currentHeat + 1 < cRoundSize) {\n // Success, so get the next heat index\n next[0] = currentRound;\n next[1] = currentHeat + 1;\n }\n // There are no more heats left in the current round\n // Check if the race has another round\n else if (currentRound + 1 < rounds.size()) {\n // Success, but check to make sure there is actually a heat in this round\n if (rounds.get(currentRound + 1).length() > 0) {\n // Success, so get the first heat in the next round\n next[0] = currentRound + 1;\n next[1] = 0;\n }\n }\n // There are no more valid heats or rounds left\n else {\n next[0] = -1;\n next[1] = -1;\n }\n return next;\n }", "int nextId() {\n return mAckId.incrementAndGet();\n }", "public long getNextThreadID() {\n return (Long) getProperty(\"nextThreadID\");\n }", "public static String nextRound() {\n return \"Starting next round.\";\n }", "public PlayerNumber whoseTurn() {\n\t\tif (isGameOver()) {\n\t\t\treturn Game.GAME_OVER;\n\t\t}\n\t\treturn nextPlayer;\n\t}", "private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }", "public void leaderElection () {\n leaderID++;\n if (leaderID > numServers) {\n leaderID = 1;\n }\n if (isLeader()) {\n leader = new Leader(combine(index, Constants.LEADER), this,\n acceptors, replicas);\n leader.start();\n } else {\n leader = null;\n }\n }", "public String leaderIndex() {\n return leaderIndex;\n }", "private int getNextResNum() {\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the \"reservationNumber\" of the beanBag in the \"stockList\"\r\n // is greater than the \"nextReservationNum\" global integer.\r\n if (((BeanBag) stockList.get(i)).getReservationNumber() > nextReservationNum) {\r\n // Set the global integer \"nextReservationNum\" to the value of the current\r\n // Reservation number of the beanBag in the \"stockList\".\r\n nextReservationNum = ((BeanBag) stockList.get(i)).getReservationNumber();\r\n }\r\n }\r\n // Increment the \"nextReservationNum\" integer by 1.\r\n nextReservationNum = nextReservationNum + 1;\r\n // Return the value of the \"nextReservationNum\" integer variable.\r\n return nextReservationNum;\r\n }", "public int getWinnerId() {\n\t\treturn winnerId;\n\t}", "public int getNewNumber() {\r\n int num;\r\n num=unusedLockers.get(0);\r\n unusedLockers.remove(0);\r\n return num;\r\n }", "public long getNextID() throws IDGenerationException;", "public Long getNextGroupId() {\n return nextGroupId;\n }", "String computeNextLawnPosition();", "protected int getLeaderIndex() {\n // -1 means leader not found\n String leaderId = getLeaderId();\n if (WAITING_FOR_ELECTION.equals(leaderId)) {\n return -1;\n }\n String leaderAddress = leaderId.replace('_', ':');\n int index = 0;\n for (InetSocketAddress address : mClusterAddresses) {\n if (address.toString().equals(leaderAddress)) {\n return index;\n }\n index++;\n }\n return -1;\n }", "private int getNextUpdateKey() {\n synchronized (monitor) {\n if (lobbyUpdates.size() == 0) {\n return 1;\n }\n return lobbyUpdates.lastKey() + 1;\n }\n }", "long getNextSequenceNumber();", "public short getNextNodeID() {\n\t\treturn nodeIdCounter++;\n\t}", "@Override\n public ch.epfl.tchu.game.Player.TurnKind nextTurn() {\n sendInstruction(MessageId.NEXT_TURN);\n return Serdes.TURN_KIND_SERDE.deserialize(receiveInstruction());\n }", "public void next_player() {\n\t\tthis.nb_turn++;\n\t\tthis.player_turn++;\n\t\tthis.same_dice_in_a_row = 0;\n\t\tif (player_turn == this.players.size()) {\n\t\t\tthis.player_turn = 0;\n\t\t}\n\n\t\tif (get_player_from_turn().get_surrend()) {\n\t\t\tthis.nb_turn--;\n\t\t\tif (get_player_in_game() > 0) {\n\t\t\t\tthis.next_player();\n\t\t\t}\n\t\t}\n\t}", "public int getCurrentGameRound(){\n\t\treturn currentGameRound;\n\t}", "public long nextUniqueID() {\n final Lock lock = sequenceBlocks.getLock(type);\n lock.lock();\n try {\n Data data = sequenceBlocks.get(type);\n if (data == null || !(data.getCurrentID() < data.getMaxID())) {\n data = getNextBlock();\n }\n\n final long id = data.getCurrentID();\n data.setCurrentID(id + 1);\n sequenceBlocks.put(type, data);\n return id;\n } finally {\n lock.unlock();\n }\n }", "Peer getLeader() {\n return leader;\n }", "private static int generateCircleId(){\n return snextCircleId.incrementAndGet();\n\n }", "public synchronized long getNextTransactionID(){\n\t\treturn this.id++;\n\t}", "public synchronized int getCurrentRoundNumber()\r\n {\r\n return currentRoundNumber;\r\n }", "public synchronized long nextPm(){\n\t\treturn pm++;\n\t}", "public Integer nextPk() throws ApplicationException {\n\t\t//\tlog.debug(\"Faculty Model nextPK method Started\");\n\t\t\tConnection conn = null;\n\t\t\tint pk = 0;\n\t\t\ttry {\n\t\t\t\tconn = JDBCDataSource.getConnection();\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(\"SELECT MAX(id) FROM ST_FACULTY\");\n\t\t\t\tResultSet rs = pstmt.executeQuery();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tpk = rs.getInt(1);\n\t\t\t\t}\n\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//log.error(\"DataBase Exception ..\", e);\n\t\t\t\tthrow new ApplicationException(\"Exception in Getting the PK\");\n\t\t\t} finally {\n\t\t\t\tJDBCDataSource.closeConnection(conn);\n\t\t\t}\n\t\t\t//log.debug(\"Faculty Model nextPK method End\");\n\t\t\treturn pk + 1;\n\t\t}", "public static long nextIdAlergia() {\r\n long ret = 0;\r\n for (int i = 0; i < Utilidades.ALERGIAS.length; i++) {\r\n if (Utilidades.ALERGIAS[i].id > ret);\r\n ret = Utilidades.ALERGIAS[i].id;\r\n }\r\n return ret + 1;\r\n }", "private int getNextAirportID(){\n\t\treturn this.airportIDCounter++;\n\t}", "private void nextRound()\n {\n Player currentPlayer = roundManager.next();\n\n if(!currentPlayer.getClientConnection().isConnected() || !currentPlayer.getClientConnection().isLogged())\n {\n if(currentPlayer.equals(lastFinalFrenzyPlayer))return;\n nextRound();\n return;\n }\n\n if(gameMode == GameMode.FINAL_FRENZY_BEFORE_FP && roundManager.isFirstPlayer(currentPlayer))gameMode = GameMode.FINAL_FRENZY_AFTER_FP;\n\n try\n {\n currentPlayer.getView().roundStart();\n notifyOtherClients(currentPlayer, virtualView -> virtualView.showNotification(\"È il turno di \"+currentPlayer.getUsername()));\n\n if(roundManager.isFirstRound() || !currentPlayer.isFirstRoundPlayed()) firstRound(currentPlayer);\n\n for(int i = 0; i < gameMode.getPlayableAction(); i++)\n {\n currentPlayer.resetExecutedAction();\n boolean continueRound = executeAction(currentPlayer);\n if(!continueRound)break;\n }\n\n if(gameMode == GameMode.NORMAL)new ReloadAction(this, currentPlayer, ReloadAction.RELOAD_ALL).execute();\n }\n catch (ConnectionErrorException e)\n {\n Logger.error(\"Connection error during \"+currentPlayer.getUsername()+\"'s round!\");\n notifyOtherClients(currentPlayer, virtualView -> virtualView.showNotification(currentPlayer.getUsername()+\" si è disconnesso!\"));\n }\n catch (TimeOutException e)\n {\n Logger.info(\"Player \"+currentPlayer.getUsername()+\" has finished his time\");\n }\n\n currentPlayer.getView().roundEnd();\n currentPlayer.resetExecutedAction();\n refillMap();\n sendBroadcastUpdate();\n if(isFinalFrenzy())currentPlayer.setLastRoundPlayed(true);\n handleDeadPlayers(currentPlayer);\n if(isFinalFrenzy() && currentPlayer.equals(lastFinalFrenzyPlayer))return;\n checkForFinalFrenzy(currentPlayer);\n if(match.connectedPlayerSize() <= 0 || match.connectedPlayerSize() < MatchSettings.getInstance().getMinPlayers())return;\n nextRound();\n\n }", "public int getCurrentNext() {\n\t\tInteger ii = (Integer) get_Value(\"CurrentNext\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "private static int nextHashCode() {\n return nextHashCode.getAndAdd(HASH_INCREMENT);\n }", "long getFromRank();", "private Player nextPlayer() {\n Player next = players.get(nextPlayerIdx++);\n nextPlayerIdx %= players.size(); \n \n return next;\n }", "public static Integer next() {\n return incrementingInteger++;\n }", "public GoLBoard nextRound()\n\t{ \n\t\t//tempBoard = the new upcoming GoLBoard that will be returned\n \tGoLBoard tempBoard = this.copyBoard(); \n \t\n \t//set the births and deaths to the beginning\n \tcurrentDeath = 0;\n \tcurrentBirths = 0;\n \t \n \t//currRow = current row\n \t//currCol = current column\n \t//Accumulate number of cells that birthed and died\n \t//Update the tempBoard using the updateCell method\n \tfor (int currRow = 1; currRow <= setSize; currRow++)\n \t{\n \tfor (int currCol = 1;currCol <= setSize; currCol++)\n \t{\n \t boolean wasAlive = myGoLCell[currRow][currCol].isAlive();\n \t boolean nowAlive =\n \t \ttempBoard.getCell(currRow,currCol).updateCell(getNeighborhood(currRow,currCol));\n \t currentDeath += (wasAlive && !nowAlive)?1:0;\n \t currentBirths += (!wasAlive && nowAlive)?1:0;\n \t}\n \t}\n \t\n \t//Replace the current myGoLCell with the updated\n \tthis.myGoLCell = tempBoard.myGoLCell;\n \t\n \t//Add number of rounds\n \tcurrentRound++;\n \t\n \t//return the current board\n \treturn this;\n\t}", "protected int getNextToken(){\n if( currentToken == 1){\n currentToken = -1;\n }else{\n currentToken = 1;\n }\n return currentToken;\n }", "private long getNextSequenceNumber() {\n return System.nanoTime();\n }", "int nextMessageID()\n {\n int msgID = nextMessageID.incrementAndGet();\n if (msgID > 0)\n {\n return msgID;\n }\n\n while (true)\n {\n if (nextMessageID.compareAndSet(msgID, 1))\n {\n return 1;\n }\n\n msgID = nextMessageID.incrementAndGet();\n if (msgID > 0)\n {\n return msgID;\n }\n }\n }", "public int assignIdToNextUser () {\n int currentMax;\n User maxUserId = null;\n try {\n List lst = this.readAllUsers();\n maxUserId = Collections.max(lst, new UserCompar());\n } catch (DaoException exc) {\n exc.printStackTrace();\n }\n currentMax = maxUserId.getId();\n return ++currentMax;\n }", "public Long getNextSymbolId() {\n return nextSymbolId;\n }", "long getPlayerId();", "@Override \n\tpublic int getNextUserMasterId() throws ResourceAccessException {\n\t\ttry {\n\t\t\treturn userMasterDaoImpl.getNextUserMasterId(); \t\t\n\t\t}catch(DataAccessException ex){ \n\t\t\tthrow new ResourceAccessException(ParConstants.databaseAccessIssue); }\n\n\t}", "int getNextID(String table, String primaryKey) {\n try {\n ResultSet result = connection\n .prepareStatement(\"SELECT MAX(\" + primaryKey + \") FROM \" + table + \";\")\n .executeQuery();\n return result.getInt(1) + 1;\n }\n catch (SQLException e) {\n System.err.println(e.getMessage()\n + \"\\nFailed to get MAX(\" + primaryKey + \") from \" + table + \".\");\n return -1;\n }\n }", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "private int getNextMutator()\n\t{\n\t\t\n\t\tif (mutatingHeuristics.size()==0)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn mutatingHeuristics.get(rng.nextInt(mutatingHeuristics.size()));\n\t}", "public Integer getNextId(){\n\t\tInteger id = 0;\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(userFile));\n\t\t\tString l;\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\twhile (( l = br.readLine()) != null){\n\t\t\t\tString[] line = l.split(\",\");\n\t\t\t\ttry {\n\t\t\t\t\tlist.add(new Integer(line[0]));\t\t\t\t\t\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"DATA ERROR: id field is not an integer\" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort the first field\n\t\t\tCollections.sort(list);\n\t\t\t// get the last (highest value) object\n\t\t\tid = list.get(list.size()-1);\n\t\t\t// increment so next id is guaranteed to be highest integer\n\t\t\tid = id.intValue() + 1;\n\t\t} catch (Exception e){\n\t\t\tSystem.err.println(\"Caught Exception: \" + e.getMessage());\n\t\t}\n\t\treturn id;\n\t}", "Object getNextRuntimeId() throws PersistenceException;", "private static String getNextMomentId(Element element) throws MissionParseException {\n Element nextMomentElement = findSingleChildElementByTag(element, ELEMENT_NEXT_MOMENT);\n // If the element does not have a next moment, then set to the default end signifier.\n if (nextMomentElement == null) {\n return DEFAULT_END_ID;\n }\n return parseNextMomentElement(nextMomentElement);\n }", "public static int getNumeroId(){\r\n idConsecutivo++;\r\n return idConsecutivo;\r\n }", "public int getPlanner_ID() {\n\t\tInteger ii = (Integer) get_Value(\"Planner_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int getNext(){\n synchronized (ThreadSave.class){\n if(value > 0){\n return 1;\n }\n else if (value < 0){\n return -1;\n }\n else\n return value ++;\n }\n\n }", "public TurnHelper next() {\n return values()[ordinal() + 1];\n }", "public int getNext() {\n return value++;\n }", "public Long next() {\n\t\t\treturn Long.valueOf(nextLong());\n\t\t}", "public Integer getBlockID() {\n this.next_id++;\n return this.next_id;\n }", "public int calculateNextRound(Tournament tournament) {\r\n\t\treturn tournament.getRounds().size() + 1;\r\n\t}", "public int getNextActivePlayer() {\n //first check all players after current player\n for (int i = this.activePlayer + 1; i < nrOfPlayers(); i++) {\n if (players.get(i).getState()) {\n return i;\n }\n }\n\n //then check all players from the beginning\n for (int i = 0; i < nrOfPlayers(); i++) {\n if (players.get(i).getState()) {\n return i;\n }\n }\n\n return -1; //should never be returned\n }", "public int returnAndUsePlayerNumber() {\r\n\t\tfor (int no = 1; no < this.playerNumbers.length; no++) {\r\n\t\t\tif (!this.playerNumbers[no]) {\r\n\t\t\t\tthis.playerNumbers[no] = true;\r\n\t\t\t\treturn no;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public long getWinner() {\n long winner = member_1_id;\n if (getMember2Score() > getMember1Score()) {\n winner = member_2_id;\n }\n return winner;\n }", "static synchronized long getNextSeqNumber() {\n return seqNumber++;\n }", "public int getNextIdNumberForPart() {\n int maxId = 0;\n for(Part part : allParts) {\n if(part.getId() > maxId) {\n maxId = part.getId();\n }\n }\n \n return maxId + 1;\n }", "protected String generateLockId() {\n return AkkaUtils.nextId();\n }", "public Player getLoser() {\n\t\treturn getLeader() == player1 ? player2 : player1;\n\t}", "public void nextPlayer() {\r\n if (currentPlayer == totalPlayer) {\r\n currentPlayer = 1;\r\n } else {\r\n currentPlayer++;\r\n }\r\n }", "public long get_next_local_commitment_number() {\n\t\tlong ret = bindings.ChannelReestablish_get_next_local_commitment_number(this.ptr);\n\t\treturn ret;\n\t}", "public int getCurrentRound() {\n\t\treturn roundNumber;\n\t}", "public Tuple getNext(RID rid) {\n\t\treturn null;\r\n\t}", "protected long nextId() throws IdGenerationException {\r\n long nextId;\r\n\r\n try {\r\n nextId = idGenerator.getNextID();\r\n } catch (com.topcoder.util.idgenerator.IDGenerationException e) {\r\n throw new IdGenerationException(\"fail to retrieve id\", e);\r\n }\r\n\r\n if (nextId < 0) {\r\n throw new IdGenerationException(\"invalid id:\" + nextId);\r\n }\r\n\r\n return nextId;\r\n }" ]
[ "0.7202087", "0.672702", "0.6427792", "0.6386612", "0.63300556", "0.62676495", "0.62404853", "0.6224939", "0.62011135", "0.6199851", "0.6171109", "0.61692196", "0.61678386", "0.6164794", "0.6136341", "0.61197776", "0.6091701", "0.6086698", "0.6065404", "0.6054795", "0.6044399", "0.604056", "0.5974847", "0.59725016", "0.59617776", "0.5957357", "0.594789", "0.5889442", "0.5881863", "0.5881736", "0.58624554", "0.58527976", "0.5852329", "0.5848989", "0.58478224", "0.58351845", "0.5781684", "0.5762862", "0.57437396", "0.5676773", "0.5676219", "0.56633484", "0.5647904", "0.56285095", "0.5617704", "0.5611842", "0.5576796", "0.556296", "0.55600536", "0.55583966", "0.55504096", "0.55482936", "0.55408233", "0.55292517", "0.55285347", "0.552721", "0.55243576", "0.5520871", "0.54804325", "0.54762113", "0.547363", "0.54600024", "0.54543436", "0.5450293", "0.54364467", "0.54279387", "0.542436", "0.5419716", "0.54163635", "0.54160535", "0.5414734", "0.5410578", "0.540729", "0.5407033", "0.54000133", "0.5394463", "0.5386848", "0.53840923", "0.5370392", "0.53701586", "0.5352448", "0.53506714", "0.5348885", "0.5348653", "0.53420866", "0.5341245", "0.533563", "0.5334685", "0.5328958", "0.5325101", "0.5321329", "0.531422", "0.53134084", "0.5309107", "0.53015476", "0.53008544", "0.5294247", "0.52914107", "0.52813464", "0.52764267" ]
0.7298858
0
Returns a "good" (see Paxos at War) proposal for this execution A proposal is p good if a) There is no pending decission, i.e. the set Poss is empty in all rounds and p = "NULL" b) p is in acc in some round i and in poss in all rounds i \<= k \< a_nextRound
public String getGoodProposal(int a_nextRound) { String goodValue = null; for (int i = 0; i < a_nextRound; i++) { PaxosRound round = (PaxosRound) m_rounds.get(new Integer(i)); if (round == null) { error("(acc) Uuuups, there is no round " + i); continue; } Vector acc = round.getAcc(); if (acc.isEmpty()) continue; Enumeration en = acc.elements(); while (en.hasMoreElements()) { String prop = (String) en.nextElement(); boolean good = true; for (int j = i; j < a_nextRound; j++) { PaxosRound r = (PaxosRound) m_rounds.get(new Integer(j)); if (r == null) { error("(poss) Uuuups, there is no round " + j); continue; } Vector poss = r.getPoss(); if (!poss.isEmpty() && !poss.contains(prop)) { good = false; break; } } if (good) { goodValue = prop; break; } } if (goodValue != null) break; } if (goodValue == null) goodValue = "NULL"; return goodValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean canPrune() {\n\t\tboolean result = false;\n\t\tint projectedTotal = 0;\n\t\t\n\t\tint i = 0;\n\t\twhile(i<jobsChosen){\n\t\t\tprojectedTotal += board[i][currentCombo[i]];\n\t\t\ti++;\n\t\t}\n\t\twhile(i<numPeople){\n\t\t\tprojectedTotal += bestPossibleCombination[i];\n\t\t\ti++;\n\t\t}\n\t\tif(projectedTotal<bestTotal){//Cant be greater than current Best Total\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "public int evaluate (Player p) {\r\n\t\t/* Adding players hand and the cards from the game board */\r\n\t\t\r\n\t\tfor (Card c: p.hand) {\r\n\t\t\tcards.add(c);\r\n\t\t}\r\n\t\tfor (Card c: board) {\r\n\t\t\tcards.add(c);\r\n\t\t}\r\n\t\t/*Return the value based on the card evaluated. Will check in\r\n\t\t * order to the strength of the hand starting from the \r\n\t\t * strongest hand in order to avoid overlapping between certain \r\n\t\t * hands. (Ex. Three pair includes two pair but three pair will be \r\n\t\t * checked first)*/\r\n\t\tif (hasRoyalFlush(cards)) \r\n\t\t\treturn ROYALFLUSH;\r\n\t\t else if (hasStraightFlush(cards)) \r\n\t\t\treturn STRAIGHTFLUSH;\r\n\t\t else if (hasQuads(cards)) \r\n\t\t\treturn QUADS;\r\n\t\t else if (hasFlush(cards)) \r\n\t\t\treturn FLUSH;\r\n\t\t else if (hasStraight(cards)) \r\n\t\t\treturn STRAIGHT;\r\n\t\t else if (hasSet(cards)) \r\n\t\t\treturn SET;\r\n\t\t else if (hasTwoP(cards)) \r\n\t\t\treturn TWOPAIR;\r\n\t\t else if (hasPair(cards)) \r\n\t\t\treturn PAIR;\r\n\t\t else \r\n\t\t\treturn HIGHCARD;\r\n\t\t\r\n\t}", "public boolean repOk(){\n\t\tif(pool<0 || squares == null || communityCards == null || chanceCards == null || map == null)\n\t\t\treturn false;\n\t\tfor (Square[] layer : squares) {\n\t\t\tfor (Square square : layer) {\n\t\t\t\tif(square == null)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn mh.repOk();\n\t}", "@Override\n public int guessCardValue(Player p) {\n return Card.PRINCESS;\n }", "public PentagoMove alphabetaw(PentagoBoardState boardState){\n PentagoBoardState pbs = (PentagoBoardState) boardState.clone();\n ArrayList<PentagoMove> legalmoves = pbs.getAllLegalMoves();\n\n PentagoMove bestmove = legalmoves.get(0);\n PentagoMove bestopponentmove = new PentagoMove(0,0,0,0,0);\n int bestmovescore = -9999999;\n int bestwhitescore = 0;\n //ArrayList<Integer> scores = new ArrayList<Integer>();\n for(int i = 0;i<legalmoves.size()-1;i++){\n\n PentagoBoardState newboard = (PentagoBoardState) pbs.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove next = legalmoves.get(i);\n\n newboard.processMove(next);\n\n int score = evaluate(newboard);\n //scores.add(score);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n\n if(score > 100000){\n newboard.getWinner();\n newboard.printBoard();\n System.out.println(\"FOUND A WINNER\" + score);\n return next;\n }\n\n\n PentagoMove currentopponentmove;\n ArrayList<PentagoMove> opponentlegalmoves = newboard.getAllLegalMoves();\n if (opponentlegalmoves.size()!=0){\n currentopponentmove = opponentlegalmoves.get(0);\n }\n\n int minopponentmovescore = 999999;\n int thismovescore = -9999;\n ArrayList<PentagoMove> bestopponentmoves = new ArrayList<PentagoMove>();\n PentagoMove currentbestopponentmove = new PentagoMove(0,0,0,0,0);\n\n for(int a = 0;a<opponentlegalmoves.size()-1;a++){\n\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove opponentnext = opponentlegalmoves.get(a);\n\n pbsopponent.processMove(opponentnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int opponentscore = evaluate(pbsopponent);\n\n\n\n\n\n if (minopponentmovescore>opponentscore){\n //currentopponentmove = opponentnext;\n minopponentmovescore = opponentscore;\n bestopponentmoves.add(opponentnext);\n currentbestopponentmove = opponentnext;\n }\n\n\n }\n bestopponentmove = currentbestopponentmove;\n //lvl 3\n /*\n\n int lvl3minscore =99999;\n PentagoMove currentmaxmove;\n for (int r = 0;r<bestopponentmoves.size()-1;r++) {\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n pbsopponent.processMove(bestopponentmoves.get(r));\n\n ArrayList<PentagoMove> maxlegalmoves = pbsopponent.getAllLegalMoves();\n if (maxlegalmoves.size() != 0) {\n currentmaxmove = maxlegalmoves.get(0);\n }\n int opponentscore = evaluate(pbsopponent);\n int findminmaxmovescore = -99999;\n for (int s = 0; s < maxlegalmoves.size() - 1; s++) {\n\n PentagoBoardState maxboard = (PentagoBoardState) pbsopponent.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove maxnext = maxlegalmoves.get(s);\n\n maxboard.processMove(maxnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int maxnextscore = evaluate(pbsopponent);\n if (findminmaxmovescore < maxnextscore) {\n currentmaxmove = maxnext;\n findminmaxmovescore = maxnextscore;\n }\n }\n if (thismovescore<findminmaxmovescore){\n //currentopponentmove = opponentnext;\n thismovescore = findminmaxmovescore;\n }\n\n //opponentscore = maxmovescore;\n }\n\n //end experiment\n\n\n\n\n if (mycolour ==1){\n lvl3minscore =minopponentmovescore;\n }\n */\n if (minopponentmovescore>bestmovescore){//minopponentmovescore\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n\n }\n else if (minopponentmovescore == bestmovescore){\n if (score > bestwhitescore){\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n }\n\n\n\n }\n\n\n }\n System.out.println(\"final max player move score: \"+ bestmovescore + \"\\n My best move: \"+bestmove.toPrettyString() + \"\\n My best move: \"+ bestopponentmove.toPrettyString());\n return bestmove;\n }", "private void computeCurrentResults(int roundNumber) {\n\n\t\t// reset playersByResult;\n\t\tthis.groupsByResult = new HashMap<>();\n\t\tthis.orderedGroupKeys = new ArrayList<>();\n\n\t\t// players key\n\t\tthis.currentPoints = new HashMap<>();\n\n\t\tfor (int i = 1; i <= roundNumber; i++) {\n\t\t\tChesspairingRound round = getRound(i);\n\t\t\tList<ChesspairingGame> games = round.getGames();\n\t\t\tfor (ChesspairingGame game : games) {\n\n\t\t\t\tString whiteKey = game.getWhitePlayer().getPlayerKey();\n\t\t\t\t// if white is present\n\t\t\t\tif (this.presentPlayerKeys.contains(whiteKey)) {\n\t\t\t\t\tDouble whitePoints = this.currentPoints.get(whiteKey);\n\t\t\t\t\tif (whitePoints == null) {\n\t\t\t\t\t\twhitePoints = 0.0;\n\t\t\t\t\t\tthis.currentPoints.put(whiteKey, whitePoints);\n\t\t\t\t\t}\n\t\t\t\t\tif (game.getResult() == ChesspairingResult.WHITE_WINS) {\n\t\t\t\t\t\twhitePoints = whitePoints + 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (game.getResult() == ChesspairingResult.BYE) {\n\t\t\t\t\t\twhitePoints = whitePoints + 0.5;\n\t\t\t\t\t\t// go to the next game\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tString blackKey = game.getBlackPlayer().getPlayerKey();\n\t\t\t\t\tif (this.presentPlayerKeys.contains(blackKey)) {\n\t\t\t\t\t\tDouble blackPoints = this.currentPoints.get(blackKey);\n\t\t\t\t\t\tif (blackPoints == null) {\n\t\t\t\t\t\t\tblackPoints = 0.0;\n\t\t\t\t\t\t\tthis.currentPoints.put(blackKey, blackPoints);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (game.getResult() == ChesspairingResult.BLACK_WINS) {\n\t\t\t\t\t\t\tblackPoints = blackPoints + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (game.getResult() == ChesspairingResult.DRAW_GAME) {\n\t\t\t\t\t\t\twhitePoints = whitePoints + 0.5;\n\t\t\t\t\t\t\tblackPoints = blackPoints + 0.5;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.currentPoints.put(whiteKey, whitePoints);\n\t\t\t\t\t\tthis.currentPoints.put(blackKey, blackPoints);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//iterate over present players and if no current points then add 0 points\n\t\t\tfor (String key: presentPlayerKeys){\n\t\t\t\tif (!currentPoints.containsKey(key)){\n\t\t\t\t\tthis.currentPoints.put(key, 0.0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// simple test to validate some aspects are in order\n\t\tif (presentPlayerKeys.size() != this.currentPoints.entrySet().size()) {\n\t\t\tthrow new IllegalStateException(\"Present players size not the same as currentPoints set size\");\n\t\t}\n\t\t// put the results in playersByResult\n\t\tfor (Entry<String, Double> entry : currentPoints.entrySet()) {\n\t\t\t// if playersByResult group does not exist then create it\n\t\t\tDouble result = entry.getValue();\n\t\t\tif (!this.groupsByResult.containsKey(result)) {\n\t\t\t\tMap<String, ChesspairingPlayer> newGroup = new HashMap<>();\n\t\t\t\tthis.groupsByResult.put(result, newGroup);\n\t\t\t\tthis.orderedGroupKeys.add(result);\n\t\t\t}\n\t\t\tMap<String, ChesspairingPlayer> group = groupsByResult.get(result);\n\t\t\tString playerKey = entry.getKey();\n\t\t\tChesspairingPlayer player = getPlayer(playerKey);\n\t\t\tgroup.put(playerKey, player);\n\t\t}\n\t\t// order the results\n\t\tCollections.reverse(this.orderedGroupKeys);\n\t}", "private boolean pareGroup(Double groupKey, int roundNumber) {\n\t\tMap<String, ChesspairingPlayer> group = this.groupsByResult.get(groupKey);\n\t\t//<debug>\n\t\tif (group == null){\n\t\t\tSystem.out.println(\"group is null\");\n\t\t}\n\t\t//</debug>\n\t\tList<ChesspairingPlayer> players = new ArrayList<>();\n\t\tfor (Entry<String, ChesspairingPlayer> entry : group.entrySet()) {\n\t\t\tplayers.add(entry.getValue());\n\t\t}\n\t\t// order the group\n\t\tCollections.sort(players, new ByInitialOrderIdReverce());\n\t\tCollections.sort(players, new ByElo());\n\t\t// by points just in case it was a downfloater in the group\n\t\tCollections.sort(players, new Comparator<ChesspairingPlayer>() {\n\t\t\t@Override\n\t\t\tpublic int compare(ChesspairingPlayer o1, ChesspairingPlayer o2) {\n\t\t\t\tDouble pointsO1 = currentPoints.get(o1.getPlayerKey());\n\t\t\t\tDouble pointsO2 = currentPoints.get(o2.getPlayerKey());\n\t\t\t\treturn Double.compare(pointsO1, pointsO2);\n\t\t\t}\n\t\t});\n\n\t\tif (players.size() % 2 != 0) {\n\t\t\tthrow new IllegalStateException(\"You should have resolved groups count before\");\n\t\t}\n\n\t\t/**\n\t\t * split the list indexes and build the s1 and s2\n\t\t */\n\t\tList<List<Integer>> split = Tools.initialSplitList(players.size());\n\t\tList<Integer> list1 = split.get(0);\n\t\tList<Integer> list2 = split.get(1);\n\t\tint size = list2.size();\n\t\tInteger[] newArray = new Integer[size];\n\t\tInteger[] s1 = new Integer[size];\n\t\t// copy the elements\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tnewArray[i] = list2.get(i);\n\t\t\ts1[i] = list1.get(i);\n\t\t}\n\t\tSet<Integer[]> permutations = Tools.getPermutationsV01(newArray);\n\t\t// for each permutation test if paring is valid\n\t\tSet<Integer[]> validPermutations = new HashSet<>();\n\t\tfor (Integer[] s2 : permutations) {\n\t\t\tif (testIfPermutationIsValid(s1, s2, players)) {\n\t\t\t\tvalidPermutations.add(s2);\n\t\t\t}\n\t\t}\n\t\tif (validPermutations.size() == 0) {\n\t\t\t// drop the group and restart the paring. move all players down?\n\t\t\t// Yes!\n\t\t\treturn false;\n\t\t}\n\t\t// for the moment just take the first permutation and pare the players\n\t\tInteger[] s2 = validPermutations.iterator().next();\n\t\tList<ChesspairingGame> games = buildGamesFromPermutation(s1, s2, players);\n\t\tthis.generatedRound.getGames().addAll(games);\n\t\treturn true;\n\t}", "public int evaluate(PentagoBoardState pbs) {\n PentagoBoardState.Piece[][] pieces = pbs.getBoard();\n\n\n int whitescore =0; //keep track of white's total score\n int blackscore = 0;//keep track of black's total score\n\n //Check rows\n for (int x = 0; x <6 ; x++) {\n int countWHori = 0;\n int countBHori = 0;\n\n int blacks = 0;\n int whites = 0;\n\n\n for (int y = 0; y <5 ; y++) {\n //Count how many black and white pieces\n if (pieces[x][y].ordinal() == 0 ) {\n\n //countBHori = countBHori + countvalue;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1) {\n\n //countWHori = countWHori +countvalue;\n whites++;\n }\n\n //Check for consecutive\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 0 ) {\n\n countBHori = countBHori +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 2 ) {\n\n countBHori = countBHori + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x][y+1].ordinal() == 0 ) {\n\n countBHori = countBHori + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 1 ) {\n\n countWHori = countWHori +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 2 ) {\n\n countWHori = countWHori + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x][y+1].ordinal() == 1 ) {\n\n countWHori = countWHori + blankspaceconsec;\n }\n\n //Check for disjoint and joint set If * B B W * * then disjoint and * B B * B * Then joint set for B * B\n if (y!=4){\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 0 && pieces[x][y+2].ordinal() == 1){\n countBHori = countBHori +disjointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 1 && pieces[x][y+2].ordinal() == 0){\n countWHori = countWHori +disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x][y+1].ordinal() == 2 && pieces[x][y+2].ordinal() == 0){\n countBHori = countBHori +jointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x][y+1].ordinal() == 2 && pieces[x][y+2].ordinal() == 1){\n countWHori = countWHori +jointset;\n }\n }\n }\n //check if unwinnable\n if (blacks == 4 && whites==2){\n countBHori += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWHori += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countWHori += unwinnable;\n countBHori += unwinnable;\n }\n\n\n //Run value for row in evaluation scheme and add to total score\n int valuew = consecutivevalue(countWHori);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBHori);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec hori \" + valueb + \"White consec hori \" + valuew);\n\n }\n\n //Check Verticals\n for (int y = 0; y <6 ; y++) {\n int countWvert = 0;\n int countBvert = 0;\n int blacks = 0;\n int whites = 0;\n\n\n for (int x = 0; x <5 ; x++) {\n if (pieces[x][y].ordinal() == 0) {\n\n //countBvert = countBvert +1;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1) {\n\n //countWvert = countWvert +1;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 0 ) {\n\n countBvert = countBvert +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 2 ) {\n\n countBvert = countBvert + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 0 ) {\n\n countBvert = countBvert + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 1 ) {\n\n countWvert = countWvert +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 2 ) {\n\n countWvert = countWvert + blankspaceconsec;\n }\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 1 ) {\n\n countWvert = countWvert + blankspaceconsec;\n }\n\n if (x!=4){\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 1){\n countBvert = countBvert +disjointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 0){\n countWvert = countWvert +disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 0){\n countBvert = countBvert +jointset;\n }\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y].ordinal() == 2 && pieces[x+1][y].ordinal() == 1){\n countWvert = countWvert +jointset;\n }\n }\n }\n\n if (blacks == 4 && whites==2){\n countBvert += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBvert += unwinnable;\n countWvert += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWvert += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBvert + \"White consec \" + countWvert);\n int valuew = consecutivevalue(countWvert);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBvert);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec VERT \" + valueb + \"White consec hori \" + valuew);\n }\n\n //S West N EAST Top\n for (int a = 1; a <6 ; a++) { //loop through all diagonal lines\n int countWdiagSoNe = 0;\n int countBdiagSoNe = 0;\n int x=0;\n int blacks = 0;\n int whites = 0;\n\n\n for (int y = a; y !=0 ; y--) { //loop through one diagonal line\n\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y-1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n\n //countBdiagSoNe = countBdiagSoNe +2;\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1 ) {\n\n //countWdiagSoNe = countWdiagSoNe +2;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n // check for joint and disjoint set at these x y coordinates by looking 2 pieces ahead\n if (x==0 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==1 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==0 && y==5){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==1 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==3 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n\n x++;\n\n\n }\n if (blacks == 4 && whites==2){\n countBdiagSoNe += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBdiagSoNe += unwinnable;\n countWdiagSoNe += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n if (a==4 && blacks == 4 && whites==1){\n countBdiagSoNe += unwinnable;\n }\n if (a==4 && blacks == 1 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagSoNe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBdiagSoNe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagSoNe + \"White consec hori \" + valuew + \" \" + countWdiagSoNe);\n }\n //S West N EAST Bot\n for (int a = 1; a <5 ; a++) {\n int countWdiagSoNe = 0;\n int countBdiagSoNe = 0;\n int y=5;\n int blacks = 0;\n int whites = 0;\n\n for (int x = a; x <5 ; x++) {\n\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y-1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n\n //countBdiagSoNe = countBdiagSoNe +\n blacks++;\n }\n if (pieces[x][y].ordinal() == 1 ) {\n\n //countWdiagSoNe = countWdiagSoNe +2;\n whites++;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 0 ) {\n\n countBdiagSoNe = countBdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y-1].ordinal() == 1 ) {\n\n countWdiagSoNe = countWdiagSoNe + blankspaceconsec;\n }\n if (x==1 && y==5){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==2 && y==4){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n if (x==3 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 1 && pieces[x+2][y-2].ordinal() == 0) {\n\n countWdiagSoNe = countWdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 0 && pieces[x+2][y-2].ordinal() == 1) {\n\n countBdiagSoNe = countBdiagSoNe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 1) {\n\n countWdiagSoNe = countWdiagSoNe +jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y-1].ordinal() == 2 && pieces[x+2][y-2].ordinal() == 0) {\n\n countBdiagSoNe = countBdiagSoNe + jointset;\n }\n }\n //System.out.println(x + \" y:\" + y +\" Black consec DIAGOMAAL \" + countBdiagSoNe + \"White consec hori \" + countWdiagSoNe);\n y--;\n\n\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagSoNe += unwinnable;\n }\n /*if (blacks == 3 && whites==3){\n countBdiagSoNe += unwinnable;\n countWdiagSoNe += unwinnable;\n }*/\n if (a==1&& blacks == 1 && whites==4){\n countWdiagSoNe += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagSoNe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue(countBdiagSoNe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagSoNe + \"White consec hori \" + valuew + \" \" + countWdiagSoNe);\n }\n\n //NorthWest S EAST Left\n for (int a = 0; a <5 ; a++) {\n int countWdiagNoSe = 0;\n int countBdiagNoSe = 0;\n int y=0;\n int blacks = 0;\n int whites = 0;\n\n for (int x = a; x <5 ; x++) {\n //System.out.println(pbs+\"x \" + x+ \" y \" +y);\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y+1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0) {\n blacks++;\n //countBdiagNoSe = countBdiagNoSe +2;\n }\n if (pieces[x][y].ordinal() == 1) {\n whites++;\n //countWdiagNoSe = countWdiagNoSe +2;\n }\n\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countWdiagNoSe= countWdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe + blankspaceconsec;\n }\n\n if (x==0 && y==0){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==3 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==0){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==3 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n y++;\n\n\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n if (blacks == 4 && whites==2){\n countBdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagNoSe += unwinnable;\n }\n if (blacks == 3 && whites==3){\n countBdiagNoSe += unwinnable;\n countWdiagNoSe += unwinnable;\n }\n if (blacks == 2 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 1 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n\n int valuew = consecutivevalue(countWdiagNoSe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue( countBdiagNoSe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagNoSe + \"White consec hori \" + valuew + \" \" + countWdiagNoSe);\n }\n //NorthWest S EAST Right\n for (int a = 1; a <5 ; a++) {\n int countWdiagNoSe = 0;\n int countBdiagNoSe = 0;\n int x=0;\n int blacks = 0;\n int whites = 0;\n\n for (int y = a; y <5 ; y++) {\n //System.out.println(\"x \" + x+ \" y \" +y);\n int r = pieces[x][y].ordinal();\n int s =pieces[x+1][y+1].ordinal();\n //System.out.println(\"x \" + x+ \" y \" +y);\n //System.out.println(\"first \" + r+ \" second \" +s);\n if (pieces[x][y].ordinal() == 0 ) {\n blacks++;\n //countBdiagNoSe = countBdiagNoSe +2;\n }\n if (pieces[x][y].ordinal() == 1) {\n whites++;\n //countWdiagNoSe = countWdiagNoSe +2;\n }\n\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 0 ) {\n\n countBdiagNoSe = countBdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe +consecvalue;\n }\n\n else if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 ) {\n\n countWdiagNoSe= countWdiagNoSe + blankspaceconsec;\n }\n\n else if (pieces[x][y].ordinal() == 2 && pieces[x+1][y+1].ordinal() == 1 ) {\n\n countWdiagNoSe = countWdiagNoSe + blankspaceconsec;\n }\n\n if (x==0 && y==1){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==1 && y==2){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n if (x==2 && y==3){\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 1 && pieces[x+2][y+2].ordinal() == 0) {\n\n countWdiagNoSe = countWdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 0 && pieces[x+2][y+2].ordinal() == 1) {\n\n countBdiagNoSe = countBdiagNoSe + disjointset;\n }\n if (pieces[x][y].ordinal() == 1 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 1) {\n\n countWdiagNoSe = countWdiagNoSe + jointset;\n }\n else if (pieces[x][y].ordinal() == 0 && pieces[x+1][y+1].ordinal() == 2 && pieces[x+2][y+2].ordinal() == 0) {\n\n countBdiagNoSe = countBdiagNoSe + jointset;\n }\n }\n x++;\n\n\n }\n if (a==1 && blacks == 1 && whites==4){\n countWdiagNoSe += unwinnable;\n }\n if (a==1 && blacks == 4 && whites==1){\n countBdiagNoSe += unwinnable;\n }\n //System.out.println(\"Black consec vert \" + countBdiagSoNe + \"White consec \" + countWdiagSoNe);\n int valuew = consecutivevalue(countWdiagNoSe);\n whitescore = whitescore +valuew;\n int valueb = consecutivevalue( countBdiagNoSe);\n blackscore = blackscore + valueb;\n //System.out.println(\"Black consec DIAGOMAAL \" + valueb + \" \" + countBdiagNoSe + \"White consec hori \" + valuew + \" \" + countWdiagNoSe);\n }\n\n\n\n\n\n //System.out.println(\"Black consec score \" + blackscore +\" \" + \"White consec scpre \" + whitescore);\n //System.out.println(\"max player is \" + maxplayer + \"My colour is \" + mycolour);\n int i = -123456789;\n if (mycolour == 0){\n //System.out.println(blackscore-whitescore +\" I am black\");\n\n\n i= blackscore-whitescore;\n return i;\n\n }\n else {\n //System.out.println(whitescore-blackscore +\" I am white\");\n i= whitescore-blackscore;\n return i;\n }\n /*\n if(i>0 && i<1000){\n return 100; //i*2;\n }\n else if(i>=1000 && i<10000){\n return 1000; //i*10;\n }\n else if(i>=10000 && i<100000){\n return 10000; //i*50;\n }\n else if(i>=100000){\n return 100000;//i*500;\n }\n else if(i<=0 && i>-100){\n return -100; //i*2;\n }\n else if(i<=-100 && i>-1000){\n return -1000; //i*10;\n }\n else if(i<=-1000 && i>-10000){\n return -10000; //i*50;\n }\n else if(i<=0 && i>-100000){\n return -100000;//i*500;\n }\n\n */\n\n\n }", "public void makeFirstRound() {\n Strategy tactics = null;\n ArrayList<Producer> auxProducerList = new ArrayList<>(listOfProducers.getList());\n for (Distributor dst : listOfDistributors.getList()) {\n if (dst.getSubscribedproducers().isEmpty()) {\n int auxNeededPower = dst.getEnergyNeededKW();\n if (dst.getProducerStrategy().equals(\"GREEN\")) {\n tactics = new GreenStrategy();\n } else if (dst.getProducerStrategy().equals(\"PRICE\")) {\n tactics = new PriceStrategy();\n } else if (dst.getProducerStrategy().equals(\"QUANTITY\")) {\n tactics = new QuantityStrategy();\n }\n tactics.sorter(auxProducerList);\n for (Producer p : auxProducerList) {\n if (!(p.getMaxDistributors() == p.getCurrDistributors())) {\n dst.addSubscribedproducer(p);\n p.addDistIDs(dst.getId());\n p.addObserver(dst);\n p.setCurrDistributors(p.getCurrDistributors() + 1);\n auxNeededPower -= p.getEnergyPerDistributor();\n if (auxNeededPower < 0) {\n break;\n }\n }\n }\n }\n }\n\n Distributor bestDist = listOfDistributors.getBestDistinRound();\n\n for (Consumer auxcons : listOfConsumers.getList()) {\n auxcons.setBudget(auxcons.getInitialBudget() + auxcons.getMonthlyIncome());\n auxcons.setIdofDist(bestDist.getId());\n auxcons.setMonthstoPay(bestDist.getContractLength());\n auxcons.setToPay(bestDist.getContractPrice());\n bestDist.addSubscribedconsumer(auxcons);\n if (auxcons.getBudget() >= auxcons.getToPay()) {\n auxcons.addtoBudget(-auxcons.getToPay());\n auxcons.reduceMonths();\n bestDist.addBudget(auxcons.getToPay());\n } else {\n auxcons.setDuepayment(auxcons.getToPay());\n auxcons.reduceMonths();\n }\n if (auxcons.getMonthstoPay() == 0) {\n auxcons.setIdofDist(-1);\n }\n }\n\n for (Distributor d : listOfDistributors.getList()) {\n if (d.isBankrupt()) {\n continue;\n }\n d.reduceBudget();\n if (d.getBudget() < 0) {\n d.setBankrupt(true);\n }\n }\n }", "public boolean isSolved(){ return getRemainingValues() == 0; }", "private void computeNextRound(int roundNumber) {\n\t\tList<ChesspairingGame> games = new ArrayList<>();\n\t\tthis.generatedRound = new ChesspairingRound();\n\t\tthis.generatedRound.setGames(games);\n\t\tthis.generatedRound.setRoundNumber(roundNumber);\n\n\t\tthis.currentDownfloaters = new HashMap<>();\n\n\t\t/**\n\t\t * start the iteration over groups in the descending order. In order to\n\t\t * avoid thread weird behaviour because the group keys wee copy the keys\n\t\t * before wee iterate\n\t\t */\n\t\tList<Double> copyGroupKeys = new ArrayList<>(orderedGroupKeys);\n\n\t\t// while no need to downfloat then keep downfloating\n\t\tboolean someoneWasDownfloated = true;\n\t\twhile (someoneWasDownfloated) {\n\t\t\tsomeoneWasDownfloated = false;\n\t\t\tfor (Double groupKey : copyGroupKeys) {\n\t\t\t\tMap<String, ChesspairingPlayer> group = groupsByResult.get(groupKey);\n\t\t\t\tint size = group.size();\n\t\t\t\t// if modulo 2 != 0 then find a downfloater\n\t\t\t\tif ((size % 2) != 0) {\n\t\t\t\t\tsomeoneWasDownfloated = true;\n\t\t\t\t\tdownfloatSomeoneInGroup(groupKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (Double groupKey : copyGroupKeys) {\n\t\t\t/**\n\t\t\t * check to make sure the group still exists\n\t\t\t * this is related to bug 02\n\t\t\t */\n\t\t\tif (this.groupsByResult.get(groupKey)== null){\n\t\t\t\t//just move on\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tboolean paringOK = pareGroup(groupKey, roundNumber);\n\t\t\tif (!paringOK) {\n\n\t\t\t\t/*\n\t\t\t\t * downfloat all players from group and then start again all\n\t\t\t\t * parings. Note for the future: you should see if you have\n\t\t\t\t * players that can be pared and then downfloat only those that\n\t\t\t\t * can not be pared. For the moment downfloating all will do.\n\t\t\t\t */\n\t\t\t\t// if this is the last group then join with the previous group\n\t\t\t\tif (copyGroupKeys.size() == 1) {\n\t\t\t\t\tthrow new IllegalStateException(\"What should I do when I only have one group?\");\n\t\t\t\t}\n\t\t\t\tDouble sourceGroup = -1.0;\n\t\t\t\tDouble destGroup = -1.0;\n\t\t\t\t// if this is the last index then join with the previous index\n\t\t\t\tif (copyGroupKeys.indexOf(groupKey) == copyGroupKeys.size() - 1) {\n\t\t\t\t\tint indexSource = copyGroupKeys.indexOf(groupKey);\n\t\t\t\t\tint indexDestination = indexSource - 1;\n\t\t\t\t\tsourceGroup = orderedGroupKeys.get(indexSource);\n\t\t\t\t\tdestGroup = orderedGroupKeys.get(indexDestination);\n\t\t\t\t} else {\n\t\t\t\t\tint indexSource = copyGroupKeys.indexOf(groupKey);\n\t\t\t\t\tint indexDestination = indexSource + 1;\n\t\t\t\t\tsourceGroup = orderedGroupKeys.get(indexSource);\n\t\t\t\t\tdestGroup = orderedGroupKeys.get(indexDestination);\n\t\t\t\t}\n\t\t\t\tjoinGroups(sourceGroup, destGroup);\n\t\t\t\t// and start again\n\t\t\t\tcomputeNextRound(roundNumber);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public Matching solve() {\n while (!matching.freeElements().isEmpty()) {\n /* get first element from the queue */\n Element element = problem.element(matching.freeElements().poll().elemId());\n\n /* get its preference element: looping through its list => by the level value */\n while (!element.preferences().isEmpty()) {\n Element pref = problem.element(element.preferences().poll().elemId());\n\n /* check if is an acceptable partner for current preference */\n if (!pref.accepts(element)) {\n continue;\n }\n\n /* verify the availability of its current preference */\n if (problem.isAvailable(pref.elemId())) {\n problem.element(pref.elemId()).setAvailability(false);\n problem.element(element.elemId()).setAvailability(false);\n matching.addPair(new Pair(element, pref));\n break;\n }\n else {\n /* if the preference is already taken, get the best one between current element and its current match */\n String currMatchName = matching.getElementPair(pref);\n Element currentMatch = pref.getIndex(currMatchName);\n Element elem = pref.getIndex(element.elemId());\n\n /* when current element is better than the current match */\n if (currentMatch.level() > elem.level()){\n if (matching.isFree(elem))\n matching.removeFreeElement(elem);\n\n problem.element(pref.elemId()).setAvailability(false);\n problem.element(element.elemId()).setAvailability(false);\n problem.element(currentMatch.elemId()).setAvailability(true);\n\n /* add the current pair to the Matching and the old match for the woman to the free list */\n matching.addPair(new Pair(problem.element(element.elemId()), problem.element(pref.elemId())));\n\n matching.addFreeElement(problem.element(currMatchName));\n break;\n }\n else {\n matching.addPair(new Pair(currentMatch, pref));\n }\n }\n }\n /* when man was rejected by all its preferences */\n if (element.preferences().isEmpty())\n element.setAvailability(true);\n }\n problem.getSets().get(0).getElements().stream().filter(Element::isAvailable).forEach(Element::remakeList);\n problem.getSets().get(0).getElements().stream().filter(Element::isAvailable).forEach(element -> matching.addFreeElement(problem.element(element.elemId())));\n\n return matching;\n }", "private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }", "public void testScoreboardForBeingJudgedState () throws Exception {\n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20 (a No before first yes)\n \"2,1,A,3,Yes\", // 3 (first yes counts Minute points but never Run Penalty points)\n \"3,1,A,5,No\", // zero -- after Yes\n \"4,1,A,7,Yes\", // zero -- after Yes\n \"5,1,A,9,No\", // zero -- after Yes\n \"6,1,B,11,No\", // zero -- not solved\n \"7,1,B,13,No\", // zero -- not solved\n \"8,2,A,30,Yes\", // 30 (minute points; no Run points on first Yes)\n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n// startExplorer(getOutputDataDirectory());\n \n InternalContest contest = new InternalContest();\n \n int numTeams = 2;\n\n initData(contest, numTeams, 5);\n \n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Run [] runs = contest.getRuns();\n \n for (Run run : runs){\n run.setStatus(RunStates.BEING_JUDGED);\n }\n\n checkOutputXML(contest);\n\n confirmRanks(contest, rankData);\n }", "private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }", "public void solveGame() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\n\t\t\tif(!relaxAllControllables){\n\t\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\n\t\t\t\t\t\tcurrentSet.add(s);\n\t\t\t\t}\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "public Ruteo procedimientoIterativoGrasp(Auxiliar a){\n\t\t double time1= System.currentTimeMillis();\n\t\t\n\t\tDouble mejorCosto=9999999999999999.9;\n\t\tRuteo mejorRuteo=null;\n\t\tlistaSetCovering=new ArrayList<Ruta>();\n\t\tfor(int i=0;i<k;i++){\n\t\t\tHeuristicasTSPManagger h=new HeuristicasTSPManagger();\n\t\t\tList<Obra>tsp=h.CWJPC();\n\n\t\t\tList<Obra>tsp1=a.busquedaLocal(tsp);\n\t\t\n\t\t\tRuteo r2=a.split(tsp1);\n\t\t\tSystem.out.println(r2.rutas);\n\t\t\tlistaSetCovering.addAll(r2.rutas);\n\t\t\tif(mejorCosto>r2.costoTotal){\n\t\t\t\tmejorCosto=r2.costoTotal;\n\t\t\t\tmejorRuteo=r2;\n\t\t\t}\n\t\t}\n\t\t double time2= System.currentTimeMillis();\n\t\t tiempoComputacionalIterGrasp=(time2-time1)/(1000.0*k);\n\t\t tiempoComputacionalGrasp=(time2-time1)/(1000.0);\n\t\treturn mejorRuteo;\n\t}", "public static double winningChances(final Board b, final MNKCellState p) {\n board = b;\n player = p;\n M = board.M;\n N = board.N;\n K = board.K;\n klog = Math.log(K);\n\n double chance = 0;\n\n // check all columns\n for (int i = 0; i < M && M - i + currStreak >= K; i++) {\n reset();\n for (int j = 0; j < N && N - j + currStreak >= K; j++) chance += checkCell(i, j);\n }\n\n // check all rows\n for (int j = 0; j < N && N - j + currStreak >= K; j++) {\n reset();\n for (int i = 0; i < M && M - i + currStreak >= K; i++) chance += checkCell(i, j);\n }\n\n // iterate over all diagonals\n int nDiagonals = (Math.min(N, M) - K) * 2 + 1;\n for (int x = 0; x < nDiagonals; x++) {\n reset();\n int i = 0, j = 0;\n if (x != 0 && x % 2 == 0) i = x / 2;\n else if (x != 0) j = x;\n\n // TODO: don't check useless cells like in prev loops\n while (i < M && j < N) {\n checkCell(i, j);\n j++;\n i++;\n }\n }\n\n // iterate over all counter diagonals\n for (int x = 0; x < nDiagonals; x++) {\n reset();\n int i = 0, j = N - 1;\n if (x != 0 && x % 2 == 0) i = x / 2;\n else if (x != 0) j = N - 1 - x;\n\n while (i < M && j >= 0) {\n checkCell(i, j);\n j--;\n i++;\n }\n }\n\n return chance;\n }", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "private boolean wellFormed() {\n\n\n\t\t\tGroup e = this;\n\n\t\t\tint i = 0;\n\t\t\tif(e.first == null && e.last == null && e.size == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\n\t\t\tCard p = e.first;\n\t\t\tboolean check = false;\n\t\t\tif(e.first != null && e.last != null) {\n\t\t\t\tCard n = null;\n\t\t\t\tif(e.first.prev != null) return report(\"There is a loop\");\n\n\t\t\t\tfor(p = e.first; p.next != null; p = p.next) {\n\n\t\t\t\t\tn = p.next;\n\n\t\t\t\t\tif(n.prev != p) return report(\"p.next is null\");\n\t\t\t\t\tif(this != p.group) {\n\t\t\t\t\t\treturn report(\"this is not set to the group\");\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\n\t\t\t\tif(e.last.next != null) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\n\t\t\t\tfor(Card c = e.first; c.next != null; c = c.next) {\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t\tif(i != this.size-1) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\t\t\t\tcheck = true;\n\t\t\t}\n\t\t\tif(check != true) {\n\t\t\t\tif(i != this.size) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\t\t\t\tif(e.first == null || e.last == null) {\n\t\t\t\t\treturn report(\"Error\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "public boolean pairTest()\n\t{\n\t\tboolean pair = false;\n\t\tint index = 0;\n\t\t\n\t\twhile (index<(hand.length-1) && (!pair))\n\t\t{\n\t\t\tif (intRep[index] == intRep[index+1])\n\t\t\t{\n\t\t\t\tpair = true;\n\t\t\t\thandScore = 10000;\n\t\t\t\thandScore += 2 * (100 * intRep[index]);\n\t\t\t}\n\t\t\telse index++;\n\t\t}\n\t\t\n\t\t// If there's a pair, resolve kickers\n\t\tif (pair)\n\t\t{\n\t\t\tswitch (index)\n\t\t\t{\n\t\t\t\tcase 0:\t\t// Pair includes first two cards\n\t\t\t\t\tif (!twoPairTest(index)) {\n\t\t\t\t\t\tfor (int i=2; i<MAX_CARDS; i++)\n\t\t\t\t\t\t\thandScore += intRep[i]; }\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 1:\t\t// Pair excludes first card, includes 2nd-3rd\n\t\t\t\t\tif (!twoPairTest(index)) {\n\t\t\t\t\t\thandScore += intRep[0];\n\t\t\t\t\t\thandScore += (intRep[3] + intRep[4]); }\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 2:\t\t// Pair excludes first two, includes 3-4\n\t\t\t\t\tif (!twoPairTest(index)) {\n\t\t\t\t\t\thandScore += (intRep[0] + intRep[1]);\n\t\t\t\t\t\thandScore += intRep[4]; }\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\t// Anything else where the kickers are higher than pair\n\t\t\t\t\tif (!twoPairTest(index))\n\t\t\t\t\t\thandScore += (intRep[0] + intRep[1] + intRep[2]);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn pair;\n\t}", "public void solveGame4() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\t\t\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t}\n\n\t\t// Handle the pending states\n\t\twhile (!losing.isEmpty()) {\n\t\t\tS state = losing.poll();\n\n\t\t\t\n\t\t\tlosingStates.add(state);\n\n\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\tfor (S pred : predecessors) {\n\t\t\t\tif(losing.contains(pred) || losingStates.contains(pred))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t//if(i == -1)\n\t\t\t\t\t//continue;\n\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}else{\n\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public void testDeletedProblem() throws Exception {\n \n InternalContest contest = new InternalContest();\n\n int numTeams = 2;\n initData(contest, numTeams , 5);\n String [] runsData = {\n\n \"1,1,A,1,No\", //20\n \"2,1,A,3,Yes\", //3 (first yes counts Minutes only)\n \"3,1,A,5,No\", //20\n \"4,1,A,7,Yes\", //20 \n \"5,1,A,9,No\", //20\n \n \"6,1,B,11,No\", //20 (all runs count)\n \"7,1,B,13,No\", //20 (all runs count)\n \n \"8,2,A,30,Yes\", //30\n \n \"9,2,B,35,No\", //20 (all runs count)\n \"10,2,B,40,No\", //20 (all runs count)\n \"11,2,B,45,No\", //20 (all runs count)\n \"12,2,B,50,No\", //20 (all runs count)\n \"13,2,B,55,No\", //20 (all runs count)\n\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,0,0\",\n \"1,team2,0,0\"\n };\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem probA = contest.getProblems()[0];\n probA.setActive(false);\n contest.updateProblem(probA);\n Problem probA1 = contest.getProblem(probA.getElementId());\n assertEquals(\"probA1 setup\", false, probA1.isActive());\n Problem probA2 = contest.getProblems()[0];\n assertEquals(\"probA2 setup\", false, probA2.isActive());\n confirmRanks(contest, rankData);\n Document document = null;\n\n try {\n DefaultScoringAlgorithm defaultScoringAlgorithm = new DefaultScoringAlgorithm();\n String xmlString = defaultScoringAlgorithm.getStandings(contest, null, log);\n if (debugMode) {\n System.out.println(xmlString);\n }\n // getStandings should always return a well-formed xml\n assertFalse(\"getStandings returned null \", xmlString == null);\n assertFalse(\"getStandings returned empty string \", xmlString.trim().length() == 0);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n document = documentBuilder.parse(new InputSource(new StringReader(xmlString)));\n\n } catch (Exception e) {\n assertTrue(\"Error in XML output \" + e.getMessage(), true);\n e.printStackTrace();\n }\n \n // skip past nodes to find teamStanding node\n NodeList list = document.getDocumentElement().getChildNodes();\n \n int rankIndex = 0;\n \n for(int i=0; i<list.getLength(); i++) {\n Node node = (Node)list.item(i);\n String name = node.getNodeName();\n if (name.equals(\"teamStanding\")){\n String [] standingsRow = fetchStanding (node);\n// Object[] cols = { \"Rank\", \"Name\", \"Solved\", \"Points\" };\n String [] cols = rankData[rankIndex].split(\",\");\n\n if (debugMode) {\n System.out.println(\"SA rank=\"+standingsRow[0]+\" solved=\"+standingsRow[2]+\" points=\"+standingsRow[3]+\" name=\"+standingsRow[1]);\n System.out.println(\" rank=\"+cols[0]+\" solved=\"+cols[2]+\" points=\"+cols[3]+\" name=\"+cols[1]);\n System.out.println();\n System.out.flush();\n }\n \n compareRanking (rankIndex+1, standingsRow, cols);\n rankIndex++;\n } else if(name.equals(\"standingsHeader\")) {\n String problemCount = node.getAttributes().getNamedItem(\"problemCount\").getNodeValue();\n int problemCountInt = Integer.valueOf(problemCount);\n NodeList list2 = node.getChildNodes();\n int foundProblemCount = -1;\n for(int j=0; j<list2.getLength(); j++) {\n Node node2 = (Node)list2.item(j);\n String name2 = node2.getNodeName();\n if (name2.equals(\"problem\")){\n int id = Integer.valueOf(node2.getAttributes().getNamedItem(\"id\").getNodeValue());\n if (id > foundProblemCount) {\n foundProblemCount = id;\n }\n }\n }\n assertEquals(\"problem list max id\",problemCountInt, foundProblemCount);\n assertEquals(\"problemCount\",\"4\", problemCount);\n }\n }\n\n }", "public boolean oneRound (){\r\n\r\n\t if(this.isOver()){\r\n\t\t return false;\r\n\t }\r\n\t \r\n\t //\r\n\t int p= trick.pick(player1);\r\n\t int p2=trick.pick(player2);\r\n\t \r\n\t while(p==p2){\r\n\r\n\t\tfor(int i=0; i<2; i++){\r\n\t\t\t\r\n\r\n\t\t\t if(this.isOver()){\r\n\t\t\t\t \r\n\t\t\t\t p=trick.pick(player1);\r\n\t\t\t\t p2=trick.pick(player2);\r\n\t\t\t\t return false;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t}\r\n\t\tif(p>p2){\r\n\t\t\t\r\n\t\t\tplayer1.pickAll(trick);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tplayer2.pickAll(trick);\r\n\t\t\t\r\n\t\t}\r\n\t }\r\n\treturn true;\r\n\t \r\n }", "private boolean canIGenerateNextRound() {\n\t\tint totalRounds = mTournament.getTotalRounds();\n\t\tint currentRouns = mTournament.getRounds().size();\n\n\t\tList<Integer> roundNumbers = new ArrayList<>();\n\t\tfor (ChesspairingRound round : mTournament.getRounds()) {\n\t\t\tif (roundNumbers.contains(round.getRoundNumber())) {\n\t\t\t\t// you have 2 rounds with the same id\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\troundNumbers.add(round.getRoundNumber());\n\t\t}\n\n\t\tif (currentRouns < totalRounds) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private List<Player> calculatePoints()\n\t{\n\t\tthis.systemDataInput.printMessage(\"Calculating points...\");\n\t\t\n\t\tArrayList<Player> winningPlayers = new ArrayList<Player>();\n\t\tint maxPoints = 0;\n\t\tint maxBuilding = 0;\n\t\t\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\tint points = 0;\n\t\t\tint bestBuilding = 0;\n\t\t\t\n\t\t\tfor(Area area : board.getAreaList())\n\t\t\t{\n\t\t\t\tif (!area.hasDemon())\n\t\t\t\t{\n\t\t\t\t\tif (area.hasBuilding(player))\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints += area.getCost();\n\t\t\t\t\t\tif (area.getCost() > bestBuilding)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbestBuilding = area.getCost();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpoints += 5 * area.getMinionList(player).size();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint playerMoney = player.getMoneyAmount();\n\t\t\tpoints += playerMoney;\n\t\t\t\n\t\t\tfor(Card card : player.getInFrontOfHimDeck())\n\t\t\t{\n\t\t\t\tfor(Action action : card.getActions(BorrowMoneyFromTheBank.class))\n\t\t\t\t{\n\t\t\t\t\tint moneyToPayBack = ((BorrowMoneyFromTheBank)action).getMoneyToPayBack();\n\t\t\t\t\tif (playerMoney >= moneyToPayBack)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= moneyToPayBack;\n\t\t\t\t\t\tplayerMoney -= moneyToPayBack;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= ((BorrowMoneyFromTheBank)action).getPointsToLose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tplayer.addPoints(points);\n\t\t\tplayer.getDataInput().printMessage(points + \" points\");\n\t\t\t\n\t\t\tif (points > maxPoints || (points == maxPoints && bestBuilding > maxBuilding))\n\t\t\t{\n\t\t\t\tmaxPoints = points;\n\t\t\t\tmaxBuilding = bestBuilding;\n\t\t\t\twinningPlayers.clear();\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t\telse if (points == maxPoints && bestBuilding == maxBuilding)\n\t\t\t{\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn winningPlayers;\n\t}", "public PentagoMove quickwin(PentagoBoardState boardState) {\n PentagoBoardState pbs = (PentagoBoardState) boardState.clone();\n ArrayList<PentagoMove> legalmoves = pbs.getAllLegalMoves();\n //ArrayList<Integer> scores = new ArrayList<Integer>();\n for (int i = 0; i < legalmoves.size(); i++) { //loop through all my moves and see if they are a winner\n\n PentagoBoardState newboard = (PentagoBoardState) pbs.clone();\n PentagoMove next = legalmoves.get(i);\n newboard.processMove(next);\n int score = evaluate(newboard);\n if (score > 1200000) { //check if winner if score above 1 200 000\n //System.out.println(\"FOUND A WINNER\" + score);\n return next;\n }\n }\n return null; // if no winner return null\n }", "public void isPlannable() {\n\t\tsession.flush();\n\t\tLong count = (Long) session.createQuery(\"select count(*) from PlanningCard c where c.card.name = :name\")\n\t\t\t.setParameter(\"name\", name).uniqueResult();\n\n\t\tassertThat(count, is(1l));\n\t}", "public int evalPref(Schedule sched) {\n\t\t\n\t\tint failCount = 0;\n\t\tint index = -1;\n\t\tCourse workingCourse;\n\t\tLab workingLab;\n\t\tint testCount = 0;\n\t\t\n\t\t\n\t\tfor(int i = 0;i<preferences.size();i++)\n\t\t{\n\t\t\tindex = preferences.get(i).getY().getIndex();\n\t\t\t\n\t\t\tif(preferences.get(i).getY().getClass() == Course.class) //is a course\n\t\t\t{\n\t\t\t\tworkingCourse = sched.getCourses().get(index);\n\t\t\t\t\n\t\t\t\tif(workingCourse.getSlot() != preferences.get(i).getX())\n\t\t\t\t{\n\t\t\t\t\tfailCount += preferences.get(i).getZ();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse //is a lab\n\t\t\t{\n\t\t\t\tworkingLab = sched.getLabs().get(index);\n\t\t\t\t\n\t\t\t\tif(workingLab.getSlot() != preferences.get(i).getX())\n\t\t\t\t{\n\t\t\t\t\tfailCount += preferences.get(i).getZ();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttestCount += preferences.get(i).getZ();\n\t\t\t\n\t\t}\n\t\t\n\t\t//System.out.println(testCount);\n\t\treturn failCount;\n\t\t\n\t\t/*\n\t\tArrayList<Course> uniqueCourses = new ArrayList<Course>();\n\t\tArrayList<Course> uniqueLabs = new ArrayList<Course>();\n\t\t\n\t\tArrayList<Pair<Course, Integer>> cRunningTotals = new ArrayList<Pair<Course, Integer>>();\n\t\tArrayList<Pair<Course, Integer>> lRunningTotals = new ArrayList<Pair<Course, Integer>>();\n\t\t\n\t\tArrayList<Course> cHasPrefMet = new ArrayList<Course>();\t\n\t\tArrayList<Lab> lHasPrefMet = new ArrayList<Lab>();\n\t\t\n\t\tboolean continueChecking = true;\n\t\tCourse prefCourse, workingCourse;\n\t\tLab prefLab, workingLab;\n\t\tTimeSlot prefTimeSlot, workingTimeSlot;\n\t\tint prefValue;\n\t\tint totalToReturn = 0;\n\t\t\n\t\t//Traverse through preferences to find the unique courses and labs\n\t\t//because each lab and course can have more than one \n\t\tfor(int i = 0;i<preferences.size();i++)\n\t\t{\n\t\t\tif(preferences.get(i).getY().getClass() == Course.class)//working with a course\n\t\t\t{\n\t\t\t\tif(!uniqueCourses.contains(preferences.get(i).getY()))\n\t\t\t\t{\n\t\t\t\t\tuniqueCourses.add(preferences.get(i).getY());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse //working with a class\n\t\t\t{\n\t\t\t\tif(!uniqueLabs.contains((Lab) preferences.get(i).getY()))\n\t\t\t\t{\n\t\t\t\t\tuniqueLabs.add((Lab)preferences.get(i).getY());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Now have two lists that contains all the unique courses and labs\n\t\t//-----\n\t\t\n\n\t\tfor(int i = 0; i<uniqueCourses.size();i++)\n\t\t{\n\t\t\tcRunningTotals.add(new Pair<Course, Integer>(uniqueCourses.get(i), 0));\n\t\t}\n\t\t\n\n\t\tfor(int i = 0; i<uniqueLabs.size();i++)\n\t\t{\n\t\t\tlRunningTotals.add(new Pair<Course, Integer>(uniqueLabs.get(i), 0));\n\t\t}\n\t\t\n\t\t//Have a running total pair for each unique course\n\t\t//When we find one that meets a single preference\n\t\t//then set that total to zero and don't change it anymore \n\t\t\n\t\t//Go through the preferences check if they are upheld\n\t\tfor(int i = 0; i<preferences.size();i++)\n\t\t{\n\t\t\tprefTimeSlot = preferences.get(i).getX();\n\t\t\tprefValue = preferences.get(i).getZ();\n\t\t\tcontinueChecking = true;\n\t\t\t\n\t\t\t//If it's a lab, if not, must be a class\n\t\t\tif(preferences.get(i).getY().getClass() == Lab.class)\n\t\t\t{\n\t\t\t\tprefLab = (Lab) preferences.get(i).getY();\n\t\t\t\t\n\t\t\t\t//Want to check if we have met a preference for this course already\n\t\t\t\t//If we have, we don't need to do a check for this preference s\n\t\t\t\tfor(int j = 0;j<lHasPrefMet.size();j++)\n\t\t\t\t{\n\t\t\t\t\tif(prefLab.equals(lHasPrefMet.get(j)))\n\t\t\t\t\t\tcontinueChecking = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(continueChecking == true)\n\t\t\t\t{\n\t\t\t\t\t//Have to find this lab in the schedule and look to see if\n\t\t\t\t\t//it's in the correct time slot\nA:\t\t\t\t\tfor(int j = 0;j<sched.getLabs().size();j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tworkingLab = sched.getLabs().get(j);\n\t\t\t\t\t\tworkingTimeSlot = workingLab.getSlot();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(workingLab.equals(prefLab))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif((workingTimeSlot.getDay().equals(prefTimeSlot.getDay())) &&\n\t\t\t\t\t\t\t\t\t(workingTimeSlot.getStartTime() == prefTimeSlot.getStartTime()) &&\n\t\t\t\t\t\t\t\t\t(workingTimeSlot.getMaxNum() == prefTimeSlot.getMaxNum())\n\t\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//If we met the pref, we add it so this course won't be \n\t\t\t\t\t\t\t\t//checked again cause a course can have more than 1 pref. and\n\t\t\t\t\t\t\t\t//Obviously not all can be met\n\t\t\t\t\t\t\t\tlHasPrefMet.add(workingLab);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Find this lab in lRunningTotals and set it to zero\n\t\t\t\t\t\t\t\t\nX:\t\t\t\t\t\t\t\tfor(int k = 0; k<lRunningTotals.size();k++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tLab temp;\n\t\t\t\t\t\t\t\t\ttemp = (Lab) lRunningTotals.get(k).getKey();\n\t\t\t\t\t\t\t\t\tif(temp.equals(workingLab))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlRunningTotals.set(k, new Pair<Course, Integer>(prefLab, 0));\n\t\t\t\t\t\t\t\t\t\tbreak X;\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\tbreak A;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//The lab did not meet the preferences being tested\n\t\t\t\t\t\t\t\t//so we need to add it's prefValue to the total for \n\t\t\t\t\t\t\t\t//that unique course\nQ:\t\t\t\t\t\t\t\tfor(int k = 0; k<lRunningTotals.size();k++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tLab temp;\n\t\t\t\t\t\t\t\t\tint tempTotal;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttempTotal = lRunningTotals.get(k).getValue();\n\t\t\t\t\t\t\t\t\ttemp = (Lab) lRunningTotals.get(k).getKey();\n\t\t\t\t\t\t\t\t\tif(temp.equals(workingLab))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlRunningTotals.set(k, new Pair<Course, Integer>(prefLab, tempTotal + prefValue));\n\t\t\t\t\t\t\t\t\t\tbreak Q;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak A;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//SO, they are the same class, now check time slot and break out\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\telse //If the preference is talking about a course\n\t\t\t{\n\n\t\t\t\tprefCourse = preferences.get(i).getY();\n\t\t\t\t//Want to check if we have met a preference for this course already\n\t\t\t\tfor(int j = 0;j<cHasPrefMet.size();j++)\n\t\t\t\t{\n\t\t\t\t\tif(prefCourse.equals(cHasPrefMet.get(j)))\n\t\t\t\t\t\tcontinueChecking = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(continueChecking == true)\n\t\t\t\t{\n\t\t\t\t\t//Have to find this course in the schedule and look to see if\n\t\t\t\t\t//it's in the correct time slot\nB:\t\t\t\t\tfor(int j = 0;j<sched.getCourses().size();j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tworkingCourse = sched.getCourses().get(j);\n\t\t\t\t\t\tworkingTimeSlot = workingCourse.getSlot();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(workingCourse.equals(prefCourse))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tSystem.out.print(workingCourse.getDepartment());\n\t\t\t\t\t\t\tSystem.out.print(\" \" + workingCourse.getNumber());\n\t\t\t\t\t\t\tSystem.out.print(\" \" + workingCourse.getSection());\n\t\t\t\t\t\t\tSystem.out.println();\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.print(workingTimeSlot.getDay());\n\t\t\t\t\t\t\tSystem.out.print(\" \" + workingTimeSlot.getStartTime());\n\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tSystem.out.print(prefTimeSlot.getDay());\n\t\t\t\t\t\t\tSystem.out.print(\" \" + prefTimeSlot.getStartTime());\n\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif((workingTimeSlot.getDay().equals(prefTimeSlot.getDay())) &&\n\t\t\t\t\t\t\t\t\t(workingTimeSlot.getStartTime() == prefTimeSlot.getStartTime()) &&\n\t\t\t\t\t\t\t\t\t(workingTimeSlot.getMaxNum() == prefTimeSlot.getMaxNum())\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t//Same ideas as when doing labs\n\t\t\t\t\t\t\t\tcHasPrefMet.add(workingCourse);\nY:\t\t\t\t\t\t\t\tfor(int k = 0; k<cRunningTotals.size();k++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tCourse temp;\n\t\t\t\t\t\t\t\t\ttemp = cRunningTotals.get(k).getKey();\n\t\t\t\t\t\t\t\t\tif(temp.equals(workingCourse))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcRunningTotals.set(k, new Pair<Course, Integer>(prefCourse, 0));\n\t\n\t\t\t\t\t\t\t\t\t\tbreak Y;\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\tbreak B;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\nP:\t\t\t\t\t\t\t\tfor(int k = 0; k<cRunningTotals.size();k++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tCourse temp;\n\t\t\t\t\t\t\t\t\tint tempTotal;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttempTotal = cRunningTotals.get(k).getValue();\n\t\t\t\t\t\t\t\t\ttemp = cRunningTotals.get(k).getKey();\n\t\t\t\t\t\t\t\t\tif(temp.equals(workingCourse))\n\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tcRunningTotals.set(k, new Pair<Course, Integer>(prefCourse, tempTotal + prefValue));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tbreak P;\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak B;\n\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}\n\t\t}\n\t\t\n\t\t//Add up our fail totals\n\t\tfor(int i = 0;i<cRunningTotals.size();i++)\n\t\t{\n\t\t\ttotalToReturn += cRunningTotals.get(i).getValue();\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0;i<lRunningTotals.size();i++)\n\t\t{\n\t\t\ttotalToReturn += lRunningTotals.get(i).getValue();\n\t\t}\n\t\t\n\t\t\n\t\treturn totalToReturn;\n\t\t\n\t\t*/\n\t}", "@Override\n\t\tpublic boolean goalTest() {\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tif (state[i] != xGoals[i] || state[i + k] != yGoals[i]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "static boolean isSolved() {\n\t\tfor (int i=0; i<Play.NUM[TOTAL]; i++) {\t\n\t\t\tif (!isPieceCorrect(Play.jigsawPieces.get(i))) { //check if the piece is in the correct position and orientation\n\t\t\t\treturn false; //return if even once piece is not\n\t\t\t}\n\t\t}\n\t\treturn true; //if the method reached here, then it means that all the pieces are correctly placed\n\t}", "private static boolean isProbablePrime(BigInteger n, int k) {\n if (n.compareTo(ONE) == 0)\n return false;\n if (n.compareTo(THREE) < 0)\n return true;\n int s = 0;\n BigInteger d = n.subtract(ONE);\n while (d.mod(TWO).equals(ZERO)) {\n s++;\n d = d.divide(TWO);\n }\n for (int i = 0; i < k; i++) {\n BigInteger a = uniformRandom(TWO, n.subtract(ONE));\n BigInteger x = a.modPow(d, n);\n if (x.equals(ONE) || x.equals(n.subtract(ONE)))\n continue;\n int r = 0;\n for (; r < s; r++) {\n x = x.modPow(TWO, n);\n if (x.equals(ONE))\n return false;\n if (x.equals(n.subtract(ONE)))\n break;\n }\n if (r == s) // None of the steps made x equal n-1.\n return false;\n }\n return true;\n }", "private void generateFirstRound() {\n\t\tif (this.mTournament.getRounds().size() > 0) {\n\t\t\tthrow new IllegalStateException(\"Tournament allready contains round 1\");\n\t\t}\n\n\t\tCollections.sort(mTournament.getPlayers(), new ByEloReverce());\n\t\tList<ChesspairingGame> games = new ArrayList<>();\n\t\tList<ChesspairingPlayer> players = mTournament.getPlayers();\n\t\tint count = 0;\n\t\tChesspairingGame game = new ChesspairingGame();\n\t\tgame.setTableNumber(0);\n\t\tfor (ChesspairingPlayer player : players) {\n\t\t\tcount++;\n\t\t\tif (count % 2 == 1) {\n\t\t\t\tint tableNumber = game.getTableNumber() + 1;\n\t\t\t\tgame = new ChesspairingGame();\n\t\t\t\tgame.setTableNumber(tableNumber);\n\t\t\t\tgame.setWhitePlayer(player);\n\t\t\t\tif (count == players.size()) {\n\t\t\t\t\tgame.setResult(ChesspairingResult.BYE);\n\t\t\t\t\tgames.add(game);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tgame.setBlackPlayer(player);\n\t\t\t\tgame.setResult(ChesspairingResult.NOT_DECIDED);\n\t\t\t\tgames.add(game);\n\t\t\t}\n\t\t}\n\t\tChesspairingRound round = new ChesspairingRound();\n\t\tround.setRoundNumber(1);\n\t\tround.setGames(games);\n\n\t\t// is the first round so wee can create all new data\n\t\tList<ChesspairingRound> rounds = new ArrayList<>();\n\n\t\t// add the round\n\t\trounds.add(round);\n\n\t\t// and wee set the rounds\n\t\tmTournament.setRounds(rounds);\n\n\t\tPairingSummary firstRoundOk = new PairingSummary();\n\t\tfirstRoundOk.setShortMessage(PairingSummary.PARRING_OK);\n\t\tfirstRoundOk.setLongMessage(\"First round was generated\");\n\t\tmTournament.setParringSummary(firstRoundOk);\n\t}", "private void chooseBestPiece() {\n\n int maxKillCount = 0;\n int tempKillCount;\n int piecesWithEqualMaxCount = 0;\n\n int bestPieceX = 0;\n int bestPieceY = 0;\n\n for (int y = 0; y < boardSize; y++) {\n for (int x = 0; x < boardSize; x++) {\n //check every piece\n Field field = board[y][x];\n if (field.getPiece() != null && field.getPiece().getPieceColor() == round) {\n tempKillCount = countAvailableKills(x, y, 0, this.board);\n //count piece kill score\n if (tempKillCount > maxKillCount) {\n maxKillCount = tempKillCount;\n piecesWithEqualMaxCount = 1;\n bestPieceX = x;\n bestPieceY = y;\n } else if (tempKillCount == maxKillCount) {\n piecesWithEqualMaxCount += 1;\n }\n }\n }\n }\n\n if (piecesWithEqualMaxCount == 1 && maxKillCount != 0) {\n bestPieceToMove = board[bestPieceY][bestPieceX].getPiece();\n bestPieceFound = true;\n\n findOptimalMove(bestPieceX, bestPieceY);\n\n System.out.println(\"Best piece found, kill score = \" + maxKillCount);\n } else if (piecesWithEqualMaxCount > 1) {\n bestPieceToMove = null;\n bestPieceFound = false;\n\n if (maxKillCount == 0) {\n //if every piece has same kill score equal to 0 there is no kill available\n killAvailable = false;\n System.out.println(\"No piece can kill\");\n } else {\n killAvailable = true;\n System.out.println(\"Some pieces has same kill score = \" + maxKillCount + \", user can choose which to move\");\n }\n }\n }", "private boolean revisar(GrafoAristaPonderada G) {\n\n // check peso\n double pesoTotal = 0.0;\n for (Arista a : aristas()) {\n pesoTotal += a.peso();\n }\n if (Math.abs(pesoTotal - peso()) > EPSILON_PUNTO_FLOTANTE) {\n System.err.printf(\n \"Peso de la aristas no es igual a peso(): %f vs. %f\\n\",\n pesoTotal, peso());\n return false;\n }\n\n // check that it is acyclic\n UF uf = new UF(G.V());\n for (Arista e : aristas()) {\n int v = e.unVertice(), w = e.otroVertice(v);\n if (uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque\");\n return false;\n }\n uf.union(v, w);\n }\n\n // check that it is a spanning forest\n for (Arista a : G.aristas()) {\n int v = a.unVertice(), w = a.otroVertice(v);\n if (!uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque de expansion\");\n return false;\n }\n }\n\n // check that it is a minimal spanning forest (cut optimality conditions)\n for (Arista a : aristas()) {\n\n // all aristas in MST except a\n uf = new UF(G.V());\n for (Arista o : aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (o != a) uf.union(x, y);\n }\n\n // check that e is min peso edge in crossing cut\n for (Arista o : G.aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (!uf.estanConectados(x, y)) {\n if (o.peso() < a.peso()) {\n System.err.println(\"Arista \" + o + \n \" viola las condiciones de optimalidad\"\n + \"del corte\");\n return false;\n }\n }\n }\n\n }\n\n return true;\n }", "public static List<List> calculateCost(List<List> papa_list){\n /*\n algo for evaluation:\n if contains 2 \n yes - check if also contains 1\n yes - drop it, continue\n no - count # of 2's, add points twice, continue\n no - check if contains 1\n yes - count # of 1's, subtract points, continue\n no - line of 0's - drop it\n */\n\n int points = 0;\n int count =0;\n for(int i=0;i<papa_list.size();i++){\n points = 0;\n List<Integer> temp = papa_list.get(i);\n if(temp.contains(2)){\n if(temp.contains(1)){\n temp.add(points);\n }\n else{\n count =0; \n for(int num : temp){\n if(num==2){\n count++;\n }\n }\n points+=count;\n //playing offensive game: you get more points for attacking (playing to win) rather than defensing (cancelling out opponent's move) \n //temp.add(2*points);\n temp.add(points);\n }\n }\n else if(temp.contains(1)){\n count =0; \n for(int num : temp){\n if(num==1){\n count--;\n }\n }\n points+=count;\n temp.add(points);\n }\n else{\n temp.add(points);\n }\n }\n return papa_list; \n }", "private static int evaluateBoard(final int[][] givenBoard) {\n final int[][] board = cloneBoard(givenBoard);\n\n final int numRows = givenBoard.length;\n final int numCols = givenBoard[0].length;\n\n \n // If the game is complete\n if (!Utils.hasMove(board)) {\n // Find largest absolute move value for player and opponent\n int playerScore = 0;\n int opponentScore = 0;\n for (final int[] row : board) {\n for (final int val : row) {\n if (val > playerScore) playerScore = val;\n if (val < opponentScore) opponentScore = val;\n } \n }\n // Give a big reward + the ammount we won the game by\n return WIN_REWARD + playerScore + opponentScore;\n }\n boardsEvaluated++;\n\n \n // If the game is incomplete, return the diference between the average \n // distance that the player and opponent are from each empty square\n int[][] playerDistances = distanceGrid(board);\n int[][] opponentDistances = distanceGrid(flipBoard(board));\n \n int totalPlayerDistance = 0;\n int totalOpponentDistance = 0;\n \n int maxPlayerDistance = 0;\n int maxOpponentDistance = 0;\n \n \n int largestPlayerMove = 0;\n int smallestOpponentMove = 0;\n \n int numEmptySpaces = 0;\n \n for (int r = 0; r < numRows; r++) {\n for (int c = 0; c < numCols; c++) {\n if (playerDistances[r][c] > 0) {\n totalPlayerDistance += playerDistances[r][c];\n numEmptySpaces++;\n }\n if (opponentDistances[r][c] > 0) {\n totalOpponentDistance += opponentDistances[r][c];\n }\n \n int boardVal = board[r][c];\n if (largestPlayerMove < boardVal) largestPlayerMove = boardVal;\n if (smallestOpponentMove > boardVal) smallestOpponentMove = boardVal;\n \n } \n }\n int averageDistanceDifference = totalOpponentDistance - totalPlayerDistance;\n\n int largestMoveDifference = largestPlayerMove + smallestOpponentMove;\n\n\n return averageDistanceDifference + largestMoveDifference;\n }", "private void suitRule(Player p){\n if(((p.getPlayCard().getSuit() == trump.getSuit()) && (winner.getPlayCard().getSuit() == trump.getSuit()) )|| (winner.getPlayCard().getSuit() == p.getPlayCard().getSuit())){\n numberRule(p);\n }\nif(p.getPlayCard().getSuit() == trump.getSuit() && winner.getPlayCard().getSuit() != p.getPlayCard().getSuit()){\n setWinner(p);\n }\n\n }", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "private void genProb() {\n\t\tint row;\n\t\tint column;\n\t\tint removed1;\n\t\tint removed2;\n\n\t\tfor (int i = 0; i < DIFFICULTY / 2;) {\n\t\t\trow = rand.nextInt(9);\n\t\t\tcolumn = rand.nextInt(9);\n\t\t\twhile (problem[row][column] == 0 || (row == 4 && column == 4)) {\n\t\t\t\trow = rand.nextInt(9);\n\t\t\t\tcolumn = rand.nextInt(9);\n\t\t\t}\n\n\t\t\t// Clearing random boxes.\n\t\t\tremoved1 = problem[row][column];\n\t\t\tremoved2 = problem[8 - row][8 - column];\n\t\t\tproblem[row][column] = 0;\n\t\t\tproblem[8 - row][8 - column] = 0;\n\n\t\t\tcopy(problem, comp);\n\n\t\t\tif (!solve(0, 0, 0, comp)) { // Case of unsolvable.\n\t\t\t\t// Putting back original values.\n\t\t\t\tproblem[row][column] = removed1;\n\t\t\t\tproblem[8 - row][8 - column] = removed2;\n\t\t\t} else {\n\t\t\t\tif (unique()) { // Case of solution is unique.\n\t\t\t\t\ti++;\n\t\t\t\t} else { // Case of solution is not unique.\n\t\t\t\t\t// Putting back original values.\n\t\t\t\t\tproblem[row][column] = removed1;\n\t\t\t\t\tproblem[8 - row][8 - column] = removed2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected double tripodEval(Gameboard board, int player) {\n\t\t\n\t\tList<List<Hexagon>> hexBoard = board.getBoard();\n\t\t\n\t\tWinChecker winCheck = new WinChecker();\n\t\t\n\t\tint minIndex = 0;\n\t\tint minPriority = Integer.MAX_VALUE;\n\t\tint counter = 0;\n\n\t\t//board.printBoard(System.out);\n\t\t\n\t\tinitialisePriorityValues(hexBoard, player);\n\t\t\n//\t\tfor(List<Hexagon> tempList : hexBoard){\n//\t\t\tfor(Hexagon tempHex : tempList){\n//\t\t\t\tif(tempHex == null){\n//\t\t\t\t\tcontinue;\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t\tSystem.out.print(\" \" + tempHex.getPriorityValue());\n//\t\t\t\t\n//\t\t\t}\n//\t\t\tSystem.out.println();\n//\t\t}\n\n\t\tif (winCheck.tripodWin(board, player)) {\n\t\t\tSystem.out.println(\"A tripod win has been detected for \" + \n\t\t\t\t\tplayer);\n//\t\t\tboard.printBoard(System.out);\n\t\t\tMove toForce = board.getUpdatedMove();\n\t\t\ttoForce.P = swapPlayer(toForce.P);\n\t\t\tthis.forcedMove = toForce;\n\n\t\t\treturn 100000;\n\t\t}\n\n\t\tint opponent = 0;\n\n\t\t// Determining the colour of the opponent\n\t\tif (player == WHITE) {\n\t\t\topponent = BLACK;\n\t\t} else if (player == BLACK) {\n\t\t\topponent = WHITE;\n\t\t}\n\n\t\tint number = 0, minNum = Integer.MAX_VALUE, order = 1;\n\n\t\t//Variable for counting the number of edges that have been hit so far\n\t\tint[] edgeCounter = new int[6];\n\t\tfor (int i = 0; i < 6; i++) {\n\t\t\tedgeCounter[i] = 0;\n\t\t}\n\n\t\t//A queue of possible hexagons\n\t\tArrayList<Hexagon> hexQueue = new ArrayList<Hexagon>();\n\n\t\tfor (List<Hexagon> tempList : hexBoard) {\n\t\t\tinnerloop: for (Hexagon tempHex : tempList) {\n\n\t\t\t\tif (tempHex == null) {\n\t\t\t\t\tcontinue innerloop;\n\t\t\t\t}\n\n\t\t\t\tif (tempHex.getValue() != player) {\n\t\t\t\t\tcontinue innerloop;\n\t\t\t\t} else if (tempHex.getChecked() != 0) {\n\t\t\t\t\tcontinue innerloop;\n\t\t\t\t} else if(tempHex.isCorner()){\n\t\t\t\t\tcontinue innerloop;\n\t\t\t\t}\n\n\t\t\t\tif (tempHex.getValue() == player) {\n\t\t\t\t\thexQueue.add(tempHex);\n//\t\t\t\t\tSystem.out.println(\"The hex we are adding is at \" + \n\t\t\t\t\t//tempHex.getRow() + \" , \" + tempHex.getColumn());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(tempHex.getIsEdge() && !tempHex.isCorner()){\n\t\t\t\t\tint index1 = tempHex.whichEdge();\n\t\t\t\t\tif (index1 != -1) {\n\t\t\t\t\t\tedgeCounter[index1] = 1;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(index1 + \",\" + edgeCounter[index1]);\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\twhile (!hexQueue.isEmpty()) {\n\t\t\t\t\t\n\t\t\t\t\t//Finding the next hexagon with the highest priority\n\t\t\t\t\tcounter = 0;\n\t\t\t\t\tminIndex = 0;\n\t\t\t\t\tminPriority = Integer.MAX_VALUE;\n\t\t\t\t\tfor(Hexagon minHex: hexQueue){\n\t\t\t\t\t\tif(minHex.getPriorityValue() < minPriority){\n\t\t\t\t\t\t\tminPriority = minHex.getPriorityValue();\n\t\t\t\t\t\t\tminIndex = counter;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t}\n\t\t\t\t\tHexagon currentHex = hexQueue.get(minIndex);\n\t\t\t\t\thexQueue.remove(minIndex);\n\t\t\t\t\t\n\t\t\t\t\t//\"Increasing\" the priority of the surrounding hexagons\n\t\t\t\t\tif(currentHex.getValue() == EMPTY){\n\t\t\t\t\t\tcurrentHex.updatePriorityValue(player, hexBoard, \n\t\t\t\t\t\t\t\thexQueue);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding if the current hexagon is on the edge\n\t\t\t\t\tint loc1 = 0;\n\t\t\t\t\tif(currentHex.getIsEdge()){\n\t\t\t\t\t\tint k = currentHex.whichEdge();\n\t\t\t\t\t\tloc1 = k;\n\t\t\t\t\t\tif(k != -1){\n\t\t\t\t\t\t\tif(currentHex.getValue() == EMPTY && \n\t\t\t\t\t\t\t\t\tedgeCounter[k] == 1){\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tedgeCounter[k] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"loc = \"+ loc1 + \" \" + \"edgeCounter = \"\n//\t\t\t\t\t\t\t+ edgeCounter[loc1]);\n\t\t\t\t\tadjLoop : for (Coordinate coords : currentHex.adjacencies)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif (coords.getRow() == 999 || coords.getColumn() \n\t\t\t\t\t\t\t\t== 999) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tHexagon nextHex = hexBoard.get(coords.getRow()).get(\n\t\t\t\t\t\t\t\tcoords.getColumn());\n\n\t\t\t\t\t\tif(nextHex.getValue() == opponent){\n\t\t\t\t\t\t\tcontinue adjLoop;\n\t\t\t\t\t\t} else if(nextHex.isCorner()){\n\t\t\t\t\t\t\tcontinue adjLoop;\n\t\t\t\t\t\t} else if(nextHex.getChecked() != 0){\n\t\t\t\t\t\t\tcontinue adjLoop;\n\t\t\t\t\t\t} else if(hexQueue.contains(nextHex)){\n\t\t\t\t\t\t\tcontinue adjLoop;\n\t\t\t\t\t\t} else if(nextHex.getIsEdge()){\n\t\t\t\t\t\t\tint loc = nextHex.whichEdge();\n\t\t\t\t\t\t\tif(loc != -1){\n\t\t\t\t\t\t\t\tif(edgeCounter[loc] == 1){\n\t\t\t\t\t\t\t\t\tcontinue adjLoop;\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\n\t\t\t\t\t\thexQueue.add(nextHex);\n\n\t\t\t\t\t}// End of adjacency loop\n\n\t\t\t\t\t//Finding the number of empty hexagons we have traversed\n\t\t\t\t\tif (currentHex.getValue() == EMPTY) {\n\t\t\t\t\t\tnumber++;\n\t\t\t\t\t}\n\n//\t\t\t\t\tSystem.out.println(\"CurrentHex: \" + currentHex.getRow() + \n//\t\t\t\t\t\t\t\",\" + currentHex.getColumn() + \",\" + \n//\t\t\t\t\t\t\tcurrentHex.getValue());\n\t\t\t\t\t\n\t\t\t\t\tcurrentHex.setChecked(order);\n\t\t\t\t\torder++;\n\t\t\t\t\t\n\n\n\t\t\t\t\t//Finding the number of edges that have been hit \n\t\t\t\t\t//for this search\n\t\t\t\t\tint sum = 0;\n\t\t\t\t\tfor (int i = 0; i < 6; i++) {\n\t\t\t\t\t\tsum += edgeCounter[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (sum >= 3) {\n\t\t\t\t\t\t// Possible tripod\n\t\t\t\t\t\twhile (!hexQueue.isEmpty()) {\n\t\t\t\t\t\t\thexQueue.clear();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}// End of While Loop\n\t\t\t\t\n\t\t\t\t//Reseting the edge counter for the next search\n\t\t\t\tfor(int x = 0; x < 6; x++){\n\t\t\t\t\tedgeCounter[x] = 0;\n\t\t\t\t}\n\n\t\t\t\tif (number < minNum) {\n//\t\t\t\t\tSystem.out.println(number);\n\t\t\t\t\tminNum = number;\n\t\t\t\t}\n\t\t\n\t\t\t\t\n//\t\t\t\tfor(List<Hexagon> tempList1 : hexBoard){\n//\t\t\t\t\tfor(Hexagon tempHex1 : tempList1){\n//\t\t\t\t\t\tif(tempHex1 == null){\n//\t\t\t\t\t\t\tcontinue;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\n//\t\t\t\t\t\tSystem.out.print(\" \" + tempHex1.getPriorityValue());\n//\t\t\t\t\t\t\n//\t\t\t\t\t}\n//\t\t\t\t\tSystem.out.println();\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Re-initisalising Priority Values\n\t\t\t\tinitialisePriorityValues(hexBoard, player);\n\t\t\t\t\n\t\t\t\tnumber = 0;\n\n\t\t\t}// End of inner for loop\n\t\t}// End of outer for loop\n\n\t\tSystem.out.println(\"minnum = \" + minNum);\n\n\t\t\n\t\t\n//\t\tresetTreeEval(hexBoard);\n\t\tif (minNum == 0)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn 100.0 / minNum;\n\t}", "public Policy solve(Problem prob, int iterations) {\n\t\t\tPolicy policy = new Policy(prob);\n\t\t\tint row;\n\t\t\tint col;\n\t\t\tfor (int i=0; i<= ITERATIONS ; i++)\n\t\t\t{\n\n\t\t\t\trow = rng.nextInt(prob.map.size());\n\t\t\t\tcol = rng.nextInt(prob.map.get(0).size());\t\t\t\t\t\t\t\n\t\t\t\tfetchUtilityValue(prob, row, col, policy);\n\n\t\t\t}\n\n\t\t\tfor (int r = 0; r < rewards.length; r++) \n\t\t\t{\n\t\t\t\tfor (int c = 0; c < rewards[0].length; c++) \n\t\t\t\t{\n\t\t\t\t\tif(policy.bestActions[r][c] == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tint direction =0;\n\t\t\t\t\t\tdouble maxQVal = Integer.MIN_VALUE;\n\t\t\t\t\t\tfor(int i=0; i< ACTION_COUNT ; i++)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif(utilities[i][r][c] > maxQVal)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmaxQVal = utilities[i][r][c];\n\t\t\t\t\t\t\t\tdirection = i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpolicy.bestActions[r][c] = DIRECTION[direction];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn policy;\n\t\t}", "private int evaluateState() {\r\n\r\n\t\t// add up score\r\n\t\t//\r\n\t\tint scoreWhite = 0;\r\n\t\tint scoreBlack = 0;\r\n\t\tfor (Piece piece : this.chessGame.getPieces()) {\r\n\t\t\tif(piece.getColor() == Piece.COLOR_BLACK){\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else if( piece.getColor() == Piece.COLOR_WHITE){\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else{\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"unknown piece color found: \"+piece.getColor());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// return evaluation result depending on who's turn it is\r\n\t\tint gameState = this.chessGame.getGameState();\r\n\t\t\r\n\t\tif( gameState == ChessGame.GAME_STATE_BLACK){\r\n\t\t\treturn scoreBlack - scoreWhite;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_WHITE){\r\n\t\t\treturn scoreWhite - scoreBlack;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_END_WHITE_WON\r\n\t\t\t\t|| gameState == ChessGame.GAME_STATE_END_BLACK_WON){\r\n\t\t\treturn Integer.MIN_VALUE + 1;\r\n\t\t\r\n\t\t}else{\r\n\t\t\tthrow new IllegalStateException(\"unknown game state: \"+gameState);\r\n\t\t}\r\n\t}", "boolean condition(PetriP[] pp) { //Нумерація позицій тут відносна!!! inP.get(i) - номер позиції у списку позицій, який побудований при конструюванні мережі Петрі,\n\n boolean a = true;\n boolean b = true; // Саме тому при з\"єднанні спільних позицій зміна номера не призводить до трагічних наслідків (руйнування зв\"язків)!!!\n for (int i = 0; i < inP.size(); i++) {\n if (pp[inP.get(i)].getMark() < quantIn.get(i)) {\n a = false;\n break;\n }\n }\n for (int i = 0; i < inPwithInf.size(); i++) {\n if (pp[inPwithInf.get(i)].getMark() < quantInwithInf.get(i)) {\n b = false;\n break;\n }\n }\n return a && b;\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 }", "@Test\n public void partitionCorrectness() {\n List<Integer> ns = new Node<>(5, new Node<>(3,\n new Node<>(7, new Node<>(1, new Empty<>()))));\n List<Integer> empty = new Empty<>();\n assertFalse(DP.bupartition(ns, 2));\n assertTrue(DP.bupartition(ns, 8));\n assertTrue(DP.bupartition(ns, 6));\n assertTrue(DP.bupartition(ns,4));\n assertTrue(DP.bupartition(ns,11));\n assertFalse(DP.bupartition(empty, 6));\n }", "public boolean isSolvable() {\n Board twin = initial.twin();\n MinPQ<Node> mainQueue = new MinPQ<>(getComparator());\n MinPQ<Node> twinQueue = new MinPQ<>(getComparator());\n mainQueue.insert(new Node(initial, 0, null));\n twinQueue.insert(new Node(twin, 0, null));\n while (this.solution == null) {\n Node temp = mainQueue.delMin();\n if (temp.board.isGoal()) {\n this.solution = temp;\n return true;\n }\n Iterable<Board> nebrs = temp.board.neighbors();\n for (Board x : nebrs) {\n if (!x.equals(temp.previousNode.board)) {\n mainQueue.insert(new Node(x, temp.movesToBoard + 1, temp));\n }\n }\n Node temp2 = twinQueue.delMin();\n if (temp2.board.isGoal()) {\n this.solution = null;\n return false;\n }\n Iterable<Board> nebrs2 = temp2.board.neighbors();\n for (Board x : nebrs2) {\n if (!x.equals(temp2.previousNode.board)) {\n twinQueue.insert(new Node(x, temp2.movesToBoard + 1, temp2));\n }\n }\n }\n return false;\n }", "public boolean isPuzzleSolved() {\n\t\t// check rows/col/block )\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif ((this.constraints[i][0].nextClearBit(1) < N + 1) || (this.constraints[0][i].nextClearBit(1) < N + 1)\n\t\t\t\t\t|| (this.constraints[N + 1][i].nextClearBit(1) < N + 1))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void updateLastCardDiscarded(){\r\n\t\tint x = 0;\r\n\t\twhile(this != game.getPlayer(x++)){} // find the nextPlayer\r\n\t\tx = x % game.getNumberOfPlayers();\r\n\t\tnextPlayer = game.getPlayer(x);\r\n\t\t\r\n\t\tif(latestRound != game.getRoundNumber()){ // if it's a new Round, reset\r\n\t\t\tpickedUpCards = new ArrayList<Card>();\r\n\t\t\tlastCardDiscarded = null;\r\n\t\t\tlatestRound = game.getRoundNumber();\r\n\t\t\t\r\n\t\t\tfor(int y = 0; y < game.getNumberOfPlayers(); y++){ // ?????\r\n\t\t\t\tif(game.getPlayer(y) != this && \r\n\t\t\t\t\t\t(getScore() >= game.getPlayer(y).getScore() || getPhase() > game.getPlayer(y).getPhase())){//????\r\n\t\t\t\t\tsetName(oldName);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetName(oldName + \"is#WINNING\"); // ?????\r\n\t\t}else if(lastCardDiscarded != null && Configuration.getTypeRequired(nextPlayer.getPhase(), 0) == Configuration.SET_PHASE){\r\n\t\t\tif(nextPlayer.drewFromDiscard())\r\n\t\t\t\tpickedUpCards.add(lastCardDiscarded); // add the card to picked up card if it was picked up \r\n\t\t}\r\n\t}", "private boolean usesies(ActivePokemon p) {\n boolean used = false;\n for (Stat stat : Stat.BATTLE_STATS) {\n if (p.getStage(stat) < 0) {\n p.getStages().setStage(stat, 0);\n used = true;\n }\n }\n return used;\n }", "public boolean bestFirstSearch() {\n\t\twhile(!soloution){\n\t\t\tif(open.isEmpty()){\n\t\t\t\tSystem.out.println(\"No more choices to explore\");\n\t\t\t\tSystem.out.println(\"SolutionId: \" + solutionId);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//chooses the most optimal X\n\t\t\tNode x = popNode();\n\t\t\tclosed.add(x);\n\t\t\tSystem.out.println(\"X:\\t\\t\" + x.state + \" \" + x.h + \" + \" + x.g + \" = \" + x.f);\n\t\t\t//checks if it is a soulution\n\t\t\tif(solution(x)){\n\t\t\t\tSystem.out.println(\"SOLUTION:\\t\" + x.state);\n\t\t\t\tSystem.out.println(\"nodes created: \" + open.size() + closed.size());\n\t\t\t\tprintSolution(x);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t//handles the possible moves from the state x\n\t\t\tsucc = generateAllSuccesors(x);\n\t\t\tfor (Node s : succ) {\n\t\t\t\t//if this state already exist, we will use the node keeping it instead\n\t\t\t\tNode old = findOld(s);\n\t\t\t\tif(old != null)\n\t\t\t\t\ts = old;\n\t\t\t\t//makes the new node a child of x\n\t\t\t\tx.kids.add(s);\n\t\t\t\t//if its a new state it will be inserted to open after evaluation\n\t\t\t\tif(!open.contains(s) && !closed.contains(s)){\n\t\t\t\t\tattachAndEval(s,x);\n\t\t\t\t\tinsert(s);\n\t\t\t\t}\n\t\t\t\t//if its an old node and x is a better parent it will be evalueted again.\n\t\t\t\telse if(x.g + arcCost(x, s) < s.g){\n\t\t\t\t\tattachAndEval(s, x);\n\t\t\t\t\tif(closed.contains(s)){\n\t\t\t\t\t\t//if its closed all children will be evaluated with the new score of \"s\"\n\t\t\t\t\t\tpropagatePathImprovements(s);\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 MoveEvaluation computeBest (int ply, IGameState s, IPlayer player, IPlayer opponent) {\n\t\tthis.original = player;\n\t\tthis.state = s.copy();\n\t\tMoveEvaluation move = minimax(ply, IComparator.MAX, player, opponent);\n\t\treturn move;\n\t}", "public void testAltScoring() throws Exception {\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (Minute points for 1st Yes count)\n \"3,1,A,5,No\", // 20 (a No on a solved problem)\n \"4,1,A,7,Yes\", // zero (only \"No's\" count)\n \"5,1,A,9,No\", // 20 (another No on the solved problem)\n \n \"6,1,B,11,No\", // zero (problem has not been solved)\n \"7,1,B,13,No\", // zero (problem has not been solved)\n \n \"8,2,A,30,Yes\", // 30 (Minute points for 1st Yes)\n \n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n\n // Rank TeamId Solved Penalty\n \n // alt1: 0 0 200\n \n String[] alt1rankData = {\n \"1,team1,1,200\",\n \"2,team2,1,200\", // tie-breaker causes rank 2\n };\n \n scoreboardTest (2, runsData, alt1rankData, alt1);\n // alt2: 30 5 0\n String[] alt2rankData = {\n \"1,team1,1,45\", // 1 no@30 each + 3 min * 5\n \"2,team2,1,150\", // 5*30\n };\n \n scoreboardTest (2, runsData, alt2rankData, alt2);\n \n // alt3: 0 10 0\n String[] alt3rankData = {\n \"1,team1,1,30\", // 3 min * 10\n \"2,team2,1,300\", // 30 min * 10\n };\n \n scoreboardTest (2, runsData, alt3rankData, alt3);\n \n // alt4: 5 0 20\n String[] alt4rankData = {\n \"1,team2,1,20\", // base yes\n \"2,team1,1,25\", // base yes + 1 no\n };\n \n scoreboardTest (2, runsData, alt4rankData, alt4);\n\n }", "private void checkStability() {\n double maxDeviation = Double.NEGATIVE_INFINITY;\n\n DeviationIterator itr = new DeviationIterator(currentOutcome, nActs);\n while (itr.hasNext()) {\n int[] devOutcome = itr.next();\n\n // this shouldn't happen\n if (eGame.getNumSamples(devOutcome) <= 0) {\n System.out.println(\"BRD: checking equilibrium with unsampled deviations!\");\n System.out.println(\"Current: \" + Arrays.toString(currentOutcome));\n System.out.println(\"Unsampled: \" + Arrays.toString(devOutcome));\n return;\n }\n\n double devBenefit = eGame.getPayoff(devOutcome, itr.getDeviatingPlayer()) -\n eGame.getPayoff(currentOutcome, itr.getDeviatingPlayer());\n\n maxDeviation = Math.max(maxDeviation, devBenefit);\n\n // terminate early; not better than one we have already confirmed\n if (maxDeviation >= confirmedStability) return;\n }\n\n if (maxDeviation < confirmedStability) {\n confirmedStability = maxDeviation;\n mostStableConfirmed = currentOutcome.clone();\n if (samplesToConfirmEquilibrium < 0 &&\n confirmedStability <= 0) {\n samplesToConfirmEquilibrium = eGame.getTotalNumSamples();\n }\n }\n }", "protected void getProbabilitiesStayInJail() {\t\t\r\n\t\tboard().dice().forEachPossibleRoll((roll, size) -> {\t\t\t\r\n\t\t\t//if doubles, we're forced to leave jail (but our doubles are accounted for, we don't roll again)\r\n\t\t\tif (roll.isDoubles())\r\n\t\t\t\tboard().nextSpace(board().getSpace(justVisitingID), roll.getTotal()).updateProbAndRoll(1, (double) 1 / size, false);\r\n\t\t\telse\r\n\t\t\t\tboard().getSpace(this.ID() + 1).updateProbAndRoll(0, (double)1 / size, false);\r\n\t\t});\r\n\t}", "public void solve() {\n\t\tArrayList<Piece> pieceListBySize = new ArrayList<Piece>(pieceList);\n\t\tCollections.sort(pieceListBySize);\t// This is done since the order\n\t\t\t\t\t\t\t\t\t\t\t// of piece placements does not matter.\n\t\t\t\t\t\t\t\t\t\t\t// Placing larger pieces down first lets\n\t\t\t\t\t\t\t\t\t\t\t// pruning occur sooner.\n\t\t\n\t\t/**\n\t\t * Calculates number of resets needed for a game board.\n\t\t * A \"reset\" refers to a tile that goes from the solved state to\n\t\t * an unsolved state and back to the solved state.\n\t\t * \n\t\t * This is the calculation used for pruning.\n\t\t */\n\t\t\n\t\tArrayList<Integer> areaLeft = new ArrayList<Integer>();\n\t\tareaLeft.add(0);\n\t\tint totalArea = 0;\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\ttotalArea += pieceListBySize.get(i).numberOfFlips;\n\t\t\tareaLeft.add(0, totalArea);\n\t\t}\n\t\tint totalResets = (totalArea - gameBoard.flipsNeeded) / (gameBoard.goal + 1);\n\t\tSystem.out.println(\"Total Resets: \" + totalResets);\n\t\t\n\t\t/* \n\t\tint highRow = 0;\n\t\tint highCol = 0;\n\t\tint[][] maxDim = new int[2][pieceListBySize.size()];\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\tif (highRow < pieceListBySize.get(i).rows)\n\t\t\t\thighRow = pieceListBySize.get(i).rows;\n\t\t\t\n\t\t\tif (highCol < pieceListBySize.get(i).cols)\n\t\t\t\thighCol = pieceListBySize.get(i).cols;\n\t\t\t\n\t\t\tmaxDim[0][i] = highRow;\n\t\t\tmaxDim[1][i] = highCol;\n\t\t}\n\t\t*/\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tNode<GameBoard> currentNode = new Node<GameBoard>(gameBoard);\n\t\tStack<Node<GameBoard>> stack = new Stack<Node<GameBoard>>();\n\t\tstack.push(currentNode);\n\t\t\n\t\twhile (!stack.isEmpty()) {\n\t\t\tnodeCount++;\n\t\t\t\n\t\t\tNode<GameBoard> node = stack.pop();\n\t\t\tGameBoard current = node.getElement();\n\t\t\tint depth = node.getDepth();\n\t\t\t\n\t\t\t// Checks to see if we reach a solved state.\n\t\t\t// If so, re-order the pieces then print out the solution.\n\t\t\tif (depth == pieceListBySize.size() && current.isSolved()) {\n\t\t\t\tArrayList<Point> moves = new ArrayList<Point>();\n\t\t\t\t\n\t\t\t\twhile (node.parent != null) {\n\t\t\t\t\tint index = node.level - 1;\n\t\t\t\t\tint sequence = pieceList.indexOf(pieceListBySize.get(index));\n\t\t\t\t\tPoint p = new Point(current.moveRow, current.moveCol, sequence);\n\t\t\t\t\tmoves.add(p);\n\t\t\t\t\t\n\t\t\t\t\tnode = node.parent;\n\t\t\t\t\tcurrent = node.getElement();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tCollections.sort(moves);\n\t\t\t\tfor (Point p : moves) {\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Nodes opened: \" + nodeCount);\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"Elapsed Time: \" + ((endTime - startTime) / 1000) + \" secs.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tPiece currentPiece = pieceListBySize.get(depth);\n\t\t\tint pieceRows = currentPiece.rows;\n\t\t\tint pieceCols = currentPiece.cols;\n\t\t\t\n\t\t\tPriorityQueue<Node<GameBoard>> pQueue = new PriorityQueue<Node<GameBoard>>();\n\t\t\t\n\t\t\t// Place piece in every possible position in the board\n\t\t\tfor (int i = 0; i <= current.rows - pieceRows; i++) {\n\t\t\t\tfor (int j = 0; j <= current.cols - pieceCols; j++) {\n\t\t\t\t\tGameBoard g = current.place(currentPiece, i, j);\n\t\t\t\t\t\n\t\t\t\t\tif (totalResets - g.resets < 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\t// Put in the temporary priority queue\n\t\t\t\t\tpQueue.add(new Node<GameBoard>(g, node));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Remove from priority queue 1 at a time and put into stack.\n\t\t\t// The reason this is done is so that boards with the highest reset\n\t\t\t// count can be chosen over ones with fewer resets.\n\t\t\twhile (!pQueue.isEmpty()) {\n\t\t\t\tNode<GameBoard> n = pQueue.remove();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "private void getWinner() {\r\n int nWhite = 0, nBlack = 0;\r\n if(nextPlayer.getChecks() == 0 && nextPlayer.getQueens() == 0){\r\n winner = currentPlayer;\r\n }\r\n else if(currentPlayer.getQueens() == nextPlayer.getQueens()){\r\n for (int i = 1; i<8; i++){\r\n for (int x = 0; x<8; x++) {\r\n if (checks[i][x] == 1) nBlack++;\r\n if (checks[7 - i][x] == 2) nWhite++;\r\n }\r\n if (nWhite>nBlack) winner = getPlayer(WHITE);\r\n else if(nBlack>nWhite)winner = getPlayer(BLACK);\r\n nWhite = 0;\r\n nBlack = 0;\r\n }\r\n }\r\n else if (currentPlayer.getQueens() > nextPlayer.getQueens()){ winner = currentPlayer;}\r\n else{winner = nextPlayer; }\r\n }", "public int g(Variable n)\n { \n int id = n.getID();\n int row_num = id / issue.getSize();\n int col_num = id % issue.getSize();\n int box_num = ((col_num / issue.getSqrtSize()) * 3 +\n (row_num / issue.getSqrtSize()));\n List<Integer> buffer = new ArrayList<Integer>();\n\n for (int i = 0; i < issue.getRows()[row_num].length; i++)\n {\n Variable slot = issue.getRows()[row_num][i];\n\n if (!(slot.hasValue()))\n { \n buffer.add(slot.getID());\n }\n }\n\n for (int i = 0; i < issue.getCols()[col_num].length; i++)\n {\n Variable slot = issue.getCols()[col_num][i];\n if (!(slot.hasValue()))\n {\n buffer.add(slot.getID());\n }\n }\n\n for (int i = 0; i < issue.getBoxes()[box_num].length; i++)\n {\n Variable slot = issue.getBoxes()[box_num][i];\n if ((!(issue.getRows()[row_num][i].hasValue())) &&\n (!(buffer.contains(slot.getID()))))\n {\n buffer.add(slot.getID());\n }\n }\n\n int cost = 27 - buffer.size();\n return cost;\n }", "public void testCheckPlrSquare() {\n\t\tGame game = new Game(5, \"\");\n\t\t//Will create 3 enemyShips and retrieve test values after each one is added and method run\n\t\tBattleStar b1 = new BattleStar(game.getTheGrid());\n\t\tBattleStar b2 = new BattleStar(game.getTheGrid());\n\t\tBattleStar b3 = new BattleStar(game.getTheGrid());\n\t\t\n\t\t//Case: 2\n\t\tgame.getTheGrid().put(0, 0, b1);\n\t\tgame.getAllEnemys().add(b1);\n\t\tgame.checkPlrSquare();\n\t\tboolean case2expected = game.getAllEnemys().contains(b1);\n\t\t\n\t\t//default: (i.e. more than two enemy ships)\n\t\tgame.getTheGrid().put(0, 0, b2);\n\t\tgame.getTheGrid().put(0, 0, b3);\n\t\tgame.checkPlrSquare();\n\t\tboolean actualDefault = game.isGameOver(); \n\t\t\n\t\t//Check outcome; Ideally more scenarios would be tested\n\t\tassertTrue(actualDefault && !case2expected);\n\t}", "private BDD nextGeneration(BDD generation){\n\t\tBDD res = this.factory.makeOne();\n\t\tAssignment assignment = generation.anySat();\n\n\n\t\t// be build the map/transition from board to board_p vars\n\t\tfor(int i = 0; i < this.dimension; i++)\n\t\t\tfor(int j = 0; j < this.dimension; j++){\n\n\n\t\t\t\t// it's a live cell, we remove it if we can\n\t\t\t\tif(assignment.holds(this.board[i][j])){\n\n\t\t\t\t\tif(trySolitude(i, j, assignment)){\t\n\t\t\t\t\t\tres.andWith(this.board[i][j].copy()); // evaluate T the var in board\n\t\t\t\t\t\tres.andWith(this.board_p[i][j].not()); // evaluate F the var in board_p\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(tryOverpopulation(i, j, assignment)){\n\t\t\t\t\t\tres.andWith(this.board[i][j].copy()); \n\t\t\t\t\t\tres.andWith(this.board_p[i][j].not()); \n\t\t\t\t\t}\n\n\t\t\t\t\telse if(tryBorder(i, j)){\n\t\t\t\t\t\tres.andWith(this.board[i][j].copy()); \n\t\t\t\t\t\tres.andWith(this.board_p[i][j].not()); \n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\t\t\t\t\t\tres.andWith(this.board[i][j].copy()); // evaluate T the var in board\n\t\t\t\t\t\tres.andWith(this.board_p[i][j].copy()); // evaluate T the var in board_p\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// it's a dead cell, we populate it if we can\n\t\t\t\telse{\n\n\t\t\t\t\tif(tryPopulatingDeadCell(i, j, assignment)){\n\t\t\t\t\t\tres.andWith(this.board[i][j].not()); \t// evaluate F the var in board\n\t\t\t\t\t\tres.andWith(this.board_p[i][j].copy()); // evaluate T the var in board_p\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\t\t\t\t\t\tres.andWith(this.board[i][j].biimp(this.board_p[i][j])); // vars equal\n\n\t\t\t\t}\n\t\t\t}\n\n\n\t\treturn res;\n\t}", "public double evalPair(Schedule sched) {\n\t\t\n\t\tint failCount = 0;\n\t\tCourse pairCourse_x, pairCourse_y;\n\t\tCourse workingCourse1, workingCourse2;\n\t\t\n\t\t//Go through all the pairs\n\t\tfor(int i = 0;i<pairs.size();i++)\n\t\t{\n\t\t\t\n\t\t\tpairCourse_x = pairs.get(i).getKey();\n\t\t\tpairCourse_y = pairs.get(i).getValue();\n\t\t\t\n\t\t\t//Find courses in list\n\t\t\tfor(int j = 0; j<sched.getCourses().size();j++)\n\t\t\t{\n\t\t\t\tworkingCourse1 = sched.getCourses().get(j);\n\t\t\t\t\n\t\t\t\tif(workingCourse1.equals(pairCourse_x))\n\t\t\t\t{\n\t\t\t\t\tfor(int k = 0;k<sched.getCourses().size();k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tworkingCourse2 = sched.getCourses().get(k);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(workingCourse2.equals(pairCourse_y))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(! (workingCourse1.getSlot().getStartTime() == workingCourse2.getSlot().getStartTime() &&\n\t\t\t\t\t\t\t\t\tworkingCourse1.getSlot().getDay().equals(workingCourse2.getSlot().getDay()) &&\n\t\t\t\t\t\t\t\t\tworkingCourse1.getSlot().getMaxNum() == workingCourse2.getSlot().getMaxNum()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfailCount++;\n\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}\n\n\t\t}\n\t\treturn failCount * this.get_penNotPaired();\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 BoardPiece[] evaluatePieces(BoardPiece attackingPiece, BoardPiece defendingPiece) {\n\t\tint attackingPieceType = attackingPiece.getPieceType();\n\t\tint defendingPieceType = defendingPiece.getPieceType();\n\t\t\n\t\tBoardPiece[] result = new BoardPiece[2];\n\t\t\n\t\tLog.d(TAG, \"Arbiter evaluate! Attacking: \" +attackingPieceType+ \" Defending: \" +defendingPieceType);\n\t\t\n\t\tif(attackingPieceType == defendingPieceType) {\n\t\t\tif(attackingPieceType == PieceHierarchy.FLAG && defendingPieceType == PieceHierarchy.FLAG) {\n\t\t\t\t//attacking piece wins the game\n\t\t\t\tresult[WINNING_PIECE_INDEX] = attackingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = defendingPiece;\n\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//both pieces are eliminated\n\t\t\t\tthis.eliminatePiece(attackingPiece);\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//spies case\n\t\telse if(attackingPieceType == PieceHierarchy.SPY) {\n\t\t\tif(defendingPieceType == PieceHierarchy.PRIVATE) {\n\t\t\t\t//attacking piece defeated\n\t\t\t\tthis.eliminatePiece(attackingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = defendingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = attackingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//defending piece is defeated\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = attackingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = defendingPiece;\n\t\t\t\treturn result;\n\n\t\t\t}\n\t\t}\n\t\telse if(defendingPieceType == PieceHierarchy.SPY) {\n\t\t\tif(attackingPieceType == PieceHierarchy.PRIVATE) {\n\t\t\t\t//defending piece is defeated\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = attackingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = defendingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//attacking piece is defeated\n\t\t\t\tthis.eliminatePiece(attackingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = defendingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = attackingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\t//any other cases\n\t\telse {\n\t\t\tif(attackingPieceType > defendingPieceType) {\n\t\t\t\t//defending piece type is defeated\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = attackingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = defendingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//attacking piece type is defeated\n\t\t\t\tthis.eliminatePiece(attackingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = defendingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = attackingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}", "public boolean isGoal(){\n\t\tboolean ok = true;\n\t\tfor (int i = 0; i < getRows() && ok; i++) {\n\t\t\tfor (int j = 0; j < getColumns() && ok; j++) {\n\t\t\t\tif (cells[i][j].getSand() != getK()) \n\t\t\t\t\tok = false;\n\t\t\t}\n\t\t} \n\t\treturn ok;\n\t}", "public static boolean playRound(TableTop table){\n System.out.println(\"NEW ROUND:\");\n table.setupDeck();\n while (table.emptyHand() == null) {\n for (HumanPlayer c : table.getHumanPlayers()) {\n c.playTurn(table);\n }\n for (ComputerPlayer c : table.getAiPlayers()) {\n c.playTurn(table, true);\n }\n if (table.getSkips()>= table.getHumanPlayers().size()+table.getAiPlayers().size()){\n table.clearSkips();\n return true;\n }else{\n table.clearSkips();\n }\n }\n table.countPoints(table.emptyHand(), true);\n /*Calculation for the lowest amount of points to show winner*/\n table.clearDecks();\n return false;\n }", "@SmallTest\n\tpublic void testPeekPenalty() {\n\t\tpeek();\n\t\tassertEquals((Integer) (START_SCORE - PEEK_PENALTY), Integer.valueOf(solo.getText(1).getText().toString()));\n\t}", "public static double tryPolicy(Policy policy, Problem prob) {\n\t\tint totalUtility = 0;\n\t\tint totalMoves = 0;\n\t\tfor (int i = 0; i < ITERATIONS; i++) {\n\t\t\t// Random empty starting loc\n\t\t\tint row, col;\n\t\t\tdo {\n\t\t\t\trow = rng.nextInt(prob.map.size());\n\t\t\t\tcol = rng.nextInt(prob.map.get(0).size());\n\t\t\t} while (!prob.map.get(row).get(col).equals(\"-\"));\n\t\t\t// Run until pit, gold, or MAX_MOVES timeout \n\t\t\t// (in case policy recommends driving into wall repeatedly,\n\t\t\t// for example)\n\t\t\tfor (int moves = 0; moves < MAX_MOVES; moves++) {\n\t\t\t\ttotalMoves++;\n\t\t\t\tString policyRec = policy.bestActions[row][col];\n\t\t\t\t// Determine how far we go in that direction\n\t\t\t\tint displacement = 1;\n\t\t\t\tdouble totalProb = 0;\n\t\t\t\tdouble moveSample = rng.nextDouble();\n\t\t\t\tfor (int p = 0; p <= prob.moveProbs.length; p++) {\n\t\t\t\t\ttotalProb += prob.moveProbs[p];\n\t\t\t\t\tif (moveSample <= totalProb) {\n\t\t\t\t\t\tdisplacement = p+1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint new_row = row;\n\t\t\t\tint new_col = col;\n\t\t\t\tif (policyRec.equals(\"U\")) {\n\t\t\t\t\tnew_row -= displacement;\n\t\t\t\t\tif (new_row < 0) {\n\t\t\t\t\t\tnew_row = 0;\n\t\t\t\t\t}\n\t\t\t\t} else if (policyRec.equals(\"R\")) {\n\t\t\t\t\tnew_col += displacement;\n\t\t\t\t\tif (new_col >= prob.map.get(0).size()) {\n\t\t\t\t\t\tnew_col = prob.map.get(0).size()-1;\n\t\t\t\t\t}\n\t\t\t\t} else if (policyRec.equals(\"D\")) {\n\t\t\t\t\tnew_row += displacement;\n\t\t\t\t\tif (new_row >= prob.map.size()) {\n\t\t\t\t\t\tnew_row = prob.map.size()-1;\n\t\t\t\t\t}\n\t\t\t\t} else if (policyRec.equals(\"L\")) {\n\t\t\t\t\tnew_col -= displacement;\n\t\t\t\t\tif (new_col < 0) {\n\t\t\t\t\t\tnew_col = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trow = new_row;\n\t\t\t\tcol = new_col;\n\t\t\t\tif (prob.map.get(row).get(col).equals(\"G\")) {\n\t\t\t\t\ttotalUtility += GOLD_REWARD;\n\t\t\t\t\t// End the current trial\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (prob.map.get(row).get(col).equals(\"P\")) {\n\t\t\t\t\ttotalUtility += PIT_REWARD;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn totalUtility/(double)totalMoves;\n\t}", "private static int evalState(GameState state){\n Move m = state.getMove();\n int counter = 0;\n\n // return directly if we encouter win or loss\n if(m.isXWin()){\n return 10000;\n }\n else if(m.isOWin()){\n return -1;\n }\n\n Vector<Integer> points = new Vector<Integer>();\n points.setSize(state.BOARD_SIZE*2+2);\n int player;\n Collections.fill(points, 1);\n int scaling = 4;\n int value = 0;\n\n for(int row = 0; row < state.BOARD_SIZE; row ++){\n for(int col = 0; col < state.BOARD_SIZE; col ++){\n player = state.at(row, col);\n\n // add points to the vector, increase by a factor for every new entry\n if(player == 1){\n points.set(row, points.get(row)*scaling);\n points.add(state.BOARD_SIZE + col, points.get(state.BOARD_SIZE - 1 + col)*scaling);\n\n // if it's in the first diagonal\n if(counter%state.BOARD_SIZE+1 == 0){\n points.add(state.BOARD_SIZE*2, points.get(state.BOARD_SIZE*2)*scaling);\n }\n\n // checking other diagonal\n if(counter%state.BOARD_SIZE-1 == 0 && row+col != 0){\n points.add(state.BOARD_SIZE*2 + 1, points.get(state.BOARD_SIZE*2)*scaling);\n }\n }\n // if an enemy player is encoutered null the value of the row/col\n else if(player == 2){\n points.set(row, 0);\n points.set(state.BOARD_SIZE + col, 0);\n if(counter%state.BOARD_SIZE+1 == 0){\n points.add(state.BOARD_SIZE*2, 0);\n }\n if(counter%state.BOARD_SIZE-1 == 0){\n points.add(state.BOARD_SIZE*2 + 1, 0);\n }\n }\n counter++;\n }\n }\n\n // if we have nulled the point we don't count it for the value of the state\n for(Integer i: points){\n if(i > 1){\n value += i;\n }\n }\n //System.err.println(\"Value: \" + value);\n return value;\n }", "@Override\n public boolean offer(Object o) {\n\n // Rank is extracted from the header\n Packet packet = (Packet) o;\n PriorityHeader header = (PriorityHeader) packet;\n int rank = (int)header.getPriority();\n\n this.reentrantLock.lock();\n boolean returnValue = false;\n try {\n\n // Keep track of the current queue bounds (Figure 13a in the SP-PIFO paper)\n for (int q=queueList.size()-1; q>=0; q--){\n if(SimulationLogger.hasQueueBoundTrackingEnabled()){\n SimulationLogger.logQueueBound(this.ownId, q, (int)queueBounds.get(q));\n }\n }\n\n // Aggregate adaptation parameters\n int currentQueueBound, currentQueueBoundPlus, currentQueueBoundMinus;\n int QLm, QLh, QLmplus, QLmminus, sumA1, sumA2, sumB1, sumB2;\n\n // SP-PIFO queue scanning process\n for (int q=queueList.size()-1; q>=0; q--){\n currentQueueBound = (int)queueBounds.get(q);\n if ((currentQueueBound <= rank) || q==0) {\n boolean result = queueList.get(q).offer(o);\n\n if (!result){\n // System.out.println(\"Greedy: Packet with rank \" + rank + \" has been dropped from queue \" + q + \".\");\n returnValue = false;\n break;\n } else {\n\n // Update general counter\n this.generalPacketCounter = this.generalPacketCounter + 1;\n\n // We compute the perceived rank\n Object[] contentPIFO = queueList.get(q).toArray();\n Arrays.sort(contentPIFO);\n Packet packet_maxrank = (Packet) contentPIFO[0];\n PriorityHeader header_maxrank = (PriorityHeader) packet_maxrank;\n int rank_perceived = (int)header_maxrank.getPriority();\n if (rank_perceived > rank){\n this.unpifoness = this.unpifoness + (rank_perceived - rank);\n }\n\n // IMPORTANT: If packet enqueued here, means that QLm <= rank < QLh\n // Packet enqueued, we update counters, and return true\n if (q==queueList.size()-1){\n QLh = rank_bound;\n QLm = (int)this.queueBounds.get(q);\n } else {\n QLh = (int)this.queueBounds.get(q+1);\n QLm = (int)this.queueBounds.get(q);\n }\n\n // To consider non continuous rank distributions, we have to keep track of the Qm+1 and Qh-1 ranks per each queue\n // This way we are sure that the boundary move we are analyzing will not be an empty rank\n currentQueueBoundPlus = (int)this.queueBoundsPlus.get(q);\n if (rank > QLm && rank < currentQueueBoundPlus){\n this.queueBoundsPlus.put(q, rank);\n }\n\n // Update counters per queue\n Object currentPackets = countersB21.get(q);\n if (currentPackets == null){\n countersB21.put(q, rank);\n } else {\n countersB21.put(q, (int)currentPackets+rank);\n }\n\n currentPackets = countersB22.get(q);\n if (currentPackets == null){\n countersB22.put(q, 1);\n } else {\n countersB22.put(q, (int)currentPackets+1);\n }\n\n if (rank != QLm){\n currentPackets = countersA21.get(q);\n if (currentPackets == null){\n countersA21.put(q, rank);\n } else {\n countersA21.put(q, (int)currentPackets+rank);\n }\n\n currentPackets = countersA22.get(q);\n if (currentPackets == null){\n countersA22.put(q, 1);\n } else {\n countersA22.put(q, (int)currentPackets+1);\n }\n }\n\n if (q!=queueList.size()-1){\n\n currentQueueBoundMinus = (int) this.queueBoundsMinus.get(q + 1);\n if (rank > currentQueueBoundMinus) {\n this.queueBoundsMinus.put(q + 1, rank);\n }\n\n currentPackets = countersA11.get(q+1);\n if (currentPackets == null){\n countersA11.put(q+1, importance(rank));\n } else {\n countersA11.put(q+1, (int)currentPackets+importance(rank));\n }\n\n currentPackets = countersA12.get(q+1);\n if (currentPackets == null){\n countersA12.put(q+1, (importance(rank))*rank);\n } else {\n countersA12.put(q+1, (int)currentPackets+(importance(rank))*rank);\n }\n\n if(rank != (int)this.queueBoundsMinus.get(q+1)){\n currentPackets = countersB11.get(q+1);\n if (currentPackets == null){\n countersB11.put(q+1, importance(rank));\n } else {\n countersB11.put(q+1, (int)currentPackets+importance(rank));\n }\n\n currentPackets = countersB12.get(q+1);\n if (currentPackets == null){\n countersB12.put(q+1, (importance(rank))*rank);\n } else {\n countersB12.put(q+1, (int)currentPackets+(importance(rank))*rank);\n }\n }\n }\n\n returnValue = true;\n break;\n }\n }\n }\n\n // When the threshold is reached, aggregate adaptation is considered based on the values in counters\n if(this.generalPacketCounter == 1000) {\n\n // Each queue bound expected unpifoness is compared to the one achieved by moving the boundaries\n for(int i=queueBounds.size()-1; i>0; i--){\n\n // Obtain the values of adjacent ranks to analyze\n QLm = (int)this.queueBounds.get(i);\n QLmplus = (int)this.queueBoundsPlus.get(i);\n QLmminus = (int)this.queueBoundsMinus.get(i);\n\n sumA1 = ((QLm) * (int)countersA11.get(i)) - (int)countersA12.get(i);\n sumA2 = (importance(QLm) * (int)countersA21.get(i)) - (importance(QLm) * (QLm) * (int)countersA22.get(i));\n\n if (i==(queueBounds.size()-1)){\n if ((sumA1 < sumA2) && (QLmplus != (int)this.rank_bound)){\n if (!this.fixQueueBounds){\n this.queueBounds.put(i, QLmplus);\n }\n } else {\n\n sumB1 = ((QLmminus) * (int)countersB11.get(i)) - (int)countersB12.get(i);\n sumB2 = (importance(QLmminus) * (int)countersB21.get(i)) - (importance(QLmminus) * (QLmminus) * (int)countersB22.get(i));\n\n if ((sumB1 > sumB2) && (QLmminus != (int)this.queueBounds.get(i-1))){\n if (!this.fixQueueBounds){\n this.queueBounds.put(i, QLmminus);\n }\n }\n }\n } else {\n if ((sumA1 < sumA2) && (QLmplus != (int)this.queueBounds.get(i+1))){\n if (!this.fixQueueBounds){\n this.queueBounds.put(i, QLmplus);\n }\n } else {\n\n sumB1 = ((QLmminus) * (int)countersB11.get(i)) - (int)countersB12.get(i);\n sumB2 = (importance(QLmminus) * (int)countersB21.get(i)) - (importance(QLmminus) * (QLmminus) * (int)countersB22.get(i));\n\n if ((sumB1 > sumB2) && (QLmminus != (int)this.queueBounds.get(i-1))){\n if (!this.fixQueueBounds){\n this.queueBounds.put(i, QLmminus);\n }\n }\n }\n }\n\n }\n\n // Reset the counters for the next iteration\n this.queueBoundsPlus.clear();\n this.queueBoundsMinus.clear();\n this.generalPacketCounter = 0;\n this.countersA11.clear();\n this.countersA12.clear();\n this.countersA21.clear();\n this.countersA22.clear();\n this.countersB11.clear();\n this.countersB12.clear();\n this.countersB21.clear();\n this.countersB22.clear();\n for (int i=0; i<queueList.size(); i++){\n countersA11.put(i,0);\n countersA12.put(i,0);\n countersA21.put(i,0);\n countersA22.put(i,0);\n countersB11.put(i,0);\n countersB12.put(i,0);\n countersB21.put(i,0);\n countersB22.put(i,0);\n }\n\n // Reinitialize the adjacent rank values based on the updated queue bounds\n for (int q=0; q<queueList.size(); q++){\n if (q==queueList.size()-1){\n this.queueBoundsPlus.put(q,this.rank_bound);\n this.queueBoundsMinus.put(q,this.queueBounds.get(q-1));\n } else if (q==0){\n this.queueBoundsPlus.put(q,this.queueBounds.get(q+1));\n this.queueBoundsMinus.put(q,0);\n } else{\n this.queueBoundsPlus.put(q,this.queueBounds.get(q+1));\n this.queueBoundsMinus.put(q,this.queueBounds.get(q-1));\n }\n }\n }\n\n } catch (Exception e){\n System.out.println(\"Exception: \" + e.getMessage());\n e.printStackTrace();\n } finally {\n this.reentrantLock.unlock();\n // System.out.println(\"Packet with rank \" + rank + \"enqueued_flag\" + returnValue);\n return returnValue;\n }\n }", "private void evaluateWin(boolean finalCheck)\r\n\t{\r\n\t\t// Stores player and dealer scores in local variables, rather than repeatedly call the get methods\r\n\t\tint scoreP = player1.getTotal();\r\n\t\tint scoreD = dealer.getTotal();\r\n\t\t\r\n\t\t// first check: is the game still going? If it has ended, then no evaluation needs to be made\r\n\t\tif ( !endGame )\r\n\t\t{\r\n\t\t\t/* second check: is this the final evaluation? if not, the first block of statements executes.\r\n\t\t\tIf Player == 21 and Dealer == 21, Tie\r\n\t\t\tIf Player == 21 and Dealer != 21, Player wins\r\n\t\t\tIf Player != 21 and Dealer == 21, Dealer wins\r\n\t\t\tIf Player > 21, Dealer wins at any number\r\n\t\t\tIf Player > Dealer at the end of the game and no one has busted or hit 21, Player wins\r\n\t\t\tThe last check is performed only if finalCheck is true.\r\n\t\t\t*/\r\n\t\t\tif ( !finalCheck )\r\n\t\t\t{\r\n\t\t\t\tif (scoreP > BUST_SCORE)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You lose...\");\r\n\t\t\t\t\tendGame = true;\r\n\t\t\t\t}\r\n\t\t\t\telse if (scoreP == BUST_SCORE)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (scoreD == BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"It's a tie.\");\r\n\t\t\t\t\t\tendGame = true;\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\tSystem.out.println(\"You win!\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end scoreP > BUST_SCORE\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif (scoreD == BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You lose...\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (scoreD > BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end ScoreP <= BUST SCORE\r\n\t\t\t} // end finalCheck = false\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Final victory condition check\r\n\t\t\t\tif ( dealer.getTotal() < player1.getTotal() )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t}\r\n\t\t\t\telse if ( dealer.getTotal() == player1.getTotal() )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"It's a tie.\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You lose...1\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} // end finalCheck = true\r\n\t\t\r\n\t\t} // end endGame = false if\r\n\t\r\n\t}", "public ChesspairingTournament generateNextRound(ChesspairingTournament tournament) {\n\t\tthis.mTournament = tournament;\n\t\tthis.mTournament.setParringSummary(Tools.buildParringStarted());\n\t\t// more tan 1 players\n\t\tif (mTournament.getPlayers().size() < 2) {\n\t\t\tthrow new IllegalStateException(\"Please ad at least 2 players or more\");\n\t\t}\n\n\t\t// more rounds than totalRounds? For the moment I do not want to deal\n\t\t// with this use case\n\t\tif (mTournament.getTotalRounds() <= mTournament.getRounds().size()) {\n\t\t\tthrow new IllegalStateException(\"You are trying to generate more rounds than totalRounds\");\n\t\t}\n\n\t\tboolean validationOk = validateOrder();\n\t\tif (!validationOk) {\n\t\t\treturn mTournament;\n\t\t}\n\n\t\tList<ChesspairingRound> rounds = this.mTournament.getRounds();\n\t\tif (rounds.size() <= 0) {\n\t\t\tgenerateFirstRound();\n\t\t\treturn this.mTournament;\n\t\t}\n\n\t\t// make sure that the next round can be generated\n\t\tif (!canIGenerateNextRound()) {\n\t\t\tmTournament.getParringSummary().setShortMessage(PairingSummary.PARRING_NOT_OK);\n\t\t\tmTournament.getParringSummary().setLongMessage(\"You can not generate the next round!\");\n\t\t\treturn mTournament;\n\t\t}\n\n\t\tint roundNumber = mTournament.getRounds().size();\n\t\tcomputeInitialTournamentState(roundNumber);\n\n\t\tcomputeNextRound(roundNumber + 1);\n\t\t// order games points,elo,index\n\n\t\tList<ChesspairingGame> games = this.generatedRound.getGames();\n\t\t// index\n\t\t// the smallest index first\n\t\tCollections.sort(games, new Comparator<ChesspairingGame>() {\n\t\t\t@Override\n\t\t\tpublic int compare(ChesspairingGame o1, ChesspairingGame o2) {\n\t\t\t\tint indexO1 = getHighestIndex(o1);\n\t\t\t\tint indexO2 = getHighestIndex(o2);\n\t\t\t\treturn Integer.compare(indexO1, indexO2);\n\t\t\t}\n\t\t});\n\n\t\t// the highest elo first\n\t\tCollections.sort(games, new Comparator<ChesspairingGame>() {\n\t\t\t@Override\n\t\t\tpublic int compare(ChesspairingGame o1, ChesspairingGame o2) {\n\t\t\t\tint eloO1 = getHighestElo(o1);\n\t\t\t\tint eloO2 = getHighestElo(o2);\n\t\t\t\t// the highest value should be ordered first so wee multiply by\n\t\t\t\t// -1\n\t\t\t\treturn -1 * Integer.compare(eloO1, eloO2);\n\t\t\t}\n\t\t});\n\n\t\t// the highest points first\n\t\tCollections.sort(games, new Comparator<ChesspairingGame>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(ChesspairingGame o1, ChesspairingGame o2) {\n\t\t\t\tDouble pointsO1 = getHighestPoints(o1);\n\t\t\t\tDouble pointsO2 = getHighestPoints(o2);\n\t\t\t\treturn -1 * Double.compare(pointsO1, pointsO2);\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * number the games\n\t\t */\n\t\tint i = 1;\n\t\tfor (ChesspairingGame game : games) {\n\t\t\tgame.setTableNumber(i++);\n\t\t}\n\t\t//if buy game ad this game also to the games list\n\t\tif (this.buyGame != null){\n\t\t\tthis.buyGame.setTableNumber(i);\n\t\t\tgames.add(this.buyGame);\n\t\t}\n\t\t// add the generated round to the tournament\n\t\tthis.setRound(this.generatedRound);\n\t\treturn this.mTournament;\n\t}", "private MoveEvaluation minimax (int ply, IComparator comp, \n\t\t\tIPlayer player, IPlayer opponent) {\n\n\t\t// Try to improve on this lower-bound (based on selector). Reflects no move possible.\n\t\tMoveEvaluation best = new MoveEvaluation (comp.initialValue());\n\n\t\t// get all moves for this player and generate the boards that result\n\t\t// from making these moves. Select maximum of children if we are MAX\n\t\t// and minimum of children if we are MIN\n\t\tIterator<IGameMove> it = player.validMoves(state).iterator(); \n\t\twhile (it.hasNext()) {\n\t\t\tIGameMove move = it.next();\n\t\t\t\n\t\t\tmove.execute(state);\n\t\t\tnumComputationalStates++;\n\t\t\t\n\t\t\t// debugging output along the way...\n\t\t\tif (numComputationalStates % 100 == 0) {\n\t\t\t\tSystem.out.println (numComputationalStates);\n\t\t\t}\n\t\t\t\n\t\t\tMoveEvaluation pathMove = alreadyDetermined(state);\n\t\t\t\n\t\t\tif (pathMove == null) {\n\t\t\t\tint trial;\n\t\t\t\tif (ply <= 0) {\n\t\t\t\t\ttrial = original.eval(state);\n\t\t\t\t} else {\n\t\t\t\t\t// Recursively evaluate position. Compute MiniMax and swap\n\t\t\t\t\t// player and opponent, synchronously with MIN and MAX. If no move is\n\t\t\t\t\t// associated, then evaluate the generated board from original player\n\t\t\t\t\tMoveEvaluation me = minimax (ply-1, comp.opposite(), opponent, player);\n\t\t\t\t\tif (me.move == null) {\n\t\t\t\t\t\ttrial = original.eval(state);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrial = me.score;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tpathMove = new MoveEvaluation (move, trial);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmove.undo(state);\n\t\t\t\n\t\t\t// If we are selected as the better move, then update accordingly\n\t\t\tif (comp.compare(best.score, pathMove.score) < 0) {\n\t\t\t\tbest = new MoveEvaluation (move, pathMove.score); \n\t\t\t}\n\t\t}\n\t\t\n\t\t// this move was selected for the gameState. record it. If it is null, then the game has\n\t\t// already been won or this is a draw; in either case, we will let recursive parent take\n\t\t// care of the scoring. Even add when no move, so we can keep track of the WON games.\n\t\taddToList(state, best);\n\t\t\n\t\treturn best;\n\t}", "public static int ratePieceAvailability(){\n\t\tint rating=0, bishopCount=0;\n for (int i=0;i<64;i++) {\n switch (AlphaBeta.chessBoard[i/8][i%8]) {\n case \"P\": rating+=100;\n break;\n case \"R\": rating+=500;\n break;\n case \"K\": rating+=300;\n break;\n case \"B\": bishopCount++;\n break;\n case \"Q\": rating+=900;\n break;\n }\n }\n if (bishopCount>=2) {\n \trating+=300*bishopCount;\n } else {\n if (bishopCount==1) {rating+=250;}\n }\n return rating;\n\t}", "public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }", "public void computeWinnerDeterminationU()\r\n\t{\r\n\t\tif( _plans.size() == 0)\r\n\t\t{\r\n\t\t\t_allocation = new AllocationWoD();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t_randGenerator.setSeed(_seed);\r\n\t\t\r\n\t\tdouble maxExpectedUtility = 0.;\r\n\t\tint itsIdx = -1;\r\n\t\tint itsAtom = -1;\r\n\t\tfor(int i = 0; i < _plans.size(); ++i)\t\t\t\t\t\t\t\t\t// for every buyer\r\n\t\t\tfor(int j = 0; j < _plans.get(i).getNumberOfAtoms(); ++j)\t\t\t// for every plan he has value for\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get(i).getAtom(j));\r\n\t\t\t\tif(_paymentRule.equals(\"SecondPrice\"))\r\n\t\t\t\t\tplan.resolveWithSecondPrice();\r\n\t\t\t\telse if(_paymentRule.equals(\"FirstPrice\"))\r\n\t\t\t\t\tplan.resolveWithFirstPrice();\r\n\t\t\t\telse throw new RuntimeException(\"Cannot resolve the type: \" + _paymentRule);\r\n\t\t\t\t\r\n\t\t\t\tdouble expectedUtility = plan.computeExpectedValue() - plan.getPlanExpectedPayment();\r\n\t\t\t\t\r\n\t\t\t\tif( expectedUtility >= maxExpectedUtility )\r\n\t\t\t\t{\r\n\t\t\t\t\tmaxExpectedUtility = expectedUtility;\r\n\t\t\t\t\titsIdx = i;\r\n\t\t\t\t\titsAtom = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t_allocation = new AllocationWoD();\r\n\r\n\t\tif(itsIdx >= 0)\r\n\t\t{\r\n\t\t\tList<Integer> allocatedBundles = new LinkedList<Integer>();\r\n\t\t\tallocatedBundles.add(itsAtom);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get( itsIdx ).getAtom( itsAtom ));\r\n\t\t\t\t\r\n\t\t\t\tList<Integer> actuallyAllocatedTuples = new LinkedList<Integer>();\r\n\t\t\t\tfor(int i = 0; i < plan.getNumberOfFragments(); ++i)\r\n\t\t\t\t\tactuallyAllocatedTuples.add( plan.getMinNumberOfRecords(i) + _randGenerator.nextInt(plan.getMaxNumberOfRecords(i) - plan.getMinNumberOfRecords(i)) );\r\n\r\n\t\t\t\tif(plan.getAllocatedSellers().size() < 1)\r\n\t\t\t\t\tthrow new RuntimeException(\"No sellers in plan: \" + plan.toString());\r\n\t\t\t\t\r\n\t\t\t\tplan.setActuallyAllocatedRecords(actuallyAllocatedTuples);\r\n\t\t\t\tList<Integer> sellersInvolved = plan.getAllocatedSellers();\r\n\t\t\t\t\r\n\t\t\t\tList<ComplexSemanticWebType> allocatedPlans = new LinkedList<ComplexSemanticWebType>();\r\n\t\t\t\tallocatedPlans.add(plan);\r\n\t\t\t\t_allocation.addAllocatedAgent(plan.getAgentId(), sellersInvolved, allocatedBundles,\r\n\t\t\t\t\t\t\t\t\t\t\t plan.computeExpectedValue(), plan.computeExpectedCosts());\r\n\t\t\t\t_allocation.addAllocatedPlans(allocatedPlans, true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }", "public void isTrickComplete() {\n if(numPlays!=4){return;}\n if(player1Play == null | player2Play == null | player3Play == null | player4Play == null){return;}//should only call when all have played\n // reset numPlayed\n numPlays = 0;\n // find if the round is over\n currentMiddle.clear();\n trickNum++;\n try {\n sleep(200);//display all four cards before determining winner\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n int trickWinner;\n trickWinner = trickWinner();\n turn = trickWinner;\n if(trickWinner == 0 | trickWinner == 2){\n redTrickScore++;\n }\n else if(trickWinner == 1 | trickWinner == 3){\n blueTrickScore++;\n }\n player1Hand.remove(player1Play);//clear middle\n player2Hand.remove(player2Play);\n player3Hand.remove(player3Play);\n player4Hand.remove(player4Play);\n\n player1Play = null;\n player2Play = null;\n player3Play = null;\n player4Play = null;\n\n if(trickNum == 5){\n // reset everything for new round\n currentTrumpSuit = null;\n numPass = 0;\n isRoundOver();\n if(dealer == 3){\n dealer = 0;\n turn = 1;\n }\n else{\n dealer++;\n turn = dealer + 1;\n }\n gameStage = 0;\n deal();\n trickNum = 0;\n }\n\n\n\n }", "public void solveGame5() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "protected int checkAllCardsAppliedHaveZeroBalance() {\r\n boolean allCardsValuesAreZero = true;\r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n GiftCard tempGiftCard = null;\r\n int numBlankCards = 0;\r\n \r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n if (!tempGiftCard.getIsBlank() && tempGiftCard.getAmountAvailable() != 0.0d) {\r\n return NO_ERRORS;\r\n }\r\n if (tempGiftCard.getIsBlank()) {\r\n numBlankCards++;\r\n }\r\n }\r\n \r\n if (numBlankCards == getMaxNumGiftCards() || numBlankCards == getGiftCardList().size()) {\r\n return NO_ERRORS;\r\n }\r\n \r\n return ALL_CARDS_ARE_ZERO;\r\n }", "private boolean feasible() {\n\t\tint weight = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tassert x[i] == 0 || x[i] == 1;\n\t\t\tweight += w[i] * x[i];\n\t\t}\n\t\treturn weight <= k;\n\t}", "boolean checkStability() {\n\r\n for (int roommateIndex = 0; roommateIndex < preferenceA.length - 1; roommateIndex++) {//Iterates through all roommates to check their pair is stable\r\n\r\n int roommate = roommateIndex + 1; //Sets roommate equal to the roommateIndex + 1\r\n int roommatePair = getPairedRoommate(roommate);//roommatePair is set equal to the roommate's pair\r\n\r\n for (int roommatePrefIndex = 0; roommatePrefIndex < preferenceA[roommateIndex].length; roommatePrefIndex++) {//Iterates through roommate's preferences until the loop is broken\r\n\r\n int roommatePref = preferenceA[roommateIndex][roommatePrefIndex];//Sets the roommatePref equal to the roommate's current preference in the preference array\r\n if (roommatePref == roommatePair) //If the roommate's preference is equal to it's pair before it is equal to a roommate that prefers them, then the current roommate is stable\r\n break;\r\n\r\n int roommatePrefPair = getPairedRoommate(roommatePref);//sets roommatePrefPair to the roommate's current preference's paired roommate\r\n for (int roommatePrefPrefIndex = 0; roommatePrefPrefIndex < preferenceA[roommateIndex].length; roommatePrefPrefIndex++) {//Iterates through roommate's current preference's preferences until the loop is broken\r\n\r\n int roommatePrefPref = preferenceA[roommatePref - 1][roommatePrefPrefIndex];//sets roommatePrefPref equal to the roommate's current preference's current preference\r\n if (roommatePrefPref == roommatePrefPair) // if roommatePrefPref is equal to roommatePrefPair then the roommate's current preference does not want to pair with roommate\r\n break;\r\n if (roommatePrefPref == roommate) //if the roommatePrefPref is equal to roommate then the roommate's current preference wants to pair with the roommate, which means the system is unstable\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "public boolean hasToSkipNextRound() {\n\t\tif(current.isSkipNextRound()) {\n\t\t\tcurrent.setSkipNextRound(false);\n\t\t\treturn true;\n\t\t}\n\t\tif(current.getChips().isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public void testNoBeforeYesSameElapsed() throws Exception{\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"15,8,D,12,Yes\",\n \"16,8,D,12,No\",\n \n \"24,4,B,15,Yes\",\n \"25,4,B,15,No\",\n \"26,4,B,15,No\",\n \n \"28,2,C,22,Yes\",\n \"29,2,C,22,No\",\n \"30,2,C,22,Yes\",\n \"30,2,C,22,Yes\",\n };\n \n /**\n * \n * \n * \n */\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team8,1,12\",\n \"2,team4,1,15\",\n \"3,team2,1,22\",\n \"4,team1,0,0\",\n \"4,team3,0,0\",\n \"4,team5,0,0\",\n \"4,team6,0,0\",\n \"4,team7,0,0\",\n };\n \n scoreboardTest (8, runsData, rankData);\n }", "private ChesspairingGame parePlayers(ChesspairingPlayer playerA, ChesspairingPlayer playerB) {\n\t\tString keyA = playerA.getPlayerKey();\n\t\tString keyB = playerB.getPlayerKey();\n\t\tif (keyA.equals(keyB)) {\n\t\t\tthrow new IllegalStateException(\"You shuld never try to pare a players agains himself\");\n\t\t}\n\t\t/**\n\t\t * two players shall not meet more than once\n\t\t */\n\t\tList<String> partnersA = partnerHistory.get(keyA);\n\t\tif (partnersA.contains(keyB)) {\n\t\t\tthrow new IllegalStateException(\"two players shall not meet more than once\");\n\t\t}\n\t\tList<String> partnersB = partnerHistory.get(keyB);\n\t\tif (partnersB.contains(keyA)) {\n\t\t\tthrow new IllegalStateException(\"two players shall not meet more than once\");\n\t\t}\n\n\t\t/**\n\t\t * the color difference is the number of games played with white minus\n\t\t * the number of games played with black\n\t\t * \n\t\t * -2 < diff < 2\n\t\t */\n\t\tint aHistoryColor = getColorDifference(keyA);\n\t\tint bHistoryColor = getColorDifference(keyB);\n\n\t\t// if a is white\n\t\tint aWhite = aHistoryColor + 1;\n\t\tint bBlach = bHistoryColor - 1;\n\n\t\tif ((-2 < aWhite) && (aWhite < 2) && (-2 < bBlach) && (bBlach < 2)) {\n\t\t\t// this works\n\t\t\tChesspairingGame game = new ChesspairingGame();\n\t\t\tgame.setWhitePlayer(playerA);\n\t\t\tgame.setBlackPlayer(playerB);\n\t\t\tgame.setTableNumber(0);\n\t\t\tgame.setResult(ChesspairingResult.NOT_DECIDED);\n\t\t\treturn game;\n\t\t}\n\n\t\t// if a is black\n\t\tint aBlack = aHistoryColor - 1;\n\t\tint bWhite = bHistoryColor + 1;\n\t\tif ((-2 < aBlack) && (aBlack < 2) && (-2 < bWhite) && (bWhite < 2)) {\n\t\t\tChesspairingGame game = new ChesspairingGame();\n\t\t\tgame.setWhitePlayer(playerB);\n\t\t\tgame.setBlackPlayer(playerA);\n\t\t\tgame.setTableNumber(0);\n\t\t\tgame.setResult(ChesspairingResult.NOT_DECIDED);\n\t\t\treturn game;\n\t\t}\n\t\tthrow new IllegalStateException(\"You have tried to generate a game that was not legal\");\n\t}", "@Override\n\tpublic double stateEvaluator(GameState s)\n\t{\r\n\t\tint count = 0;\n\t\tif (s.takenList[1] == 0)\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse if(s.lastMove == 1)\r\n\t\t{\r\n\t\t\tfor (int i = 1; i < s.takenList.length ; i++)\r\n\t\t\t{\r\n\t\t\t\tif (s.takenList[i] == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (count % 2 == 0)\r\n\t\t\t{\r\n\t\t\t\treturn -0.5;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\treturn 0.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (isPrime(s.lastMove))\r\n\t\t{\r\n\t\t\tfor (int i = 1; i < s.takenList.length; i++)\r\n\t\t\t{\r\n\t\t\t\tif (s.takenList[i] == 0 && i % s.lastMove == 0) // i = 4, % 2\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (count % 2 == 0)\r\n\t\t\t{\r\n\t\t\t\treturn -0.7;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn 0.7;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tint largestPrime = 2;\r\n\t\t\tfor (int i = 2; i < (s.lastMove/2); i++)\r\n\t\t\t{\r\n\t\t\t\tif (s.lastMove % i == 0 && isPrime(i))\r\n\t\t\t\t{\r\n\t\t\t\t\tlargestPrime = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = largestPrime; i <= s.lastMove; i+= largestPrime)\r\n\t\t\t{\r\n\t\t\t\tif (s.takenList[i] == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (count % 2 == 0)\r\n\t\t\t{\r\n\t\t\t\treturn -0.6;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\treturn 0.6;\r\n\t\t\t}\r\n\r\n\t\t}\n\t}", "private void checkBuildHouse() {\n\t\tdouble moneyToSpend = calculateMoneyToSpend();\n\t\tif(moneyToSpend > 0) {\n\t\t\tArrayList<PropertyCard> cardsToBuildOn = new ArrayList<>();\n\t\t\tfor(PropertyCard c: getCards()) {\n\t\t\t\tif(isCollectionFull(c)) {\n\t\t\t\t\tcardsToBuildOn.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sorts so that the most expensive properties are at the start\n\t\t\tCollections.sort(cardsToBuildOn, Collections.reverseOrder());\n\t\t\tint moneySpent = 0;\n\t\t\tfor(PropertyCard c: cardsToBuildOn) {\n\t\t\t\twhile(c.getHousePrice()+moneySpent<=moneyToSpend && c.hasSpaceForHouse()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, getName()+ \" built a house on \" + c.getName());\n\t\t\t\t\tbuildHouse(c);\n\t\t\t\t\tmoneySpent+=c.getHousePrice();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n void should_first_player_win_set_and_game_still_in_progress_when_tie_break_activated() {\n List<Integer> setPointOrderTab = Arrays.asList(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1); // 6-6 and 1-0 for firstPlayer\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertEquals(GameStatus.IN_PROGRESS, game.getGameStatus());\n assertTrue(game.isTiebreakIsActivated());\n }", "public boolean solvable() {\n // TODO: Your code here\n // TODO: NICK\n\n\n int parity = 0;\n int blankRow = 0; // the row with the blank tile\n\n\n for (int i = 0; i < n*n; i++){\n if(tiles[i/n][i%n] == 0){\n blankRow = i/3;\n continue;\n }\n for (int j = i + 1; j < n*n; j++) {\n if (tiles[i/n][i%n] > tiles[j/n][j%n] && tiles[j/n][j%n] != 0) {\n parity++;\n }\n }\n }\n\n\n\n // solvability conditions:\n if (n % 2 == 0) { // even grid\n if (blankRow % 2 == 0) { // blank on odd row; counting from bottom\n return parity % 2 == 0;\n } else { // blank on even row; counting from bottom\n return parity % 2 != 0;\n }\n } else { // odd grid\n return parity % 2 == 0;\n }\n }", "@Test\n\tpublic void testIfKingHasLostNearThrone()\n\t{\n\t\tData d = new Data();\n\t\td.set(9, 10); // move 9th white piece to the 10th square\n\t\td.set(10, 9); // move 10th white piece to the 9th square\n\t\td.set(11, 12); // move 11th white piece to the 12th square\n\t\td.set(12, 14); // move 12th white piece to the 14th square\n\t\td.set(14, 71); // set a black piece to square 71\n\t\td.set(15, 73); // set a black piece to square 73\n\t\td.set(16, 83); //set a black piece to square 83, i.e. one below the king\n\t\n\t\t\n\t\tassertTrue(d.kingLost(72)); // a square below the throne is 72\n\t}", "@Test //loop test 0 passes\n\tpublic void testLoop0pass() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = -100;\n\t\tif(! items.isEmpty()) { //check if items is empty, if not get the first item's quality\n\t\t\titems.get(0).getQuality();\n\t\t}\n\t\t//assert quality is -100\n\t\tassertEquals(\"Quality -100 with 0 loop passes\", -100, quality);\n\t}", "@Test\n void should_first_player_win_and_finish_the_game() {\n List<Integer> setPointOrderTab = Arrays.asList(1, 1, 1, 2, 1, 1, 1); // 6-1\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertTrue(firstPlayer.isWinner());\n assertEquals(GameStatus.FINISHED, game.getGameStatus());\n }", "@Override\n protected Move makeDecision() {\n myTurn = index();\n /* block the nearest + most effective player (as in, people who arent blocked) */\n ArrayList<Move> pathMoves = new ArrayList<>();\n ArrayList<Move> playMoves = new ArrayList<>();\n ArrayList<Move> discardMoves = new ArrayList<>();\n Map<Integer, Card> destroyCards = new HashMap<Integer, Card>();\n Map<Integer, Card> repairCards = new HashMap<Integer, Card>();\n Map<Integer, Card> blockCards = new HashMap<Integer, Card>();\n Map<Integer, Card> pathCards = new HashMap<Integer, Card>();\n Set<Position> reachable = game().board().getReachable();\n canSee=false;\n canMove=false;\n canBlock=false;\n canRockfall=false;\n canRepair=false;\n int len = hand().size();\n for (int i = 0; i < len; ++i) {\n Card c = hand().get(i);\n if (c instanceof PathCard && !isSabotaged()) {\n pathCards.put(i,c);\n// pathMoves.addAll(generatePossiblePaths(i, (PathCard) c));\n canMove = true;\n }\n if (c instanceof PlayerActionCard) {\n// playMoves.addAll(generatePossiblePlayerActions(i, (PlayerActionCard) c));\n if(c.type()== Card.Type.BLOCK) {\n blockCards.put(i, c);\n canBlock=true;\n }\n else if(c.type()== Card.Type.REPAIR) {\n repairCards.put(i, c);\n canRepair=true;\n }\n }\n if (c.type() == Card.Type.MAP) {\n// playMoves.addAll(generatePossibleMap(i));\n mapIndex = i;\n canSee = true;\n }\n if (c.type() == Card.Type.ROCKFALL) {\n destroyCards.put(i,c);\n// playMoves.addAll(generatePossibleRockfall(i));\n canRockfall = true;\n }\n discardMoves.add(Move.NewDiscardMove(index(), i));\n }\n\n if(canSee) {\n //sum of all heuristics\n double sumGoal[] = new double[3];\n for (Position h : reachable) {\n sumGoal[0]+=(9-(8-h.x)+ 5-(4-h.y));\n sumGoal[1]+=(9-(8-h.x)+ 5-(2-h.y));\n sumGoal[2]+=(9-(8-h.x)+ 5-(-h.y));\n }\n //update goldProb\n for(int i=0; i<3; i++) {\n int seenSum=0;\n for(int j=0; j<numPlayers; j++) {\n if(j!=myTurn) {\n if(haveSeen.get(j)[i]==1) seenSum++;\n }\n }\n goldProb[i] = (i==1?0.5:1)*(1-haveSeen.get(myTurn)[i])*(mapRate*(seenSum/numPlayers)+(sumGoal[i]/10));\n }\n }\n\n// System.out.println(hand());\n// System.out.println(pathMoves);\n\n\n if (role() == Role.GOLD_MINER) {\n //Path\n if(canSee && !goldFound) {\n int selection=0;\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0;\n double oldH;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n oldH = getClosest(board);\n// System.out.print(getClosest(board)+\" : \");\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n// System.out.println(oldH+\": \"+maxH+\" (\"+abs(maxH-oldH)+\")\");\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n //heal self\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n// System.out.println(Arrays.toString(game().playerAt(index()).sabotaged()));\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(index()).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n// System.out.println(Arrays.toString(game().playerAt(i).sabotaged()));\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = Probability[i]+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1 - Probability[i]) * ((1 - Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Fix (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //See map\n\n //Conserve (Find the best card to discard)\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n } else if (role() == Role.SABOTEUR) {\n //See map\n if(canSee && !goldFound) {\n int selection=0;\n //specific for saboteurs\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n //Path\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n double oldH = getClosestSabotage(board);\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock Friend\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(myTurn).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1-Probability[i])+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (Probability[i]) * ((Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Sabotage (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //Conserve (Find the best card to discard\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n }\n return discardMoves.get(0);\n }", "private void nextRound() {\r\n action = 0;\r\n if (round == GameConstants.ROUNDS) {\r\n round = 0;\r\n if (phase == 0) {\r\n vc = null;\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n }\r\n phase++;\r\n } else {\r\n round++;\r\n }\r\n }", "public void solveGame3() {\n\t\tlosingStates = new HashSet<S>();\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tint[] uncontrollableCount = new int[game.getStates().size()+1];\n\t\tint[] uncontrollableLosingCount = new int[game.getStates().size()+1];\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> uncontrollableSuccesors;\n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\t uncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\n\t\t\t uncontrollableCount[indexCount] = uncontrollableSuccesors.size();\n\t\t\t uncontrollableLosingCount[indexCount] = 0;\n\t\t\t isUncontrollable[indexCount] = game.isUncontrollable(state);\n\t\t\t indexCount+=1;\n\t\t}\n\t\t\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t}\n\n\t\t// Handle the pending states\n\t\twhile (!losing.isEmpty()) {\n\t\t\tS state = losing.poll();\n\n\t\t\t\n\t\t\tlosingStates.add(state);\n\n\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\tfor (S pred : predecessors) {\n\t\t\t\tif(losing.contains(pred) || losingStates.contains(pred))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t//if(i == -1)\n\t\t\t\t\t//continue;\n\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}else{\n\t\t\t\t\tuncontrollableLosingCount[i]++;\n\t\t\t\t\tif (uncontrollableLosingCount[i] == uncontrollableCount[i])\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public boolean makeMove(int pitNumber) {\n\t\tPit aPit = null;\n\t\tString currentPlayer;\n\n\t\t\t\t\n\t\tif (this.isPlayer1Turn()) {\n\n\t\t\taPit = this.getPlayer1Pit(pitNumber);\n\n\t\t} else {\n\n\t\t\taPit = this.getPlayer2Pit(pitNumber);\n\n\t\t}\n\t\tcurrentPlayer = aPit.getpitOwner();\n\t\t// check for pit capacity is empty or not\n\t\tif (aPit.getStones() == 0) {\n\n\t\t\tthis.message = \"House is empty. Move again.\";\n\t\t\treturn false;\n\t\t}\n\t\tint stonesOnHand = aPit.getStones();\n\t\taPit.setStones(0);\n\t\twhile (true) {\n\t\t\t// get the nextPit\n\t\t\taPit = aPit.getNextPit();\n\t\t\t// System.out.println(\"6----------\");\n\n\t\t\t// if the next pit is a Mancala pit of the other user.\n\t\t\tif (isMancalaPit(aPit) && !currentPlayer.equalsIgnoreCase(aPit.getpitOwner())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\taPit.setStones(aPit.getStones() + 1); // increment number of Stones\n\t\t\t\t\t\t\t\t\t\t\t\t\t// of the\n\n\t\t\t// if the number of stones on hand is z then break\n\t\t\tif (--stonesOnHand == 0) { //if last stone drop is the player's mancala Pit, then the player gets another chance.\n\t\t\t\t\n\t\t\t//\tthis.message = this.isPlayer1Turn() + \"player will get anothe chance.\";\n\n\t\t\t\tif (!isMancalaPit(aPit)) {//if last stone drop is not player's mancala Pit then he will get opposite side stone to his mancala pit.\n\t\t\t\t\tSystem.out.println(\"8----------\");\n\n\t\t\t\t\tif (aPit.getpitOwner().equals(currentPlayer) && aPit.getStones() == 1) {\n\t\t\t\t\t\tPit oppositePitStone = getOppositePitStone(aPit.getpitOwner(), aPit.getPitNumber());\n\t\t\t\t\t\tif (oppositePitStone.getStones() != 0) {// move all the stones present in opposite side pit to owner mancalaPit.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tPit mancalaPit = getMancala(currentPlayer);\n\t\t\t\t\t\t\tmancalaPit.setStones(oppositePitStone.getStones() + mancalaPit.getStones() + aPit.getStones());\n\t\t\t\t\t\t\toppositePitStone.setStones(0); // reset opposite pit's stone count as 0.\n\t\t\t\t\t\t\taPit.setStones(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.setPlayer1Turn(!this.isPlayer1Turn());// now next player turn\n\t\t\t\t}\n\n\t\t\t\t/* Determine if Game is over. */\n\t\t\t\tif (0 == getStonesInPits(this.getNextPlayer())) {\n\t\t\t\t\tif (this.player1Name.equalsIgnoreCase(this.getWinner())) {\n\t\t\t\t\t\tthis.message = \"Player 1 wins!\";\n\t\t\t\t\t} else if (\"Tie\".equalsIgnoreCase(this.getWinner())) {\n\t\t\t\t\t\tthis.message = \"A tie!\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.message = \"Player 2 wins!\";\n\t\t\t\t\t}\n\t\t\t\t\tthis.isGameOver = true;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\t}" ]
[ "0.5879613", "0.58230746", "0.55910146", "0.55186355", "0.5471682", "0.5467091", "0.5446042", "0.5428008", "0.54139674", "0.5404922", "0.5360964", "0.5355068", "0.5301301", "0.52520907", "0.524421", "0.5239846", "0.52294195", "0.51623374", "0.5159011", "0.51522946", "0.51365983", "0.5133147", "0.5131741", "0.5127877", "0.5117073", "0.5102904", "0.5102215", "0.5093972", "0.5092222", "0.50918406", "0.5048583", "0.5035092", "0.50280124", "0.50222045", "0.5011937", "0.5011201", "0.5007343", "0.50004345", "0.49991518", "0.49912152", "0.4990861", "0.49862823", "0.49831814", "0.49746224", "0.4963805", "0.49622318", "0.49575156", "0.49543852", "0.493238", "0.49314505", "0.49300104", "0.49288538", "0.49202305", "0.4916765", "0.49154195", "0.48998493", "0.48839152", "0.4877943", "0.48772785", "0.48736352", "0.48709247", "0.48684177", "0.48666537", "0.48638406", "0.485888", "0.48535988", "0.48505694", "0.48464274", "0.4846205", "0.484611", "0.48433858", "0.48418042", "0.483456", "0.4832634", "0.48320872", "0.48315704", "0.48268113", "0.48145992", "0.48135778", "0.48123857", "0.48035875", "0.47904265", "0.47897917", "0.4781018", "0.47808123", "0.47801754", "0.47785094", "0.477764", "0.4768571", "0.47657135", "0.47648853", "0.4763877", "0.476361", "0.47634822", "0.4763431", "0.4754384", "0.47515446", "0.4750405", "0.47458526", "0.47449395" ]
0.7183224
0
float[][] m = new float[2][3];
public static void main(String[] args) { float[][] m = { {1,2,3},{4,5,6},{7,8,2} }; new Solver(m); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Matrix3f(float v[]) {\n\t\n \tthis.set(v);\n }", "public native float[][] __float2dArrayMethod( long __swiftObject, float[][] arg );", "public abstract float[] toFloatArray();", "float[] getModelMatrix();", "float[] getMVPMatrix();", "public float[] array() {\r\n\t\treturn new float[] { x, y, z };\r\n\t}", "static public float[][] expandArray(float[][] f) {\n\t\tint newSize=f.length*2; \n\t\tfloat [][] newf=new float[newSize][];\n\t\tfor(int i=0; i<f.length; i++) newf[i]=f[i];\n return newf;\n }", "Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }", "float[] getViewMatrix();", "public Object[][] get2DArray();", "public void setArray(float[] paramArrayOfFloat)\n/* */ {\n/* 791 */ if (paramArrayOfFloat == null) {\n/* 792 */ setNullArray();\n/* */ }\n/* */ else {\n/* 795 */ setArrayGeneric(paramArrayOfFloat.length);\n/* */ \n/* 797 */ this.elements = new Object[this.length];\n/* */ \n/* 799 */ for (int i = 0; i < this.length; i++) {\n/* 800 */ this.elements[i] = Float.valueOf(paramArrayOfFloat[i]);\n/* */ }\n/* */ }\n/* */ }", "Matrix(int r,int c)\n {\n this.r=r;\n this.c=c;\n arr=new int[r][c];\n }", "public final void set(float m[]) {\n\tm00 = m[ 0]; m01 = m[ 1]; m02 = m[ 2];\n\tm10 = m[ 3]; m11 = m[ 4]; m12 = m[ 5];\n\tm20 = m[ 6]; m21 = m[ 7]; m22 = m[ 8];\n }", "public abstract float[] getasFloat(int tuple);", "public SFVec3f(float t[]) {\n\t\tset(t);\n\t}", "public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }", "@Override\n public void init(float[] data) {\n this.data = data;\n\n //\n shapeArr = new Rectangle2D.Float[data.length];\n colorArr = new Color[data.length];\n pointArr = new Point2D.Float[data.length];\n }", "public static native PointerByReference OpenMM_3D_DoubleArray_create(int size1, int size2, int size3);", "public static long[][] multiply(long F[][], long M[][]){\n long x = F[0][0]*M[0][0] + F[0][1]*M[1][0]; \n long y = F[0][0]*M[0][1] + F[0][1]*M[1][1]; \n long z = F[1][0]*M[0][0] + F[1][1]*M[1][0]; \n long w = F[1][0]*M[0][1] + F[1][1]*M[1][1]; \n\n return new long[][]{{x,y},{z,w}};\n }", "double[][] asDouble();", "@Override\n public Object getNDArray() {\n NDArray<?>[] arr = new NDArray[2];\n arr[0] = new NDArray<>(getMagGrid().getFloats(), getMagGrid().getYdim(),\n getMagGrid().getXdim());\n arr[1] = new NDArray<>(getDirGrid().getFloats(), getDirGrid().getYdim(),\n getDirGrid().getXdim());\n return arr;\n }", "public float[] getAsFloats() {\n return (float[])data;\n }", "static public float[] expandArray(float[] f) {\n\t\tint newSize=f.length*2; \n\t\tfloat [] newf=new float[newSize];\n System.arraycopy(f, 0, newf, 0,\t\n Math.min(f.length, newSize));\n return newf;\n }", "public FloatArray(int initialCapacity) {\r\n this.elementData = new float[initialCapacity];\r\n }", "public Vector(float[] axis){ this.axis = axis;}", "public interface Array2D {\n}", "public static int[][][] init3DArray(int count){\r\n return new int[count][count][count];\r\n }", "public float [][] GetMatrix() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t\n\tmat_f_m :\n\t The self matrix\n\t*/\n\t\n\treturn this.mat_f_m;\n \n }", "public float[] getVector() {\r\n\t\t\r\n\t\tfloat array[]=new float[12];\r\n\t\tint index=-1;\r\n\t\t\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\t++index;\r\n\t\t\t\tarray[index]=thecounts[i][j]; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array;\r\n\t}", "public native float[] __floatArrayMethod( long __swiftObject, float[] arg );", "public DynamicArray(){\n\t \n\t array = (E[]) new Object[dim];\n }", "private static final double[][] doubleArray2d (final List points) {\n final int m = points.size();\n final int n = ((List) points.get(0)).size();\n final double[][] a = new double[m][n];\n for (int i=0;i<m;i++) {\n final List row = (List) points.get(i);\n for (int j=0;j<n;j++) {\n a[i][j] = ((Number) row.get(j)).doubleValue(); } }\n return a; }", "public MType visit(ArrayAllocationExpression n, MType argu) {\n \tMType _ret = new MArray(argu);\n \t\n \tn.f3.accept(this, argu);\n \t\n \treturn _ret;\n \t}", "public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public float[] toFloatArray(double[] arr) {\n if (arr == null) return null;\n int n = arr.length;\n float[] ret = new float[n];\n for (int i = 0; i < n; i++) {\n ret[i] = (float)arr[i];\n }\n return ret;\n}", "public Matrix(int m, int n) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n }", "public Maze3d(int[][][] m)\r\n\t{\r\n\t\tthis.maze = m;\r\n\t}", "private void init() {\r\n\tlocals = new float[maxpoints * 3];\r\n\ti = new float[] {1, 0, 0};\r\n\tj = new float[] {0, 1, 0};\r\n\tk = new float[] {0, 0, 1};\r\n\ti_ = new float[] {1, 0, 0};\r\n\tk_ = new float[] {0, 0, 1};\r\n }", "public Vector2f (float[] values)\n {\n set(values);\n }", "public Transform(float[][] v){\n if(v.length != 4 || v[0].length != 4)\n throw new IllegalArgumentException(\n \"Transform: Wrong size array for argument: \" + v);\n else\n values = v;\n }", "public abstract void read_float_array(float[] value, int offset, int\nlength);", "public static Number[][] array2Object(float[][] array) {\n Number[][] ret = new Number[array.length][];\n for (int i = 0; i < array.length; i++) {\n ret[i] = ArrayUtils.toObject(array[i]);\n }\n return ret;\n }", "public FloatByteMap(float[][][] f) {\n _clips = new Clips(f);\n }", "protected abstract void fromSpace( float[] abc );", "public static void main(String[] args) {\n\n float[][][] arr = new float[500][14761][2];\n\n\n // Shallow\n System.out.println(ClassLayout.parseInstance(arr));\n\n\n System.out.println(GraphLayout.parseInstance((Object) arr).toFootprint());\n\n\n float[][][] arr2 = new float[2][500][14761];\n System.out.println(GraphLayout.parseInstance((Object) arr2).toFootprint());\n\n }", "public short[][] getIntensity(){ return intensity; }", "public MutableArray(float[] paramArrayOfFloat, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 213 */ this.sqlType = paramInt;\n/* 214 */ this.old_factory = paramCustomDatumFactory;\n/* 215 */ this.isNChar = false;\n/* */ \n/* 217 */ setArray(paramArrayOfFloat);\n/* */ }", "public Map(){\r\n map = new Square[0][0];\r\n }", "public PointFloat[] newArray(int size) {\n return new PointFloat[size];\n }", "public float[] asArray() {\n\t\treturn new float[] { this.hue, this.saturation, this.intensity };\n\t}", "public static native void OpenMM_3D_DoubleArray_set(PointerByReference array, int index1, int index2, PointerByReference values);", "Matrix(double[][] input) {\n matrixVar = input;\n columns = matrixVar[0].length;\n rows = matrixVar.length;\n }", "public float[] getFloatArray(final String key) {\n return getFloatArray(key, ArrayUtils.EMPTY_FLOAT_ARRAY);\n }", "public f[] newArray(int i) {\r\n return new f[i];\r\n }", "public float[] get_mbr() {\r\n // fuer Punktdaten trivial: untere_grenze == obere_grenze\r\n /*float[] f = new float[2 * this.dimension];\r\n for (int i = 0; i < this.dimension; i++)\r\n f[2*i] = f[2*i+1] = this.data[i];\r\n return f;*/\r\n\r\n float[] f = new float[2 * this.dimension];\r\n System.arraycopy(data, 0, f, 0, 2 * dimension);\r\n return f;\r\n }", "public FloatVector3D(float[] f)\n {\n fx = f[0];\n fy = f[1];\n fz = f[2];\n setMagnitude();\n }", "public native double[][] __double2dArrayMethod( long __swiftObject, double[][] arg );", "public final void setRow(int row, float v[]) {\n\tif (row == 0) {\n\t m00 = v[0];\n\t m01 = v[1];\n\t m02 = v[2];\n\t} else if (row == 1) {\n\t m10 = v[0];\n\t m11 = v[1];\n\t m12 = v[2];\n\t} else if (row == 2) {\n\t m20 = v[0];\n\t m21 = v[1];\n\t m22 = v[2];\n\t} else {\n\t throw new ArrayIndexOutOfBoundsException(\"row must be 0 to 2 and is \" + row);\n\t}\n }", "public Matrix(double vals[], int m) throws JPARSECException {\n this.m = m;\n n = (m != 0 ? vals.length/m : 0);\n if (m*n != vals.length) {\n throw new JPARSECException(\"Array length must be a multiple of m.\");\n }\n data = new double[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n data[i][j] = vals[i+j*m];\n }\n }\n }", "private float[] toFloatArray(double[] arr) {\n\t\tif (arr == null)\n\t\t\treturn null;\n\t\tint n = arr.length;\n\t\tfloat[] outputFloat = new float[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\toutputFloat[i] = (float) arr[i];\n\t\t}\n\n\t\treturn outputFloat;\n\t}", "public final void set(float t[]) {\n\t\tthis.x = t[0];\n\t\tthis.y = t[1];\n\t\tthis.z = t[2];\n\t}", "public void updateExtraTransformMatrix(float[] fArr) {\n }", "Array createArray();", "protected ArrayList<double[]> newMatrix(int _rows, int _cols) {\n ArrayList<double[]> matrix = new ArrayList<double[]>();\n for (int i=0; i<_rows; i++) {\n matrix.add(new double[_cols]);\n }\n return matrix;\n }", "public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}", "public Matrix(double[] data) {\n m = data.length;\n n = 1;\n this.data = new double[m][n];\n for (int i = 0; i < m; i++)\n {\n for (int j = 0; j < n; j++)\n {\n \tthis.data[i][j] = data[i];\n }\n }\n }", "public float[] toArray() {\r\n float[] result = new float[size];\r\n System.arraycopy(elementData, 0, result, 0, size);\r\n return result;\r\n }", "public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public MutableArray(int paramInt, float[] paramArrayOfFloat, ORADataFactory paramORADataFactory)\n/* */ {\n/* 133 */ this.sqlType = paramInt;\n/* 134 */ this.factory = paramORADataFactory;\n/* 135 */ this.isNChar = false;\n/* */ \n/* 137 */ setArray(paramArrayOfFloat);\n/* */ }", "float[] getProjectionMatrix();", "public void get (float[] values)\n {\n values[0] = x;\n values[1] = y;\n }", "static public float[] resizeArrayFloat(float[] f,int newSize) {\n\t\tfloat [] newf=new float[newSize];\n System.arraycopy(f, 0, newf, 0,\t\n Math.min(f.length, newSize));\n return newf;\n }", "@Override\r\n\tpublic float[] toFloats() {\n\t\treturn null;\r\n\t}", "@Test\n public void testCreateTranspose3(){\n double[][] a = new double[4][2];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }", "public FloatByteMap(float[][] f) {\n _clips = new Clips(f);\n }", "double[][] asArray(){\n double[][] array_to_return = new double[this.rows][this.cols];\n for(int i=0; i<this.rows; i++){\n for(int j=0; j<this.cols; j++) array_to_return[i][j] = this.data[i*this.cols + j];\n }\n\n return array_to_return;\n }", "public static void arrayDeclarationInitialization() {\n\n double[] arrayOfDoubles = new double[] { 12.56, 45.87, 14.85 };\n\n // This is also ok.\n\n int[] arrayOfInts = { 12, 21, 0, 5, 7 };\n\n int[] i = new int[10 + 5]; // Array size can be an expression resulting an integer\n\n int[] i1 = new int[(byte) 10]; // byte is auto-widened to int\n\n // int i3 = new int[10.25]; //Compile Time Error : size can not be double\n }", "public static double[] multiplyVectorByMatrix( double[] v, double[][] m ) {\n double[] result = new double[3];\n multiplyVectorByMatrix(v, m, result);\n return result;\n }", "public Matrice(int dim){\n\t\tnr=dim;\n\t\tnc=nr;\n\t\tmat = new int[nr][nc];\n\t}", "public double[] toArray() {\n\t\treturn new double[] {x, y, z};\n\t}", "public void testNIO_float_array() throws Exception {\n float[] floatArray = new float[8];\n FloatBuffer fb = FloatBuffer.wrap(floatArray);\n floatBufferTest(fb);\n }", "public ArrayOfFraction()\r\n\t{\r\n\t\ta=new Fraction [2];\r\n\t\tn=0;\r\n\t}", "public VectorFloat(int numElements) {\n this(numElements, new float[numElements]);\n }", "public static void main(String[] args) {\n\tint[] a = new int[3];\r\n\t\r\n\t// At the time of construction we must specify the size\r\n\t//int[] a = new int[]; => Gives compile time error.\r\n\t\r\n\tint[] b = new int[0]; //=> Legal to have zero size array\r\n\t\r\n\tint[] c = new int[-6]; //=> no compile time error but gives run time exception\r\n\t\r\n\t// Array size can be specified using byte,short,int,char types of data.\r\n\t\r\n\tint[] d = new int['a']; //char type\r\n\t\r\n\tbyte e = 10;\r\n\tint[] f = new int[e]; //byte type\r\n\t\r\n\tshort g = 20;\r\n\tint[] h = new int[g]; //short type\r\n\t\r\n //int[] i = new int[58l]; // Compile time error\r\n //int[] j = new int[10.2]; //Compile time error\r\n\t\r\n\t\r\n\t//========> Construction of multi dimensional Arrays <=========//\r\n\t\r\n\t// In Java multi dimensional arrays are implemented by using Array of Arrays concept\r\n\t\r\n\tint[][] i = new int[3][]; \r\n\ti[0] = new int[2];\r\n\ti[1] = new int[3];\r\n\ti[2] = new int[8];\r\n\t\r\n\t\r\n\tint[][][] j = new int[2][][];\r\n\tj[0] = new int[3][];\r\n\tj[0][0] = new int[1];\r\n\tj[0][1] = new int[2];\r\n\tj[0][2] = new int[3];\r\n\tj[1] = new int[2][2];\r\n\t\r\n\t\r\n\t\r\n\t\r\n}", "public static int [][][] buildMat3d() {\n //defines array to be 3 X 7X 9 dimensioned\n int mat3d [][][]= new int [3][7][9];\n //for loop which runs 3 times\n for(int s=0; s<3; s++) {\n //for loop which runs a different amount of times\n for(int j=0; j<(3+2*s); j++) {\n //for loop which does the same\n for(int c=0; c<(s+j+1); c++) {\n //defines values based on raondom generation\n mat3d[s][j][c]= (int)(Math.random()*99);\n \n }\n }\n }\n //returns the resulting array\n return mat3d;\n }", "public Matrix3f(Matrix3d m1) {\n\t\n \tthis.m00 = (float)m1.m00;\n \tthis.m01 = (float)m1.m01;\n \tthis.m02 = (float)m1.m02;\n \tthis.m10 = (float)m1.m10;\n \tthis.m11 = (float)m1.m11;\n \tthis.m12 = (float)m1.m12;\n \tthis.m20 = (float)m1.m20;\n \tthis.m21 = (float)m1.m21;\n \tthis.m22 = (float)m1.m22;\n }", "public void llenarMatriz(){\n Scanner in = new Scanner(System.in);\n setMatriz(new float[3][3]);\n //int matriz1[][] ={{2,3,1},{1,-1,2},{0,1,0}};\n //int matriz1[][] ={{5,-2,3},{1,2,2},{-4,-1,3}};\n //float matriz1[][] ={{1,-2,5},{3,3,-1},{0,4,-2}};\n for(int i=0;i<3;i++){\n for(int j=0;j<3;j++){\n System.out.println(\"Ingresa valor la posición [\"+i+\"][\"+j+\"]\");\n getMatriz()[i][j]= in.nextInt();\n }\n }\n mostrarMatriz(getMatriz(),\"Matriz inicial\");\n }", "protected abstract float[] getRgbLut();", "void writeFloats(float[] f, int off, int len) throws IOException;", "static float[] mulVM(float[] vt, float[] m){\n \n if(vt.length != 4){\n \t \tthrow new IllegalArgumentException();\n }\n \n return mulVM(vt, vt[3], m); \t\n }", "Matrix()\n {\n x = new Vector();\n y = new Vector();\n z = new Vector();\n }", "public void mo6076a(float... fArr) {\n int i = 1;\n this.f2341d = Float.TYPE;\n int length = fArr.length;\n C0933a[] c0933aArr = new C0933a[Math.max(length, 2)];\n if (length == 1) {\n c0933aArr[0] = new C0933a();\n c0933aArr[1] = (C0933a) C0932g.m2565a(1.0f, fArr[0]);\n } else {\n c0933aArr[0] = (C0933a) C0932g.m2565a(0.0f, fArr[0]);\n while (i < length) {\n c0933aArr[i] = (C0933a) C0932g.m2565a(((float) i) / ((float) (length - 1)), fArr[i]);\n i++;\n }\n }\n this.f2342e = new C0929d(c0933aArr);\n }", "public abstract double[] toDoubleArray();", "public VectorFloat(float[] storage) {\n this(storage.length / elementSize, storage);\n }", "@Test\n public void testCreateTranspose1(){\n double[][] a = new double[1][1];\n a[0][0] = Math.random();\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }", "public final void setColumn(int column, float v[]) {\n\tif (column == 0) {\n\t m00 = v[0];\n\t m10 = v[1];\n\t m20 = v[2];\n\t} else if (column == 1) {\n\t m01 = v[0];\n\t m11 = v[1];\n\t m21 = v[2];\n\t} else if (column == 2) {\n\t m02 = v[0];\n\t m12 = v[1];\n\t m22 = v[2];\n\t} else {\n\t throw new ArrayIndexOutOfBoundsException(\"column must be 0 to 2 and is \" + column);\n\t}\n }", "public int[][] initMatrix(int n)\n {\n\t// create an empty 2d array and return it! Simple stuff here.\n\t int[][] retMatrix = new int[n][n];\n\t return retMatrix;\n }", "public Matrix(int[][] array)\n {\n matrix = array;\n }", "int main()\n {\n int tri[][] = {{1, 0, 0},\n {4, 8, 0},\n {1, 5, 3}};\n return 0;\n }", "public Matrix(int[][] array){\n this.matriz = array;\n }", "public\n\tVector3()\n\t{\n\t\tdata = new double[3];\n\t\tdata[0] = 0;\n\t\tdata[1] = 0;\n\t\tdata[2] = 0;\n\t}" ]
[ "0.6720004", "0.6605453", "0.65138596", "0.64575225", "0.64068615", "0.63705707", "0.608522", "0.59014046", "0.5900914", "0.58896536", "0.5868722", "0.58524215", "0.58500147", "0.5848433", "0.5805075", "0.58021045", "0.5794342", "0.57645124", "0.5756896", "0.5741091", "0.57167476", "0.5699618", "0.5646314", "0.56354535", "0.56280094", "0.56239057", "0.56163675", "0.55758876", "0.5575307", "0.55718344", "0.55320174", "0.5529398", "0.55291", "0.5522232", "0.5513838", "0.5502452", "0.5493827", "0.5487271", "0.54807776", "0.5460949", "0.5433509", "0.5425419", "0.5416499", "0.54055184", "0.5404903", "0.53782177", "0.537485", "0.5354775", "0.5335725", "0.5335044", "0.53322995", "0.5325922", "0.53171843", "0.53060985", "0.52951795", "0.5281419", "0.5272623", "0.5269722", "0.5263979", "0.52416134", "0.523195", "0.52304035", "0.52192193", "0.5215677", "0.5208544", "0.5207443", "0.52062255", "0.5196893", "0.5190432", "0.5189688", "0.51883745", "0.51846766", "0.5163048", "0.51610535", "0.5160655", "0.51576436", "0.51317936", "0.5129026", "0.5126187", "0.5122964", "0.51207024", "0.51207", "0.5111645", "0.5110864", "0.51074255", "0.5097225", "0.5088749", "0.5087573", "0.50766057", "0.50735545", "0.5071624", "0.5070481", "0.5068819", "0.5067127", "0.50574553", "0.50461954", "0.5043256", "0.50379765", "0.5033343", "0.5031817", "0.5027433" ]
0.0
-1
O(N^3) better style, from prashant404
public int sumOddLengthSubarrays1(int[] arr) { int total = 0; for (int window = 1; window <= arr.length; window += 2) for (int i = 0; i + window <= arr.length; i++) for (int j = i; j < i + window; j++) total += arr[j]; return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(1)\r\n nums[i+1]=nums[j+1]; //O(1)\r\n nums[j+1]=temp; // O(1)\r\n while(j+1<nums.length && nums[j+1] != 4) //O(n)\r\n j++; // n+1\r\n }\r\n i++; // n+1\r\n }\r\n return nums; //O(1)\r\n}", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public static int f3(int N) {\n \n // O(1)\n if (N == 0) return 1;\n else{ \n \n int x = 0;\n // O(N)\n for(int i = 0; i < N; i++)\n x += f3(N-1);\n return x;\n }\n }", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public int findDuplicate(int[] nums) {\n if(nums == null || nums.length == 0) return 0;\n\n int slow = nums[0];\n int fast = nums[nums[0]];\n\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n}", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "public List<List<Integer>> threeSum(int[] nums) {\n List<List<Integer>> result = new ArrayList<>(nums.length);\n\n // Prepare\n Arrays.sort(nums);\n// int firstPositiveIndex = 0;\n// int negativeLength = 0;\n// List<Integer> numsFiltered = new ArrayList<>();\n// for (int i = 0; i < nums.length; i++) {\n// if (i == 0 || i == 1 || nums[i] == 0 || (nums[i] != nums[i-2])) {\n// numsFiltered.add(nums[i]);\n// if ((nums[i] >= 0) && (firstPositiveIndex == 0)) {\n// firstPositiveIndex = numsFiltered.size() - 1;\n// }\n// if ((nums[i] <= 0)) {\n// negativeLength = numsFiltered.size();\n// }\n// }\n// }\n// nums = numsFiltered.stream().mapToInt(i->i).toArray();\n\n // Func\n\n for(int i=0; (i < nums.length) && (nums[i] <= 0); i++) {\n if (i != 0 && nums[i] == nums[i-1]) {\n continue;\n }\n for(int j=i+1; j<nums.length; j++) {\n if (j != i+1 && nums[j] == nums[j-1]) {\n continue;\n }\n for(int k=nums.length-1; (k>j) && nums[k] >= 0; k--) {\n if (k != nums.length-1 && nums[k] == nums[k+1]) {\n continue;\n }\n int sum = nums[i]+nums[j]+nums[k];\n if (sum > 0) {\n continue;\n } else if (sum < 0) {\n break;\n }\n\n List<Integer> ok = new ArrayList<>();\n ok.add(nums[i]);\n ok.add(nums[j]);\n ok.add(nums[k]);\n result.add(ok);\n break;\n }\n }\n }\n\n// System.out.println(\"Finish time = \" + (System.nanoTime() - start) / 1_000_000);\n// System.out.println(\"result size = \" + result.size());\n\n return result;\n }", "private static int queryLazy(int[] segtree, int[] lazyValue, int l, int r, int ns, int ne, int index) {\n if(lazyValue[index]!=0){\n segtree[index]+=lazyValue[index];\n if(ns!=ne){\n lazyValue[2*index]+=lazyValue[index];\n lazyValue[2*index+1]+=lazyValue[index];\n }\n lazyValue[index]=0;\n }\n if(r<ns || l>ne){\n //no overlap\n return Integer.MAX_VALUE;\n }\n if(ns>=l && ne<=r){\n //complete overlap\n return segtree[index];\n }else{\n //partial overlap\n int mid=(ns+ne)/2;\n int leftAns=queryLazy(segtree, lazyValue, l, r, ns, mid, 2*index);\n int rightAns=queryLazy(segtree, lazyValue, l, r, mid+1, ne, 2*index+1);\n return Math.min(leftAns,rightAns);\n }\n }", "static long findSum(int N)\n\t{\n\t\tif(N==0) return 0;\n\t\treturn (long)((N+1)>>1)*((N+1)>>1)+findSum((int)N>>1);\n\t\t\n\t}", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}", "public boolean linearIn(int[] outer, int[] inner) {\r\n int comp=0; // O(1)\r\n int count=0; // O(1)\r\n if(inner.length==0) // O(1)\r\n return true; // O(1)\r\n for(int i=0; i<outer.length; i++) { // O(n)\r\n if(outer[i]==inner[count]) { // O(1)\r\n comp++; // O(1)\r\n count++; // O(1)\r\n } else if(outer[i]>inner[count]) // O(1)\r\n return false; // O(1)\r\n if (comp==inner.length) // O(1)\r\n return true; // O(1)\r\n }\r\n return false; // O(1)\r\n}", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "private int hashFunc2(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n // Research shows that you can use a Prime number Less than the array size to calculate the step value.\n // Prime Number 3 arbitrarily chosen.\n return 3 - hashVal % 3;\n }", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "static int[] OnepassSol1(int[]a, int n){\r\n Map<Integer, Integer> map = new HashMap<>();\r\n for (int i = 0; i < a.length; i++) {\r\n int complement = n - a[i];\r\n if (map.containsKey(complement)) {\r\n return new int[] { map.get(complement), i };\r\n }\r\n map.put(a[i], i);\r\n }\r\n int[] ans = {-1,-1};\r\n return ans;\r\n }", "private static int find(int i)\r\n{\n int ind = i;\r\n while (ind != ptrs[ind]) {\r\n ind = ptrs[ind];\r\n }\r\n // fix the link so that it is one hop only\r\n // note: this doesn't implement the full union-find update\r\n\r\n ptrs[i] = ind;\r\n\r\n return ind;\r\n}", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "static long arrayManipulation(int n, int[][] queries) {\r\n long result = 0, sum = 0;\r\n long[] arr = new long[n];\r\n for(int i = 0; i < queries.length; i++){\r\n int firstIndex = queries[i][0] - 1;\r\n int lastIndex = queries[i][1] - 1;\r\n long numberToAdd = queries[i][2];\r\n arr[firstIndex] += numberToAdd;\r\n if (lastIndex+1 < n)\r\n arr[lastIndex+1] -= numberToAdd;\r\n }\r\n\r\n for(long l : arr){\r\n sum += l;\r\n if(sum > result)\r\n result = sum;\r\n }\r\n\r\n return result;\r\n }", "public List<List<Integer>> threeSum(int[] nums) {\n Arrays.sort(nums);\n\n Set<List<Integer>> triplets = new HashSet<List<Integer>>();\n\n for (int i = 0; i < nums.length; i++) {\n // we choose the number at index i to pinpoint\n int a = nums[i];\n int deficit = 0 - a;\n\n // initialize our two pointers such that they're at either end of the\n // array and that they're not i\n int b = i == 0 ? 1 : 0;\n int c = i == nums.length - 1 ? nums.length - 2 : nums.length - 1;\n\n while (b < c) {\n // check if b and c add up to the deficit\n if (nums[b] + nums[c] == deficit) {\n // add it to the list\n List<Integer> triplet = new ArrayList<Integer>();\n\n triplet.add(a);\n triplet.add(nums[b]);\n triplet.add(nums[c]);\n\n Collections.sort(triplet);\n if (!triplets.contains(triplet)) {\n triplets.add(triplet);\n }\n\n\n // move pointer up and down\n c -= 1;\n if (c == i) {\n c -= 1;\n }\n\n b += 1;\n if (b == i) {\n b += 1;\n }\n } else if (nums[b] + nums[c] > deficit) {\n // if it's too large, bring top pointer down\n c -= 1;\n if (c == i) {\n c -= 1;\n }\n } else {\n // if it's too small, bring bottom pointer up\n b += 1;\n if (b == i) {\n b += 1;\n }\n }\n }\n }\n\n List<List<Integer>> last = new ArrayList<List<Integer>>(triplets);\n return last;\n }", "static int find(int[] arr){\n\t\tif(arr.length==1) return -1;\n\t\tint slow = arr[0] , fast = arr[arr[0]];\n\t\twhile(slow!=fast){\n\t\t\tslow = arr[slow];\n\t\t\tfast = arr[arr[fast]];\n\t\t}\n\t\tslow = 0;\n\t\twhile(slow!=fast){\n\t\t\tslow = arr[slow];\n\t\t\tfast = arr[fast];\n\t\t}\n\t\treturn slow;\n\n\t}", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "private int getIndex2(int val){\n return val/bucket;\n }", "static int beautifulTriplets(int d, int[] arr) {\n int result = 0;\n\n for (int i = 0; i < arr.length; i++) {\n int prev = arr[i];\n int arrCount = 1;\n\n for (int j = i+1; j < arr.length; j++) {\n if (prev + d == arr[j]) {\n arrCount++;\n prev = arr[j];\n if (arrCount == 3) {\n result++;\n break;\n }\n }\n }\n }\n\n return result;\n }", "static int countCollinearFast(int[] a1, int[] a2, int[] a3)\n {\n //TODO: implement this method\n \tsort(a3);\n \tint count = 0;\n \tint search;\n \t\n \tfor (int i=0; i<a1.length; i++)\n \t\tfor (int j=0; j<a2.length; j++)\n \t\t{\n \t\t\tsearch = 2*a2[j] - a1[i];\n \t\t\tif (binarySearch(a3, search))\n \t\t\t\tcount++;\n \t\t}\n \t\n \treturn count;\n }", "public static void main(String[] args){\n int MIN = Integer.parseInt(args[0]);\n MAX = Integer.parseInt(args[1]);\n cutoffs = new int[args.length - 2];\n cache = new ArrayList<IndexedArrayList<SuperSavvyTrieHelper2>>();\n for (int i = 2; i < args.length; i++){\n cutoffs[i - 2] = Integer.parseInt(args[i]);\n cache.add(new IndexedArrayList<SuperSavvyTrieHelper2>());\n }\n for (int i = 0; i < cutoffs.length / 2; i++){\n int temp = cutoffs[i];\n cutoffs[i] = cutoffs[cutoffs.length - 1 - i];\n cutoffs[cutoffs.length - 1 - i] = temp;\n }\n multiplicitiesUsed = new boolean[MAX + 1];\n basesUsed = new DoublyLinkedArray(MAX + 1);\n SuperSavvyTrieHelper2.setCorrespondance(basesUsed);\n /*\n long count1 = lowerRecursion(MAX, 0);\n long count2 = middleRecursion(MAX, 0);\n long count3 = upperRecursion(MAX, 0);\n long total = count1 + count2 + count3;\n System.out.printf(\"%d + %d + %d = %d\\n\", count1, count2, count3, total);\n */\n hitCounts = new long[cutoffs.length];\n missCounts = new long[cutoffs.length];\n statCollector = new StatCollector(cutoffs);\n\n long startTime = System.nanoTime();\n long[] values = new long[MAX - MIN + 1];\n for (int i = MIN; i <= MAX; i++) {\n values[i - MIN] = upperRecursionWrapper(i);\n }\n //long[] testValues = new long[] {1752443,1911046, 2067456,2249444,2429337, 2647532,2852449,3101167,3350292,3632299,3916575};\n for (int i = 0; i < values.length; i++){\n //if (testValues[i] != values[i]){\n System.out.printf(\"%d: %d\\n\", i + MIN, values[i]);\n //}\n }\n long endTime = System.nanoTime();\n System.out.printf(\"%f,\", (double)(endTime - startTime) / 1000000000.0);\n long totalMissCounts = 0;\n long totalMissWeight1 = 0;\n long totalMissWeight2 = 0;\n long totalMissWeight3 = 0;\n /*\n for (int i = 0; i < cutoffs.length; i++){\n long totalCounts = hitCounts[i] + missCounts[i];\n totalMissCounts += missCounts[i];\n totalMissWeight1 += missCounts[i] * cutoffs[i];\n totalMissWeight2 += (hitCounts[i] / missCounts[i]) * cutoffs[i];\n totalMissWeight3 += (hitCounts[i] - missCounts[i]) * cutoffs[i] * cutoffs[i];\n System.out.printf(\"\\tCache %d: %d/%d/%d (%.5f%%)\", cutoffs[i], hitCounts[i], missCounts[i], totalCounts, (double) hitCounts[i] / totalCounts);\n }\n System.out.printf(\"\\t\\tMissCounts: %d, weighted: %d, ratio: %d, diff^2: %d\\n\", totalMissCounts, totalMissWeight1, totalMissWeight2, totalMissWeight3);\n */\n statCollector.printAll();\n }", "public static int ulam(int n) {\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n\n int i = 3;\n while (list.size() < n) {\n\n int count = 0;\n for (int j = 0; j < list.size() - 1; j++) {\n\n for (int k = j + 1; k < list.size(); k++) {\n if (list.get(j) + list.get(k) == i)\n count++;\n if (count > 1)\n break;\n }\n if (count > 1)\n break;\n }\n if (count == 1)\n list.add(i);\n i++;\n }\n return list.get(n - 1);\n }", "int query(int l, int r) {\n l += n;\n r += n;\n int resl = identity;\n int resr = identity;\n while (l < r) {\n if ((l & 1) > 0) resl = combine(resl, st[l++]);\n if ((r & 1) > 0) resr = combine(st[--r], resr);\n l /= 2;\n r /= 2;\n }\n return combine(resl, resr);\n }", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "static int getMissingByAvoidingOverflow(int a[], int n)\n\t {\n\t int total = 2;\n\t for (int i = 3; i <= (n + 1); i++)\n\t {\n\t total =total+ i -a[i - 2];\n\t //total =total- a[i - 2];\n\t }\n\t return total;\n\t }", "private int hashFunc1(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n // Java can return negative vals with hashCode() it's biggg so need to check for this\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n return hashVal; // Idea index position we'd like to insert or search in\n }", "public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n if (t < 0) return false;\n TreeSet<Long> set = new TreeSet<>();\n for (int i = 0; i < nums.length; ++i) {\n long num = (long)nums[i];\n Long floor = set.floor(num), ceiling = set.ceiling(num);\n if (floor != null && num - floor <= t || ceiling != null && ceiling - num <= t) return true;\n set.add(num);\n if (i >= k) set.remove((long)nums[i - k]);\n }\n return false;\n}", "static long nPolyNTime(int[] n) {\n int temp = n.length;\n long sum = 0;\n if(n == null || n.length == 0) return -1;\n for(int i = 0; i < n.length; ++i) {\n while(temp --> 0) {\n for(int j = 0; j < n.length; ++j) {\n sum += n[i] + n[j];\n }\n }\n }\n return sum;\n }", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "private static int betterSolution(int n) {\n return n*n*n;\n }", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "private static int f(int n, int complete, int other, int[] arr) {\n if(n<=0)\n return 0;\n int res=0;\n ArrayList<Integer>list=new ArrayList<Integer>();\n for(int a:arr)\n if(a>0)\n list.add(a);\n int brr[]=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n while(brr.length!=0){\n int index=0;\n for(int i=1;i<brr.length;i++)\n if(brr[index]<brr[i])\n index=i;\n for(int i=0;i<brr.length;i++){\n if(index==i)\n brr[i]-=complete;\n else\n brr[i]-=other;\n }\n list=new ArrayList<Integer>();\n for(int a:brr)\n if(a>0)\n list.add(a);\n brr=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n res++;\n }\n return res;\n }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "private static int[] p2(int[] ar, int n) {\n int[] p2 = new int[n];\n Arrays.fill(p2, n);\n Stack<Integer> st = new Stack<>();\n for (int i = 0; i < n; i++) {\n while (st.size() != 0 && ar[i] < ar[st.peek()]) {\n p2[st.peek()] = i;\n st.pop();\n }\n st.push(i);\n }\n return p2;\n }", "private static long find_fast(long u)\n {\n long a, b, r;\n long maxUInt = 4294967295L;\n\n u += 0xe91aaa35;\n u = maxUInt % u;\n u ^= u >> 16;\n u = maxUInt % u;\n u += u << 8;\n u = maxUInt % u;\n u ^= u >> 4;\n u = maxUInt % u;\n b = (u >> 8) & 0x1ff;\n b = maxUInt % b;\n a = (u + (u << 2)) >> 19;\n a = maxUInt % a;\n r = a ^ hash_adjust[(int)b];\n r = maxUInt % r;\n return r;\n }", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "static Object m11869n(@NullableDecl int[] iArr, @NullableDecl Object[] objArr, int i, int i2, @NullableDecl Object obj) {\n Object obj2 = null;\n if (obj == null) {\n return null;\n }\n if (i == 1) {\n if (objArr[i2].equals(obj)) {\n obj2 = objArr[i2 ^ 1];\n }\n return obj2;\n } else if (iArr == null) {\n return null;\n } else {\n int length = iArr.length - 1;\n int b = Hashing.m11897b(obj.hashCode());\n while (true) {\n int i3 = b & length;\n int i4 = iArr[i3];\n if (i4 == -1) {\n return null;\n }\n if (objArr[i4].equals(obj)) {\n return objArr[i4 ^ 1];\n }\n b = i3 + 1;\n }\n }\n }", "public List<List<Integer>> threeSum3(int[] nums) {\n List<List<Integer>> result = new ArrayList<>();\n Arrays.sort(nums);\n int n = nums.length;\n for (int i = 0; i < n - 2; i++) {\n if (i > 0 && nums[i - 1] == nums[i]) continue; // Bypass duplicate!\n for (int l = i + 1, r = n - 1; l < r; ) {\n if (nums[i] + nums[l] + nums[r] < 0) l++;\n else if (nums[i] + nums[l] + nums[r] > 0) r--;\n else {\n result.add(Arrays.asList(nums[i], nums[l++], nums[r--]));\n while (l < r && nums[l] == nums[l - 1]) l++; // Bypass duplicate!\n while (l < r && nums[r] == nums[r + 1]) r--;\n }\n }\n }\n return result;\n }", "public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n if (t < 0) return false;\n long sz = (long)t + 1;\n Map<Long, Long> map = new HashMap<>();\n for (int i = 0; i < nums.length; ++i) {\n long bucket = getBucket(nums[i], sz);\n if (map.containsKey(bucket)) return true;\n if (map.containsKey(bucket + 1) && Math.abs(nums[i] - map.get(bucket + 1)) < sz) return true;\n if (map.containsKey(bucket - 1) && Math.abs(nums[i] - map.get(bucket - 1)) < sz) return true;\n map.put(bucket, (long)nums[i]);\n if (i >= k) map.remove(getBucket(nums[i - k], sz));\n }\n return false;\n}", "public static void main(String args[] ) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] seqArray = new int[n];\n for (int i = 0; i < n; i++) {\n seqArray[i] = scanner.nextInt();\n }\n // getSeqValue(seqArray); //this method is an accepted one on Hackerrank but time complexity is not order n; i.e. !O(n);\n getLinearOrderY(seqArray); // trying to get O(n) time complexity;\n }", "public static boolean addUpToFast(int[] array, int n){\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor(int i = 0; i < array.length; i++){\n\t\t\tif(hs.contains(n-array[i]))\n\t\t\t\treturn true;\n\t\t\ths.add(array[i]);\n\t\t}\n\t\treturn false;\n\t}", "WeightedUnionFind(int N){\n id = new int[N];\n size = new int[N];\n for (int i = 0; i < N; i++){\n id[i] = i;\n size[i] = 1;\n }\n }", "public int findFirstUniqueNumber (List<Integer> numberList) {\n\n ////// Solution 1:\n LinkedHashMap<Integer, Integer> occurMap = new LinkedHashMap<>();\n\n for (int number: numberList) { // O(n)\n if (occurMap.containsKey(number) && occurMap.get(number) != 0) {\n occurMap.replace(number, occurMap.get(number), 0);\n }\n occurMap.putIfAbsent(number, 1);\n }\n\n for (Map.Entry<Integer, Integer> entry: occurMap.entrySet()) {\n if (entry.getValue() == 1) {\n return entry.getKey();\n }\n }\n\n ////// Solution 2: O(n * n)\n// for (int n: numberList) {\n// if (numberList.indexOf(n) == numberList.lastIndexOf(n)) { // O(n * n)\n// return n;\n// }\n// }\n\n return -1;\n }", "private static List<List<Integer>> threeSum(int[] nums) {\n int len = nums.length;\n int start = 0;\n List<List<Integer>> result = new LinkedList<>();\n\n Arrays.sort(nums);\n\n while (start < len - 2) {\n if (start > 0 && nums[start] == nums[start - 1]) {\n start++;\n continue;\n }\n findPair(nums, -nums[start], start + 1, result);\n start++;\n }\n return result;\n }", "private int first_leaf() { return n/2; }", "public static int solveEfficient(int n) {\n if (n == 0 || n == 1)\n return 1;\n\n int n1 = 1;\n int n2 = 1;\n int sum = 0;\n\n for (int i = 2; i <= n; i++) {\n sum = n1 + n2;\n n1 = n2;\n n2 = sum;\n }\n return sum;\n }", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "private int getCondensedIndex(int n, int i, int j) {\n if (i < j) {\n return n * i - (i * (i + 1) / 2) + (j - i - 1);\n }\n else if (i > j) {\n return n * j - (j * (j + 1) / 2) + (i - j - 1);\n }\n else{\n return 0;\n }\n }", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n\n int max = Integer.MIN_VALUE;\n for (int i = 0; i < nums.length; i++) {\n max=Math.max(max,nums[i]);\n }\n Integer[] map = new Integer[max+1];\n for (int i = 0; i < nums.length; i++) {\n Integer c = map[nums[i]];\n if(c!=null && i-c<=k){\n return true;\n }else {\n map[nums[i]]=i;\n }\n }\n return false;\n }", "private int elementNC(int i) {\n return first + i * stride;\n }", "public int findLHSWithHashtable(int[] nums) {\n if (nums.length < 2)\n return 0;\n int ans = 0;\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < nums.length; i++) {\n map.put(nums[i], map.getOrDefault(nums[i], 0) + 1);\n }\n for (int key : map.keySet()) {\n if (map.containsKey(key - 1))\n ans = ans < map.get(key) + map.get(key - 1) ? map.get(key) + map.get(key - 1) : ans;\n if (map.containsKey(key + 1))\n ans = ans < map.get(key) + map.get(key + 1) ? map.get(key) + map.get(key + 1) : ans;\n }\n return ans;\n }", "public List<List<Integer>> threeSum(int[] nums) {\n Arrays.sort(nums);\n List<List<Integer>> ret = new ArrayList<>();\n int n = nums.length;\n for (int i = 0; i < n - 2; i++) {\n if (i > 0 && nums[i - 1] == nums[i]) continue;\n for (int j = i + 1, k = n - 1; j < k; ) {\n int sum = nums[i] + nums[j] + nums[k];\n if (j > i + 1 && nums[j - 1] == nums[j]) j++;\n else if (sum < 0) j++;\n else if (sum > 0) k--;\n else ret.add(Arrays.asList(nums[i], nums[j++], nums[k--]));\n }\n }\n return ret;\n }", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "static long arrayManipulation(int n, int[][] queries) {\n int len = queries.length;\n long[] arr = new long[n + 2];\n\n for (int i = 0; i < arr.length; i++) {\n arr[i] = 0;\n }\n\n\n for (int i = 0; i < len; i++) {\n int[] query = queries[i];\n int a = query[0];\n int b = query[1];\n int k = query[2];\n arr[a] = arr[a] + k;\n if (b + 1 <= arr.length) {\n arr[b + 1] = arr[b + 1] - k;\n }\n }\n\n long max = arr[0];\n long x = 0;\n\n for (int i = 0; i < arr.length; i++) {\n x = x + arr[i];\n max = Math.max(x, max);\n }\n\n return max;\n }", "public void n()\r\n/* 515: */ {\r\n/* 516:523 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 517:524 */ if (this.a[i] != null)\r\n/* 518: */ {\r\n/* 519:525 */ this.d.a(this.a[i], true, false);\r\n/* 520:526 */ this.a[i] = null;\r\n/* 521: */ }\r\n/* 522: */ }\r\n/* 523:529 */ for (i = 0; i < this.b.length; i++) {\r\n/* 524:530 */ if (this.b[i] != null)\r\n/* 525: */ {\r\n/* 526:531 */ this.d.a(this.b[i], true, false);\r\n/* 527:532 */ this.b[i] = null;\r\n/* 528: */ }\r\n/* 529: */ }\r\n/* 530: */ }", "private int gameV(int i, int j, int x) {\n int count = 2;\n for (int ii = 0; ii < i; ii++) {\n for (int jj = ii + 1; jj < n; jj++) {\n if (ii != x && jj != x) count++;\n }\n }\n for (int jj = i + 1; jj < j; jj++) {\n if (jj != x) count++;\n }\n return count;\n }", "void findCommon(int ar1[], int ar2[], int ar3[], int n1,\n int n2, int n3)\n{\n int i = 0, j = 0, k = 0;\n int prev1, prev2, prev3;\n prev1 = prev2 = prev3 = INT_MIN;\n while (i < n1 && j < n2 && k < n3) {\n while (ar1[i] == prev1 && i < n1)\n i++;\n while (ar2[j] == prev2 && j < n2)\n j++;\n while (ar3[k] == prev3 && k < n3)\n k++;\n if (ar1[i] == ar2[j] && ar2[j] == ar3[k]) {\n cout << ar1[i] << \" \";\n prev1 = ar1[i];\n prev2 = ar2[j];\n prev3 = ar3[k];\n i++;\n j++;\n k++;\n }\n else if (ar1[i] < ar2[j]) {\n prev1 = ar1[i];\n i++;\n }\n else if (ar2[j] < ar3[k]) {\n prev2 = ar2[j];\n j++;\n }\n else {\n prev3 = ar3[k];\n k++;\n }\n }\n}", "private int d(amj paramamj)\r\n/* 50: */ {\r\n/* 51: 70 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 52: 71 */ if ((this.a[i] != null) && (this.a[i].b() == paramamj.b()) && (this.a[i].d()) && (this.a[i].b < this.a[i].c()) && (this.a[i].b < p_()) && ((!this.a[i].f()) || (this.a[i].i() == paramamj.i())) && (amj.a(this.a[i], paramamj))) {\r\n/* 53: 72 */ return i;\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 75 */ return -1;\r\n/* 57: */ }", "static int logTime(int[] n, int start, int end, int val) {\n if(n == null || n.length == 0) return -1;\n int mid = (start + end) / 2;\n if(val < n[mid]) logTime(n, 0, mid, val);\n if(val > n[mid]) logTime(n, mid + 1, n.length, val);\n return n[mid];\n }", "protected int find_among_b(Among v[])\n {\n\tint i = 0;\n\tint j = v.length;\n\n\tint c = cursor;\n\tint lb = limit_backward;\n\n\tint common_i = 0;\n\tint common_j = 0;\n\n\tboolean first_key_inspected = false;\n\n\twhile (true) {\n\t int k = i + ((j - i) >> 1);\n\t int diff = 0;\n\t int common = common_i < common_j ? common_i : common_j;\n\t Among w = v[k];\n\t int i2;\n\t for (i2 = w.s.length - 1 - common; i2 >= 0; i2--) {\n\t\tif (c - common == lb) {\n\t\t diff = -1;\n\t\t break;\n\t\t}\n\t\tdiff = current.charAt(c - 1 - common) - w.s[i2];\n\t\tif (diff != 0) break;\n\t\tcommon++;\n\t }\n\t if (diff < 0) {\n\t\tj = k;\n\t\tcommon_j = common;\n\t } else {\n\t\ti = k;\n\t\tcommon_i = common;\n\t }\n\t if (j - i <= 1) {\n\t\tif (i > 0) break;\n\t\tif (j == i) break;\n\t\tif (first_key_inspected) break;\n\t\tfirst_key_inspected = true;\n\t }\n\t}\n\twhile (true) {\n\t Among w = v[i];\n\t if (common_i >= w.s.length) {\n\t\tcursor = c - w.s.length;\n\t\tif (w.method == null) return w.result;\n\n\t\tboolean res;\n\t\ttry {\n\t\t Object resobj = w.method.invoke(this);\n\t\t res = resobj.toString().equals(\"true\");\n\t\t} catch (InvocationTargetException e) {\n\t\t res = false;\n\t\t // FIXME - debug message\n\t\t} catch (IllegalAccessException e) {\n\t\t res = false;\n\t\t // FIXME - debug message\n\t\t}\n\t\tcursor = c - w.s.length;\n\t\tif (res) return w.result;\n\t }\n\t i = w.substring_i;\n\t if (i < 0) return 0;\n\t}\n }", "private static int insertOrdered(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, char paramChar1, char paramChar2, int paramInt4)\n/* */ {\n/* 656 */ int n = paramInt4;\n/* */ \n/* 658 */ if ((paramInt1 < paramInt2) && (paramInt4 != 0)) {\n/* */ int i;\n/* 660 */ int j = i = paramInt2;\n/* 661 */ PrevArgs localPrevArgs = new PrevArgs(null);\n/* 662 */ localPrevArgs.current = paramInt2;\n/* 663 */ localPrevArgs.start = paramInt1;\n/* 664 */ localPrevArgs.src = paramArrayOfChar;\n/* */ \n/* 666 */ int m = getPrevCC(localPrevArgs);\n/* 667 */ j = localPrevArgs.current;\n/* */ \n/* 669 */ if (paramInt4 < m)\n/* */ {\n/* 671 */ n = m;\n/* 672 */ i = j;\n/* 673 */ while (paramInt1 < j) {\n/* 674 */ m = getPrevCC(localPrevArgs);\n/* 675 */ j = localPrevArgs.current;\n/* 676 */ if (paramInt4 >= m) {\n/* */ break;\n/* */ }\n/* 679 */ i = j;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 690 */ int k = paramInt3;\n/* */ do {\n/* 692 */ paramArrayOfChar[(--k)] = paramArrayOfChar[(--paramInt2)];\n/* 693 */ } while (i != paramInt2);\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 698 */ paramArrayOfChar[paramInt2] = paramChar1;\n/* 699 */ if (paramChar2 != 0) {\n/* 700 */ paramArrayOfChar[(paramInt2 + 1)] = paramChar2;\n/* */ }\n/* */ \n/* */ \n/* 704 */ return n;\n/* */ }", "public static int getBetterApproach(int n){\n\t\t\n\t\tint t[] = new int[n+1];\n\t\t\n if(n<=2)\n return n;\n \n\t\tt[0] = 0;\n\t\tt[1] = 1;\n\t\tt[2] = 2;\n\t\tfor(int i = 3;i<=n;i++){\n\t\t\tt[i] = t[i-1] + t[i-2];\n\t\t}\n\t\treturn t[n];\n\t}", "public int findDuplicate(int[] nums) {\n int slow = nums[0];\n int fast = nums[0];\n do {\n slow = nums[slow];\n fast = nums[nums[fast]];\n } while (slow != fast);\n \n slow = nums[0];\n while (slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n return slow;\n }", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "public static void process(int n){\n\t\tint right, left, i;\n\n\t\tright = i = 0;\n\t\twhile(i < n){\n\t\t\twhile (right < n && c[i] == c[right]) right++;\n\t\t\tfor(int j = i; j < right; ++j) max_right[j] = right;\n\t\t\ti = right;\n\t\t}\n\n\t\tleft = i = n-1;\n\t\twhile(i >= 0){\n\t\t\twhile (left >= 0 && c[i] == c[left]) left--;\n\t\t\tfor (int j = i; j > left; --j) max_left[j] = left;\n\t\t\ti = left;\n\t\t}\n\t}", "public int[] findAnyPairIndexesWhileLCMMinimized() {\n if (seq.length < 2) {\n return null;\n }\n int size = 0;\n for (int i = 1; i <= m; i++) {\n size += m / i;\n }\n\n IntegerMultiWayDeque deque = new IntegerMultiWayDeque(m + 1, size);\n for (int i = 1; i <= m; i++) {\n for (int j = i; j <= m; j += i) {\n if (!indexesOfSeq.isEmpty(j)) {\n deque.addLast(i, j / i);\n }\n }\n }\n\n long lcm = INF;\n int v1 = 0;\n int v2 = 0;\n\n for (int i = 1; i <= m; i++) {\n if (!indexesOfSeq.isEmpty(i) && indexesOfSeq.peekFirst(i) != indexesOfSeq.peekLast(i)) {\n lcm = v1 = v2 = i;\n break;\n }\n }\n\n IntegerVersionArray iva = new IntegerVersionArray(m + 1);\n IntegerDequeImpl stack = new IntegerDequeImpl(m);\n for (int i = 1; i <= m; i++) {\n iva.clear();\n stack.clear();\n while (!deque.isEmpty(i)) {\n int last = deque.removeFirst(i);\n factorize(last);\n int total = ie(iva, allFactors.size() - 1, 1, 0);\n if (total > 0) {\n int pop = 0;\n while (total > 0) {\n pop = stack.removeLast();\n if (GCDs.gcd(pop, last) == 1) {\n total--;\n }\n add(iva, pop, -1);\n }\n long l = LCMs.lcm(last, pop) * i;\n if (l < lcm) {\n lcm = l;\n v1 = last * i;\n v2 = pop * i;\n }\n }\n add(iva, last, 1);\n stack.addLast(last);\n }\n }\n\n return new int[]{indexesOfSeq.peekFirst(v1), indexesOfSeq.peekLast(v2)};\n }", "public List<List<Integer>> threeSum2(int[] nums) {\n Arrays.sort(nums);\n\n List<List<Integer>> result = new ArrayList<>();\n for (int i = 0; i < nums.length - 2; i++) {\n if (i > 0 && nums[i - 1] == nums[i]) { // Common trick to bypass duplicate. Better than a nested while loop!\n continue; // But it's quite annoying to bypass in nested loop. eg.[-2,0,0,2,2]\n }\n int target = 0 - nums[i];\n int left = i + 1, right = nums.length - 1;\n while (left < right) {\n if (nums[left] + nums[right] < target || (left > i + 1 && nums[left - 1] == nums[left])) {\n left++;\n } else if (nums[left] + nums[right] > target || (right < nums.length - 1 && nums[right] == nums[right + 1])) {\n right--;\n } else {\n result.add(Arrays.asList(nums[i], nums[left], nums[right]));\n left++;\n right--;\n }\n }\n }\n return result;\n }", "public static int findCommon4(int[] in1, int[] in2) {\r\n\t\tint common = 0;\r\n\t\t//mlogn\r\n\t\tArrays.sort(in1);\r\n\t\t//nlogn\r\n\t\tArrays.sort(in2);\r\n\t\t//m+n-1 (as one element will remain uncompared in the end)\r\n\t\tint i=0,j=0;\r\n\t\twhile (i < in1.length && j < in2.length) {\r\n\t\t\tif (in1[i] == in2[j]) {\r\n\t\t\t\t++common;\r\n\t\t\t\t++i;\r\n\t\t\t\t++j;\r\n\t\t\t} else if (in1[i] < in2[j]) {\r\n\t\t\t\t++i;\r\n\t\t\t} else {\r\n\t\t\t\t++j;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn common;\r\n\t}", "static long countTriplets(List<Long> arr, long r) {\n long result = 0L;\n long size = arr.size();\n\n ArrayList<long[]> duoList = new ArrayList<>();\n\n // triplet 이 될 수 있는 duo를 선발\n for (int i = 0; i < (size - 1); i++) {\n long firstItem = arr.get(i);\n\n for (int j = i + 1; j < size; j++) {\n long secondItem = arr.get(j);\n if (j >= (size - 1)) continue;\n if (secondItem / (float) firstItem == r) {\n long[] tripletAble = {i, j};\n // System.out.println(\"tripletAble : \" + Arrays.toString(tripletAble));\n if (duoList.contains(tripletAble)) {\n continue;\n } else {\n duoList.add(tripletAble);\n }\n }\n }\n }\n\n // duo인 int[] 의 두 번째 item (int[1]) 의 다음 index부터 탐색해서\n // 해당 수가 triplet이 될 수 있다면 result + 1\n // 판단 기준은 thirdItem / secondItem 이 r이 되는 경우\n int listSize = duoList.size();\n for (int k = 0; k < listSize; k++) {\n long[] targetArr = duoList.get(k);\n long secondIdx = targetArr[1];\n for (int l = (int) secondIdx + 1; l < size; l++) {\n\n long secondItem = arr.get((int) targetArr[1]);\n long thirdItem = arr.get(l);\n\n if (thirdItem / (float) secondItem == r) {\n result += 1L;\n }\n }\n }\n\n return result;\n }", "private static boolean findEqualSumSubsetBottomUp(int[] arr, int n) {\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tsum+=arr[i];\n\t\t}\n\t\tif(sum%2==1) {\n\t\t\treturn false;\n\t\t}\n \t\treturn findEqualSumBottomUp(arr,n,sum/2);\n\t}", "static long solve(long[] d) {\n int len = d.length;\n long[] dp = new long[len];\n\n Set<Long> set = new HashSet<>();\n\n for (int index1 = len - 1; index1 >= 0; index1--) {\n int count = 0;\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > d[index1]) {\n if( set.contains(d[index2] ) )continue;\n set.add(d[index2]);\n count++;\n }\n }\n set = new HashSet<>();\n dp[index1] = count;\n }\n\n long res = 0;\n Set<Long> distinct = new HashSet<>();\n for (int index1 = 0; index1 < len; index1++) {\n long curr = d[index1];\n if (distinct.contains(curr)) {\n continue;\n } else distinct.add(curr);\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > curr) {\n if (set.contains(d[index2])) continue;\n res += dp[index2];\n set.add(d[index2]);\n }\n }\n set = new HashSet<>();\n }\n\n return res;\n\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static long solve(long[] data, long k) {\n int n = data.length;\n\n Buffer<Interval> buffer = new Buffer<>(Interval::new, x -> {}, n * 2);\n\n Randomized.shuffle(data);\n Arrays.sort(data);\n\n List<Interval> lastLevel = new ArrayList<>(n);\n List<Interval> curLevel = new ArrayList<>(n);\n lastLevel.add(newInterval(buffer, 0, n - 1));\n int level = Log2.floorLog(data[n - 1]);\n long mask = 0;\n for (; level >= 0; level--) {\n curLevel.clear();\n for (Interval interval : lastLevel) {\n int l = interval.l;\n int r = interval.r;\n int m = r;\n while (m >= l && Bits.get(data[m], level) == 1) {\n m--;\n }\n interval.m = m;\n }\n long total = 0;\n for (Interval interval : lastLevel) {\n total += (long) (interval.m - interval.l + 1) * (interval.relative.m - interval.relative.l + 1);\n total += (long) (interval.r - interval.m) * (interval.relative.r - interval.relative.m);\n }\n if (total < k) {\n k -= total;\n mask = Bits.set(mask, level, true);\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m && interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.r > interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m >= interval.relative.l) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n } else {\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n a.relative = a;\n curLevel.add(a);\n }\n if (interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = a;\n curLevel.add(a);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.l <= interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m < interval.relative.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n }\n\n for (Interval interval : lastLevel) {\n buffer.release(interval);\n }\n\n List<Interval> tmp = curLevel;\n curLevel = lastLevel;\n lastLevel = tmp;\n }\n\n return mask;\n }", "private static void find_coins(int[] d, int k, int n) {\n\t\t\n\t}", "static long[] radixsort(int arr[], int n)\r\n\r\n {\n\r\n int m = getMax(arr, n);\r\n\r\n long st = System.nanoTime();\r\n\r\n\r\n\r\n for (int exp = 1; m/exp > 0; exp *= 10)\r\n\r\n countSort(arr, n, exp);\r\n\r\n \r\n\r\n long et = System.nanoTime();\r\n\r\n threeVals[2] = et - st;\r\n\r\n return threeVals;\r\n\r\n }", "private static int solve(int[] arr, int length) {\n\tint i =0,j;\n\tint extremum = 0;\n\t\n\tfor(j=i;j<length;){\n\t\tif(arr[i]==arr[j]){\n\t\t\tif((j==length-1) && ((arr[j]>arr[i-1])||(arr[j]<arr[i-1])))\n\t\t\t\textremum++;\n\t\t\tj++;\n\t\t\tcontinue;\n\t\t}\n\t\t\t\n\t\telse if((i==0 && ((arr[j]>arr[i])||(arr[j]<arr[i])))){\n\t\t\textremum ++;\n\t\t}\n\t\t\t\n\t\telse if((arr[i-1]>arr[i])&&(arr[j]>arr[j-1])){\n\t\t\textremum++;\n\t\t}\n\t\t\t\n\t\telse if((arr[i-1]<arr[i])&&(arr[j]<arr[j-1])){\n extremum++;\n\t\t}\n\t\t\n\t i = j;\n\t\t\t\n\t}\n\t\n\treturn extremum;\n}", "public static int distinctPaths4(int n) {\n\t\tint[][] mem = new int[n+1][n+1];\n\t\tfor(int j = 1; j <= n; ++j) {\n\t\t\tmem[1][j] = 1;\n\t\t\tmem[j][1] = 1;\n\t\t}\n\t\tfor(int i = 2; i <= n; ++i) {\n\t\t\tfor(int j = 2; j <= n; ++j) {\n\t\t\t\tmem[i][j] = mem[i-1][j] + mem[i][j-1];\n\t\t\t}\n\t\t}\n\t\treturn mem[n][n];\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "private static void updateRangeLazy(int[] segtree, int[] lazyValue, int l, int r, int inc, int ns, int ne,\n int index) {\n if (lazyValue[index] != 0) {\n segtree[index] += lazyValue[index];\n if (ns != ne) {\n lazyValue[2 * index] += lazyValue[index];\n lazyValue[2 * index + 1] += lazyValue[index];\n }\n lazyValue[index] = 0;\n }\n\n if (r < ns || l > ne) {\n return;\n }\n if (ns == ne) {\n segtree[index] += inc;\n return;\n }\n if (ns >= l && ne <= r) {\n // complete overlap - update this node, pass the lazy value(if not leaf) &\n // return\n segtree[index] += inc;\n if (ns != ne) {\n lazyValue[2 * index] += inc;\n lazyValue[2 * index + 1] += inc;\n }\n // return from here only.\n return;\n } else {\n //partial overlap-call on left& right\n int mid = (ns + ne) / 2;\n updateRangeLazy(segtree, lazyValue, l, r, inc, ns, mid, 2 * index);\n updateRangeLazy(segtree, lazyValue, l, r, inc, mid + 1, ne, 2 * index + 1);\n segtree[index]=Math.min(segtree[2*index],segtree[2*index+1]);\n }\n\n }", "static int findMajority(int[] nums) {\n if (nums.length == 1) {//one element in array\n return nums[0];\n }\n\n Map<Integer, Integer> occurrencesCountMap = new HashMap<>();// element - times occured\n\n for (int n : nums) {//traverse nums\n\n if (occurrencesCountMap.containsKey(n) //if in map\n &&//and\n occurrencesCountMap.get(n) + 1 > nums.length / 2) {//times occurred +1 ( for current iteration ) > len/2\n\n return n;\n\n } else {//not in map yet\n\n occurrencesCountMap.put(n, occurrencesCountMap.getOrDefault(n, 0) + 1);//add 1 to existing , or inti with 1\n\n }\n }\n return -1;//no majority ( no one length/2 times occurred )\n }", "int mo13159a(List<Log> list);", "public int get_odd_occurences_optimal_v2(int[] a) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tresult ^= i;\n\t\t}\n\t\treturn result;\n\t}", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "private int findPos( AnyType x )\n {\n int offset = 1;\n int currentPos = myhash( x );\n \n while( array[ currentPos ] != null &&\n !array[ currentPos ].key.equals( x ) )\n {\n currentPos += offset; // Linear probing.\n if( currentPos >= array.length )\n currentPos -= array.length;\n }\n \n return currentPos;\n }", "public static boolean canThreePartsEqualSum(int[] arr) {\n int sum=0;\n int cumulative[]=new int[arr.length];\n for(int i=0;i<arr.length;i++){\n sum+=arr[i];\n cumulative[i]=sum;\n }\n for(int i=0;i<cumulative.length;i++){\n for(int j=i+1;j<cumulative.length;j++){\n if(cumulative[i]==cumulative[j]-cumulative[i]){\n if(cumulative[i]==cumulative[cumulative.length-1]-cumulative[j] && (cumulative.length-1) !=j){\n return true;\n }\n }\n }\n }\n return false;\n}", "private static int findNeed(int currN) { \n int lo = 0, hi = shopList.length-1; \n \n \n while (lo < hi) { \n int mid = (lo + hi) / 2; \n \n if (shopList[mid] < currN) { \n lo = mid + 1; \n } else { \n hi = mid; \n } \n } \n return shopList[lo]; \n }", "public List<List<Integer>> threeSum(int[] nums) {\n List<List<Integer>> res = new ArrayList<>();\n Arrays.sort(nums);\n for (int i = 0; i < nums.length - 2; i++) {\n if (nums[i] > 0) break;\n if (i > 0 && nums[i] == nums[i - 1]) {\n continue;\n }\n int low = i + 1;\n int high = nums.length - 1;\n int sum = -nums[i];\n while (low < high) {\n if (nums[low] + nums[high] == sum) {\n res.add(Arrays.asList(nums[i], nums[low], nums[high]));\n while (low < high && nums[low] == nums[low + 1]) low++;\n low++;\n while (low < high && nums[high] == nums[high - 1]) high--;\n high--;\n } else if (nums[low] + nums[high] > sum) {\n while (low < high && nums[high] == nums[high - 1]) high--;\n high--;\n } else {\n while (low < high && nums[low] == nums[low + 1]) low++;\n low++;\n }\n\n }\n }\n return res;\n }" ]
[ "0.66949636", "0.64112025", "0.6108174", "0.5998883", "0.57879746", "0.5703236", "0.5679745", "0.5627099", "0.5589933", "0.5556628", "0.5546348", "0.55048853", "0.54460853", "0.5296719", "0.52807444", "0.5272134", "0.5250643", "0.5216037", "0.5213045", "0.5197479", "0.5161772", "0.5144264", "0.5115183", "0.5113278", "0.5103475", "0.50970894", "0.5096569", "0.5095899", "0.50939244", "0.50929284", "0.5091491", "0.50836694", "0.5081966", "0.50768775", "0.5071028", "0.50634205", "0.5055026", "0.50499094", "0.50453496", "0.5043607", "0.5040314", "0.5034241", "0.5031526", "0.50250465", "0.5015809", "0.5011863", "0.5011107", "0.50107616", "0.5010635", "0.50077695", "0.5004578", "0.50038826", "0.4994732", "0.49930307", "0.496632", "0.49585316", "0.49500144", "0.4948464", "0.4945906", "0.49442858", "0.49316922", "0.49293837", "0.49273807", "0.49215823", "0.49209574", "0.4909552", "0.4905362", "0.4898292", "0.48958826", "0.48938575", "0.4893338", "0.48859918", "0.48814422", "0.48780397", "0.48775592", "0.4872869", "0.48718175", "0.48675737", "0.48664373", "0.48583013", "0.48571262", "0.48541418", "0.4854094", "0.4852288", "0.4850049", "0.4846519", "0.48426703", "0.48296273", "0.4814369", "0.48125738", "0.48094434", "0.4806634", "0.48051462", "0.48047385", "0.48019117", "0.47991994", "0.47983837", "0.47951955", "0.47948354", "0.47866786", "0.47836357" ]
0.0
-1
Created by traitorwtf on 22.08.2017.
public interface Overdrive { void useOverdrive(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\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\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n public int describeContents() { return 0; }", "private void init() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n void init() {\n }", "@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\tpublic void anular() {\n\n\t}", "@Override\n protected void initialize() \n {\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 dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\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 init() {\n }", "@Override\n public void init() {}", "@Override\n protected void getExras() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void memoria() {\n \n }", "public void mo4359a() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\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}", "private void m50366E() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void strin() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\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\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}", "@Override\n public void initialize() { \n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void kk12() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\tpublic void init()\r\n\t{\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 init() {\n\t}", "public void mo6081a() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "private void init() {\n\n\n\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}" ]
[ "0.5970683", "0.58904094", "0.5699271", "0.56022227", "0.5600665", "0.5600665", "0.5587645", "0.55768424", "0.5574353", "0.55534667", "0.55281246", "0.5513497", "0.5476697", "0.54720694", "0.54675156", "0.54648745", "0.5449651", "0.5449651", "0.5449651", "0.5449651", "0.5449651", "0.5449651", "0.5443235", "0.54319453", "0.54294664", "0.54201066", "0.5416574", "0.5399539", "0.53900945", "0.5389353", "0.53856194", "0.53846407", "0.5383988", "0.5383406", "0.5378449", "0.5378449", "0.5378449", "0.5378449", "0.5378449", "0.53711826", "0.5368814", "0.5354463", "0.5354463", "0.5351591", "0.5351591", "0.5341558", "0.5326641", "0.5324873", "0.53106725", "0.5294792", "0.5294502", "0.5294038", "0.5286341", "0.5284843", "0.5283397", "0.52830595", "0.52830595", "0.5283017", "0.52700365", "0.52700365", "0.52700365", "0.52680963", "0.5265834", "0.5264653", "0.5262071", "0.52580374", "0.52535915", "0.524658", "0.5244238", "0.5244238", "0.5244238", "0.52374053", "0.52374053", "0.52374053", "0.52331287", "0.52284366", "0.52268654", "0.52185297", "0.5216193", "0.52021253", "0.5201696", "0.5201696", "0.5201696", "0.5201696", "0.5201696", "0.5201696", "0.5201696", "0.5201171", "0.5187727", "0.51853067", "0.51853067", "0.51852864", "0.51852864", "0.51852864", "0.5177148", "0.51769155", "0.5167528", "0.5167457", "0.51621884", "0.5153722", "0.51464206" ]
0.0
-1
Constructor for objects of class CheckB
public CheckB(BHTPane bHTP, Check check, Color color) { super(); cb = new CheckButton(bHTP, check); this.check = check; initialize(color); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NotChecker(Checker chk1)\n {\n checker1 = chk1;\n }", "public /* synthetic */ Checks(Name name2, Check[] checkArr, Function1 function1, int i, DefaultConstructorMarker defaultConstructorMarker) {\n this(name2, checkArr, (Function1<? super FunctionDescriptor, String>) (i & 4) != 0 ? C33762.INSTANCE : function1);\n }", "private CheckingTools() {\r\n super();\r\n }", "public CheckingAccount() {\n super(); \n }", "protected Checkpoint() {\n super();\n }", "public CheckingAccount() {\n\t\tsuper();\n\t}", "public Branch() { }", "private Checking(String name) {\r\n\t\tsuper(name);\r\n\t}", "public Check(int tId, int tCount, double tAmt, int checkNumber) {\n super(tId, tCount, tAmt);\n this.checkNumber = checkNumber;\n }", "public /* synthetic */ Checks(Collection collection, Check[] checkArr, Function1 function1, int i, DefaultConstructorMarker defaultConstructorMarker) {\n this((Collection<Name>) collection, checkArr, (Function1<? super FunctionDescriptor, String>) (i & 4) != 0 ? C33784.INSTANCE : function1);\n }", "ClassB initClassB(ClassB iClassB)\n {\n iClassB.updateElementValue(\"ClassB\");\n return iClassB;\n }", "public b3(){\n super();\n }", "abstract Checker newChecker(int x, int y);", "@Test\n public void billCustomConstructor_isCorrect() throws Exception {\n\n int billId = 100;\n String billName = \"test Bill\";\n int userId = 101;\n int accountId = 202;\n double billAmount = 300.25;\n String dueDate = \"02/02/2018\";\n int occurrenceRte = 1;\n\n //Create empty bill\n Bill bill = new Bill(billId,userId,accountId,billName,billAmount,dueDate,occurrenceRte);\n\n // Verify Values\n assertEquals(billId, bill.getBillId());\n assertEquals(billName, bill.getBillName());\n assertEquals(userId, bill.getUserId());\n assertEquals(accountId, bill.getAccountId());\n assertEquals(billAmount, bill.getBillAmount(), 0);\n assertEquals(dueDate, bill.getDueDate());\n assertEquals(occurrenceRte, bill.getOccurrenceRte());\n }", "public Checks(kotlin.reflect.jvm.internal.impl.name.Name r8, kotlin.reflect.jvm.internal.impl.util.Check[] r9, kotlin.jvm.functions.Function1<? super kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, java.lang.String> r10) {\n /*\n r7 = this;\n java.lang.String r0 = \"name\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)\n java.lang.String r0 = \"checks\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r9, r0)\n java.lang.String r0 = \"additionalChecks\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r10, r0)\n int r0 = r9.length\n kotlin.reflect.jvm.internal.impl.util.Check[] r6 = new kotlin.reflect.jvm.internal.impl.util.Check[r0]\n int r0 = r9.length\n r1 = 0\n java.lang.System.arraycopy(r9, r1, r6, r1, r0)\n r3 = 0\n r4 = 0\n r1 = r7\n r2 = r8\n r5 = r10\n r1.<init>((kotlin.reflect.jvm.internal.impl.name.Name) r2, (kotlin.text.Regex) r3, (java.util.Collection<kotlin.reflect.jvm.internal.impl.name.Name>) r4, (kotlin.jvm.functions.Function1<? super kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, java.lang.String>) r5, (kotlin.reflect.jvm.internal.impl.util.Check[]) r6)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.impl.util.Checks.<init>(kotlin.reflect.jvm.internal.impl.name.Name, kotlin.reflect.jvm.internal.impl.util.Check[], kotlin.jvm.functions.Function1):void\");\n }", "public SearchConditionSB() {\r\n }", "public Boop() {\n\t\tsuper();\n\t}", "public void testConstructorB1() {\r\n try {\r\n new BidUpdateHandler((Element) null);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "@SuppressWarnings(\"unused\")\n public RulesBook(Class<A> factsType, Class<B> resultType) {\n this();\n }", "public Checks(java.util.Collection<kotlin.reflect.jvm.internal.impl.name.Name> r8, kotlin.reflect.jvm.internal.impl.util.Check[] r9, kotlin.jvm.functions.Function1<? super kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, java.lang.String> r10) {\n /*\n r7 = this;\n java.lang.String r0 = \"nameList\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)\n java.lang.String r0 = \"checks\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r9, r0)\n java.lang.String r0 = \"additionalChecks\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r10, r0)\n int r0 = r9.length\n kotlin.reflect.jvm.internal.impl.util.Check[] r6 = new kotlin.reflect.jvm.internal.impl.util.Check[r0]\n int r0 = r9.length\n r1 = 0\n java.lang.System.arraycopy(r9, r1, r6, r1, r0)\n r2 = 0\n r3 = 0\n r1 = r7\n r4 = r8\n r5 = r10\n r1.<init>((kotlin.reflect.jvm.internal.impl.name.Name) r2, (kotlin.text.Regex) r3, (java.util.Collection<kotlin.reflect.jvm.internal.impl.name.Name>) r4, (kotlin.jvm.functions.Function1<? super kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, java.lang.String>) r5, (kotlin.reflect.jvm.internal.impl.util.Check[]) r6)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.impl.util.Checks.<init>(java.util.Collection, kotlin.reflect.jvm.internal.impl.util.Check[], kotlin.jvm.functions.Function1):void\");\n }", "public /* synthetic */ Checks(Regex regex2, Check[] checkArr, Function1 function1, int i, DefaultConstructorMarker defaultConstructorMarker) {\n this(regex2, checkArr, (Function1<? super FunctionDescriptor, String>) (i & 4) != 0 ? C33773.INSTANCE : function1);\n }", "private CheckUtil(){ }", "B createB();", "public SecurityCheck(List<Passenger> passengers, List<Baggage> baggage) {\n this.passengers = passengers;\n this.baggage = baggage;\n }", "public AnemoCheckTask() {\n }", "public static void main(String[] args) \r\n {\n \tClassB b = new ClassB(11,12,13);\r\n \t\r\n \t\r\n\t\t\r\n\t}", "public TypeCheck() {\n\tsuper();\n\tinst = this;\n\tnew rcc.tc.PrepTypeDeclaration();\n }", "public CheckingAcoount(String accountHolder, long accountNum, double balance) {\n // super to have parent class constructor !\n super(accountHolder, accountNum, balance);\n }", "public Billfold()\n {\n \n }", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "public CheckBodyDB() {\n }", "public BacInfo() {\n }", "public MyGeneric(A a, B b) { // TODO: check parameter type\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t}", "public HHCAssignWorkCheckVORowImpl() {\n }", "public Bike(){\n\t}", "private BigB()\r\n{\tsuper();\t\r\n}", "public BrokerAlgo() {}", "public Checking(String firstName, String lastName, int accountNumber, double accountBalance) {\n\t\tsuper(firstName, lastName, accountNumber, accountBalance);\n\t\t\n\t}", "public BabbleValue() {}", "public static void main(String[] args) {\n\n\t\t\n\t\t B obj1 = new B();\n\t\t \n\t}", "public Bombas(int x,int y) {\n \tsuper(x,y);\n }", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public ModelBolting(){}", "@Test\r\n\tpublic void constructorTests() {\n\t\tLibraryNode ln = ml.createNewLibrary(\"http://example.com/resource\", \"RT\", pc.getDefaultProject());\r\n\t\tBusinessObjectNode bo = ml.addBusinessObjectToLibrary(ln, \"MyBo\");\r\n\t\tNode node = bo;\r\n\t\tTLResource mbr = new TLResource();\r\n\t\tmbr.setName(\"MyTlResource\");\r\n\t\tmbr.setBusinessObjectRef(bo.getTLModelObject());\r\n\r\n\t\t// When - used in LibraryNode.generateLibrary()\r\n\t\tTLResource tlr = new ResourceBuilder().buildTL(); // get a populated tl resource\r\n\t\ttlr.setBusinessObjectRef(bo.getTLModelObject());\r\n\t\tResourceNode rn1 = new ResourceNode(tlr, ln);\r\n\r\n\t\t// When - used in tests\r\n\t\tResourceNode rn2 = ml.addResource(bo);\r\n\r\n\t\t// When - used in NodeFactory\r\n\t\tResourceNode rn3 = new ResourceNode(mbr);\r\n\t\tln.addMember(rn3);\r\n\r\n\t\t// When - used in ResourceCommandHandler to launch wizard\r\n\t\tResourceNode rn4 = new ResourceNode(node.getLibrary(), bo);\r\n\t\t// When - builder used as in ResourceCommandHandler\r\n\t\tnew ResourceBuilder().build(rn4, bo);\r\n\r\n\t\t// Then - must be complete\r\n\t\tcheck(rn1);\r\n\t\tcheck(rn2);\r\n\t\tcheck(rn3);\r\n\t\tcheck(rn4);\r\n\t}", "public Bank(BankAccount b1, BankAccount b2, BankAccount b3, Employee e1, Employee e2, Employee e3, Employee e4, Employee e5)\n {\n isOpen = true;\n account1 = b1;\n account2 = b2;\n account3 = b3;\n president = e1;\n vicePresident = e2;\n teller1 = e3;\n teller2 = e4;\n teller3 = e5;\n }", "public ValidaCpf() {\n }", "public Achterbahn() {\n }", "public Boat() {\n }", "private Comparison() {\n }", "public CollegeSuiteHealthCheck() {\n super();\n }", "public Checking(String name, String sSN, double initDeposit) {\n\t\tsuper(name,sSN,initDeposit);\n\t\taccountNumber = \"2\" + accountNumber;\n\t\tsetDebitCard();\n\t}", "public BFUnit(){\n \n }", "public ShippingResultABCAnalysis2Business()\n {\n super();\n }", "public CheckingAccount (double openingBalance) {\n\t\t//super(openingBalance; INT_RATE);\n\t\tsuper(openingBalance);\n\t}", "public BubbleFactory() {\n // TODO Auto-generated constructor stub\n }", "public Validation() {\n }", "public static void main(String[] args) {\n\n\t\tB obj1 = new B();\n\t\t\n\t}", "public void testConstructorA1() {\r\n try {\r\n new BidUpdateHandler(\" \", \"bidId\", \"maxAmount\");\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public Blacksmith(){\n\t\t\n\t}", "private BookFilters()\n {\n }", "BSubTrue createBSubTrue();", "public void testCtor2() {\r\n try {\r\n new BloomFilter(Integer.MAX_VALUE, new DefaultHashFunctionFamily(10000));\r\n fail(\"The length of bitset is too large.\");\r\n } catch(IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public EANAlreadyExists() {\n }", "public Boleta(){\r\n\t\tsuper();\r\n\t}", "public void testConstructorWithCycledReferences2() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n object1.addChild(params1);\r\n\r\n ConfigurationObject object2 = createObject(\"object:ob2\", TYPE_OBJECT);\r\n ConfigurationObject params2 = new DefaultConfigurationObject(\"params\");\r\n params2.addChild(createParamReference(1, \"object:ob1\"));\r\n object2.addChild(params2);\r\n\r\n root.addChild(object1);\r\n root.addChild(object2);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "public Good() {\n }", "public DateCheckTag() { }", "public void testConstructorA2() {\r\n try {\r\n new BidUpdateHandler(\"auctionId\", \" \", \"maxAmount\");\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public void testConstructorB2() throws Exception {\r\n Element element =\r\n TestsHelper.createHandlerElement(\"BidUpdateHandler\", new String[] {\"auction_id_param_key\",\r\n \"max_amount_param_key\",\r\n \"bid_id_param_key\"}, new String[] {\" \", \"maxAmount\", \"bidId\"});\r\n try {\r\n new BidUpdateHandler(element);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // do nothing\r\n }\r\n }", "public Checks(kotlin.text.Regex r8, kotlin.reflect.jvm.internal.impl.util.Check[] r9, kotlin.jvm.functions.Function1<? super kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, java.lang.String> r10) {\n /*\n r7 = this;\n java.lang.String r0 = \"regex\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)\n java.lang.String r0 = \"checks\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r9, r0)\n java.lang.String r0 = \"additionalChecks\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r10, r0)\n int r0 = r9.length\n kotlin.reflect.jvm.internal.impl.util.Check[] r6 = new kotlin.reflect.jvm.internal.impl.util.Check[r0]\n int r0 = r9.length\n r1 = 0\n java.lang.System.arraycopy(r9, r1, r6, r1, r0)\n r2 = 0\n r4 = 0\n r1 = r7\n r3 = r8\n r5 = r10\n r1.<init>((kotlin.reflect.jvm.internal.impl.name.Name) r2, (kotlin.text.Regex) r3, (java.util.Collection<kotlin.reflect.jvm.internal.impl.name.Name>) r4, (kotlin.jvm.functions.Function1<? super kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, java.lang.String>) r5, (kotlin.reflect.jvm.internal.impl.util.Check[]) r6)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.impl.util.Checks.<init>(kotlin.text.Regex, kotlin.reflect.jvm.internal.impl.util.Check[], kotlin.jvm.functions.Function1):void\");\n }", "public void testConstructorWithCycledReferences1() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob1\"));\r\n object1.addChild(params1);\r\n\r\n root.addChild(object1);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "public Kanban() {\r\n\t}", "private Verify(){\n\t\t// Private constructor to prevent instantiation\n\t}", "public Cavalier(boolean blanc) {\n super(blanc);\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Test\n public void billEmptyConstructorCustomSetters_isCorrect() throws Exception {\n\n int billId = 100;\n String billName = \"test Bill\";\n int userId = 101;\n int accountId = 202;\n double billAmount = 300.25;\n String dueDate = \"02/02/2018\";\n int occurrenceRte = 1;\n\n //Create empty bill\n Bill bill = new Bill();\n\n //Set the values\n bill.setBillId(billId);\n bill.setBillName(billName);\n bill.setUserId(userId);\n bill.setAccountId(accountId);\n bill.setBillAmount(billAmount);\n bill.setDueDate(dueDate);\n bill.setOccurrenceRte(occurrenceRte);\n\n // Verify Values\n assertEquals(billId, bill.getBillId());\n assertEquals(billName, bill.getBillName());\n assertEquals(userId, bill.getUserId());\n assertEquals(accountId, bill.getAccountId());\n assertEquals(billAmount, bill.getBillAmount(), 0);\n assertEquals(dueDate, bill.getDueDate());\n assertEquals(occurrenceRte, bill.getOccurrenceRte());\n }", "public static void main(String[] args) {\n\t\tOblong testOblong = new Oblong(8,8);\n\t\t\n\t\t/* declare an object of an anonymus class\n\t\t * that checks that an oblong's length and height\n\t\t * are greater than zero\n\t\t */\n\t\tCheckable checkableObject1 = new Checkable() {\n\t\t\t@Override\n\t\t\tpublic boolean check() {\n\t\t\t\treturn testOblong.getLength() > 0 && testOblong.getHeight() > 0;\n\t\t\t}\n\t\t};\n\t\t\n\t\t/* declare an object of an anonymous class that checks that an\n\t\t * oblongś length and height ar not equal\n\t\t */\n\t\tCheckable checkableObject2 = new Checkable() {\n\t\t\t@Override\n\t\t\tpublic boolean check() {\n\t\t\t\treturn testOblong.getLength() != testOblong.getHeight();\n\t\t\t}\n\t\t};\n\t\t\n\t\t// this checks that the sides are greater than zero\n\t\tSystem.out.println(\"checkableObject1 is \" + checkValidity(checkableObject1));\n\t\t// this checks that the length and height are not equal\n\t\tSystem.out.println(\"checkableObject2 is \" + checkValidity(checkableObject2));\n\n\t}", "public ObjectFilter()\n\t{\n\t}", "public BLabel()\n {\n this((String) null, WEST);\n }", "@Test\n void constructorTest() {\n super.checkConstruction();\n }", "public BNHaystackLearnStructureJob() {}", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "BSubFalse createBSubFalse();", "public Aanbieder() {\r\n\t\t}", "private Validate(){\n //private empty constructor to prevent object initiation\n }", "public AllDifferent()\n {\n this(0);\n }", "public SimpleCondition() {\n\n\t}", "public Banco(){}", "public Checking(String name, float balance) {\r\n\t\tsuper(name, balance);\r\n\t}", "public Validate() {\n }", "public void init(){\r\n \r\n\t\tcheckBox1 = new Checkbox(\"Akhash\", true);\r\n \r\n\t\t/*\r\n\t\t * Set Checkbox caption or label using\r\n\t\t * void setLabel(String text)\r\n\t\t * method of AWT Checkbox class.\r\n\t\t */\r\n \r\n\t\tcheckBox1.setLabel(\"My Checkbox 1\");\r\n \r\n\t\t/*\r\n\t\t * To create checkbox with the caption use\r\n\t\t * CheckBox(String text) constructor of\r\n\t\t * AWT Checkbox class.\r\n\t\t */\r\n \r\n\t\tcheckBox2 = new Checkbox(\"Suresh\", true);\r\n \r\n\t\t//add checkboxes using add method\r\n\t\tadd(checkBox1);\r\n\t\tadd(checkBox2);\r\n\t}", "public BoundaryCheck(String id) {\n this.id = id;\n }", "public BrokersStatus(List<BrokerStatus> inBrokers)\r\n {\r\n brokers = inBrokers;\r\n }", "@Test\r\n\tpublic void ConstructorTest() {\r\n\t\tMove move = new Move(3, 3);\r\n\t\tCheckersMove checkersMove = new CheckersMove(new Move(2, 2), move);\r\n\t\tassertFalse(!checkersMove.getDest().equals(move));\r\n\t}", "public abstract B zzjo();", "public Self__1() {\n }", "public XObject(){\r\n }", "public static void main(String[] args) {\n\t\tB b = new B(37);\n\n\t}", "public Bid() {}", "public Constructor(){\n\t\t\n\t}" ]
[ "0.64773077", "0.62477386", "0.6203218", "0.6198963", "0.61780196", "0.61238176", "0.6116034", "0.59543616", "0.5925663", "0.58765066", "0.58532274", "0.58381236", "0.5833372", "0.5824922", "0.58103", "0.5747988", "0.5704349", "0.5697434", "0.56881845", "0.5673009", "0.56388694", "0.56333745", "0.5628563", "0.5619926", "0.56179947", "0.56142855", "0.56139994", "0.56058973", "0.55961686", "0.5588458", "0.55659044", "0.553059", "0.552908", "0.5529036", "0.5525143", "0.5485255", "0.547995", "0.547621", "0.54640377", "0.5447741", "0.54366493", "0.5425779", "0.5423484", "0.5419164", "0.54187447", "0.54180664", "0.5412661", "0.5406504", "0.53765965", "0.53589034", "0.5352068", "0.5340131", "0.5332551", "0.5328465", "0.53228176", "0.5322414", "0.5320627", "0.5318291", "0.5318082", "0.5313929", "0.5312842", "0.5311856", "0.53069836", "0.5306227", "0.5294313", "0.5276261", "0.5275968", "0.52758753", "0.5271367", "0.52683467", "0.52656007", "0.5264471", "0.5258258", "0.5255998", "0.52552927", "0.525036", "0.52487844", "0.52476037", "0.5237511", "0.5236747", "0.5232474", "0.5218375", "0.52176005", "0.5215741", "0.5212354", "0.5209602", "0.52094275", "0.5208217", "0.52058893", "0.5199591", "0.51979244", "0.51937306", "0.5185573", "0.51844084", "0.51829946", "0.51829416", "0.51802826", "0.51761365", "0.5175066", "0.5171276" ]
0.6156803
5
TODO Autogenerated method stub
@Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { super.postHandle(request, response, handler, modelAndView); if (modelAndView != null) { response.setContentType("text/html; charset=UTF-8"); } }
{ "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
We don't want to time the toString, so ensure we're calling a trivial one...
@Test public void timeAppendObject() { Object o = new Object() { @Override public String toString() { return "constant"; } }; BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); while (state.keepRunning()) { StringBuilder sb = new StringBuilder(); for (int j = 0; j < mLength; ++j) { sb.append(o); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString()\n/* */ {\n/* 1460 */ return toString(true);\n/* */ }", "public String toString()\r\n/* 736: */ {\r\n/* 737:804 */ return toStringBuilder().toString();\r\n/* 738: */ }", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "public void testToString() {\n }", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "abstract public String toString();", "public String toString() { \n\n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "public java.lang.String toString () { throw new RuntimeException(); }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n IoGeneric instance = null;\n String expResult = \"\";\n String result = instance.toString();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public String toString() {\n \n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "public String toString() {\n \n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "public String toString() {\n \n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "public String toString() {\n \n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "@Test\r\n\tvoid testToString() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"\", output);\r\n\t}", "abstract public String toString ();", "public String toString() { return \"\"; }", "public String toString() { return \"\"; }", "@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n OpeningTicketPurpose instance = new OpeningTicketPurpose();\r\n String expResult = \"\";\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString() ;", "@Override\n public String toString() {\n return toStringHelper(1, \"\");\n }", "public String toString() {\n\t\treturn super.toString();\n\t\t// This gives stack overflows:\n\t\t// return ToStringBuilder.reflectionToString(this);\n\t}", "public native String toString();", "public String toString() {\n/* 790 */ return this.m_str;\n/* */ }", "@Override\n public native String toString();", "@Test\r\n\tvoid testToString2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(2);\r\n\t\tString output = test.toString();\r\n\t\tassertNotEquals(\"2 \", output);\r\n\t}", "@Test\n public void toString_shouldReturnInCorrectFormat() {\n Task task = new Task(\"Test\");\n String expected = \"[N] Test\";\n Assertions.assertEquals(expected, task.toString());\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Alumno instance = null;\n String expResult = \"\";\n String result = instance.toString();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Override()\n public String toString()\n {\n final StringBuilder buffer = new StringBuilder();\n toString(buffer);\n return buffer.toString();\n }", "public java.lang.String toString() {\n /*\n r5 = this;\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n r0.<init>()\n java.lang.Class r1 = r5.getClass()\n java.lang.String r1 = r1.getName()\n java.lang.String r2 = \"com.google.common.util.concurrent.\"\n boolean r1 = r1.startsWith(r2)\n if (r1 == 0) goto L_0x001e\n java.lang.Class r1 = r5.getClass()\n java.lang.String r1 = r1.getSimpleName()\n goto L_0x0026\n L_0x001e:\n java.lang.Class r1 = r5.getClass()\n java.lang.String r1 = r1.getName()\n L_0x0026:\n r0.append(r1)\n r1 = 64\n r0.append(r1)\n int r1 = java.lang.System.identityHashCode(r5)\n java.lang.String r1 = java.lang.Integer.toHexString(r1)\n r0.append(r1)\n java.lang.String r1 = \"[status=\"\n r0.append(r1)\n boolean r1 = r5.isCancelled()\n if (r1 == 0) goto L_0x004b\n java.lang.String r1 = \"CANCELLED\"\n r0.append(r1)\n goto L_0x00be\n L_0x004b:\n boolean r1 = r5.isDone()\n if (r1 == 0) goto L_0x0055\n L_0x0051:\n r5.zza((java.lang.StringBuilder) r0)\n goto L_0x00be\n L_0x0055:\n int r1 = r0.length()\n java.lang.String r2 = \"PENDING\"\n r0.append(r2)\n java.lang.Object r2 = r5.value\n boolean r3 = r2 instanceof com.google.android.gms.internal.ads.zzdxo.zze\n if (r3 == 0) goto L_0x0076\n java.lang.String r3 = \", setFuture=[\"\n r0.append(r3)\n com.google.android.gms.internal.ads.zzdxo$zze r2 = (com.google.android.gms.internal.ads.zzdxo.zze) r2\n com.google.android.gms.internal.ads.zzdyz<? extends V> r2 = r2.future\n r5.zza((java.lang.StringBuilder) r0, (java.lang.Object) r2)\n L_0x0070:\n java.lang.String r2 = \"]\"\n r0.append(r2)\n goto L_0x00b0\n L_0x0076:\n java.lang.String r2 = r5.pendingToString() // Catch:{ RuntimeException -> 0x0081, StackOverflowError -> 0x007f }\n java.lang.String r2 = com.google.android.gms.internal.ads.zzdwc.emptyToNull(r2) // Catch:{ RuntimeException -> 0x0081, StackOverflowError -> 0x007f }\n goto L_0x00a5\n L_0x007f:\n r2 = move-exception\n goto L_0x0082\n L_0x0081:\n r2 = move-exception\n L_0x0082:\n java.lang.Class r2 = r2.getClass()\n java.lang.String r2 = java.lang.String.valueOf(r2)\n java.lang.String r3 = java.lang.String.valueOf(r2)\n int r3 = r3.length()\n int r3 = r3 + 38\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>(r3)\n java.lang.String r3 = \"Exception thrown from implementation: \"\n r4.append(r3)\n r4.append(r2)\n java.lang.String r2 = r4.toString()\n L_0x00a5:\n if (r2 == 0) goto L_0x00b0\n java.lang.String r3 = \", info=[\"\n r0.append(r3)\n r0.append(r2)\n goto L_0x0070\n L_0x00b0:\n boolean r2 = r5.isDone()\n if (r2 == 0) goto L_0x00be\n int r2 = r0.length()\n r0.delete(r1, r2)\n goto L_0x0051\n L_0x00be:\n java.lang.String r1 = \"]\"\n r0.append(r1)\n java.lang.String r0 = r0.toString()\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzdxo.toString():java.lang.String\");\n }", "public String toString(Object o) { return Objects.toString(o,null); }", "@Override\n \tpublic String toString() {\n \t\treturn toStringHelper(1, \"\");\n \t}", "@Override\n public String toString(){\n return toString(false);\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Account instance = new Account(\"Piper\", 10.0);\n String expResult = \"Piper has a total of $10.0 in their account.\";\n String result = instance.toString();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public java.lang.String toString() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.toString():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.toString():java.lang.String\");\n }", "public String toString() { return stringify(this, true); }" ]
[ "0.71403104", "0.70385545", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.6955364", "0.689373", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.6856554", "0.68538666", "0.6835915", "0.67807895", "0.67557544", "0.6715191", "0.6715191", "0.6715191", "0.6715191", "0.6709328", "0.6662497", "0.66605306", "0.66605306", "0.6653152", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66414547", "0.66001624", "0.65942407", "0.65860206", "0.6573079", "0.6570245", "0.6565252", "0.65613157", "0.6519942", "0.6478828", "0.64672476", "0.64645284", "0.6459428", "0.6456911", "0.6425433", "0.64217764", "0.64101243", "0.6406663", "0.6403757" ]
0.6584945
85
Construct a new instance
protected Downloader(float maxArea) { this.maxArea = maxArea; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Reproducible newInstance();", "private Instantiation(){}", "Instance createInstance();", "protected abstract void construct();", "public CMObject newInstance();", "public Instance() {\n }", "public T newInstance();", "public void create(){}", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public ObjectFactory() {\n super(grammarInfo);\n }", "T create();", "T create();", "public Constructor(){\n\t\t\n\t}", "public Factory() {\n\t\tsuper();\n\t}", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "public ObjectFactory() {\n\t}", "void create(T instance) throws IOException;", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {\r\n\t}", "@Override\n public void construct() throws IOException {\n \n }", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "public Produto() {}", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "public Implementor(){}", "public void create() {\n\t\t\n\t}", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "public static Construtor construtor() {\n return new Construtor();\n }", "public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuilder();\n\twheres = new StringBuilder();\n }", "public Builder() {}", "public Builder() {}", "public Builder() {}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "private ObjectFactory() { }", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.75945556", "0.7518607", "0.7423393", "0.73149437", "0.6998678", "0.68987113", "0.6848237", "0.666116", "0.66099733", "0.65910536", "0.6573748", "0.6524093", "0.650649", "0.650649", "0.6499274", "0.64542055", "0.64240247", "0.6400431", "0.6379562", "0.63608354", "0.63608354", "0.63608354", "0.63508475", "0.63158655", "0.63078845", "0.629707", "0.6290839", "0.6256055", "0.62487453", "0.623675", "0.6230801", "0.6227776", "0.6225794", "0.6218596", "0.62166643", "0.6216343", "0.6214139", "0.6213751", "0.6213751", "0.6213751", "0.62043774", "0.6198606", "0.61980695", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043", "0.619043" ]
0.0
-1
Set the view to download
public void setBox(@NonNull ViewBox box) { this.box = new ViewBox(box); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void download() {\n\t\t\r\n\t}", "@RequestMapping(value = \"/download\", method = RequestMethod.GET)\n public PdfView download(final Model model) {\n final PdfView view = new PdfView();\n return view;\n }", "public void download() {\n }", "public void downloadButtonPressed(View view)\n {\n Intent intent = new Intent(this, DownloadActivity.class);\n startActivity(intent);\n }", "@Override\n\tpublic void setView(Resultado resultado, HttpServletRequest request, HttpServletResponse response) {\n\n\t}", "private void download()\n {\n if(mDownloadConnection!=null && mDownloadConnection.mBinder!=null)\n {\n if (mDownloadConnection.mBinder.download(\"file1\"))\n {\n mTvFilename.setText(\"file1\");\n }\n }\n }", "@Override\n public void onClick(View view) {\n getOps().downloadVideo();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tclickButtonToDownloadFile();\n\t\t\t\t\n\t\t\t}", "public void pressOnDownloadBtn() {\n Network.sendMsg(\n new FileRequest(\n serverFilesList.getSelectionModel().getSelectedItem()));\n }", "protected void download() {\r\n\t\tsetState(DOWNLOADING);\r\n\t\t\r\n\t\tThread t = new Thread(this);\r\n\t\tt.start();\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));\n //cookie\n String cookie= CookieManager.getInstance().getCookie(url);\n //Add cookie and User-Agent to request\n request.addRequestHeader(\"Cookie\",cookie);\n request.addRequestHeader(\"User-Agent\",userAgent);\n\n //file scanned by MediaScannar\n request.allowScanningByMediaScanner();\n //Download is visible and its progress, after completion too.\n request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\n //DownloadManager created\n DownloadManager downloadManager= (DownloadManager) getContext().getSystemService(Context.DOWNLOAD_SERVICE);\n //Saving file in Download folder\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);\n //download enqued\n downloadManager.enqueue(request);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tTestDownload();\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"view\",\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\tUtils.createComicFolder(getApplicationContext(),\n\t\t\t\t\t\tcomicList.get(currentSelector).getId());\n\t\t\t\tnew DownloadFileFromURL(MainActivity.this, comicList.get(\n\t\t\t\t\t\tcurrentSelector).getId(), 0).execute(\n\t\t\t\t\t\tcomicList.get(currentSelector).getContentUrl(),\n\t\t\t\t\t\tcomicList.get(currentSelector).getThumbUrl());\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinfomation.drawDownload();\n\t\t\t}", "public void download() {\r\n\t\t\ttThread = new Thread(this);\r\n\t\t\ttThread.start();\r\n\t\t}", "@SuppressWarnings(\"resource\")\r\n\t@RestMethod(name=\"DOWNLOAD\")\r\n\tpublic void doDownload(RestRequest req, RestResponse res) throws Exception {\r\n\r\n\t\tif (! allowViews)\r\n\t\t\tthrow new RestException(SC_METHOD_NOT_ALLOWED, \"DOWNLOAD not enabled\");\r\n\r\n\t\tFile f = new File(rootDir.getAbsolutePath() + req.getPathInfo());\r\n\r\n\t\tif (!f.exists())\r\n\t\t\tthrow new RestException(SC_NOT_FOUND, \"File not found\");\r\n\r\n\t\tif (f.isDirectory())\r\n\t\t\tthrow new RestException(SC_METHOD_NOT_ALLOWED, \"DOWNLOAD not available on directories\");\r\n\r\n\t\tres.setOutput(new FileReader(f)).setContentType(\"application\");\r\n\t}", "public void setView(int view)\r\n\t{\n\t\tswitch(view)\r\n\t\t{\r\n\t\t\tcase Settings.ANONYMOUS_VIEW:\r\n\t\t\t\tbreak;\r\n\t\t\tcase Settings.WELCOME_VIEW:\r\n\t\t\t\tbreak;\r\n\t\t\tcase Settings.ACCOUNT_VIEW:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\t\r\n\t}", "public void onClick()\n\t\t\t{\n\t\t\t\t((DccdSession)Session.get()).setRedirectPage(SearchResultDownloadPage.class, getPage());\n\t\t\t\tsetResponsePage(new SearchResultDownloadPage((SearchModel) SearchResultsDownloadPanel.this.getDefaultModel(), \n\t\t\t\t\t\t(DccdSearchResultPanel) callingPanel));\n\t\t\t}", "protected abstract void setDownloadToplevel();", "@Override\n public boolean isDownloadable() {\n return true;\n }", "public void setView(final String view) \n {\n\tthis.view = view;\n }", "private void startDownload(){\n final DownloadCurrent downloadCurrent = new DownloadCurrent(this);\n downloadCurrent.execute(UpdateTalesData.sData_HTTP);\n sProgDialDownload.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n downloadCurrent.cancel(true);\n }\n });\n\n }", "public void onClick() {\n getRequestCycle().setRequestTarget(new IRequestTarget() {\n \n public void detach(RequestCycle requestCycle) {\n }\n \n public void respond(RequestCycle requestCycle) {\n WebResponse r = (WebResponse) requestCycle.getResponse();\n r.setAttachmentHeader(fileName);\n try {\n File file = AttachmentUtils.getFile(attachment, getJtrac().getJtracHome());\n InputStream is = new FileInputStream(file);\n try {\n Streams.copy(is, r.getOutputStream());\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n });\n }", "@RequestMapping(value = \"download\", method = RequestMethod.GET)\n\tpublic String getDownloadPage() {\n\t\tLOGGER.debug(\"Received request to show download page\");\n\t\tLOGGER.info(\"Received request to show download page\");\n\t\tSystem.out.println(\"---------------Received request to show download page\");\n\n\t\t// Do your work here. Whatever you like\n\t\t// i.e call a custom service to do your business\n\t\t// Prepare a model to be used by the JSP page\n\n\t\t// This will resolve to /WEB-INF/jsp/downloadpage.jsp\n\t\treturn \"downloadpage\";\n\t}", "public FilePane(DownloadProvider provider) {\n super();\n this.provider = provider;\n }", "@Override\n public void onDownloadStart(String url, String userAgent,\n String contentDisposition, String mimetype,\n long contentLength) {\n\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));\n }", "public BatchGet setView(java.lang.String view) {\n this.view = view;\n return this;\n }", "public void downloadFile() {\n String path = images.get(viewPager.getCurrentItem()).getFilePath();\n String uRl = \"https://image.tmdb.org/t/p/w500\" + path;\n String name = path.substring(1, 5);\n File direct = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/Cinemato\");\n if (!direct.exists()) {\n direct.mkdirs();\n }\n DownloadManager mgr = (DownloadManager) Objects.requireNonNull(getContext())\n .getSystemService(Context.DOWNLOAD_SERVICE);\n Uri downloadUri = Uri.parse(uRl);\n DownloadManager.Request request = new DownloadManager.Request(\n downloadUri);\n request.setAllowedNetworkTypes(\n DownloadManager.Request.NETWORK_WIFI\n | DownloadManager.Request.NETWORK_MOBILE)\n .setAllowedOverRoaming(false).setTitle(name)\n .setDescription(\"Saved images from Cinemato\")\n .setDestinationInExternalPublicDir(Environment.DIRECTORY_PICTURES + \"/Cinemato\", name + \".jpg\");\n assert mgr != null;\n mgr.enqueue(request);\n // Open Download Manager to view File progress\n Toast.makeText(getContext(), \"Downloading...\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS));\n }", "private void setDownloadButton() throws FileNotFoundException {\r\n Button downloadButton;\r\n if (parent.getParentUI().language.equals(\"Deutsch\")) {\r\n downloadButton = new Button(\"Paket Download\");\r\n } else {\r\n downloadButton = new Button(\"Download Package\");\r\n }\r\n downloadButton.setWidth(\"100%\");\r\n downloadButton.addStyleName(ValoTheme.BUTTON_SMALL);\r\n downloadButton.addStyleName(ValoTheme.LABEL_SMALL);\r\n buttonLayout.addComponent(downloadButton);\r\n buttonLayout.setComponentAlignment(downloadButton, Alignment.TOP_CENTER);\r\n\r\n // get base id of the object in question\r\n String sourceDirPath = valuesMapLocal.get(\"localpath\");\r\n\r\n // zip on the fly\r\n StreamResource myResource4 =\r\n new StreamResource(\r\n new StreamSource() {\r\n private static final long serialVersionUID = 1L;\r\n final ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n\r\n @Override\r\n public InputStream getStream() {\r\n Path directory2 = Paths.get(sourceDirPath);\r\n try (ZipOutputStream zipStream = new ZipOutputStream(out)) {\r\n Files.walk(directory2)\r\n .filter(path -> !Files.isDirectory(path))\r\n .forEach(\r\n path -> {\r\n try {\r\n addToZipStream(\r\n path, zipStream, sourceDirPath);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n });\r\n } catch (IOException e) {\r\n System.out.println(\"Error while zipping.\" + e);\r\n }\r\n return new ByteArrayInputStream(out.toByteArray());\r\n }\r\n },\r\n valuesMapLocal.get(\"digitalObjectId\") + \".zip\");\r\n\r\n FileDownloader fileDownloader3 = new FileDownloader(myResource4);\r\n fileDownloader3.extend(downloadButton);\r\n\r\n downloadButton.addClickListener(\r\n new Button.ClickListener() {\r\n private static final long serialVersionUID = 1L;\r\n\r\n public void buttonClick(ClickEvent event) {\r\n parent.getParentUI().log(\"Click on package download button\");\r\n }\r\n });\r\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n\n Log.d(TAG, \"onSuccess: Downloaded File\");\n pdfView.fromFile(localFile).load();\n\n }", "private void setupView() {\n view.setName(advertisement.getTitle());\n view.setPrice(advertisement.getPrice());\n view.setDescription(advertisement.getDescription());\n view.setDate(advertisement.getDatePublished());\n view.setTags(advertisement.getTags());\n setCondition();\n if (advertisement.getImageUrl() != null) { //the url here is null right after upload\n view.setImageUrl(advertisement.getImageUrl());\n }\n }", "public void setView(java.lang.Boolean view) {\n this.view = view;\n }", "private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "void downloadURLMenuItem_actionPerformed(ActionEvent e) {\n Class<?> customizerClass = uRLReaderAgent.getCustomizerClass();\n\n if (customizerClass == null) {\n trace(\"Error can't find URLReaderAgent customizer class\");\n return;\n }\n\n // found a customizer, now open it\n Customizer customizer = null;\n\n try {\n customizer = (Customizer) customizerClass.newInstance();\n } catch (Exception exc) {\n trace(\"Error opening URLReaderAgent customizer - \" + exc.toString());\n return; // bail out\n }\n Point pos = this.getLocation();\n JDialog dlg = (JDialog) customizer;\n\n dlg.setLocation(pos.x + 20, pos.y + 20);\n customizer.setObject(uRLReaderAgent);\n dlg.show();\n }", "public void Archive(View view) {\n\n commentaryInstruction.stopPlaying();\n disableViewClickability();\n archive.setClickable(false);\n releaseCamera();\n Intent intent = new Intent(RecordStory.this, Archive.class);\n intent.putExtra(\"Authenticated\", authenticated);\n RecordStory.this.startActivity(intent);\n overridePendingTransition(R.anim.splash_screen_fade_in, R.anim.full_fade_out);\n }", "@RequestMapping(value=\"board/downloadResume.do\",method = RequestMethod.POST)\t\r\n\tpublic ModelAndView resumeDown(SearchVO search , HttpServletRequest req, ModelAndView mView) {\n\t\tString dftFilePath = \"E:\\\\JAVA\\\\workspace\\\\.metadata\\\\.plugins\\\\org.eclipse.wst.server.core\\\\tmp0\\\\wtpwebapps\\\\Portfolio\\\\\";\r\n\t\tString filePath = dftFilePath + \"boardFile\" + File.separator;\r\n\r\n\t\t//서버에 있는 파일 경로\r\n\t\tString saveFileNm = filePath + \"DOCX.docx\";\r\n\t\tString orgFileNm = \"웹개발자이력서_이규섭.docx\";\r\n\t\tmView.setView(download);\r\n\t\t\r\n\t\tFile downloadFile = new File(saveFileNm);\r\n\t\tmView.addObject(\"downloadFile\", downloadFile);\r\n\t\tmView.addObject(\"orgFileNm\", orgFileNm);\r\n\t\t\r\n\t\treturn mView;\r\n\t}", "public void FileDownloadView(PojoPropuestaConvenio pojo) throws IOException {\n BufferedOutputStream out = null;\n try {\n String extension = null;\n String nombre = null;\n String contentType = null;\n InputStream stream = null;\n listadoDocumento = documentoService.getDocumentFindCovenio(pojo.getID_PROPUESTA());\n\n for (Documento doc : listadoDocumento) {\n if (doc.getIdTipoDocumento().getNombreDocumento().equalsIgnoreCase(TIPO_DOCUMENTO)) {\n if (getFileExtension(doc.getNombreDocumento()).equalsIgnoreCase(\"pdf\")) {\n stream = new ByteArrayInputStream(doc.getDocumento());\n nombre = doc.getNombreDocumento();\n extension = \"pdf\";\n }\n }\n }\n\n if (extension != null) {\n if (extension.equalsIgnoreCase(\"pdf\")) {\n contentType = \"Application/pdf\";\n }\n content = new DefaultStreamedContent(stream, contentType, nombre);\n } else {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, \"Documento\", \"No se cuenta con documento firmado para descargar\"));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (out != null) {\n out.close();\n }\n }\n\n }", "private void setCurrentDownload(RqDownload dl)\n {\n download = dl;\n File f = attachRqChannel.responder.fetchFileById(dl.getId());\n try {\n fileSplitter = new FileSplitter(f, download);\n data = fileSplitter.getData();\n bbw.put(data.buildDatas());\n } catch (IOException e) {\n e.printStackTrace(System.err);\n }\n }", "public String viewFile(String type) {\n\t\ttry {\n\t\t\tForm form = this.getFormManager().getForm(this.getCourseId());\n\t\t\tif (null == form) {\n\t\t\t\t_logger.warn(\"form {} is null\", this.getCourseId());\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (type.equalsIgnoreCase(\"cover\")) {\n\t\t\t\tInputStream is = this.getFormManager().getCover(form.getCourseId());\n\t\t\t\tthis.setDownloadInputStream(is);\n\t\t\t\tthis.setDownloadFileName(form.getFileCoverName());\n\t\t\t\tthis.setDownloadContentType(URLConnection.guessContentTypeFromStream(is));\n\t\t\t} else if (type.equalsIgnoreCase(\"incentive\")) {\n\t\t\t\tInputStream is = this.getFormManager().getIncentive(form.getCourseId());\n\t\t\t\tthis.setDownloadInputStream(is);\n\t\t\t\tthis.setDownloadFileName(form.getFileIncentiveName());\n\t\t\t\tthis.setDownloadContentType(URLConnection.guessContentTypeFromStream(is));\n\t\t\t}\n\t\t} catch (Throwable t) {\n\t\t\t_logger.error(\"Error in view file of type {}\", type, t);\n\t\t\treturn null;\n\t\t}\n\t\treturn SUCCESS;\n\t}", "public void showDownloadList() {\n\t\tButton btn = (Button) ((Sync) initiator).findViewById(R.id.btn_sync_downlist);\n\t\t// On le desactive\n\t\tbtn.setEnabled(false);\n\t\t\n\t\t// On prend le bouton d'upload\n\t\tbtn = (Button) ((Sync) initiator).findViewById(R.id.btn_sync_uplist);\n\t\t// On l active\n\t\tbtn.setEnabled(true);\n\t\t\n\t\tsetDirectionDownload();\n\t\t((Sync) initiator).showListView();\n\t\t\t\t\n\t}", "public Get setView(java.lang.String view) {\n this.view = view;\n return this;\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tDownloadDialog dialog = new DownloadDialog(Database.currentActivity, text, list);\r\n\t\t\t\tdialog.show();\r\n\t\t\t}", "@Override\n @RequestMapping(\"download.feep\")\n public void download(HttpServletRequest request, HttpServletResponse response) throws FeepControllerException {\n\n }", "private void onDownloadComplete(String file_name, String downloadPath) {\n\n file_name_nv=file_name;\n getstartshow(file_name_nv);\n }", "public String download(){\r\n\t\treturn \"template\";\r\n\t}", "@FXML\n private void btnDownloadClick() {\n\n // Check the menu item to see if it should display a file choose or download the poster instantly\n if (isMenuItemChecked) {\n saveImageInstantly();\n } else {\n displayFileChooser();\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_download_ply, container, false);\n downloadButton = view.findViewById(R.id.download_button);\n downloadButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n downloadPLY(v);\n }\n });\n\n return view;\n }", "@Override\n\tpublic void onCreated(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.tab_download);\n\t}", "public void setView(View view);", "public void setIsView(Byte isView) {\n this.isView = isView;\n }", "private void setViews() {\n\n }", "protected void renderMergedOutputModel(Map model, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tFile file = (File)model.get(\"downloadFile\");\n\t\tresponse.setContentType(super.getContentType());\n\t\tresponse.setContentLength((int)file.length());\n\t\tresponse.setHeader(\"Content-Transfer-Encoding\",\"binary\");\n\t\tresponse.setHeader(\"Content-Disposition\",\"attachment;fileName=\\\"\"+java.net.URLEncoder.encode(file.getName(),\"utf-8\")+\"\\\";\");\n\t\tOutputStream out = response.getOutputStream();\n\t\tFileInputStream fis = null;\n\t\ttry\n\t\t{\n\t\t\tfis = new FileInputStream(file);\n\t\t\tFileCopyUtils.copy(fis, out);\n\t\t}\n\t\tcatch(java.io.IOException ioe)\n\t\t{\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif(fis != null) fis.close();\n\t\t}\n\t\tout.flush();\n\t}", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\n\t\t\ttry {\n\t\t\t\tif (dialog.isShowing()) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t\tswitch (fileFormat) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tUtil.getUtils().showDocFile(fileForWrite.getPath(), cntxt);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tUtil.getUtils().showPdfFile(fileForWrite.getPath(), cntxt);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n//\t\t\t\t\t\tChapterDetailActivity.loadView(\"file://\"+fileForWrite.getPath());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\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\t\t}", "@Override \r\n public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, \r\n\t long contentLength) {\n \tString filename = SDHelper.getAppDataPath() + File.separator \r\n\t\t\t\t\t+ getFilename(url);\r\n \tFile file =new File(filename);\r\n \tif (file.exists()) {\r\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\tString ext = getExt(file);\r\n\t\t\t\tString mark = null;\r\n\t\t\t if (ext.equalsIgnoreCase(\"doc\")||ext.equalsIgnoreCase(\"docx\"))\r\n\t\t\t\t\tmark = \"application/msword\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"xls\")||ext.equalsIgnoreCase(\"xlsx\"))\r\n\t\t\t\t\tmark = \"application/vnd.ms-excel\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"ppt\")||ext.equalsIgnoreCase(\"pptx\"))\r\n\t\t\t\t\tmark = \"application/vnd.ms-powerpoint\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"pdf\"))\r\n\t\t\t\t\tmark = \"application/pdf\";\r\n\t\t\t\t\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"apk\"))\r\n\t\t\t\t\tmark = \t\"application/vnd.android.package-archive\"; \r\n\t\t\t\tintent.setDataAndType(Uri.fromFile(file), mark);\r\n\t\t\t\tmContext.startActivity(intent);\r\n\r\n \t}\r\n \telse \r\n \t new getFileAsync().execute(url);\r\n \t\r\n \t}", "@Override\r\n\tpublic void setView(ViewProduct v) {\n\t\tthis.view = v;\r\n\t}", "@SuppressWarnings(\"resource\")\r\n\t@RestMethod(name=\"VIEW\", path=\"/*\")\r\n\tpublic void doView(RestRequest req, RestResponse res) throws Exception {\r\n\r\n\t\tif (! allowViews)\r\n\t\t\tthrow new RestException(SC_METHOD_NOT_ALLOWED, \"VIEW not enabled\");\r\n\r\n\t\tFile f = new File(rootDir.getAbsolutePath() + req.getPathInfo());\r\n\r\n\t\tif (!f.exists())\r\n\t\t\tthrow new RestException(SC_NOT_FOUND, \"File not found\");\r\n\r\n\t\tif (f.isDirectory())\r\n\t\t\tthrow new RestException(SC_METHOD_NOT_ALLOWED, \"VIEW not available on directories\");\r\n\r\n\t\tres.setOutput(new FileReader(f)).setContentType(\"text/plain\");\r\n\t}", "@Override\n public void onClick(View v) {\n \tIntent in = new Intent(getApplicationContext(), DownloadFile.class);\n in.putExtra(\"url\", url_get_file);\n startActivityForResult(in, 100);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent;\n intent = new Intent(AppMenu.this, AssetDownload.class);\n startActivity(intent);\n }", "public void setView(final BwView val) {\n view = val;\n }", "@Override\n\tpublic void setView(View view) {\n\n\t}", "public void setView(View view) {\n\t\tthis.view = view;\n\t}", "protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\n public void onViewAttachment(AttachmentViewInfo attachment) {\n\n getAttachmentController(attachment).viewAttachment();\n }", "@FXML\n\tvoid downloadBtnClicked(ActionEvent event) {\n\t\tFileChooser fileChooser = new FileChooser();\n\n\t\t// Set extension filter for docx files only\n\t\tFileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"DOCX files (*.docx)\", \"*.docx\");\n\t\tfileChooser.getExtensionFilters().add(extFilter);\n\n\t\t// Show save file dialog\n\t\tStage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n\t\tFile theFile = fileChooser.showSaveDialog(window);\n\t\tFileOutputStream fos = null;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(theFile);\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} // get path\n\t\tBufferedOutputStream bos = new BufferedOutputStream(fos);\n\t\ttry {\n\t\t\tbos.write(examFile.getMybytearray(), 0, examFile.getSize());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tbos.flush();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tfos.flush();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void startDownloadActivity() {\n checking();\n numDownloading = 0;\n updateMax = 0;\n updateProgress = 0;\n readPref();\n writePref();\n update();\n }", "@Override\n public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype,\n long contentLength) {\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()) {\n\t\t\tcase R.id.add_download:\n gotoAddDownLoadTask();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public interface MatchDetaiView {\n void setUrl(String share_url);\n}", "@Override\r\n\tpublic void downloadHomework() {\n\t\t\r\n\t}", "private void startMovieDownload() {\n String sortOrder = AppPrefs.getInstance(this).getLastSortOrder();\n if (null == sortOrder) {\n sortOrder = SortBy.getDefaultSortOrder();\n }\n downloadData(sortOrder);\n }", "public void downloadVideo(Context context, VideoView videoView){\n \t\t this.videoView = videoView;\n \t\t download = new DownloadVideo(context, SAVE_PATH);\n \t\t download.execute();\n \t }", "public void buyNow(View view) {\n String itemURL = null;\n try {\n itemURL = basic.getString(\"viewItemURL\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Intent viewIntent = new Intent(\"android.intent.action.VIEW\", Uri.parse(itemURL));\n startActivity(viewIntent);\n }", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n else if (id==R.id.share)\n {\n Toast.makeText(getApplicationContext(),\"Please Wait\",Toast.LENGTH_SHORT).show();\n dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request request = new DownloadManager.Request(\n Uri.parse(urlstring)).setDestinationInExternalPublicDir(\"/Society365\", legdername+\" - \"+timeperiod2+\".pdf\");\n\n request.setDescription(urlstring); //appears the same in Notification bar while downloading\n\n enqueue = dm.enqueue(request);\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "void mo54428b(DownloadTask downloadTask);", "@Override\n public void onRightIconClick(View view) {\n showLoading();\n getMPresenter().saveFile(saveFileTO);\n }", "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}", "@Override\n public void activateView(String outFile, int animationFrameRate) throws IOException {\n }", "@RequestMapping(value = \"/download\", method = RequestMethod.GET)\n public String download(HttpServletRequest request, HttpServletResponse response, Model model)\n throws IOException, TemplateException {\n FreemarkerCfg reportCfg = FreemarkerCfg.newInstance();\n WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();\n ServletContext servletContext = webApplicationContext.getServletContext();\n reportCfg.setServletContextForTemplateLoading(servletContext, \"/views/ftl\");\n // reportCfg.setDirectoryForTemplateLoading(templateDir);\n // Template t = reportCfg.getTemplate(\"scaleList.flt\");\n Template t = reportCfg.getTemplate(\"report.flt\");\n response.setCharacterEncoding(\"utf-8\");\n response.setContentType(\"application/msword\");\n // 设置浏览器以下载的方式处理该文件默认名为resume.doc\n response.addHeader(\"Content-Disposition\", \"attachment;filename=resume.doc\");\n // Writer out = response.getWriter();\n ServletOutputStream out = response.getOutputStream();\n Map root = new HashMap();\n\n String name = \"temp\" + (int) (Math.random() * 100000) + \".doc\";\n File f = new File(name);\n Writer w = new OutputStreamWriter(new FileOutputStream(f), \"utf-8\");\n\n // root.put(\"scaleList\", scaleList);\n root.put(\"name\", \"\");\n t.process(root, w);\n w.close();\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, out);\n IOUtils.closeQuietly(out);\n IOUtils.closeQuietly(fin);\n return null;\n // return viewName(\"scaletablelist\");\n }", "public void fetchVideo(View view) {\n Log.i(\"progress\", \"fetchVideo\");\n\n startActivityForResult(requestVideoFileIntent,0);\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n case R.id.downloadPdf:\n if (isConnectingToInternet()){\n Toast.makeText(getApplicationContext(), \"it's me\", Toast.LENGTH_SHORT).show();\n new DownloadTask(MainActivity.this, downloadPdf, Utils.downloadPdfUrl);\n }\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadDoc:\n if(isStoragePermissionGranted()){\n\n }\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadDoc, Utils.downloadDocUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadZip:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadZip, Utils.downloadZipUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadVideo:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadVideo, Utils.downloadVideoUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadMp3:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadMp3, Utils.downloadMp3Url);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.openDownloadedFolder:\n openDownloadedFolder();\n break;\n case R.id.go_to_downlaod:\n Intent i = new Intent(MainActivity.this, DownloadActivity.class);\n startActivity(i);\n break;\n\n }\n }", "public void onClick(View v) {\n\t\t\t\topenThisFileFromSD(\"maintainguideactivity.pdf\");\n\t\t\t}", "public void onDownloadStart(String url, String userAgent,\n String contentDisposition, String mimetype,\n long contentLength) {\n\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));\n }", "private void downloadFinished() {\n downloadFinished = true;\n editor.getProgressBar().setVisible(false);\n editor.getProgressBarLabel().setVisible(false);\n editor.setOkEnabled(true);\n editor.getProgressBar().setValue(editor.getProgressBar().getMaximum());\n }", "@Override\n protected AbstractUrlBasedView buildView(String viewName) throws Exception {\n try (InputStream stream = getServletContext().getResourceAsStream(getPrefix() + \"/custom/jsp/\" + viewName + getSuffix())) {\n return super.buildView(\"/\" + (stream == null ? \"common\" : \"custom\") + \"/jsp/\" + viewName);\n }\n }", "public void loadDownloadLocations(final Layer model, final Boolean showDownload) {\r\n \t\tview.showDownloadsLoading();\r\n \t\tif(model != null) {\r\n \t\t\tnodeService.getNodeLocations(NodeType.LAYER, model.getId(), new AsyncCallback<String>() {\r\n \t\t\t\t@Override\r\n \t\t\t\tpublic void onSuccess(String pagedResultString) {\t\t\t\t\r\n \t\t\t\t\tList<FileDownload> downloads = new ArrayList<FileDownload>();\t\t\t\t\t\t\r\n \t\t\t\t\ttry {\t\t\t\t\t\t\t\r\n \t\t\t\t\t\tPagedResults pagedResult = nodeModelCreator.createPagedResults(pagedResultString);\r\n \t\t\t\t\t\tif(pagedResult != null) {\r\n \t\t\t\t\t\t\tList<String> results = pagedResult.getResults();\r\n \t\t\t\t\t\t\tfor(String fileDownloadString : results) {\r\n \t\t\t\t\t\t\t\tDownloadLocation downloadLocation = nodeModelCreator.createDownloadLocation(fileDownloadString);\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\tif(downloadLocation != null && downloadLocation.getPath() != null) { \r\n \t\t\t\t\t\t\t\t\tFileDownload dl = new FileDownload(downloadLocation.getPath(), \"Download \" + model.getName(), downloadLocation.getMd5sum(), downloadLocation.getContentType());\r\n \t\t\t\t\t\t\t\t\tdownloads.add(dl);\r\n \t\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} catch (ForbiddenException ex) {\r\n \t\t\t\t\t\t// if user hasn't signed an existing use agreement, a ForbiddenException is thrown. Do not alert user to this \r\n\t\t\t\t\t\tonFailure(null);\r\n \t\t\t\t\t} catch (RestServiceException ex) {\r\n \t\t\t\t\t\tDisplayUtils.handleServiceException(ex, placeChanger, authenticationController.getLoggedInUser());\r\n \t\t\t\t\t\tonFailure(null);\t\t\t\t\t\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\t\t\t\t\r\n \t\t\t\t\tview.setLicensedDownloads(downloads);\r\n \t\t\t\t\t\r\n \t\t\t\t\t// show download if requested\r\n \t\t\t\t\tif(showDownload != null && showDownload == true) {\r\n \t\t\t\t\t\tif(downloadAttempted()) {\r\n \t\t\t\t\t\t\tview.showDownload();\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@Override\r\n \t\t\t\tpublic void onFailure(Throwable caught) {\t\t\t\t\r\n \t\t\t\t\tview.setDownloadUnavailable();\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t}\r\n \t}", "@Override\n public void setView(@NonNull final View view) {\n mNextView = view;\n }", "private void viewPageClicked() {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n try{\n Desktop d = Desktop.getDesktop();\n d.browse(new URI(itemView.getItem().getURL()));\n }catch(Exception e){\n e.printStackTrace();\n }\n\n showMessage(\"View clicked!\");\n }", "@Override\n\tpublic FileSelectDialog setView(View view) {\n\t\tthrow new Error(\"You cannot customize the view of a FileSelectDialog, \" +\n\t\t\t\t\"this feature would override the actual list\");\n\t}", "public void setARView(int viewSetting) {\n // rerender the view without recreate the object\n if(currentDisplayMode==DISPLAY_PLACE_DETAIL)\n generateWorld(mWorld, mPlaceDetail,viewSetting, false);\n else\n generateWorld(mWorld, mPlaceListMain,viewSetting, false);\n\n }", "@Override\n protected void onPostExecute(String file_url) {\n // dismiss the dialog after the file was downloaded\n //dismissDialog(progress_bar_type);\n dismissProgress();\n showToast(String.valueOf(\"Download File Success to \") + filename);\n if (filePath != null) {\n File file = new File( filePath );\n Intent intent = new Intent(Intent.ACTION_VIEW);\n Uri fileUri = FileProvider.getUriForFile(getContext(),\n \"com.insurance.easycover\",\n file);\n intent.setData(fileUri);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivity(intent);\n }\n }", "@Override\n\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\tview.saveWebArchive(webUri.getPath());\n\t\t\treadWeb.setEnabled(true);\n\t\t\tif(loadingFailed){\n\t\t\t\tLog.d(TAG, \"loading failed\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tLog.d(TAG, \"onPageFinished and downloaded:\" + url);\n\t\t\t}\n\t\t\t\n\t\t}", "@FXML\r\n void Download(ActionEvent event) {\r\n\t\tcurrentPurchase = purchasesTable.getSelectionModel().getSelectedItem();\r\n\t\tif (currentPurchase!=null) \r\n\t\t{\r\n\t\t\tPurchase purchase = purchasesTable.getSelectionModel().getSelectedItem();\r\n\t\t\tString city = purchase.getCityName();\r\n\t\t\tif (currentPurchase.getPurchaseType().toString().equals(\"SHORT_TERM_PURCHASE\")) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You can't download a short term purchase more than once\\nPlease purchase it again to download the city collection.\", \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t}\r\n\t\t\telse {\r\n\r\n\t\t\t\t\tArrayList<Object> data = new ArrayList<Object>();\r\n\t\t\t\t\tdata.add(MainGUI.currUser.getUserName());\r\n\t\t\t\t\tdata.add(city); \r\n\t\t\t\t\tdata.add(MainGUI.currUser.getPermission().toString());\r\n\t\t\t\t\tMainGUI.GUIclient.sendActionToServer(Action.DOWNLOAD_PURCHASE, data);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You haven't selected any purchase to download.\", \"Error\",\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n }", "public String getViewFilename(String viewName) {\n\t\treturn viewName + \".ser\";\n\t}", "@Override\r\n \t\t\tpublic void onClick(View arg0) {\n \t\t\t\tIntent intent = new Intent(AppDownloaded.this, SettingActivity.class);\r\n \t\t\t\tstartActivity(intent);\r\n \t\t\t}", "@FXML\n private void viewSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"View DonorReceiver\");\n } else {\n ViewProfilePaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.VIEW);\n }\n }", "public void download(HttpServletResponse response) throws IOException {\n\t\tString f;\n\t\tif (this.filename != null) {\n\t\t\tFile file = new File(this.filepath);\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new IOException(\"file does not exit:\" + filename);\n\t\t\t} else {\n\t\t\t\tf = toUtf8String(filename);\n\t\t\t\tresponse.setContentType(\"application/x-msdownload\");\n\t\t\t\tresponse.setContentLength((int) file.length());\n\t\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;\"\n\t\t\t\t\t\t+ \" filename=\" + f);\n\t\t\t\twrite(response.getOutputStream());\n\t\t\t}\n\t\t}\n\t}", "@RequestMapping(value = \"download.do\")\r\n\tpublic ModelAndView download(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\tString storeName = request.getParameter(\"name\");\r\n\t\tString contentType = \"application/octet-stream\";\r\n\t\t// 获取项目根目录\r\n\t\tString ctxPath = request.getSession().getServletContext().getRealPath(\"\");\r\n\t\t// 获取下载文件露肩\r\n\t\tString downLoadPath = ctxPath + \"/data/\" + storeName;\r\n\t\tFileUploadController.download(request, response, storeName, downLoadPath, contentType);\r\n\t\treturn null;\r\n\t}", "@Override\n public void onClick(View v) {\n super.onClick(v);\n switch (v.getId()) {\n case R.id.xiazai:\n if (!TextUtils.isEmpty(url)) {\n T.showShort(\"正在跳入异次元请求下载~~~\");\n Uri uri = Uri.parse(url);\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(intent);\n }\n break;\n\n default:\n break;\n }\n\n\n }", "@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}", "@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}" ]
[ "0.636577", "0.6248749", "0.622603", "0.6179269", "0.6145029", "0.614107", "0.60433453", "0.58976835", "0.5772199", "0.5764903", "0.57395005", "0.5677634", "0.56615555", "0.56603956", "0.5658427", "0.5646443", "0.5621208", "0.5619775", "0.55992776", "0.5595867", "0.55948514", "0.55847555", "0.5561042", "0.55600005", "0.5531542", "0.5516671", "0.5506143", "0.5471093", "0.5442409", "0.5427025", "0.5417798", "0.54115194", "0.53939986", "0.53741944", "0.53596246", "0.5358536", "0.5354541", "0.5350149", "0.5348499", "0.5340952", "0.5338399", "0.5331543", "0.5323764", "0.5322934", "0.53200936", "0.5317805", "0.53159964", "0.52978593", "0.5261943", "0.5261439", "0.52574086", "0.5250726", "0.5247473", "0.524644", "0.5245684", "0.52418244", "0.5239189", "0.5238574", "0.5232858", "0.52256197", "0.5225386", "0.52236503", "0.5217382", "0.52164674", "0.5207802", "0.51864034", "0.5185659", "0.51791364", "0.5176499", "0.517493", "0.5174375", "0.51742506", "0.51636386", "0.51576227", "0.51553303", "0.5152962", "0.5147881", "0.5147517", "0.5135821", "0.5134778", "0.51325524", "0.5126548", "0.51234376", "0.51204574", "0.5116519", "0.5115395", "0.51088876", "0.50943017", "0.509222", "0.50894034", "0.508828", "0.50830567", "0.50823295", "0.5077939", "0.507529", "0.5073895", "0.50723904", "0.50683457", "0.5068287", "0.5066575", "0.5066575" ]
0.0
-1
TODO Autogenerated method stub Embed stego = new Embed(); stego.embedMsg(); stego.decode();
public static void main(String[] args) throws IOException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setEmbed(MessageEmbed embed) {\n message.setEmbeds(embed);\n return this;\n }", "EMBED createEMBED();", "IMessage decode(byte[] data) throws InvalidMessageException;", "private static EmbedBuilder JoinDM (){\n Color color = new Color(238,119,0);\n return new EmbedBuilder()\n .setColor(color)\n .setTitle(\"FyreBot\")\n .setDescription(\"Hey, I'm FyreBot! Thanks for inviting me to your server!\\n\\n\" +\n \"My prefix is `!` for example `!command`\\n\\n\" +\n \"To get started use `!help` to list all my commands!\\n\\n\" +\n \"I'm developed by `Drix#8197` so if you have any questions about me you should ask him.\");\n }", "private byte[] decode(byte[] msg) {\r\n\t\treturn Base64.decode(msg); \r\n\t}", "public void setEmbed(@Nullable final AlbumEmbed embed) {\n mEmbed = embed;\n }", "@Override\n public void embedding(String mineType, byte[] bytes) {\n latestStepResult.getEmbeddingList().add(new Embedding(bytes, mineType));\n }", "@Nullable\n public AlbumEmbed getEmbed() {\n return mEmbed;\n }", "public static EmbedBuilder embedBuilder(String command, MessageCreateEvent event){\n return new EmbedBuilder().setTitle(command).setAuthor(event.getMessageAuthor().getName(), \"\", event.getMessageAuthor().getAvatar());\r\n }", "public List<EmbeddedGraph> createEmbeddingsFromParam(BaseParams params)\n throws JsonParseException, JsonMappingException, IOException {\n ObjectMapper mapper = new ObjectMapper();\n String decodedEmbeddding = new String(Base64Utils.decodeFromString(params.getEmbeddings()));\n return mapper.readValue(decodedEmbeddding, new TypeReference<List<EmbeddedGraph>>(){});\n }", "Payload getMsg();", "@Override\n public boolean isEmbedded() {\n return true;\n }", "public static void pbMessage(String data, String discordid, String uuid, char type) {\n\t\tEmbedBuilder embed = new EmbedBuilder();\n\t\tString localData = GeneralUtils.readJsonToString(\"linked player/\" + uuid + \"/data.json\");\n\n\t\t// Add a unique part to the request url so discord cannot cache it and the skin stays up to date.\n\t\t// By: EatMyVenom\n\t\tlong time = System.currentTimeMillis();\n\n\t\tString url = \"https://crafatar.com/renders/body/\" + uuid + \"?overlay&size=512&time=\" + time;\n\t\tString avatarUrl = Bot.server.getMemberById(discordid).getUser().getAvatarUrl();\n\t\tString name = Bot.server.getMemberById(discordid).getEffectiveName();\n\t\tint oldQ = Stats.getQualificationToInt(localData);\n\t\tint newQ = API.getQualificationToInt(data);\n\t\tint oldF = Stats.getFinalsToInt(localData);\n\t\tint newF = API.getFinalsToInt(data);\n\t\t\n\t\tembed.setAuthor(name + \" | \" + API.getName(data), url, avatarUrl);\n\t\tembed.setThumbnail(url);\n\t\tembed.setFooter(\"Discord ID: \" + discordid + \"\\nUUID: \" + uuid);\n\t\t\n\t\tif (type == 'q') {\n\t\t\tif (newQ - oldQ <= 0) return;\n\t\t\tembed.setTitle(API.getName(data)+\" Improved \" + GeneralUtils.getGenderPrefix(discordid) + \" **Qualifiers** Personal Best!\");\n\t\t\tembed.setColor(RolesManager.getRoleColor(newQ));\n\t\t\tembed.addField(\"Old PB\", \"**\" + oldQ + \"**\",true);\n\t\t\tembed.addField(\"New PB\", \"**\" + newQ + \"**\",true);\n\t\t\tembed.addField(\"Increase\",\"**\" + (newQ - oldQ) + \"**\",true);\n\t\t} else {\n\t\t\tif (newF - oldF <= 0) return;\n\t\t\tembed.setTitle(API.getName(data) + \" Improved \" + GeneralUtils.getGenderPrefix(discordid) + \" **Finals** Personal Best!\");\n\t\t\tembed.setColor(RolesManager.getRoleColor(newF));\n\t\t\tembed.addField(\"Old PB\", \"**\" + oldF + \"**\",true);\n\t\t\tembed.addField(\"New PB\", \"**\" + newF + \"**\",true);\n\t\t\tembed.addField(\"Increase\",\"**\" + (newF - oldF) + \"**\",true);\n\t\t}\n\t\tnew RolesManager().addClubRole(Bot.server, Bot.server.getMemberById(discordid), newQ, newF, null);\n\t\tBot.server.getTextChannelById(ConfigManager.getString(\"trackerChannel\")).sendMessage(embed.build()).complete();\n\t}", "com.google.protobuf.ByteString getPayload();", "com.google.protobuf.ByteString getPayload();", "public void decodeMessage() {\n StringBuilder decoded = new StringBuilder();\n\n for (int i = 0; i < message.length(); i += 3) {\n if (message.charAt(i) == message.charAt(i + 1)) {\n decoded.append(message.charAt(i));\n } else if (message.charAt(i) == message.charAt(i + 2)) {\n decoded.append(message.charAt(i));\n } else {\n decoded.append(message.charAt(i + 1));\n }\n }\n\n message = decoded;\n }", "public void decryptMessageClick(View view) {\n\n String receivedMessage = mMessageContentEditText.getText().toString();\n mMessage.extractEncryptedMessageAndKey(receivedMessage);\n\n if(!decryptMessage()) showToast(\"Error! failed to decrypt text.\");\n\n else{\n\n showDecryptedMessage();\n }\n }", "com.google.protobuf.ByteString getMsg();", "public String getEmbedder() {\n return mEmbedder;\n }", "com.google.protobuf.Any getContent();", "private static void decodeString(String in){\n\t\t//reverse anything done in encoded string\n\t\tString demess = decrypt(in);\n\t\tString decodeMessage = bigIntDecode(demess);\n\n\t\tSystem.out.println(\"Decoded message: \" + decodeMessage + \"***make function to actually decode!\");\n\t}", "public abstract String decryptMsg(String msg);", "ReferenceEmbed createReferenceEmbed();", "public void findPlugs(String messageToDecode) throws Exception {\n\n myEnigma.clearPlugboard();\n char fPlugEnd1 ='D';\n char sPlugEnd1 = 'S';\n\n for(int i=0;i<26;i++)\n {\n char fPlugEnd2 = (char)(i+ 65);\n for(int j=0;j<26;j++)\n {\n char sPlugEnd2 = (char) (j + 65);\n if(myEnigma.addPlug(fPlugEnd1,fPlugEnd2))\n {\n if(myEnigma.addPlug(sPlugEnd1,sPlugEnd2))\n {\n BasicRotor firstRotor = new BasicRotor(\"typeIV\");\n firstRotor.setPosition(8);\n myEnigma.addRotor(firstRotor,0);\n\n BasicRotor secondRotor = new BasicRotor(\"typeIII\");\n secondRotor.setPosition(4);\n myEnigma.addRotor(secondRotor,1);\n\n BasicRotor thirdRotor = new BasicRotor(\"typeII\");\n thirdRotor.setPosition(21);\n myEnigma.addRotor(thirdRotor,2);\n\n Reflector myReflector = new Reflector(\"ReflectorI\");\n myEnigma.addReflector(myReflector);\n\n String outputEnigma = myEnigma.start(messageToDecode);\n\n if(outputEnigma.contains(\"GIVEMEYOURANSWERDO\"))\n {\n System.out.println(fPlugEnd1 + \" - \" + fPlugEnd2);\n System.out.println(sPlugEnd1 + \" - \" + sPlugEnd2);\n System.out.println(\"Message: \" + outputEnigma);\n }\n\n myEnigma.clearPlugboard();\n }\n\n }\n\n myEnigma.clearPlugboard();\n\n\n }\n }\n\n }", "public String getDecoded()\n\t{\n\t\treturn this.decodedText;\n\t}", "JsMessage getMessage();", "public final void mo75312aj() {\n super.mo75312aj();\n if (this.f77593aS != null && this.f77546j != null && C25352e.m83221d(this.f77546j)) {\n C24961b e = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play_break\").mo65283e(\"video\");\n C43222g gVar = this.f77593aS;\n C7573i.m23582a((Object) gVar, \"mPlayer\");\n C24961b a = e.mo65255a(gVar.mo104915n());\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n a.mo65271b((long) video.getVideoLength()).mo65270a(mo75261ab());\n }\n }", "public String decode(String message) {\n if (message == null || message.isEmpty()) {\n return \"\";\n }\n StringBuilder source = new StringBuilder(message);\n StringBuilder target = new StringBuilder();\n while (source.length() >= 8) {\n String substring = source.substring(0,8);\n source.delete(0, 8);\n target.append(decodeByte(substring));\n }\n int bitOverlap = target.length() % 8;\n if (bitOverlap > 0 && target.length() > 8) {\n target.delete(target.length() - bitOverlap, target.length());\n }\n return target.toString();\n }", "private SigmaProtocolMsg receiveMsgFromProver() throws ClassNotFoundException, IOException {\n\t\tSerializable msg = null;\n\t\ttry {\n\t\t\t//receive the mesage.\n\t\t\tmsg = channel.receive();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IOException(\"failed to receive the a message. The thrown message is: \" + e.getMessage());\n\t\t}\n\t\t//If the given message is not an instance of SigmaProtocolMsg, throw exception.\n\t\tif (!(msg instanceof SigmaProtocolMsg)){\n\t\t\tthrow new IllegalArgumentException(\"the given message should be an instance of SigmaProtocolMsg\");\n\t\t}\n\t\t//Return the given message.\n\t\treturn (SigmaProtocolMsg) msg;\n\t}", "public void updateMessage(Message message, String action) {\n ArrayList<CommandInfo> commandInfos = null;\n EmbedBuilder builder = new EmbedBuilder();\n\n builder.setTitle(title)\n .setColor(0xFF00FF)\n .setDescription(\"Bot created by @GrunclePug#7015\")\n .setThumbnail(\"https://i.imgur.com/bfwjiDz.png\");\n\n try {\n commandInfos = FileInteraction.readFile();\n } catch(IOException e) {\n e.printStackTrace(System.err);\n }\n\n ArrayList<String> categories = new ArrayList<>();\n for(int i = 0; i < commandInfos.size(); i++) {\n if(categories != null && categories.size() > 0) {\n if(!categories.contains(commandInfos.get(i).getCategory().replace(\"\\\"\", \"\"))) {\n categories.add(commandInfos.get(i).getCategory().replace(\"\\\"\", \"\"));\n }\n } else {\n categories.add(commandInfos.get(i).getCategory().replace(\"\\\"\", \"\"));\n }\n }\n\n String page = message.getEmbeds().get(0).getFields().get(0).getName();\n String nextPage = null;\n String previousPage = null;\n\n for(int i = 0; i < categories.size(); i++) {\n if(categories.get(i).equalsIgnoreCase(page)) {\n if(categories.get(i).equalsIgnoreCase(categories.get(0))) {\n previousPage = categories.get(categories.size() - 1);\n nextPage = categories.get(i + 1);\n } else if(categories.get(i).equalsIgnoreCase(categories.get(categories.size() - 1))) {\n previousPage = categories.get(i - 1);\n nextPage = categories.get(0);\n } else {\n previousPage = categories.get(i - 1);\n nextPage = categories.get(i + 1);\n }\n }\n }\n\n ArrayList<MessageEmbed.Field> fields = null;\n\n switch(action) {\n case \"LEFT\":\n fields = getPage(previousPage, commandInfos);\n break;\n case \"RIGHT\":\n fields = getPage(nextPage, commandInfos);\n break;\n }\n\n for(int i = 0; i < fields.size(); i++) {\n builder.addField(fields.get(i));\n }\n\n message.editMessageEmbeds(builder.build()).queue();\n }", "public void frameMsg(byte[] encodedMsg, OutputStream out) {\n\r\n }", "public abstract void videoMessage(Message m);", "@Override\n protected Message receiveMessage() throws IOException {\n String encoded = this.din.readUTF();\n this.lastMessage = new Date();\n String decodedXml = new String(\n DatatypeConverter.parseBase64Binary(encoded));\n\n return Message.msgFromXML(decodedXml);\n }", "@AutoProtoSchemaBuilder(includeClasses = IncludeExcludeOverlap.Msg.class,\n excludeClasses = IncludeExcludeOverlap.Msg.class)\ninterface IncludeExcludeOverlap extends SerializationContextInitializer {\n\n class Msg {\n @ProtoField(1)\n public String txt;\n }\n}", "private Panel displayMessage(final MessageDTO msg) {\n\t\tFluidContainer container = new FluidContainer();\n\t\tRow row = new Row();\n\t\tcom.github.gwtbootstrap.client.ui.Column imageCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(3);\n\t\timageCol.add(getImagePanel(msg.getSender(), ValueType.MEDIUM_IMAGE_VALUE));\n\t\trow.add(imageCol);\n\n\t\tcom.github.gwtbootstrap.client.ui.Column messageCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(9);\n\t\tHTMLPanel messagePanel =\n\t\t new HTMLPanel(\"<span class='medium_text'>\" + basicDataFormatter.format(msg.getMessage(), ValueType.TEXT_VALUE) + \"</span>\");\n\t\tmessageCol.add(messagePanel);\n\t\trow.add(messageCol);\n\t\tcontainer.add(row);\n\n\t\tRow timeRow = new Row();\n\t\tcom.github.gwtbootstrap.client.ui.Column timeCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(4);\n\t\ttimeCol.setOffset(8);\n\t\tHTMLPanel timePanel =\n\t\t new HTMLPanel(\"<span class='tiny_text'>sent on \"\n\t\t + basicDataFormatter.format(msg.getTimeCreated(), ValueType.DATE_VALUE_SHORT)\n\t\t + \"</span>\");\n\t\ttimeCol.add(timePanel);\n\t\ttimeRow.add(timeCol);\n\t\tcontainer.add(timeRow);\n\t\treturn container;\n\t}", "public String decrypt(String msg) {\n \n StringBuilder sb = new StringBuilder(msg);\n \n for (int i=0; i< sb.length(); i++) {\n char decrypted = decrypt(sb.charAt(i));\n sb.setCharAt(i, decrypted);\n }\n \n return sb.toString();\n }", "public IMessage toMessage(Class clas){\n\n\t\tIMessage msg = null;\n\t\tif (clas != null)\n\t\t\t msg = super.toMessage(clas);\n\t\telse\n\t\t\tmsg = super.toMessage(ExtensionResource.class);\n\t\t\n//\t IMessage msg = super.toMessage(ExtensionResource.class);\n\n//\t msg.setElement(new Element(AEvent.TYPE, ExtensionResource.class.getName()));\n\t\t \n\t msg.setElement(new Element(\"extid\", extID));\n\t msg.setElement(new Element(\"code\", codebase));\n\t msg.setElement(new Element(\"classname\", classname));\n\t\t\n\t\tif (tag.equals(INSERT_REMOTE)){\n\t\t\t\n\t\t\t// read file into a byte array\n\t\t\tbyte[] bytes;\n\t\t\ttry {\n\t\t\t\tbytes = getBytesFromFile(new File(extResLocation + codebase));\n\t\t\t\tmsg.setElement(new Element(bytes, \"filedat\"));\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tLOG.error(\"could not put file into message\", ioe);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t return (msg);\n }", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "private NormalizedMessage buildMessagePayload(MessageExchange exchange,\n Message wsdlMessage,\n Map partMappings,\n WrapperBuilder wrapperBuilder,\n IMSMessage imsMessage,\n String data) throws SAXException, IOException, Exception {\n NormalizedMessage normalizedMessage = exchange.createMessage();\n\n /**\n * IMS BC basically handles data format. However, an important assumption has to be made,\n * i.e. we deal with one message part for each ims operation only. Otherwise, the \"part\"\n * attribute for ims:element element is required. This assumption will be enforced as part\n * of WSDL validation at design time.\n */\n Document document = null;\n Part aPart = null;\n QName messageQName = wsdlMessage.getQName();\n String use = imsMessage.getUseType();\n String partName = imsMessage.getMessagePart();\n\n if (partName != null && !partName.equals(\"\")) {\n aPart = wsdlMessage.getPart(partName);\n } else {\n // there is only one part\n Collection parts = wsdlMessage.getParts().values();\n Part[] partArray = (Part[]) parts.toArray(new Part[0]);\n aPart = (Part) partArray[0];\n partName = aPart.getName();\n }\n\n // It is safe to assume all WSDL validation are done by now.\n if (use.equals(IMSMessage.USE_TYPE_ENCODED)) {\n Encoder encoder = (Encoder) partMappings.get(messageQName + partName);\n if (encoder == null) {\n\t\t\t\tif (mLogger.isLoggable(Level.INFO)) \n\t\t\t\t\tmLogger.log(Level.INFO, mMessages.getString(\"IMSBC-E00506.INMR_Invalid_Encodingstyle\"));\n throw new Exception(mMessages.getString(\"IMSBC-E00506.INMR_Invalid_Encodingstyle\"));\n }\n\n // Decode raw data and add message part\n Source source = encoder.decodeFromString(data);\n //Element element = document.getDocumentElement();\n Element element = getRootElement(source);\n wrapperBuilder.addPart(partName, element);\n } else {\n // XML element node vs. simple Text node?\n if (aPart.getElementName() != null) {\n // May want to add basic xml validation later\n document = XmlUtil.createDocumentFromXML(true, new String(data));\n Element element = document.getDocumentElement();\n wrapperBuilder.addPart(partName, element);\n } else { // must be \"type\" otherwise there would've been a WSDL validation error\n // We may still be dealing with XML node\n QName typename = aPart.getTypeName();\n if (!WSDLUtilities.isBuiltInType(typename)) {\n document = XmlUtil.createDocumentFromXML(true, new String(data));\n Element element = document.getDocumentElement();\n wrapperBuilder.addPart(partName, element);\n } else {\n // treat it as Text node\n document = mBuilder.newDocument();\n // Note that we need to treat text based and binary data differently\n // For now, we support text based data only\n Text textNode = document.createTextNode(new String(data));\n wrapperBuilder.addPart(partName, new NodeListImpl(textNode));\n }\n }\n }\n normalizedMessage.setContent(new DOMSource(wrapperBuilder.getResult()));\n\n return normalizedMessage;\n\n }", "com.google.protobuf.ByteString\n getTheMessageBytes();", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tString [] str=(String [])msg.obj;\n\t\t\tfor(int i=0;i<6;i++)\n\t\t\t{System.out.println(str[i]);}\n\t\t\t if(mDialog.isShowing()==true){\n\t\t\t\t mDialog.dismiss(); \n\t\t\t }\n\t\t\t if(str[0].toString().equals(\"anyType{}\")==true){\n//\t\t\t \tSystem.out.println(str[0]);\n\t\t\t\t title.setText(str[1]);\n\t\t\t\t time.setText(str[2]);\n\t\t\t\t type.setText(str[3]);\n\t\t\t\t content.setText(str[4]);\n\t\t\t\t name.setText(str[5]);\n//\t\t\t Toast.makeText(getApplicationContext(),\"发布成功\",Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t\t else{\n\t\t\t \tToast.makeText(getApplicationContext(),str[0],Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t}", "public String decode(String message)\n\t{\n\t\treturn decode(message, 0);\n\t}", "public String decrypt(String msg) {\n if (map == null) {\n getMapping();\n }\n\n // Find cipher match\n String ch = \"\";\n for (int j = 0; j < map.length; j++) {\n if ((map[j][0] + \"\").equals(msg)) {\n ch = (char)j + \"\";\n }\n }\n\n return ch;\n }", "public void mo63047b(String str) {\n String str2;\n String str3;\n String str4;\n String str5;\n super.mo63047b(str);\n if (C25352e.m83221d(this.f77546j)) {\n this.f89203a.mo65916c();\n C24961b e = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play_over\").mo65283e(\"video\");\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n e.mo65271b((long) video.getVideoLength()).mo65270a(mo75261ab());\n this.f89214bh++;\n C28418f a = C28418f.m93413a();\n C7573i.m23582a((Object) a, \"FeedSharePlayInfoHelper.inst()\");\n a.f74936f = this.f89214bh;\n if (this.f89214bh >= this.f89215bi) {\n C28418f a2 = C28418f.m93413a();\n C7573i.m23582a((Object) a2, \"FeedSharePlayInfoHelper.inst()\");\n if (!a2.f74934d) {\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme2.getAwemeRawAd();\n if (awemeRawAd != null) {\n str3 = awemeRawAd.getWebUrl();\n } else {\n str3 = null;\n }\n if (TextUtils.isEmpty(str3)) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str4 = \"\";\n } else {\n str4 = \"video\";\n }\n b.mo65283e(str4).mo65270a(mo75261ab());\n return;\n } else if (mo75314al()) {\n mo75311ai();\n return;\n } else {\n this.f89215bi++;\n C24961b b2 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str5 = \"\";\n } else {\n str5 = \"video\";\n }\n b2.mo65283e(str5).mo65270a(mo75261ab());\n return;\n }\n }\n }\n C24961b b3 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str2 = \"\";\n } else {\n str2 = \"video\";\n }\n b3.mo65283e(str2).mo65270a(mo75261ab());\n }\n }", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "public boolean isEmbedded() {\n return !getElement().getOwnerDocument().getBody().getClassName()\n .contains(ApplicationConnection.GENERATED_BODY_CLASSNAME);\n }", "org.jetbrains.kotlin.gradle.idea.proto.generated.kpm.IdeaKpmWasmPlatformProtoOrBuilder getWasmOrBuilder();", "@Override\n public String decryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] decMsg = new char[msg.length()];\n int actKey = key % 65536;\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n decMsg[ind] = (char) ((letter - actKey < 0) ? letter - actKey + 65536 : letter - actKey);\n }\n return new String(decMsg);\n }\n }", "@Override\n protected void decode(ChannelHandlerContext ctx, Message msg, List<Object> out) throws Exception \n {\n GameAppContext context = ctx.channel().attr(GameAppContextKey.KEY).get();\n \n // and let the context decide what to do with the message\n context.handleMessage(msg);\n \n // we dont break the cycle here - maybe other handlers sit behind this one\n out.add(msg);\n }", "public static byte[] decryptSMS(String secretKeyString, byte[] encryptedMsg) throws Exception {\n // generate AES secret key from the user input secret key\n Key key = generateKey(secretKeyString);\n // get the cipher algorithm for AES\n Cipher c = Cipher.getInstance(\"AES\");\n // specify the decryption mode\n c.init(Cipher.DECRYPT_MODE, key);\n // decrypt the message\n byte[] decValue = c.doFinal(encryptedMsg);\n return decValue;\n }", "public boolean isEmbedded() throws PDFNetException {\n/* 783 */ return IsEmbedded(this.a);\n/* */ }", "private static Model decodeModel(final String id, final String msgBody) {\n final Model model = createDefaultModel();\n model.read(new ByteArrayInputStream(msgBody.getBytes(UTF_8)), id, \"JSON-LD\");\n return model;\n }", "public void handleMessage(Message msg) {\n\t\t\tLog.e(\"DownloaderManager \", \"newFrameHandler\");\n\t\t\tMessage msgg = new Message();\n\t\t\tmsgg.what=2;\n\t\t\tmsgg.obj = msg.obj;\n\t\t\t\n\t\t\t_replyTo.sendMessage(msgg);\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n public String getMessage() {\n String result =\"Audio Message {\\n\";\n result +=\"\\tID: \"+ID+\"\\n\";\n result +=\"\\tBuffer Size: \"+bufferSize+\"\\n\";\n result +=\"}\";\n \n return result;\n }", "Message readMessage(byte[] data, CodedInputStreamMicro is) throws IOException {\n int b1 = is.readRawByte();\n if (b1 == 0) {\n // grpc style framing - 0 4B-length\n } else if (b1 == '{') {\n // \\n delimited json\n //String line = is.\n\n }\n\n int len = is.readRawLittleEndian32();\n if (len < 0) {\n Log.d(TAG, \"Invalid length\");\n return null;\n }\n data = is.readRawBytes(len);\n\n String body = new String(data, 0, len);\n String[] lines = body.split(\"\\n\");\n String l = lines[0];\n\n Message msg = Message.obtain();\n msg.getData().putString(\":uri\", l);\n\n for (int i = 1; i < lines.length; i++) {\n String s1 = lines[i];\n if (s1.contains(\":\")) {\n String[] s1P = s1.split(\":\", 2);\n if (s1P.length == 2) {\n msg.getData().putString(s1P[0], s1P[1]);\n }\n }\n }\n\n return msg;\n }", "public MessageViewResponse getMessage(String messageId) {\n\t\tMessageViewResponse response=new MessageViewResponse();\r\n\t\t\r\n\t\tString title=\"\";\r\n\t\tList<String> msgList=new ArrayList<String>();\r\n\t\tList<String> dateList=new ArrayList<String>();\r\n try\r\n {\r\n\t\tDetachedCriteria criteria = DetachedCriteria.forClass(MessageBoard.class);\r\n\t\tcriteria.add(Restrictions.eq(\"title\", messageId));\r\n\t\tcriteria.addOrder(Order.asc(\"title\"));\r\n\t\tList<BaseBusinessObject> retObj = findByCriteria(criteria);\r\n\t\tfor (BaseBusinessObject bo : retObj) {\r\n\t\t\ttitle=((MessageBoard) bo).getTitle();\r\n\t\t\tmsgList.add(\"\" + ((MessageBoard) bo).getMessage());\r\n\t\t\tdateList.add(\"\" + ((MessageBoard) bo).getCreated_date());\r\n\r\n\t\t}\r\n\t\tresponse.setTitle(title);\r\n\t\tresponse.setDate(dateList);\r\n\t\tresponse.setMessages(msgList);\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t\t\r\n\t}\r\n\t\treturn response;\r\n\t}", "public pam_message(Pointer src) {\n useMemory(src);\n read();\n }", "com.google.protobuf.ByteString getQueryMessage();", "com.google.protobuf.AnyOrBuilder getContentOrBuilder();", "com.google.protobuf.ByteString getContent();", "com.google.protobuf.ByteString getContent();", "@Override\n public Message decode( byte[] msg, int offset, int maxIdx ) {\n if ( _binDecodeBuilder.getCurrentIndex() < _binDecodeBuilder.getMaxIdx() ) {\n\n ++_msgInPkt;\n \n _binDecodeBuilder.start( msg, offset, maxIdx );\n\n // have space so assume another message present\n \n _pMap.readMap( _binDecodeBuilder );\n \n _templateId = _templateIdReader.read( _binDecodeBuilder, _pMap ); \n\n if ( _templateId == BSE_FAST_RESET ) {\n resetActiveFields();\n }\n \n // @TODO add hard coded generated templates\n \n // Message m = null;\n // \n // // HAND TEMPLATES - ENSURE SWITCH STATEMENT HAS FILLERS\n //\n // if ( m != null ) {\n // _binDecodeBuilder.end(); // only one message per packet in BSE\n // \n // return m;\n // }\n \n return processsSoftTemplateDecode( _templateId );\n }\n \n return null;\n }", "public final void entryRuleEmbeddedField() throws RecognitionException {\r\n try {\r\n // InternalGo.g:655:1: ( ruleEmbeddedField EOF )\r\n // InternalGo.g:656:1: ruleEmbeddedField EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getEmbeddedFieldRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleEmbeddedField();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getEmbeddedFieldRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tString recievedMessage = \"Krw\\\"a\\\"lknwgw\\\"kz\\\"Erwjw\\\"zk\\\"Opabwj.\\\"vw\\\"zw\\\"oa\\\"lnkrane\\\"gkiqjegwyefwpw\\\"zwhe\\\"bqjgyekjenw\\\"\\\"\\\"\\\"\\\"\\\"\\\"\";\n\t\tBlockChiper bc = new BlockChiper(recievedMessage,0);\n\t\tSystem.out.println(bc.decrypt(224709026));\n\t\t\n\t\tString replyMessage = \"ej zdravo ivana, se e okej funkcionira gi dobivam porakite, sto znaci deka uspeshno sme go vospostavile dhke protokolot. pozdrav se gledame\";\n\t\tBlockChiper bc1 = new BlockChiper(replyMessage,0);\n\t\tSystem.out.println(bc1.encrypt(224709026));\n\t\t\n\t\t\n\t\t\n\t}", "NOEMBED createNOEMBED();", "@Override\r\n\tpublic Message getMessage(String messageId) {\n\t\treturn null;\r\n\t}", "static byte[] readMessage() {\n byte[] msg = new byte[0];\n try {\n msg = Hex.decodeHex(\n \"000600000003000000017d010000\" +\n \"bb931fd17f85fb26e8209eb7af5747258163df29a7dd8f87fa7617963fcfa1aa\" +\n \"b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe0400\"\n );\n } catch (DecoderException e) {\n e.printStackTrace();\n }\n return msg;\n }", "public void receive( Message message )\n\t{\n\t\tif( mCanProcessAudio )\n\t\t{\n\t\t\tif( message instanceof LDUMessage )\n\t\t\t{\n\t\t\t\tLDUMessage ldu = (LDUMessage)message;\n\t\t\t\t\n\t\t\t\t/* Check valid ldu frames for encryption. Set state to encrypted\n\t\t\t\t * so that no encrypted frames are sent to the converter */\n\t\t\t\tif( ldu.isValid() )\n\t\t\t\t{\n\t\t\t\t\tmEncryptedAudio = ldu.isEncrypted();\n\t\t\t\t}\n\n\t\t\t\tif( !mEncryptedAudio )\n\t\t\t\t{\n\t\t\t\t\tfor( byte[] frame: ((LDUMessage)message).getIMBEFrames() )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( !mIMBEFrameQueue.offer( frame ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmLog.debug( \"IMBE frame queue full - throwing away \"\n\t\t\t\t\t\t\t\t\t+ \"imbe audio frame\" );\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}", "@Override\n\tpublic byte[] retrieve(String msgid)\n\t{\n\t\treturn null;\n\t}", "private byte[] extractContent(EmbeddedXMLType embeddedXMLType) {\n\t\tbyte[] content;\n\t\ttry {\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\n\t\t\tTransformer t = tf.newTransformer();\n\t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\t\tResult result = new StreamResult(baos);\n\t\t\tt.transform(embeddedXMLType.getContent(), result);\n\t\t\tcontent = baos.toByteArray();\n\t\t} catch (TransformerException te) {\n\t\t\tthrow new BusinessException(ErroreCore.ERRORE_DI_SISTEMA.getErrore(\"Errore di trasformazionew della fattura elettronica\" + (te != null ? \" (\" + te.getMessage() + \")\" : \"\")));\n\t\t}\n\t\treturn content;\n\t}", "public String decryptMsg(String encryptedMsg) {\n encryptedMsg.toLowerCase(Locale.ROOT);\n\n //replace the things with the properties\n encryptedMsg = encryptedMsg.replace(\"1\", \"a\");\n encryptedMsg = encryptedMsg.replace(\"3\", \"e\");\n encryptedMsg = encryptedMsg.replace(\"5\", \"i\");\n encryptedMsg = encryptedMsg.replace(\"7\", \"o\");\n encryptedMsg = encryptedMsg.replace(\"9\", \"u\");\n\n //return the right value\n return encryptedMsg;\n }", "private void sendCastMessage(Video video)\n {\n Message msg = mHandler.obtainMessage();\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"video\",video);\n msg.setData(bundle);\n msg.what = 2;\n mHandler.sendMessage(msg);\n }", "com.google.protobuf.ByteString getWasmByteCode();", "public com.google.protobuf.ByteString getMsgData() {\n return msgData_;\n }", "public static PaymentManifestParserParseWebAppManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "public static PaymentManifestParserParseWebAppManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "public static EmbedBuilder createEmbeded (String title, Color color) {\n return new EmbedBuilder().setTitle(title).setColor(color);\n }", "public com.google.protobuf.ByteString getMessage() {\n return message_;\n }", "com.google.protobuf.ByteString getResponseMessage();", "public build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder getValOrBuilder() {\n if (valBuilder_ != null) {\n return valBuilder_.getMessageOrBuilder();\n } else {\n return val_ == null ?\n build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance() : val_;\n }\n }", "public static String decryptMsg(byte[] cipherText, SecretKey secret) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidParameterSpecException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, UnsupportedEncodingException {\r\n Cipher cipher = null;\r\n cipher = Cipher.getInstance(\"AES/ECB/PKCS5Padding\");\r\n cipher.init(Cipher.DECRYPT_MODE, secret);\r\n String decryptString = new String(cipher.doFinal(cipherText), \"UTF-8\");\r\n return decryptString;\r\n }", "com.polytech.spik.protocol.SpikMessages.ConversationOrBuilder getConversationOrBuilder();", "private common.messages.KVMessage receiveMessage() throws IOException {\r\n\t\t\r\n\t\tint index = 0;\r\n\t\tbyte[] msgBytes = null, tmp = null;\r\n\t\tbyte[] bufferBytes = new byte[BUFFER_SIZE];\r\n\t\t\r\n\t\t/* read first char from stream */\r\n\t\tbyte read = (byte) input.read();\t\r\n\t\tboolean reading = true;\r\n\t\t\r\n//\t\tlogger.info(\"First Char: \" + read);\r\n//\t\tCheck if stream is closed (read returns -1)\r\n//\t\tif (read == -1){\r\n//\t\t\tTextMessage msg = new TextMessage(\"\");\r\n//\t\t\treturn msg;\r\n//\t\t}\r\n\r\n\t\twhile(/*read != 13 && */ read != 10 && read !=-1 && reading) {/* CR, LF, error */\r\n\t\t\t/* if buffer filled, copy to msg array */\r\n\t\t\tif(index == BUFFER_SIZE) {\r\n\t\t\t\tif(msgBytes == null){\r\n\t\t\t\t\ttmp = new byte[BUFFER_SIZE];\r\n\t\t\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, 0, BUFFER_SIZE);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttmp = new byte[msgBytes.length + BUFFER_SIZE];\r\n\t\t\t\t\tSystem.arraycopy(msgBytes, 0, tmp, 0, msgBytes.length);\r\n\t\t\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, msgBytes.length,\r\n\t\t\t\t\t\t\tBUFFER_SIZE);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmsgBytes = tmp;\r\n\t\t\t\tbufferBytes = new byte[BUFFER_SIZE];\r\n\t\t\t\tindex = 0;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t/* only read valid characters, i.e. letters and constants */\r\n\t\t\tbufferBytes[index] = read;\r\n\t\t\tindex++;\r\n\t\t\t\r\n\t\t\t/* stop reading is DROP_SIZE is reached */\r\n\t\t\tif(msgBytes != null && msgBytes.length + index >= DROP_SIZE) {\r\n\t\t\t\treading = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* read next char from stream */\r\n\t\t\tread = (byte) input.read();\r\n\t\t}\r\n\t\t\r\n\t\tif(msgBytes == null){\r\n\t\t\ttmp = new byte[index];\r\n\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, 0, index);\r\n\t\t} else {\r\n\t\t\ttmp = new byte[msgBytes.length + index];\r\n\t\t\tSystem.arraycopy(msgBytes, 0, tmp, 0, msgBytes.length);\r\n\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, msgBytes.length, index);\r\n\t\t}\r\n\t\t\r\n\t\tmsgBytes = tmp;\r\n\t\t\r\n\t\t/* build final String */\r\n\t\tcommon.messages.KVMessage msg = new common.messages.KVAdminMessage(msgBytes);\r\n\t\tlogger.debug(\"RECEIVE \\t<\" \r\n\t\t\t\t+ clientSocket.getInetAddress().getHostAddress() + \":\" \r\n\t\t\t\t+ clientSocket.getPort() + \">: '\" \r\n\t\t\t\t+ msg.getMsg().trim() + \"'\");\r\n\t\treturn msg;\r\n }", "public godot.wire.Wire.Value getData() {\n if (dataBuilder_ == null) {\n return data_ == null ? godot.wire.Wire.Value.getDefaultInstance() : data_;\n } else {\n return dataBuilder_.getMessage();\n }\n }" ]
[ "0.63171667", "0.60632", "0.5191684", "0.5145183", "0.51306015", "0.5031315", "0.5017535", "0.5017316", "0.4930079", "0.4865731", "0.47815353", "0.4773506", "0.47592348", "0.4703183", "0.4703183", "0.46972594", "0.4641128", "0.46396032", "0.46099135", "0.45916235", "0.4571046", "0.455997", "0.4543004", "0.4538522", "0.4538483", "0.45296022", "0.4524826", "0.4518738", "0.45091817", "0.44924697", "0.44685915", "0.44642434", "0.44625026", "0.44536576", "0.44426095", "0.44333836", "0.44181603", "0.43918845", "0.43918845", "0.43918845", "0.43918845", "0.43918845", "0.43918845", "0.43918845", "0.43918845", "0.43918845", "0.43900785", "0.43898284", "0.43555018", "0.43498337", "0.4328942", "0.4319948", "0.43133697", "0.43133697", "0.43133697", "0.43133697", "0.43133697", "0.43133697", "0.43133697", "0.43133697", "0.43133697", "0.43133697", "0.42993915", "0.4298763", "0.42951065", "0.42948443", "0.42916477", "0.4281932", "0.42724568", "0.42699423", "0.4269012", "0.42674258", "0.42619377", "0.42548513", "0.42541414", "0.42468992", "0.42467737", "0.42467737", "0.4239929", "0.4238357", "0.4238055", "0.4229395", "0.4225588", "0.42253128", "0.42248237", "0.42214727", "0.42177486", "0.4208664", "0.4201096", "0.42010456", "0.41999653", "0.41890195", "0.41882223", "0.4175997", "0.41747543", "0.4166098", "0.41620246", "0.4153588", "0.4141053", "0.4139543", "0.41366106" ]
0.0
-1
Panels that use the EntityOpsPanel of buttons must provide a controller that implements this interface.
public interface EntityOpsController { /** @return a string representing the type of entity for use in messages. */ public String getEntityName(); /** Called when user presses the 'Commit' button. */ public void commitEntity(); /** Called when user presses the 'Close' button. */ public void closeEntity(); /** Called when user presses the 'Help' button. */ public void help(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IController {\n\n /**\n * add action command to the Button.\n */\n void configureButtonListener();\n\n /**\n * add mouse command to the editView.\n */\n void configureMouseListener();\n\n}", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "public interface SupportsBigDataViewerToolBarButton\n{\n int addToolBarButtons(int verticalPosition);\n}", "protected JBPanel getButtonsPanel() {\n return buttonsPanel;\n }", "private void createOperationsPanel() {\n\t\toperationsPanel = new JPanel(new GridLayout(5, 1));\n\n\t\tspanningTreeButton = new JButton(\"Árvore de cobertura\");\n\t\tspanningTreeButton.addActionListener(new SpanningTreeHandler());\n\n\t\tblockingStatesButton = new JButton(\"Estados bloqueantes\");\n\t\tblockingStatesButton.addActionListener(new BlockingStatesHandler());\n\n\t\tnonLimitedStatesButton = new JButton(\"Estados não-limitados\");\n\t\tnonLimitedStatesButton.addActionListener(new NonLimitedStatesHandler());\n\n\t\tnetworkConservationButton = new JButton(\"Conservação da rede\");\n\t\tnetworkConservationButton.addActionListener(new NetworkConservationHandler());\n\n\t\treachabelStateButton = new JButton(\"Estado alcançável\");\n\t\treachabelStateButton.addActionListener(new ReachableStateHandler());\n\n\t\toperationsPanel.add(spanningTreeButton);\n\t\toperationsPanel.add(blockingStatesButton);\n\t\toperationsPanel.add(nonLimitedStatesButton);\n\t\toperationsPanel.add(networkConservationButton);\n\t\toperationsPanel.add(reachabelStateButton);\n\n\t\tthis.add(operationsPanel, BorderLayout.WEST);\n\t}", "public interface EButton extends EButtonBase {\r\n}", "@Override\n public void newPanelModel() {\n\n }", "@Override\n public void newPanelModel() {\n\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "private JComponent getButtonPanel() {\n JPanel buttonPanel = new JPanel();\n // Open\n OpenAction openAction = new OpenAction();\n buttonPanel.add(new JButton(openAction));\n // Save\n SaveAction saveAction = new SaveAction();\n buttonPanel.add(new JButton(saveAction));\n // Save as\n SaveAsAction saveAsAction = new SaveAsAction(saveAction);\n buttonPanel.add(new JButton(saveAsAction));\n return buttonPanel;\n }", "public SpritePreviewPanelController()\r\n\t{\r\n\t\tsetSpritePreviewPanelHolder(new SpritePreviewPanelHolder());\r\n\t\tspritePreviewPanelHolder.getAddSpriteButton().addActionListener(this);\t\t\r\n\r\n\t\t//\tgetSpritePanel().getComboBox().addActionListener(this);\r\n\t}", "public interface RemoveCommandController extends Controller {\n void removeCompany(int id);\n\n void removeDischarge(int id);\n\n void removeClassifiedPollutant(int id);\n\n void removeDischargedPollutant(int id);\n}", "public JButtonsPanel() {\r\n setBorder(BorderFactory.createEtchedBorder(Color.GREEN, new Color(148, 145, 140)));\r\n\r\n jOpen.setText(BTN_OPEN);\r\n jOpen.setToolTipText(MSG_OPEN);\r\n jOpen.setBounds(new Rectangle(BTN_LEFT, BTN_VSPACE, BTN_WIDTH, BTN_HEIGHT));\r\n add(jOpen);\r\n\r\n jCheckHealth.setText(BTN_CHECK_HEALTH);\r\n jCheckHealth.setToolTipText(MSG_CHECK_HEALTH);\r\n jCheckHealth.setBounds(new Rectangle(BTN_LEFT, (int) (jOpen.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jCheckHealth);\r\n\r\n jClose.setText(BTN_CLOSE);\r\n jClose.setToolTipText(MSG_CLOSE);\r\n jClose.setBounds(new Rectangle(BTN_LEFT, (int) (jCheckHealth.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClose);\r\n\r\n jClaim.setText(BTN_CLAIM);\r\n jClaim.setToolTipText(MSG_CLAIM);\r\n jClaim.setBounds(new Rectangle(BTN_LEFT, (int) (jClose.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClaim);\r\n\r\n jRelease.setText(BTN_RELEASE);\r\n jRelease.setToolTipText(MSG_RELEASE);\r\n jRelease.setBounds(new Rectangle(BTN_LEFT, (int) (jClaim.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jRelease);\r\n\r\n jDeviceEnable.setText(BTN_DEVICE_ENABLE);\r\n jDeviceEnable.setToolTipText(MSG_DEVICE_ENABLE);\r\n jDeviceEnable.setBounds(new Rectangle(BTN_LEFT, (int) (jRelease.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceEnable);\r\n\r\n jDeviceDisable.setText(BTN_DEVICE_DISABLE);\r\n jDeviceDisable.setToolTipText(MSG_DEVICE_DISABLE);\r\n jDeviceDisable.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceEnable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceDisable);\r\n\r\n jClearData.setText(BTN_CLEAR_DATA);\r\n jClearData.setToolTipText(MSG_CLEAR_DATA);\r\n jClearData.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceDisable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClearData);\r\n\r\n jBeginEnrollCapture.setText(BTN_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setToolTipText(MSG_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jClearData.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginEnrollCapture);\r\n\r\n jEndCapture.setText(BTN_END_CAPTURE);\r\n jEndCapture.setToolTipText(MSG_END_CAPTURE);\r\n jEndCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginEnrollCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jEndCapture);\r\n\r\n jBeginVerifyCapture.setText(BTN_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setToolTipText(MSG_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jEndCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginVerifyCapture);\r\n\r\n jIdentifyMatch.setText(BTN_IDENTIFY_MATCH);\r\n jIdentifyMatch.setToolTipText(MSG_IDENTIFY_MATCH);\r\n jIdentifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginVerifyCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentifyMatch);\r\n\r\n jVerifyMatch.setText(BTN_VERIFY_MATCH);\r\n jVerifyMatch.setToolTipText(MSG_VERIFY_MATCH);\r\n jVerifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerifyMatch);\r\n\r\n jIdentify.setText(BTN_IDENTIFY);\r\n jIdentify.setToolTipText(MSG_IDENTIFY);\r\n jIdentify.setBounds(new Rectangle(BTN_LEFT, (int) (jVerifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentify);\r\n\r\n jVerify.setText(BTN_VERIFY);\r\n jVerify.setToolTipText(MSG_VERIFY);\r\n jVerify.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentify.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerify);\r\n }", "private Controller getPartitionPanel() {\n return controller;\n }", "private JPanel createControllerButtonsPanel() {\n\t\tJPanel buttonPanel = new JPanel();\n\t\tJButton addSib = new JButton(\"Add Sibling\");\n\t\tJButton addChld = new JButton(\"Add Child\");\n\t\tJButton remNode = new JButton(\"Remove\");\n\t\tJButton remRoot = new JButton(\"Remove Root\");\n\t\tbuttonPanel.add(addSib);\n\t\tbuttonPanel.add(addChld);\n\t\tbuttonPanel.add(remNode);\n\n\t\t// adding a sibling action!\n\t\taddSib.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t// Identify the node that has been selected\n\t\t\t\tDefaultMutableTreeNode selected = (DefaultMutableTreeNode) tree\n\t\t\t\t\t\t.getLastSelectedPathComponent();\n\t\t\t\tif (selected == null) return;\n\n\t\t\t\t// get the parent of the selected node\n\t\t\t\tDefaultMutableTreeNode parent = (DefaultMutableTreeNode) selected\n\t\t\t\t\t\t.getParent();\n\t\t\t\tif (parent == null)\n\t\t\t\t\treturn;\n\n\t\t\t\t// add a new node after the selected node as a child of the\n\t\t\t\t// selected node's parent\n\t\t\t\t// We add item to the MODEL! The view automatically updates.\n\t\t\t\ttModel.insertNodeInto(new DefaultMutableTreeNode(\"New Node\"),\n\t\t\t\t\t\tparent, parent.getIndex(selected) + 1);\n\n\t\t\t\t/*\n\t\t\t\t * Note: additions are done to the model, not the view. See\n\t\t\t\t * below for the treeModelListener methods.\n\t\t\t\t */\n\t\t\t}\n\t\t});\n\n\t\t// similar method for adding a child node of a selected node: note the\n\t\t// usage the getChildCount()\n\t\taddChld.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t// Identify the node that has been selected\n\t\t\t\tDefaultMutableTreeNode selected = (DefaultMutableTreeNode) tree\n\t\t\t\t\t\t.getLastSelectedPathComponent();\n\t\t\t\tif (selected == null)\n\t\t\t\t\treturn;\n\n\t\t\t\t// add a new node as the last child of the selected node\n\t\t\t\ttModel.insertNodeInto(new DefaultMutableTreeNode(\"New Node\"),\n\t\t\t\t\t\tselected, selected.getChildCount());\n\n\t\t\t\t// Lets also expand the tree to show the new node\n\t\t\t\t// Find the array of nodes that make up the path from the root\n\t\t\t\t// to the newly added node\n\t\t\t\tTreeNode[] nodes = tModel.getPathToRoot(selected\n\t\t\t\t\t\t.getChildAt(selected.getChildCount() - 1));\n\n\t\t\t\t// Create a tree path with these nodes\n\t\t\t\tTreePath path = new TreePath(nodes);\n\t\t\t\t// Make the entire path visible and make the scroller to move to\n\t\t\t\t// the last path component\n\t\t\t\ttree.scrollPathToVisible(path);\n\t\t\t}\n\t\t});\n\n\t\t// remove some selected node: you cannot remove the root node\n\t\tremNode.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t// Identify the node that has been selected\n\t\t\t\tDefaultMutableTreeNode selected = (DefaultMutableTreeNode) tree\n\t\t\t\t\t\t.getLastSelectedPathComponent();\n\t\t\t\tif (selected == null) return;\n\t\t\t\t\n\t\t\t\t// Identify the parent of the selected node; we are not allowing\n\t\t\t\t// the root node to be removed\n\t\t\t\tif (selected.getParent() == null)\n\t\t\t\t\treturn;\n\n\t\t\t\t// User the models remove method to remove the selected node\n\t\t\t\ttModel.removeNodeFromParent(selected);\n\t\t\t}\n\t\t});\n\n\t\treturn buttonPanel;\n\n\t}", "public ControladorPanel() { }", "private Component getButtonPanel() {\r\n\r\n logger.entering(this.getClass().getName(), \"getButtonPanel\");\r\n\r\n JButton btnOK = new JButton(\"OK\");\r\n\r\n btnOK.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n updateMsdtFilterMap();\r\n\t\t\t\tclosePanel();\r\n }\r\n });\r\n\r\n JButton btnApply = new JButton(\"Apply\");\r\n\r\n btnApply.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n updateMsdtFilterMap();\r\n }\r\n });\r\n\r\n JButton btnCancel = new JButton(\"Cancel\");\r\n\r\n btnCancel.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n\t\t\t\tclosePanel();\r\n }\r\n });\r\n\r\n JButton btnClearAll = new JButton(\"Clear all\");\r\n\r\n btnClearAll.addActionListener(new ActionListener() {\r\n\r\n @SuppressWarnings( {\"synthetic-access\", \"unqualified-field-access\"})\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n for (JCheckBox chkMsdt : chkMsdtSelection.values()) {\r\n chkMsdt.setSelected(false);\r\n }\r\n\r\n }\r\n });\r\n\r\n JButton btnRestore = new JButton(\"Restore\");\r\n\r\n btnRestore.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n refreshCheckBoxes();\r\n\r\n }\r\n\r\n });\r\n\r\n JPanel pnlButtons = new JPanel();\r\n\r\n pnlButtons.add(btnRestore);\r\n\r\n pnlButtons.add(btnClearAll);\r\n\r\n pnlButtons.add(btnCancel);\r\n\r\n pnlButtons.add(btnApply);\r\n\r\n\t\tpnlButtons.add(btnOK);\r\n\r\n logger.exiting(this.getClass().getName(), \"getButtonPanel\", pnlButtons);\r\n\r\n return pnlButtons;\r\n }", "private JPanel createPanelEditService() {\n\t\t// Fabriken holen\n\t\tGridBagConstraintsFactory gbcf = GridBagConstraintsFactory.getInstance();\n\t\tWidgetFactory wf = WidgetFactory.getInstance();\n\t\t// Dirty-Listener erzeugen\n\t\tDocumentListener documentListener = new DocumentListener() {\n\n\t\t\t@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t\tsetDirty(true);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\t\tsetDirty(true);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\n\t\t\t\tsetDirty(true);\n\t\t\t}\n\t\t};\n\t\tChangeListener changeListener = new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent event) {\n\t\t\t\tif (((AbstractButton) event.getSource()).getModel().isPressed()) {\n\t\t\t\t\tsetDirty(true);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Widgets erzeugen\n\t\tJPanel panel = wf.getPanel(\"PanelEditService\");\n\t\tJLabel labelServiceAbbreviation = wf.getLabel(\"LabelServiceAbbreviation\");\n\t\tlabelServiceAbbreviation.setForeground(COLOR_INFLUENCE);\n\t\tserviceAbbreviation = wf.getTextField(\"FieldServiceAbbreviation\");\n\t\tserviceAbbreviation.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonClearService = wf.getButton(\"ButtonClearService\");\n\t\tbuttonClearService.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedClearService(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelAdditionalInfo = wf.getLabel(\"LabelAdditionalInfo\");\n\t\tlabelAdditionalInfo.setForeground(COLOR_INFLUENCE);\n\t\tadditionalInfo = wf.getTextField(\"FieldAdditionalInfo\");\n\t\tadditionalInfo.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonRemoveService = wf.getButton(\"ButtonRemoveService\");\n\t\tbuttonRemoveService.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedRemoveService(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelLoginUrl = wf.getLabel(\"LabelLoginUrl\");\n\t\tloginUrl = wf.getTextField(\"FieldLoginUrl\");\n\t\tloginUrl.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonOpenUrl = wf.getButton(\"ButtonOpenUrl\");\n\t\tbuttonOpenUrl.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedOpenUrlInBrowser(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelLoginInfo = wf.getLabel(\"LabelLoginInfo\");\n\t\tloginInfo = wf.getTextField(\"FieldLoginInfo\");\n\t\tloginInfo.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonCopyLoginInfo = wf.getButton(\"ButtonCopyLoginInfo\");\n\t\tbuttonCopyLoginInfo.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedCopyLoginInfo(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelAdditionalLoginInfo = wf.getLabel(\"LabelAdditionalLoginInfo\");\n\t\tadditionalLoginInfo = wf.getTextArea(\"FieldAdditionalLoginInfo\");\n\t\tadditionalLoginInfo.getDocument().addDocumentListener(documentListener);\n\t\tJScrollPane additionalLoginInfoScrollPane = wf.getScrollPane(\"ScrollPaneAdditionalLoginInfo\",\n\t\t\t\tadditionalLoginInfo);\n\t\tadditionalLoginInfoScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tJButton buttonOpenHelp = wf.getButton(\"ButtonOpenHelp\");\n\t\tbuttonOpenHelp.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedOpenHelpInBrowser(me);\n\t\t\t}\n\t\t});\n\t\tJButton buttonOpenAbout = wf.getButton(\"ButtonOpenAbout\");\n\t\tbuttonOpenAbout.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedOpenAbout(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelCount = wf.getLabel(\"LabelCount\");\n\t\tlabelCount.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabelCount.setForeground(COLOR_INFLUENCE);\n\t\tJLabel labelStartIndex = wf.getLabel(\"LabelStartIndex\");\n\t\tlabelStartIndex.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabelStartIndex.setForeground(COLOR_INFLUENCE);\n\t\tJLabel labelEndIndex = wf.getLabel(\"LabelEndIndex\");\n\t\tlabelEndIndex.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabelEndIndex.setForeground(COLOR_INFLUENCE);\n\t\tuseSmallLetters = wf.getCheckBox(\"CheckBoxSmallLetters\");\n\t\tuseSmallLetters.addChangeListener(changeListener);\n\t\tuseSmallLetters.setForeground(COLOR_INFLUENCE);\n\t\tsmallLettersCount = wf.getIntegerField(\"FieldSmallLettersCount\");\n\t\tsmallLettersCount.getDocument().addDocumentListener(documentListener);\n\t\tsmallLettersStartIndex = wf.getIntegerField(\"FieldSmallLettersStartIndex\");\n\t\tsmallLettersStartIndex.getDocument().addDocumentListener(documentListener);\n\t\tsmallLettersEndIndex = wf.getIntegerField(\"FieldSmallLettersEndIndex\");\n\t\tsmallLettersEndIndex.getDocument().addDocumentListener(documentListener);\n\t\tuseCapitalLetters = wf.getCheckBox(\"CheckBoxCapitalLetters\");\n\t\tuseCapitalLetters.addChangeListener(changeListener);\n\t\tuseCapitalLetters.setForeground(COLOR_INFLUENCE);\n\t\tcapitalLettersCount = wf.getIntegerField(\"FieldCapitalLettersCount\");\n\t\tcapitalLettersCount.getDocument().addDocumentListener(documentListener);\n\t\tcapitalLettersStartIndex = wf.getIntegerField(\"FieldCapitalLettersStartIndex\");\n\t\tcapitalLettersStartIndex.getDocument().addDocumentListener(documentListener);\n\t\tcapitalLettersEndIndex = wf.getIntegerField(\"FieldCapitalLettersEndIndex\");\n\t\tcapitalLettersEndIndex.getDocument().addDocumentListener(documentListener);\n\t\tuseDigits = wf.getCheckBox(\"CheckBoxDigits\");\n\t\tuseDigits.addChangeListener(changeListener);\n\t\tuseDigits.setForeground(COLOR_INFLUENCE);\n\t\tdigitsCount = wf.getIntegerField(\"FieldDigitsCount\");\n\t\tdigitsCount.getDocument().addDocumentListener(documentListener);\n\t\tdigitsStartIndex = wf.getIntegerField(\"FieldDigitsStartIndex\");\n\t\tdigitsStartIndex.getDocument().addDocumentListener(documentListener);\n\t\tdigitsEndIndex = wf.getIntegerField(\"FieldDigitsEndIndex\");\n\t\tdigitsEndIndex.getDocument().addDocumentListener(documentListener);\n\t\tuseSpecialCharacters = wf.getCheckBox(\"CheckBoxSpecialCharacters\");\n\t\tuseSpecialCharacters.addChangeListener(changeListener);\n\t\tuseSpecialCharacters.setForeground(COLOR_INFLUENCE);\n\t\tspecialCharacters = wf.getTextField(\"FieldSpecialCharacters\");\n\t\tspecialCharacters.setForeground(COLOR_INFLUENCE);\n\t\tspecialCharactersCount = wf.getIntegerField(\"FieldSpecialCharactersCount\");\n\t\tspecialCharactersCount.getDocument().addDocumentListener(documentListener);\n\t\tspecialCharactersStartIndex = wf.getIntegerField(\"FieldSpecialCharactersStartIndex\");\n\t\tspecialCharactersStartIndex.getDocument().addDocumentListener(documentListener);\n\t\tspecialCharactersEndIndex = wf.getIntegerField(\"FieldSpecialCharactersEndIndex\");\n\t\tspecialCharactersEndIndex.getDocument().addDocumentListener(documentListener);\n\t\tlabelUseOldPassphrase = wf.getLabel(\"LabelUseOldPassphrase\");\n\t\tlabelUseOldPassphrase.setForeground(COLOR_WARNING);\n\t\tJLabel labelTotalCharacterCount = wf.getLabel(\"LabelTotalCharacterCount\");\n\t\tlabelTotalCharacterCount.setForeground(COLOR_INFLUENCE);\n\t\ttotalCharacterCount = wf.getIntegerField(\"FieldTotalCharacterCount\");\n\t\ttotalCharacterCount.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonCopyPassword = wf.getButton(\"ButtonCopyPassword\");\n\t\tbuttonCopyPassword.setForeground(COLOR_INFLUENCE);\n\t\tbuttonCopyPassword.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedCopyPassword(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelPassword = wf.getLabel(\"LabelPassword\");\n\t\tpassword = wf.getPasswordField(\"FieldPassword\");\n\t\tpassword.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonDisplayPassword = wf.getButton(\"ButtonDisplayPassword\");\n\t\tbuttonDisplayPassword.setForeground(COLOR_INFLUENCE);\n\t\tbuttonDisplayPassword.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedDisplayPassword(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelPasswordRepeated = wf.getLabel(\"LabelPasswordRepeated\");\n\t\tpasswordRepeated = wf.getPasswordField(\"FieldPasswordRepeated\");\n\t\tpasswordRepeated.getDocument().addDocumentListener(documentListener);\n\t\tmakePasswordVisible = wf.getCheckBox(\"CheckBoxMakePasswordVisible\");\n\t\tmakePasswordVisible.addItemListener(new ItemListener() {\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent arg0) {\n\t\t\t\tif (makePasswordVisible.isSelected()) {\n\t\t\t\t\tpassword.setEchoChar((char) 0);\n\t\t\t\t\tpasswordRepeated.setEchoChar((char) 0);\n\t\t\t\t} else {\n\t\t\t\t\tpassword.setEchoChar('*');\n\t\t\t\t\tpasswordRepeated.setEchoChar('*');\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tbuttonStoreService = wf.getButton(\"ButtonStoreService\");\n\t\tbuttonStoreService.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedStoreService(me);\n\t\t\t}\n\t\t});\n\t\tbuttonUseNewPassphrase = wf.getButton(\"ButtonUseNewPassphrase\");\n\t\tbuttonUseNewPassphrase.setForeground(COLOR_INFLUENCE);\n\t\tbuttonUseNewPassphrase.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedUseNewPassphrase(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelLastUpdate = wf.getLabel(\"LabelLastUpdate\");\n\t\tlastUpdate = wf.getLabel(\"LabelLastUpdate\");\n\t\t// Widgets zufügen, erste Zeile\n\t\tint row = 0;\n\t\tpanel.add(labelServiceAbbreviation, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(serviceAbbreviation, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonClearService, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelAdditionalInfo, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(additionalInfo, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonRemoveService, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelLoginUrl, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(loginUrl, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonOpenUrl, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelLoginInfo, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(loginInfo, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonCopyLoginInfo, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelAdditionalLoginInfo, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(additionalLoginInfoScrollPane,\n\t\t\t\tgbcf.getTableConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelCount, gbcf.getLabelConstraints(2, row));\n\t\tpanel.add(labelStartIndex, gbcf.getLabelConstraints(GridBagConstraints.RELATIVE, row));\n\t\tpanel.add(labelEndIndex, gbcf.getLabelConstraints(GridBagConstraints.RELATIVE, row));\n\t\t// Leerzeile zufügen, nächste Zeile\n\t\trow++;\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(useSmallLetters, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(smallLettersCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(smallLettersStartIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(smallLettersEndIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(buttonOpenHelp, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(useCapitalLetters, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(capitalLettersCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(capitalLettersStartIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(capitalLettersEndIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(buttonOpenAbout, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(useDigits, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(digitsCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(digitsStartIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(digitsEndIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(useSpecialCharacters, gbcf.getLabelConstraints(0, row, 1, 1));\n\t\tpanel.add(specialCharacters, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(specialCharactersCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(specialCharactersStartIndex,\n\t\t\t\tgbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(specialCharactersEndIndex,\n\t\t\t\tgbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(labelUseOldPassphrase, gbcf.getLabelConstraints(6, row, 1, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelTotalCharacterCount, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(totalCharacterCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(buttonCopyPassword, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelPassword, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(password, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonDisplayPassword, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelPasswordRepeated, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(passwordRepeated, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonStoreService, gbcf.getLabelConstraints(6, row));\n\t\tpanel.add(buttonUseNewPassphrase, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(makePasswordVisible, gbcf.getFieldConstraints(2, row, 4, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tGridBagConstraints emptyLineConstraints = gbcf.getLabelConstraints(0, row, 2, 1);\n\t\temptyLineConstraints.weighty = 0.1;\n\t\tpanel.add(new JLabel(\"\"), emptyLineConstraints);\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelLastUpdate, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(lastUpdate, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\t// Panel zurückgeben\n\t\treturn panel;\n\t}", "public static JEntityEditor createEntityEditorPane(Entity entity, SecurityLevel securityLevel, Container addTo,\n\t\t\tWorldView view, boolean transparent) {\n\n\n\t\t// If there's already an open editor for this entity, don't allow\n\t\t// another dialog.\n\t\tJEntityEditor existing = openEditors.get(entity);\n\t\tif (existing != null) {\n\t\t\tif (existing.dialog != null)\n\t\t\t\texisting.dialog.requestFocus();\n\t\t\telse\n\t\t\t\texisting.requestFocus();\n\t\t\treturn existing;\n\t\t}\n\n\t\t// Create the editor.\n\t\tJEntityEditor jee = new JEntityEditor(entity, securityLevel, transparent);\n\n\t\tif (jee.getTabCount() == 0) // Security allow any editing?\n\t\t\treturn jee;\n\n\n\t\t// The dialog will handle commit/cancel. It packages up and pushes its\n\t\t// own Undoable.\n\t\tActionListener dialogController = new DialogController(addTo, jee, entity, view);\n\n\t\tJPanel pnlButtons = new JPanel(new HorizontalLayout());\n\t\tif (transparent)\n\t\t\tpnlButtons.setOpaque(false);\n\t\tpnlButtons.add(UIBuilder.buildButton().image(\"icons/ok.png\").toolTip(\"Approve changes and close the dialog.\")\n\t\t\t\t.action(\"COMMIT\", dialogController).create());\n\t\tpnlButtons.add(UIBuilder.buildButton().image(\"icons/close.png\").toolTip(\"Cancel changes and close the dialog.\")\n\t\t\t\t.action(\"CANCEL\", dialogController).create());\n\t\tpnlButtons.add(UIBuilder.buildButton().image(\"icons/zoom.png\").toolTip(\"Set view to center.\")\n\t\t\t\t.action(\"CENTER_VIEW\", dialogController).border(new EmptyBorder(10, 10, 10, 10)).create());\n\t\tpnlButtons.add(UIBuilder.buildButton().image(\"icons/question.png\").toolTip(\"Open help regarding this entity.\")\n\t\t\t\t.action(\"HELP\", dialogController).create());\n\n\n\t\taddTo.setLayout(new BorderLayout());\n\t\taddTo.add(jee, BorderLayout.CENTER);\n\t\taddTo.add(pnlButtons, BorderLayout.SOUTH);\n\n\n\t\treturn jee;\n\t}", "public Component getPanelControl() {\n\t\tTableSorter sorterOperaciones = new TableSorter(modeloOperaciones);\n\t\tJTable tablaOperaciones = new JTable(sorterOperaciones);\n\t\tsorterOperaciones.setTableHeader(tablaOperaciones.getTableHeader());\n\t\tJScrollPane panelScrollDerecha = new JScrollPane(tablaOperaciones);\n\t\tpanelScrollDerecha.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tpanelDerecha = new FakeInternalFrame(\"Log de Operaciones\", panelScrollDerecha);\n\n\t\tTableSorter sorterPrecios = new TableSorter(modeloPrecios);\n\t\tJTable tablaPrecios = new JTable(sorterPrecios);\n\t\tsorterPrecios.setTableHeader(tablaPrecios.getTableHeader());\n\t\ttablaPrecios.getColumn(tablaPrecios.getColumnName(1)).setCellRenderer(modeloPrecios.getRenderer());\n\n\t\tJScrollPane panelScrollIzqAbajo = new JScrollPane(tablaPrecios);\n\t\tpanelScrollIzqAbajo.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tpanelIzqAbajo = new FakeInternalFrame(\"Precios en bolsa\", panelScrollIzqAbajo);\n\n\t\t//panelSecundario = new JSplitPane(JSplitPane.VERTICAL_SPLIT, panelIzqAbajo, panelIzqArriba);\n\t\tpanelPrincipal = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panelIzqAbajo, panelDerecha);\n\n\t\tpanelPrincipal.setDividerLocation(300);\n\t\t//panelSecundario.setDividerLocation(300);\n\n\t\tpanelIzqAbajo.setPreferredSize(new Dimension(250, 300));\n\t\tpanelDerecha.setPreferredSize(new Dimension(550, 600));\n\n\t\treturn panelPrincipal;\n\t}", "public AgentOperationsPanel(\r\n\t\t\tRMSViewContainer vc,\r\n\t\t\tDataEngineService dataEngineService,\r\n\t\t\tDataViewBoardRepositoryService boardRepository,\r\n\t\t\tDataViewRepositoryService viewRepository,\r\n\t\t\tDashboardRepositoryService dashboardRepository,\r\n\t\t\tProviderInstanceRepositoryService providerInstanceRepository,\r\n\t\t\tProviderRepositoryService providerRepository,\r\n\t\t\tParserRepositoryService parserRepository,\r\n\t\t\tMonitoringSessionService sessionService,\r\n\t\t\tSessionModel sessionData,\r\n\t\t\tSessionTreeExplorer treeExplorer,\r\n\t\t\tQueryRealizerImpl queryRealizer,\r\n\t\t\tDataViewSelectorPanel.Callback qcb,\r\n\t\t\tDashboardSelectorPanel.Callback qgcb) {\r\n\t\tsuper(new BorderLayout());\r\n\t\tthis.panelConfig = new AgentConfigurationPanelStandAlone(\r\n\t\t\t\tvc,\r\n\t\t\t\tsessionService, sessionData, true);\r\n\t\tthis.panelViews = new DataViewSelectorPanel(\r\n\t\t\tvc, treeExplorer, boardRepository, viewRepository, dataEngineService, sessionData, queryRealizer, qcb);\r\n\t\tthis.panelDashboards = new DashboardSelectorPanel(\r\n\t\t\t\tvc, dashboardRepository, viewRepository, sessionData, queryRealizer, treeExplorer, qgcb);\r\n\t\tthis.panelProviderInstances = new ProviderInstancePanel(\r\n\t\t\t\tvc, providerInstanceRepository, providerRepository, parserRepository, sessionData);\r\n\t\tadd(getJTabbedPane(), BorderLayout.CENTER);\r\n\t}", "public interface IPersistenceController {\n\n}", "@Override\n\tpublic void setController(ControladorVista[] controllers) {\n\t\tboton.addActionListener((ActionListener) controllers[0]);\n\t}", "public ButtonPanel(NoughtsCrossesModel model) {\n\t\tsuper();\n\n\t\tthis.model = model;\n\n\t\tthis.reset = new JButton(\"New Game\");\n\t\treset.setEnabled(false);\n\t\treset.addActionListener(e -> model.newGame());\n\n\t\tthis.exit = new JButton(\"Exit\");\n\t\texit.setEnabled(false);\n\t\texit.addActionListener(e -> {\n\t\t\tSwingUtilities.getWindowAncestor(this).dispose();\n\t\t\tmodel.exitGame();\n\t\t});\n\n\t\tadd(reset);\n\t\tadd(exit);\n\t}", "private void setButtonPanelComponents(){\n\t\tJPanel buttonPane = new JPanel();\n\t\tbuttonPane.setPreferredSize(new Dimension(-1,32));\n\t\tbuttonPane.setBackground(Constant.DIALOG_BOX_COLOR_BG);\n\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\n\t\tsaveButton = Utilities.getInstance().initializeNewButton(\n\t\t\t-1, -1, -1, -1,\n\t\t\tImages.getInstance().saveBtnDialogImg,\n\t\t\tImages.getInstance().saveBtnDialogImgHover\n\t\t);\n\t\tbuttonPane.add(saveButton);\n\t\n\n\t\n\t}", "private void initPanelButtons() {\r\n\t\tthis.panelButtons = new JPanel(new GridBagLayout());\r\n\t\tthis.panelButtons.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 5));\r\n\t\tthis.panelButtons.setOpaque(false);\r\n\t\tGridBagConstraints gbc = new GridBagConstraints();\r\n\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 0;\r\n\t\tgbc.gridwidth = 1;\r\n\t\tgbc.gridheight = 1;\r\n\t\tgbc.weightx = 1;\r\n\t\tgbc.weighty = 1;\r\n\t\tthis.returnButton.setBackground(ConstantView.COLOR_BUTTON_LOGIN);\r\n\t\tthis.returnButton.setForeground(Color.WHITE);\r\n\t\tthis.returnButton.setFocusable(false);\r\n\t\tthis.returnButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tthis.returnButton.setFont(ConstantView.FONT_PRINCIPAL_LABELS);\r\n\t\tthis.panelButtons.add(returnButton, gbc);\r\n\r\n\t\tgbc.gridx = 7;\r\n\t\tthis.okButton.setBackground(ConstantView.COLOR_BUTTON_LOGIN);\r\n\t\tthis.okButton.setForeground(Color.WHITE);\r\n\t\tthis.okButton.setFocusable(false);\r\n\t\tthis.okButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tthis.okButton.setFont(ConstantView.FONT_PRINCIPAL_LABELS);\r\n\t\tthis.okButton.addActionListener(ControlClient.getInstance());\r\n\t\tthis.okButton.setActionCommand(ClientCommands.OK_SIGN_IN.toString());\r\n\t\tthis.panelButtons.add(okButton, gbc);\r\n\t}", "public interface PetriNetViewComponent {\n /**\n * Delete the petri net view component\n */\n void delete();\n\n /**\n * Each subclass should know how to add itself to a PetriNetTab\n * @param container to add itself to\n */\n void addToContainer(Container container);\n\n\n}", "@Override\r\n\tpublic void createContents(Panel mainPanel) {\n\t\t\r\n\t\t\r\nsetTitle(\"¿Dónde invierto?\");\r\n\t\t\r\n\t\tmainPanel.setLayout(new VerticalLayout());\r\n\t\tnew Label(mainPanel).setText(\"Menú Principal\").setFontSize(15).setForeground(Color.RED);\r\n\t\tnew Label(mainPanel).setText(\"Seleccionar la opción deseada\").setFontSize(13).setForeground(Color.BLACK);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Carga Correcta de las Empresas!\").setFontSize(9).setForeground(Color.GREEN).bindVisibleToProperty(\"bloq\");\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Mostrar el valor de una cuenta predefinida\");\r\n\t\tButton bot_MostrarCuentas= new Button(mainPanel);\r\n\t\t\r\n\t\tbot_MostrarCuentas.setCaption(\"Mostrar valores de la Empresa\");//.bindEnabledToProperty(\"bloq\");\r\n\t\tbot_MostrarCuentas.onClick(() -> new mostrarValoresDeEmpresas(this,new mostrarValoresDeEmpresasViewModel()).open());\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Crear un nuevo indicador\");\r\n\t\tnew Button(mainPanel).setCaption(\"Escribir formula\").onClick(() -> new crearIndicadores(this,new crearIndicadoresViewModel()).open());\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Menu de Metodologias\");\r\n\t\t\r\n\t\tPanel parte1 =new Panel(mainPanel);\r\n\t\tparte1.setLayout(new ColumnLayout(2));\t\r\n\t\tButton bot_evaluarEmpresas= new Button(parte1);\r\n\t\tbot_evaluarEmpresas.setCaption(\"Evaluar una empresa\");\r\n\t\tbot_evaluarEmpresas.setWidth(125);\r\n\t\tbot_evaluarEmpresas.onClick(() -> new evaluarEmpresas(this, new evaluarEmpresasViewModel()).open());\r\n\t\r\n\t\tButton bot_configurarMetodologia= new Button(parte1);\r\n\t\tbot_configurarMetodologia.setCaption(\"Crear Metodologia\");\r\n\t\tbot_configurarMetodologia.setWidth(125);\r\n\t\tbot_configurarMetodologia.onClick(() ->crearNuevaMetodologia());\t\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t/*\tnew Label(mainPanel).setText(\"Importar/Exportar archivos\");\r\n\t\t\r\n\t\tButton bot_impExpArchivos = new Button(mainPanel);\r\n\t\tbot_impExpArchivos.setCaption(\"Importar Archivos o exportar\");\r\n\t\tbot_impExpArchivos.setWidth(125);\r\n\t\tbot_impExpArchivos.onClick(() -> new importarExportarArchivos(this, new importarExportarArchivosViewModel()).open());\r\n\t\t\r\n\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\"Desde aca abajo vuela todo y va a otra ventana \\\\|/\").setFontSize(8);\r\n\t */\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Cargar un archivo de empresas\");\r\n\t\tPanel panel2 = new Panel(mainPanel);\r\n\t\tpanel2.setLayout(new ColumnLayout(2));\r\n\t\t\r\n\t\tFileSelector fileSelector = new FileSelector(panel2);\r\n\t\tfileSelector.extensions(\"*.txt\");\r\n\t\tfileSelector.setCaption(\"Seleccionar archivo\");\r\n\t\tfileSelector.setWidth(125);\r\n\t\tfileSelector.bindValueToProperty(\"rutaArchivo\");\r\n\t\tfileSelector.onClick(() -> this.cargarArchivo());\r\n\t\t\r\n\t\tnew TextBox(panel2).setWidth(125).bindValueToProperty(\"rutaArchivo\");\r\n\t\t\r\n\t\t\r\n\t\tnew Button(mainPanel).setCaption(\"Procesar archivo\").onClick(() -> this.cargarArchivo());\r\n\r\n\t\tIOs.leerIndicadoresDeArchivo(\"archivoIndicadores.txt\");\r\n\t\t\r\n\t\tRepositorioDeEmpresas.traerEmpresasDeLaDB();\r\n\t}", "public interface IController{\n // Currently no benefit to having any controller specific methods. This interface is available\n // for further extension of different controller implementations. Our current implementation\n // is for the edit view. If future controllers are needed they will implement this interface.\n\n}", "protected abstract JToolBar getNorthToolbar();", "public ChangeSpecialityPanel() {\n initComponents();\n ctrlQuery=(QueryController) ControllerFactory.getInstance().getController(ControllerFactory.ControllerTypes.QUERY);\n ctrlSpeciality=(SpecialityController) ControllerFactory.getInstance().getController(ControllerFactory.ControllerTypes.SPECIALITY);\n \n loadSpecialityID();\n }", "public EditPanel(ControllerClient controllerClient) {\n\n\t\tthis.controller = controllerClient;\n\t\tthis.panel = this;\n\n\t\tthis.setLayout(new GridBagLayout());\n\n\t\tenterSearchMode(\"\");\n\n\t}", "abstract void commandButtonExecute(MigrationEditorOperation editor);", "IAnjaroController getController();", "public interface Controller {\n\n /**\n * Updates all model components of this controller\n */\n void update();\n\n /**\n * Updates all view components of this controller\n *\n * @param brush related to component views\n */\n void render(Graphics2D brush);\n\n}", "public interface ProjectPropertiesView extends View<ProjectPropertiesView.ActionDelegate> {\n \n public interface ActionDelegate {\n /** Performs any actions appropriate in response to the user having pressed the Add button. */\n void onAddClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Edit button. */\n void onEditClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Delete button. */\n void onDeleteClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Save button. */\n void onSaveClicked();\n\n /** Performs any actions appropriate in response to the user having pressed the Cancel button. */\n void onCancelClicked();\n \n /** Returns selected property. */\n void selectedProperty(Property property);\n }\n \n /**\n * Sets whether Edit button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setEditButtonEnabled(boolean isEnabled);\n \n /**\n * Sets whether Delete button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setDeleteButtonEnabled(boolean isEnabled);\n \n /**\n * Sets whether Save button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setSaveButtonEnabled(boolean isEnabled);\n\n /**\n * Sets properties.\n *\n * @param projects\n */\n void setProperties(Array<Property> properties);\n \n /** Close dialog. */\n void close();\n\n /** Show dialog. */\n void showDialog();\n}", "private JPanel makeControlPanel() {\n\n final JPanel panel = new JPanel(new FlowLayout(3));\n final JButton refreshButton = new JButton(new ImageIcon(iconMaker(\"refreshREAL.png\")));\n refreshButton.setFocusPainted(false);\n refreshButton.addActionListener(this::refreshButtonClicked);\n refreshButton.setToolTipText(\"Refresh Item Price(s)\");\n //checkButton.setPreferredSize(new Dimension(25,25));\n JButton viewLink = new JButton(new ImageIcon(iconMaker(\"visitSite.png\")));\n viewLink.setToolTipText(\"Visit Item Website\");\n JButton deleteItem = new JButton(new ImageIcon(iconMaker(\"delete.png\")));\n deleteItem.setToolTipText(\"Remove Item\");\n JButton addItem = buttonMaker(\"additem.png\");\n addItem.setToolTipText(\"Add Item to Price Watcher\");\n JButton editItem = buttonMaker(\"edititem.png\");\n editItem.setToolTipText(\"Edit Item Details\");\n\n\n viewLink.setFocusPainted(false);\n deleteItem.setFocusPainted(false);\n\n viewLink.addActionListener(this::viewPageClicked);\n panel.add(refreshButton);\n panel.add(viewLink);\n panel.add(deleteItem);\n panel.add(addItem);\n panel.add(editItem);\n\n return panel;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString [] params = {H_Panel.getName(),H_Panel.getDesc()};\n\t\t\t\tservDisp.add(params);\t\t\n\t\t\t\t_MGR.setHeader(H_Panel.getName());\n\t\t\t\t_MGR.setDescr(H_Panel.getDesc());\n\t\t\t\t_MGR.loadTagsToProject();\n\t\t\t\t//_MGR.updateTagsInProjectPanels();\n\t\t\t\tSP_PManager_Widget.this.setVisible(false);\n\t\t\t}", "public EntityOverviewPanel(SectionNodeView sectionNodeView, final Entity entity, final EntityHelper entityHelper) {\n super(sectionNodeView);\n this.entityHelper = entityHelper;\n synchronizer = ((EjbJarMultiViewDataObject) sectionNodeView.getDataObject()).getModelSynchronizer();\n\n JTextField ejbNameTextField = getEjbNameTextField();\n JTextField persistenceTypeTextField = getPersistenceTypeTextField();\n JTextField abstractSchemaNameTextField = getAbstractSchemaNameTextField();\n JLabel primaryKeyFieldLabel = getPrimaryKeyFieldLabel();\n final JComboBox primaryKeyFieldComboBox = getPrimaryKeyFieldComboBox();\n final JComboBox primaryKeyClassComboBox = getPrimaryKeyClassComboBox();\n final JTextField primaryKeyClassTextField = getPrimaryKeyClassTextField();\n\n addRefreshable(new ItemEditorHelper(ejbNameTextField, new TextItemEditorModel(synchronizer, false) {\n protected String getValue() {\n return entity.getEjbName();\n }\n\n protected void setValue(String value) {\n entity.setEjbName(value);\n }\n }));\n ejbNameTextField.setEditable(false);\n\n persistenceTypeTextField.setEditable(false);\n this.entity = entity;\n String persistenceType = this.entity.getPersistenceType();\n boolean isCmp = Entity.PERSISTENCE_TYPE_CONTAINER.equals(persistenceType);\n persistenceTypeTextField.setText(persistenceType + ((isCmp ? \" (CMP)\" : \" (BMP)\"))); //NOI18N\n\n addRefreshable(new ItemEditorHelper(abstractSchemaNameTextField, new TextItemEditorModel(synchronizer, true) {\n protected String getValue() {\n return entity.getAbstractSchemaName();\n }\n\n protected void setValue(String value) {\n entity.setAbstractSchemaName(value);\n }\n }));\n abstractSchemaNameTextField.setEditable(false);\n\n if (isCmp) {\n primaryKeyFieldLabel.setVisible(true);\n primaryKeyFieldComboBox.setVisible(true);\n primaryKeyClassComboBox.setVisible(true);\n primaryKeyClassTextField.setVisible(false);\n\n initPrimaryKeyFieldComboBox();\n final ItemComboBoxHelper primaryKeyComboBoxHelper = new ItemComboBoxHelper(synchronizer,\n primaryKeyFieldComboBox) {\n public String getItemValue() {\n String value = entity.getPrimkeyField();\n return value == null ? PK_COMPOUND : value;\n }\n\n public void setItemValue(String value) {\n try {\n entityHelper.setPrimkeyField(value == PK_COMPOUND ? null : value);\n } catch (ClassNotFoundException e) {\n Utils.notifyError(e);\n }\n }\n };\n addRefreshable(primaryKeyComboBoxHelper);\n primaryKeyFieldComboBox.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n int selectedIndex = primaryKeyFieldComboBox.getSelectedIndex();\n if (selectedIndex == 0) {\n primaryKeyClassComboBox.setEnabled(true);\n primaryKeyClassComboBox.setSelectedItem(entity.getPrimKeyClass());\n } else {\n primaryKeyClassComboBox.setEnabled(false);\n }\n primaryKeyClassComboBox.setSelectedItem(entity.getPrimKeyClass());\n }\n });\n primaryKeyClassComboBox.setEnabled(primaryKeyFieldComboBox.getSelectedIndex() == 0);\n\n primaryKeyClassComboBox.addItem(\"boolean\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"byte\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"char\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"double\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"float\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"int\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"long\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.Boolean\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.Byte\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.Character\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.Double\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.Float\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.Integer\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.Long\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.Object\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.lang.String\"); //NOI18N\n primaryKeyClassComboBox.addItem(\"java.math.BigDecimal\");//NOI18N\n\n addRefreshable(new ItemComboBoxHelper(synchronizer, primaryKeyClassComboBox) {\n public String getItemValue() {\n return entity.getPrimKeyClass();\n }\n\n public void setItemValue(String value) {\n if (!Utils.isValidPackageName(value)) {\n primaryKeyComboBoxHelper.refresh();\n }\n }\n });\n\n } else {\n primaryKeyFieldLabel.setVisible(false);\n primaryKeyFieldComboBox.setVisible(false);\n primaryKeyClassComboBox.setVisible(false);\n primaryKeyClassTextField.setVisible(true);\n\n addRefreshable(new ItemEditorHelper(primaryKeyClassTextField, new TextItemEditorModel(synchronizer, false) {\n protected String getValue() {\n return entity.getPrimKeyClass();\n }\n\n protected void setValue(String value) {\n entity.setPrimKeyClass(value);\n }\n }));\n }\n addRefreshable(new ItemCheckBoxHelper(synchronizer, getReentrantCheckBox()) {\n public boolean getItemValue() {\n return entity.isReentrant();\n }\n\n public void setItemValue(boolean value) {\n entity.setReentrant(value);\n }\n });\n }", "public ButtonView getButtonView() {\r\n return buttonPanel;\r\n }", "protected void createButtons(Composite parent) {\n\t\tcomRoot = new Composite(parent, SWT.BORDER);\n\t\tcomRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));\n\t\tcomRoot.setLayout(new GridLayout(2, false));\n\n\t\ttbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT);\n\t\ttbTools.setLayout(new GridLayout());\n\t\ttbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));\n\n\t\tfinal ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnSettings.setText(Messages.btnAdvancedSettings);\n\t\tbtnSettings.setToolTipText(Messages.tipAdvancedSettings);\n\t\tbtnSettings.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tPerformanceSettingsDialog dialog = new PerformanceSettingsDialog(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig());\n\t\t\t\tdialog.open();\n\t\t\t}\n\t\t});\n\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tbtnPreviewDDL = new ToolItem(tbTools, SWT.CHECK);\n\t\tbtnPreviewDDL.setSelection(false);\n\t\tbtnPreviewDDL.setText(Messages.btnPreviewDDL);\n\t\tbtnPreviewDDL.setToolTipText(Messages.tipPreviewDDL);\n\t\tbtnPreviewDDL.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tboolean flag = btnPreviewDDL.getSelection();\n\t\t\t\tswitchText(flag);\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\n\t\tfinal ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnExportScript.setText(Messages.btnExportScript);\n\t\tbtnExportScript.setToolTipText(Messages.tipSaveScript);\n\t\tbtnExportScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\texportScriptToFile();\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnUpdateScript.setText(Messages.btnUpdateScript);\n\t\tbtnUpdateScript.setToolTipText(Messages.tipUpdateScript);\n\t\tbtnUpdateScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tgetMigrationWizard().saveMigrationScript(false, isSaveSchema());\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t\tbtnUpdateScript\n\t\t\t\t.setEnabled(getMigrationWizard().getMigrationScript() != null);\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnNewScript.setText(Messages.btnCreateNewScript);\n\t\tbtnNewScript.setToolTipText(Messages.tipCreateNewScript);\n\t\tbtnNewScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tString name = EditScriptDialog.getMigrationScriptName(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig()\n\t\t\t\t\t\t\t\t.getName());\n\t\t\t\tif (StringUtils.isBlank(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetMigrationWizard().getMigrationConfig().setName(name);\n\t\t\t\tgetMigrationWizard().saveMigrationScript(true, isSaveSchema());\n\t\t\t\tbtnUpdateScript.setEnabled(getMigrationWizard()\n\t\t\t\t\t\t.getMigrationScript() != null);\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t}", "private Component getPanelOpcionesInferior() {\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tlistaUsuarios = new JList(new DefaultListModel());\n//\t\tlistaUsuarios.setCellRenderer(modeloUsuarios.getListCellRenderer());\n\t\tJScrollPane panelScrollIzqArriba = new JScrollPane(listaUsuarios);\n\n\t\tpanelScrollIzqArriba.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tFakeInternalFrame panelIzqArriba = new FakeInternalFrame(\"Usuarios\", panelScrollIzqArriba);\n\n\t\tpanel.add(panelIzqArriba);\n\n\t\tpanelIzqArriba.setPreferredSize(new Dimension(250, 300));\n\t\tJButton botonIniciarParar = new JButton(\"Iniciar Simulacion\");\n\t\tbotonIniciarParar.addActionListener(\n\t\t\t\t\tnew ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\tJButton src = (JButton) e.getSource();\n\t\t\t\t\t\t\tiniciarPausar_actionPerformed(src);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\tbotonFinalizarSimulacion = new JButton(\"Finalizar Simulacion\");\n\t\tbotonFinalizarSimulacion.addActionListener(\n\t\t\t\t\tnew ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tbotonFinalizar_actionPerformed();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\tJPanel panelBotones = new JPanel();\n\t\tpanelBotones.add(botonIniciarParar);\n\t\tpanelBotones.add(botonFinalizarSimulacion);\n\t\tpanel.add(panelBotones, BorderLayout.SOUTH);\n\n\t\treturn panel;\n\t}", "@Override\n\tpublic void setButtonAction() {\n\t}", "public interface IPeriodController extends IDisplayablePlugin {\r\n\t/**\r\n\t * This method is called by the platform whenever it needs DTOs for a\r\n\t * specific period.\r\n\t * \r\n\t * <p>\r\n\t * The <code>dto</code> parameter contains a reference to the DTO for this\r\n\t * period. It's up to the controller to remove any existing child DTOs.\r\n\t * \r\n\t * <p>\r\n\t * The <code>panel</code> parameter contains a reference to a {@link JPanel}\r\n\t * where the view can put its components.\r\n\t * \r\n\t * Modifications to the DTO can (and most probably will) occur even after\r\n\t * the function has returned.\r\n\t * \r\n\t * @param period\r\n\t * The DTO of the period.\r\n\t * @return Component where the view has put its components, or null if not\r\n\t * necessary\r\n\t */\r\n\tComponent editDTO(DTOPeriod period);\r\n\r\n\t/**\r\n\t * Defines the priority. This is used to sort the controllers before\r\n\t * displaying them at the GUI. The controller with the highest priority will\r\n\t * be displayed first.\r\n\t * \r\n\t * @return The priority of the controller.\r\n\t */\r\n\tint getGuiPriority();\r\n\r\n\t/**\r\n\t * Returns a list with the keys of all values which can be determined\r\n\t * stochastically.\r\n\t * \r\n\t * @return a list with the keys of all values which can be determined\r\n\t * stochastically.\r\n\t */\r\n\tList<DTOKeyPair> getStochasticKeys();\r\n}", "public interface MenuTabButtonFactory {\n public void createTabButtonForMenuPanel(SplitControlPanel controlPanel, SplitPanel splitPanel, MenuPanel menuPanel, int orientation, MenuTabButtonAlternateAction alternateAction);\n}", "public IButton getEditButton() {\n return controls.getEditButton();\n }", "public interface ComponentWithButtons {\n\n AbstractButton addButton(String name, int width, ActionListener action);\n AbstractButton addButton(String name, ActionListener action);\n AbstractButton addButton(String name);\n AbstractButton addButton(String name, int width);\n AbstractButton addBreak(int width);\n AbstractButton addBreak();\n void removeButton(AbstractButton button);\n void removeButton(String buttonName);\n void removeAllButtons();\n}", "@Override\r\n\tprotected void onBoEdit() throws Exception {\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tsuper.onBoEdit();\r\n\t}", "public void setController(Controller controller);", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "protected void createSaveButtons() {\n Composite buttonComp = new Composite(shell, SWT.NONE);\n buttonComp.setLayout(new GridLayout(2, true));\n buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,\n false));\n\n int buttonWidth = 80;\n GridData gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button saveBtn = new Button(buttonComp, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n handleSaveAction();\n }\n });\n\n gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button cancelBtn = new Button(buttonComp, SWT.PUSH);\n cancelBtn.setText(\"Cancel\");\n cancelBtn.setLayoutData(gd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(null);\n close();\n }\n });\n }", "public interface View extends LogicController {\n\n}", "public abstract void executeBagButton();", "public interface Controller {\n Action action();\n\n void noAction();\n\n void revive();\n\n void setEnemyShip(EnemyShip e);\n\n boolean theAnyButton();\n\n boolean isClicked();\n\n Point clickLocation();\n\n boolean shot();\n\n boolean p();\n\n}", "public ButtonPanel(CalculatorController appController)\n\t{\n\t\tsuper();\n\t\tthis.appController = appController;\n\t\tnumberLayout = new GridLayout(5, 4, 10, 10);\n\t\tzero = new CalculatorButton(appController, \"0\", Color.GRAY);\n\t\tone = new CalculatorButton(appController, \"1\", Color.GRAY);\n\t\ttwo = new CalculatorButton(appController, \"2\", Color.GRAY);\n\t\tthree = new CalculatorButton(appController, \"3\", Color.GRAY);\n\t\tfour = new CalculatorButton(appController, \"4\", Color.GRAY);\n\t\tfive = new CalculatorButton(appController, \"5\", Color.GRAY);\n\t\tsix = new CalculatorButton(appController, \"6\", Color.GRAY);\n\t\tseven = new CalculatorButton(appController, \"7\", Color.GRAY);\n\t\teight = new CalculatorButton(appController, \"8\", Color.GRAY);\n\t\tnine = new CalculatorButton(appController, \"9\", Color.GRAY);\n\t\tpoint = new CalculatorButton(appController, \".\", Color.GRAY);\n\t\tmultiply = new CalculatorButton(appController, \"x\", Color.BLUE);\n\t\tdivide = new CalculatorButton(appController, \"/\", Color.BLUE);\n\t\tadd = new CalculatorButton(appController, \"+\", Color.BLUE);\n\t\tsubtract = new CalculatorButton(appController, \"-\", Color.BLUE);\n\t\tans = new CalculatorButton(appController, \"Ans\", new Color(0, 170, 100));\n\t\tequals = new JButton();\n\t\tclear = new JButton();\n\t\tbackspace = new JButton();\n\t\tnegative = new JButton();\n\t\tsetupPanel();\n\t\tsetupButtons();\n\t\tsetupListeners();\n\t}", "public interface IReportController extends IController, IBrowsable {\n\n void actionReadReports();\n\n void actionNewReport();\n\n void actionNewReport(RunningTeam runningTeam);\n\n void actionCreateReport(Report report);\n\n void actionShowReport(Report report);\n\n void actionUpdateReport(Report report);\n\n void actionRemoveReport(Report report);\n\n void actionSaveLeadEvaluation(LeadEvaluation leadEvaluation);\n\n void actionSaveIndividualEvaluations(List<IndividualEvaluation> individualEvaluations);\n}", "public LoginPanel(Controller theController) {\n\t\tsuper();\n\t\tmyController = theController;\n\t\tusername = new JTextField();\n\t\tpassword = new JPasswordField();\n\t\tsubmit = new JButton(\"Login\");\n\t\tcreate();\n\t}", "public interface Button {\n void display();\n}", "@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}", "private void createActionsPanel() {\n DefaultActionGroup group = new DefaultActionGroup();\n group.add(new CloseAction());\n ActionManager actionManager = ActionManager.getInstance();\n JComponent actionsToolbar = actionManager\n .createActionToolbar(ActionPlaces.CODE_INSPECTION, group, false)\n .getComponent();\n JPanel actionsPanel = new JPanel(new BorderLayout());\n actionsPanel.add(actionsToolbar, BorderLayout.WEST);\n add(actionsPanel, BorderLayout.WEST);\n }", "private JPanel getButtonPanel() {\n if (buttonPanel == null) {\n GridLayout gridLayout = new GridLayout();\n gridLayout.setRows(1);\n gridLayout.setColumns(2);\n gridLayout.setHgap(4);\n buttonPanel = new JPanel();\n buttonPanel.setLayout(gridLayout);\n buttonPanel.add(getOkButton(), null);\n buttonPanel.add(getCancelButton(), null);\n }\n return buttonPanel;\n }", "public interface IFenLeiPresenter {\n //显示左侧列表\n void showLeftToView(IFenLeiModel iFenLeiModel, IFenLeiView iFenLeiView);\n //显示右侧列表\n void showRightToView(IFenLeiModel iFenLeiModel, IFenLeiView iFenLeiView);\n\n}", "public IController getController();", "public abstract String getManipulatorButtonLabel();", "public EditPanel getEditPanel() { return ep; }", "public void toolbarImplementacionIsmael() {\n\t\t// ToolBar Fuente\n\t\tbtnFuente = new JButton(\"Fuente\");\n\t\tbtnFuente.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnFuente.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnFuente);\n\n\t\tbtnSeleccionarTodo = new JButton(\"Selec.Todo\");\n\t\tbtnSeleccionarTodo.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnSeleccionarTodo.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnSeleccionarTodo);\n\n\t\tbtnHora = new JButton(\"Hora\");\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnHora.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnHora);\n\t}", "private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}", "private JPanel makeButtonPanel()\n {\n // Create the containing panel\n JPanel buttonPanel = new JPanel();\n buttonPanel.setBackground(_backColor);\n\n // Create the CANCEL button\n JButton cancelButton = new JButton(\"CANCEL\");\n // Clear editFlag and data, then return back to main action panel if Cancel is pressed\n // TODO Remove this lambda expressionl; it produces a Javadoc error\n cancelButton.addActionListener((a) -> _hdCiv.back());\n\n // Create the SUBMIT button\n JButton submitButton = new JButton(\"SUBMIT\");\n\n // Display error message if received from submit button, or new Hero if OK\n submitButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event)\n {\n // Call the Civ to validate the attributes. If no errors, Hero\n // is created and displayed\n EnumMap<PersonKeys, String> input = submit();\n if ((input != null) && (input.size() > 0)) {\n // Create the new Hero and display it\n Hero hero = _nhCiv.createHero(input);\n _hdCiv.displayHero(hero, true); // initial Hero needs true\n }\n }\n });\n\n // Create a little space between buttons\n JLabel space = new JLabel(SPACER);\n // Add the two buttons to the panel\n buttonPanel.add(submitButton);\n buttonPanel.add(space);\n buttonPanel.add(cancelButton);\n return buttonPanel;\n }", "public ButtonHolderActionBarView(SpeelveldController speelveldController)\n throws RemoteException {\n this.speelveldController = speelveldController;\n this.speler = speelveldController.getSpeler();\n this.karakter = this.speler.getKarakter();\n\n container = new StackPane();\n gebruikEigenschap = new Button();\n exitbutton = new Button();\n spelregels = new Button();\n opslaanknop = new Button();\n goudbutton = new Button();\n bouwbutton = new Button();\n eindebeurtbutton = new Button();\n\n this.speler.addObserver(this);\n this.karakter.addObserver(this);\n\n this.buttonGrid.setHgap(10);\n this.buttonGrid.setVgap(10);\n this.buttonGrid.setPadding(new Insets(22.5, 0, 22.5, 0));\n\n initButton(gebruikEigenschap, \"Eigenschap\", \"button-primary\", 1, 1, 160f, 55f);\n initButton(bouwbutton, \"Bouwen\", \"button-primary\", 2, 1, 160f, 55f);\n initButton(goudbutton, \"Bonusgoud\", \"button-primary\", 1, 2, 160f, 55f);\n initButton(eindebeurtbutton, \"Einde beurt\", \"button-danger\", 2, 2, 160f, 55f);\n initButton(opslaanknop, \"Opslaan\", \"button-success\", 1, 3, 160f, 55f);\n initButton(exitbutton, \"Afsluiten\", \"button-danger\", 2, 3, 160f, 55f);\n\n opslaanknop.setOnAction(event1 -> this.speelveldController.cmdOpslaan());\n goudbutton.setOnAction(event -> this.speelveldController.cmdBonusGoud());\n bouwbutton.setOnAction(event -> this.speelveldController.cmdBouwGebouw());\n eindebeurtbutton.setOnAction(event -> this.speelveldController.cmdEindeBeurt());\n gebruikEigenschap.setOnAction(event -> this.speelveldController.cmdGebruikEigenschap());\n exitbutton.setOnAction(event -> System.exit(0));\n\n isKarakterBonusable();\n\n buttonholder = new Rectangle(0, 0, 350, 250);\n buttonholder.setFill(Color.rgb(57, 57, 57));\n this.container.getChildren().addAll(buttonholder, buttonGrid);\n }", "protected abstract void showEditedEntity(Entity e);", "public AgentOperationsPanel(\r\n\t\t\tRMSViewContainer vc,\r\n\t\t\tDataEngineService dataEngineService,\r\n\t\t\tDataViewBoardRepositoryService boardRepository,\r\n\t\t\tDataViewRepositoryService viewsRepository,\r\n\t\t\tDashboardRepositoryService dashboardRepository,\r\n\t\t\tSessionModel sessionData,\r\n\t\t\tSessionTreeExplorer treeExplorer,\r\n\t\t\tDataViewSelectorPanel.Callback qcb,\r\n\t\t\tDashboardSelectorPanel.Callback qgcb) {\r\n\t\tsuper(new BorderLayout());\r\n\t\tthis.logReplayMode = true;\r\n\t\tthis.panelConfig = new AgentConfigurationPanelStandAlone(\r\n\t\t\t\tvc,\r\n\t\t\t\tsessionData, true);\r\n\t\tthis.panelViews = new DataViewSelectorPanel(\r\n\t\t\tvc, treeExplorer, boardRepository, viewsRepository, dataEngineService, sessionData, qcb);\r\n\t\tthis.panelDashboards = new DashboardSelectorPanel(\r\n\t\t\t\tvc, dashboardRepository, viewsRepository, sessionData, treeExplorer, qgcb);\r\n\t\tadd(getJTabbedPane(), BorderLayout.CENTER);\r\n\t}", "public DiscountManagePanel() throws ServiceNotFoundException {\r\n \tdiscountService=(DiscountService)ServiceManager.getService(\"Discount\");\r\n initComponents();\r\n initDatas();\r\n setActionListener();\r\n }", "public Controller getController();", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "private JPanel adminLoginButtons() {\n JPanel loginButtons = new JPanel();\n JButton login = new JButton(\"Login\");\n login.addActionListener(new adminLoginListener());\n loginButtons.add(login);\n loginButtons.add(Box.createHorizontalStrut(15));\n JButton cancel = new JButton(\"Cancel\");\n cancel.addActionListener(new adminLoginListener());\n loginButtons.add(cancel);\n return loginButtons;\n }", "private void addButtonsToButtonPanel() {\n // The button to change the login accounts password\n changePasswordButton = new JButton(\"Change Password\");\n changePasswordButton.setPreferredSize(new Dimension(150, 45));\n changePasswordButton.addActionListener(this);\n changePasswordButton.setToolTipText(\"<html> Click this button to change the login accounts <b> password</b>. </html>\");\n changePasswordButton.setIcon(new ImageIcon(\"images/icons/bullet_edit.png\"));\n \n // Adds the change login accounts password to the button panel\n buttonPanel.add(changePasswordButton);\n \n \n // The button to change the login accounts security question and answer\n changeSecurityQ = new JButton(\"Change Security Question & Answer\");\n changeSecurityQ.setPreferredSize(new Dimension(250, 45));\n changeSecurityQ.addActionListener(this);\n changeSecurityQ.setToolTipText(\"<html> Click this button to change the login accounts <b> security question & answer</b>. </html>\");\n changeSecurityQ.setIcon(new ImageIcon(\"images/icons/bullet_edit.png\"));\n \n // Adds the change login accounts security question and answer to the button panel\n buttonPanel.add(changeSecurityQ);\n \n \n // The button to change the login accounts security question and answer\n cancelButton = new JButton(\"Cancel editting\");\n cancelButton.setPreferredSize(new Dimension(150, 45));\n cancelButton.addActionListener(this);\n cancelButton.setToolTipText(\"<html> Click this button to <b> cancel</b> the editing of the login account. </html>\");\n cancelButton.setIcon(new ImageIcon(\"images/icons/cancel.png\"));\n \n // Adds the change login accounts security question and answer to the button panel\n buttonPanel.add(cancelButton);\n \n // Updates the UI of the button panel\n buttonPanel.updateUI();\n }", "public interface MySandBoxDisplay extends SandBoxDisplay {\n\n public ListGrid getPendingGrid();\n\n public ToolStripButton getRevertSelectionButton();\n\n public void setRevertSelectionButton(ToolStripButton revertSelectionButton);\n\n public ToolStrip getPendingToolBar();\n\n public void setPendingToolBar(ToolStrip pendingToolBar);\n\n public ToolStripButton getReclaimSelectionButton();\n\n public void setReclaimSelectionButton(ToolStripButton reclaimSelectionButton);\n\n public ToolStripButton getReclaimAllButton();\n\n public void setReclaimAllButton(ToolStripButton reclaimAllButton);\n\n public ToolStripButton getReleaseSelectionButton();\n\n public void setReleaseSelectionButton(ToolStripButton releaseSelectionButton);\n\n public ToolStripButton getReleaseAllButton();\n\n public void setReleaseAllButton(ToolStripButton releaseAllButton);\n\n public ToolStripButton getPendingRefreshButton();\n\n public void setPendingRefreshButton(ToolStripButton pendingRefreshButton);\n\n public ToolStripButton getPendingPreviewButton();\n\n public void setPendingPreviewButton(ToolStripButton pendingPreviewButton);\n \n}", "public DataSourcesPanelController(DataSourcesPanel view)\n {\n this.view = view;\n \n view.on(ViewEvent.COPY_NODE_NAME_TO_CLIPBOARD_MENU_ITEM_CLICK, new _CopyNodeNameToClipboardMenuItemClickHandler());\n view.on(ViewEvent.OPEN_LINKED_DOCUMENT_MENU_ITEM_CLICK, new _OpenLinkedDocumentMenuItemClickHandler());\n view.on(ViewEvent.CREATE_INTOOLS_EXPORT_MANUALLY_MENU_ITEM_CLICK, new _CreateIntoolsExportMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DOCUMENT_MANUALLY_MENU_ITEM_CLICK, new _CreateDocumentMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DCS_VARIABLE_TABLE_MANUALLY_MENU_ITEM_CLICK, new _CreateDcsVariableTableMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_ESD_VARIABLE_TABLE_MANUALLY_MENU_ITEM_CLICK, new _CreateEsdVariableTableMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_FGS_VARIABLE_TABLE_MANUALLY_MENU_ITEM_CLICK, new _CreateFgsVariableTableMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DATA_SOURCE_FROM_MS_EXCEL_LIST_MENU_ITEM_CLICK, new _CreateDataSourceFromMsExcelSheetMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DATA_SOURCE_FROM_YOKOGAWA_DCS_BACKUP_MENU_ITEM_CLICK, new _CreateDataSourceYokogawaDcsBackupMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DATA_SOURCE_FROM_HONEYWELL_DCS_EXPORT_MENU_ITEM_CLICK, new _CreateDcsVariableTableFromHoneywellDcsExportMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DATA_SOURCE_FROM_HONEYWELL_SCADA_EXPORT_MENU_ITEM_CLICK, new _CreateDcsVariableTableFromHoneywellScadaDatabaseMenuItemClickHandler());\n view.on(ViewEvent.EDIT_SELECTED_SOURCE_DATA_MENU_ITEM_CLICK, new _EditSelectedDataSourceMenuItemClickHandler());\n view.on(ViewEvent.REMOVE_SELECTED_SOURCE_DATA_MENU_ITEM_CLICK, new _RemoveSelectedDataSourceMenuItemClickHandler());\n }", "@FXML\n private void openCompanyController(ActionEvent event) {\n CompanyController companyController = new CompanyController();\n companyController.openCompanyController(event);\n companyAddToggle.setSelected(false);\n\n }", "public interface AccessControlListModalWidget extends IsWidget {\n /**\n * Show the sharing dialog.\n *\n * @param changeCallback\n */\n public void showSharing(Callback changeCallback);\n\n /**\n * The widget must be configured before showing the dialog.\n *\n * @param entity\n * @param canChangePermission\n */\n public void configure(Entity entity, boolean canChangePermission);\n}", "public interface NewSerieView {\r\n\r\n public void saveSerie();\r\n\r\n void browseSerieImage();\r\n}", "public interface CreateEntityView<E extends SerializableEntity> extends EntityView {\r\n\r\n\t/**\r\n\t * Make save handler enabled\r\n\t * \r\n\t * @param enabled\r\n\t */\r\n\tvoid setSaveHandlerEnabled(boolean enabled);\r\n\t\r\n}", "public interface IPanels {\n\n /**\n * Instantiate each component in the class\n */\n void instantiateComponents();\n\n /**\n * Add the components to the Panel in the correct order\n */\n void addComponents();\n}", "public interface IScreenPlugin {\n\t\n\tpublic void setActionContext(GuiPanel screen);\n\t\n}", "public GameButtonsPanel getButtonPanel() {\n\t\treturn buttonsPanel;\n\t}", "public interface ExpensesRecordView extends BaseView {\n void showData(List entityList);\n}", "public interface IController {\n}", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }", "public interface ButtonArticleService extends Service<ButtonArticle> {\n\n}", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "private void iniciarComponentesInterface() {\n\t\tPanelchildren panelchildren = new Panelchildren();\r\n\t\tpanelchildren.setParent(this);\r\n\t\tlistBox = new Listbox();\r\n\t\tlistBox.setHeight(\"300px\");\r\n\t\tlistBox.setCheckmark(true);\r\n\t\tlistBox.setMultiple(false);\r\n\t\tlistBox.setParent(panelchildren);\r\n\t\tListhead listHead = new Listhead();\r\n\t\tlistHead.setParent(listBox);\r\n\t\tListheader listHeader = new Listheader(\"Projeto\");\r\n\t\tlistHeader.setParent(listHead);\r\n\r\n\t\t// Botões OK e Cancelar\r\n\t\tDiv div = new Div();\r\n\t\tdiv.setParent(panelchildren);\r\n\t\tdiv.setStyle(\"float: right;\");\r\n\t\tSeparator separator = new Separator();\r\n\t\tseparator.setParent(div);\r\n\t\tButton botaoOK = new Button(\"OK\");\r\n\t\tbotaoOK.addEventListener(\"onClick\", new EventListenerOK());\r\n\t\tbotaoOK.setWidth(\"100px\");\r\n\t\tbotaoOK.setStyle(\"margin-right: 5px\");\r\n\t\tbotaoOK.setParent(div);\r\n\t\tButton botaoCancelar = new Button(\"Cancelar\");\r\n\t\tbotaoCancelar.addEventListener(\"onClick\", new EventListenerCancelar());\r\n\t\tbotaoCancelar.setWidth(\"100px\");\r\n\t\tbotaoCancelar.setParent(div);\r\n\t}", "public interface Add_Voyage_UI_itf {\n\n void saveTravel(View view);\n}", "public void showButtonsOfManager(int i)\n {\n switch(i)\n {\n case 0: \n for(Controller b: tilesMenu)\n {\n b.setVisible(true);\n }\n break;\n case 1:\n for(Controller b: inputImageMenu)\n {\n b.setVisible(true);\n }\n break;\n case 2:\n for(Controller b: outputImageMenu)\n {\n b.setVisible(true);\n }\n break;\n }\n \n }", "public void showCastMiniController() {\n }", "protected abstract BaseDualControlDataEditor<PK, DATA> instantiateEditorPanel () ;", "@Test\n\tpublic void testControlPanelButtons() {\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Angle text field\")\n\t\t\t\t.requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Velocity text field\")\n\t\t\t\t.requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Height text field\")\n\t\t\t\t.requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").slider(\"Angle slider\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").slider(\"Velocity slider\")\n\t\t\t\t.requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").slider(\"Height slider\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\")\n\t\t\t\t.checkBox(\"Show trajectories checkbox\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set height\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set angle\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set velocity\").requireEnabled());\n\n\t\tfinal int DEFAULT_ANGLE = 45;\n\t\tfinal int NEW_HEIGHT = 50;\n\t\tfinal int NEW_VELOCITY = 100;\n\t\twindow.panel(\"Control panel\").textBox(\"Angle text field\").setText(\"-12\");\n\t\twindow.panel(\"Control panel\").button(\"Set angle\").click();\n\t\tassertThat(\n\t\t\t\tgui.getControlPanel().getAngleSlider().getValue() == DEFAULT_ANGLE);\n\n\t\twindow.panel(\"Control panel\").textBox(\"Height text field\").setText(\"50\");\n\t\twindow.panel(\"Control panel\").button(\"Set height\").click();\n\t\tassertThat(\n\t\t\t\tgui.getControlPanel().getHeightSlider().getValue() == NEW_HEIGHT);\n\n\t\twindow.panel(\"Control panel\").slider(\"Velocity slider\")\n\t\t\t\t.slideTo(NEW_VELOCITY);\n\t\tassertThat(gui.getControlPanel().getVelocityTextField().getText()\n\t\t\t\t.equals(\"\" + NEW_VELOCITY));\n\n\t\twindow.panel(\"Control panel\").button(\"Shoot\").click();\n\t\tassertThat(window.panel(\"Control panel\").button(\"Stop\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").button(\"Clear\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").button(\"Shoot\").requireDisabled());\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Angle text field\")\n\t\t\t\t.requireDisabled());\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Velocity text field\")\n\t\t\t\t.requireDisabled());\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Height text field\")\n\t\t\t\t.requireDisabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").slider(\"Angle slider\").requireDisabled());\n\t\tassertThat(window.panel(\"Control panel\").slider(\"Velocity slider\")\n\t\t\t\t.requireDisabled());\n\t\tassertThat(window.panel(\"Control panel\").slider(\"Height slider\")\n\t\t\t\t.requireDisabled());\n\t\tassertThat(window.panel(\"Control panel\")\n\t\t\t\t.checkBox(\"Show trajectories checkbox\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set height\").requireDisabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set angle\").requireDisabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set velocity\").requireDisabled());\n\t\twindow.panel(\"Control panel\").button(\"Stop\").click();\n\t\tassertThat(window.panel(\"Control panel\").button(\"Stop\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").button(\"Clear\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Stop\").text().equals(\"Continue\"));\n\t\tassertThat(window.panel(\"Control panel\").button(\"Shoot\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Angle text field\")\n\t\t\t\t.requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Velocity text field\")\n\t\t\t\t.requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").textBox(\"Height text field\")\n\t\t\t\t.requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").slider(\"Angle slider\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").slider(\"Velocity slider\")\n\t\t\t\t.requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").slider(\"Height slider\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\")\n\t\t\t\t.checkBox(\"Show trajectories checkbox\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set height\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set angle\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Set velocity\").requireEnabled());\n\t\twindow.panel(\"Control panel\").button(\"Stop\").click();\n\t\tassertThat(window.panel(\"Control panel\").button(\"Stop\").requireEnabled());\n\t\tassertThat(window.panel(\"Control panel\").button(\"Clear\").requireEnabled());\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Control panel\").button(\"Stop\").text().equals(\"Stop\"));\n\t\tassertThat(window.panel(\"Control panel\").button(\"Shoot\").requireDisabled());\n\t\twindow.panel(\"Control panel\").button(\"Clear\").click();\n\t\tassertThat(window.panel(\"Control panel\").button(\"Clear\").requireEnabled());\n\t\tassertThat(gui.getParabolicShotPanel().getProjectiles().size() == 0);\n\t\tassertThat(gui.getParabolicShotPanel().getProjectileColors().size() == 0);\n\t\tfinal int EXPECTED_PROJECTILES = 3;\n\t\tfor (int i = 0; i < EXPECTED_PROJECTILES; ++i) {\n\t\t\twindow.panel(\"Control panel\").button(\"Shoot\").click();\n\t\t}\n\t\tassertThat(gui.getParabolicShotPanel().getProjectiles()\n\t\t\t\t.size() == EXPECTED_PROJECTILES);\n\t\tassertThat(gui.getParabolicShotPanel().getProjectileColors()\n\t\t\t\t.size() == EXPECTED_PROJECTILES);\n\t}", "public PanEditarCliente() {\r\n initComponents();\r\n }", "@Override\r\n\tprotected ICardController createController() {\n\t\treturn new ClientCtrl();\r\n\t}", "@Remote\r\npublic interface MenuActionManagerRemote\r\n extends MenuActionManager\r\n{\r\n\r\n\r\n}" ]
[ "0.67556804", "0.5798073", "0.57003194", "0.5692417", "0.56845444", "0.5633804", "0.5627381", "0.5627381", "0.56028146", "0.55556476", "0.55368626", "0.54753447", "0.54706335", "0.54631674", "0.5450573", "0.544886", "0.54378587", "0.54347384", "0.54196596", "0.54011846", "0.5386593", "0.5386397", "0.5369141", "0.5326384", "0.53263247", "0.53191036", "0.5309987", "0.5304318", "0.53015476", "0.5297105", "0.5291618", "0.52867687", "0.528547", "0.52592516", "0.52575964", "0.5256268", "0.5251086", "0.5247669", "0.5241477", "0.5212879", "0.5212342", "0.52094275", "0.520687", "0.5204285", "0.5202471", "0.5202301", "0.51996523", "0.5199565", "0.5198125", "0.51783895", "0.5175587", "0.51697195", "0.51696193", "0.51688987", "0.5166908", "0.51666266", "0.51543486", "0.5152507", "0.5148437", "0.5142984", "0.51273155", "0.5120479", "0.51125497", "0.5112364", "0.5108336", "0.51031053", "0.5098281", "0.5079646", "0.50788045", "0.5076569", "0.50762165", "0.50664854", "0.50662786", "0.5065723", "0.5062493", "0.5055064", "0.5053069", "0.5051096", "0.50488275", "0.5048588", "0.50475425", "0.5046462", "0.5045325", "0.5043561", "0.5039062", "0.50362515", "0.50358194", "0.50347346", "0.50345284", "0.5027287", "0.50271904", "0.50203073", "0.50137734", "0.50081277", "0.50058866", "0.50047374", "0.5003915", "0.5003126", "0.50025076", "0.50019366" ]
0.735907
0
Called when user presses the 'Commit' button.
public void commitEntity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void commit() {\n }", "protected void post_commit_hook() { }", "public void commit() {\n doCommit();\n }", "public void commit() {\n }", "@Override\n\tpublic void commit() {\n\n\t}", "void commit();", "void commit();", "@Override\n public void commit() {\n }", "public void commit(){\n \n }", "public void commitChanges()\n {\n }", "public void commit(Writer output) throws IOException {\n postData(new StringReader(\"<commit/>\"), output);\n }", "public void commit();", "public void commit() {\n\t\tcommitted = true;\n\t}", "private void commitAction(int buttonID){\n if (buttonID == R.id.buttonDEL) {\n if (inputConn != null)\n inputConn.deleteSurroundingText(1, 0);\n } else if (buttonID == R.id.buttonSHIFT) {\n toggleCase();\n }\n else if (buttonID == R.id.buttonALT){\n toggleAlt();\n }\n else if(buttonID == R.id.buttonSPACE) {\n if (inputConn != null)\n inputConn.commitText(\" \",1);\n }\n else if(buttonID == R.id.buttonENTER) {\n if (inputConn != null)\n inputConn.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER));\n inputConn.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ENTER));\n }\n\n }", "@Override\n\tpublic void commitCalendar(CalendarEdit edit) {\n\t\t\n\t}", "@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}", "R commit(C change);", "@Override\n\tpublic void commitInmate(InmateData inmate) {\n\t\t\n\t}", "public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tsaveChanges();\r\n\t\t\t\t\t\r\n\t\t\t\t}", "public void commit() {\n tryCommit(true);\n }", "void onCommitCreatedEvent(T event);", "@And(\"^I tap Commit button on Phone Number Verification page$\")\n public void ICommitData() throws Exception {\n getTabletPhoneNumberVerificationPage().tapCommitButton();\n }", "@Override\n\tpublic void commit(boolean onSave) {\n\t\tsuper.commit(onSave);\n\t}", "public abstract void commit();", "protected void pretendCommit() {\n \t\t\tif (fStart > -1) {\n \t\t\t\tfText= fDocumentUndoManager.fTextBuffer.toString();\n \t\t\t\tfPreservedText= fDocumentUndoManager.fPreservedTextBuffer.toString();\n \t\t\t}\n \t\t}", "protected void commit() {\n \t\t\tif (fStart < 0) {\n \t\t\t\tif (fDocumentUndoManager.fFoldingIntoCompoundChange) {\n \t\t\t\t\tfDocumentUndoManager.fCurrent= createCurrent();\n \t\t\t\t} else {\n \t\t\t\t\treinitialize();\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tupdateTextChange();\n \t\t\t\tfDocumentUndoManager.fCurrent= createCurrent();\n \t\t\t}\n \t\t\tfDocumentUndoManager.resetProcessChangeState();\n \t\t}", "void commit( boolean onSave );", "@Override\n\t\t\tpublic void CommitHandle(JTable table) {\n\t\t\t}", "@Override\n\t\t\tpublic void CommitHandle(JTable table) {\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance()\n\t\t\t\t\t.executeCommand(new GraphicElementEditCommitCommand(model, dialog.getGraphicElement()));\n\t\t\tdialog.setVisible(false);\n\t\t}", "private void commit(){\n System.out.println(\"Masukan pesan commit : \");\n Scanner input = new Scanner(System.in);\n String message = input.nextLine();\n \n if(initialize == null){\n commitInitialize(message);\n } else {\n commitNext(message);\n }\n }", "public Commit() {\n }", "public Commit() {\n }", "void commit() throws CommitException;", "void commit(String workspace);", "public void voteCommit() {\n boolean b = preVote();\n synchronized ( this ) {\n if ( b == true ) \n commitVotes++; \n else {\n rbVotes++;\n votedCommit = false;\n }\n }\n postVote();\n }", "boolean shouldCommit();", "public void commit() {\n\t\ttry {\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"完了したコミット/Commit Done\");\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Commit Error Occured\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void doExit() {\n\t\tif (userMadeChanges()) {\n showSaveChangesBeforeExitPrompt();\n\t\t} else {\n\t\t\tfinish();\n\t\t}\n\t}", "@DefaultMessage(\"Enter information in the fields, then press Commit.\")\n @Key(\"gen.enterInformationPressCommit\")\n String gen_enterInformationPressCommit();", "protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "void commit(IDevTree tree, Map options) throws IOException;", "public static void commit(String message) throws IOException {\n stagingArea = Utils.readObject(STAGING_FILE, HashMap.class);\n stagingRemoveArea = Utils.readObject(STAGING_REMOVE_FILE, HashMap.class);\n\n if (stagingArea.size() == 0 && stagingRemoveArea.size() == 0){\n exitWithError(\"No changes added to the commit.\");\n }\n\n //Gets current head commit Object + name\n String currName = commitPointers.readHeadCommit()[1];\n File cFile = Utils.join(Commit.COMMIT_FOLDER, currName + \".txt\");\n Commit curr = Utils.readObject(cFile, Commit.class);\n\n //creates a list of parent ids for the new commit object\n ArrayList<String> parentsIDs = new ArrayList<String>(1);\n parentsIDs.add(0, currName);\n\n //creates a new commit with the parent IDs, and the bobs contained in headCommit (curr)\n Commit newCommit = new Commit(message, parentsIDs, curr.fileBlobs);\n\n //Staging area work\n //TODO: move line upwards so you can check if staging area is empty before anything else\n newCommit.updateCommitBlobs(stagingArea, stagingRemoveArea);\n\n //makes a new commitID, and saves new commit with that ID\n String newCommitId = Utils.sha1(Utils.serialize(newCommit));\n newCommit.saveCommit(newCommitId);\n\n stagingArea.clear();\n stagingRemoveArea.clear();\n Utils.writeObject(STAGING_FILE, stagingArea);\n Utils.writeObject(STAGING_REMOVE_FILE, stagingRemoveArea);\n\n //TODO: figure out how to send in the correct branch to head\n commitPointers.updateBranches(commitPointers.readHeadCommit()[0], newCommitId);\n commitPointers.updateHead(commitPointers.readHeadCommit()[0], newCommitId);\n }", "void handleSaveClicked(ActionEvent event);", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public CommitPanel(DockerInstance instance, JButton actionButton) {\n initComponents();\n\n this.actionButton = actionButton;\n\n DefaultDocumentListener listener = new DefaultDocumentListener();\n ((JTextComponent) repositoryComboBox.getEditor().getEditorComponent()).getDocument().addDocumentListener(listener);\n tagTextField.getDocument().addDocumentListener(listener);\n authorTextField.setText(System.getProperty(\"user.name\"));\n \n UiUtils.loadRepositories(instance, repositoryComboBox);\n }", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "protected boolean attemptCommit() {\n \t\t\tpretendCommit();\n \t\t\tif (isValid()) {\n \t\t\t\tfDocumentUndoManager.commit();\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\treturn false;\n \t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSave();\n\t\t\t}", "@Override\r\n\tpublic boolean commit() {\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"commit\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\tps.executeUpdate();\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t\treturn true;\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 false;\r\n\t\t}\r\n\t}", "private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK);\n session.commit();\n }", "void commit(boolean isMajor);", "public static void commit(Commit proposal)\n {\n logger.debug(\"committing {}\", proposal);\n RowMutation rm = proposal.makeMutation();\n Table.open(rm.getTable()).apply(rm, true);\n\n synchronized (lockFor(proposal.key))\n {\n PaxosState state = SystemTable.loadPaxosState(proposal.key, proposal.update.metadata());\n SystemTable.savePaxosCommit(proposal, !state.inProgressCommit.isAfter(proposal));\n }\n }", "private void doCommit(final int y, final int x)\n \t\tthrows FileNotFoundException, GitAPIException\n \t{\n \t\t// update files\n \t\tupdateImageFile();\n \t\tupdateDataFile();\n \n \t\t// add files to changeset\n \t\tfinal AddCommand add = git.add();\n \t\tadd.addFilepattern(ASCII_IMAGE_FILE);\n \t\tadd.addFilepattern(CALENDAR_DATA_FILE);\n \t\tadd.call();\n \n \t\t// commit the changes\n \t\tfinal CommitCommand commit = git.commit();\n \t\tcommit.setAuthor(new PersonIdent(author, contrib[y][x].date));\n \t\tfinal String message = \"(\" + y + \", \" + x + \") -> \" +\n \t\t\tcontrib[y][x].current + COMMIT_NOTICE;\n \t\tcommit.setMessage(message);\n \t\tcommit.call();\n \t}", "public void commitMove() {\n // Nothing currently staged\n if ( board.currentState() == Board.NORMAL ) {\n // Dilemma - nulling this now helps the gui know that nothing was committed\n // However, it prevents us from referencing the previous move if an errant commit occurs\n lastCommittedMove = null;\n return;\n }\n\n lastCommittedMove = Assistant.WordPlay.boardMakeMove(board, this.masterDictionary());\n board.finishPlayingTiles();\n\n // Move was invalid\n if ( lastCommittedMove == null ) { return; }\n \n // Commit the move and re-draw tiles\n board.add(lastCommittedMove);\n drawNewTiles(lastCommittedMove);\n\n if ( rack.size() == 0 ) {\n state = GAMEOVER;\n moves = new MovePackage();\n } else {\n moves = Assistant.WordPlay.boardFindall(board, rack, masterDictionary());\n }\n }", "@Override\r\n\tpublic void commit(String tableName) {\n\t}", "private void processCommitEntry(SensorShell shell, String author, long timestamp, \r\n Date commitTime, int revision, PerforceChangeListData.PerforceFileData fileData)\r\n throws Exception {\r\n if (shell != null) {\r\n String file = this.fileNamePrefix == null ? \"\" : this.fileNamePrefix;\r\n file += fileData.getFileName();\r\n\r\n Map<String, String> pMap = new HashMap<String, String>();\r\n String timestampString = Tstamp.makeTimestamp(timestamp).toString();\r\n pMap.put(\"SensorDataType\", \"Commit\");\r\n pMap.put(\"Resource\", file);\r\n pMap.put(\"Tool\", \"Perforce\");\r\n pMap.put(\"Timestamp\", timestampString);\r\n pMap.put(\"Runtime\", Tstamp.makeTimestamp(commitTime.getTime()).toString());\r\n pMap.put(\"totalLines\", String.valueOf(fileData.getTotalLines()));\r\n pMap.put(\"linesAdded\", String.valueOf(fileData.getLinesAdded()));\r\n pMap.put(\"linesDeleted\", String.valueOf(fileData.getLinesDeleted()));\r\n pMap.put(\"linesModified\", String.valueOf(fileData.getLinesModified()));\r\n shell.add(pMap);\r\n if (this.isVerbose) {\r\n System.out.printf(\"Sending Perforce Commit: Timestamp: %s Resource: %s User: %s%n\", \r\n timestampString, file, shell.getProperties().getSensorBaseUser());\r\n }\r\n }\r\n }", "@Override\r\n\t\tpublic void commit() throws SQLException {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tSaveAction();\r\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "public final void mCOMMIT() throws RecognitionException {\n try {\n int _type = COMMIT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:350:7: ( C O M M I T )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:350:9: C O M M I T\n {\n mC(); \n mO(); \n mM(); \n mM(); \n mI(); \n mT(); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void clickOnSaveChangesButton() {\r\n\t\tprint(\"Click on Save Changes Button\");\r\n\t\tlocator = Locator.MyTrader.Save_Changes_Button.value;\r\n\t\tclickOn(locator);\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddOrUpdate();\n\t\t\t}", "public synchronized void updateCommitNumber()\n\t{\n\t\tm_dbCommitNum++;\n\t}", "protected void succeed()\r\n {\r\n // inform user\r\n ((OwMainAppContext) getContext()).postMessage(getContext().localize(\"plug.owdocprops.OwFieldView.saved\", \"The changes have been applied.\"));\r\n }", "void onSaveClicked();", "private void commitRepChanges() {\r\n\t\t\r\n\t\t// get repository info\r\n\t\tString repURL = repURLFld.getText();\r\n\t\tString boURI = repBaseOntFld.getText();\r\n\t\tthis.repositoryAuthor = repAuthorFld.getText();\r\n\t\tthis.reposityCreatedDate = repDateFld.getText();\r\n\t\t\r\n\t\tString status = \"Status: [ACTION - Commit to Repository]...\";\r\n\t\ttry {\r\n\t\t\tthis.repositoryURI = new URI(repURL);\r\n\t\t\tthis.baseOntologyURI = new URI(boURI);\r\n\t\t}\r\n\t\tcatch (URISyntaxException ex) {\r\n\t\t\tstatusBar.setText(status+\"Invalid Repository URL and/or Base Ontology URI\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// check if repository already exists\r\n\t\t\tboolean repExists = this.loadRepositoryHeader();\r\n\t\t\t\r\n\t\t\tif (!repExists) {\r\n\t\t\t\t// creating new repository\r\n\t\t\t\t// form repository header\r\n\t\t\t\tURI[] headerURI = new URI[1];\r\n\t\t\t\theaderURI[0] = new URI(this.repositoryURI+\"#header\");\r\n\t\t\t\t\r\n\t\t\t\tif (this.repositoryAuthor.equals(\"\") || this.reposityCreatedDate.equals(\"\")) {\r\n\t\t\t\t\tint opt = JOptionPane.showConfirmDialog(null, \"Repository Author and/or Date not specified. Continue?\", \"Creating Repository\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\t}\r\n\t\t\t\t// create annotea description for header\r\n\t\t\t\tDescription header = new Description();\r\n\t\t\t\theader.setAnnotates(headerURI);\r\n\t\t\t\theader.setAuthor(this.repositoryAuthor);\r\n\t\t\t\theader.setCreated(this.reposityCreatedDate);\r\n\t\t\t\theader.setAnnotatedEntityDefinition(this.baseOntologyURI.toString());\r\n\t\t\t\tthis.headVersionNumber = 0;\r\n\t\t\t\theader.setBody(String.valueOf(this.headVersionNumber));\r\n\t\t\t\theader.setBodyType(\"text/html\");\r\n\t\t\t\theader.setAnnotationType(this.annotType);\r\n\t\t\t\tclient.post(header);\r\n\t\t\t\tstatusBar.setText(status+\"Ontology Repository Header posted at \"+headerURI[0]);\r\n\t\t\t\ttoggleRepOptions(false);\r\n\t\t\t\tversionDescriptions[0] = header;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// test changes\r\n\t\t\tboolean success = this.testChanges(true);\r\n\t\t\tif (success){\r\n\t\t\t\t// prompt user for comment on commit\r\n\t\t\t\tString commitComment = JOptionPane.showInputDialog(this, \"COMMIT New Version (Details):\");\r\n\t\t\t\t\r\n\t\t\t\tif (commitComment==null) {\r\n\t\t\t\t\tstatusBar.setText(status+\"CANCELLED\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// transform SwoopChange list to Description list (to save author, date, uris etc)\r\n\t\t\t\tList descList = transformChangeList(repChanges);\r\n\t\t\t\t// serialize each description into RDF/XML\r\n\t\t\t\t// and make it one large string with separator (\"[SWOOP-ANNOTATED-CHANGE-SET]\") in the middle\r\n\t\t\t\tString largeChangeSetString = \"\";\r\n\t\t\t\tfor (Iterator iter = descList.iterator(); iter.hasNext();) {\r\n\t\t\t\t\tDescription desc = (Description) iter.next();\r\n\t\t\t\t\tString descStr = desc.serializeIntoString(swoopModel);\t\t\t\t\t\r\n\t\t\t\t\tlargeChangeSetString += descStr + separator;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// ENCODE CDATA\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"CDATA\", \"ENCODED-CDATA\");\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"]]>\", \"]ENCODED]>\");\r\n\t\t\t\t\r\n\t\t\t\t// finally commit a single annotation with the entire changeset string in the body\r\n\t\t\t\t// also allow author to make annotation on commit\r\n\t\t\t\tDescription commit = new Description();\r\n\t\t\t\tcommit.setAuthor(swoopModel.getUserName());\r\n\t\t\t\tcommit.setCreated(swoopModel.getTimeStamp());\r\n\t\t\t\tcommit.setBody(largeChangeSetString);\r\n\t\t\t\tcommit.setBodyType(\"text/html\");\r\n\t\t\t\tcommit.setAnnotatedEntityDefinition(commitComment);\r\n\t\t\t\tcommit.setAnnotationType(this.annotType);\r\n\t\t\t\t\r\n\t\t\t\t// increment headVersionNum and write new commit\r\n\t\t\t\t// at repURL+\"#\"+headVersionNum\r\n\t\t\t\tthis.headVersionNumber++;\r\n\t\t\t\tURI[] annotates = new URI[1];\r\n\t\t\t\tannotates[0] = new URI(repositoryURI.toString()+\"#\"+String.valueOf(this.headVersionNumber));\r\n\t\t\t\tcommit.setAnnotates(annotates);\r\n\t\t\t\t// COMMIT!\r\n\t\t\t\tclient.post(commit);\r\n\t\t\t\t\r\n\t\t\t\t// post-process:\r\n\t\t\t\t// 1. rewrite rep header added newly incremented headVersionNumber \r\n\t\t\t\tthis.rewriteRepHeader();\r\n\t\t\t\t// 2. set newCommitNode params to current commit\r\n\t\t\t\tnewCommitNode.swoopChange.setAuthor(commit.getAuthor());\r\n\t\t\t\tnewCommitNode.swoopChange.setTimeStamp(commit.getCreated());\r\n\t\t\t\tnewCommitNode.swoopChange.setDescription(commit.getAnnotatedEntityDefinition());\r\n\t\t\t\t// 3. save newCommitNode in versionCommits array and Description in versionDescriptions array\r\n\t\t\t\tversionNodes[this.headVersionNumber] = newCommitNode;\r\n\t\t\t\tversionDescriptions[this.headVersionNumber] = commit;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\t// 4. for each child of newCommitNode, set its swoopChange.onRepository value to true\r\n\t\t\t\tfor (Iterator iter3=newCommitNode.children.iterator(); iter3.hasNext();) {\r\n\t\t\t\t\tTreeTableNode child = (TreeTableNode) iter3.next();\r\n\t\t\t\t\tchild.swoopChange.isOnRepository = true;\r\n\t\t\t\t}\r\n\t\t\t\t// 5. create newCommitNode and add to root at the end\r\n\t\t\t\tnewCommitNode = new TreeTableNode(new SwoopChange(swoopModel.getUserName(), null, null, swoopModel.getTimeStamp(), \"New Version Commit\", true, false));\r\n\t\t\t\tnewCommitNode.swoopChange.isTopNode = true;\r\n\t\t\t\trepRoot.addChild(newCommitNode);\r\n\t\t\t\trepChanges = new ArrayList(); // also clear this\r\n\t\t\t\tstatusBar.setText(status+\"Committed New Version \"+this.headVersionNumber);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tstatusBar.setText(status+\"FAILED\");\r\n\t\t}\r\n\t\tthis.refreshRepTreeTable(false);\r\n\t}", "public void commitChanges(){\n\t\tskipRulesView.updateSkipRule();\n\t\tvalidationRulesView.updateValidationRule();\n\t\tdynamicListsView.updateDynamicLists();\n\t}", "public void clickOnSave_Changes()\n\t{\n\t\twaitForVisibility(save_Changes);\n\t\tsave_Changes.click();\n\t}", "public void commit() throws IOException {\n\t\t\tif (hasErrors) {\n\t\t\t\tcompleteEdit(this, false);\n\t\t\t\tremove(entry.key); // the previous entry is stale\n\t\t\t} else {\n\t\t\t\tcompleteEdit(this, true);\n\t\t\t}\n\t\t}", "public void print(){\t\t\r\n\t\tSystem.out.println(\"===\\nCommit \" + id +\"\\n\"+ Time + \"\\n\" + message + \"\\n\");\r\n\t}", "public final void mT__82() throws RecognitionException {\n try {\n int _type = T__82;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:150:7: ( 'commit' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:150:9: 'commit'\n {\n match(\"commit\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void clickOnSaveChanges()\n\t{\n\t\twaitForVisibility(saveChanges);\n\t\tsaveChanges.click();\n\t}", "public abstract void commitMiembrosDeEquipo();", "public abstract void commitSprintBacklog();", "public void handle(PBFTCommit c){\n Object lpid = getLocalServerID();\n long now = getClockValue();\n\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", received \" + c);\n\n /* If I received a invalid prepare then I'll discard it. */\n if(!(c != null && c.getSequenceNumber() != null && c.getViewNumber() != null && c.getReplicaID() != null)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it's a malformed commit.\");\n return;\n }\n\n /* If the received commit wasn't sent by a group member then I'll discard it. */\n if(!wasSentByAGroupMember(c)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it wasn't sent by group member.\");\n return;\n }\n\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n long seqn = c.getSequenceNumber();\n\n /*If seqn(c) not in (lcwm, hcwm] then c will be discarded. */\n if(!(lcwm < seqn && seqn <= hcwm)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because its SEQN{\" + seqn +\"} not in (\" + lcwm + \"; \" + hcwm + \"].\");\n return;\n }\n\n int itView = c.getViewNumber();\n int myView = getCurrentViewNumber();\n\n /* If the prepare was sent in my current view then I'll check and process it.*/\n if(itView > myView){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it wasn't sent in CURR-VIEW{\" + myView + \"}\");\n return;\n }\n \n if(!getCommitInfo().put(c)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it is a duplicaded commit SEQN{\" + seqn + \"}\");\n return;\n }\n\n if(itView != myView){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", cann't proceed because \" + c + \" in CURR-VIEW{\" + myView + \"}\");\n return;\n }\n\n int f = getServiceBFTResilience();\n\n if(getCommitInfo().count(myView, seqn) < (2 * f + 1)){\n return;\n }\n \n PBFTPrepare p = getPrepareInfo().get(myView, seqn, lpid);\n\n if(p != null && getCommitInfo().get(myView, seqn, lpid) == null){\n getRequestInfo().assign(seqn, RequestState.COMMITTED);\n emitCommit(myView, seqn);\n return;\n }\n\n tryExecuteRequests();\n \n }", "void commit() throws InterruptedException;", "public static void main(String[] args) {\nSystem.out.println(\"nagarjuna is .................\");\r\n//second commit\r\nSystem.out.println(\"vinay is ..............................\");\r\n//third commit\r\nSystem.out.println(\"vinay is a ?\");\r\n\t}", "public void actionPerformed(ActionEvent e) {\n \t \tcheckSaveOnExit();\n \t }", "public interface ESCommitObserver extends ESObserver {\r\n\r\n\t/**\r\n\t * Called before the commit proceeds. A callback method to initiate the commit dialog and allow the user to confirm\r\n\t * the changes.\r\n\t * \r\n\t * @param project\r\n\t * the project the commit occurs on\r\n\t * @param changePackage\r\n\t * the {@link ESChangePackage}\r\n\t * @param monitor\r\n\t * an {@link IProgressMonitor} instance that may be used by clients to inform\r\n\t * about progress\r\n\t * @return true if the changes have been confirmed, false - otherwise.\r\n\t */\r\n\tboolean inspectChanges(ESLocalProject project, ESChangePackage changePackage, IProgressMonitor monitor);\r\n\r\n\t/**\r\n\t * Called after the commit is completed.\r\n\t * \r\n\t * @param project\r\n\t * the project on which the commit has completed\r\n\t * @param newRevision\r\n\t * the new revision that was created by the commit\r\n\t * @param monitor\r\n\t * an {@link IProgressMonitor} instance that may be used by clients to inform\r\n\t * about progress\r\n\t */\r\n\tvoid commitCompleted(ESLocalProject project, ESPrimaryVersionSpec newRevision, IProgressMonitor monitor);\r\n}", "@Override\n\tpublic void commitLogFor(Model reference) {\n\t\t\n\t\treference.commitRedo();\n\t}", "public void commit(String logMsg) throws IOException {\n if (Utils.plainFilenamesIn(INDEX).size() == 0\n && Utils.plainFilenamesIn(REMOVAL).size() == 0) {\n System.out.println(\"No changes added to the commit.\");\n System.exit(0);\n }\n File head = new File(Main.DOTFILE, \"head\");\n if (head.exists()) {\n String parentCommit = Utils.readObject(head, String.class);\n Commit newCommit = new Commit(logMsg, parentCommit);\n helperCommit(newCommit);\n }\n }", "@Override\n public void commit() throws IOException {\n if (!committed && currentFile != null) {\n long pos = currentFile.getLineReadPos();\n currentFile.setPos(pos);\n currentFile.setLastUpdated(updateTime);\n committed = true;\n }\n }", "private void repositoryCheckButtonActionPerformed() {\n checkRepositoryMismatch = true;\n CopyToASpaceButtonActionPerformed();\n }", "public void commit() {\n\t\tif (commit) {\n\t\t\t// Récupérer le path du JSON\n\t\t\tSystem.out.println(ClassLoader.getSystemResource(jsonFile));\n\t\t\tURL url = ClassLoader.getSystemResource(jsonFile);\n\t\t\t// On ouvre un flux d'écriture vers le fichier JSON\n\t\t\ttry (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {\n\t\t\t\t// Ecriture du fichier JSON avec formatage\n\t\t\t\t// (WithDefaultPrettyPrinter)\n\t\t\t\tobjectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);\n\t\t\t\tlogger.info(\"OK - fichier JSON mis à jour \" + jsonFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlogger.info(\"KO - FILE_NOT_FOUND\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - FILE_NOT_FOUND\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"KO - I/O ERROR\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - I/O ERROR\", e);\n\t\t\t} catch (URISyntaxException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void gitThis(){\n\t}", "@Override\n public void commitTx() {\n \n }", "public void commandAction(Command cmd, Displayable source) {\n if (cmd == CMD_OK) {\n midlet.textEditorDone(textField.getString());\n } else if (cmd == CMD_CANCEL) {\n midlet.textEditorDone(null);\n } else {\n // Functionality to handle for unexpected commands may be added here...\n }\n }", "void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}", "@Override\n public CommitState commit(CommitMessage message) {\n commitHandler.write(message);\n return CommitState.newBuilder()\n .setTime(clock.currentTime().toEpochMillis())\n .build();\n }", "private void commit() {\n if (vote != Vote.COMMIT) {\n throw new IllegalStateException(\"Cannot commit transaction with vote: \" + vote);\n }\n\n for (ObjectVersion<V> objectVersion : objectVersions.values()) {\n objectVersion.commit();\n }\n }", "private void CheckoutActionPerformed(java.awt.event.ActionEvent evt) {\n }", "default void registerCommit(Commit commit) {\n }" ]
[ "0.7330888", "0.6996511", "0.692656", "0.6847231", "0.6704446", "0.66606903", "0.66606903", "0.6579023", "0.6562302", "0.6551676", "0.65098107", "0.65010065", "0.6498667", "0.6486426", "0.64249015", "0.64200974", "0.6393521", "0.63230354", "0.6305904", "0.6305438", "0.62956923", "0.6284175", "0.6225751", "0.6224407", "0.62089807", "0.61960495", "0.6173362", "0.6108762", "0.61061954", "0.61061954", "0.61052513", "0.6098419", "0.6086657", "0.6086657", "0.6084841", "0.6081197", "0.6067791", "0.6039308", "0.60048497", "0.6003224", "0.59899753", "0.5979033", "0.597346", "0.5943325", "0.5921913", "0.592109", "0.592109", "0.592109", "0.592109", "0.592109", "0.58961713", "0.5881906", "0.5881906", "0.5881906", "0.5881906", "0.5877349", "0.58711743", "0.58591527", "0.58340716", "0.58155185", "0.58074677", "0.579838", "0.5793795", "0.5774521", "0.5762735", "0.5751453", "0.5736008", "0.57282513", "0.57073796", "0.5694364", "0.5693192", "0.5690915", "0.5685507", "0.56837296", "0.5678689", "0.56773466", "0.5669844", "0.5666205", "0.566198", "0.5654039", "0.565308", "0.56420857", "0.56395394", "0.5638047", "0.5636877", "0.5635543", "0.56321824", "0.5630803", "0.56300086", "0.5620663", "0.5618786", "0.5617566", "0.55974203", "0.5580429", "0.55790216", "0.5578973", "0.5575084", "0.55714923", "0.5570376", "0.55556506", "0.5555176" ]
0.0
-1
Called when user presses the 'Close' button.
public void closeEntity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void close() {\n getCloseButton().click();\n }", "@Override\n\tpublic void windowClose(CloseEvent e) {\n\t\t\n\t}", "void close_actionPerformed(ActionEvent e){\n\t System.exit(0);\n\t }", "public abstract void windowClose(CloseEvent e);", "private void closeBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_closeBtnMouseClicked\n System.exit(0);\n }", "@Override\n public void windowClosing(WindowEvent e)\n {\n gui.exitApp();\n }", "private void close() {\n WindowEvent winClose = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClose);\n \n }", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this, WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "@Override\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n }", "public void close() {\r\n\t\t\r\n\t\tWindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\r\n\t\tToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\r\n\t}", "@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}", "public void close() {\r\n dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\r\n }", "@Override\n public void windowClosing(WindowEvent we) {\n finishDialog();\n }", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\t\n\t}", "public void exit() {\r\n \t\t// Send a closing signat to main window.\r\n \t\tmainWindow.dispatchEvent(new WindowEvent(mainWindow, WindowEvent.WINDOW_CLOSING));\r\n \t}", "@Override\n public void windowClosing(WindowEvent e) {\n closeWindow();\n }", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "public void windowClosing(WindowEvent e) {\n\t\t \t\tif (close){\n\t\t \t\t\tSystem.exit(0);\n\t\t \t\t}\n\t\t \t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\n\t\t\n\t}", "public void close() {\n WindowEvent winClosingEvent = new WindowEvent(this, WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\nToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "protected void windowClosed() {\r\n\r\n\t\t// Exit\tapplication.\r\n\t\tSystem.exit(0);\r\n\t}", "@Override\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n // super.windowClosing(e);\n }", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\n\t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\n\t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\n\t}", "private void closeActionPerformed(java.awt.event.ActionEvent evt) {\n this.dispose();\n }", "public void windowClosing(WindowEvent e) {\n System.exit(0);\n }", "public void close() {\n\t\tgetFrame().dispatchEvent(new WindowEvent(getFrame(), WindowEvent.WINDOW_CLOSING));\n\t\t\n\t}", "@Override\n public void windowClosing(WindowEvent evt) {\n System.exit(0); // Terminate the program\n }", "public void onCancelButtonClick() {\n close();\n }", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\n\t\t\t}", "@Override\n public void windowClosing(WindowEvent evt) {\n System.exit(0); // Terminate the program\n }", "void this_windowClosing(WindowEvent e) {\n // simulate the user having clicked exit\n btn_Exit_actionPerformed( null );\n }", "@Override\n public void closeWindow() {\n \n }", "private void closeProgram() {\n\t\tSystem.out.println(\"Cancel Button clicked\");\n\t\tif (ConfirmBox.display( \"Exit\", \"Are you sure you want to exit?\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void close() {\n\t\t\t\t// name.getScene().getWindow().hide();\n\t\t\t\tdialogStage.fireEvent(new WindowEvent(dialogStage,WindowEvent.WINDOW_CLOSE_REQUEST));\n\t\t\t}", "@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\tSystem.exit(0);\r\n\t}", "private void jb_closeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jb_closeActionPerformed\n System.exit(0);\n }", "@Override\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\tSystem.exit(0);\n\t}", "private void jb_CloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jb_CloseActionPerformed\n System.exit(0);\n }", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t}", "@Override\n public void windowClosing(WindowEvent e)\n {\n\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "@Override\n public void windowClosing(WindowEvent e) {\n }", "public void handleCancelButton(ActionEvent e) {\n\t\tclose();\n\t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\t\n\t}", "public void close() {\r\n\t\tWindowEvent closeWindow = new WindowEvent(frame123, WindowEvent.WINDOW_CLOSING);\r\n\t\tToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(closeWindow);\r\n\t}", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tclose();\n\t\t\t}", "@Override\n\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void windowClosing(WindowEvent event) {\r\n\t\tif (event.getWindow() == this) {\r\n\t\t\tdispose();\r\n\r\n\t\t\t// Overriding the ApplicationFrame behavior\r\n\t\t\t// Do not shutdown the JVM\r\n\t\t\t// System.exit(0);\r\n\t\t\t// -----------------------------------------\r\n\t\t}\r\n\t}", "public void onCancelClicked() {\n close();\n }", "@Action\n public void Close() {\n // just close the Frame\n // This will cause setVisible() in the constructor to return\n setVisible(false);\n \n // show reminder to reference my paper\n String str = \"If you like this program, please cite:\\n\"\n + \"K. P. Pernstich\\n\"\n + \"Instrument Control (iC) – An Open-Source Software to Automate Test Equipment\\n\"\n + \"Journal of Research of the National Institute of Standards and Technology\\n\"\n + \"Volume 117 (2012) http://dx.doi.org/10.6028/jres.117.010\";\n \n JOptionPane.showMessageDialog(null, str,\n \"Humble request\", JOptionPane.INFORMATION_MESSAGE, m_iC_Properties.getLogoSmall());\n }", "public void windowClosing(WindowEvent e) {\n System.exit(0);\n }", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "void close() {\n\t\t\n\t\tthis.frame.setVisible(false);\n\t\tthis.frame.dispose();\n\t\t\n\t}", "@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\tSystem.exit(0);\n\t}", "private void closeProgram(){\n boolean answer = ConfirmBox.display(\"Title\", \"Sure you want to exit?\");\n if(answer==true){\n window.close();\n }\n }", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tcloseApplication();\n\t\t\t}", "@Override\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\tSystem.exit(0); // Terminate the program\n\t}", "public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = null;\r\n }", "@Override\r\n public void windowClosing(WindowEvent e) {\r\n //show dialog box to receive confirmation from the user\r\n int response = JOptionPane.showConfirmDialog(null, \"Do you want to exit?\", \"Confirm\",\r\n JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\r\n if (response == JOptionPane.NO_OPTION) {\r\n System.out.println(\"No button clicked\");\r\n } else if (response == JOptionPane.YES_OPTION) {\r\n System.out.println(\"Yes button clicked\");\r\n System.exit(0);\r\n } else if (response == JOptionPane.CLOSED_OPTION) {\r\n System.out.println(\"JOptionPane closed\");\r\n }\r\n }", "@Override\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\t\tframe.dispose();\n\t\t\t}", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\twindow_Closing(e);\n\t\t\t}", "public void onWindowClosing(Window.ClosingEvent event) {\n VTextField.flushChangesFromFocusedTextField();\n \n // Send the closing state to server\n connection.updateVariable(id, \"close\", true, false);\n connection.sendPendingVariableChangesSync();\n }", "public void windowClosing(WindowEvent comeInWindowEvent) {\n\t\tGUICommon.mainFrame.dispose();\n\t\tSystem.exit(0);\n\t}", "public void windowClosing(WindowEvent we) {\n \t\t\t\toptionPane.setValue(\"Close\");\n \t\t\t}", "private void quitDialog() {\r\n\t\tdispose();\r\n\t}", "public static void close(){\r\n if (showingCloseDialog)\r\n return;\r\n showingCloseDialog = true;\r\n int result = JOptionPane.showConfirmDialog(mainFrame, \"Close Jin?\", \"Confirm\", JOptionPane.OK_CANCEL_OPTION);\r\n showingCloseDialog = false;\r\n switch (result){\r\n case JOptionPane.CANCEL_OPTION:\r\n case JOptionPane.CLOSED_OPTION:\r\n return;\r\n case JOptionPane.OK_OPTION:\r\n Jin.exit();\r\n break;\r\n default:\r\n System.err.println(\"Unknown option type: \"+result);\r\n }\r\n }", "@Override\r\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tdispose();\r\n\t\t\t}", "public void cancel() { Common.exitWindow(cancelBtn); }", "private void handleWindowClose() {\n if (scrdev().getFullScreenWindow() != null)\n scrdev().getFullScreenWindow().removeAll();\n if (container != null){\n container.setVisible(false);\n container.dispose();\n container.removeKeyListener(this);\n \n //TODO: make a call to finish\n }\n }", "public void windowClosing(WindowEvent e) {\n\t\t\t\t\n\t\t\t\tsetVisible(false);\n\t\t\t\tdispose();\n\t\t\t\tSystem.exit(0);\n\t\t\t }", "public static void closeMe() {\n window.close();\n }", "public void windowClosing (WindowEvent e)\n\t\t\t\t{\n\t\t\t\talertQuit();\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}", "public static void close() {\n\t\tfindWindow();\n\t\t\n\t\tuser32.SendMessageA(handle, CLOSE_COMMAND, 0x00000000, 0x00000000);\n\t}", "private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {\n\t\tsetVisible(false);\n\t}", "public void windowClosing(WindowEvent arg0) {\n\n }" ]
[ "0.8212316", "0.79125917", "0.78827167", "0.78337413", "0.78242177", "0.7792636", "0.7746054", "0.77184236", "0.7705525", "0.76914436", "0.7688938", "0.7688938", "0.7688938", "0.7686598", "0.76620054", "0.7652321", "0.7641972", "0.7639501", "0.76229656", "0.76194006", "0.7614087", "0.76083577", "0.76011074", "0.75795513", "0.7579427", "0.75792783", "0.7563422", "0.7563422", "0.7563422", "0.75596064", "0.7557507", "0.75544137", "0.75526524", "0.75499713", "0.7546246", "0.75401926", "0.7533093", "0.7532299", "0.75322", "0.7519354", "0.75184315", "0.7518032", "0.74881554", "0.748403", "0.7482326", "0.7480202", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.7473251", "0.74714905", "0.7468715", "0.7468715", "0.74503833", "0.74385196", "0.74260277", "0.7425024", "0.7417585", "0.74132174", "0.7405126", "0.7397883", "0.7397636", "0.7388772", "0.7388718", "0.7385442", "0.7374309", "0.73693705", "0.73651093", "0.7360296", "0.73538053", "0.7353211", "0.73370254", "0.7334814", "0.73319256", "0.7329392", "0.73230594", "0.73223054", "0.73020726", "0.72985005", "0.72970134", "0.7287929", "0.72865784", "0.72721344", "0.7269588" ]
0.0
-1
Called when user presses the 'Help' button.
public void help();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void handleHelp(ClickEvent event) {\n\t\t\n\t}", "protected void handleHelp(ActionEvent event) {\n\t}", "@Override\n \t\t\t\tpublic void doHelp() {\n \n \t\t\t\t}", "public void showHelp();", "public void helpRequested(HelpEvent event) {\r\n }", "public void handleHelp() {\n if (!helpWindow.isShowing()) {\n helpWindow.show();\n } else {\n helpWindow.focus();\n }\n }", "public void helpPressed() {\n Stage mainStage = (Stage)pane.getScene().getWindow();\n PresentationCtrl.getInstance().showNotification(\"Information\", \"Information\", null,\n \"- Click <Clear> button to clear the history\\n\\n- Click <Refresh> button to refresh the history\" +\n \"\\n\\n- Double clicks on a row to see the detailed information\", mainStage);\n }", "private void doHelp()\r\n {\r\n Help.showHelp(page, ref, null);\r\n }", "private void showHelpDialog() {\n\n view.helpDialog();\n }", "@Override\n public void help() {\n\n }", "public void showHelp(CommandSender sender) {\n\t\t\n\t}", "public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }", "@Override\n public void help(CommandSender sender) {\n \n }", "@Override\n\tpublic void sendHelp(ICommandSender sender) {\n\t}", "void help();", "private void mnHelpActionPerformed(java.awt.event.ActionEvent evt) {\n\n }", "public void helpSpecificAction() {\n new Help(getSpecificHelpTitle(), getSpecificHelp());\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }", "public void jMenuHelpAbout_actionPerformed(ActionEvent e) {\n }", "public static void displayHelp() {\n\t\thelp = getInstance();\n\t\tUIMain.popUpHelp(commandList, inputCommand);\t\n\t\tLoggingLogic.logging(HELP_MESSAGE);\n\t}", "public static void ShowHelpScreen() {\n ToggleVisibility(HelpPage.window);\n }", "private void jMenu_HelpTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu_HelpTabMouseClicked\n DigPopGUIUtilityClass.loadDefaultHelpGUIByScreenName(SCREEN_NAME);\n }", "void printHelp();", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tg.printHelp(\"OthelloHelp.txt\");\n\t}", "private void helpService() {\n output.println(\"Help command\");\n output.println(\"-calc <number> \\t Calculates the value of pi based on <number> points; quit \\t Exit from program \");\n }", "public void help(View v) {\n\t // Do something in response to button\n\t\tIntent intent = new Intent(this, Help.class);\n\t startActivity(intent);\n\n\t}", "public void helpAboutAction() {\n new HelpAbout(this.parentFrame);\n }", "private void help() {\n usage(0);\n }", "private void btn_HelpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_HelpActionPerformed\n // go to help screen\n SIHS = new HelpScreen(value);\n SIHS.setVisible(true);\n\n\n }", "private void helpAbout() {\n JOptionPane.showMessageDialog(this, new ConsoleWindow_AboutBoxPanel1(), \"About\", JOptionPane.PLAIN_MESSAGE);\n }", "public boolean isHelpMode();", "@DISPID(-2147412099)\n @PropGet\n java.lang.Object onhelp();", "private void help() {\n HelpFormatter formater = new HelpFormatter();\n\n formater.printHelp(\"Main\", options);\n System.exit(0);\n }", "public void handleAbout(ApplicationEvent evt) {\n HelpManager hm = (HelpManager) bio.getManager(HelpManager.class);\n if (hm == null) evt.setHandled(false);\n else {\n evt.setHandled(true);\n hm.helpAbout();\n }\n }", "private void actionOnClicHelp() {\r\n\t\ttry {\r\n\t\t\tGUIGeneralMethods.openWebPage(new URL(Constants.C_HELPING_URL));\r\n\t\t} catch (URISyntaxException | IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(frame, Constants.C_ERROR_WHILE_BROWSING_HELP, Constants.C_ERROR_DIALOG_TITLE,\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE); \r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "public void helpBtn( View v )\n {\n \t// Display help here \t\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder( this );\n\t\tbuilder.setMessage( R.string.help_manage_id )\n\t .setTitle( R.string.help_warning );\n\t\tbuilder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int idx) {\n\t // User clicked OK button \n\t }\n\t });\t\t\n\t\tAlertDialog dialog = builder.create();\n\t\tdialog.show();\t\t\n }", "private void showHelp() {\n\t\tJOptionPane.showMessageDialog(this, \"Created by Mario Bobić\", \"About File Encryptor\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "@Override\n public void printHelp() {\n\n }", "private void showHelp() {\n System.out.println(\"new: \");\n System.out.println(\"new chess and throw the chess bevor away\");\n System.out.println(\"move from to:\");\n System.out.println(\"take the pawn from position from to position to \");\n System.out.println(\"print:\");\n System.out.println(\"print the chess now \");\n System.out.println(\"help:\");\n System.out.println(\"show help\");\n System.out.println(\"quit:\");\n System.out.println(\"quit out\");\n }", "@FXML\n public void handleHelp() {\n if (!helpWindow.isShowing()) {\n helpWindow.show();\n } else {\n helpWindow.focus();\n }\n }", "void showHelp() {\n\t\tif (helpScreen == null) {\n\t\t helpScreen = new Form(\"Walking Help\");\n\t\t helpScreen.append(\"^ = walk forward\\n\");\n\t\t helpScreen.append(\"v = walk backwards\\n\");\n\t\t helpScreen.append(\"< = turn left\\n\");\n\t\t helpScreen.append(\"> = turn right\\n\");\n\t\t helpScreen.append(\"fire = change reverb manually\\n\");\n\t\t}\n\t\thelpScreen.addCommand(toggleCommand);\n\t\thelpScreen.setCommandListener(this);\n\t\tdisplay.setCurrent(helpScreen);\n }", "protected void showHelp() {\n try {\n String appletPath = getClass().getName().replace('.', '/');\n URL url = new URL(getCodeBase(), appletPath+\"Help.html\");\n getAppletContext().showDocument(url, \"Help\");\n } catch (IOException e) {\n showStatus(\"Help file not found\");\n }\n\n }", "public void setHelp (String Help);", "public void testHelp() {\n // increasing time because opening of help window can last longer on slower machines\n JemmyProperties.setCurrentTimeout(\"JMenuOperator.PushMenuTimeout\", 60000);\n // open \"Help|Contents\"\n HelpOperator helpOper = HelpOperator.invoke();\n // check help window opened\n // title is \"Help - All\"\n helpOper.close();\n }", "public void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the university.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n System.out.println(\" go quit help\");\n }", "private void setHelp() {\n\t\tHelpOpt.add(\"-h\");\n\t\tHelpOpt.add(\"/h\");\n\t\tHelpOpt.add(\"help\");\n\t}", "public String getHelp();", "Menu getMenuHelp();", "private static void help() {\n\t\tHelpFormatter formater = new HelpFormatter();\n\t\tformater.printHelp(\"Main\", options);\n\t\tSystem.exit(0);\n\t}", "public void HelpTopicsActionPerformed(java.awt.event.ActionEvent evt) {\n\n HelpWindow helpWindow = new HelpWindow(this);\n helpWindow.setVisible(true);\n\n\n // HTMLDisplay helpdisplay = new HTMLDisplay( str, \"TerpPaint Help\" );\n //\t helpdisplay.setVisible( true );\n // System.out.println(\"help topics\");\n }", "@Override\r\n public void doHelpAction() {\n BIReportService.getInstance().traceHelpClick(project.getBasePath(), ConversionHelpEnum.PATH_SETTING);\r\n\r\n ApplicationManager.getApplication().invokeLater(() -> {\r\n BrowserUtil.browse(allianceDomain + HmsConvertorBundle.message(\"directory_url\"));\r\n }, ModalityState.any());\r\n }", "public void openHelp(){\n\n Intent helpIntent = new Intent(this, Help.class);\n startActivity(helpIntent);\n\n }", "String getHelpText();", "public static void printHelpGuide() {\n printDivider();\n System.out.println(\"Help arrives!\\n\");\n printUserGuide();\n printDivider();\n }", "protected abstract void addHelpHandler(boolean hoverListener);", "public void onHelp(View view)\n {\n // Instantiate a dialog box builder\n AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext());\n\n // Parameterize the builder\n builder.setTitle(R.string.helpTitle);\n builder.setMessage(R.string.helpMessage);\n builder.setPositiveButton(android.R.string.ok, null);\n\n // Create the dialog box and show it\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void help() {\n\t\tString format = \"%-20s%s%n\";\n\t\tString[] commands = new String[5];\n\t\tcommands[0] = \"help\";\n\t\tcommands[1] = \"learn\";\n\t\tcommands[2] = \"alphabet:create\";\n\t\tcommands[3] = \"alphabet:destroy\";\n\t\tcommands[4] = \"alphabet:compose\";\n\n\t\tString[] explanation = new String[5];\n\t\texplanation[0] = \"display this message\";\n\t\texplanation[1] = \"starts a learning process. Note: with a large alphabet, this\\ncan take a \"\n\t\t\t\t+ \"very long time!\";\n\t\texplanation[2] = \"creates an alphabet. Currently only working for Android, the\\n\"\n\t\t\t\t+ \"creation of an iOS alphabet has to be done more or less manually\";\n\t\texplanation[3] = \"deletes an existing alphabet\";\n\t\texplanation[4] = \"composes an alphabet from existing window dumps.\";\n\n\t\tfor (int i = 0; i < commands.length; i++) {\n\t\t\tSystem.out.printf(format, commands[i], explanation[i]);\n\t\t}\n\t}", "private static void help() {\n\t\t\n\t\tTask[] taskList = createTaskList();\n\t\t\n\t\tSystem.out.println(\"\\n---------------------------------[ HELP ]--------\"\n\t\t\t\t+ \"------------------------------\\n\");\n\t\t\n\t\t// Post1 Display help (Polymorphism)\n\t\tfor (Task task : taskList) {\n\t\t\ttask.displayHelp();\n\t\t}\n\t\t\n\t}", "public void HelpButtonClick(View view) {\n GeneralHelper.ShowHelpInWishActivity(\"step_test.html\", \"\", this);\n return;\n }", "private static void help() {\n System.out.println(USAGE); \n System.exit(0);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n case MENU_HELP:\r\n help();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "public void help() {\n System.out.println(\"Type 'commands' to list all \" +\n \"available commands\");\n System.out.println(\"Type 'start' to play game\");\n System.out.println(\"Player to remove the last stone loses!\");\n System.out.println();\n }", "public void clickHelpLink()\n\t{\n \telementUtils.performElementClick(wbHelpLink);\n\t}", "private static void displayHelp(){\n System.out.println(\"-host hostaddress: \\n\" +\n \" connect the host and run the game \\n\" +\n \"-help: \\n\" +\n \" display the help information \\n\" +\n \"-images: \\n\" +\n \" display the images directory \\n\" +\n \"-sound: \\n\" +\n \" display the sounds file directory \\n\"\n\n );\n }", "public void updateHelp() {\n\tif (help != null) {\n\t help.setTitle(helpPrefix + title);\n\t help.setContent(getHelp());\n\t if (followPos) {\n\t\thelp.focusOn(this, helpYoffset);\n\t } else {\n\t\thelp.setDefaultPos();\n\t\thelp.hideArrow();\n\t }\n\t}\n }", "private static void help() {\n System.out.println(\"Supported Command List:\");\n System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\");\n System.out.println(\"To draw canvas press: C <width> <height>\");\n System.out.println(\"To draw rectangle press: R <x1> <y1> <x2> <y2>\");\n System.out.println(\"To draw Line press : L <x1> <y1> <x2> <y2>\");\n System.out.println(\"To fill canvas press : B <x> <y> <c>\");\n System.out.println(\"To quit press: Q\");\n System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\");\n System.out.println();\n }", "String getHelpString();", "public void launchHelp(View view){\n Intent intent = new Intent(this, HelpActivity.class);\n startActivity(intent);\n }", "protected void ACTION_B_HELP(ActionEvent arg0) {\n\t\t\r\n\t\tString msg = \"Network Packet Sniffer is JAva packet capturing and traffic analysis application\"\r\n\t\t\t\t+ \"\\n CAPTURE : Start capturing packets on the interface\"\r\n\t\t\t\t+ \"\\nSTOP : Stop capturing packets on the interface\"\r\n\t\t\t\t+ \"\\n LIST : List Network Interfaces on the host\"\r\n\t\t\t\t+ \"\\n SELECT : Select Interface to capture Packets with\"\r\n\t\t\t\t+ \"\\n FILTER : Filter on the selected port when filtering is enabled\"\r\n\t\t\t\t+ \"\\n ENABLE : Enable Port Filtering\"\r\n\t\t\t\t+ \"\\n HELP : Displays the help screen\"\r\n\t\t\t\t+ \"\\n SAVE : Save the information about the packet\"\r\n\t\t\t\t+ \"\\n LOAD : Load the saved data on the interface \"\r\n\t\t\t\t+ \"\\n \";\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, msg);\r\n\t}", "private void printHelp() \n {\n Logger.Log(\"You have somehow ended up in this strange, magical land. But really you just want to go home.\");\n Logger.Log(\"\");\n Logger.Log(\"Your command words are:\");\n parser.showCommands();\n Logger.Log(\"You may view your inventory or your companions\");\n }", "@Override\n public String showHelp()\n {\n return new String(ChatColour.RED + \"Usage: \" + ChatColour.AQUA + this.getName());\n }", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the university.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "@Override\r\n\tprotected String getHelpInfor() {\n\t\treturn \"\";\r\n\t}", "public void helpGenericAction() {\n new Help(getGenericHelpTitle(), getGenericHelp());\n }", "protected String getHelpText() {\n return \"\";\n }", "private void printHelp() \n {\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tlogger.info(\"click rootstage's help button\");\n\t\t\t\tshowRootDocumentScreen(ID_HELP);\n\t\t\t}", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around in a dense woods.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "public void helpAbout_actionPerformed(ActionEvent e) {\n AboutDialog dlg = new AboutDialog(this, \"About InfoFilter Application\", true);\n Point loc = this.getLocation();\n\n dlg.setLocation(loc.x + 50, loc.y + 50);\n dlg.show();\n }", "protected void helpPage() {\n \n System.out.println(\"Commands:\");\n System.out.println(\"\\tQ [filename]\\t\\t\\tquit and save to filename\"); \n System.out.println(\"\\t ~ is used for a space character\" ); \n System.out.println(\"\\tb [STRING] [INDEX]\\t\\tinsert [STRING] \" +\n \"before [INDEX]\");\n System.out.println(\"\\tr [START] [STOP]\\t\\tremove all charecters\" +\n \" from index start to stop\");\n System.out.println(\"\\td [CHAR]\\t\\t\\tremove all [CHAR] elements \" +\n \"in the list\");\n System.out.println(\"\\tr [CHAR1] [CHAR2]\\t\\treplace all \" + \n \"[CHAR1]'s with [CHAR2]\");\n System.out.println(\"\\tz\\t\\t\\t\\trandomly run other commands several\" +\n \" times\");\n System.out.println(\"\\tp [INDEX] [CLIPBOARD]\\t\\tpaste from \" +\n \"clipboard number [CLIPBOARD] to message index [INDEX]\");\n System.out.println(\"\\tc [START] [STOP] [CLIPBOARD]\\t\" + \n \"copy message values from index [START] to [STOP] to \" + \n \"clipboard [CLIPBOARD]\");\n System.out.println(\"\\tx [STOP] [START] [CLIPBOARD]\\tcut from \" +\n \"message index [START] to [STOP] to clipboard [CLIPBOARD]\");\n System.out.println(\"\\th\\t\\t\\t\\tmeans to show this help page\");\n }", "private void printHelp() {\n System.out.println(\"Your available command words are:\");\n parser.showCommands();\n }", "void help() {\n // FIXME\n try {\n FileReader help = new FileReader(\"loa/Help.txt\");\n Scanner helpPls = new Scanner(help);\n while (helpPls.hasNextLine()) {\n System.out.println(helpPls.nextLine());\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"Help file not found.\");\n }\n\n }", "public void onClickHelp (View v)\n {\n int id = v.getId ();\n int textId = -1;\n switch (id) {\n case R.id.help_button1 :\n textId = R.string.topic_section1;\n break;\n case R.id.help_button2 :\n textId = R.string.topic_section2;\n break;\n case R.id.help_button3 :\n textId = R.string.topic_section3;\n break;\n case R.id.help_button4 :\n textId = R.string.topic_section4;\n break;\n default:\n break;\n }\n\n }", "public static void help() {\n System.out.println(\"MENU : \");\n System.out.println(\"Step 1 to create a default character.\"); // create and display a character\n System.out.println(\"Step 2 to display characters.\");\n System.out.println(\"Step 3 to choice a character for list his details. \");\n System.out.println(\"Step 4 to start fight between 2 characters\");\n System.out.println(\"step 5 to remove a character.\");\n System.out.println(\"step 6 to create a Warrior.\");\n System.out.println(\"step 7 to create a Wizard.\");\n System.out.println(\"step 8 to create a Thief.\");\n System.out.println(\"Step 9 to exit the game. \");\n System.out.println(\"Step 0 for help ....\");\n\n }", "protected void HelpActionPerformed(ActionEvent e) {\n\t\tthis.setVisible(false);\n\t\tHelp frame = new Help();\n\t\tframe.UpFrame=this;\n\t\tframe.setVisible(true);\n\t}", "protected void doHelp (RenderRequest request,\n\t\t RenderResponse response)\n throws PortletException, java.io.IOException\n {\n throw new PortletException(\"doHelp method not implemented\");\n\n }", "private void helpDocItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_helpDocItemActionPerformed\n helpBox.setVisible(true);\n }", "private void openHelpDialog() {\r\n\t\t// Get view and put relevant information into the view.\r\n\t\tLayoutInflater li = LayoutInflater.from(this);\r\n\t\tView view = li.inflate(R.layout.archive_help_dialog, null);\r\n\r\n\t\tnew AlertDialog.Builder(this)\r\n\t\t\t\t.setTitle(\r\n\t\t\t\t\t\tgetResources().getString(R.string.action_archive)\r\n\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t+ getResources()\r\n\t\t\t\t\t\t\t\t\t\t.getString(R.string.action_help))\r\n\t\t\t\t.setIcon(R.drawable.icon)\r\n\t\t\t\t.setView(view)\r\n\t\t\t\t.setNegativeButton(R.string.dialog_general_button_close,\r\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\tint whichButton) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}).show();\r\n\t}", "@FXML public void handleSentimentRelatedFeaturesHelp() {\n\t\t// Help.help(HelpConstants.FeaturesSets.BASIC_SENTIMENT_BASED_FEATURES);\n\t\ttry {\n\t\t\tRuntime.getRuntime().exec(\"hh.exe \" + Constants.helpFile + \"::1- Sentiment Features.html\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void help(String helpType) {\n try {\n if (helpType.equals(\"\")) {\n write(\"help\");\n } else {\n write(\"help \" + helpType);\n }\n } catch (IOException e) {\n System.out.println(\"No connecting with server:help\");\n }\n }", "public boolean isHelpRequested() {\n return m_commandLine.hasOption(m_helpOption);\n }", "protected String getHelp() {\r\n return UIManager.getInstance().localize(\"renderingHelp\", \"Help description\");\r\n }", "Help createHelp();", "public void newHelp() {\n\t\tif(helpWindow){\n\t\t\tJOptionPane.showMessageDialog(null, \"Une fenêtre d'aide est déjà ouverte.\");\n\t\t}\n\t\telse {\n\t\t\thelpWindow = true;\n\t\t\t\n\t\t\tJFrame aide = new JFrame();\n\t\t\t\n\t\t\taide.setTitle(\"Aide\");\n\t\t\taide.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\taide.setSize(700,500);\n\t\t\taide.setLocationRelativeTo(null);\n\t\t\taide.setVisible(true);\n\n\t\t\tJTextArea helpText = new JTextArea();\n\t\t\thelpText.setText(Constants.HELP);\n\t\t\thelpText.setEditable(false);\n\n\t\t\tJScrollPane scrollbar = new JScrollPane(helpText);\n\t\t\tscrollbar.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\t\tscrollbar.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n\n\t\t\taide.add(scrollbar);\n\t\t\t\n\t\t\taide.addWindowListener(new WindowAdapter() {\n\t\t\t public void windowClosed(WindowEvent e) {\n\t\t\t \thelpWindow = false;\n\t\t\t }\n\t\t\t});\n\t\t}\n\t}", "public abstract void printHelp(List<String> args);", "public static void help() {\n System.out.println(line(\"*\", 80));\n System.out.println(\"SUPPORTED COMMANDS\");\n System.out.println(\"All commands below are case insensitive\");\n System.out.println();\n System.out.println(\"\\tSELECT * FROM table_name; Display all records in the table.\");\n System.out.println(\"\\tSELECT * FROM table_name WHERE rowid = <value>; Display records whose rowid is <id>.\");\n System.out.println(\"\\tDROP TABLE table_name; Remove table data and its schema.\");\n System.out.println(\"\\tVERSION; Show the program version.\");\n System.out.println(\"\\tHELP; Show this help information\");\n System.out.println(\"\\tEXIT; Exit the program\");\n System.out.println();\n System.out.println();\n System.out.println(line(\"*\", 80));\n }", "public abstract String getHelpInfo();", "@Override\r\n\tprotected String getHelpId() {\n\t\treturn null;\r\n\t}", "@Override\n\tprotected Response doHelp(SplashScreenSearcher searcher, PageModel page) {\n\t\treturn null;\n\t}", "void doHelp() throws AmbiguousException\n\t{\n // someone entered a help command so let's help them!\n\t\tString topic = \"help\"; //$NON-NLS-1$\n\n int cmd;\n String commandName;\n\n // they might have entered something like \"help br\"\n if (hasMoreTokens())\n\t\t{\n\t\t\t// map \"br\" to CMD_BREAK\n cmd = commandFor(nextToken());\n // and then back to \"break\"\n commandName = commandNumberToCommandName(g_commandArray, cmd);\n // so we'll look up the topic named \"break\" in fdbhelp*.txt\n topic = commandName;\n\n // they might have entered something like \"help inf fil\"\n if (cmd == CMD_INFO && hasMoreTokens())\n {\n // map \"fil\" to CMD_INFO_FILE\n cmd = infoCommandFor(nextToken());\n // and then back to \"file\"\n commandName = commandNumberToCommandName(g_infoCommandArray, cmd);\n // so we'll look up the topic named \"info file\" in fdbhelp*.txt\n topic += \" \" + commandName; //$NON-NLS-1$\n }\n\n // or like \"help sho n\"\n else if (cmd == CMD_SHOW && hasMoreTokens())\n {\n // map \"n\" to CMD_SHOW_NET\n cmd = showCommandFor(nextToken());\n // and then back to \"net\"\n commandName = commandNumberToCommandName(g_showCommandArray, cmd);\n // so we'll look up the topic named \"show net\" in fdbhelp*.txt\n topic += \" \" + commandName; //$NON-NLS-1$\n }\n\t\t}\n\n\t\tout( getHelpTopic(topic) );\n\t}" ]
[ "0.86302084", "0.860233", "0.83413124", "0.8336883", "0.82124895", "0.82111424", "0.82060504", "0.81802917", "0.80177027", "0.79524463", "0.79291636", "0.7851695", "0.7828261", "0.7806413", "0.77896035", "0.77224374", "0.77175355", "0.7702225", "0.76834214", "0.7679565", "0.76325923", "0.7599292", "0.7579579", "0.7573917", "0.7573152", "0.75709593", "0.75666976", "0.7552388", "0.7541414", "0.75173366", "0.75167614", "0.7510404", "0.74751884", "0.74552", "0.74189854", "0.7397246", "0.73957056", "0.7389795", "0.73869634", "0.7380552", "0.7374571", "0.7367006", "0.73488176", "0.73471683", "0.73462224", "0.7342134", "0.73416686", "0.7337295", "0.73269963", "0.7272928", "0.72686", "0.7256616", "0.72496593", "0.72450453", "0.72220576", "0.7221787", "0.72186655", "0.7216827", "0.72161484", "0.72120357", "0.72083026", "0.71831423", "0.7171625", "0.7141518", "0.71231025", "0.7123095", "0.7117226", "0.7116744", "0.7113003", "0.70945793", "0.7060582", "0.705411", "0.7043516", "0.7042554", "0.7028825", "0.7024075", "0.7023763", "0.70097065", "0.6995326", "0.698569", "0.69844025", "0.69841766", "0.6969149", "0.6967154", "0.69638383", "0.6951552", "0.6949749", "0.69340765", "0.69308126", "0.6930023", "0.69277155", "0.6925538", "0.69239736", "0.6917799", "0.69023556", "0.6892124", "0.6891663", "0.6883809", "0.68829304", "0.68808705" ]
0.80229205
8
Method: Checking(String name) Inputs: name and balance Returns: Description: The method construct a new account with name and balance.
public Checking(String name, float balance) { super(name, balance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account(String name, double balance)\r\n\t{\r\n\t\t\r\n\t\tthis.name = name; //assign name to the instance variable name \r\n\t\t\r\n\t\t// validate that the balance is greater that 0.0; if it is not,\r\n\t\t// instance variable balance keeps its default value 0.0\r\n\t\tif(balance > 0.0) // if balance is valid\r\n\t\t\tthis.balance = balance; // assign balance to the instance variable balance\t\t\t\t\t\r\n\t}", "public Account(String name, double balance){\n\n this.name = name;\n\n if (balance > 0.0 )\n this.balance = balance;\n }", "public boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;", "public Checking(String firstName, String lastName, int accountNumber, double accountBalance) {\n\t\tsuper(firstName, lastName, accountNumber, accountBalance);\n\t\t\n\t}", "public CheckingAccount(String n) {\n super(n);\n balance = 0;\n }", "public BankAccount(int accountNo, String name, double balance) {\n this.accountNo = accountNo;\n this.name = name;\n if(balance > 0.0)\n this.balance = balance;\n }", "public Account(int id, String name, double balance){\n this(id, balance);\n this.name = name;\n }", "public Checking(String name, String ssn, double initDeposit) {\n\t\tsuper(name, ssn, initDeposit);\n\t\t\n\t\tSystem.out.println(\"Checking\");\n\t\tSystem.out.println(\"SSN: *****\\\" + ssn.substring(5)\");\n\t\tSystem.out.println(\"Current balance: \" + balance + \"\\n\");\n\t}", "public Account(String name, Double balance, String accNum){\n\t\tthis.name = name;\n\t\taccountNumber = accNum;\n\t\tthis.balance = balance;\n\t}", "public BankAccount(String holderName, String number, float balance){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = balance;\r\n\t}", "public BankAccount(String accountName, int balance) {\n this.accountName = accountName;\n this.balance = balance;\n this.valueDeposits = balance;\n this.valueWithdrawals = 0;\n this.maximumBalance = balance;\n this.minimumBalance = balance;\n }", "public boolean addBankAccount(String name, double balance) {\n\t\tif(balance>0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public Account(int accountNo, String accountHolderName, double balance) {\r\n this.accountNo = accountNo;\r\n this.accountHolderName = accountHolderName;\r\n this.balance = balance;\r\n\r\n Account.accountCount++;\r\n }", "private String createAccount(String name, double amount) {\n\t\tString accountNumber = \"\";\n\t\tAccount account = new Account();\n\t\taccount.setName(name);\n\t\taccount.setAmount(amount);\n\t\t\n\t\tString requestBody = gson.toJson(account);\n\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.post(\"/account\");\n\t\tif (response.asString() != null && response.asString().contains(\":\")) {\n\t\t\tString responseArr[] = response.asString().split(\":\");\n\t\t\taccountNumber = responseArr[1].trim();\n\t\t}\n\t\treturn accountNumber;\n\t}", "public CheckAccount(double balance, double option) {\n this.balance = balance;\n this.option = option;\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public StudentSavingsAccount(double bal, String name) {\n\n \t\tsuper(bal, name);\n// \t super();\n// \t setName(name);\n// \t setBalance(bal);\n \t overdraftsBeforeFee = 3;\n \t System.out.println(\"double, String constructor called [StudentSavingsAccount]\");\t\n\n }", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public CheckingAcoount(String accountHolder, long accountNum, double balance) {\n // super to have parent class constructor !\n super(accountHolder, accountNum, balance);\n }", "public Checking(String name, String sSN, double initDeposit) {\n\t\tsuper(name,sSN,initDeposit);\n\t\taccountNumber = \"2\" + accountNumber;\n\t\tsetDebitCard();\n\t}", "public static void createChecking(ArrayList<Account> accounts, int id, double balance, double interestRate) throws IOException{\n CheckingAccount cAccount = new CheckingAccount(id, balance, interestRate);\r\n \r\n //add the account just created to array\r\n accounts.add(cAccount);\r\n System.out.println(\"Your account has been created. Information of your new account is below. \\n\");\r\n \r\n //get the current index of the id and print out the info\r\n int idIndex = idIndex(accounts, cAccount.getID());\r\n System.out.println(\"Account type: Checking\");\r\n accounts.get(idIndex).displayAccountInformation();\r\n }", "public CoinbaseAccount createCoinbaseAccount(String name) throws IOException {\n\n class Payload {\n @JsonProperty\n String name;\n Payload(String name) {\n this.name = name;\n }\n }\n \n Payload payload = new Payload(name);\n\n String path = \"/v2/accounts\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String body = new ObjectMapper().writeValueAsString(payload);\n String signature = getSignature(timestamp, HttpMethod.POST, path, body);\n showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);\n \n return coinbase.createAccount(MediaType.APPLICATION_JSON, Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp, payload).getData();\n }", "@Override\r\n\tpublic boolean addBankAccount(String name, String balance) {\n\t\treturn false;\r\n\t}", "public static Checking createChecking(String name) {\r\n return new Checking(name);\r\n }", "public Checking_Account (int account_num, double initial_balance, Savings_Account protection)\r\n {\r\n\r\n super (account_num, initial_balance);\r\n overdraft = protection;\r\n\r\n }", "Bank(String name, double currentAmount) {\n this.accountName = name;\n this.currentAmount = currentAmount;\n }", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "public CheckingAccount() {\n\t\tsuper();\n\t}", "public long createcomp(String name, String bal) {\n\t\tContentValues cv2=new ContentValues();\n\t\tcv2.put(Com_Name, name);\n\t\tcv2.put(Com_Balance, Integer.parseInt(bal));\n\t\treturn ourDatabase.insert(DATABASE_TABLE1, null, cv2);\n\t\t\n\t}", "public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this. customerName = customerName;\n this.balance = balance;\n }", "public BankAccount lookUp(String name){\n\t\t// create an Entry with the given name, a \"dummy\" accountNumber (1) and zero balance\n\t\t// This \"dummy\" accountNumber will be ignored when executing getData\n\t\tBankAccount lookFor = new BankAccount(name, 1, 0);\n\t\treturn (BankAccount)namesTree.findData(lookFor);\n\t}", "public void makeDposit(String accountName, Transaction deposit){\n for (int i=0; i<=accounts.size();i++)\n {\n if (accounts.get(i).name.equals(accountName))\n {\n// found = true;\n this.accounts.get(i).makeTransaction(deposit);\n return;\n }\n }\n System.out.println(\"account not found\");\n }", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "public Account(String accountName) throws AccountException{\n\n\t\t\tif (accountName.length() < 5)\n\t\t\t\tthrow new AccountException (AccountException.NAME_TOO_SHORT, accountName);\n\t\t\tboolean valid = true;\n\t\t\tchar[] a = accountName.toCharArray();\n\t\t\tfor (char c: a) {\n\t\t\t\tvalid = ((c >= 'a') && (c <= 'z')) ||\n\t\t\t\t\t\t((c >= 'A') && (c <= 'Z')) ||\n\t\t\t\t\t\t((c >= '0') && (c <= '9'));\n\t\t\t\tif (!valid) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!valid) throw new AccountException (AccountException.NAME_TOO_SIMPLE, accountName);\n\t\t\tthis.name = accountName;\n\t}", "private void insert(String name, boolean checkBalance)\r\n\t{\r\n\t\t// Create the Node with the given String\r\n\t\tNode newNode = new Node(name);\r\n\t\t\r\n\t\t// Check to see if the Tree is currently empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Add the Node by setting the root to point to it and increment counter\r\n\t\t\tsetRoot(newNode);\r\n\t\t\tincrementCounter();\r\n\t\t}\r\n\t\t// Tree is not empty so use the insert helper to place the Node in the correct spot\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Passing the Root reference as the starting point for the Node insertion\r\n\t\t\t// as well as the reference to the newly created Node\r\n\t\t\tinsert(getRoot(), newNode);\r\n\t\t\t\r\n\t\t\t// Balance the tree only if necessary - ie. checkBalance is true and\r\n\t\t\t// the current depth of the tree is greater than what it should be based on \r\n\t\t\t// the total amount of Nodes in the tree\r\n\t\t\tif(checkBalance && depth() > howManyLevels())\r\n\t\t\t{\r\n\t\t\t\t// Call the balance method to balance the tree\r\n\t\t\t\tbalance();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }", "public CheckingAccount(int id, double balance, double overdraftLimit) {\n\t\tsuper(id, balance);\n\t\tthis.overdraftLimit = overdraftLimit;\n\t}", "private Checking(String name) {\r\n\t\tsuper(name);\r\n\t}", "public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }", "public BankAccount(String holderName, String number){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = 0;\r\n\t}", "public CheckingAccount()\n {\n withdrawals = 0;\n deposits = 0;\n }", "public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }", "public BankAccount createAccount(String name, String pin, int initialDeposit) {\n\t\tString accountNumber = \"\";\n\n\t\tString sql = \"INSERT INTO accounts (id, name, pin, balance, balance_saving) VALUES(?, ?, ?, ?, ?)\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// not sure why this was changed, but the database should of been auto-incrementing id\n\t\t\tpstmt.setInt(1, getNumAccounts() + 1);\n\t\t\tpstmt.setString(2, name);\n\t\t\tpstmt.setString(3, pin);\n\t\t\tpstmt.setInt(4, initialDeposit);\n\t\t\tpstmt.setInt(5, 0);\n\n\t\t\tpstmt.executeUpdate();\n\t\t\tResultSet genky = pstmt.getGeneratedKeys();\n\t\t\taccountNumber = Long.toString(genky.getLong(1));\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn authenticateAccount(accountNumber, pin);\n\t}", "public boolean makeNewAccount(String name, BigDecimal balance, int type)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (currentCustomerAuthenticated && currentUserAuthenticated) {\n int id = DatabaseInsertHelper.insertAccount(name, balance, type);\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n // find out what account type the account is and create and add that account to the customer\n if (type == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(id, name, balance);\n currentCustomer.addAccount(chequing);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(savings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(id, name, balance);\n currentCustomer.addAccount(tfsa);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsavings = new RestrictedSavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(rsavings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n }\n return false;\n }\n System.out.println(\"reached here\");\n throw new ConnectionFailedException();\n }", "public static void main (String[] args)\r\n{\nAccount a = new SavingsAccount(\"john\",500,4);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+a.getName()+\"has an initial balance of:\"+a.getBalance());\r\na.deposit(200);\r\na.withdraw(200);\r\nSystem.out.println(\"\"+a.getName()+\"at the end of transaction has a balance of \"+a.getBalance());\r\n\r\nSystem.out.println(\"\\n checking account details\");\r\nSystem.out.println(\"----------------------\");\r\nCheckingAccount cAobj = new CheckingAccount(\"Stephen\",200,200);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+cAobj.getName()+\"has an initial balance of:\"+cAobj.getBalance());\r\ncAobj.deposit(200);\r\ncAobj.withdraw(500);\r\nSystem.out.println(\"\"+cAobj.getName()+\"at the end of transaction has a balance of \"+cAobj.getBalance());\r\n}", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "abstract int checkBalance(String accountno) throws RemoteException;", "@Override\n\tpublic void checkBalance() {\n\t\tSystem.out.println(\"balance is checked\");\n\t}", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "public Account(String name, String idNum) {\n\t\tthis.name = name;\n\t\tthis.idN = idNum;\n\t\tsetRate();\n\n\t\t//create Account Number\n\t\tthis.accountNumber = createAccountNumber();\n\t\t//create Password for login bank\n\t\tthis.password = createPw();\n\t\t\n\t}", "public BankAccount(double checkingBalance, double savingsBalance) {\r\n\t\tthis.checkingBalance = checkingBalance;\r\n\t\tthis.savingsBalance = savingsBalance;\r\n\t\taccountsCount++;\r\n\t\ttotalAmount += checkingBalance;\r\n\t\ttotalAmount += savingsBalance;\r\n\t}", "public CheckingAccount (double openingBalance) {\n\t\t//super(openingBalance; INT_RATE);\n\t\tsuper(openingBalance);\n\t}", "public Bank(String name, int accs){\n bankAccounts = new Account[accs];\n bankName = name;\n maxAccounts = accs;\n currAccounts = 0; //empty\n }", "public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }", "Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }", "public CheckingAccount() {\n super(); \n }", "public BankAccount(int accountNum, String customerName){\n this.accountNum = accountNum;\n this.customerName = customerName;\n balance = 0;\n }", "public Account()\n {\n // initialise instance variables\n balance = 0.00;\n remainder = 0;\n }", "protected Account(String n, float b) {\n this(n); \n balance = b;\n }", "public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "public BankAccount(String name, double balance, String animalType, String typeOfAccount, boolean behaviour) {\n this.name = name;\n this.balance = balance;\n this.animalType = animalType;\n this.typeOfAccount = typeOfAccount;\n this.behaviour = behaviour;\n }", "public static boolean createAccountAndAccountEntry(String playerName, String accountnumber, double interest, double withdrawlimit) {\n\t\tif (!accountNoExists(accountnumber)) {\n\t\t\t//Insert Account into Accounts Table\n\t\t\tString execute = \"INSERT INTO \" + EconomosConstants.DB_ACCOUNTS_TABLENAME + \" (accountno, balance, interest)\" +\n\t\t\t\t\t\" VALUES (\" + accountnumber + \", \" + interest + \", \" + EconomosConstants.INTEREST_AMOUNT + \")\";\n\t\t\tif (!SQLUtil.transactUpdate(execute)) {\n\t\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Account \" + accountnumber + \" Account MySQL DB INSERT transaction failed.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t//Insert Account Entry into AccountEntries\n\t\t\texecute = \"INSERT INTO \" + EconomosConstants.DB_ACCOUNTENTRIES_TABLENAME + \" (accountno, user, role, withdrawlimit)\" +\n\t\t\t\t\t\" VALUES (\" + accountnumber + \", '\" + playerName + \"', 'owner', \" + withdrawlimit + \")\";\n\t\t\tif (!SQLUtil.transactUpdate(execute)) {\n\t\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Account \" + accountnumber + \" AccountEntry MySQL DB INSERT transaction failed.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Account \" + accountnumber + \" created for \" + playerName + \".\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Tried to create account \" + accountnumber + \" but it already exists!\");\n\t\t\treturn false;\n\t\t}\n\t}", "public Account(String accountName, String displayName, double balance,\n double interestRate) {\n this.accountName = accountName;\n this.displayName = displayName;\n this.balance = balance;\n this.interestRate = interestRate;\n }", "public Account(int accNmr, String firstName, String lastName, double balance) {\n this.accNmr = accNmr;\n this.firstName = firstName;\n this.lastName = lastName;\n this.balance = balance;\n }", "@Override\n public void actionPerformed(ActionEvent e){\n int starNum = Integer.valueOf(JOptionPane.showInputDialog(\"Starting Balance?\"));\n \n String nam = JOptionPane.showInputDialog(\"Account Name?\");\n \n String type = JOptionPane.showInputDialog(\"Type Of Account?\");\n \n Account newAcc = null;\n \n if(type.equals(\"Checking\")) {\n \n newAcc = new CheckingAccount(nam, starNum);\n \n } else {\n \n newAcc = new SavingsAccount(nam, starNum);\n \n }\n \n bankSystem.addAcc(newAcc);\n \n current = newAcc;\n \n }", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "Account create();", "public BankAccount(String accountHolderName, String accountNumber, String routingNumber){\n this.mAccountHolderName = accountHolderName;\n this.mAccountNumber = accountNumber;\n this.mRoutingNumber = routingNumber;\n balance = BigDecimal.ZERO;\n }", "public Person(String name, double bankroll){\n\n this.name = name;\n this.bankroll = bankroll;\n bet = 0.0;\n activePlayer = true;\n\n }", "public static void main(String[] args){\n System.out.println(\"\\nSTEP 1:\\n Create a new bank account.\");\n BankAccount a = new BankAccount(args[0], args[1], args[2]);\n System.out.println(a);\n\n // Get and set names\n System.out.println(\"\\nSTEP 2:\\n Get account holder name.\");\n String name = a.getName();\n System.out.println(\"The name is \" + name);\n System.out.println(a);\n\n System.out.println(\"\\nSTEP 3:\\n Set account holder name.\");\n a.setName(\"Mary Berry\");\n System.out.println(a);\n\n // Get and set account number\n System.out.println(\"\\nSTEP 4:\\n Get account number.\");\n String number = a.getNumber();\n System.out.println(\"The account number is \" + number);\n System.out.println(a);\n\n System.out.println(\"\\nSTEP 5:\\n Set account number.\");\n a.setNumber(\"0012044\");\n System.out.println(a);\n\n // Withdraw money with no funds\n System.out.println(\"\\nSTEP 6:\\n Attempt to withdraw money with insufficient funds.\");\n a.withdraw(22.0);\n System.out.println(a);\n\n // Deposit to account\n System.out.println(\"\\nSTEP 7:\\n Deposit to bank account.\");\n a.deposit(50.0);\n System.out.println(a);\n\n // Check balance\n System.out.println(\"\\nSTEP 8:\\n Check account balance.\");\n double balance = a.checkBalance();\n System.out.println(\"The balance is \" + balance);\n System.out.println(a);\n\n // Withdraw with sufficient funds\n System.out.println(\"\\nSTEP 9:\\n Withdraw from account.\");\n a.withdraw(22.0);\n System.out.println(a);\n }", "int createAccount(Account account);", "public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }", "public static void createAccount()throws IOException{\n\t\ttry{\n\t\t\tFile accountInfo = new File(\"account.txt\");\n\t\t\tFile Information = new File(\"information.txt\");\n\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\tArrayList<String> info = new ArrayList<String>();\n\t\t\tScanner inputFromInformation = new Scanner(Information);\n\t\t\tScanner inputFromAccount = new Scanner(accountInfo);\n\t\t\twhile (inputFromAccount.hasNextLine()){\n\t\t\t\ttemp.add(inputFromAccount.nextLine());\n\t\t\t}\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\t// This is where we will start the new account process\n\t\t\t// first by telling us who you are.\n\t\t\tSystem.out.println(\"Enter your First Name\");\n\t\t\tString firstName = input.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter your Last Name\");\n\t\t\tString lastName = input.next();\n\t\t\t// This will give the user recommended\n\t\t\t// user names if they cannot think of one.\n\t\t\tRecommendedUserNames(firstName,lastName);\n\t\t\t// here they will be prompt to enter their preferred user name\n\t\t\tSystem.out.println(\"Enter your preferred username\");\n\t\t\tString UserName = input.next();\n\t\t\t// This will prompt the user for a password\n\t\t\t// The password will have to meet these requirements\n\t\t\tSystem.out.println(\"Your password should meet the following requirements:\");\n\t\t\tSystem.out.println(\"-It must have at least eight characters.\\n-It must consist of only letters and digits.\"\n\t\t\t\t\t\t\t+ \"\\n-It must contain more than two digits and two characters.\");\n\t\t\tSystem.out.println(\"\\nEnter your new Password\");\n\t\t\tString Password = input.next();\n\t\t\t\n\t\t\t// this is what will verify the user password and see if it meets the recommended requirements\n\t\t\t// for security reasons of course.\n\t\t\tString Pass;\n\n\t\t\tboolean check=false;\n\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\twhile(!check){\n\t\t\t\tSystem.out.println(\"Please recheck the password requirement and try again.\");\n\t\t\t\tPassword = input.next();\n\t\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\t}\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"\\nPlease re-enter the Password\");\n\t\t\t\tPass = input.next();\n\t\t\t\tif(!Pass.equals(Password))System.out.println(\"Passwords do not match!\");\n\t\t\t}while(!Pass.equals(Password));\n\t\t\tboolean CreateAccount = true;\n\t\t\tSystem.out.println(\"You need to fill the information for completion of your account registration\");\n\t\t\teditInfo(UserName,CreateAccount);\n\t\t\tPrintWriter output = new PrintWriter(accountInfo);\n\t\t\ttemp.add(UserName+\" \"+Password);\n\t\t\tfor (int i=0; i<temp.size(); i++){\n\t\t\t\toutput.println(temp.get(i));\n\t\t\t}\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Your account has been created and your information has been saved\"\n\t\t\t\t\t+ \"\\nYou have been logged out for this session\\n\");\n\t\t\tstarter();\n\t\t}\n\t\tcatch (java.io.IOException ex){\n\t\t\tSystem.out.println(\"I/O Errors: File is not found\");\n\t\t}\t\n\t}", "public static Account createNewAccount(String GID, String name) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t InputStream file = new FileInputStream(fileName);\r\n\t\t InputStream buffer = new BufferedInputStream(file);\r\n\t\t ObjectInput input = new ObjectInputStream(buffer);\r\n\t\t \r\n\t\t try {\r\n\t\t\t //deserialize the Account object\r\n\t\t\t Account recoveredAccount = (Account)input.readObject();\r\n\t\t\t currentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t }\r\n\t\t \r\n\t\t finally {\r\n\t\t \tinput.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t}\r\n\t}", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "@Test\n public void checkingAccount2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account checkingAccount = new CheckingAccount(bill, Account.CHECKING);\n bank.addCustomer(new Customer(\"Bill\").openAccount(checkingAccount));\n Transaction t = new CreditTransaction(1000.0);\n t.setTransactionDate(getTestDate(-5));\n checkingAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365.0, 5) * 1000 - 1000, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "public CoupleAccount(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public boolean add(String name, int amount)\r\n\t{\n\t\tif(!created)\r\n\t\t\tthis.name = name;\r\n\t\t// Add the specified amount\r\n\t\tdonated += amount;\r\n\t\t// Check if we need to upgrade their VIP status\r\n\t\tif((rank < 5) && (donated >= (vipData.getConfig().getInt(\"vip-costs.mafia\"))))\r\n\t\t{\r\n\t\t\trank = 5;\r\n\t\t\texpiration = 0;\r\n\t\t\tsave();\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse if((rank < 4) && (donated >= (vipData.getConfig().getInt(\"vip-costs.leader\"))))\r\n\t\t{\r\n\t\t\trank = 4;\r\n\t\t\texpiration = 0;\r\n\t\t\tsave();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse if((rank < 3) && (donated >= (vipData.getConfig().getInt(\"vip-costs.gang\"))))\r\n\t\t{\r\n\t\t\trank = 3;\r\n\t\t\texpiration = 0;\r\n\t\t\tsave();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse if((rank < 2) && (donated >= (vipData.getConfig().getInt(\"vip-costs.dealer\"))))\r\n\t\t{\r\n\t\t\trank = 2;\r\n\t\t\texpiration = System.currentTimeMillis() + (vipData.getConfig().getLong(\"vip-days.dealer\") * 1000L/*86400000L*/);\r\n\t\t\tsave();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse if((rank < 1) && (donated >= (vipData.getConfig().getInt(\"vip-costs.rat\"))))\r\n\t\t{\r\n\t\t\trank = 1;\r\n\t\t\texpiration = System.currentTimeMillis() + (vipData.getConfig().getLong(\"vip-days.rat\") * 86400000L);\r\n\t\t\tsave();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t// If no applicable update return false\r\n\t\treturn false;\r\n\t}", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "public Account(int id, double balance) {\n this();\n this.id = id;\n this.balance = balance;\n }", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "public static void main(String[] args) {\n SavingAccount savings = new SavingAccount(1112, 200);\r\n CheckingAccount checking = new CheckingAccount(1113, 200, -200);\r\n\r\n //account.setAnnualInterestRate(4.5);\r\n savings.setAnnualInterestRate(4.5);\r\n checking.setAnnualInterestRate(4.5);\r\n\r\n\r\n //account.withdraw(250);\r\n //account.deposit(30);\r\n //System.out.println(account.toString());\r\n\r\n\r\n\r\n\r\n checking.withdraw(250);\r\n checking.deposit(30);\r\n System.out.println(checking.toString());\r\n\r\n savings.withdraw(2504);\r\n savings.deposit(30);\r\n System.out.println(savings.toString());\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }", "public void createNewAccountWithOpeningBalanceHelper() {\n\t\tparseDateTextFieldHelper();\n\t\tBalance balance = data.createNewAccountWithOpeningBalance();\n\t\tLocalDate date = LocalDate.of(year, month, dayOfMonth);\n\t\tbalance.setDate(date);\n\t\tJTextField amount = data.getTextFieldBalance();\n\t\t// this before was not being set, i thought i set it in expectedResult but\n\t\t// that's a different object!\n\t\tbalance.setAmount(Float.parseFloat(amount.getText()));\n\t\t// I think you can actually just insert the values here instead if using get()\n\t\tBalance resultExpected = new Balance(bankTest, accountTest,\n\t\t\t\tdate.getYear(), date.getMonthValue(), date.getDayOfMonth(),\n\t\t\t\tFloat.parseFloat(amount.getText()), TEST_TXTR_EXTRA_NOTES);\n\t\tassertEquals(resultExpected, balance);\n\t}", "public BankAccount()\n {\n \t//intializing instance variables\n \t//at the time object creation constuctor executes \n \t\n \taccountHolderName=\"unknow\";\n \taccountBalance=0;\n \t\n }", "public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}", "InsufficientFunds(Account a) {\n balance = a.currentBalance();\n }", "public static void main(String[] args) \r\n\t{\n\t\tBank Reynolds_Bank = new Bank();\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.print(\"Please enter an account number, followed by a starting balance or type -1 to quit: \");\r\n\t\tint new_account_number = scan.nextInt();\r\n\t\tdouble new_account_balance = scan.nextDouble();\r\n\t\t\r\n\t\t//The while loop will check for the -1 in the new_account_number variable even if typed in at this beginning point\r\n\t\t//The user will have to type a second number anyway before the while will test for the -1 and quit\r\n\t\t//Note that typing a -1 for the very first value will result in a code error because the program\r\n\t\t//will attempt to do the procedures below the while loop concerning high and low bank accounts but\r\n\t\t//there are no accounts within the bank at such a point\r\n\t\twhile (new_account_number != -1)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tBankAccount New_Account = Reynolds_Bank.add_Account(new_account_number, new_account_balance);\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Please enter an amount to withdraw: \");\r\n\t\t\tdouble withdraw_amount = scan.nextDouble();\r\n\t\t\tSystem.out.print(\"Please enter an amount to deposit: \");\r\n\t\t\tdouble deposit_amount = scan.nextDouble();\r\n\t\t\t\r\n\t\t\tNew_Account.withdraw(withdraw_amount);\r\n\t\t\tNew_Account.deposit(deposit_amount);\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Please enter a new account number or -1 to quit: \");\r\n\t\t\tnew_account_number = scan.nextInt();\r\n\t\t\t\r\n\t\t\t//Leaves loop at this point if the new account number input is -1\r\n\t\t\t//Will not ask for a balance\r\n\t\t\tif (new_account_number == -1)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Please enter a balance for the new account: \");\r\n\t\t\tnew_account_balance = scan.nextDouble();\r\n\t\t}\r\n\t\t\r\n\t\tint Highest_Account_Number = Reynolds_Bank.get_HighBankAccount().getAccountNumber();\r\n\t\tdouble Highest_Account_Balance = Reynolds_Bank.get_HighBankAccount().getBalance();\r\n\t\t\r\n\t\tint Lowest_Account_Number = Reynolds_Bank.get_LowBankAccount().getAccountNumber();\r\n\t\tdouble Lowest_Account_Balance = Reynolds_Bank.get_LowBankAccount().getBalance();\r\n\t\t\r\n\t\tdouble High_Average = Reynolds_Bank.get_HighBankAccount().getAverage();\r\n\t\tdouble Low_Average = Reynolds_Bank.get_LowBankAccount().getAverage();\r\n\t\t\r\n\t\tSystem.out.println(\"Account with the Highest Balance: \");\r\n\t\tSystem.out.println(\"#\" + Highest_Account_Number + \", resulting balance = \" + Highest_Account_Balance + \", average transaction amount = \" + High_Average );\r\n\t\t\r\n\t\tSystem.out.println(\"Account with the Lowest Balance: \");\r\n\t\tSystem.out.println(\"#\" + Lowest_Account_Number + \", resulting balance = \" + Lowest_Account_Balance + \", average transaction amount = \" + Low_Average );\r\n\t\t\r\n\t\tscan.close();\r\n\t}", "Account() { }", "public StorageAccountCheckNameAvailabilityParametersInner withName(String name) {\n this.name = name;\n return this;\n }", "public Account create(CheckingAccDto checkingAccDto) {\n CheckingAcc checkingAcc;\n Optional<AccountHolder> accountHolder = accountHolderRepository.findById(checkingAccDto.getPrimaryOwnerId());\n if (accountHolder.isPresent()){\n if(Utils.calculateYears(accountHolder.get().getDateOfBirth())<24){\n StudentCheckingAcc studentCheckingAcc = new StudentCheckingAcc(\n accountHolder.get(),\n new Money(checkingAccDto.getBalance()),\n checkingAccDto.getSecretKey());\n if (checkingAccDto.getSecondaryOwnerId() != null){\n Optional<AccountHolder> secondaryOwner = accountHolderRepository.findById(checkingAccDto.getSecondaryOwnerId());\n if (secondaryOwner.isPresent()){\n studentCheckingAcc.setSecondaryOwner(secondaryOwner.get());\n }\n }\n return studentCheckingAccRepository.save(studentCheckingAcc);\n } else {\n checkingAcc = new CheckingAcc (accountHolder.get(),\n new Money(checkingAccDto.getBalance()),\n checkingAccDto.getSecretKey());\n if (checkingAccDto.getSecondaryOwnerId() != null){\n Optional<AccountHolder> secondaryOwner = accountHolderRepository.findById(checkingAccDto.getSecondaryOwnerId());\n if (secondaryOwner.isPresent()){\n checkingAcc.setSecondaryOwner(secondaryOwner.get());\n }\n }\n return checkingAccRepository.save(checkingAcc);\n }\n } else {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"Primary owner not found\");\n }\n }", "public Account()\n {\n balance = 0;\n balanceChangeLock = new ReentrantLock();\n sufficientFundsCondition = balanceChangeLock.newCondition();\n }", "public Payment(User to, User from, double cashAmount, String paymentName) {\n this.cashAmount = cashAmount;\n this.to = to;\n this.from = from;\n this.paymentName = paymentName;\n paymentID = rand.nextInt(max - min + 1) + min;\n }", "public Account(String number, double balance, String customerName, String customerEmail, String customerPhone) {\n // set the instance's field variables directly, and do NOT use the setters inside constructor.\n this.number = number;\n this.balance = balance;\n this.customerName = customerName;\n this.customerEmail = customerEmail;\n this.customerPhone = customerPhone;\n }", "@Override\n\tpublic void createBank(String bankName) {\n\t\tBank newBank = new Bank(bankName, new HashSet<Account>());\n\t\tcache.addToCache(newBank);\n\t\t\n\t}", "public static void createAccount(String name, String address, String contactNum, SavingsAccount savings) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, savings));\n\t}", "public static Account createNewAccount(String GID, String name, Context activity) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(activity.getFilesDir(), fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t FileInputStream fis = activity.openFileInput(fileName);\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAccount recoveredAccount = (Account) ois.readObject();\r\n\t\t\t\t\tcurrentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t\t\t}\r\n\t\t finally {\r\n\t\t \tois.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name, activity);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tLocale.setDefault(Locale.US);\r\n\t\t\r\n\t\t/*Account ac = new Account();\r\n\t\t 1-Manter essa instancia no inicio geraria erros pois os construtores pedem inicialização na CLASS account */\r\n\t\t\r\n\t\tAccount ac;//Declaramos acima pois será necessário utilizar fora do escopo dos construtores\r\n\t\t\r\n\t\tdouble deposit;\r\n\t\tSystem.out.print(\"Enter account number: \");\r\n\t\tint number=sc.nextInt();//2-Com isso devo criar novas variaveis \r\n\t\tSystem.out.print(\"Enter account holder: \");\r\n\t\tString holder=sc.next();\r\n\t\tSystem.out.print(\"Is the initial deposit(y/n)? \");\r\n\t\tchar response = sc.next().charAt(0);\r\n\t\tif (response=='y') {\r\n\t\t\tSystem.out.print(\"Enter initial deposite value: \");\r\n\t\t\tdeposit = sc.nextDouble();\r\n\t\t\tac = new Account(number,holder, deposit);/*Ponto de inicio do construtor pois ao escolher iniciar \r\n\t\t\tcom deposito ele inicia o metodo com parametos definidos*/\r\n\t\t} \r\n\t\telse {\r\n\t\t ac = new Account(number,holder);/*Poderia colocar o 0 no lugar do deposito mas como isso poderia gerar algum erro,a boa prática \r\n\t\t é fazer um outro metodo sobrecarga*/ \r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.printf(\"Account Data: %n\"+ac);\r\n\t\r\n\t\tSystem.out.println(\"Enter a deposit value:\");\r\n\t\tdeposit = sc.nextDouble();\r\n\t\tac.depositar(deposit); //Esse parametro objinstanciada.metodo(parametro) garante que o dado esta sendo armazendo no metodo\r\n\t\t\r\n\t\tSystem.out.printf(\"Updated Data: %n\"+ac);\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t\r\n System.out.println();\r\n\t\t\r\n\t\tSystem.out.println(\"Enter a withdraw value:\");\r\n\t\tdeposit = sc.nextDouble();\r\n\t\tac.saca(deposit);\r\n\t\t\r\n\t\tSystem.out.printf(\"Updated Data: %n\"+ac);\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tsc.close();\r\n\r\n\t\t\r\n\t}" ]
[ "0.7566508", "0.7297061", "0.71608824", "0.70085615", "0.68528664", "0.6829573", "0.6780334", "0.6764915", "0.6712807", "0.6640572", "0.66216546", "0.6594538", "0.651532", "0.6495882", "0.645846", "0.6457769", "0.64532155", "0.6429549", "0.63743794", "0.6326132", "0.63003725", "0.6289623", "0.6287416", "0.62088436", "0.6169431", "0.6147914", "0.61405593", "0.61358404", "0.6130518", "0.61181206", "0.61035323", "0.6077799", "0.6074947", "0.6049394", "0.6033591", "0.6016622", "0.5950158", "0.59466857", "0.59420466", "0.59357315", "0.5934051", "0.59314704", "0.5928434", "0.59210396", "0.5918926", "0.59166384", "0.5912388", "0.58930373", "0.5877529", "0.5864643", "0.5827143", "0.5826676", "0.58244085", "0.5817644", "0.57985324", "0.57921135", "0.57812357", "0.57593584", "0.5751094", "0.57475674", "0.57223433", "0.5709597", "0.57016295", "0.5701233", "0.56863195", "0.56832457", "0.56820065", "0.56585264", "0.56513494", "0.5646281", "0.5620776", "0.56126696", "0.55800545", "0.55570054", "0.55487657", "0.55335426", "0.5528662", "0.5523361", "0.55221975", "0.5521848", "0.5519405", "0.55162543", "0.5512445", "0.55117536", "0.5498495", "0.548265", "0.5476973", "0.54558074", "0.5441589", "0.5440293", "0.5438302", "0.5436604", "0.543243", "0.54094183", "0.5399397", "0.53986984", "0.5397774", "0.5388585", "0.53706044", "0.5369123" ]
0.79096496
0
Method: getType() Inputs: Returns: String "checking" Description: The method return a string "Checking".
public String getType() { return "Checking"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isTypeChecking() {\n return _typeChecking;\n }", "public String giveType(){\n if(isFull==false){\n return \"notfilled\";\n }\n else if(type==TYPE.BLACK){\n return \"BLACK\";\n }else{\n return \"WHITE\";\n }\n }", "default String getCheckName() {\n return getClass().getSimpleName();\n }", "public void check()\n {\n typeDec.check();\n }", "@Override\n\tpublic void printAccountType() {\n\t\tSystem.out.println(\"Checking\");\n\t}", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public String getCheckMethod() {\r\n return checkMethod;\r\n }", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "public String getCheckStatus() {\r\n return checkStatus;\r\n }", "public String type();", "public String getType() {return type;}", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType() { return type; }", "public CheckInOut getCheck() {\n\t\treturn check;\n\t}", "private String getType(){\r\n return type;\r\n }", "public TCheckSumType getCheckSumType() {\n\n\t\treturn checkSumType;\n\t}", "public String getCheckStatus() {\n\t\treturn checkStatus;\n\t}", "public String getCheckStatus() {\n\t\treturn checkStatus;\n\t}", "public String getType(){\n\treturn type;\n }", "abstract protected boolean checkType(String myType);", "type getType();", "public String getType(){\r\n return type;\r\n }", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public String getType()\n \t{\n \t\treturn this.type;\n \t}", "protected abstract String getType();" ]
[ "0.6584807", "0.6562745", "0.6385408", "0.6270798", "0.62290496", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.62086606", "0.6147582", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5992709", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5982267", "0.5941477", "0.5900518", "0.58741766", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58628255", "0.58079374", "0.57818156", "0.5780373", "0.5770924", "0.57672584", "0.57672584", "0.5767169", "0.5753609", "0.57508427", "0.5738124", "0.57252246", "0.57252246", "0.57252246", "0.57252246", "0.57252246", "0.57252246", "0.57252246", "0.57252246", "0.56984323", "0.56960684" ]
0.89614165
0
Method: createChecking(String name) Inputs: name Returns: The method return a new checking account with name. Description: The method create a new checking account with name.
public static Checking createChecking(String name) { return new Checking(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Checking(String name) {\r\n\t\tsuper(name);\r\n\t}", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public Checking(String name, float balance) {\r\n\t\tsuper(name, balance);\r\n\t}", "public CoinbaseAccount createCoinbaseAccount(String name) throws IOException {\n\n class Payload {\n @JsonProperty\n String name;\n Payload(String name) {\n this.name = name;\n }\n }\n \n Payload payload = new Payload(name);\n\n String path = \"/v2/accounts\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String body = new ObjectMapper().writeValueAsString(payload);\n String signature = getSignature(timestamp, HttpMethod.POST, path, body);\n showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);\n \n return coinbase.createAccount(MediaType.APPLICATION_JSON, Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp, payload).getData();\n }", "public CheckingAccount() {\n\t\tsuper();\n\t}", "public void setCheckingAccount(BankAccount newChecking) {\n this.checkingAccount = newChecking;\n }", "public Checking(String name, String ssn, double initDeposit) {\n\t\tsuper(name, ssn, initDeposit);\n\t\t\n\t\tSystem.out.println(\"Checking\");\n\t\tSystem.out.println(\"SSN: *****\\\" + ssn.substring(5)\");\n\t\tSystem.out.println(\"Current balance: \" + balance + \"\\n\");\n\t}", "private String createAccount(String name, double amount) {\n\t\tString accountNumber = \"\";\n\t\tAccount account = new Account();\n\t\taccount.setName(name);\n\t\taccount.setAmount(amount);\n\t\t\n\t\tString requestBody = gson.toJson(account);\n\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.post(\"/account\");\n\t\tif (response.asString() != null && response.asString().contains(\":\")) {\n\t\t\tString responseArr[] = response.asString().split(\":\");\n\t\t\taccountNumber = responseArr[1].trim();\n\t\t}\n\t\treturn accountNumber;\n\t}", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "private void insert(String name, boolean checkBalance)\r\n\t{\r\n\t\t// Create the Node with the given String\r\n\t\tNode newNode = new Node(name);\r\n\t\t\r\n\t\t// Check to see if the Tree is currently empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Add the Node by setting the root to point to it and increment counter\r\n\t\t\tsetRoot(newNode);\r\n\t\t\tincrementCounter();\r\n\t\t}\r\n\t\t// Tree is not empty so use the insert helper to place the Node in the correct spot\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Passing the Root reference as the starting point for the Node insertion\r\n\t\t\t// as well as the reference to the newly created Node\r\n\t\t\tinsert(getRoot(), newNode);\r\n\t\t\t\r\n\t\t\t// Balance the tree only if necessary - ie. checkBalance is true and\r\n\t\t\t// the current depth of the tree is greater than what it should be based on \r\n\t\t\t// the total amount of Nodes in the tree\r\n\t\t\tif(checkBalance && depth() > howManyLevels())\r\n\t\t\t{\r\n\t\t\t\t// Call the balance method to balance the tree\r\n\t\t\t\tbalance();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static Account createNewAccount(String GID, String name) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t InputStream file = new FileInputStream(fileName);\r\n\t\t InputStream buffer = new BufferedInputStream(file);\r\n\t\t ObjectInput input = new ObjectInputStream(buffer);\r\n\t\t \r\n\t\t try {\r\n\t\t\t //deserialize the Account object\r\n\t\t\t Account recoveredAccount = (Account)input.readObject();\r\n\t\t\t currentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t }\r\n\t\t \r\n\t\t finally {\r\n\t\t \tinput.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t}\r\n\t}", "Account create();", "public long createcomp(String name, String bal) {\n\t\tContentValues cv2=new ContentValues();\n\t\tcv2.put(Com_Name, name);\n\t\tcv2.put(Com_Balance, Integer.parseInt(bal));\n\t\treturn ourDatabase.insert(DATABASE_TABLE1, null, cv2);\n\t\t\n\t}", "public Account create(CheckingAccDto checkingAccDto) {\n CheckingAcc checkingAcc;\n Optional<AccountHolder> accountHolder = accountHolderRepository.findById(checkingAccDto.getPrimaryOwnerId());\n if (accountHolder.isPresent()){\n if(Utils.calculateYears(accountHolder.get().getDateOfBirth())<24){\n StudentCheckingAcc studentCheckingAcc = new StudentCheckingAcc(\n accountHolder.get(),\n new Money(checkingAccDto.getBalance()),\n checkingAccDto.getSecretKey());\n if (checkingAccDto.getSecondaryOwnerId() != null){\n Optional<AccountHolder> secondaryOwner = accountHolderRepository.findById(checkingAccDto.getSecondaryOwnerId());\n if (secondaryOwner.isPresent()){\n studentCheckingAcc.setSecondaryOwner(secondaryOwner.get());\n }\n }\n return studentCheckingAccRepository.save(studentCheckingAcc);\n } else {\n checkingAcc = new CheckingAcc (accountHolder.get(),\n new Money(checkingAccDto.getBalance()),\n checkingAccDto.getSecretKey());\n if (checkingAccDto.getSecondaryOwnerId() != null){\n Optional<AccountHolder> secondaryOwner = accountHolderRepository.findById(checkingAccDto.getSecondaryOwnerId());\n if (secondaryOwner.isPresent()){\n checkingAcc.setSecondaryOwner(secondaryOwner.get());\n }\n }\n return checkingAccRepository.save(checkingAcc);\n }\n } else {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"Primary owner not found\");\n }\n }", "public StorageAccountCheckNameAvailabilityParametersInner withName(String name) {\n this.name = name;\n return this;\n }", "@Test\n\tpublic void createAccountChequingTest() {\n\t\trdbtnChequing.setSelected(true); // by default AddAccountDialog will\n\t\t\t\t\t\t\t\t\t\t\t// select this to be true, for\n\t\t\t\t\t\t\t\t\t\t\t// testing reset to fault\n\t\tdata.setRdbtnChequing(rdbtnChequing);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.CHEQUING.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "public BankAccount getCheckingAccount() {\n return checkingAccount;\n }", "public Checking(String name, String sSN, double initDeposit) {\n\t\tsuper(name,sSN,initDeposit);\n\t\taccountNumber = \"2\" + accountNumber;\n\t\tsetDebitCard();\n\t}", "default Check instantiateCheck(Class<? extends Check> checkCls) {\n try {\n return checkCls.newInstance();\n } catch (InstantiationException | IllegalAccessException | NullPointerException e) {\n String checkName = (checkCls != null) ? checkCls.getSimpleName() : \"null\";\n throw new IllegalArgumentException(\"Could not instantiate specified check '\" + checkName + \"'.\", e);\n }\n }", "public static Account createNewAccount(String GID, String name, Context activity) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(activity.getFilesDir(), fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t FileInputStream fis = activity.openFileInput(fileName);\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAccount recoveredAccount = (Account) ois.readObject();\r\n\t\t\t\t\tcurrentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t\t\t}\r\n\t\t finally {\r\n\t\t \tois.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name, activity);\r\n\t\t}\r\n\t}", "public CheckingAccount() {\n super(); \n }", "protected VendorCheck createVendorCheck() {\r\n VendorCheck vendorCheck = new VendorCheck();\r\n vendorCheck.setVendorCheckId(new Long(99999));\r\n return vendorCheck;\r\n }", "int createAccount(Account account);", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "private String createUser(String name) {\n\t\treturn null;\n\t}", "@GetMapping(path = \"create/{name}\", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public String createUser(Authentication authentication, @PathVariable String name) {\n User user = new User();\n user.setUsername(name);\n user.setMail(name + \"@gmail.com\");\n //todo to add it in Factory !\n // log.info(repository.createUser(user).toString());\n return \"Create user with id :\" + user.getId();\n }", "public CheckingAccount(String n) {\n super(n);\n balance = 0;\n }", "public static void createChecking(ArrayList<Account> accounts, int id, double balance, double interestRate) throws IOException{\n CheckingAccount cAccount = new CheckingAccount(id, balance, interestRate);\r\n \r\n //add the account just created to array\r\n accounts.add(cAccount);\r\n System.out.println(\"Your account has been created. Information of your new account is below. \\n\");\r\n \r\n //get the current index of the id and print out the info\r\n int idIndex = idIndex(accounts, cAccount.getID());\r\n System.out.println(\"Account type: Checking\");\r\n accounts.get(idIndex).displayAccountInformation();\r\n }", "public static void createAccount(String name, String address, String contactNum, SavingsAccount savings) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, savings));\n\t}", "public void setCheckedName(String name) {\n \n boolean checked = true;\n setCheckedName(name, checked);\n }", "ChecklistFactory getChecklistFactory();", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "private void createCheckingAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE checkingAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 1000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table checkingAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of checkingAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "public CreatePricingRuleRequest withName(String name) {\n setName(name);\n return this;\n }", "default void checkIn(String name, HealthStatus status) {\n }", "public CheckBox(String name) {\n \t\tthis(name, \"unspecified\");\n \t}", "abstract Checker newChecker(int x, int y);", "default void checkInOk(String name) {\n }", "public static void main (String[] args)\r\n{\nAccount a = new SavingsAccount(\"john\",500,4);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+a.getName()+\"has an initial balance of:\"+a.getBalance());\r\na.deposit(200);\r\na.withdraw(200);\r\nSystem.out.println(\"\"+a.getName()+\"at the end of transaction has a balance of \"+a.getBalance());\r\n\r\nSystem.out.println(\"\\n checking account details\");\r\nSystem.out.println(\"----------------------\");\r\nCheckingAccount cAobj = new CheckingAccount(\"Stephen\",200,200);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+cAobj.getName()+\"has an initial balance of:\"+cAobj.getBalance());\r\ncAobj.deposit(200);\r\ncAobj.withdraw(500);\r\nSystem.out.println(\"\"+cAobj.getName()+\"at the end of transaction has a balance of \"+cAobj.getBalance());\r\n}", "private final void createAndAddNode(String name) {\n\t}", "private void createGame(String name){\n\n }", "public Account(String name, String idNum) {\n\t\tthis.name = name;\n\t\tthis.idN = idNum;\n\t\tsetRate();\n\n\t\t//create Account Number\n\t\tthis.accountNumber = createAccountNumber();\n\t\t//create Password for login bank\n\t\tthis.password = createPw();\n\t\t\n\t}", "@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 newQuest(String name) {\n\t\t//Prevent NullPointerExcpetions\n\t\tif (name == null) {\n\t\t\tbakeInstance.getLogger().info(\"[Bake] Null name for new generated quest. Falling back to default quest selection.\");\n\t\t\tnewQuest();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (QuestCfg.getString(\"quests.\" + name + \".type\", \"N/A\").equals(\"N/A\")) {\n\t\t\tbakeInstance.getLogger().info(\"[Bake] Invalid name (\" + name + \") for new generated quest. Falling back to default quest selection.\");\n\t\t\t//Invalid quest name\n\t\t\tnewQuest();\n\t\t} else {\n\t\t\t//Valid quest name\n\t\t\tactiveQuest = new Quest(QuestCfg, name);\n\t\t}\n\t}", "@org.testng.annotations.Test(dataProvider = \"createUser\", dataProviderClass = Service1DataProvider.class)\n public void createUserWithDP(String name, String job) {\n Response response = regressionClient.createUser(name, job);\n dbAssist.responseValidation(response, name, job);\n }", "public boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;", "public BankAccount lookUp(String name){\n\t\t// create an Entry with the given name, a \"dummy\" accountNumber (1) and zero balance\n\t\t// This \"dummy\" accountNumber will be ignored when executing getData\n\t\tBankAccount lookFor = new BankAccount(name, 1, 0);\n\t\treturn (BankAccount)namesTree.findData(lookFor);\n\t}", "private static Player create(String playername) throws GameException {\n\t\ttry {\n\t\t\treturn (Player) createObject(playername);\n\t\t} catch (Exception e) {\n\t\t\tthrow new GameException(\"Player \" + playername + \" not found\");\n\t\t}\n\t}", "public CoupleAccount(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public Cook(String name) {\n\t\tthis.name = name;\n\t}", "public void createUserAccount(UserAccount account);", "void create(GameLogic gameLogic);", "public Checking(String firstName, String lastName, int accountNumber, double accountBalance) {\n\t\tsuper(firstName, lastName, accountNumber, accountBalance);\n\t\t\n\t}", "public CheckingAccount()\n {\n withdrawals = 0;\n deposits = 0;\n }", "public final void serviceCheck(final String checkName, final Integer status,\n final JSONObject builddata) {\n logger.fine(String.format(\"Sending service check '%s' with status %s\", checkName, status));\n\n // Build payload\n JSONObject payload = new JSONObject();\n payload.put(\"check\", checkName);\n payload.put(\"host_name\", builddata.get(\"hostname\"));\n payload.put(\"timestamp\", System.currentTimeMillis() / this.THOUSAND_LONG); // current time in s\n payload.put(\"status\", status);\n payload.put(\"tags\", assembleTags(builddata));\n\n post(payload, this.SERVICECHECK);\n }", "public BankAccount(double checkingBalance, double savingsBalance) {\r\n\t\tthis.checkingBalance = checkingBalance;\r\n\t\tthis.savingsBalance = savingsBalance;\r\n\t\taccountsCount++;\r\n\t\ttotalAmount += checkingBalance;\r\n\t\ttotalAmount += savingsBalance;\r\n\t}", "public static void createAccount()throws IOException{\n\t\ttry{\n\t\t\tFile accountInfo = new File(\"account.txt\");\n\t\t\tFile Information = new File(\"information.txt\");\n\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\tArrayList<String> info = new ArrayList<String>();\n\t\t\tScanner inputFromInformation = new Scanner(Information);\n\t\t\tScanner inputFromAccount = new Scanner(accountInfo);\n\t\t\twhile (inputFromAccount.hasNextLine()){\n\t\t\t\ttemp.add(inputFromAccount.nextLine());\n\t\t\t}\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\t// This is where we will start the new account process\n\t\t\t// first by telling us who you are.\n\t\t\tSystem.out.println(\"Enter your First Name\");\n\t\t\tString firstName = input.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter your Last Name\");\n\t\t\tString lastName = input.next();\n\t\t\t// This will give the user recommended\n\t\t\t// user names if they cannot think of one.\n\t\t\tRecommendedUserNames(firstName,lastName);\n\t\t\t// here they will be prompt to enter their preferred user name\n\t\t\tSystem.out.println(\"Enter your preferred username\");\n\t\t\tString UserName = input.next();\n\t\t\t// This will prompt the user for a password\n\t\t\t// The password will have to meet these requirements\n\t\t\tSystem.out.println(\"Your password should meet the following requirements:\");\n\t\t\tSystem.out.println(\"-It must have at least eight characters.\\n-It must consist of only letters and digits.\"\n\t\t\t\t\t\t\t+ \"\\n-It must contain more than two digits and two characters.\");\n\t\t\tSystem.out.println(\"\\nEnter your new Password\");\n\t\t\tString Password = input.next();\n\t\t\t\n\t\t\t// this is what will verify the user password and see if it meets the recommended requirements\n\t\t\t// for security reasons of course.\n\t\t\tString Pass;\n\n\t\t\tboolean check=false;\n\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\twhile(!check){\n\t\t\t\tSystem.out.println(\"Please recheck the password requirement and try again.\");\n\t\t\t\tPassword = input.next();\n\t\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\t}\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"\\nPlease re-enter the Password\");\n\t\t\t\tPass = input.next();\n\t\t\t\tif(!Pass.equals(Password))System.out.println(\"Passwords do not match!\");\n\t\t\t}while(!Pass.equals(Password));\n\t\t\tboolean CreateAccount = true;\n\t\t\tSystem.out.println(\"You need to fill the information for completion of your account registration\");\n\t\t\teditInfo(UserName,CreateAccount);\n\t\t\tPrintWriter output = new PrintWriter(accountInfo);\n\t\t\ttemp.add(UserName+\" \"+Password);\n\t\t\tfor (int i=0; i<temp.size(); i++){\n\t\t\t\toutput.println(temp.get(i));\n\t\t\t}\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Your account has been created and your information has been saved\"\n\t\t\t\t\t+ \"\\nYou have been logged out for this session\\n\");\n\t\t\tstarter();\n\t\t}\n\t\tcatch (java.io.IOException ex){\n\t\t\tSystem.out.println(\"I/O Errors: File is not found\");\n\t\t}\t\n\t}", "public String toString() {\r\n\t\treturn \"Checking: \" + getName() + \": \" + getBalance();\r\n\t}", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "public static IChecklist createChecklist(InputStream in) throws OcilException {\r\n \treturn new Checklist(in);\r\n }", "public String getType() { return \"Checking\"; }", "public Checking_Account (int account_num, double initial_balance, Savings_Account protection)\r\n {\r\n\r\n super (account_num, initial_balance);\r\n overdraft = protection;\r\n\r\n }", "public Account(String accountName) throws AccountException{\n\n\t\t\tif (accountName.length() < 5)\n\t\t\t\tthrow new AccountException (AccountException.NAME_TOO_SHORT, accountName);\n\t\t\tboolean valid = true;\n\t\t\tchar[] a = accountName.toCharArray();\n\t\t\tfor (char c: a) {\n\t\t\t\tvalid = ((c >= 'a') && (c <= 'z')) ||\n\t\t\t\t\t\t((c >= 'A') && (c <= 'Z')) ||\n\t\t\t\t\t\t((c >= '0') && (c <= '9'));\n\t\t\t\tif (!valid) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!valid) throw new AccountException (AccountException.NAME_TOO_SIMPLE, accountName);\n\t\t\tthis.name = accountName;\n\t}", "public BankAccount createAccount(String name, String pin, int initialDeposit) {\n\t\tString accountNumber = \"\";\n\n\t\tString sql = \"INSERT INTO accounts (id, name, pin, balance, balance_saving) VALUES(?, ?, ?, ?, ?)\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// not sure why this was changed, but the database should of been auto-incrementing id\n\t\t\tpstmt.setInt(1, getNumAccounts() + 1);\n\t\t\tpstmt.setString(2, name);\n\t\t\tpstmt.setString(3, pin);\n\t\t\tpstmt.setInt(4, initialDeposit);\n\t\t\tpstmt.setInt(5, 0);\n\n\t\t\tpstmt.executeUpdate();\n\t\t\tResultSet genky = pstmt.getGeneratedKeys();\n\t\t\taccountNumber = Long.toString(genky.getLong(1));\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn authenticateAccount(accountNumber, pin);\n\t}", "public boolean checkName(String name)\n {\n return true;\n }", "public Check(int tId, int tCount, double tAmt, int checkNumber) {\n super(tId, tCount, tAmt);\n this.checkNumber = checkNumber;\n }", "public interface CheckInstantiator {\n /**\n * Gets a check instance by first checking the entity dictionary for a mapping on the provided identifier.\n * In the event that no such mapping is found the identifier is used as a canonical name.\n * @param dictionary the entity dictionary to search for a mapping\n * @param checkName the identifier of the check to instantiate\n * @return the check instance\n * @throws IllegalArgumentException if there is no mapping for {@code checkName} and {@code checkName} is not\n * a canonical identifier\n */\n default Check getCheck(EntityDictionary dictionary, String checkName) {\n Class<? extends Check> checkCls = dictionary.getCheck(checkName);\n return instantiateCheck(checkCls);\n }\n\n /**\n * Instantiates a new instance of a check.\n * @param checkCls the check class to instantiate\n * @return the instance of the check\n * @throws IllegalArgumentException if the check class cannot be instantiated with a zero argument constructor\n */\n default Check instantiateCheck(Class<? extends Check> checkCls) {\n try {\n return checkCls.newInstance();\n } catch (InstantiationException | IllegalAccessException | NullPointerException e) {\n String checkName = (checkCls != null) ? checkCls.getSimpleName() : \"null\";\n throw new IllegalArgumentException(\"Could not instantiate specified check '\" + checkName + \"'.\", e);\n }\n }\n}", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "public static IChecklist createChecklist(OCILType ocil) throws OcilException {\r\n \treturn new Checklist(ocil);\r\n }", "public Bike(Name name) {\n requireAllNonNull(name);\n this.name = name;\n\n this.status = BikeStatus.AVAILABLE;\n }", "public void checkMakeFile(String name) throws FileExistsException\n\t{\n\t\tIterable<Position<FileElement>> toCheck = fileSystem.children(currentFileElement);\n\t\tif (toCheck != null)\n\t\t{\n\t\t\tfor (Position<FileElement> fe : toCheck )\n\t\t\t{\n\t\t\t\tif (fe.toString().equals(name))\n\t\t\t\t{\n\t\t\t\t\tthrow new FileExistsException(name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testCreateAdminAccountWithTakenUsername() {\n\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(USERNAME1, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"This username is not available.\", error);\n\t}", "public String checkUsername() {\n String username = \"\"; // Create username\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n username = checkEmpty(\"Account\"); // Call method to check input of username\n boolean isExist = false; // Check exist username\n for (Account acc : accounts) {\n // If username is exist, print out error\n if (username.equals(acc.getUsername())) {\n System.out.println(\"This account has already existed\");\n System.out.print(\"Try another account: \");\n isExist = true;\n }\n }\n // If username not exist then return username\n if (!isExist) {\n return username;\n }\n }\n return username; // Return username\n }", "public ContainsNamedTypeChecker(String name) {\n myNames.add(name);\n }", "public void init( String checkingAccountId )\n {\n sourceAccount = rolePlayer( SourceAccount.class, CheckingAccountEntity.class, checkingAccountId );\n }", "public NotChecker(Checker chk1)\n {\n checker1 = chk1;\n }", "public int createNewStaff(String name, String branch) {\n clickOnBtn(ActionsEnum.Create.name());\n fillCreateOrEditForm(name, branch);\n clickOnBtn(ActionsEnum.Save.name());\n waitForElementInvisibility(xpathBtn.replace(\"*btn*\", ActionsEnum.Save.name()));\n int id = getMaxId();\n logger.info(\"# Newly Created Staff's Id: \" + id);\n return id;\n }", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "@Test\n\tpublic void testCreateAdminAccountWithEmptyName() {\n\t\tString name = \"\";\n\t\tString username = \"Catherine\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, PASSWORD1, name);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Name cannot be empty.\", error);\n\t}", "public static void addCheck(String property, CHECK check) {\n HealthCheck.checks.put(property, new CheckState(check));\n }", "private void createAccount(String username, String passphrase, String email) {\n\tif (!AccountManager.getUniqueInstance().candidateUsernameExists(username)) {\n\t try {\n\t\tAccountManager.getUniqueInstance().createCandidateAccount(username, \n\t\t\t\t\t\t\t\t\t passphrase, \n\t\t\t\t\t\t\t\t\t email);\n\t } catch (Exception e) {\n\t\tthrow new RuntimeException(\"creation failed\");\n\t }\n\t} else {\n\t throw new RuntimeException(\"username already exists\");\n\t}\n }", "public void create(UserValidator account) {\n Account validated = new Account();\n validated.setUsername(account.getUsername());\n validated.setPassword(passwordEncoder.encode(account.getPassword()));\n validated.setFirstName(account.getFirstName());\n validated.setLastName(account.getLastName());\n validated.getAuthorities().add(\"USER\");\n\n this.accountRepository.save(validated);\n }", "public Account(String GID, String name) {\r\n\t\r\n\t\tthis.GID = GID;\r\n\t\tthis.name = name;\r\n\t\tevents = new ArrayList<Event>();\r\n\t\tpastRelations = new ArrayList<Account>();\r\n\t\tsettings = new ArrayList<String>();\r\n\t}", "public static IChecklist createChecklist(File f) throws OcilException {\r\n \treturn new Checklist(f);\r\n }", "public PreApprovalHolderBuilder withName(String name) {\n this.name = name;\n return this;\n }", "public Account(String name, String email) {\n this.name = name;\n this.email = email;\n }", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public String createName() {\r\n\r\n boolean donePickingName = false;\r\n String inputName =\"\";\r\n \r\n while (donePickingName == false) {\r\n System.out.println(\"\\nWHAT IS YOUR NAME?\");\r\n System.out.print(\"NAME: \");\r\n inputName = scan.next();\r\n \r\n System.out.println(\"You chose \" + \"'\" + inputName + \"'\" + \" as your name.\\n\");\r\n System.out.println(\"Hello \" + inputName + \"!\");\r\n System.out.println(\"This will be your name through the whole game, do you want to keep it?\\n\"\r\n + \"YES/NO\");\r\n System.out.print(\"ACTION: \");\r\n\r\n String actionInput;\r\n actionInput = scan.next().substring(0, 1);\r\n\r\n if (actionInput.equalsIgnoreCase(\"n\")) {\r\n donePickingName = false;\r\n }\r\n if (actionInput.equalsIgnoreCase(\"y\")) {\r\n System.out.println(\"\\nYou chose to keep your name\");\r\n donePickingName = true;\r\n } else {\r\n System.out.println(\"\\n'\" + actionInput + \"'\" + \" is not a valid option... Try again.\");\r\n }\r\n \r\n }\r\n return inputName;\r\n }", "public interface CheckingService {\n// /**\n// * 登录\n// * @param login_account\n// * @param password\n// * @return\n// */\n// Map<String,Object>Login(String login_account, String password);\n\n List<Checking> getChecking();\n\n List<Checking> get(String account);\n\n List<String>getAllAccount();\n\n int insert(Login logins);\n\n int[] bachIntsert(List<Integer> check_id);\n\n int[] bachDelete(List<Integer> check_id);\n\n List<Checking> queryLike(String keywords);\n\n List<Checking> queryBy(String condition);\n}", "private boolean createEmployeeAvailability(String name) {\n int empID;\n empID = findEmployee(name);\n\n String employeeAvailablitySQL = \"INSERT INTO empAvailability(empID, availability) values(\" +\n \"'\" + empID + \"'\" + \",\" +\n \"'000,000,000,000,000,000,000')\";\n return (database.updateDatabase(employeeAvailablitySQL));\n }", "Thing createThing();", "public void setAccountHolderName(String accountHolderName) {\r\n this.accountHolderName = accountHolderName;\r\n }", "public String createAccount(Account account){\n try {\n List<Account> accounts = new ArrayList<>();\n\n if(!accountsFile.createNewFile()){\n accounts = mapper.readValue(accountsFile, new TypeReference<ArrayList<Account>>(){});\n }\n List<Account> customerAccounts = getAccountsForUSer(accounts, account.getCustomerName());\n if(!customerAccounts.stream().anyMatch(a -> a.getAccountName().equals(account.getAccountName()))){\n accounts.add(account);\n mapper.writerWithDefaultPrettyPrinter().writeValue(accountsFile, accounts);\n } else {\n return messageService.accountAlreadyExist(account.getCustomerName(), account.getAccountName());\n }\n } catch (Exception e) {\n return messageService.unexpectedError(e);\n }\n return messageService.accountCreated(account.getAccountName(), account.getCustomerName());\n }", "public String createFamily(String name);", "default String getCheckName() {\n return getClass().getSimpleName();\n }", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "private void doCreateNewPartner() {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"***Hors Management System:: System Administration:: Create new partner\");\n Partner partner = new Partner();\n System.out.print(\"Enter partner username:\");\n partner.setName(sc.nextLine().trim());\n System.out.print(\"Enter partner password;\");\n partner.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Partner>> constraintViolations = validator.validate(partner);\n\n if (constraintViolations.isEmpty()) {\n partner = partnerControllerRemote.createNewPartner(partner);\n System.out.println(\"New partner created successfully\");\n } else {\n showInputDataValidationErrorsForPartner(constraintViolations);\n }\n\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ComplianceCheckResult addNewComplianceCheckResult();" ]
[ "0.68053883", "0.59979504", "0.5978651", "0.5781694", "0.5704448", "0.56754285", "0.5603489", "0.54910815", "0.5434576", "0.5425367", "0.5367224", "0.5357025", "0.53512204", "0.5340686", "0.53291255", "0.5318343", "0.53071284", "0.5271788", "0.5228858", "0.52260137", "0.5204751", "0.5168091", "0.5158941", "0.51488554", "0.51292956", "0.5118763", "0.5062699", "0.5025131", "0.5019408", "0.5017852", "0.49973047", "0.49596944", "0.4933035", "0.49295825", "0.49245617", "0.4919446", "0.49121454", "0.49080452", "0.4907267", "0.48961034", "0.4880486", "0.4871079", "0.485459", "0.485077", "0.4839653", "0.48355934", "0.48306802", "0.48283583", "0.48229736", "0.48205796", "0.48045453", "0.48028085", "0.4802696", "0.47942078", "0.47928694", "0.479223", "0.47876346", "0.47867414", "0.47862682", "0.47857267", "0.47812527", "0.47780216", "0.47773173", "0.4771116", "0.4760327", "0.47575584", "0.4751756", "0.4750583", "0.47493905", "0.4719153", "0.47188297", "0.47128287", "0.4704215", "0.47013748", "0.46846086", "0.46823186", "0.46749648", "0.46572796", "0.4648705", "0.46482497", "0.46383715", "0.46379554", "0.46302426", "0.462779", "0.46235538", "0.46219185", "0.4612862", "0.4608277", "0.46019384", "0.4593417", "0.45901945", "0.45878327", "0.45868796", "0.4583956", "0.45782655", "0.45771033", "0.45768338", "0.45760208", "0.45693555", "0.45685327" ]
0.7938037
0
Method: deposit(float amount) Inputs: amount Returns: boolean Description: The method deposit money into account by specific amount. A deposit may be made unless the Checking account is closed
public boolean deposit(float amount) { if (getState() != State.CLOSED && amount > 0.0f) { balance = balance + amount; if (balance >= 0.0f) { setState(State.OPEN); } return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean deposit(float amount);", "public boolean deposit(double amount) {\n if (amount>0) {\n setBalance(this.balance + amount);\n return true;\n }\n return false;\n }", "@Override\n public boolean deposit(Account account, BigDecimal amount) {\n return false;\n }", "public void deposit(double amount){\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be deposited\");\n }\n else{\n balance += amount;\n savingTransactions[arrayLocation]= \"Deposit into savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n }", "public boolean depositAmount(float amount) {\n\t\treturn dao.depositAmount(amount);\r\n\t}", "public boolean deposit(double amount) {\n if (amount < 0) {\n return false;\n }\n value += amount;\n return true;\n }", "public void deposit (int amount) {\n if (amount >= 0) {\n balance = balance + amount;\n valueDeposits = valueDeposits + amount;\n if (balance > maximumBalance) {\n maximumBalance = balance;\n }\n }\n }", "public void deposit (double amount) {\r\n\t\t\r\n\t\tbalance=balance+amount;\r\n\t\tif(balance > 0) {\r\n\t\t\t\r\n\t\t\toverDrawn = false;\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void deposit(double amount) {\n try {\n doDepositing(amount);\n } catch (BankException e) {\n System.out.println(e.getMessage());\n }\n }", "public void deposit(double amount)\n {\n balance = balance + amount;\n }", "@Override\r\n\tpublic void deposit(int amount) {\n\t\t\r\n\t}", "public boolean deposit(Account account, double amount) {\n\t\t\n\t\tint index = find(account);\n\t\t\n\t\tif (account == null || index == -1 || amount < 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\taccounts[index].credit(amount);\n\t\t\n\t\treturn true;\n\t\t\n\t}", "public void deposit(double amount)\n {\n balanceChangeLock.lock();\n try\n {\n System.out.print(\"Depositando \" + amount);\n double newBalance = balance + amount;\n System.out.println(\", novo saldo igual a \" + newBalance);\n balance = newBalance;\n sufficientFundsCondition.signalAll();\n }\n finally\n {\n balanceChangeLock.unlock();\n }\n }", "void depositByCash(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tbalance += amount;\n\t\tSystem.out.println(\"Deposit \" + amount + \" successfully\");\n\t}", "public boolean deposit(Account account, double amount) {\n int accountPosition = find(account);\n if (accountPosition == -1) {\n return false;\n }\n accounts[accountPosition].credit(amount);\n return true;\n }", "public void deposit( double amount ) throws Exception\n\t{\n // TODO\n // deposit amount of money, if it is legal/valid amount\n\t\tif(amount >= 0.0)\n\t\t\tbalance += amount;\n\t\telse\n\t\t\tthrow new Exception(\"Invalid Deposite Amount\");\n\t}", "protected void deposit(double amount)\n\t{\n\t\tacc_balance+=amount;\n\t}", "public void deposit(double amount) \n\t{\n\t\tbalance += amount;\n\t}", "void deposit(double amount){\r\n\t\t//add to the current balance the amount\r\n\t\t setBalance(getBalance() + amount);\r\n\t }", "public void deposit(double amount){\n\t\tbalance += amount;\n\t}", "public void depositMoney(double amount, boolean checkingAccount) {\n if (checkingAccount) {\n checkingBalance += amount;\n totalBalance += amount;\n } else {\n savingsBalance += amount;\n totalBalance += amount;\n }\n }", "public boolean deposit(double depositAmount) {\n\t\tif (depositAmount <= 0) return false; // Special case: can't deposit negative money\n\t\tbalance += depositAmount;\n\t\treturn true;\n\t}", "public void depositMoney(double amount) {\n\t\tif (amount>=0){\n\t\t\tsetBalance(getBalance() + amount);\n\t\t}else{\n\t\t\tSystem.out.println(\"You can not deposit a negative value!\");\n\t\t}\n\t\t\n\t}", "public void deposit (double amount)\n {\n imposeTransactionFee ();\n super.deposit (amount);\n }", "public static void deposit() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t//Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number:\");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to deposit in cents:\");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt()) amount = Integer.parseInt(Quinterac.s.nextLine());\n\t\t\t\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckDepositValid(accNum, amount);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckDepositValid(accNum, amount);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void deposit(double amount)\t{\n\t\tbalance = balance + amount;\n\t\tbalance = Math.round(balance * 100.0) / 100.0;\n\t}", "public void deposit(double amount) {\n\t\tbalance += amount;\n\t}", "public void deposit(double amount) {\n\t\tbalance += amount;\n\t}", "public void deposit(int amountToDeposit) {\n if (amountToDeposit > 0) {\n balance = balance + amountToDeposit;\n }\n }", "@Override\n\tpublic int deposit(double amount) throws RaiseException {\n\t\tValidator.validateDeposit(amount);\n\t\tif(amount < 0) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\tthis.setBalance(this.getBalance() + amount);\n\t\t\t\n\t\t\t//create a transaction and adding it to the list of transactions of this account \n\t\t\tTransaction tmpTransaction = new Transaction(amount, EnumTypeTransaction.deposit);\n\t\t\tthis.addTransaction(tmpTransaction);\n\t\t\t\n\t\t\treturn 1;\n\t\t}\n\t}", "private static void deposite (double amount) {\n double resultDeposit = balance + amount;\r\n System.out.println(\"Deposit successful.\\nCurrent balance: \" + \"$\" + resultDeposit+ \".\");\r\n }", "public boolean deposit(long id, String password, String currency, double amount);", "public void deposit(double amount)\n {\n startingBalance += amount;\n }", "@Override\n public void deposit(double amount) {\n double balance = getBalance();\n setBalance(balance+amount);\n }", "public boolean debit(double amount) throws InsufficientFundsException,InvalidAmountException {\r\n\t\tif (getAmount() + overdraftBalance < amount){\r\n\t\t\tthrow new InsufficientFundsException(\"Insufficient funds to withdraw the amount.\");\r\n\t\t}\r\n\t\tif (amount <= 0){\r\n throw new InvalidAmountException(\"Amount can't be negative or 0.\");\r\n }\r\n\t\tsetAmount(getAmount() - amount);\r\n\t\tthis.setCountVal(this.getCountVal() + 1);\r\n return true;\r\n\t}", "boolean deposit(UUID name, double amount);", "public void deposit(double amount) {\n this.balance += amount;\n }", "public void deposit(double amount) {\n balance = balance + amount + 10;\n }", "public void deposit(long amount) {\n\t\n\tbalance += amount;\n\t\n\tlog += \"Deposit made to this account in the ammount of \"+amount+\" on \"+date+\"\\n\";\n\tlog += log += \" Current balance is \"+balance+\" \\n\";\n\tupdate();\n}", "public boolean deposit(Account account, double amount) {\r\n\t\tint found = find(account);\r\n\t\t\r\n\t\t//account does not exist\r\n\t\tif ( found == -1 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t//get the balance, and call credit() to add the amount to balance\r\n\t\tdouble balance = accounts[found].getBalance();\r\n\t\taccount.setBalance(balance);\r\n\t\taccount.credit(amount);\r\n\t\taccounts[found].setBalance(account.getBalance());\r\n\t\treturn true;\r\n\t\r\n\t}", "public double deposit(double amount, boolean branch) {\n balance += amount;\n return balance;\n }", "@Override\r\n\tpublic boolean deopsit(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tbalance = (float) (balance + amount);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void deposit(int amount)\n {\n setBalance(getBalance()+amount);\n }", "public void deposit(double depositAmmount)\r\n\t{\r\n\t\tif(depositAmmount > 0.0) // it the deposit is valid\r\n\t\t\tbalance = balance + depositAmmount; // add it to the balance\r\n\t}", "@Override\n\tpublic void deposit(int money) {\n\t\t\n\t}", "public double depositInto(double amount)\r\n {\r\n _balance += amount;\r\n\r\n return _balance;\r\n }", "public void deposit() throws IOException, ClassNotFoundException {\r\n System.out.println(\"Enter an amount to deposit \");\r\n float depositedAmount = (float)this.input.nextDouble();\r\n if (depositedAmount < 5.0F) {\r\n System.out.println(\"enter amount greater or equal to N$ 5\");\r\n this.repeatDeposit(); // Calling the Mentioned Function\r\n }\r\n\r\n this.balance += depositedAmount;\r\n this.transaction = depositedAmount;\r\n System.out.println(\"You have Successfully Deposited: N$\" + this.transaction);\r\n System.out.printf(\"New Balance: N$%.2f\", this.balance);\r\n this.repeatDeposit(); // Calling the Mentioned Function\r\n this.coinDisbursed(); // Calling the Mentioned Function\r\n }", "public void depositMoney(double amount) {\n\t\tbalance = balance + amount;\n\t}", "public void deposit (int amount){\n if(amount>=3000){\n super.deposit(amount+200);\n } else {\n super.deposit(amount);\n }\n }", "public double deposit(double amount){\n double total=amount;\n if(type.equals(\"TMB\"));total=-0.5;\n currentBalance+=total;\n return currentBalance;\n }", "public void deposit (double amount) \r\n {\r\n\r\n balance += amount;\r\n System.out.println (\"Deposit into account shs: \" + account);\r\n System.out.println (\"Standing Amount: \" + amount);\r\n System.out.println (\"Current balance: \" + balance);\r\n System.out.println ();\r\n\r\n }", "@Override\n public void deposit(double amount) {\n super.deposit(amount);\n store_trans(amount);\n }", "public void depositAmount() {\n\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please Enter the account number you want to deposit: \");\n\t\t\tint depositAccountNumber = scan.nextInt();\n\t\t\tlong amount;\n\t\t\tlog.log(Level.INFO, \"Please Enter the amount you want to Deposit : \");\n\t\t\tamount = scan.nextLong();\n\t\t\tbankop.deposit(depositAccountNumber,amount);\n\t\t\t\n\t\t}catch(AccountDetailsException | BalanceException message ) {\n\t\t\tlog.log(Level.INFO, message.getMessage());\n\t\t}\n\t\t\n\t}", "public void transferToChecking(double amount){\n withdrawSavings(amount);\r\n depositChecking(amount);\r\n }", "public long deposit(long amount) {\n balance += amount;\n return balance;\n }", "public boolean depositMoney(int amount, int accountNumber){\n\t\tBankAccount account = lookUp(accountNumber);\n\t\tif(account == null) // If the account number wasn't found in the system\n\t\t\treturn false;\n\n\t\treturn account.depositMoney(amount);\n\t}", "public void deposit(double value)\r\n {\r\n //TODO need logic to make sure you can't deposit more then you have in cash\r\n subtractCash(value);\r\n savings += value;\r\n }", "public boolean depositMoney(int accountNo, float amount) {\n Account account = getAccountByAccountNo(accountNo);\n account.setBalance(account.getBalance() + amount);\n saveOrUpdate(account);\n // save transaction to database\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setTime(new Timestamp(new Date().getTime()));\n transaction.setType(\"deposit\");\n transactionRepository.save(transaction);\n return true;\n }", "public boolean deposit(String accountNumber, double amount) {\r\n\t\tif (!DaoUtility.isAccountNumberValid(accountNumber))\r\n\t\t\treturn false;\r\n\r\n\t\tConnection conn = null;\r\n\r\n\t\ttry {\r\n\t\t\tStatement st;\r\n\t\t\tResultSet rs;\r\n\t\t\tString sql;\r\n\r\n\t\t\tconn = dbConnector.getConnection();\r\n\t\t\tif (conn == null)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t// atomic operation\r\n\t\t\tst = conn.createStatement();\r\n\r\n\t\t\t// get the aid and old balance\r\n\t\t\tint aid = 0;\r\n\t\t\tdouble oldbalance = 0;\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"select * from tbAccount where acnumber='%s' \",\r\n\t\t\t\t\taccountNumber);\r\n\r\n\t\t\trs = st.executeQuery(sql);\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\taid = rs.getInt(\"aid\");\r\n\t\t\t\toldbalance = rs.getDouble(\"balance\");\r\n\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\r\n\t\t\t\t// If the account is Frozen(isactive=false), then cannot\r\n\t\t\t\t// deposit.\r\n\t\t\t\tif (!isactive) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// ac.balance += amount.\r\n\t\t\t// update tbAccount set balance='new balance' where\r\n\t\t\t// acnumber='acnumber'\r\n\t\t\tdouble newBalance = oldbalance + amount;\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"update tbAccount set balance=%f where acnumber='%s' \",\r\n\t\t\t\t\tnewBalance, accountNumber);\r\n\t\t\tst.addBatch(sql);\r\n\r\n\t\t\t// insert a transaction record\r\n\t\t\t// insert into tbTransaction(aid,trtype,amount,description)\r\n\t\t\t// values( select aid from tbAccount where acnumber='acnumber',\r\n\t\t\t// DEPOSIT_TRANSACTION_TYPE_ID,\r\n\t\t\t// amount, 'deposit 123.4 dollars on 2014-09-19')\r\n\t\t\t//\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\tString currentDate = dateFormat.format(date); // 2014-08-06\r\n\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t+ \" values( %d, \" + \"\t\t\t%d, \"\r\n\t\t\t\t\t\t\t+ \"\t\t\t%f, 'deposit %.2f dollars on %s' ) \", aid,\r\n\t\t\t\t\tDEPOSIT_TRANSACTION_TYPE_ID, amount, amount, currentDate);\r\n\r\n\t\t\tst.addBatch(sql);\r\n\r\n\t\t\t// Execute transaction\r\n\t\t\tint[] nRes = st.executeBatch();\r\n\t\t\tif (nRes[1] > 0)\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "void depositByCheque(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tcheque += amount;\n\t\tSystem.out.println(\"Deposit cheque \" + amount + \" successfully\");\n\t}", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public int deposit(int amount) {\n\n balance += amount;\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return balance;\n\n }", "void deposit(float amount) {\n\n float newBalance;\n if (this.transactionHistory.isEmpty()) {\n newBalance = amount;\n } else {\n newBalance = this.transactionHistory.getLastTransaction().getBalanceAfter() + amount;\n }\n Transaction transaction = new Transaction(amount, true, newBalance);\n transactionHistory.addTransaction(transaction);\n }", "public void deposit(int depositAmount)\r\n {\n this.balance += depositAmount;\r\n System.out.println(\"Deposit of \" + depositAmount + \" made. New Balance is \" + this.balance);\r\n }", "void deposit (double depositAmount, String userName) {\n\t\tBankAccountRepositoryJdbc bar = new BankAccountRepositoryJdbc();\n\t\tbalance = bar.getBalance(userName);\n\t\t\n\t\ttry {\n\t\t\tif(depositAmount != 0) {\n\t\t\t\tif(depositAmount > 0) {\n\t\t\t\t\tbalance = balance+depositAmount;\n\t\t\t\t\taccount.setBalance(balance);\n\t\t\t\t\taccount.setUsername(userName);\n\t\t\t\t\tbar.updateAccount(account);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NegativeAmountDepositException (\"You attempted to deposit a negative amount.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (NegativeAmountDepositException e) {\n\t\t\tLOGGER.info(e);\n\t\t}\n\t}", "public void deposit(int amount) {\n\t\tint newBalance = balance + amount;\n\t\ttry{\n\t\t\tThread.sleep(5); //added to make magnify corruption & make visible\n\t\t}catch(InterruptedException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tthis.balance = newBalance;\n\t}", "public void deposit(double depositAmount) {\n if (depositAmount < 0) throw new IllegalArgumentException(\"Deposit Amount cannot be negative\");\n balance += depositAmount;\n ++numDeposits;\n }", "public void nonSyncdeposit(double amount)\r\n\t {\r\n\t if(amount<0){//if deposit amount is negative\r\n\t \t System.out.println(\"Invalid amount cannot deposit\");\r\n\t }\r\n\t else{ //logic to deposit amount\r\n\t\t System.out.print(\"Depositing \" + amount);\r\n\t double newBalance = balance + amount;\r\n\t System.out.println(\", new balance is \" + newBalance);\r\n\t balance = newBalance;\r\n\t }\r\n\t }", "protected boolean withdraw(double amount)\n\t{\n\t\tif(amount>acc_balance)\n\t\t\treturn false;\n\t\t\n\t\t//else the deduction is done from balance and success message is passed\n\t\tacc_balance-=amount;\n\t\treturn true;\n\t}", "private void doDeposit() {\n System.out.println(\"How much do you want to deposit?\");\n boolean keepgoing = true;\n int amount = -1;\n while (keepgoing) {\n amount = input.nextInt();\n if (amount > 0) {\n keepgoing = false;\n pickedAccount.deposit(amount);\n }\n }\n System.out.println(\"deposited \" + amount + \" $\");\n }", "public void deposit(String accountType, double amount) {\r\n\t\tif(accountType.equals(\"savings\")) {\r\n\t\t\tthis.savingsBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse if(accountType.equals(\"checking\")) {\r\n\t\t\tthis.checkingBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Deposit failed\");\r\n\t\t}\r\n\t}", "public void withdrawOrDeposit(double amount, boolean isWithdraw){\n if(amount > 0.0) {\n if (isWithdraw) {\n balance -= amount;\n } else {\n balance += amount;\n }\n }\n }", "@Override\n public boolean depositAmount(TransactionDTO transaction) {\n if(transaction.getAmount()>0){\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n customerDetails.setAccountBalance(customerDetails.getAccountBalance()+transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }else{\n return false;\n }\n }", "private void deposit() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at indsætte: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n moneyController(userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Deposited\");\n }", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test\n\tpublic void testDeposit() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(04, \"acc1\", 00000, 100.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Deposit Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to deposit money\", testResult);\n\t}", "public void deposit(double deposit){\n accTransactions.add(new Transaction('D', deposit, balance, \"deposit\"));\n balance += deposit;\n }", "public void deposit();", "void deposit(double amount)\n\t{\n\t\tbalance += amount;\n\t\t//what this translates to is\n\t\t// this.balance += amount;\n\t}", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "@Override\n\tpublic void deposit(double d) {\n\t\tsuper.deposit(d);\n\t\tSystem.out.println(\"Checking deposit made: \" + d);\n\t}", "void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}", "public void deposit(int amount) throws RejectedException {\n if (amount < 0) {\n throw new RejectedException(\n \"Tried to deposit negative value, illegal value: \" + amount + \".\" + accountInfo());\n }\n balance += amount;\n }", "public boolean withdrawAmount(float amount) {\n\t\treturn dao.withdrawAmount(amount);\r\n\t}", "public int deposit(int depositAmmount);", "public void withdrawMoney(double amount, boolean checkingAccount) {\n if (checkingAccount && amount <= checkingBalance) {\n checkingBalance -= amount;\n totalBalance -= amount;\n } else if (!checkingAccount && amount <= savingsBalance) {\n savingsBalance -= amount;\n totalBalance -= amount;\n } else {\n System.out.println(\"Insufficient Funds.\");\n }\n }", "@Override\r\n\tpublic boolean deposit(DepositBean db, double amount) throws WalletException {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb : customerList) {\r\n\t\t\tif(cb.getPhoneNum()==db.getPhoneNum()) {\r\n\t\t\t\tdb.setBalance(db.getBalance()+amount);\r\n\t\t\t\tdb.setDate(LocalDateTime.now());\r\n\t\t\t\tisValid = true;\r\n\t\t\t\tWalletTransactions transac = new WalletTransactions();\r\n\t\t\t\ttransac.setAmount(amount);\r\n\t\t\t\ttransac.setBalance(db.getBalance());\r\n\t\t\t\ttransac.setDate(db.getDate());\r\n\t\t\t\ttransac.setPhoneNum(db.getPhoneNum());\r\n\t\t\t\ttransac.setType(\"deposit\");\r\n\t\t\t\ttransacList.add(transac);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "@Override\n public void deposit(int accountId, long amount) {\n if(!accounts.containsKey(accountId)){\n throw new IllegalArgumentException(\"Account \" + accountId + \" does not exist in this Bank.\");\n }\n else{\n synchronized (accounts.get(accountId)){\n accounts.get(accountId).deposit(amount);\n }\n }\n }", "public abstract boolean withdraw(float amount);", "public void deposit(BigDecimal deposit){\n balance = balance.add(deposit);\n }", "@Override\n\tpublic void deposit() {\n\t\t\n\t}", "public boolean fundTransfer(int accountNumber, float amount) {\n\t\treturn dao.fundTransfer(accountNumber,amount);\r\n\t}", "public boolean deposit(String customerAcc, int amount)\r\n\t{\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i<numAccounts; i++)\r\n\t\t{\r\n\t\t\tif(!accounts[counter].getAccountNum().equals(customerAcc))\r\n\t\t\t\tcounter++;\r\n\t\t\telse\r\n\t\t\t\ti=numAccounts;\r\n\t\t}\r\n\t\tif(counter < numAccounts)\r\n\t\t{\r\n\t\t\taccounts[counter].deposit(amount);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "@Override\n\tvoid deposit(double amount) {\n\t\tsuper.balance += amount - 20;\n\t}", "public void deposit(BigDecimal amount) {\n this.setBalance(this.getBalance().add(amount));\n }", "public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }", "public boolean withdrawal (double amount) \r\n {\r\n\r\n boolean result = false;\r\n\r\n if ( ! super.withdrawal (amount) ) \r\n {\r\n System.out.println (\"Using overdraft...\");\r\n if ( ! overdraft.withdrawal (amount-balance) )\r\n System.out.println (\"Overdraft source insufficient.\");\r\n else {\r\n balance = 0;\r\n System.out.println (\"Current Balance on account \" + account + \": \" + balance);\r\n result = true;\r\n }\r\n }\r\n System.out.println ();\r\n\r\n return result;\r\n\r\n }", "public boolean withdraw(float amount) {\r\n\t\tif (amount > 0.0f) {\t\t\r\n\t\t\t// KG: incorrect, last balance check should be >=\r\n\t\t\tif (getState() == State.OPEN || (getState() == State.OVERDRAWN && balance > -100.0f)) {\r\n\t\t\t\tbalance = balance - amount;\r\n\t\t\t\t_numWithdraws++;\r\n\t\t\t\tif (_numWithdraws > 10)\r\n\t\t\t\t\tbalance = balance - 2.0f;\r\n\t\t\t\tif (balance < 0.0f) {\r\n\t\t\t\t\tsetState(State.OVERDRAWN);\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean desposit(int accNo, double money) {\n\t\treturn false;\n\t}", "public void transfer(double amount, checkingAccount cAccount)throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be deposited\");\n }\n else if (amount > balance){\n throw new InsufficientFundsException(\"Not enough money\");\n }\n else{\n balance -= amount;\n cAccount.balance += amount;\n savingTransactions[arrayLocation] = \"Transfer from savings account into checkings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n }" ]
[ "0.85451657", "0.8311003", "0.82970375", "0.82833064", "0.82395375", "0.8128079", "0.80268216", "0.8018354", "0.80098575", "0.8009414", "0.799965", "0.7981996", "0.79480535", "0.7923277", "0.7919492", "0.79077744", "0.78965235", "0.7872327", "0.78703564", "0.78627205", "0.7842438", "0.7835692", "0.7832852", "0.7832703", "0.78265625", "0.78248763", "0.7789804", "0.7789804", "0.7762514", "0.7761466", "0.77492994", "0.77468", "0.7745892", "0.7740964", "0.77243006", "0.77201396", "0.770903", "0.76921976", "0.76836216", "0.76721156", "0.76646554", "0.7658624", "0.7647248", "0.7604819", "0.7588547", "0.7585364", "0.7525967", "0.7520864", "0.7508213", "0.75014323", "0.74938613", "0.7492506", "0.7432615", "0.7405303", "0.7394166", "0.7392137", "0.73836565", "0.73821414", "0.73723656", "0.73634464", "0.7353381", "0.7350415", "0.7311", "0.730404", "0.7297269", "0.72857964", "0.7263696", "0.7232535", "0.7192135", "0.71786875", "0.7175202", "0.7164692", "0.7149748", "0.71285456", "0.712472", "0.71174693", "0.7076462", "0.7070283", "0.70665956", "0.70530796", "0.70445704", "0.70442796", "0.70108527", "0.699704", "0.6959023", "0.695684", "0.69475114", "0.6930642", "0.6930239", "0.6909449", "0.690864", "0.69052947", "0.69017446", "0.68722725", "0.6861815", "0.68479776", "0.6834779", "0.68317646", "0.6820617", "0.68205047" ]
0.81686556
5
Method: withdraw(float amount) Inputs: amount Returns: boolean Description: The method withdraw money from account by specific amount. After 10 withdrawals a fee of $2 is charged per transaction You may continue to withdraw an overdrawn account until the balance is below $100
public boolean withdraw(float amount) { if (amount > 0.0f) { // KG: incorrect, last balance check should be >= if (getState() == State.OPEN || (getState() == State.OVERDRAWN && balance > -100.0f)) { balance = balance - amount; _numWithdraws++; if (_numWithdraws > 10) balance = balance - 2.0f; if (balance < 0.0f) { setState(State.OVERDRAWN); } return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean withdraw(double amount)\t{\n\t\tbalance = balance - amount;\n\t\tnumWithdraws++;\n\t\treturn true;\n\t}", "void withdraw(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Withdrawing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (check(amount)) {\n\t\t\tbalance -= amount;\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" successfully.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" unsuccessfully. Do not have enough available funds.\");\n\t\t}\n\t}", "public abstract boolean withdraw(float amount);", "public boolean withdraw(double amount) {\n if (super.withdraw(amount)) {\n airlineDollars += amount * dollarRate;\n totalSpent += amount;\n claimDollars();\n return true;\n }\n return false;\n }", "public void withdraw(float amount) {}", "public void withdraw(float amount) {}", "private static void withdraw(double amount) {\n double resultWithdraw = balance - amount;\r\n if (resultWithdraw < 0 || amount > 2000) {\r\n System.out.println(\"Withdrawal cannot exceed $2000. Balance cannot be reduced below $0.\");\r\n } else {\r\n System.out.println(amount + \" has been withdrawn from your bank account.\\nCurrent balance \" + resultWithdraw + \".\");\r\n }\r\n }", "public void withdraw (double amount)\n {\n super.withdraw (amount);\n imposeTransactionFee ();\n }", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void withdraw (double amount) throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be withdrawn\");\n }\n if (dailyMaxWithdraw != null){\n todayWithdraw += amount;\n if(todayWithdraw > dailyMaxWithdraw){\n throw new IllegalArgumentException(\"Amount entered would exceed your daily withdraw limit\");\n }\n }\n else if (amount <= balance){\n balance -= amount;\n savingTransactions[arrayLocation] = \"Withdraw from savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n else {\n throw new InsufficientFundsException(\"Not enough money\");\n }\n }", "public void withdraw(double amount){\n accTransactions.add(new Transaction('W', amount, balance, \"withdraw\"));\n balance -= amount;\n }", "public boolean withdrawAmount(float amount) {\n\t\treturn dao.withdrawAmount(amount);\r\n\t}", "public void withdraw(double amount) {\n\t\tif (amount < balance) {\n\t\t\tSystem.out.println(\"Successful withdraw: $\" + amount);\n\t\t\tbalance -= amount;\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw Failed: Insufficient balance. The amount of $\" + amount + \" is more than your balance ($\" + balance +\").\");\n\t\t}\n\t}", "public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }", "public void withdraw (int amount) {\n if (amount >= 0) {\n balance = balance - amount;\n valueWithdrawals = valueWithdrawals + amount;\n if (balance < minimumBalance){\n minimumBalance = balance;\n }\n }\n }", "public void withdraw(long amount) {\n\t\n\tif(canWithdraw == true) {\n\t\tSystem.out.println(\"before \"+balance);\n\t\tbalance\t-= amount;\n\t\tSystem.out.println(\"after \"+balance);\n\t\t//add to log\n\t\tlog += \"Withdraw made to this account in the ammount of \"+amount+\" on \"+date+\"\\n\";\n\t\tlog += log += \" Current balance is \"+balance+\" \\n\"+date;\n\t\tupdate();\n\t}else {\n\t\tlog += \"Overdraft account on \"+date+\" \\n\";\n\t\tSystem.out.println(\"Insufficients funds to complete tranaction!\");\n\t\t}//end else statement\n}", "protected boolean withdraw(double amount)\n\t{\n\t\tif(amount>acc_balance)\n\t\t\treturn false;\n\t\t\n\t\t//else the deduction is done from balance and success message is passed\n\t\tacc_balance-=amount;\n\t\treturn true;\n\t}", "public void withdrawMoney(int amount) {\n wallet.withdraw(amount);\n }", "@Override\n public void withdraw(double amount) {\n try {\n if (amount > 1000) {\n throw new InvalidFundingAmountException(amount);\n }\n if (this.getBalance() < 5000) {\n throw new InsufficientFundsException(amount);\n }\n doWithdrawing(amount);\n } catch (BankException e) {\n System.out.println(e.getMessage());\n }\n }", "void withdraw(double amount){\r\n\t\t//subtract to the current balance the amount\r\n\t\tsetBalance(getBalance() - amount);\r\n\t\t\r\n\t\t//alert the user that his bank account is in the red if the balance lower than 0\r\n\t\tif(getBalance()<0){\r\n\t\t\tSystem.out.println(\"Your bank account is in the red.\");\r\n\t\t}\r\n\t}", "public boolean withdrawal (double amount) \r\n {\r\n\r\n boolean result = false;\r\n\r\n if ( ! super.withdrawal (amount) ) \r\n {\r\n System.out.println (\"Using overdraft...\");\r\n if ( ! overdraft.withdrawal (amount-balance) )\r\n System.out.println (\"Overdraft source insufficient.\");\r\n else {\r\n balance = 0;\r\n System.out.println (\"Current Balance on account \" + account + \": \" + balance);\r\n result = true;\r\n }\r\n }\r\n System.out.println ();\r\n\r\n return result;\r\n\r\n }", "@Override\n\tpublic int withdraw(double amount) throws RaiseException {\n\t\tValidator.validateWithdraw(this.getBalance(), amount);\n\t\tif(amount <= this.getBalance()) {\n\t\t\tthis.setBalance(this.getBalance() - amount);\n\t\t\t\n\t\t\t//create a transaction and adding it to the list of transactions of this account \n\t\t\tTransaction tmpTransaction = new Transaction(amount, EnumTypeTransaction.withdraw);\n\t\t\tthis.addTransaction(tmpTransaction);\n\t\t\t\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "public void withdrawMoney(double amount) {\n\t\tbalance = balance - amount;\n\t}", "public void withdraw(double amount)\n\t{\n\t\tbalance -= amount;\n\t}", "public void withdraw(double withdrawalAmount) {\n if (withdrawalAmount < 0) throw new IllegalArgumentException(\"Withdrawal amount cannot be negative\");\n if (balance - withdrawalAmount < 0) throw new IllegalArgumentException(\"Cannot withdraw more than account balance\");\n balance -= withdrawalAmount;\n numWithdrawals++;\n }", "public boolean withdraw(Double amount) {\r\n\t\tif (amount < 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (amount > this.WITHDRAW_LIMIT) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (amount > this.balance) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.balance = this.balance - amount;\r\n\t\treturn true;\r\n\t}", "public void withdraw(double amount){\n\t\tbalance -= amount;\n\t}", "public void withdraw(double amount)\n {\n startingBalance -= amount;\n }", "public void withdraw(double amount) {\n\t\tbalance -= amount;\n\t}", "public boolean withdraw(double amount) {\n this.balance += -amount;\n return true;\n }", "public void withdraw (double amount) {\r\n\t\tif(!overDrawn) {\r\n\t\t\tbalance=balance-amount;\r\n\t\t\tif(balance< -1)\r\n\t\t\t{\r\n\t\t\t\toverDrawn = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Negative amount!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public boolean withdrawMoney(int accountNo, float amount) {\n Account account = getAccountByAccountNo(accountNo);\n //check if account has sufficient balance\n if (checkIfEnough(account, amount)) {\n account.setBalance(account.getBalance() - amount);\n saveOrUpdate(account);\n //save transaction to database\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setTime(new Timestamp(new Date().getTime()));\n transaction.setType(\"withdraw\");\n transactionRepository.save(transaction);\n return true;\n }\n return false;\n }", "public double withdraw(double withdrawalAmount) {\n\t\tdouble savingsBalance = getBalance();\n\t\tif ((savingsBalance - withdrawalAmount) >= overdraft) { // Check if balance is less than overdraft limit.\n\t\t\tsuper.withdraw(withdrawalAmount);\n\t\t}\n\t\tif ((savingsBalance - withdrawalAmount) < overdraft) {\n\t\t\tSystem.out.print(\"Cannot execute withdraw action: greater than savings withdraw limit.\\n\");\n\t\t}\n\t\treturn getBalance();\n\t}", "public boolean withdraw(double amount) throws BankAccountException {\n if (amount>this.balance) {\n throw new BankAccountException(BankAccountException.LOW_AMOUNT_OF_MONEY);\n }\n if(amount + calculateTax(amount)<=balance) {\n this.balance = balance- (amount+calculateTax(amount));\n return true;\n }\n return false;\n }", "public void withdraw(int amount)\n {\n setBalance(getBalance()-amount);\n }", "public void withdraw(double amount) {\n this.balance -= amount;\n }", "public void withdrawMoney(double amount) {\n\t\tif (amount>=0){\n\t\t\tsetBalance(this.balance - amount);\n\t\t}else{\n\t\t\tSystem.out.println(\"You can not withdraw a negative value!\");\n\t\t}\n\t\t\t\t\n\t}", "public abstract void withdraw(float amount);", "public boolean withdrawl(double withdrawAmount) {\n\t\tif (balance-withdrawAmount < 0 || withdrawAmount < 0) return false; // Special cases: can't withdraw more than your balance; can't withdraw negative money\n\t\tbalance -= withdrawAmount;\n\t\treturn true;\n\t}", "@Override\r\n\tvoid withdraw(double amount) {\n\t\tsuper.withdraw(amount);\r\n\t\tif(minimumblc>500)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"you have withdraw rupees\"+ (amount));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"withdraw failed \");\r\n\t\t}\r\n\t\t\r\n\t}", "public void withdrawFromBalance(double withdrawBalanceAmount) \n\t{\n\t\taccountBalance -= withdrawBalanceAmount;\n\t}", "boolean withdraw(UUID name, double amount);", "public int withdraw() {\n\t\tif ((acc.getBalance() - keyboard.getAmt()) > acc.getMinimumBalace()) {\r\n\t\t\tif (casher.withdraw(keyboard.getAmt()) == 1) {\r\n\t\t\t\tsetNewBalance();\r\n\t\t\t\t\r\n\t\t\t\treciept.printer(acc.getAccountNumber(), acc.getBalance(), keyboard.getAmt());\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}", "public boolean withdrawal (double amount)\r\n {\r\n\r\n System.out.println (\"Penalty incurred: \" + PENALTY);\r\n return super.withdrawal (amount+PENALTY);\r\n\r\n }", "public int withdrawal(Account account, double amount) { \r\n\t\tint found = find(account); //get the account that wants to withdraw\r\n\t\t\r\n\t\t//if the account doesn't exist \r\n\t\tif ( found == -1 ) {\r\n\t\t\treturn -1; \r\n\t\t}\r\n\t\t//get the balance amount, and call debit() to decrease the balance by amount \r\n\t\tDouble balance = accounts[found].getBalance();\r\n\t\taccount.setBalance(balance);\r\n\t\taccount.debit(amount); \r\n\t\t\r\n\t\t//if its less than 0, means that there are insufficient funds\r\n\t\tif ( account.getBalance() < 0 ) {\r\n\t\t\treturn 1; \r\n\t\t} \r\n\t\taccounts[found].setBalance(account.getBalance());\r\n\t\t\r\n\t\t\r\n\t\t//check if the account is a MoneyMarket account, then increment the count of withdrawls\r\n\t\tif ( accounts[found] instanceof MoneyMarket ) {\r\n\t\t\tMoneyMarket moneyAcc = (MoneyMarket) accounts[found];\r\n\t\t\tint numberOfWithdraws = moneyAcc.getWithdrawals() + 1;\r\n\t\t\tmoneyAcc.setWithdrawals(numberOfWithdraws);\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public int withdraw(int amount) {\n\n this.balance -= amount;\n if (balance < 0) {\n\n this.balance = 0;\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return this.balance;\n\n } else {\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return balance;\n }\n }", "public void withDrawAmount() {\n\t\t\n\t\ttry {\t\n\t\t\tlog.log(Level.INFO, \"Please Enter the account number you want to withdraw: \");\n\t\t\tint withdrawAccountNumber = scan.nextInt();\n\t\t\tlong amount;\n\t\t\tlog.log(Level.INFO, \"Please Enter the amount you want to withdraw : \");\n\t\t\tamount = scan.nextLong();\n\t\t\tbankop.withDraw(withdrawAccountNumber,amount);\n\t\t\t\n\t\t}catch(AccountDetailsException | BalanceException message ) {\n\t\t\tlog.log(Level.INFO, message.getMessage());\n\t\t}\n\n\t}", "public boolean withdraw(long id, String password, String currency, double amount);", "public void withdrawOrDeposit(double amount, boolean isWithdraw){\n if(amount > 0.0) {\n if (isWithdraw) {\n balance -= amount;\n } else {\n balance += amount;\n }\n }\n }", "public void withdraw( double amount ) throws Exception\n\t{\n\t\tif(amount >= 0.0 && amount <= balance)\n\t\t\tbalance -= amount;\n\t\t\n\t\telse\n\t\t\tthrow new Exception(\"Insufficient Balance\");\n\t}", "public void withdraw(double dollarAmount) throws InsufficientFundsException {\r\n\t\tif (this.accountBalance - dollarAmount < 0 || this.accountBalance - dollarAmount - 1.50 < 0) {\r\n\t\t\tthrow new InsufficientFundsException();\r\n\t\t} else {\r\n\t\t\ttransactionTracker++;\r\n\t\t\tSystem.out.println(transactionTracker);\r\n\t\t\tif (transactionTracker > 4) {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount - 1.50;\r\n\t\t\t} else {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void withdrawFromChecking(double amount) {\r\n\t\tif(amount > this.getSavingsBalance()) {\r\n\t\t\tSystem.out.println(\"Unsufficient funds\");\r\n\t\t} else {\r\n\t\t\tthis.checkingBalance -= amount;\r\n\t\t\ttotalAmount -= amount;\r\n\t\t}\r\n\t}", "public double withdrawFrom(double amount)\r\n {\r\n _balance -= amount;\r\n\r\n return _balance;\r\n }", "@Override\r\n\tpublic boolean withdraw(WithdrawBean wb, double amount) throws WalletException {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb : customerList) {\r\n\t\t\tif(cb.getPhoneNum()==wb.getPhoneNum()) {\r\n\t\t\t\tif(wb.getBalance()>amount) {\r\n\t\t\t\twb.setBalance(wb.getBalance()-amount);\r\n\t\t\t\twb.setDate(LocalDateTime.now());\r\n\t\t\t\tisValid = true;\r\n\t\t\t\tWalletTransactions transac = new WalletTransactions();\r\n\t\t\t\ttransac.setAmount(amount);\r\n\t\t\t\ttransac.setBalance(wb.getBalance());\r\n\t\t\t\ttransac.setDate(wb.getDate());\r\n\t\t\t\ttransac.setPhoneNum(wb.getPhoneNum());\r\n\t\t\t\ttransac.setType(\"withdraw\");\r\n\t\t\t\ttransacList.add(transac);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "@Override\n\tpublic void withdraw(double amount) {\n\t\tif (super.getBalance() - amount > overdraftLimit) {\n\t\t\tsuper.setBalance(getBalance() - amount);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Amount exceeds overdraft limit.\");\n\t}", "private void withdraw() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at hæve: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n if ((userInput * 100) <= balance) {\n moneyController(-userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Withdraw\");\n } else {\n System.out.println(\"Utilstrækkelig balance på kontien\");\n }\n }", "@Override\n\tpublic void withdraw(int money) {\n\t\t\n\t}", "public void withdraw(double amount)\n throws InterruptedException\n {\n balanceChangeLock.lock();\n try\n {\n while (balance < amount)\n sufficientFundsCondition.await();\n System.out.print(\"Sacando \" + amount);\n double newBalance = balance - amount;\n System.out.println(\", novo saldo igual a \" + newBalance);\n balance = newBalance;\n }\n finally\n {\n balanceChangeLock.unlock();\n }\n }", "public abstract String withdrawAmount(double amountToBeWithdrawn);", "public Integer withdraw(Integer amount) {\r\n\t if (balance < amount) {\r\n\t throw new NotEnoughFundsException(amount, balance);\r\n\t }\r\n\t balance -= amount;\r\n\t return balance;\r\n\t }", "public void withdrawMoney(double amount, boolean checkingAccount) {\n if (checkingAccount && amount <= checkingBalance) {\n checkingBalance -= amount;\n totalBalance -= amount;\n } else if (!checkingAccount && amount <= savingsBalance) {\n savingsBalance -= amount;\n totalBalance -= amount;\n } else {\n System.out.println(\"Insufficient Funds.\");\n }\n }", "public boolean withdraw(double amount) {\n if (amount < 0 || amount > value) {\n return false;\n }\n value -= amount;\n return true;\n }", "public void setWithdrawFee(BigDecimal withdrawFee) {\n this.withdrawFee = withdrawFee;\n }", "public int withdrawal(Account account, double amount) {\n\t\t\n\t\tint index = find(account);\n\t\t\n\t\tif (account == null || index == -1 || amount < 0) {\t\t//check if account exists, invalid amount\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\telse if (amount > accounts[index].getBalance()) {\t\t//check if funds insufficient\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\telse { \n\t\t\taccounts[index].debit(amount);\n\t\t\tif (account instanceof MoneyMarket) {\n\t\t\t\t((MoneyMarket) account).setWithdrawals();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 0; \n\t}", "@Override\n\tpublic boolean withdraw(int accNo, double money) {\n\t\treturn false;\n\t}", "public void withdraw(BigDecimal amount) {\n this.setBalance(this.getBalance().subtract(amount));\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public long withdraw(long amount) {\n if (amount > balance) {\n long tmp = balance;\n balance = 0;\n return tmp;\n } else {\n balance -= amount;\n return amount;\n }\n }", "@Override\n public void withdraw(double amount) //Overridden method\n {\n elapsedPeriods++;\n \n if(elapsedPeriods<maturityPeriods)\n {\n double fees = getBalance()*(interestPenaltyRate/100)*elapsedPeriods;\n super.withdraw(fees);//withdraw the penalty\n super.withdraw(amount);//withdraw the actual amount\n \n }\n \n }", "public boolean withdrawMoney(int amount, int accountNumber){\n\t\tBankAccount account = lookUp(accountNumber);\n\t\tif(account == null) // If the account number wasn't found in the system\n\t\t\treturn false;\n\n\t\treturn account.withdrawMoney(amount);\n\t}", "@Override\n public boolean withdraw(double amount) {\n boolean res = store_trans(amount*-1);\n\n if(res){\n res=super.withdraw(amount);\n }\n\n return res;\n }", "void withdraw(double amount) {\n try {Thread.sleep(10l);} catch (InterruptedException e) {}\r\n balance -= amount;\r\n System.out.println(\"Inside withdraw\"+ balance);\r\n }", "void withdraw() {\n System.out.println(\"Enter the amount to withdraw : \");\n int withdraw = scan.nextInt();\n balance -= withdraw;\n }", "public static double withdraw(double[] amount, double balance) {\n\t\tif(amount > balance) {\n\t\t\tSystem.out.println(\"The amount is greater than the current balance, and we cannot withdraw.\");\n\t\t\treturn balance;\n\t\t} else {\n\t\t\tbalance -= amount;\n\t\t\tSystem.out.println(\"Your new balance is $\" + balance);\n\t\t\treturn balance - amount;\n\t\t}\n\t}", "public void withdraw(String PIN, float amount, String currentDate) {\n String finalDate = ProcessingDates.computeFinalDay(currentDate, this.period);\n if(finalDate.compareTo(currentDate) < 0) {\n System.out.println(\"Daca retrageti bani inainte de data scadenta a contului, va veti pierde dobanda\");\n }\n else if(finalDate == currentDate) {\n if (amount <= this.getCurrentBalance()) {\n this.setCurrentBalance(this.getCurrentBalance() - amount);\n\n AccountStatement accountStatement = new AccountStatement(currentDate, \"Retragere numerar\", \"Debit\", amount);\n this.addAccountStatement(accountStatement);\n System.out.println(\"Retragere realizata cu succes!\");\n } else {\n System.out.println(\"Fonduri insuficiente!\");\n }\n }\n }", "public void deposit (double amount) {\r\n\t\t\r\n\t\tbalance=balance+amount;\r\n\t\tif(balance > 0) {\r\n\t\t\t\r\n\t\t\toverDrawn = false;\r\n\t\t}\r\n\t\t\r\n\t}", "boolean withdraw (int value )\n {\n if (value>balance)\n {\n return false;\n }\n else {\n balance-=value;\n return true;\n }\n }", "void depositByCash(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tbalance += amount;\n\t\tSystem.out.println(\"Deposit \" + amount + \" successfully\");\n\t}", "@FXML\n void withdrawFunds(ActionEvent event) {\n \ttry {\n \t\t\n \t\tProfile person = new Profile(fName_DepWith.getText(), lName_DepWith.getText());\n \t\tdouble inpBalance = Double.parseDouble(amount.getText());\n \t\tint withdrawn = 0;\n \t\t\n \tif(inpBalance < 0) {\n \t\tthrow new IllegalArgumentException(\"No negative numbers, please enter a valid balance.\\n\");\n \t}\n \t\t\n \t\tString accType = ((RadioButton) tgDepositWithdraw.getSelectedToggle()).getText();\n \t\t\n \t\t//withdraws funds according to specified account type\n \t\tswitch(accType) {\n \t\tcase \"Checking\":\n \t\t\tAccount currCheckingAcc = new Checking(person);\n \t\t\twithdrawn = db.withdrawal(currCheckingAcc, inpBalance);\n \t\t\tbreak;\n \t\tcase \"Savings\":\n \t\t\tAccount currSavingsAcc = new Savings(person);\n \t\t\twithdrawn = db.withdrawal(currSavingsAcc, inpBalance);\n \t\t\tbreak;\n \t\tcase \"Money Market\":\n \t\t\tAccount currMoneyMarketAcc = new MoneyMarket(person);\n \t\t\twithdrawn = db.withdrawal(currMoneyMarketAcc, inpBalance);\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\t\n \t\tif (withdrawn == 0) {\n \t\t\tmessageArea.appendText(String.format(\"%.2f\", inpBalance) + \" withdrawn from account.\\n\");\n \t\t}\n \t\telse if (withdrawn == 1) {\n \t\t\tmessageArea.appendText(\"Insufficient funds.\\n\");\n \t\t}\n \t\telse {\n \t\t\tmessageArea.appendText(\"Account does not exist.\\n\");\n \t\t}\n \t\t\n \t}\n \tcatch(NumberFormatException e) {\n \t\tmessageArea.appendText(\"Number format exception, enter a valid amount to withdraw.\\n\");\n \t}\n \tcatch(NullPointerException e) {\n \t\tmessageArea.appendText(\"Select a valid account type to withdraw from.\\n\");\n \t}\n \tcatch (IllegalArgumentException e) {\n \t\tmessageArea.appendText(\"No negative numbers, please enter a valid balance.\\n\");\n \t}\n \t\n }", "public int withdrawal(Account account, double amount) {\n int accountPosition = find(account);\n if (accountPosition == -1) {\n return -1;\n }\n double currBal = accounts[accountPosition].getBalance();\n if (currBal < amount) {\n return 1;\n }\n accounts[accountPosition].debit(amount);\n return 0;\n }", "@Override\n public Account withdraw(int accountNo, int amount) throws AccountNotFoundException, InsufficientBalanceException {\n Account account = getAccount(accountNo);\n if (account == null) {\n return null;\n }\n if ((account.getBalance() + 1000) < amount) {\n throw new InsufficientBalanceException(\"Can't withdraw \" + amount + \" when balance is \" + account.getBalance());\n }\n account.setBalance(account.getBalance() - amount);\n\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setDate(\"DD/MM/YYYY\");\n transaction.setAction(\"Withdraw\");\n transaction.setAmount(amount);\n notifyObserver(transaction);\n\n return account;\n }", "public boolean withdrawal(String customerAcc, double amount)\r\n\t{\r\n\t\tint counter = 0;\r\n\t\tint dollars = (int) amount;\r\n\t\tdouble chan = amount - dollars;\r\n\t\tint change = (int) (chan * 100);\r\n\t\tfor(int i = 0; i<numAccounts; i++)\r\n\t\t{\r\n\t\t\tif(!accounts[counter].getAccountNum().equals(customerAcc))\r\n\t\t\t\tcounter++;\r\n\t\t\telse\r\n\t\t\t\ti = numAccounts;\r\n\t\t}\r\n\t\tif(counter < numAccounts && accounts[counter].withdrawal(dollars, change) == true)\r\n\t\t{\r\n\t\t\taccounts[counter].withdrawal(dollars, change);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public double withdraw(double amount, boolean branch) {\n if ((amount > 25) && !branch) {\n throw new IllegalArgumentException();\n }\n balance -= amount;\n return balance;\n }", "public void withdraw(double amount) throws \n\t\t\t\t\t\t\t\t\tBalanceTooLowException{\n\t\tif(balance >= amount){\n\t\t\tbalance -= amount;\n\t\t}\n\t\telse{\n\t\t\tdouble needs = amount - balance;\n\t throw new BalanceTooLowException(needs);\n\t\t}\n\t}", "public void deposit (double amount) \r\n {\r\n\r\n balance += amount;\r\n System.out.println (\"Deposit into account shs: \" + account);\r\n System.out.println (\"Standing Amount: \" + amount);\r\n System.out.println (\"Current balance: \" + balance);\r\n System.out.println ();\r\n\r\n }", "protected static Boolean withdrawCanBeMade(\n Account account,\n Integer amount,\n Transaction.TransactionType type\n ) {\n return doWithdrawCheck(account, null, null, amount, type);\n }", "public boolean withdraw(CashTransaction transaction)throws IOException {\n if (transaction.getAmount() % 5 != 0)\n {\n JOptionPane.showMessageDialog(null, \"Invalid input\");\n return false;\n }\n\n HashMap<Integer, Integer> billsRetrieved = obtainBills(transaction.getAmount()*-1);\n if (billsRetrieved == null)\n {\n checkAmount();\n return false;\n }\n if (transaction.parse())\n {\n for (int denomination: billsRetrieved.keySet())\n {\n typeOfCash.put(denomination, typeOfCash.get(denomination) - billsRetrieved.get(denomination));\n }\n checkAmount();\n return true;\n }\n return false;\n }", "@Override\n\tvoid withdraw(double amount) {\n\t\tsuper.balance -= amount - 20;\n\t}", "public void deposit(double amount)\n {\n balance = balance + amount;\n }", "public Double withdrawAndReportBalance(Double withdrawnAmount, AccountRule rule) \n \t\tthrows IllegalBalanceException \n {\n return null;\n }", "public void deposit(double amount) {\n balance = balance + amount + 10;\n }", "public void deposit(double amount)\n {\n startingBalance += amount;\n }", "public boolean canWithdraw(double withdrawalAmount){\n double potentialAmountOwed = withdrawalAmount + Math.abs(super.getCurrentBalance());\n if(potentialAmountOwed < creditLine) return true;\n \n return false;\n }", "public void transferToChecking(double amount){\n withdrawSavings(amount);\r\n depositChecking(amount);\r\n }", "@Test\n\tpublic void withdrawTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tAccount cAcc = new CurrentAccount(cus);\n\t\tbc.withdraw(cAcc, 300);\n\t\tboolean flag = false;\n\t\tif(cAcc.getBalance() == -300.0){\n\t\t\tflag = true;\n\t\t}\n\t\tassertTrue(flag);\n\t}", "@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }", "@Override\r\n\tpublic void withdraw(String mobileNo, double withdrawAmount) {\n\t\tCustomer customer = custMap.get(mobileNo);\r\n\t\tdouble amount = customer.getInitialBalance();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString name = customer.getName();\r\n\t\tString newMobileNo = customer.getMobileNo();\r\n\t\tfloat age = customer.getAge();\r\n\t\t\r\n\t\tif(amount - withdrawAmount > 500)\r\n\t\t\tamount -= withdrawAmount;\r\n\t\t\r\n\t\tcustomer.setAge(age);\r\n\t\tcustomer.setInitialBalance(amount);\r\n\t\tcustomer.setName(name);\r\n\t\tcustomer.setMobileNo(newMobileNo);\r\n\t\t\r\n\t\tcustMap.put(newMobileNo, customer);\r\n\t\tSystem.out.println(\"Amount withdrawn\");\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public boolean withdrawAmount(TransactionDTO transaction) {\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n if(customerDetails.getAccountBalance()>=transaction.getAmount()){\n customerDetails.setAccountBalance(customerDetails.getAccountBalance()-transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }\n else{\n return false;\n }\n }", "public double depositInto(double amount)\r\n {\r\n _balance += amount;\r\n\r\n return _balance;\r\n }", "public void deposit(double amount) {\n this.balance += amount;\n }" ]
[ "0.8309425", "0.82836944", "0.82417655", "0.81369406", "0.8128343", "0.8128343", "0.8088404", "0.80733466", "0.80656266", "0.8053424", "0.80278367", "0.80262196", "0.80138135", "0.80083585", "0.80082846", "0.7977118", "0.79728484", "0.79608", "0.7910024", "0.78748274", "0.78691715", "0.7833898", "0.7800665", "0.7795862", "0.7789831", "0.7788234", "0.77644646", "0.775303", "0.77395755", "0.77262616", "0.77189726", "0.7712258", "0.7695675", "0.76938665", "0.7686194", "0.7642535", "0.7634645", "0.7604769", "0.7572048", "0.75704765", "0.75579005", "0.7540973", "0.7522904", "0.7508542", "0.74939126", "0.74837327", "0.74555737", "0.74470794", "0.74249184", "0.7405351", "0.7400295", "0.7388505", "0.73638934", "0.73567677", "0.73561907", "0.73510134", "0.73484606", "0.73468494", "0.7331351", "0.7327484", "0.73146415", "0.7253549", "0.72379315", "0.7227898", "0.72135484", "0.7213522", "0.7198322", "0.71870196", "0.71800154", "0.71580726", "0.71496487", "0.7134999", "0.7132856", "0.71083665", "0.7091719", "0.7076858", "0.7072775", "0.70659757", "0.701892", "0.70101357", "0.700555", "0.70043343", "0.69987035", "0.6983741", "0.6978411", "0.6973062", "0.6965682", "0.69576186", "0.69503427", "0.6920814", "0.69174266", "0.69014114", "0.6890744", "0.6883409", "0.6873623", "0.68630487", "0.6860271", "0.6857501", "0.6838938", "0.6828395" ]
0.8001335
15
Method: toString() Inputs: Returns: String "checking" + name + balance Description: The method print the checking account infos.
public String toString() { return "Checking: " + getName() + ": " + getBalance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n return \"Account \" + name + \" has $\" + balance + \"and is \" + getState()\n + \"\\n\";\n }", "public String toString(){\n\t\t return id+\" \"+name+\" \"+balance;\r\n\t}", "@Override\n public String toString() {\n return \"accountNumber=\" + accountNumber +\n \", name='\" + name + '\\'' +\n \", balance=\" + balance +\n \", pendingBalance=\" + pendingBalance;\n }", "public String toString()\n {\n return \"Name=\"+accountHolderName+\", \\n Type=\"+accountType+\", \\n Balance=\"+accountBalance+\", \\n Branch=\"+getBankBranch()+ \" \\n BANK Name=\"+getBankName()+ \"\\n IFSC=\"+getBankIfsc() ;\n }", "public String getAccountInfo(){\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();\n return \"Account No : \" + accountNo +\n \"\\nName : \" + name +\n \"\\nBalance : \" + currencyFormat.format(balance);\n }", "public String toString()\r\n\t{\r\n\t return \"Accnt nbr \"+getAcctNbr()+\" has balance of $\"+twoDigits.format(getBalance());\r\n\t}", "public String toString(){\r\n //your code here\r\n return(\"Withdrawal of: $\" + amount + \"Date: \" + date + \"from account: \" + account);\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Hello, my name is: \" + getName() + \" and I have pass: \" + getPassword() + \" and balance: \" + getBalance() + \"$\" + \"\\n\";\n\t}", "public String toString()\n\t\t {\n\t\t\t return \"The current balance of this Saving Account is \" + balance;\n\t\t }", "@Override\n public String toString()//to show data\n {\n return \"the balance = \" + balance + \"\\n the account_number = \" + account_number + \"\\n\";\n }", "@Override\n public String toString() {\n return \"\\nname: \" + name +\n \"\\npassword: \" + password +\n \"\\ndateOfBirth: \" + dateOfBirth +\n \"\\nmarriageStatus: \" + marriageStatus +\n \"\\naccountNumber: \" + accountNumber +\n \"\\namount in account 1 : \" + amountAccount1 +\n \"\\naccountNumber2: \" + accountNumber2 +\n \"\\namount in account 2 : \" + amountAccount2 +\n \"\\nrelativeName: \" + relativeName +\n \"\\nrelativeAge: \" + relativeAge;\n }", "public void printAccountInfo(){\n System.out.printf(\"%5d %-20s %8.2f\\n\",accountNum,customerName,balance);\n }", "public String toString()\r\n {\r\n return _firstName + \" \" + _lastName + \": \" + _balance;\r\n }", "public Checking(String name, float balance) {\r\n\t\tsuper(name, balance);\r\n\t}", "public String toString() {\r\n\t\tDecimalFormat f = new DecimalFormat(\"#0.00\");\r\n\t\treturn \"Account Number: \" + this.getAccountNumber() + \" balance in your Current account is: \" + f.format(this.getAmount());\r\n\t}", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "public String toString(){\n String finalString = bankName;\n finalString += \"\\n\";\n finalString += \"-----\\n\";\n finalString += \"This bank has a maximum account storage of: \";\n finalString += maxAccounts;\n finalString += \"\\n\";\n if(currAccounts != 0){\n finalString += \"This bank currently has \";\n finalString += currAccounts;\n finalString += \" opened accounts.\\n\";\n finalString += \"This is the list of currently opened accounts:\\n\";\n }\n\n //won't start this forloop if i == 0\n for(int i = 0; i < currAccounts; i++){\n finalString += (i + 1);\n finalString += \": \";\n finalString += bankAccounts[i].toString();\n finalString += \"\\n\";\n }\n if(currAccounts == 0){\n finalString += \"This bank hasn't had any accounts opened yet!\\n\";\n }\n\n return finalString;\n }", "public String toString() {\n\t\treturn accNum + \" $\" + balance + \" \" + rate + \" \" + numWithdraws;\n\t}", "public String toString(){//method of return card number and balance\r\n return \"Card no:\" +number+\" has a balance of: \"+balance; \r\n }", "@Override \n public String toString() {\n return \"SavingAccount{\" +\n \"interestRate=\" + interestRate +\n \", accountHolder='\" + accountHolder + '\\'' +\n \", accountNum=\" + accountNum +\n \", balance=\" + balance +\n '}';\n }", "public String displayAccount() {\r\n\t return id+\",\"+name+\",\"+balance+\",\"+email+\",\"+dateOfOpening;\r\n }", "public String toString(Account a) {\n StringBuilder s = new StringBuilder();\n s.append((a.getFirstName()) + \" \" + (a.getLastName()) + \", \" + (a.getStreetAddress()) + \".\");\n if (this.getSavingsAccount() != null)\n s.append(\" Savings: \" + a.getSavingsAccount().getBalance());\n if (this.getCheckingAccount() != null)\n s.append(\" Checking: \" + a.getCheckingAccount().getBalance());\n if (this.getMoneyMarketAccount() != null)\n s.append(\" Money Market Balance: \" + a.getMoneyMarketAccount().getBalance());\n if (this.getCreditCardAccount() != null)\n s.append(\" Credit Card Account: \" + a.getCreditCardAccount().getBalance());\n return s.toString();\n }", "@Override\n\tpublic void printAccountType() {\n\t\tSystem.out.println(\"Checking\");\n\t}", "@Override\r\n\t public String toString()\r\n\t {\r\n\t\t return (\"Account ID: \"+ getId() + \" Balance: \"+ getBalance() +\" Date Created: \"+getDateCreated() + \"\\n\");\r\n\t }", "public String toString() {\n\t\treturn (customerName + \" has \" + balance + \" dollars.\");\n\t}", "public String toString()\r\n\t{\r\n\t\tString out;\r\n\t\t\r\n\t\tif (locked)\r\n\t\t{\r\n\t\t\tout = \"***LOCKED ACCOUNT***\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tout = \"***UNLOCKED ACCOUNT***\";\r\n\t\t}\r\n\t\tout += String.format(\"\\nUser Name: %s\\nAccount Number: %s\\nEmail Address: %s\\n%s\",\r\n\t\t\t\tuserName, getAccountNumberString(), getEmailAddress(), getNotification());\r\n\t\t\r\n\t\tif (!locked)\r\n\t\t{\r\n\t\t\tnotification = null;\r\n\t\t}\r\n\t\t\r\n\t\treturn out;\r\n\t}", "public String toString () {\r\n // write out amount of cash\r\n String stuffInWallet = \"The total amount of Bills in your wallet is: $\" + getAmountInBills() + \"\\n\" +\r\n \"The total amount of Coins in your wallet is: $\" + getAmountInCoins() + \"\\n\";\r\n\r\n // add in the charge (credit and debit) cards\r\n // for each element in the chargeCards list, calls its toString method\r\n for ( int i = 0; i < chargeCards.size(); i++ ) {\r\n stuffInWallet += chargeCards.get( i ) + \"\\n\";\r\n }\r\n\r\n for ( int i = 0; i < idCards.size(); i++ ) {\r\n stuffInWallet += idCards.get( i ) + \"\\n\";\r\n }\r\n\r\n return stuffInWallet;\r\n }", "public static String format(String account) {\n return Accounts.get(account).getHoldings().toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Holder = \" + getHolder()\n\t\t\t\t+ \" Balance = \" + getBalance()\n\t\t\t\t+ \" Creation Date = \" + getCreationDate().toString();\n\t}", "public static void main (String[] args)\r\n{\nAccount a = new SavingsAccount(\"john\",500,4);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+a.getName()+\"has an initial balance of:\"+a.getBalance());\r\na.deposit(200);\r\na.withdraw(200);\r\nSystem.out.println(\"\"+a.getName()+\"at the end of transaction has a balance of \"+a.getBalance());\r\n\r\nSystem.out.println(\"\\n checking account details\");\r\nSystem.out.println(\"----------------------\");\r\nCheckingAccount cAobj = new CheckingAccount(\"Stephen\",200,200);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+cAobj.getName()+\"has an initial balance of:\"+cAobj.getBalance());\r\ncAobj.deposit(200);\r\ncAobj.withdraw(500);\r\nSystem.out.println(\"\"+cAobj.getName()+\"at the end of transaction has a balance of \"+cAobj.getBalance());\r\n}", "public String getAccountEntry() {\n return this.username + Utility.createLine(' ', MAX_USERNAME_LENGTH -\n this.username.length()) + \" \" + this.type + \" \"\n + String.format(\"%09.2f\", this.balance);\n }", "public static void main(String[] args) {\n SavingAccount savings = new SavingAccount(1112, 200);\r\n CheckingAccount checking = new CheckingAccount(1113, 200, -200);\r\n\r\n //account.setAnnualInterestRate(4.5);\r\n savings.setAnnualInterestRate(4.5);\r\n checking.setAnnualInterestRate(4.5);\r\n\r\n\r\n //account.withdraw(250);\r\n //account.deposit(30);\r\n //System.out.println(account.toString());\r\n\r\n\r\n\r\n\r\n checking.withdraw(250);\r\n checking.deposit(30);\r\n System.out.println(checking.toString());\r\n\r\n savings.withdraw(2504);\r\n savings.deposit(30);\r\n System.out.println(savings.toString());\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }", "public Checking(String name, String ssn, double initDeposit) {\n\t\tsuper(name, ssn, initDeposit);\n\t\t\n\t\tSystem.out.println(\"Checking\");\n\t\tSystem.out.println(\"SSN: *****\\\" + ssn.substring(5)\");\n\t\tSystem.out.println(\"Current balance: \" + balance + \"\\n\");\n\t}", "public StringBuilder printAccountInformation(){\n StringBuilder accountInformation = new StringBuilder();\n accountInformation.append(\"Account information:\\n\")\n .append(\"\\tAccount id: \").append(this.getId()).append(\"\\n\")\n .append(\"\\tAccount balance: \").append(this.getBalance()).append(\"\\n\")\n .append(\"\\tAccount annual interest rate: \").append(this.getAnnualInterestRate()).append(\"\\n\")\n .append(\"\\tAccount create date: \").append(this.getDateCreated()).append(\"\\n\");\n\n return accountInformation;\n }", "@Override\n\tpublic String toString(){\n\t\treturn \"Account{\"+\n\t\t\t\t\"id=\"+id+\n\t\t\t\t\", email='\"+email+'\\''+\n\t\t\t\t\", user=\"+user+\n\t\t\t\t\", accessLevel=\"+accessLevel+\n\t\t\t\t\", prefs=\"+prefs+\n\t\t\t\t\", createdAt=\"+createdAt+\n\t\t\t\t\", lastActive=\"+lastActive+\n\t\t\t\t\", banInfo=\"+banInfo+\n\t\t\t\t\", activationInfo=\"+activationInfo+\n\t\t\t\t\", invitedBy=\"+invitedBy+\n\t\t\t\t'}';\n\t}", "public CheckingAccount(String n) {\n super(n);\n balance = 0;\n }", "@Override\n\tpublic void checkBalance() {\n\t\tSystem.out.println(\"balance is checked\");\n\t}", "public BankAccount getCheckingAccount() {\n return checkingAccount;\n }", "public String toString() {\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n return firstName + lastName + \"\\n\" + cardNum + \"\\n\" + email + \"\\n\" + formatter.format(accCreditLimit);\n }", "public String toString(){\n\n //returns the concatonated string\n\t return this.name + \" -\\n\"\n + \"Lock Status: \" + this.status + \"\\n\"\n + \"Description: \" + this.description + \"\\n\";\n\n }", "public String toString (){\r\n \r\n DecimalFormat formatter = new DecimalFormat(\"$###,###.00\");\r\n String formatTotal = formatter.format(total);\r\n \r\n String spacer = \"--------------------\";\r\n String printName = \"Name: \" + this.name;\r\n String printTriage = \"Urgency of visit (1 = urgent, 5 = routine): \" + this.triage;\r\n String printCoverage = \"Percent of bill covered by insurance: \" + this.coverage;\r\n String printTotal = \"Amount owed to hospital before insurance: \" + formatTotal;\r\n String combined = spacer + \"\\n\\n\" + printName + \"\\n\\n\" + printTriage + \"\\n\\n\" + printCoverage + \"\\n\\n\" + printTotal + \"\\n\\n\" + spacer;\r\n return combined;\r\n }", "public void printBalance() {\n logger.info(\"Wallet balance : \" + total_bal);\n }", "public String printBasicAccountInformation(Account account) {\n\t\treturn \"|| \" + account.getBusinessName() + \" || \" + account.getAssets() + \n\t\t\t \" || \" + account.getLiabilities() + \" || \" + account.getRevenue() +\n\t\t\t \" || \" + account.getExpenses() + \" || \" + account.getBeginningInventory() +\n\t\t\t \" || \" + account.getPurchases() + \" || \" + account.getCostOfSales() +\n\t\t\t \" ||\" ;\n\t}", "private String statementForAccount(Account account) {\n\tStringBuilder statement = new StringBuilder(\"\");\n\n //Translate to pretty account type\n switch(account.getAccountType()){\n case CHECKING:\n statement.append(\"Checking Account\\n\");\n break;\n case SAVINGS:\n statement.append(\"Savings Account\\n\");\n break;\n case MAXI_SAVINGS:\n statement.append(\"Maxi Savings Account\\n\");\n break;\n }\n\n //Now total up all the transactions\n double total = 0.0;\n for (Transaction transaction : account.getTransactions()) {\n statement.append(\" \" + (transaction.getAmount() < 0 ? \"withdrawal\" : \"deposit\") + \" \" + toDollars(transaction.getAmount()) + \"\\n\");\n total += transaction.getAmount();\n }\n statement.append(\"Total \" + toDollars(total));\n return statement.toString();\n }", "public String printAllAccountInformation(Account account) {\n\t\tString stringOne = \"|| \" + account.getBusinessName() + \" || \" + account.getAssets() + \n\t\t\t\t \" || \" + account.getLiabilities() + \" || \" + account.getRevenue() +\n\t\t\t\t \" || \" + account.getExpenses() + \" || \" + account.getBeginningInventory() +\n\t\t\t\t \" || \" + account.getPurchases() + \" || \" + account.getCostOfSales();\n\t\tString stringTwo = \" || \" + cal.calculateEquity(account) \n\t\t+ \" || \" + cal.calculateIncome(account) \n\t\t+ \" || \" + cal.calculateInvertory(account) + \" ||\";\n\t\treturn stringOne + stringTwo;\n\t}", "public String toString()\r\n\t{\r\n\t\tString str = new String();\r\n\r\n\t\tfor(int i = 0; i<numAccounts; i++)\r\n\t\t\tstr = str + accounts[i].toString() + \"\\n\";\r\n\r\n\t\treturn str;\r\n\t}", "public String toString(){\n\t\treturn name + \": \" + books + \" books checked out\";\n\t}", "@Override\n public String toString() {\n return name+\" : \"+ CommonUtils.formatCurrency(amount);\n }", "public String toString() {\n return \"The card has \" + this.balance + \" euros\";\n }", "static void printAccountBalance(String address){\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tfinal String TAB = \" \";\r\n\r\n\t\tStringBuilder retValue = new StringBuilder();\r\n\r\n\t\tretValue.append(\"BankDTO ( \").append(super.toString()).append(TAB).append(\"available = \").append(this.available).append(TAB).append(\"code = \").append(this.code).append(TAB).append(\"name = \").append(this.name).append(TAB).append(\" )\");\r\n\r\n\t\treturn retValue.toString();\r\n\t}", "private String printLeagueOfLegendsAccountDetails(LeagueOfLegendsAccount account) {\r\n return \"[ region = \" + account.getRegion() + \",\\n name = \" + account.getInGameName() + \", \\n\"\r\n + \"blueEssenceBalance = \" + account.getBlueEssenceBalance() + \"BE\" + \", \\n\"\r\n + \"riotPointsBalance = \" + account.getRiotPointsBalance() + \"RP\" + \", \\n\"\r\n + account.getCollectionSize() + \" Champions owned\" + \", \\n\"\r\n + \"Champions owned = \"\r\n + account.myCollection.getListOfChampionName(account.myCollection) + \", \\n\"\r\n + account.getRecommendedSize() + \" Recommended Champions\" + \",\\n\"\r\n + \"Recommended Champions = \"\r\n + account.myRecommended.getListOfChampionName(account.myRecommended) + \", \\n\"\r\n + account.getFavouritesSize() + \" Favourite Champions\" + \", \\n\"\r\n + \"Favourite Champions = \"\r\n + account.myFavourites.getListOfChampionName(account.myFavourites) + \"\\n]\";\r\n }", "public static void main(String[] args) {\n BankAccount Yaoming = new BankAccount(0, \"blobfis@h\");\n BankAccount Hoshi = new BankAccount(2348123, \"Seventeen\");\n BankAccount Pewpew = new BankAccount(1245, \" \");\n\n System.out.println(Yaoming.getBalance());\n System.out.println(Hoshi.getAccountID());\n // System.out.println(Yaoming.getPassword());\n Yaoming.setPassword(\"donkey\");\n // System.out.println(Yaoming.getPassword());\n System.out.println(Yaoming.deposit(53.43));\n System.out.println(Yaoming.getBalance());\n if ( Yaoming.deposit(-100) ) System.out.println(\"Deposit successful!\");\n else {System.out.println(\"Deposit failed!\");}\n System.out.println();\n\n // System.out.println(Pewpew.getPassword());\n System.out.println(Pewpew.getBalance());\n System.out.println(Pewpew.deposit(2147823.23));\n System.out.println(Pewpew.withdraw(9999999));\n System.out.println(Pewpew.withdraw(-1231784.23));\n System.out.println(Pewpew.withdraw(0.23));\n System.out.println(Pewpew.getBalance());\n System.out.println();\n\n System.out.println(Hoshi.toString());\n System.out.println(Yaoming.toString());\n System.out.println(Pewpew.toString());\n System.out.println();\n\n BankAccount Sophia = new BankAccount(123456, \"meowmeow\");\n BankAccount Funky = new BankAccount(7890, \"woofwoof\");\n Sophia.deposit(7500);\n System.out.println(Sophia.getBalance());\n System.out.println(Funky.getBalance());\n System.out.println(Sophia.transferTo(Funky, 500, \"meowmeow\")); //should be true\n System.out.println(Funky.transferTo(Sophia, 1000, \"woofwoof\")); //should be false\n System.out.println(Funky.transferTo(Sophia, 300, \"hehehe\")); //should be false\n System.out.println(Sophia.getBalance()); //should be 7000.0\n System.out.println(Funky.getBalance()); //should be 500.0\n\n }", "public String printAccounts() {\n StringBuilder result;\n result = new StringBuilder((\"--Listing accounts in the database--\\n\"));\n for (int i = 0; i < size; i++) {\n result.append(accounts[i].toString()).append(\"\\n\");\n }\n result.append(\"--end of listing--\");\n return result.toString();\n }", "public void printInformation() {\n\t\tif (currentBalance == 0) {\n\t\t\tSystem.out.println(\"It is empty...\");\n\t\t} else if (currentBalance > 0 && currentBalance < 21) {\n\t\t\tSystem.out.println(\"There’s some, but not much.\");\n\t\t} else if (currentBalance > 20 && currentBalance < 101) {\n\t\t\tSystem.out.println(\"There’s some.\");\n\t\t} else if (currentBalance > 100) {\n\t\t\tSystem.out.println(\"There’s a lot.\");\n\t\t}\n\t}", "public String toString() { return \"Name: \" + firstName + ' ' + lastName + \"\\tGrade: \" + grade; }", "public static void main(String[] args) {\n Account account = new Account(1122, 20000);\n account.setAnnualInterestRate(4.5);\n \n // create checkingaccount object and set variables\n CheckingAccount checking = new CheckingAccount(1122, 20000);\n checking.setAnnualInterestRate(4.5);\n \n // create savings account object and set variables\n SavingsAccount savings = new SavingsAccount(1122, 20000);\n savings.setAnnualInterestRate(4.5);\n \n // invoke toString() methods\n account.toString();\n checking.toString();\n savings.toString();\n }", "public String printCalculationInformation(Account account) {\t\t\n\t\treturn \"|| \" + cal.calculateEquity(account) \n\t\t\t\t+ \" || \" + cal.calculateIncome(account) \n\t\t\t\t+ \" || \" + cal.calculateInvertory(account) + \" ||\";\n\t}", "public String toString() {\n System.out.println(this.getName() +\":\");\n System.out.println(\"Balance: $\" + this.getBalance());\n System.out.println(\"Monthly Interest: $\" + this.getMonthlyInterest());\n System.out.println(\"Date Created: \" + this.getDateCreated());\n System.out.println();\n return \"\";\n }", "@Override\n public String toString(){\n String printString = profile.toString();\n printString = printString + \"Payment $\";\n printString = printString + payDue;\n return printString;\n }", "@Override\n public String toString() {\n return \"rollno:\" + rollno + \"and name : \" + name;\n }", "public String toString() {\r\n\t\treturn name + \" @\" + worth; \r\n\t}", "@Override\n public String toString() {\n return name + \" Funds: £\" + funds +\n \", Shares: A[\" + shares.get(0) + \"], B[\" + shares.get(1) + \"], C[\" + shares.get(2) +\n \"], D[\" + shares.get(3) + \"], E[\" + shares.get(4) + \"]\";\n }", "void printCheck();", "public String toString(){\n return \"NAME: \"+this.name+\" ROLL: \"+this.roll+\" MALE: \"+this.male;\r\n }", "private static void displayAccount(Account account) {\n\t\tSystem.out.println(account.toString());\n\t\tSystem.out.println();\n\t}", "public static void createChecking(ArrayList<Account> accounts, int id, double balance, double interestRate) throws IOException{\n CheckingAccount cAccount = new CheckingAccount(id, balance, interestRate);\r\n \r\n //add the account just created to array\r\n accounts.add(cAccount);\r\n System.out.println(\"Your account has been created. Information of your new account is below. \\n\");\r\n \r\n //get the current index of the id and print out the info\r\n int idIndex = idIndex(accounts, cAccount.getID());\r\n System.out.println(\"Account type: Checking\");\r\n accounts.get(idIndex).displayAccountInformation();\r\n }", "public static void displayAccounts(ArrayList<Account> accounts){\n if (accounts.isEmpty()){\r\n System.out.println(\"There is no account\");\r\n } else {\r\n //print all accounts information\r\n System.out.println(\"All of your accounts are printed below: \\n\");\r\n for(int i = 0; i < accounts.size(); i++) {\r\n\r\n if (accounts.get(i) instanceof CheckingAccount){\r\n System.out.println(\"Account type: Checking\");\r\n accounts.get(i).displayAccountInformation();\r\n System.out.println(\"The number of pending checks: \" + ((CheckingAccount)accounts.get(i)).countPendingChecks());\r\n System.out.println();\r\n }\r\n \r\n if (accounts.get(i) instanceof SavingsAccount){\r\n System.out.println(\"Account type: Saving\");\r\n accounts.get(i).displayAccountInformation();\r\n System.out.println();\r\n } \r\n }\r\n }\r\n }", "public static void main(String[] args) {\n BankAccount bankAccount = new BankAccount(11211, 0, \"adam smith\", \"[email protected]\", \"9090980980\");\n BankAccount tim = new BankAccount(\"tim\", \"[email protected]\", \"9090980980\");\n System.out.println(\"Account Number = \" + tim.getAccountNumber());\n System.out.println(\"Balance = \"+ tim.getBalance());\n System.out.println(\"Customer Name = \" + bankAccount.getCustomerName());\n System.out.println(\"Email = \" + bankAccount.getEmailAddress());\n System.out.println(\"Phone Number = \" + bankAccount.getPhoneNumber());\n System.out.println(\"deposit = \"+ bankAccount.getDeposit(90));\n System.out.println(\"new balance = \"+ bankAccount.getWithdrawal(200));\n }", "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 Checking(String firstName, String lastName, int accountNumber, double accountBalance) {\n\t\tsuper(firstName, lastName, accountNumber, accountBalance);\n\t\t\n\t}", "public String toString() \r\n\t{\r\n\t\treturn(super.toString() + \"\\'s wages are:\" + calculatePay());\r\n\t}", "@Override\n public String toString() {\n return \"--------------------------------------------\\n\" +\n \"Transfer Details\\n\" +\n \"--------------------------------------------\\n\" +\n \"Id: \" + transferId +\"\\n\"+\n \"From: \" + accountFromId +\"\\n\"+\n \"To: \" + accountToId +\"\\n\"+\n \"Amount: \" + amount +\"\\n\"+\n \"Type:\" + transferTypeId +\"\\n\"+\n \"Status:\" + transferStatusId +\"\\n\";\n }", "public String printAccounts() { \n\t\t\n\t\tStringBuilder output = new StringBuilder(\"\");\n\t\t\n\t\tif(size > 0) {\n\t\t\t\n\t\t\toutput.append(\"--Listing accounts in the database--\\n\");\n\t\t\t//System.out.println(\"--Listing accounts in the database--\");\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\toutput.append(accounts[i].toString());\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\t//System.out.println(accounts[i].toString());\n\t\t\t}\n\t\t\t\n\t\t\toutput.append(\"--end of listing--\\n\");\n\t\t\t//System.out.println(\"--end of listing--\");\t\n\t\t\t\n\t\t}\n\n\t\telse {\n\t\t\toutput.append(\"Database is empty.\\n\");\n\t\t\t//System.out.println(\"Database is empty.\");\n\t\t}\n\t\t\n\t\treturn output.toString();\n\t}", "public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}", "@Override //indicates that this method overrides a superclass method\n public String toString(){\n\n return String.format(\"%s: %s %s%n%s : %s%n%s: %.2f%n%s: %.2f\",\"commission employee\",firstName,lastName,\n \"pan number\",panCardNumber,\"gross sales\",grossSales,\"commission rate\",commissionRate);\n }", "@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }", "@Override\n\tpublic String toString() {\n\t\tint temp = totalFees-feesPayed;\n\t\treturn (\"Student: \" + name + \" Total Fees Payed: $\" + feesPayed + \" Total Fees Remaining: $\" + temp);\n\t}", "@Override\n public String toString() {\n String completeStatus;\n if (this.getTransactionCompleteness()) {\n completeStatus = \"This transaction is complete.\";\n } else {\n completeStatus = \"This transaction is incomplete.\";\n }\n return \"This is a one-way trade where \" + this.getBorrowerName() + \" borrows \" + this.item.getName() + \" from \" +\n this.getLenderName() + \". \\nMeeting time & place: \" + this.getMeetingTime().toString() + \" at \" +\n this.getMeetingLocation() + \". \\n\" + completeStatus;\n }", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "public StudentSavingsAccount(double bal, String name) {\n\n \t\tsuper(bal, name);\n// \t super();\n// \t setName(name);\n// \t setBalance(bal);\n \t overdraftsBeforeFee = 3;\n \t System.out.println(\"double, String constructor called [StudentSavingsAccount]\");\t\n\n }", "public void gameUI(String username, BigDecimal balance){\n\n System.out.println(ANSI_RESET + username + \", balance: \" + ANSI_YELLOW + balance + \"\\n\" +\n ANSI_PURPLE + \"Command:\");\n }", "public Account(String name, double balance){\n\n this.name = name;\n\n if (balance > 0.0 )\n this.balance = balance;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Your name is\" + name;\n\t}", "public double getCheckingBalance() {\n return checkingBalance;\n }", "public static void main(String[] args) {\n\t\tString accNumber,accHolderName;\r\n\t\t double balance;\r\n\t\t double minimumBalance;\r\n\t\t int lockingPeriod;\r\n\t\tString detail;\r\n Scanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter account details:\");\r\n\t\tdetail=sc.nextLine();\r\n\t\taccountBO ab=new accountBO();\r\n\t\tab.getAccountDetail( detail);\r\n\t\t \r\n\t\tfixedAccount fa=new fixedAccount();\r\n\t\tfa.setAccNumber(accNumber);\r\n\t\tfa.setBalance(minimumBalance);\r\n\t\tfa.setAccHolderName(accHolderName);\r\n\t\tfa.setBalance(minimumBalance);\r\n\t\tfa.setLockingPeriod(lockingPeriod);\r\n\t\t\r\n\t\tSystem.out.format(\"%-20s %-10s %-20s %-20s %s\\n\",\"Account Number\",\"Balance\",\"Account holder name\",\"Minimum balance\",\"Locking period\");\r\n\t\tSystem.out.println(fa.getAccNumber()+\"\\t\"+fa.getBalance()=\"\\t\"+fa.getAccHolderName()+\"\\t\"+fa.getMinimumBalance()+\"\\t\"+fa.getLockingPeriod());\r\n\t}", "@Override\n public String toString()\n {\n return getClass().getSimpleName() + \"(\" + getAccountID() + \")\";\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"CAccountRecord [id=\" + id + \", memberNo=\" + memberNo + \", menberName=\" + menberName + \", mobilePhone=\"\n\t\t\t\t+ mobilePhone + \", dealType=\" + dealType + \", type=\" + type + \", trnasactionAmount=\" + trnasactionAmount\n\t\t\t\t+ \", originalAmount=\" + originalAmount + \", balance=\" + balance + \", orderNo=\" + orderNo\n\t\t\t\t+ \", payflowNo=\" + payflowNo + \", createTime=\" + createTime + \", createTimeStart=\" + createTimeStart\n\t\t\t\t+ \", createTimeEnd=\" + createTimeEnd + \", updateTime=\" + updateTime + \", updateTimeStart=\"\n\t\t\t\t+ updateTimeStart + \", updateTimeEnd=\" + updateTimeEnd + \", operatorType=\" + operatorType\n\t\t\t\t+ \", operatorId=\" + operatorId + \", payType=\" + payType + \"]\";\n\t}", "public CheckAccount(double balance, double option) {\n this.balance = balance;\n this.option = option;\n }", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "public String toString(){\r\n\t\treturn this.username+\"(\"+this.firstname+\" \"+this.lastname+\")\";\r\n\t}", "public String printFormattedAccounts() {\n\t\t\n\t\tStringBuilder output = new StringBuilder(\"\");\n\t\t\n\t\tif(size > 0) {\n\t\t\t\n\t\t\tfor(int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\toutput.append(accounts[i].toStringExport());\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n\t\t\toutput.append(\"Empty database.\");\n\t\t\t\n\t\t}\n\t\t\n\t\treturn output.toString();\n\t\t\n\t}", "public String toString(){\r\n String details = \"Name: \" + name + \" Monthly Salary: \" + monthlySalary;\r\n return details; \r\n }", "public void viewBalance() {\n\t\tSystem.out.println(\"This is your current Balance $\" + tuitionBalance);\n\t}", "Account(String name, double balance)\r\n\t{\r\n\t\t\r\n\t\tthis.name = name; //assign name to the instance variable name \r\n\t\t\r\n\t\t// validate that the balance is greater that 0.0; if it is not,\r\n\t\t// instance variable balance keeps its default value 0.0\r\n\t\tif(balance > 0.0) // if balance is valid\r\n\t\t\tthis.balance = balance; // assign balance to the instance variable balance\t\t\t\t\t\r\n\t}", "public String toString() {\n return userName+\"==\"+firstName+\"==\"+lastName+\"==\"+winPercentage+\"==\"+profileImage;\n }", "public String toString() {\r\n\t\treturn \"Name\t:\" + this.name + \"\\n\" +\r\n\t\t\t\t\"Salary\t:\" + this.salary;\r\n\t}", "public String toString()\n {\n return \"\\nName: \" + name + \"\\n\";\n }", "public String toString(){\r\n\t\t\r\n\t\tString result = \"\";\r\n\t\tfor (int i = 0; i < this.cardCount()-1; i++)\r\n\t\t\tresult += this.getCard(i).toString() + \", \";\r\n\t\t\r\n\t\treturn result + this.getCard(this.cardCount()-1).toString() + \" has Blackjack value \" + this.value();\r\n\t}", "public void showAccountBalance(){\n balance();\n\n }" ]
[ "0.736177", "0.70406413", "0.7015661", "0.7007959", "0.682725", "0.682619", "0.6757683", "0.6605258", "0.6588076", "0.6553249", "0.65204376", "0.6509272", "0.6481781", "0.64502925", "0.6444232", "0.64140344", "0.639537", "0.6385209", "0.6381522", "0.6376466", "0.63236225", "0.63104534", "0.6299308", "0.6236042", "0.6210835", "0.6207288", "0.61844456", "0.61778533", "0.61623377", "0.61617196", "0.61312115", "0.60806626", "0.6047381", "0.6027645", "0.6009231", "0.60090727", "0.60074294", "0.60055983", "0.60053", "0.59866387", "0.59302366", "0.59263414", "0.5880121", "0.58771205", "0.5871561", "0.58702874", "0.583579", "0.57913405", "0.5746196", "0.57154346", "0.57073617", "0.5698504", "0.5698207", "0.5696935", "0.56917447", "0.56885654", "0.56793064", "0.5678206", "0.5673878", "0.5668586", "0.5667078", "0.565421", "0.56499547", "0.56401855", "0.56207937", "0.5619335", "0.56087786", "0.5606182", "0.5593678", "0.5585672", "0.5578441", "0.5573746", "0.55601674", "0.55518425", "0.5532914", "0.5531181", "0.5525902", "0.5524416", "0.55179006", "0.5515776", "0.5513634", "0.55065084", "0.5493707", "0.5488236", "0.5482345", "0.5481803", "0.54805195", "0.5473398", "0.54727453", "0.5471232", "0.54669154", "0.54630375", "0.54570633", "0.5455377", "0.54543024", "0.5451997", "0.54494184", "0.5449396", "0.54366004", "0.5434921" ]
0.8481232
0
Method: Checking(String name) Inputs: name Returns: Description: The method construct a new account with name.
private Checking(String name) { super(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Checking createChecking(String name) {\r\n return new Checking(name);\r\n }", "public CheckingAccount() {\n\t\tsuper();\n\t}", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public Checking(String name, float balance) {\r\n\t\tsuper(name, balance);\r\n\t}", "public Checking(String name, String ssn, double initDeposit) {\n\t\tsuper(name, ssn, initDeposit);\n\t\t\n\t\tSystem.out.println(\"Checking\");\n\t\tSystem.out.println(\"SSN: *****\\\" + ssn.substring(5)\");\n\t\tSystem.out.println(\"Current balance: \" + balance + \"\\n\");\n\t}", "public CheckingAccount(String n) {\n super(n);\n balance = 0;\n }", "public CoinbaseAccount createCoinbaseAccount(String name) throws IOException {\n\n class Payload {\n @JsonProperty\n String name;\n Payload(String name) {\n this.name = name;\n }\n }\n \n Payload payload = new Payload(name);\n\n String path = \"/v2/accounts\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String body = new ObjectMapper().writeValueAsString(payload);\n String signature = getSignature(timestamp, HttpMethod.POST, path, body);\n showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);\n \n return coinbase.createAccount(MediaType.APPLICATION_JSON, Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp, payload).getData();\n }", "public CheckingAccount() {\n super(); \n }", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public Account(String accountName) throws AccountException{\n\n\t\t\tif (accountName.length() < 5)\n\t\t\t\tthrow new AccountException (AccountException.NAME_TOO_SHORT, accountName);\n\t\t\tboolean valid = true;\n\t\t\tchar[] a = accountName.toCharArray();\n\t\t\tfor (char c: a) {\n\t\t\t\tvalid = ((c >= 'a') && (c <= 'z')) ||\n\t\t\t\t\t\t((c >= 'A') && (c <= 'Z')) ||\n\t\t\t\t\t\t((c >= '0') && (c <= '9'));\n\t\t\t\tif (!valid) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!valid) throw new AccountException (AccountException.NAME_TOO_SIMPLE, accountName);\n\t\t\tthis.name = accountName;\n\t}", "public Checking(String name, String sSN, double initDeposit) {\n\t\tsuper(name,sSN,initDeposit);\n\t\taccountNumber = \"2\" + accountNumber;\n\t\tsetDebitCard();\n\t}", "public static Account createNewAccount(String GID, String name) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t InputStream file = new FileInputStream(fileName);\r\n\t\t InputStream buffer = new BufferedInputStream(file);\r\n\t\t ObjectInput input = new ObjectInputStream(buffer);\r\n\t\t \r\n\t\t try {\r\n\t\t\t //deserialize the Account object\r\n\t\t\t Account recoveredAccount = (Account)input.readObject();\r\n\t\t\t currentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t }\r\n\t\t \r\n\t\t finally {\r\n\t\t \tinput.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t}\r\n\t}", "public StorageAccountCheckNameAvailabilityParametersInner withName(String name) {\n this.name = name;\n return this;\n }", "public CoupleAccount(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public BankAccount lookUp(String name){\n\t\t// create an Entry with the given name, a \"dummy\" accountNumber (1) and zero balance\n\t\t// This \"dummy\" accountNumber will be ignored when executing getData\n\t\tBankAccount lookFor = new BankAccount(name, 1, 0);\n\t\treturn (BankAccount)namesTree.findData(lookFor);\n\t}", "public boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;", "public boolean checkName(String name)\n {\n return true;\n }", "public CheckingAccount()\n {\n withdrawals = 0;\n deposits = 0;\n }", "private String createAccount(String name, double amount) {\n\t\tString accountNumber = \"\";\n\t\tAccount account = new Account();\n\t\taccount.setName(name);\n\t\taccount.setAmount(amount);\n\t\t\n\t\tString requestBody = gson.toJson(account);\n\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.post(\"/account\");\n\t\tif (response.asString() != null && response.asString().contains(\":\")) {\n\t\t\tString responseArr[] = response.asString().split(\":\");\n\t\t\taccountNumber = responseArr[1].trim();\n\t\t}\n\t\treturn accountNumber;\n\t}", "public static Account createNewAccount(String GID, String name, Context activity) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(activity.getFilesDir(), fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t FileInputStream fis = activity.openFileInput(fileName);\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAccount recoveredAccount = (Account) ois.readObject();\r\n\t\t\t\t\tcurrentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t\t\t}\r\n\t\t finally {\r\n\t\t \tois.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name, activity);\r\n\t\t}\r\n\t}", "public Checking(String firstName, String lastName, int accountNumber, double accountBalance) {\n\t\tsuper(firstName, lastName, accountNumber, accountBalance);\n\t\t\n\t}", "public String checkUsername() {\n String username = \"\"; // Create username\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n username = checkEmpty(\"Account\"); // Call method to check input of username\n boolean isExist = false; // Check exist username\n for (Account acc : accounts) {\n // If username is exist, print out error\n if (username.equals(acc.getUsername())) {\n System.out.println(\"This account has already existed\");\n System.out.print(\"Try another account: \");\n isExist = true;\n }\n }\n // If username not exist then return username\n if (!isExist) {\n return username;\n }\n }\n return username; // Return username\n }", "public Account(String name, String idNum) {\n\t\tthis.name = name;\n\t\tthis.idN = idNum;\n\t\tsetRate();\n\n\t\t//create Account Number\n\t\tthis.accountNumber = createAccountNumber();\n\t\t//create Password for login bank\n\t\tthis.password = createPw();\n\t\t\n\t}", "Account(String name, double balance)\r\n\t{\r\n\t\t\r\n\t\tthis.name = name; //assign name to the instance variable name \r\n\t\t\r\n\t\t// validate that the balance is greater that 0.0; if it is not,\r\n\t\t// instance variable balance keeps its default value 0.0\r\n\t\tif(balance > 0.0) // if balance is valid\r\n\t\t\tthis.balance = balance; // assign balance to the instance variable balance\t\t\t\t\t\r\n\t}", "public Account(String name, String email) {\n this.name = name;\n this.email = email;\n }", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "public Account(String name, double balance){\n\n this.name = name;\n\n if (balance > 0.0 )\n this.balance = balance;\n }", "Account create();", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "static Operator accountCheck(VendingMachine m, String name, String pass, String verify, String perm) {\r\n Operator op = new Operator(name, pass, perm);\r\n\r\n if (!pass.equals(verify)) {\r\n JOptionPane.showMessageDialog(null, \"Passwords do not match!\", \"Error\", 0);\r\n } else if (name.equals(\"\") || pass.equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Blank spaces invalid!\", \"Error\", 0);\r\n } else if (copyCheck(m, op)) {\r\n return op;\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"Username taken!\", \"Error\", 0);\r\n }\r\n return null;\r\n }", "public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n Account instance = new Account(\"Piper\", 10.0);\n String expResult = \"Piper\";\n String result = instance.getName();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "int createAccount(Account account);", "private boolean checkName(String name) {\n if (!name.equals(\"\")) {\n //Check si le nom est déjà utilisé\n return myDbA.checkName(name);\n }\n return false;\n }", "public Account(String GID, String name) {\r\n\t\r\n\t\tthis.GID = GID;\r\n\t\tthis.name = name;\r\n\t\tevents = new ArrayList<Event>();\r\n\t\tpastRelations = new ArrayList<Account>();\r\n\t\tsettings = new ArrayList<String>();\r\n\t}", "@Test\n\tpublic void testCreateAdminAccountWithEmptyName() {\n\t\tString name = \"\";\n\t\tString username = \"Catherine\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, PASSWORD1, name);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Name cannot be empty.\", error);\n\t}", "Account() { }", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "public Checking_Account (int account_num, double initial_balance, Savings_Account protection)\r\n {\r\n\r\n super (account_num, initial_balance);\r\n overdraft = protection;\r\n\r\n }", "default void checkInOk(String name) {\n }", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public static void createAccount()throws IOException{\n\t\ttry{\n\t\t\tFile accountInfo = new File(\"account.txt\");\n\t\t\tFile Information = new File(\"information.txt\");\n\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\tArrayList<String> info = new ArrayList<String>();\n\t\t\tScanner inputFromInformation = new Scanner(Information);\n\t\t\tScanner inputFromAccount = new Scanner(accountInfo);\n\t\t\twhile (inputFromAccount.hasNextLine()){\n\t\t\t\ttemp.add(inputFromAccount.nextLine());\n\t\t\t}\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\t// This is where we will start the new account process\n\t\t\t// first by telling us who you are.\n\t\t\tSystem.out.println(\"Enter your First Name\");\n\t\t\tString firstName = input.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter your Last Name\");\n\t\t\tString lastName = input.next();\n\t\t\t// This will give the user recommended\n\t\t\t// user names if they cannot think of one.\n\t\t\tRecommendedUserNames(firstName,lastName);\n\t\t\t// here they will be prompt to enter their preferred user name\n\t\t\tSystem.out.println(\"Enter your preferred username\");\n\t\t\tString UserName = input.next();\n\t\t\t// This will prompt the user for a password\n\t\t\t// The password will have to meet these requirements\n\t\t\tSystem.out.println(\"Your password should meet the following requirements:\");\n\t\t\tSystem.out.println(\"-It must have at least eight characters.\\n-It must consist of only letters and digits.\"\n\t\t\t\t\t\t\t+ \"\\n-It must contain more than two digits and two characters.\");\n\t\t\tSystem.out.println(\"\\nEnter your new Password\");\n\t\t\tString Password = input.next();\n\t\t\t\n\t\t\t// this is what will verify the user password and see if it meets the recommended requirements\n\t\t\t// for security reasons of course.\n\t\t\tString Pass;\n\n\t\t\tboolean check=false;\n\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\twhile(!check){\n\t\t\t\tSystem.out.println(\"Please recheck the password requirement and try again.\");\n\t\t\t\tPassword = input.next();\n\t\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\t}\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"\\nPlease re-enter the Password\");\n\t\t\t\tPass = input.next();\n\t\t\t\tif(!Pass.equals(Password))System.out.println(\"Passwords do not match!\");\n\t\t\t}while(!Pass.equals(Password));\n\t\t\tboolean CreateAccount = true;\n\t\t\tSystem.out.println(\"You need to fill the information for completion of your account registration\");\n\t\t\teditInfo(UserName,CreateAccount);\n\t\t\tPrintWriter output = new PrintWriter(accountInfo);\n\t\t\ttemp.add(UserName+\" \"+Password);\n\t\t\tfor (int i=0; i<temp.size(); i++){\n\t\t\t\toutput.println(temp.get(i));\n\t\t\t}\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Your account has been created and your information has been saved\"\n\t\t\t\t\t+ \"\\nYou have been logged out for this session\\n\");\n\t\t\tstarter();\n\t\t}\n\t\tcatch (java.io.IOException ex){\n\t\t\tSystem.out.println(\"I/O Errors: File is not found\");\n\t\t}\t\n\t}", "public long createcomp(String name, String bal) {\n\t\tContentValues cv2=new ContentValues();\n\t\tcv2.put(Com_Name, name);\n\t\tcv2.put(Com_Balance, Integer.parseInt(bal));\n\t\treturn ourDatabase.insert(DATABASE_TABLE1, null, cv2);\n\t\t\n\t}", "private void insert(String name, boolean checkBalance)\r\n\t{\r\n\t\t// Create the Node with the given String\r\n\t\tNode newNode = new Node(name);\r\n\t\t\r\n\t\t// Check to see if the Tree is currently empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Add the Node by setting the root to point to it and increment counter\r\n\t\t\tsetRoot(newNode);\r\n\t\t\tincrementCounter();\r\n\t\t}\r\n\t\t// Tree is not empty so use the insert helper to place the Node in the correct spot\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Passing the Root reference as the starting point for the Node insertion\r\n\t\t\t// as well as the reference to the newly created Node\r\n\t\t\tinsert(getRoot(), newNode);\r\n\t\t\t\r\n\t\t\t// Balance the tree only if necessary - ie. checkBalance is true and\r\n\t\t\t// the current depth of the tree is greater than what it should be based on \r\n\t\t\t// the total amount of Nodes in the tree\r\n\t\t\tif(checkBalance && depth() > howManyLevels())\r\n\t\t\t{\r\n\t\t\t\t// Call the balance method to balance the tree\r\n\t\t\t\tbalance();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@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 Account create(CheckingAccDto checkingAccDto) {\n CheckingAcc checkingAcc;\n Optional<AccountHolder> accountHolder = accountHolderRepository.findById(checkingAccDto.getPrimaryOwnerId());\n if (accountHolder.isPresent()){\n if(Utils.calculateYears(accountHolder.get().getDateOfBirth())<24){\n StudentCheckingAcc studentCheckingAcc = new StudentCheckingAcc(\n accountHolder.get(),\n new Money(checkingAccDto.getBalance()),\n checkingAccDto.getSecretKey());\n if (checkingAccDto.getSecondaryOwnerId() != null){\n Optional<AccountHolder> secondaryOwner = accountHolderRepository.findById(checkingAccDto.getSecondaryOwnerId());\n if (secondaryOwner.isPresent()){\n studentCheckingAcc.setSecondaryOwner(secondaryOwner.get());\n }\n }\n return studentCheckingAccRepository.save(studentCheckingAcc);\n } else {\n checkingAcc = new CheckingAcc (accountHolder.get(),\n new Money(checkingAccDto.getBalance()),\n checkingAccDto.getSecretKey());\n if (checkingAccDto.getSecondaryOwnerId() != null){\n Optional<AccountHolder> secondaryOwner = accountHolderRepository.findById(checkingAccDto.getSecondaryOwnerId());\n if (secondaryOwner.isPresent()){\n checkingAcc.setSecondaryOwner(secondaryOwner.get());\n }\n }\n return checkingAccRepository.save(checkingAcc);\n }\n } else {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"Primary owner not found\");\n }\n }", "@Test\n public void usernameTestTrue (){\n Accounts test = null;\n test.createAccounts();\n test = Accounts.getByUsername(\"bob\");\n assertNotNull(test);\n }", "public StudentSavingsAccount(double bal, String name) {\n\n \t\tsuper(bal, name);\n// \t super();\n// \t setName(name);\n// \t setBalance(bal);\n \t overdraftsBeforeFee = 3;\n \t System.out.println(\"double, String constructor called [StudentSavingsAccount]\");\t\n\n }", "boolean validateAccount(String Account) {\n\t\treturn true;\n\n\t}", "public Account fillAccount(String emailAddress, String name) {\n\t\tAccount acct = new Account();\n\t\t// Set the unique Id on our side that we pass when we are creating this account\n\t\tacct.setMerchantAccountId(VindiciaUtil.createUniqueId(\"account\")); \n\n\t\t// Specify customer's email address here . This the address where customer\n\t\t// will receive CashBox generated emails\n\t\tacct.setEmailAddress(emailAddress);\n\t\tacct.setName(name);\n\t\t\n\t\treturn acct;\n\t}", "public User(String name) {\n this(UUID.randomUUID().toString(), name, String.format(\"User account for %s\", name) );\n }", "@Test\n\tpublic void testCreateAdminAccountWithTakenUsername() {\n\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(USERNAME1, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"This username is not available.\", error);\n\t}", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "public Account(String name, Double balance, String accNum){\n\t\tthis.name = name;\n\t\taccountNumber = accNum;\n\t\tthis.balance = balance;\n\t}", "private String createUser(String name) {\n\t\treturn null;\n\t}", "public static void createChecking(ArrayList<Account> accounts, int id, double balance, double interestRate) throws IOException{\n CheckingAccount cAccount = new CheckingAccount(id, balance, interestRate);\r\n \r\n //add the account just created to array\r\n accounts.add(cAccount);\r\n System.out.println(\"Your account has been created. Information of your new account is below. \\n\");\r\n \r\n //get the current index of the id and print out the info\r\n int idIndex = idIndex(accounts, cAccount.getID());\r\n System.out.println(\"Account type: Checking\");\r\n accounts.get(idIndex).displayAccountInformation();\r\n }", "@Override\r\n\tpublic Account findByName(String name) {\n\t\treturn null;\r\n\t}", "public static void main (String[] args)\r\n{\nAccount a = new SavingsAccount(\"john\",500,4);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+a.getName()+\"has an initial balance of:\"+a.getBalance());\r\na.deposit(200);\r\na.withdraw(200);\r\nSystem.out.println(\"\"+a.getName()+\"at the end of transaction has a balance of \"+a.getBalance());\r\n\r\nSystem.out.println(\"\\n checking account details\");\r\nSystem.out.println(\"----------------------\");\r\nCheckingAccount cAobj = new CheckingAccount(\"Stephen\",200,200);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+cAobj.getName()+\"has an initial balance of:\"+cAobj.getBalance());\r\ncAobj.deposit(200);\r\ncAobj.withdraw(500);\r\nSystem.out.println(\"\"+cAobj.getName()+\"at the end of transaction has a balance of \"+cAobj.getBalance());\r\n}", "public CheckAccount(double balance, double option) {\n this.balance = balance;\n this.option = option;\n }", "public void setCheckingAccount(BankAccount newChecking) {\n this.checkingAccount = newChecking;\n }", "public void makeDposit(String accountName, Transaction deposit){\n for (int i=0; i<=accounts.size();i++)\n {\n if (accounts.get(i).name.equals(accountName))\n {\n// found = true;\n this.accounts.get(i).makeTransaction(deposit);\n return;\n }\n }\n System.out.println(\"account not found\");\n }", "default void checkIn(String name, HealthStatus status) {\n }", "public User(String name) {\n\t\tthis.name = name;\n\t\tthis.score = 0;\n\t\tthis.levelReached = 0;\n\t}", "@Test\n\tpublic void createAccountChequingTest() {\n\t\trdbtnChequing.setSelected(true); // by default AddAccountDialog will\n\t\t\t\t\t\t\t\t\t\t\t// select this to be true, for\n\t\t\t\t\t\t\t\t\t\t\t// testing reset to fault\n\t\tdata.setRdbtnChequing(rdbtnChequing);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.CHEQUING.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "public static void createAccount(String name, String address, String contactNum, SavingsAccount savings) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, savings));\n\t}", "public void firstNameCheck() {\n\t\t\tif (getNameOfTheCard().equalsIgnoreCase(getCustomerFullName())) {\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(false);\n\t\t\t} else {\n\n\n\t\t\t\tList<DebitAutendicationView> localEmpllist = iPersonalRemittanceService.getdebitAutendicationList();\n\t\t\t\tsetEmpllist(localEmpllist);\n\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(true);\n\t\t\t\t// populate alert msg if customer name not match\n\t\t\t\tsetExceptionMessage(Constants.NameCheckAlertMsg);\n\t\t\t\tRequestContext.getCurrentInstance().execute(\"alertmsg.show();\");\n\t\t\t}\n\t\t}", "@Test\n public void testSetName() {\n System.out.println(\"setName\");\n String name = \"Yina\";\n Account instance = new Account(\"Piper\", 10.0);\n instance.setName(name);\n String expResult = \"Yina\";\n String result = instance.getName();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public Participant(Account associatedAccount, String name){\r\n\t\tthis.associatedAccount = associatedAccount;\r\n\t\tthis.name = name;\r\n\t\tbalance = 0;\r\n\t\tspent = 0;\r\n\t}", "@Override\r\n\tpublic int checkInit(String name) {\n\t\tint a = -1;\r\n\t\t a = userReposotory.checkInitByName(name);\r\n\t\treturn a;\r\n\t}", "public BankAccount getCheckingAccount() {\n return checkingAccount;\n }", "public RepositoryNameValidator(String name)\n {\n super(name);\n }", "public BankAccount createAccount(String name, String pin, int initialDeposit) {\n\t\tString accountNumber = \"\";\n\n\t\tString sql = \"INSERT INTO accounts (id, name, pin, balance, balance_saving) VALUES(?, ?, ?, ?, ?)\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// not sure why this was changed, but the database should of been auto-incrementing id\n\t\t\tpstmt.setInt(1, getNumAccounts() + 1);\n\t\t\tpstmt.setString(2, name);\n\t\t\tpstmt.setString(3, pin);\n\t\t\tpstmt.setInt(4, initialDeposit);\n\t\t\tpstmt.setInt(5, 0);\n\n\t\t\tpstmt.executeUpdate();\n\t\t\tResultSet genky = pstmt.getGeneratedKeys();\n\t\t\taccountNumber = Long.toString(genky.getLong(1));\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn authenticateAccount(accountNumber, pin);\n\t}", "protected Account(String n) {\n name = n;\n state = State.OPEN;\n }", "private boolean isNameValid(String name) {\n\n }", "public static String userNameValid(String name){\n return \"select u_name from users having u_name = '\" + name + \"'\";\n }", "protected void check(String name, Object value) {\n\t\tcheck(name,value,false);\n\t}", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n String expResult = \"Kelly\";\n String result = instance.getName();\n assertEquals(expResult, result);\n \n }", "public boolean checkName(String name)\n {\n boolean value = true;\n if(name.length() < 3 || name.length() > 15)\n {\n System.out.println(\"Name must be between 3 and 15 characters\");\n value = false;\n }\n return value;\n }", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "public Account(int accountNo, String accountHolderName, double balance) {\r\n this.accountNo = accountNo;\r\n this.accountHolderName = accountHolderName;\r\n this.balance = balance;\r\n\r\n Account.accountCount++;\r\n }", "public int user_check(String name) {\n\t\treturn Sdao.seat_numselect(name);\r\n\t}", "public PerfIDEValidation(String name) {\n super(name);\n }", "public ContainsNamedTypeChecker(String name) {\n myNames.add(name);\n }", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "@Test\n\tpublic void createAccTest() {\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tbc.createAccount(cus, 1);\n\t\tassertEquals(1, cus.getAccList().size());\n\t}", "public void createUserAccount(UserAccount account);", "@Test\n public void testGetAccountByName() {\n\tassertEquals(1, 1);\n }", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "private static Boolean putName(String name) {\n\n try (Connection connection = DriverManager.getConnection(URL, \"kgrad5\", \"\")) {\n PreparedStatement stmt = connection.prepareCall(\"insert into names (name) values (?)\");\n stmt.setString(1, name);\n return (stmt.executeUpdate() > 0);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "public CheckingAcoount(String accountHolder, long accountNum, double balance) {\n // super to have parent class constructor !\n super(accountHolder, accountNum, balance);\n }", "public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}", "public Account() {\r\n\t\tthis(\"[email protected]\", \"Account\");\r\n\t}", "private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false, new CreditCard(\"4320123412340008\"));\n\n return account;\n }", "public BankUser(String name, String id, String pin, Account[] accounts){\n \tif (bankUsers.size() > 0){\n\t\t\tfor (BankUser checkUser: bankUsers){\n\t\t\t\tif (id.equals(checkUser.id)){\n\t\t\t\t\tthrow new java.lang.IllegalArgumentException(\"Id already in use\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \tthis.name = name;\n \tthis.pin = pin;\n \tthis.id = id;\n \tthis.accounts = accounts;\n \tbankUsers.add(this);\n }", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "void checkUserName() {\n usernameChecked = false;\n signInUpController.checkUserName(userNameText.getText().toString(), new OnTaskListeners.Bool() {\n @Override\n public void onSuccess(Boolean result) {\n usernameChecked = true;\n if (result)\n uniqueUsername = false;\n else\n uniqueUsername = true;\n\n\n }\n });\n }", "@Override\r\n\tpublic int check(String name, String code) {\n\t\treturn productRawDao.checkNameAndCode(name, code);\r\n\t}", "public User(String name) {\r\n\t\tthis.name = name;\r\n\t}" ]
[ "0.71529853", "0.6584641", "0.6581029", "0.65278465", "0.6364974", "0.63528603", "0.6168796", "0.6160827", "0.61483985", "0.61388403", "0.60020727", "0.5927323", "0.5882661", "0.5878589", "0.58687204", "0.58668005", "0.5859831", "0.583519", "0.5834494", "0.58342636", "0.5833921", "0.58318985", "0.5808087", "0.57717234", "0.57599074", "0.57250684", "0.57023585", "0.56892", "0.5659233", "0.5650306", "0.563622", "0.56243354", "0.56207687", "0.5604606", "0.5602642", "0.5582831", "0.5559673", "0.5557331", "0.55544454", "0.55526257", "0.5548097", "0.55410737", "0.5533685", "0.5524891", "0.551522", "0.5478892", "0.547605", "0.5470072", "0.5449517", "0.5434274", "0.54256004", "0.54054147", "0.54000753", "0.539642", "0.5394657", "0.53578454", "0.53554064", "0.5349278", "0.5342255", "0.5335438", "0.5333858", "0.53285754", "0.5318542", "0.5312444", "0.5310547", "0.5308522", "0.5305656", "0.5291814", "0.52819407", "0.5279534", "0.5273748", "0.52658534", "0.52612823", "0.52590877", "0.52382183", "0.52323675", "0.5226501", "0.5212943", "0.5210159", "0.5206223", "0.5204361", "0.5202787", "0.51998925", "0.5193257", "0.51906663", "0.5178121", "0.51615644", "0.5159295", "0.5151469", "0.5143946", "0.5138305", "0.5137949", "0.5136454", "0.5134319", "0.51285833", "0.5121275", "0.511105", "0.51014173", "0.509686", "0.50927967" ]
0.6891508
1
ACTION_OPEN_DOCUMENT is the intent to choose a file via the system's file browser.
public void onClick(View v) { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); // Filter to only show results that can be "opened", such as a // file (as opposed to a list of contacts or timezones) intent.addCategory(Intent.CATEGORY_OPENABLE); // Filter to show only images, using the image MIME data type. // it would be "*/*". intent.setType("*/*"); startActivityForResult(intent, RESULT_PICK_IMAGEFILE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n //intent.setType(\"*/*\");\n intent.setType(\"text/plain\");\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "public static void openDocument(Context context, String strFilePath, String strFileType) {\n try {\n File file = new File(strFilePath);\n Intent intent = new Intent(Intent.ACTION_VIEW);\n /* if (strFileType.equals(\"pdf\")) {\n intent.setDataAndType(Uri.fromFile(file), \"application/pdf\");\n } else if (strFileType.equals(\"doc\") || strFileType.equals(\"docx\")) {\n MimeTypeMap myMime = MimeTypeMap.getSingleton();\n String mimeType = myMime.getMimeTypeFromExtension(strFilePath);\n intent.setDataAndType(Uri.fromFile(file), mimeType);\n } else {\n intent.setDataAndType(Uri.fromFile(file), \"application/*\");\n }*/\n intent.setDataAndType(Uri.fromFile(file), \"application/*\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n context.startActivity(intent);\n } catch (ActivityNotFoundException activityNotFoundException) {\n activityNotFoundException.printStackTrace();\n throw activityNotFoundException;\n } catch (Exception otherException) {\n otherException.printStackTrace();\n throw otherException;\n }\n }", "private void showOpenFileDialog() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n // We accept PDF files and images (for image documents).\n intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {\"application/pdf\", \"image/*\"});\n\n // Set of the intent for result, so we can retrieve the Uri of the selected document.\n startActivityForResult(intent, REQUEST_OPEN_DOCUMENT);\n }", "private void openDocument(DocumentInfo doc, Model model) {\n Intent intent = new QuickViewIntentBuilder(\n getPackageManager(), getResources(), doc, model).build();\n\n if (intent != null) {\n // TODO: un-work around issue b/24963914. Should be fixed soon.\n try {\n startActivity(intent);\n return;\n } catch (SecurityException e) {\n // Carry on to regular view mode.\n Log.e(TAG, \"Caught security error: \" + e.getLocalizedMessage());\n }\n }\n\n // Fall back to traditional VIEW action...\n intent = new Intent(Intent.ACTION_VIEW);\n intent.setDataAndType(doc.derivedUri, doc.mimeType);\n\n // Downloads has traditionally added the WRITE permission\n // in the TrampolineActivity. Since this behavior is long\n // established, we set the same permission for non-managed files\n // This ensures consistent behavior between the Downloads root\n // and other roots.\n int flags = Intent.FLAG_GRANT_READ_URI_PERMISSION;\n if (doc.isWriteSupported()) {\n flags |= Intent.FLAG_GRANT_WRITE_URI_PERMISSION;\n }\n intent.setFlags(flags);\n\n if (DEBUG && intent.getClipData() != null) {\n Log.d(TAG, \"Starting intent w/ clip data: \" + intent.getClipData());\n }\n\n try {\n startActivity(intent);\n } catch (ActivityNotFoundException e) {\n Snackbars.makeSnackbar(\n this, R.string.toast_no_application, Snackbar.LENGTH_SHORT).show();\n }\n }", "private void showFileChooser() {\n // Intent intent = new Intent();\n\n /* intent.setType(\"application/pdf\");\n intent.setType(\"docx*//*\");*/\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n String [] mimeTypes = {\"application/pdf/docx\"};\n intent.setType(\"*/*\");\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\n\n\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "private void startFileSelection() {\n final Intent chooseFile = new Intent(Intent.ACTION_GET_CONTENT);\n chooseFile.setType(getString(R.string.file_type));\n startActivityForResult(chooseFile, PICK_FILE_RESULT_CODE);\n }", "public static void launchDocumentPickerInActivity(Activity context, int REQUEST_CODE) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"application/*\");\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n context.startActivityForResult(intent, REQUEST_CODE);\n }", "public void openURLByFile(String url)\n {\n getAppleMenu().activate();\n getAppleMenu().select(Menu.FILE);\n getAppleMenu().open(Menu.OPEN_URL);\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }", "@Override\n protected void onActivityResult(final int requestCode,\n final int resultCode, final Intent data) {\n switch (requestCode) {\n\n case REQUEST_CODE_OPENER:\n if (resultCode == RESULT_OK) {\n mFileId = data.getParcelableExtra(\n OpenFileActivityBuilder.EXTRA_RESPONSE_DRIVE_ID);\n\n Log.e(\"file id\", mFileId.getResourceId() + \"\");\n\n String url = \"https://drive.google.com/open?id=\"+ mFileId.getResourceId();\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n }\n break;\n\n default:\n super.onActivityResult(requestCode, resultCode, data);\n break;\n }\n }", "private void openFile()\r\n {\r\n int returnState = openFileChooser.showOpenDialog(frame);\r\n if (returnState == JFileChooser.APPROVE_OPTION) \r\n {\r\n File file = openFileChooser.getSelectedFile();\r\n openUriInBackground(file.toURI());\r\n } \r\n }", "public static void openFile(Context context, File url) throws IOException {\n\n if ( null == url ) {\n QNotifications.showShortToast(context, \"Cannot read file\");\n return;\n }\n\n // Create URI\n File file = url;\n Uri uri = Uri.fromFile(file);\n\n Intent intent = new Intent(Intent.ACTION_VIEW);\n // Check what kind of file you are trying to open, by comparing the url with extensions.\n // When the if condition is matched, plugin sets the correct intent (mime) type,\n // so Android knew what application to use to open the file\n if ( url.toString().endsWith(\".doc\") || url.toString().contains(\".docx\") ) {\n // Word document\n intent.setDataAndType(uri, \"application/msword\");\n } else if ( url.toString().endsWith(\".pdf\") ) {\n // PDF file\n intent.setDataAndType(uri, \"application/pdf\");\n } else if ( url.toString().endsWith(\".ppt\") || url.toString().contains(\".pptx\") ) {\n // Powerpoint file\n intent.setDataAndType(uri, \"application/vnd.ms-powerpoint\");\n } else if ( url.toString().endsWith(\".xls\") || url.toString().contains(\".xlsx\") ) {\n // Excel file\n intent.setDataAndType(uri, \"application/vnd.ms-excel\");\n } else if ( url.toString().endsWith(\".zip\") || url.toString().contains(\".rar\") ) {\n // ZIP Files\n intent.setDataAndType(uri, \"application/zip\");\n } else if ( url.toString().endsWith(\".rtf\") ) {\n // RTF file\n intent.setDataAndType(uri, \"application/rtf\");\n } else if ( url.toString().endsWith(\".wav\") || url.toString().contains(\".mp3\") ) {\n // WAV audio file\n intent.setDataAndType(uri, \"audio/x-wav\");\n } else if ( url.toString().endsWith(\".gif\") ) {\n // GIF file\n intent.setDataAndType(uri, \"image/gif\");\n } else if ( url.toString().endsWith(\".jpg\") || url.toString().contains(\".jpeg\") || url.toString().contains(\".png\") ) {\n // JPG file\n intent.setDataAndType(uri, \"image/jpeg\");\n } else if ( url.toString().endsWith(\".txt\") ) {\n // Text file\n intent.setDataAndType(uri, \"text/plain\");\n } else if ( url.toString().endsWith(\".3gp\") || url.toString().contains(\".mpg\") || url.toString().contains(\".mpeg\") || url.toString().contains(\".mpe\") || url.toString().contains(\".mp4\") || url.toString().contains(\".avi\") ) {\n // Video files\n intent.setDataAndType(uri, \"video/*\");\n } else {\n // if you want you can also define the intent type for any other file\n\n // additionally use else clause below, to manage other unknown extensions\n // in this case, Android will show all applications installed on the device\n // so you can choose which application to use\n intent.setDataAndType(uri, \"*/*\");\n }\n\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n }", "@Override\n\tpublic void openDocument(String path, String name) {\n\t\t\n\t}", "@Override\r\n\tpublic void onBrowserSelected() {\n\t\tLog.d(TAG, \"onBrowserSelected()\");\r\n\t\t\r\n // Use the GET_CONTENT intent from the utility class\r\n Intent target = FileUtils.createGetContentIntent();\r\n // Create the chooser Intent\r\n Intent intent = Intent.createChooser(\r\n target, getString(R.string.choose_file));\r\n try {\r\n startActivityForResult(intent, 6383);\r\n } catch (ActivityNotFoundException e) {\r\n \tToast.makeText(getApplicationContext(), \"Couldn't open file browser\", Toast.LENGTH_SHORT).show();\r\n }\r\n\t}", "private void openFile(String name){\n File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n File file = new File(path, \"\"+name);\n\n Intent install = new Intent(Intent.ACTION_VIEW);\n install.setDataAndType(Uri.fromFile(file), \"application/pdf\");\n install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(install);\n\n }", "public void OpenFileFromGoogleDrive(){\n\n IntentSender intentSender = Drive.DriveApi\n .newOpenFileActivityBuilder()\n .setMimeType(new String[] { \"text/plain\", \"text/html\" })\n .build(mGoogleApiClient);\n try {\n startIntentSenderForResult(\n\n intentSender, REQUEST_CODE_OPENER, null, 0, 0, 0);\n\n } catch (IntentSender.SendIntentException e) {\n\n Log.w(TAG, \"Unable to send intent\", e);\n }\n\n }", "public static void launchDocumentPickerInFragment(Fragment fragment, int REQUEST_CODE) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"application/*\");\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n fragment.startActivityForResult(intent, REQUEST_CODE);\n }", "public void performFileSearch() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a file (as opposed to a list\n // of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers, it would be\n // \"*/*\".\n intent.setType(\"image/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n // END_INCLUDE (use_open_document_intent)\n }", "public void onRestorePressed(View view) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"text/plain\");\n startActivityForResult(intent, OPEN_REQUEST_CODE);\n }", "private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PEGA_IMAGEM);\n }", "private void openFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PICK_IMAGE_REQUEST);\n\n }", "public void openDocument(L documentLocation) throws IOException;", "public void onClickOfChooseFile(View view) {\n Log.i(TAG, \"onClickOfChooseFile: \");\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {\n\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, REQUEST_READ_EXTERNAL_STORAGE);\n\n } else {\n\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, REQUEST_READ_EXTERNAL_STORAGE);\n }\n\n } else {\n //Go ahead with file choosing\n startIntentFileChooser();\n }\n }", "public void openFile(File selectedFile) {\n System.err.println(\"selected: \" + selectedFile);\n }", "private void pickFile() {\n\n String[] mimeTypes = {\"application/pdf\"};\n\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE,false);\n intent.setType(\"*/*\");\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\n startActivityForResult(intent, 2);\n\n\n }", "public File openFile() {\r\n\r\n\t\tFile chosenFile = fileChooser.showOpenDialog(fileChooserDialog);\r\n\t\treturn chosenFile;\r\n\t}", "void open() {\n \tJFileChooser fileopen = new JFileChooser();\n int ret = fileopen.showDialog(null, \"Open file\");\n\n if (ret == JFileChooser.APPROVE_OPTION) {\n document.setFile(fileopen.getSelectedFile());\n textArea.setText(document.getContent());\n }\n }", "@OnClick(R.id.documents_button)\n protected void onPickFromDocumentsClicked() {\n EasyImage.openDocuments(this);\n }", "public void doOpen() {\n\n if (!canChangeDocuments()) {\n return;\n }\n\n TextDocument document = fApplication.openDocument(this);\n\n if (document != null) {\n setDocument(document);\n }\n }", "@Override\r\n\t protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t if (resultCode == RESULT_OK) {\r\n\t\t\t if (data != null) {\r\n\t\t\t\t // Get the URI of the selected file\r\n\t\t\t\t uri = data.getData();\r\n\t\t\t\t Log.i(TAG, \"Uri = \" + uri.toString());\r\n\t\t\t\t try {\r\n\t\t\t\t\t // Get the file path from the URI\r\n\t\t\t\t\t final String path = FileUtils.getPath(this, uri);\r\n\t\t\t\t\t Intent intent = new Intent(MainActivity.this, ShowFileActiviy.class);\r\n\t\t\t\t\t intent.putExtra(\"file_path\", path);\r\n\t\t\t\t\t startActivity(intent);\r\n\t\t\t\t } catch (Exception e) {\r\n\t\t\t\t\t Log.e(\"FileSelectorTestActivity\", \"File select error\", e);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t }", "void openFromFileClicked() {\n\t\tif (GeoGebraJSNativeBridge.get() != null) {\n\t\t\tGeoGebraJSNativeBridge.get().openFromFileClickedNative();\n\t\t}\n\t}", "void selectPDF()\n {\n Intent intent=new Intent();\n intent.setType(\"application/pdf\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent,9);\n }", "private void testDocumentTree() {\n\n Intent intent = new Intent(Intent.ACTION_MEDIA_SHARED);\n startActivityForResult(intent, 42);\n }", "@SuppressWarnings(\"static-access\")\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent Intent = new Intent(android.content.Intent.ACTION_VIEW);\r\n\t\t\t\tString extension = android.webkit.MimeTypeMap\r\n\t\t\t\t\t\t.getFileExtensionFromUrl(Uri.fromFile((File) item.downFile).toString());\r\n\t\t\t\tString mimetype = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);\r\n\t\t\t\tIntent.setDataAndType(Uri.fromFile((File) item.downFile), mimetype);\r\n\t\t\t\tIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\tmContext.startActivity(Intent);\r\n\t\t\t\tLogger.d(TAG, \"Intent\" + Intent);\r\n\t\t\t}", "public void showPdfChooser() {\n Intent intent2 = new Intent();\n intent2.setType(\"application/pdf\");\n intent2.setAction(\"android.intent.action.GET_CONTENT\");\n startActivityForResult(Intent.createChooser(intent2, \"Select Document\"), PICK_IMAGE_REQUEST);\n }", "@FXML\n private void openFile() {\n try {\n \tFile file = new File(filmTable.getSelectionModel().getSelectedItem().getLocation());\n desktop.open(file);\n } catch (IOException ex) {\n \tex.printStackTrace();\n }\n }", "@Override\n public void onDocumentPicked(DocumentInfo doc, Model model) {\n final boolean isViewing = Intent.ACTION_VIEW.equals(getIntent().getAction());\n final boolean isInArchive = mState.stack.size() > 1;\n if (getCurrentRoot().isDownloads() && !isInArchive && !isViewing) {\n // First try managing the document; we expect manager to filter\n // based on authority, so we don't grant.\n final Intent manage = new Intent(DocumentsContract.ACTION_MANAGE_DOCUMENT);\n manage.setData(doc.derivedUri);\n\n try {\n startActivity(manage);\n return;\n } catch (ActivityNotFoundException ex) {\n // fall back to regular handling below.\n }\n }\n\n if (doc.isContainer()) {\n openContainerDocument(doc);\n } else {\n openDocument(doc, model);\n }\n }", "private void openFileChooser() {\n Intent imageIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n imageIntent.setType(\"image/*\");\n startActivityForResult(imageIntent, GALLERY_REQUEST);\n }", "public void performFileSearch() {\n\n // ACTION_OPEN_DOCUMENT is the intent to choose a file via the system's file browser.\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers, it would be \"*/*\".\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.setType(\"image/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "public static Intent getFileIntent(File file){\n Uri uri = Uri.fromFile(file);\r\n String type = getMIMEType(file);\r\n Log.i(\"tag\", \"type=\"+type);\r\n Intent intent = new Intent(\"android.intent.action.VIEW\");\r\n intent.addCategory(\"android.intent.category.DEFAULT\");\r\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n intent.setDataAndType(uri, type);\r\n return intent;\r\n }", "private void tbsOpenFile(){\n String path = Environment.getExternalStorageDirectory().getPath() + \"/\" + \"android面试题及答案.docx\";\n File file=new File(path);\n if (file.exists()){\n\n\n Bundle bundle=new Bundle();\n bundle.putString(\"filePath\", file.getPath());\n bundle.putString(\"tempPath\", Environment.getExternalStorageDirectory().getPath());\n boolean result = mTbsReaderView.preOpen(\"doc\", false);//Word类型的是“doc” 、 PDF的类型是“pdf”\n\n mTbsReaderView.openFile(bundle);\n\n }else {\n Toast.makeText(this,\"文件不存在\",Toast.LENGTH_SHORT).show();\n }\n\n }", "public String openFile() {\n\t\t\n\t\tString chosenFile = \"\";\n\t\treturn chosenFile;\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) \n\t\t\t{\n\t\t\t\tIntent file_intent = new Intent();\n\t\t\t\tfile_intent.setClass(ReadTextActivity.this, FileReadActivity.class);\n\t\t\t\tstartActivity(file_intent);\n\t\t\t}", "private void selectPdf() {\n\n Intent intent = new Intent();\n intent.setType(\"application/pdf\");\n intent.setAction(Intent.ACTION_GET_CONTENT);//to fetch files\n startActivityForResult(intent,86);\n\n\n\n }", "public void openFileDialog() {\n\tswitch(buttonAction) {\n\t case SELECT_FILES:\n openFileDialog(fileUpload, true);\n break;\n\t case SELECT_FILE:\n default:\n openFileDialog(fileUpload, false);\n break;\n\t}\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(ChooseFileActivity.this, FilePickerActivity.class);\n // This works if you defined the intent filter\n // Intent i = new Intent(Intent.ACTION_GET_CONTENT);\n\n // Set these depending on your use case. These are the defaults.\n i.putExtra(FilePickerActivity.EXTRA_ALLOW_MULTIPLE, false);\n i.putExtra(FilePickerActivity.EXTRA_ALLOW_CREATE_DIR, false);\n i.putExtra(FilePickerActivity.EXTRA_MODE, FilePickerActivity.MODE_FILE);\n\n // Configure initial directory like so\n //i.putExtra(FilePickerActivity.EXTRA_START_PATH, \"/storage/emulated/0/\"); -----\n i.putExtra(FilePickerActivity.EXTRA_START_PATH, root);\n\n startActivityForResult(i, 1);\n }", "@FXML\n\tpublic void openFile() {\n\t\tFileChooser openFileChooser = new FileChooser();\n\t\topenFileChooser.setInitialDirectory(userWorkspace);\n\t\topenFileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Text doc(*.txt)\", \"*.txt\"));\n\t\tfile = openFileChooser.showOpenDialog(ap.getScene().getWindow());\n\n\t\tuserText.clear();\n\n\t\tif (file != null) {\n\t\t\tif (file.getName().endsWith(\".txt\")) {\n\t\t\t\tfilePath = file.getAbsolutePath();\n\t\t\t\tStage primStage = (Stage) ap.getScene().getWindow();\n\t\t\t\tprimStage.setTitle(filePath);\n\t\t\t\tTab tab = tabPane.getSelectionModel().getSelectedItem();\n\t\t\t\ttab.setId(filePath);\n\t\t\t\ttab.setText(file.getName());\n\n\t\t\t\twriteToUserText();\n\t\t\t}\n\t\t}\n\t}", "public File showOpenDialog(String title) {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(title);\n return fileChooser.showOpenDialog(window);\n }", "public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\topen(file);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\topenOptionsMenu();\n\t/*\t\t\t\t\t\t\t\t\tIntent intent = new Intent(MediaStore.INTENT_ACTION_MUSIC_PLAYER);\n\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\n\t*/\t\t\t}", "private void openFile(File file) {\n try {\n desktop.open(file);\n } catch (IOException e) {\n e.printStackTrace();\n// Logger.getLogger(\n// FileChooser.class.getName()).log(\n// Level.SEVERE, null, ex\n// );\n }\n }", "public void openFileChooser(ValueCallback uploadMsg) {\n\n\t\t Log.i(\"For Android < 3.0\", \"called\");\n\n\t\t mUploadMessage = uploadMsg;\n\t\t Intent i = new Intent(Intent.ACTION_GET_CONTENT);\n\n\n\t\t i.addCategory(Intent.CATEGORY_OPENABLE);\n\n\t\t i.setType(\"*/*\");\n\t\t FileUploadActivity.this.startActivityForResult(\n\t\t Intent.createChooser(i, \"File Browser\"),\n\t\t FILECHOOSER_RESULTCODE);\n\t\t }", "@Override\n public void onClick(View view) {\n Intent implicitIntent = new Intent(Intent.ACTION_GET_CONTENT);\n\n // Define the file type\n implicitIntent.setType(\"image/*\");\n\n // start this intent\n startActivityForResult(implicitIntent,REQUEST_CODE);\n }", "public void onClick_Browse(View view) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\r\n showUserInfo(\"Android 10+ isn't supported sorry!\");\r\n return;\r\n } else {\r\n setPath(\"\");\r\n enableWidgets();\r\n root = DocumentFile.fromFile(Environment.getExternalStorageDirectory());\r\n }\r\n // <== out for Android Q\r\n\r\n // if permission aren't already granted, ask\r\n if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED &&\r\n checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\r\n requestPermissions(new String[] {\r\n Manifest.permission.READ_EXTERNAL_STORAGE,\r\n Manifest.permission.WRITE_EXTERNAL_STORAGE\r\n }, REQUEST_STORAGE_PERMISSION_BROWSE);\r\n\r\n // permission granted, open browse dialog for root directory\r\n } // TODO in for Android Q\r\n //else {\r\n // Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);\r\n // intent.addFlags(\r\n // Intent.FLAG_GRANT_READ_URI_PERMISSION\r\n // | Intent.FLAG_GRANT_WRITE_URI_PERMISSION\r\n // | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION\r\n // | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION);\r\n // startActivityForResult(intent, REQUEST_STORAGE_PERMISSION_API29 );\r\n //}\r\n }", "private void loadGpxClicked() {\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n\n startActivityForResult(Intent.createChooser(intent, \"Select a GPX file\"), RQS_OPEN_GPX);\n }", "private void retrieveFilesFromSystemPicker(@Nullable Uri uri) {\n folderRootFolderSpinner.setSelection(0);\n if(getViewPrefs().isAllowFolderSelection() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n retrievePermissionsForUri(uri, getViewPrefs().getSelectedUriPermissionFlags());\n return;\n }\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"*/*\");\n Set<String> permittedMimeTypes = getViewPrefs().getVisibleMimeTypes();\n if(permittedMimeTypes.isEmpty()) {\n permittedMimeTypes = IOUtils.getMimeTypesFromFileExts(new HashSet<>(), getViewPrefs().getVisibleFileTypes());\n }\n intent.putExtra(Intent.EXTRA_MIME_TYPES, IOUtils.getMimeTypesIncludingFolders(permittedMimeTypes));\n intent.addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.addFlags(getViewPrefs().getSelectedUriPermissionFlags());\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n// intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);\n\n // special intent for Samsung file manager\n Intent sIntent = new Intent(\"com.sec.android.app.myfiles.PICK_DATA_MULTIPLE\");\n // if you want any file type, you can skip next line\n sIntent.putExtra(\"CONTENT_TYPE\", \"*/*\");\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n sIntent.addCategory(Intent.CATEGORY_DEFAULT);\n\n Intent chooserIntent;\n if (requireContext().getPackageManager().resolveActivity(sIntent, 0) != null){\n // it is device with Samsung file manager\n chooserIntent = Intent.createChooser(sIntent, getString(R.string.open_files));\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { intent});\n } else {\n chooserIntent = Intent.createChooser(intent, getString(R.string.open_files));\n }\n\n int eventId = TrackableRequestEvent.getNextEventId();\n try {\n getUiHelper().setTrackingRequest(eventId);\n startActivityForResult(chooserIntent, eventId);\n } catch(ActivityNotFoundException e) {\n getUiHelper().showDetailedShortMsg(R.string.alert_error, R.string.alert_error_no_app_available_to_handle_action);\n getUiHelper().isTrackingRequest(eventId); // clear the tracked id\n }\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), 234);\n }", "@FXML\n void fileOpenPressed(ActionEvent event) {\n \tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open File\");\n\t\tFile f = fileChooser.showOpenDialog(stage);\n\t\tif (f != null) {\n\t\t\tsetFile(f);\n\t\t\tviewState.set(ViewState.OPEN);\n\t\t}\n }", "@Override\r\n\t\tprotected void onPostExecute(File result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\tpDialog.dismiss();\r\n\t\t\t Uri path = Uri.fromFile(file);\r\n\t\t\ttry {\r\n\t Intent intent = new Intent(Intent.ACTION_VIEW);\r\n\t intent.setDataAndType(path, \"application/pdf\");\r\n\t intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t startActivity(intent);\r\n\t \r\n\t } catch (ActivityNotFoundException e) {\r\n\t \r\n\t }\r\n\t\t\t\r\n\t\t}", "private void createRecipeFromFile() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers,\n // it would be \"*/*\".\n intent.setType(\"*/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "protected void openFileChooser(ValueCallback uploadMsg, String acceptType)\n {\n mUploadMessage = uploadMsg;\n Intent i = new Intent(Intent.ACTION_GET_CONTENT);\n i.addCategory(Intent.CATEGORY_OPENABLE);\n i.setType(\"*/*\");\n startActivityForResult(Intent.createChooser(i, \"File Browser\"), FILECHOOSER_RESULTCODE);\n }", "public void onClickFileView(View view) {\n Intent i = new Intent(this, TestActivity.class);\n i.putExtra(\"providerType\", ProviderType.FILE_MANAGEMENT);\n startActivity(i);\n }", "protected void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture)\n {\n mUploadMessage = uploadMsg;\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n startActivityForResult(Intent.createChooser(intent, \"File Browser\"), FILECHOOSER_RESULTCODE);\n }", "public void openFile(@NotNull final CheckedConsumer<FileManager, IOException> loadAction) {\n try {\n final var pair = editorManager.createEditor();\n final Editor editor = pair.getFirst();\n final var fm = pair.getSecond();\n loadAction.accept(fm);\n editorManager.openEditor(editor, fm);\n mimaUI.fileChanged();\n App.logger.log(\"loaded: \" + FileName.shorten(fm.getLastFile()));\n } catch (@NotNull final IOException | IllegalStateException e) {\n App.logger.error(\"Could not load file: \" + e.getMessage());\n }\n }", "private void open() {\n\t\tint state = fileChooser.showOpenDialog(this);\n\t\tswitch (state) {\n\t\tcase JFileChooser.CANCEL_OPTION:\n\t\t\tbreak;\n\t\tcase JFileChooser.APPROVE_OPTION:\r\n\t\t\tFile file = fileChooser.getSelectedFile();\r\n\t\t\t//System.out.println(\"Getting file...\");\r\n\t\t\ttry {\r\n\t\t\t\tfis = new FileInputStream(file);\r\n\t\t\t\tbyte[] b = new byte[fis.available()];\r\n\t\t\t\tif (fis.read(b) == b.length) {\r\n\t\t\t\t\t//System.out.println(\"File read: \" + file.getName());\r\n\t\t\t\t}\r\n\t\t\t\tdistributable = new Distributable(file.getName(), b);\r\n\t\t\t\tdiscoveryRelay.setDistributable(distributable);\r\n\t\t\t} \r\n\t\t\tcatch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\n\t\t\tbreak;\n\t\tcase JFileChooser.ERROR_OPTION:\n\t\t}\n\t}", "public void getImage(View view){\n if(Build.VERSION.SDK_INT > 19) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"image/*\");\n intent.setFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 100);\n } else {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 100);\n }\n }", "private void loadPhotosClicked() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"image/jpeg\");\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n\n startActivityForResult(Intent.createChooser(intent, \"Choose Photos\"), RQS_OPEN_PHOTO_TREE);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n if (options[which].equals(\"Take Photo\")) {\n\n checkAndroidVersion();\n\n\n } else if (options[which].equals(\"Choose from Gallery\")) {\n Intent intent1 = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent1.addCategory(Intent.CATEGORY_OPENABLE);\n intent1.setType(\"image/*\");\n startActivityForResult(intent1, REQUEST_OPEN_RESULT_CODE);\n\n }\n// else if(options[which].equals(\"Cancel\"))\n// {\n// dialog.dismiss();\n// }\n\n }", "public void selectFile(SequencingOAuth2Client sequencingOAuth2Client, ISQFileCallback fileCallback, @Nullable String fileId){\n if (fileCallback == null)\n throw new RuntimeException();\n this.fileCallback = fileCallback;\n this.sequencingOAuth2Client = sequencingOAuth2Client;\n\n Intent intent = new Intent(context, SplashActivity.class);\n intent.putExtra(\"fileId\", fileId);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n }", "public int openFileChooser(){\n int returnVal = fileChooser.showOpenDialog(getCanvas()); //Parent component as parameter - affects position of dialog\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"ZIP & OSM & BIN\", \"osm\", \"zip\", \"bin\",\"OSM\",\"ZIP\",\"BIN\"); //The allowed files in the filechooser\n fileChooser.setFileFilter(filter); //sets the above filter\n return returnVal;\n }", "private File showOpenDialog()\n {\n \tJFileChooser fc = new JFileChooser(m_preferences.get(\"path-load-game\"));\n \tint ret = fc.showOpenDialog(this);\n \tif (ret == JFileChooser.APPROVE_OPTION)\n \t return fc.getSelectedFile();\n \treturn null;\n }", "protected void OpenImageFile(String path) {\n\t\tSystem.out.println(\"path\"+path);\n\t\tIntent intent = new Intent(\"android.intent.action.VIEW\");\n\t\tintent.addCategory(\"android.intent.category.DEFAULT\");\n\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tUri uri = Uri.fromFile(new File(path));\n\t\tintent.setDataAndType(uri, \"image/*\");\n\t\tstartActivity(intent);\n\n\t}", "private void onFileClick(Item o)\n {\n \tIntent intent = new Intent();\n intent.putExtra(\"GetPath\",currentDir.toString());\n intent.putExtra(\"GetFileName\",o.getName());\n setResult(RESULT_OK, intent);\n finish();\n }", "public void openProject(File pfile, FileOpenSelector files) { }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "public void openFile(ActionEvent e) {\r\n JFileChooser chooser = new JFileChooser();\r\n\r\n int returnVal = chooser.showOpenDialog(null);\r\n if (returnVal == JFileChooser.APPROVE_OPTION) {\r\n this.is_alg_started = false;\r\n this.is_already_renumbered = false;\r\n if (e.getActionCommand().equals(\"nodelist\")) {\r\n this.nodefileText.setText(chooser.getSelectedFile().getAbsolutePath());\r\n }\r\n if (e.getActionCommand().equals(\"edgelist\")) {\r\n this.edgeFileText.setText(chooser.getSelectedFile().getAbsolutePath());\r\n }\r\n }\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent();\t\n\t\t\t\tintent.setClass( SDFileExplorer.this,SDFileJiemi.class);\n\t\t\t\tSDFileExplorer.this.startActivity(intent);\n\t\t\t\tSDFileExplorer.this.finish();\n\t\t\t}", "public void openFileChooser(ValueCallback uploadMsg, String acceptType){\n mUM = uploadMsg;\n Intent i = new Intent(Intent.ACTION_GET_CONTENT);\n i.addCategory(Intent.CATEGORY_OPENABLE);\n i.setType(\"*/*\");\n MainActivity.this.startActivityForResult(\n Intent.createChooser(i, \"File Browser\"),\n FCR);\n }", "public void openFileChooser(ValueCallback uploadMsg, String acceptType){\n mUM = uploadMsg;\n Intent i = new Intent(Intent.ACTION_GET_CONTENT);\n i.addCategory(Intent.CATEGORY_OPENABLE);\n i.setType(\"*/*\");\n MainActivity.this.startActivityForResult(\n Intent.createChooser(i, \"File Browser\"),\n FCR);\n }", "public static void openFile(File file) throws IOException {\n\n\t\tif (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN))\n\t\t\tDesktop.getDesktop().open(file);\n\t}", "private void pickFromGallery() {\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n\n intent.setType(\"image/*\");\n\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\",\"image/jpg\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,GALLERY_REQUEST_CODE);\n }", "@Override\n public void onClick(View view) {\n File file = new File(pathFoto);\n final Intent intent = new Intent(Intent.ACTION_VIEW).setDataAndType(FileProvider.getUriForFile(getApplicationContext(), \"com.B3B.farmbros.android.fileprovider\", file), \"image/*\").addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n startActivityForResult(Intent.createChooser(intent,\"Choose an app to select a image\"), 1);\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "public static void m1353g(Activity activity, String str, int i) {\n Intent intent = new Intent(\"android.intent.action.GET_CONTENT\");\n intent.addCategory(\"android.intent.category.OPENABLE\");\n intent.setType(str);\n try {\n activity.startActivityForResult(intent, i);\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void onClick(DialogInterface dialog, int which) {\n Intent browserIntent = new Intent(\n Intent.ACTION_VIEW,\n Uri.parse(\"https://docs.google.com/spreadsheet/viewform?formkey=dGpiRDhreGpmTFBmQ2FUTVVjVlhESHc6MQ\"));\n startActivity(browserIntent);\n\n return;\n }", "public void openImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, IMAGE_REQUEST);\n }", "public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void open(String file) {\n try {\n Desktop.getDesktop().open(new File(file));\n } catch (IOException error) {\n System.err.println(error.getMessage());\n }\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "private void openFile() {\n\t\tJDialog fileDialog = new JDialog(this, \"Select File\", true);\n\t\tFileDialog filePanel = new FileDialog(this, this, false, false, false);\n\t\tfileDialog.getContentPane().add(filePanel);\n\t\tfileDialog.pack();\n\n\t\t// set the location.\n\t\tPoint p1 = this.getLocation();\n\t\tDimension d1 = this.getSize();\n\t\tDimension d2 = fileDialog.getSize();\n\t\tfileDialog.setLocation((p1.x + (d1.width / 2)) - (d2.width / 2),\n\t\t\t\t(p1.y + (d1.height / 2)) - (d2.height / 2));\n\n\t\tfilePanel.setCurrentDirectory(Config.getInstance().getBaseHarvestDir());\n\t\tfileDialog.show();\n\t}", "public void uploadImg(View view){\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"image/*\");\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), SELECT_PICTURE);\n }", "public void openFileChooser(ValueCallback<Uri> uploadMsg) { \n\n mUploadMessage = uploadMsg; \n Intent i = new Intent(Intent.ACTION_GET_CONTENT); \n i.addCategory(Intent.CATEGORY_OPENABLE); \n i.setType(\"image/*\"); \n Fileuploadsd.this.startActivityForResult(Intent.createChooser(i,\"File Chooser\"), FILECHOOSER_RESULTCODE); \n\n }", "public static void openFile(File file) {\r\n try {\r\n System.out.println(file.toPath().toAbsolutePath());\r\n Runtime.getRuntime().exec(\"explorer /select,\" + file.toPath().toAbsolutePath());\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n }", "private void pickImageIntent(){\n\n Intent intent=new Intent();\n intent.setType(\"image/*\");\n intent.putExtra(intent.EXTRA_ALLOW_MULTIPLE,true);\n intent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n startActivityForResult(Intent.createChooser(intent,\"Select Images\"),PICK_IMAGES_CODE);\n\n\n\n }", "public void openDocumentUrl(CampaignTrainingOutput selectedCampaignTrainingOutput) {\n\n //Opening Url\n customTabsIntent.launchUrl(this, Uri.parse(selectedCampaignTrainingOutput.getUrl()));\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, \"Select File\"), 1);\n }", "public static void downloadedFileDialog(final File file, final Context context){\n NotifyDialog dialog = NotifyDialog.startConfirm(context, context.getString(R.string.file_downloaded), context.getString(R.string.open_file));\n dialog.setButtonsText(context.getString(R.string.NO_CAPITAL), context.getString(R.string.YES_CAPITAL));\n dialog.setTwoButtonListener(new NotifyDialog.TwoButtonDialogListener() {\n @Override\n public void onOkClicked(NotifyDialog dialog) {\n Uri uri = Uri.fromFile(file);\n Intent intent = new Intent(Intent.ACTION_VIEW);\n\n if (uri.toString().contains(\".doc\") || uri.toString().contains(\".docx\")) {\n // Word document\n intent.setDataAndType(uri, \"application/msword\");\n } else if (uri.toString().contains(\".pdf\")) {\n // PDF file\n intent.setDataAndType(uri, \"application/pdf\");\n } else if (uri.toString().contains(\".ppt\") || uri.toString().contains(\".pptx\")) {\n // Powerpoint file\n intent.setDataAndType(uri, \"application/vnd.ms-powerpoint\");\n } else if (uri.toString().contains(\".xls\") || uri.toString().contains(\".xlsx\")) {\n // Excel file\n intent.setDataAndType(uri, \"application/vnd.ms-excel\");\n } else if (uri.toString().contains(\".zip\")) {\n // ZIP audio file\n intent.setDataAndType(uri, \"application/zip\");\n } else if (uri.toString().contains(\".rar\")) {\n // ZIP audio file\n intent.setDataAndType(uri, \"application/x-rar-compressed\");\n } else if (uri.toString().contains(\".gz\")) {\n // ZIP audio file\n intent.setDataAndType(uri, \"application/gzip\");\n } else if (uri.toString().contains(\".rtf\")) {\n // RTF file\n intent.setDataAndType(uri, \"application/rtf\");\n } else if (uri.toString().contains(\".wav\") || uri.toString().contains(\".mp3\")) {\n // WAV audio file\n intent.setDataAndType(uri, \"audio/x-wav\");\n } else if (uri.toString().contains(\".gif\")) {\n // GIF file\n intent.setDataAndType(uri, \"image/gif\");\n } else if (uri.toString().contains(\".jpg\") || uri.toString().contains(\".jpeg\") || uri.toString().contains(\".png\")) {\n // JPG file\n intent.setDataAndType(uri, \"image/jpeg\");\n } else if (uri.toString().contains(\".txt\")) {\n // Text file\n intent.setDataAndType(uri, \"text/plain\");\n } else if (uri.toString().contains(\".3gp\") || uri.toString().contains(\".mpg\") || uri.toString().contains(\".mpeg\") || uri.toString().contains(\".mpe\")\n || uri.toString().contains(\".mp4\") || uri.toString().contains(\".avi\")) {\n // Video files\n intent.setDataAndType(uri, \"video/*\");\n } else {\n // if you want you can also define the intent type for\n // any\n // other file\n\n // additionally use else clause below, to manage other\n // unknown extensions\n // in this case, Android will show all applications\n // installed on the device\n // so you can choose which application to use\n intent.setDataAndType(uri, \"*/*\");\n }\n\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n context.startActivity(intent);\n\n dialog.dismiss();\n }\n\n @Override\n public void onCancelClicked(NotifyDialog dialog) {\n dialog.dismiss();\n }\n });\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n if (drmIntent != null) {\n activity.startActivity(drmIntent);\n }else {\n Toast.makeText(activity, com.sprd.fileexplorer.R.string.msg_invalid_intent, Toast.LENGTH_SHORT)\n .show();\n }\n }", "public void onItemClick(AdapterView<?> parent, View view,\n \t\t\t\t int position, long id) {\n \t\t\t\t\t String text = (String) fileNames.get(position);\n \t\t\t\t\t Intent intent = new Intent(); \n \t\t\t\t\t intent.setAction(android.content.Intent.ACTION_VIEW); \n \t\t\t\t\t File file = new File(getExternalFilesDir(null) + \"/\" + codeLearnLessons.getItemAtPosition(position).toString()); \n \t\t\t\t\t intent.setDataAndType(Uri.fromFile(file), \"audio/*\"); \n \t\t\t\t\t startActivity(intent); \n \t\t\t\t }" ]
[ "0.74914217", "0.7461456", "0.72752565", "0.6934628", "0.68600863", "0.6830689", "0.67444104", "0.6692973", "0.6648989", "0.6529365", "0.6528057", "0.6489468", "0.645808", "0.6421533", "0.6420513", "0.6407779", "0.63093805", "0.62798136", "0.6275589", "0.6275327", "0.6243832", "0.6238802", "0.62346", "0.6218905", "0.60396874", "0.60396606", "0.6035272", "0.59932303", "0.5942853", "0.5935956", "0.59246224", "0.5910528", "0.5898257", "0.5886787", "0.5885787", "0.5883609", "0.588239", "0.5864093", "0.5861698", "0.58615005", "0.58359194", "0.5830262", "0.5819969", "0.58088076", "0.58066756", "0.58047414", "0.5797457", "0.5794657", "0.57837427", "0.57724845", "0.57350665", "0.57136554", "0.57044804", "0.56968427", "0.5665639", "0.5650547", "0.56473255", "0.56449443", "0.56403863", "0.5618747", "0.56047976", "0.559683", "0.5592868", "0.5592245", "0.55797267", "0.55775476", "0.55615115", "0.55588514", "0.55432594", "0.5538112", "0.5530298", "0.55291945", "0.5523038", "0.5506701", "0.5503458", "0.549498", "0.549498", "0.549121", "0.5474884", "0.54682845", "0.5461495", "0.5454211", "0.5454211", "0.5441548", "0.5438455", "0.54264593", "0.5410361", "0.5407436", "0.5400167", "0.5400167", "0.5398084", "0.53890795", "0.5388966", "0.5386876", "0.5383458", "0.53651124", "0.53552973", "0.5352328", "0.53445107", "0.5333927" ]
0.6634933
9
Creates a new button with the specified text.
public Button(final String textLabel) { label = new Label(textLabel); label.setHorizontalAlignment(HorizontalAlignment.CENTRE); label.setVerticalAlignment(VerticalAlignment.MIDDLE); label.setBackgroundColour(Color.GRAY); label.setOpaque(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static JButton createButton(String text) {\n return new JButton(text);\n }", "Button createButton();", "public static JButton createLabelButton(String text) {\n JButton but = createButton(text);\n but.setBorderPainted(false);\n but.setHorizontalAlignment(SwingConstants.LEFT);\n but.setFocusPainted(false);\n but.setMargin(new Insets(0, 0, 0, 0));\n but.setBorder(null);\n return but;\n }", "public void setNewButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_newButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setNewButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public Button createButton(String text, Color color) {\n final String texthere = text;\n Button.ButtonStyle style = new Button.ButtonStyle();\n style.up = skin.getDrawable(text);\n style.down = skin.getDrawable(text);\n\n Button button = new Button(style);\n// button.s(1000,1000);\n button.pad(50);\n button.addListener(new InputListener() {\n public boolean touchDown(InputEvent event, float x, float y,\n int pointer, int button) {\n\n return true;\n }\n\n public void touchUp(InputEvent event, float x, float y,\n int pointer, int button) {\n if (texthere.equals(\"play\"))\n game.setScreen(new Person_Comp(game));\n else if (texthere.equals(\"multi\"))\n game.setScreen(new Multiplayer(game));\n else {\n }\n// game.setScreen(new Settings(game));\n }\n\n });\n return button;\n }", "@Override\n\tpublic Button createButton() {\n\t\treturn new HtmlButton();\n\t}", "public TextButton (String text)\n { \n this(text, 20); \n }", "public final TButton addButton(final String text, final int x, final int y,\n final TAction action) {\n\n return new TButton(this, text, x, y, action);\n }", "private void newOrderbutton(String txt) {\n Button btn = new Button(txt);\n newBtnStyle(btn);\n\n boolean containsbtn = false;\n btn.setId(txt);\n for (Node node : activeOrders.getChildren()) {\n String button = ((Button) node).getText();\n if (txt.equals(button))\n containsbtn = true;\n\n }\n if (!containsbtn) {\n activeOrders.getChildren().add(btn);\n\n changeActive(btn);\n } else {\n //Alert clerc about the amount to pay back.\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Nyt bord\");\n alert.setHeaderText(\"Bord: \" + txt + \" eksistere allerede\");\n alert.showAndWait();\n }\n }", "public static Button createButton(String btnValue) {\n\t\tButton btn = new Button(btnValue);\n\t\tbtn.setFont(Font.font(\"Arial\", 20));\n\t\treturn btn;\n\t}", "@Override\n public Button createButton() {\n return new WindowsButton();\n }", "public CustomDialog button(String buttonText, Object object, String style, String name) {\n TextButton button = new TextButton(buttonText, getSkin(), style);\n button.setName(name);\n super.button(button, object);\n return this;\n }", "public static Button new_button(String text, int x, int y, int width, int height, String color){\n Button button = new Button(text);\n button.setLayoutX(x);\n button.setLayoutY(y);\n button.setPrefWidth(width);\n button.setPrefHeight(height);\n button.setStyle(color);\n return button;\n }", "private void createMusicButton(String text) {\n music = new TextButton(text, skin);\n music.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent e, float x, float y) {\n musicClicked();\n }\n });\n table.add(music).width(120).height(60).expandX();\n setSoundButtonColor(MatchScreen.getMusicVolume() == 0, music);\n }", "public void actionButton(String text);", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "public void addButton(String text, Action action) {\r\n\t\tbuttonTitle[totalButtons] = text;\r\n\t\tbuttonAction[totalButtons] = action;\r\n\t\ttotalButtons++;\r\n\t}", "private void createSoundButton(String text) {\n sound = new TextButton(text, skin);\n sound.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n soundClicked();\n }\n });\n table.add(sound).width(120).height(60).expandX();\n setSoundButtonColor(Sounds.getVolume() == 0, sound);\n }", "private JButton createButton(final Box addTo, final String label) {\n JButton button = new JButton(label);\n button.setActionCommand(label);\n button.addActionListener(this);\n addTo.add(button);\n return button;\n }", "public LinkButton( String text) {\n\t\tsuper( text);\n\t\tinit();\n\t}", "Button new_button (String title, ActionListener action, String tooltip) {\n Button b = new Button(title);\n b.setBackground(Color.white);\n b.setForeground(Color.blue);\n if (action != null)\n b.addActionListener(action);\n if (tooltip != null)\n b.setToolTipText(tooltip);\n return b;\n }", "private void createButton(final ToolBar bar, final String imagePath,\r\n final String text, final SelectionListener listener) {\r\n final Image icon = getIcon(imagePath);\r\n\r\n final ToolItem toolItem = new ToolItem(bar, SWT.PUSH);\r\n toolItem.setImage(resize(icon, DEFAULT_ICON_SIZE, DEFAULT_ICON_SIZE));\r\n toolItem.setText(text);\r\n\r\n toolItem.addSelectionListener(listener);\r\n }", "private JButton addButton(String label, ActionListener listener) {\n JButton button = new JButton(label);\n Font font = button.getFont();\n font = font.deriveFont(font.getSize() * 1.5f);\n button.setFont(font);\n button.addActionListener(listener);\n button.setFocusPainted(false);\n return button;\n }", "private ImageTextButton createImageTextButton(TextureRegionDrawable drawable, BitmapFont font, int number){ ;\r\n\t\tImageTextButton.ImageTextButtonStyle btnStyle1 = new ImageTextButton.ImageTextButtonStyle();\r\n\t\tbtnStyle1.up = drawable;\r\n\t\tbtnStyle1.font = font;\r\n\t\tImageTextButton btn = new ImageTextButton(\"\"+number, btnStyle1);\r\n\t\treturn btn;\r\n\t}", "public PlatformerButton(String text) {\n setText(text);\n setFont();\n setPrefWidth(190);\n setPrefHeight(46);\n setStyle(BUTTON_FREE);\n initListeners();\n }", "protected Button createCustomButton(Composite parent, String label) {\n\t\t((GridLayout) parent.getLayout()).numColumns++;\r\n\t\tButton button = new Button(parent, SWT.PUSH);\r\n\t\tbutton.setText(label);\r\n\t\tbutton.setFont(JFaceResources.getDialogFont());\r\n\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent event) {\r\n\t\t\t\t//buttonPressed(((Integer) event.widget.getData()).intValue());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tsetButtonLayoutData(button);\r\n\t\treturn button;\r\n\t}", "public Button(int x, int y, int width, int height, String text) {\n\t\tsuper(x,y,width,height);\n\t\tthis.text = text;\n\t\tthis.isHovered = false;\n\t\tthis.isPressed = false;\n\t\tthis.buttonListener = null;\n\t}", "private JButton makeButton(String action, String label, int x, int y, int width, int height,\r\n float alignment, String soundName) {\r\n JButton button = new JButton(label);\r\n button.setBounds(x, y, width, height);\r\n button.setAlignmentX(alignment);\r\n button.setBackground(Color.ORANGE);\r\n clickActionListener(button, action, soundName);\r\n return button;\r\n }", "@Override\n\tprotected Button createPushButton(Composite parent, String label, Image image) {\n\t\treturn super.createPushButton(parent, label, image);\n\t}", "protected void addButton(Container panel, String buttonText) {\n\t\tJButton button = new JButton(buttonText);\n\t\tbutton.addActionListener(this);\n\t\tpanel.add(button);\n\t}", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "public TextButton (String text, int textSize)\n {\n buttonText = text;\n GreenfootImage tempTextImage = new GreenfootImage (text, textSize, Color.BLACK, Color.WHITE);\n myImage = new GreenfootImage (tempTextImage.getWidth() + 8, tempTextImage.getHeight() + 8);\n myImage.setColor (Color.WHITE);\n myImage.fill();\n myImage.drawImage (tempTextImage, 4, 4);\n\n myImage.setColor (Color.BLACK);\n myImage.drawRect (0,0,tempTextImage.getWidth() + 7, tempTextImage.getHeight() + 7);\n setImage(myImage);\n }", "private Button constructCreationLinkButton(UUID creationID){\n\n CreationControllable cc = (CreationControllable) builder.getControllers()[1];\n if (!cc.containsCreation(creationID)){\n return null;\n }\n\n String[] creationInfo = cc.viewCreationSummary(creationID, viewer);\n Button b = new Button(creationInfo[0] + \" ( \" + creationInfo[1] + \" ) By: \"+ creationInfo[2]);\n\n b.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n stage.close();\n CreationViewController controller = getCreationBrowserController();\n if (controller == null){\n return;\n }\n controller.linkCreationCallback(creationID);\n stage.show();\n }\n });\n\n return b;\n }", "public GuiButton(Gui parent, int y, String text, ColorHelper buttonColor, RenderObject textColor) {\n\t\tsuper(parent, VERTEX_COLOR);\n\t\twidth = TOTAL_PADDING + TextRender.getTextWidth(text);\n\t\theight = TOTAL_PADDING + TextRender.getTextHeight();\n\t\tthis.x = (Game.WIDTH / 2) - (width / 2);\n\t\tthis.y = y;\n\t\tthis.centered = false;\n\t\tthis.text = text;\n\t\tthis.textColor = textColor;\n\t\tthis.buttonColor = buttonColor;\n\t\tgenerateVertexData();\n\t\tgenerateColorData();\n\t}", "private JButton createButtonAddKeyword() {\n\n JButton btn = new JButton(\"Add Keyword\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (newKeyword(JOptionPane.showInputDialog(\"Insert a Keyword\"))) {\n JOptionPane.showMessageDialog(rootPane, \"Keyword inserted sucessfully!\", \"Sucess\", JOptionPane.PLAIN_MESSAGE);\n }\n\n }\n });\n\n return btn;\n }", "public static MenuBox createLabelledButton(float btX, float btY, float btW, float btH, String text, OnClick btAction, TextureRegion pressed, TextureRegion unpressed, Array<BitmapFontCache> fontCaches, int pickedFont){\n MenuBox out = new MenuBox(btX,btY,btW,btH,fontCaches);\n Button actionButton = new Button(0,0,btW,btH);\n actionButton.setCallback(btAction);\n actionButton.setPressedTexture(pressed);\n actionButton.setUnpressedTexture(unpressed);\n out.addButton(actionButton);\n QueueText textLabel = new QueueText((btW/2)-(textWidth(fontCaches.get(pickedFont).getFont(),text)/2),(btH/2)+(textHeight(fontCaches.get(pickedFont).getFont(),text)/2),0,0);\n textLabel.setText(text,fontCaches);\n out.addQueueText(textLabel);\n return out;\n }", "private void createButton(){\n addButton();\n addStartButton();\n }", "Text createText();", "private JButton addButton(String name) {\n JButton button = new JButton(name);\n button.setActionCommand(name);\n buttonsPanel.add(button);\n return button;\n }", "private void addButton()\n {\n JButton button = new JButton();\n button.setSize(200, 30);\n button.setName(\"login\");\n button.setAction(new CreateUserAction());\n add(button);\n button.setText(\"Login\");\n }", "private void initButton(Button button, String tekst, String styleClass, int columnIndex,\n int rowIndex, float sizeX, float sizeY) {\n button.setText(tekst);\n button.getStyleClass().add(styleClass);\n button.setMinWidth(sizeX);\n button.setMinHeight(sizeY);\n this.buttonGrid.add(button, columnIndex, rowIndex);\n }", "@NotNull\n TBItemButton addButton() {\n @NotNull TBItemButton butt = new TBItemButton(myItemListener, myStats != null ? myStats.getActionStats(\"simple_button\") : null);\n myItems.addItem(butt);\n return butt;\n }", "public void clickOnCreateButton() {\n\t\twaitForElement(createButton);\n\t\tclickOn(createButton);\n\t}", "public void createOrderBtn(){\n createOrderBtn = new Button(\"Create order\");\n createOrderBtn.setLayoutX(305);\n createOrderBtn.setLayoutY(710);\n createOrderBtn.setPrefWidth(480);\n createOrderBtn.setPrefHeight(50);\n createOrderBtn.setStyle(\"-fx-background-color: #34ffb9\");\n createOrderBtn.setFont(new Font(18));\n createOrderBtn.setOnAction(event -> createOrderInDB());\n\n root.getChildren().addAll(createOrderBtn);\n }", "private static JButton buttonMaker(String s){\n final JButton button;\n button = new JButton(new ImageIcon(iconMaker(s)));\n button.setFocusPainted(false);\n return button;\n }", "public ReturnButton(String text) {\n super(text);\n this.addActionListener(this);\n }", "private Button createNewGameButton() {\n Button newGameButton = new Button(Config.NEW_GAME_BUTTON);\n newGameButton.setTranslateY(10);\n newGameButton.setTranslateX(10);\n\n // TODO: move stuff like this to the CSS resources.\n DropShadow effect = new DropShadow();\n effect.setColor(Color.BLUE);\n newGameButton.setEffect(effect);\n\n return newGameButton;\n }", "private Button addButton(Configuration config, String name) {\r\n Button button = new HintedButton(config, name);\r\n button.addActionListener(this);\r\n add(button);\r\n return button;\r\n }", "public JButton makeOperatorButton(String op)\r\n {\r\n JButton button = new JButton(op); \r\n ActionListener listener = new OperatorButtonListener(op);\r\n button.addActionListener(listener); \r\n return button; \r\n }", "JButton createTranslateButton(ParagraphTranslateGUI app) {\n ImageIcon translateIcon = new ImageIcon(\"resources/TranslateButton.png\");\n translateButton = new JButton(resizeIcon(translateIcon, this.width, this.height));\n translateButton.setBounds(this.posX, this.posY, this.width, this.height);\n\n addMouseListener(app);\n\n return translateButton;\n }", "public void clickCreateButton() {\n this.action.click(this.createButton);\n }", "public void test_addButton_1() throws Exception {\r\n check_addButton(new String[]{\r\n \"class Test {\",\r\n \" public static void main(String[] args) {\",\r\n \" Shell shell = new Shell();\",\r\n \" shell.setSize(320, 240);\",\r\n \" shell.setLayout(new FillLayout());\",\r\n \" }\",\r\n \"}\"}, new String[]{\r\n \"class Test {\",\r\n \" public static void main(String[] args) {\",\r\n \" Shell shell = new Shell();\",\r\n \" shell.setSize(320, 240);\",\r\n \" shell.setLayout(new FillLayout());\",\r\n \" {\",\r\n \" Button button = new Button(shell, SWT.NONE);\",\r\n \" button.setText(\\\"New Button\\\");\",\r\n \" }\",\r\n \" }\",\r\n \"}\"}, null);\r\n }", "public TextButton (String text,int textSize, Color color)\n {\n buttonText = text;\n GreenfootImage tempTextImage = new GreenfootImage (text, textSize, color, Color.WHITE);\n myImage = new GreenfootImage (tempTextImage.getWidth() + 8, tempTextImage.getHeight() + 8);\n myImage.setColor (Color.WHITE);\n myImage.fill();\n myImage.drawImage (tempTextImage, 4, 4);\n\n myImage.setColor (Color.BLACK);\n myImage.drawRect (0,0,tempTextImage.getWidth() + 7, tempTextImage.getHeight() + 7);\n setImage(myImage);\n }", "public void createInstructionButton() {\n \tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tshowInstructions();}\n };\n \tcreateGenericButton(2, 0, myResources.getString(\"guide\"), eventHandler);\n }", "public JButton createJButton(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException {\n/* 111 */ return this.buttonFactory.createJToolbarButton(name);\n/* */ }", "public Button(String text, int x, int y, String filename) {\n\t\tthis.text = text;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\ts = new Sound(filename);\n\t\tw = 50;\n\t\th = 50;\n\t\tb = new JButton();\n\t\tb.setLayout(null);\n\t\tb.setText(text);\n\t\tb.setForeground(Color.BLACK);\n\t\tb.setFont(new Font(\"Roman Baseline\", 0, 16));\n\t\tb.setBounds(x, y, w, h);\n\t\tb.setSize(w, h);\n\n\t\tb.addActionListener(this);\n\t\n\t}", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "protected JButton createAddButton() {\n JButton butAdd = new JButton();\n butAdd.setIcon(new ImageIcon(getClass().getClassLoader().getResource(\"image/add.jpg\")));\n butAdd.setToolTipText(\"Add a new item\");\n butAdd.addActionListener(new AddItemListener());\n return butAdd;\n }", "public SimpleButton(int x, int y, String text) {\n\t\tsuper(x, y, text);\n\t\tthis.setListener(new ArrayList<>());\n\t}", "public Node makeTitle(String text) {\r\n VBox panel = new VBox();\r\n Label label = makeLabel(myResources.getString(text));\r\n panel.setAlignment(Pos.CENTER);\r\n Button returnHome = makeButton(\"Main\", e -> {\r\n MainDisplay display = new MainDisplay(sceneLanguage, sceneWidth, sceneHeight);\r\n mainScene.setRoot(display.setUpComponents());\r\n display.changeScene(mainScene);\r\n });\r\n panel.getChildren().addAll(label, returnHome);\r\n panel.setMargin(label, new Insets(0, 15, 0, 0));\r\n return panel;\r\n }", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "public JButton makeNavigationButton(String actionCommand, String toolTipText,String altText) \r\n {\n JButton button = new JButton();\r\n button.setActionCommand(actionCommand);\r\n button.setToolTipText(toolTipText);\r\n button.addActionListener(this);\r\n\r\n //no image found\r\n button.setText(altText);\r\n return button;\r\n }", "public void setButtonText(String str){\r\n SWINGButton.setText(str);\r\n }", "public void createGenericButton(int columnindex, int rowindex, String label,\n \t\tEventHandler<MouseEvent> eventHandler) {\n \tButton button = new Button(label);\n \tbutton.setFont(Font.font(null, FontWeight.EXTRA_BOLD, NORMAL_FONT)); \n \tbutton.setTextFill(Color.BLUE);\n \tbutton.setPrefSize(BUTTON_SIZE, BUTTON_SIZE);\n \tstage.setScene(scene1);\n \tstartScreen.add(button, columnindex, rowindex);\n \tscene1.setOnKeyPressed(e -> handleKeyInput(e.getCode()));\n \tbutton.addEventHandler(MouseEvent.MOUSE_CLICKED, eventHandler);\n }", "private Button createButton(String name, int fontSize, int cornerSize) {\n Button button = new Button(name);\n button.setFont(Font.font(fontSize));\n button.setMinWidth(BUTTON_WIDTH);\n button.setMaxWidth(Double.MAX_VALUE);\n button.setBackground(new Background(new BackgroundFill(\n Color.SEASHELL, new CornerRadii(cornerSize), null)));\n return button;\n }", "protected AbstractButton createToolBarButton(String iconName, String toolTipText) {\r\n JButton button = new JButton(readImageIcon(iconName));\r\n button.setToolTipText(toolTipText);\r\n button.setFocusable(false);\r\n return button;\r\n }", "protected Button CButton(String s, Color fg, Color bg) {\n Button b = new Button(s);\n b.setBackground(bg);\n b.setForeground(fg);\n b.addActionListener(this);\n return b;\n }", "private JButton addOKButton(String actionCommand) {\n JButton button = new JButton(\"OK\");\n button.setActionCommand(\"OK \" + actionCommand);\n return button;\n }", "public ButtonField addButtonField(final Property property, String text, int rightMargin) {\n return addButtonField(property.getKey(), text, rightMargin);\n }", "public MenuButtons(String nameOfButton) {\n Text text = new Text(nameOfButton);\n text.setFont(Font.font(null, FontWeight.BOLD, 18));\n text.setFill(Color.WHITESMOKE);\n\n //A rectangle that will be a part of the button\n Rectangle rectangle = new Rectangle(250,30);\n rectangle.setOpacity(0.3);\n rectangle.setFill(Color.BLUE);\n\n setAlignment(Pos.CENTER_LEFT);\n getChildren().addAll(rectangle, text);\n\n setOnMouseEntered(e -> {\n rectangle.setTranslateX(5);\n text.setTranslateX(5);\n rectangle.setFill(Color.DARKBLUE);\n });\n\n setOnMouseExited(e -> {\n rectangle.setTranslateX(0);\n text.setTranslateX(0);\n rectangle.setFill(Color.BLUE);\n });\n\n DropShadow shadowEffect = new DropShadow();\n shadowEffect.setInput(new Glow());\n\n setOnMousePressed(e -> setEffect(shadowEffect));\n setOnMouseReleased(e -> setEffect(null));\n }", "Builder addText(Text value);", "Builder addText(String value);", "public static JButton withoutBorder(String text) {\n return ButtonFactory.withoutBorder(\n new JButton(text), ColorUtils.TRANSPARENT\n ) ;\n }", "private JButton getJButton3() {\r\n\t\tif (jButton3 == null) {\r\n\t\t\tjButton3 = new JButton();\r\n\t\t\tjButton3.setBounds(new Rectangle(38, 224, 124, 28));\r\n\t\t\tjButton3.setBackground(new Color(0, 204, 51));\r\n\t\t\tjButton3.setText(\"New word\");\r\n\t\t\tjButton3.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tjButton1.setEnabled(true);\r\n\t\t\t\t\tjButton1.setVisible(true);\r\n\t\t\t\t\tjTextArea.setText(\"\");\r\n\t\t\t\t\tjTextArea.setEditable(true);\r\n\t\t\t\t\tjButton.setEnabled(false);\r\n\t\t\t\t\tjButton2.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButton3;\r\n\t}", "public void setDeleteButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_deleteButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_deleteButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_deleteButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setDeleteButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "protected void createButtonActionPerformed(ActionEvent evt) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttextArea.append(\"My mark is X\\n\");\r\n\t\tmyMark =\"X\";\r\n\t\tyourMark=\"O\";\r\n\t\tnew CreateButtonThread(\"CreateButton\");\t\t\t\t\t\r\n\t}", "@Override\n protected Button createButton(Composite parent, int id, String label,\n boolean defaultButton) {\n return null;// 重写父类的按钮,返回null,使默认按钮失效\n }", "public GameButton(String text, Node graphic) {\n super(text, graphic);\n initialize();\n }", "private void createCheckButtonPanel(Composite textPanel) {\r\n Composite checkPanel = new Composite(textPanel, SWT.NONE);\r\n checkPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));\r\n checkPanel.setLayout(new GridLayout(2, true));\r\n\r\n Label swtTaskLabel = new Label(checkPanel, SWT.NONE);\r\n swtTaskLabel.setText(\"SWT task done\");\r\n swtTaskLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true));\r\n\r\n _checkButton = new Button(checkPanel, SWT.CHECK);\r\n _checkButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, true));\r\n }", "public void clickOnText(String text);", "ElementText createElementText();", "public Button addButton(ButtonID buttonId) {\n\t\tfinal Button b = new Button();\n\t\tb.setText(buttonId.title);\n\t\tif (buttonId.icon != null)\n\t\t\tb.setGraphic(new ImageView(buttonId.icon));\n\t\tswitch (buttonId) {\n\t\tcase OK:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleOk(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\t// TODO fix problematic NPE on VK_ENTER press\n\t\t\t// b.setDefaultButton(true);\n\t\t\tbreak;\n\t\tcase CANCEL:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleCancel(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbreak;\n\t\tcase NEXT:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleNext(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbreak;\n\t\tcase BACK:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleBack(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbreak;\n\t\tcase HELP:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleHelp(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\torderedButtonList.add(b);\n\t\tbuttons.put(buttonId, b);\n\t\treturn b;\n\t}", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }", "public ButtonField addButtonField(final String key, final String text, final int rightMargin) {\n ButtonField buttonField = new ButtonField(getComposite(), _form, key, text, rightMargin);\n buttonField.adapt(_formToolkit);\n _form.mapField(key, buttonField);\n return buttonField;\n }", "public JButton makeDigitButton(String digit)\r\n {\r\n JButton button = new JButton(digit); \r\n ActionListener listener = new DigitButtonListener(digit);\r\n button.addActionListener(listener); \r\n return button; \r\n }", "private JLabel createButtonDescription() {\r\n JLabel buttonDescription = new JLabel(\"Result\");\r\n buttonDescription.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n buttonDescription.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n buttonDescription.setText(\"Play again?\");\r\n buttonDescription.setFont(new Font(null, Font.PLAIN, 20));\r\n return buttonDescription;\r\n }", "public void createFinishedButton() {\n\t\tJButton finished = new JButton(\"Click here when finished inputting selected champions\");\n\t\tfinished.setName(\"finished\");\n\t\tfinished.setBackground(Color.GRAY);\n\t\tfinished.setForeground(Color.WHITE);\n\t\tfinished.setBorderPainted(false);\n\t\tfinished.addActionListener(this);\n\t\tfinished.setBounds(400, 50, 400, 100);\n\t\tbottomPanel.add(finished, new Integer(4));\n\t}", "private ImageButton generateItemButton(Texture image) {\n\t\tTextureRegion imgRegion = new TextureRegion(image);\n\t\tTextureRegionDrawable imgDraw = new TextureRegionDrawable(imgRegion);\n\t\treturn new ImageButton(imgDraw);\n\t}", "private JButton createBookButton() {\n\t\tfinal JButton bookButton = new JButton(\"Create Booking\");\n\n\t\tbookButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\n\t\t\t\thandleBooking();\n\t\t\t}\n\t\t});\n\n\t\treturn bookButton;\n\t}", "public GameButton(String text) {\n //super(text);\n setPrefHeight(20);\n setPrefWidth(25);\n this.cellNumber = text;\n initialize();\n }", "public void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NULL);\r\n\r\n\t\tsetControl(container);\r\n\t\tcontainer.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblNewLabel = new Label(container, SWT.NONE);\r\n\t\tlblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,\r\n\t\t\t\tfalse, 1, 1));\r\n\t\tlblNewLabel.setText(\"Package:\");\r\n\r\n\t\ttext = new Text(container, SWT.BORDER);\r\n\t\ttext.addModifyListener(this);\r\n\t\ttext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\r\n\t\tGroup grpAutoCreate = new Group(container, SWT.NONE);\r\n\t\tgrpAutoCreate.setText(\"auto create\");\r\n\t\tgrpAutoCreate.setLayout(new GridLayout(1, false));\r\n\t\tgrpAutoCreate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,\r\n\t\t\t\tfalse, 2, 1));\r\n\r\n\t\tSelectionAdapter sa = new SelectionAdapter() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tButton b = (Button) e.getSource();\r\n\t\t\t\tInteger index = (Integer) b.getData(\"index\");\r\n\t\t\t\tselectionStats[index] = b.getSelection();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < chkBtns.length; i++) {\r\n\t\t\tButton b = chkBtns[i] = new Button(grpAutoCreate, SWT.CHECK);\r\n\t\t\tb.setSelection(selectionStats[i]);\r\n\t\t\tb.setText(baseFileNames[i]);\r\n\t\t\tb.setData(\"index\", i);\r\n\t\t\tb.addSelectionListener(sa);\r\n\t\t}\r\n\t}", "private void initCreateDeckBtn() {\n createBtn = new Button((editWidth - 310) / 2, 400, \"CREATE NEW DECK\", MasterGUI.green, titleField.getWidth(), titleField.getHeight());\n createBtn.setFont(MasterGUI.poppinsFont);\n createBtn.setForeground(MasterGUI.white);\n createBtn.setContentAreaFilled(true);\n createBtn.setFocusPainted(false);\n ActionListener createAction = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createDeckFromInput();\n user.updateDeckList();\n repaintDeckCards();\n HomeView.repaintHomeView();\n }\n };\n createBtn.addActionListener(e -> {\n MainGUI.confirmDialog(createAction, \"Create new Deck?\");\n });\n editPanel.add(createBtn);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBeginNewText();\r\n\t\t\t}", "private JButton createButtonAddProduct() {\n\n JButton btn = new JButton(\"Add Product\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n // new NewProductDialog(DemonstrationApplication.this);\n }\n });\n\n return btn;\n }", "private void makeButton(String name, String className, JPanel aPanel)\n\t{\n\t\t// add button to panel\n\t\tJButton button = new JButton(name);\n\t\taPanel.add(button);\n\n\t\t// set button action\n\t\tbutton.addActionListener(event -> {\n\t\t\t// button action: switch to the new look-and-feel\n\t\t\ttry\n\t\t\t{\n\t\t\t\tUIManager.setLookAndFeel(className);\n\t\t\t\tSwingUtilities.updateComponentTreeUI(this);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t});\n\t}", "ButtonDemo() \n {\n // construct a Button\n bChange = new JButton(\"Click Me!\"); \n\n // add the button to the JFrame\n getContentPane().add( bChange ); \n }", "public void addButton(String label, ActionListener listener) {\n JButton button = new JButton(label);\n buttonPanel.add(button);\n button.addActionListener(listener);\n }", "Button(int x, int y, int w, int h, String label, int c){\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n this.label = label;\n this.col = c;\n }", "public void setEditButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_editButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_editButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_editButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setEditButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "private JButton makePrgRunButton() {\r\n\t\tJButton tprgRunButton = new JButton();\r\n\t\ttprgRunButton.setBackground(new Color(250, 250, 250));\r\n\t\ttprgRunButton.setForeground(new Color(51, 51, 51));\r\n\t\ttprgRunButton.setIcon(new ImageIcon(getClass().getResource(\"/org/colombbus/tangara/control_play_blue.png\"))); //$NON-NLS-1$\r\n\t\ttprgRunButton.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 13)); //$NON-NLS-1$\r\n\t\ttprgRunButton.setPreferredSize(new Dimension(120, 30));\r\n\t\ttprgRunButton.setText(Messages.getString(\"EditorFrame.button.execute\")); //$NON-NLS-1$\r\n\t\ttprgRunButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tparentFrame.executeProgram(getCurrentPane().getText(), getSelectedIndex());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\treturn tprgRunButton;\r\n\t}" ]
[ "0.8523499", "0.7417037", "0.7413243", "0.7258334", "0.72308975", "0.7219959", "0.7108022", "0.70965254", "0.70745504", "0.7015822", "0.6901245", "0.6873059", "0.6850135", "0.68055147", "0.67953014", "0.6755523", "0.6746289", "0.66521776", "0.65828085", "0.6575389", "0.6555219", "0.65248156", "0.6513614", "0.65043044", "0.6482723", "0.646059", "0.64230525", "0.6402526", "0.63998985", "0.63649285", "0.6357809", "0.6352395", "0.63470405", "0.6328937", "0.63154334", "0.63130987", "0.6309745", "0.63089556", "0.62854296", "0.6281072", "0.6251865", "0.6245167", "0.6243305", "0.62413263", "0.6228793", "0.6224357", "0.6206113", "0.6177882", "0.6167142", "0.6164188", "0.61332804", "0.6132698", "0.61092377", "0.61044955", "0.6099729", "0.6099537", "0.6064774", "0.6062989", "0.6046093", "0.60408854", "0.6038063", "0.6024101", "0.60228956", "0.60189366", "0.6003321", "0.5992882", "0.5991218", "0.5973183", "0.5957705", "0.59361666", "0.59299517", "0.5923879", "0.5893315", "0.5874781", "0.58696675", "0.58576965", "0.58491564", "0.58491135", "0.5846365", "0.5839746", "0.5836766", "0.5836209", "0.58221203", "0.5815063", "0.5800221", "0.57852066", "0.57673115", "0.575579", "0.57507634", "0.57474864", "0.57416767", "0.5741417", "0.57285327", "0.57277715", "0.57216185", "0.5717836", "0.5716642", "0.57163954", "0.57013184", "0.5700263" ]
0.6590557
18
Gets the button's bounds.
public final Rectangle getBounds() { return label.getBounds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Rectangle getBounds();", "public Rectangle getBounds() {\n\t\t\treturn new Rectangle(x_pos, y_pos, getIconWidth(), getIconHeight());\n\t\t}", "public Rectangle getBounds() {\n return new Rectangle(x, y, 32, 32);\n }", "Rectangle getBounds() {\n return new Rectangle(getLocation(), getSize());\n }", "@NonNull\n public Rect getBounds() {\n return new Rect(mBounds);\n }", "public Rectangle getBounds() {\n return new Rectangle((int) getX() - 20, (int) getY() - 20, 40, 40);\n }", "private float[] getControlBounds() {\n\t\tRectangle r = control instanceof Scrollable ? ((Scrollable) control).getClientArea() : control.getBounds();\n\t\tfloat[] controlBounds = new float[]{r.x, r.y, r.x + r.width, r.y + r.height};\n\t\treturn controlBounds;\n\t}", "public Rectangle getBounds() {\r\n return new Rectangle(x, y, 55, 51);\r\n }", "public Rectangle getBounds();", "public Rectangle getBounds();", "public Rect getBound() {\n return new Rect((int) (x - radius), (int) (y - radius), (int) (x + radius), (int) (y + radius));\n }", "public Rectangle getBounds() {\r\n return bounds;\r\n }", "public Rectangle getBounds(){\r\n return new Rectangle(x, y, w, w);\r\n }", "public Rectangle getBounds() {\n return super.getBounds();\n }", "public Rectangle getBounds()\r\n\t{\r\n\t\treturn new Rectangle(x, y, w, h);\r\n\t}", "public RMRect getBounds() { return new RMRect(getX(), getY(), getWidth(), getHeight()); }", "public Bounds getLogicalBounds() {\n return getDragContext().getLogicalBounds();\n }", "public RectF getBounds()\n {\n return bounds;\n }", "public sRectangle getSRectangleBound()\n {\n return form.getSRectangleBound();\n }", "public Rectangle getBounds() {\n\t\treturn new Rectangle(getX(),getY(),width, width);\n\t}", "public Rectangle getBounds() {\n return new Rectangle(getMinX(), getMinY(), getWidth(), getHeight());\n }", "public java.awt.Rectangle getBounds(){\r\n return new java.awt.Rectangle((int)Math.round(x), (int)Math.round(y), (int)Math.round(getWidth()), (int)Math.round(getHeight()));\r\n }", "public Rectangle getBounds() {\n\t\treturn new Rectangle((int) xPos, (int) yPos, (int) width, (int) height);\n\t}", "public Rectangle getBounds() {\n\treturn new Rectangle((int)x,(int)y,32,32);\n\t}", "public RMRect getBoundsInside() { return new RMRect(0, 0, getWidth(), getHeight()); }", "public Rectangle getBounds()\n {\n return new Rectangle ((int)x,(int)y,32,32);\n }", "public Rectangle get_bounds() {\n return new Rectangle(x,y, width-3, height-3);\n }", "public Rectangle getBounds() {\n\t\tRectangle Box = new Rectangle(x, y, 48, 48);\n\t\treturn Box;\n\t}", "public String getRectangleBounds() {\n checkAvailable();\n return impl.getRectangle();\n }", "@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}", "@Override\n public Rectangle getBounds() {\n return new Rectangle(this.bounds);\n }", "Dimension getButtonDimension() {\n return new Dimension(dimButton);\n }", "@Override\n\tpublic Rectangle getBounds() {\n\t\treturn new Rectangle(screen_x, screen_y, pinWidth, pinWidth);\n\t}", "public Rectangle getBounds () {\r\n\tcheckWidget();\r\n\tPhArea_t area = new PhArea_t ();\r\n\tOS.PtWidgetArea (handle, area);\r\n\treturn new Rectangle (area.pos_x, area.pos_y, area.size_w, area.size_h);\r\n}", "public RMRect bounds() { return new RMRect(x(), y(), width(), height()); }", "public Rectangle getBoundsBigger() {\n return new Rectangle(x-32,y-32,128,128);\n }", "public Rectangle getBounds() {\n return new Rectangle(x, y, DIAMETER, DIAMETER); // returns a rectangle with its dimensions\r\n }", "public Rectangle bounds()\n\t{\n\t\treturn (new Rectangle(x, y, 10, 10));\n\t}", "@Override\n public Rectangle getBounds() {\n return new Rectangle(x,y,64,64);\n }", "int getBoundsY();", "public Rectangle getBounds() {\r\n\t\treturn new Rectangle((int) (x * scalingX), (int) (y * scalingY), (int) rocketWidth, (int) rocketHeight);\r\n\t}", "public Bounds getBounds () { return (bounds); }", "public abstract Rectangle getBounds();", "public abstract Rectangle getBounds();", "public abstract Rectangle getBounds();", "public Bounds getBounds() {\n\t\treturn boss.getBoundsInParent();\n\t}", "int getBoundsHeight();", "private Bounds getDrawBounds() {\n\t\tfinal float boundsWidth = 2 * OFFSET_X;\n\t\tfinal float boundsHeight = 2 * OFFSET_Y;\n\t\t\n\t\t//Get the center point of the player, then subtract by offset\n\t\tfinal float x = (activePlayer.getX() + activePlayer.getWidth() / 2f) \n\t\t\t\t/ activePlayer.getScaleX() - OFFSET_X;\n\n\t\tfinal float y = (activePlayer.getY() + activePlayer.getHeight() / 2f) \n\t\t\t\t/ activePlayer.getScaleY() - OFFSET_Y + 1;\n\t\t\n\t\treturn new Bounds(x, y, boundsWidth, boundsHeight);\n\t}", "protected Rectangle determineBounds() {\n return getNetTransform().createTransformedShape( _bounds ).getBounds();\n }", "public CCAABoundingRectangle boundingRect(){\n\t\treturn _myBoundingRectangle;\n\t}", "public Rectangle getBounds() {\n return null;\n }", "public Rectangle getBounds() {\n\t\tif (bounds == null) {\n\t\t\tsuper.getBounds();\n\t\t\tfor (int i = 0; i < getChildren().size(); i++) {\n\t\t\t\tIFigure child = (IFigure) getChildren().get(i);\n\t\t\t\tbounds.union(child.getBounds());\n\t\t\t}\n\t\t}\n\t\treturn bounds;\n\t}", "@Override\n\tpublic Rectangle getBound() {\n\t\trectBound.setX(posX+20);\n\t\trectBound.setY(Y_LAND - image.getHeight() +10);\n\t\trectBound.setWidth(image.getWidth()-10);\n\t\trectBound.setHeight(image.getHeight());\n\t\treturn rectBound;\n\t}", "public float[] getBounds() {\r\n\t\tfloat[] bounds = {x_ - width_/ 2, x_ + width_ / 2, y_ - height_ / 2, y_ + height_ / 2};\r\n\t\treturn bounds;\r\n\t}", "RectangleLatLng getBounds();", "public Rectangle getOffsetBounds()\r\n\t{\r\n\t\treturn new Rectangle(mFrameX, mFrameY, mImageBuffer.getWidth(null), mImageBuffer.getHeight(null));\r\n\t}", "public Rectangle getPlotBounds();", "public Rectangle2D getBounds() {\n\t\t// FIXME: these bounds REALLY need to be cached. But it's\n\t\t// painful because of the public members.\n\t\tif (stroke == null) {\n\t\t\treturn shape.getBounds2D();\n\t\t} else if (stroke instanceof BasicStroke) {\n\t\t\t// For some reason (antialiasing?) the bounds returned by\n\t\t\t// BasicStroke is off by one. This code works around it.\n\t\t\t// if all we want is the bounds, then we don't need to actually\n\t\t\t// stroke the shape. We've had reports that this is no longer\n\t\t\t// necessary with JDK1.3.\n\t\t\tRectangle2D rect = shape.getBounds2D();\n\t\t\tint width = (int) ((BasicStroke) stroke).getLineWidth() + 2;\n\t\t\treturn new Rectangle2D.Double(rect.getX() - width, rect.getY()\n\t\t\t\t\t- width, rect.getWidth() + width + width, rect.getHeight()\n\t\t\t\t\t+ width + width);\n\t\t} else {\n\t\t\t// For some reason (antialiasing?) the bounds returned by\n\t\t\t// BasicStroke is off by one. This code works around it.\n\t\t\t// We've had reports that this is no longer\n\t\t\t// necessary with JDK1.3.\n\t\t\tRectangle2D rect = stroke.createStrokedShape(shape).getBounds2D();\n\t\t\treturn new Rectangle2D.Double(rect.getX() - 1, rect.getY() - 1,\n\t\t\t\t\trect.getWidth() + 2, rect.getHeight() + 2);\n\t\t}\n\t}", "public Rectangle getBounds() {\n\t\tif (img == null)\n\t\t\treturn new Rectangle();\n\t\treturn new Rectangle(new Dimension(img.getWidth(), img.getHeight()));\n\t}", "public Rectangle getBound(){\n \tint x = (int)location.getX();\n \tint y = (int)location.getY();\n \t\n \tif(isExploded == false)\n \t\treturn new Rectangle(x, y, image.getWidth(null), image.getHeight(null));\n \telse\n \t\treturn new Rectangle(x,y, 1,1);\n }", "public Rect bounds(Window w) {\r\n\t\treturn new Rect(c.bounds(w).width,c.bounds(w).height);\r\n\t}", "public Rectangle2D getBounds() {\n\t\tif (_child == null) {\n\t\t\treturn new Rectangle2D.Double();\n\t\t} else {\n\t\t\treturn _child.getBounds();\n\t\t}\n\t}", "public PBounds getBoundsReference() {\n\t\tPBounds bds = super.getBoundsReference();\n\t\tgetUnionOfChildrenBounds(bds);\n\n\t\tcachedChildBounds.setRect(bds);\n\t\tdouble scaledIndent = INDENT/renderCamera.getViewScale();\t\t\n\t\tbds.setRect(bds.getX()-scaledIndent,bds.getY()-scaledIndent,bds.getWidth()+2*scaledIndent,bds.getHeight()+2*scaledIndent);\n\t\t\n\t\treturn bds;\n\t}", "public Point getSize() {\n checkWidget();\n return parent.fixPoint( itemBounds.width, itemBounds.height );\n }", "public Rectangle getClipBounds()\r\n\t{\r\n\t\treturn _g2.getClipBounds();\r\n\t}", "int getBoundsWidth();", "int getBoundsX();", "public Rectangle getBoundingBox() {\n\t\treturn getBounds();\n\t}", "public static final Rect getViewportBounds() {\n return new Rect(Window.getScrollLeft(), Window.getScrollTop(), Window.getClientWidth(), Window.getClientHeight());\n }", "@Override\n\tpublic GRectangle getBounds() {\n\t\tif (isEmpty()) {\n\t\t\treturn new GRectangle();\n\t\t} else {\n\t\t\tGPoint p0 = points.get(0);\n\t\t\tdouble minX = p0.getX();\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = p0.getY();\n\t\t\tdouble maxY = minY;\n\t\t\tfor (int i = 1; i < size(); i++) {\n\t\t\t\tGPoint p1 = points.get(i);\n\t\t\t\tminX = Math.min(minX, p1.getX());\n\t\t\t\tmaxX = Math.max(maxX, p1.getX());\n\t\t\t\tminY = Math.min(minY, p1.getY());\n\t\t\t\tmaxY = Math.max(maxY, p1.getY());\n\t\t\t}\n\t\t\treturn new GRectangle(minX, maxX, minY, maxY);\n\t\t}\n\t}", "public int getBound();", "@Override\n\tpublic Rect getHitbox() \n\t{\n\t\treturn _bounds;\n\t}", "public final native LatLngBounds getBounds() /*-{\n return this.getBounds();\n }-*/;", "public RMRect getFrame() { return isRSS()? convertRectToShape(getBoundsInside(), _parent) : getBounds(); }", "Rectangle getClickArea() {\n return clickArea;\n }", "public Point getAddToListButtonLoc(){\r\n\t\treturn button.getLocationOnScreen();\r\n\t}", "@Override\r\n public Rectangle getBounds()\r\n {\r\n try\r\n {\r\n return new Rectangle(0,0,pageSwitcher.getWidth(),pageSwitcher.getHeight());\r\n }\r\n catch(NullPointerException e)\r\n {\r\n return super.getBounds();\r\n }\r\n }", "public BoundsObject getBounds() {\n\t\treturn null;\n\t}", "private Bounds getTextureBounds() {\n\t\tfinal float boundsWidth = 2 * OFFSET_X;\n\t\tfinal float boundsHeight = 2 * OFFSET_Y;\n\t\t\n\t\t//Get the center point of the player, then subtract by offset\n\t\tfinal float x = (activePlayer.getX() + activePlayer.getWidth() / 2f) \n\t\t\t\t/ activePlayer.getScaleX() - OFFSET_X;\n\t\tfinal float y = (activePlayer.getY() - activePlayer.getHeight() / 2f) \n\t\t\t\t/ activePlayer.getScaleY() + OFFSET_Y + 1;\n\t\t\n\t\treturn new Bounds(x, y, boundsWidth, boundsHeight);\n\t}", "private void updateButtonBounds(){\n\t\tactionButton.setVisible(true);\n\t\tactionButton.setToolTipText(toolTips[boundIndex]);\n\t\tactionButton.setBounds(buttonBounds[boundIndex]);\n\t\texitButton.setBounds(exitBounds);\n\t}", "public Rectangle2D getBoundary() {\n return new Rectangle2D(x, y, width, height);\n }", "protected void computeBounds() {\r\n bounds = new Rectangle(layout.location.x - icon.getIconWidth() / 2,\r\n layout.location.y - icon.getIconHeight() / 2, icon.getIconWidth(), icon.getIconHeight()).union(labelBox)\r\n .union(ports[0].getBounds()).union(ports[1].getBounds()).union(ports[2].getBounds())\r\n .union(component.getType() == TemplateComponent.TYPE_CHANNEL\r\n ? ports[3].getBounds().union(supHalo.getBounds())\r\n : ports[3].getBounds());\r\n }", "@objid (\"1b87bc2e-5e33-11e2-b81d-002564c97630\")\n private Point getViewAreaSize() {\n final Point controlSize = new Point(0, 0);\n // this has to be done in the display thread to avoid\n // InvalidThreadAccessException.\n getViewer().getControl().getDisplay().syncExec(new Runnable() {\n @Override\n public void run() {\n final Control control = BackgroundEditPart.this.getViewer().getControl();\n Point p = control.getSize();\n controlSize.x = p.x;\n controlSize.y = p.y;\n \n if (control instanceof Scrollable) {\n Scrollable c = (Scrollable) control;\n ScrollBar b = c.getHorizontalBar();\n if (b != null /* && b.isVisible() */) {\n controlSize.y -= b.getSize().y;\n }\n b = c.getVerticalBar();\n if (b != null /* && b.isVisible() */) {\n controlSize.x -= b.getSize().x;\n }\n }\n }\n });\n return controlSize;\n }", "public abstract Rectangle getSnapshotBounds();", "public Rectangle getAWTRectangle() {\n\t\tRectangle r = null;\n\t\tif (width >= 0) {\n\t\t\tif (height >= 0) {\n\t\t\t\tr = new Rectangle(this.origin.getX0(), this.origin\n\t\t\t\t\t\t.getY0(), width, height);\n\t\t\t} else {\n\t\t\t\t// width >= 0 && height < 0\n\t\t\t\tr = new Rectangle(this.origin.getX0(), this.origin\n\t\t\t\t\t\t.getY0()\n\t\t\t\t\t\t+ height, width, -height);\n\t\t\t}\n\t\t} else {\n\t\t\tif (height >= 0) {\n\t\t\t\tr = new Rectangle(this.origin.getX0() + width, this.origin\n\t\t\t\t\t\t.getY0(), -width, height);\n\t\t\t} else {\n\t\t\t\t// width < 0 && height < 0\n\t\t\t\tr = new Rectangle(this.origin.getX0() + width, this.origin\n\t\t\t\t\t\t.getY0()\n\t\t\t\t\t\t+ height, -width, -height);\n\t\t\t}\n\t\t}\n\t\treturn r;\n\t}", "public final BoundingBox getBounds() {\n\t\tif (bounds==null) {\n\t\t\tint srsID =( (Geometry)this.get(0).getDefaultGeometry()).getSRID();\n\t\t\tBoundingBox re = new BoundingBoxImpl(\"\"+srsID);\n\t\t\tfor (SimpleFeature f : this) {\n\t\t\t\tre.include(f.getBounds());\n\t\t\t}\n\t\t\tbounds = re;\n\t\t}\n\t\treturn bounds;\n\t}", "public Bounds get() {\n\treturn bounds;\n }", "protected void calculateBounds()\r\n {\r\n Toolkit DefaultToolkit = Toolkit.getDefaultToolkit();\r\n Dimension ScreenSize = DefaultToolkit.getScreenSize();\r\n int FrameWidth = ScreenSize.width - 100;\r\n int FrameHeight = ScreenSize.height - 100;\r\n setBounds(50, 50, FrameWidth, FrameHeight);\r\n }", "public Circle getCircleBound()\n {\n return form.getCircleBound();\n }", "public ERectangle getPrimitiveBounds() {\n ERectangle primitiveBounds = this.primitiveBounds;\n if (primitiveBounds != null) return primitiveBounds;\n return this.primitiveBounds = computePrimitiveBounds();\n }", "@Override\n\tpublic KrollDict getRect()\n\t{\n\t\tView view = null;\n\t\tif (this.holder != null) {\n\t\t\tview = this.holder.getNativeView();\n\t\t}\n\t\treturn getViewRect(view);\n\t}", "public float getHeight()\n {\n return getBounds().height();\n }", "public RMPath getPathInBounds() { return getPath().getPathInRect(getBoundsInside()); }", "public Dimension getSize()\n\t{\n\t\treturn rect.getSize();\n\t}", "public Point getMoreIngredientsButtonLoc(){\r\n\t\treturn button2.getLocationOnScreen();\r\n\t}", "@Override\n public GRectangle getBounds() {\n return null;\n }", "public float getWidth()\n {\n return getBounds().width();\n }", "@Override\n public List<Bound> getBounds() {\n return Collections.unmodifiableList(bounds);\n }", "public Rectangle getCurrentRectangle() {\n return this.wotCharacter.getDrawable(this).getRectangle();\n }", "public LatLongRectangle getBoundingRectangle() {\n return boundingRectangle;\n }" ]
[ "0.709175", "0.7066095", "0.69944704", "0.6987175", "0.69751394", "0.6948416", "0.6897127", "0.68583006", "0.6854329", "0.6854329", "0.68488073", "0.6837972", "0.6833667", "0.6816157", "0.68152434", "0.6803569", "0.6784883", "0.677238", "0.67626077", "0.67413414", "0.67368567", "0.67350125", "0.6731331", "0.67285436", "0.6699613", "0.6697811", "0.66724783", "0.66669554", "0.66581947", "0.6649303", "0.66481876", "0.6640988", "0.6634565", "0.6564773", "0.6547409", "0.64951843", "0.6464972", "0.64597994", "0.645614", "0.6416042", "0.6410809", "0.63891804", "0.63617206", "0.63617206", "0.63617206", "0.6340603", "0.6326771", "0.63133574", "0.62962186", "0.6261206", "0.62495923", "0.6242344", "0.62360495", "0.62227094", "0.6217478", "0.62082857", "0.62038666", "0.6185452", "0.6136795", "0.6129931", "0.6125602", "0.6119454", "0.60766023", "0.6039877", "0.60112464", "0.6008629", "0.5993898", "0.5973637", "0.59611624", "0.59549296", "0.5927585", "0.5906914", "0.58677804", "0.5848659", "0.5848493", "0.58108556", "0.57953984", "0.5763719", "0.57622623", "0.5725864", "0.5725779", "0.5725395", "0.5716899", "0.57053727", "0.56616", "0.56554925", "0.56412417", "0.56215835", "0.5611561", "0.5610029", "0.5596091", "0.5575405", "0.5565842", "0.55516297", "0.55381966", "0.55374306", "0.5533663", "0.5531038", "0.552266", "0.552172" ]
0.70195895
2
Gets the label that acts as the backing for this button.
public final Label getLabel() { return label; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String label() {\n return this.label;\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel()\n {\n return label;\n }", "public String getLabel()\r\n {\r\n return label;\r\n }", "public String getLabel()\r\n {\r\n return label;\r\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel()\n {\n return label;\n }", "public Object getLabel() {\n if (this.label != null) {\n return this.label;\n }\n\n return this.getDefaultLabel();\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return _label == null ? name() : _label;\n }", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel()\n {\n return m_label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n\t\treturn this._label;\n\t}", "public String getLabel() {\n\t\treturn myLabel;\n\t}", "private String getLabel() {\n return this.label;\n }", "public String getLabel()\n { \n return label;\n }", "public String getLabel() {\n\t\treturn label;\n\t}", "public String getLabel() {\n return getElement().getChildren()\n .filter(child -> child.getTag().equals(\"label\")).findFirst()\n .get().getText();\n }", "public String getLabel() {\n return label;\n }", "public Object getLabel() \n {\n return label;\n }", "public String getLabel() {\r\n return lbl;\r\n }", "public Label getLabel() {\n return this.label;\n }", "public String getLabel(){\n\t\treturn label;\n\t}", "public final String getLabel() {\n\t\treturn _label;\n\t}", "public String getLabel() { //gets the label\n\n\t\treturn rawLabel;\n\t}", "public String getLabel() {\n return label;\n }", "public String getLabel()\n\t{\n\t\treturn label;\n\t}", "public String getLabelName() {\r\n if( this.jlblHolder != null )\r\n return this.jlblHolder.getText();\r\n else\r\n return label;\r\n }", "public java.lang.String getLabel() {\n\t\treturn this.label;\n\t}", "String getLabel() {\n return label;\n }", "public String getLabel() {\r\n return layout.label;\r\n }", "public Label getLabel() {\n\t\treturn this.label;\n\t}", "public String getLabel(){\n return label;\n }", "public Label getLabel() {\n\t\treturn label;\n\t}", "public Label getLabel() {\n\t\treturn label;\n\t}", "public JLabel getLabel() {\n return this.label;\n }", "public JLabel getLabel() {\n return label;\n }", "public String getLabel() {\n return label == null ? StringUtils.EMPTY : label;\n }", "public java.lang.String getLabel();", "public CharSequence getSelectedLabel()\n\t{\n\t\treturn _current.label.getText();\n\t}", "public int getLabel() {\n\t\treturn label;\n\t}", "@Override\n public String getLabel() {\n return label;\n }", "public String getLabel() {\n return name().toLowerCase().replace(\"_\", \"\");\n }", "java.lang.String getLabel();", "public T2 getLabel() {\r\n\t\treturn label;\r\n\t}", "public L getLabel() {\n\t\tcheckRep();\n\t\treturn this.label;\n\t}", "public com.commercetools.api.models.common.LocalizedString getLabel() {\n return this.label;\n }", "Label getLabel();", "Label getLabel();", "Label getLabel();", "public String getLabelName() {\n return m_labelName;\n }", "public String getLabel();", "public String getLabel();", "public String getLabel();", "public String getLabel();", "@java.lang.Override\n public java.lang.String getLabel() {\n java.lang.Object ref = label_;\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 label_ = s;\n return s;\n }\n }", "public double getLabel() {\n\t\treturn label;\n\t}", "public ComponentLabel getComponentLabel() {\n\t\treturn componentLabel;\n\t}", "public String getLabel() {\n return TrackerRes.getString(\"ModelFunctionPanel.Label\"); //$NON-NLS-1$\n }", "@Override\n\tpublic String getShortLabel()\n\t{\n\t\treturn label;\n\t}", "public java.lang.String getLabel() {\n java.lang.Object ref = label_;\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 label_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String label() {\n\t\treturn \"LABEL_\" + (labelCount++);\n\t}", "String getLabel();", "String getLabel();", "public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Label getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n\t\tif (label != null)\r\n\t\t\treturn label;\r\n\t\tif (classSimpleName==null)\r\n\t\t\treturn null;\r\n\t\treturn classSimpleName.replace('.', '_');\r\n\t}", "String getFormFieldLabel();", "public String getLabelText(){\n\t\treturn syncExec(new StringResult() {\t\t\n\t\t\t@Override\n\t\t\tpublic String run() {\n\t\t\t\tControl[] aux = widget.getParent().getChildren();\n\t\t\t\tfor (Control control : aux) {\n\t\t\t\t\tif (control instanceof CLabel){\n\t\t\t\t\t\treturn ((CLabel)control).getText();\n\t\t\t\t\t}\n\t\t\t\t\tif (control instanceof Label){\n\t\t\t\t\t\treturn ((Label)control).getText();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t}", "public abstract String getManipulatorButtonLabel();", "public String GetButtonText() {\n\t\treturn getWrappedElement().getText();\n\t}", "public String getLabelText();", "public String toString()\n {\n return label;\n }", "public String getLabel(){\n\t\treturn sAnzeige;\n\t}", "public String toString() {\n return label;\n }", "public\t\tMiPart\t\tgetLabel()\n\t\t{\n\t\treturn(label);\n\t\t}", "public final String aoy() {\n return this.label;\n }", "@Nullable\n public CharSequence getLabel() {\n return mPrimaryLabel;\n }", "@JsonGetter(\"label\")\r\n public String getLabel ( ) { \r\n return this.label;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn label;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getLabelBytes() {\n java.lang.Object ref = label_;\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 label_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getText() {\n int i = tp.indexOfTabComponent(TabButtonComponent.this);\n if (i != -1) {\n return tp.getTitleAt(i);\n }\n return null;\n }", "@JsonProperty(\"label\")\n @JsonInclude(JsonInclude.Include.NON_DEFAULT)\n public String getLabel() {\n return this.label;\n }", "public String getParentLabel(){\n\t\treturn this.parentLabel;\n\t}", "@DISPID(32)\r\n\t// = 0x20. The runtime will prefer the VTID if present\r\n\t@VTID(37)\r\n\tjava.lang.String label();", "com.google.ads.googleads.v6.resources.Label getLabel();", "@Override\n\t\t\tpublic String getLabel() {\n\t\t\t\treturn null;\n\t\t\t}", "@Nonnull\n\tGenericAttributeValue<String> getLabel();" ]
[ "0.78729427", "0.78215414", "0.78215414", "0.78215414", "0.7812738", "0.78003514", "0.78003514", "0.77982616", "0.77982616", "0.77982616", "0.77982616", "0.77976763", "0.77976763", "0.77976763", "0.7791025", "0.7772603", "0.7770061", "0.77677864", "0.77643394", "0.7760464", "0.7760464", "0.7760464", "0.7760464", "0.7754471", "0.7754151", "0.77449566", "0.77368283", "0.77300185", "0.7724386", "0.77233374", "0.77226406", "0.77132106", "0.7712349", "0.7706625", "0.76977134", "0.76945704", "0.7694125", "0.7687935", "0.76846313", "0.7684249", "0.76720256", "0.7668544", "0.7649985", "0.7634204", "0.76061165", "0.76025885", "0.75979847", "0.75979847", "0.7526801", "0.74430525", "0.7415552", "0.7379591", "0.7355769", "0.73433256", "0.73432386", "0.73201734", "0.73122734", "0.7290864", "0.7282917", "0.7273645", "0.7208118", "0.7208118", "0.7208118", "0.7195214", "0.71454173", "0.71454173", "0.71454173", "0.71454173", "0.70531726", "0.7041183", "0.703357", "0.7020533", "0.7019426", "0.70148826", "0.7010558", "0.70090234", "0.70090234", "0.6997433", "0.6917724", "0.69089115", "0.6906938", "0.6897098", "0.688394", "0.68652534", "0.6864412", "0.6855031", "0.68500686", "0.6826088", "0.6810887", "0.68051434", "0.6765129", "0.67586124", "0.6692253", "0.668595", "0.66698706", "0.66587484", "0.66517764", "0.66296786", "0.66063195", "0.6576601" ]
0.74899364
49
Renders the button to the specified graphics context.
public final void render(final Graphics2D g) { label.render(g); g.setStroke(new BasicStroke(BORDER_WIDTH)); g.setColor(Color.LIGHT_GRAY); g.draw(getBounds()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void renderButton(int mouseX, int mouseY){\n\t\t}", "@Override\n\tpublic void paint() {\n\t\tSystem.out.println(\"Painting an OSX Button!\");\n\t}", "public JButton drawButton ()\n {\n\n if (isAlive())\n {\n button.setBackground(ALIVE_COLOUR);\n }\n else \n {\n button.setBackground(DEAD_COLOUR);\n }\n\n button.addActionListener(this);\n return button;\n }", "public void draw() {\n\t\tif (fill) {\n\t\t\tapplet.noStroke();\n\t\t\tapplet.fill(color);\n\t\t} else {\n\t\t\tapplet.noFill();\n\t\t\tapplet.stroke(color);\n\t\t}\n\t\tapplet.rect(position.x, position.y, size.x, size.y);\n\t\tsliderButton.draw(new PVector(-10,0));\n\t}", "public void drawButton(Minecraft mc, int mouseX, int mouseY) {\n if(this.visible) {\n this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + getButtonWidth() && mouseY < this.yPosition + this.height;\n GlStateManager.enableAlpha();\n GL11.glColor4d(1, 1, 1, 0);\n GuiUtils.drawGradientRect(30, this.xPosition - 2, this.yPosition - 2, this.xPosition + getBackgroundSize(), this.yPosition + height + 2, 0x9F100010, 0x9F100010);\n GlStateManager.disableAlpha();\n GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.xPosition, this.yPosition, 0, 46, 11, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);\n this.mouseDragged(mc, mouseX, mouseY);\n int color = 14737632;\n\n if(packedFGColour != 0) {\n color = packedFGColour;\n } else if(!this.enabled) {\n color = 10526880;\n }\n\n if(this.isChecked()) {\n this.drawGradientRect(this.xPosition + 2, this.yPosition + 2, this.xPosition + 11 - 2, this.yPosition + height - 2, Color.cyan.darker().getRGB(), Color.cyan.darker().getRGB());\n }\n\n this.drawString(mc.fontRendererObj, displayString, xPosition + 11 + 2, yPosition + 2, color);\n }\n }", "public void drawButton(Minecraft mc, int mouseX, int mouseY)\n {\n if (visible)\n {\n mc.getTextureManager().bindTexture(GuiButton.buttonTextures);\n GlStateManager.color(1.0F, 1.0F, 1.0F, alpha);\n GlStateManager.enableBlend();\n GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);\n GlStateManager.blendFunc(770, 771);\n\n boolean flag = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height;\n\n drawTexturedModalRect(xPosition, yPosition, texX, texY + (!forceEnabled ? 0 : (flag ? height : 0)), width, height);\n }\n }", "public void paint(Graphics2D g) {\n g.setColor(Color.gray);\n g.fill3DRect(x, y, width, height, true);\n \n g.setColor(Color.BLACK);\n \n g.setFont(BUTTON_FONT);\n \n FontMetrics gFM = g.getFontMetrics();\n \n g.drawString(name, x+(width-gFM.stringWidth(name))/2, y+ (height+gFM.getHeight())/2);\n }", "public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks)\n {\n if (this.visible)\n {\n mc.getTextureManager().bindTexture(buttonTexture);\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n boolean flag = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;\n int i = 106;\n\n if (flag)\n {\n i += this.height;\n }\n\n this.drawTexturedModalRect(this.x, this.y, 0, i, this.width, this.height);\n }\n }", "public void drawButton(Minecraft par1Minecraft, int par2, int par3) {\r\n\t\tif(this.visible) {\r\n\t\t\tRenderUtils.bindTexture(texture);\r\n\t\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\t\tint posX = 176;\r\n\t\t\tint posY = 10;\r\n\t\t\t\r\n\t\t\tif(this.enabled) {\r\n\t\t\t\tposY = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.field_73749_j) {\r\n\t\t\t\tposX += 15;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.drawTexturedModalRect(this.xPosition, this.yPosition, posX, posY, this.width, this.height);\r\n\t\t}\r\n\t}", "void render(Graphics2D brush);", "@Override\n\tpublic void drawButton(Minecraft par1Minecraft, int par2, int par3)\n {\n if (this.drawButton)\n {\n boolean var4 = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n par1Minecraft.renderEngine.bindTexture(par1Minecraft.renderEngine.getTexture(\"/gui/book.png\"));\n int var5 = 0;\n int var6 = 192;\n\n if (var4)\n {\n var5 += 23;\n }\n\n if (!this.nextPage)\n {\n var6 += 13;\n }\n\n this.drawTexturedModalRect(this.xPosition, this.yPosition, var5, var6, 23, 13);\n }\n }", "public void drawButton(Minecraft mc, int mouseX, int mouseY) {\n/* 20 */ if (this.visible) {\n/* */ \n/* 22 */ mc.getTextureManager().bindTexture(GuiButton.buttonTextures);\n/* 23 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 24 */ boolean var4 = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);\n/* 25 */ int var5 = 106;\n/* */ \n/* 27 */ if (var4)\n/* */ {\n/* 29 */ var5 += this.height;\n/* */ }\n/* */ \n/* 32 */ drawTexturedModalRect(this.xPosition, this.yPosition, 0, var5, this.width, this.height);\n/* */ } \n/* */ }", "void draw(GraphicsContext context);", "@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"This is a rectangle button!\");\r\n\t}", "public void drawButtons() {\n\t\tfill(color(221, 221, 221));\n\t\tfor (int i = 0; i < NUM_BUTTONS; i++) {\n\t\t\trect(BUTTON_LEFT_OFFSET + i * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET, BUTTON_WIDTH, BUTTON_HEIGHT);\n\t\t}\n\n\t\t// set text color on the buttons to blue\n\t\tfill(color(0, 0, 255));\n\n\t\ttext(\"Add Cards\", BUTTON_LEFT_OFFSET + 18, BUTTON_TOP_OFFSET + 22);\n\t\ttext(\" Find Set\", BUTTON_LEFT_OFFSET + 18 + BUTTON_WIDTH + 12, BUTTON_TOP_OFFSET + 22);\n\t\ttext(\"New Game\", BUTTON_LEFT_OFFSET + 18 + 2 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\tif (state == State.PAUSED) {\n\t\t\ttext(\"Resume\", BUTTON_LEFT_OFFSET + 45 + 3 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\t} else {\n\t\t\ttext(\"Pause\", BUTTON_LEFT_OFFSET + 54 + 3 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\t}\n\t}", "public void paint(Graphics g) \n{ \n int i; \n int x=gRectangle.x;\n int y = gRectangle.y;\n int width=gRectangle.width;\n int height=gRectangle.height;\n \n g.setColor(ButtonColor); \n // Clickable Button \n // Unfortunately Java doesn't seem to have the concept of thickness \n // for borders. To get a border of a certain thickness, we have to \n // draw multiple rectangles having slightly different sizes \n \n for (i=0; i < GC_BUTTON_BORDER_THICKNESS; i++) \n { \n g.draw3DRect(x+i, y+i, width - 2*i+1, height - 2*i+1, raised); \n } \n g.fillRect(x+GC_BUTTON_BORDER_THICKNESS, \n y+GC_BUTTON_BORDER_THICKNESS, \n width -2* GC_BUTTON_BORDER_THICKNESS+2, \n height - 2*GC_BUTTON_BORDER_THICKNESS+2); \n \n // Put the label on the button \n \n g.setColor(Color.black); \n g.setFont(buttonFont);\n g.drawString(ButtonName, x+GC_BUTTON_BORDER_THICKNESS+GC_BUTTON_HORIZ_PAD,\n y+GC_BUTTON_BORDER_THICKNESS+GC_BUTTON_VERT_PAD+fontMaxAscent);\n \n \n // The following was added to see how big the alloted Canvas area was that was \n // made available to our MyButtonClass \n\n g.drawRect(0,0, gRectangle.width+2*GC_CANVAS_HORIZ_GAP-1,\n gRectangle.height+2*GC_CANVAS_VERT_GAP-1);\n\n }", "private void drawButtonBackground(int x, int y)\n {\n this.drawSprite(x, y, 0, 0);\n }", "@Override\r\n\tpublic void execute(Graphics2D g) {\r\n\t\tg.setColor(drawColor);\r\n\t}", "@Override\n public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta) {\n }", "@Override\n\tpublic void render(Graphics g, int x, int y) {\n\t\tg.setColor(Color.cyan);\n\t\tg.fillRect(x, y, this.getWidth(), this.getHeight());\n\t}", "@Override\n\tpublic void drawButton(Minecraft par1Minecraft, int par2, int par3)\n {\n if (this.drawButton)\n {\n boolean var4 = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n par1Minecraft.renderEngine.bindTexture(par1Minecraft.renderEngine.getTexture(SteamCraft.guiLocation + \"researchpaper.png\"));\n int var5 = 209;\n int var6 = 13;\n\n if (this.nextPage)\n {\n var6 += 91;\n var5 += 13;\n }\n\n this.drawTexturedModalRect(this.xPosition, this.yPosition, var5, 0, 10, var6);\n }\n }", "@Override\n\tpublic void handleRender(int mouseX, int mouseY, boolean mousePressed) {\n\t\tColor color = new Color(mousePressed&&this.isHovering(mouseX, mouseY)?0xFB3030:\n\t\t\tthis.isHovering(mouseX, mouseY)?0x757575:\n\t\t\t\t0x595959);\n\t\t\n\t\t//Opens a new layers\n\t\tthis.renderer.push();\n\t\t{\t\t\t\n\t\t\t//Renders the button\n\t\t\tthis.renderer.renderRectWithStroke(this.x, this.y, this.width, this.height, color.getRGB(), Color.black.getRGB(), 3);\n\n\t\t\t//Renders the text\n\t\t\tthis.renderer.renderTextCenter(this.text, this.x+this.width/2, this.y, this.height-8, null, Color.white.getRGB());\n\t\t}\n\t\t//Removes the new layer\n\t\tthis.renderer.pop();\n\t}", "public void draw(Window w) {\r\n\t\tw.drawButton(position.x, position.y, bounds(w).width, bounds(w).height, color);\r\n\t\tc.draw(w);\r\n\t}", "public void paint(Graphics g) { //paints the LWButton\n\n\t\t//If LWButton has the focus, display the text in\n\t\t// bold italics. Otherwise display plain.\n\t\tif (gotFocus)\n\t\t\tg.setFont(new Font(getFont().getName(), Font.BOLD | Font.ITALIC, getFont().getSize()));\n\t\telse\n\t\t\tg.setFont(new Font(getFont().getName(), Font.PLAIN, getFont().getSize()));\n\n\t\tif (pressed) { //if the pressed flag is true\n\t\t\tg.setColor(getBackground());\n\t\t\tg.fillRect( //fill rectangle with background color\n\t\t\t0, 0, this.getSize().width, this.getSize().height);\n\n\t\t\t//Draw shadows three shades darker than background\n\t\t\tg.setColor(getBackground().darker().darker().darker());\n\n\t\t\t//Note that three offset rectangles are drawn to\n\t\t\t// produce a shadow effect on the left and top of\n\t\t\t// the rectangle. \n\t\t\tg.drawRect( //\n\t\t\t0, 0, this.getSize().width, this.getSize().height);\n\t\t\tg.drawRect(1, 1, this.getSize().width, this.getSize().height);\n\t\t\tg.drawRect(2, 2, this.getSize().width, this.getSize().height);\n\n\t\t\t//Now draw a faint outline on the bottom and right of\n\t\t\t// the rectangle.\n\t\t\tg.setColor(getBackground().darker());\n\t\t\tg.drawRect(-1, -1, this.getSize().width, this.getSize().height);\n\n\t\t\t//Now center the text in the LWButton object\n\t\t\tFontMetrics fm = getFontMetrics(getFont());\n\t\t\tg.setColor(getForeground());\n\t\t\tg.drawString(label, (getSize().width / 2) - (fm.stringWidth(label) / 2),\n\t\t\t (getSize().height / 2) + (fm.getAscent() / 2));\n\t\t} //end if(pressed)\n\n\t\telse { //not pressed\n\t\t\t//Make the protruding LWButton object one shade\n\t\t\t// brighter than the background.\n\t\t\tg.setColor(getBackground().brighter());\n\t\t\tg.fillRect( //and fill a rectangle\n\t\t\t0, 0, this.getSize().width, this.getSize().height);\n\n\t\t\t//Set the color for the shadows three shades darker\n\t\t\t// than the background.\n\t\t\tg.setColor(getBackground().darker().darker().darker());\n\n\t\t\t//Draw two offset rectangles to create shadows on \n\t\t\t// the right and bottom. \n\t\t\tg.drawRect(-1, -1, this.getSize().width, this.getSize().height);\n\t\t\tg.drawRect(-2, -2, this.getSize().width, this.getSize().height);\n\n\t\t\t//Highlight the left and top two shades brighter \n\t\t\t// than the background, one shade brighter than the\n\t\t\t// color of the LWButton itself which is one shade\n\t\t\t// brighter than the background.\n\t\t\tg.setColor(getBackground().brighter().brighter());\n\t\t\tg.drawRect( //\n\t\t\t0, 0, this.getSize().width, this.getSize().height);\n\n\t\t\t//Now place the text in the LWButton object shifted\n\t\t\t// by two pixels up and to the left. \n\t\t\tFontMetrics fm = getFontMetrics(getFont());\n\t\t\tg.setColor(getForeground());\n\t\t\tg.drawString(label, (getSize().width / 2) - (fm.stringWidth(label) / 2) - 2,\n\t\t\t ((getSize().height / 2) + (fm.getAscent() / 2)) - 2);\n\t\t} //end else\n\t}", "public void draw(DrawingContext context) {\n\t\t\t\t}", "private void drawButton(String s, int X, int Y, int margin, Graphics2D g2) {\n Color preColor=g2.getColor();\n // If the button data arrays doesn't already contain a button with the same name, then add it to the data arrays\n if(!buttonNames.contains(s.substring(0, 2))) {\n buttonNames.add(s.substring(0, 2));\n buttonBounds.add(new Rectangle(X, Y, 150, 50 - margin * 2));\n buttonVisibilities.add(true);\n }\n // Set the button visibility to true so it can be clicked\n buttonVisibilities.set(buttonNames.indexOf(s.substring(0, 2)), true);\n\n // Check if the latest mouse coordinates overlapped with the button's bounding box\n Rectangle r=new Rectangle(X, Y, 150, 50-margin*2);\n if(r.contains(mX, mY)) {\n // If the mouse isn't pressed, just show the hover color\n if(!mDown) g2.setColor(Color.LIGHT_GRAY);\n // If it is pressed, show the pressed color\n else g2.setColor(Color.GRAY);\n // Draw the actual background\n g2.fillRect((int)r.getX(), (int)r.getY(), (int)r.getWidth(), (int)r.getHeight());\n }\n g2.setColor(Color.BLACK);\n // Draw the outline for the button\n g2.drawRect((int)r.getX(), (int)r.getY(), (int)r.getWidth(), (int)r.getHeight());\n // Draw the button label\n drawCenteredString(s, X+75, Y+(50-margin*2)/2, STANDARD_FONT, g2);\n\n // Set the graphic's color to what is was before the calling of this method\n g2.setColor(preColor);\n }", "public void draw() {\n \n // TODO\n }", "public void paintComponent(Graphics g){\n\n\n\n r.render(g);\n }", "private void render() {\n\n\tbs=display.getCanvas().getBufferStrategy();\t\n\t\n\tif(bs==null) \n\t {\t\n\t\tdisplay.getCanvas().createBufferStrategy(3);\n\t\treturn ;\n\t }\n\t\n\tg=bs.getDrawGraphics();\n\n\t//Clear Screen\n\tg.clearRect(0, 0, width, height);\n\t\n\tif(State.getState()!=null )\n\t\tState.getState().render(g);\n\t\n\t//End Drawing!\n\tbs.show();\n\tg.dispose();\n\t\n\t}", "void render(Graphics g);", "public void draw(Graphics g, Container container)\n\t{\n\t\tsuper.draw(g, container);\n\n\t\t// Draw the buttons\n\t\tfor (RectangleButton button : buttons.keySet())\n\t\t\tbutton.draw(g, container);\n\t\tfor (RectangleButton button : cancelButtons)\n\t\t\tbutton.draw(g, container);\n\n\t\ttitle.draw(g, container);\n\t\tgoButton.draw(g, container);\n\n\t\t// Draw the lines that appear beside the go button\n\t\tGraphics2D g2 = (Graphics2D) g;\n\t\tg2.setColor(Color.white);\n\t\tg2.setStroke(new BasicStroke(2f));\n\t\tint lineLength = 325;\n\t\tint spaceFromButton = 20;\n\t\tPoint center = goButton.getCenter();\n\t\tg2.drawLine(center.x - spaceFromButton - lineLength, center.y, center.x\n\t\t\t\t- spaceFromButton, center.y);\n\t\tg2.drawLine(center.x + spaceFromButton, center.y, center.x\n\t\t\t\t+ spaceFromButton + lineLength, center.y);\n\n\t\tdrawStatDisplay(g, container);\n\n\t}", "void render(GraphicsContext gc, double xOffSet, double yOffSet);", "@Override\n\tpublic void render(GameContainer container, StateBasedGame game, Graphics g)\n\t\t\tthrows SlickException {\n\t\tbkg.draw();\n\t\tupButton.render(g);\n\t\tdownButton.render(g);\n\t\tapplyButton.render(g);\n\t\tgoBackButton.render(g);\n\t}", "public void render (Graphics2D g);", "public void drawOn(Graphics g);", "private void drawXpButton ( Graphics g, AbstractButton b )\r\n {\n int x2 = b.getSize ().width - 1;\r\n int y2 = b.getSize ().height - 1;\r\n int h = b.getSize ().height;\r\n\r\n int spread1 = Theme.spinnerSpreadLight [ Theme.style ];\r\n int spread2 = Theme.spinnerSpreadDark [ Theme.style ];\r\n if ( !b.isEnabled () )\r\n {\r\n spread1 = Theme.spinnerSpreadLightDisabled [ Theme.style ];\r\n spread2 = Theme.spinnerSpreadDarkDisabled [ Theme.style ];\r\n }\r\n\r\n float spreadStep1 = 10.0f * spread1 / ( h - 2 );\r\n float spreadStep2 = 10.0f * spread2 / ( h - 2 );\r\n int halfY = h / 2;\r\n int yd;\r\n Color c = g.getColor ();\r\n\r\n for ( int y = 1 ; y < h - 1 ; y++ )\r\n {\r\n if ( y < halfY )\r\n {\r\n yd = halfY - y;\r\n g.setColor ( ColorRoutines.lighten ( c, ( int ) ( yd * spreadStep1 ) ) );\r\n }\r\n else if ( y == halfY )\r\n {\r\n g.setColor ( c );\r\n }\r\n else\r\n {\r\n yd = y - halfY;\r\n g.setColor ( ColorRoutines.darken ( c, ( int ) ( yd * spreadStep2 ) ) );\r\n }\r\n\r\n g.drawLine ( 1, y, x2, y );\r\n }\r\n\r\n if ( !b.isEnabled () )\r\n {\r\n g\r\n .setColor ( Theme.spinnerBorderDisabledColor [ Theme.style ]\r\n .getColor () );\r\n }\r\n else\r\n {\r\n g.setColor ( Theme.spinnerBorderColor [ Theme.style ].getColor () );\r\n }\r\n g.drawRect ( 0, 0, x2, y2 );\r\n }", "public void render() {\n this.canvas.repaint();\n }", "public void render() {\n\t\tscreen.background(255);\n\t\thandler.render();\n\t}", "public void render(Graphics g) {\n\t}", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\r\n\t\trender(g);\r\n\t}", "public void paintComponent(Graphics2D g2)\r\n {\r\n //fill background\r\n g2.setColor(Color.black);\r\n g2.fill(new Rectangle2D.Double(initX, 0, width, height));\r\n \r\n //paint \"buttons\"\r\n g2.setColor(Color.white);\r\n Font f = new Font(\"\", Font.BOLD, FONT_SIZE);\r\n g2.setFont(f);\r\n for (int i = 0; i < towerTypes.length; i++)\r\n {\r\n g2.draw(towerButtons[i]);\r\n \r\n int textLength = towerTypes[i].length();\r\n double x = towerButtons[i].getX();\r\n double y = towerButtons[i].getY();\r\n double textX = x + (width/2 - textLength*FONT_SIZE/4);\r\n double textY = y + FONT_SIZE;\r\n g2.drawString(towerTypes[i], (float)textX, (float)textY);\r\n }\r\n \r\n display.paintComponent(g2, initX + GAP, height/2,\r\n width - 2*GAP, height/4, f);\r\n }", "protected abstract void render(Graphics g);", "public void draw(){\n\t\tcomponent.draw();\r\n\t}", "public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }", "public void draw() {\n draw(root, true);\n }", "public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_)\n {\n if (this.visible)\n {\n FontRenderer fontrenderer = p_146112_1_.fontRendererObj;\n p_146112_1_.getTextureManager().bindTexture(ThemeRegistry.curTheme().guiTexture());\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n this.hovered = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height;\n int k = this.getHoverState(this.hovered);\n GlStateManager.enableBlend();\n GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);\n GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);\n \n GlStateManager.pushMatrix();\n float sh = height/20F;\n float sw = width >= 196? width/200F : 1F;\n float py = yPosition/sh;\n float px = xPosition/sw;\n GlStateManager.scale(sw, sh, 1F);\n \n if(width > 200) // Could use 396 but limiting it to 200 this makes things look nicer\n {\n \tGlStateManager.translate(px, py, 0F); // Fixes floating point errors related to position\n \tthis.drawTexturedModalRect(0, 0, 48, k * 20, 200, 20);\n } else\n {\n \tthis.drawTexturedModalRect((int)px, (int)py, 48, k * 20, this.width / 2, 20);\n \tthis.drawTexturedModalRect((int)px + width / 2, (int)py, 248 - this.width / 2, k * 20, this.width / 2, 20);\n }\n \n GlStateManager.popMatrix();\n \n this.mouseDragged(p_146112_1_, p_146112_2_, p_146112_3_);\n int l = 14737632;\n\n if (packedFGColour != 0)\n {\n l = packedFGColour;\n }\n else if (!this.enabled)\n {\n l = 10526880;\n }\n else if (this.hovered)\n {\n l = 16777120;\n }\n \n String txt = this.displayString;\n \n if(fontrenderer.getStringWidth(txt) > width) // Auto crop text to keep things tidy\n {\n \tint dotWidth = fontrenderer.getStringWidth(\"...\");\n \ttxt = fontrenderer.trimStringToWidth(txt, width - dotWidth) + \"...\";\n }\n \n this.drawCenteredString(fontrenderer, txt, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);\n }\n }", "public abstract void render(Graphics g);", "public void drawPauseButton(){\r\n\t\tBatch b = canvas.getBatch();\r\n\t\tpauseButton.setPosition(camera.position.x+PAUSE_BUTTON_OFFSETX, camera.position.y+PAUSE_BUTTON_OFFSETY);\r\n\t\tpauseButton.draw(b, 1);\r\n\t}", "public void draw() {\n \n }", "public abstract void render(Graphics2D graphics);", "@Override\n public void draw(ElapsedTime elapsedTime, IGraphics2D graphics2D) {\n\n // Clear the screen and draw the buttons\n // graphics2D.clear(Color.BLACK);\n\n boolean colourToggleOn = true;\n\n if (colourToggleOn) {\n String[] colourArray = {\"#9901FF\", \"#B94FFF\", \"#CA01FE\", \"#DA4AFF\",\n \"#FF00F9\", \"#FD50F9\", \"#FF00C6\", \"#FD56D8\", \"#FD009E\", \"#FD55BE\"};\n\n Random i = new Random();\n int c = i.nextInt(8 - 1) + 1;\n\n graphics2D.clear(Color.parseColor(colourArray[c]));\n }\n\n //Draw Background + Logo\n mBackground.draw(elapsedTime, graphics2D, mDefaultLayerViewport, mDefaultScreenViewport);\n mLogo.draw(elapsedTime, graphics2D, mDefaultLayerViewport, mDefaultScreenViewport);\n\n //Draw Buttons\n mPlayButton.draw(elapsedTime, graphics2D, mDefaultLayerViewport, mDefaultScreenViewport);\n mDeckButton.draw(elapsedTime, graphics2D, mDefaultLayerViewport, mDefaultScreenViewport);\n mQuitButton.draw(elapsedTime, graphics2D, mDefaultLayerViewport, mDefaultScreenViewport);\n\n }", "public void render(){\n\t\tBufferStrategy bs = frame.getBufferStrategy();\n\t\tif(bs == null){\n\t\t\tframe.createBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\trenderGraphics(bs);\n\t}", "public void draw() {\n draw(root, false);\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n render(g);\n }", "@Override\n\tpublic void draw(Graphics canvas) {}", "@Override\n\tpublic void actionPerformed(ActionEvent e) \n\t{\n\t\tbrush.draw();\n\t}", "public void render(Graphics g){\r\n if(!goButtonAdded&&a2>250){\r\n buttons.add(new Button(game,g,0,null,\"START\",(int)(w*0.40),(int)(h*0.93),(int)(w*0.2),(int)(h*0.14),Colors.ColorAlpha(Colors.darkBlues,255),\r\n Colors.ColorAlpha(Colors.darkBlues,255),Colors.ColorAlpha(Colors.yellows,190),\r\n Colors.ColorAlpha(Colors.yellows,255),Colors.ColorAlpha(Colors.whites,190),\r\n Colors.ColorAlpha(Colors.whites,255),75,15,false,true));\r\n goButtonAdded = true;\r\n }\r\n if(!buttonsAdded){\r\n for(int i = 1; i < Missions.NUMBER_OF_MISSIONS+1;i++){\r\n if(data.missionCompletion[i-1]==-1){\r\n missionButtons.add(new Button(game,g,Assets.redExclamationPoint,wiresX[(i-1)*3]-50,wiresY[(i-1)*3]-110,100,220,false));\r\n }else if(data.missionCompletion[i-1]==0){\r\n missionButtons.add(new Button(game,g,Assets.exclamationPoint,wiresX[(i-1)*3]-50,wiresY[(i-1)*3]-110,100,220,false));\r\n }else if(data.missionCompletion[i-1]==1){\r\n missionButtons.add(new Button(game,g,Assets.checkMark,wiresX[(i-1)*3]-80,wiresY[(i-1)*3]-110,100,220,false));\r\n }else{\r\n missionButtons.add(new Button(game,g,Assets.stars.get(0),wiresX[(i-1)*3]-50,wiresY[(i-1)*3]-110,100,220,false));\r\n }\r\n }\r\n buttons.add(new Button(game,g,0,null,\"Log Out\",(int)(w*0.03),(int)(h*0.11),(int)(w*0.14),(int)(h*0.08),Colors.ColorAlpha(Colors.darkBlues,255),\r\n Colors.ColorAlpha(Colors.darkBlues,255),Colors.ColorAlpha(Colors.yellows,190),\r\n Colors.ColorAlpha(Colors.yellows,255),Colors.ColorAlpha(Colors.whites,190),\r\n Colors.ColorAlpha(Colors.whites,255),40,15,false,true));\r\n buttons.add(new Button(game,g,0,null,\">\",(int)(w*0.79),(int)(h*0.70),(int)(w*0.10),(int)(h*0.08),Colors.ColorAlpha(Colors.darkBlues,255),\r\n Colors.ColorAlpha(Colors.darkBlues,255),Colors.ColorAlpha(Colors.yellows,190),\r\n Colors.ColorAlpha(Colors.yellows,255),Colors.ColorAlpha(Colors.whites,190),\r\n Colors.ColorAlpha(Colors.whites,255),180,15,false,true));\r\n buttons.add(new Button(game,g,0,null,\"<\",(int)(w*0.11),(int)(h*0.70),(int)(w*0.10),(int)(h*0.08),Colors.ColorAlpha(Colors.darkBlues,255),\r\n Colors.ColorAlpha(Colors.darkBlues,255),Colors.ColorAlpha(Colors.yellows,190),\r\n Colors.ColorAlpha(Colors.yellows,255),Colors.ColorAlpha(Colors.whites,190),\r\n Colors.ColorAlpha(Colors.whites,255),180,15,false,true));\r\n buttonsAdded = true;\r\n }\r\n if(reAddButtons){\r\n buttons.add(new Button(game,g,0,null,\"Log Out\",(int)(w*0.03),(int)(h*0.11),(int)(w*0.14),(int)(h*0.08),Colors.ColorAlpha(Colors.darkBlues,255),\r\n Colors.ColorAlpha(Colors.darkBlues,255),Colors.ColorAlpha(Colors.yellows,190),\r\n Colors.ColorAlpha(Colors.yellows,255),Colors.ColorAlpha(Colors.whites,190),\r\n Colors.ColorAlpha(Colors.whites,255),40,15,false,true));\r\n buttons.add(new Button(game,g,0,null,\">\",(int)(w*0.79),(int)(h*0.70),(int)(w*0.10),(int)(h*0.08),Colors.ColorAlpha(Colors.darkBlues,255),\r\n Colors.ColorAlpha(Colors.darkBlues,255),Colors.ColorAlpha(Colors.yellows,190),\r\n Colors.ColorAlpha(Colors.yellows,255),Colors.ColorAlpha(Colors.whites,190),\r\n Colors.ColorAlpha(Colors.whites,255),180,15,false,true));\r\n buttons.add(new Button(game,g,0,null,\"<\",(int)(w*0.11),(int)(h*0.70),(int)(w*0.10),(int)(h*0.08),Colors.ColorAlpha(Colors.darkBlues,255),\r\n Colors.ColorAlpha(Colors.darkBlues,255),Colors.ColorAlpha(Colors.yellows,190),\r\n Colors.ColorAlpha(Colors.yellows,255),Colors.ColorAlpha(Colors.whites,190),\r\n Colors.ColorAlpha(Colors.whites,255),180,15,false,true));\r\n goButtonAdded = false;\r\n reAddButtons = false;\r\n }\r\n drawBackground(g);\r\n if(!moving){\r\n drawMissionBox(g);\r\n missionButtons.get(currentMission-1).drawButton(g,game,screenOffsetX,screenOffsetY);\r\n g.setColor(Colors.ColorAlpha(Colors.lightReds,a1));\r\n g.setFont(game.font60);\r\n g.drawString(\"Please Select a Mission\",Display.centerString\r\n (\"Please Select a Mission\",g,game.font60,game),(int)(h*0.12));\r\n Button.drawButtons(g,game,buttons,0,0);\r\n Button.drawButtonShine(g,game);\r\n g.setColor(Colors.ColorAlpha(Colors.lightReds,a1));\r\n g.setFont(game.font50);\r\n g.drawString(\"Mission \"+currentMission+\": \"+Missions.missions[currentMission-1].Type,Display.centerString\r\n (\"Mission \"+currentMission+\": \"+Missions.missions[currentMission-1].Type,g,game.font50,game),(int)(h*0.33));\r\n g.drawString(Missions.missions[currentMission-1].toString(),Display.centerString\r\n (Missions.missions[currentMission-1].toString(),g,game.font50,game),(int)(h*0.73));\r\n }else{\r\n Button.drawButtons(g,game,missionButtons,screenOffsetX,screenOffsetY);\r\n MouseManager.mousePressed = false;\r\n KeyboardManager.keyPressed = false;\r\n a2=0;\r\n }\r\n }", "@Override\n\tpublic void render(Graphics g)\n\t{\n\t}", "public GuiButton(Gui parent, int y, String text, ColorHelper buttonColor, RenderObject textColor) {\n\t\tsuper(parent, VERTEX_COLOR);\n\t\twidth = TOTAL_PADDING + TextRender.getTextWidth(text);\n\t\theight = TOTAL_PADDING + TextRender.getTextHeight();\n\t\tthis.x = (Game.WIDTH / 2) - (width / 2);\n\t\tthis.y = y;\n\t\tthis.centered = false;\n\t\tthis.text = text;\n\t\tthis.textColor = textColor;\n\t\tthis.buttonColor = buttonColor;\n\t\tgenerateVertexData();\n\t\tgenerateColorData();\n\t}", "@Override\r\n\tpublic void render(Graphics g) {\n\t\tg.setColor(Color.yellow);\r\n\t\tg.fillRect((int) getX(), (int) getY(), 5, 10);\r\n\t}", "public void render() {\r\n\r\n }", "public void render(float delta) {\n\t\t// TODO Auto-generated method stub\n\t\tGdx.gl.glClearColor(Constants.red, Constants.blue, Constants.green, 1);\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); // Don't know why but you need this\n\t\tstage.act(); // Starts button functionality\n\t\tstage.draw(); // Draws buttons\n\t\tGdx.gl.glClearColor(Constants.red, Constants.blue, Constants.green, 1);\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\tstage.act();\n\t\tstage.draw();\n\t\tif (Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE)) {\n\t\t\tGdx.app.exit();\n\t\t}\n\n\t}", "public void render();", "public void render() {\n }", "public void render(Graphics g){\n\t\tg.setColor(Color.WHITE);\n\t\tg.drawImage(dBackground,0, 0, GameSystem.ABSWIDTH+10, GameSystem.ABSHEIGHT+10,null);\n\t\tg.setFont(new Font(\"arial\",Font.BOLD,45));\n\t\tg.setColor(Color.BLACK);\n\t\tg.drawImage(dText, GameSystem.ABSWIDTH-GameSystem.ABSWIDTH/3-110, 100,null);\n\t\tg.setFont(new Font(\"arial\",Font.ITALIC,30));\n\t\tg.drawString(\"Restart Level\",GameSystem.ABSWIDTH/2+100,300);\n\t\tg.drawString(\"Back to Menu\",GameSystem.ABSWIDTH/2+100,400);\n\t\trenderSelected(g);\n\t}", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "public void render(Graphics g) {\n\t\tGraphics2D g2 = (Graphics2D) g;\n\n\t\t/*\n\t\t * Game title and params\n\t\t */\n\t\tFont f1 = new Font(\"arial\", Font.BOLD, 50);\n\t\t// Menu button fonts\n\t\tFont f2 = new Font(\"arial\", Font.BOLD, 35);\n\t\tg.setFont(f2);\n\n\t\t/*\n\t\t * Label the buttons and place them in their rectangle\n\t\t */\n\t\tif (game.state == GAMESTATE.Menu) {\n\t\t\t\n\t\t\tg.setFont(f1);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.drawString(\"SURVIVE \", (Game.WIDTH / 2) - 125, 100);\n\n\t\t\tg.drawString(\"Play\", playButton.x + 28, playButton.y + 40);\n\t\t\tg.drawString(\"Help\", helpButton.x + 28, helpButton.y + 40);\n\t\t\tg.drawString(\"Quit\", quitButton.x + 28, quitButton.y + 40);\n\n\t\t\t// Draw the buttons to the menu\n\t\t\tg2.draw(playButton);\n\t\t\tg2.draw(helpButton);\n\t\t\tg2.draw(quitButton);\n\t\t} else if (game.state == GAMESTATE.Help) {\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(f1);\n\t\t\tg.drawString(\"Controls\" ,(Game.WIDTH / 2) - 125, 100);\n\t\t\tg.setFont(f2);\n\t\t\t\n\t\t\tg.drawString(\"W = Up\", helpRectangle.x + 30, helpRectangle.y + 45);\n\t\t\tg.drawString(\"A = Left\", helpRectangle.x + 30, helpRectangle.y + 105);\n\t\t\tg.drawString(\"S = Down\", helpRectangle.x + 30, helpRectangle.y + 165);\n\t\t\tg.drawString(\"D = Right\", helpRectangle.x + 30, helpRectangle.y + 225);\n\t\t\tg.drawString(\"Menu\", menuButton.x + 30, menuButton.y + 35);\n\n\t\t\tg2.draw(helpRectangle);\n\t\t\tg2.draw(menuButton);\n\t\t}else if(game.state == GAMESTATE.GameOver){\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(f1);\n\t\t\t\n\t\t\tg.drawString(\"GAME OVER\" ,(Game.WIDTH / 2) - 165, 120);\n\t\t\tg.setFont(f2);\t\n\t\t\t\n\t\t\tg.drawString(\"Final Level: \" + hud.getLevel(), (Game.WIDTH / 2) - 140, 220);\n\t\t\tg.drawString(\"Final Score: \" + hud.getScore(), (Game.WIDTH / 2) - 150, 320);\n\t\t\t\n\t\t\tg.drawString(\"Try Again\" ,(Game.WIDTH / 2) - 95, 443);\n\t\t\tg2.draw(tryAgain);\n\t\t}\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\n\t}", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "public void draw() \n\t {\n\t\t draw(root,0,0,1,1,true);\n\t }", "public void draw() {\n }", "public void draw(Graphics g) {\n g.setColor(color);\n g.fillRect(x, y, width, height);\n }", "public void renderGraphics(BufferStrategy b) {\n\t\tGraphics g = b.getDrawGraphics();\n\t\tg.setColor(new Color(135, 206, 235));\n\t\tg.fillRect(0, 0, frame.getWidth(), frame.getHeight());\n\t\t//g.translate(handler.getCamera().getX(), handler.getCamera().getY());\n\t\tnotifyObservers((Object)g);\n\t\tg.dispose();\n\t\tb.show();\n\t}", "@Override\n\tprotected void draw() {\n\t\tif(p != null) {\n\t\t\tp.pushStyle();\n\t\t\tp.noStroke();\n\t\t\tp.textAlign(PApplet.CENTER,PApplet.CENTER);\n\t\t\tp.textSize(12);\n\t\t\tif(this.isPressed) {\n\t\t\t\tp.fill(122, 138, 153);\n\t\t\t\tp.rect(x,y,width,height);\n\t\t\t\tp.fill(181, 206, 228);\n\t\t\t\tp.rect(x+2,y+2,width-4,height-4);\n\t\t\t\tp.fill(Color.BLACK.getRGB());\n\t\t\t\tp.text(text, x, y,width,height);\n\t\t\t}else {\n\t\t\t\tif(this.isHovered) {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+2,y+2,width-5,height-5,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}else {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+1,y+1,width-3,height-3,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.popStyle();\n\t\t}\n\t}", "public void draw() {\n\t\tGL11.glColor3f(0.5f,0.5f,1.0f);\n\t\n\t\t// draw quad\n\t\tGL11.glBegin(GL11.GL_QUADS);\n\t\t\tGL11.glVertex2f(x,y);\n\t\t\tGL11.glVertex2f(x+width,y);\n\t\t\tGL11.glVertex2f(x+width,y+height);\n\t\t\tGL11.glVertex2f(x,y+height);\n\t\tGL11.glEnd();\n\t\t\n\t\tif(text != null || !text.equals(\"\"))\n\t\t\tfont.drawString(text, x, y);\n\t\n\t}", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tgc.setFill(this.color.getColor());\n\t\tgc.fillRect(MyPoint.point[0], MyPoint.point[1], this.width, this.height);\n\t}", "public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}", "public abstract void draw(Graphics g, Color color);", "@Override\n\tpublic void render(int x, int y, float f) {\n\t\tPair<Integer, Integer> adjustedValueCoords = this.getAdjustedXYValue();\n\t\tint grayBoxX = adjustedValueCoords.getKey();\n\t\tint grayBoxY = adjustedValueCoords.getValue();\n\n\t\tthis.Tabs.x = adjustedValueCoords.getKey();\n\t\tthis.Tabs.y = adjustedValueCoords.getValue() - 21;\n\n\t\tthis.renderBackground();\n\n\t\t// Draw the control background.\n\t\tassert this.minecraft != null;\n\t\tthis.minecraft.getTextureManager().bindTexture(backgroundTextures);\n\t\tthis.blit(grayBoxX, grayBoxY, 0, 0, 256, 256);\n\n\t\tfor (Widget button : this.buttons) {\n\t\t\t// Make all buttons invisible.\n\t\t\tif (button != this.btnCancel && button != this.btnBuild) {\n\t\t\t\tbutton.visible = false;\n\t\t\t}\n\t\t}\n\n\t\tthis.btnAddTorches.visible = false;\n\t\tthis.btnAddBed.visible = false;\n\t\tthis.btnAddChest.visible = false;\n\t\tthis.btnAddChestContents.visible = false;\n\t\tthis.btnAddCraftingTable.visible = false;\n\t\tthis.btnAddFurnace.visible = false;\n\t\tthis.btnAddMineShaft.visible = false;\n\n\t\t// Update visibility on controls based on the selected tab.\n\t\tif (this.getSelectedTab() == this.tabGeneral) {\n\t\t\tthis.btnHouseStyle.visible = true;\n\t\t\tthis.btnVisualize.visible = true;\n\t\t} else if (this.getSelectedTab() == this.tabConfig) {\n\t\t\tthis.btnAddTorches.visible = this.serverConfiguration.addTorches;\n\t\t\tthis.btnAddBed.visible = this.serverConfiguration.addBed;\n\t\t\tthis.btnAddChest.visible = this.serverConfiguration.addChests;\n\t\t\tthis.btnAddChestContents.visible = this.allowItemsInChestAndFurnace && this.serverConfiguration.addChestContents;\n\t\t\tthis.btnAddCraftingTable.visible = this.serverConfiguration.addCraftingTable;\n\t\t\tthis.btnAddFurnace.visible = this.serverConfiguration.addFurnace;\n\t\t\tthis.btnAddMineShaft.visible = this.serverConfiguration.addMineshaft;\n\n\t\t} else if (this.getSelectedTab() == this.tabBlockTypes) {\n\t\t\tthis.btnGlassColor.visible = this.houseConfiguration.houseStyle != HouseStyle.SNOWY\n\t\t\t\t\t&& this.houseConfiguration.houseStyle != HouseStyle.DESERT;\n\t\t}\n\n\t\t// Draw the buttons, labels and tabs.\n\t\tsuper.render(x, y, f);\n\n\t\t// Draw the text here.\n\t\tint color = Color.DARK_GRAY.getRGB();\n\n\t\t// Draw the appropriate text based on the selected tab.\n\t\tif (this.getSelectedTab() == this.tabGeneral) {\n\t\t\tthis.minecraft.fontRenderer.drawString(GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_STYLE), grayBoxX + 10, grayBoxY + 10, color);\n\t\t\tthis.minecraft.fontRenderer.drawSplitString(this.houseConfiguration.houseStyle.getHouseNotes(), grayBoxX + 147, grayBoxY + 10, 95, color);\n\n\t\t\tthis.minecraft.getTextureManager().bindTexture(this.houseConfiguration.houseStyle.getHousePicture());\n\t\t\tGuiTabScreen.drawModalRectWithCustomSizedTexture(grayBoxX + 250, grayBoxY, 1,\n\t\t\t\t\tthis.houseConfiguration.houseStyle.getImageWidth(), this.houseConfiguration.houseStyle.getImageHeight(),\n\t\t\t\t\tthis.houseConfiguration.houseStyle.getImageWidth(), this.houseConfiguration.houseStyle.getImageHeight());\n\t\t} else if (this.getSelectedTab() == this.tabBlockTypes) {\n\t\t\tif (this.houseConfiguration.houseStyle == HouseConfiguration.HouseStyle.SNOWY\n\t\t\t\t\t|| this.houseConfiguration.houseStyle == HouseConfiguration.HouseStyle.DESERT) {\n\n\t\t\t} else {\n\t\t\t\t// Column 1:\n\t\t\t\tthis.minecraft.fontRenderer.drawString(GuiLangKeys.translateString(GuiLangKeys.GUI_STRUCTURE_GLASS), grayBoxX + 10, grayBoxY + 10, color);\n\t\t\t}\n\t\t}\n\n\t\tif (!CommonProxy.proxyConfiguration.serverConfiguration.enableStructurePreview) {\n\t\t\tthis.btnVisualize.visible = false;\n\t\t}\n\t}", "private void drawStartButton(int w,int h){\r\n g.setColor(Color.gray); \r\n g.fillRect(60,h-70,w-80,50);\r\n g.setColor(Color.black);\r\n g.drawRect(60,h-70,w-80,50); \r\n \r\n Font font=new Font(\"SanSerif\",Font.BOLD,50); \r\n g.setFont(font);\r\n g.drawString(\"Start Game\",120,h-25);\r\n }", "public abstract void draw( Graphics2D gtx );", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "public void drawMe(Graphics g){\r\n\t\t\tg.setColor(color);\r\n\t\t\tg.fillRect(x, y, sizeX, sizeY);\r\n\t\t}", "public void draw(Graphics window)\n {\n window.setColor(color);\n window.fillRect(getX(), getY(), getWidth(), getHeight());\n }", "public void button1Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n //clear any content out of the canvas\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-left to lower-right of the canvas\r\n gc.strokeLine(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-right to lower-left corner\r\n gc.strokeLine(canvas.getWidth(), 0, 0, canvas.getHeight());\r\n \r\n }", "@FXML\n public void drawXButtonPressed()\n {\n //get the GraphicsContent, which is used to draw on the canvas\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n //draw line from top corner to bottom corner\n gc.strokeLine(\n 0,\n 0,\n canvas.getWidth(),\n canvas.getHeight()\n );\n\n //draw line from bottom left corner to upper right corner\n gc.strokeLine(\n 0,\n canvas.getHeight(),\n canvas.getWidth(),\n 0\n );\n }", "@Override\n public void onPress(MouseEvent e, GraphicsContext g) {\n g.beginPath();\n g.moveTo(e.getX(), e.getY());\n g.stroke();\n }", "@Override\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\n\t}", "public void render()\r\n\t{\n\t}", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "@Override\n\tpublic void draw() {\n\t}", "public void render() {\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null) { //if the buffer strategy doesnt get created, then you create it\n\t\t\tcreateBufferStrategy(3); //the number 3 means it creates triple buffering\n\t\t\treturn;\t\t\t\t\t//, so when you backup frame gets displayed (2) it will also have a backup\t\n\t\t}\n\t\t\n\t\t//apply data to the buffer \"bs\"\n\t\t//this is creating a link to graphics to drawing graphics to the screen.\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t/**\n\t\t * You input all of your graphics inbetween the g object and g.dispose();\n\t\t */\n\t\t//###################\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\n\t\t//###################\n\t\tg.dispose(); //this dispose of all the graphics\n\t\tbs.show(); //this will make the next available buffer visible\n\t}", "public void draw(Graphics graphics);", "protected void renderGUI(Graphics2D g) {\n g.setColor(foreground);\n g.drawString(\"ESC - Exit\", 15, 430);\n }", "void drawMenuState(Graphics g) {\n\t\tnumberOfMenu++;\n\t\tg.setColor(Color.BLUE);\n\t\tg.fillRect(0, 0, QuizWhiz.WIDTH, QuizWhiz.HEIGHT);\n\t\tg.setFont(font);\n\t\tg.setColor(Color.YELLOW);\n\t\tg.drawString(\"Quiz Whiz\", 50, 100);\n\t\tg.drawString(\"Press the button to start\", 50, 200);\n\t\tg.drawString(\"Press SPACE for instructions\", 25, 300);\n\t\tbutton=new JButton();\n\t\tbutton.setText(\"Next\");\n\t\t//button.setBounds(100,700,100,25);\n\t\tbutton.addActionListener(this);\n\t\tif(numberOfMenu<=1) {\n\t\tthis.add(button);\n\t\t}\n\t\tframe.setSize(300,400);\n\t}", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.green);\r\n\t\tg.fillRect(getX(), getY(), getWidth(), getHeight());\r\n\t}", "protected void drawButtons() {\n\t\tint spaceX = 50;\n\t\tint spaceY = 500;\t\n\t\t\n\t\tint aux = 1;\n\t\tfor(int i = 65; i < 91; i++) {\n\n\t\t\tLetterButton button = new LetterButton((char) i, (25 + spaceX ) * aux, spaceY);\n\t\t\taux++;\n\t\t\tif(aux == 14) {\n\t\t\t\tspaceY += 25 + 50;\n\t\t\t\taux = 1;\n\t\t\t}\n\t\t\tthis.add(button);\n\t\t}\n\t\t\n\t}" ]
[ "0.67164004", "0.62338465", "0.6063642", "0.604121", "0.59094733", "0.5906833", "0.5897239", "0.58962554", "0.58868736", "0.5863795", "0.586362", "0.5828158", "0.5806709", "0.5784035", "0.57762355", "0.5763939", "0.57625", "0.5752352", "0.57188636", "0.5705843", "0.5705122", "0.5688731", "0.5668749", "0.56661916", "0.5664973", "0.56421673", "0.55921566", "0.55695194", "0.54952496", "0.5490481", "0.5489038", "0.548655", "0.5436193", "0.5429317", "0.54180026", "0.5408129", "0.5399109", "0.5386072", "0.53833574", "0.53750813", "0.53744763", "0.5372141", "0.53679025", "0.53542787", "0.5343435", "0.5333249", "0.5329861", "0.53254247", "0.5310163", "0.530963", "0.5308865", "0.5303853", "0.5286221", "0.5281078", "0.5264984", "0.52634853", "0.52585083", "0.5257116", "0.52358377", "0.52333903", "0.52306277", "0.52292126", "0.522653", "0.52146107", "0.5212913", "0.52075285", "0.52064806", "0.51948804", "0.51948804", "0.5187098", "0.5185353", "0.5175164", "0.51750696", "0.5174207", "0.5174185", "0.5168869", "0.51668", "0.51661503", "0.5159615", "0.5156372", "0.51556337", "0.5153743", "0.51527524", "0.51520556", "0.51520556", "0.5147822", "0.5147367", "0.5143695", "0.5126708", "0.5121687", "0.5121322", "0.51125747", "0.5112542", "0.51081604", "0.51012075", "0.50999904", "0.50972044", "0.50950253", "0.50942993", "0.5092874", "0.50906986" ]
0.0
-1
Creates an instance from the raw database value
SaldoLinks(String rawValue) { if (StringUtils.isEmpty(rawValue)) { links = Collections.emptyList(); return; } String[] rawLinks = rawValue.split(Utils.ASTERISK_SEPARATOR); links = new ArrayList<>(); for (String rawLink : rawLinks) { if (StringUtils.hasLength(rawLink)) { SaldoLink saldoLink = new SaldoLink(rawLink); if (saldoLink.hasValidLinks()) { links.add(saldoLink); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract DataType<T> newInstance(String format);", "FromValues createFromValues();", "public DBRecord(String encodedForm)\n\t{\n\t\tselected = false;\n\t\tbindings = new ChunkList<DBBinding>();\n\t\tloadFromEncodedForm(encodedForm);\n\t}", "private DatabaseType(Integer value, String displayValue, String className) {\n this.value = value;\n this.displayValue = displayValue;\n this.className = className;\n }", "FromTable createFromTable();", "public IValuable parse(String value);", "public abstract DataType<T> newInstance(String format, Locale locale);", "private Object instObj(final Value v) throws QueryException {\r\n return cls.isInstance(v) ? v : v.toJava();\r\n }", "Object convertJavaValueToDBValue(Object value, Class<?> javaType);", "public static Value createValue(Object val) {\n if (val instanceof String) {\n return new NominalValue((String) val);\n } else if (val instanceof Double) {\n return new NumericValue((Double) val);\n }\n return UnknownValue.getInstance();\n }", "private TypeDb createTypeInstance(long id, String nameEn) {\n TypeDb typeDb = new TypeDb();\n typeDb.setId(id);\n typeDb.setTypeNameEn(nameEn);\n typeDb.setTypeNameRu(new TypeMapper().toRu(nameEn));\n return typeDb;\n }", "Object convertDBValueToJavaValue(Object value, Class<?> javaType);", "@Override\r\n\tprotected Object stringToValue(String valueString) throws ParseException {\r\n\t\ttry {\r\n\t\t\treturn PersistentBean.findOrCreate(beanClass, valueString);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new ParseException(e.getMessage(), 0);\r\n\t\t}\r\n\t}", "<E extends RealmModel> E get(Class<E> class_, String string2, UncheckedRow uncheckedRow) {\n boolean bl = string2 != null;\n if (bl) {\n return (E)new DynamicRealmObject(this, CheckedRow.getFromRow(uncheckedRow));\n }\n return this.configuration.getSchemaMediator().newInstance(class_, this, uncheckedRow, this.schema.getColumnInfo(class_), false, Collections.<String>emptyList());\n }", "public Object create( DataWrapper data) {\n return LoadManager.getItem(data.getString(\"type\"),data.getName());\n }", "public abstract DataType<T> newInstance();", "public static AsonValue CreateFrom(byte data[]) throws java.io.IOException {\n if((data[0]&0x80)!=0) return new AsonParser().parse(new ByteArrayInputStream(data));\n return new JsonParser().parse(new String(data,\"UTF-8\"));\n }", "public Literal createLiteral(byte b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "public Object convert(Object fromValue) {\n RawObject oldDataRawObject = (RawObject) fromValue;\n Object[] oldElements = oldDataRawObject.getElements();\n Map<String, Object> integerClassValues = \n new HashMap<String, Object>();\n integerClassValues.put(\"data\", oldElements[0]);\n RawObject integerClassObject = \n new RawObject(integerClassType, integerClassValues, null);\n RawObject[] newElements = new RawObject[1];\n newElements[0] = integerClassObject;\n RawObject newDataRawObject = \n new RawObject(newDataType, newElements);\n return newDataRawObject;\n }", "@NotNull\n @Contract(\"!null -> new\")\n static CellValue newInstance(@Nullable Object originalValue) {\n if (originalValue == null) {\n return NULL;\n } else {\n return new CellValue(originalValue);\n }\n }", "private synchronized DataSource fromBytes(byte[] bytes) {\n Kryo kryo = new Kryo();\n Input input = new Input(new ByteArrayInputStream(bytes));\n DataSource curDataSource = (DataSource) kryo.readClassAndObject(input);\n input.close();\n return curDataSource;\n }", "private static final Object getFieldValue(Field field, String value) {\r\n if (String.class == field.getType()) {\r\n // for fields of type String return value as-is\r\n return value;\r\n } else {\r\n // in all other cases try to construct an object using it's class single-arg constructor\r\n return newObjectFromString(field.getType(), value);\r\n }\r\n }", "@Override\n public T toObject(Value value)\n throws SchemaNotAllowedException, IllegalArgumentException {\n\n final RawRecord raw = rawBinding.toObject(value);\n final Schema writerSchema = raw.getSchema();\n final Schema readerSchema;\n if (allowedSchemas != null) {\n /* May throw SchemaNotAllowedException. */\n readerSchema = AvroCatalogImpl.checkToObjectSchema(writerSchema,\n allowedSchemas);\n } else {\n final SpecificData specificData = SpecificData.get();\n final Class<?> cls = specificData.getClass(writerSchema);\n readerSchema = specificData.getSchema(cls);\n }\n\n final SpecificDatumReader<T> reader =\n new SpecificDatumReader<T>(writerSchema, readerSchema);\n final Decoder decoder =\n DecoderFactory.get().binaryDecoder(raw.getRawData(), null);\n\n try {\n return reader.read(null, decoder);\n } catch (Exception e) {\n throw new IllegalArgumentException\n (\"Unable to deserialize SpecificRecord\", e);\n }\n }", "public T parse(String value);", "public IMessageFieldValue createFromString( String text) throws Exception;", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T loadAs(InputStream stream) throws SlickException {\n\t\tT object = null;\n\t\tObjectInputStream inStream;\n\t\ttry {\n\t\t\tinStream = new ObjectInputStream(stream);\n\t\t\tobject = (T) inStream.readObject();\n\t\t\tinStream.close();\n\t\t\treturn object;\n\t\t} catch (Exception ex) {\n\t\t\tthrow new SlickException(ex.getMessage(), ex.getCause());\n\t\t}\n\t}", "public static AsonValue CreateFrom(InputStream inputStream) throws java.io.IOException {\n class MIS extends InputStream {\n InputStream is;\n int firstByte;\n boolean firstRead = true;\n MIS(InputStream is) throws java.io.IOException { this.is = is; firstByte=is.read(); }\n @Override\n public int read() throws IOException { if(firstRead){firstRead=false;return firstByte;} return is.read(); }\n public byte getFirstByte() { return (byte)(firstByte&0xFF); }\n }\n MIS is = new MIS(inputStream);\n if((is.getFirstByte()&0x80)!=0) return new AsonParser().parse(is);\n return new JsonParser().parse(is);\n }", "public T first(String attr, Object value) throws SQLException {\n\t\t\n\t\tPreparedStatement stmt = statement(\"`\"+ attr + \"` = ? \",\"1\");\n\t\tstmt.setObject(1, value);\n\t\tResultSet rs = stmt.executeQuery();\n\t\tResultSetMetaData meta = rs.getMetaData();\n\t\tif(rs.first()) {\n\t\t\tT obj = null;\n\t\t\ttry {\n\t\t\t\tobj = cls().newInstance();\n\t\t\t\tobj.set_from_db(meta, rs);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn obj;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public Item createFromParcel(Parcel source) {\n Item item = new Item();\n item.name = source.readString(); \n item.description = source.readString(); \n item.type = source.readString(); \n item.value = source.readString(); \n return item; \n }", "protected abstract DBObject parse(InputStream is) throws DeserializationException;", "Values createValues();", "DataType createDataType();", "public Value(){}", "public Value(String s) {\n string = s;\n itemClass = String.class;\n type = DataType.STRING;\n }", "private Item fromResultSet(ResultSet resultSet) throws SQLException {\n String name = resultSet.getString(\"Name\");\n String description = resultSet.getString(\"Description\");\n int dollars = resultSet.getInt(\"PriceDollars\");\n int cents = resultSet.getInt(\"PriceCents\");\n Item i = new Item(name, description, dollars, cents);\n\t dao.setId(i, resultSet.getInt(\"id\"));\n\t return i;\n }", "protected static Value getValue(Object obj)\n {\n Value v = new Value();\n\n switch(getDataTypeFromObject(obj))\n {\n case Boolean:\n return v.setBoolean((Boolean) obj);\n case Integer:\n return v.setInteger((java.lang.Integer) obj);\n case Long:\n return v.setLong((java.lang.Long) obj);\n case Double:\n return v.setDouble((java.lang.Double) obj);\n default:\n return v.setString((java.lang.String) obj);\n }\n }", "public DBInstance(DBInstance source) {\n if (source.InstanceId != null) {\n this.InstanceId = new String(source.InstanceId);\n }\n if (source.InstanceName != null) {\n this.InstanceName = new String(source.InstanceName);\n }\n if (source.AppId != null) {\n this.AppId = new Long(source.AppId);\n }\n if (source.ProjectId != null) {\n this.ProjectId = new Long(source.ProjectId);\n }\n if (source.Region != null) {\n this.Region = new String(source.Region);\n }\n if (source.Zone != null) {\n this.Zone = new String(source.Zone);\n }\n if (source.VpcId != null) {\n this.VpcId = new Long(source.VpcId);\n }\n if (source.SubnetId != null) {\n this.SubnetId = new Long(source.SubnetId);\n }\n if (source.Status != null) {\n this.Status = new Long(source.Status);\n }\n if (source.Vip != null) {\n this.Vip = new String(source.Vip);\n }\n if (source.Vport != null) {\n this.Vport = new Long(source.Vport);\n }\n if (source.WanDomain != null) {\n this.WanDomain = new String(source.WanDomain);\n }\n if (source.WanVip != null) {\n this.WanVip = new String(source.WanVip);\n }\n if (source.WanPort != null) {\n this.WanPort = new Long(source.WanPort);\n }\n if (source.CreateTime != null) {\n this.CreateTime = new String(source.CreateTime);\n }\n if (source.UpdateTime != null) {\n this.UpdateTime = new String(source.UpdateTime);\n }\n if (source.AutoRenewFlag != null) {\n this.AutoRenewFlag = new Long(source.AutoRenewFlag);\n }\n if (source.PeriodEndTime != null) {\n this.PeriodEndTime = new String(source.PeriodEndTime);\n }\n if (source.Uin != null) {\n this.Uin = new String(source.Uin);\n }\n if (source.TdsqlVersion != null) {\n this.TdsqlVersion = new String(source.TdsqlVersion);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Storage != null) {\n this.Storage = new Long(source.Storage);\n }\n if (source.UniqueVpcId != null) {\n this.UniqueVpcId = new String(source.UniqueVpcId);\n }\n if (source.UniqueSubnetId != null) {\n this.UniqueSubnetId = new String(source.UniqueSubnetId);\n }\n if (source.OriginSerialId != null) {\n this.OriginSerialId = new String(source.OriginSerialId);\n }\n if (source.NodeCount != null) {\n this.NodeCount = new Long(source.NodeCount);\n }\n if (source.IsTmp != null) {\n this.IsTmp = new Long(source.IsTmp);\n }\n if (source.ExclusterId != null) {\n this.ExclusterId = new String(source.ExclusterId);\n }\n if (source.Id != null) {\n this.Id = new Long(source.Id);\n }\n if (source.Pid != null) {\n this.Pid = new Long(source.Pid);\n }\n if (source.Qps != null) {\n this.Qps = new Long(source.Qps);\n }\n if (source.Paymode != null) {\n this.Paymode = new String(source.Paymode);\n }\n if (source.Locker != null) {\n this.Locker = new Long(source.Locker);\n }\n if (source.StatusDesc != null) {\n this.StatusDesc = new String(source.StatusDesc);\n }\n if (source.WanStatus != null) {\n this.WanStatus = new Long(source.WanStatus);\n }\n if (source.IsAuditSupported != null) {\n this.IsAuditSupported = new Long(source.IsAuditSupported);\n }\n if (source.Machine != null) {\n this.Machine = new String(source.Machine);\n }\n if (source.IsEncryptSupported != null) {\n this.IsEncryptSupported = new Long(source.IsEncryptSupported);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Ipv6Flag != null) {\n this.Ipv6Flag = new Long(source.Ipv6Flag);\n }\n if (source.Vipv6 != null) {\n this.Vipv6 = new String(source.Vipv6);\n }\n if (source.WanVipv6 != null) {\n this.WanVipv6 = new String(source.WanVipv6);\n }\n if (source.WanPortIpv6 != null) {\n this.WanPortIpv6 = new Long(source.WanPortIpv6);\n }\n if (source.WanStatusIpv6 != null) {\n this.WanStatusIpv6 = new Long(source.WanStatusIpv6);\n }\n if (source.DbEngine != null) {\n this.DbEngine = new String(source.DbEngine);\n }\n if (source.DbVersion != null) {\n this.DbVersion = new String(source.DbVersion);\n }\n if (source.DcnFlag != null) {\n this.DcnFlag = new Long(source.DcnFlag);\n }\n if (source.DcnStatus != null) {\n this.DcnStatus = new Long(source.DcnStatus);\n }\n if (source.DcnDstNum != null) {\n this.DcnDstNum = new Long(source.DcnDstNum);\n }\n if (source.InstanceType != null) {\n this.InstanceType = new Long(source.InstanceType);\n }\n if (source.ResourceTags != null) {\n this.ResourceTags = new ResourceTag[source.ResourceTags.length];\n for (int i = 0; i < source.ResourceTags.length; i++) {\n this.ResourceTags[i] = new ResourceTag(source.ResourceTags[i]);\n }\n }\n if (source.DbVersionId != null) {\n this.DbVersionId = new String(source.DbVersionId);\n }\n }", "public T create(T object) throws SQLException;", "public DbRecord()\n {\n m_UserName = \"\";\n // Generate user's unique identifier\n m_Key = new byte[16];\n java.util.UUID guid = java.util.UUID.randomUUID();\n long itemHigh = guid.getMostSignificantBits();\n long itemLow = guid.getLeastSignificantBits();\n for( int i = 7; i >= 0; i-- )\n {\n m_Key[i] = (byte)(itemHigh & 0xFF);\n itemHigh >>>= 8;\n m_Key[8+i] = (byte)(itemLow & 0xFF);\n itemLow >>>= 8;\n }\n m_Template = null;\n }", "public static Query of(String rawQuery) {\n return new Query(rawQuery);\n }", "T deserializeData(R r) throws SQLException;", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "CsticValueModel createInstanceOfCsticValueModel(int valueType);", "@Override\n public T apply(Row row, RowMetadata metadata) {\n Collection<String> columnNames = metadata.getColumnNames();\n\n if (columnNames.size() == 1) {\n Class<?> javaType = metadata.getColumnMetadata(0).getJavaType();\n assert javaType != null;\n if (javaType.equals(clazz)) {\n return clazz.cast(row.get(0));\n }\n }\n\n T instance;\n\n try {\n instance = clazz.getDeclaredConstructor().newInstance();\n } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {\n throw new R2dbcException(String.format(\"%s: field to create instance.\", className), e);\n }\n\n for (String columnName : columnNames) {\n Object value = row.get(columnName);\n\n Field field = allColumns.get(columnName);\n\n if (field != null) {\n // 1. setFieldValue: @Column exists, set value to associated field.\n Utils.setFieldValue(instance, field, value);\n } else {\n // 2. setFieldValue: @Column not exists, set value to ColumnName corresponding field.\n\n // FieldName <= ColumnName\n String fieldName = Utils.toCamelCase(columnName, false);\n\n // Field <= FieldName\n field = allFields.get(fieldName);\n\n if (field == null) {\n throw new R2dbcException(String.format(\"%s: field [%s] not found. (column %s)\", className, fieldName, columnName));\n }\n\n // sets value to field.\n Utils.setFieldValue(instance, field, value);\n }\n }\n\n return instance;\n }", "public abstract Object parseRecord(String input);", "private DAPMessage constructFrom(DatabaseTableRecord record) {\n return DAPMessage.fromXML(record.getStringValue(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_DATA_COLUMN_NAME));\n }", "private Object convertDBToField(Object value, Field field) {\n if(value == null)\n return null;\n \n Class<?> clazz = field.getType();\n \n if(Enum.class.isAssignableFrom(clazz))\n return Enum.valueOf((Class<Enum>)clazz, value.toString());\n \n if(Base.class.isAssignableFrom(clazz))\n return createInstance((Class<? extends Base>)clazz, (DBObject) value);\n \n if(value instanceof BasicDBList) {\n BasicDBList list = (BasicDBList)value;\n\n if(Collection.class.isAssignableFrom(clazz))\n return convertDBToCollectionField(list, field);\n \n if(clazz.isArray())\n return convertDBToArrayField(list, clazz);\n \n return value;\n }\n \n if(value instanceof BasicDBObject) {\n BasicDBObject map = (BasicDBObject)value;\n\n if(Map.class.isAssignableFrom(clazz))\n return convertDBToMapField(map, field);\n \n return value; \n }\n \n return clazz.isPrimitive() ? convertPrimitiveType(value, clazz) : value;\n }", "@Override\n public ClientStatisticsRecord newRecord(\n String clientKey,\n String type,\n Object value) throws WrongFormatException {\n ClientStatisticsRecord record = factory.createRecord(type, value);\n record.setClientKey(clientKey);\n record = recordRepository.save(record);\n eventPublisher.publishEvent(new RecordUpdateEvent(record)); //Notify other components\n return record;\n }", "public static VariableValue createValueObject(String value) {\n\t\tif (value == null)\n\t\t\treturn null;\n\t\treturn new StringValue(value);\n\t}", "protected final Object fromStringImpl(String string)\n throws TypeValueException {\n int y, m, d;\n try {\n y = Integer.parseInt(string.substring(0, 4));\n m = Integer.parseInt(string.substring(4, 6));\n d = Integer.parseInt(string.substring(6, 8));\n } catch (NumberFormatException nfe) {\n\n // Should never happen, since isValidValueImpl(String) will have been\n // called\n throw new TypeValueException(this, string);\n }\n\n // Check that the values are in the correct range\n return new Value(y, m, d);\n }", "protected static Question convertToInstance(ResultSet resultSet) throws ApplicationException {\n Question entity = null;\n\n try {\n if (resultSet.next()) {\n entity = new Question();\n entity.setId(resultSet.getInt(COL_QUESTION_ID));\n entity.setQuestionText(resultSet.getString(COL_QUESTION_TEXT));\n entity.setTimestamp(resultSet.getTimestamp(COL_QUESTION_TIMESTAMP));\n entity.setSkipped(resultSet.getInt(COL_SKIPPED));\n entity.setDifficultyRating(resultSet.getFloat(COL_DIFFICULTY_RATING));\n entity.setReported(resultSet.getInt(COL_REPORTED));\n entity.setUserId(resultSet.getInt(COL_USER_ID));\n entity.setHas_follow_up_question(resultSet.getBoolean(COL_HAS_FOLLOW_UP));\n entity.setPrevious_question_id(resultSet.getInt(COL_PREVIOUS_ID));\n entity.setRatingCounter(resultSet.getInt(COL_RATING_COUNTER));\n return entity;\n }\n } catch (SQLException e) {\n throw new ApplicationException(\"Failed to convert resultSet to entity.\", e);\n }\n\n return entity;\n }", "Factory selectByPrimaryKey(Long id);", "@JsonCreator\n public static DataType fromString(String name) {\n return fromString(name, DataType.class);\n }", "public Object fromOpenValue(Object value) throws InvalidObjectException {\n if (value == null) {\n return null;\n } else {\n return fromNonNullOpenValue(value);\n }\n }", "public Value() {}", "@FromString\n public DataField of(final String name) {\n try {\n return instance(name);\n } catch (final IllegalArgumentException e) {\n ArgumentChecker.notNull(name, \"name\");\n final DataField dataField = DataField.parse(name);\n return addInstance(dataField);\n }\n }", "@Override\n\tpublic Pfp bind(String key, String value) {\n\t\tPfp pfp = new Pfp();\n\t\tpfp.id = Pfp.getIdFromSlug(value);\n\t\treturn pfp;\n\t}", "private final Field makeField(String data) {\n Field result = null;\n\n if (termVector == null) {\n result = new Field(label, data, store, index);\n }\n else {\n result = new Field(label, data, store, index, termVector);\n }\n\n return result;\n }", "private Variable stringToVariable(String value, int smiSyntax) {\n Variable var = AbstractVariable.createFromSyntax(smiSyntax);\n try {\n if (var instanceof AssignableFromString) {\n ((AssignableFromString) var).setValue(value);\n } else if (var instanceof AssignableFromInteger) {\n ((AssignableFromInteger) var).setValue(Integer.valueOf(value));\n } else if (var instanceof AssignableFromLong) {\n ((AssignableFromLong) var).setValue(Long.valueOf(value));\n } else {\n this.getLogger().error(\"Unsupported conversion of [\" + value +\"] to \" + var.getSyntaxString());\n var = null;\n }\n } catch (IllegalArgumentException e) {\n this.getLogger().error(\"Unsupported conversion of [\" + value +\"] to \" + var.getSyntaxString(), e);\n var = null;\n }\n return var;\n }", "public DatabaseObjectInterface databaseObjectFactory(byte[] serial) throws Exception{\n if(serial[0] == \"3\".getBytes(\"UTF-8\")[0]){\n return userSerializer.deserialize(serial);\n }else if(serial[0] == \"1\".getBytes(\"UTF-8\")[0]){\n return transactionSerializer.deserialize(serial);\n }else if(serial[0] == \"2\".getBytes(\"UTF-8\")[0]){\n return null;\n }else if(serial[0] == \"4\".getBytes(\"UTF-8\")[0]){\n return databaseResultSerializer.deserialize(serial);\n }else {\n throw new Exception(\"Invalid ObjectFactory header\");\n }\n }", "RowValue createRowValue();", "public Record(String line)\t// create a record from a line\n\t{\n\t\tint i;\n\t\trecordMap = new HashMap<>(); \n\t\tStringTokenizer st = new StringTokenizer(line, DELIMITER);\n\n\t\tfor (i=0; i < NUMBER_OF_FIELDS; i++)\n\t\t{\n\t\t\trecordMap.put(i, new Field(FIELD_TYPES[i], FIELD_LABELS[i], st.nextToken()));\n\t\t}\t\t\n\t}", "public final QScanResultEntity createFromParcel(Parcel parcel) {\n QScanResultEntity qScanResultEntity = new QScanResultEntity();\n qScanResultEntity.packageName = parcel.readString();\n qScanResultEntity.softName = parcel.readString();\n qScanResultEntity.version = parcel.readString();\n qScanResultEntity.versionCode = parcel.readInt();\n qScanResultEntity.path = parcel.readString();\n qScanResultEntity.apkType = parcel.readInt();\n qScanResultEntity.certMd5 = parcel.readString();\n qScanResultEntity.size = parcel.readInt();\n qScanResultEntity.type = parcel.readInt();\n qScanResultEntity.advice = parcel.readInt();\n qScanResultEntity.malwareid = parcel.readInt();\n qScanResultEntity.name = parcel.readString();\n qScanResultEntity.label = parcel.readString();\n qScanResultEntity.discription = parcel.readString();\n qScanResultEntity.url = parcel.readString();\n return qScanResultEntity;\n }", "public DBObject createNew() {\n DBObjectImpl obj = (DBObjectImpl) getNewObject();\n obj.DELETE_STMT_STR = DELETE_STMT_STR;\n obj.INSERT_STMT_STR = INSERT_STMT_STR;\n obj.UPDATE_STMT_STR = UPDATE_STMT_STR;\n obj.QUERY_STMT_STR = QUERY_STMT_STR;\n\n return obj;\n }", "public AnimeTV createAnimeTV(AnimeTV animeTV) throws DbException {\n Connection conn = null;\n try {\n conn = DbConnFactory.factory(dataSourceName);\n return animeTVAccessor.insert(animeTV, conn);\n } finally {\n DataBaseUtil.closeConnection(conn);\n }\n }", "protected static Object getObjectFromValue(Value value)\n {\n switch (value.getDataType())\n {\n case Boolean:\n return value.getBoolean();\n case Integer:\n return value.getInteger();\n case Long:\n return value.getLong();\n case Double:\n return value.getDouble();\n default:\n return value.getString();\n }\n }", "protected DataField(final String value, final Charset charset)\n\t\tthrows UnsupportedEncodingException {\n\t\t\n\t\tsuper();\n\t\t\n\t\tDataDecoder decoder;\n\t\tString[] v;\n\t\tString vv;\n\t\tboolean subFields = false;\n\t\t\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException(\"Argument value is null.\");\n\t\t}\n\t\tdecoder = DataDecoder.getInstance();\n\t\tthis.value = decoder.decode(value);\n\t\tif (value.indexOf('\\'') >= 0) {\n\t\t\tv = value.split(\"\\\\'\", -1);\n\t\t\tfor (int index = 0; index < v.length; index++) {\n\t\t\t\tvv = v[index];\n\t\t\t\tthis.values.addElement(decoder.decode(vv));\n\t\t\t\tif (!subFields && (vv.indexOf(',') >= 0)) {\n\t\t\t\t\tsubFields = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (subFields) {\n\t\t\t\tfor (int index = 0; index < v.length; index++) {\n\t\t\t\t\tvv = v[index];\n\t\t\t\t\tthis.dataFields.addElement(new DataField(vv, charset));\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (value.indexOf(',') >= 0) {\n\t\t\tv = value.split(\",\", -1);\n\t\t\tfor (int index = 0; index < v.length; index++) {\n\t\t\t\tthis.values.addElement(decoder.decode(v[index]));\n\t\t\t}\n\t\t} else {\n\t\t\tthis.values.add(this.value);\n\t\t}\n\t}", "public gDBR createRecord(Element record)\n throws DBException \n {\n\n /* load field values from XML Element */\n Map<String,String> valMap = new HashMap<String,String>();\n NodeList fieldNodes = XMLTools.getChildElements(record,TAG_Field);\n for (int f = 0; f < fieldNodes.getLength(); f++) {\n Element field = (Element)fieldNodes.item(f);\n String name = XMLTools.getAttribute(field, ATTR_name, null, false);\n if (!StringTools.isBlank(name)) {\n String val = XMLTools.getNodeText(field, \"\\\\n\", false, \"\");\n valMap.put(name, val);\n } else {\n throw new DBException(\"Field does not specify a 'name'\");\n }\n }\n\n /* return DBRecord */\n return this.createRecord(valMap);\n\n }", "private Vehicle createVehicle(/*ResultSet rs*/) {\n // creates a vehicle using the specific form data\n //Form would get every field\n //This is dummy data\n Vehicle vehicle = new Vehicle();\n// try {\n int id = 1;\n String marca = \"marca\";\n String modelo = \"modelo\";\n double cilindrada = 2.0;\n int cavalos = 120;\n double preco = 1000.0;\n int quilometros = 200000;\n java.sql.Date date = new Date(1996-10-21);\n String combustivel = \"combustivel\";\n// //ADICIONAR\n vehicle.setId(id);\n vehicle.setMarca(marca);\n vehicle.setModelo(modelo);\n vehicle.setCilindrada(cilindrada);\n vehicle.setCavalos(cavalos);\n vehicle.setPreco(preco);\n vehicle.setDate(date);\n vehicle.setQuilometros(quilometros);\n vehicle.setCombustivel(Combustiveis.valueOf(combustivel));\n\n// } catch (SQLException e) {\n// e.printStackTrace();\n// }\n return vehicle;\n }", "public Object makeValue(String source) throws Exception\n {\n if (isNil)\n return null;\n if (fromStringMethod == null) {\n try {\n fromStringMethod = MethodCache.getInstance().getMethod(javaType, \"fromString\", STRING_CLASS);\n } catch (Exception e) {\n throw new IntrospectionException(e.toString());\n }\n }\n return fromStringMethod.invoke(null,new Object [] { source });\n }", "private Track cursorToObject(Cursor cursor) {\n \tTrack track = new Track();\n \n /* Set atribut pada objek barang dengan data kursor yang diambil dari database*/\n \ttrack.setId(cursor.getLong(0));\n \ttrack.setConnection_id(cursor.getLong(1));\n \ttrack.setAngkot_id(cursor.getLong(2));\n \ttrack.setPath(cursor.getString(3));\n \n //kembalikan sebagai objek\n return track;\n }", "protected void fromDBObject(DBObject data) {\n /* Get all public fields of the class */\n Field[] fields = this.getClass().getFields();\n for(Field field : fields) {\n String name = field.getName();\n \n if(data.containsField(name)) {\n if(Modifier.isFinal(field.getModifiers()))\n field.setAccessible(true);\n\n Object value = data.get(name);\n \n try {\n field.set(this, convertDBToField(value, field));\n } catch (IllegalAccessException | IllegalArgumentException ex) {\n throw new MongomanException(ex);\n }\n }\n }\n \n _id = (ObjectId) data.get(\"_id\");\n loaded = data;\n }", "public BabbleValue() {}", "public static <T> T createObjectInstance(String content, Class<T> valueType) {\n\t\t ObjectMapper objectMapper = new ObjectMapper();\n\t\t try {\n\t\t\treturn objectMapper.readValue(content, valueType);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t }", "public DatabaseEntry(K key, V value) {\n\t\tthis.key = key;\n\t\tthis.value = value;\n\t}", "@Override\n\tpublic Object parseValue(String value) throws IllegalArgumentException\n\t{\n\t\treturn derivedColumn.parseValue(value);\n\t}", "private Object createObjectFromAttValue(final AttImpl item) {\n \n \t\tif (item.getType().equals(STRING_TYPE)) {\n \t\t\treturn item.getValue();\n \t\t} else if (item.getType().equals(INT_TYPE)) {\n \t\t\treturn new Integer(item.getValue());\n \t\t} else if (item.getType().equals(FLOAT_TYPE)) {\n \t\t\treturn new Double(item.getValue());\n \t\t} else if (item.getType().equals(BOOLEAN_TYPE)) {\n \t\t\treturn new Boolean(item.getValue());\n \t\t}\n \n \t\t// outta here\n \t\treturn null;\n \t}", "FromValuesColumns createFromValuesColumns();", "protected abstract T createEntityFromResult (final ResultSet result) throws SQLException;", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "ObjectValue createObjectValue();", "public Scholl get(String field, String value) {\n String sql = \"SELECT * FROM \" + Value.TABLE_SCHOLLS + \" WHERE \" + field + \" = '\" + value + \"'\";\n\n Cursor c = db.rawQuery(sql, null);\n\n if (c != null)\n c.moveToFirst();\n\n Scholl scholl = new Scholl();\n scholl.setUid((c.getString(c.getColumnIndex(Value.COLUMN_UID))));\n scholl.setNode(c.getString(c.getColumnIndex(Value.COLUMN_NODE)));\n scholl.setCaption(c.getString(c.getColumnIndex(Value.COLUMN_CAPTION)));\n scholl.setImage(c.getString(c.getColumnIndex(Value.COLUMN_IMAGE)));\n scholl.setCreated(c.getString(c.getColumnIndex(Value.COLUMN_CREATED)));\n scholl.setStatus(c.getString(c.getColumnIndex(Value.COLUMN_STATUS)));\n scholl.setRead(c.getString(c.getColumnIndex(Value.COLUMN_READ)));\n\n c.close();\n\n return scholl;\n }", "public DataValue parse(String value) {\r\n \tthrow new RuntimeException(\"no implementation\");\r\n }", "private static Object valueFromBytes(ByteBuffer bytes) throws JSONException{\n\t\tbyte type = bytes.get();\n\t\t//System.out.println(\"From value: \" + new Integer(type).toString());\n\t\tswitch(type){\n\t\tcase MAP_INDICATOR:\n\t\t\t//System.out.println(\"MAP!\");\n\t\t\treturn mapFromBytes(bytes);\n\t\tcase ARRAY_INDICATOR:\n\t\t\treturn arrayFromBytes(bytes);\n\t\tcase STRING_INDICATOR:\n\t\t\t//System.out.println(\"STRING!\");\n\t\t\tint length = bytes.getInt();\n\t\t\tbyte[] stringBytes = new byte[length];\n\t\t\tbytes.get(stringBytes, 0, length);\n\t\t\treturn new String(stringBytes);\n\t\tcase INTEGER_INDICATOR:\n\t\t\treturn bytes.getInt();\n\t\tcase LONG_INDICATOR:\n\t\t\treturn bytes.getLong();\n\t\tcase DOUBLE_INDICATOR:\n\t\t\treturn bytes.getDouble();\n\t\tcase FLOAT_INDICATOR:\n\t\t\treturn bytes.getFloat();\n\t\tcase BOOLEAN_INDICATOR:\n\t\t\treturn bytes.get() == 1 ? 1: 0;\n\t\tdefault:\n\t\t\tthrow new JSONException(\"Tried to decode unknown type from byte array!\");\n\t\t}\n\t\t\n\t\t\t\n\t\t\t\n\t}", "private <T extends BaseRecord> T createRecord(\n String data, Stat stat, Class<T> clazz) throws IOException {\n T record = newRecord(data, clazz, false);\n record.setDateCreated(stat.getCtime());\n record.setDateModified(stat.getMtime());\n return record;\n }", "public void testValueUpdateWithCreator() throws Exception\n {\n Bean bean = new Bean(\"abc\", \"def\");\n MAPPER.readerFor(Bean.class).withValueToUpdate(bean).readValue(\"{\\\"a\\\":\\\"ghi\\\",\\\"b\\\":\\\"jkl\\\"}\");\n assertEquals(\"ghi\", bean.getA());\n assertEquals(\"jkl\", bean.getB());\n }", "private Behaeltnis getObject(String data) {\r\n\t\tint firstSemi = data.indexOf(\"\" + ';');\r\n\t\tint secondSemi = data.indexOf(\"\" + ';', firstSemi + 1);\r\n\t\tString brand = data.substring(firstSemi + 1, secondSemi);\r\n\t\tdouble vol = Double.parseDouble(\r\n\t\t\t\tdata.substring(secondSemi + 1, data.indexOf(\"\" + ';', secondSemi + 1)).replaceAll(\",\", \".\"));\r\n\t\tif (data.toLowerCase().contains(\"plastik\")) {\r\n\t\t\treturn new Plastik(brand, vol);\r\n\t\t} else if (data.toLowerCase().contains(\"glas\")) {\r\n\t\t\tif (data.contains(\"0,08\")) {\r\n\t\t\t\treturn new Glas(false, brand, vol);\r\n\t\t\t} else {\r\n\t\t\t\treturn new Glas(true, brand, vol);\r\n\t\t\t}\r\n\t\t} else if (data.toLowerCase().contains(\"dose\")) {\r\n\t\t\treturn new Dose(brand, vol);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static ValueMember read(InputStream paramInputStream) {\n/* 138 */ ValueMember valueMember = new ValueMember();\n/* 139 */ valueMember.name = paramInputStream.read_string();\n/* 140 */ valueMember.id = paramInputStream.read_string();\n/* 141 */ valueMember.defined_in = paramInputStream.read_string();\n/* 142 */ valueMember.version = paramInputStream.read_string();\n/* 143 */ valueMember.type = paramInputStream.read_TypeCode();\n/* 144 */ valueMember.type_def = IDLTypeHelper.read(paramInputStream);\n/* 145 */ valueMember.access = paramInputStream.read_short();\n/* 146 */ return valueMember;\n/* */ }", "private T convert(String value)\n {\n if (value == null)\n {\n return null;\n }\n\n Object result = null;\n\n if (this.converter != null)\n {\n try\n {\n result = converter.convert(value);\n }\n catch (Exception e)\n {\n throw ExceptionUtils.throwAsRuntimeException(e);\n }\n }\n else if (String.class.equals(configEntryType))\n {\n result = value;\n }\n else if (Class.class.equals(configEntryType))\n {\n result = ClassUtils.tryToLoadClassForName(value);\n }\n else if (Boolean.class.equals(configEntryType))\n {\n Boolean isTrue = \"TRUE\".equalsIgnoreCase(value);\n isTrue |= \"1\".equalsIgnoreCase(value);\n isTrue |= \"YES\".equalsIgnoreCase(value);\n isTrue |= \"Y\".equalsIgnoreCase(value);\n isTrue |= \"JA\".equalsIgnoreCase(value);\n isTrue |= \"J\".equalsIgnoreCase(value);\n isTrue |= \"OUI\".equalsIgnoreCase(value);\n\n result = isTrue;\n }\n else if (Integer.class.equals(configEntryType))\n {\n result = Integer.parseInt(value);\n }\n else if (Long.class.equals(configEntryType))\n {\n result = Long.parseLong(value);\n }\n else if (Float.class.equals(configEntryType))\n {\n result = Float.parseFloat(value);\n }\n else if (Double.class.equals(configEntryType))\n {\n result = Double.parseDouble(value);\n }\n\n return (T) result;\n }", "@Override\r\n protected CassandraEmbDatabase createDatabaseInternal(final String theDB) {\r\n return new CassandraEmbDatabase(this, theDB);\r\n }", "private User createUserFromResults(ResultSet results) throws SQLException {\n User user = new User();\n user.setLastName(results.getString(\"last_name\"));\n user.setFirstName(results.getString(\"first_name\"));\n user.setUserid(results.getString(\"id\"));\n user.setDateOfBirth(results.getDate(\"date_of_birth\"));\n // TODO map the remaining fields\n return user;\n }", "protected Object parseValue (String value)\n throws Exception\n {\n return value;\n }", "public static FieldType create(Cursor cursor) {\n\t\tint idColon = cursor.getColumnIndex(ID);\n\t\tint nameColon = cursor.getColumnIndex(NAME);\n\t\tint createDateColumn = cursor.getColumnIndex(CREATE_DATE);\n\t\tint modifyDateColumn = cursor.getColumnIndex(MODIFY_DATE);\n\t\tFieldType field = new FieldType();\n\n\t\tif ((idColon > -1) && (cursor.getColumnCount() > idColon)) {\n\t\t\tfield.setId((cursor.getLong(idColon)));\n\t\t}\n\n\t\tif ((nameColon > -1) && (cursor.getColumnCount() > nameColon)) {\n\t\t\tfield.setName(cursor.getString(nameColon));\n\t\t}\n\t\tif ((createDateColumn > -1)\n\t\t\t\t&& (cursor.getColumnCount() > createDateColumn)) {\n\t\t\tfield.setCreateDate(cursor.getLong(createDateColumn));\n\t\t}\n\t\tif ((modifyDateColumn > -1)\n\t\t\t\t&& (cursor.getColumnCount() > modifyDateColumn)) {\n\t\t\tfield.setModifyDate(cursor.getLong(modifyDateColumn));\n\t\t}\n\t\tif (cursor.isLast()) {\n\t\t\tcursor.close();\n\t\t}\n\t\treturn field;\n\t}", "private LDBRecord createRecord(DataHSpecification spec,Hashtable fieldValues)\n\t\tthrows LRException\n\t{\n\t\tclearStatus();\n\t\tif (fieldValues==null) fieldValues=new Hashtable();\n\t\t// Create a new empty record\n\t\tLDBRecord record=new LDBRecord(background.getClient(),spec.getTableName());\n\t\t// Get the fields of the specification\n\t\t// and fill the record from the values passed in.\n\t\t// If a field is not identified create one with a default value.\n\t\tHashtable fields=spec.getFields();\n\t\tEnumeration en=fields.keys();\n\t\twhile (en.hasMoreElements())\n\t\t{\n\t\t\t// Get the field name from the spec\n\t\t\tString name=(String)en.nextElement();\n\t\t\t// Get the field spec for that name\n\t\t\tLDBFieldSpec fieldSpec=(LDBFieldSpec)fields.get(name);\n\t\t\t// See if we have a value for this field.\n\t\t\t// Remember that the keys of fieldValues are LVValues.\n\t\t\tObject value=(LVValue)fieldValues.get(name);\n\t\t\tif (value!=null)\n\t\t\t{\n\t\t\t\tString obj=((LVValue)value).getStringValue();\n\t\t\t\tswitch (fieldSpec.getType())\n\t\t\t\t{\n\t\t\t\tcase LDBFieldSpec.BYTE:\n\t\t\t\t\tvalue=new Byte((byte)LUUtil.getInt(obj));\n\t\t\t\t\tbreak;\n\t\t\t\tcase LDBFieldSpec.INT:\n\t\t\t\t\tvalue=new Integer(LUUtil.getInt(obj));\n\t\t\t\t\tbreak;\n\t\t\t\tcase LDBFieldSpec.LONG:\n\t\t\t\t\tvalue=new Long(LUUtil.getLong(obj));\n\t\t\t\t\tbreak;\n\t\t\t\tcase LDBFieldSpec.CHAR:\n\t\t\t\t\tvalue=obj;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LDBFieldSpec.BINARY:\n\t\t\t\t\tvalue=obj;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// No value given so use a sensible default\n\t\t\t\t// depending on the type of the field.\n\t\t\t\tswitch (fieldSpec.getType())\n\t\t\t\t{\n\t\t\t\tcase LDBFieldSpec.BYTE:\n\t\t\t\t\tvalue=new Byte((byte)0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase LDBFieldSpec.INT:\n\t\t\t\t\tvalue=new Integer(0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase LDBFieldSpec.LONG:\n\t\t\t\t\tvalue=new Long(0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase LDBFieldSpec.CHAR:\n\t\t\t\t\tvalue=\"\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase LDBFieldSpec.BINARY:\n\t\t\t\t\tvalue=\"\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add the new field to the record\n\t\t\ttry\n\t\t\t{\n\t\t\t\trecord.addField(fieldSpec,value);\n\t\t\t}\n\t\t\tcatch (LDBException e) { setStatus(e); }\n\t\t}\n\t\treturn record;\n\t}", "public static AdventureObject fromCursor(Cursor cursor){\n AdventureObject advObject = null;\n try {\n advObject = CustomGson.getGson().fromJson(cursor.getString(cursor.getColumnIndex(ROW_OBJECT)), AdventureObject.class);\n advObject.id = cursor.getInt(cursor.getColumnIndex(ROW_ID));\n advObject.mdateCreated = new Date(cursor.getLong(cursor.getColumnIndex(ROW_DATE_CREATED)));\n advObject.mdateUpdated = new Date(cursor.getLong(cursor.getColumnIndex(ROW_DATE_UPDATED)));\n advObject.madventureTitle = cursor.getString(cursor.getColumnIndex(ROW_TITLE));\n } catch(CursorIndexOutOfBoundsException e){\n e.printStackTrace();\n } catch(NullPointerException e){\n e.printStackTrace();\n }\n return advObject;\n }", "public abstract Object fromProtoValue(Object in);", "protected Value(Value v) {\n flags = v.flags;\n num = v.num;\n str = v.str;\n object_labels = v.object_labels;\n getters = v.getters;\n setters = v.setters;\n excluded_strings = v.excluded_strings;\n included_strings = v.included_strings;\n functionPartitions = v.functionPartitions;\n functionTypeSignatures = v.functionTypeSignatures;\n var = v.var;\n hashcode = v.hashcode;\n }", "@Override\n\t\t\tpublic Device fromString(String arg0) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic Device fromString(String arg0) {\n\t\t\t\treturn null;\n\t\t\t}", "protected abstract DBObject getNewObject();", "public RadixObjectDb() {\r\n super('r', TextUtils.EMPTY_STRING);\r\n }" ]
[ "0.570774", "0.5635735", "0.5613004", "0.5487784", "0.5455933", "0.5406324", "0.53546077", "0.5249198", "0.52491367", "0.52056086", "0.52032167", "0.50951123", "0.5084066", "0.5056864", "0.50568503", "0.50565743", "0.50478107", "0.5029601", "0.5009988", "0.5006931", "0.4994981", "0.49929416", "0.49848288", "0.4975938", "0.49709487", "0.49646556", "0.49584684", "0.49567628", "0.4946796", "0.49396855", "0.49355927", "0.49290457", "0.49244502", "0.49235103", "0.4905833", "0.49039286", "0.49026445", "0.4902284", "0.489408", "0.48932415", "0.48918217", "0.48915124", "0.48809147", "0.48765737", "0.48733488", "0.4861433", "0.48606905", "0.48585498", "0.4857991", "0.48488474", "0.48482248", "0.48421586", "0.48391435", "0.48163706", "0.48057544", "0.47880495", "0.47874755", "0.4785462", "0.47824124", "0.47806463", "0.4780563", "0.47782156", "0.47681633", "0.4764702", "0.4749734", "0.4749476", "0.47426373", "0.47337922", "0.4733426", "0.47298577", "0.47189546", "0.4717206", "0.47073668", "0.46998158", "0.4695536", "0.46902198", "0.46825463", "0.4678013", "0.46720397", "0.46684957", "0.46683672", "0.46676964", "0.46641162", "0.46602073", "0.46596363", "0.4657007", "0.46556932", "0.46555784", "0.46505857", "0.46426958", "0.46414065", "0.46387178", "0.46377373", "0.46376777", "0.46375385", "0.46295723", "0.4628066", "0.46259788", "0.46259788", "0.46226844", "0.4621529" ]
0.0
-1
Gets the saldo links
@NonNull List<SaldoLink> getLinks() { return links; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<ProductLink> links();", "protected java.util.Vector _getLinks() {\n\t\tjava.util.Vector links = new java.util.Vector();\n\t\tlinks.add(getLeaseTaskStartsLink());\n\t\tlinks.add(getLeaseRulesLink());\n\t\treturn links;\n\t}", "public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}", "List<Link> getLinks();", "SaldoLinks(String rawValue) {\n\n if (StringUtils.isEmpty(rawValue)) {\n links = Collections.emptyList();\n return;\n }\n\n String[] rawLinks = rawValue.split(Utils.ASTERISK_SEPARATOR);\n links = new ArrayList<>();\n\n for (String rawLink : rawLinks) {\n if (StringUtils.hasLength(rawLink)) {\n SaldoLink saldoLink = new SaldoLink(rawLink);\n if (saldoLink.hasValidLinks()) {\n links.add(saldoLink);\n }\n }\n }\n }", "public List<String> getLinks();", "protected java.util.Vector _getLinks() {\n\tjava.util.Vector links = new java.util.Vector();\n\tlinks.addElement(getPeopleLink());\n\tlinks.addElement(getChangeLogDetailsesLink());\n\treturn links;\n}", "@GET\n public Response getLinks() {\n List<Link> links = new ArrayList<>();\n links.add(Link.fromUri(CommonConstants.API_URI+\"users/login\").rel(\"login\").build());\n links.add(Link.fromUri(CommonConstants.API_URI+\"users/\").rel(\"users\").build());\n links.add(Link.fromUri(CommonConstants.API_URI+\"boardgames/\").rel(\"boardgames\").build());\n\n return Response.ok().links(links.toArray(new Link[links.size()])).build();\n }", "public String getLinkDescarga() {\n return linkDescarga;\n }", "public void getDbLink() {\n setIsLoading(true);\n \n JsonObject header = new JsonObject();\n header.addProperty(Constants.SECURITY_KEY, Util.getStringPreference(getContext(), Constants.TOKEN_AUTH));\n\n JsonObject body = new JsonObject();\n body.addProperty(Constants.USER_SID, Util.getStringPreference(getContext(), Constants.USER_SID));\n \n getConnectionServer().getLinkDb(header, body).enqueue(new Callback<JsonObject>() {\n @Override\n public void onResponse(@NonNull Call<JsonObject> call, @NonNull Response<JsonObject> response) {\n Log.v(\"TAG\", \"response\");\n setIsLoading(false);\n \n if (response.isSuccessful() && response.body() != null) {\n if (!response.body().get(Constants.STATUS).getAsBoolean() && response.body().get(Constants.MESSAGE).getAsString().equals(Constants.TOKEN_EXPIRED)) {\n refreshToken();\n } \n else {\n JsonObject data = response.body().get(\"data\").getAsJsonObject();\n Util.putPreference(getContext(), Constants.DB_URL, data.get(Constants.DB_URL).getAsString());\n Util.putPreference(getContext(), Constants.DB_NAME, data.get(Constants.DB_NAME).getAsString());\n Util.putPreference(getContext(), Constants.DB_VERSION, data.get(Constants.DB_VERSION).getAsString());\n Util.putPreference(getContext(), Constants.IS_LOGIN, true);\n \n getNavigator().downloadResult(true, \"Downloading...\");\n }\n } else {\n getNavigator().downloadResult(false, \"Download failed!\");\n }\n }\n\n @Override\n public void onFailure(@NonNull Call<JsonObject> call, @NonNull Throwable t) {\n Log.v(\"TAG\", \"failure\");\n t.printStackTrace();\n getNavigator().downloadResult(false, \"Download filed, Network Problem!\");\n setIsLoading(false);\n }\n });\n }", "public List<TparselinksEntity> getAllLinks();", "@Test\n\tpublic void testGetLinksMultipleLinks() {\n\t\tList<String> results = helper.getLinks(\n\t\t\t\t\"drop tables; <A HREF=\\\"test.com\\\"> <a href=\\\"nexttest.org\\\". junk junk\", null);\n\t\tassertEquals(2, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t\tassertEquals(\"nexttest.org\", results.get(1));\n\t}", "public synchronized LinkedList<SummaryLink> getLinks(User user) {\n\t\tLinkedList<SummaryLink> links = super.getLinks(user);\n\t\tif (allowsAdminBy(user)) {\n\t\t\tString qs = \"?p=\"+pipeline.getPipelineIndex()+\"&s=\"+stageIndex+\"&f=0\";\n\t\t\tif (scriptFile != null) {\n\t\t\t\tlinks.addFirst( new SummaryLink(\"/script\"+qs, null, \"Edit the Anonymizer Script File\", false) );\n\t\t\t}\n\t\t}\n\t\treturn links;\n\t}", "String getLink();", "public boolean onLinkClick() {\n for (int t = 0; t < data.size(); t++) {\n if (data.get(t).getActionLink().isClicked()) {\n Cuenta ref = data.get(t);\n List<Cuenta> newData = new LinkedList<Cuenta>();\n List<Cuenta> createQuery = DAO.createQuery(Cuenta.class, null);\n if (ref.getRef() == null || ref.getRef().equals(\"\")) {\n newData.add(ref);\n } else {\n String[] split = ref.getRef().split(\",\");\n for (String sp : split) {\n for (Cuenta c : createQuery) {\n if (c.getIdCuenta().toString().equals(sp)) {\n newData.add(c);\n }\n }\n }\n }\n UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).getSessionController(UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).actualContext).addVariable(\"page\", new Variable(\"page\", this.getClass(), Class.class), true);\n newContext();\n setTitle(ref.getDescripcion());\n UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).getSessionController(UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).actualContext).addVariable(\"data\", new Variable(\"data\", newData, List.class), true);\n UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).getSessionController(UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).actualContext).addVariable(\"page\", new Variable(\"page\", this.getClass(), Class.class), true);\n setRedirect(TablePage.class);\n return true;\n }\n }\n return true;\n }", "@RequestMapping(path = \"/controversialLinks\", method = RequestMethod.GET)\n public ArrayList<Link> getControversialYadas() {\n\n ArrayList<Link> allLinks = (ArrayList<Link>) links.findAll();\n generateControveryScore(allLinks);\n\n return links.findAllByOrderByControversyScoreDesc();\n }", "public WebElement getAccountsLink() {\n\t\treturn driver.findElement(By.xpath(\"//*[@class=\\\"accounts-link\\\"]/a\"));\n\t}", "public List<Link> getLinks()\n {\n return links;\n }", "public void linkAccount() {}", "SaldoLink(@NonNull Context context, @Nullable String rawValue) {\n\n if (rawValue == null) {\n Timber.d(\"rawValue was null, cannot parse saldo links.\");\n return;\n }\n\n String[] rawLinks = rawValue.split(Utils.PIPE_SEPARATOR);\n\n boolean allLinksArePresent = rawLinks.length == 3 &&\n Utils.hasLength(rawLinks[0]) &&\n Utils.hasLength(rawLinks[1]) &&\n Utils.hasLength(rawLinks[2]);\n\n if (allLinksArePresent) {\n\n wordLink = context.getString(R.string.link_word_format,\n rawLinks[0], context.getString(R.string.link_word));\n\n associationsLink = context.getString(R.string.link_associations_format,\n rawLinks[1], context.getString(R.string.link_associations));\n\n inflectionsLink = context.getString(R.string.link_inflections_format,\n rawLinks[2], context.getString(R.string.link_inflections)\n );\n }\n }", "private String getApprovalLink(Payment approvedPayment) {\n List<Links> links = approvedPayment.getLinks();\n String approvalLink = null;\n\n for (Links link : links) {\n if (link.getRel().equalsIgnoreCase(\"approval_url\")) {\n approvalLink = link.getHref();\n break;\n }\n }\n return approvalLink;\n }", "public String link() {\n return DevRant.BASE_URL + DevRant.RANT_URL + '/' + getId();\n }", "@Override\r\n public List<Link> getLinks(Turn inTurn, Player inPlayer) throws Exception\r\n {\r\n return getGameState().getLinkList();\r\n }", "public String getLink();", "List<ButtonLink> getBtnActionLinks();", "public static WebElement getPayBillLink() {\r\n\t\treturn payBillLink;\r\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllPaymentURL_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), PAYMENTURL);\r\n\t}", "public List<Link> getLinks()\t{return Collections.unmodifiableList(allLinks);}", "IIndexLinkage[] getLinkages();", "private List<String> getOfferPagesLinks(Document document) {\n return document.select(\"div[class=product-image loaded] > a[href]\").eachAttr(\"abs:href\");\n }", "public List<DietaBalanceada> consultar_dietaBalanceada();", "public Linka getLinka() {\n return linka;\n }", "@Test\n\tpublic void testGetLinksOtherProperties() {\n\t\tList<String> results = helper.getLinks(\"drop tables; <A target=\\\"self\\\" href=\\\"test.com\\\"> junk junk\",\n\t\t\t\t\"http://www.bobbylough.com\");\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t}", "@Override\n\t@Transactional\n\tpublic String createLinks(int page, int limit) {\n\t\treturn agamaDAO.createLinks(page, limit);\n\t}", "public void populateLinks(List<Drop> drops, Account queryingAccount) {\n \n \t\tList<Long> dropIds = new ArrayList<Long>();\n \t\tfor (Drop drop : drops) {\n \t\t\tdropIds.add(drop.getId());\n \t\t}\n \n \t\tString sql = \"SELECT `droplet_id`, `link_id` AS `id`, `url` \";\n \t\tsql += \"FROM `droplets_links` \";\n \t\tsql += \"INNER JOIN `links` ON (`links`.`id` = `link_id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `links`.`id` NOT IN ( \";\n \t\tsql += \"SELECT `link_id` \";\n \t\tsql += \"FROM `account_droplet_links` \";\n \t\tsql += \"WHERE `account_id` = :account_id \";\n \t\tsql += \"AND `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `deleted` = 1) \";\n \t\tsql += \"UNION ALL \";\n \t\tsql += \"SELECT `droplet_id`, `link_id` AS `id`, `url` \";\n \t\tsql += \"FROM `account_droplet_links` \";\n \t\tsql += \"INNER JOIN `links` ON (`links`.`id` = `link_id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `account_id` = :account_id \";\n \t\tsql += \"AND `deleted` = 0 \";\n \n \t\tQuery query = em.createNativeQuery(sql);\n \t\tquery.setParameter(\"drop_ids\", dropIds);\n \t\tquery.setParameter(\"account_id\", queryingAccount.getId());\n \n \t\t// Group the links by drop id\n \t\tMap<Long, List<Link>> links = new HashMap<Long, List<Link>>();\n \t\tfor (Object oRow : query.getResultList()) {\n \t\t\tObject[] r = (Object[]) oRow;\n \n \t\t\tLong dropId = ((BigInteger) r[0]).longValue();\n \t\t\tLink link = new Link();\n \t\t\tlink.setId(((BigInteger) r[1]).longValue());\n \t\t\tlink.setUrl((String) r[2]);\n \n \t\t\tList<Link> l = links.get(dropId);\n \t\t\tif (l == null) {\n \t\t\t\tl = new ArrayList<Link>();\n \t\t\t\tlinks.put(dropId, l);\n \t\t\t}\n \n \t\t\tl.add(link);\n \t\t}\n \n \t\tfor (Drop drop : drops) {\n \t\t\tList<Link> l = links.get(drop.getId());\n \n \t\t\tif (l != null) {\n \t\t\t\tdrop.setLinks(l);\n \t\t\t} else {\n \t\t\t\tdrop.setLinks(new ArrayList<Link>());\n \t\t\t}\n \t\t}\n \t}", "List<Link> findLinkByCache();", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllPaymentURL_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), PAYMENTURL, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "java.lang.String getPaymentUrl();", "public Collection<Map<String, String>> getLinks();", "public Map listAllDonations() throws IOException\n\t{\n\t\treturn request(GET, coOpVault());\n\t}", "private ArrayList<Integer> getPageLinks() {\n int numberOfPages = sqlData.getNumberOfPages();\n\n int n = (pageNumInt / numberOfPages);\n Integer startPage = n * numberOfPages;\n\n ArrayList<Integer> pageLinks = new ArrayList<Integer>();\n\n // iterate and add to the array\n for(int i=0; i < numberOfPages; i++) {\n pageLinks.add(++startPage); \n }\n\n return pageLinks;\n \n }", "public abstract DBResult getLink(int linkId) throws SQLException;", "public List<Link> links() {\n return this.links;\n }", "long getAccountLinkId();", "public static List getAllUrl() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT url FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"url\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "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 }", "private String getApprovalLink(Payment approvedPayment) {\n\t\tList<Links> links = approvedPayment.getLinks();\n\t\tString approvalLink = null;\n\n\t\tfor (Links link : links) {\n\t\t\tif (link.getRel().equalsIgnoreCase(\"approval_url\")) {\n\t\t\t\tapprovalLink = link.getHref();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn approvalLink;\n\t}", "public Vector<YANG_Linkage> getLinkages() {\n\t\treturn linkages;\n\t}", "public List<ResourceLink> links() {\n return links;\n }", "@Override\n\tpublic ArrayList<String> getLinks() {\n\t\treturn this.description.getLinks();\n\t}", "public String getBuyLink() {\n return buyLink;\n }", "public List<LinkBean> getTranverseLinks(Incident incident, boolean regularTraverse) throws Exception\n\t{\n\t \tconnIncident = DBConnector.getInstance().connectToNTLinksDB();\n\t \tList<LinkBean> links = null;\n\t \tString itisCodes = \"406,407,408,471,474,472,475,473,476,477,735,401,24,907,240,16,25,240,323,799,938,943,945,947,949,956,957,961,965,969,993,995,1485,1527,1541,1555,1559,1563,1567,1580,2000,58,59,1036,26,987,926,980,1020,303,925,1075,928,1035,492,1338,27,478,1494,917,1510,1806\";\n\t \tString[] temp = itisCodes.split(\",\");\n\t \t\n\t \ttry {\n \t\tif(initProperties() == false){\n \t\t\tLOGGER.info(\"initProperties() error, process will exit now!\");\n \t\t\tSystem.exit(0);\n \t\t}\n \t\tboolean closure = false;\n \t\tfor (String s : temp) {\n \t\t\t\tif (incident.getItis_code() == Integer.valueOf(s)) {\n \t\t\t\t closure = true;\n \t\t\t\t}\n \t\t}\n \t\t//System.out.println(\"closure: \" + closure);\n \t\tif (incident.getLink_id() !=0 || incident.getEnd_link_id() != 0) {\n \t\t links = processIncidentRecords(incident, closure, regularTraverse);\n \t\t}\n\t \t} catch (Exception e) {\n\t\t throw e;\n\t\t} finally {\n\t\t try {\t\t\t\t \n\t\t\tconnIncident.close();\n\t\t } catch (Exception e) {\n\t\t\tthrow e;\n\t\t }\n\t\t}\n\t\treturn links;\n\t}", "public DSALinkedList getAdjacent()\n\t\t{\n\t\t\treturn links;\n\t\t}", "public String getDownloadLink() {\r\n\t\tString site = MySoup.getSite();\r\n\t\tString authKey = MySoup.getAuthKey();\r\n\t\tString passKey = MySoup.getPassKey();\r\n\t\tString downloadLink = site + \"torrents.php?action=download&id=\" + id + \"&authkey=\" + authKey + \"&torrent_pass=\" + passKey;\r\n\t\treturn downloadLink;\r\n\t}", "public abstract DBResult getAdjacentLinks(int nodeId) throws SQLException;", "List<ObjectRelation> getObjectRelations(int otId) throws AccessDeniedException;", "@Override\n\tpublic List<HoaDon> getAllHoaDon(Connection conn) {\n\t\treturn null;\n\t}", "String nextLink();", "public int getLinks() {\n\t\treturn links;\n\t}", "@Test\n public void getAllLinksTest() {\n driver.get(\"http://practice.cybertekschool.com\");\n\n // get all the links in a page\n List<WebElement> links = driver.findElements(By.tagName(\"a\"));\n System.out.println(links.size());\n // get the text of each link and print\n\n for (WebElement link : links) {\n System.out.println(link.getText());\n }\n }", "private String linkString()\n {\n Iterator<DSAGraphNode<E>> iter = links.iterator();\n String outputString = \"\";\n DSAGraphNode<E> node = null;\n while (iter.hasNext())\n {\n node = iter.next();\n outputString = (outputString + node.getLabel() + \", \");\n }\n return outputString;\n }", "public Double[] getLink(int i) {\n\t\tDouble[] link_i = new Double[2];\n\t\tlink_i[0] = config[2*i];\n\t\tlink_i[1] = config[2*i+1];\n\t\treturn link_i;\n\t}", "public Set<String> getLinks() throws SearchResultException;", "@Override\n\tpublic String getUrls() throws TException {\n try {\n return DBUtils.getExternWebSite();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n\t}", "public String getLink()\n {\n return link;\n }", "String getHref();", "public StringBuilder getLinks(Elements imgs) {\n\t\tStringBuilder links = new StringBuilder();\n\t\tString prefix = \"\";\n\t\tfor (Element item : imgs) {\n\t\t\tlinks.append(prefix);\n\t\t\tprefix = \"|\";\n\t\t\tlinks.append(item.attr(\"href\"));\n }\n\t\treturn links;\n\t}", "public List<Link> getLinks() {\n\t\treturn _links;\n\t}", "public String getLink() {\n return link;\n }", "public DeliAndBakeryPage clickOnDeliAndBakeryLink() {\n\t\tfor (int i = 0; i <= 2; i++) {\n\t\t\ttry {\n\t\t\t\tdeliAndbakery.click();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t}\n\t\treturn new DeliAndBakeryPage();\n\t}", "@RequestMapping(path = \"/newLinks\", method = RequestMethod.GET)\n public ArrayList<Link> getNewYadas() {\n\n return links.findTop10ByOrderByTimeOfCreationDesc();\n }", "public Set<Link> links() {\n return links;\n }", "boolean hasAccountLink();", "byte[] getLinkEnds();", "public static String getLinkedItems(Connection conn,String campus,String user,int id,String kix,String src,boolean print) throws SQLException {\n\n\t\t//Logger logger = Logger.getLogger(\"test\");\n\n\t\tWebSite website = new WebSite();\n\n\t\tString temp = \"\";\n\t\tString sql = \"\";\n\t\tStringBuffer buf = new StringBuffer();\n\t\tStringBuffer legend = new StringBuffer();\n\n\t\tString rowColor = \"\";\n\n\t\tString checked = \"\";\n\t\tString field = \"\";\n\t\tString xiAxis = \"\";\n\t\tString yiAxis = \"\";\n\n\t\tint iHallmarks = 0;\n\n\t\tboolean debug = false;\n\n\t\ttry{\n\t\t\tdebug = DebugDB.getDebug(conn,\"LinkedUtil\");\n\n\t\t\tif (debug) logger.info(\"getLinkedItems - START\");\n\n\t\t\tString server = SysDB.getSys(conn,\"server\");\n\n\t\t\tcom.ase.aseutil.fnd.FndDB fnd = new com.ase.aseutil.fnd.FndDB();\n\n\t\t\t//\n\t\t\t// for legend\n\t\t\t//\n\t\t\tlegend.append(\"<hr size=\\\"1\\\" noshade=\\\"\\\"><br>LEGEND<br/><ol>\");\n\t\t\tfor(com.ase.aseutil.Generic fd: fnd.getHallmarks(conn,id)){\n\t\t\t\tlegend.append(\"<li class=\\\"normaltext\\\">\"+fd.getString2()+\"</li>\");\n\t\t\t\t++iHallmarks;\n\t\t\t}\n\t\t\tlegend.append(\"</ol>\");\n\n\t\t\t//\n\t\t\t// display header line (items for linking)\n\t\t\t//\n\t\t\tif(!print){\n\t\t\t\tbuf.append(\"<form name=\\\"aseForm\\\" method=\\\"post\\\" action=\\\"/central/servlet/linker?arg=fnd\\\">\");\n\t\t\t}\n\n\t\t\tbuf.append(\"<table summary=\\\"\\\" id=\\\"tableLinkedFoundationItems\\\" border=\\\"0\\\" width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"8\\\"><tbody>\"\n\t\t\t\t\t+ \"<tr bgcolor=\\\"#E1E1E1\\\">\"\n\t\t\t\t\t+ \"<td class=\\\"textblackTH\\\" valign=\\\"top\\\">&nbsp;SLO / Hallmarks</td>\");\n\n\t\t\tfor (int j = 0; j < iHallmarks; j++){\n\t\t\t\tbuf.append(\"<td class=\\\"textblackTH\\\" valign=\\\"top\\\" width=\\\"03%\\\">\"+(j+1)+\"</td>\");\n\t\t\t\tif(j > 0){\n\t\t\t\t\txiAxis += \",\";\n\t\t\t\t}\n\t\t\t\txiAxis += \"\" + (j+1);\n\t\t\t} // next j\n\n\t\t\tbuf.append(\"</tr>\");\n\n\t\t\t//\n\t\t\t// show matrix. keep in mind the kix we need for SLOs is the course kix and not the\n\t\t\t// the foundation kix\n\t\t\t//\n\t\t\tString[] info = getKixInfo(conn,kix);\n\t\t\tString alpha = info[Constant.KIX_ALPHA];\n\t\t\tString num = info[Constant.KIX_NUM];\n\n\t\t\tinfo = Helper.getKixRoute(conn,campus,alpha,num,\"CUR\");\n\t\t\tString courseKix = info[0];\n\n\t\t\tArrayList list = CompDB.getCompsByKix(conn,courseKix);\n\t\t\tif ( list != null ){\n\t\t\t\tComp comp;\n\t\t\t\tfor (int i = 0; i<list.size(); i++){\n\t\t\t\t\tcomp = (Comp)list.get(i);\n\n\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\tyiAxis += \",\";\n\t\t\t\t\t}\n\t\t\t\t\tyiAxis += \"\" + comp.getID();\n\n\t\t\t\t\t// alternating\n\t\t\t\t\tif (i % 2 == 0){\n\t\t\t\t\t\trowColor = Constant.EVEN_ROW_BGCOLOR;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\trowColor = Constant.ODD_ROW_BGCOLOR;\n\t\t\t\t\t}\n\n\t\t\t\t\t// data row\n\t\t\t\t\tbuf.append(\"<tr bgcolor=\\\"\"+rowColor+\"\\\">\"\n\t\t\t\t\t\t+ \"<td class=\\\"datacolumn\\\" valign=\\\"top\\\">\"+comp.getComp()+\"</td>\");\n\n\t\t\t\t\tfor (int j = 0; j < iHallmarks; j++){\n\n\t\t\t\t\t\tchecked = \"\";\n\t\t\t\t\t\tif(isChecked(conn,campus,id,NumericUtil.getInt(comp.getID(),0),(j+1))){\n\t\t\t\t\t\t\tchecked = \"checked\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfield = comp.getID() + \"_\" + (j+1);\n\n\t\t\t\t\t\tif(!print){\n\t\t\t\t\t\t\tbuf.append(\"<td valign=\\\"top\\\" width=\\\"03%\\\">\"\n\t\t\t\t\t\t\t\t+ \"<input type=\\\"checkbox\\\" \"+checked+\" name=\\\"\"+field+\"\\\" value=\\\"1\\\">\"\n\t\t\t\t\t\t\t\t+ \"</td>\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tif(checked.equals(\"\")){\n\t\t\t\t\t\t\t\tbuf.append(\"<td valign=\\\"top\\\" width=\\\"03%\\\">\"\n\t\t\t\t\t\t\t\t\t+ \"&nbsp;\"\n\t\t\t\t\t\t\t\t\t+ \"</td>\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tbuf.append(\"<td valign=\\\"top\\\" width=\\\"03%\\\">\"\n\t\t\t\t\t\t\t\t\t+ \"<img src=\\\"http://\"+server+\"/central/images/images/checkmarkG.gif\\\" alt=\\\"selected\\\" border=\\\"0\\\" />\"\n\t\t\t\t\t\t\t\t\t+ \"</td>\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} // next j\n\n\t\t\t\t\tbuf.append(\"</tr>\");\n\n\t\t\t\t} // for comp\n\n\t\t\t} // list not null\n\n\n\t\t\tbuf.append(\"</tbody></table>\");\n\n\t\t\tif(!print){\n\t\t\t\tbuf.append(\"<input type=\\\"hidden\\\" value=\\\"\"+id+\"\\\" name=\\\"id\\\" id=\\\"id\\\">\"\n\t\t\t\t+ \"<input type=\\\"hidden\\\" value=\\\"\"+kix+\"\\\" name=\\\"kix\\\" id=\\\"kix\\\">\"\n\t\t\t\t+ \"<input type=\\\"hidden\\\" value=\\\"\"+src+\"\\\" name=\\\"src\\\" id=\\\"src\\\">\"\n\t\t\t\t+ \"<input type=\\\"hidden\\\" value=\\\"\"+xiAxis+\"\\\" name=\\\"xiAxis\\\" id=\\\"xiAxis\\\">\"\n\t\t\t\t+ \"<input type=\\\"hidden\\\" value=\\\"\"+yiAxis+\"\\\" name=\\\"yiAxis\\\" id=\\\"yiAxis\\\">\"\n\t\t\t\t+ \"<hr size=\\\"1\\\" noshade><p align=\\\"right\\\">\"\n\t\t\t\t+ \"<input type=\\\"submit\\\" class=\\\"input\\\" name=\\\"aseSubmit\\\" value=\\\"Submit\\\" title=\\\"save data\\\">&nbsp;&nbsp;\"\n\t\t\t\t+ \"<input type=\\\"submit\\\" class=\\\"input\\\" name=\\\"aseCancel\\\" value=\\\"Cancel\\\" title=\\\"abort selected operation\\\" onClick=\\\"return cancelMatrixForm()\\\">\"\n\t\t\t\t+ \"</p>\"\n\t\t\t\t+ \"</form>\");\n\t\t\t}\n\n\t\t\ttemp = buf.toString() + legend.toString();\n\n\t\t\tfnd = null;\n\n\t\t\tif (debug) logger.info(\"getLinkedItems - END\");\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"FndDB.getLinkedItems - \" + e.toString());\n\t\t}\n\n\t\treturn temp;\n\t}", "public String getLink() {\r\n return link;\r\n }", "@ApiModelProperty(value = \"REST API URL to the service desk.\")\n public SelfLinkDTO getLinks() {\n return links;\n }", "public long getLinkCost() {\n return LinkCost;\n }", "public ArrayList<Debito> getAllDebitos() {\n ArrayList<Debito> debitos = new ArrayList<Debito>();\n String selectQuery = \"SELECT * FROM \" + TABLE_DEBITOS;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Debito td = new Debito();\n td.setCodigo(c.getInt(c.getColumnIndex(KEY_ID)));\n td.setValor(c.getDouble(c.getColumnIndex(KEY_VALOR)));\n td.setData(c.getString(c.getColumnIndex(KEY_DATA)));\n td.setEstabelecimento((c.getString(c.getColumnIndex(KEY_ESTABELECIMENTO))));\n\n // adding to todo list\n debitos.add(td);\n } while (c.moveToNext());\n }\n\n return debitos;\n }", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "public Set<L> getLinks() {\n return links;\n }", "private boolean getLinks() {\n return false;\n }", "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllPaymentURL_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, PAYMENTURL);\r\n\t}", "public ArrayList<String> getWebLink(){\r\n\t\treturn webLinks;\t\t\r\n\t}", "public List<Link> getLinks() {\n\t return Collections.unmodifiableList(links);\n\t}", "public List<String> getLinks() {\r\n\t\treturn this.links;\r\n\t}", "List<? extends Link> getLinks();", "private LinkedAccountsPage linkDAGAccount(PortfolioAnalysisPage portfolioAnalysisPage) {\n BrokerageAccountForm brokerageAccountForm = portfolioAnalysisPage.\n clickOnLinkAccountBtnFromZeroStatePortfolioAnalysis();\n brokerageAccountForm.enterInvestmentDAGAccountCredentials();\n LinkedAccountsPage linkedAccountsPage = brokerageAccountForm.clickOnLinkAccountButton();\n linkedAccountsPage.waitForYodleeAggregation();\n linkedAccountsPage.clickOnExpandIneligibleAccountsLink(0);\n brokerageAccountForm = linkedAccountsPage.clickOnEditIneligibleAccountButton(0);\n brokerageAccountForm.selectAccountType(constants.core.clientExperience.Constants.BrokerageAccountType.ROTH_ROLLOVER_IRA);\n return brokerageAccountForm.clickOnLinkAccountButton();\n }", "public DSALinkedList<DSAGraphNode<E>> getAdjacent()\n {\n return links;\n }", "public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {\r\n ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();\r\n String parameter = param.toString();\r\n br.setFollowRedirects(false);\r\n br.setCookiesExclusive(true);\r\n br.getPage(parameter);\r\n if (br.containsHTML(\"The page you were looking for doesn\\\\'t exist\\\\.\")) {\r\n logger.warning(\"Invalid URL: \" + parameter);\r\n return decryptedLinks;\r\n }\r\n // for stable compliance (getHost() will only return domain.tld and not subdomain(s).domain.tld)\r\n String host = new Regex(br.getURL(), \"(https?://.*?deviantart\\\\.com)/\").getMatch(0);\r\n\r\n // only non /art/ requires packagename\r\n if (parameter.contains(\"/gallery/\") || parameter.contains(\"/favourites/\")) {\r\n // find and set username\r\n String username = br.getRegex(\"<h1>\\\\*<a class=\\\"u\\\" href=\\\"\" + host + \"\\\">(.*?)</a></h1>\").getMatch(0);\r\n // find and set page type\r\n String pagetype = \"\";\r\n if (parameter.contains(\"/favourites/\")) pagetype = \"Favourites\";\r\n if (parameter.contains(\"/gallery/\")) pagetype = \"Gallery\";\r\n // find and set pagename\r\n String pagename = br.getRegex(\"<span class=\\\"folder\\\\-title\\\">(.*?)</span>\").getMatch(0);\r\n // set packagename\r\n String fpName = \"\";\r\n if ((username != null) && (pagetype != null) && (pagename != null)) fpName = username + \" - \" + pagetype + \" - \" + pagename;\r\n else if ((username != null) && (pagename != null)) fpName = username + \" - \" + pagename;\r\n else if ((username != null) && (pagetype != null)) fpName = username + \" - \" + pagetype;\r\n else if ((pagetype != null) && (pagename != null)) fpName = pagetype + \" - \" + pagename;\r\n \r\n // now we find and crawl! \r\n parsePage(decryptedLinks, host, parameter);\r\n\r\n if (fpName != null) {\r\n FilePackage fp = FilePackage.getInstance();\r\n fp.setName(fpName);\r\n fp.addLinks(decryptedLinks);\r\n }\r\n }\r\n // art links just grab final link\r\n else if (parameter.contains(\"/art/\")) {\r\n parseArtPage(decryptedLinks, parameter);\r\n }\r\n return decryptedLinks;\r\n }", "@Override\r\n\tprotected String getUrl() {\n\t\tif(tipo==PROFIT_DATOS_COMERCIALES){\r\n\t\t\treturn urlWS + \"/ProfitResumen\";\r\n\t\t}else{\r\n\t\t\treturn urlWS + \"/ProfitDataAdicional\";\r\n\t\t}\r\n\t}", "@RequestMapping(path = \"/theYadaList\", method = RequestMethod.GET)\n public ResponseEntity<ArrayList<Link>> getYadaList() {\n\n ArrayList<Link> linkList = (ArrayList<Link>) links.findAll();\n generateLinkScore(linkList);\n\n return new ResponseEntity<>(links.findAllByOrderByLinkScoreDesc(), HttpStatus.OK);\n }", "public List<SingleLinkConfiguration> getLinkers() {\n return linkers;\n }", "public Set<String> getLinks() {\n return links;\n }", "List<Disease> getDiseases() throws SearchServiceException;", "public java.lang.String getReferenciado();", "public abstract Link getLink(LinkContext context) throws AccessException;" ]
[ "0.5915045", "0.57713085", "0.57363516", "0.57127076", "0.565244", "0.5550021", "0.55380577", "0.54876024", "0.5483742", "0.54689723", "0.542238", "0.5400844", "0.5399179", "0.537868", "0.5342584", "0.5341203", "0.5318908", "0.53136474", "0.52750343", "0.5261221", "0.5258214", "0.5225285", "0.5223211", "0.52200806", "0.51991963", "0.5183007", "0.5175405", "0.5166971", "0.51454777", "0.51416534", "0.5104803", "0.50841933", "0.5081008", "0.50682974", "0.505918", "0.5058209", "0.5055517", "0.50535923", "0.50391936", "0.5024213", "0.5023689", "0.5023571", "0.5022724", "0.5019592", "0.5018639", "0.5012582", "0.49995327", "0.4983785", "0.4978726", "0.49760452", "0.49739483", "0.49620053", "0.49565688", "0.49545854", "0.49392733", "0.49337932", "0.49248335", "0.4909493", "0.49082774", "0.49023342", "0.48848978", "0.4880132", "0.4843772", "0.48432434", "0.4838184", "0.4833954", "0.48211145", "0.4805878", "0.47991833", "0.47966942", "0.47932", "0.47807208", "0.47781873", "0.47759417", "0.4768736", "0.47687334", "0.4765191", "0.47629488", "0.4762667", "0.47574803", "0.47574803", "0.47574803", "0.47574803", "0.47440112", "0.47438776", "0.4743765", "0.47408783", "0.47406137", "0.47305912", "0.47274062", "0.4725341", "0.47231954", "0.47212353", "0.47197804", "0.47101772", "0.46969768", "0.46952516", "0.46916136", "0.46883073", "0.4677804" ]
0.6599121
0
public PageBean getUserList(int page);
public void addUser(UserModel user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Object> retrievePagingList(PageBean pageBean) ;", "public PageList<User> getUserPageList(User user, int pageSize, int pageNum) throws DataAccessException;", "Set<String> getUsers(String page);", "@Override\n\tpublic List<User> listByPage(int page) throws Exception {\n\t\treturn null;\n\t}", "public List<UserInfo> resultUserList(PageBean pBean) {\n\t\treturn adminSearchDao.resultUserList(pBean);\n\t}", "public List<UserVO> pagingUser(Criteria cri);", "@Test\n public void test1(){\n PageInfo<User> page = iUserService.selectWithPage(new User(),new Page(1,10,null));\n List<User> list = page.getList();\n\n System.out.println(list.toString());\n\n\n List<User> user = new ArrayList<User>();\n User user1 = new User();\n user1.setId(1);\n user.add(user1);\n System.out.println(user.toString());\n }", "@RequestMapping (\"/members\")\r\n\tpublic String list(@RequestParam(\"page\") int page, Model model) {\n\t\tint pagenumber = page;\r\n\t\tmodel.addAttribute(\"pagenumber\", pagenumber);\r\n\t\t\r\n\t\t//Row count for following calculations\r\n\t\tint maxrows = membersService.getMemberCount();\r\n\t\t\r\n\t\t//Find the Max number of pages and see if an extra page is needed\r\n\t\tif (maxrows >= 7){\r\n\t\t\tint maxpages = maxrows / 7;\r\n\t\t\tint pageTest = maxpages * 7; \r\n\t\t\tint addPage = maxrows - pageTest;\r\n\t\t\tint zero = 0;\r\n\t\t//Add an extra page if TRUE\r\n\t\t\tif (addPage > zero){\r\n\t\t\t\tint extraPage = maxpages + 1;\r\n\t\t\t\tmodel.addAttribute(\"maxpages\", extraPage);\r\n\t\t//Do not add an extra page if FALSE\t\t\r\n\t\t\t}else {\r\n\t\t\t\tmodel.addAttribute(\"maxpages\", maxpages);\r\n\t\t\t}\r\n\t\t//Only one page is needed because at least 7 rows are not available \r\n\t\t}else{\r\n\t\t\tmodel.addAttribute(\"maxpages\", 1);\r\n\t\t }\r\n\t\t//pull the first 7 on page 1\r\n\t\tif (pagenumber <= 1) {\r\n\r\n\t\t\tmodel.addAttribute(\"members\", membersService.getAllMembers(0, 7));\r\n\t\t}else{\r\n\t\t\tint stopSQL = 7; //Offset\r\n\t\t\tint pageNumber = pagenumber - 1; \r\n\t\t\tint startSQL = 7 * pageNumber; //What row should the query start at, e.g. 7 * 2 = 14 (start at row 14 and pull the next 7 rows)\r\n\r\n\t\t\tmodel.addAttribute(\"members\", membersService.getAllMembers(startSQL, stopSQL));\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn \"members\";\r\n\t}", "Page<Accessprofile> listAllByPage(Pageable pageable);", "@Override\n\tpublic List<User> listByPage(int page, int listSize) throws Exception {\n\t\treturn null;\n\t}", "List<Registration> allRegUserPagination(long idUser, int currentPage, int elementPerPage);", "@Override\r\n\tpublic List<TUsers> queryByPage(int page, QueryUser query) {\n\t\t\r\n\t\tint start=(page-1)*contests.PAGECONT+1;\r\n\t\tint end=page*contests.PAGECONT;\r\n\t\tquery.setStart(start);\r\n\t\tquery.setEnd(end);\r\n\t\treturn dao.queryByPage(query);\r\n\t}", "public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);", "List<T> findPage(int pageNumber);", "@Override\r\n\tpublic List<MemberVO> selectuserall(PageCriteria c) {\n\t\treturn sqlSession.selectList(NAMESPACE + \".select_page\" ,c);\r\n\t}", "@Override\r\n\tpublic List<ReviewVO> listPage(int page) throws Exception {\n\t\tif(page<=0) {\r\n\t\t\tpage=1;\r\n\t\t}\r\n\t\t\r\n\t\tpage = (page-1)*10; // 한 페이지에 10개의 글 보이기\r\n\t\t\r\n\t\treturn ss.selectList(\"listPage\", page);\r\n\t}", "@Override\n\tpublic List<User> getList(Integer page, Integer Limit) {\n\t\treturn null;\n\t}", "Page<ExamPackage> getPageByUsername(String username, int pageNo, int pageSize);", "List<E> page(Page page, Long...params);", "public UserList list();", "@Override\n\tpublic List<SysUser> getAllByPage(PageBean<SysUser> pageBean) throws Exception {\n\t\treturn null;\n\t}", "public List<Member> selectMemberList(int cPage, int numPerPage) {\n\tConnection conn =getConnection();\n\tList<Member> list=dao.selectMemberList(conn,cPage,numPerPage);\n\tclose(conn);\n\t\n\treturn list;\n\n}", "public List<T> getPageElementsList();", "Pages getPages();", "public List<User> getUserList();", "Page<ExamPackage> getPageByUsername(String username, int pageNo, int pageSize, Sort sort);", "public List getUsers(User user);", "public PageList<Hoppy> getPageList(Hoppy hoppy, int pageSize, int pageNum) throws DataAccessException;", "java.util.List<People>\n getUserList();", "public List<User> list();", "public Page<User> findAll(Pageable pageable);", "List<CustomerInformation> queryListByCustomer(Integer page, Integer rows, CustomerInformation cust);", "public List<User> list();", "List<? extends Page> getPages();", "@Override\r\n\tpublic List findAll(PageBean pagebean) {\n\t\tList list=bankcardMapper.selectByExample(null,new RowBounds(pagebean.getOffset(), pagebean.getLimit()));\r\n\t\tint count=bankcardMapper.countByExample(null);\r\n\t\tpagebean.setCount(count);\t\r\n\t\treturn list;\r\n\t}", "LiveData<PagedList<Response>> pagedList();", "Page<ServiceUserDTO> findAll(Pageable pageable);", "@Override\r\n\tpublic PageInfo<User> selects(String username, Integer page, Integer pageSize) {\n\t\tPageMethod.startPage(page, pageSize);\r\n\t\tList<User> list = um.selects(username);\r\n\t\treturn new PageInfo<User>(list);\r\n\t}", "@RequestMapping(\"list\")\n List<Teacher> list(Teacher teacher, PageBean pageBean){\n return teacherService.list(teacher,pageBean);\n }", "List<User> getUnapprovedUserListByPage(UserVo userVo);", "@Override\n\tpublic PagingUtils getPagingUtils(MUserListIn_R001 input,PAGINATION page) {\n\t\treturn this.userDao.getPagingUtils(input, page);\n\t}", "@GetMapping\n\tpublic List<UserRest> getUsers(@RequestParam(value = \"page\", defaultValue = \"0\") int page,\n\t\t\t@RequestParam(value = \"limit\", defaultValue = \"25\") int limit){\n\t\t\n\t\tList<UserRest> returnValue = new ArrayList<>();\n\t\t\n\t\tList<UserDTO> users = userService.getUsers(page, limit);\n\t\t\n\t\tfor (UserDTO userDTO : users) {\n\t\t\tUserRest userModel = new UserRest();\n\t\t\tBeanUtils.copyProperties(userDTO, userModel);\n\t\t\treturnValue.add(userModel);\n\t\t}\n\t\t\n\t\treturn returnValue;\n\t}", "public List<User> listUsers(String userName);", "PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);", "public List<UserDTO> getUsers();", "public List<Limit> list(String username);", "@Override\n public ArrayList<PostVo> get_post_by_page(int page) {\n ArrayList<PostVo> posts = (ArrayList<PostVo>) baseDAO.findBySQLForVO(\"\" +\n \"select p.p_id as pId , p.p_floor as pFloor , p.p_main as pMain , p.p_title as pTitle\" +\n \" , u.u_name as uName from Post as p join user as u on p.u_id = u.u_id \"\n ,PostVo.class,null,10*(page-1),10);\n return posts;\n }", "Page<ParaUserDTO> findAll(Pageable pageable);", "public List<User> getUsers();", "@Override\r\n\tpublic List<EBook> getUserListPage(EBook ebook) {\n\t\treturn permissionDao.getUserListPage(ebook);\r\n\t}", "@RequestMapping(value= Constant.USER_LIST, method = RequestMethod.POST)\n public ResponseEntity<RestAPIResponse> getListUser(\n HttpServletRequest request,\n @RequestBody PagingRequestModel pagingRequestModel\n ) {\n\n\n Page<UserResponse> listUsers = userService.getListUserPaging(pagingRequestModel, \"en\",\n Constant.Status.ACTIVE.getValue());\n\n return responseUtil.successResponse(listUsers);\n\n }", "List<MasterZipcode> getByPage(int pageNo);", "@GetMapping\n public String getUsers(@RequestParam(value =\"page\", defaultValue = \"1\") int page,\n @RequestParam(value = \"limit\", defaultValue = \"25\") int limit)\n {\n return \"Get users for page \" + page + \" limit \" + limit;\n }", "public void testGetUserPageList() throws Exception\r\n {\r\n assertSizeEquals(4, uHandler.getUserPageList(10).getAll());\r\n }", "public List<Blog> list2(String permission,Page page);", "List<User> getUsers();", "List<User> getUsers();", "@Override\n\t@RequestMapping(value=\"/item/list\")\n\tpublic EasyUIDatagrid<TbItem> getItemsByPage(@RequestParam(value = \"page\", defaultValue=\"1\") Integer page,\n\t\t\t@RequestParam(value = \"rows\" ,defaultValue=\"30\") Integer rows) {\n\t\treturn service.getItemsByPage(page, rows);\n\t}", "public Integer getPerPage();", "public List<AgtUser> findAllUserByPage(Map<String,Object> map);", "@Override\r\n\tpublic List<UserDto> findUserListDTO(int age, Pageable page) {\n\t\treturn userDao.findUserListDTO(age, page);\r\n\t}", "@Override\n\tpublic String listByPage(Page page, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String listByPage(Page page, Model m) throws Exception {\n\t\treturn null;\n\t}", "public Page getCustomerProfiles(Integer pageNumber,String requestPage) throws EOTException;", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "@Override\n\tpublic List<Product> getListByPage(int page) {\n\t\tlog.warn(\"warn\");\n\t\tlog.error(\"error\");\n\t\tList<Product> listPro = getListByPage.getListByPage(page*20,20); // 替换为 repository\n\t\treturn listPro;\n\t}", "private void getPaginatedSearchResults(HttpServletRequest request, NewUserActionForm newUserBean,\r\n\t\t\t\tIExtendedPaginatedList thePage)throws BaseAppException{\r\n\t\tUserRegistrationService service = new UserRegistrationService();\r\n\t\tthePage = thePage == null ? getPaginatedListFromRequest(request) : thePage ;\r\n\t\t\t\r\n\t\tString strEmailId = newUserBean.getSch_EmailID();\r\n\t\tString strFirstName = newUserBean.getSch_FirstName();\r\n\t\tString strlastName = newUserBean.getSch_LastName();\r\n\t\tInteger regStatus = newUserBean.getSch_RegStatus().equals(\"\") ? null : new Integer(Integer.parseInt(newUserBean.getSch_RegStatus()));\r\n\t\tint roleId = Integer.parseInt(EducationConstant.AFFILIATE_USER_ROLE);\r\n\t\tString frmDate = newUserBean.getSch_fromDate();\r\n\t\tString toDate = newUserBean.getSch_toDate();\r\n\t\t\r\n\t\tint totalnoOfRecords = service.getUsersCountByRoleId(roleId,strEmailId,\r\n\t\t\t\tstrFirstName,strlastName,regStatus,frmDate,toDate);\t\t\r\n\t\tint frmRecordNo = thePage.getFirstRecordIndex();\r\n\t\tint noOfRecords = thePage.getPageSize();\r\n\t\tthePage.setTotalNumberOfRows(totalnoOfRecords);\r\n\t\t\r\n\t\tArrayList searchResults = service.getUsersByRoleId(roleId,strEmailId,strFirstName,\r\n\t\t\t\tstrlastName,regStatus,frmDate,toDate,frmRecordNo,noOfRecords);\r\n\t\tthePage.setList(searchResults);\r\n\t\tnewUserBean.setPgSearchResults(thePage);\r\n\t\t//Take backup of Search criteria \r\n\t\t NewUserListSearchCriteria searchCriteria = new NewUserListSearchCriteria();\r\n\t\t Utilities.copyProperties(searchCriteria,newUserBean);\r\n\t\t//store searchCriteria \r\n\t\t((PaginatedListImpl)thePage).setSearchCriteria(searchCriteria);\r\n\t\t//cache search results in session\r\n\t\tcacheSearchResult(request,SessionConstants.SCH_RESULTS_NEWUSER_AFFILIATE_LIST, thePage);\t\t\r\n\t}", "Page<AccountDTO> coverListAccountToListEmpDTO(Page<Account> accounts);", "public PageInfo<Book> getBookList() {\n \tPageHelper.startPage(1,2);\r\n List<Book> list = bookMapper.getBookList();\r\n PageInfo<Book> pageInfo=new PageInfo<Book>(list);\r\n\t\treturn pageInfo;\r\n \r\n }", "@Override\n\tpublic int getAllByPageCount(PageBean<SysUser> pageBean) throws Exception {\n\t\treturn 0;\n\t}", "public List<Utilizator> listUsers();", "public List getAllUsers();", "public interface IPageView extends IBaseView {\n\n void showList(List<PageBean> list);\n}", "@Override\r\n\tpublic <T extends Object> List<T> getBeanList(Class<T> c, String specific, String text, int from, int size, String sort)\r\n\t\tthrows Exception {\r\n\t\tClass[] cs;\r\n\t\tif (c==null)cs=new Class[]{}; else cs=new Class[]{c};\r\n\t\tPageInfo page=getBeanList(cs,specific,text,from,size, sort, \"\", false);\r\n\t\treturn page.getList();\r\n\t}", "@Override\n public List<ModelPerson> selectpaging(Integer start, Integer end) {\n return null;\n }", "Page<Student> findPaginated(int pageNo, int pageSize);", "com.heroiclabs.nakama.api.User getUsers(int index);", "List<Item<T>> addItemsForPage(final long page);", "public Page<Account> getAccPage(Pageable page);", "@Override\n\tpublic List<SocialInsuranceRecord> getListByPage(Integer page, Integer rows, String customerName, String idcard,\n\t\t\tString sbcard) {\n\t\treturn dao.getListByPage((page-1)*rows, rows, customerName, idcard, sbcard);\n\t}", "@Override\n\tpublic List<SCommentUserVo> getList(PageVo pvo) {\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tList<SCommentUserVo> list = new ArrayList<>();\n\n\t\tint start = pvo.getPageStart();\n\t\tint end = pvo.getCountPerPage();\n\t\tint boardId = Integer.parseInt(pvo.getKeyword());\n\t\t\n\t\ttry {\n\t\t\tconn = getConnection();\n\n\t\t\tString query = \"SELECT *\t\t\t\t\t\t\t\t\t\" + \n\t\t\t\t \t \"FROM ( SELECT ROWNUM AS RNUM, A.*\t\t\t\" + \n\t\t\t\t \t \"\t\tFROM ( SELECT *\t\t\t\t\t\t\" + \n\t\t\t\t \t \"\t\t\t FROM scomment c\t\t\t\t\" + \n\t\t\t\t \t \"\t\t\t JOIN susers u\t\t\t\t\" + \n\t\t\t\t \t \"\t\t\t ON c.user_id = u.user_id\t\t\" + \n\t\t\t\t \t \"\t\t\t WHERE c.board_id\t= ?\t\t\t\" + \n\t\t\t\t \t \"\t\t\t AND c.isdeleted is NULL\t\t\" + \n\t\t\t\t \t \"\t\t\t ORDER BY c.reg_date DESC\t\t\" + \n\t\t\t\t \t \"\t\t) A\t\t\t\t\t\t\t\t\t\" + \n\t\t\t\t \t \"\t\tWHERE ROWNUM <= ? + ? \t\t\t\t\" + \n\t\t\t\t \t \") \t\t\t\t\t\t\t\t\t\t\t\" + \n\t\t\t\t \t \"WHERE RNUM > ?\t\t\t\t\t\t\t\t\";\n\t\t\tpstmt = conn.prepareStatement(query);\n\t\t\t\n\t\t\tpstmt.setInt(1, boardId);\n\t\t\tpstmt.setInt(2, start);\n\t\t\tpstmt.setInt(3, end);\n\t\t\tpstmt.setInt(4, start);\n\t\t\t\n\t\t\trs = pstmt.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tSCommentUserVo vo = new SCommentUserVo();\n\t\t\t\t\n\t\t\t\tvo.setCommentId(rs.getInt(\"comment_id\"));\n\t\t\t\tvo.setContent(rs.getString(\"content\"));\n\t\t\t\tvo.setBoardId(rs.getInt(\"board_id\"));\n\t\t\t\tvo.setUserId(rs.getInt(\"user_id\"));\n\t\t\t\tvo.setRegDate(rs.getString(\"reg_date\"));\n\t\t\t\tvo.setIsdeleted(rs.getString(\"isdeleted\"));\t\n\t\t\t\tvo.setName(rs.getString(\"name\"));\n\t\t\t\t\n\t\t\t\tlist.add(vo);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"error:\" + e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (pstmt != null) pstmt.close();\n\t\t\t\tif (conn != null) conn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"error:\" + e);\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "@Override\n\tpublic PageBean<AnimalHelp> findAnimal(Integer page, AnimalFindHelp AnimalFindHelp) {\n\t\tPageBean<AnimalHelp> pageBean = new PageBean<AnimalHelp>();\n\t\t\n\t\tSystem.out.println(\"pageBean : \" + pageBean + \";\" + page);\n\t\tpageBean.setPage(page);\n\t\tpageBean.setLimit(com.bs.constant.Constant.PAGE_LIMIT);\n\t\t//int totalCount = animalDao.findCountFeed();\n\t\tint totalCount = 0;\n\t\ttotalCount = animaldao.findCountByInformation(AnimalFindHelp);\n\t\tSystem.out.println(\"totalCount = \" + totalCount);\n\t\tpageBean.setTotalCount(totalCount);\n\t\tint totalPage = (int)Math.ceil((double)totalCount/(double)Constant.PAGE_LIMIT);\n\t\tSystem.out.println(\"totalPage = \" + totalPage);\n\t\tpageBean.setTotalPage(totalPage);\n\t\tint start = pageBean.getLimit()*(pageBean.getPage() - 1) + 1;\n\t\tSystem.out.println(\"start = \" + start);\n\t\tList<?> primarylist = animaldao.findAllFeedByPage(start,AnimalFindHelp);\n\t\tSystem.out.println(\"primarylist == null : \" + primarylist == null);\n\t\tif (primarylist != null && primarylist.size() > 0) {\n\t\t\tSystem.out.println(\"查到的list的长度\" + primarylist.size());\n\t\t\tSystem.out.println(primarylist.get(0));\n\t\t\tAnimal findAnimal = new Animal();\n\t\t\tAnimalInformation findAnimalInformation = new AnimalInformation();\n\t\t\t\n\t\t\tList<AnimalHelp> animalFindHelps = new ArrayList<AnimalHelp>();\n\t\t\tSystem.out.println(\"animalFindHelps 长度 =\" + animalFindHelps.size());\n\t\t\tfor (int i = 0; i < primarylist.size(); i++) {\n\t\t\t\tAnimalHelp animalHelp = new AnimalHelp();\n\t\t\t\tAnimalFindHelp feedlisAnimalFindHelp = new AnimalFindHelp();\n\t\t\t\tSystem.out.println(\"i = \" + i);\n\t\t\t\tObject[] object = (Object[]) primarylist.get(i);\n\t\t\t\tSystem.out.println(\"获取到object,长度为:\" + object.length);\n\t\t\t\tfindAnimal = (Animal) object[0];\n\t\t\t\tSystem.out.println(\"成功获取到findAnimal对象:\" + findAnimal.getAnimalId() );\n\t\t\t\tfindAnimalInformation = (AnimalInformation) object[1];\n\t\t\t\tSystem.out.println(\"成功获取到findAnimalInformation对象:\" + findAnimalInformation.getAnimal().getAnimalId());\n\t\t\t\tanimalHelp.setAnimal(findAnimal);\n\t\t\t\tSystem.out.println(\"animalHelp中成功添加了findAnimal对象:\" + animalHelp.getAnimal().getAnimalId());\n\t\t\t\tanimalHelp.setAnimalInformation(findAnimalInformation);\n\t\t\t\tSystem.out.println(\"animalHelp中成功添加了findAnimalInformation对象:\" + animalHelp.getAnimalInformation().getNumber());\n\t\t\t\tanimalFindHelps.add(animalHelp);\n\t\t\t\tSystem.out.println(\"animalFindHelps成功添加了feedlistAnimalFindHelp对象:\"+animalFindHelps.size());\n\t\t\t\tSystem.out.println(\"animalFindHelps:\"\n\t\t\t\t\t\t+ animalFindHelps.get(i)\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t\tpageBean.setList(animalFindHelps);\n\t\t\treturn pageBean;\n\t\t}\nelse {\n\treturn null;\n}\n}", "List<Board> boardListPage(Criteria cri) throws Exception;", "@Override\n\tpublic List stulist(int page, int limit) {\n\t\treturn null;\n\t}", "List<RiceCooker> getPerPage(long startRow, long maxRows);", "@Override\r\n\tpublic List<User> selectAllUser(int pageNumber,int pageSize) {\n\t\tList<User> result = null;\r\n\t\tresult = userMapper.selectAllUser(pageNumber,pageSize);\r\n\t\treturn null == result ? new ArrayList<User>() : result;\r\n\t}", "Results getResultsPage(FilterSpecifier.ListBy listBy, int page) throws SearchServiceException;", "Page<ChatDTO> findAllByUser(String username, Pageable pageable);", "@Override\r\n\tpublic PageDataList<CustomerBaseinfoModel> customerBaseinfoList(int pageNumber,int pageSize,CustomerBaseinfoModel model) {\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tsb.append(\" select distinct w.id,w.name,u.real_name,c.sex,u.mobile_phone, \")\r\n\t\t .append(\" (DATE_FORMAT(CURDATE(),'%Y') - SUBSTR(u.card_id,7,4)) age, \")\r\n\t\t .append(\" u.card_id, ab.bank_no,ab.bank,u.add_time,i.real_name_verify_time as real_name_time,i.real_name_verify_time as bind_card_time, \")\r\n\t\t .append(\" c.status,p.coupon_code,a.use_money,u.user_id from rd_user u \")\r\n\t\t .append(\" LEFT JOIN ehb_wealth_user wu ON u.user_id = wu.user_id \")\r\n\t\t .append(\" LEFT JOIN ehb_zc_wealth_manager_user m ON wu.id = m.wealth_user_id \")\t\t\r\n\t\t .append(\" left join ehb_zc_wealth_manager w on m.wealth_manager_id = w.id \" )\r\n\t\t .append(\" left join rd_user_identify i on u.user_id = i.user_id \")\r\n\t\t .append(\" left join rd_user_base_info b on u.user_id = b.user_id \" )\r\n\t\t .append(\" left join rd_user_cache c on u.user_id = c.user_id \" )\r\n\t\t .append(\" left join rd_account_bank ab on u.user_id = ab.user_id \")\r\n\t\t .append(\" left join rd_user_invite ui on u.user_id = ui.user_id \")\r\n\t\t .append(\" left join rd_user_promot p on ui.invite_user = p.user_id \")\r\n\t\t .append(\" left join rd_account a on u.user_id = a.user_id where ab.status = 1 \");\r\n\t\tString strSql = sb.toString();\r\n\t if (!StringUtil.isBlank(model.getSearchName())) {\r\n\t \tstrSql += \" and (u.mobile_phone like '%\" + model.getSearchName() + \"%' \" + \r\n \t \" or u.real_name like '%\" + model.getSearchName() + \"%') \";\r\n\t\t} \r\n\t\tQuery query = em.createNativeQuery(strSql);\r\n\t\tPage page = new Page(query.getResultList().size(), pageNumber,pageSize);\r\n\t\tquery.setFirstResult((pageNumber - 1) * pageSize);\r\n\t\tquery.setMaxResults(pageSize);\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Object[]> list = query.getResultList();\r\n\t\tPageDataList<CustomerBaseinfoModel> pageDataList_ = new PageDataList<CustomerBaseinfoModel>();\r\n List<CustomerBaseinfoModel> cpmList = new ArrayList<CustomerBaseinfoModel>();\r\n pageDataList_.setPage(page);\r\n int i = 1;\r\n \tfor (Object[] o : list) {\r\n \t\tCustomerBaseinfoModel customer = new CustomerBaseinfoModel();\r\n\t\t\tcustomer.setId(i);\r\n\t\t\tcustomer.setSaleCode(o[0]==null?\"\":o[0].toString());\r\n\t\t\tcustomer.setSaleName(o[1]==null?\"\":o[1].toString());\r\n\t\t\tcustomer.setRealName(o[2]==null?\"\":o[2].toString());\r\n\t\t\tcustomer.setSex(o[3]==null?0:((Boolean)o[3]?1:0));\r\n\t\t\tcustomer.setPhone(o[4]==null?\"\":o[4].toString());\r\n\t\t\tcustomer.setAge(o[5]==null?0:((Double)o[5]).intValue());\r\n\t\t\tcustomer.setCertificate(o[6]==null?\"\":o[6].toString());\r\n\t\t\tcustomer.setBankNo(o[7]==null?\"\":o[7].toString());\r\n\t\t\tcustomer.setBank(o[8]==null?\"\":o[8].toString());\r\n\t\t\tcustomer.setRegisterTime(o[9]==null?new Date():(Date)o[9]);\r\n\t\t\tcustomer.setRealNameTime(o[10]==null?new Date():(Date)o[10]);\r\n\t\t\tcustomer.setBindCardTime(o[11]==null?new Date():(Date)o[11]);\r\n\t\t\tcustomer.setAccountState(o[12]==null?0:((Boolean)o[12]?1:0));\r\n\t\t\tcustomer.setRecommendCode(o[13]==null?\"\":o[13].toString());\r\n\t\t\tcustomer.setUseMoney(o[14]==null?0:Double.parseDouble(o[14].toString()));\r\n\t\t\tstrSql = \" select sum(account) from rd_borrow_tender where user_id = \" + (o[15]==null?0:Integer.parseInt(o[15].toString()));\r\n\t\t\tquery = em.createNativeQuery(strSql);\r\n\t\t\tif(query.getResultList()!=null&&query.getResultList().size()>0&&query.getResultList().get(0)!=null)\r\n\t\t\t{\r\n\t\t\t\tString money = query.getResultList().get(0).toString();\r\n\t\t\t\tcustomer.setInvestMoney(Double.parseDouble(money));\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tcustomer.setInvestMoney(0.0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcpmList.add(customer);\r\n\t\t\ti++;\r\n \t}\r\n\t\tpageDataList_.setList(cpmList);\r\n\t\treturn pageDataList_;\r\n\t}", "public ActionForward getFriendListByPage(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException\n\t{\n\t\tint page=Integer.parseInt(request.getParameter(\"page\"));\n\t\t\n\t\t//UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t//userDetails.getUsername();\n\n\t\tUser user= getCurrentUser();\n\t\t\n\t\tfriendService = (IFriendService) getBean(\"FriendService\");\n\t\t//List friendList=friendService.findByPageAndUserId(page, user.getUserId());\n\t\tList allFiendList=friendService.findByUserId(user.getUserId());\n\t\tString responseText=\"\";\n\t\tresponseText=this.toPageFriendJSON(allFiendList,page);\n\t\tresponse.getWriter().write(responseText);\n\t\treturn mapping.findForward(\"\");\n\t}", "public interface PageSwapper {\n public List<Student> getPage(int currentPage, int ammountOfRecords);\n public int getAmountOfRecords();\n}", "public List<User> list(String currentUsername);", "Page<LoginHistoryEntity> findAll(Integer page);", "Page<Accessprofile> listWithCriterasByPage(List<SearchCriteria> searchCriterias, Pageable pageable);", "public ListUserBean(){\n \n }", "@Override\n\tpublic List<User> listByPage(Params params) throws Exception {\n\t\treturn null;\n\t}", "List<Product> getProductPage(int pageNumber, int pageSize);", "List<ShopItem> findAllByInTopPageTrue();", "List<User> getAllUsers();", "List<User> getAllUsers();", "public interface UserService extends ICommonService<User> {\r\n\r\n public Page<User> findPage(User user,Integer sortId, int pagenum, int pagesize);\r\n\r\n public List<Map<String, Object>> pageToExcel(Map<String, Object> map);\r\n\r\n}" ]
[ "0.8309894", "0.8044249", "0.7605636", "0.7530972", "0.73640233", "0.7359319", "0.7166331", "0.7157256", "0.7152412", "0.71431714", "0.7128543", "0.70795155", "0.7054667", "0.7017053", "0.6968034", "0.69652337", "0.69488186", "0.69351906", "0.69064534", "0.6874906", "0.683545", "0.6796144", "0.6752512", "0.67454636", "0.674236", "0.6733902", "0.6710616", "0.6700728", "0.6690918", "0.66719127", "0.66643596", "0.66583806", "0.66313106", "0.66285783", "0.662856", "0.6603688", "0.6587617", "0.65817416", "0.65491927", "0.6547505", "0.6543142", "0.65309936", "0.6530109", "0.65278643", "0.6525089", "0.65099496", "0.6507873", "0.6500473", "0.6497505", "0.6493492", "0.6493051", "0.64888483", "0.6485378", "0.6484789", "0.6458751", "0.6455042", "0.6455042", "0.64503", "0.6441416", "0.6418972", "0.6414551", "0.6410529", "0.6410529", "0.6402678", "0.6395838", "0.6386813", "0.6384111", "0.63695616", "0.63664025", "0.63562894", "0.6347822", "0.6347395", "0.63441724", "0.63370013", "0.6331795", "0.6331439", "0.631618", "0.63061094", "0.6303361", "0.6288466", "0.6284626", "0.62823176", "0.62741685", "0.626872", "0.6263208", "0.6262538", "0.62587094", "0.6258131", "0.62558335", "0.6254338", "0.62407976", "0.6236279", "0.6235854", "0.62288177", "0.6226543", "0.6221369", "0.6210534", "0.62068325", "0.62030923", "0.62030923", "0.6196407" ]
0.0
-1
Tests the constructor of the professor class with two parameters passed in order, those parameters will be be first name and last name
@Test public void testProfessorConstructor2params(){ String firstname = "Steven"; String lastName = "Beaty"; Professor testProfessor = new Professor(firstname, lastName); Assert.assertEquals("Steven", testProfessor.getFirstName()); Assert.assertEquals("Beaty", testProfessor.getLastName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testProfessorConstructor3Params(){\n\t\tString firstname = \"Dennis\";\n\t\tString lastName = \"Ritchie\";\n\t\tlong id = 0451;\n\t\tProfessor testProfessor = new Professor(firstname, lastName, id);\n\t\tAssert.assertEquals(\"Dennis\", testProfessor.getFirstName());\n\t\tAssert.assertEquals(\"Ritchie\", testProfessor.getLastName());\n\t\tAssert.assertEquals(Long.valueOf(0451), testProfessor.getId());\n\t}", "public Professor(String surname, String firstName, double salary)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(salary);\n\t}", "public Professor(String surname, String firstName)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(this.minAnnualSalary); //this probably doesn't make sense, at least did i not really understand\n\t\t\t\t//the use-case for this task.\n\t\t\t\t//Why the hell would i assign the value of a member of the class, inside a constructor?\n\t\t\t\t//minAnnualSalary can in no case contain a valid value?\n\t\t\t\t//maybe minAnnualSalary should rather be a static member for all Professors?\n\t\t\t\t//or maybe just a plain hardcoded default value? \n\t}", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "@Test\n\tpublic void testProfeessorFirstName(){\n\t\tString firstName = \"Linus\";\n\t\ttestProfessor.setFirstName(firstName);\n\t\tAssert.assertEquals(\"Linus\", testProfessor.getFirstName());\n\t}", "public Professor()\n\t{\n\t\t//stuff\n\t}", "public Professor(Professor prof)\r\n {\r\n this.name = prof.name;\r\n this.id = prof.id;\r\n }", "public Person(String first, String last) {\n // Set instance var firstname to what is called from constructor\n this.firstName = first; \n // Set instance var lastname to what is called from constructor\n this.lastName = last;\n }", "public Person(String first, String middle, String last) {\n this.firstNames = first+ \" \" +middle;\n this.lastName = last;\n }", "@Test\n\tpublic void testProfeessorLastName(){\n\t\tString lastName = \"Torvalds\";\n\t\ttestProfessor.setLastName(lastName);\n\t\tAssert.assertEquals(\"Torvalds\", testProfessor.getLastName());\n\t}", "public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }", "public Person(String firstName, String lastName) {\n this.lastName = lastName;\n this.firstName = firstName;\n }", "public void testGetFirstName()\r\n throws Exception\r\n {\r\n setUp();\r\n assertEquals(s1.getFirstName(), \"Colleen\");\r\n assertEquals(s2.getFirstName(), \"Susan\");\r\n\r\n Student blank = new Student(\"0\", \"\", \"\");\r\n assertEquals(blank.getFirstName(), \"\");\r\n\r\n }", "public Person(String firstName, String lastName) {\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public void testGetLastName()\r\n throws Exception\r\n {\r\n setUp();\r\n assertEquals(s1.getLastName(), \"Schmidt\");\r\n assertEquals(s2.getLastName(), \"Pak\");\r\n Student blank = new Student(\"0\", \"\", \"\");\r\n assertEquals(blank.getLastName(), \"\");\r\n }", "public Employee(String firstName, String lastName, String SSN){\r\n this.firstName=firstName;\r\n this.lastName=lastName;\r\n this.SSN=SSN;\r\n }", "public Name(String firstName, String middleName, String lastName){\t\t\n\t\tthis.firstName = firstName;\n\t if(this.firstName == null)\n\t \tthrow new NullPointerException(\"First Name\");\n\t this.middleName = middleName;\n\t this.lastName = lastName;\n\t}", "public static void constructor1_name_initialize()\r\n\t{\r\n\t\tString name = \"Dennis\";\r\n\t\tString college = \"Red River College\";\r\n\t\tdouble standardAptitudeTestScore = 222;\r\n\t\tdouble gradePointAverage = 2.2;\r\n\r\n\t\tUndergraduateApplicant target = new UndergraduateApplicant(name, college, standardAptitudeTestScore, gradePointAverage);\r\n\r\n\t\tString expected = name;\r\n\t\tString actual = target.getName();\r\n\r\n\t\tSystem.out.printf(\"Expected: %s%nActual: %s%n%n\", expected, actual);\r\n\t}", "public NameInfo(String inFirst, String inLast)\n\t{\n\t\t//Set instance data.\n\t\tfirstName = inFirst;\n\t\tlastName = inLast;\n\n\t}", "public static void main(String[] args) {\n Student student = Student.createInstanceByIdAndFirstName(10 , \"Jhn\");\n Student student1 = Student.createInstanceByIdAndLastName(11, \"Smith\");\n }", "public Person(String name, String surname) {\n this.name = name;\n this.surname = surname;\n }", "public SalesPerson(String firstName, String lastName, String ppsNumber){\r\n //pulls the constructor with parameters from the superclass SalesEmployee\r\n super(firstName, lastName, ppsNumber);\r\n }", "public First()\r\n{\r\n\tScanner in = new Scanner(System.in);\r\n\tSystem.out.println(\"Enter your First Name: \");\r\n\tthis.fname=in.next();\r\n\tSystem.out.println(\"Enter your Last Name: \" );\r\n\tthis.lname=in.next();\t\r\n\tSystem.out.println(\"Enter Your GradeYear :\\n [1]Freshman \\n[2] Sophomore \\n[3] Junior \\n[4] Senior \\n\");\r\n\tthis.gradeyear=in.nextInt();\t\r\n\tsetStudentId();\r\n\tSystem.out.println(\"Name: \"+fname+\" \"+lname+\"\\nGrade-year: \"+gradeyear+\"\\nStudentID: \"+student_id+\"\");\r\n\tSystem.out.print(\"\\nEnter Your Course Name: \");\r\n}", "@Test\n public void constructorTest(){\n String retrievedName = doggy.getName();\n Date retrievedBirthDate = doggy.getBirthDate();\n Integer retrievedId = doggy.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "public Person (String firstName, String lastName, String address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.address = address;\n\n }", "public static void main(String[] args) {\n\n Student st = new Student (\"shagria\",\"kabir\",95,101);\n\n Assert.assertEquals(st.getFirstName(),\"shagria\");\n Assert.assertEquals(st.getLastName(),\"kabir\");\n Assert.assertEquals(st.getScore(),90);\n Assert.assertEquals(st.getId(),101);\n\n }", "@Test (dataProvider = \"userData\")\n\tpublic void canInputFirstAndLastName(userData John) {\n\t\tboolean expected = true;\n\t\t\n\t\tboolean actual = new AutomationPracticeFormPageObject(driver, baseUrl) \n\t\t.openAutomationWebPage()\n\t\t.inputFirstName(John.getFirstName())\n\t\t.inputLastName(John.getLastName())\n\t\t.isFirstNameAndLastNameFilled();\n\t\t\n\t\tAssert.assertEquals(actual, expected);\n\t}", "public Counselor(String first, String last, String password, String p1, String p2, String p3, String p4, \n String p5, String p6, String p7, String p8)\n {\n super(first, last, password, p1, p2, p3, p4, p5, p6, p7, p8);\n students = new ArrayList<Student>();\n }", "public Name (String firstName, String lastName) {\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\t\r\n\t}", "public AssistantProfessor(String name, int age, String address, String phoneNumber, int yearBegan, int facultyId, String department, double yearlySalary, int numberOfPapers, int yearsUntilTenure){\n super(name, age, address, phoneNumber, yearBegan, facultyId, department, yearlySalary, numberOfPapers);\n m_yearsUntilTenure = yearsUntilTenure;\n }", "public Instructor(String firstName, String lastName, String email) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.email = email;\n }", "public Professor(String name, int id)\r\n {\r\n this.name = name;\r\n this.id = id;\r\n }", "public Student(String firstName, String lastName, int age, double gpa, String major, String department, List<Course> courses) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.gpa = gpa;\n this.major = major;\n this.department = department;\n this.courses = courses;\n }", "public Person2(String fname, String lname) {\n this.fname = fname;\n this.lname = lname;\n }", "public FirstName() {\n super();\n }", "public NameInfo(String inFirst, String inMiddle, String inLast)\n\t{\n\t\t//Set instance data.\n\t\tfirstName = inFirst;\n\t\tmiddleName = inMiddle;\n\t\tlastName = inLast;\n\n\t}", "public SalesEmployee(String firstName, String lastName, String number, double salary, double commission){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n this.number = number;\r\n this.salary = salary;\r\n this.commission = commission;\r\n }", "public static void main(String[] args) {\n /**\n * Construction par defaut\n */\n Personne p = new Personne();\n System.out.println(p.toString());\n /**\n * Construction avec comme parametre nom et prenom\n */\n Personne p1 = new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\");\n System.out.println(p1.toString());\n /**\n * Construction avec comme parametre nom, prenom et age\n */\n Personne p2 = new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\",22);\n System.out.println(p2.toString());\n /**\n * Construction tous les parametres\n */\n Personne p3= new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\",22,Sexe.Masculin);\n System.out.println(p3.toString());\n }", "public ShelterPerson(String fName, String lName){\n\t\tthis();\n\t\tthis.firstName = fName;\n\t\tthis.lastName = lName;\n\t}", "public Staff (String firstName, String lastName, String cpr, String type, \n String[] address, String phoneNr, String password, int hours, \n double salary, int vacation, int accessLevel) \n {\n this.firstName = firstName;\n this.lastName = lastName;\n this.cpr = cpr;\n this.type = type;\n this.address = address;\n this.phoneNumber = phoneNr;\n this.password = password;\n this.hours = hours;\n this.salary = salary;\n this.vacation = vacation;\n this.accessLevel = accessLevel;\n }", "public Name(String firstName, String lastName) {\n if (firstName == null || lastName == null)\n throw new NullPointerException();//et nimekomponendid oleksid kindlasti olemas\n this.firstName = firstName;\n this.lastName = lastName;\n }", "@Test\n void employee_test(){\n Employee test_emp = new Employee();\n test_emp.parseInput(\"Johnson,Eric,77777\");\n assertTrue((test_emp.getLastName().equals(\"Johnson\"))&&(test_emp.getFirstName().equals(\"Eric\"))&&(test_emp.getSalary().equals(\"77777\")));\n }", "public void testers() {\r\n assertEquals(\"A\", name1.getFirstName());\r\n assertEquals(\"B\", name1.getLastName());\r\n assertEquals(\"William\", name2.getMiddleName());\r\n name2.setFirstName(\"Luke\");\r\n assertEquals(\"Luke\", name2.getFirstName());\r\n name3.setLastName(\"Smith\");\r\n assertEquals(\"Smith\", name3.getLastName());\r\n name2.setMiddleName(\"Mike\");\r\n assertEquals(\"Mike\", name2.getMiddleName());\r\n boolean result1 = false;\r\n if (0 == name1.compareTo(name1)) {\r\n result1 = true;\r\n }\r\n assertTrue(result1);\r\n boolean result2 = false;\r\n if (name1.compareTo(name2) == -1) {\r\n result2 = true;\r\n }\r\n assertTrue(result2);\r\n boolean result3 = false;\r\n if (name2.compareTo(name1) == 1) {\r\n result3 = true;\r\n }\r\n assertTrue(result3);\r\n boolean result4 = false;\r\n if (name3.compareTo(name4) == -1) {\r\n result4 = true;\r\n }\r\n assertTrue(result4);\r\n\r\n boolean result5 = false;\r\n if (name4.compareTo(name3) == 1) {\r\n result5 = true;\r\n }\r\n assertTrue(result1);\r\n assertTrue(result2);\r\n assertTrue(result3);\r\n assertTrue(result4);\r\n assertTrue(result5);\r\n }", "public Person(String vorname, String nachname) {\n\n\t}", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public NameInfo(String inFirst)\n\t{\n\t\t//Set instance data.\n\t\tfirstName = inFirst;\n\n\t}", "@Test\n public void firstNameValid() {\n User user = new User( \"id\", \"firstName\", \"lastName\", \"username\", \"password\");\n\n Assertions.assertNotEquals(\"\", user.getFirstName());\n Assertions.assertNotEquals(null, user.getFirstName());\n }", "public Student(String in_name, double in_gpa)\n {\n name = in_name;\n gpa = in_gpa;\n getQuizzes();\n }", "public Student(String firstName, String lastName, String email) {\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\r\n\t\tthis.email = email;\r\n\t}", "public Name(String firstName, String lastName) {\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public Student (String first, String last, String id)\r\n\t{\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.studentId = id;\r\n\t}", "public UserImplPart1(int studentId, String yourName, int yourAge,int yourSchoolYear, String yourNationality){\n this.studentId = studentId;\n this.name= yourName;\n this.age = yourAge; \n this.schoolYear= yourSchoolYear;\n this.nationality= yourNationality;\n}", "public Student(){\n firstName = \"\";\n lastName = \"\";\n bootcamp = \"\";\n id = 42;\n grade = 1.0;\n }", "public User(String names, String lastnames, int age){\n this.names = names;\n this.lastnames = lastnames;\n this.age = age;\n }", "public void testGetName()\r\n throws Exception\r\n {\r\n setUp();\r\n Student student = new Student(\"111111111\", \"a\", \"a\");\r\n\r\n assertEquals(student.getName(), \"a a\");\r\n assertEquals(student.getName().length(), 3);\r\n\r\n Student newStudent = new Student(\"111111111\", \"Susan\", \"Obi\");\r\n assertEquals(newStudent.getName(), \"Susan Obi\");\r\n\r\n Student blank = new Student(\"90\", \" \", \"\");\r\n assertEquals(blank.getName(), \" \");\r\n }", "public Student( String name , String address ){//constructor with arguments \r\n \tID_COUNTER++;\r\n \tstudentNum = ID_COUNTER;\r\n getFirstAndLastName( name );\r\n this.address = address ;\r\n loginID = makeLoginID() ;\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "@Test\n public void lastNameValid() {\n User user = new User( \"id\", \"firstName\", \"lastName\", \"username\", \"password\");\n\n Assertions.assertNotEquals(\"\", user.getLastName());\n Assertions.assertNotEquals(null, user.getLastName());\n }", "@Test\n public void testConstructor() {\n \n Player player = new Player(\"Computer2\");\n \n // Assert the fields are what we expect\n \n String name = player.getName();\n Assert.assertEquals(\"Computer2\", name);\n }", "public Student(String requiredStudentName)\n {\n studentName = requiredStudentName;\n }", "@Test\r\n public void testAddPers1() {\r\n assertEquals(p1.toString(), bank.searchPerson(p1.getFullName()).toString());\r\n }", "@Test\n public void testUserIdIsCreatedFromConstructor() {\n\n assertEquals(owner1.getUserId(), \"harry.louis\");\n assertEquals(owner2.getUserId(), \"mary.louis\");\n\n }", "public static void main(String[] args) {\n\t\tnew FirstConstructor();\r\n\t\tnew FirstConstructor(\"Baxter\");\r\n\t}", "public ShelterPerson(){\n\t\tthis.firstName = \"\";\n\t\tthis.lastName = \"\";\n\t}", "@Test\r\n public void testAddPers2() {\r\n assertEquals(p2.toString(), bank.searchPerson(p2.getFullName()).toString());\r\n }", "@Test\n void studentNameTest(){\n String expectedResult = \"Lim\"; // Input for testing\n Student student = new Student(expectedResult);\n\n System.out.println(\"Test Case #1\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n String actualResult = student.getName(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n\n }", "public Student(int studentID, String firstName, String lastName) {\n this.studentID = studentID;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public Eleve(String firstname, String lastname) {\r\n\t\tsuper();\r\n\t\tthis.firstname = firstname;\r\n\t\tthis.lastname = lastname;\r\n\t}", "@Test\n\t void testFirstName() {\n\t\tString expected=\"Mohammad\";\n\t\tString actual=user.getFirstName();\n\t\tassertEquals(expected, actual);\n\t}", "public Employee(String firstName, String lastName) {\n\t\tsuper();\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t}", "public Student(String name, String gender, String email, Course course1, \n Course course2, Course course3){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = course1;\n this.course2 = course2;\n this.course3 = course3;\n }", "@Test\r\n\tpublic void TC_04_verify_lastName_Mandatory_Field() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details except last name\r\n\t\t\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", \"\");\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding last name\r\n\t\t// is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Please enter a value for Last Name\");\r\n\r\n\t}", "public Person( String emailAddress, String first, String last, \r\n String password, String currency, String creditCard )\r\n {\r\n setEmail( emailAddress );\r\n setFirstName( first );\r\n setLastName( last );\r\n setPassword( password );\r\n setCurrency( currency );\r\n setCreditCard( creditCard );\r\n }", "public FirstName(String entryString){\n super(entryString);\n }", "@Test\n @DisplayName(\"PersonDTOAssembler - Intantiates DTOAssembler-SecondConstructor\")\n void personDTOAssembler_InstatiatesDTOAssembler_SecondConstructor() {\n String mariaEmail = \"[email protected]\";\n String mariaName = \"Maria Silva\";\n LocalDate mariaBirthDate = LocalDate.of(1973, 07, 25);\n String mariaBirthplace = \"Braga\";\n\n Email emailMaria = Email.createEmail(mariaEmail);\n Name nameMaria = Name.createName(mariaName);\n Birthdate birthateMaria = Birthdate.createBirthdate(mariaBirthDate);\n Birthplace birthplaceMaria = Birthplace.createBirthplace(mariaBirthplace);\n\n String ledgerId = \"123\";\n LedgerID ledgerID = new LedgerID(ledgerId);\n\n\n PersonID fatherID = null;\n PersonID motherID = null;\n\n String IS_NOT_DEFINED = \"Is Not Defined\";\n\n //PersonDTO\n String personMariaBirthdate = birthateMaria.getBirthdate().toString();\n\n //Expected\n PersonDTO personDTOExpected = new PersonDTO(mariaEmail,ledgerId, mariaName, personMariaBirthdate, mariaBirthplace, IS_NOT_DEFINED, IS_NOT_DEFINED);\n\n //Act\n\n PersonDTO personDTO = PersonDTOAssembler.createDTOFromDomainObject(emailMaria, ledgerID, nameMaria, birthateMaria, birthplaceMaria, fatherID, motherID);\n\n\n\n //Assert\n assertEquals(personDTOExpected, personDTO);\n }", "@Test\r\n\tpublic void constructorDeclarationTest(){\r\n\t\tint[] pointsToTest = {2,7,9,16,17,18,19,20};\r\n\t\tfor(int i=0;i<pointsToTest.length;i++)\r\n\t\t{\r\n\t\t\tassertEquals(pointsToTest[i],new PointGrade(pointsToTest[i]).getPoints());\r\n\t\t}\r\n\t}", "@Test\n\tpublic void constructorTest() throws PassengerException{\n\t\tFirst myPassenger = new First(10,100);\n\t\tassertNotNull(myPassenger);\n\t}", "public Student(int sem, double gpa, String firstName, String lastName) {\n super(firstName, lastName);\n this.sem = sem;\n this.gpa = gpa;\n }", "public Passenger(String foreName, String lastName, String emailAddress)\n {\n this.foreName = foreName;\n this.lastName = lastName;\n this.emailAddress = emailAddress;\n }", "public Person (String inName, String inFirstName, LocalDate inDateOfBirth) {\n super(inName);\n this.dateOfBirth = inDateOfBirth;\n this.firstName = inFirstName;\n }", "public Patient(String myLast, String myFirst, int age) {\n this.lastname = myLast;\n this.firstname = myFirst;\n this.age = age;\n }", "public EmployeeRecord(String newLastName, String newFirstName, char newType)\n {\n if ((Character.toLowerCase(newType) != 'h' && Character.toLowerCase(newType) != 'p' && Character.toLowerCase(newType) != 's') || !newLastName.matches(\"[a-zA-Z]+\") || !newFirstName.matches(\"[a-zA-Z]+\")) return;\n else \n {\n this.lastName = newLastName;\n this.firstName = newFirstName;\n this.type = newType;\n this.grossPay = this.taxAmt = this.netPay = 0.00;\n }\n }", "private void classes()\n\t{\n\t\t//\tVariables and declarations\n\t\tint b = 5, c = 7, d = 100, e = 576, sum;\n\t\tString fName = \"NULL\", lName = \"NULL\", fullName;\n\t\tt_CH4_Classes noArg = new t_CH4_Classes();\n\t\t\n\t\t//\t\tPrompting the user to enter two separate names, one\n\t\t//\tfor the first name, the other for the last name.\n\t\tSystem.out.print(\"\\nPlease enter a first name: \");\n\t\tfName = in.next();\n\t\tSystem.out.print(\"Please enter a last name: \");\n\t\tlName = in.next();\n\t\t\n\t\t\n\t\t//\t\tCalling the method order that will concatinate the names and\n\t\t//\treturn a full name.\n\t\tnoArg.setName(fName, lName);\n\t\tfullName = noArg.getName();\n\t\tSystem.out.printf(\"Back in Chapter 4, fullName is %s.\\n\", fullName);\n\t\t\n\t\t//\tRunning simple addition method...\n\t\tsum = noArg.add(b, c);\n\t\tSystem.out.printf(\"sum = %d \\n\", sum);\n\t\t//\t...which will perform the same with any values passed...\n\t\tsum = 0;\n\t\tsum = noArg.add(d, e);\n\t\tSystem.out.printf(\"sum = %d \\n\", sum);\n\t\t//\t...including the same variable twice.\n\t\tsum = 0;\n\t\tsum = noArg.add(e, e);\n\t\tSystem.out.printf(\"sum = %d \\n\", sum);\n\t\t\n\t\t//\t\tAbove we declared an object with no arguments. Here\n\t\t//\tis an example of declaring an object with one string argument...\n\t\tt_CH4_Classes oneArg = new t_CH4_Classes(fName);\n\t\tSystem.out.printf(\"Name from oneArg is %s\\n\", oneArg.getName());\n\t\t\n\t\t//\t...or one int argument...\n\t\tt_CH4_Classes oneIntArg = new t_CH4_Classes(fName);\n\t\tSystem.out.printf(\"Name from oneIntArg is %s\\n\", oneIntArg.getName());\n\t\t\n\t\t//\t...or two string arguments...\n\t\tt_CH4_Classes twoArg = new t_CH4_Classes(\"Quenby\", \"Walls\");\n\t\tSystem.out.printf(\"Name from twoArg is %s\\n\", twoArg.getName());\n\t\t\n\t\t//\t...or three arguments, two strings and one int!\n\t\tt_CH4_Classes threeArg = new t_CH4_Classes(fName);\n\t\tSystem.out.printf(\"Name from threeArg is %s\\n\", threeArg.getName());\n\t}", "public Person(String first, String last) {\n\t\tthis(first, last, -1);\n\t}", "public static void main(String[] args) {\n \n Profesor a = new Profesor(\"Juan Hernández\",\"Garcia\",\"22-387-11\");\n System.out.println(a);\n \n }", "public static void main(String[] args) {\n\r\n clsAlumno alumno1 = new clsAlumno();\r\n\r\n alumno1.setNombre(\"Eneko\");\r\n\r\n alumno1.setApellido(\"Galdos\");\r\n\r\n alumno1.setDNI(\"72826873H\");\r\n\r\n alumno1.setCreditos(60);\r\n\r\n alumno1.mostrarPersona();\r\n\r\n alumno1.mostrarCreditos();\r\n\r\n System.out.println();\r\n\r\n clsProfesor profesor1 = new clsProfesor();\r\n\r\n profesor1.setNombre(\"Javier\");\r\n\r\n profesor1.setApellido(\"Cerro\");\r\n\r\n profesor1.setDNI(\"11111111A\");\r\n\r\n profesor1.setDepartamento(\"Informática\");\r\n\r\n profesor1.mostrarPersona();\r\n\r\n profesor1.mostrarDepartamento();\r\n\r\n }", "public Student(String firstName, String lastName, int grade) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade; \n studentNumber = totalStudents++; // the new student's number is equal the total number of students, therefore, each student number will be unique\n }", "@Test\r\n public void testCtorLegalName1() throws IllegalUserNameLengthException,\r\n IllegalUserUsernameLengthException, IllegalUserNameException, IllegalUserRoleException,\r\n IllegalUserUsernameException {\r\n new User(\"username\", Role.DONOR, \"ed\");\r\n }", "Name(String fName, String lName) {\n if (fName.length() == 0 || lName.length() == 0) {\n throw new IllegalArgumentException(\"first \" +\n \"and/or last name cannot be empty\");\n }\n this.firstName = Utilities.capitalizeString(fName);\n this.lastName = Utilities.capitalizeString(lName);\n this.initials = createInitials(getFirstName(), getLastName());\n }", "public User(int aId, String aFirstName, String aLastName){\r\n this.id = aId;\r\n this.firstName = aFirstName;\r\n this.lastName = aLastName;\r\n }", "public Employee(String fName, String lName, String gender, double salary) {\n this.fName = fName;\n this.lName = lName;\n this.gender = gender;\n this.salary = salary; \n }", "public Passenger(String firstName, String lastName, String nationality) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.nationality = nationality;\n }", "public NameInfo(String inPrefix, String inFirst, String inMiddle, String inLast)\n\t{\n\t\t//Set instance data.\n\t\tprefix = inPrefix;\n\t\tfirstName = inFirst;\n\t middleName = inMiddle;\n\t\tlastName = inLast;\n\n\t}", "public static void main(String[] args)\r\n\t{\r\n\t\tint numErrors = 0;\r\n\t\tPerson p = new Person(\"Pete\", \"249-5418\");\r\n\t\tSystem.out.println(\"The person called Pete at 249-5418 is \" + p);\r\n\t\tif (! p.getName().equals(\"Pete\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The constructor or getName failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tif (! p.getTelephoneNumber().equals(\"249-5418\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The constructor or getTelephoneNumber failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tp.setTelephoneNumber(\"966-1134\");\r\n\t\tif (! p.getTelephoneNumber().equals(\"966-1134\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"setTelephoneNumber failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\t\r\n\t\tp = new Person(\"Mary\", \"975-6735\");\r\n\t\tSystem.out.println(\"The person called Mary at 975-6735 is \" + p);\r\n\t\tif (! p.getName().equals(\"Mary\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The constructor or getName failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tif (! p.getTelephoneNumber().equals(\"975-6735\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The constructor or getTelephoneNumber failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tp.setTelephoneNumber(\"845-7294\");\r\n\t\tif (! p.getTelephoneNumber().equals(\"845-7294\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"setTelephoneNumber failed\");\t\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tSystem.out.println(\"The number of errors found in Person class is \" + numErrors);\r\n\t}", "public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }", "public Person(String name, String lastName, String home, int identificationNumber) {\n this.name = name;\n this.lastName = lastName;\n this.home = home;\n this.identificationNumber = identificationNumber;\n }", "public Person(String firstName, String lastName, String course, String password) {\n this.firstName = new SimpleStringProperty(firstName);\n this.lastName = new SimpleStringProperty(lastName);\n this.name = new SimpleStringProperty();\n this.name.bind(Bindings.concat(this.firstName, \" \", this.lastName));\n this.course = new SimpleStringProperty(course);\n this.password = new SimpleStringProperty(password);\n grade = new SimpleIntegerProperty(5);\n login = new SimpleStringProperty(null);\n buildLogin();\n }", "public GradeBook2( String name )\n {\n courseName = name; // initializes courseName\n }", "public Employee(String n, double s)\n {\n name = n;\n salary = s;\n }", "public Entry(String firstName, String lastName) {\r\n this.firstName = firstName;\r\n this.lastName = lastName;\r\n this.phone = \"N/A\";\r\n this.email = \"N/A\";\r\n }", "@Test\n public void testUserDomainConstructorWithParams(){Not sure if this works\n //\n Set<RestaurantDomain> testRestaurantDomain = new HashSet<>();\n //\n\n testUserDomain = new UserDomain(1, \"[email protected]\", \"password\", \"jDawg\", \"John\", \"Dawson\", testRestaurantDomain);\n\n new Verifications(){{\n assertEquals(1, testUserDomain.getId());\n assertEquals(\"[email protected]\", testUserDomain.getEmail());\n assertEquals(\"password\", testUserDomain.getPassword());\n assertEquals(\"jDawg\", testUserDomain.getUserName());\n assertEquals(\"John\", testUserDomain.getFirstName());\n assertEquals(\"Dawson\", testUserDomain.getFirstName());\n assertEquals(testRestaurantDomain, testUserDomain.getRestaurantDomain());\n }};\n }" ]
[ "0.78216773", "0.74112713", "0.7244772", "0.6867716", "0.67882067", "0.6758318", "0.6723482", "0.66895455", "0.6626587", "0.6609892", "0.6479147", "0.6463736", "0.641069", "0.63588744", "0.633615", "0.629953", "0.625933", "0.6245996", "0.6231266", "0.6211854", "0.61801535", "0.6168877", "0.61647975", "0.6161181", "0.6128487", "0.6119555", "0.61184007", "0.6117943", "0.61154073", "0.60997415", "0.60959595", "0.6080145", "0.6059765", "0.6053487", "0.6042038", "0.60347635", "0.60308784", "0.60174245", "0.5999833", "0.5995933", "0.5986078", "0.59781206", "0.59731746", "0.5965578", "0.59600097", "0.5944489", "0.59366006", "0.5935001", "0.5923634", "0.5922324", "0.5913417", "0.5894988", "0.5893505", "0.58807456", "0.5869233", "0.5855832", "0.58544946", "0.58475643", "0.58243364", "0.5816728", "0.580139", "0.5799957", "0.5796969", "0.5796887", "0.5794591", "0.5781698", "0.5777717", "0.57763714", "0.5776122", "0.5774015", "0.5766425", "0.5753979", "0.57469255", "0.5746739", "0.5742756", "0.5737558", "0.57325613", "0.5710479", "0.57075256", "0.57058126", "0.5698297", "0.56876034", "0.5687527", "0.56753594", "0.56748074", "0.5654323", "0.5648927", "0.5647726", "0.5646801", "0.5637943", "0.5635094", "0.56253064", "0.56238866", "0.56233466", "0.56179595", "0.5617073", "0.56155646", "0.561423", "0.55998415", "0.5599663" ]
0.84673333
0
Tests the constructor of the profeessor class with three parameteres passed in order, those parameters will be first name, last name, and the professor's unique ID number
@Test public void testProfessorConstructor3Params(){ String firstname = "Dennis"; String lastName = "Ritchie"; long id = 0451; Professor testProfessor = new Professor(firstname, lastName, id); Assert.assertEquals("Dennis", testProfessor.getFirstName()); Assert.assertEquals("Ritchie", testProfessor.getLastName()); Assert.assertEquals(Long.valueOf(0451), testProfessor.getId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testProfessorConstructor2params(){\n\t\tString firstname = \"Steven\";\n\t\tString lastName = \"Beaty\";\n\t\tProfessor testProfessor = new Professor(firstname, lastName);\n\t\tAssert.assertEquals(\"Steven\", testProfessor.getFirstName());\n\t\tAssert.assertEquals(\"Beaty\", testProfessor.getLastName());\n\t}", "public Professor(String surname, String firstName, double salary)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(salary);\n\t}", "public Professor(Professor prof)\r\n {\r\n this.name = prof.name;\r\n this.id = prof.id;\r\n }", "public Professor()\n\t{\n\t\t//stuff\n\t}", "public Professor(String name, int id)\r\n {\r\n this.name = name;\r\n this.id = id;\r\n }", "public Professor(String surname, String firstName)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(this.minAnnualSalary); //this probably doesn't make sense, at least did i not really understand\n\t\t\t\t//the use-case for this task.\n\t\t\t\t//Why the hell would i assign the value of a member of the class, inside a constructor?\n\t\t\t\t//minAnnualSalary can in no case contain a valid value?\n\t\t\t\t//maybe minAnnualSalary should rather be a static member for all Professors?\n\t\t\t\t//or maybe just a plain hardcoded default value? \n\t}", "public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }", "@Test\n public void t02_buscarProfessorValidoPorCPF() throws Exception {\n Professor prof = professorServico.getProfessor(\"104.707.064-22\"); \n assertNotNull(prof);\n }", "@Test\n\tpublic void testProfeessorFirstName(){\n\t\tString firstName = \"Linus\";\n\t\ttestProfessor.setFirstName(firstName);\n\t\tAssert.assertEquals(\"Linus\", testProfessor.getFirstName());\n\t}", "public AssistantProfessor(String name, int age, String address, String phoneNumber, int yearBegan, int facultyId, String department, double yearlySalary, int numberOfPapers, int yearsUntilTenure){\n super(name, age, address, phoneNumber, yearBegan, facultyId, department, yearlySalary, numberOfPapers);\n m_yearsUntilTenure = yearsUntilTenure;\n }", "public FProfessor() {\n professorRN = new Professor_RN();\n professorVO = new Professor_VO();\n initComponents();\n }", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "@Test\n\tpublic void testProfeessorLastName(){\n\t\tString lastName = \"Torvalds\";\n\t\ttestProfessor.setLastName(lastName);\n\t\tAssert.assertEquals(\"Torvalds\", testProfessor.getLastName());\n\t}", "private void populaProfessor()\n {\n Calendar nasc = Calendar.getInstance();\n\n ProfessorFunc p = new ProfessorFunc();\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 p.setDataNascimento(nasc);\n p.setNome(\"Joana\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\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 p.setDataNascimento(nasc);\n p.setNome(\"Mario\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\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 p.setDataNascimento(nasc);\n p.setNome(\"Marcio\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\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 p.setDataNascimento(nasc);\n p.setNome(\"Fabiana\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\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 p.setDataNascimento(nasc);\n p.setNome(\"Kleber\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\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 p.setDataNascimento(nasc);\n p.setNome(\"Antonio\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\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 p.setDataNascimento(nasc);\n p.setNome(\"Paula\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n }", "public Counselor(String first, String last, String password, String p1, String p2, String p3, String p4, \n String p5, String p6, String p7, String p8)\n {\n super(first, last, password, p1, p2, p3, p4, p5, p6, p7, p8);\n students = new ArrayList<Student>();\n }", "public Staff (String firstName, String lastName, String cpr, String type, \n String[] address, String phoneNr, String password, int hours, \n double salary, int vacation, int accessLevel) \n {\n this.firstName = firstName;\n this.lastName = lastName;\n this.cpr = cpr;\n this.type = type;\n this.address = address;\n this.phoneNumber = phoneNr;\n this.password = password;\n this.hours = hours;\n this.salary = salary;\n this.vacation = vacation;\n this.accessLevel = accessLevel;\n }", "public Person(String name, String lastName, String home, int identificationNumber) {\n this.name = name;\n this.lastName = lastName;\n this.home = home;\n this.identificationNumber = identificationNumber;\n }", "public First()\r\n{\r\n\tScanner in = new Scanner(System.in);\r\n\tSystem.out.println(\"Enter your First Name: \");\r\n\tthis.fname=in.next();\r\n\tSystem.out.println(\"Enter your Last Name: \" );\r\n\tthis.lname=in.next();\t\r\n\tSystem.out.println(\"Enter Your GradeYear :\\n [1]Freshman \\n[2] Sophomore \\n[3] Junior \\n[4] Senior \\n\");\r\n\tthis.gradeyear=in.nextInt();\t\r\n\tsetStudentId();\r\n\tSystem.out.println(\"Name: \"+fname+\" \"+lname+\"\\nGrade-year: \"+gradeyear+\"\\nStudentID: \"+student_id+\"\");\r\n\tSystem.out.print(\"\\nEnter Your Course Name: \");\r\n}", "public SalesPerson(String firstName, String lastName, String ppsNumber){\r\n //pulls the constructor with parameters from the superclass SalesEmployee\r\n super(firstName, lastName, ppsNumber);\r\n }", "public Student(){\n firstName = \"\";\n lastName = \"\";\n bootcamp = \"\";\n id = 42;\n grade = 1.0;\n }", "@Test\n\tpublic void testProfessorId(){\n\t\tlong id = 42;\n\t\ttestProfessor.setId(id);\n\t\tAssert.assertEquals(Long.valueOf(42), testProfessor.getId());\n\t}", "@Test\n public void testUserIdIsCreatedFromConstructor() {\n\n assertEquals(owner1.getUserId(), \"harry.louis\");\n assertEquals(owner2.getUserId(), \"mary.louis\");\n\n }", "public static void main(String[] args) {\n Student student = Student.createInstanceByIdAndFirstName(10 , \"Jhn\");\n Student student1 = Student.createInstanceByIdAndLastName(11, \"Smith\");\n }", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public Profesor (String apellidos, String nombre, String nif, Persona.sexo genero, int edad, int expediente){\n this.apellidos = apellidos;\n this.nombre = nombre;\n this.nif = nif;\n this.genero = genero;\n this.edad = edad;\n this.expediente = expediente;\n }", "public Employee(String firstName, String lastName, String SSN){\r\n this.firstName=firstName;\r\n this.lastName=lastName;\r\n this.SSN=SSN;\r\n }", "public Nurse()\r\n {\r\n firstName = \"\";\r\n familyName = \"\";\r\n ID = IDCreator;\r\n\t\t\tIDCreator++;\r\n }", "public Student(){//default constructor \r\n ID_COUNTER++;\r\n studentNum = ID_COUNTER;\r\n firstName = \"\";\r\n lastName = \"\";\r\n address = \"\";\r\n loginID = \"\";\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "public UserImplPart1(int studentId, String yourName, int yourAge,int yourSchoolYear, String yourNationality){\n this.studentId = studentId;\n this.name= yourName;\n this.age = yourAge; \n this.schoolYear= yourSchoolYear;\n this.nationality= yourNationality;\n}", "Student4(int i, String n) {\n id = i;\n name = n;\n\n }", "public Student( String name , String address ){//constructor with arguments \r\n \tID_COUNTER++;\r\n \tstudentNum = ID_COUNTER;\r\n getFirstAndLastName( name );\r\n this.address = address ;\r\n loginID = makeLoginID() ;\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "public Person(String firstName, String lastName) {\r\n name = new Name(firstName, lastName); \r\n id = (int )(Math.random() * 200 + 100);; \r\n }", "public static void main(String[] args) {\n\r\n clsAlumno alumno1 = new clsAlumno();\r\n\r\n alumno1.setNombre(\"Eneko\");\r\n\r\n alumno1.setApellido(\"Galdos\");\r\n\r\n alumno1.setDNI(\"72826873H\");\r\n\r\n alumno1.setCreditos(60);\r\n\r\n alumno1.mostrarPersona();\r\n\r\n alumno1.mostrarCreditos();\r\n\r\n System.out.println();\r\n\r\n clsProfesor profesor1 = new clsProfesor();\r\n\r\n profesor1.setNombre(\"Javier\");\r\n\r\n profesor1.setApellido(\"Cerro\");\r\n\r\n profesor1.setDNI(\"11111111A\");\r\n\r\n profesor1.setDepartamento(\"Informática\");\r\n\r\n profesor1.mostrarPersona();\r\n\r\n profesor1.mostrarDepartamento();\r\n\r\n }", "public static void main(String[] args) {\n\n Student st = new Student (\"shagria\",\"kabir\",95,101);\n\n Assert.assertEquals(st.getFirstName(),\"shagria\");\n Assert.assertEquals(st.getLastName(),\"kabir\");\n Assert.assertEquals(st.getScore(),90);\n Assert.assertEquals(st.getId(),101);\n\n }", "@Override\r\n public String toString()\r\n {\r\n return \"Professor: name=\" + name + \" and id=\" + id;\r\n }", "Student4(int i, String n, int t) {\n id = i;\n name = n;\n age = t;\n\n }", "public Person (String _name, int _ID) {\n name = _name;\n ID = _ID;\n }", "boolean contemProfessor(Professor p);", "public static void main(String[] args) {\n /**\n * Construction par defaut\n */\n Personne p = new Personne();\n System.out.println(p.toString());\n /**\n * Construction avec comme parametre nom et prenom\n */\n Personne p1 = new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\");\n System.out.println(p1.toString());\n /**\n * Construction avec comme parametre nom, prenom et age\n */\n Personne p2 = new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\",22);\n System.out.println(p2.toString());\n /**\n * Construction tous les parametres\n */\n Personne p3= new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\",22,Sexe.Masculin);\n System.out.println(p3.toString());\n }", "public SalesEmployee(String firstName, String lastName, String number, double salary, double commission){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n this.number = number;\r\n this.salary = salary;\r\n this.commission = commission;\r\n }", "public Student (String first, String last, String id)\r\n\t{\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.studentId = id;\r\n\t}", "@Test\n\tpublic void testRechercherParIdentifiant() {\n\t\tProfesseur prof;\n\t\tString idprof = \"ID-PROF-2018-1\";\n\t\tprof = professeurServiceEmp.rechercherParIdentifiant(idprof);\n\t\tAssert.assertNotNull(prof);\n\t}", "PassengerPersonalInfo(String First_Name, String Last_Name, int Age, Date dob, \n String Address, String Nationality, long Number, String eID) { \n this.firstName = First_Name;\n this.lastName = Last_Name;\n this.age = Age;\n this.dateOfBirth = dob;\n this.address = Address;\n this.nationality = Nationality;\n this.contact = Number;\n this.email = eID;\n }", "public Person(String first, String last) {\n // Set instance var firstname to what is called from constructor\n this.firstName = first; \n // Set instance var lastname to what is called from constructor\n this.lastName = last;\n }", "public static void main(String[] args) {\n \n Profesor a = new Profesor(\"Juan Hernández\",\"Garcia\",\"22-387-11\");\n System.out.println(a);\n \n }", "@Test\r\n\tpublic void test001_RegularConstructor() {\r\n\t\tCustomer c = new Customer( cEric_id, cEric_name, cEric_contact );\r\n\t\tassertNotNull( c.getId() );\t\t\t\t\t// assert that id is not null\r\n\t\tassertEquals( c.getId(), cEric_id );\t\t// assert that cEric_id is returned\r\n\t\tassertSame( c.getId(), cEric_id );\t\t\t// assert that same (\"==\") id is returned\r\n\t\tassertEquals( c.getFirstName(), \"\" );\t\t// \"name\" is assigned to lastName, firstName: \"\"\r\n\t\tassertEquals( c.getLastName(), \"Eric Schulz-Mueller\" );\r\n\t\tassertEquals( c.getLastName(), cEric_name );\t// better to use constant;\r\n\t\tassertEquals( c.getContact(), cEric_contact );\r\n\t}", "@Test\n public void constructorTest(){\n String retrievedName = doggy.getName();\n Date retrievedBirthDate = doggy.getBirthDate();\n Integer retrievedId = doggy.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "public static void main(String[] args)\r\n\t{\r\n\t\tint numErrors = 0;\r\n\t\tPerson p = new Person(\"Pete\", \"249-5418\");\r\n\t\tSystem.out.println(\"The person called Pete at 249-5418 is \" + p);\r\n\t\tif (! p.getName().equals(\"Pete\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The constructor or getName failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tif (! p.getTelephoneNumber().equals(\"249-5418\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The constructor or getTelephoneNumber failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tp.setTelephoneNumber(\"966-1134\");\r\n\t\tif (! p.getTelephoneNumber().equals(\"966-1134\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"setTelephoneNumber failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\t\r\n\t\tp = new Person(\"Mary\", \"975-6735\");\r\n\t\tSystem.out.println(\"The person called Mary at 975-6735 is \" + p);\r\n\t\tif (! p.getName().equals(\"Mary\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The constructor or getName failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tif (! p.getTelephoneNumber().equals(\"975-6735\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The constructor or getTelephoneNumber failed\");\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tp.setTelephoneNumber(\"845-7294\");\r\n\t\tif (! p.getTelephoneNumber().equals(\"845-7294\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"setTelephoneNumber failed\");\t\r\n\t\t\tnumErrors++;\r\n\t\t}\r\n\t\tSystem.out.println(\"The number of errors found in Person class is \" + numErrors);\r\n\t}", "public StaffMember(String firstname, String surname, int staffID, DepartmentStaff deptStaff, StaffType roleStaff) {\n this.firstname = firstname;\n this.surname = surname;\n this.staffID = staffID;\n this.deptStaff = deptStaff;\n this.roleStaff = roleStaff;\n }", "public BookRecord(String NameOfTheBook, String NameofWriter, int isbnNumber, double booksCost) \r\n\r\n{ \r\n\r\nthis.NameOfTheBook = NameOfTheBook; \r\n\r\nthis.NameofWriter = NameofWriter; \r\n\r\nthis.isbnNumber = isbnNumber; \r\n\r\nthis.booksCost = booksCost; \r\n\r\n}", "@Test\n void cadastraEspecialidadeProfessorInvalido(){\n assertEquals(\"Campo email nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"\", \"Doutorado\", \"DSC\", \"01/01/2011\")));\n assertEquals(\"Campo formacao nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", null, \"DSC\", \"01/01/2011\")));\n assertEquals(\"Campo unidade nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", \"Doutorado\", \"\", \"01/01/2011\")));\n assertEquals(\"Campo data nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", \"Doutorado\", \"DSC\", null)));\n assertEquals(\"Formato de email invalido.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@\", \"Doutorado\", \"DSC\", \"01/05/2015\")));\n assertEquals(\"Pesquisadora nao encontrada.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email1@email\", \"Doutorado\", \"DSC\", \"01/05/2015\")));\n cadastraPesquisador();\n assertEquals(\"Pesquisador nao compativel com a especialidade.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"hunterxhunter@1998\",\"Doutorado\", \"DSC\", \"01/05/2015\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"01052015\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"2015/05/15\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"1/5/2015\")));\n }", "public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}", "public Subject(String code, String name, int semester, int yearOfStuding, Professor professor) {\n\t\tsuper();\n\t\tthis.code = code;\n\t\tthis.name = name;\n\t\tthis.semester = semester;\n\t\tthis.yearOfStuding = yearOfStuding;\n\t\tthis.professor = professor;\n\t\tthis.students = new ArrayList<Student>() {\n\n\t\t\t/**\n\t\t\t * \n\t\t\t */\n\t\t\tprivate static final long serialVersionUID = 2595655369364615933L;\n\n\t\t\t\n\t\t};\n\t}", "public Instructor(String firstName, String lastName, String email) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.email = email;\n }", "public Student(int studentID, String firstName, String lastName) {\n this.studentID = studentID;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public Student(String name, String gender, String email, Course course1, \n Course course2, Course course3){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = course1;\n this.course2 = course2;\n this.course3 = course3;\n }", "public Student(String firstName, String lastName, int age, double gpa, String major, String department, List<Course> courses) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.gpa = gpa;\n this.major = major;\n this.department = department;\n this.courses = courses;\n }", "public User(int aId, String aFirstName, String aLastName){\r\n this.id = aId;\r\n this.firstName = aFirstName;\r\n this.lastName = aLastName;\r\n }", "public Developer(String developerKey,int pId,String firstName, String lastName) {\r\n\tsuper(pId,firstName,lastName);\r\n\tthis.developerKey=developerKey;\r\n\t\r\n}", "public static void main(String[] args) {\n Course AbstractAdvancedJavaSuperClass = new AdvancedJavaCourse(\"AdvancedJava\", \"-003\");\r\n Course AbstractJavaSuperClass = new IntroJavaCourse(\"IntroJava\", \"-002\");\r\n Course AbstractProgramClass = new IntroToProgrammingCourse(\"Intro\", \"-001\");\r\n\r\n AbstractAdvancedJavaSuperClass.setCredits(4);\r\n AbstractJavaSuperClass.setCredits(4.0);\r\n AbstractProgramClass.setCredits(4.0);\r\n \r\n //this is a test\r\n \r\n AbstractAdvancedJavaSuperClass.setPrerequisites(AbstractJavaSuperClass.getCourseNumber());\r\n AbstractJavaSuperClass.setPrerequisites(AbstractProgramClass.getCourseNumber());\r\n \r\n System.out.println(AbstractProgramClass.getCapitalizedCourseName()\r\n + \" \" + AbstractProgramClass.getCourseNumber() );\r\n \r\n System.out.println(AbstractJavaSuperClass.getCourseName()\r\n + \" \" + AbstractJavaSuperClass.getCourseNumber() \r\n + \" \" + AbstractJavaSuperClass.getPrerequisites());\r\n \r\n System.out.println(AbstractAdvancedJavaSuperClass.getCourseName()\r\n + \" \" + AbstractAdvancedJavaSuperClass.getCourseNumber() \r\n + AbstractAdvancedJavaSuperClass.getPrerequisites() );\r\n}", "public Student(String in_name, double in_gpa)\n {\n name = in_name;\n gpa = in_gpa;\n getQuizzes();\n }", "public static void main(String[] args) {\n\t\tint randomRoll = 0;\n\t\tint menuChoice = 0;\n\t\t\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tRandom randomNumbers = new Random();\n\t\t\n\t\t// Create our Professor Class\n\t\tProfessor profOne = new Professor();\n\t\tComputerScienceProf profTwo = new ComputerScienceProf();\n\t\t\n\t\t profTwo.numberOfTabsOpen = 5;\n\t\t profTwo.calc();\n\t\t\n\t\t// Main Application Logic\n\t\tdo\n\t\t{\n\t\t\tSystem.out.println(\"Roll Your Professor\");\n\t\t\tSystem.out.println(\"=-=-=-=-=-=-=-=-=-=\");\n\t\t\tSystem.out.println(\"1.) Display Prof Info\");\n\t\t\tSystem.out.println(\"2.) Up Vote Professor\");\n\t\t\tSystem.out.println(\"3.) Down Vote Professor\");\n\t\t\tSystem.out.println(\"4.) Roll Your Prof\");\n\t\t\tSystem.out.println(\"5.) Exit\");\n\t\t\tSystem.out.println(\"What would you like to do? \");\n\t\t\tmenuChoice = keyboard.nextInt();\n\t\t\t\n\t\t\tswitch(menuChoice)\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\t// Display Professor Info\n\t\t\t\t\tprofOne.info();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t// Up Vote\n\t\t\t\t\tprofOne.upVote();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t// Down Vote\n\t\t\t\t\tprofOne.downVote();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t// Roll 'em\n\t\t\t\t\trandomRoll = randomNumbers.nextInt(11);\n\t\t\t\t\tprofOne.rollProf(randomRoll);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t// Exit\n\t\t\t\t\tSystem.out.println(\"Thank you for playing. Your professor is going to take a nap.\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Did not recognize menu choice.\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} while(menuChoice !=5);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n\t@Category(TesteUrgente.class)\n\tpublic void testConstructorLista() {\n\t\tGrupa grupa=new Grupa(1076);\n\t\tassertNotNull(grupa.getStudenti());\n\t}", "public Employee(int empID, String firstName, String lastName, int ssNum,\n Date hireDate, double salary) {\n if (Employee.setOfIDs.contains(empID) || !Employee.isPositive(empID)) {\n this.empID = Employee.generateID();\n } else {\n this.empID = empID;\n }\n Employee.sortType = SortType.SORT_BY_ID;\n Employee.setOfIDs.add(this.empID);\n this.firstName = firstName;\n this.lastName = lastName;\n this.ssNum = ssNum;\n this.hireDate = hireDate;\n this.salary = salary;\n }", "public Student(String firstName, String lastName, int grade) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade; \n studentNumber = totalStudents++; // the new student's number is equal the total number of students, therefore, each student number will be unique\n }", "public Student(int studentId) \r\n {\r\n\r\n this.studentId = studentId;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "public Publication(String title, int year)\n {\n // this is the constructor that iniates the variables \n name = title;\n yr = year;\n }", "public AssistantProfessor(){\n super();\n m_yearsUntilTenure = -1;\n }", "public Staff(String username, String password, String firstName, \n String lastName, int id, String position, String department) \n {\n super(username, password, firstName, lastName, id);\n this.position = position;\n this.department = department;\n }", "@Test\r\n\tpublic void constructorDeclarationTest(){\r\n\t\tint[] pointsToTest = {2,7,9,16,17,18,19,20};\r\n\t\tfor(int i=0;i<pointsToTest.length;i++)\r\n\t\t{\r\n\t\t\tassertEquals(pointsToTest[i],new PointGrade(pointsToTest[i]).getPoints());\r\n\t\t}\r\n\t}", "public static void constructor1_name_initialize()\r\n\t{\r\n\t\tString name = \"Dennis\";\r\n\t\tString college = \"Red River College\";\r\n\t\tdouble standardAptitudeTestScore = 222;\r\n\t\tdouble gradePointAverage = 2.2;\r\n\r\n\t\tUndergraduateApplicant target = new UndergraduateApplicant(name, college, standardAptitudeTestScore, gradePointAverage);\r\n\r\n\t\tString expected = name;\r\n\t\tString actual = target.getName();\r\n\r\n\t\tSystem.out.printf(\"Expected: %s%nActual: %s%n%n\", expected, actual);\r\n\t}", "@Override\n\tpublic void addProfessor(Professor add1) {\n\t\ttry{\n\t\t\tstmt=conn.prepareStatement(\"INSERT INTO Professor(ssn,name,department,password) VALUES(?,?,?,?)\");\n\t\t\tstmt.setString(1, add1.getSsn());\n\t\t\tstmt.setString(2,add1.getName());\n\t\t\tstmt.setString(3, add1.getDepartment());\n\t\t\tstmt.setString(4, \"123456\");//Δ¬ΘΟΓάΒλ\n\t\t\t\n\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t}", "public static void main(String[] args) {\n\t\tFBProfile firstUser = new FBProfile();\n\t\tfirstUser.printFBUserDetails();\n\t\tSystem.out.println(\"No of Users \" + FBProfile.noOfUsers);\n\t\t\n\t\t//Calling a Constructor(String, String, Char)\n\t\tFBProfile secondUser = new FBProfile(\"Second\", \"User\", 'M');\n\t\tsecondUser.printFBUserDetails();\n\t\tSystem.out.println(\"No of Users \" + FBProfile.noOfUsers);\n\t\t\n\t\t//Calling the constuctor (String, String, Char, String, int, String, String)\n\t\tFBProfile thirdUser = new FBProfile(\"Third\", \"User\", 'F', \"8003432345\", 25, \"Hartford\", \"[email protected]\");\n\t\tthirdUser.printFBUserDetails();\n\t\tSystem.out.println(\"No of Users \" + FBProfile.noOfUsers);\n\t}", "@Test\n public void userCustomConstructor_isCorrect() throws Exception {\n\n int id = 123456;\n int pin_hash = 98745;\n int pin = 9876;\n String salt = \"test salt\";\n String username = \"testUsername\";\n int firstTime = 0;\n String budget = \"test\";\n int hasPin = 1;\n\n //Create empty user\n User user = new User(id, username, pin_hash, pin, salt, firstTime, budget, hasPin);\n\n // Verify Values\n assertEquals(id, user.getId());\n assertEquals(pin_hash, user.getPin_hash());\n assertEquals(pin, user.getPin());\n assertEquals(salt, user.getSalt());\n assertEquals(username, user.getUsername());\n assertEquals(firstTime, user.getFirstTime());\n assertEquals(budget, user.getBudget());\n assertEquals(hasPin, user.getHasPin());\n }", "public Student(int userPID)\n\t{\n\t\tPID = userPID;\n\t\tfirst = \"Tyler\";\n\t\tlast = \"Hoyt\";\n\t\tmajor = \"Computer Science\";\n\t\tminor = \"\"; //Wont let me set it to null????????????????????????????????????????????\n\t}", "@BeforeClass\r\n public static void setUpClass() throws Exception {\r\n P1 = new Partido(\"Camp Nou\",\"2010-04-28\");\r\n P2 = new Partido(\"Camp Nou\",\"2010-04-28\");\r\n P3 = new Partido(\"Camp Nou\",\"2010-04-28\"); \r\n PE = new Partido(\"Camp Nou\",\"2010-04-28\"); \r\n }", "public Profesor(String nombre, String direccion, String telefono, String email, String despacho, int salario,\n\t\t\tGregorianCalendar fecha, String tutoria, int categoria) {\n\t\tsuper(nombre, direccion, telefono, email, despacho, salario, fecha);\n\t\tthis.tutoria = tutoria;\n\t\tthis.categoria = categoria;\n\t}", "public Person (String firstName, String lastName, String address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.address = address;\n\n }", "public Persona(int idPersona, String nombre, String apellido, String email, String telefono){\n this.idPersona = idPersona;\n this.nombre = nombre;\n this.apellido = apellido;\n this.email = email;\n this.telefono = telefono;\n \n }", "@Test\r\n\tpublic void testIntialation()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tassertEquals(100, pk.getMaxLfPts());\r\n\t\tassertEquals(100, pk.getCurrentLifePts());\r\n\t\tassertEquals(100, pk.getCurrentLifePts());\r\n\t\tassertEquals(\"Fire\", pk.getType().getType());\r\n\t}", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\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 Person(String first, String middle, String last) {\n this.firstNames = first+ \" \" +middle;\n this.lastName = last;\n }", "public Researcher(int ID, int Protection_rating, int Allowable_hours, \n int Code_of_project_team, String Name_of_project_team)\n {\n super(ID, Protection_rating, Allowable_hours);\n this.code_of_project_team = Code_of_project_team;\n this.name_of_project_team = Name_of_project_team;\n }", "public Employee(String name,String pos,int sal, int Vbal, int AnBon){\n Random rnd = new Random();\n this.idnum = 100000 + rnd.nextInt(900000);\n this.name = name;\n this.position = pos;\n this.salary = sal;\n this.vacationBal = Vbal;\n this.annualBonus = AnBon;\n this.password = \"AJDLIAFYI\";\n salaryHist[0] = salary;\n }", "public Person(String userId, String firstName, String lastName, Gender gender, String spouseId, String fatherId, String motherId) {\n Id = UUID.randomUUID().toString();\n AssociatedUserName = userId;\n FirstName = firstName;\n LastName = lastName;\n Gender = gender;\n SpouseId = spouseId;\n FatherId = fatherId;\n MotherId = motherId;\n }", "public Student(String name, String SSN) {\n this.name = name;\n this.SSN = SSN;\n System.out.println(\"Student: \" + name + \", email: \" + generateEmail(name) + \", ID: \" + generateID(SSN));\n }", "public GradeBook2( String name )\n {\n courseName = name; // initializes courseName\n }", "public static void main(String[] args) {\n\tProfessorSql sql= new ProfessorSql();\n\t//sql.add(professor);\n\t//sql.delete(\"49022518841\");\n}", "public User(long id, String fistname, String secondname, String username, String password, String mail){\n this.id = id;\n this.firstname = fistname;\n this.secondname = secondname;\n this.username = username;\n this.password = password;\n this.email = mail;\n }", "public ActionProgrammer(String firstName, String lastName,\r\nString socialSecurityNumber, int month, int year, \r\ndouble wage, double pieces) {\r\nsuper(firstName, lastName, socialSecurityNumber, month, year);\r\n\r\nif (wage < 0.0) { // validate wage\r\n throw new IllegalArgumentException(\r\n \"Hourly wage must be >= 0.0\");\r\n}\r\n\r\nif ((pieces < 0.0) || (pieces > 168.0)) { // validate hours\r\n throw new IllegalArgumentException(\r\n \"Hours worked must be >= 0.0 and <= 168.0\");\r\n}\r\n\r\nthis.wage = wage;\r\nthis.pieces = pieces;\r\n}", "Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }", "public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }", "public TelaProfessor() throws ClassNotFoundException, SQLException {\n initComponents();\n \n }", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "public Student(\n int userId, String firstName, String lastName, String email, String password, int\n schoolId,\n double gpa)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n this.setGpa(gpa);\n }", "boolean contemProfessor(String cpf);", "@Test\n public void testUserDomainConstructorWithParams(){Not sure if this works\n //\n Set<RestaurantDomain> testRestaurantDomain = new HashSet<>();\n //\n\n testUserDomain = new UserDomain(1, \"[email protected]\", \"password\", \"jDawg\", \"John\", \"Dawson\", testRestaurantDomain);\n\n new Verifications(){{\n assertEquals(1, testUserDomain.getId());\n assertEquals(\"[email protected]\", testUserDomain.getEmail());\n assertEquals(\"password\", testUserDomain.getPassword());\n assertEquals(\"jDawg\", testUserDomain.getUserName());\n assertEquals(\"John\", testUserDomain.getFirstName());\n assertEquals(\"Dawson\", testUserDomain.getFirstName());\n assertEquals(testRestaurantDomain, testUserDomain.getRestaurantDomain());\n }};\n }", "public AssistantProfessor(AssistantProfessor c){\n super(c);\n m_yearsUntilTenure = c.m_yearsUntilTenure;\n }", "public Person(String name, String surname) {\n this.name = name;\n this.surname = surname;\n }" ]
[ "0.7896998", "0.7213504", "0.71340317", "0.7102414", "0.7039782", "0.68926734", "0.6579491", "0.6307294", "0.6305898", "0.6167641", "0.6141542", "0.6099564", "0.6096472", "0.60818607", "0.60700786", "0.60663533", "0.60593265", "0.6056173", "0.59822786", "0.59813577", "0.59764963", "0.59748226", "0.596018", "0.5951328", "0.5949403", "0.5938802", "0.59377897", "0.59254456", "0.5906741", "0.58592206", "0.58423877", "0.582674", "0.5824656", "0.5783526", "0.57793623", "0.577299", "0.57684565", "0.5767076", "0.5758298", "0.57524323", "0.5746752", "0.5742441", "0.5737631", "0.5719095", "0.57138854", "0.5705642", "0.5702911", "0.5692134", "0.56707895", "0.56659704", "0.56547594", "0.5653743", "0.56523156", "0.56417745", "0.5625968", "0.56227845", "0.5621461", "0.56190175", "0.5612586", "0.56123656", "0.55968463", "0.5593994", "0.5587495", "0.5579436", "0.5569383", "0.5563373", "0.556292", "0.55629164", "0.5557658", "0.5550662", "0.5541826", "0.55361295", "0.5531356", "0.55299443", "0.5523918", "0.55232936", "0.5520827", "0.55175173", "0.5479984", "0.54784054", "0.5478126", "0.54774463", "0.54769725", "0.5468676", "0.5467684", "0.54672873", "0.5462121", "0.54541636", "0.5452686", "0.54431355", "0.54422194", "0.54347074", "0.5420192", "0.54166603", "0.5416491", "0.5411494", "0.5409828", "0.5408343", "0.5404093", "0.54015636" ]
0.86684316
0
Tests the setter and getter for the first name field of the professor class
@Test public void testProfeessorFirstName(){ String firstName = "Linus"; testProfessor.setFirstName(firstName); Assert.assertEquals("Linus", testProfessor.getFirstName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testProfeessorLastName(){\n\t\tString lastName = \"Torvalds\";\n\t\ttestProfessor.setLastName(lastName);\n\t\tAssert.assertEquals(\"Torvalds\", testProfessor.getLastName());\n\t}", "@Test\r\n\tpublic void testSetGetFirstNameValid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setFirstName(firstnameValid);\r\n\t\tassertEquals(firstnameValid, doctor.getFirstName());\r\n\t}", "public void setFirstName(String fname){ firstName.set(fname); }", "public void setFirstName(String firstName);", "public void setFirstName( String first )\r\n {\r\n firstName = first;\r\n }", "void setFirstName(String firstName);", "protected void setFirstName(String first)\n {\n firstName = first;\n }", "public void setFirst_name(String first_name);", "public void setFirstName() {\n\n\t}", "java.lang.String getFirstName();", "java.lang.String getFirstName();", "public java.lang.String getFirstName();", "@Test\r\n\tpublic void testSetGetFirstNameInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setFirstName(firstnameInvalid);\r\n\t\tassertEquals(firstnameInvalid, doctor.getFirstName());\r\n\t}", "public void setFirstName(String firstName) {\n if(firstName.length()>0)\n this.firstName = firstName;\n else this.firstName =\"undefined\";\n }", "public void setFirstName(String s) {\r\n\t\tfirstName = s;\t\r\n\t}", "public String getFirstName() { return firstName; }", "public String getFirstName() \r\n {\r\n return firstName;\r\n }", "public void setFirstName(java.lang.String newFirstName);", "public String getFirstName(){\r\n return firstname;\r\n }", "public void setFirstName(String newFirstName) {\n this.firstName = newFirstName;\n }", "public void setFirstName(String newFirstName)\r\n {\r\n firstName = newFirstName;\r\n }", "public void setFirstName(String newFirstName) {\n _firstName = newFirstName;\n }", "public String getFirstName()\n {\n return this.firstName;\n }", "public String getFirstName()\r\n {\r\n return firstName;\r\n }", "public String getFirstName()\r\n {\r\n return firstName;\r\n }", "public String getFirstName()\r\n {\r\n return firstName;\r\n }", "public void setFirstName(String firstName)\r\n {\r\n this.firstName = firstName;\r\n }", "@Test\r\n\tpublic void testSetGetLastNameValid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setLastName(lastnameValid);\r\n\t\tassertEquals(lastnameValid, doctor.getLastName());\r\n\r\n\t}", "public String getFirstName()\n {\n return firstName;\n }", "public String getFirstName()\r\n {\r\n return firstName;\r\n }", "public void getFirstName() {\n\n\t}", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public String getFirstName();", "public void setFirstName(String firstName) {\r\n this.firstName = firstName;\r\n }", "public String getFirstName(){\n\t\treturn this.firstName;\r\n\t}", "public String getFirstName()\n {\n return firstName;\n }", "public String getFirstName()\n {\n return firstName;\n }", "public String getFirstName()\r\n {\r\n return firstName;\r\n }", "public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}", "public String firstName() { return firstName; }", "String getFirstName();", "String getFirstName();", "String getFirstName();", "public String getFirstName(){\n return(this.firstName);\n }", "public void setFirstName(java.lang.CharSequence value) {\n this.first_name = value;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstname(String firstname) {\n this.firstname = firstname;\n }", "public void setFirstname(String firstname) {\n this.firstname = firstname;\n }", "@Test\n public void test_setFirstName() {\n String value = \"new_value\";\n instance.setFirstName(value);\n\n assertEquals(\"'setFirstName' should be correct.\",\n value, TestsHelper.getField(instance, \"firstName\"));\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "Employee setFirstname(String firstname);", "public String getFirstName(){\n\t\treturn this.firstName;\n\t}", "public String getFirstName() {\r\n return firstName;\r\n }", "public String getFirstName() {\r\n return firstName;\r\n }", "public String getFirstName() {\r\n return firstName;\r\n }", "public String getFirstName(){\n\t\treturn firstName;\n\t}", "@Test\n\t void testFirstName() {\n\t\tString expected=\"Mohammad\";\n\t\tString actual=user.getFirstName();\n\t\tassertEquals(expected, actual);\n\t}", "public void setFirstName(String firstName){\r\n\t\tthis.firstName = firstName;\r\n\t}", "public void setFirstName(String fName) {\n this.firstName = fName;\n }", "@Test\n public void test_setLastName() {\n String value = \"new_value\";\n instance.setLastName(value);\n\n assertEquals(\"'setLastName' should be correct.\",\n value, TestsHelper.getField(instance, \"lastName\"));\n }", "public String getFirstName() {\n return this.firstName;\n }", "public String getFirstName() {\n return this.firstName;\n }", "public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}", "@Test\n public void testGetFirstName() {\n System.out.println(\"getFirstName\");\n Commissioner instance = new Commissioner();\n instance.setFirstName(\"test\");\n String expResult = \"test\";\n String result = instance.getFirstName();\n assertEquals(expResult, result);\n }", "@Test\n public void testSetFirstName1() {\n user1.setFirstName(\"a\");\n assertEquals(\"FirstName should be a\", \"a\", user1.getFirstName());\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }" ]
[ "0.7829428", "0.7569413", "0.74313366", "0.74073195", "0.7375787", "0.73534995", "0.7351261", "0.73009634", "0.7284204", "0.72835916", "0.72835916", "0.72775954", "0.7264305", "0.7213766", "0.718488", "0.71747845", "0.71598905", "0.71572363", "0.71552247", "0.71278477", "0.71263856", "0.71162045", "0.70959926", "0.70932156", "0.70932156", "0.70932156", "0.70875305", "0.70874697", "0.7087302", "0.7073588", "0.7048773", "0.7035625", "0.7031372", "0.70179534", "0.7006633", "0.69999", "0.69999", "0.69971645", "0.6992511", "0.69881964", "0.6978843", "0.6978843", "0.6978843", "0.6959933", "0.69565284", "0.69533795", "0.69533795", "0.69533795", "0.69533795", "0.69533795", "0.69533795", "0.69533795", "0.69533795", "0.69533795", "0.69533795", "0.69533795", "0.69520843", "0.69520843", "0.69451207", "0.69414246", "0.69414246", "0.6940894", "0.6932289", "0.6930884", "0.6930884", "0.6930884", "0.69184136", "0.6918251", "0.6915199", "0.68963194", "0.68907595", "0.68866587", "0.68866587", "0.6870175", "0.6858201", "0.68499863", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353", "0.6841353" ]
0.8456519
0
Tests the setter and getter for the last name of the porfessor class
@Test public void testProfeessorLastName(){ String lastName = "Torvalds"; testProfessor.setLastName(lastName); Assert.assertEquals("Torvalds", testProfessor.getLastName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLastName() {\n\t}", "public void setLastname(String lastname);", "public void setLastName(String lastName);", "@Test\n\tpublic void testProfeessorFirstName(){\n\t\tString firstName = \"Linus\";\n\t\ttestProfessor.setFirstName(firstName);\n\t\tAssert.assertEquals(\"Linus\", testProfessor.getFirstName());\n\t}", "@Test\n\t void testLastName() {\n\t\tString expected=\"Faizan\";\n\t\tString actual=user.getLastName();\n\t\tassertEquals(expected, actual);\n\t}", "public void setLast_name(String last_name);", "public void setLastName( String last )\r\n {\r\n lastName = last;\r\n }", "protected void setLastName(String last)\n {\n lastName = last;\n }", "@Test\r\n\tpublic void testSetGetLastNameInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setLastName(lastnameInvalid);\r\n\t\tassertEquals(lastnameInvalid, doctor.getLastName());\r\n\r\n\t}", "@Test\r\n\tpublic void testSetGetLastNameValid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setLastName(lastnameValid);\r\n\t\tassertEquals(lastnameValid, doctor.getLastName());\r\n\r\n\t}", "public void setLastName(String lastName) {\n if(lastName.length()>0)\n this.lastName = lastName;\n else this.lastName =\"undefined\";\n\n }", "@Test\n public void testGetLastName() {\n System.out.println(\"getLastName\");\n Commissioner instance = new Commissioner();\n String expResult = \"last\";\n instance.setLastName(expResult);\n String result = instance.getLastName();\n assertEquals(expResult, result);\n }", "public String getLastName(){\r\n return lastname;\r\n }", "public String getLastName() { return lastName; }", "public static void setLastName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyLName,name);\n }", "Employee setLastname(String lastname);", "public void setLastName(java.lang.String newLastName);", "void setLastName(String lastName) throws IllegalArgumentException;", "public String getLastName(){\n return(this.lastName);\n }", "public String getLastName()\n {\n return lastName;\n }", "public void setLastName (String ticketLastName)\r\n {\r\n lastName = ticketLastName;\r\n }", "public void setLastName(String newLastName)\r\n {\r\n lastName = newLastName;\r\n }", "public String getLastName()\n {\n return this.lastName;\n }", "public void setLastName(java.lang.CharSequence value) {\n this.last_name = value;\n }", "public String getLast_name() {\r\n return last_name;\r\n }", "public String getLastName(){\r\n\t\treturn lastName;\r\n\t}", "public String getLastName()\r\n {\r\n return lastName;\r\n }", "public String getLastName()\r\n {\r\n return lastName;\r\n }", "public String getLastName()\r\n {\r\n return lastName;\r\n }", "public void getLastName() {\n\n\t}", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "@Test\n public void test_setLastName() {\n String value = \"new_value\";\n instance.setLastName(value);\n\n assertEquals(\"'setLastName' should be correct.\",\n value, TestsHelper.getField(instance, \"lastName\"));\n }", "public String getLastName()\r\n {\r\n return lastName;\r\n }", "public void setLastName(String newLastName) {\n this.lastName = newLastName;\n }", "public String getLast_name() {\n return last_name;\n }", "public String getLastname() {\n return (String) get(\"lastname\");\n }", "public String getLastName()\n {\n return lastName;\n }", "public String getLastName() {\n return lastNameField.getText();\n }", "public void setLastname(String lastname) {\r\n\t\tthis.lastname = lastname;\r\n\t}", "public void setLastName(String lastName){\r\n\t\tthis.lastName = lastName;\r\n\t}", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public void setLastName(java.lang.CharSequence value) {\n this.lastName = value;\n }", "public void setLastName(String newLastName) {\n _lastName = newLastName;\n }", "public void setLast_name(String last_name) {\r\n this.last_name = last_name;\r\n }", "public void setLastName(String lastName) {\n if (lastName.length() >= 3 && lastName.length() <= 20)\n this.lastName = lastName;\n }", "@Test\n public void lastNameValid() {\n User user = new User( \"id\", \"firstName\", \"lastName\", \"username\", \"password\");\n\n Assertions.assertNotEquals(\"\", user.getLastName());\n Assertions.assertNotEquals(null, user.getLastName());\n }", "public void setLastName(String s) {\r\n\t\tlastName = s;\t\t\r\n\t}", "public String getLastName(){\n\t\treturn lastName;\n\t}", "HasValue<String> getLastName();", "public String getLastname() {\n return lastname;\n }", "public void setLast_name(String last_name) {\n this.last_name = last_name;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public void setLastName(String lastName) {\n this.lastName = lastName;\n }", "public String getLastName(){\n\t\treturn this.lastName;\n\t}", "public void setLastName(String lName) {\n this.lastName = lName;\n }", "public String getLastName() {\r\n return lastName;\r\n }", "public void setLastName( String name ) {\n if ( name == null ) \r\n throw new NullPointerException( \"Customer last name can't be null.\" );\r\n else \r\n\t this.lastName = name; \r\n }", "public String getLastName() {\n return _lastName;\n }", "Optional<String> getLastname();", "public String getLastName()\r\n\t{\r\n\t\treturn lastName;\r\n\t}", "public String getLastName();", "abstract void lastNameValidity();", "@Test\n public void testSetLastName1() {\n user1.setLastName(\"a\");\n assertEquals(\"LastName should be a\", \"a\", user1.getLastName());\n }", "void lastNameValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data: fiscal code\n person.setLastName(null);\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n person.setLastName(\"AA1\");\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }", "public String getSurname()\r\n {\r\n return surname;\r\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return lastName;\n }", "public String getLastName() {\n return this.lastName;\n }", "@Override\n\tpublic java.lang.String getLastName() {\n\t\treturn _candidate.getLastName();\n\t}", "@Test\n public void test_getLastName() {\n String value = \"new_value\";\n instance.setLastName(value);\n\n assertEquals(\"'getLastName' should be correct.\",\n value, instance.getLastName());\n }", "public synchronized String getLastName()\r\n {\r\n return lastName;\r\n }", "public void testGetLastName()\r\n throws Exception\r\n {\r\n setUp();\r\n assertEquals(s1.getLastName(), \"Schmidt\");\r\n assertEquals(s2.getLastName(), \"Pak\");\r\n Student blank = new Student(\"0\", \"\", \"\");\r\n assertEquals(blank.getLastName(), \"\");\r\n }", "java.lang.String getSurname();" ]
[ "0.7260423", "0.7222163", "0.7204488", "0.7180536", "0.71419233", "0.71301895", "0.7128409", "0.7105196", "0.70208293", "0.70094866", "0.69997734", "0.6991264", "0.69620305", "0.6961057", "0.6956177", "0.6879562", "0.68557495", "0.6839731", "0.6810423", "0.6810254", "0.6783748", "0.677161", "0.67563456", "0.67532414", "0.6719032", "0.671558", "0.67143655", "0.67143655", "0.67143655", "0.6710573", "0.6702765", "0.66888255", "0.66872", "0.66770804", "0.66727006", "0.6669328", "0.6666638", "0.66645765", "0.66642827", "0.6650793", "0.6645669", "0.6645669", "0.66444385", "0.6635037", "0.66293335", "0.6627491", "0.6616821", "0.6616305", "0.660611", "0.6596524", "0.6593747", "0.65869087", "0.6570958", "0.6570958", "0.6570958", "0.6570958", "0.6570958", "0.6570958", "0.6570958", "0.6570958", "0.6570958", "0.6570958", "0.6568384", "0.65612406", "0.65601856", "0.6543039", "0.65382165", "0.65368366", "0.6534196", "0.6526474", "0.6524754", "0.65090555", "0.65000224", "0.6491928", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.6488298", "0.64810085", "0.6475759", "0.64712065", "0.646911", "0.6460713", "0.6460564" ]
0.8050881
0
Tests the settere and getter for the unique ID number of the professor class
@Test public void testProfessorId(){ long id = 42; testProfessor.setId(id); Assert.assertEquals(Long.valueOf(42), testProfessor.getId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testSetID() {\r\n user = userFactory.getUser(\"C\");\r\n user.setID(233);\r\n assertEquals(233, user.getID());\r\n }", "public Professor(String name, int id)\r\n {\r\n this.name = name;\r\n this.id = id;\r\n }", "public int getID(){\n return this.goodID;\n }", "@Test\r\n\tpublic void testSetGetIdValid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setId(idValid);\r\n\t\tassertEquals(idValid, doctor.getId());\r\n\t}", "@Test\n public void setGetID() {\n final CourseType courseType = new CourseType();\n final String ID = \"ID\";\n courseType.setId(ID);\n\n assertSame(ID, courseType.getId());\n }", "private void setStudentId() {\n\t id++;\n\t this.studentId=gradeYear+\"\"+id;\n }", "@Test\n\tpublic void testProfessorConstructor3Params(){\n\t\tString firstname = \"Dennis\";\n\t\tString lastName = \"Ritchie\";\n\t\tlong id = 0451;\n\t\tProfessor testProfessor = new Professor(firstname, lastName, id);\n\t\tAssert.assertEquals(\"Dennis\", testProfessor.getFirstName());\n\t\tAssert.assertEquals(\"Ritchie\", testProfessor.getLastName());\n\t\tAssert.assertEquals(Long.valueOf(0451), testProfessor.getId());\n\t}", "@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}", "@Test\n public void getId() {\n UUID id = UUID.randomUUID();\n User u = new User(id.toString(), name, mail, pass, address, gender);\n Assert.assertEquals(u.getId(), id);\n }", "@Test\r\n public void testSetId() {\r\n System.out.println(\"setId\");\r\n int lId = 0;\r\n \r\n instance.setId(lId);\r\n assertEquals(lId, instance.getId());\r\n \r\n }", "@Test\n\tpublic void testQuestionId() {\n\t\tquestions.setQuestionId(2);\n\t\tassertEquals(2,questions.getQuestionId());\n\t}", "@Test\r\n\tpublic void testSetGetIdInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setId(idInvalid);\r\n\t\tassertEquals(idInvalid, doctor.getId());\r\n\r\n\t}", "public void setIdPro(Integer idPro) {\n this.idPro = idPro;\n }", "public void setID(Number numID);", "@Test\n public void testSetPK() {\n System.out.println(\"setPK\");\n int pk = 5;\n Regime instance = r1;\n instance.setPK(pk);\n int result=instance.getPK();\n int expResult=5;\n assertEquals(expResult, result);\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "@Test\n\tpublic void testRechercherParIdentifiant() {\n\t\tProfesseur prof;\n\t\tString idprof = \"ID-PROF-2018-1\";\n\t\tprof = professeurServiceEmp.rechercherParIdentifiant(idprof);\n\t\tAssert.assertNotNull(prof);\n\t}", "@Test\r\n public void testGetID() {\r\n user = userFactory.getUser(\"C\");\r\n assertEquals(\"121\", user.getID());\r\n }", "public void studIdGenr()\n {\n \tthis.studentID = (int)(Math.random() * (2047300 - 2047100 + 1) + 2047100);\n }", "@Test\n public void mainTests(){\n assertTrue(property1.getPropertyId() == id1);\n if(property1.getPropertyId() != id1) {\n property2.setPropertyId(id1);\n }\n else {\n assertTrue(property2.getPropertyId() == id2);\n }\n //Getter works Correct for ID\n }", "public Number getID();", "public Professor(Professor prof)\r\n {\r\n this.name = prof.name;\r\n this.id = prof.id;\r\n }", "@Override\n\tpublic int getID()\n\t{\n\t\treturn Main.creaPersonaggio;\n\t}", "public abstract java.lang.Long getId_causal_peticion();", "public int getIdentifiant() {\r\n return identifiant;\r\n }", "public void testGetId_Accuracy() {\r\n int id = 1;\r\n UnitTestHelper.setPrivateField(AuditDetail.class, auditDetail, \"id\", new Integer(id));\r\n assertEquals(\"The id value should be got properly.\", id, auditDetail.getId());\r\n }", "private void setStudentID() {\n\t\tid++;\n\t\tthis.studentId = gradeYear + \"\" + id;\n\t\tSystem.out.println(this.studentId);\n\t}", "public Integer getIdPro() {\n return idPro;\n }", "public int getId()\r\n/* 69: */ {\r\n/* 70:103 */ return this.idAutorizacionEmpresaSRI;\r\n/* 71: */ }", "public SimpleIntegerProperty getIDProperty(){ return id; }", "@Test\r\n public void testSetUserId() {\r\n System.out.println(\"setUserId\");\r\n int userId = 0;\r\n \r\n instance.setUserId(userId);\r\n assertEquals(userId , instance.getUserId());\r\n \r\n }", "@Test\n public void testSetId_edificio() {\n System.out.println(\"setId_edificio\");\n int id_edificio = 1;\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n instance.setId_edificio(id_edificio);\n \n }", "public int getIdPersona(){\n return idPersona;\n}", "@Test\n public void testSetId() {\n System.out.println(\"setId\");\n Member instance = member;\n \n String id = \"new Id\";\n instance.setId(id);\n \n String expResult = id;\n String result = instance.getId();\n \n assertEquals(expResult,result);\n }", "public long getStudentID();", "protected int getID(){\r\n\t\treturn this.ID;\r\n\t}", "public int getId() \r\n {\r\n return studentId;\r\n }", "@Test\r\n public void testSetId_compte() {\r\n System.out.println(\"setId_compte\");\r\n int id_compte = 0;\r\n chequeBeans instance = new chequeBeans();\r\n instance.setId_compte(id_compte);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testSetId() {\n System.out.println(\"setId\");\n long id = 0L;\n DTO_Ride instance = dtoRide;\n instance.setId(id);\n long result = instance.getId();\n assertEquals(id, result);\n }", "public String getId() { return studentId; }", "@Override\n\tpublic int addProfessor(Professor professor) {\n\t\treturn (Integer)professorDao.save(professor);\n\t}", "java.lang.String getID();", "public int getID();", "public int getID();", "public int getID();", "@Override\n\tpublic int getID() {\n\t\treturn 41;\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "public Professor professor() {\n ////\n return professor;\n }", "public void testSetId_Accuracy() {\r\n int id = 1;\r\n auditDetail.setId(id);\r\n assertEquals(\"The id value should be set properly.\", \"\" + id,\r\n UnitTestHelper.getPrivateField(AuditDetail.class, auditDetail, \"id\").toString());\r\n }", "public void testGetIdUtilisateur() {\n System.out.println(\"getIdUtilisateur\");\n Utilisateur instance = new Utilisateur(1, 1, \"User\", \"Nom\", \"Prenom\", \"MotPasse\", \"Courriel\");\n int expResult = 1;\n int result = instance.getIdUtilisateur();\n assertEquals(expResult, result);\n }", "Integer getID();", "Integer getID();", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Professor)) {\n return false;\n }\n return id != null && id.equals(((Professor) o).id);\n }", "@Test\r\n public void testSetStudentID() {\r\n System.out.println(\"setStudentID\");\r\n String studentID = \"\";\r\n Student instance = new Student();\r\n instance.setStudentID(studentID);\r\n \r\n }", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "public void setStudentID(long studentID);", "@Test\n public void testSetUsuarioId() {\n System.out.println(\"setUsuarioId\");\n long usuarioId = 0L;\n Reserva instance = new Reserva();\n instance.setUsuarioId(usuarioId);\n \n }", "@Test\n public void testIntPropertyQuick() {\n Assertions.assertNotEquals(0, classObject.getInt(\"ProcessId\"));\n }", "public long getIdProduit() {\n\t\treturn idProduit;\n\t}", "public Integer getProfessionId() {\n return professionId;\n }", "public int getIdSucursal()\r\n/* 93: */ {\r\n/* 94:166 */ return this.idSucursal;\r\n/* 95: */ }", "@Test\n public void testSetId() {\n System.out.println(\"setId\");\n Long id = null;\n Reserva instance = new Reserva();\n instance.setId(id);\n \n }", "public long getID();", "String getID();", "String getID();", "String getID();", "String getID();", "public void setIdSucursal(int idSucursal)\r\n/* 123: */ {\r\n/* 124:135 */ this.idSucursal = idSucursal;\r\n/* 125: */ }", "public int getID(){\r\n return this.ID;\r\n }", "public int getIdSucursal()\r\n/* 104: */ {\r\n/* 105:169 */ return this.idSucursal;\r\n/* 106: */ }", "@Test\r\n public void test_setDocumentId_Accuracy() {\r\n instance.setDocumentId(1);\r\n assertEquals(\"incorrect value after setting\", 1, instance.getDocumentId());\r\n }", "@Override\n public int hashCode()\n {\n // uses roll no to verify the uniqueness\n // of the object of Student class\n final int temp = 14;\n int ans = 1;\n ans = temp * ans + rollno;\n return ans;\n }", "public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }", "public int getIdSucursal()\r\n/* 100: */ {\r\n/* 101:130 */ return this.idSucursal;\r\n/* 102: */ }", "public int getIdSucursal()\r\n/* 118: */ {\r\n/* 119:131 */ return this.idSucursal;\r\n/* 120: */ }", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();" ]
[ "0.64526963", "0.6355594", "0.63031965", "0.62350595", "0.6206025", "0.6184765", "0.61646104", "0.61609405", "0.61580503", "0.61505884", "0.6136683", "0.61275953", "0.6119782", "0.6115594", "0.61027014", "0.6098808", "0.6097336", "0.6091838", "0.60364145", "0.603583", "0.6025622", "0.5999248", "0.59939414", "0.598734", "0.59682477", "0.5964737", "0.59638906", "0.5952578", "0.5951231", "0.59411657", "0.59395504", "0.59310836", "0.5914015", "0.5913739", "0.5911705", "0.59074825", "0.590096", "0.58923674", "0.589117", "0.5887492", "0.5884873", "0.5877604", "0.5872807", "0.5872807", "0.5872807", "0.5870933", "0.58701247", "0.5864378", "0.58572453", "0.58523", "0.58500296", "0.58500296", "0.584987", "0.5833724", "0.583266", "0.583266", "0.583266", "0.583266", "0.583266", "0.583266", "0.583266", "0.583266", "0.583266", "0.583266", "0.583266", "0.5825149", "0.5822659", "0.58226025", "0.58032376", "0.5796479", "0.57931453", "0.5791179", "0.57836676", "0.5778112", "0.5778112", "0.5778112", "0.5778112", "0.57705855", "0.576854", "0.57628906", "0.57623667", "0.5761938", "0.575922", "0.57573587", "0.57538414", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428", "0.5753428" ]
0.75828016
0
Affiche une liste pour selectionner un client
public void menu() { super.menu(); for(JCheckBox cb : arrayCompo){ cb.setPreferredSize(new Dimension(largeur-30, hauteur)); gbc.gridy++; pan.add(cb, gbc); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<Client> selectclient() {\n\t\tList<Client> list=this.getSqlSessionTemplate().selectList(changToNameSpace(\"selectclient\"));\r\n\t\treturn list;\r\n\t}", "private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}", "@Override\n\t\tpublic List<Client> listeClient() {\n\t\t\treturn null;\n\t\t}", "public List<T> showAllClients();", "public List<Client> displayClient ()\r\n {\r\n List<Client> clientListe = new ArrayList<Client>();\r\n String sqlrequest = \"SELECT idCLient,nom,prenom,email,nbrSignalisation FROM pi_dev.client ;\";\r\n try {\r\n PreparedStatement ps = MySQLConnection.getInstance().prepareStatement(sqlrequest);\r\n ResultSet resultat = ps.executeQuery(sqlrequest);\r\n while (resultat.next()){\r\n Client client = new Client();\r\n \r\n \r\n client.setEmail(resultat.getString(\"email\"));\r\n client.setIdClient(resultat.getInt(\"idClient\"));\r\n client.setNom(resultat.getString(\"nom\"));\r\n client.setPrenom(resultat.getString(\"prenom\"));\r\n client.setNbrSignalisation(resultat.getInt(\"nbrSignalisation\"));\r\n \r\n clientListe.add(client);\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ClientDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return clientListe;\r\n }", "public void printClientList(){\n for(String client : clientList){\n System.out.println(client);\n }\n System.out.println();\n }", "public List<Clients> getallClients();", "public List BestClient();", "private void getClientList(ActionEvent e){\r\n new ClientList().Display();\r\n }", "public List<Client> getAllClient();", "public List<Compte> getComptesClient(int numeroClient);", "public List<Cliente> consultarClientes();", "protected void listClients() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tif (procCount > 0) {\r\n\t\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\t\tSystem.out.print(proc.getSystemId());\r\n\t\t\t\t\t\tif (!proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\" (inactive)\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "public ArrayList<DataCliente> listarClientes();", "public ArrayList<Cliente> listaDeClientes() {\n\t\t\t ArrayList<Cliente> misClientes = new ArrayList<Cliente>();\n\t\t\t Conexion conex= new Conexion();\n\t\t\t \n\t\t\t try {\n\t\t\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM clientes\");\n\t\t\t ResultSet res = consulta.executeQuery();\n\t\t\t while(res.next()){\n\t\t\t \n\t\t\t int cedula_cliente = Integer.parseInt(res.getString(\"cedula_cliente\"));\n\t\t\t String nombre= res.getString(\"nombre_cliente\");\n\t\t\t String direccion = res.getString(\"direccion_cliente\");\n\t\t\t String email = res.getString(\"email_cliente\");\n\t\t\t String telefono = res.getString(\"telefono_cliente\");\n\t\t\t Cliente persona= new Cliente(cedula_cliente, nombre, direccion, email, telefono);\n\t\t\t misClientes.add(persona);\n\t\t\t }\n\t\t\t res.close();\n\t\t\t consulta.close();\n\t\t\t conex.desconectar();\n\t\t\t \n\t\t\t } catch (Exception e) {\n\t\t\t //JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\n\t\t\t\t System.out.println(\"No se pudo consultar la persona\\n\"+e);\t\n\t\t\t }\n\t\t\t return misClientes; \n\t\t\t }", "public List<Cliente> mostrarClientes()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Collections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}", "public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}", "List<User> getAllClients();", "public ArrayList<Client> getClients(String nameClient){\n ArrayList<Client> listClients = new ArrayList<Client>();\n \n \n this.serversList.forEach((server) -> {\n server.getClients().stream().filter((client) -> (client.getName().toLowerCase().contains(nameClient.toLowerCase()))).forEachOrdered((client) -> {\n client.setNameServer(server.getNameServer());\n listClients.add(client);\n });\n });\n \n return listClients;\n }", "@Override\n\tpublic String listarClientes() throws MalformedURLException, RemoteException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tString lista = datos.listaClientes();\n \treturn lista;\n \t\n\t}", "public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}", "public void printClientList() {\n uiService.underDevelopment();\n }", "public void AfficherListClient() throws Exception{\n laListeClient = Client_Db_Connect.tousLesClients();\n laListeClient.forEach((c) -> {\n modelClient.addRow(new Object[]{ c.getIdent(),\n c.getRaison(),\n c.getTypeSo(),\n c.getDomaine(),\n c.getAdresse(),\n c.getTel(),\n c.getCa(),\n c.getComment(),\n c.getNbrEmp(),\n c.getDateContrat(),\n c.getAdresseMail()});\n });\n }", "public ArrayList<Client> clientList() {\n\t\tint counter = 1; // 일딴 보류\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString query = \"select * from client\";\n\t\tArrayList<Client> client = new ArrayList<Client>();\n\t\tClient object = null;\n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(query);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobject = new Client();\n\t\t\t\tString cId = rs.getString(\"cId\");\n\t\t\t\tString cPhone = rs.getString(\"cPhone\");\n\t\t\t\tString cName = rs.getString(\"cName\");\n\t\t\t\tint point = rs.getInt(\"cPoint\");\n\t\t\t\tint totalPoint = rs.getInt(\"totalPoint\");\n\n\t\t\t\tobject.setcId(cId);\n\t\t\t\tobject.setcPhone(cPhone);\n\t\t\t\tobject.setcName(cName);\n\t\t\t\tobject.setcPoint(point);\n\t\t\t\tobject.setTotalPoint(totalPoint);\n\n\t\t\t\tclient.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t\tif (pstmt != null) {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn client;\n\t}", "@Override\n\tpublic List<Cliente> listarClientes() {\n\t\treturn clienteDao.findAll();\n\t}", "public List<UserModel> getListOfClient() {\n\t\treturn userDao.getListOfClients();\n\t}", "public ClientList getClients() {\r\n return this.clients;\r\n }", "public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}", "public ArrayList<ServerClient> displayAll() throws SQLException\n\t{\n\t\tString SQL_P = \"SELECT * FROM Clients\";\n\t\tResultSet rs;\n\n\t\tArrayList<ServerClient> array = new ArrayList<>();\n\t\tStatement stmt = con.createStatement();\n\t\ttry\n\t\t{\n\t\t\trs = stmt.executeQuery(SQL_P);\n\t\t\twhile (rs.next())\n\t\t\t{\n\n\t\t\t}\n\t\t\treturn array;\n\t\t} finally\n\t\t{\n\t\t\tif (stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "Set<Client> getAllClients();", "public List<Client> getAllClient() {\n \tTypedQuery<Client> query = em.createQuery(\n \"SELECT g FROM Client g ORDER BY g.id\", Client.class);\n \treturn query.getResultList();\n }", "private void LoadClients(boolean Traitement) {\n\n\t\ttry {\n\t\t\tpanelBouton.getBtnCarteClient().setVisible(false);\n\t\t\tint i = 0;\n\t\t\tGetClientTableModel().clear();\n\t\t\tif (Traitement) {\n\t\t\t\tthis.nom = panelRecherche.getEtNom().getText();\n\t\t\t\tthis.prenom = panelRecherche.getEtPrenom().getText();\n\t\t\t\tliste = gestion.getClients(nom, prenom);\n\t\t\t} else {\n\t\t\t\tString numclient = panelRecherche.getEtNumclient().getText().toString();\n\t\t\t\tif (numclient.isEmpty()) {\n\t\t\t\t\ti = 0;\n\t\t\t\t} else {\n\t\t\t\t\tString patternId = \"^[0-9]+$\";\n\t\t\t\t\tboolean checkId = Pattern.matches(patternId, numclient);\n\t\t\t\t\tif (checkId) {\n\t\t\t\t\t\ti = Integer.parseInt(numclient);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Ce champ peut contenir uniquement des valeurs numériques\");\n\t\t\t\t\t\tRunnable clearText = new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tpanelRecherche.getEtNumclient().setText(\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tSwingUtilities.invokeLater(clearText);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tliste = gestion.getClient(i);\n\t\t\t}\n\t\t\tif (liste == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (Client client : liste) {\n\t\t\t\tGetClientTableModel().addRow(client);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t\tArrayList<Commande> cdes = null;\n\t\ttry {\n\t\t\tcdes = gestion.getCdes(resultat);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}", "public List<Integer> getAllIDClient(){\n\t\tPreparedStatement ps = null;\n\t\tResultSet resultatRequete =null;\n\t\t\n\t\ttry {\n\t\t\tString requeteSqlGetAll=\"SELECT id_client FROM clients\";\n\t\t\tps = this.connection.prepareStatement(requeteSqlGetAll);\n\t\t\t\n\t\t\tresultatRequete = ps.executeQuery();\n\n\t\t\tClient client = null;\n\t\t\t\n\t\t\tList<Integer> listeIDClient = new ArrayList <>();\n\n\t\t\twhile (resultatRequete.next()) {\n\t\t\t\tint idClient = resultatRequete.getInt(1);\n\t\t\t\t\n\t\t\t\tlisteIDClient.add(idClient);\n\t\t\t\t\n\t\t\t}//end while\n\t\t\treturn listeIDClient;\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tif(resultatRequete!= null) resultatRequete.close();\n\t\t\t\tif(ps!= null) ps.close();\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public List<ConsumerMember> listClients() {\n return this.soapClient.listClients(this.getTargetUrl());\n }", "@Override\r\n public List<Cliente> listarClientes() throws Exception {\r\n Query consulta = entity.createNamedQuery(Cliente.CONSULTA_TODOS_CLIENTES);\r\n List<Cliente> listaClientes = consulta.getResultList();//retorna una lista\r\n return listaClientes;\r\n }", "public static void main(String[] args) {\n\t\t\t\tList listClient = new ArrayList();\r\n\t\t\t\t\r\n\t\t\t\tClient client = new Client();\r\n\t\t\t\tclient.setFirstName(\"Eduardo\");\r\n\t\t\t\tclient.setSecondName(\"Mendoza\");\r\n\t\t\t\t\r\n\t\t\t\tlistClient.add(client);\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tClient newClient = new Client();\r\n\t\t\t\tnewClient.setFirstName(\"Carlos\");\r\n\t\t\t\tnewClient.setSecondName(\"Fuentealba\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tlistClient.add(newClient);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tclient = new Client();\r\n\t\t\t\tclient.setFirstName(\"Pablo\");\r\n\t\t\t\tclient.setSecondName(\"Mondaca\");\r\n\t\t\t\t\r\n\t\t\t\tlistClient.add(client);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(\"listClient:\"+listClient);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Mostar los elementos de la lista\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tIterator it = listClient.listIterator();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Detectar que tipo de objeto tiene la lista\r\n\t\t\t\t/*Object obj = null;\r\n\t\t\t\t\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Casting JAVA\r\n\t\t\t\t\tobj = (Object) it.next();\r\n\t\t\t\t\tSystem.out.println(\"obj:\"+obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\tClient nclient = null;\r\n\t\t\t\t\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Casting JAVA\r\n\t\t\t\t\tnclient = (Client) it.next();\r\n\t\t\t\t\tSystem.out.println(\"nclient:\"+nclient);\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"firstName:\"+nclient.getFirstName());\r\n\t\t\t\t\tSystem.out.println(\"secondName:\"+nclient.getSecondName());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t}", "@Override\n\tpublic ArrayList<ClienteBean> listarClientes() throws Exception {\n\t\treturn null;\n\t}", "public List<Client> listerTousClients() throws DaoException {\n\t\ttry {\n\t\t\treturn daoClient.findAll();\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.listerTousClients\" + e);\n\t\t}\n\t}", "public String LIST(){\n String nameList = \"\";\n Enumeration keys = this.clientData.keys();\n while(keys.hasMoreElements()){\n nameList += keys.nextElement() + \" \";\n }\n return \"OK \" + nameList;\n }", "public void list(String user) {\n\t\tfor (HandleClient c : clients) {\n\t\t\tif (c.getUserName().equals(user)) {\n\t\t\t\tfor (int a = 0; a < clients.size(); a++) {\n\t\t\t\t\tc.sendList(clients.get(a).name, a);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void cclient() throws Exception {\n\n\t\tws.xml c = this.ls.cclient();\n\t\tfor (String[] row : c.t) {\n\t\t\tString pat1 = row[0];\n\t\t\tcomboBox.addItem(pat1);\n\t\t}\n\t}", "public List<String> getListOfClientNames() throws Exception {\n if (isNotAt()) {\n goTo();\n }\n return getTableDataByColumn(clientsTable, 0);\n }", "private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }", "public ArrayList<Client> getClientList() {\n return this.clientList;\n }", "public ArrayList<Cliente> getClientes() {\r\n return clientes;\r\n }", "public synchronized void sendUserList()\n {\n String userString = \"USERLIST#\" + getUsersToString();\n for (ClientHandler ch : clientList)\n {\n ch.sendUserList(userString);\n }\n }", "public static ArrayList<Cliente> getClientes()\n {\n return SimulaDB.getInstance().getClientes();\n }", "public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }", "public void getClients(AsyncCallback<List<Client>> cb);", "public static void clientListUpdater() {\r\n\t\tclientList.clear();\r\n\t\tclientList.addAll(serverConnector.getAllClients());\r\n\t}", "public List<Client> findAll() throws DataAccessLayerException {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.READ));\n return super.findAll(Client.class);\n } catch (AccessControlException e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public List getUserListShowToClient() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' and user.clientShow = 'TRUE' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private void setClientsIntoComboBox() {\n if (mainModel.getClientList() != null) {\n try {\n mainModel.loadClients();\n cboClients.getItems().clear();\n cboClients.getItems().addAll(mainModel.getClientList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the clients.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }", "public TelaListaCliente(ListadePessoas list) {\n initComponents();\n cli = new ArrayList<>();\n \n for(Cliente c: list.getClientes()){\n cli.add(c);\n }\n \n DefaultTableModel dtm = (DefaultTableModel) jclient.getModel();\n for(Cliente c: cli){ \n Object[] dados = {c.getNome(),c.getCpf(),c.getEndereco(),c.getTelefone()};\n dtm.addRow(dados);\n }\n }", "public List<Client> findAllClient() throws SQLException {\n\t\treturn iDaoClient.findAllClient();\n\t}", "private void showMenuListClient(){\n File fClient = new File(\"Meilleurs_Client.csv\");\n if(!fClient.exists()){\n jMenuItem_ShowClient.setEnabled(false);\n }\n }", "public static void initializeClientList() {\r\n\t\tClient newClient1 = new Client(1, \"Bob Jones\", \"Brokerage\");\r\n\t\tclientList.add(newClient1);\r\n\t\t\r\n\t\tClient newClient2 = new Client(2, \"Sarah Davis\", \"Retirement\");\r\n\t\tclientList.add(newClient2);\r\n\t\t\r\n\t\tClient newClient3 = new Client(3, \"Amy Friendly\", \"Brokerage\");\r\n\t\tclientList.add(newClient3);\r\n\t\t\r\n\t\tClient newClient4 = new Client(4, \"Johnny Smith\", \"Brokerage\");\r\n\t\tclientList.add(newClient4);\r\n\t\t\r\n\t\tClient newClient5 = new Client(5, \"Carol Spears\", \"Retirement\");\r\n\t\tclientList.add(newClient5);\r\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @NoCache\n public List<ClientRepresentation> getClients(@QueryParam(\"clientId\") String clientId,\n @QueryParam(\"viewableOnly\") @DefaultValue(\"false\") boolean viewableOnly,\n @QueryParam(\"search\") @DefaultValue(\"false\") boolean search,\n @QueryParam(\"first\") Integer firstResult,\n @QueryParam(\"max\") Integer maxResults) {\n List<ClientRepresentation> rep = new ArrayList<>();\n\n if (clientId == null || clientId.trim().equals(\"\")) {\n List<ClientModel> clientModels = realm.getClients(firstResult, maxResults);\n for (ClientModel clientModel : clientModels) {\n ClientRepresentation representation = modelToRepresentation.toRepresentation(clientModel);\n rep.add(representation);\n// representation.setAccess(auth.clients().getAccess(clientModel));\n }\n } else {\n List<ClientModel> clientModels = Collections.emptyList();\n if (search) {\n clientModels = realm.searchClientByClientId(clientId, firstResult, maxResults);\n } else {\n ClientModel client = realm.getClientByClientId(clientId);\n if (client != null) {\n clientModels = Collections.singletonList(client);\n }\n }\n if (clientModels != null) {\n for (ClientModel clientModel : clientModels) {\n ClientRepresentation representation = modelToRepresentation.toRepresentation(clientModel);\n// representation.setAccess(auth.clients().getAccess(clientModel));\n rep.add(representation);\n }\n }\n }\n return rep;\n }", "public void UserClientAcceptor(ArrayList<User> cleints) {\r\n \tuserClient = (ArrayList<User>)cleints.clone();\r\n \t//System.out.println(userClient);\r\n\t\tList.addAll(cleints);\r\n\t\t}", "public List<ClientThread> getClients(){\n return clients;\n }", "public ArrayList<ClientHandler> getClientList()\n {\n return clientList;\n }", "public List<Cliente> getClientes() {\n\t\ttry {\n\t\t\t\n\t\t\tList<Cliente> clientes = (List<Cliente>) db.findAll();\n\t\t\t\t\t\n\t\t\treturn clientes;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ArrayList<Cliente>();\n\n\t\t}\n\t}", "@Override\n\tpublic List<String> listarFicherosCliente(int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\t\t\n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tInterfaz.imprime(\"La lista de ficheros de la sesion: \" + idSesionCliente + \" ha sido enviada\");\n return datos.listarFicherosCliente(idSesionCliente);\n \n\t}", "public ArrayList<Project> getClients() {\n try {\n ArrayList<Project> clients = new ArrayList<Project>();\n String selectClients = \"SELECT NAME, CLIENT_ID FROM CLIENTS\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectClients);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n String client = rs.getString(\"NAME\");\n String clientId = rs.getString(\"CLIENT_ID\");\n Project p = new Project(client, clientId);\n clients.add(p);\n }\n rs.close();\n ps.close();\n return clients;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}", "List<GroupUser> getConnectedClients();", "@Override\r\n\tpublic List<Client> consulterClients(String mc) {\n\t\treturn dao.consulterClients(mc);\r\n\t}", "public List<Cliente> getClienteList () {\n\t\t\n\t\tCriteria crit = HibernateUtil.getSession().createCriteria(Cliente.class);\n\t\tList<Cliente> clienteList = crit.list();\n\t\t\n\t\treturn clienteList;\n\t}", "@Override\n\tpublic List<Cliente> getByIdCliente(long id) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> clients =getCurrentSession().createQuery(\"from Cliente c join fetch c.grupos grupos join fetch grupos.clientes where c.id='\"+id+\"' and c.activo=1\" ).list();\n return clients;\n\t}", "private void onClickDownloadList() {\n if (_SELECTEDCLIENTS.isEmpty()) {\n Toast.makeText(this, \"Du har ikke valgt kunder\", Toast.LENGTH_SHORT).show();\n } else {\n if (_SELECTEDCLIENTS.size() == 1) {\n Intent showClientIntent = new Intent();\n showClientIntent.setClass(this, ClientDataActivity.class);\n _clientController.createCompanyList(_SELECTEDCLIENTS);\n _canvasController.createCanvasList();\n showClientIntent.putExtra(SharedConstants.CLIENT, _SELECTEDCLIENTS.get(0));\n startActivity(showClientIntent);\n } else {\n Intent clientIntent = new Intent();\n clientIntent.setClass(this, ClientActivity.class);\n clientIntent.putExtra(SharedConstants.SELECTEDCLIENTLIST, MainActivity._SELECTEDCLIENTS);\n _clientController.createCompanyList(_SELECTEDCLIENTS);\n _canvasController.createCanvasList();\n startActivity(clientIntent);\n }\n }\n }", "public static List<ClientesVO> listarClientes() throws Exception {\r\n\r\n List<ClientesVO> vetorClientes = new ArrayList<ClientesVO>();\r\n\r\n try {\r\n ConexaoDAO.abreConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n try {\r\n\r\n //Construçao do objeto Statement e ligaçao com a variavel de conexao\r\n stClientes = ConexaoDAO.connSistema.createStatement();\r\n\r\n //SELECT NO BANCO\r\n String sqlLista = \"Select * from clientes\";\r\n\r\n //Executando select e armazenando dados no ResultSet\r\n rsClientes = stClientes.executeQuery(sqlLista);\r\n\r\n while (rsClientes.next()) {//enquanto houver clientes\r\n ClientesVO tmpCliente = new ClientesVO();\r\n\r\n tmpCliente.setIdCliente(rsClientes.getInt(\"id_cliente\"));\r\n tmpCliente.setCodigo(rsClientes.getInt(\"cod_cliente\"));\r\n tmpCliente.setNome(rsClientes.getString(\"nome_cliente\"));\r\n tmpCliente.setCidade(rsClientes.getString(\"cid_cliente\"));\r\n tmpCliente.setTelefone(rsClientes.getString(\"tel_cliente\"));\r\n\r\n vetorClientes.add(tmpCliente);\r\n\r\n }\r\n\r\n } catch (Exception erro) {\r\n throw new Exception(\"Falha na listagem de dados. Verifique a sintaxe da instruçao SQL\\nErro Original:\" + erro.getMessage());\r\n }\r\n\r\n try {\r\n ConexaoDAO.fechaConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n return vetorClientes;\r\n }", "public Response getClientList(int partyId, int buId,String clientValueSearch, boolean isAutoPlan,int nodeId,int pageNo,int pageSize,String orderBy,String sord);", "private void printAllClients() {\n Set<Client> clients = ctrl.getAllClients();\n clients.stream().forEach(System.out::println);\n }", "@GetMapping(\"/clients/{idClient}/comptes\")\n public Iterable<Long> getComptesClient(@PathVariable(\"idClient\") Client c) {\n Iterable<Long> comptes = serviceCollaborateur.getListeIdComptes(c.getId());\n return comptes;\n }", "private void getClientList(String loginUserId) {\n if (!TextUtils.isEmpty(loginUserId) && NetworkUtil.isOnline(this)){\n initGetInvoiceAPIResources(loginUserId);\n\n }else {\n // Snack Bar to show success message that record is wrong\n Snackbar.make(mainLayout, \"Please Check Internet Connection\", Snackbar.LENGTH_LONG).show();\n }\n }", "public List<Client> getClientsByConseillerId(long idConseiller) throws SQLException {\r\n\t\tPreparedStatement st = null;\r\n\t\tResultSet rs =null;\r\n\t\tClient client = new Client();\r\n\t\tList<Client> clients = new ArrayList<Client>();\r\n\t\tConnection connection = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection = getConnection();\r\n\t\t\tString selectSQL = \"select surname, name, email , adress from client where idConseiller = ?\";\r\n\t\t\tst = connection.prepareStatement(selectSQL);\r\n\t\t\tst.setLong(1, idConseiller);\r\n\t\t\t\r\n\t\t\trs = st.executeQuery();\r\n\t\t\t\r\n\t\t\t\r\n\t\twhile (rs.next()) {\r\n\t\t\t\r\n\t\t\tclient = new Client();\r\n\t\t\tclient.setSurname(rs.getString(\"surname\"));\r\n\t\t\tclient.setName(rs.getString(\"name\"));\r\n\t\t\tclient.setEmail(rs.getString(\"email\"));\r\n\t\t\tclient.setAdress(rs.getString(\"adress\"));\r\n\t\t\t\r\n\t\t\tclients.add(client);\r\n\t\t }\r\n\t\t\treturn clients;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (st != null)\r\n\t\t\t\t\tst.close();\r\n\t\t\t\tif (connection != null)\r\n\t\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=0; i<clients.size();i++) {\r\n\t\t\t\tSystem.out.println(\"la donnée associée à l'indice \"+ i + \" est \" + clients.get(i));\r\n\t\t\t}\r\n\t\t\treturn clients;\t\t\r\n\t\t\r\n\t}", "public static ArrayList<Client> getClients() {\n return clients;\n }", "public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}", "private void sortClients()\n {\n System.out.println(\"clients items (alphabetically):\");\n Set<Client> clients = ctrl.sortClientsAlphabetically();\n clients.stream().forEach(System.out::println);\n }", "public ClientInformation(){\n clientList = new ArrayList<>();\n\n }", "public List<String> allClients() throws IOException {\n String httpResponse = httpGet(baseUrl.resolve(\"/automation/v2/clients\"));\n return mapper.readValue(httpResponse, new TypeReference<List<String>>() {\n });\n }", "public ListaCliente() {\n initComponents();\n carregarTabela();\n }", "private void listar(HttpServletRequest request, HttpServletResponse response) throws SQLException {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\t//pasamos un atributo en la redireccion con la lista que devuelve el metodo listarHabitaciones() del modelo\n\t\t\trequest.setAttribute(\"listaClientes\", modelo.listarClientes());//tipo (atributo,valor)\n\t\t\t\t\n\t\t\t//hacemos la redireccion a la vista en el servidor, NO en el cliente. Para no perder la lista que se pasa como atributo\n\t\t\trequest.getRequestDispatcher(\"/clientes/listaClientes.jsp\").forward(request, response);\n\t\t\t\t\n\t\t} catch (ServletException | IOException e) {\n\t\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "@Test\n public void shouldListExpectedClient() {\n OrgClientsListPage theClientsPage = open(OrgClientsListPage.class, organization.getName());\n theClientsPage.entriesContainer().shouldHave(text(client.getName()));\n }", "public Lista obtenerListadoClientes(boolean soloActivos, int filtro,String valorAux,String valorAux2,String valorAux3)throws SQLException{\r\n\t\tLista listadoCliente=null;\r\n\t\tICliente daoCliente = new DCliente();\r\n\t\t\r\n\t\tlistadoCliente = daoCliente.obtenerListadoClientes(soloActivos, filtro, valorAux, valorAux2, valorAux3);\r\n\t\t\r\n\t\treturn listadoCliente;\r\n\t}", "public ClienteConsultas() {\n listadeClientes = new ArrayList<>();\n clienteSeleccionado = new ArrayList<>();\n }", "@GET\n @Path(\"/caracteristique/{caractere}\")\n @Produces(MediaType.APPLICATION_JSON+\";charset=UTF-8\")\n public Caracteristique ListClientName(@PathParam(value=\"caractere\")String caractere) {\n return caractdao.findName(caractere);\n }", "public ArrayList<Cliente> obtClientes(){\n return (ArrayList<Cliente>) clienteRepositori.findAll();\n }", "@Override\r\n\tpublic List<Client> selectBycname(String cname) {\n\t\treturn null;\r\n\t}", "public String[] getClientsToMessage() {\r\n\t\treturn clientList.getSelectedValuesList().toArray(new String[clientList.getSelectedValuesList().size()]);\r\n\t}", "@Override\n\tpublic ArrayList<ClienteFisico> listar(String complemento)\n\t\t\tthrows SQLException {\n\t\treturn null;\n\t}", "public List<Cliente> mostrarClientesPos()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tif(p.tienePost())\n\t\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\tCollections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}", "public Iterator getClients() {\n rrwl_serverclientlist.readLock().lock();\n try {\n return clientList.iterator();\n } finally {\n rrwl_serverclientlist.readLock().unlock();\n }\n }", "public Set<String> getGameListClients() {\n return this.gameListClients;\n }", "@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}", "public String searchClients(String client){\r\n for(ClientHandler ch:clientThreads){\r\n if(ch.getName().equals(client)){\r\n return String.format(\"%s is connected!\\nIndex: %d\\n\", client, clientThreads.indexOf(ch));\r\n }\r\n }\r\n return String.format(\"%s is not connected.\\n\", client);\r\n }", "public ArrayList<String> displayClient(int ID) throws SQLException\n\t{\n\t\tString order = \"SELECT * FROM Clients WHERE ID ='\" + ID + \"';\";\n\t\tArrayList<String> array = new ArrayList<>();\n\t\tStatement stmt = null;\n\t\ttry\n\t\t{\n\t\t\tstmt = con.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(order);\n\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tarray.add(rs.getInt(1) + \" \" + rs.getString(2) + \" \" + rs.getString(3) + \" \" + rs.getInt(4));\n\t\t\t}\n\t\t\treturn array;\n\t\t} finally\n\t\t{\n\t\t\tif (stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public List<Client> getAllClients(){\n log.trace(\"getAllClients --- method entered\");\n List<Client> result = clientRepository.findAll();\n log.trace(\"getAllClients: result={}\", result);\n return result;\n }", "public InterfaceSalon(String liste, Client client) {\n initComponents();\n this.c=client;\n this.lobbyListJSON=new JSONArray();\n parser = new JSONParser();\n \n setLobbyList(liste);\n }" ]
[ "0.7761886", "0.7649047", "0.7633005", "0.7539799", "0.74965215", "0.74473405", "0.74270976", "0.7372741", "0.7327954", "0.7319815", "0.72974324", "0.7111787", "0.7080098", "0.7057707", "0.7011923", "0.69533443", "0.6930349", "0.69140506", "0.68914014", "0.68747884", "0.68056947", "0.6792896", "0.67912406", "0.67796826", "0.67747", "0.6772661", "0.6762347", "0.6757455", "0.67346084", "0.6681865", "0.66789734", "0.6621236", "0.6568601", "0.6559424", "0.65571654", "0.65393305", "0.6537799", "0.65373844", "0.6534433", "0.65338486", "0.6528713", "0.6518809", "0.65055627", "0.64945674", "0.6472582", "0.64560896", "0.64436346", "0.64310527", "0.6430906", "0.6420057", "0.64178365", "0.6415468", "0.64043105", "0.6388741", "0.6386278", "0.63819814", "0.6381867", "0.63784224", "0.6350628", "0.63487536", "0.63318795", "0.6329062", "0.6318606", "0.6317449", "0.6311823", "0.6304909", "0.6296654", "0.6291674", "0.6286359", "0.62860996", "0.62792677", "0.6268246", "0.62644404", "0.6259015", "0.6253251", "0.6239837", "0.6235689", "0.6233221", "0.6219338", "0.62110126", "0.61985517", "0.6190832", "0.6185118", "0.6183846", "0.6170963", "0.6167505", "0.6164844", "0.6153278", "0.6148011", "0.6132577", "0.61320794", "0.6129598", "0.6129095", "0.6122062", "0.6107177", "0.61068964", "0.6106598", "0.61048865", "0.6100601", "0.6098607", "0.6094756" ]
0.0
-1
Use a unique transition name so this item can be used as a shared element when transitioning to the album details screen.
public void bind(Album album) { ViewCompat.setTransitionName(container, album.title); container.setOnClickListener(v -> listener.onAlbumClicked(container, album)); albumImage.setImageResource(album.cover); albumTitle.setText(album.title); albumArtist.setText(album.artist); if (albumDuration != null) { albumDuration.setText(album.duration); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n\n Pair<View, String> pair = Pair.create((View) holder.thumbnail, \"name_transition\");\n\n ActivityOptionsCompat options;\n Activity act = (AppCompatActivity) mContext;\n options = ActivityOptionsCompat.makeSceneTransitionAnimation(act, pair);\n Intent intent = new Intent(mContext, AlbumDetailActivity.class);\n intent.putExtra(\"IMG\",album.getCont());\n act.startActivityForResult(intent, getItemCount(), options.toBundle());\n\n\n // ((AppCompatActivity) mContext).startActivityForResult(intent, requestCode, options.toBundle());\n }", "private String getActivityName(Transition transition) {\n\t\tString result = \"\";\n\t\t// get associated log event type\n\t\tLogEvent le = transition.getLogEvent();\n\n\t\t// check for invisible tasks\n\t\tif (le != null) {\n\t\t\tresult = le.getModelElementName();\n\t\t} else {\n\t\t\tresult = transition.getIdentifier();\n\t\t}\n\t\treturn result;\n\t}", "@Override\n public void onItemClick(View view, int position) {\n setSharedElementReturnTransition(TransitionInflater.from(getActivity()).inflateTransition(R.transition.trans_move));\n setExitTransition(TransitionInflater.from(getActivity()).inflateTransition(android.R.transition.explode));\n\n View orange = view.findViewById(R.id.orange_bar);\n View blue = view.findViewById(R.id.blue_bar);\n\n SecondFragment secondFragment = new SecondFragment();\n // Set shared and scene transitions on 2nd fragment\n secondFragment.setSharedElementEnterTransition(TransitionInflater.from(getActivity()).inflateTransition(R.transition.trans_move));\n secondFragment.setEnterTransition(TransitionInflater.from(getActivity()).inflateTransition(android.R.transition.explode));\n\n // You need to make sure the transitionName is both unique to each instance of the view you\n // want to animate as well as known to the 2nd fragment. Since these views are inside\n // a RecyclerView or ListView, they can have many instances. In your adapter you need to\n // set a transitionName dynamically (I use the position), then pass that unique transitionName\n // to the 2nd fragment before you animate\n secondFragment.setBlueId(blue.getTransitionName());\n secondFragment.setOrangeId(orange.getTransitionName());\n android.app.FragmentTransaction trans = getFragmentManager().beginTransaction();\n trans.replace(R.id.main_container, secondFragment);\n trans.addToBackStack(null);\n trans.addSharedElement(blue, blue.getTransitionName());\n trans.addSharedElement(orange, orange.getTransitionName());\n trans.commit();\n }", "void changeMenuItemName(String itemId, String itemName);", "public void renameSelected(String name) {\n if( getAdapter().getSelectionManager().getSelection().size > 0 ) {\n AnimationDef def = getAdapter().getSelectionManager().getSelection().first();\n removeAnimationDef(def);\n def.setName(name);\n addAnimationDef(def);\n }\n }", "Transition createTransition();", "Transition createTransition();", "public void doChangeAlbumName()\n/* */ {\n/* 73 */ AlbumDTO changed = this.galleryManager.saveAlbum(this.selectedAlbum);\n/* 74 */ for (AlbumDTO dto : this.albumList)\n/* */ {\n/* 76 */ if (dto.getId().equals(changed.getId()))\n/* */ {\n/* 78 */ dto.setName(changed.getName());\n/* 79 */ break;\n/* */ }\n/* */ }\n/* */ }", "private void setDisplayName(ItemStack item, String name) {\n ItemMeta meta = item.getItemMeta();\n meta.setDisplayName(name);\n item.setItemMeta(meta);\n }", "public void transitFragmentWithSharedElement(Fragment newFragment,View view,String transitionName){\n Fragment oldFragment = getFragmentManager().findFragmentById(R.id.main_container);\n\n FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();\n\n Fade exitFade = new Fade();\n exitFade.setDuration(getResources().getInteger(R.integer.anim_duration_medium));\n oldFragment.setExitTransition(exitFade);\n\n // 2. Shared Elements Transition\n TransitionSet enterTransitionSet = new TransitionSet();\n enterTransitionSet.addTransition(TransitionInflater.from(getContext()).inflateTransition(android.R.transition.move));\n enterTransitionSet.setDuration(getResources().getInteger(R.integer.anim_duration_medium));\n enterTransitionSet.setStartDelay(100);\n newFragment.setSharedElementEnterTransition(enterTransitionSet);\n\n Fade enterFade = new Fade();\n enterFade.setStartDelay(getResources().getInteger(R.integer.anim_duration_medium)+100);\n enterFade.setDuration(getResources().getInteger(R.integer.anim_duration_medium));\n newFragment.setEnterTransition(enterFade);\n\n //oldFragment.setReenterTransition(enterFade);\n\n fragmentTransaction.addSharedElement(view,transitionName);\n\n fragmentTransaction.replace(R.id.main_container, newFragment).addToBackStack(null);\n fragmentTransaction.commitAllowingStateLoss();\n }", "public String getName() {\n\t\treturn itemName;\n\t}", "public String getItemName()\n {\n return itemName;\n }", "String convertTransition(Transition instanceValue);", "public void setTransition(final String transition) {\n\t\tthis.transition = transition;\n\t}", "@Override\n public void onItemClick(View view, int position) {\n Intent intent = new Intent(getActivity(), DetailActivity.class);\n intent.putExtra(DetailActivity.EXTRA_PARAM_ID, position);\n ImageView placeImage = (ImageView) view.findViewById(R.id.placeImage);\n LinearLayout placeHoldername = (LinearLayout) view.findViewById(R.id.placeNameHolder);\n Pair<View, String > imagePair = Pair.create((View) placeImage, \"tImage\");\n Pair<View, String> holderPair = Pair.create((View) placeHoldername, \"tNameHolder\");\n ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(getActivity(),\n imagePair, holderPair);\n ActivityCompat.startActivity(getActivity(), intent, options.toBundle());\n }", "void setStateName(String name);", "private ItemStack renameItem(ItemStack item, String key) {\r\n\t\tItemMeta meta = item.getItemMeta();\r\n\t\tmeta.setDisplayName(ModuleFactory.getInstance().getTranslator().getTranslation(plugin, player, key));\r\n\t\titem.setItemMeta(meta);\r\n\t\treturn item;\r\n\t}", "public String getIsmtransitionCareflowstepName() {\n\t\treturn ismtransitionCareflowstepName;\n\t}", "public void adjustName() {\n Item item = getItem();\n if (!item.isFixedName()) {\n if (item.getSchemaComponent().type() == SchemaBase.SEQUENCE_TYPE) {\n if (m_values.size() > 0) {\n Item childitem = ((DataNode)m_values.get(0)).getItem();\n if (item != childitem) {\n item.setName(childitem.getEffectiveName());\n }\n }\n }\n }\n }", "public String getName()\r\n\t{\r\n\t\treturn theItem.getName();\r\n\t}", "@Override\r\n public void DisplayAlbumName(String name) {\r\n this.setTitle(name + \" - Photo Viewer\");\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "@Override\n\tpublic String getName() {\n\t\treturn ((Extension)_item).getId() + \".\" + ((Extension)_item).getTitle();\n\t}", "public void setItemName(String itemName) {\n this.itemName = itemName;\n }", "public void setItemName(String itemName) {\n this.itemName = itemName;\n }", "public void setName(String newName) {\r\n\t\tthis.holderName = newName;\r\n\t}", "public String getName() {\n return item.getName();\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public void hoverOverAlbumLink(String albumName) {\n\t\tnavigateToExternalLinks();\n\t\tWebElement albumNameLink = this.studioAlbumsValue.findElement(By.linkText(albumName));\n\t\tActions builder = new Actions(driver);\n\t\tbuilder.moveToElement(albumNameLink).perform();\n\t}", "void changeMenuItemName(String itemName, byte type, String msgPlus);", "public String getItemName() {\n\t\treturn ((name != null) ? name : (name = MiscUtils.getName(this)));\n\t}", "public synchronized String getName(){\n \treturn item_name;\n }", "public String getAsNameAbbreviated(String itemName);", "public String getItemName() {\r\n\t\treturn itemName;\r\n\t}", "@Override\n public void showPowerDetailsUI(String itemId, String itemName,\n String powerListId, View transitioningView, String powerListName) {\n if (transitioningView != null){\n Intent i = new Intent(PowerListActivity.this, PowerDetailsActivity.class);\n String transitionName = getString(R.string.transition_powerDetails_name);\n ActivityOptionsCompat options =\n ActivityOptionsCompat.makeSceneTransitionAnimation(\n PowerListActivity.this,\n transitioningView,\n transitionName);\n Bundle bundle = options.toBundle();\n\n i.putExtra(PowerDetailsActivity.EXTRA_POWER_DETAIL_ID, itemId);\n i.putExtra(PowerDetailsActivity.EXTRA_POWER_LIST_ID, powerListId);\n i.putExtra(PowerDetailsActivity.EXTRA_POWER_DETAIL_NAME, itemName);\n i.putExtra(PowerDetailsActivity.EXTRA_POWER_LIST_NAME, powerListName);\n ActivityCompat.startActivity(PowerListActivity.this, i, bundle);\n }\n else\n this.openPowerDetailsActivity(itemId, powerListId, powerListName);\n }", "private String getName(String name) {\n\t\tint n;\n\t\tif (name.startsWith(\"place_\")) {\n\t\t\tn = Integer.parseInt(name.substring(6));\n\t\t} else if (name.startsWith(\"t_\")) {\n\t\t\tn = Integer.parseInt(name.substring(2));\n\t\t} else {\n\t\t\treturn name;\n\t\t}\n\t\tif (n < net.getPlaces().size()) {\n\t\t\tPlace p = (Place) net.getPlaces().get(n);\n\t\t\treturn \"Place \" + p.getIdentifier();\n\t\t}\n\t\tn -= net.getPlaces().size();\n\t\tn--;\n\t\tif (n < net.getTransitions().size()) {\n\t\t\tTransition t = (Transition) net.getTransitions().get(n);\n\t\t\treturn \"Transition \" + t.getIdentifier();\n\t\t}\n\t\treturn name;\n\t}", "TransitionType createTransitionType();", "public void setName(String name) {\r\n\t\tthis.title = name;\r\n\t}", "private static String getTransitionString(Transition expected) {\n\t\treturn expected.getFromState().getName()+\"-->\"+expected.getDescription()+\"-->\"+expected.getToState().getName();\n\t}", "private void prepareTransitions() {\n setExitTransition(TransitionInflater.from(getContext())\n .inflateTransition(R.transition.grid_exit_transition));\n\n // A similar mapping is set at the ImagePagerFragment with a setEnterSharedElementCallback.\n setExitSharedElementCallback(\n new SharedElementCallback() {\n @Override\n public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {\n // Locate the ViewHolder for the clicked position.\n RecyclerView.ViewHolder selectedViewHolder = mPhotosListView\n .findViewHolderForAdapterPosition(MainActivity.currentPosition);\n if (selectedViewHolder == null) {\n return;\n }\n\n // Map the first shared element name to the child ImageView.\n sharedElements\n .put(names.get(0), selectedViewHolder.itemView.findViewById(R.id.ivPhoto));\n }\n });\n }", "private void setCustomName(EliteMobProperties eliteMobProperties) {\n this.name = ChatColorConverter.convert(\n eliteMobProperties.getName().replace(\n \"$level\", eliteMobLevel + \"\"));\n eliteMob.setCustomName(this.name);\n if (ConfigValues.defaultConfig.getBoolean(DefaultConfig.ALWAYS_SHOW_NAMETAGS))\n eliteMob.setCustomNameVisible(true);\n }", "@Override\n public String getName() {\n return \"Custom - \" + getTitle();\n }", "public void addTransition(String eventName, Transition transition) {\n List<Transition> matches = transitions.get(eventName);\n if(matches==null) {\n matches = new ArrayList<Transition>();\n transitions.put(eventName, matches);\n }\n matches.add(transition);\n }", "public void addTransition(Models.Transition transition) {\n GameHelper.getInstance(SceneEditor.this).addTransition(transition, new Response.Listener<Models.Transition>() {\n @Override\n public void onResponse(Models.Transition response) {\n //TODO: Add call back functionality?\n Toast.makeText(SceneEditor.this, \"Transition Created\", Toast.LENGTH_SHORT).show();\n\n }\n });\n }", "Transition createTransition(String literal);", "protected void sequence_PropertyName(ISerializationContext context, PropertyName semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "protected String revealedId (String name)\n {\n return name;\n }", "public AlbumListFragment() {\n setFragmentname(this.getClass().getSimpleName());\n }", "protected String getTokenName(Token parent, String transitionName, int loopIndex)\n {\n String suffix = \".\" + loopIndex;\n if (transitionName == null || transitionName.isEmpty())\n {\n // No transition name\n int size = (parent.getChildren() != null) ? parent.getChildren().size() + 1 : 1;\n return buildTokenName(\"FOREACHFORK\", suffix, size);\n }\n return findFirstAvailableTokenName(parent, transitionName, suffix);\n }", "@Override\n\t\tprotected void doTransition() {\n\t\t\t\n\t\t}", "@Override\n public void setName(String name) {\n \n }", "private String getAlbumName(){\n return getString(R.string.album_name);\n }", "@Override\r\n\tpublic String getName() {\r\n\t\treturn this.title;\r\n\t}", "public String getPresentationName();", "public String getPresentationName();", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "@Override\n public boolean onItemClick(AdapterView<?> parent, View view, int position, long id, IDrawerItem drawerItem) {\n\n if (drawerItem != null) {\n if (drawerItem instanceof Nameable) {\n switch (drawerItem.getIdentifier()) {\n // primary items\n case IDENTIFIER_PRIMARY_LOGISTICS:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, LogisticsFragment.newInstance(), LogisticsFragment.FRAGMENT_TAG).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_PRIMARY_LOGISTICS;\n break;\n case IDENTIFIER_PRIMARY_IM:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n// getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, VehiclesListFragment.newInstance()).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_PRIMARY_IM;\n break;\n case IDENTIFIER_PRIMARY_MARKET:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n// getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, VehiclesListFragment.newInstance()).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_PRIMARY_MARKET;\n break;\n case IDENTIFIER_PRIMARY_JOBS:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n// getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, VehiclesListFragment.newInstance()).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_PRIMARY_JOBS;\n break;\n\n // secondary items\n case IDENTIFIER_SECONDARY_MIME:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, HelpFragment.newInstance()).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_SECONDARY_MIME;\n break;\n case IDENTIFIER_SECONDARY_SETTING:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, SettingFragment.newInstance()).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_SECONDARY_SETTING;\n break;\n case IDENTIFIER_SECONDARY_AUTO_INSURAMCE:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, HelpFragment.newInstance()).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_SECONDARY_MIME;\n break;\n case IDENTIFIER_SECONDARY_WEATHER:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, FlexibleSpaceWithImageWithToolBarFragment.newInstance()).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_SECONDARY_SETTING;\n break;\n case IDENTIFIER_SECONDARY_CALL_SERVICES:\n getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, BaseViewPagerParentFragment.newInstance()).commitAllowingStateLoss();\n mLastFragmentId = IDENTIFIER_SECONDARY_MIME;\n break;\n// case IDENTIFIER_CONTACT:\n//// getSupportActionBar().setTitle(((Nameable) drawerItem).getNameRes());\n//\n//// Fragment contactFragment = ContactFragment.newInstance(title);\n//// getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, contactFragment).commit();\n//\n// Intent intent = new Intent();\n// intent.setClass(MainActivity.this, VehicleListActivity.class);\n// intent.putExtra(BaseActivity.KEY_TITLE, getResources().getText(R.string.activity_title_my_vehicles));\n// MainActivity.this.startActivityForResult(intent, IDENTIFIER_CONTACT);\n// break;\n\n // debug items\n case IDENTIFIER_DEBUG_PUSH:\n MainActivity.this.startActivityForResult(new Intent(MainActivity.this, PushDemoActivity.class), IDENTIFIER_DEBUG_PUSH);\n break;\n case IDENTIFIER_DEBUG_REFRESH_LIST_VIEW:\n MainActivity.this.startActivityForResult(new Intent(MainActivity.this, XListViewActivity.class), IDENTIFIER_DEBUG_REFRESH_LIST_VIEW);\n break;\n case IDENTIFIER_DEBUG_FLOATION_ACTION_WIDGETS:\n MainActivity.this.startActivityForResult(new Intent(MainActivity.this, FBMainActivity.class), IDENTIFIER_DEBUG_FLOATION_ACTION_WIDGETS);\n break;\n default:\n break;\n }\n }\n\n if (drawerItem instanceof Badgeable) {\n Badgeable badgeable = (Badgeable) drawerItem;\n if (badgeable.getBadge() != null) {\n //note don't do this if your badge contains a \"+\"\n// int badge = Integer.valueOf(badgeable.getBadge());\n// if (badge > 0) {\n// result.updateBadge(String.valueOf(badge - 1), position);\n// }\n }\n }\n }\n\n return false;\n }", "@Override\n public void onCardAppeared(View view, int position) {\n TextView tv = view.findViewById(R.id.item_name);\n Log.d(TAG, \"onCardAppeared: \" + position + \", name: \" + tv.getText());\n }", "@Override\n protected void populateItem(final ListItem<String> item) {\n AjaxFallbackLink link = new AjaxFallbackLink(\"link\") {\n\n @Override\n public void onClick(AjaxRequestTarget target) {\n onSlidebarClick(target, item.getModelObject());\n }\n\n };\n Section section = sectionManager.getSection(item.getModelObject());\n link.add(new TransparentWebMarkupContainer(\"icon\").add(AttributeModifier.append(\"class\", \"fa-\" + section.getIcon())));\n\n String key = \"Section.\" + section.getTitle() + \".name\";\n String title = new StringResourceModel(key, null).getString();\n// link.add(new Label(\"label\", title).setRenderBodyOnly(true));\n link.add(new Label(\"label\", title));\n\n item.setOutputMarkupId(true);\n item.add(link);\n\n item.add(new AttributeAppender(\"class\", \"active\") {\n\n @Override\n public boolean isEnabled(Component component) {\n return sectionManager.getSelectedSectionId().equals(item.getModelObject());\n }\n\n }.setSeparator(\" \"));\n }", "public void changeMenuItemName(int itemId, String itemName) {\n if(itemId>-1){\n iMenu.changeMenuItemName(itemId, itemName);\n } else iMenu.updateManuItem(itemName, itemName, (byte)4, \"\"); //CR 13179 bug 14155,14156\n\n }", "protected String newLinkName(){\n\t\treturn \"WomoEvtLnk_\" + linkNr++;\n\t}", "String galleryItemIdentity();", "@Test\n public void stateNameExtraction() {\n final String EVENT_NAME = \"TestEvent\";\n StateTransitionEvent event = new StateTransitionEventImpl( EVENT_NAME );\n\n assertThat( event.getEventName(), equalTo( EVENT_NAME ) );\n LOG.debug( \"Successfully created stateTransitionEvent=[\" + event + \"]\" );\n }", "public void setTitleAccordingToState(){\n String ts=null;\n switch(getPlayMode()){\n case LIVE:\n ts=\" LIVE\";\n break;\n case PLAYBACK:\n ts=currentFile.getName()+\" PLAYING\";\n break;\n case WAITING:\n ts=\"MotionViewer - WAITING\";\n break;\n }\n setTitle(ts);\n }", "public SimItem (String name, int color,long simID) {\n \tmName = name;\n \tmColor = color;\n \tmIsSim = false;\n \tmSimID = simID;\n }", "public static ItemStack name(ItemStack is, String name) {\r\n\t\tItemMeta im = is.getItemMeta();\r\n\t\tim.setDisplayName(name);\r\n\t\tis.setItemMeta(im);\r\n\t\treturn is;\r\n\t}", "@Override\n public final String getName() {\n return _name;\n }", "public final void setName(String name) {_name = name;}", "void setName(String name_);", "public String getItemName() {\n\t\treturn _itemName;\n\t}", "@Override\r\n\tprotected String getName() {\n\t\treturn NAME;\r\n\t}", "public final int getName() { return name; }", "public String getIsmtransitionCurrentstateName() {\n\t\treturn ismtransitionCurrentstateName;\n\t}", "public void setItemName(String itemName) {\r\n this.itemName = itemName == null ? null : itemName.trim();\r\n }", "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}", "public <T extends Animation> String buildUniqueName(ObservableMap<String, T> anis) {\n\t\treturn buildUniqueNameWithPrefix(anis,\"Scene\", anis.size());\n\t}", "@Override\n protected void commitNameChange(PropertyChangeEvent evt) {\n AttributeItemFigure figure = getFigure();\n figure.updateLabels();\n setSelected(EditPart.SELECTED_PRIMARY);\n figure.revalidate();\n }", "@Override\n public String name() {\n return this._name;\n }", "@Override\n\tpublic synchronized Transition addTransition(String label) {\n\t\tTransition t = new Transition(this, label);\n\t\tthis.transitions.add(t);\n\t\tgraphElementAdded(t);\n\t\treturn t;\n\t}", "@Override\n\tpublic String getDisplayName() {\n\t\treturn item.getItemStackDisplayName(stack);\n\t\t//#endif\n\t}", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setAnimationToQuizName()\n {\n rotateAnimation = (RotateAnimation)AnimationUtils.loadAnimation(this, R.anim.rotate_animation);\n rotateAnimation.setRepeatCount(Animation.INFINITE);\n rotateAnimation.setDuration(ROTATION_DURATION);\n rotateAnimation.setRepeatMode(Animation.REVERSE);\n quizText.setAnimation(rotateAnimation);\n }", "@Override\n public void onClick(View v) {\n\n if (item.getId() != 1) {\n\n name.setText(item.getName());\n\n }\n\n if (item.getId() == 2) {\n\n // name.setText(item.getName());\n\n }\n\n }", "public interface OnTransitionClickListener {\n\n void onClick(View transitionOrigin, int positionOnAdapter);\n}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case R.id.action_add:\n getAdapter().addToList(NameFactory.getRandomName());\n return true;\n default:\n if (isInAnimationArray(id)) {\n return changeAnimation(id);\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public String getName() {\n return name;\n }", "@Override\n public String getName() {\n return name();\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t\tfor (int i = 0; i < stateInfo.length; i++) {\r\n\t\t\tif (name.trim().equalsIgnoreCase(stateInfo[i][0])) {\r\n\t\t\t\tthis.flower = stateInfo[i][1];\r\n\t\t\t\tthis.bird = stateInfo[i][2];\r\n\r\n\t\t\t\t// add to the history of state name, flower and bird\r\n\t\t\t\thistory.append(this.name + \", \" + this.flower + \", \" + this.bird + \"\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\t\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tfanChart.setName(name);\n\t}" ]
[ "0.58788735", "0.5595587", "0.5432241", "0.5429745", "0.542295", "0.5356016", "0.5356016", "0.5342627", "0.5212654", "0.5190495", "0.51616216", "0.5160907", "0.5147563", "0.51424533", "0.511979", "0.5113545", "0.50978214", "0.5096039", "0.50901526", "0.50887245", "0.5075287", "0.5071687", "0.5071687", "0.5071687", "0.50534374", "0.50485003", "0.50485003", "0.5039334", "0.5033516", "0.5031319", "0.5031319", "0.5031319", "0.5031319", "0.5031319", "0.5023017", "0.50125587", "0.49927646", "0.49879053", "0.49780563", "0.49701473", "0.4940008", "0.49331343", "0.49297416", "0.49176422", "0.4910879", "0.4901693", "0.48687473", "0.4863206", "0.4820044", "0.481803", "0.4816747", "0.48138857", "0.48113954", "0.47974133", "0.47970763", "0.47891217", "0.47858316", "0.4779414", "0.47776207", "0.47760236", "0.47760236", "0.47545767", "0.4751818", "0.47499976", "0.47378415", "0.47341222", "0.47288284", "0.47250035", "0.47102466", "0.46998543", "0.4694402", "0.46895438", "0.46840745", "0.4672495", "0.46702757", "0.46648818", "0.4663463", "0.46565086", "0.46556327", "0.4653716", "0.46495348", "0.46482456", "0.4643078", "0.46373355", "0.46370405", "0.4635705", "0.46318695", "0.46318695", "0.46318695", "0.46318695", "0.46317387", "0.4631231", "0.46258074", "0.4625734", "0.4622396", "0.461962", "0.46190917", "0.46190917", "0.46145138", "0.46141428", "0.4611011" ]
0.0
-1
onCreat > ergebnisse_layout / layout wird gestartet, EditText, Buttons und co. werden zugeordnet.
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.minilotto_layout); StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); // Button zur Abgabe des Tipps ausfuehren = (Button) findViewById(R.id.btnAusfuehren); // Button zum Aktualisieren der Daten refresh = (Button) findViewById(R.id.refresh); // 3 festzulegende Lottozahlen (User) z1 = (EditText) findViewById(R.id.editZahl1); z2 = (EditText) findViewById(R.id.editZahl2); z3 = (EditText) findViewById(R.id.editZahl3); information = (TextView) findViewById(R.id.textView2); ziehung = (TextView) findViewById(R.id.ziehung); ergebnis = (TextView) findViewById(R.id.txtErgebnis_zeigen); information2 = (TextView) findViewById(R.id.textView22); auspackenLoginSpielInformationen(""); // ------------------------------------------------------------------------ onClick -> ausfuehren /* * Bei Klick auf Ausführen wird geschaut ob 1) alle EdiText Felder ausgefüllt sind -> Sonst Fehlermeldung * 2) Ob der Spieler bereits auf Ausführen gedrückt hat -> Sonst Fehlermeldung * 3) Ob die Tippabgabe durch Ausführen durch den letzten Spieler der Spielsitzung stattfand * da erst dann die Gewinnerermittlung durchgeführt wird * */ ausfuehren.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (pruefenObAlleEditTextAusgefuelltWurden()==true) { if (einmalAusfuehrenDruecken==false){ randomToFindTheRightNumber(); if(letzterSpieler()==true) { HashMap GewinnerID = new HashMap(); GewinnerID= gewinnerSuchen(); //############################################### if (GewinnerID.get("GewinnerMenge").equals(0)){information.setText("Es gibt keinen Gewinner!");} else { for (int i=1; i <= (Integer.valueOf(GewinnerID.get("GewinnerMenge").toString()));i++) { gewinnerNotiz(Integer.valueOf(GewinnerID.get("Gewinner"+i).toString())); } } } else {information.setText("Informationen der Mitspieler");} } else {fehlermeldung("Es darf nur einmal getippt werden!");} } else {fehlermeldung("Bitte alle Felder ausfüllen!");} } }); // ------------------------------------------------------------------------ onClick -> refresh /* * Durch Drücken der refresh-Taste aktualisieren sich die Informationen. */ refresh.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { refresh.refreshDrawableState(); Intent callerIntent = getIntent(); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); if (ActuellSpieler_Gleich_MaxSpieler(packageFromSpiel.getInt("ID_Spiel"))==true)//######################################################## { String emailLesen=Email_Lesen(String.valueOf(packageFromSpiel.getInt("ID_Spiel"))); auspackenLoginSpielInformationen(emailLesen); ziehung.setText(getErgebnisDerSpielID()); } else{ auspackenLoginSpielInformationen(""); ergebnis.setText(vorratErgebnisString); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){\n View layout = inflater.inflate(R.layout.setup_chatroom_dialog, container, false);\n Button setupButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_setup_button);\n Button cancelButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_cancel_button);\n editText = (EditText)layout.findViewById(R.id.setup_chatRoom_dialog_edit_text);\n setupButton.setOnClickListener(setupListener);\n cancelButton.setOnClickListener(cancelListener);\n return layout;\n }", "public FinalEditLayout(ViewGroup parent){\n this.parent = parent;\n onCreate();\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.notepad_main, container, false);\r\n\t\tbody=(LineEditText) v.findViewById(R.id.body);\r\n\t\tdel=(Button) v.findViewById(R.id.delAll);\r\n\t\tdel.setOnClickListener(this);\r\n\t\treturn v;\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n\n super.test = \"bbb\";\n \tsuper.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n \n TableLayout tableLayout = new TableLayout(this);\n tableLayout.setBackgroundColor(Color.rgb(255, 255, 255));\n setContentView(tableLayout, new LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.FILL_PARENT));\n\n TableRow tableRow1 = new TableRow(this);\n userId=new EditText(this);\n userId.setText(\"userId\", EditText.BufferType.NORMAL);\n// userId.setFilters(filters);\n TableRow.LayoutParams rowLayout = new TableRow.LayoutParams();\n rowLayout.span = 2;\n tableRow1.addView(userId,rowLayout);\n \n TableRow tableRow2 = new TableRow(this);\n passwd=new EditText(this);\n passwd.setText(\"passwd\", EditText.BufferType.NORMAL);\n passwd.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);\n tableRow2.addView(passwd, rowLayout);\n \n TableRow tableRow3 = new TableRow(this);\n //OKボタンの生成\n okBtn = new Button(this);\n okBtn.setText(\"OK\");\n okBtn.setOnClickListener(this);\n okBtn.setTag(\"ok\");\n tableRow3.addView(okBtn);\n \n //CANCELボタンの生成\n cancelBtn = new Button(this);\n cancelBtn.setText(\"CANCEL\");\n cancelBtn.setOnClickListener(this);\n cancelBtn.setTag(\"cancel\");\n tableRow3.addView(cancelBtn);\n \n //ユーザ作成ボタンの生成\n newBtn = new Button(this);\n newBtn.setText(\"新規作成\");\n newBtn.setOnClickListener(this);\n newBtn.setTag(\"new\");\n tableRow3.addView(newBtn);\n\n tableLayout.addView(tableRow1);\n tableLayout.addView(tableRow2);\n tableLayout.addView(tableRow3);\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n setContentView(C0354R.layout.layout_edit_main);\n loadLayoutFromPref();\n this.mImageView = (LayoutView) findViewById(C0354R.C0356id.layoutview);\n this.mLayoutAdapter = new LayoutAdapter(this, (LayoutItem) this.mLayoutItems.get(this.mCurrentLayout), this.mImageView);\n switchLayout(0);\n setupActionBarDropdown(getIntent().getIntExtra(KEY_INITIAL_LAYOUT, 0));\n registerForContextMenu(this.mImageView);\n this.mImageView.setOnCreateContextMenuListener(new ContextMenuListener(this));\n this.mImageView.setOnClickListener(new OnClickListener() {\n public void onClick(View view) {\n SingleView viewFromLastPosition = LayoutEditorActivity.this.mImageView.getViewFromLastPosition();\n if (viewFromLastPosition != null) {\n LayoutEditorActivity.this.addOrEditView(viewFromLastPosition);\n }\n }\n });\n ((Button) findViewById(C0354R.C0356id.btncancel)).setOnClickListener(new OnClickListener() {\n public void onClick(View view) {\n LayoutEditorActivity.this.finish();\n }\n });\n ((Button) findViewById(C0354R.C0356id.btnsave)).setOnClickListener(new OnClickListener() {\n public void onClick(View view) {\n LayoutEditorActivity.this.saveLayoutToPref();\n Intent intent = new Intent();\n intent.setClass(LayoutEditorActivity.this, MainActivity.class);\n intent.setAction(Constants.ACTION_EDIT_LAYOUT);\n LayoutEditorActivity.this.startActivity(intent);\n LayoutEditorActivity.this.finish();\n }\n });\n GAHelper.recordScreen(this, TAG);\n }", "@Override\n\tprotected void initView() {\n\t\tsetContentView(R.layout.activity_money_manage);\n\t\t\n\t\tfindViewById(R.id.bt_title_left).setOnClickListener(this);\n\t\tfindViewById(R.id.bt_ok).setOnClickListener(this);\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tLinearLayout layout = new LinearLayout(this);\r\n\t\tlayout.setBackgroundColor(Color.rgb(255, 255, 255));\r\n\t\tlayout.setOrientation(LinearLayout.VERTICAL);\r\n\t\tsetContentView(layout);\r\n\r\n\t\ttextView = new TextView(this);\r\n\t\ttextView.setText(\"IP-address\");\r\n\t\ttextView.setTextColor(Color.rgb(0, 0, 0));\r\n\t\ttextView.setLayoutParams(new LinearLayout.LayoutParams(WC, WC));\r\n\t\tlayout.addView(textView);\r\n\r\n\t\tString address = \"\";\r\n\t\taddressText = new EditText(this);\r\n\t\taddressText.setText(address);\r\n\t\taddressText.setLayoutParams(new LinearLayout.LayoutParams(FP, WC));\r\n\t\tlayout.addView(addressText);\r\n\r\n\t\ttextView = new TextView(this);\r\n\t\ttextView.setText(\"Port number\");\r\n\t\ttextView.setTextColor(Color.rgb(0, 0, 0));\r\n\t\ttextView.setLayoutParams(new LinearLayout.LayoutParams(WC, WC));\r\n\t\tlayout.addView(textView);\r\n\r\n\t\tString port = \"\";\r\n\t\tportText = new EditText(this);\r\n\t\tportText.setText(port);\r\n\t\tportText.setLayoutParams(new LinearLayout.LayoutParams(FP, WC));\r\n\t\tlayout.addView(portText);\r\n\r\n\t\tButton btn = new Button(this);\r\n\t\tbtn.setText(\"GetControl\");\r\n\t\tbtn.setOnClickListener(listener);\r\n\t\tbtn.setLayoutParams(new LinearLayout.LayoutParams(WC, WC));\r\n\t\tlayout.addView(btn);\r\n\t\tsetContentView(layout);\r\n\t}", "private void setUpLayout() {\n myLinearLayout=(LinearLayout)rootView.findViewById(R.id.container_wartaMingguan);\n\n // Add LayoutParams\n params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n params.setMargins(0, 10, 0, 0);\n\n // Param untuk deskripsi\n paramsDeskripsi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n paramsDeskripsi.setMargins(0, 0, 0, 0);\n\n tableParams = new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);\n rowTableParams = new TableLayout.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n\n // Untuk tag \"warta\"\n LinearLayout rowLayout = new LinearLayout(getActivity());\n rowLayout.setOrientation(LinearLayout.HORIZONTAL);\n\n // Membuat linear layout vertical untuk menampung kata-kata\n LinearLayout colLayout = new LinearLayout(getActivity());\n colLayout.setOrientation(LinearLayout.VERTICAL);\n colLayout.setPadding(0, 5, 0, 0);\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.part_layout);\n \n editTextforAll();\n setDoneButtonListener();\n setSafetyButtonListener();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_agregar_articulo, container, false);\n\n nombreArticulo = view.findViewById(R.id.fragment_AgregarArticulo_editText_nombre_articulo);\n precio = view.findViewById(R.id.fragment_AgregarArticulo_editText_precio_articulo);\n descripcion = view.findViewById(R.id.fragment_AgregarArticulo_editText_descripcion_articulo);\n botonAgregar = view.findViewById(R.id.fragment_AgregarArticulo_botonAgregar);\n\n botonAgregar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String nombre = nombreArticulo.getText().toString();\n String costo = precio.getText().toString();\n String description = descripcion.getText().toString();\n\n Articulo articulo = new Articulo(nombre,costo,description,R.drawable.ic_launcher_foreground);\n listener.recibirMensaje(articulo);\n }\n });\n\n return view;\n }", "private void init() {\n mainll = new LinearLayout(getContext());\n mainll.setId(View.generateViewId());\n mainll.setLayoutParams(new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT));\n mainll.setOrientation(LinearLayout.VERTICAL);\n\n map = new HashMap<>();\n\n RelativeLayout mainrl = new RelativeLayout(getContext());\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT,\n ActionBar.LayoutParams.WRAP_CONTENT);\n\n params.addRule(RelativeLayout.BELOW, mainll.getId());\n\n save = new Button(getContext());\n\n save.setLayoutParams(params);\n save.setText(\"save\");\n\n mainrl.addView(mainll);\n mainrl.addView(save);\n addView(mainrl);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) \n {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.main); \n createLayout();\n }", "public void initUI() {\n\t\t\n\t\tTextView mitaxiregistermanually_tv_label= (TextView)findViewById(R.id.mitaxiregistermanually_tv_label);\n\t\t mitaxiregistermanually_tv_label.setTypeface(new fonts(this).getTypeFace(fonts.FLAG_MAMEY));\n\t\t mitaxiregistermanually_tv_label.setTextColor(getResources().getColor(R.color.color_vivos));\n\t\t \n\t\t TextView mitaxiregistermanually_tv_paranoico_texto= (TextView)findViewById(R.id.mitaxiregistermanually_tv_paranoico_texto);\n\t\t mitaxiregistermanually_tv_paranoico_texto.setTypeface(new fonts(this).getTypeFace(fonts.FLAG_ROJO));\n\t\t mitaxiregistermanually_tv_paranoico_texto.setTextColor(getResources().getColor(R.color.color_vivos));\n\t\t \n\t\t mitaxiregistermanually_ll_contactos =(LinearLayout)findViewById(R.id.mitaxiregistermanually_ll_contactos);\n\t\t\n\t\t mitaxiregistermanually_tv_agregar=(TextView) findViewById(R.id.mitaxiregistermanually_tv_agregar);\n\t\t mitaxiregistermanually_tv_agregar.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(!emergencia_esta_Ocupado[0]||!emergencia_esta_Ocupado[1]){\n\t\t\t\t\taddContact(null,null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t \n\t\n\n\t\t \n\t\t ImageView mitaxiregistermanually_iv_ayuda=(ImageView)findViewById(R.id.mitaxiregistermanually_iv_ayuda);\n\t\t mitaxiregistermanually_iv_ayuda.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\tnew\tDialogos().mostrarParaQue(RegistroContactosEmergenciaActivity.this).show();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t \n\t\t \n\t\t mitaxiregistermanually_cv_paranoico = (CheckBox) findViewById(R.id.mitaxiregistermanually_cv_paranoico); \n\t\t SharedPreferences prefs = getSharedPreferences(\"MisPreferenciasTrackxi\",Context.MODE_PRIVATE);\n boolean panic = prefs.getBoolean(\"panico\", false);\n mitaxiregistermanually_cv_paranoico.setChecked(panic); \n \t \n \n\t\t mitaxiregistermanually_cv_paranoico.setOnCheckedChangeListener(new OnCheckedChangeListener() { \n\n\t\t @Override \n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { \n\n\t\t\t if (buttonView.isChecked()){ \n\t\t\t\t if(validaEditText(R.string.Registro_manual_datos_paranoico_sin_contac)){\n\t\t\t\t\t if((!emergencia_esta_Ocupado[0]&&!emergencia_esta_Ocupado[1])){\n\t\t\t\t\t\t buttonView.setChecked(false);\n\t\t\t\t\t\t Dialogos.Toast(RegistroContactosEmergenciaActivity.this,getResources().getString(R.string.Registro_manual_datos_paranoico_sin_contac) , Toast.LENGTH_LONG);\n\t\t\t\t \t}\n\t\t\t\t }else{\n\t\t\t\t\t buttonView.setChecked(false);\n\t\t\t\t }\n\t\t\t }\n\n\t\t }\n\t\t });\n\t\t \n\t\t Button mitaxiregistermanually_btn_guardar =(Button)findViewById(R.id.mitaxiregistermanually_btn_guardar);\n\t\t mitaxiregistermanually_btn_guardar.setTypeface(new fonts(this).getTypeFace(fonts.FLAG_ROJO));\n\t\t mitaxiregistermanually_btn_guardar.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tback();\n\t\t\t}\n\t\t});\n\t\t \n\t\t \n\t\tllenarContactos();\n\t\t\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_network, container, false);\n\n btnInsertar = (Button) rootView.findViewById(R.id.btnRegistrar);\n btnConsultar = (Button) rootView.findViewById(R.id.btnConsultar);\n edtName = (EditText) rootView.findViewById(R.id.edName);\n btnInsertar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String name=edtName.getText().toString().trim();\n insertDatabase(name);\n }\n });\n btnConsultar.setOnClickListener(this);\n return rootView;\n }", "private void init (){\n ///compoennetes\n // cuadros de texto\n txCodigo = new JTextField(10);\n txNombre = new JTextField(10);\n // etiquetas\n lbCodigo = new JLabel(\"codigo: \");\n lbNombre = new JLabel(\"nombre: \");\n // boton \n btAcpetar = new JButton(\"aceptar\");\n btAcpetar.setToolTipText(\"realizar insert\");\n btAcpetar.addActionListener(this);\n // paneles contenedores\n JPanel pCodigo = new JPanel();\n JPanel pNombre = new JPanel();\n // cambio de layout\n BoxLayout bx = new BoxLayout(this.getContentPane(), BoxLayout.PAGE_AXIS);\n this.setLayout(bx);\n // annadir a los paneles\n pCodigo.add(lbCodigo);\n pCodigo.add(txCodigo);\n pNombre.add(lbNombre);\n pNombre.add(txNombre);\n // annadir al dialogo\n add(pCodigo);\n add(pNombre);\n add(btAcpetar);\n }", "private void InitView() {\n\t\tmLinearLayout = new LinearLayout(getContext());\n\t\t//mLinearLayout.setBackgroundResource(MusicApplication.getInstance().getBgResource());\n\t\t\n\t\t//Modify by LiYongNam 2012.9.19_start\n\t\tMusicUtil.setBackgroundOfView ( mLinearLayout, getContext() );\t\t\t\t\n\t\t//Modify by LiYongNam 2012.9.19_end\n\t\t\n\t\tmLinearLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tmLinearLayout.setPadding(1, 1, 1, Util.dipTopx(getContext(), 60));\n\t\t// 导航条\n\t\taddTitleBar(-1, \"编辑列表\", R.drawable.check_off, R.drawable.title_bar);\n\n\t\tmControlBar = new ControlBar(getContext());\n\t\tmControlBar.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,\n\t\t\t\tUtil.dipTopx(getContext(), 60)));\n\n//\t\taddControlButton(\"全选\", CONTROL1, 0);\n\t\taddControlButton(\"播放\", CONTROL2, 1);\n\t\taddControlButton(\"加入\", CONTROL3, 2);\n\t\taddControlButton(\"删除\", CONTROL4, 3);\n\n\t}", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.add_task, container, false);\n\n mTitleField = view.findViewById(R.id.title_edit_text);\n mDescription = view.findViewById(R.id.description_text_view);\n mDateButton = view.findViewById(R.id.button_date);\n mTimeButton = view.findViewById(R.id.button_time);\n CheckBox solvedCheckBox = view.findViewById(R.id.check_box_is_done);\n mDone = view.findViewById(R.id.button_done_add);\n mShare = view.findViewById(R.id.button_share);\n mPhotoButton = view.findViewById(R.id.btn_camera);\n mPhotoView = view.findViewById(R.id.task_photo);\n mGalleryButton = view.findViewById(R.id.btn_gallery);\n\n mTitleField.setText(mTask.getTitle());\n mDescription.setText(mTask.getMDescription());\n\n String simpleDate = getDateString();\n mDateButton.setText(simpleDate);\n String date = getTimeString();\n mTimeButton.setText(date);\n solvedCheckBox.setChecked(mTask.getMDone());\n\n titleETHandler();\n descriptionETHandler();\n doneBtnHandle();\n checkBoxHandle(solvedCheckBox);\n dateBtnHandle();\n timeBtnHandle();\n handleShareButton();\n handlePhotoButton();\n updatePhotoView();\n handleGalleryButton();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_todolist_add, container, false);\n\n\n // Initialize View\n startDate = view.findViewById(R.id.tv_add_start_date);\n endDate = view.findViewById(R.id.tv_add_end_date);\n startTime = view.findViewById(R.id.tv_add_start_time);\n endTime = view.findViewById(R.id.tv_add_end_time);\n\n LinearLayout startArea = view.findViewById(R.id.add_start);\n LinearLayout endArea = view.findViewById(R.id.add_end);\n\n\n // 시작, 종료 날짜 기본 값 오늘 날짜로 설정하기\n setDefaultDate();\n\n\n\n // setOnClickListener\n startArea.setOnClickListener(this);\n endArea.setOnClickListener(this);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_dialog_add_hole, container, false);\n butOk = root.findViewById(R.id.butOk);\n butCancelar = root.findViewById(R.id.butCancelar);\n latLng = root.findViewById(R.id.lntLng);\n address = root.findViewById(R.id.ads);\n latLng.setText(latlng);\n address.setText(ad);\n\n butOk.setOnClickListener(this);\n butCancelar.setOnClickListener(this);\n\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_input, container, false);\n label = v.findViewById(R.id.edit_label);\n detail = v.findViewById(R.id.edit_detail);\n time = v.findViewById(R.id.timePicker);\n date = v.findViewById(R.id.datePicker);\n save = v.findViewById(R.id.btn_save);\n strDateTime = date.getYear() + \"-\" + (date.getMonth() + 1) + \"-\" + date.getDayOfMonth() + \" \"+ time.getCurrentHour() + \":\" + time.getCurrentMinute();\n\n save.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n komunikasiFragment.kirimData(label.getText().toString(),detail.getText().toString(),strDateTime);\n }\n });\n return v;\n }", "@Override\n public void Create() {\n\n initView();\n }", "public void InitLayout() {\n SetBackground(R.drawable.can_dfqc_ac_bg);\n this.mTvA = AddText(121, 173, 203, 25);\n this.mTvP = AddText(121, 212, KeyDef.RKEY_RADIO_6S, 25);\n this.mTvMode = AddText(121, Can.CAN_FLAT_RZC, 203, 25);\n this.mTvC = AddText(121, 295, 139, 25);\n this.mTvWind = AddText(121, KeyDef.RKEY_AVIN, 53, 25);\n initValue();\n }", "private void inicializar () {\n String infService = Context.LAYOUT_INFLATER_SERVICE;\n LayoutInflater li = (LayoutInflater)getContext().getSystemService(infService);\n li.inflate(R.layout.activity_control_login,this,true);\n\n //Obtenemos las referencias a los distintos controles\n txtUsuario = (EditText) findViewById(R.id.TxtUsuario);\n txtPassword = (EditText) findViewById(R.id.TxtPassword);\n btnAceptar = (Button) findViewById(R.id.BtnAceptar);\n lblMensaje = (TextView) findViewById(R.id.LblMensaje);\n\n //Asignamos los eventos necesarios\n asignarEventos();\n }", "private void initViews() {\n nestedScrollView = (NestedScrollView) findViewById(R.id.nestedScrollView);\n nomeLogin = (TextInputEditText) findViewById(R.id.nomeLogin);\n emailLogin = (TextInputEditText) findViewById(R.id.emailLogin);\n senhaLogin = (TextInputEditText) findViewById(R.id.senhaLogin);\n senhaLoginConfirmar = (TextInputEditText) findViewById(R.id.senhaLoginConfirmar);\n btnCadastrar = (Button) findViewById(R.id.btnCadastrar);\n cadastrar = (TextView) findViewById(R.id.cadastrar);\n regEmail = (TextInputLayout) findViewById(R.id.regEmail);\n regNome = (TextInputLayout) findViewById(R.id.regNome);\n regSenha = (TextInputLayout) findViewById(R.id.regSenha);\n regSenhaConfirmar = (TextInputLayout) findViewById(R.id.regSenhaConfirmar);\n }", "private void initView() {\n\t\timg_back = (ImageView) findViewById(R.id.img_back_updatejob);\n\t\tedt_content = (EditText) findViewById(R.id.edt_content_updatejob);\n\t\tedt_course = (EditText) findViewById(R.id.edt_course_updatejob);\n\t\tbtn_delete = (Button) findViewById(R.id.btn_delete_updatejob);\n\t\tbtn_update = (Button) findViewById(R.id.btn_update_updatejob);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.register_one, container, false);\n userName = (EditText)rootView.findViewById(R.id.edit_register_user_id);\n userPhone = (EditText)rootView.findViewById(R.id.edit_register_phone);\n code = (EditText)rootView.findViewById(R.id.edit_register_code);\n userMail = (EditText)rootView.findViewById(R.id.edit_register_mail);\n userPwd = (EditText)rootView.findViewById(R.id.edit_register_pwd);\n userPwdSubmit = (EditText)rootView.findViewById(R.id.edit_register_pwd_sub);\n getCode = (Button)rootView.findViewById(R.id.register_new_code_btn);\n next = (Button)rootView.findViewById(R.id.register_next);\n getCode.setOnClickListener(this);\n next.setOnClickListener(this);\n code.addTextChangedListener(watcher);\n\n //设置按钮不可点击时的颜色\n getCode.setBackgroundResource(R.color.gray_text_color);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_info, container, false);\n //Initialise UI elements\n saveButton = view.findViewById(R.id.save_button);\n saveButton.setOnClickListener(this);\n EditText titleEdit = view.findViewById(R.id.maze_title_edit);\n loadingScreen = view.findViewById(R.id.loading_screen);\n titleEdit.addTextChangedListener(createMazeTextWatcher);\n publicToggle = view.findViewById(R.id.public_switch);\n initPublicToggle();\n return view;\n }", "@Override\n protected void initView()\n {\n ed_name = findView(R.id.ed_name);\n ed_bank = findView(R.id.ed_bank);\n ed_bank_card = findView(R.id.ed_bank_card);\n ed_bank_name = findView(R.id.ed_bank_name);\n btn_submit = findView(R.id.btn_submit);\n findView(R.id.ib_back).setOnClickListener(this);\n Toolbar toolbar = findView(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_reamur, container, false);\n ce = v.findViewById(R.id.setCelciusfReamur);\n fa = v.findViewById(R.id.setFahrenheit);\n ke = v.findViewById(R.id.setKelvin);\n input = v.findViewById(R.id.editText);\n konversi = v.findViewById(R.id.btnKonversiReamur);\n iv = v.findViewById(R.id.imAboutReamur);\n\n ce.setVisibility(View.INVISIBLE);\n fa.setVisibility(View.INVISIBLE);\n ke.setVisibility(View.INVISIBLE);\n\n konversi.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Konversi();\n }\n });\n\n iv.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n tampilDialog();\n }\n });\n return v;\n }", "@Override\n\tprotected void initView() {\n\t\tsuper.initView();\n mLnSelectLanguage = (LinearLayout) findViewById(R.id.lnSelectLanguage);\n mBtnContinue = (Button) findViewById(R.id.btnContinue);\n mEdtPhoneNumber = (EditText) findViewById(R.id.edtPhoneNumber);\n mTvNationNameView = (TextView) findViewById(R.id.tvNationNameView);\n mChkAccept = (CheckBox) findViewById(R.id.chkAccept);\n mTvDieuKhoan = (TextView) findViewById(R.id.tvDieuKhoan);\n mTvNotifi1 = (TextView) findViewById(R.id.tvNotifi1);\n Utils.setTextViewHtml(mTvDieuKhoan,getString(R.string.dieukhoan));\n mLnSelectLanguage.setOnClickListener(this);\n mBtnContinue.setOnClickListener(this);\n mTvDieuKhoan.setOnClickListener(this);\n\n\t}", "@Override\r\n\t@Nullable\r\n\tpublic View onCreateView(LayoutInflater inflater,\r\n\t\t\t@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.dialog_add_item_check_list,\r\n\t\t\t\tcontainer);\r\n\t\teditContent = (EditText) view.findViewById(R.id.check_item_content);\r\n\t\taddBtn = (Button) view.findViewById(R.id.add);\r\n\t\taddMoreBtn = (Button) view.findViewById(R.id.add_more);\r\n\t\tcancelBtn = (Button) view.findViewById(R.id.cancel);\r\n\t\t\r\n\t\taddBtn.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tmListener.onAddPress(editContent.getEditableText().toString());\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddMoreBtn.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tmListener.onAddMorePressed(editContent.getEditableText().toString());\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tcancelBtn.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tmListener.onCancelPressed();\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn view;\r\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tMainLayout = new LinearLayout(this);\n\t\tTextLinearLayout = new LinearLayout(this);\n\t\tButtonLinearLayout = new LinearLayout(this);\n\n\t\tArabicString = new EditText(this);\n\t\tArabicString.setText(\"\");\n\t\tArabicString.setGravity(Gravity.TOP);\n\t\tArabicString.setLayoutParams(new LinearLayout.LayoutParams(\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,1));\n\t\tTextLinearLayout.addView(ArabicString);\n\n\t\tmButton_Convert = new Button(this);\n\t\tmButton_Convert.setText(\"تصحيح ونسخ\");\n\t\tmButton_Convert.setLayoutParams(new LinearLayout.LayoutParams(\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,1));\n\t\tButtonLinearLayout.addView(mButton_Convert);\n\t\tmButton_Convert.setOnClickListener(new View.OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttry {\n\t\t\t\t\tconvert();\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmButton_Clear_n_Past = new Button(this);\n\t\tmButton_Clear_n_Past.setText(\"مسح المحتوى ثم لصق\");\n\t\tmButton_Clear_n_Past.setLayoutParams(new LinearLayout.LayoutParams(\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,1));\n\t\tButtonLinearLayout.addView(mButton_Clear_n_Past);\n\t\tmButton_Clear_n_Past.setOnClickListener(new View.OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);\n\t\t\t\tArabicString.setText(clipboard.getText());\n\n\t\t\t\tContext context = getApplicationContext();\n\t\t\t\tCharSequence text = \"تم اللصق\";\n\t\t\t\tint duration = Toast.LENGTH_SHORT;\n\t\t\t\tToast toast = Toast.makeText(context, text, duration);\n\t\t\t\ttoast.show();\n\t\t\t}\n\t\t});\n\n\n\t\tMainLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tTextLinearLayout.setLayoutParams(new LinearLayout.LayoutParams(\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,1));\n\t\tMainLayout.addView(ButtonLinearLayout);\n\t\tMainLayout.addView(TextLinearLayout);\n\t\tsetContentView(MainLayout);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main_addform);\n//\t\tanimation();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_nhiemvu, container, false);\n // set Context\n context = view.getContext();\n // get connect database\n conectDatabase = new ConectDatabase(context);\n\n arrayList = conectDatabase.getAllMission();\n\n // find ID\n btAdd = (Button) view.findViewById(R.id.btAdd);\n listMission = (ListView) view.findViewById(R.id.listViewMission);\n finishList = (ListView) view.findViewById(R.id.finistList);\n linearLayout = view.findViewById(R.id.formIPMission);\n btAddFinish = view.findViewById(R.id.btAddMission);\n edtIpMission = view.findViewById(R.id.edtIPMission);\n btTime = view.findViewById(R.id.btTime);\n bottomsheet = view.findViewById(R.id.bottom_sheet);\n sheetBehavior = BottomSheetBehavior.from((bottomsheet));\n //set Layout\n setLayout();\n // set Action;\n setAction();\n\n return view;\n }", "public View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t \n\t rootView = inflater.inflate(R.layout.eipk002,container,false);\n\t bfecha=(ImageButton)rootView.findViewById(R.id.ImageButton01);\n\t bfecha.setOnClickListener(this);\n\t \n\t diagnostico=(EditText)rootView.findViewById(R.id.EditText04);\n\t fecha=(EditText)rootView.findViewById(R.id.EditText05);\n\t fiebre=(CheckBox)rootView.findViewById(R.id.CheckBox08);\n\t mialgia=(CheckBox)rootView.findViewById(R.id.CheckBox01);\n\t cefalea=(CheckBox)rootView.findViewById(R.id.CheckBox02);\n\t linfoadenop=(CheckBox)rootView.findViewById(R.id.CheckBox03);\n\t malestarg=(CheckBox)rootView.findViewById(R.id.CheckBox04);\n\t vomitos=(CheckBox)rootView.findViewById(R.id.CheckBox05);\n\t rash=(CheckBox)rootView.findViewById(R.id.CheckBox06);\n\t petequias=(CheckBox)rootView.findViewById(R.id.CheckBox07);\n\t diarreas=(CheckBox)rootView.findViewById(R.id.CheckBox09);\n\t artalgia=(CheckBox)rootView.findViewById(R.id.CheckBox10);\n\t esplenomeg=(CheckBox)rootView.findViewById(R.id.CheckBox11);\n\t anorexia=(CheckBox)rootView.findViewById(R.id.CheckBox12);\n\t ictero=(CheckBox)rootView.findViewById(R.id.CheckBox13);\n\t hepatomeg=(CheckBox)rootView.findViewById(R.id.CheckBox14);\n\t astenia=(CheckBox)rootView.findViewById(R.id.CheckBox15);\n\t escalofrios=(CheckBox)rootView.findViewById(R.id.CheckBox16);\n\t sangramiento=(CheckBox)rootView.findViewById(R.id.CheckBox17);\n\t dolorabd=(CheckBox)rootView.findViewById(R.id.CheckBox18);\n\t aumentovol=(CheckBox)rootView.findViewById(R.id.CheckBox19);\n\t \n\t tos=(CheckBox)rootView.findViewById(R.id.CheckBox20);\n\t disnea=(CheckBox)rootView.findViewById(R.id.CheckBox21);\n\t expect=(CheckBox)rootView.findViewById(R.id.CheckBox22);\n\t laringitis=(CheckBox)rootView.findViewById(R.id.CheckBox23);\n\t faringitis=(CheckBox)rootView.findViewById(R.id.CheckBox24);\n\t rinorrea=(CheckBox)rootView.findViewById(R.id.CheckBox25);\n\t otitis=(CheckBox)rootView.findViewById(R.id.CheckBox26);\n\t coquel=(CheckBox)rootView.findViewById(R.id.CheckBox27);\n\t amigdalitis=(CheckBox)rootView.findViewById(R.id.CheckBox28);\n\t laringotraq=(CheckBox)rootView.findViewById(R.id.CheckBox29);\n\t estornudos=(CheckBox)rootView.findViewById(R.id.CheckBox30);\n\t vacunacion=(CheckBox)rootView.findViewById(R.id.CheckBox31);\n\t \n\t desorientac=(CheckBox)rootView.findViewById(R.id.CheckBox32);\n\t rigidezn=(CheckBox)rootView.findViewById(R.id.CheckBox33);\n\t convulciones=(CheckBox)rootView.findViewById(R.id.CheckBox34);\n\t perdidaconc=(CheckBox)rootView.findViewById(R.id.CheckBox35);\n\t trastornoscond=(CheckBox)rootView.findViewById(R.id.CheckBox36);\n\t dificultadmarcha=(CheckBox)rootView.findViewById(R.id.CheckBox37);\n\t \n\t secreciong=(CheckBox)rootView.findViewById(R.id.CheckBox38);\n\t lesiong=(CheckBox)rootView.findViewById(R.id.CheckBox39);\n\t disuria=(CheckBox)rootView.findViewById(R.id.CheckBox40);\n\t otros=(EditText)rootView.findViewById(R.id.EditText01);\n\t if(getArguments().isEmpty()==false)\n\t {\n\t \t BDAcceso bd=new BDAcceso(rootView.getContext());\n\t \t\t\tEIPK002 ee2=new EIPK002();\n\t \t\t\tbd.open();\n\t \t\t\tee2=ee2.selectEIPK002(getArguments().getString(\"caso_id\"), bd.getBD());\n\t \t\t\tbd.close();\n\t \t\t diagnostico.setText(ee2.getdiagnostico());\n\t \t fecha.setText(ee2.getfecha());\n\t \t fiebre.setChecked(ee2.getfiebre());\n\t \t mialgia.setChecked(ee2.getmialgia());\n\t \t cefalea.setChecked(ee2.getcefalea());\n\t \t linfoadenop.setChecked(ee2.getlinfoadenop());\n\t \t malestarg.setChecked(ee2.getmalestarg());\n\t \t vomitos.setChecked(ee2.getvomitos());\n\t \t rash.setChecked(ee2.getrash());\n\t \t petequias.setChecked(ee2.getpetequias());\n\t \t diarreas.setChecked(ee2.getdiarreas());\n\t \t artalgia.setChecked(ee2.getartalgia());\n\t \t esplenomeg.setChecked(ee2.getesplenomeg());\n\t \t anorexia.setChecked(ee2.getanorexia());\n\t \t ictero.setChecked(ee2.getictero());\n\t \t hepatomeg.setChecked(ee2.gethepatomeg());\n\t \t astenia.setChecked(ee2.getastenia());\n\t \t escalofrios.setChecked(ee2.getescalofrios());\n\t \t sangramiento.setChecked(ee2.getsangramiento());\n\t \t dolorabd.setChecked(ee2.getdolorabd());\n\t \t aumentovol.setChecked(ee2.getaumentovol());\n\t \t tos.setChecked(ee2.gettos());\n\t \t disnea.setChecked(ee2.getdisnea());\n\t \t expect.setChecked(ee2.getexpect());\n\t \t laringitis.setChecked(ee2.getlaringitis());\n\t \t faringitis.setChecked(ee2.getfaringitis());\n\t \t rinorrea.setChecked(ee2.getrinorrea());\n\t \t otitis.setChecked(ee2.getotitis());\n\t \t coquel.setChecked(ee2.getcoquel());\n\t \t amigdalitis.setChecked(ee2.getamigdalitis());\n\t \t laringotraq.setChecked(ee2.getlaringotraq());\n\t \t estornudos.setChecked(ee2.getestornudos());\n\t \t vacunacion.setChecked(ee2.getvacunacion());\n\t \t desorientac.setChecked(ee2.getdesorientac());\n\t \t rigidezn.setChecked(ee2.getrigidezn());\n\t \t convulciones.setChecked(ee2.getconvulciones());\n\t \t perdidaconc.setChecked(ee2.getperdidaconc());\n\t \t trastornoscond.setChecked(ee2.gettrastornoscond());\n\t \t dificultadmarcha.setChecked(ee2.getdificultadmarcha());\n\t \t secreciong.setChecked(ee2.getsecreciong());\n\t \t lesiong.setChecked(ee2.getlesiong());\n\t \t disuria.setChecked(ee2.getdisuria());\n\t \t otros.setText(ee2.getotros());\n\t }\n\t \n\t \n\n\t return rootView;\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(getLayoutViewId());\n// presenter = getPresenter(typePresenter);\n init();\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n View view = inflater.inflate(R.layout.bottom_sheet, container, false);\n calendarGroup = view.findViewById(R.id.calendar_group);\n calendarView = view.findViewById(R.id.calendar_view);\n calendarButton = view.findViewById(R.id.today_calendar_button);\n enterTodo = view.findViewById(R.id.enter_todo_et);\n saveButton = view.findViewById(R.id.save_todo_button);\n priorityButton = view.findViewById(R.id.priority_todo_button);\n priorityRadioGroup = view.findViewById(R.id.radioGroup_priority);\n Chip todayChip = view.findViewById(R.id.today_chip);\n todayChip.setOnClickListener(this);\n Chip tommorowChip = view.findViewById(R.id.tomorrow_chip);\n tommorowChip.setOnClickListener(this);\n Chip nextWeekChip = view.findViewById(R.id.next_week_chip);\n nextWeekChip.setOnClickListener(this);\n priority = Priority.LOW;\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.editpro, container, false);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.jcy_ldl_main_detail);\n\t\tdal = new ManpowerDetailDAL(this, new Handler());\n\t\tback = (Button) findViewById(R.id.back);\n\t\tsave = (Button) findViewById(R.id.save);\n\t\tsfz = (EditText) findViewById(R.id.sfz);\n\t\tif(getIntent().getStringExtra(\"sfz\")!=null){\n\t\t\tsfz.setText(getIntent().getStringExtra(\"sfz\"));\n\t\t}\n\t\tl_jyzt=(LinearLayout) findViewById(R.id.l_jyzt);\n\t\tl_jyzt.setVisibility(View.GONE);\n\t\tname = (EditText) findViewById(R.id.name);\n\t\txb = (EditText) findViewById(R.id.xb);\n\t\tcsrq = (EditText) findViewById(R.id.csrq);\n\t\tlxdh = (EditText) findViewById(R.id.lxdh);\n\t\twhcd = (EditText) findViewById(R.id.whcd);\n\t\thkxz = (EditText) findViewById(R.id.hkxz);\n\t\tmz = (EditText) findViewById(R.id.mz);\n\t\tzzmm = (EditText) findViewById(R.id.zzmm);\n\t\tjtzz = (EditText) findViewById(R.id.jtzz);\n\t\tjyzt = (EditText) findViewById(R.id.jyzt);\n\t\tback.requestFocus();\n\t\tback.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCreateLdlDetail.this.finish();\n\t\t\t}\n\t\t});\n\t\tinitAllEdittext();\n\t}", "@Override\n\tpublic void initializeView() {\n\t\tsuper.initializeView();\n\t\tet = (EditText)findViewById(R.id.edit_name);\n\t\tsave=(TextView)findViewById(R.id.save);\n\t\tsave.setOnClickListener(this);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_options, container, false);\n\n //Find the +1 button\n //mPlusOneButton = (PlusOneButton) view.findViewById(R.id.plus_one_button1);\n\n //\n // find the buttons and set the proper height to them\n _butSet = (ImageButton)view.findViewById(R.id.settings);\n _butSearch = (ImageButton)view.findViewById(R.id.search);\n _butLod = (ImageButton)view.findViewById(R.id.lod);\n _butVB = (ImageButton)view.findViewById(R.id.viewbox);\n _butCam = (ImageButton)view.findViewById(R.id.camera);\n\n view.findViewById(R.id.icons_parent).addOnLayoutChangeListener(new BtnLayout());\n\n /*\n _butSet.addOnLayoutChangeListener(new BtnLayout());\n _butSearch.addOnLayoutChangeListener(new BtnLayout());\n _butLod.addOnLayoutChangeListener(new BtnLayout());\n _butVB.addOnLayoutChangeListener(new BtnLayout());\n _butCam.addOnLayoutChangeListener(new BtnLayout());*/\n\n return view;\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.config_input_layout);\n\t}", "private void initViews() {\n\t\tet_area = (EditText) findViewById(R.id.et_area);\r\n\t\tbtn_search = (Button) findViewById(R.id.btn_search);\r\n\t\tll_main = (LinearLayout) findViewById(R.id.ll_main);\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.layout);\n\n colorPickerDialog = new AmbilWarnaDialog(this, Color.BLACK, this);\n ToggleButton boldToggle = (ToggleButton) findViewById(R.id.btnBold);\n ToggleButton italicsToggle = (ToggleButton) findViewById(R.id.btnItalics);\n ToggleButton underlinedToggle = (ToggleButton) findViewById(R.id.btnUnderline);\n imgChangeColor = (ImageView) findViewById(R.id.btnChangeTextColor);\n lnl = (LinearLayout) findViewById(R.id.lnlAction);\n lnl.setVisibility(View.VISIBLE);\n\n customEditor = (CustomEditText) findViewById(R.id.CustomEditor);\n customEditor.setSingleLine(false);\n customEditor.setMinLines(10);\n customEditor.setBoldToggleButton(boldToggle);\n customEditor.setItalicsToggleButton(italicsToggle);\n customEditor.setUnderlineToggleButton(underlinedToggle);\n customEditor.setOnFocusChangeListener(new OnFocusChangeListener() {\n\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n lnl.setVisibility(View.VISIBLE);\n }\n else\n {\n lnl.setVisibility(View.GONE);\n }\n }\n });\n customEditor.setEventBack(eventBack);\n customEditor.setOnClickListener(clickListener);\n imgChangeColor.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n selectionStart = customEditor.getSelectionStart();\n selectionEnd = customEditor.getSelectionEnd();\n colorPickerDialog.show();\n }\n });\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_technical, container, false);\n apk=view.findViewById(R.id.apk);\n apk.setContentDescription(\"aparoksha\");\n apk.setOnClickListener(this);\n\n apk_btn=view.findViewById(R.id.apk_btn);\n apk_btn.setOnClickListener(this);\n apk_btn.setContentDescription(\"aparoksha\");\n\n gh=view.findViewById(R.id.geekhaven);\n gh.setContentDescription(\"geekhaven\");\n gh.setOnClickListener(this);\n\n gh_btn=view.findViewById(R.id.gh_btn);\n gh_btn.setContentDescription(\"geekhaven\");\n gh_btn.setOnClickListener(this);\n\n tesla=view.findViewById(R.id.tesla);\n tesla.setOnClickListener(this);\n tesla.setContentDescription(\"tesla\");\n\n tesla_btn=view.findViewById(R.id.t_btn);\n tesla_btn.setOnClickListener(this);\n tesla_btn.setContentDescription(\"tesla\");\n\n gravity=view.findViewById(R.id.gravity);\n gravity.setOnClickListener(this);\n gravity.setContentDescription(\"gravity\");\n\n gravity_btn=view.findViewById(R.id.g_btn);\n gravity_btn.setOnClickListener(this);\n gravity_btn.setContentDescription(\"gravity\");\n\n checkSub();\n return view;\n }", "private void initViews() {\n\t\t\r\n\t\tTypeface face = Typeface.createFromAsset(getAssets(), \"Teko_Light.ttf\");\r\n\r\n\t\tet_pin = (EditText) findViewById(R.id.et_pin);\r\n\t\tet_pin.setTypeface(face);\r\n\t\tbtn_admin_login = (Button) findViewById(R.id.btn_admin_login);\r\n\t\tbtn_admin_login.setTypeface(face);\r\n\r\n\t\td = new DialogView();\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_new_building, container, false);\n name = (EditText) view.findViewById(R.id.editBuildingName);\n address = (EditText) view.findViewById(R.id.editBuildingAddress);\n city = (EditText) view.findViewById(R.id.editBuildingCity);\n zipcode = (EditText) view.findViewById(R.id.editZipCode);\n type = (EditText) view.findViewById(R.id.editType);\n type.setFocusable(false);\n type.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"Type\")\n .setItems(R.array.buildingTypes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n if (which == 0)\n type.setText(\"Public\");\n else\n type.setText(\"Private\");\n }\n });\n builder.create();\n builder.show();\n }\n });\n\n final Button buttonAdd= (Button)view.findViewById(R.id.buttonAddNewBuilding);\n final Button buttonCancel= (Button)view.findViewById(R.id.buttonCancelCreateSpace);\n final Button buttonLocation = (Button)view.findViewById(R.id.buttonSetLocation);\n\n buttonAdd.setOnClickListener(\n new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n //metodo pa criar novo building\n buttonAddClicked();\n }\n }\n );\n\n buttonCancel.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //metodo pa cancelar novo building voltar ao my buildings\n buttonCancelClicked();\n }\n }\n );\n\n buttonLocation.setOnClickListener(\n new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n //metodo pa criar novo building\n buttonSetLocation();\n }\n }\n );\n\n return view;\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n \tsuper.onCreate(savedInstanceState);\n\n \t/* Disabled code for dialog style theme which seems to make text fields almost unusable. */\n// \tDisplayMetrics metrics = new DisplayMetrics();\n//\t\tWindowManager winMan = (WindowManager)getSystemService(Context.WINDOW_SERVICE);\n//\t\twinMan.getDefaultDisplay().getMetrics(metrics);\n//\t\t\n//\t\tint hMargin = (int)(5 * metrics.density);\n//\t\tint vMargin = (int)(29 * metrics.density);\n//\t\t\n// \tgetWindow().setLayout(metrics.widthPixels - hMargin, metrics.heightPixels - vMargin);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ViewGroup rootView = (ViewGroup) inflater.inflate(\n R.layout.fragment_chu_de_page, container, false);\n\n imgHinh = (ImageView) rootView.findViewById(R.id.imgHinh);\n txt_nameWord = (TextView) rootView.findViewById(R.id.txt_nameWord);\n txt_phatamWord = (TextView) rootView.findViewById(R.id.txt_phatamWord);\n txt_nghiaWord = (TextView) rootView.findViewById(R.id.txt_nghiaWord);\n btnLoa = (ImageView) rootView.findViewById(R.id.btnLoa);\n\n return rootView;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.onbusway, container, false);\r\n\t\ttv_bus=(TextView) v.findViewById(R.id.et_myendPosition_bus);\r\n\t\t//setOnClick();\r\n\t\treturn v;\r\n\t\t\r\n\t}", "private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"100%\");\r\n\t\tmainLayout.setMargin(false);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tmainLayout.setWidth(\"100.0%\");\r\n\t\tmainLayout.setHeight(\"100.0%\");\r\n\t\t\r\n\t\t// label\r\n\t\tlabel = new Label();\r\n\t\tlabel.setImmediate(false);\r\n\t\tlabel.setWidth(\"-1px\");\r\n\t\tlabel.setHeight(\"-1px\");\r\n\t\tlabel.setValue(\"Stellvertreter ernennen\");\r\n\t\tlabel.setStyleName(Runo.LABEL_H1);\r\n\t\tmainLayout.addComponent(label, \"top:25.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// benutzer\r\n\t\tbenutzer = new ListSelect();\r\n\t\tbenutzer.setImmediate(false);\r\n\t\tbenutzer.setWidth(\"46.0%\");\r\n\t\tbenutzer.setHeight(\"70.0%\");\r\n\t\tmainLayout.addComponent(benutzer, \"top:35.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// ok\r\n\t\tok = new Button();\r\n\t\tok.setCaption(\"Stellvertreter ernennen\");\r\n\t\tok.setImmediate(false);\r\n\t\tok.setWidth(\"25%\");\r\n\t\tok.setHeight(\"-1px\");\r\n\t\tok.addListener(this);\r\n\t\tmainLayout.addComponent(ok, \"top:83.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// delete\r\n\t\tdelete = new Button();\r\n\t\tdelete.setCaption(\"Stellvertreter löschen\");\r\n\t\tdelete.setImmediate(false);\r\n\t\tdelete.setWidth(\"25%\");\r\n\t\tdelete.setHeight(\"-1px\");\r\n\t\tdelete.addListener(this);\r\n\t\tmainLayout.addComponent(delete, \"top:88.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// logout\r\n\t\tlogout = new Button();\r\n\t\tlogout.setCaption(\"logout\");\r\n\t\tlogout.setImmediate(false);\r\n\t\tlogout.setWidth(\"-1px\");\r\n\t\tlogout.setHeight(\"-1px\");\r\n\t\tlogout.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tlogout.addListener(this);\r\n\t\tmainLayout.addComponent(logout, \"top:97.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// back\r\n\t\tback = new Button();\r\n\t\tback.setCaption(\"Startseite\");\r\n\t\tback.setImmediate(true);\r\n\t\tback.setWidth(\"-1px\");\r\n\t\tback.setHeight(\"-1px\");\r\n\t\tback.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tback.addListener(this);\r\n\t\tmainLayout.addComponent(back, \"top:94.0%;left:35.0%;\");\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.form_alumnos);\n\t\tinitComponents();\n\n\t}", "private void initViews() {\n editTextEmail = (EditText) findViewById(R.id.email);\n editTextPassword = (EditText) findViewById(R.id.password);\n textInputLayoutEmail = (TextInputLayout) findViewById(R.id.textInputLayoutEmail);\n textInputLayoutPassword = (TextInputLayout) findViewById(R.id.textInputLayoutPassword);\n buttonLogin = (Button) findViewById(R.id.buttonLogin);\n\n }", "private void prepareView(){\n mAvatar = (ImageButton)findViewById(R.id.btnAvatar);\n mAvatar.setOnClickListener(this);\n\n mName = (TextView)findViewById(R.id.tvName);\n mEmail = (TextView)findViewById(R.id.tvEmail);\n mWelcome = (TextView)findViewById(R.id.tvSelectionTitle);\n\n mDesigner = (ImageButton)findViewById(R.id.btnDesigner);\n mDesigner.setOnClickListener(this);\n\n mDeveloper = (ImageButton)findViewById(R.id.btnDeveloper);\n mDeveloper.setOnClickListener(this);\n }", "private void setLayout() {\n\t\ttxtNickname.setId(\"txtNickname\");\n\t\ttxtPort.setId(\"txtPort\");\n\t\ttxtAdress.setId(\"txtAdress\");\n\t\tlblNickTaken.setId(\"lblNickTaken\");\n\n\t\tgrid.setPrefSize(516, 200);\n\t\tbtnLogin.setDisable(true);\n\t\ttxtNickname.setPrefSize(200, 25);\n\t\tlblNickTaken.setPrefSize(250, 10);\n\t\tlblNickTaken.setText(null);\n\t\tlblNickTaken.setTextFill(Color.RED);\n\t\tlblNick.setPrefSize(120, 50);\n\t\ttxtAdress.setText(\"localhost\");\n\t\ttxtPort.setText(\"4455\");\n\t\tlblCardDesign.setPrefSize(175, 25);\n\t\tcomboBoxCardDesign.getSelectionModel().select(0);\n\t\tbtnLogin.setGraphic(imvStart);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.guia_fragment,container,false);\n guiaDescription = (TextInputEditText) v.findViewById(R.id.guia_description);\n guiaRelevantFact1 = (TextInputEditText) v.findViewById(R.id.relevant_fact_1);\n guiaRelevantFact2 = (TextInputEditText) v.findViewById(R.id.relevant_fact_2);\n guiaLogo = (TextInputEditText) v.findViewById(R.id.url_guia);\n bSubmit = (Button) v.findViewById(R.id.btn_submit);\n //initializing database reference\n mDatabaseReference = FirebaseDatabase.getInstance().getReference();\n bSubmit.setOnClickListener(this);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_cft__non_negotiable, container, false);\n\n ETNonNegotiables = (EditText) view.findViewById(R.id.NonNegotiables);\n initUI();\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_form,container,false);\n nameEditText=view.findViewById(R.id.nameEditText);\n progressSeekBar=view.findViewById(R.id.progressSeekBar);\n threadButton = view.findViewById(R.id.threadButton);\n saveButton = view.findViewById(R.id.saveButton);\n return view;\n }", "@Override\r\n\tpublic void onCreate(Data data) {\n\t\tSystem.out.println(\"onCreate window \"+data);\r\n\t\tsetWindowLayout(\"layout_main.xml\");\r\n\t}", "protected abstract void iniciarLayout();", "private void initViews() {\n\n //O metodo findViewById() recupera a referencia do EditText que se encontra no XML.\n editTextQuantidade = (EditText) findViewById(R.id.edittext_quantidade);\n imageViewOvos = (ImageView) findViewById(R.id.imageview_ovos);\n textViewTotal = (TextView) findViewById(R.id.textview_total);\n }", "public Layout() {\n super(\"Chitrashala\");\n initComponents();\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAppendMainBody(R.layout.os_jsh_wdj_ldss_introduce);\r\n\t\tisShowSlidingMenu(false);\r\n\t\tAppendTitleBody1();\r\n\t\tinitView();\r\n\t\tinitListener();\r\n\t\tinitData();\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_add_person, container, false);\n\n mainActivity = (MainActivity) getActivity();\n\n edtxtPersonName = (EditText) view.findViewById(R.id.edtxtPersonName);\n radioPersonType = (RadioGroup) view.findViewById(R.id.radioPersonType);\n btnSavePerson = (Button) view.findViewById(R.id.btnSavePerson);\n\n addSaveButtonListener();\n\n return view;\n }", "@Override\n public void onViewCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "private void createContents() {\r\n\t\tshlAjouterNouvelleEquation = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);\r\n\t\tshlAjouterNouvelleEquation.setSize(363, 334);\r\n\t\tif(modification)\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Modifier Equation\");\r\n\t\telse\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Ajouter Nouvelle Equation\");\r\n\t\tshlAjouterNouvelleEquation.setLayout(new FormLayout());\r\n\r\n\r\n\t\tLabel lblContenuEquation = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblContenuEquation = new FormData();\r\n\t\tfd_lblContenuEquation.top = new FormAttachment(0, 5);\r\n\t\tfd_lblContenuEquation.left = new FormAttachment(0, 5);\r\n\t\tlblContenuEquation.setLayoutData(fd_lblContenuEquation);\r\n\t\tlblContenuEquation.setText(\"Contenu Equation\");\r\n\r\n\r\n\t\tcontrainteButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnContrainte = new FormData();\r\n\t\tfd_btnContrainte.top = new FormAttachment(0, 27);\r\n\t\tfd_btnContrainte.right = new FormAttachment(100, -10);\r\n\t\tcontrainteButton.setLayoutData(fd_btnContrainte);\r\n\t\tcontrainteButton.setText(\"Contrainte\");\r\n\r\n\t\torientationButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnOrinet = new FormData();\r\n\t\tfd_btnOrinet.top = new FormAttachment(0, 27);\r\n\t\tfd_btnOrinet.right = new FormAttachment(contrainteButton, -10);\r\n\r\n\t\torientationButton.setLayoutData(fd_btnOrinet);\r\n\t\t\r\n\t\torientationButton.setText(\"Orient\\u00E9\");\r\n\r\n\t\tcontenuEquation = new Text(shlAjouterNouvelleEquation, SWT.BORDER|SWT.SINGLE);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.right = new FormAttachment(orientationButton, -10, SWT.LEFT);\r\n\t\tfd_text.top = new FormAttachment(0, 25);\r\n\t\tfd_text.left = new FormAttachment(0, 5);\r\n\t\tcontenuEquation.setLayoutData(fd_text);\r\n\r\n\t\tcontenuEquation.addListener(SWT.FocusOut, out->{\r\n\t\t\tSystem.out.println(\"Making list...\");\r\n\t\t\ttry {\r\n\t\t\t\tequation.getListeDeParametresEqn_DYNAMIC();\r\n\t\t\t\tif(!btnTerminer.isDisposed()){\r\n\t\t\t\t\tif(!btnTerminer.getEnabled())\r\n\t\t\t\t\t\t btnTerminer.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tthis.showError(shlAjouterNouvelleEquation, e1.toString());\r\n\t\t\t\t btnTerminer.setEnabled(false);\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\t\r\n\t\t});\r\n\r\n\t\tLabel lblNewLabel = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tfd_lblNewLabel.top = new FormAttachment(0, 51);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 5);\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Param\\u00E8tre de Sortie\");\r\n\r\n\t\tparametreDeSortieCombo = new Combo(shlAjouterNouvelleEquation, SWT.DROP_DOWN |SWT.READ_ONLY);\r\n\t\tparametreDeSortieCombo.setEnabled(false);\r\n\r\n\t\tFormData fd_combo = new FormData();\r\n\t\tfd_combo.top = new FormAttachment(0, 71);\r\n\t\tfd_combo.left = new FormAttachment(0, 5);\r\n\t\tparametreDeSortieCombo.setLayoutData(fd_combo);\r\n\t\tparametreDeSortieCombo.addListener(SWT.FocusIn, in->{\r\n\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\tparametreDeSortieCombo.update();\r\n\t\t});\r\n\r\n\t\tSashForm sashForm = new SashForm(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_sashForm = new FormData();\r\n\t\tfd_sashForm.top = new FormAttachment(parametreDeSortieCombo, 6);\r\n\t\tfd_sashForm.bottom = new FormAttachment(100, -50);\r\n\t\tfd_sashForm.right = new FormAttachment(100);\r\n\t\tfd_sashForm.left = new FormAttachment(0, 5);\r\n\t\tsashForm.setLayoutData(fd_sashForm);\r\n\r\n\r\n\r\n\r\n\t\tGroup propertiesGroup = new Group(sashForm, SWT.NONE);\r\n\t\tpropertiesGroup.setLayout(new FormLayout());\r\n\r\n\t\tpropertiesGroup.setText(\"Propri\\u00E9t\\u00E9s\");\r\n\t\tFormData fd_propertiesGroup = new FormData();\r\n\t\tfd_propertiesGroup.top = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.left = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.bottom = new FormAttachment(100, 0);\r\n\t\tfd_propertiesGroup.right = new FormAttachment(100, 0);\r\n\t\tpropertiesGroup.setLayoutData(fd_propertiesGroup);\r\n\r\n\r\n\r\n\r\n\r\n\t\tproperties = new Text(propertiesGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tFormData fd_grouptext = new FormData();\r\n\t\tfd_grouptext.top = new FormAttachment(0,0);\r\n\t\tfd_grouptext.left = new FormAttachment(0, 0);\r\n\t\tfd_grouptext.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grouptext.right = new FormAttachment(100, 0);\r\n\t\tproperties.setLayoutData(fd_grouptext);\r\n\r\n\r\n\r\n\t\tGroup grpDescription = new Group(sashForm, SWT.NONE);\r\n\t\tgrpDescription.setText(\"Description\");\r\n\t\tgrpDescription.setLayout(new FormLayout());\r\n\t\tFormData fd_grpDescription = new FormData();\r\n\t\tfd_grpDescription.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grpDescription.right = new FormAttachment(100,0);\r\n\t\tfd_grpDescription.top = new FormAttachment(0);\r\n\t\tfd_grpDescription.left = new FormAttachment(0);\r\n\t\tgrpDescription.setLayoutData(fd_grpDescription);\r\n\r\n\t\tdescription = new Text(grpDescription, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tdescription.setParent(grpDescription);\r\n\r\n\t\tFormData fd_description = new FormData();\r\n\t\tfd_description.top = new FormAttachment(0,0);\r\n\t\tfd_description.left = new FormAttachment(0, 0);\r\n\t\tfd_description.bottom = new FormAttachment(100, 0);\r\n\t\tfd_description.right = new FormAttachment(100, 0);\r\n\r\n\t\tdescription.setLayoutData(fd_description);\r\n\r\n\r\n\t\tsashForm.setWeights(new int[] {50,50});\r\n\r\n\t\tbtnTerminer = new Button(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tbtnTerminer.setEnabled(false);\r\n\t\tFormData fd_btnTerminer = new FormData();\r\n\t\tfd_btnTerminer.top = new FormAttachment(sashForm, 6);\r\n\t\tfd_btnTerminer.left = new FormAttachment(sashForm,0, SWT.CENTER);\r\n\t\tbtnTerminer.setLayoutData(fd_btnTerminer);\r\n\t\tbtnTerminer.setText(\"Terminer\");\r\n\t\tbtnTerminer.addListener(SWT.Selection, e->{\r\n\t\t\t\r\n\t\t\tboolean go = true;\r\n\t\t\tresult = null;\r\n\t\t\tif (status.equals(ValidationStatus.ok())) {\r\n\t\t\t\t//perform all the neccessary tests before validating the equation\t\t\t\t\t\r\n\t\t\t\tif(equation.isOriented()){\r\n\t\t\t\t\tif(!equation.getListeDeParametresEqn().contains(equation.getParametreDeSortie()) || equation.getParametreDeSortie() == null){\t\t\t\t\t\t\r\n\t\t\t\t\t\tString error = \"Erreur sur l'équation \"+equation.getContenuEqn();\r\n\t\t\t\t\t\tgo = false;\r\n\t\t\t\t\t\tshowError(shlAjouterNouvelleEquation, error);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (go) {\r\n\t\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation.setParametreDeSortie(null);\r\n\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t//Just some cleanup\r\n\t\t\t\t\tfor (Parametre par : equation.getListeDeParametresEqn()) {\r\n\t\t\t\t\t\tif (par.getTypeP().equals(TypeParametre.OUTPUT)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpar.setTypeP(TypeParametre.UNDETERMINED);\r\n\t\t\t\t\t\t\t\tpar.setSousTypeP(SousTypeParametre.FREE);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\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\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t//\tSystem.out.println(equation.getContenuEqn() +\"\\n\"+equation.isConstraint()+\"\\n\"+equation.isOriented()+\"\\n\"+equation.getParametreDeSortie());\r\n\t\t});\r\n\r\n\t\t//In this sub routine I bind the values to the respective controls in order to observe changes \r\n\t\t//and verify the data insertion\r\n\t\tbindValues();\r\n\t}", "private void init(){\n this.setOrientation(LinearLayout.VERTICAL);\n input=new EditText(theContext);\n seperator=new LinearLayout(theContext);\n seperator.setOrientation(HORIZONTAL);\n input.setMaxLines(1);\n input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n input.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n strengthText = new TextView(theContext);\n strengthText.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n strengthText.setText(\"This password is\");\n str = new TextView(theContext);\n str.setText(\" too short\");\n str.setTextColor(Color.GRAY);\n seperator.addView(strengthText);\n seperator.addView(str);\n progressBar = new ProgressBar(theContext,null,android.R.attr.progressBarStyleHorizontal);\n progressBar.setScaleY(3);\n progressBar.setMax(5);\n progressBar.setProgress(0);\n progressBar.getProgressDrawable().setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_IN);\n this.addView(input);\n if(hasBar) {\n this.addView(progressBar);\n }\n if(hasStrTxt) {\n this.addView(seperator);\n }\n input.addTextChangedListener(inputWatcher);\n\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t\taddView = (TextView) findViewById(R.id.id_submit_view);\r\n\t\taddView.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tgatewayId = gatewayView.getEditableText().toString();\r\n\t\t\t\tLog.i(TAG, \"gatewayId \" + gatewayId.trim());\r\n\t\t\t\tgatewayId = gatewayId.trim();\r\n\t\t\t\tif(gatewayId.trim().isEmpty()){\r\n\t\t\t\t\tbindHintView.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tbindbarView.setVisibility(View.GONE);\r\n\t\t\t\t\tbindHintView.setText(R.string.bind_gateway_none);\r\n\t\t\t\t\tbindHintView.setTextColor(getResources().getColor((R.color.red)));\r\n\t\t\t\t}else {\r\n\t\t\t\t\tsetHintVisible(true);\r\n\t\t\t\t\tnew Thread(new BindRunnale()).start();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initView() {\n btnLoginFacebook = (RelativeLayout) findViewById(R.id.btnLoginFacebook);\n btnLoginGoogle = (RelativeLayout) findViewById(R.id.btnLoginGoogle);\n txtRegister = (TextViewFontAwesome) findViewById(R.id.txtRegister);\n txtForgotPassword = (TextViewFontAwesome) findViewById(R.id.txtForgotPassword);\n txtLogin = (TextViewFontAwesome) findViewById(R.id.txtLogin);\n txtUsername = (EditText) findViewById(R.id.txtUsername);\n txtPassword = (EditText) findViewById(R.id.txtPassword);\n txtForgotPassword.setPaintFlags(txtForgotPassword.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);\n }", "private void initViews() {\n textViewName = (EditText) findViewById(R.id.inputText_name);\n textViewEmail = (EditText) findViewById(R.id.inputText_email);\n textViewPhone = (EditText) findViewById(R.id.inputText_phone);\n textViewRent = (EditText) findViewById(R.id.inputText_rent);\n textViewChores = (EditText) findViewById(R.id.inputText_chores);\n\n updateUserButton = (Button) findViewById(R.id.button_updateUser);\n //redirectToUsers = (Button) findViewById(R.id.button_updateUser);\n }", "public void createButtonUI(final LinearLayout linearLayout){\n btnAddSet =new Button(this);\n btnDeleteLift=new Button(this);\n btnAddSet.setText(\"Add\");\n btnDeleteLift.setText(\"Delete\");\n btnAddSet.setId(View.generateViewId());\n btnDeleteLift.setId(View.generateViewId());\n btnLayout=new RelativeLayout(this);\n final RelativeLayout.LayoutParams btnRelLayoutparams=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n btnRelLayoutparams.setMargins(0,5,0,20);\n btnLayout.setLayoutParams(btnRelLayoutparams);\n RelativeLayout.LayoutParams btnAddSetParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n RelativeLayout.LayoutParams btnDeleteLiftParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n\n btnAddSetParams.setMargins(75, 0, 10, 0);\n btnDeleteLiftParams.setMargins(10, 0, 75, 0);\n btnAddSetParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n btnDeleteLiftParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n btnAddSet.setLayoutParams(btnAddSetParams);\n btnDeleteLift.setLayoutParams(btnDeleteLiftParams);\n\n btnLayout.addView(btnAddSet, btnAddSetParams);\n btnLayout.addView(btnDeleteLift, btnDeleteLiftParams);\n\n linearLayout.addView(btnLayout, btnRelLayoutparams);\n btnAddSet.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n linearLayout.removeView(btnLayout);\n createSetUI(linearLayout,setNum , null);\n setNum++;\n linearLayout.addView(btnLayout, btnRelLayoutparams);\n }\n });\n//Listener for delete lift button\n btnDeleteLift.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n delLift();\n }\n });\n\n }", "protected void onLoadLayout(View view) {\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n\t{\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\t\tmainView = new MainView(this);\n\t\t((LinearLayout)findViewById(R.id.mainLinearLayout1)).addView(mainView);\n\t\tfindViewById(R.id.btn_list).setOnClickListener(this);\n\t\tfindViewById(R.id.btn_stime).setOnClickListener(this);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_find1, container, false);\n\n txt_people = (EditText) view.findViewById(R.id.editText);\n txt_patient = (EditText) view.findViewById(R.id.editText2);\n\n Button click = (Button) view.findViewById(R.id.eiei);\n click.setOnClickListener(this);\n\n return view;\n }", "public View onCreateView(@NonNull LayoutInflater inflater,\n ViewGroup container, Bundle savedInstanceState) {\n \n View root = inflater.inflate(R.layout.fragment_add_training, container, false);\n controller = Controller.getInstance(root.getContext()); // database\n Button dateButton = root.findViewById(R.id.at_button_date);\n Button submit = root.findViewById(R.id.at_button_submit);\n\n // initialize form\n setCalendarToFrench();\n initForm(root);\n\n // event click on calendar button\n dateButton.setOnClickListener(v -> chooseDateFromCalendar(dateButton));\n\n // event click on submit button\n submit.setOnClickListener(v -> submitForm());\n\n return root;\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\r\n setContentView(layoutId);\r\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tView view = View.inflate(this, R.layout.healthplus_regsiter_layout,\r\n\t\t\t\tnull);\r\n\t\tsetContainer(view);\r\n\t\tgetHeaderView().setHeaderTitle(\"注册\");\r\n\t\tgetHeaderView().setHeaderTitleColor(\r\n\t\t\t\tR.color.register_headview_text_color_white);\r\n\t\tgetHeaderView().setBackGroundColor(\r\n\t\t\t\tR.color.register_headview_bg_color_black);\r\n\t\tsetRightBtnVisible(View.GONE);\r\n\t\tsetLeftBtnVisible(View.VISIBLE);\r\n\t\tsetLeftBtnType(HeaderView.HEADER_BACK);\r\n\t\tsetLeftBtnRes(R.drawable.healthplus_headview_back_btn);\r\n\t\tinitView(view);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_language_dialog, container, false);\n jalang=(EditText)view.findViewById(R.id.jalang);\n jalanglevel=(Spinner)view.findViewById(R.id.jalanglevel);\n saveslangd=(Button)view.findViewById(R.id.saveslangd);\n cancellangd=(Button)view.findViewById(R.id.cancellangd);\n saveslangd.setOnClickListener(this);\n cancellangd.setOnClickListener(this);\n return view;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.edit);\n\n\t\tinputMethodManager = (InputMethodManager) this\n\t\t\t\t.getSystemService(Context.INPUT_METHOD_SERVICE);\n\n\t\tinitComponents();\n\n\t\tregisterButton();\n\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_primeiro, container, false);\n\n initViews(view);\n\n botaoAndroid.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n SistemaOperacional sistemaOperacional = new SistemaOperacional(\"ANDROID\", R.drawable.android);\n\n comunicador.envioDadosSistemaOperaciona(sistemaOperacional);\n\n }\n });\n\n return view;\n }", "@Override\n\t public void onCreate(Bundle savedInstanceState)\n\t {\n\t super.onCreate(savedInstanceState);\n\t setContentView(R.layout.secant);\n\t initControls();\n\t }", "private void initBaseLayout() {\n if (topText != null) {\n TextView topicText = new TextView(mainContext);\n topicText.setText(topText);\n dimensionsContainer.setViewStyle(KEY_TOPIC_TEXT, topicText);\n topicText.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_topic));\n topicText.setClickable(true);\n topicText.setOnClickListener(generalClickListener);\n blankLayout.addView(topicText);\n }\n//Add topLayout\n //if (topLayout == null) {\n topLayout = new LinearLayout(mainContext);\n topLayout.setOrientation(LinearLayout.HORIZONTAL);\n topLayout.setLayoutParams(layoutParams_WC_WC);\n topLayout.setBackgroundColor(bgColor_Table);\n blankLayout.addView(topLayout);\n//Add numTop\n TextView numTop = new TextView(mainContext);\n numTop.setText(R.string.symbol_num);\n dimensionsContainer.setViewStyle(KEY_NUM_TOP, numTop);\n numTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_num_top));\n numTop.setClickable(true);\n numTop.setOnClickListener(generalClickListener);\n topLayout.addView(numTop);\n//Add nameTop\n TextView nameTop = new TextView(mainContext);\n nameTop.setText(nameTopTextResId);\n dimensionsContainer.setViewStyle(KEY_NAME_TOP, nameTop);\n nameTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_name_top));\n nameTop.setClickable(true);\n nameTop.setOnClickListener(generalClickListener);\n topLayout.addView(nameTop);\n\n\n\n\n\n\n//Add topHScrollView\n// if (layoutHandler.topHScrollView == null) {\n topHScrollView = new SyncedHorizontalScrollView(mainContext);\n topHScrollView.setLayoutParams(layoutParams_WC_MP);\n topHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor() !=\n null) //OverScrollColor\n {\n topHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor());\n }\n topLayout.addView(topHScrollView);\n\n//Add topScrollLayout\n // if(layoutHandler.topScrollLayout == null) {\n topScrollLayout = new LinearLayout(mainContext);\n topScrollLayout.setBackgroundColor(bgColor_Table);\n topHScrollView.addView(topScrollLayout);\n\n//Add bodyScrollView\n //if(layoutHandler.bodyScrollView == null) {\n bodyScrollView = new ScrollView(mainContext);\n bodyScrollView.setLayoutParams(layoutParams_MP_WC);\n bodyScrollView.setVerticalScrollBarEnabled(false);\n //bodyScrollView.setOverScrollMode(View.OVER_SCROLL_NEVER);\n blankLayout.addView(bodyScrollView);\n//Add bodyLayout\n //if(layoutHandler.bodyLayout == null) {\n bodyLayout = new LinearLayout(mainContext);\n bodyLayout.setOrientation(LinearLayout.HORIZONTAL);\n bodyLayout.setLayoutParams(layoutParams_WC_WC);\n bodyScrollView.addView(bodyLayout);\n\n//Add bodyLeftLayout\n //if(layoutHandler.bodyLeftLayout == null) {\n bodyLeftLayout = new LinearLayout(mainContext);\n bodyLeftLayout.setOrientation(LinearLayout.VERTICAL);\n bodyLeftLayout.setLayoutParams(layoutParams_WC_WC);\n bodyLeftLayout.setBackgroundColor(bgColor_Table);\n bodyLayout.addView(bodyLeftLayout);\n\n//Add bodyHScrollView\n //if(layoutHandler.bodyHScrollView == null) {\n bodyHScrollView = new SyncedHorizontalScrollView(mainContext);\n bodyHScrollView.setLayoutParams(layoutParams_WC_WC);\n bodyHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor() !=\n null)//OverScrollColor\n {\n bodyHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor());\n }\n bodyLayout.addView(bodyHScrollView);\n\n//Add bodyRightLayout\n //if(layoutHandler.bodyRightLayout == null) {\n bodyRightLayout = new LinearLayout(mainContext);\n bodyRightLayout.setOrientation(LinearLayout.VERTICAL);\n bodyRightLayout.setBackgroundColor(bgColor_Table);\n bodyHScrollView.addView(bodyRightLayout);\n\n//Add Scroll Listeners\n\n ScrollManager scrollManager = new ScrollManager();\n scrollManager.setScrollDirection(ScrollManager.SCROLL_HORIZONTAL);\n scrollManager.addScrollClient(topHScrollView);\n scrollManager.addScrollClient(bodyHScrollView);\n\n// bodyScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// bodyHScrollView.getParent().requestDisallowInterceptTouchEvent(false);\n// return false;\n// }\n// });\n// bodyHScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// v.getParent().requestDisallowInterceptTouchEvent(true);\n// return false;\n// }\n// });\n\n //ScrollManager.disallowParentScroll(bodyHScrollView, 100);\n //ScrollManager.disallowChildScroll(bodyHScrollView, bodyLayout, 100);\n //bodyHScrollView.getWidth());\n //Dimensions.dipToPixels(mainContext, 800));\n// ScrollManager\n// .disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 200));\n //TODO: disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 50));\n\n }", "private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.pedido_inf_adicional);\n\t\tthis.setTitle(Global.tituloAplicacao);\n\n\t\tpedBRL = new PedidoBRL(getBaseContext());\n\n\t\ttxtInfAdicional = (EditText)findViewById(R.id.txtInfAdicional);\n\n\t}", "public LayoutCampo() {\n /* rimanda al costruttore della superclasse */\n super();\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.activity_feedback);\n\t\tsetActionBar(R.string.feedb_tittle, R.drawable.btn_homeasup_default, R.drawable.icon_default_send, actionListener);\n\t\tlayout_main=(LinearLayout) findViewById(R.id.layout_main);\n\t\tev_feedback=(EditText) findViewById(R.id.ev_feedback);\n\t\tfindViewById(R.id.layout_edittext).setOnClickListener(actionListener);\n\t}", "@Override\n public void initView() {\n mLoginActivity.setContentView(R.layout.activity_login);\n if(BigwinerApplication.mApp.mUpDataManager != null)\n BigwinerApplication.mApp.mUpDataManager.checkVersin();\n mLoginActivity.mToolBarHelper.hidToolbar2(mLoginActivity);\n ToolBarHelper.setBgColor(mLoginActivity, mLoginActivity.mActionBar, Color.rgb(255, 255, 255));\n mLoginActivity.mRegiester = mLoginActivity.findViewById(R.id.regiest);\n mLoginActivity.areaTxt = mLoginActivity.findViewById(R.id.area_text);\n mLoginActivity.btnArea = mLoginActivity.findViewById(R.id.phone_title);\n mLoginActivity.arename = mLoginActivity.findViewById(R.id.name_title);\n mLoginActivity.phoneNumber = (EditText) mLoginActivity.findViewById(R.id.phone_text);\n mLoginActivity.passWord = (EditText) mLoginActivity.findViewById(R.id.password_text);\n mLoginActivity.showPassword = (ImageView) mLoginActivity.findViewById(R.id.password_show_icon);\n mLoginActivity.phoneLayer = (RelativeLayout) mLoginActivity.findViewById(R.id.phone_number);\n mLoginActivity.passwordLayer = (RelativeLayout) mLoginActivity.findViewById(R.id.password_number);\n mLoginActivity.mForget = (TextView) mLoginActivity.findViewById(R.id.forget);\n mLoginActivity.btnLogin = (TextView) mLoginActivity.findViewById(R.id.login_btn);\n mLoginActivity.mForget.setOnClickListener(mLoginActivity.mForgetListener);\n mLoginActivity.showPassword.setOnClickListener(mLoginActivity.showPasswordListener);\n mLoginActivity.mRegiester.setOnClickListener(mLoginActivity.startRegisterListener);\n mLoginActivity.btnLogin.setOnClickListener(mLoginActivity.doLoginListener);\n mLoginActivity.safe = mLoginActivity.findViewById(R.id.a6);\n SpannableString content = new SpannableString(mLoginActivity.safe.getText().toString());\n content.setSpan(new UnderlineSpan(), 1, mLoginActivity.safe.getText().toString().length()-1, 0);\n mLoginActivity.safe.setText(content);\n mLoginActivity.safe.setOnClickListener(mLoginActivity.safeListener);\n mLoginActivity.btnArea.setOnClickListener(mLoginActivity.areaListener);\n mLoginActivity.areaTxt.setOnClickListener(mLoginActivity.areaListener);\n checkUser();\n }", "protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n this.requestWindowFeature(Window.FEATURE_NO_TITLE);\n\n setContentView(R.layout.actor_add);\n this.__initAllElement();\n\n\n\n // TODO: Set action to perform on click\n this.__bindEventToButtons();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_desertion_app, container, false);\n SearchFacultades();\n ListFacultades = (Spinner) root.findViewById(R.id.listFacultades);\n idEstudiante = (EditText) root.findViewById( R.id.et_idDesertor);\n Description = (EditText) root.findViewById( R.id.edt_description_desertioen);\n horario = (RadioGroup) root.findViewById( R.id.rbg_horario);\n btn = (ImageButton) root.findViewById( R.id.btn_sendDesertion );\n btn.setOnClickListener(this);\n\n IconManager icon = new IconManager();\n icon.setBackgroundApp(getActivity().getResources(),\n (FrameLayout)root.findViewById(R.id.contentDesertion));\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n // Inflate the container\n View view = inflater.inflate(R.layout.fragment_quote_add, container, false);\n // set up the text views\n mAddNameTextView = (EditText) view.findViewById(R.id.add_name_text);\n mAddSourceTextView = (EditText) view.findViewById(R.id.add_source_text);\n mAddQuoteTextView = (EditText) view.findViewById(R.id.add_quote_text);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n root = inflater.inflate(R.layout.activity_user_information, container, false);\n\n edit = root.findViewById(R.id.button12);\n edit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openedit(root);\n }\n });\n\n\n return root;\n }", "@Override\r\n\tprotected void layout() {\n\t\tsetContentView(R.layout.activity_change_password);\r\n\t\tsetBackButton();\r\n\t\tfindViewById(R.id.regist_sure).setOnClickListener(this);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_cadastro_cliente_enderecos, container, false);\n logradouro = view.findViewById(R.id.textInputLogradouro);\n numero = view.findViewById(R.id.textInputNumero);\n complemento = view.findViewById(R.id.textInputComplemento);\n bairro = view.findViewById(R.id.textInputBairro);\n cep = view.findViewById(R.id.textInputCep);\n uf = view.findViewById(R.id.textInputEstado);\n municipio = view.findViewById(R.id.textInputMunicipio);\n\n if(getCliente() != null){\n if(getCliente().getEndereco() != null){\n if(logradouro.getEditText().getText() == null){\n logradouro.getEditText().setText(getCliente().getEndereco());\n }\n }\n if(getCliente().getNumero() !=null){\n if(numero.getEditText().getText() == null){\n numero.getEditText().setText(getCliente().getNumero());\n }\n }\n if(getCliente().getComplemento() != null){\n if(complemento.getEditText().getText()==null){\n complemento.getEditText().setText(getCliente().getComplemento());\n }\n }\n if(getCliente().getBairro() !=null){\n if(bairro.getEditText().getText()==null){\n bairro.getEditText().setText(getCliente().getBairro());\n }\n }\n if(getCliente().getCep() !=null){\n if(cep.getEditText().getText()==null){\n cep.getEditText().setText(getCliente().getCep());\n }\n }\n if (getCliente().getCodMunicipio())\n }\n\n\n return view;\n }", "private void setupGUI() {\n\t\tcollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingToolbarLayout);\n\t\tlogo = (SmartImageView) findViewById(R.id.logoo);\n\t\tnomePosto = (TextView) findViewById(R.id.nomeposto);\n\t\tdescrizione = (TextView) findViewById(R.id.descrizioneposto);\n\t\twebsite = (TextView) findViewById(R.id.websiteposto);\n\t\tnumtelefono = (TextView) findViewById(R.id.telefonoposto);\n\t\tcitta = (TextView) findViewById(R.id.cittaposto);\n\t\tbtnMappa = (FloatingActionButton) findViewById(R.id.fabbuttonmappa);\n\t\tgallery = (LinearLayout) findViewById(R.id.gallery);\n\t\tgalleryContainer = (CardView) findViewById(R.id.cv1);\n\t\t// rvofferte = (RecyclerView) findViewById(R.id.rvofferte);\n\t\t// LinearLayoutManager llm = new\n\t\t// LinearLayoutManager(DetPlaActivity.this);\n\t\t// rvofferte.setLayoutManager(llm);\n\t\t// rvofferte.setSaveEnabled(false);\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tCustomLayout layout = new CustomLayout(this);\r\n\t\tsetContentView(layout);\r\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView layout = inflater.inflate(R.layout.fragment_assistant, container, false);\r\n\t\tlayout.findViewById(R.id.kaniu).setOnClickListener(this);\r\n\t\tlayout.findViewById(R.id.img_add).setOnClickListener(this);\r\n\t\tinitListView(layout);\r\n\t\treturn layout;\r\n\t}", "public void init() {\n initProperties();\n edtLogradouro = (TextInputEditText) findViewById(R.id.edtLogradouro);\n edtNumero = (TextInputEditText) findViewById(R.id.edtNumero);\n edtBairro = (TextInputEditText) findViewById(R.id.edtBairro);\n edtComplemento = (TextInputEditText) findViewById(R.id.edtComplemento);\n btnCadastrarEndereco = (Button) findViewById(R.id.btnCadastrarEndereco);\n mToolbar = (Toolbar) findViewById(R.id.nav_action);\n mToolbar.setTitle(\"Complete o endereço\");\n setSupportActionBar(mToolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n }", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n // Setup any handles to view objects here\n // EditText etFoo = (EditText) view.findViewById(R.id.etFoo);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_formulario, container, false);\n\n encontrarVistas(view);\n\n funcionalidadButton();\n\n return view;\n }" ]
[ "0.72285056", "0.72015", "0.71961343", "0.692603", "0.68704116", "0.68521684", "0.68508977", "0.68301797", "0.6810782", "0.67902374", "0.67529094", "0.67120576", "0.66931206", "0.6670156", "0.6669707", "0.6648241", "0.6632536", "0.6625245", "0.6618192", "0.66178495", "0.66125077", "0.66038424", "0.6602971", "0.6589032", "0.6582655", "0.6575219", "0.65740794", "0.6570385", "0.65629107", "0.6560464", "0.6553743", "0.6532498", "0.65195864", "0.649693", "0.64756274", "0.6467333", "0.6465983", "0.64647114", "0.645423", "0.64535344", "0.64489204", "0.64442414", "0.6438612", "0.6434666", "0.6432394", "0.642414", "0.64174056", "0.64168376", "0.64107543", "0.63964605", "0.6393669", "0.6389076", "0.6387064", "0.638243", "0.63770026", "0.63715875", "0.63671225", "0.636688", "0.63651407", "0.63607746", "0.63599324", "0.63586885", "0.6355927", "0.6354751", "0.6354639", "0.63509524", "0.6350266", "0.63392514", "0.6337469", "0.6337429", "0.63356346", "0.63333064", "0.6332958", "0.6328797", "0.6322334", "0.63217777", "0.6318235", "0.63118976", "0.6311585", "0.6307162", "0.6306361", "0.6303822", "0.6303311", "0.6297887", "0.6297388", "0.62960047", "0.6296003", "0.62906605", "0.62873393", "0.62869644", "0.6286885", "0.62765574", "0.62763846", "0.6273942", "0.62727255", "0.62695897", "0.62684155", "0.62663066", "0.62657994", "0.62632823", "0.62586474" ]
0.0
-1
gewinnerNotiz(int LoginID) / Wenn der Gewinner ermittelt wurde, wird ihm eine Nachricht hinterlassen + der Gewinn auf sein Konto
public void gewinnerNotiz(int LoginID) { this.gewinnerGefunden = true; String Logname="",Pass= "",Email=""; double Bank_Double= 0; Intent callerIntent = getIntent(); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); try { final String METHOD_NAME="getListLogin"; final String SOAP_ACTION=NAMESPACE+METHOD_NAME; SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope= new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); MarshalFloat marshal=new MarshalFloat(); marshal.register(envelope); HttpTransportSE androidHttpTransport= new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); SoapObject soapArray1=(SoapObject) envelope.getResponse(); for(int i=0; i<soapArray1.getPropertyCount(); i++) { SoapObject soapItem =(SoapObject) soapArray1.getProperty(i); if (LoginID == Integer.valueOf(soapItem.getProperty("LoginID").toString())) { Logname=soapItem.getProperty("Username").toString().trim(); Pass=soapItem.getProperty("Passwords").toString().trim(); Email=soapItem.getProperty("Email").toString().trim(); if (Email.contains("#")) { Email = Email.replace((Email.substring(Email.indexOf("#")))," ").trim(); } else{} Email=(Email+"#"+packageFromSpiel.getInt("ID_Spiel")+"#"+" Mit "+ (packageFromSpiel.getDouble("EinSatzGeld_DoubleWert")* packageFromSpiel.getInt("MaxSpieler"))).trim(); String B =soapItem.getProperty("Bank").toString().trim(); Bank_Double = Double.valueOf(B) + (packageFromSpiel.getDouble("EinSatzGeld_DoubleWert")*packageFromSpiel.getInt("MaxSpieler")); } } updateLogin(LoginID,Logname,Pass,Email,Bank_Double); } catch (Exception ex) { fehlermeldung("Fehler bei der Internetverbindung"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public \tStringBuilder vergleichVorratErgebnisErgebnis() // result is a String of LoginID, these win this Game\r\n\t{\r\n\t\tIntent callerIntent = getIntent(); \r\n\t\tBundle packageFromSpiel = callerIntent.getBundleExtra(\"SpielInformationen\");\r\n\t\t\r\n\t\t// implement Array VorrErg and LogID \r\n\t\tString [] VorErg = new String [packageFromSpiel.getInt(\"MaxSpieler\")+5];\t\t\r\n\t\tint [] LogID = new int [packageFromSpiel.getInt(\"MaxSpieler\")+5];\r\n\t\t\r\n\t\tString Ergebnis_to_Compare = getErgebnisDerSpielID();\r\n\t\t\r\n\t\tObject [] array_VorErg = getListHatVorratErgebnisGleicheSpielID().toArray();\t\r\n\t\t\r\n\t\tfor (int i=0; i<array_VorErg.length;i++)\r\n\t\t{\r\n\t\t\t// split elements in array_VorrErg to 2 new Array \r\n\t\t\tString [] arr = array_VorErg[i].toString().trim().split(\" \"); \r\n\t\t\tLogID[i]= Integer.parseInt(arr [0]); //##################################################\r\n\t\t\tVorErg[i] = arr[1];\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tStringBuilder List_IDGewinner = new StringBuilder();\r\n\t\t\t\t\r\n\t\tfor (int j=0; j<packageFromSpiel.getInt(\"MaxSpieler\"); j++)\r\n\t\t{\t\t\r\n\t\t\tif((Ergebnis_to_Compare.trim()).equals(VorErg[j].trim()))\r\n\t\t\t{\r\n\t\t\t\tList_IDGewinner.append(LogID[j]+\" \");\r\n\t\t\t}\r\n\t\t\telse {continue;}\r\n\t\t}\r\n\t\treturn List_IDGewinner ; \r\n\t}", "public static void announceWinner() {\n\t\tArrayList<String> data = new ArrayList<String>();\n\n\t\tfor (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) {\n\t\t\tLotteryDatabase lotteryData = LotteryDatabase.lotteryDatabase.get(index);\n\t\t\tfor (int i = 0; i < lotteryData.getTicketsPurchased(); i++) {\n\t\t\t\tdata.add(lotteryData.getPlayerName());\n\t\t\t}\n\t\t}\n\t\tif (data.isEmpty()) {\n\t\t\tAnnouncement.announce(\"No one has entered the lottery.\", ServerConstants.RED_COL);\n\t\t\treturn;\n\t\t}\n\t\tString lotteryWinnerName = data.get(Misc.random(data.size() - 1));\n\t\tAnnouncement.announce(\"<img=27><col=a36718> \" + lotteryWinnerName + \" has won the lottery worth \" + getTotalPotString() + \" with \" + getWinningPercentage(lotteryWinnerName)\n\t\t + \"% chance of winning!\");\n\t\tPlayer winner = Misc.getPlayerByName(lotteryWinnerName);\n\t\tif (winner != null) {\n\t\t\twinner.getPA().sendScreenshot(\"Lottery \" + getTotalPotString(), 2);\n\t\t}\n\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\tnpc.forceChat(\"Congratulations \" + lotteryWinnerName + \" has won the lottery worth \" + getTotalPotString() + \"!\");\n\t\tItemAssistant.addItemReward(null, lotteryWinnerName, ServerConstants.getMainCurrencyId(), getTotalPotNumber(), false, -1);\n\t\tint moneySink = getTotalPotNumber() / 85;\n\t\tmoneySink *= COMMISION_PERCENTAGE;\n\t\tCoinEconomyTracker.addSinkList(null, \"LOTTERY \" + moneySink);\n\t\ttotalTicketsPurchased = 0;\n\t\tLotteryDatabase.lotteryDatabase.clear();\n\t}", "static void Dungeonforgotten() {\n\t\t\n\t\tint[] lvldata;\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Fate has chosen...\");\n\t\tSystem.out.println(\"|| The Forgotten dungeon ||\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"The Forgotten dungeon is an EASY dungeon in which every book you find contains sacred text of a civilization,\\n whose language is long forgotten, but their magical powers have anything but dwindled.\");\n\t\tSystem.out.println(\"By completing this dungeon you will increase your ability to read their language,\\n and thus, understand their arcane arts.\");\n\t\t\n\t\tdungeonsize = (int) (Math.random() * 12) + 5;\n\t\tdungeondiff = 0.6;\n\t\thubcount = (int) (Math.random() * 3) + 1;\t\n\t\tlvldata = LevelGen();\n\t\tfor(int i = 1; i < dungeonsize - 1; i++) {\n\t\t\tEngine.roomaction(lvldata[i]);\n\t\t\t// TODO Forgotten progression\n\t\t}\n\t\tSystem.out.println(\"\tDebug: DungeonForgotten passed\");\n\t}", "public void gewonnen(int gewinn) {\n\t\tthis.gewinn += gewinn;\n\t}", "private void sendWinnerMessage(RaceTrackMessage playerDisconnectsMessage) {\n\t\tif(playerDisconnectsMessage != null)\n\t\t\ttry{\n\n\t\t\t\tint playerWhoWon = getPlayerWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove()); \n\t\t\t\tint playerWhoWonID = getPlayerIDWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove());\n\t\t\t\tif(playerWhoWon != -1){\n\t\t\t\t\tPoint2D lastVec = null;\n\t\t\t\t\tif(getPlayerMap().get(playerWhoWonID) != null)\n\t\t\t\t\t\tlastVec = getPlayerMap().get(playerWhoWonID).getCurrentPosition();\n\n\n\t\t\t\t\tPlayerWonMessage answer;\n\n\t\t\t\t\tanswer = VectorMessageServerHandler.generatePlayerWonMessage(playerWhoWon, playerWhoWon, lastVec);\n\n\t\t\t\t\tcloseGameByPlayerID(playerWhoWon);\n\n\t\t\t\t\tanswer.addClientID(playerWhoWonID);\n\n\t\t\t\t\tsendMessage(answer);\n\t\t\t\t\t\n\t\t\t\t\t//inform the AIs that game is over!!\n\n\t\t\t\t}\n\t\t\t}catch(ClassCastException e){\n\n\t\t\t}\n\t}", "public long gesamtGewinn() {\n long gewinn = 0 - gesamtKosten();\n for (int i = 0; i < neueLinien; i++) {\n gewinn = gewinn + linien[i].gewinn();\n }\n return gewinn;\n }", "private void computeWinLose() {\n\n if (!id11.getText().isEmpty()) {\n if ((id11.getText().equals(id00.getText()) && id11.getText().equals(id22.getText())) ||\n (id11.getText().equals(id02.getText()) && id11.getText().equals(id20.getText())) ||\n (id11.getText().equals(id10.getText()) && id11.getText().equals(id12.getText())) ||\n (id11.getText().equals(id01.getText()) && id11.getText().equals(id21.getText()))) {\n winner = id11.getText();\n }\n }\n\n if (!id00.getText().isEmpty()) {\n if ((id00.getText().equals(id01.getText()) && id00.getText().equals(id02.getText())) ||\n id00.getText().equals(id10.getText()) && id00.getText().equals(id20.getText())) {\n winner = id00.getText();\n }\n }\n\n if (!id22.getText().isEmpty()) {\n if ((id22.getText().equals(id21.getText()) && id22.getText().equals(id20.getText())) ||\n id22.getText().equals(id12.getText()) && id22.getText().equals(id02.getText())) {\n winner = id22.getText();\n }\n }\n\n // If all the grid entries are filled, it is a draw\n if (!id00.getText().isEmpty() && !id01.getText().isEmpty() && !id02.getText().isEmpty() && !id10.getText().isEmpty() && !id11.getText().isEmpty() && !id12.getText().isEmpty() && !id20.getText().isEmpty() && !id21.getText().isEmpty() && !id22.getText().isEmpty()) {\n winner = \"Draw\";\n }\n\n if (winner != null) {\n if (\"X\".equals(winner)) {\n winner = playerX;\n } else if (\"O\".equals(winner)) {\n winner = playerO;\n } else {\n winner = \"Draw\";\n }\n showWindow(winner);\n }\n }", "public void rePointFromServer(int winnerid,int money) {\n\t\tint winner = winnerid;\n\t\tString winName = \"您\" ;\n\t\tif(winner == left_gamerID) {\n\t\t\twinName = left_name;\n\t\t\tleft_coin+=money;\n\t\t}else if(winner == right_gamerID) {\n\t\t\twinName = right_name;\n\t\t\tright_coin+=money;\n\t\t}else {\n\t\t\tme_coin+=money;\n\t\t}\n\t\trefreshCoins();\n\t\t\n\t\t\n\t\tif(round<7) {\n\t\t\topeLabel.setText(winName+\"获得了本轮游戏的胜利,准备进行下一回合\");\n\t\t\ttextHistory.append(winName+\"获得了本轮游戏的胜利,准备进行下一回合\");\n\t\t}else {\n\t\t\tString str = \"\";\n\t\t\tif(left_coin>right_coin) {\n\t\t\t\t//找出最大值\n\t\t\t\tif(left_coin>me_coin) {\n\t\t\t\t\tstr=left_name+\"玩家拥有最多的硬币,获得了整局比赛的胜利!\";\n\t\t\t\t}else {\n\t\t\t\t\tstr=\"您拥有最多的硬币,获得了整局比赛的胜利!\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tif(right_coin>me_coin) {\n\t\t\t\t\tstr=right_name+\"玩家拥有最多的硬币,获得了整局比赛的胜利!\";\n\t\t\t\t}else {\n\t\t\t\t\tstr=\"您拥有最多的硬币,获得了整局比赛的胜利!\";\n\t\t\t\t}\n\t\t\t}\n\t\t\ttextHistory.append(str+\"\\n\");\n\t\t}\n\t\t\n\t\tleft_ready = 0;\n\t\tright_ready = 0;\n\t\tme_ready = 0;\n\n\t\t\n\t\t\n\t\tbtnReadyCancel.setVisible(true);\n\t\tbtnReadyCancel.setEnabled(false);\n\t\tbtnReady.setVisible(true);\n\t\tbtnReady.setEnabled(true);\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public void youWin(Map<String, Integer> rankingMap) {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEnded(\"YOU WON, CONGRATS BUDDY!!\", rankingMap);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending you won error\");\n }\n }", "@EventHandler(priority = EventPriority.HIGHEST) // set to highest because this is most important\n\tpublic void playerBanned(PlayerLoginEvent event){\n\t\tUUID uuid = event.getPlayer().getUniqueId();\n\t\tString reason = bm.isBanned(uuid);\n\t\tif (reason.equals(\"\")) return;\n\t\tPlayer p = event.getPlayer();\n\t\tevent.setKickMessage(reason);\n\t\tevent.setResult(Result.KICK_BANNED);\n\t}", "public String getWinner(){\n\t\tswitch (hatGewonnen) {\n\t\tcase \"Spieler O\":\n\t\t\treturn \"o\";\n\t\tcase \"Spieler X\":\n\t\t\treturn \"x\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}", "public void geldCheat() {\n if (geld + 1000000 < Long.MAX_VALUE) {\n geld = geld + 1000000;\n ticker.neueNachricht(\"Korruptionsverdacht bei Stadtwerken!\");\n }\n }", "@Override\n public int getWinner() {\n //TODO Implement this method\n return -1;\n }", "public void clientLoss(int playerID){\n\t\tfinal Player winner = this.players.get(playerID);\n\t\tfor(Player player : this.players){\n\t\t\tif(player!=winner){\n\t\t\t\tplayer.sendLossMessage();\n\t\t\t}\r\n\t\t}\n\t\t\r\n\t}", "public void youWinByAbandonment() {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEndedByAbandonment(\"YOU WON BECAUSE YOUR OPPONENTS HAVE ABANDONED!!\");\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending ended by abandonment error\");\n }\n }", "private void gameWon() {\n\n stopTime();\n //reveal all mines and mark them\n for (int i = 0; i < minefield.getRows(); i++) {\n for (int j = 0; j < minefield.getCols(); j++) {\n if (minefield.getMinefield()[i][j].isMined()) {\n tileLabel[i][j].setIcon(flagIcon);\n tile[i][j].setBackground(Color.green);\n }\n }\n }\n\n JFrame winframe = new JFrame(\"Winner!\");\n JPanel winpanel = new JPanel();\n JLabel label = new JLabel(\"Well done, you beat the game!\");\n JLabel label2 = new JLabel(\" Time taken: \" + time + \" \");\n JButton close = new JButton(\"Close\");\n JButton restart = new JButton(\"Restart\");\n\n close.addActionListener((ActionEvent e) -> {\n winframe.dispose();\n });\n\n restart.addActionListener((ActionEvent e) -> {\n frame.dispose();\n winframe.dispose();\n createNewGame(minefield.getRows(), minefield.getCols(), minefield.getMaxMines());\n });\n\n winpanel.add(label);\n winpanel.add(label2);\n winpanel.add(close);\n winpanel.add(restart);\n winframe.add(winpanel);\n winframe.setLocationRelativeTo(null);\n winframe.setSize(220, 110);\n winframe.setResizable(false);\n winframe.setVisible(true);\n }", "@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)\n public void onPlayerLogin(PlayerLoginEvent event) {\n String playerName = event.getPlayer().getName();\n \n if(plugin.bannedPlayers.contains(playerName)){\n \t event.setKickMessage(\"You are banned from this server!\");\n \t event.setResult(Result.KICK_BANNED);\n \t \n }\n \n \n }", "private synchronized String responseMessage(String playerInputNum) {\n if (playerInputNum.equals(answer)) {\n winOrLose = true;\n return \"Congratulation, the correct answer is \" + answer;\n } else if (attempt == 4) {\n attempt = 5;\n return \"Game over, the answer is \" + answer;\n } else if (playerInputNum.compareTo(answer) > 0)\n return \"The guess number \" + playerInputNum + \" is bigger than the generated number, \" + (4 - attempt) + \" chances left.\";\n else\n return \"The guess number \" + playerInputNum + \" is smaller than the generated number, \" + (4 - attempt) + \" chances left.\";\n }", "@Override\n public void youLose(Map<String, Integer> rankingMap) {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEnded(\" YOU LOSE, SORRY \", rankingMap);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending you lose error\");\n }\n }", "public String playerWon() {\n\t\tString message = \"Congratulations \"+name+ \"! \";\n\t\tRandom rand = new Random();\n\t\tswitch(rand.nextInt(3)) {\n\t\t\tcase 0:\n\t\t\t\tmessage+=\"Can you stop now? You're too good at this!\";\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tmessage+=\"You OBLITERATED the opponent!\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tmessage+=\"You sent them to the Shadow Realm\";\n\t\t}\n\t\treturn message;\n\t}", "private String getTurnMessage(){\n if (board.turn ==0)\n return \"Black's turn\";\n else\n return \"White's turn\";\n }", "private int userLoing() {\n\t\t\n\t\tScanner scan2 = new Scanner(System.in);\n\t\tSystem.out.println(\"\\nPour vous rappler, pour quitter il faut entrer q ou quit pour quitter \\navant de commencer de saisir de mot de passe.\\n\"+\n\t\t\t\t\n\t\t\t\t\"--------------------------------------------------------------------------------------\");\n\t\tboolean correct = true; //To check the confirmation of the password\n\t\t\n\t\t\n\t\t//to get the user's name\n\t\tString nom;\n\t\tdo {\n\t\t System.out.print(\"Entrez un nom d'une longueur qui > 4: \");\n\t\t nom = scan2.nextLine();\n\t\t} while ((nom.length() < 4) && !(nom.equalsIgnoreCase(\"q\")) && !(nom.equalsIgnoreCase(\"quit\")));\n\t\t\n\t\tif(nom.equalsIgnoreCase(\"q\") || nom.equalsIgnoreCase(\"quit\")) {\n\t\t\tSystem.out.println(\"\\n-----------------------------------------------------\\nVous avez été dérigé vers le meun principal!\\n-----------------------------------------------------\");\n\t\t\tcorrect = true;\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t\n\t\t\t//for the password and the confirmation\n\t\t\t\n\t\t\twhile(correct) {\n\t\t\t\tint mdp;\n\t\t\t\tdo {\n\t\t\t\t System.out.print(\"Entrez un mot de passe qui contient au moins 6 chiffres SVP: \");\n\t\t\t\t while (!scan2.hasNextInt()) {\n\t\t\t\t\t System.err.print(\"Entrez un mot de passe qui contient au moins 6 chiffres SVP: \");\n\t\t\t\t scan2.next();\n\t\t\t\t }\n\t\t\t\t mdp = scan2.nextInt();\n\t\t\t\t} while (Integer.toString(mdp).length() < 6);\n\t\t\t\t\n\t\t\t\tint mdp2;\n\t\t\t\tdo {\n\t\t\t\t System.out.print(\"Confirmez vôtre mot de passe SVP : \");\n\t\t\t\t while (!scan2.hasNextInt()) {\n\t\t\t\t\t System.err.print(\"Confirmez vôtre mot de passe : \");\n\t\t\t\t scan2.next(); \n\t\t\t\t }\n\t\t\t\t mdp2 = scan2.nextInt();\n\t\t\t\t} while (Integer.toString(mdp2).length() < 6);\n\t\t\t\t\n\t\t\t\tcorrect = mdp == mdp2 ? false: true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint res = !correct? 1 : 0;\n\t\treturn res;\n\t\t\n\t}", "public static int numNickels(double money) {\n // REPLACE THIS WITH YOUR CODE\n return 0;\n }", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "private void heilenTrankBenutzen() {\n LinkedList<Gegenstand> gegenstaende = spieler.getAlleGegenstaende();\n for (Gegenstand g : gegenstaende) {\n if (g.getName().equalsIgnoreCase(\"heiltrank\")) {\n spieler.heilen();\n gegenstaende.remove(g);\n System.out.print(\"Heiltrank wird benutzt\");\n makePause();\n System.out.println(\"Du hast noch \" + zaehltGegenstand(\"heiltrank\") + \" Heiltranke!\");\n return;\n }\n }\n System.out.println(\"Du hast gerade keinen Heiltrank\");\n }", "public String getWinner()\n\t{\n\n\n\n\n\n\n\n\n\n\n\n\n\t\treturn \"\";\n\t}", "private void whoIsTheWinner() {\n\t\t// at first we say let the number for winner and the maximal score be 0.\n\t\tint winnerName = 0;\n\t\tint maxScore = 0;\n\t\t// then, for each player, we check if his score is more than maximal\n\t\t// score, and if it is we let that score to be our new maximal score and\n\t\t// we generate the player number by it and we let that player number to\n\t\t// be the winner, in other way maximal scores doen't change.\n\t\tfor (int i = 1; i <= nPlayers; i++) {\n\t\t\tif (totalScore[i] > maxScore) {\n\t\t\t\tmaxScore = totalScore[i];\n\t\t\t\twinnerName = i - 1;\n\t\t\t}\n\t\t}\n\t\t// finally, program displays on screen who is the winner,and what score\n\t\t// he/she/it got.\n\t\tdisplay.printMessage(\"Congratulations, \" + playerNames[winnerName]\n\t\t\t\t+ \", you're the winner with a total score of \" + maxScore + \"!\");\n\t}", "public String showdown() {\n if(this.playerH.Rank() < this.serverH.Rank()|| \n (this.playerH.Rank() == this.serverH.Rank() && this.playerH.getSecondaryRank() < this.serverH.getSecondaryRank()) ||\n (this.playerH.Rank() == this.serverH.Rank() && this.playerH.getSecondaryRank() == this.serverH.getSecondaryRank() && this.playerH.getAuxRank() < this.serverH.getAuxRank())){\n if(this.playerBet <= this.serverBet){\n this.money_server += this.playerBet + this.serverBet;\n }\n else{\n this.money_server+= this.serverBet + this.serverBet; \n this.money_player += this.playerBet - this.serverBet;\n }\n }\n else if(this.playerH.Rank() > this.serverH.Rank()|| \n (this.playerH.Rank() == this.serverH.Rank() && this.playerH.getSecondaryRank() > this.serverH.getSecondaryRank()) ||\n (this.playerH.Rank() == this.serverH.Rank() && this.playerH.getSecondaryRank() == this.serverH.getSecondaryRank() && this.playerH.getAuxRank() > this.serverH.getAuxRank())){\n if(this.playerBet >= this.serverBet){\n this.money_player += this.playerBet + this.serverBet;\n }\n else{\n this.money_player += 2*this.playerBet;\n this.money_server += this.serverBet-this.playerBet;\n }\n }\n else{\n \n this.money_player += this.playerBet;\n this.money_server += this.serverBet;\n }\n this.playerBet = 0;\n this.serverBet = 0;\n this.state = -1;\n return \"show\"+this.serverH.toString();\n }", "boolean isWinner(GameState state, String username) throws GameStateException;", "private boolean neuerBahnhof(int x, int y) {\n if (geld - getPreisBhf() >= getMaxMinus() && bahnhoefe[y][x] == null && x > 0 && y > 0 && x < teile[0].length && y < teile.length && bhfNamen.size() > 0) {\n String name = bhfNamen.remove((int) Math.round(Math.random() * (bhfNamen.size() - 1)));\n intNeuerBahnhof(x, y, name);\n geld = geld - getPreisBhf();\n ticker.neueNachricht(\"Bahnhof \" + name + \" wurde feierlich eröffnet!\");\n return true;\n } else {\n return false;\n }\n\n }", "void checkWinner() {\n\t}", "public void godNotAdded() {\n notifyGodNotAdded(this.getCurrentTurn().getCurrentPlayer().getNickname());\n }", "private String tallenna() {\n Dialogs.showMessageDialog(\"Tallennetaan!\");\n try {\n paivakirja.tallenna();\n return null;\n } catch (SailoException ex) {\n Dialogs.showMessageDialog(\"Tallennuksessa ongelmia!\" + ex.getMessage());\n return ex.getMessage();\n }\n }", "protected boolean processKibitz(String username, String titles, int rating, int gameNumber, String message){return false;}", "public void resign(){\n\t\tint turn = DBCommunicator.requestInt(\"SELECT id FROM beurt WHERE spel_id = \" + id + \" AND account_naam = '\" + app.getCurrentAccount().getUsername() + \"' ORDER BY id DESC\");\n\t\tturn += 2;\n\t\tint totalScore = DBCommunicator.requestInt(\"SELECT totaalscore FROM score WHERE spel_id = \" + id + \" AND account_naam = '\" + app.getCurrentAccount().getUsername() + \"'\");\n\t\ttotalScore = totalScore * -1;\n\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) VALUES(\" + turn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"', \" + totalScore +\", 'Resign')\");\n\t\tfor(int e : gameStones){\n\t\t\tDBCommunicator.writeData(\"INSERT INTO letterbakjeletter (spel_id, letter_id, beurt_id) VALUES (\" + id + \", \" + e + \", \" + turn + \")\");\n\t\t}\n\t\tDBCommunicator.writeData(\"UPDATE spel SET toestand_type = 'Resigned' WHERE id = \" + id );\n\t\t\n\t\tint opTurn = turn + 1;\n\t\tint myTurn = opTurn + 1;\n\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) VALUES \"\n\t\t\t\t+ \"(\" + opTurn + \", \" + id + \", '\" + opponent + \"', 0, 'End'),\"\n\t\t\t\t+ \"(\" + myTurn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"', 0, 'End')\");\n\t}", "public int getNickel () {\n return NNickel;\n }", "public int enAttente() {\n\t\treturn nbmsg;\n\t}", "public Melding hentMelding(){\n laas.lock();\n try{\n while(meldingerKrypterte.stoerrelse() == 0){\n if(antallTelegrafister == 0){\n return null;\n }\n signal.await();\n }\n return meldingerKrypterte.fjern(0);\n }\n catch(InterruptedException e){\n return null;\n }\n finally{\n laas.unlock();\n }\n }", "private static Score4MoveType winnerDecission(int opponentPawns, int mePawns) {\n\t\tif (opponentPawns == mePawns && opponentPawns > 0) {\n\t\t\treturn Score4MoveType.DRAW;\n\t\t}\n\t\tif (opponentPawns > mePawns) {\n\t\t\treturn Score4MoveType.LOST;\n\t\t}\n\t\tif (opponentPawns < mePawns) {\n\t\t\treturn Score4MoveType.WON;\n\t\t}\n\t\treturn null;\n\t}", "public int getWinner() {return winner();}", "public synchronized void remind() {\n if (state != State.REGISTRATION && state != State.WAITING_TO_START) {\n sendPublicMessage(\"Round \" + pickTeamState.getSituation().getRoundNumber() +\n \" of 5\\n\" +\n pickTeamState.getSituation().getMissionSuccess() + \" successes | \" +\n pickTeamState.getSituation().getMissionFails() + \" fails\\n\" +\n \"The leader rotation is \" + GameMessageUtil.listOrder(getPlayerCharacters()) + \"\\n*\" +\n pickTeamState.getSituation().getLeader().getUserName() + \"* is the leader.\\n\\n\" +\n lastMessage);\n }\n }", "private void stadtteileNeuZuordnen() {\n Bahnhof[] b = getBahnhofListe();\n for (int i = 0; i < bhfs; i++) {\n if (b[i] != null) {\n int minX = b[i].getX() - 4;\n int minY = b[i].getY() - 4;\n int maxX = b[i].getX() + 3;\n int maxY = b[i].getY() + 3;\n for (int h_y = minY; h_y <= maxY; h_y++) {\n for (int h_x = minX; h_x <= maxX; h_x++) {\n if (!(h_y < 0) && !(h_x < 0) && !(h_y > teile.length - 1) && !(h_x > teile[h_y].length - 1)) {\n if (!(h_x == minX && h_y == minY) && !(h_x == maxX && h_y == minY) && !(h_x == minX && h_y == maxY) && !(h_x == maxX && h_y == maxY)) {\n if (!hatBahnhof[h_y][h_x] && teile[h_y][h_x] != null) {\n hatBahnhof[h_y][h_x] = true;\n b[i].stadtteilHinzufuegen(teile[h_y][h_x]);\n }\n }\n }\n }\n }\n }\n }\n }", "private void ChatNachricht() {\n\t\t//Kein leerer Text\n\t\tif (this.chatSendenArea.getText() != null) {\n\t\t\ttry {\n\t\t\t\tserver.sendChatMessage(\"Spieler \" + this.spielerNummer + \":\"\n\t\t\t\t\t\t+ this.chatSendenArea.getText());\n\t\t\t\tthis.chatSendenArea.setText(\"\");\n\t\t\t} catch (RemoteException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void tellPlayerResult(int winner) {\n\t}", "public static void win()\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\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}", "private void win(int winner)\n {\n switch (winner) {\n case PLAYER_1_FLAG:\n player1.gameOver(RESULT_WIN);\n player2.gameOver(RESULT_LOSS);\n winSend.close();\n break;\n case PLAYER_2_FLAG:\n player1.gameOver(RESULT_LOSS);\n player2.gameOver(RESULT_WIN);\n \n winSend.close();\n break;\n }\n }", "@POST\r\n\t@Path(\"/einloggen\")\r\n\t// Validates the login data to make sure there is one user with this data\r\n\t// registered or if the user has a cookie with the login data\r\n\tpublic Response einloggen(@FormParam(\"vn\") String vorname, @FormParam(\"nn\") String nachname,\r\n\t\t\t@CookieParam(\"LoginData\") String logindata) throws Exception {\n\t\tif (logedIn(logindata) || logedIn(vorname + \"-\" + nachname)) {\r\n\t\t\tlogindata = vorname + \"-\" + nachname;\r\n\t\t\tif (logindata.split(\"-\")[0].equals(\"Seven\") && logindata.split(\"-\")[1].equals(\"t\")) {\r\n\t\t\t\tResponseBuilder rb = Response.seeOther(new URI(\"/FerienWohnungVerwaltung/AdminInterface\"));\r\n\t\t\t\tNewCookie user = new NewCookie(\"LoginData\", vorname + \"-\" + nachname + \"-\" + \"true\");\r\n\t\t\t\tResponse r = rb.cookie(user).build();\r\n\t\t\t\treturn r;\r\n\t\t\t} else {\r\n\t\t\t\tResponseBuilder rb = Response.seeOther(new URI(\"/FerienWohnungVerwaltung\"));\r\n\t\t\t\tNewCookie user = new NewCookie(\"LoginData\", vorname + \"-\" + nachname + \"-\" + \"true\");\r\n\t\t\t\tResponse r = rb.cookie(user).build();\r\n\t\t\t\treturn r;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tResponseBuilder rb = Response.seeOther(new URI(\"/FerienWohnungVerwaltung/forbidden\"));\r\n\t\t\tResponse r = rb.build();\r\n\t\t\treturn r;\r\n\t\t}\r\n\t}", "public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public void verSesionCandidato(Candidato actualcandidat)\r\n\t{\r\n\t\tSesion sesio = new Sesion();\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tString fechasesion = calendario.get(Calendar.YEAR)+\"-\"+(calendario.get(Calendar.MONTH)+1)+\"-\"+calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString horainicial = calendario.get(Calendar.HOUR_OF_DAY)+\":\"+calendario.get(Calendar.MINUTE)+\":\"+calendario.get(Calendar.SECOND);\r\n\t\tsesio.setFechasesion(fechasesion);\r\n\t\tsesio.setHorainicial(horainicial);\r\n\t\tsesio.setHorafinal(\"NULL\");\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tSesionBD.insertar(sesio, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tSesion sesioningr = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tsesioningr = SesionBD.buscarFechaHora(fechasesion, horainicial, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(sesioningr != null)\r\n\t\t{\r\n\t\t\tSesionCandidato nuevasesion = new SesionCandidato();\r\n\t\t\tnuevasesion.setIdsesion(sesioningr.getIdsesion());\r\n\t\t\tnuevasesion.setIdcandidato(actualcandidat.getIdcandidato());\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conector = new Conector();\r\n\t\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\t\tSesionCandidatoBD.insertar(nuevasesion, conector);\r\n\t\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tsesioncandidato = new SesionCandidatoI(this, actualcandidat, sesioningr);\r\n\t\t\t\tsesioncandidato.setVisible(true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void checkForKnockout()\n\t{\n\t\tif (playerOneHealth <= 0 && opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(playerOneName + \" and \" + opponentName + \" both go down for the count!\");\n\t\t\t\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" and \" + opponentName + \" knocked each other out at the same time.\\nWhat a weird ending!!!\");\n\t\t}\n\t\n\t\t// Check if Player One Lost\n\t\telse if (playerOneHealth <= 0)\n\t\t{\n\t\t\t// Prints one to ten because player one is knocked out\n\t\t\tSystem.out.println(playerOneName + \" is down for the count!\");\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" was knocked out, and \" + opponentName + \" still had \" + opponentHealth + \" health left. \\nBetter luck next time player one!!!\");\n\t\t}\n\t\n\t\t// Check if Player Two Lost\n\t\telse if (opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(opponentName + \" is down for the count!\");\n\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif(i < 6)System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!! \\n\" + opponentName + \" was knocked out, and \" + playerOneName + \" still had \" + playerOneHealth + \" health left.\\nCONGRATULATIONS PLAYER ONE!!!\");\n\t\t}\n\t}", "public void checkWin(){\n boolean result = false;\n if(game.getTurn() > 3){\n Player currentPlayer = game.getPlayerTurn();\n int playernumber = currentPlayer.getPlayericon();\n result = game.winChecker(game.getBored(),playernumber);\n if(result == true) {\n setWinMsgBox(currentPlayer.getPlayerName() + \" Is victorious :)\",\"WIN\");\n }else if(game.getTurn() == 8 && result == false){\n setWinMsgBox(\"Too bad it is a draw, No one out smarted the other -_-\",\"DRAW\");\n }else{}\n }else{\n result = false;\n }\n }", "public int our_packetsLost(){ //For a group call, should take an input ID, should be UPDATED\n return this.our_packs_lost;\n }", "public void getBet(int[] turnData) {\n Player player = GameEngine.activePlayer;\n\n player.changeBank(turnData[5]-turnData[4]);\n String winLose, loseMessage = \"\", fMessage = \"\";\n if(turnData[5]-turnData[4] > 0) {\n winLose = \"You won \" + turnData[5] + \" points and your score is now \";\n fMessage = \"You guessed \" + turnData[2] + \" and \" + turnData[3] + \" and you were right!\";\n }\n else if (turnData[5]-turnData[4] < 0){\n winLose = \"You lost \" + turnData[4] + \" points and your score is now \";\n loseMessage = \"Better luck next time!\";\n fMessage = \"You guessed \" + turnData[2] + \" and \" + turnData[3] + \" and the right answer is:\";\n } else {\n winLose = \"You didn't bet anything! Your score is now \";\n fMessage = \"You guessed \" + turnData[2] + \" and \" + turnData[3] + \" and the right answer is:\";\n }\n\n String[] myMessage = new String[5];\n myMessage[0] = fMessage;\n myMessage[1] = winLose + player.getBank() + \".\";\n myMessage[2] = loseMessage;\n myMessage[3] = \"\" + turnData[0];\n myMessage[4] = \"\" + turnData[1];\n\n GameMain.userInterface.setTurnMessage(myMessage);\n\n }", "private String notFound() {\n\t\tquestionBot.put(owner.id(), \"Desculpe, não entendi sua resposta\");\n\t\treturn buildMessage(questionBot.get(owner.id()));\n\t}", "int getLastUpdatedTurn();", "public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) > highest){\r\n highest = getPlayerPoints(player);\r\n winner = player.getID();\r\n }\r\n \r\n }\r\n \r\n return winner;\r\n }", "public int wuerfeln() {\n\t\tletzterWurf = Wuerfel.werfen();\n\t\thatBereitsGewuerfelt = true;\n\t\treturn (letzterWurf);\n\t}", "@Override\n\tpublic void onGameOver(ReadOnlyBoard board, Counter winner) {\n\n\t}", "public int getUserWonNumber() {\n\t\tint result = -1;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT count(id) FROM tp.gamerecord WHERE winner = (SELECT id FROM tp.player WHERE isAI = false)\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tresult = rs.getInt(1);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\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 abstract boolean kickPlayerOutOfTheGame(int game_id, String username) throws SQLException;", "public void finalResult() {\n ConnectionSockets.getInstance().sendMessage(Integer.toString(points)+\"\\n\");\n System.out.println(\"escreveu para o oponente\");\n opponentPoints = Integer.parseInt(ConnectionSockets.getInstance().receiveMessage());\n System.out.println(\"leu do oponente\");\n if(points != opponentPoints) {\n if (points > opponentPoints) {// Won\n MatchController.getInstance().getSets().add(1);\n MatchController.getInstance().increaseSet();\n } else { //Lost\n MatchController.getInstance().getSets().add(0);\n MatchController.getInstance().increaseSet();\n }\n }\n }", "private void checkForGameOver() {\n\t\t// if 11 rounds are over, calculate winner\n\t\tif (round == 12) {\n\t\t\tif (player1.getPoints() > player2.getPoints()) {\n\t\t\t\ttextAreaInstructions.setText(\"Game Over!! Player 1 wins!!\");\n\t\t\t} else {\n\t\t\t\ttextAreaInstructions.setText(\"Game Over!! Player 2 Wins!!\");\n\t\t\t}\n\t\t\tround = 1;\n\t\t\ttextFieldRound.setText(\"1\");\n\t\t\ttextFieldPlayerOneScore.setText(\"0\");\n\t\t\ttextFieldPlayerTwoScore.setText(\"0\");\n\t\t\tplayer1.setPoints(0);\n\t\t\tplayer2.setPoints(0);\n\t\t}\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 void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\t\tif(player.getLifes() == 0){\n\t\t\t\tSystem.out.println(\"Spieler 2 gewinnt!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Spieler 1 gewinnt!\");\n\t\t\t}\n\t\t\n\t\t}\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 0;\n\t\tpaintMenu();\n\t}", "@Override\r\n\tpublic void showWithdrawMessage(String playerName, int amount) {\r\n\t\tString s1 = reader.getElement(\"withdraw\", 0);\r\n\t\tString s2 = reader.getElement(\"withdraw\", 1);\r\n\t\tString msg = playerName + \": \" + s1 + \" \" + amount + \" \" + s2;\t\t\r\n\t\tGUI.showMessage(msg);\r\n\t}", "private void handlePlayerConnect(Player player) {\n server.runTaskLater(() -> server.getPaymentLog().checkPendingAccepts(player), 1500, TimeUnit.MILLISECONDS);\n\n if (player.hasPermission(Rank.ADMIN)) {\n server.runTaskLater(() -> server.getDataSource().getCollection(\"archon\", \"dailytop\").count((result, t) -> {\n if (result == null) {\n result = 0L;\n }\n\n List<String> msg = new ArrayList<>();\n msg.add(\"&8\" + Message.BAR);\n msg.add(\"&6[&c&lArchon&6] &aProxy \" + player.getProxy().getId() + \" &7[\" + player.getRegion().name() + \" Network]\");\n msg.add(\"\");\n msg.add(\"&e[Today]\");\n int mostOnlineToday = server.getCache().getCurrentMostOnline();\n int uniqueLoginsToday = (int) (long) result;\n int newPlayersToday = server.getCache().getCurrentNewPlayers();\n\n try (Connection conn = server.getDataSource().getConnection();\n Statement stmt = conn.createStatement()) {\n // 1-day stats\n try (ResultSet rs = stmt.executeQuery(\"SELECT most_online, unique_logins, new_players FROM dailytop WHERE date = (SELECT MAX(date) FROM dailytop)\")) {\n if (rs.next()) {\n int mostOnlineYesterday = rs.getInt(\"most_online\");\n int uniqueLoginsYesterday = rs.getInt(\"unique_logins\");\n int newPlayersYesterday = rs.getInt(\"new_players\");\n\n double mostOnlineChange = Util.getPercentageChange(mostOnlineYesterday, mostOnlineToday);\n String disp = (mostOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(mostOnlineChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6Most Online: &d\" + Util.addCommas(mostOnlineToday) + \" \" + disp);\n\n double uniqueLoginsChange = Util.getPercentageChange(uniqueLoginsYesterday, uniqueLoginsToday);\n disp = (uniqueLoginsChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(uniqueLoginsChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6Unique Logins: &d\" + Util.addCommas(uniqueLoginsToday) + \" \" + disp);\n\n double newPlayersChange = Util.getPercentageChange(newPlayersYesterday, newPlayersToday);\n disp = (newPlayersChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(newPlayersChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6New Players: &d\" + Util.addCommas(newPlayersToday) + \" \" + disp);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n ZonedDateTime time = ZonedDateTime.now(ZoneId.of(\"America/Los_Angeles\"));\n msg.add(\"&e[From yesterday at this hour: \" + time.format(DateTimeFormatter.ofPattern(\"h a\")) + \" \" + time.getZone().getDisplayName(TextStyle.FULL, Locale.ENGLISH) + \"]\");\n // prev day (same hour) stats\n try (ResultSet rs = stmt.executeQuery(\"SELECT online, most_online, unique_logins, new_players FROM daily_stats WHERE DATE(time) = DATE(SUBDATE(UTC_TIMESTAMP, 1)) && HOUR(time) = HOUR(UTC_TIMESTAMP) LIMIT 1;\")) {\n if (rs.next()) {\n int onlineYesterday = rs.getInt(\"online\");\n int mostOnlineYesterday = rs.getInt(\"most_online\");\n int uniqueLoginsYesterday = rs.getInt(\"unique_logins\");\n int newPlayersYesterday = rs.getInt(\"new_players\");\n\n double currentOnlineChange = Util.getPercentageChange(onlineYesterday, server.getOnlineCount());\n String disp = (currentOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(currentOnlineChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Online: &b\" + Util.addCommas(onlineYesterday) + \" \" + disp);\n\n double mostOnlineChange = Util.getPercentageChange(mostOnlineYesterday, mostOnlineToday);\n disp = (mostOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(mostOnlineChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Most Online: &b\" + Util.addCommas(mostOnlineYesterday) + \" \" + disp);\n\n double uniqueLoginsChange = Util.getPercentageChange(uniqueLoginsYesterday, uniqueLoginsToday);\n disp = (uniqueLoginsChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(uniqueLoginsChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Unique Logins: &b\" + Util.addCommas(uniqueLoginsYesterday) + \" \" + disp);\n\n double newPlayersChange = Util.getPercentageChange(newPlayersYesterday, newPlayersToday);\n disp = (newPlayersChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(newPlayersChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3New Players: &b\" + Util.addCommas(newPlayersYesterday) + \" \" + disp);\n } else {\n msg.add(\"&7&oNo data to display from this time.\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n msg.add(\"&8\" + Message.BAR);\n\n try (ResultSet rs = stmt.executeQuery(\"SELECT (SELECT COUNT(*) FROM votes) AS total, COUNT(*) AS today FROM votes WHERE DATE(time) = CURDATE();\")) {\n if (rs.next()) {\n msg.add(\"&aVotes Today: &7\" + Util.addCommas(rs.getInt(\"today\"))\n + \"&a, Total Votes: &7\" + Util.addCommas(rs.getInt(\"total\")) + \" (\" + Util.humanReadableNumber(rs.getInt(\"total\")) + \")\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n player.message(msg);\n }), 1, TimeUnit.SECONDS);\n }\n }", "@Override\n // Methode run die bei Aufruf des Threads gestartet wird\n public void run() {\n //Endlosschleife zum abhören was der Server sedent. Neuen InputStream erzeugen und in Anzeigefenster ausgeben\n while(schleife == 1){\n \n try {\n // Methode online gibt die Nutzernamen der online-verfügabaren Usern zurück vom Server. Die eigene Methode schriebt diese in die UserListe. \n online(remote.online());\n in = new DataInputStream(s.getInputStream());\n\n String lesen = in.readUTF();\n \n\n // Trennt den Einkommenden String am \":\" um Username von der Nachricht zu trennen\n String [] nachrichten = lesen.split(\":\");\n \n //Überprüfen ob ein Header namens VERBINDUNG geschickt wird um entsprechend zu reagieren\n if(nachrichten[0].equals(\"VERBINDUNG\")){\n //Aufruf einer MessageBox, dass Verbindung aufgenommen werden möchte.\n int eingabe = JOptionPane.showConfirmDialog(null,\n \"Wollen sie eine Verbindung mit \" + nachrichten[1] +\" aufbauen?\",\n \"Verbindungsanfrage\",\n JOptionPane.YES_NO_CANCEL_OPTION);\n //Überprüfen der Eingabe in die Messagebox\n //Wenn 'Ja' gedrückt wurde\n if(eingabe == 0){\n //UserListe sperren\n UserListe.setEnabled(false);\n //Verbinden mit User- Button auf trennen stellen\n UserVerbinden.setText(\"Trennen von User\");\n //Offline Anzeigen um weitere Anfragen zu unterbinden\n remote.zeigeOff(UserName.getText());\n //Rückantwort,dass Verbindung aufgebaut werden soll!\n remote.verbindenUser(\"VERBINDEN\", UserName.getText(), nachrichten[1]);\n //Übergabe des Namens des Chat-Partners in die globale Variable \n ZielUser= nachrichten[1];\n \n }else{\n remote.verbindenUser(\"TRENNEN\", UserName.getText() ,nachrichten[1] );\n \n } \n //Wenn die Nachricht den Header 'TRENNEN' enthält, entweder bei beendigung oder bei ablehnen der Verbindung\n }else if(nachrichten[0].equals(\"TRENNEN\")){\n //Nachricht ausgeben, dass getrennt wird bzw. abgelehnt wurde\n Anzeigefeld.append(\"Verbindung von \"+ nachrichten[1]+ \" wurde getrennt/abgelehnt! \\n\");\n //UserListe entsperren\n UserListe.setEnabled(true);\n //Verbinden mit User- Button auf Verbinden stellen\n UserVerbinden.setText(\"Verbinden mit User\");\n //wieder als online Anzeigen \n remote.verbinden(UserName.getText());\n \n //wird aufgerufen wenn VERBINDEN als Header mitgegeben wird\n }else if(nachrichten[0].equals(\"VERBINDEN\")){\n //Ausgabe dass Schlüsselaustausch stattfinden kann\n Anzeigefeld.append(\"Schlüssel wird an \"+nachrichten[1]+ \" gesendet \\n\");\n\n //Den eigenen AES Schlüssel mit öffentlichem Schlüssel des Gegenübers verschlüsseln\n EncryptAES(nachrichten[1]);\n \n //Aufruf der Methode zum Schlüsselaustausch. Überträgt byte[] des Schlüssels\n AESanServer(nachrichten[1]); \n \n //wird aufgerufen wenn der Header KEY mitgegeben wird.\n }else if(nachrichten[0].equals(\"KEY\")){\n \n // Aufruf der Methode Decrypt AES mit der Methode vom Server holeAES\n DecryptAES(remote.schluesselTausch(UserName.getText(), nachrichten[1]));\n \n //Senden-Button freigeben\n Senden.setEnabled(true);\n \n // Anzeigen, das Schlüssel erhalten wurde und Kommunikation starten kann\n Anzeigefeld.append(\"Key von \"+ nachrichten[1] +\" erhalten. Kommunikation kann starten! \\n\");\n \n \n\n \n }\n \n \n // Gibt die Nachricht die verschlüsselt vom Server kommt, entschlüsselt aus!\n Anzeigefeld.append(nachrichten[0] + \": \"+ aes.entschlüsseln(aes.SchlüsselAusDatei(), nachrichten[1])+ \"\\n\");\n\n } catch (IOException ex) {\n Logger.getLogger(ClientGui.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(ClientGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n}", "public String Winner() {\r\n if(Main.player1.SuaVida()==0)\r\n return \"player2\";\r\n else\r\n return \"player1\";\r\n }", "@EventHandler(priority = EventPriority.LOWEST)\n\tpublic void tooManyLoggedInAccounts(PlayerLoginEvent event){ // Set to join because if kicked on login ip info isnt tracked.\n\t\tUUID name = event.getPlayer().getUniqueId();\n\t\tint count = 0;\n\t\tint allowed = plugin.getConfig().getInt(\"banmanager.set.altlimit\");\n\t\tif (allowed == 0) return;\n\t\tList<UUID> alts = am.getAltsListUUID(name);\n\t\tPlayer[] players = Bukkit.getOnlinePlayers();\n\t\tfor (Player p: players)\n\t\t\tif(alts.contains(p.getUniqueId())) count++;\n\t\t\n\t\tif (count > allowed){\n\t\t\tString reason = plugin.getConfig().getString(\"banmanager.set.altlimitreason\");\n\t\t\tevent.setKickMessage(reason);\n\t\t\tevent.setResult(Result.KICK_BANNED);\n\t\t}\n\t}", "public void win() {\n displayErrorMessage(\"You Win!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n }\n else\n controller.switchToLobby();\n }", "public static opCode loginUser()\n {\n opCode answerCode;\n\n clientSocketChannel = openConnection(Utils.CLIENT_PORT);\n\n if(clientSocketChannel == null)\n answerCode = opCode.OP_FAIL;\n else\n {\n //effettuo la richiesta di login\n Operation request = new Operation(username);\n request.setPassword(password);\n request.setCode(opCode.LOGIN);\n\n sendReq(clientSocketChannel,request);\n answerCode = getAnswer();\n\n //se il login è andato a buon fine, inizializzo il thread per ricevere gli inviti\n if(answerCode == opCode.OP_OK)\n {\n // apro un nuovo socket per ricevere gli inviti\n inviteSocketChannel = openConnection(Utils.CLIENT_PORT);\n if(inviteSocketChannel == null)\n {\n //in caso di errore chiudo tutte le socket\n try {clientSocketChannel.close();}\n catch (IOException e) {e.printStackTrace();}\n return opCode.OP_FAIL;\n }\n\n request.setCode(opCode.SET_INVITATION_SOCK);\n sendReq(inviteSocketChannel, request);\n\n //creo il thread per la ricezione degli inviti\n inviteThread = new Thread(new InviteTask(inviteSocketChannel));\n inviteThread.start();\n\n //richiedo e scarico la lista di eventuali inviti ricevuti mentre ero offline\n request.setCode(opCode.PENDING_INVITATIONS);\n sendReq(clientSocketChannel,request);\n\n try\n {\n pendingInvitations = (ArrayList<Message>) Utils.recvObject(clientSocketChannel);\n\n if(pendingInvitations == null)\n throw new NullPointerException();\n\n //esito dell'operazione di login\n answerCode = getAnswer();\n }\n catch(ClassNotFoundException | IOException | NullPointerException e)\n {\n System.err.println(\"Error in downloading pending invites\");\n answerCode = opCode.OP_FAIL;\n }\n }\n }\n return answerCode;\n }", "public void otherChess()\n {\n // Receive the column from the other player\n int col = theClient.recvInt();\n int row;\n // Find the unoccupied row from bottom to up to put the chess on\n for (row = ROWS - 1; row >= 0; row-- )\n {\n if (chessBoard[row][col] == 0)\n {\n break;\n }\n }\n // Put the chess from the other player on the board\n chessBoard[row][col] = other;\n grid[row][col].setIcon(new ImageIcon(otherURL));\n // If the column is full, disable the corresponding button\n if (row == 0)\n {\n drop[col].setEnabled(false);\n }\n // Check whether the other player wins.\n // If the other player wins, show the message dialog and tell the player\n // \"You lose\".\n // Then exit the system, terminate the game.\n if (win(row, col, other))\n {\n out.println(\"Lose.\");\n JOptionPane.showMessageDialog(null, \"You lose.\");\n System.exit(0);\n }\n // Else if the chess board is full, tie\n // Show the message dialog and tell the player \"Tie\".\n // Then exit the system, terminate the game.\n else if (full())\n {\n out.println(\"Tie.\");\n JOptionPane.showMessageDialog(null, \"Tie.\");\n System.exit(0);\n }\n }", "public int zugBerechnen(int gegnerZug){\n\t\t\n\t\tsetzeGegnerStein(gegnerZug);\n\t\t\n\t\tif(gegnerZug == -1){\n\t\t\thatAngefangen = eigenerStein;\n\t\t\tsetzeEigenenStein(3);\n\t\t\treturn 3;\n\t\t}\n\t\t\n\t\tkeineZuegeMehr();\n\t\t\n\t\tint spalte = (int)(Math.random()*6);\n\t\t\n\t\tfor(int i=0; i < moeglicheZuege.length; i++){\n\t\t\tspalte = (i+spalte)%7;\n\t\t\tif(siegMuster(spalte, moeglicheZuege[spalte]) && moeglicheZuege[spalte] < 6){\n\t\t\t\tsetzeEigenenStein(spalte);\n\t\t\t\treturn spalte;\n\t\t\t}\n\t\t}\n/*\t\n\t\tfor(int i=0; i < moeglicheZuege.length; i++){\n\t\t\tspalte = (i+spalte)%7;\n\t\t\tif(gegnerSiegMuster(spalte, moeglicheZuege[spalte]) && moeglicheZuege[spalte] < 6){\n\t\t\t\tsetzeEigenenStein(spalte);\n\t\t\t\treturn spalte;\n\t\t\t}\n\t\t}\n*/\t\t\n\t\tfor(int i = 0; i < moeglicheZuege.length; i++){\n\t\t\tspalte = (i+spalte)%7;\n\t\t\tif(moeglicheZuege[spalte] < 6){\n\t\t\t\tsetzeEigenenStein(spalte);\n\t\t\t\treturn spalte;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1; //Kein Spielzug mehr moeglich\n\t}", "private void receiveVote() {\n\t\t//Se la postazione termina la connessione informiamo lo staff con un messaggio di errore\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"La postazione \"+ ip.getHostAddress() + \" non ha inviato i pacchetti di voto.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Vengono recuperati i voti cifrati\n\t\tMessage request;\n\t\tWrittenBallot[] encryptedBallots;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"postazione \" + ip.getHostAddress());\n\t\t\tString[] required = {\"encryptedBallots\"};\n\t\t\tClass<?>[] types = {WrittenBallot[].class};\n\t\t\t\n\t\t\trequest.verifyMessage(Protocol.sendVoteToStation, required, types, \"postazione \" + ip.getHostAddress());\n\t\t\tencryptedBallots = request.getElement(\"encryptedBallots\");\n\t\t\t\n\t\t\t//I voti vengono memorizzati nel seggio in attesa dell'invio all'urna\n\t\t\tif(((Controller) controller).storeVoteLocally(encryptedBallots, ip))\n\t\t\t\tlink.write(Protocol.votesReceivedAck);\n\t\t\telse\n\t\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\tcontroller.printError(e);\n\t\t}\n\t}", "public String imprime() {\r\n\t\tstatus = \"=== Central P2-CG ===\" + quebraLinha;\r\n\t\tfor (Usuario usuario : loja.getUsuarios()) {\r\n\t\t\tstatus+= usuario.getLogin()+ quebraLinha;\r\n\t\t\tstatus+= usuario.getNome() + quebraLinha;\r\n\t\t\tstatus+= \"Jogador \" + usuario.tipoJogador()\r\n\t\t\t\t\t+ \": \" + usuario.getPontos() + \" x2p\" + quebraLinha;\r\n\t\t\t\r\n\t\t\tstatus+= \"Lista de Jogos:\"+ quebraLinha;\r\n\t\t\tfor (Jogo jogo : usuario.getJogos()) {\r\n\t\t\t\tstatus+= \"+\" + jogo.getNome() + \" - \"\r\n\t\t\t\t\t\t+ jogo.getClass().getSimpleName() + \":\" + quebraLinha;\r\n\t\t\t\tstatus+= \"===> Jogou \" + jogo.getVezesjogadas()\r\n\t\t\t\t\t\t+ \" vez(es)\"+ quebraLinha;\r\n\t\t\t\tstatus+= \"===> Zerou \" + jogo.getZerajogo()\r\n\t\t\t\t\t\t+ \" vez(es)\"+ quebraLinha;\r\n\t\t\t\tstatus+= \"===> Maior Score \" + jogo.getScore()+ quebraLinha;\r\n\t\t\t\tstatus+= quebraLinha;\r\n\r\n\t\t\t}\r\n\t\t\tdesconto += usuario.getDesconto();\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\tstatus+= \"Total de preco dos jogos: R$ \" + valorTotal + quebraLinha;\r\n\t\tstatus+= \"---------------------------------------------\"+quebraLinha;\r\n\t\tstatus+= \"Total arrecadado com vendas de jogos:\" + desconto + quebraLinha;\r\n\t\tstatus+= quebraLinha;\r\n\t\tdesconto = 0;\r\n\t\treturn status;\r\n\t}", "private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "private void popUpWin(String whoWon) {\r\n\t\tJOptionPane.showMessageDialog(gameView, \"Congrats \" + whoWon + \" WINS! Go to the Options Pane to start a New Game!\", \"WIN!\",\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t}", "@Override\r\n\tpublic void OnRandChatInvite(long tempid, long roomid, String uniqueid) {\n\t\tNotitfyRandChat(String.valueOf(tempid),uniqueid,String.valueOf(roomid));\r\n\t}", "public void logGameWinner(Player p){\n\t\t\n\t\tif(p instanceof HumanPlayer) {\n\t\t\tlog += String.format(\"%nUSER WINS GAME\");\n\t\t\twinName =\"Human\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s WINS GAME\", ai.getName().toUpperCase());\n\t\t\twinName = ai.getName();\n\t\t}\n\t\tlineBreak();\n\t}", "String getWinner();", "private void adjustWinnerError(GNode winner) {\n\n }", "public void sendLogin() {\n WsMessage.LoginMsg_Req loginMsg_req = new WsMessage.LoginMsg_Req();\n loginMsg_req.token = Util.getMConfig(NTVDefine.KEY_MCONF_GAME_TICKET);\n loginMsg_req.userid = Util.getMConfig(NTVDefine.KEY_MCONF_GAME_OPENID);\n loginMsg_req.username = Util.getMConfig(NTVDefine.KEY_MCONF_GAME_USERNAME);\n loginMsg_req.usericon = \"\";\n loginMsg_req.biz = getBizByGameid(Util.getMConfig(NTVDefine.KEY_MCONF_GAME_GAMEID));\n loginMsg_req.env = Util.getString(NTVDefine.KCONF_STRING_CHAT_ENV);\n loginMsg_req.chatid = this.chatid;\n this.wsManager.sendMessage(loginMsg_req.type, loginMsg_req.toString());\n }", "public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}", "public String getWinner(){\n if(whiteWins && blackWins){\n return \"ITS A DRAW\";\n } else if(whiteWins){\n return \"WHITE WINS\";\n } else if(blackWins){\n return \"BLACK WINS\";\n } else {\n return \"NO WINNER\";\n }\n }", "@Override\r\n public void sendClientGame(ClientGame clientGame) {\r\n\r\n //System.out.println(\"Invio \"+clientGame+clientGame.getReserve()+\" a \"+username);\r\n ClientGameNetObject clientGameNetObject = new ClientGameNetObject(MessageHeaderEnum.CLIENTGAME.toString(),clientGame);\r\n //System.out.println(clientGameNetObject+\" : \"+clientGameNetObject.getClientGame().getReserve()+\" : \"+clientGame.getActivePlayerUsername());\r\n sendObject(clientGameNetObject);\r\n }", "public static Player whoLostGame() {\r\n\t\tint lowest = Main.loseScoreNumb;\r\n\t\tPlayer loser = null;\r\n\t\t\r\n\t\t\r\n\t\t//Three handed play.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\tloser = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\tloser = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\tloser = Main.playerThree;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Four handed play with no teams.\r\n\t\tif (Main.isFourHandedSingle){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\tloser = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\tloser = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\tloser = Main.playerThree;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player4Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player4Score);\r\n\t\t\t\tloser = Main.playerFour;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn loser;\r\n\t}", "public int checkForWinner() {\n\n // Check horizontal wins\n for (int i = 0; i <= 6; i += 3)\t{\n if (mBoard[i] == HUMAN_PLAYER &&\n mBoard[i+1] == HUMAN_PLAYER &&\n mBoard[i+2]== HUMAN_PLAYER)\n return 2;\n if (mBoard[i] == COMPUTER_PLAYER &&\n mBoard[i+1]== COMPUTER_PLAYER &&\n mBoard[i+2] == COMPUTER_PLAYER)\n return 3;\n }\n\n // Check vertical wins\n for (int i = 0; i <= 2; i++) {\n if (mBoard[i] == HUMAN_PLAYER &&\n mBoard[i+3] == HUMAN_PLAYER &&\n mBoard[i+6]== HUMAN_PLAYER)\n return 2;\n if (mBoard[i] == COMPUTER_PLAYER &&\n mBoard[i+3] == COMPUTER_PLAYER &&\n mBoard[i+6]== COMPUTER_PLAYER)\n return 3;\n }\n\n // Check for diagonal wins\n if ((mBoard[0] == HUMAN_PLAYER &&\n mBoard[4] == HUMAN_PLAYER &&\n mBoard[8] == HUMAN_PLAYER) ||\n (mBoard[2] == HUMAN_PLAYER &&\n mBoard[4] == HUMAN_PLAYER &&\n mBoard[6] == HUMAN_PLAYER))\n return 2;\n if ((mBoard[0] == COMPUTER_PLAYER &&\n mBoard[4] == COMPUTER_PLAYER &&\n mBoard[8] == COMPUTER_PLAYER) ||\n (mBoard[2] == COMPUTER_PLAYER &&\n mBoard[4] == COMPUTER_PLAYER &&\n mBoard[6] == COMPUTER_PLAYER))\n return 3;\n\n // Check for tie\n for (int i = 0; i < BOARD_SIZE; i++) {\n // If we find a number, then no one has won yet\n if (mBoard[i] != HUMAN_PLAYER && mBoard[i] != COMPUTER_PLAYER)\n return 0;\n }\n\n // If we make it through the previous loop, all places are taken, so it's a tie\n return 1;\n }", "private void gameLost() {\n\n stopTime();\n //reveal all mines\n for (int i = 0; i < minefield.getRows(); i++) {\n for (int j = 0; j < minefield.getCols(); j++) {\n if (minefield.getMinefield()[i][j].isMined()) {\n tileLabel[i][j].setIcon(mineIcon);\n }\n }\n }\n\n JFrame loseframe = new JFrame(\"Loser!\");\n JPanel losepanel = new JPanel();\n JLabel label = new JLabel(\"Game over, you stepped on a mine!\");\n JButton close = new JButton(\"Close\");\n JButton restart = new JButton(\"Restart\");\n\n close.addActionListener((ActionEvent e) -> {\n loseframe.dispose();\n });\n\n restart.addActionListener((ActionEvent e) -> {\n frame.dispose();\n loseframe.dispose();\n createNewGame(minefield.getRows(), minefield.getCols(), minefield.getMaxMines());\n });\n\n losepanel.add(label);\n losepanel.add(close);\n losepanel.add(restart);\n loseframe.add(losepanel);\n loseframe.setLocationRelativeTo(null);\n loseframe.setSize(240, 80);\n loseframe.setVisible(true);\n loseframe.setResizable(false);\n }", "public void sendVoteNotification() {\n\t\t\t\t\tWorld.sendWorldMessage(\"<img=5>[Vote Feed]: colorhere\" + getDisplayName() + \" </col>voted for\" + \n\t\t\t\t\t\t\t\t\t\t\t\"colorhere \"+ voteDisplayAmount +\" Vote Tickets!</col> \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"World votes are now at colorhere\"+ WorldVote.getVotes()+\"</col>.\", false);\t\n\t}", "public void announceWinner() {\r\n Piece winer;\r\n if (_board.piecesContiguous(_board.turn().opposite())) {\r\n winer = _board.turn().opposite();\r\n } else {\r\n winer = _board.turn();\r\n }\r\n if (winer == WP) {\r\n _command.announce(\"White wins.\", \"Game Over\");\r\n System.out.println(\"White wins.\");\r\n } else {\r\n _command.announce(\"Black wins.\", \"Game Over\");\r\n System.out.println(\"Black wins.\");\r\n }\r\n }", "public String messageRenvoyeeUI (int num){\r\n\t\t\r\n\t\tswitch(num){\r\n\t\t\tcase 5 : return \"-\\n\";\r\n\t\t\t\t\r\n\t\t\tcase 4 : return \"-\\n\";\r\n\t\t\t\r\n\t\t\tcase 3 : return \"-Echec de l'enregistrement des RDV\\n\";\r\n\t\t\t\r\n\t\t\tcase 2 : return \"-Enregistrement des RDV terminé\\n\";\r\n\t\t\t\r\n\t\t\tcase -1 : return \"-Un moniteur doit être selectionné pour le RDV surligné.\\n\";\r\n\t\t\t\r\n\t\t\tcase -2 : return \"-La durée du RDV surligné présente un format invalide pour son enregistrement.\\n\";\r\n\t\t\t\r\n\t\t\tcase -3 : return \"-L'horaire du RDV surligné présente un format invalide pour son enregistrement.\\n\";\r\n\t\t\t\r\n\t\t\tcase -4 : return \"-La date de RDV surligné ne peut pas être antérieur à la date actuelle\\n\";\r\n\t\t\t\r\n\t\t\tcase -5 : return \"-La date de RDV surligné présente un format invalide pour son enregistrement.\";\r\n\t\t\t\r\n\t\t\tcase -6 : return \"-L'horaire du RDV surligné est invalide : les heures sont compris entre \"+AUTO_ECOLE_OUVERTURE+\"h et \"+AUTO_ECOLE_FERMETURE+\"h\\n\";\r\n\t\t\t\r\n\t\t\tcase -7 : return \"-L'horaire du RDV surligné est invalide : les minutes sont compris entre 0 et 59.\\n\";\r\n\t\t\t\r\n\t\t\tcase -8 : return \"-Le RDV surligné est chevauché par un autre RDV.\\n\";\r\n\t\t\t\r\n\t\t\tcase -9 : return \"-\"+msgIntegriteMoniteur+\"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\treturn \"\";\r\n\t\t\r\n\t}", "@Override\n\tpublic String dohvatiKontakt() {\n\t\treturn \"Naziv tvrtke: \" + naziv + \", mail: \" + getEmail() + \", tel: \" + getTelefon() + \", web: \" + web;\n\t}", "void win() {\n if (_game.isWon()) {\n showMessage(\"Congratulations you win!!\", \"WIN\", \"plain\");\n }\n }", "public void zugInWerkstatt() {\n werkstatt++;\n }", "public String whoWon()\n { \n String win=\"\";\n if (player1Hand.isEmpty())\n {\n win=(\"player 2 wins!\");\n }\n \n if(player2Hand.isEmpty())\n {\n win=(\"player 1 wins\");\n } \n \n return win;\n }", "@Override\n public int tonKho() {\n return getAmount() - amountBorrow;\n }", "@Override\n public void checkWonLost(Entity entity) {\n if (entity instanceof Player) {\n\n if (overallCoinsInGame <= 0) {\n world.won();\n }\n }\n }", "public void pass(){\n\t\tboolean thirdPass = false;\n\t\tint lastTurnID = DBCommunicator.requestInt(\"SELECT id FROM beurt WHERE spel_id = \" + id + \" AND account_naam = '\" + app.getCurrentAccount().getUsername() + \"' ORDER BY id DESC\");\n\t\tString lastTurn = DBCommunicator.requestData(\"SELECT aktie_type FROM beurt WHERE spel_id = \" + id + \" AND id = \" + lastTurnID);\n\t\tif(lastTurn != null){\n\t\t\tif(lastTurn.equals(\"Pass\")){\n\t\t\t\tint secondLastTurnID = lastTurnID - 2;\n\t\t\t\tString secondLastTurn = DBCommunicator.requestData(\"SELECT aktie_type FROM beurt WHERE spel_id = \" + id + \" AND id = \"+ secondLastTurnID);\n\t\t\t\tif(secondLastTurn.equals(\"Pass\")){\n\t\t\t\t\tDBCommunicator.writeData(\"UPDATE spel SET toestand_type = 'Finished' WHERE id = \" + id );\n\t\t\t\t\tint newTurn = lastTurnID + 2;\n\t\t\t\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) VALUES (\" + newTurn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"', 0, 'Pass')\");\n\t\t\t\t\tfor(int e : gameStones){\n\t\t\t\t\t\tDBCommunicator.writeData(\"INSERT INTO letterbakjeletter (spel_id, letter_id, beurt_id) VALUES (\" + id + \", \" + e + \", \" + newTurn + \")\");\n\t\t\t\t\t}\n\t\t\t\t\tendGame(false);\n\t\t\t\t\tthirdPass = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!thirdPass){\n\t\t\tint newTurn = lastTurnID + 2;\n\t\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) VALUES (\" + newTurn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"', 0, 'Pass')\");\n\t\t\tfor(int e : gameStones){\n\t\t\t\tDBCommunicator.writeData(\"INSERT INTO letterbakjeletter (spel_id, letter_id, beurt_id) VALUES (\" + id + \", \" + e + \", \" + newTurn + \")\");\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.5685169", "0.5644331", "0.5587667", "0.5535067", "0.5515837", "0.5480575", "0.5468759", "0.54355496", "0.54316634", "0.53858036", "0.53393763", "0.53392345", "0.5315858", "0.5285093", "0.52812034", "0.52691126", "0.5262336", "0.5242058", "0.5238036", "0.522923", "0.5197955", "0.5197647", "0.51953", "0.5177287", "0.5172434", "0.5160041", "0.51521087", "0.5127003", "0.5121837", "0.5120537", "0.51121056", "0.5111785", "0.5103285", "0.509081", "0.50797236", "0.50763", "0.5075118", "0.5060267", "0.5048929", "0.5046539", "0.50424963", "0.50374883", "0.50363314", "0.50250256", "0.5023675", "0.50208884", "0.5017262", "0.5015401", "0.5013706", "0.5009082", "0.5008825", "0.50064707", "0.49997365", "0.4996853", "0.49945313", "0.4991207", "0.49822047", "0.4981006", "0.49802172", "0.4980097", "0.49730885", "0.49728477", "0.49720982", "0.4970285", "0.49693656", "0.49660006", "0.49657223", "0.49591118", "0.49564657", "0.49564", "0.4954787", "0.49546173", "0.494648", "0.49402177", "0.4938757", "0.49309143", "0.4926589", "0.4925421", "0.49221352", "0.4918045", "0.49172708", "0.49169195", "0.4915291", "0.49128556", "0.4912655", "0.49119556", "0.49090165", "0.4908657", "0.49083397", "0.49050558", "0.4899395", "0.4894516", "0.48923412", "0.48887277", "0.48809558", "0.4879249", "0.4879159", "0.48760554", "0.48738715", "0.48722365" ]
0.642126
0
auspackenLoginSpielInformationen() / AUSPACKEN der LoginSpielInformationen
public void auspackenLoginSpielInformationen(String Str) { Intent callerIntent = getIntent(); Bundle packageFromLogin = callerIntent.getBundleExtra("LogInformationen"); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); information2.setText("\n Deine User ID:\n "+packageFromLogin.getInt("ID_Login") +" -- "+packageFromLogin.getString("Username_Login") // + "\t Spiel_ID: "+packageFromSpiel.getInt("ID_Spiel") +"\n\n Aktuelle Spieler = "+packageFromSpiel.getInt("ActuellSpieler") +"\n\n Max. Spieler= "+packageFromSpiel.getInt("MaxSpieler") +"\n\n Geldeinsatz= "+packageFromSpiel.getDouble("EinSatzGeld_DoubleWert") +"\n\n Pot= "+(packageFromSpiel.getDouble("EinSatzGeld_DoubleWert")*packageFromSpiel.getInt("MaxSpieler")) +""+Str); information.setText(" "+String.valueOf(ruckgabeVonUsernameVorratErgebnis())+"\n"+Str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public tela_GerencLogin() {\n initComponents();\n lb_NomeLogin.setText(Sessao.getLogin());\n lb_Id.setText(Integer.toString(Sessao.getId()));\n \n }", "Conseiller obtenirConseillerParLogin(String login);", "private void loadLogin(){\n }", "String getLoginapiavgrtt();", "public void updateLogin()\r\n {\r\n\t\tIntent callerIntent = getIntent(); \r\n\t\tBundle packageFromLogin = callerIntent.getBundleExtra(\"LogInformationen\");\r\n\t\tBundle packageFromSpiel = callerIntent.getBundleExtra(\"SpielInformationen\");\r\n\t\t\r\n\t try\r\n\t {\r\n\t\t \r\n\t\t final String METHOD_NAME=\"UpdateSpieler\";\r\n\t\t final String SOAP_ACTION=NAMESPACE+METHOD_NAME;\r\n\t\t \r\n\t\t SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);\r\n\t\t SoapObject newSpieler=new SoapObject(NAMESPACE, \"_login\");\r\n\t\t \r\n\t\t\tnewSpieler.addProperty(\"LoginID\",packageFromLogin.getInt(\"ID_Login\"));\t\t\t\r\n\t\t\tnewSpieler.addProperty(\"Username\",packageFromLogin.getString(\"Username_Login\"));\t\t\t\r\n\t\t\tnewSpieler.addProperty(\"Passwords\",packageFromLogin.getString(\"Passwords_Login\"));\r\n\t\t\tnewSpieler.addProperty(\"Email\",packageFromLogin.getString(\"Email_Login\"));\r\n\t\t\tnewSpieler.addProperty(\"Bank\",(packageFromLogin.getDouble(\"Bank_Login\")-packageFromSpiel.getDouble(\"EinSatzGeld_DoubleWert\")));\r\n\t\t\trequest.addSoapObject(newSpieler);\r\n\t\t \r\n\t\t SoapSerializationEnvelope envelope= new SoapSerializationEnvelope(SoapEnvelope.VER11);\r\n\t\t envelope.dotNet=true;\r\n\t\t envelope.setOutputSoapObject(request);\r\n\t\t MarshalFloat marshal=new MarshalFloat();\r\n \t\tmarshal.register(envelope);\r\n \t\t\r\n\t\t //tạo đối tượng HttpTransportSE\r\n\t\t HttpTransportSE androidHttpTransport= new HttpTransportSE(URL);\r\n\t\t androidHttpTransport.call(SOAP_ACTION, envelope);\r\n\r\n\t\t SoapPrimitive soapPrimitive= (SoapPrimitive) envelope.getResponse();\r\n\t\t //Toast.makeText(this, soapPrimitive.toString(), Toast.LENGTH_LONG).show();\r\n\t }\r\n\t catch(Exception e)\r\n\t {\r\n\t \tToast.makeText(this, \"Fehler Login Update\", Toast.LENGTH_LONG).show();\r\n\t }\r\n }", "@Override\n\tpublic void LoginProc(Parent root) {\n\t\tTextField idTxt = (TextField) root.lookup(\"#txtid\");\n\t\tTextField pwTxt = (TextField) root.lookup(\"#txtpw\");\n\t\tSystem.out.println(\"ID : \"+idTxt.getText()+\",PW : \"+pwTxt.getText()+\"가 입력되었습니다.\");\n\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "public String accionLogin(){\n\t\t\r\n\t\tlog.info(\"Ingreso hacer login del usuario!!! \");\r\n\t\tString retorno = null;\r\n\t\ttry {\r\n\t\t\tString pass = new CriptPassword().getHashSH1(loginBaking.getUserBean().getPass());\r\n\t\t\tUser u = ejbMangerUser.login(loginBaking.getUserBean().getNick(), pass);\r\n\t\t\tloginBaking.setUserBean(u);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tList<Network> listNetwork = ejbNetwork.listNetwork();\r\n\t\t\tHttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);\r\n\t\t\tsession.setAttribute(\"listaNetwork\", listNetwork);\r\n\t\t\t\r\n\t\t\tretorno = \"site/home\";\r\n\t\t} catch (InSideException ex) {\r\n\t\t\tlog.error(ex.getKeyMSGError());\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage (FacesMessage.SEVERITY_ERROR, \r\n\t\t\t\t\t\tBundleUtil.getMessageResource(ex.getKeyMSGError()), \r\n\t\t\t\t\t\tBundleUtil.getMessageResource(ex.getKeyMSGError())));\r\n\t\t}\r\n\t\tlog.debug(\"Pagina de redireccion --->> \" + retorno);\r\n\t\tlog.info(\"fin de Login!!!\");\r\n\t\treturn retorno;\r\n\t}", "private void proseslogin() {\n String user = username.getText();\n char[] pass = password.getPassword();\n \n if (user.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"Username Harus Diisi\");\n username.requestFocus();\n } else if (pass.length == 0){\n JOptionPane.showMessageDialog(this, \"Password Harus Diisi\");\n password.requestFocus();\n }else{\n String password = new String(pass);\n login.setEnabled(false);\n try {\n Connection conn = koneksi.sambungDB();\n Statement st = conn.createStatement();\n String n = \"SELECT * FROM tb_admin \"\n +\"WHERE admin_username='\"+user+\"' \"\n +\"AND admin_password=MD5('\"+password+\"')\" ;\n// System.out.println(q);\n ResultSet rs = st.executeQuery(n);\n if (rs.next()) {\n Data_perumahan h = new Data_perumahan();\n h.setExtendedState(Frame.MAXIMIZED_BOTH);\n this.setVisible(false);\n h.setVisible(true);\n }else{\n JOptionPane.showMessageDialog(this, \"Username dan Password Salah\");\n username.requestFocus();\n }\n login.setEnabled(true);\n } catch (HeadlessException | SQLException e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n }\n }", "protected void login() {\n\t\t\r\n\t}", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "public Login() {\n initComponents();\n KiemTraKN();\n }", "public java.lang.String getSpPassword(){\r\n return localSpPassword;\r\n }", "private void login() {\n if (usrField.getText().equals(\"\") || passwordField.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n return;\n }\n\n //User.ID = userField.getText();\n User.ID = \"BPDB\";\n\n //User.password = passwordField.getText();\n\n User.password = \"BPDB\";\n\n\n //String sql = \"SELECT desig FROM BPDB.usr WHERE name = '\" + userField.getText() + \"',\"and\" +passwordField.getText() +\"'\";\n\n String sql = \"select desig from BPDB.usr where name='\" + usrField.getText()\n + \"' and password='\" + passwordField.getText() + \"'\";\n\n User.desig = Utility2.singleStOPQuery(login, sql);\n System.out.println(\"Designation : \" + User.desig);\n if (User.desig.isEmpty()) {\n\n\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n return;\n } else {\n\n sql = \"SELECT name FROM BPDB.usr WHERE name = '\" + usrField.getText() + \"'\";\n User.name = Utility2.singleStOPQuery(login, sql);\n\n if (User.desig.equalsIgnoreCase(\"BPDB\")) {\n setVisible(false);\n dispose();\n new HomeFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"DRAFT\")) {\n setVisible(false);\n dispose();\n new DRAFTFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"APPLY\")) {\n setVisible(false);\n dispose();\n new APPLYFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"HR\")) {\n setVisible(false);\n dispose();\n new HRFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"ADMIN\")) {\n setVisible(false);\n dispose();\n new ADMINFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"ACCOUNT\")) {\n setVisible(false);\n dispose();\n new ACCOUNTFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"SALARY\")) {\n setVisible(false);\n dispose();\n new SALARYFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"BILLING\")) {\n setVisible(false);\n dispose();\n new BILLINGFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"DISTRIBUTION\")) {\n setVisible(false);\n dispose();\n new DISTRIBUTIONFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"GENERATION\")) {\n setVisible(false);\n dispose();\n new GENERATIONFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"DHAKA\")) {\n setVisible(false);\n dispose();\n new DHAKAFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"KHULNA\")) {\n setVisible(false);\n dispose();\n new KHULNAFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"RAUJAN\")) {\n setVisible(false);\n dispose();\n new RAUJANFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"SHIDDERGANJ\")) {\n setVisible(false);\n dispose();\n new SHIDDERGANJFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"GRASHAL\")) {\n setVisible(false);\n dispose();\n new GRASHALFrame().setVisible(true);\n }\n }\n }", "@Override\r\n\tpublic void login() {\n\r\n\t}", "@Override\n public void manejarLogin() {\n loginPresenter.validarLogin(etxtEmail.getText().toString(),etxtPass.getText().toString());\n }", "@WebMethod public Pertsona isLogin(String erabiltzaileIzena, String pasahitza);", "private void loginSuccess(String uname) {\n }", "public String getLogin()\n {\n \treturn stringLogin;\n }", "public void GetUserLogin(String uName) throws ClassNotFoundException, SQLException{\n this.sessionUsername = uName;\n this.username.setText(uName);\n getDisableChanger();\n tanggalHariIni();\n loadDB1(col_idCatat, col_namaMakananCatat, col_kaloriCatat, col_sesiCatat, catatMakanan, String.valueOf(LocalDate.now()));\n loadDB2(col_idMakanan, col_namaMakanan, col_KaloriMakanan, makananTabel);\n }", "private final static void onLoginAdmin(TextField username, PasswordField password)\n\t{\n\t\tif(ProfileManipulation.findUsername(username.getText()) && !ProfileManipulation.checkLoginStatus(username.getText())){\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\n\t\t\t\tProfileManipulation.changePassword(password.getText());\n\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "private final static void onLogin(TextField username, PasswordField password)\n\t{\n\t\tif (ProfileManipulation.checkLogin(username.getText(), password.getText())) {\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "void loginDetails(LoginSuccess loginSuccess);", "private void loginBD() {\n\t\t\r\n\t\tif(ConexionStatic.isDbConnected()){\r\n\t\t\ttry\r\n\t\t\t{ \r\n\t\t\t\t\r\n\t //chekar si el usuario escrbio el nombre de usuario y pw\r\n\t if (view.getTxtUser().getText().length() > 0 && view.getTxtPass().getText().length() > 0 )\r\n\t {\r\n\t \tmyUsuario.setPwd(view.getTxtPass().getText());\r\n\t \tmyUsuario.setUser(view.getTxtUser().getText());\r\n\t \tresultado=myUsuarioDao.setLogin(myUsuario);\r\n\t \t\r\n\t \tif(!resultado){//si el resultado el usuario en la bd no existe o el pwd\r\n\t \t\tJOptionPane.showMessageDialog(null, \"El nombre de usuario y/o contrasenia no son validos.\");\r\n\t //JOptionPane.showMessageDialog(null, view.getTxtUser().getText()+\" \" +view.getTxtPass().getText() );\r\n\t //view.getTxtUser().setText(\"\"); //limpiar campos\r\n\t view.getTxtPass().setText(\"\"); \r\n\t \r\n\t view.getTxtUser().requestFocusInWindow();\r\n\t \t}else{\r\n\t \t\tthis.view.setVisible(false);\r\n\t \t\tthis.view.dispose();\r\n\t \t\t\r\n\t \t}\r\n\t \t\r\n\t /*/ Si el usuario si fue validado correctamente\r\n\t if( validarUsuario( txtUser.getText(), txtPass.getText() ) ) //enviar datos a validar\r\n\t {\r\n\t // Codigo para mostrar la ventana principal\r\n\t setVisible(false);\r\n\t VentanaPrincipal ventana1 = new VentanaPrincipal();\r\n\t ventana1.mostrar();\r\n\t\r\n\t\r\n\t }\r\n\t else\r\n\t {\r\n\t JOptionPane.showMessageDialog(null, \"El nombre de usuario y/o contrasenia no son validos.\");\r\n\t JOptionPane.showMessageDialog(null, view.getTxtUser().getText()+\" \" +view.getTxtPass().getText() );\r\n\t view.getTxtUser().setText(\"\"); //limpiar campos\r\n\t view.getTxtPass().setText(\"\"); \r\n\t \r\n\t view.getTxtUser().requestFocusInWindow();\r\n\t }*/\r\n\t\r\n\t }\r\n\t else\r\n\t {\r\n\t JOptionPane.showMessageDialog(null, \"Debe escribir nombre de usuario y contrasenia.\\n\" +\r\n\t \"NO puede dejar ningun campo vacio\");\r\n\t }\r\n\t\r\n\t } catch (Exception e)\r\n\t {\r\n\t e.printStackTrace();\r\n\t }\r\n\t\t}//fin de la comprobacion de la conexion\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private Users buildLogin( ) {\n\t\t\r\n\t\t return LoginUtil.fillUserData(this.user, this);\r\n\t\t \r\n\t}", "private static void loginForAdmin(String username, String password){\n\n ArrayList<Object> loginData = LogInAndLogOutService.login(username, password);\n boolean logged = (boolean) loginData.get(0);\n boolean freezed = (boolean) loginData.get(1);\n Employee employee = (Employee) loginData.get(2);\n\n if (logged){\n\n System.out.println(\"Sie sind richtig als Herr/Frau \"+ employee.getLastname() + \" \"+ employee.getFirstname() +\" eingelogt.\");\n }else {\n if (freezed){\n\n System.out.println(\"Ihr Konto wurde einfriert. Sie können sie sich nicht einloggen. :(\");\n }else {\n\n System.out.println(\"Falscher Benutzername oder Passwort eingegeben. Versuchen Sie erneut.\");\n }\n }\n }", "public void premutoLogin()\n\t{\n\t\tnew _FINITO_funzione_loginGUI();\n\t}", "public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Select idUser,nom,prenom,userName,type,tel from t_user where userName=? and pass=? and status=?\");\r\n\t\t\t\tps.setString(1, this.getUserName());\r\n\t\t\t\tps.setString(2, this.getPassword());\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"idUser\", rs.getInt(\"idUser\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"nom\", rs.getString(\"nom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"prenom\", rs.getString(\"prenom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"userName\", rs.getString(\"userName\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"type\", rs.getString(\"type\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"tel\", rs.getString(\"tel\"));\r\n\t\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"view/welcome.xhtml\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tnew Message().error(\"echec de connexion\");\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tnew Message().warnig(\"Nom d'utilisateur ou mot de passe incorrecte\");\r\n\t\t}\r\n\t}", "Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }", "public Integer logIn(String u_name, String u_pw){\n //find entry with u_name = this.u_name\n //probably not so safe\n //getting user with index 0 because getUserFromUsername returns List\n User user = userDao.getUserFromUsername(u_name).get(0);\n //print at console\n LOGGER.info(\"User: \" + user);\n //returns integer 1 if user.get_pw equals to this.pw or 0 if not\n if (user.getU_Pw().equals(u_pw)){\n return user.getU_Id();\n }else{\n return 0;\n }\n }", "boolean hasLoginapiavgrtt();", "void legeAn(String login, String name, String password, boolean isAdmin, String email);", "public abstract String getLoginName();", "boolean verificarLogin(FichaDocente regDcnt);", "@Override\n public void login(String nome, String email, int senha) {\n if (getNome() == nome && this.getEmail() == email && this.getSenha() == senha){\n System.out.println(\"Login efetuado com sucesso\");\n } else {\n System.out.println(\"0 - Sair\");\n System.out.println(\"Saiu do usuario\");\n }\n\n }", "public String Apr_AftrLogin() {\n\t\treturn helper.getText(APR);\n\n\t}", "public String getLogin(){\r\n return login;\r\n }", "boolean hasLoginPack();", "@Override\r\n\tpublic void loginSuccess(String userName, String psd) {\n\t\tet_username_logon.setText(\"\" + userName);\r\n\t\tet_password_logon.setText(\"\");\r\n\t\tmyLogon.setString(userName, psd);\r\n\t\tmyLogon.logon();\r\n\t}", "private void logIn() {\n char[] password = jPasswordField1.getPassword();\n String userCode = jTextField1.getText();\n\n String txtpassword = \"\";\n for (char pw : password) {\n txtpassword += pw;\n }\n if (\"\".equals(txtpassword)) {\n JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString(\"enterPassword\"), \"No Password\", JOptionPane.WARNING_MESSAGE);\n } else if (txtpassword.equals(userData.get(0).toString())) {\n jPasswordField2.setEnabled(true);\n jPasswordField3.setEnabled(true);\n jPasswordField2.setEditable(true);\n jPasswordField3.setEditable(true);\n jPasswordField2.grabFocus();\n }\n }", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "public void logins(){\n \n \n \n String username=txtUser.getText();\n String password=txtPass.getText();\n String sql;\n\n \n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = (Connection) DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/\"+db+\"?user=\"+user+\"&password=\"+pass);\n sql =\"Select * from user WHERE username ='\" +txtUser.getText() + \"'\";\n PreparedStatement st = (PreparedStatement) conn.prepareStatement(sql);\n ResultSet rs =st.executeQuery(); \n if(rs.next()) {\n String pasas = rs.getString(\"password\");\n if(password.equals(pasas)){\n JOptionPane.showMessageDialog(this, \"Login Berhasil\");\n \n Home tampil=new Home();\n tampil.setVisible(true);\n dispose();\n \n }else{\n JOptionPane.showMessageDialog(this, \"Username tidak terdaftar\");\n txtUser.requestFocus();\n }\n }else{\n JOptionPane.showMessageDialog(this, \"Username tidak terdaftar\");\n txtUser.requestFocus();\n }\n }catch (Exception e) {\n JOptionPane.showMessageDialog(this,e.getMessage());\n }\n \n }", "@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "void successLogin();", "long getLoginAt();", "Login() { \n }", "public String login() {\r\n String ruta = \"\";\r\n UsuarioDAO usuDAO = new UsuarioDAO();\r\n if (usuDAO.Login(this) != null) {\r\n ruta = FN.ruta(\"menu\");\r\n Empresa em = new Empresa();\r\n em.setEmpresa(\"2101895685\");\r\n em.setRazonSocial(\"Tibox SRL\");\r\n em.setDireccion(\"MiCasa\");\r\n SSU.sEmpresa(em);\r\n SSU.sUsuario(this);\r\n }\r\n return ruta;\r\n }", "@Override\r\n\tpublic void MemberLogin() {\n\r\n\t}", "boolean hasLogin();", "boolean hasLogin();", "private void setLoginInformation()\n {\n // Set up the login form.\n mIPView_ = (EditText) findViewById( R.id.IP );\n mPortView_ = (EditText) findViewById( R.id.password );\n\n // Set the intial display\n if ( rememberLoginIsSet_ )\n {\n if ( properties_.containsKey( getString( R.string.saved_IP ) ) )\n {\n mIP_ =\n properties_\n .getProperty( getString( R.string.saved_IP ) );\n }\n\n if ( properties_.containsKey( getString( R.string.saved_Port ) ) )\n {\n mPort_ =\n properties_\n .getProperty( getString( R.string.saved_Port ) );\n }\n }\n\n // Set the values to whatever the load settings or default are\n mIPView_.setText( mIP_ );\n mPortView_.setText( mPort_ );\n\n mPortView_\n .setOnEditorActionListener( new TextView.OnEditorActionListener()\n {\n @Override\n public boolean onEditorAction( TextView textView, int id,\n KeyEvent keyEvent )\n {\n if ( id == R.id.login || id == EditorInfo.IME_NULL )\n {\n attemptLogin();\n return true;\n }\n return false;\n }\n } );\n\n mLoginFormView = findViewById( R.id.login_form );\n mLoginStatusView = findViewById( R.id.login_status );\n mLoginStatusMessageView =\n (TextView) findViewById( R.id.login_status_message );\n }", "protected String loginIdentifyString() {\r\n return \"hao\";\r\n }", "public String getLogin () {\n return login;\n }", "@Override\n\tpublic String login_request() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void Login(DbInterface dbi) {\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n header = new javax.swing.JPanel();\n logo = new javax.swing.JLabel();\n lbPerpus = new javax.swing.JLabel();\n lbUP = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n txtusername = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n txtPassword = new javax.swing.JPasswordField();\n btnLogin = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n lbLogin = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Perpustakaan UP - Login\");\n setResizable(false);\n\n logo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/logo.png\"))); // NOI18N\n\n lbPerpus.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n lbPerpus.setText(\"Perpustakaan\");\n\n lbUP.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n lbUP.setText(\"Universitas Pancasila\");\n\n javax.swing.GroupLayout headerLayout = new javax.swing.GroupLayout(header);\n header.setLayout(headerLayout);\n headerLayout.setHorizontalGroup(\n headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(headerLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(logo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lbPerpus)\n .addComponent(lbUP))\n .addContainerGap(22, Short.MAX_VALUE))\n );\n headerLayout.setVerticalGroup(\n headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(headerLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(headerLayout.createSequentialGroup()\n .addComponent(lbPerpus)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lbUP))\n .addComponent(logo))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel1.setText(\"Username\");\n\n txtusername.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtusernameActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"Password\");\n\n btnLogin.setText(\"Login\");\n btnLogin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLoginActionPerformed(evt);\n }\n });\n\n btnCancel.setText(\"Cancel\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n lbLogin.setFont(new java.awt.Font(\"Segoe UI\", 1, 24)); // NOI18N\n lbLogin.setText(\"Login\");\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(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtusername, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(110, 110, 110)\n .addComponent(lbLogin))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(header, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\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 .addComponent(header, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(lbLogin)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(txtusername, 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(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(37, 37, 37)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26))\n );\n\n pack();\n }", "private void initsimpleLoginPanel() {\n\t\tfont1 = new Font(\"黑体\",Font.PLAIN,18);\n\t\tfont2 = new Font(\"黑体\",Font.BOLD,18);\n\t\tJLabel bg = new PictureLabel(\"src/main/java/image/3.jpg\");\n\t\tbg.setBounds(0,0,this.getWidth(),this.getHeight());\n\t\t\n\t\tUserID = new JLabel(\"用 户 名:\",JLabel.LEFT);\n\t\tUserID.setFont(new Font(\"华文细黑\",Font.PLAIN,18));\n\t\tUserID.setBounds(330, 230, 130, 80);\n\t\tid = new JTextField(20);\n\t\tid.setBounds(408, 250, 230, 40);\n\t\tid.addKeyListener(new KeyListener(){\n\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(e.getKeyCode()==KeyEvent.VK_ENTER){\n\t\t\t\t\te.consume();\n\t\t\t\t\t KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tPassword = new JLabel(\"密 码:\",JLabel.LEFT);\n\t\tPassword.setFont(new Font(\"华文细黑\",Font.PLAIN,18));\n\t\tPassword.setBounds(330, 312, 130, 80);\n\t\t\n\t\tkey = new JPasswordField(20);\n\t\tkey.setBounds(408, 330, 230, 40);\n\t\tkey.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogin();\n\t\t\t}\t\t\t\n\t\t});\t\n\t\t\n\t\tlogin = new JButton(\"登录\");\n\t\tlogin.setFont(font1);\n\t\tlogin.setBounds(550, 420, 80, 40);\n\t\tlogin.setFocusPainted(false);\n\t\tlogin.setContentAreaFilled(false);\n\t\tlogin.addMouseListener(new MouseListener(){\n\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogin();\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogin.setFont(font2);\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogin.setFont(font1);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\t\n\t\texit = new JButton(\"取消\");\n\t\texit.setFont(font1);\n\t\texit.setBounds(408, 420, 80, 40);\n\t\texit.setFocusPainted(false);\n\t\texit.setContentAreaFilled(false);\n\t\texit.addMouseListener(new MouseListener(){\n\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsimpleLoginPanel.this.setVisible(false);\t\n\t\t\t\tClient.frame.remove(simpleLoginPanel.this);\n\t\t\t\tClient.frame.add(new simpleWelcomePanel());\n\t\t\t\tClient.frame.repaint();\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\texit.setFont(font2);\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\texit.setFont(font1);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tthis.add(login);\n\t\tthis.add(exit);\n\t\tthis.add(id);\n\t\tthis.add(key);\n\t\tthis.add(UserID);\n\t\tthis.add(Password);\n\t\tthis.add(bg);\n\t}", "private void getUserNamePwd() {\n\n try {\n // get Application Connection ID\n LogonCoreContext lgCtx = LogonCore.getInstance().getLogonContext();\n userName = lgCtx.getBackendUser();\n pwd = lgCtx.getBackendPassword();\n appConnID = LogonCore.getInstance().getLogonContext()\n .getConnId();\n } catch (LogonCoreException e) {\n LogManager.writeLogError(Constants.device_reg_failed_txt, e);\n }\n }", "@Override\n\tpublic boolean loginService(List<Object> paraments) {\n\t\t\n\t\t\n\t\tboolean flag = false;\n\t\t\n\t\tString sql = \"select * from user where user_id=? and password=?\";\n\t\ttry{\n\t\t\t\n\t\t\tmJdbcUtil.getConnetion();\n\t\t\tMap<String,Object> map= mJdbcUtil.findSimpleResult(sql, paraments);\n\t\t\tflag = map.isEmpty()?false:true;\n\t\t\tSystem.out.println(\"-flag-->>\" + flag);\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tmJdbcUtil.releaseConn();\n\t\t}\n\t\t\n\t\t\n\t\treturn flag;\n\t}", "public void validateLogin(String inUName, String inPassword) {\r\n\t\tResultSet loginRs = null;\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and retrieving data (fetchSelectAllUsers())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection validateConn = new DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tRetrieve all data from users table and save it in ResultSet loginRs\r\n\t\t\t*/\r\n\t\t\tloginRs = validateConn.fetchSelectAllUsers();\r\n\r\n\t\t\twhile (loginRs.next()) {\r\n\t\t\t\tif (inUName.equals(loginRs.getString(1)) && inPassword.equals(loginRs.getString(2))) {\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t*\tIf we found a matching record, toggle boolean found to true and load all the data into\r\n\t\t\t\t\t*\tthe object which has called the method.\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tuName = loginRs.getString(1);\r\n\t\t\t\t\tpassword = loginRs.getString(2);\r\n\t\t\t\t\tfullName = loginRs.getString(3);\r\n\t\t\t\t\tphone = loginRs.getString(4);\r\n\t\t\t\t\temail = loginRs.getString(5);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"**************Error Connecting to the Database**************\");\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//DbConnection.closeDbConnection();\r\n\t\t\t\tif (loginRs != null) {\r\n\t\t\t\t\tloginRs.close();\r\n\t\t\t\t}\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t}", "protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "private static int login(String username, String passe) {\n PreparedStatement stmt;\r\n try {\r\n stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome = ? and passe = ?;\");\r\n stmt.setString(1, username);\r\n stmt.setString(2, passe);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n utilizador_corrente = new Utilizador(username, passe, rs.getBoolean(4));\r\n cartao_cidadao = rs.getInt(1);\r\n if (rs.getBoolean(4))//tem direitos\r\n return 2;\r\n else if (!rs.getBoolean(4))//nao tem direitos\r\n return 1;\r\n stmt.close();\r\n } catch (SQLException e) {\r\n }\r\n return 0;\r\n }", "@Override\n\tpublic synchronized String login(String username, String password) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"login\");\n\t\t\n\t\tUserLoginPayload payload = new UserLoginPayload();\n\t\tpayload.setAccessKey(HFConfigration.accessKey);\n\t\tpayload.setUserName(username);\n\t\tpayload.setPassword(password);\n\t\tpayload.setMac(getMacAddress());\n\t\tpayload.setClientName(android.os.Build.MANUFACTURER);\n\t\t\n\t\tUserLoginRequest request = new UserLoginRequest();\n\t\trequest.setPayload(payload);\n\t\t\n\t\ttry {\n\t\t\tUserIdResponse response = cloudSecurityManager.login(request);\n\t\t\t\n\t\t\t\n\t\t\t//[should remove these code later]\n\t\t\tthis.setSid(response.getSessionId());\n\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n\t\t\t\t\t.setUserName(HFConfigration.cloudUserName);\n\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n\t\t\t\t\t.setPswd(HFConfigration.cloudPassword);\n\t\t\tHFLocalSaveHelper.getInstence().setAccesskey(\n\t\t\t\t\tHFConfigration.accessKey);\n\t\t\tHFLocalSaveHelper.getInstence().setIsregisted(true);\n\t\t\tManagerFactory.getManager(context, IHFSFManager.class).syncRemoteModuleInfo(\n\t\t\t\t\tnew SyncModuleEventListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSyncSuccess() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tnotifyLoginEvent(true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSyncErr() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tnotifyLoginEvent(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t//[should remove these code later] the end \n\t\t\t\n\t\t\tString sessionId = response.getSessionId();\n\t\t\tString userId = response.getPayload().getUserId();\n\t\t\t\n\t\t\tUserInfo userInfo;\n\t\t\twhile ((userInfo = userInfoDao.getActiveUserInfo()) != null) {\n\t\t\t\tuserInfo.setActive(false);\n\t\t\t\tuserInfoDao.saveUserInfo(userInfo);\n\t\t\t}\n\t\t\t\n\t\t\tuserInfo = userInfoDao.getUserInfo(userId);\n\t\t\tif (userInfo == null) {\n\t\t\t\tuserInfo = new UserInfo();\n\t\t\t\tuserInfo.setUserId(userId);\n\t\t\t}\n\t\t\tuserInfo.setUserName(username);\n\t\t\tuserInfo.setPassword(password);\n\t\t\tuserInfo.setToken(sessionId);\n\t\t\tuserInfo.setTokenExpiredTime(System.currentTimeMillis() + UserInfo.TOKEN_EXPIRED_TIME);\n\t\t\tuserInfo.setActive(true);\n\t\t\tuserInfo.setAccessKey(payload.getAccessKey());\n\t\t\tuserInfoDao.saveUserInfo(userInfo);\n\t\t\t\n\t\t\treturn sessionId;\n\t\t} catch (CloudException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t\tthrow new HFModuleException(e1.getErrorCode(), e1.getMessage());\n\t\t}\n\t}", "int getLoginFlag();", "public void LogIn() {\n\t\t\r\n\t}", "public AuthenticationUserVO getAuthenticateVO()\n/* */ throws LoginInterruptedException\n/* */ {\n/* 383 */ AuthenticationUserVO userVO = new AuthenticationUserVO();\n/* 384 */ Map<String, String> extMap = new HashMap();\n/* 385 */ LfwView widget = getCurrentWidget();\n/* 386 */ TextComp userIdComp = (TextComp)widget.getViewComponents().getComponent(\"userid\");\n/* 387 */ TextComp randomImageComp = (TextComp)widget.getViewComponents().getComponent(\"randimg\");\n/* */ \n/* 389 */ ICpSysinitQry cpSysinitQry = PortalServiceUtil.getCpSysinitQry();\n/* 390 */ boolean enabledRandomImage = false;\n/* */ try {\n/* 392 */ String showRanImg = cpSysinitQry.getSysinitValueByCodeAndPkorg(\"randomimg\", null);\n/* 393 */ enabledRandomImage = UFBoolean.valueOf(showRanImg).booleanValue();\n/* */ } catch (CpbBusinessException e) {\n/* 395 */ PortalLogger.error(e.getMessage(), e);\n/* */ }\n/* 397 */ String userId = null;\n/* */ \n/* 399 */ AppLifeCycleContext pctx = AppLifeCycleContext.current();\n/* 400 */ HttpSession session = LfwRuntimeEnvironment.getWebContext().getRequest().getSession();\n/* 401 */ String signdata = pctx.getParameter(\"p_signdata\");\n/* 402 */ String sn = pctx.getParameter(\"p_sn\");\n/* 403 */ String tz = pctx.getParameter(\"p_tz\");\n/* 404 */ if (userIdComp != null) {\n/* 405 */ if (enabledRandomImage) {\n/* 406 */ String rand = null;\n/* 407 */ if (session != null) {\n/* 408 */ rand = (String)session.getAttribute(\"rand\");\n/* */ }\n/* 410 */ String ricv = randomImageComp.getValue();\n/* 411 */ if (!StringUtils.equals(rand, ricv)) {\n/* 412 */ throw new LoginInterruptedException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000006\"));\n/* */ }\n/* */ }\n/* 415 */ userId = userIdComp.getValue();\n/* 416 */ if ((userId == null) || (userId.equals(\"\"))) {\n/* 417 */ throw new LoginInterruptedException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000007\"));\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 422 */ TextComp passComp = (TextComp)widget.getViewComponents().getComponent(\"password\");\n/* 423 */ String passValue = null;\n/* 424 */ if (passComp != null) {\n/* 425 */ passValue = passComp.getValue();\n/* 426 */ if (passValue == null) {\n/* 427 */ passValue = \"\";\n/* */ }\n/* */ }\n/* */ \n/* 431 */ ComboBoxComp multiLanguageCombo = (ComboBoxComp)widget.getViewComponents().getComponent(\"multiLanguageCombo\");\n/* 432 */ String language = multiLanguageCombo.getValue();\n/* */ \n/* 434 */ userVO.setUserID(userId);\n/* 435 */ userVO.setPassword(passValue);\n/* 436 */ extMap.put(\"p_language\", language);\n/* 437 */ extMap.put(\"p_maxwin\", \"N\");\n/* 438 */ extMap.put(\"p_signdata\", signdata);\n/* 439 */ extMap.put(\"p_sn\", sn);\n/* */ \n/* 441 */ extMap.put(\"p_tz\", tz);\n/* 442 */ String challlid = (String)session.getAttribute(\"challlid\");\n/* 443 */ extMap.put(\"challlid\", challlid);\n/* 444 */ userVO.setExtInfo(extMap);\n/* 445 */ return userVO;\n/* */ }", "Login.Res getLoginRes();", "public String retourPageAuthentification() {\r\n\t\tdefaultVue.setPassword(null);\r\n\t\t// Retour à la page d'authentification\r\n\t\treturn \"LoginPassword\";\r\n\t}", "@Override\n\tpublic void loginUser() {\n\t\t\n\t}", "@Override\r\n\tpublic List<User> logincheck(String uname, String pass) {\n\t\treturn null;\r\n\t}", "private void prepareLogin(LoginInfo loginInfo)\n\t{\n\t\tif (loginInfo != null)\n\t\t{\n\t\t\tSystem.out.println(\"@LoginView, @onSuccessfulLoginWork, loginInfo->\"+ loginInfo.toString());\n\t\t\n\t\t\tsignInLink.setText(loginInfo.getNickname());\n\t\t\t\n\t\t\tif (loginInfo.getNickname() != null)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"@LoginView @onSuccessfulLoginWork, getNickName ->\"+loginInfo.getNickname());\n\t\t\t\tsetupLinkForLogout(loginInfo);\n\t\t\t\tinsertImage(loginInfo);\n\t\t\t\tgoButton.setText(\"Start BlipNip\");\n\t\t\t\tgoButton.setEnabled(true);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetupLinkForLogin(); \n\t\t}\n\t}", "public abstract boolean showLogin();", "public void inputListenerForLoginButton() throws SQLException, ParseException {\n\t\t// when Login is pressed\n\t\tString email = textField_Email.getText().toLowerCase();\n\t\ttextField_Email.setText(\"\");\n\n\t\t@SuppressWarnings(\"deprecation\")\n\t\tString password = passwordField.getText();\n\t\tpasswordField.setText(\"\");\n\n\t\tMember m = memberRepository.passwordMatchesForLogin(email, password);\n\n\t\tif (!isEmailFormatCorrect(email) || password.equals(\"\")) {\n\t\t\tlblLabel_Invalid.setVisible(true);\n\t\t\tpanel.revalidate();\n\t\t\tpanel.repaint();\n\t\t\treturn;\n\t\t}\n\n\t\tif (m != null) {\n\t\t\tif (m.isAdmin()) {\n\t\t\t\t// view el admin Panel\n\t\t\t\tAdminGUI admin = new AdminGUI();\n\t\t\t\tfrmLibraryManagementSystem.remove(panel11);\n\t\t\t\tfrmLibraryManagementSystem.getContentPane().add(admin);\n\t\t\t\tfrmLibraryManagementSystem.revalidate();\n\t\t\t\tfrmLibraryManagementSystem.repaint();\n\t\t\t} else {\n\t\t\t\t// go to BookGUI panel\n\t\t\t\tBooksGUI p = new BooksGUI(m);\n\t\t\t\tfrmLibraryManagementSystem.remove(panel11);\n\t\t\t\tfrmLibraryManagementSystem.getContentPane().add(p);\n\t\t\t\tfrmLibraryManagementSystem.revalidate();\n\t\t\t\tfrmLibraryManagementSystem.repaint();\n\t\t\t}\n\t\t} else {\n\t\t\tlblLabel_Invalid.setVisible(true);\n\t\t\tpanel.revalidate();\n\t\t\tpanel.repaint();\n\t\t}\n\n\t}", "@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}", "public Login() {\n initComponents();\n hideregister ();\n }", "private String PerformLogin(String data){\n String[] parts = data.split(Pattern.quote(\"|||\"));\n String ret = null;\n try {\n Statement stmt = storage.getConn().createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT COUNT(*) AS count FROM Users WHERE username = '\" + parts[0] + \"' AND password = '\"+parts[1]+\"'\");\n rs.next();\n // verifico che ci sia un utente con i dati specificati\n if (rs.getInt(\"count\") > 0){\n String token = Helper.GenerateToken();\n\n // aggiorno la tabella degli utenti con il nuovo token dell'utente loggato e il suo indirizzo ip\n storage.PerformSQL(\"UPDATE Users SET token = '\"+token+\"', host_addr = '\"+client.getRemoteSocketAddress().toString()+\"' WHERE username = '\"+parts[0]+\"'\");\n ret = token;\n\n // inserisco l'utente nelle due liste degli utenti online\n current_online.add(token);\n next_online.add(token);\n } else\n ret = \"error\";\n\n rs.close();\n stmt.close();\n } catch (SQLException e ){\n e.printStackTrace();\n return \"error\";\n }\n\n return ret;\n }", "public Login(Main pai) {\n this.pai = pai;\n initComponents();\n senhaBox.setEchoChar('*');\n \n loginBox.setText(\"[email protected]\");\n senhaBox.setText(\"eymar\");\n }", "private void userInformation()\n {\n name = eName.getText().toString();\n userName = eUserName.getText().toString();\n email = eEmail.getText().toString();\n password = ePassword.getText().toString();\n password = encryptionAlgo.encryptPass(password);//initialize new encrypt password\n address = eAddress.getText().toString();\n favouriteWord = eFavourite.getText().toString();\n }", "static String a(NetLoginHandler var0)\n {\n return var0.loginKey;\n }", "com.bingo.server.msg.REQ.LoginRequest getLogin();", "public String getLogin() {\n return login;\n }", "@FXML\n\tprivate void handleLogin() {\n\t \n\t\t\t\ttry {\n\t\t\t\t\tmain.showHomePageOverview(username.getText(),password.getText());\n\t\t\t\t} catch (SQLException 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}", "public boolean fHalamanPelanggan(HttpSession vFSesi) {\n boolean vKeluaran = false;\n \n try{\n String vID = vFSesi.getAttribute(\"sesIDPub\").toString();\n String vSandi = vFSesi.getAttribute(\"sesSandiPUb\").toString();\n String vEmailDB = \"\";\n String vSandiDB = \"\";\n\n //String vKeluaran = \"fHalamanAdmin -> ID: \" + vID + \" & sandi: \" + vSandi;\n /* mencocokkan data session dengan basisdata */\n /* mengambil data nama dan sandi */\n ClsOperasiBasisdataOri oOpsBasisdata = new ClsOperasiBasisdataOri();\n\n /* \n String vFNamaBerkasKonf,\n String vFNamaBd,\n String vFNamaTabel,\n String[] vFArrNamaKolom,\n String vFKolomUrut,\n String vFJenisUrut,\n String[] vFOffset\n */\n\n ResultSet vHasil = oOpsBasisdata.fArrAmbilDataDbKondisi(\"\",\"\", \n \"tb_pelanggan\", \n new String[]{\"email\",\"sandi\"}, \n new String[]{\"email\"},\n \"nomor\", \n \"\", new String[]{\"0\",\"1\"},\"=\");\n\n /* keluaran permintaan */\n while(vHasil.next()){\n vEmailDB = vHasil.getString(\"email\");\n vSandiDB = vHasil.getString(\"sandi\");\n }\t\t\t\n \n System.out.println(vID + \"#\" + vEmailDB + \"#\" + \"#\" + vSandi + \"#\" + vSandiDB);\n /* mencocokkan data */\n if (vID != null && vEmailDB !=null && vSandi != null && vSandiDB != null) {\n \n /* sebelum divalidasi */\n /* apabila data POST sesuai dgn data dalam tabel basisdata: lupa password jadi di NOT */\n if(vID.equals(vEmailDB) && vSandi.equals(vSandiDB)){\n vKeluaran = true;\n }\n }\n }catch(SQLException | DOMException e){\n /* pencatatan sistem */\n if(ClsKonf.vKonfCatatSistem == true){\n String vNamaKelas = \"ClsPelanggan.java\";\n String vNamaMetode = \"fHalamanPelanggan\";\n String vCatatan = vNamaKelas + \"#\" + vNamaMetode + \"#\" + e.toString();\n /* obyek catat */\n ClsCatat oCatat = new ClsCatat();\n oCatat.fCatatSistem(ClsKonf.vKonfCatatKeOutput, \n ClsKonf.vKonfCatatKeBD, \n ClsKonf.vKonfCatatKeBerkas, \n vCatatan);\n }\n }\n \n /* debug nilai id dan password */\n //System.out.println(\"Belum divalidasi : \" + vID + \" = \" + vNamaDB + \" & \" + vSandi + \" = \" + vSandiDB);\n /* nilai keluaran */\n return vKeluaran;\n }", "Login.Req getLoginReq();", "private void login(Conversation conversation) {\n\t\tJsonObject lJsonObjIn = (JsonObject) conversation.getRequestBodyAsJSON();\n\t\t\n\t\tString lGebruikersnaam = lJsonObjIn.getString(\"username\");\t\t\t\t\t\t// Uitlezen van opgestuurde inloggegevens... \n\t\tString lWachtwoord = lJsonObjIn.getString(\"password\");\n\t\tMap<String, String> loginInfo = informatieSysteem.loginDetails(lGebruikersnaam,lWachtwoord);\n\n\t\tif(loginInfo.isEmpty())\n\t\t{\n\t\t\t//LOGIN FAILED !\n\t\t\tconversation.sendJSONMessage(\"{\\\"rol\\\":\\\"undefined\\\"}\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJsonObjectBuilder lJsonObjectBuilder = Json.createObjectBuilder();\n\t\t\tlJsonObjectBuilder.add(\"rol\", loginInfo.get(\"rol\"));\n\t\t\tlJsonObjectBuilder.add(\"voornaam\", loginInfo.get(\"voornaam\"));\n\t\t\tlJsonObjectBuilder.add(\"achternaam\", loginInfo.get(\"achternaam\"));\n\t\t\tlJsonObjectBuilder.add(\"identificatienummer\", loginInfo.get(\"identificatienummer\"));\t\t// en teruggekregen gebruikersrol als JSON-object...\n\t\t\tif(loginInfo.containsKey(\"group\")) lJsonObjectBuilder.add(\"group\", loginInfo.get(\"group\"));\n\t\t\tif(loginInfo.containsKey(\"klasnaam\")) lJsonObjectBuilder.add(\"klasnaam\", loginInfo.get(\"klasnaam\"));\n\t\t\tif(loginInfo.containsKey(\"klascode\")) lJsonObjectBuilder.add(\"klascode\", loginInfo.get(\"klascode\"));\n\t\t\tString lJsonOut = lJsonObjectBuilder.build().toString();\n\t\t\tconversation.sendJSONMessage(lJsonOut);\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t// terugsturen naar de Polymer-GUI!\n\t}", "public PanelLogin getLogin(){\n return login;\n }", "public static String logIn() {\n\t\tboolean flag;\n\t\tdo {\n\t\t\tflag = false;\n\t\t\ttry {\n\t\t\t\tResultSet rs = Messages.connect().executeQuery(\"SELECT B_Username, B_Password FROM BloodDonor\");\n\t\t\t\tusername_login = JOptionPane.showInputDialog(null,\"Welcome! Please type your username\", \"LOG IN\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\tpassword_login = JOptionPane.showInputDialog(null,\"Enter your password\", \"LOG IN\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\twhile (rs.next()){\n\t\t\t\t\tif (rs.getString(\"B_Username\").equals(username_login) && rs.getString(\"B_password\").equals(password_login)){\n\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\tif (flag == false){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid username or password. Please try again.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t}\n\t\t\t\tMessages.connect().close();\n\t\t\t } catch (InputMismatchException | SQLException e) {\n JOptionPane.showMessageDialog(null, \"Please enter a valid username or password.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n flag = false;\n }\n\t\n\t\t}while (flag == false);\n\t\treturn username_login;\n\t}", "private void LoginButtonActionPerformed(java.awt.event.ActionEvent evt) {\n String id = jTextField2.getText().toString();\n String password = jPasswordField1.getText();\n \n \n \n String getusername = jTextField2.getText().toString();\n String display=lms.DisplayName(getusername);\n System.out.println(display);\n switch (selected) {\n case 1:\n {\n boolean logincheck=lms.checkBorrowerLogin(id,password);\n if(logincheck){\n BorrowerHome b = new BorrowerHome(lms,display,id);\n b.setVisible(true);\n }\n break;\n }\n case 2:\n {\n boolean logincheck=lms.checkClerkLogin(id,password);\n if(logincheck){\n ClerkHome c = new ClerkHome(lms,display,id);\n c.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n case 3:\n { \n boolean logincheck=lms.checkLibrarianLogin(id,password);\n if(logincheck){\n LibrarianHome c = new LibrarianHome(lms,display,id);\n c.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n default:\n {\n boolean logincheck=lms.checkBorrowerLogin(id,password);\n if(logincheck){\n BorrowerHome b = new BorrowerHome(lms,display,id);\n b.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n }\n \n// else\n// {\n// JOptionPane.showMessageDialog(null,\"Invalid login\");\n// } \n\n \n }", "Label getLoginId();", "public void login (String pUsuario, int pDificultad)\n {\n nombreUsuario = pUsuario;\n dificultad = pDificultad;\n\n iniciarPartida();\n }", "public final void login() {\n Activity_ExtensionKt.hideSoftKeyboard(this);\n if (hasAllRequiredField()) {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n String obj = editText.getText().toString();\n if (obj != null) {\n this.username = StringsKt.trim((CharSequence) obj).toString();\n EditText editText2 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPassword\");\n String obj2 = editText2.getText().toString();\n if (obj2 != null) {\n this.password = StringsKt.trim((CharSequence) obj2).toString();\n LoginViewModel loginViewModel = this.viewModel;\n if (loginViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n EditText editText3 = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etUserName\");\n String obj3 = editText3.getText().toString();\n EditText editText4 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etPassword\");\n loginViewModel.login(obj3, editText4.getText().toString());\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n }", "public String quickLogin(String token, String email, String password, HttpServletRequest req, HttpServletResponse resp) {\r\n //1. user info\r\n List<String> data = new ArrayList<String>();\r\n log.info (\"[quickLogin] verify user: \" + token);\r\n String userInfo = \"\";\r\n if (token != null) {\r\n userInfo = this.userTokenVerify(token, req, resp);\r\n } else if (email != null || password != null) { \r\n userInfo = this.login(email, password, req, resp); \r\n } else {\r\n userInfo = this.guestRegister(req, resp);\r\n }\r\n if (this.getStatus(userInfo) != NnStatusCode.SUCCESS) {\r\n return userInfo;\r\n } \r\n String sphere = \"en\";\r\n Pattern pattern = Pattern.compile(\".*sphere\\t((en|zh)).*\", Pattern.DOTALL);\r\n Matcher matcher = pattern.matcher(userInfo);\r\n if (matcher.matches()) {\r\n sphere = matcher.group(1);\r\n } \r\n data.add(userInfo);\r\n //2. channel lineup\r\n log.info (\"[quickLogin] channel lineup: \" + token);\r\n String lineup = this.channelLineup(token, null, null, false, null, true, false, false, false, null, req);\r\n data.add(lineup);\r\n if (this.getStatus(lineup) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //3. featured curators\r\n log.info (\"[quickLogin] featured curators\");\r\n String curatorInfo = this.curator(null, null, \"featured\", req);\r\n data.add(curatorInfo);\r\n //4. trending\r\n log.info (\"[quickLogin] trending channels\");\r\n String trending = this.channelStack(Tag.TRENDING, sphere, token, null, false);\r\n data.add(trending);\r\n if (this.getStatus(trending) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //5. recommended\r\n log.info (\"[quickLogin] recommended channels\");\r\n String recommended = this.channelStack(Tag.RECOMMEND, sphere, token, null, false); \r\n data.add(recommended);\r\n if (this.getStatus(recommended) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //6. featured\r\n log.info (\"[quickLogin] featured channels\");\r\n String featured = this.channelStack(Tag.FEATURED, sphere, token, null, false);\r\n data.add(featured);\r\n if (this.getStatus(featured) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //7. hottest\r\n log.info (\"[quickLogin] hot channels\");\r\n String hot = this.channelStack(Tag.HOT, sphere, token, null, false);\r\n data.add(hot);\r\n if (this.getStatus(hot) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //8. category top level\r\n // log.info (\"[quickLogin] top level categories: \" + ((sphere == null) ? \"default\" : sphere));\r\n // hardcoding to English for now, and keeping translations on the player side\r\n log.info (\"[quickLogin] top level categories: en\");\r\n String categoryTop = this.category (null, \"en\", false);\r\n data.add(categoryTop);\r\n return this.assembleSections(data);\r\n }", "public interface LoginDataProviders extends BaseDataProvider {\n\n String ALREADY_HAVE_PASSWORD = \"Already have a password?\";\n String FIRST_TIME_HERE = \"First time here? Need a password?\";\n String ERROR_PASSWORD_FIELD = \"//label[@class='error'][@for='trainee-login-name']\";\n String ERROR_RECRUIT_ID_FIELD = \"//label[@class='error'][@for='trainee-login-id']\";\n String firstTimeHereLink = TRAINEE_FIRS_LOGIN_FORM + FOLLOWING_SIBLING_P + ROLE_SWITCHER_LINK;\n String alreadyHavePasswordLink = TRAINEE_LOGIN_FORM + FOLLOWING_SIBLING_P + ROLE_SWITCHER_LINK;\n String RECRUIT_ID_FIELD = TRAINEE_LOGIN_FORM + FOLLOWING_SIBLING_DIV + TRAINEE_RECRUIT_ID_FIELD;\n String TRAINEE_PASSWORD_FIELD = TRAINEE_LOGIN_FORM + FOLLOWING_SIBLING_DIV + TRAINEE_LOGIN_NAME_FIELD;\n String TRAINEE_LOGIN_BUTTON = TRAINEE_LOGIN_FORM + FOLLOWING_SIBLING_DIV + LOGIN_BUTTON;\n\n}", "@Override\n\tpublic void onLoginSuccess() {\n\t\t\n\t}", "@Override\n\t\tpublic String checkLogin(String name, String password) {\n\t\t\treturn null;\n\t\t}", "public LiveData<SoclData> extLogin(Context mContext, String p, String at) {\n //we will load it asynchronously from server in this method\n loginRepo.extLogin(mContext,p, at);\n loginExt = loginRepo.getLoginExt();\n return loginExt;\n }", "@FXML\n\tpublic void logIn() throws SQLException {\n\t\tboolean flag = false;\n\t\tConnection tempCon = DBConnection.getConnection();\n\t\tString sql = \"{ ? =call login_verify(?,?)}\";\n\t\tCallableStatement stmt = tempCon.prepareCall(sql);\n\t\tstmt.setString(2, email.getText());\n\t\tstmt.setString(3, pass.getText());\n\t\tstmt.registerOutParameter(1, Types.INTEGER);\n\t\t\n\t\tstmt.execute();\n\t\tint temp = stmt.getInt(1);\n\t\tSystem.out.println(temp);\n\t\tif(temp==0) {\n\t\t\t\n\t\t\tlogStatus.setText(\"Login Failed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tMain.cusID = temp;\n\t\t\tFXMLLoader Loader = new FXMLLoader();\n\t\t\tLoader.setLocation(getClass().getResource(\"/application/searchByLocation.fxml\"));\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoader.load();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tParent root = Loader.getRoot();\n\t\t\tScene scene = new Scene(root,600,600);\n\t\t\tMain.window.setScene(scene);\n\t\t\tMain.window.show();\n\t\t}\n\t\t\n\t\ttempCon.close();\n\t\t\n\t}", "public String authentification(){\r\n\t\t\r\n\t\tString v$navigation = null;\r\n\t\ttry {\r\n\t\t\tTabUsr\tusr = AdminSvcoDeleguate.getSvcoUsr().authenticate(defaultVue.getLogin(), defaultVue.getPassword());\r\n\t\t\tif(usr != null && usr.getCodUsr() != null && !usr.getPwdExpire()){\r\n\t\t\t\t// Navigation vers le formulaire d'acceuil\r\n\t\t\t\tdefaultVue.setUser(usr);\r\n\t\t\t\tv$navigation = \"AcceuilDeBase\";\r\n\t\t\t}else if(usr != null && usr.getPwdExpire()){\r\n\t\t\t\tFacesUtil.addWarnMessage(\"Votre mot de passe a expiré : veuillez contacter l'administrateur\", \"Votre mot de passe a expiré : veuillez contacter l'administrateur\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tFacesUtil.addWarnMessage(\"Login/Mot de passe incorrect\", \"Login/Mot de passe incorrect\");\r\n\t\t\t}\r\n\t\t} catch (SysGehoAppException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ServiceLocatorException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn v$navigation;\r\n\t}" ]
[ "0.6475373", "0.62436867", "0.6226275", "0.6214796", "0.6195319", "0.61560667", "0.6153273", "0.6137455", "0.6124847", "0.60880935", "0.6087765", "0.6043154", "0.6025931", "0.6012058", "0.60034233", "0.5998941", "0.599206", "0.5986688", "0.59501445", "0.59227806", "0.5913299", "0.58968437", "0.5895967", "0.58820236", "0.58777905", "0.5876763", "0.58637", "0.5863316", "0.58628094", "0.5842865", "0.5841221", "0.5840344", "0.58401084", "0.58370864", "0.58256876", "0.5811697", "0.5805358", "0.58012164", "0.5789651", "0.5787565", "0.57656306", "0.5749921", "0.57487863", "0.5747051", "0.5737138", "0.57352227", "0.572751", "0.57238215", "0.57116735", "0.5711596", "0.5699009", "0.5699009", "0.56897056", "0.56896883", "0.5685538", "0.568496", "0.56719035", "0.5665693", "0.5662619", "0.5661992", "0.565703", "0.5649334", "0.5638478", "0.5633076", "0.56217915", "0.5618758", "0.5618417", "0.56117576", "0.56086123", "0.56034654", "0.5602173", "0.5597212", "0.5595045", "0.557863", "0.5576279", "0.5576122", "0.55662274", "0.55618095", "0.55576575", "0.55565107", "0.5554315", "0.55542296", "0.5551521", "0.55513924", "0.5551", "0.5550407", "0.5549753", "0.5544993", "0.5541377", "0.55372715", "0.5532027", "0.55299", "0.55268884", "0.55209225", "0.55184734", "0.55124784", "0.5512394", "0.55115646", "0.5509245", "0.5507116" ]
0.6557404
0
fehlermeldung( String fMeldung) / Generierung der Fehlermeldung
public void fehlermeldung(String fMeldung) { AlertDialog.Builder b = new AlertDialog.Builder(SpielLottoActivity.this); b.setMessage(fMeldung); b.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); b.create().show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendeFehlerHelo();", "public DataDiFineTirocinioNonValidaException(String messaggio) {\r\n super(messaggio);\r\n }", "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "public void InvalidFormat();", "public void falschesSpiel(SpielException e);", "String errorMessage();", "void invalid() {\n\t\tSystem.out.println(\"falsche Eingabe...\");\n\t}", "public TemperaturaErradaExcepcion(){\r\n super(\"mensaxe por defecto:temperatura ten que ser naior que 80ºC\");//mensaxe por defecto\r\n }", "@Override\n protected void adicionarLetrasErradas() {\n }", "String getErrorMessage();", "String getErrorMessage();", "String getInvalidMessage();", "private void error(String string) {\n\t\r\n}", "public RoomTidakDitemukanException(Hotel hotel_input,String room_input){\n super(\"Kamar yang terletak di : \");\n hotel_error=hotel_input;\n room_error=room_input;\n }", "@Override\n\tpublic String getMessage() {\n\t\treturn \"ATTENZIONE: nel progetto Eccezioni Java si è verificato un errore!\";\n\t}", "@Override\r\n\tprotected void processError() {\n\t\tsuper.processError();\r\n\t\tshowToast(error_generico_process);\r\n\t}", "@Override\n public String getPesan()\n {\n return super.getMessage() + hotel_error + \" tidak ditemukan\";\n }", "void mo1332e(String str, String str2, Throwable th);", "void showResultMoError(String e);", "private void auswahlFreundVeraendern() throws Exception {\n System.out.println(\"Bitte Namen oder Vornamen eingeben und dann RETURN eingeben\");\n\n Scanner input = new Scanner(System.in);\n String eingabe = input.nextLine();\n\n Freund foundFriend = einenFreundSuchen(eingabe); // sollte freund returnen\n if (foundFriend == null) {\n System.out.println(eingabe + \" wurde nicht gefunden.\");\n auswahlAnzeigen();\n }\n\n System.out.println(\"Wir haben diesen Freund gefunden: \" + foundFriend.getName());\n System.out.println(\"Moechtest du diesen Freund veraendern?\");\n System.out.println(\"<1> Ja\");\n System.out.println(\"<2> Nein\");\n\n if (input.hasNextInt()) {\n String auswahl = input.next();\n switch (auswahl) {\n case \"1\": {\n bearbeiten(foundFriend);\n break;\n }\n case \"2\": {\n auswahlAnzeigen();\n break;\n }\n }\n }\n\n auswahlAnzeigen();\n }", "public JDBFException (String message){\r\n super(Messages.message(message));\r\n }", "public FileFormatException() {\r\n super();\r\n }", "private static void generateError(int i, int j, int k) {\n\t\t\n\t\tswitch(i) {\n\t\t\n\t\t\tcase 0: // CHEP\n\t\t\t\tswitch(k) {\n\t\t\t\t\tcase 1: // date\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid invoice number. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;;\n\t\t\t\t\tcase 2: // date\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid date. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid region. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\terr_msg = \"Error: The percentages of total invoices are invalid. The sum of all percentages should be 100%\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid net total. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tcase 1: // Delivery\n\t\t\t\tswitch(k) {\n\t\t\t\tcase 2: \n\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid date. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\treturn;\n\t\t\t\tcase 4:\n\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid amount. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\treturn;\n\t\t\t\tcase 5: \n\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid reference number. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\treturn;\n\t\t\t\tcase 6:\n\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid delivery date. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\treturn;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tswitch(k) {\n\t\t\t\t\tcase 2: \n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid date. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid amount. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 5: \n\t\t\t\t\t\terr_msg = \"Error: Invoice Entry Number \" + j+1 + \" has an invalid reference number. [Value Entered: '\" + data[j][k] +\"']\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "String getErrorMessage(E input);", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "void mo1335i(String str, String str2, Throwable th);", "int mo23350e(String str, String str2, Throwable th);", "String getGetErrorMessage();", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "private void correctError()\r\n\t{\r\n\t\t\r\n\t}", "@Override\n\tpublic void setWrongError() {\n\t\t\n\t}", "@Override\n\tpublic String doError() {\n\t\treturn null;\n\t}", "public String error();", "public DatumException(String boodschap) {\n super(boodschap);\n }", "public void kaufen(BesitzrechtFeld feld) {\n try {\n System.out.println(\"Dein aktueller Kontostand beträgt: \" + getKontostand());\n System.out.println(\"Die kosten für: \" + feld.getFeldname() + \" (\" + feld.getFarbe() + \") betragen :\" + feld.getGrundstueckswert());\n System.out.println(\"Möchtest du kaufen? (ja/nein)\");\n String eingabe = br.readLine();\n if (eingabe.trim().toLowerCase().equals(\"status\")) {\n eingabe = meinStatus();\n\n }\n if (eingabe.trim().toLowerCase().equals(\"ja\")) {\n if (einzahlen(feld.getGrundstueckswert())) {\n feld.setGekauft(true);\n feld.setSpieler(this);\n felderInBesitz.add(feld);\n switch (feld.getFarbe()) {\n case \"braun\":\n braun.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + braun.size() + \" von 2 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (braun.size() == 2) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(braun);\n break;\n }\n break;\n case \"hellblau\":\n hellblau.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + hellblau.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (hellblau.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(hellblau);\n break;\n }\n break;\n case \"pink\":\n pink.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + pink.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (pink.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(pink);\n break;\n }\n break;\n case \"orange\":\n orange.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + orange.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (orange.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(orange);\n break;\n }\n break;\n case \"rot\":\n rot.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + rot.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (rot.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(rot);\n break;\n }\n break;\n case \"gelb\":\n gelb.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + gelb.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (gelb.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(gelb);\n break;\n }\n break;\n case \"grün\":\n grün.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + grün.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (grün.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(grün);\n break;\n }\n break;\n case \"dunkelblau\":\n dunkelblau.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + dunkelblau.size() + \" von 2 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (dunkelblau.size() == 2) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(dunkelblau);\n break;\n }\n break;\n case \"bahnhof\":\n bahnhoefe.add((Bahnhof) feld);\n System.out.println(\"Du hast den Bahnhof: \" + feld.getFeldname() + \" gekauft!\");\n System.out.println(\"Du hast \" + bahnhoefe.size() + \" von 4 Bahnhöfen in deinem Besitz\");\n Bahnhof b = (Bahnhof) feld;\n b.mieteÄndernBahnhof(bahnhoefe);\n\n break;\n case \"werk\":\n werke.add(feld);\n System.out.println(\"Du hast das Werk: \" + feld.getFeldname() + \" gekauft!\");\n System.out.println(\"Du hast \" + werke.size() + \" von 2 Werken in deinem Besitz\");\n break;\n default:\n System.out.println(\"Feld konnte keiner Farbe/Kategorie zugeordnet werden\");\n\n }\n\n }\n System.out.println(\"Dein neuer Kontostand beträgt: \" + getKontostand());\n }\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\r\n public String getMessage() {\r\n return ErrorMessage.STATUS_FORMATTING_IN_FILE_ERROR;\r\n }", "public void mo1963f() throws cf {\r\n }", "String getException();", "String getException();", "@Override\n\tprotected String generateMessage() {\n\t\treturn \"Script evaluation exception \" + generateSimpleMessage();\n\t}", "DataNotFoundMessage()\n\t{\n\t\t\n\t}", "@DefaultMessage(\"A record with this value already exists. Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueException\")\n String gen_fieldUniqueException();", "public abstract String mensajeCrearCelula();", "public FileFormatException(String message) {\r\n super(message);\r\n }", "public void stinException(String nameField, Editable stringAnalize, int max) throws Exceptions {\n if(stringAnalize.toString().isEmpty()){\n throw new Exceptions(\"You need to insert the \"+nameField);\n }\n if(stringAnalize.length()>max){\n throw new Exceptions(\"You need to insert less than \"+max+\" characters\");\n }\n try{\n if(Double.parseDouble(stringAnalize.toString())!=321312.123) {\n throw new Exceptions(\"The \" + nameField + \" could not be a number\");\n }\n }catch(Exceptions fs){\n throw new Exceptions(\"The \" + nameField + \" could not be a number\");\n }catch(Exception e){\n }\n }", "abstract void error(String error);", "public InvalidFileFormatException(String message){\n super(message);\n }", "public String getFuenteError() {\n\t\treturn fuenteError;\n\t}", "public void m23078a(String str, Exception exception) {\n }", "@ResponseBody\n @ExceptionHandler(InvalidFieldFormatException.class)\n @ResponseStatus(HttpStatus.BAD_REQUEST)\n String wrongFieldFormatHandler(InvalidFieldFormatException ex) {\n return ex.getMessage();\n }", "public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }", "@Override\r\n public void visit(ErrorMessage n, functionStruct fStruct) {\r\n \r\n }", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "private void auswahlAnzeigen() throws Exception {\n System.out.println(\"Bitte Zahl und dann RETURN eingeben:\");\n System.out.println(\"<1> Freund anlegen\");\n System.out.println(\"<2> Freund suchen\");\n System.out.println(\"<3> Freund veraendern\");\n System.out.println(\"<4> Freund loeschen\");\n System.out.println(\"<5> Anzahl gespeicherter Freunde angeben\");\n System.out.println(\"<6> Telefonliste ausgeben\");\n System.out.println(\"<7> Beenden\");\n auswahlAuswerten();\n }", "void mo1330d(String str, String str2, Throwable th);", "void mo1343w(String str, String str2, Throwable th);", "java.lang.String getErr();", "private static void fail(String filename, String errMsg, Module_itemContext itemCon)\n\t\t\tthrows UnsupportedGrammerException {\n\n\t\tInterval int1 = itemCon.getSourceInterval(); // get token interval\n\n\t\tToken firstToken = tokenStream.get(int1.a);\n\n\t\tint lineNum = firstToken.getLine(); // get line of first token\n\n\t\t// Determining j, first token in int1 which occurs at a different line\n\n\t\tint j;\n\n\t\tfor (j = int1.a; j < int1.b; j++) {\n\n\t\t\tif (tokenStream.get(j).getLine() != lineNum)\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// form a string from tokens 1 through j-1\n\n\t\tString tokenStr = tokenStream.getText(new Interval(int1.a, j));\n\n\t\tSystem.err.printf(\"Parser error (%s:%d): %s\\n\", filename, lineNum, tokenStr);\n\n\t\tfail(errMsg);\n\n\t}", "java.util.List<WorldUps.UErr> \n getErrorList();", "void showErrorMsg(String string);", "void berechneFlaeche() {\n\t}", "int mo23348d(String str, String str2, Throwable th);", "private void inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void error();", "@DefaultMessage(\"Field is required\")\n @Key(\"gen.fieldRequiredException\")\n String gen_fieldRequiredException();", "public void mo1964g() throws cf {\r\n }", "public String getError() {\n\treturn mistake;\n }", "public String createErrorMessage(CommandSender sender, MCommand command);", "public void mo1966i() throws cf {\r\n }", "public void schreibeFreizeitbaederInTxtDatei()\r\n\t\t throws IOException{\r\n\t\t\t WriterCreator writerCreator = new ConcreteTxtWriterCreator();\r\n\t\t\t WriterProduct writerProduct = writerCreator.factoryMethod();\r\n\t\t\t //Praktikum 4\r\n \t\t\tthis.getFreizeitbaeder().forEach((fzb) -> {\r\n \t\t\t\ttry {\r\n \t\t\t\t\twriterProduct.fuegeInDateiHinzu(fzb);\r\n \t\t\t\t} catch (IOException e) {\r\n \t\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t\twriterProduct.schliesseDatei();\t\t \r\n }", "public void wuerfeln() {\n if (istGefängnis) {\n setIstGefängnis(false);\n if (aktuellesFeldName instanceof GefängnisFeld && !(aktuellesFeldName instanceof NurZuBesuchFeld)) {\n GefängnisFeld g = (GefängnisFeld) aktuellesFeldName;\n g.gefaengnisAktion(this);\n \n return;\n }\n\n } else {\n String[] worte = {\"Eins\", \"Zwei\", \"Drei\", \"Vier\", \"Fünf\", \"Sechs\", \"Sieben\", \"Acht\", \"Neun\", \"Zehn\", \"Elf\", \"Zwölf\"};\n\n wuerfelZahl = getRandomInteger(12, 1);\n\n this.aktuellesFeld = this.aktuellesFeld + wuerfelZahl + 1;\n if (this.aktuellesFeld >= 40) {\n setAktuellesFeld(0);\n\n }\n\n System.out.println(worte[wuerfelZahl] + \" gewürfelt\");\n\n aktuellesFeldName = spielfigurSetzen(this.aktuellesFeld);\n System.out.println(\"Du befindest dich auf Feld-Nr: \" + (this.aktuellesFeld));\n boolean check = false;\n for (Spielfelder s : felderInBesitz) {\n if (aktuellesFeldName.equals(s)) {\n check = true;\n }\n }\n\n if (!check) {\n aktuellesFeldName.spielfeldAktion(this, aktuellesFeldName);\n } else {\n System.out.println(\"Das Feld: \" + aktuellesFeldName.getFeldname() + \"(Nr: \" + aktuellesFeldName.getFeldnummer() + \")gehört dir!\");\n if (aktuellesFeldName instanceof Straße) {\n Straße strasse = (Straße) aktuellesFeldName;\n System.out.println(\"Farbe: \" + strasse.getFarbe());\n try {\n strasse.hausBauen(this, strasse);\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n }\n }\n }", "public FieldNotFoundException(String msg) {\n super(msg);\n }", "@Test\n public void testSetFila() {\n System.out.println(\"setFila\");\n try {\n asientoTested.setFila('A');\n } catch (IllegalArgumentException e) {\n fail(\"Caracter 'A' deberia ser valido\");\n }\n try {\n asientoTested.setFila('a');\n } catch (IllegalArgumentException e) {\n fail(\"Caracter 'a' deberia ser valido\");\n }\n try {\n asientoTested.setFila(Character.MIN_VALUE);\n fail();\n } catch (IllegalArgumentException e) {\n assertTrue(\"Character.MIN_VALUE no deberia ser valido\", true);\n }\n try {\n asientoTested.setFila('ñ');\n fail();\n } catch (IllegalArgumentException e) {\n assertTrue(\"Caracter ñ no deberia ser valido\", true);\n }\n // TODO review the generated test code and remove the default call to fail.\n }", "public abstract void showInitError(String s);", "@Override\n\t\tpublic void setInvalidMess(String errmess) {\n\n\t\t}", "private static String getMessage(int code) {\n switch (code) {\n case ME_DIV_BY_ZERO:\n return \"Attempt to divide by zero.\";\n case ME_ASSIGNLITERAL:\n return \"Attempt to assign to a literal.\";\n case ME_NONVARASSIGN:\n return \"Attempt to assign to a non-variable.\";\n default:\n return \"Unknown error.\";\n }\n }", "public java.lang.String getFteReasonCode(){\n return localFteReasonCode;\n }", "public void error(String string) {\n\t\t\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"com.cg.Exercise4Exception\"+super.getMessage();\r\n\t}", "public HotelTidakDitemukanException(int hotel_input)\n {\n // initialise instance variables\n super(\"Hotel dengan ID : \");\n hotel_error = hotel_input;\n }", "void mo1341v(String str, String str2, Throwable th);", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"홀수입력 !!\";\r\n\t}", "public abstract void fazerCoisa( String string );", "private void neuAnlegen() throws Exception {\n Scanner eingabe = new Scanner(System.in);\n System.out.print(\"Vorname eingeben: \");\n String vorname = eingabe.next();\n System.out.print(\"Nachname eingeben: \");\n String nachname = eingabe.next();\n System.out.print(\"Geburtstag eingeben: \");\n String geburtstag = eingabe.next();\n System.out.print(\"Handy Nummer eingeben: \");\n String handy = eingabe.next();\n System.out.print(\"Telefon Nummer eingeben: \");\n String telefon = eingabe.next();\n System.out.print(\"Adresse eingeben: \");\n String adresse = eingabe.next();\n String schluessel = UUID.randomUUID().toString();\n\n // Erstellung einer neuen Instanz der Klasse Freund\n Freund f1 = new Freund(vorname, nachname, geburtstag, telefon, handy, adresse, schluessel);\n\n speichern(f1);\n\n System.out.println(\"Der Freund \" + vorname + \" \" + nachname + \" wurde in der Kartei angelegt.\");\n\n auswahlAnzeigen();\n }", "@Override\n\t\tpublic void loadError() {\n\t\t}", "public Frage(String zeile){\n // auftrennen des Strings am Trennzeichen ;\n try {\n\t\t\tString[] parts = zeile.split(\";\");\n\n\t\t\t// die drei Antworten\n\t\t\tLinkedList<String> antworten = new LinkedList<String>();\n\t\t\tantworten.add(parts[1]);\n\t\t\tantworten.add(parts[2]);\n\t\t\tantworten.add(parts[3]);\n\n\t\t\tthis.frageText = parts[0];\n\t\t\tthis.antworten = antworten;\n\t\t\tthis.korrekteAntwort = Integer.parseInt(parts[4]);\n\t\t\tthis.id = counter++;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Zeile fehlerhaft!\");\n\t\t\treturn;\n\t\t}\n }", "public DialogoAggiungiFissi() {\n /* rimanda al costruttore della superclasse */\n super();\n\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }" ]
[ "0.7095468", "0.6282489", "0.6068008", "0.6043774", "0.60182464", "0.5960773", "0.589706", "0.58638614", "0.58613884", "0.58470565", "0.58470565", "0.583377", "0.58103", "0.57909954", "0.5755275", "0.5751663", "0.57233363", "0.5706235", "0.5684067", "0.5679111", "0.5652508", "0.5651997", "0.56470096", "0.5645374", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5639479", "0.5637322", "0.5632969", "0.56316525", "0.5624062", "0.5624062", "0.5624062", "0.5622388", "0.5620174", "0.55963045", "0.5574035", "0.5571438", "0.55709803", "0.5525711", "0.5520439", "0.55185384", "0.55185384", "0.5507921", "0.548972", "0.5484796", "0.54834676", "0.54789233", "0.54752195", "0.54742473", "0.5471891", "0.54710394", "0.546888", "0.5465329", "0.54618335", "0.54512155", "0.5449251", "0.5446888", "0.54461634", "0.5442718", "0.5438624", "0.5420815", "0.54133385", "0.5413006", "0.54035264", "0.54021925", "0.5395391", "0.53902155", "0.5388385", "0.53812516", "0.53785616", "0.53768194", "0.53761476", "0.5375244", "0.5374735", "0.53740436", "0.5370453", "0.536621", "0.53626096", "0.53616667", "0.5358088", "0.53548366", "0.5352446", "0.5350495", "0.53446466", "0.53441215", "0.5343764", "0.5342821", "0.53416663", "0.5341526", "0.5337696" ]
0.67663693
1
vergleichVorratErgebnisErgebnis() / Vergleich der abgegebenen 3 Zahlen mit den (random/zufall) generierten 3 Lotto Zahlen
public StringBuilder vergleichVorratErgebnisErgebnis() // result is a String of LoginID, these win this Game { Intent callerIntent = getIntent(); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); // implement Array VorrErg and LogID String [] VorErg = new String [packageFromSpiel.getInt("MaxSpieler")+5]; int [] LogID = new int [packageFromSpiel.getInt("MaxSpieler")+5]; String Ergebnis_to_Compare = getErgebnisDerSpielID(); Object [] array_VorErg = getListHatVorratErgebnisGleicheSpielID().toArray(); for (int i=0; i<array_VorErg.length;i++) { // split elements in array_VorrErg to 2 new Array String [] arr = array_VorErg[i].toString().trim().split(" "); LogID[i]= Integer.parseInt(arr [0]); //################################################## VorErg[i] = arr[1]; } StringBuilder List_IDGewinner = new StringBuilder(); for (int j=0; j<packageFromSpiel.getInt("MaxSpieler"); j++) { if((Ergebnis_to_Compare.trim()).equals(VorErg[j].trim())) { List_IDGewinner.append(LogID[j]+" "); } else {continue;} } return List_IDGewinner ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void maakNieuweDoolhof()\n {\n /*hzs: hoek zonder schat\n hms: hoek met schat\n r: recht stuk\n t: T-kruispunt met schat*/\n //vaste aantallen vakjes\n int hzs = 10, hms = 6, r = 11, t = 6;\n List<String> schatten = sch.getSchatten();\n List<String> tSchatten = schatten.subList(12, 18);\n Collections.shuffle(tSchatten);\n List<String> hSchatten = schatten.subList(18, 24);\n Collections.shuffle(hSchatten);\n\n int hKaartTeller = 0, tKaartTeller = 0;\n\n //losse vakken random invullen\n //oneven rijen\n for (int h = 0; h <= 6; h += 2)\n {\n for (int i = 1; i <= 5; i += 2)\n {\n int kaart = (int) (1 + (Math.random() * 4));\n switch (kaart)\n {\n case 1:\n if (hzs > 0)\n {\n this.gangkaarten[h][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, false);\n hzs--;\n } else\n {\n i--;\n }\n break;\n case 2:\n if (hms > 0)\n {\n this.gangkaarten[h][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, hSchatten.get(hKaartTeller), false);\n hms--;\n hKaartTeller++;\n } else\n {\n i--;\n }\n break;\n case 3:\n if (r > 0)\n {\n this.gangkaarten[h][i] = new RechtKaart((int) Math.floor(Math.random() * 4) + 1, false);\n r--;\n } else\n {\n i--;\n }\n break;\n case 4:\n if (t > 0)\n {\n this.gangkaarten[h][i] = new TKaart((int) Math.floor(Math.random() * 4) + 1, tSchatten.get(tKaartTeller), false);\n t--;\n tKaartTeller++;\n } else\n {\n i--;\n }\n break;\n\n }\n }\n }\n\n //even rijen\n for (int j = 1; j <= 5; j += 2)\n {\n for (int i = 0; i <= 6; i++)\n {\n int kaart = (int) (1 + (Math.random() * 4));\n switch (kaart)\n {\n case 1:\n if (hzs > 0)\n {\n this.gangkaarten[j][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, false);\n hzs--;\n } else\n {\n i--;\n }\n break;\n case 2:\n if (hms > 0)\n {\n this.gangkaarten[j][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, hSchatten.get(hKaartTeller), false);\n hms--;\n hKaartTeller++;\n } else\n {\n i--;\n }\n break;\n case 3:\n if (r > 0)\n {\n this.gangkaarten[j][i] = new RechtKaart((int) Math.floor(Math.random() * 4) + 1, false);\n r--;\n } else\n {\n i--;\n }\n break;\n case 4:\n if (t > 0)\n {\n this.gangkaarten[j][i] = new TKaart((int) Math.floor(Math.random() * 4) + 1, tSchatten.get(tKaartTeller), false);\n t--;\n tKaartTeller++;\n } else\n {\n i--;\n }\n break;\n\n }\n }\n }\n }", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "private Zivocich vytvorZivocicha() {\r\n final String[] zFarba = {\"cervena\", \"zelena\", \"modra\", \"zlta\", \"zlto-zelena\"};\r\n Zivocich zviera = null;\r\n double kolkoVazi = 0.0;\r\n\r\n //-- Vygenerujeme zviera\r\n int vygenerovane = 1 + generator.nextInt(4); //cislo <1,4>\r\n\r\n switch (vygenerovane) {\r\n case 1: //blcha \r\n double kolkoDoskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n double kolkoVyskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n zviera=new Blcha(6,kolkoDoskoci,kolkoVyskoci);\r\n break;\r\n case 2: //simpanz\r\n kolkoVazi=3 + (97 * generator.nextDouble()); //cislo <3;99.9>\r\n boolean cviceny;\r\n cviceny=generator.nextBoolean(); \r\n zviera=new Simpanz(kolkoVazi,cviceny);\r\n break;\r\n case 3: //papagaj\r\n kolkoVazi = 0.1 + (5*generator.nextDouble()); // cislo <0.1; 6>\r\n String farba = zFarba[generator.nextInt(5)]; // farba zo zoznamu\r\n zviera = new Papagaj(\"Ara\", 2, kolkoVazi, farba); \r\n break;\r\n case 4: //slon\r\n kolkoVazi=20 + (480*generator.nextDouble()); //cislo <20;500> \r\n int pocet=generator.nextInt(50); //pocet zubov bude <0,49>\r\n zviera=new Slon(kolkoVazi,pocet);\r\n break;\r\n } //------------------------------------------------------------- switch --\r\n return zviera;\r\n }", "private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "public static Vakje balletjeLatenGooien(Vakje[] vakje) {\n\t\t\r\n\t\t\r\n\t\tint randomGetal = rand.nextInt(37);\r\n\t\tVakje randomVakje = vakje[randomGetal]; \r\n\t\t\r\n\t\treturn randomVakje; \r\n\t}", "public void genererchemin() {\r\n\t\tRandom hauteur1 = new Random();\r\n\t\tRandom longueur2 = new Random();\r\n\t\tRandom choix = new Random();\r\n\t\tArrayList chemin = new ArrayList();\r\n\t\tSystem.out.println(this.getHauteur());\r\n\t\tSystem.out.println(this.getLargeur());\r\n\t\tint milieu = getLargeur() / 2;\r\n\t\t//System.out.println(milieu);\r\n\t\tCoordonnees c = new Coordonnees(milieu, hauteur1.nextInt(\r\n\t\t\t\tgetLargeur()));\r\n\t\tchemin.add(c);\r\n\t\tchemin.add(new Coordonnees(0, 0));\r\n\t\tchemin.add(new Coordonnees(getLargeur() - 1, getHauteur() - 1));\r\n\t\tCoordonnees droite = new Coordonnees(milieu + 1, c.getHauteur());\r\n\t\tchemin.add(droite);\r\n\t\tCoordonnees gauche = new Coordonnees(milieu - 1, c.getHauteur());\r\n\t\tchemin.add(gauche);\r\n\t\tCoordonnees base1 = new Coordonnees(0, 0);\r\n\t\tCoordonnees base2 =new Coordonnees(getLargeur() - 1, getHauteur() - 1);\r\n\r\n\t\twhile (!gauche.equals(base1)) {\r\n\t\t\tif (gauche.getLargeur() == 0) {\r\n\t\t\t\tgauche = new Coordonnees(0, gauche.getHauteur() - 1);\r\n\t\t\t\tchemin.add(gauche);\r\n\t\t\t} else if (gauche.getHauteur() == 0) {\r\n\t\t\t\tgauche = new Coordonnees(gauche.getLargeur() - 1, 0);\r\n\t\t\t\tchemin.add(gauche);\r\n\t\t\t}\r\n\t\t\telse if (choix.nextInt(2) == 0) {\r\n\t\t\t\tgauche = new Coordonnees(gauche.getLargeur() - 1, \r\n\t\t\t\t\t\tgauche.getHauteur());\r\n\t\t\t\tchemin.add(gauche);\r\n\t\t\t} else {\r\n\t\t\t\tgauche = new Coordonnees(gauche.getLargeur(), \r\n\t\t\t\t\t\tgauche.getHauteur() - 1);\r\n\t\t\t\tchemin.add(gauche);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\twhile (!droite.equals(base2)) {\r\n\t\t\tif (droite.getLargeur() == (this.largeur -1)) {\r\n\t\t\t\tdroite = new Coordonnees(droite.getLargeur(), \r\n\t\t\t\t\t\tdroite.getHauteur() + 1);\r\n\t\t\t\tchemin.add(droite);\r\n\r\n\t\t\t} else if (droite.getHauteur() == (this.hauteur -1)) {\r\n\t\t\t\tdroite = new Coordonnees(droite.getLargeur() + 1, \r\n\t\t\t\t\t\tdroite.getHauteur());\r\n\t\t\t\tchemin.add(droite);\r\n\t\t\t\t//System.out.println(\"fais chier\");\r\n\t\t\t}\r\n\t\t\telse if (choix.nextInt(2) == 0) {\r\n\t\t\t\tdroite = new Coordonnees(droite.getLargeur() + 1, \r\n\t\t\t\t\t\tdroite.getHauteur());\r\n\t\t\t\tchemin.add(droite);\r\n\t\t\t} else {\r\n\t\t\t\tdroite = new Coordonnees(droite.getLargeur(), \r\n\t\t\t\t\t\tdroite.getHauteur() + 1);\r\n\t\t\t\tchemin.add(droite);\r\n\t\t\t}\r\n\t\t}\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Quel est le pourcentage d'obstacle souhaite :\");\r\n\t\tint pourcentage = sc.nextInt();\r\n\t\tint ctp = getHauteur() * getLargeur() * pourcentage / 100;\r\n\t\twhile(ctp >0){\r\n\t\t\tCoordonnees obstacle = new Coordonnees(longueur2.nextInt(getLargeur()), \r\n\t\t\t\t\thauteur1.nextInt(getHauteur()));\r\n\t\t\t//System.out.println(!chemin.contains(obstacle));\r\n\t\t\tif (!chemin.contains(obstacle)) {\r\n\t\t\t\tthis.plateau[obstacle.getHauteur()][obstacle.getLargeur()] = new Obstacle(\r\n\t\t\t\t\t\tobstacle.getHauteur(), obstacle.getLargeur());\r\n\t\t\t\tctp--;\r\n\t\t\t} else {\r\n\t\t\t\t//System.out.println(obstacle + \"est sur le chemin\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int lanzar(int n){\n int result = (int) (Math.random()* 6) + 1;\r\n if(result !=n ) result = (int) (Math.random()* 6) + 1;\r\n return result;\r\n \r\n /*\r\n * int result = (int) (Math.random()*9)+1;\r\n * if (result > 0 && result < 7) return result;\r\n * else if(result > 6 && result < 9) return n;\r\n * else return (int) (Math.random()*6)+1;\r\n *\r\n *\r\n */\r\n }", "public void provocarEvolucion(Tribu tribuJugador, Tribu tribuDerrotada){\r\n System.out.println(\"\\n\");\r\n System.out.println(\"-------------------Fase de evolución ----------------------\");\r\n int indiceAtributo;\r\n int indiceAtributo2;\r\n double golpeViejo = determinarGolpe(tribuJugador);\r\n for(int i = 1; i <= 10 ; i++){\r\n System.out.println(\"Iteración número: \" + i);\r\n indiceAtributo = (int)(Math.random() * 8);\r\n indiceAtributo2 = (int)(Math.random() * 8);\r\n String nombreAtributo1 = determinarNombrePosicion(indiceAtributo);\r\n String nombreAtributo2 = determinarNombrePosicion(indiceAtributo2);\r\n if((tribuJugador.getArray()[indiceAtributo] < tribuDerrotada.getArray()[indiceAtributo] \r\n && (tribuJugador.getArray()[indiceAtributo2] < tribuDerrotada.getArray()[indiceAtributo2]))){\r\n System.out.println(\"Se cambió el atributo \" + nombreAtributo1 + \" de la tribu del jugador porque\"\r\n + \" el valor era \" + tribuJugador.getArray()[indiceAtributo] + \" y el de la tribu enemeiga era de \"\r\n + tribuDerrotada.getArray()[indiceAtributo] + \" esto permite hacer más fuerte la tribu del jugador.\");\r\n \r\n tribuJugador.getArray()[indiceAtributo] = tribuDerrotada.getArray()[indiceAtributo];\r\n \r\n System.out.println(\"Se cambió el atributo \" + nombreAtributo2 + \" de la tribu del jugador porque\"\r\n + \" el valor era \" + tribuJugador.getArray()[indiceAtributo2] + \" y el de la tribu enemeiga era de \"\r\n + tribuDerrotada.getArray()[indiceAtributo2] + \" esto permite hacer más fuerte la tribu del jugador.\");\r\n \r\n tribuJugador.getArray()[indiceAtributo2] = tribuDerrotada.getArray()[indiceAtributo2];\r\n }\r\n }\r\n double golpeNuevo = determinarGolpe(tribuJugador);\r\n if(golpeNuevo > golpeViejo){\r\n tribus.replace(tribuJugador.getNombre(), determinarGolpe(tribuJugador));\r\n System.out.println(\"\\nTribu evolucionada\");\r\n imprimirAtributos(tribuJugador);\r\n System.out.println(\"\\n\");\r\n System.out.println(tribus);\r\n }\r\n else{\r\n System.out.println(\"\\nTribu sin evolucionar\");\r\n System.out.println(\"La tribu no evolucionó porque no se encontraron atributos\"\r\n + \" que permitiesen crecer su golpe\");\r\n imprimirAtributos(tribuJugador);\r\n System.out.println(\"\\n\");\r\n System.out.println(tribus);\r\n }\r\n }", "public void angreifen(Lebewesen lebewesen) {\n\t\tdouble zahl = Math.random(); //generiert eine Zahl (double) zwischen 0 und 1\r\n\t\tif(zahl < 0.9d){ //leichtverletzen\r\n\t\t\tlebewesen.leichtVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}else if(zahl < 0.98d){ //schwer verletzen\r\n\t\t\tlebewesen.starkVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}else{ //direkt töten\r\n\t\t\tlebewesen.toetlichVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}\r\n\t}", "public final int arvoRivinAihe() {\r\n return super.getRandom().nextInt(super.aiheetPerusmuoto().length);\r\n }", "public Tribute()\n {\n vectOfCoef = new Vector<Double>(numOfCoef);\n for(int x =0; x < numOfCoef; x++)\n {\n vectOfCoef.addElement((Math.random() * 2) - 1);\n }\n }", "public void premesaj() {\r\n Collections.shuffle(kup);\r\n }", "private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "private void generisiPolje() {\r\n\t\tint polje = rnd.nextInt(broj_slobodnih);\r\n\t\tint vrijednost = rnd.nextInt(4);\r\n\t\tif(vrijednost == 0)\r\n\t\t\tvrijednost = 4;\r\n\t\telse\r\n\t\t\tvrijednost = 2;\r\n\t\t\r\n\t\tint brojac = 0;\r\n\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tif(tabela[i][j] == 0) {\r\n\t\t\t\t\tif(brojac == polje)\r\n\t\t\t\t\t\ttabela[i][j] = vrijednost;\r\n\t\t\t\t\tbrojac++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tbroj_slobodnih--;\r\n\t}", "int RandomGeneratorZeroToThree (){\n\t\t int randomInt = 0;\n\t\t Random randomGenerator = new Random();\n\t\t for (int idx = 1; idx <= 10; ++idx) {\n\t\t\t randomInt = randomGenerator.nextInt(4);\n\n\t\t }\n\t\t return randomInt;\n\t }", "private Vec3 calculateRandomValues(){\n\n Random rand1 = new Random();\n float randX = (rand1.nextInt(2000) - 1000) / 2000f;\n float randZ = (rand1.nextInt(2000) - 1000) / 2000f;\n float randY = rand1.nextInt(1000) / 1000f;\n\n return new Vec3(randX, randY, randZ).normalize();\n }", "private void rearrangeSolution() {\r\n List<Integer> trinity = new ArrayList<Integer>();\r\n trinity.add(0); trinity.add(1); trinity.add(2);\r\n permutateDigits();\r\n for (int i = 0; i<9; i+=3) {\r\n Collections.shuffle(trinity);\r\n swapRow(trinity.get(0)+i, trinity.get(1)+i);\r\n }\r\n for (int i = 0; i<9; i+=3) {\r\n Collections.shuffle(trinity);\r\n swapCol(trinity.get(0)+i, trinity.get(1)+i);\r\n }\r\n }", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "@Test\r\n\tpublic void testPelikulaBaloratuDutenErabiltzaileenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p1.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p2.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertTrue(zer.contains(e4.getId()));\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p3.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p4.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e4.getId()));\r\n\t\t\r\n\t}", "public void test5(){\r\n\t\tZug zug1 = st.zugErstellen(1, 0, \"Zug 1\");\r\n\t\tZug zug2 = st.zugErstellen(0, 3, \"Zug 2\"); \r\n\t}", "static public String a_letraAzar() {\n\t\tRandom azar= new Random();\n\n\t\tString letraAzar[]={\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"ó\",\"O\",\"P\",\"Q\",\"R\",\"S\",\n\t\t\t\t\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\"};\n\n\t\treturn letraAzar[azar.nextInt(letraAzar.length)];\n\t}", "@Test\n\tpublic void test_3_RotacionesSimplesDerechaHijoEquilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(2500));\n\t\tassertTrue(tree.remove(500));\n\t\tassertTrue(tree.remove(1000));\t// Primera rotación\n\t\tassertTrue(tree.remove(2500));\n\t\tassertTrue(tree.add(3500));\n\t\tassertTrue(tree.add(4500));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.remove(3500));\n\t\tassertTrue(tree.add(4400));\n\t\tassertTrue(tree.add(4700));\n\t\tassertTrue(tree.remove(3000)); // Tercera rotación\n\t\t\n\t\t\n//\t\t System.out.print(tree.toString());\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la derecha\n\t\tassertEquals(3, tree.getRotacionesSimplesDerecha());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t\n\t}", "@Test\r\n\tpublic void testErabiltzaileakBaloratuDituenPelikulenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e1.getId());\r\n\t\tassertTrue(zer.size() == 3);\r\n\t\tassertTrue(zer.contains(p1.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p4.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e2.getId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p3.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e3.getId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(p1.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p3.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p4.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e4.getId());\r\n\t\tassertTrue(zer.size() == 1);\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p1.getPelikulaId()));\r\n\t\t\r\n\t}", "public void randomize() {\r\n\t\tif(randomizzatoreVariazione > 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione() * randomizzatoreVariazione\r\n\t\t\t\t\t+ andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE())\r\n\t\t\t);\r\n\t\telse if(randomizzatoreVariazione < 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione()\r\n\t\t\t\t\t- andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE() * randomizzatoreVariazione)\r\n\t\t\t);\r\n\t}", "private static int zamijeniDvijeKarte(int[] spil) {\n\t\tint prva =randomKarta (spil);\n\t\tint druga = randomKarta (spil);\n\t\tzamijeni (spil, prva, druga);\n\t\t\n\t\treturn spil, prva, druga;\n\t}", "public void verliesLeven() {\r\n\t\t\r\n\t}", "private Integer randomBilirrubina(){\n\t\t\tint Min = 0, Max = 14;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "private JButton getVycvik3Button() {\n\t\tif (vycvik3Button == null) {\n\t\t\tvycvik3Button = new JButton();\n\t\t\tvycvik3Button.setBounds(new Rectangle(148, 253, 74, 25));\n\t\t\tvycvik3Button.setEnabled(false);\n\t\t\tvycvik3Button.setText(\"Výcvik\");\n\t\t\tvycvik3Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"3v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 3: Ľubovoľné súzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný súzvuk\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t// r = 0;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\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\treturn vycvik3Button;\n\t}", "private Integer randomHemoglobina(){\n\t\t\tint Min = 9, Max = 23;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "public static double probabilityThreeSixes() {\n int count = 0;\n int amount = 0;\n for (int i = 0; i < 10000; i++) {\n amount = 0;\n for (int j = 0; j < 18; j++) {\n if ((int) (Math.random() * 6) + 1 == 6)\n amount++;\n if (amount == 3) {\n count++;\n break; }\n }\n }\n return ((double) count / (double) 10000) * 100;\n }", "public Result fun() {\n\t\tComparator<Van> c=new Comparator<Van>(){\n\t\t\tpublic int compare(Van r,Van s)\n\t\t\t{\n\t\t\t\tint l1=r.getL();\n\t\t\t\tint b1=r.getB();\n\t\t\t\tint h1=r.getH();\n\t\t\t\tint l2=s.getL();\n\t\t\t\tint b2=s.getB();\n\t\t\t\tint h2=s.getH();\n\t\t\t\tif(l1!=l2)\n\t\t\t\t\treturn (l1>l2)?-1:1;\n\t\t\t\telse if(b1!=b2)\n\t\t\t\t\treturn (b1>b2)?-1:1;\n\t\t\t\telse return (h1>h2)?-1:1;\n\t\t\t}\n\t\t};\n\t\tPriorityQueue<Van> cubes=new PriorityQueue<Van>(20,c);\n\t\tVan v1=new Van(1,1,1,30,15,15);\n\t\tVan v2=new Van(1,1,1,15,9,6);\n\t\tVan v3=new Van(1,1,1,21,15,12);\n\t\tVan v10=new Van(1,1,1,30,15,15);\n\t\tVan v5=new Van(1,1,1,15,9,6);\n\t\tVan v6=new Van(1,1,1,20,15,2);\n\t\tVan v7=new Van(1,1,1,30,15,5);\n\t\tVan v8=new Van(1,1,1,15,9,6);\n\t\tVan v9=new Van(1,1,1,21,15,12);\n\t\tVan vft;\n\t\tvft=v5;\n\t\t//System.out.println(vft.getL()+\"/\"+vft.getB()+\"/\"+vft.getH());\n\t\tcubes.offer(v1);\n\t\tcubes.offer(v2);\n\t\tcubes.offer(v3);\n\t\tcubes.offer(v10);\n\t\tcubes.offer(v5);\n\t\tcubes.offer(v6);\n\t\tcubes.offer(v7);\n\t\tcubes.offer(v8);\n\t\tcubes.offer(v9);\n\t\twhile (cubes.size()>0)\n\t\t{\n\t\t\tvft=cubes.poll();\n\t\t\tSystem.out.println(vft.getL()+\"/\"+vft.getB()+\"/\"+vft.getH());\n\t\t\t\n\t\t}\n\t\t\n\t\treturn ok();\n\t}", "ArrayList<ArrayList<Double>> initrandomTerrainHeights() {\n ArrayList<ArrayList<Double>> result = new ArrayList<ArrayList<Double>>();\n for (int i = 0; i < ForbiddenIslandWorld.ISLAND_SIZE + 1; i = i + 1) {\n ArrayList<Double> result2 = new ArrayList<Double>();\n for (int j = 0; j < ForbiddenIslandWorld.ISLAND_SIZE + 1; j = j + 1) {\n result2.add(0.0);\n }\n result.add(result2);\n }\n result.get(0).set(ForbiddenIslandWorld.ISLAND_SIZE / 2, 1.0);\n result.get(ForbiddenIslandWorld.ISLAND_SIZE / 2).set(0, 1.0);\n result.get(ForbiddenIslandWorld.ISLAND_SIZE / 2).set(ForbiddenIslandWorld.ISLAND_SIZE / 2,\n (double) (ForbiddenIslandWorld.ISLAND_SIZE / 2));\n result.get(ForbiddenIslandWorld.ISLAND_SIZE / 2).set(ForbiddenIslandWorld.ISLAND_SIZE, 1.0);\n result.get(ForbiddenIslandWorld.ISLAND_SIZE).set(ForbiddenIslandWorld.ISLAND_SIZE / 2, 1.0);\n return result;\n }", "public static void main(String[] args) {\n\t\t\tScanner tastiera=new Scanner(System.in);\r\n\t\t\tint k=0, j=0;\r\n\t\t\tint conta=0;\r\n\t\t\tString risposta=\"\";\r\n\t\t\tRandom r=new Random();\r\n\t\t\tArrayList<Giocatore> partecipantiOrdinati=new ArrayList<Giocatore>();\r\n\t\t\tArrayList<Giocatore> partecipantiMescolati=new ArrayList<Giocatore>();\r\n\t\t\tArrayList<Giocatore> perdenti=new ArrayList<Giocatore>();\r\n\t\t\tfor(int i=0;i<GIOCATORI.length;i++) {\r\n\t\t\t\tpartecipantiOrdinati.add(new Giocatore(GIOCATORI[i]));\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<GIOCATORI.length;i++) {\r\n\t\t\t\tint indice=Math.abs(r.nextInt()%partecipantiOrdinati.size());\r\n\t\t\t\tpartecipantiMescolati.add(partecipantiOrdinati.get(indice));\r\n\t\t\t\tpartecipantiOrdinati.remove(indice);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"INIZIA IL TORNEO DI BRISCOLA!\");\r\n\t\t\twhile(partecipantiMescolati.size()!=1) {\r\n\t\t\t\tSystem.out.println(\"Fase \"+(j+1));\r\n\t\t\twhile(conta<partecipantiMescolati.size()) {\r\n\t\t\t\tMazzo m=new Mazzo();\r\n\t\t\t\tm.ordinaMazzo();\r\n\t\t\t\tm.mescolaMazzo();\r\n\t\t\t\tGiocatore g1=partecipantiMescolati.get(conta);\r\n\t\t\t\tGiocatore g2=partecipantiMescolati.get(conta+1);\r\n\t\t\t\tPartita p=new Partita(g1,g2,m);\r\n\t\t\t\tSystem.out.println(\"Inizia la partita tra \"+g1.getNickName()+\" e \"+g2.getNickName());\r\n\t\t\t\tSystem.out.println(\"La briscola è: \"+p.getBriscola().getCarta());\r\n\t\t\t\tSystem.out.println(\"Vuoi skippare la partita? \"); risposta=tastiera.next();\r\n\t\t\t\tif(risposta.equalsIgnoreCase(\"si\")) {\r\n\t\t\t\t\tg1.setPunteggio(p.skippa());\r\n\t\t\t\t\tg2.setPunteggio(PUNTI_MASSIMI-g1.getPunteggio());\r\n\t\t\t\t\tif(p.vittoria()) {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto \"+g1.getNickName());//vince g1\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g1.getPunteggio());\r\n\t\t\t\t\t\tp.aggiungiPerdente(g2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto \"+g2.getNickName());// vince g2\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g2.getPunteggio());\r\n\t\t\t\t\t\tp.aggiungiPerdente(g1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tp.daiLePrimeCarte();\r\n\t\t\t\t\tCarta c1=new Carta(g1.gioca().getCarta());\r\n\t\t\t\t\tCarta c2=new Carta(g2.gioca().getCarta());\r\n\t\t\t\t\tg1.eliminaDaMano(c1); g2.eliminaDaMano(c2);\r\n\t\t\t\t\tint tracciatore=1; //parte dal giocatore 1\r\n\t\t\t\t\twhile(!m.mazzoMescolato.isEmpty())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(c1.getCarta()+\" \"+c2.getCarta());\r\n\t\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1){\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tp.pesca(g1); p.pesca(g2);\r\n\t\t\t\t\t\t\tc1=g1.gioca(); c2=g2.gioca();\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(p.chiPrende(c2, c1)) {\r\n\t\t\t\t\t\t\ttracciatore=2;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tp.pesca(g2); p.pesca(g1);\r\n\t\t\t\t\t\t\tc2=g2.gioca(); c1=g1.gioca();\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2); \r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{tracciatore = 1; k--;}\r\n\t\t\t\t\t\tSystem.out.println(g1.getPunteggio()+\" \"+g2.getPunteggio());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"Manche Finale\");\r\n\t\t\t\t\twhile(!g1.carteInMano.isEmpty() || !g2.carteInMano.isEmpty()) {\r\n\t\t\t\t\t\tSystem.out.println(c1.getCarta()+\" \"+c2.getCarta());\r\n\t\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1){\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tc1=g1.gioca(); c2=g2.gioca();\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(p.chiPrende(c2, c1)) {\r\n\t\t\t\t\t\t\ttracciatore=2;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tc2=g2.gioca(); c1=g1.gioca();\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\ttracciatore = 1;\r\n\t\t\t\t\t\tSystem.out.println(g1.getPunteggio()+\" \"+g2.getPunteggio());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"Situazione: \"+g1.getNickName()+\": \"+g1.getPunteggio());\r\n\t\t\t\t\tSystem.out.println(g2.getNickName()+\": \"+g2.getPunteggio());\r\n\t\t\t\t\tif(p.vittoria()) {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto il giocatore \"+g1.getNickName());\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g1.getPunteggio());\r\n\t\t\t\t\t\tperdenti.add(g2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto il giocatore \"+g2.getNickName());\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g2.getPunteggio());\r\n\t\t\t\t\t\tperdenti.add(g1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tconta+=2;\r\n\t\t\t\tSystem.out.println(\"Premi una lettera per continuare: \"); risposta=tastiera.next();\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\tconta=0;\r\n\t\t\tfor(int i=0;i<perdenti.size();i++)\r\n\t\t\t\tpartecipantiMescolati.remove(perdenti.get(i));\r\n\t\t\tSystem.out.println(\"Restano i seguenti partecipanti: \");\r\n\t\t\tfor(int i=0;i<partecipantiMescolati.size();i++) {\r\n\t\t\t\tSystem.out.println(partecipantiMescolati.get(i).getNickName());\r\n\t\t\t\tpartecipantiMescolati.get(i).setPunteggio(0);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Il vincitore del torneo è: \"+partecipantiMescolati.get(0).getNickName());\r\n\t\t\t\t\r\n\t}", "@Override\n\tpublic HashMap<Integer, HashMap<Integer,VueElement>> chercherElementProche(VueElement ve, Hashtable<Integer,VueElement> voisins){\n\t\tHashMap<Integer, HashMap<Integer,VueElement>> resultat = new HashMap<>();\n\n\t\tint distPlusProche = 100;\n\t\tint refPlusProche = 0;\n\t\t/* Strategie du random */\t\t\t\n\t\tSet<Integer> tabref = voisins.keySet();\n\t\tInteger[] t = new Integer[tabref.size()];\n\t\tRandom r = new Random();\n\t\tint s = tabref.size();\n\t\ttabref.toArray(t);\n\t\tif(tabref.size() >= 1 && t[0]!=null)\n\t\t{\n\t\t\t/* On trouve un ele aleatoire dans la liste de voisins */\n\t\t\tint l = r.nextInt(s);\n\t\t\trefPlusProche=t[l];\n\t\t}\n\t\telse refPlusProche=0;\n\n\t\tHashMap<Integer,VueElement> cible = new HashMap<>();\n\t\tcible.put((Integer)refPlusProche, voisins.get(refPlusProche));\n\t\tresultat.put((Integer)distPlusProche, cible);\n\n\t\treturn resultat;\n\t}", "public final int arvoSarakkeenAihe() {\r\n while (true) {\r\n int aihe = super.getRandom()\r\n .nextInt(super.aiheetPerusmuoto().length);\r\n if (aihe != this.riviMuuttujaAihe) {\r\n return aihe;\r\n }\r\n }\r\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 String tegevuseSuvalineSoovitus(){\n int listiSuurus = tegevused.size();\n return tegevused.get((int)(Math.random()*listiSuurus));\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "public void test6(){\r\n\t\tZug zug1 = st.zugErstellen(2, 0, \"Zug 1\");\r\n\t\tZug zug2 = st.zugErstellen(2, 0, \"Zug 2\");\r\n\t\tst.fahren();\r\n\t}", "public List<IrregularVerb> getRandomVerbs(int count);", "ArrayList<Float> pierwszaPredykcja()\n\t{\n\t\tif (Stale.scenariusz<100)\n\t\t{\n\t\t\treturn pierwszaPredykcjaNormal();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//dla scenariusza testowego cnea predykcji jest ustawiana na 0.30\n\t\t\tArrayList<Float> L1 = new ArrayList<>();\n\t\t\tL1.add(0.30f);\n\t\t\treturn L1;\n\t\t}\n\t}", "public int zugBerechnen(int gegnerZug){\n\t\t\n\t\tsetzeGegnerStein(gegnerZug);\n\t\t\n\t\tif(gegnerZug == -1){\n\t\t\thatAngefangen = eigenerStein;\n\t\t\tsetzeEigenenStein(3);\n\t\t\treturn 3;\n\t\t}\n\t\t\n\t\tkeineZuegeMehr();\n\t\t\n\t\tint spalte = (int)(Math.random()*6);\n\t\t\n\t\tfor(int i=0; i < moeglicheZuege.length; i++){\n\t\t\tspalte = (i+spalte)%7;\n\t\t\tif(siegMuster(spalte, moeglicheZuege[spalte]) && moeglicheZuege[spalte] < 6){\n\t\t\t\tsetzeEigenenStein(spalte);\n\t\t\t\treturn spalte;\n\t\t\t}\n\t\t}\n/*\t\n\t\tfor(int i=0; i < moeglicheZuege.length; i++){\n\t\t\tspalte = (i+spalte)%7;\n\t\t\tif(gegnerSiegMuster(spalte, moeglicheZuege[spalte]) && moeglicheZuege[spalte] < 6){\n\t\t\t\tsetzeEigenenStein(spalte);\n\t\t\t\treturn spalte;\n\t\t\t}\n\t\t}\n*/\t\t\n\t\tfor(int i = 0; i < moeglicheZuege.length; i++){\n\t\t\tspalte = (i+spalte)%7;\n\t\t\tif(moeglicheZuege[spalte] < 6){\n\t\t\t\tsetzeEigenenStein(spalte);\n\t\t\t\treturn spalte;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1; //Kein Spielzug mehr moeglich\n\t}", "public static void horoscopo() {\n\n ArrayList<String> frases = new ArrayList<>();\n\n frases.add(\"Todo lo que seas capaz de creer, eres capaz de conseguir.\");\n frases.add(\"Serás más poderoso cuando tengas control total sobre ti mismo.\");\n frases.add(\"La sabiduría y la casualidad no van unidas de la mano.\");\n frases.add(\"Lo que hay en el ayer o en el mañana no es nada comparado con lo que hay en nuestro interior.\");\n frases.add(\"Cáete siete veces y levántate ocho.\");\n frases.add(\"Nunca es tarde para comenzar un nuevo proyecto, para ser quien siempre has deseado ser.\");\n frases.add(\"Con pensamientos positivos y perseverancia, solo es cuestión de tiempo que superes las adversidades y te propongas nuevos retos.\");\n frases.add(\"La vida es un 10% lo que nos ocurre, y un 90% cómo reaccionamos a ello.\");\n frases.add(\"No es más rico quien más tiene, sino quien menos necesita.\");\n frases.add(\"Intenta y falla, pero nunca falles en intentarlo.\");\n frases.add(\"Solo los hombres más sabios son capaces de saborear los momentos más simples.\");\n frases.add(\"cada segundo que goces, será segundo aprovechado.\");\n\n double numero = Math.round(Math.random() * 11);\n int numeroAleatorio = (int) numero;\n\n //Random r = new Random(); \n // int randomNumber = r.nextInt(frases.size());\n System.out.println(\"Frase horóscopo: \" + frases.get(numeroAleatorio));\n\n }", "public void test4(){\r\n\t\tZug zug0 = st.zugErstellen(0, 3, \"Zug 0\");\r\n\t\tst.blockFahren();\r\n\t\td.getSignal(21).setStellung(true);\r\n\t\td.getWeiche(17).setStellung(false);\r\n\t\tst.blockFahren();\r\n\t\td.getSignal(18).setStellung(true);\r\n\t\td.getWeiche(39).setStellung(false);\r\n\t\tst.blockFahren();\r\n\t\tst.fahren();\r\n\t}", "@Test\n\tpublic void test_3_RotacionesDoblesDerechaRemove() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(3500));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(2500));\n\t\tassertTrue(tree.add(2700));\n\t\tassertTrue(tree.remove(1000)); // Primera rotación\n\t\tassertTrue(tree.add(2800));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.add(2900));\n\t\tassertTrue(tree.remove(2500)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones dobles a la derecha\n\t\tassertEquals(3, tree.getRotacionesDoblesDerecha());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda()); \n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t//\tSystem.out.print(tree.toString());\n\t}", "public void randomCivic() {\n\n\t\tpol = new String[polArr.size()];\n\t\tfor (int i = 0; i < polArr.size(); i++) {\n\t\t\tint size = (int) (Math.random() * (polArr.get(i).size() - 1) + 1);\n\t\t\tpol[i] = polArr.get(i).get(size);\n\t\t}\n\t}", "int tournament() {\r\n \tint ch1,ch2;\r\n\t\tch1 = (int)Math.floor(Math.random()*SIZE);\r\n\t\tdo {\r\n\t\t\tch2 = (int)Math.floor(Math.random()*SIZE);\r\n\t\t} while (ch1==ch2);\r\n\t\tif (fit[ch1]<fit[ch2]) return ch1;\r\n\t\telse return ch2;\r\n }", "@Override\n public int hashCode() \n {\n int vysledek = 3;\n int hashNazvu = java.util.Objects.hashCode(this.nazev);\n vysledek = 37 * vysledek + hashNazvu;\n return vysledek;\n }", "@Test\r\n\tpublic void testGetErabBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == -0.5);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == -2.75);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == 0.75);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 1.75);\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// e1 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(df.format(bek.getBalioa(p1.getPelikulaId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p2.getPelikulaId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == -1);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(p1.getPelikulaId())).equals(\"-1,6398\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p2.getPelikulaId())).equals(\",1491\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p3.getPelikulaId())).equals(\",4472\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p4.getPelikulaId())).equals(\"1,0435\"));\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}", "public void rellenarTerreno() {\n Random rnd = new Random();\r\n int restante = V;\r\n int[][] aux = terreno;\r\n do {\r\n for (int i = 0; i < Filas; i++) {\r\n for (int j = 0; j < Columnas; j++) {\r\n if (restante > max) {\r\n int peso = rnd.nextInt(max);\r\n if (aux[i][j] + peso <= max) {\r\n aux[i][j] += peso;\r\n restante -= peso;\r\n }\r\n } else {\r\n if (aux[i][j] + restante <= max) {\r\n aux[i][j] += restante;\r\n restante = 0;\r\n }\r\n }\r\n }\r\n }\r\n } while (restante != 0);\r\n }", "public void ZbierzTowaryKlas() {\n\t\tSystem.out.println(\"ZbierzTowaryKlas\");\n\t\tfor(int i=0;i<Plansza.getTowarNaPlanszy().size();i++) {\n\t\t\tfor(Towar towar : Plansza.getTowarNaPlanszy()) {\n\t\t\t\t\n\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getNiewolnikNaPLanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getNiewolnikNaPLanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t//Szansa Niewolnika na zdobycie dwoch razy wiecej towarow\n\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getNiewolnicySzansa()) {\n\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikTowarow(Plansza.getNiewolnikNaPLanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getRzemieslnikNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getRzemieslnikNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikTowarow(Plansza.getRzemieslnikNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getArystokrataNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getArystokrataNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikTowarow(Plansza.getArystokrataNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void plaatsComputerVloot(){\n\t\tfor (int iPlaats = 0; iPlaats < 5; iPlaats++){\n\t\t\tboolean shipOrientation = Math.random() < 0.5;\n\t\t\tGame.computer1.fleet.get(iPlaats).horizontal = shipOrientation;\n\t\t\tif (Game.computer1.fleet.get(iPlaats).horizontal) {\n\t\t\t\tGame.computer1.fleet.get(iPlaats).switchlb();\n\t\t\t}\n\t\t\tRandom random = new Random();\n\t\t\tboolean conflict = false;\n\t\t\tif(Game.computer1.fleet.get(iPlaats).horizontal){ //horizontaal\n\t\t\t\tint randomx = random.nextInt(11 - Game.computer1.fleet.get(iPlaats).getBreedte());\n\t\t\t\tint randomy = random.nextInt(10);\n\t\t\t\tfor(int xLoper=0; xLoper < Game.computer1.fleet.get(iPlaats).getBreedte();xLoper++){ //controleer coordinaten die huidige schip wil hebben op conflicten\n\t\t\t\t\tfor(int iConflictIndex=0; iConflictIndex < iPlaats; iConflictIndex++){// deze lus pakt alle eerder geplaatste schepen (heeft geen zin om nog niet geplaatste schepen te controleren)\n\t\t\t\t\t\tfor(int iConflictCo=0;iConflictCo < Game.computer1.fleet.get(iConflictIndex).coordinates.length;iConflictCo++){ //doorloopt coordinaten van een eerder geplaatst schip en controleert op overeenkomsten.\n\t\t\t\t\t\t\tif(Game.computer1.fleet.get(iConflictIndex).coordinates[0][iConflictCo] == randomx+xLoper && Game.computer1.fleet.get(iConflictIndex).coordinates[1][iConflictCo] == randomy){\n\t\t\t\t\t\t\t\tconflict = true; //indien overeenkomst, is er een conflict.\n\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\tif(!conflict){\n\t\t\t\t\tfor(int l = 0; l < Game.computer1.fleet.get(iPlaats).getBreedte(); l++){ \n\t\t\t\t\t\tGame.computer1.fleet.get(iPlaats).coordinates[0][l] = randomx + l;\n\t\t\t\t\t\tGame.computer1.fleet.get(iPlaats).coordinates[1][l] = randomy;\n\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}else{ //verticaal. komt grotendeels overeen met horizontaal, commentaar: zie daar.\n\t\t\t\tint randomx = random.nextInt(10);\n\t\t\t\tint randomy = random.nextInt(11 - Game.computer1.fleet.get(iPlaats).getLengte());\n\t\t\t\tfor(int yLoper=0; yLoper < Game.computer1.fleet.get(iPlaats).getLengte();yLoper++){\n\t\t\t\t\tfor(int iConflictIndex=0; iConflictIndex < iPlaats; iConflictIndex++){\n\t\t\t\t\t\tfor(int iConflictCo=0;iConflictCo < Game.computer1.fleet.get(iConflictIndex).coordinates.length;iConflictCo++){\n\t\t\t\t\t\t\tif(Game.computer1.fleet.get(iConflictIndex).coordinates[0][iConflictCo] == randomx && Game.computer1.fleet.get(iConflictIndex).coordinates[1][iConflictCo] == randomy+yLoper){\n\t\t\t\t\t\t\t\tconflict = true;\n\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\tif(!conflict){\n\t\t\t\t\tfor(int l = 0; l < Game.computer1.fleet.get(iPlaats).getLengte(); l++){\n\t\t\t\t\t\tGame.computer1.fleet.get(iPlaats).coordinates[0][l] = randomx;\n\t\t\t\t\t\tGame.computer1.fleet.get(iPlaats).coordinates[1][l] = randomy + l;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(conflict){\n\t\t\t\tiPlaats--;\n\t\t\t}\n\t\t}\n\t\tspelen(); //alles geplaatst, dan spelen.\n\t}", "private void renewWordLevel3()\n {\n givenWord = availableWords.randomWordLevel3();\n shuffedWord = availableWords.shuffleWord(givenWord);\n textViewShuffle.setText(shuffedWord);\n }", "public static ArrayList<Individuo> mutaHeuristica(ArrayList<Individuo> genAnt,int nB){\n ArrayList<Individuo> aux = genAnt;\n ArrayList<Integer> genesS = new ArrayList<>();\n int nM = (int) (genAnt.size()*0.2); //determina cuantos individuos van a ser mutados\n int iS,gS,i=0,n,c;\n byte gaux[],baux;\n Random r = new Random();\n while(i<nM){\n gS = r.nextInt(nB+1);//selecciona el numero de genes aleatoriamente\n iS = r.nextInt(genAnt.size());//selecciona un individuo aleatoriamente\n gaux = aux.get(iS).getGenotipo();//obtenemos genotipo de ind seleccionado\n c=0;\n System.out.println(gS);\n //seleccionamos genes a ser permutados\n while(c != gS){\n n = r.nextInt(nB);\n if(!genesS.contains(n)){\n genesS.add(n);\n System.out.print(genesS.get(c)+\" \");\n c++;\n }\n }\n System.out.println(\"\");\n //aux.remove(iS);//quitamos elemento\n //aux.add(iS, new Individuo(gaux,genAnt.get(0).getTipoRepre()));//añadimos elemento mutado\n i++;\n }\n return aux;\n }", "public final int[] luoData() {\r\n int x = super.getRandom().nextInt(2);\r\n\r\n if (x == 0) {\r\n return this.luoSatunnainenNormaaliJakautunutData();\r\n } else {\r\n return this.luoSatunnainenData();\r\n }\r\n }", "public void generatePlate(){\r\n\t\tfor(int i = 0; i<3; i++){ // Using math random to generate three upper case letter \r\n\t\t\tSystem.out.print((char)((int)'A'+Math.random()*((int)'Z'-(int)'A'+1)));\r\n\t\t}\r\n\t\tSystem.out.print(\"-\");\r\n\t\tfor(int i=0; i<4; i++){ // using math random to generate four integers\r\n\t\t\tSystem.out.print((int)(Math.random()*10));\r\n\t\t}\r\n\t}", "private void random() {\n\n\t}", "@Test\n\tpublic void test_3_RotacionesDoblesIzquierdaRemove() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.add(1400));\n\t\tassertTrue(tree.remove(4000)); // Primera rotación\n\t\tassertTrue(tree.add(1300));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.add(1200));\n\t\tassertTrue(tree.remove(1500)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones dobles a la izquierda\n\t\tassertEquals(3, tree.getRotacionesDoblesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha()); \n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\n\t//\tSystem.out.print(tree.toString());\n\t}", "public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }", "public String [] losuj(){\n int licznik = 0;\n String [] wybrane = new String[5];\n while(licznik<5){ // Dla jednego gracza\n int kolor = (int) (Math.random()*4);\n int wartosc = (int) (Math.random()*13);\n if(czyWybrana[kolor][wartosc]==false){\n czyWybrana[kolor][wartosc]=true;\n wybrane[licznik]=karty[kolor][wartosc]+\".jpg\";\n licznik++;\n }\n }\n return wybrane;// tablica z 5 wylosowanymi kartami\n }", "public void dodajHranu() {\n\t\t//int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);\n\t\t\n\t\tint i = (int)Math.floor(Math.random()*(this.visinaTable-2+1)+1);\n\t\tint j = (int)Math.floor(Math.random()*(this.sirinaTable-2+1)+1);\n\t\t\n\t\twhile(this.tabla[i][j] != '.') {\n\t\t\ti = (int)Math.floor(Math.random()*(this.visinaTable-2+1)+1);\n\t\t\tj = (int)Math.floor(Math.random()*(this.sirinaTable-2+1)+1);\n\t\t}\n\t\t\n\t\tthis.tabla[i][j] = '*';\n\t\tthis.iHrana = i;\n\t\tthis.jHrana = j;\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 void realizacjap34() {\n System.out.println(\"REALIZACJA PUNKTU 3\\n\");\n\n System.out.println(\"\\nWyszukiwanie osob po imieniu (Piotr) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoImieniu(Listy.osoby, \"Piotr\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po nazwisku (Oleszczuk) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoNazwisku(Listy.osoby, \"Oleszczuk\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy mniejszym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyMniejszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy większym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyWiekszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy równym 5============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyRownym(Listy.osoby, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin mniejszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachMniejszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin wiekszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachWiekszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin równej 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachRownych(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji wiekszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiWiekszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji mniejszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiMniejszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji rownej 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiRownej(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stanowisku (Adiunkt) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStanowisku(Listy.osoby, \"Adiunkt\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studenta po numerze indeksu (123456) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzStudentaPoIndeksie(Listy.osoby, \"123456\"));\n\n System.out.println(\"\\nWyszukiwanie studentów po roku studiów (1) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoRokuStudiow(Listy.osoby, 1).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studentów po kierunku (Informatyka Stosowana) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoKierunku(Listy.osoby, \"Informatyka Stosowana\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursu po nazwie (Analiza Matematyczna 1) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzKursPoNazwie(Listy.kursy, \"Analiza Matematyczna 1\"));\n\n System.out.println(\"\\nWyszukiwanie kursów po liczbie ects (5) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoECTS(Listy.kursy, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursów po prowadzacym+\"+Listy.osoby.get(0).getImie()+\" \"+Listy.osoby.get(0).getNazwisko()+\" ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoProwadzacym(Listy.kursy, Listy.osoby.get(0)).forEach(System.out::println);\n\n\n //REALIZACJA PUNKTU 4\n System.out.println(\"=====================================================================================================================\");\n System.out.println(\"REALIZACJA PUNKTU 4\");\n System.out.println(\"=====================================================================================================================\\n\");\n System.out.println(\"Kursy:\\n\");\n for (Kurs kurs : Listy.kursy) {\n System.out.println(kurs.toString());\n }\n\n System.out.println(\"\\nOsoby:\\n\");\n for (Osoba osoba : Listy.osoby) {\n System.out.println(\"OSOBA====================================================================================================\");\n System.out.println(osoba.toString());\n System.out.println();\n }\n }", "public Chromosone() {\n Random rand = new Random();\n for(int i=0;i<=75;i++)\n {\n int rnd = rand.nextInt(2);// [1,0...]\n\n Val.add(rnd);\n }\n }", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "@Test\n\tpublic void testGehituErabiltzaile() {\n\t\tErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();\t\t\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tassertEquals(1, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Mikel\", \"123456\",\"123456\");\n\t\tassertEquals(2,ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tassertEquals(2, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t}", "public void generaClaves()\n {\n n = p.multiply(q);\n // ed = (p-1)*(q-1)\n ed = p.subtract(BigInteger.valueOf(1));\n ed = ed.multiply(q.subtract(BigInteger.valueOf(1)));\n // Elegimos un numero primo entre 1 menor que ed\n do e = new BigInteger(2 * tamPrimo, new Random());\n while((e.compareTo(ed) != -1) ||\n\t\t (e.gcd(ed).compareTo(BigInteger.valueOf(1)) != 0));\n // d = e^1 mod ed\n d = e.modInverse(ed);\n }", "public static void main(String [] agrs){\n\r\n\r\n Kaczka gumowa = new GumowaKaczka();\r\n gumowa.ustawKwakanieInterfejs(2);\r\n gumowa.ustawLatanieInterfejs(new SzybkieLatanie());\r\n gumowa.wyswietl();\r\n System.out.println(gumowa.kwacz());\r\n System.out.println(gumowa.lec());\r\n Kaczka dzika = new DzikaKaczka();\r\n // dzika.ustawLatanieInterfejs(1);\r\n dzika.wyswietl();\r\n System.out.println(dzika.lec());\r\n System.out.println(dzika.kwacz());\r\n\r\n\r\n// Polecenie[] polecenieWlacz;\r\n// Polecenie[] polecanieWylacz;\r\n// Polecenie polecenieWycofaj;\r\n//\r\n// polecanieWylacz = new Polecenie[7];\r\n// polecenieWlacz = new Polecenie[7];\r\n//\r\n// Swiatlo swiatlo = new Swiatlo();\r\n// polecanieWylacz[0] = new PolecenieWylaczSwiatlo(swiatlo);\r\n// polecenieWlacz[0] = new PolecenieWlaczSwiatlo(swiatlo);\r\n//\r\n//\r\n//\r\n//\r\n// polecenieWlacz[0].wykonaj();\r\n// polecanieWylacz[0].wykonaj();\r\n// polecenieWlacz[0].wykonaj();\r\n// polecenieWycofaj = polecanieWylacz[0];\r\n//// polecenieWycofaj = polecenieWlacz[0];\r\n// polecenieWycofaj.wykonaj();\r\n// polecenieWycofaj.wykonaj();\r\n//// polecenieWycofaj.wycofaj();\r\n//\r\n// WiezaStereo wiezaStereo = new WiezaStereo();\r\n//\r\n// polecenieWlacz[1] = new PolecenieWiezaStereoWlaczCD(wiezaStereo);\r\n//\r\n// polecenieWlacz[1].wykonaj();\r\n\r\n\r\n\r\n }", "void novyVrchol(String klic){\n\t\tVrchol pom = new Vrchol(klic,'B');\n\t\t\n\t\tvrchP[pocet] = pom;\n\t\tpocet++;\n\t\n\t}", "public int generarDE(){\n int ts;\n float rnd=(float)Math.random();\n \n if(rnd<=0.35){ts=1;}\n else if(rnd<=0.75){ts=2;}\n else {ts=3;}\n \n return ts;\n }", "public int initialiser()\n\t{\n\n\t\tint nombreE;\n\t\tint k = 0;\n\t\t//int max = randInt(2,10);\n\t\ttableauPeres_ = new Case[longueur_][longueur_];\n\t\tint i, j = 0;\n\t\tfor(i=0; i<longueur_; ++i)\n\t\t{\n\t\t\tfor(j=0; j<longueur_; ++j)\n\t\t\t{\n\t\t\t\ttableauPeres_[i][j] = new Case(i, j, 0);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Combien d'étoiles souhaitez vous pour chaque joueur ?\");\n\t\tnombreE = clavier.nextInt();\n\t\twhile (k < nombreE)\n\t\t{\n\t\t\taddEtoile(\"bleu\");\n\t\t\taddEtoile(\"rouge\");\n\t\t\t++k;\n\t\t}\n\t\treturn nombreE;\n\t}", "ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }", "public void init() {\n\n\n verdiend = 133;\n\n verdeling = verdiend / 4;\n }", "@Test\n\tpublic void test_3_RotacionesSimplesIzquierdaHijoEquilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.remove(3000)); // Primera rotación\n\t\tassertTrue(tree.remove(1500)); \n\t\tassertTrue(tree.add(700));\n\t\tassertTrue(tree.add(400));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.remove(700)); \n\t\tassertTrue(tree.add(450));\n\t\tassertTrue(tree.add(300));\n\t\tassertTrue(tree.remove(1000)); // Tercera rotación\n\n\t//\t System.out.print(tree.toString());\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la\n\t\t// izquierda\n\t\tassertEquals(3, tree.getRotacionesSimplesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t// System.out.print(tree.toString());\n\t}", "public VShuffling()\n {\n }", "public void Nivel3(){\n \n int cont = 0; \n\n while(cont<6){\n lv[0][cont] = 4;//pared arriba\n lv[7][cont] = 4;//pared abajo \n cont++;\n }\n cont=0;\n while(cont<8){\n lv[cont][0] = 4;//pared arriba\n lv[cont][5] = 4;//pared abajo \n cont++;\n }\n \n //metas\n lv[1][2] = 3;\n lv[1][3] = 3;\n lv[6][4] = 3;\n \n //cajas\n lv[6][5] = 2;\n lv[2][2] = 2;\n lv[5][4] = 2;\n \n //obstaculos\n lv[5][3] = 4;\n lv[5][2] = 4;\n lv[1][4] = 4;\n \n lv[6][1] =1;//jugador \n \n \n }", "public void solucioInicial2() {\n int grupsRecollits = 0;\n for (int i=0; i<numCentres*helisPerCentre; ++i) {\n Helicopter hel = new Helicopter();\n helicopters.add(hel);\n }\n int indexHelic = 0;\n int indexGrup = 0;\n int places = 15;\n while (indexGrup < numGrups) {\n int trajecte[] = {-1,-1,-1};\n for (int i=0; i < 3 && indexGrup<numGrups; ++i) {\n Grupo grup = grups.get( indexGrup );\n if (places - grup.getNPersonas() >= 0) {\n places -= grup.getNPersonas();\n trajecte[i] = indexGrup;\n indexGrup++;\n\n }\n else i = 3;\n }\n Helicopter helicopter = helicopters.get( indexHelic );\n helicopter.addTrajecte( trajecte, indexHelic/helisPerCentre );\n places = 15;\n indexHelic++;\n if (indexHelic == numCentres*helisPerCentre) indexHelic = 0;\n }\n }", "private Vect3() {\n\t\tthis(0.0,0.0,0.0);\n\t}", "ArrayList<Float> pierwszaPredykcjaNormal()\n\t{\n\t\tif (Stale.cenyZGeneratora)\n\t\t{\n\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\n\t\t\treturn predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tArrayList<Float> proposedPriceVector = pierwszaPredykcjaWezPredykcjeZListy();\n\t\t\t\n\t\t\t//jezeli brakuje elementow w plikyu do pelnej predykcji an horyzont czasowy to uuzplenij dnaymi z modelu\n\t\t\tif (proposedPriceVector.size()<Stale.horyzontCzasowy)\n\t\t\t{\n\t\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> cenyZmodelu =predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t\t\t\n\t\t\t\tproposedPriceVector = polaczListy(proposedPriceVector, cenyZmodelu);\n\t\t\t\t\n\t\t\t\tif (proposedPriceVector.size()!=Stale.horyzontCzasowy)\n\t\t\t\t{\n\t\t\t\t\tgetInput(\"ERROR in pierwszaPredykcjaNormal\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn proposedPriceVector;\n\t\t\t//podaj predykcje taka jak wynika z podanego pliku\n\t\t\t//getInput(\"Fill this part out - wczytaj rpedykcje z pliku!\");\n\t\t\t//return new ArrayList<Float>();\n\t\t}\n\t}", "private int generujViacZvierat(int pocet){\r\n int poc = 0;\r\n for (int i = 0; i < pocet; i++) {\r\n if (zoo.pridajZivocicha(vytvorZivocicha())) poc++;\r\n }\r\n return poc;\r\n }", "public int posRandomDeCeldasLibres() {\r\n\t\t\t\r\n\t\tint posicionRandom;\r\n\t\t\r\n\t\t// Nos devuelve una posicion dada por un random y el numero de celdas libres. \r\n\t\tposicionRandom = (int) (Math.random() * numeroDeCeldasLibres);\r\n\t\t\t\r\n\t\treturn posicionRandom;\r\n\t}", "public void zeichnen_kavalier() {\n /**\n * Abrufen der Koordinaten aus den einzelnen\n * Point Objekten des Objekts Tetraeder.\n */\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n /**\n * Aufrufen der Methode sortieren\n */\n double[][] sP = cls_berechnen.sortieren(A, B, C, D);\n\n A = sP[0];\n B = sP[1];\n C = sP[2];\n D = sP[3];\n\n /**Wenn alle z Koordinaten gleich sind, ist es kein Tetraeder. */\n if (A[2] == D[2] || (A[2]==B[2] && C[2]==D[2])) {\n System.out.println(\"kein Tetraeder\");\n return;\n }\n\n /** Transformiert x,y,z Koordinaten zu x,y Koordinaten */\n double ax, ay, bx, by, cx, cy, dx, dy;\n ax = (A[0] + (A[2] / 2));\n ay = (A[1] + (A[2] / 2));\n bx = (B[0] + (B[2] / 2));\n by = (B[1] + (B[2] / 2));\n cx = (C[0] + (C[2] / 2));\n cy = (C[1] + (C[2] / 2));\n dx = (D[0] + (D[2] / 2));\n dy = (D[1] + (D[2] / 2));\n\n tetraederzeichnen(ax, ay, bx, by, cx, cy, dx, dy);\n }", "public static void main(String[] args) {\n ArrayList<Integer> taszkok = new ArrayList<>();\r\n String text = null;\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\r\n try {\r\n text = reader.readLine();\r\n\r\n String[] taszkfeltolt = text.split(\",\");\r\n for(int i = 0; i<taszkfeltolt.length ;i++){\r\n taszkok.add(Integer.parseInt(taszkfeltolt[i])) ;\r\n }\r\n\r\n }\r\n catch(Exception e){\r\n\r\n }\r\n\r\n int laphibak=0;\r\n ArrayList<String> abc = new ArrayList<>();\r\n ArrayList<Integer> fagyi = new ArrayList<>();\r\n ArrayList<Integer> szam = new ArrayList<>();\r\n for(int i = 0; i<taszkok.size();i++){\r\n boolean csillag=false;\r\n boolean nemvoltlaphiba=false;\r\n int fagyilesz=-1;\r\n //System.out.print(taszkok.get(i));\r\n\r\n if(0>taszkok.get(i)){\r\n //valami történik\r\n taszkok.set(i, taszkok.get(i)*(-1));\r\n fagyilesz=0;\r\n }\r\n if(abc.size()<3){\r\n\r\n int vanilyen = vanilyen(taszkok.get(i),szam);\r\n if(vanilyen==-1){\r\n if (abc.size()==2){\r\n abc.add(\"C\");\r\n System.out.print(\"C\");\r\n }\r\n else if (abc.size()==1){\r\n abc.add(\"B\");\r\n System.out.print(\"B\");\r\n }\r\n else if (abc.size()==0){\r\n abc.add(\"A\");\r\n System.out.print(\"A\");\r\n }\r\n szam.add(taszkok.get(i));\r\n if(fagyilesz!=0){\r\n fagyi.add(4); // a kör végén ugy is csökkentem 1el elsőre is\r\n }\r\n else{\r\n fagyi.add(0);\r\n }\r\n }\r\n else{\r\n String temp=abc.get(vanilyen);\r\n abc.remove(vanilyen); //a tömb végére rakom és 0 ra allitom a fagyasztast\r\n abc.add(temp);\r\n //System.out.print(abc);\r\n int tempfagyi=fagyi.get(vanilyen);\r\n fagyi.remove(vanilyen);\r\n if(fagyilesz!=0){\r\n fagyi.add(tempfagyi);\r\n }\r\n else{\r\n fagyi.add(0);\r\n }\r\n szam.remove(vanilyen);\r\n szam.add(taszkok.get(i));\r\n //System.out.print(temp+\"e,\");\r\n nemvoltlaphiba=true;\r\n }\r\n\r\n }\r\n else if(abc.size()==3){\r\n int vanilyen = vanilyen(taszkok.get(i),szam);\r\n if(vanilyen==-1){ //ha ez egy uj szam\r\n int hanyadikbet=vanszabad(fagyi);\r\n if(hanyadikbet!=-1){\r\n String temp=abc.get(hanyadikbet);\r\n szam.remove(hanyadikbet);\r\n szam.add(taszkok.get(i));\r\n abc.remove(hanyadikbet); //a tömb végére rakom és 4 ra allitom a fagyasztast\r\n abc.add(temp);\r\n\r\n fagyi.remove(hanyadikbet);\r\n if(fagyilesz!=0){\r\n fagyi.add(4);\r\n }\r\n else{\r\n fagyi.add(0);\r\n }\r\n\r\n System.out.print(temp);\r\n }\r\n else{\r\n csillag=true;\r\n }\r\n }\r\n else{\r\n String temp=abc.get(vanilyen);\r\n abc.remove(vanilyen); //a tömb végére rakom és 0 ra allitom a fagyasztast\r\n abc.add(temp);\r\n szam.remove(vanilyen);\r\n szam.add(taszkok.get(i));\r\n int fagyitemp=fagyi.get(vanilyen);\r\n fagyi.remove(vanilyen);\r\n fagyi.add(fagyitemp);\r\n nemvoltlaphiba=true;\r\n }\r\n\r\n\r\n }\r\n\r\n if (csillag==true){\r\n System.out.print(\"*\");\r\n }\r\n if(nemvoltlaphiba==true){\r\n System.out.print(\"-\");\r\n }\r\n else{\r\n laphibak++;\r\n }\r\n for(int j = 0; j<fagyi.size();j++){\r\n if(fagyi.get(j)!=0){\r\n fagyi.set(j,fagyi.get(j)-1); //csokkentem a fagyasztast\r\n }\r\n }\r\n }\r\n\r\n\r\n System.out.println();\r\n System.out.print(laphibak);\r\n }", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "@Test\n public void test_distanceLinaireSurX_distanceLinaireSurX_ParcourOptimum_Pour_4villes() {\n\n Pays pays = new Pays(4);\n\n int positionY = (int) (Math.random() * 50);\n\n pays.setPositionVille(0, new Point(2, positionY));\n pays.setPositionVille(1, new Point(3, positionY));\n pays.setPositionVille(2, new Point(4, positionY));\n pays.setPositionVille(3, new Point(5, positionY));\n\n brutForceV3.recherche(pays, 0);\n\n assertEquals(\"0>1>2>3>0\", brutForceV3.getParcours().getVillesEmprunté());\n assertEquals(brutForceV3.getParcours().getDistance(),\n parcoursVilles(pays, brutForceV3.getParcours().getVillesEmprunté(),\">\"));\n\n }", "public int gutenZugBerechnen(int gegnerZug) {\n\t\t\n\t\tsetzeGegnerStein(gegnerZug);\n\t\t\n\t\tif (gegnerZug == -1){\n\t\t\thatAngefangen = eigenerStein;\n\t\t\tsetzeEigenenStein(3);\n\t\t\treturn 3;\n\t\t}\n\t\t\n\t\tkeineZuegeMehr();\n\t\t\n\t\tint spalte = (int)(Math.random()*6);\n\t\t\n\t\tfor(int i=0; i < moeglicheZuege.length; i++){\n\t\t\tspalte = (i+spalte)%7;\n\t\t\tif(siegMuster(spalte, moeglicheZuege[spalte]) && moeglicheZuege[spalte] < 6){\n\t\t\t\tsetzeEigenenStein(spalte);\n\t\t\t\treturn spalte;\n\t\t\t}\n\t\t}\n\t\t\n\t\thauptProgramm(6);\n\t\t\n\t\tspalteVollAbfangen(gespeicherterZug);\n\t\t\n\t\tsetzeEigenenStein(gespeicherterZug);\n\t\treturn gespeicherterZug;\n\n\t}", "@Test\n\tpublic void test_3_RotacionesSimplesDerechaRemoveHijoDesequilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(2500));\n\t\tassertTrue(tree.add(5000));\n\t\tassertTrue(tree.remove(1000)); // Primera rotación\n\t\tassertTrue(tree.add(3500));\n\t\tassertTrue(tree.add(300));\n\t\tassertTrue(tree.add(2700));\n\t\tassertTrue(tree.add(2400));\n\t\tassertTrue(tree.add(7000));\n\t\tassertTrue(tree.add(2800));\n\t\tassertTrue(tree.remove(500)); // Segunda rotación\n\t\tassertTrue(tree.add(3300));\n\t\tassertTrue(tree.add(4500));\n\t\tassertTrue(tree.add(8000));\n\t\tassertTrue(tree.remove(3500)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la derecha\n\t\tassertEquals(3, tree.getRotacionesSimplesDerecha());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t// System.out.print(tree.toString());\n\t}", "public void insertar2(){\n for (int i = 0; i < tamano; i++) {\n vectorpila2[i]=(int) (Math.random() *100+1);\n \n cima++;\n }\n }", "private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "public void mutacioni(Individe individi, double probabiliteti) {\n int gjasaPerNdryshim = (int) ((1 / probabiliteti) * Math.random());\r\n if (gjasaPerNdryshim == 1) {\r\n int selectVetura1 = (int) (Math.random() * individi.pikatEVeturave.length);//selekton veturen e pare\r\n int selectPikenKamioni1 = (int) (Math.random() * individi.pikatEVeturave[selectVetura1].size());//selekton piken e vetures tpare\r\n if (pikatEVeturave[selectVetura1].size() == 0) {\r\n return;\r\n }\r\n Point pika1 = individi.pikatEVeturave[selectVetura1].get(selectPikenKamioni1);//pika 1\r\n\r\n int selectVetura2 = (int) (Math.random() * individi.pikatEVeturave.length);//selekton veturen e dyte\r\n int selectPikenKamioni2 = (int) (Math.random() * individi.pikatEVeturave[selectVetura2].size());//selekton piken e vetures tdyte\r\n if (pikatEVeturave[selectVetura2].size() == 0) {\r\n return;\r\n }\r\n Point pika2 = individi.pikatEVeturave[selectVetura2].get(selectPikenKamioni2);//pika 2\r\n\r\n individi.pikatEVeturave[selectVetura2].set(selectPikenKamioni2, pika1);//i ndrron vendet ketyre dy pikave\r\n individi.pikatEVeturave[selectVetura1].set(selectPikenKamioni1, pika2);\r\n }\r\n\r\n }", "int accidentVelo()\r\n\t{\r\n\t\tdouble rand = Math.random()*100;\r\n\t\tSystem.out.println(rand);\r\n\t\tif ((double)rand <= 0.5) {\r\n\t\t\tSystem.out.println(\"Finalement vous auriez du y aller à pied. Vous vous vider de votre sang sur le bord du trottoir.\");\r\n\t\t\treturn 0.5;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public static void main(String[] args) {\n Random rand = new Random(47);\n int i, j, k;\n // Choose Value from 1 t0 100\n j = rand.nextInt(100) + 1;\n print(\"j : \" + j);\n k = rand.nextInt(100) + 1;\n print(\"k : \" + k);\n i = j + k;\n print(\" J + k : \" + i);\n i = j - k;\n print(\" j - k : \" + i );\n i = k / j;\n print(\" k /j : \" + i);\n i = k * j;\n print(\"k * j : \" + i );\n i = k%j;\n print(\" k % j\" + i);\n //Floating-point number tests\n float u , v ,w; //Applies to dubles,too\n v = rand.nextFloat();\n print(\"v : \" + v);\n w = rand.nextFloat();\n print(\"w : \" + w);\n u = v + w;\n print(\"v + w :\" + u);\n u = v - w;\n print(\"v - w :\" + u);\n u = v * w;\n print(\"v * w :\" + u);\n u = v / w;\n print(\"u / w: \" + u);\n //The follwing also works for char,\n // byte, short , int , long and double;\n u +=v;\n print(\"u + = v : \" + u);\n u -= v;\n print(\" u -= v: \" + u);\n u *= v;\n print(\"u *= v : \" + u);\n u /= v;\n print(\"u /= v :\" + v);\n }", "@Test\n public void testCasesVidePlacement() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test casesVidePlacement ====================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n JoueurHumain j1 = new JoueurHumain(instance, true, NumJoueur.JOUEUR1);\n JoueurHumain j2 = new JoueurHumain(instance, true, NumJoueur.JOUEUR1);\n Reine reinej1 = j1.getReine(j1.getPions());\n Reine reinej2 = j2.getReine(j2.getPions());\n\n ArrayList<HexaPoint> expectedj1;\n ArrayList<HexaPoint> expectedj2;\n ArrayList<HexaPoint> resj1;\n ArrayList<HexaPoint> resj2;\n\n System.out.println(\"test sur une ruche venant d'être créé :\");\n expectedj1 = new ArrayList<>();\n expectedj1.add(orig);\n expectedj2 = new ArrayList<>();\n expectedj2.add(orig);\n resj1 = instance.casesVidePlacement(j1);\n resj2 = instance.casesVidePlacement(j2);\n\n arrayCorrespondsp(resj1, expectedj1);\n arrayCorrespondsp(resj2, expectedj2);\n\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur avec l'insecte de j1 à l'origine :\");\n instance.ajoutInsecte(reinej1, orig);\n expectedj1 = new ArrayList<>();\n expectedj1.addAll(orig.coordonneesVoisins());\n expectedj2 = new ArrayList<>();\n expectedj2.addAll(orig.coordonneesVoisins());\n resj1 = instance.casesVidePlacement(j1);\n resj2 = instance.casesVidePlacement(j2);\n\n arrayCorrespondsp(resj1, expectedj1);\n arrayCorrespondsp(resj2, expectedj2);\n\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n \n System.out.println(\"test sur avec l'insecte de j1 à l'origine et j2 en bas:\");\n instance.ajoutInsecte(reinej2, orig.voisinBas());\n expectedj1 = new ArrayList<>();\n expectedj1.add(orig.voisinDroiteHaut());\n expectedj1.add(orig.voisinGaucheHaut());\n expectedj1.add(orig.voisinHaut());\n expectedj2 = new ArrayList<>();\n expectedj2.add(orig.voisinBas().voisinBas());\n expectedj2.add(orig.voisinBas().voisinDroiteBas());\n expectedj2.add(orig.voisinBas().voisinGaucheBas());;\n resj1 = instance.casesVidePlacement(j1);\n resj2 = instance.casesVidePlacement(j2);\n\n //arrayCorrespondsp(resj1, expectedj1);\n //arrayCorrespondsp(resj2, expectedj2);\n\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"\");\n }", "public void agregarVidaLogica(){\n int numvida = tam * tam;\n numvida*=0.05;\n System.out.println(numvida);\n for(int i=0;i<numvida;i++){\n int x= (int)(Math.random()*tam);\n int y= (int)(Math.random()*tam);\n if(matriz[y][x]!=2 && matriz[y][x]!=1){\n matriz[y][x]=4;\n }\n }\n }" ]
[ "0.65212077", "0.62500596", "0.6136971", "0.60467845", "0.60422534", "0.60000044", "0.595319", "0.59356624", "0.57566226", "0.5738803", "0.5729505", "0.5698981", "0.5687125", "0.56853676", "0.56844854", "0.5670407", "0.56552285", "0.56239676", "0.56153935", "0.5596881", "0.5569392", "0.55516565", "0.55435413", "0.55232453", "0.5510281", "0.5506769", "0.55041087", "0.5503618", "0.54945976", "0.5493358", "0.5487045", "0.5482604", "0.54799664", "0.54777443", "0.5474349", "0.5468607", "0.5466945", "0.5462319", "0.54572254", "0.5445987", "0.54440814", "0.54316396", "0.5423092", "0.5418244", "0.541597", "0.5398962", "0.53987545", "0.53955376", "0.5394723", "0.5392379", "0.5386316", "0.5382649", "0.5366396", "0.5365309", "0.53634673", "0.53558654", "0.53540623", "0.5352768", "0.53519124", "0.5351845", "0.5349778", "0.53474814", "0.53442913", "0.5343183", "0.5341191", "0.5340814", "0.5334987", "0.5334229", "0.53322434", "0.5329186", "0.5326025", "0.53251106", "0.5316975", "0.53155917", "0.5309646", "0.5304941", "0.53032327", "0.53026325", "0.5301052", "0.52868855", "0.5282242", "0.5274054", "0.527298", "0.52677125", "0.5252846", "0.5239326", "0.5234698", "0.52342695", "0.52328473", "0.5221051", "0.52113175", "0.5207958", "0.5197577", "0.51973444", "0.5196175", "0.51957786", "0.51955837", "0.51953095", "0.51883894", "0.5181162", "0.51782316" ]
0.0
-1
insertSpiel() / Spieldaten in Database einpflegen
public void insertSpiel () { Intent callerIntent = getIntent(); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); double y = (packageFromSpiel.getInt("MaxSpieler")*packageFromSpiel.getDouble("EinSatzGeld_DoubleWert")); try { //Toast.makeText(this, "Insert_Spiel", Toast.LENGTH_LONG).show(); final String METHOD_NAME = "insertSpiel"; final String SOAP_ACTION = NAMESPACE + METHOD_NAME; SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME); SoapObject newSpieler=new SoapObject(NAMESPACE, "inputspiel"); newSpieler.addProperty("Schwerrate",packageFromSpiel.getInt("SchwerRate")); newSpieler.addProperty("MaxSpieler",packageFromSpiel.getInt("MaxSpieler")); newSpieler.addProperty("ActuellSpieler",packageFromSpiel.getInt("ActuellSpieler")); newSpieler.addProperty("GeldPol",BigDecimal.valueOf(packageFromSpiel.getDouble("EinSatzGeld_DoubleWert"))); newSpieler.addProperty("GeldSum",BigDecimal.valueOf(y)); request.addSoapObject(newSpieler); SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); MarshalFloat marshal=new MarshalFloat(); marshal.register(envelope); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); SoapPrimitive soapPrimitive= (SoapPrimitive)envelope.getResponse(); /* int ret=Integer.parseInt(soapPrimitive.toString()); if(ret<=0) {Toast.makeText(this, "Insert Spiel fail", Toast.LENGTH_LONG).show();} else{Toast.makeText(this, "Insert Spiel Successful", Toast.LENGTH_LONG).show();} */ } catch (Exception ex) { Toast.makeText(this, "Insert Spiel Fehler Exception", Toast.LENGTH_LONG).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert() throws SQLException;", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "public void processInsertar() {\n }", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "int insert(TCpySpouse record);", "private static void testInsert() {\n\t\tSkemp skemp = new Skemp();\n\t\tskemp.setId(99);\n\t\tskemp.setName(\"王2\");\n\t\tskemp.setSex(\"男\");\n\t\tSkempDao skempDao = new SkempDaoImpl();\n\t\tskempDao.insertSkemp(skemp);\n\t}", "public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\n }\n }", "private void insertTupel(Connection c) {\n try {\n String query = \"INSERT INTO \" + getEntityName() + \" VALUES (null,?,?,?,?,?);\";\n PreparedStatement ps = c.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, getAnlagedatum());\n ps.setString(2, getText());\n ps.setString(3, getBild());\n ps.setString(4, getPolizist());\n ps.setString(5, getFall());\n ps.executeUpdate();\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n setID(rs.getString(1));\n getPk().setValue(getID());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void insert()\n\t{\n\t}", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\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}\r\n\t}", "int insert(Prueba record);", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "public void insert(Spot spot) { mRepository.insert(spot); }", "int insert(Tourst record);", "public void insert(Object objekt) throws SQLException {\r\n\t\t \r\n\t\tPomagaloVO ul = (PomagaloVO) objekt;\r\n\r\n\t\tif (ul == null)\r\n\t\t\tthrow new SQLException(\"Insert \" + tablica\r\n\t\t\t\t\t+ \", ulazna vrijednost je null!\");\r\n\t\t \r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\ttry {\r\n\t\t\tconn = conBroker.getConnection();\r\n\r\n\t\t\tps = conn.prepareStatement(insertUpit);\r\n\r\n\t\t\tps.setString(1, ul.getSifraArtikla());\r\n\t\t\tps.setString(2, ul.getNaziv());\r\n\t\t\tps.setInt(3, ul.getPoreznaSkupina().intValue());\r\n\r\n\t\t\tif (ul.getCijenaSPDVom() == null\r\n\t\t\t\t\t|| ul.getCijenaSPDVom().intValue() <= 0)\r\n\t\t\t\tps.setNull(4, Types.INTEGER);\r\n\t\t\telse\r\n\t\t\t\tps.setInt(4, ul.getCijenaSPDVom().intValue());\r\n\r\n\t\t\tString op = ul.getOptickoPomagalo() != null\r\n\t\t\t\t\t&& ul.getOptickoPomagalo().booleanValue() ? DA : NE;\r\n\r\n\t\t\tps.setString(5, op);\r\n\t\t\t\r\n\t\t\tps.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\r\n\t\t\tps.setInt(7, NEPOSTOJECA_SIFRA);\r\n\t\t\tps.setTimestamp(8, null);\r\n\t\t\tps.setNull(9, Types.INTEGER);\r\n\r\n\t\t\tint kom = ps.executeUpdate();\r\n\r\n\t\t\tif (kom == 1) {\r\n\t\t\t\tul.setSifra(Integer.valueOf(0)); // po tome i pozivac zna da je\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// insert uspio...\r\n\t\t\t}// if kom==1\r\n\t\t\telse {\r\n\t\t\t\t//Logger.fatal(\"neuspio insert zapisa u tablicu \" + tablica, null);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// nema catch-anja SQL exceptiona... neka se pozivatelj iznad jebe ...\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (ps != null)\r\n\t\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t}\r\n\t\t\tconBroker.freeConnection(conn);\r\n\t\t}// finally\r\n\r\n\t}", "int insert(SPerms record);", "int insert(SwipersDO record);", "Reservierung insert(Reservierung reservierung) throws ReservierungException;", "@Override\n\tpublic int insert(Sptasts sptasts) {\n\t\tConnection conn = this.connectionManager.openConnection();\n\t\t//锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷\n\t\tTransactionManager.conn = conn;\n\t\tTransactionManager.beginTransaction();\n\t\t\n\t\t//锟斤拷锟斤拷锟斤拷锟�\n\n\t\t//Date posttime=sptasts.getPosttime();\n\t\tString saname =sptasts.getSaname();\n\t\tString satype =sptasts.getSatype();\n\t\tint sastate =sptasts.getSastate();\n\t\tString samark = sptasts.getSamark();\n\t\tString saresource =sptasts.getSaresource();\n\t\tint uid=sptasts.getUid();\n\t\t\n\t\t\n\t\t\n\t\n\t\t//锟斤拷锟斤拷锟接Qo拷锟斤拷锟斤拷模锟斤拷\n\t\tString strSQL = \"insert into sptasts values(null,now(),?,?,?,?,?,?)\";\n\t\tObject[] params = new Object[]{saname,satype,sastate,samark,saresource,uid};\n\t\t// 锟斤拷锟斤拷dbutils锟斤拷锟襟,诧拷锟斤拷锟斤拷execothers锟斤拷锟斤拷实锟斤拷锟斤拷菘锟斤拷锟斤拷硬锟斤拷锟斤拷锟�\n\t\tint affectedRows = this.dbUtils.execOthers(conn, strSQL, params);\n\t\t//锟斤拷锟斤拷锟揭伙拷锟斤拷慕锟斤拷锟斤拷锟斤拷锟接︼拷锟斤拷锟斤拷锟斤拷锟�\n\t\tif(affectedRows > 0){\n\t\t\t// 锟结交锟斤拷锟斤拷\n\t\t\tTransactionManager.commit();\n\t\t}else{\n\t\t\t// 锟截癸拷锟斤拷锟斤拷\n\t\t\tTransactionManager.rollback();\n\t\t}\n\t\treturn affectedRows;\n\t}", "@Override\n public void insert(J34SiscomexPaises j34SiscomexPaises) {\n super.doInsert(j34SiscomexPaises);\n }", "public void insert() throws SQLException {\r\n\t\t//SQL-Statement\r\n\r\n\t\tString sql = \"INSERT INTO \" + table +\" VALUES (\" + seq_genreID +\".nextval, ?)\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\r\n\t\tint roswInserted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \" +roswInserted+ \"Zeilen hinzugefügt\");\r\n\r\n\t\tsql = \"SELECT \"+seq_genreID+\".currval FROM DUAL\";\r\n\t\tstmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\t\tif(rs.next())this.setGenreID(rs.getInt(1));\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "int insert(Movimiento record);", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public void insert(String champs,String valeur) throws SQLException {\n\t\t///Cette partie pour créer un string = \"?, ?; ?...\"\n\t\t///tel que le nombre des points d'interrogation égale au nombre des champs.\n\t\t///Pour l'utiliser dans la syntaxe \"INSERT\" du SQL. \n\t\t//Tableau de champs et valeur .\n String[] champsTab = champs.split(\", \");\n String[] valeurTab = valeur.split(\", \");\n\t\tArrayList<String> valueQST = new ArrayList<String>();\n\t\tfor(int i=0; i<(champs.split(\", \")).length; i++) {\n\t\t\tvalueQST.add(\"?\");\n\t\t}\n\t\t//valueQSTStr = \"?, ?, ?...\"\n\t\tString valueQSTStr = valueQST.toString().replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t/////////////////////////////////////////////////////////////////////\n String sql = \"INSERT INTO personnel(\"+champs+\") VALUES(\"+valueQSTStr+\")\"; \n Connection conn = connecter(); \n PreparedStatement pstmt = conn.prepareStatement(sql);\n int j=0;\n for(int i=0 ; i<champsTab.length;i++) {\n \tj=i+1;\n \tif(!champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv|salaire\")) {\n \tif(champsTab.length>valeurTab.length) {\n \t\tif(champsTab[i].matches(\"Date_Fin_Contract\")){\n \t\tpstmt.setString(j,\"\");\t\n \t\t}else pstmt.setString(j,valeurTab[i]);\n \t}else pstmt.setString(j,valeurTab[i]);\n \t}\n \tif(champsTab[i].matches(\"salaire\")) {\n \t\tpstmt.setFloat(j,Float.parseFloat(valeurTab[i]));\n \t}\n \tif(champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv\")) {\n \t\tpstmt.setInt(j,Integer.parseInt(valeurTab[i]));\n \t}\n }\n pstmt.executeUpdate();\n\t\tconn.close();\n }", "void insert(Disproduct record);", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "void insert(BnesBrowsingHis record) throws SQLException;", "public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }", "int insertSelective(Prueba record);", "@Override\r\n\tpublic void insertPrestito(Prestito p) {\n\t\t\r\n\t}", "public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "int insert(Tipologia record);", "private void insertPerform(){\n \tif(!verify()){\n \t\treturn;\n \t}\n \tString val=new String(\"\");\n \tval=val+\"'\"+jTextField1.getText()+\"', \"; // poNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker1.getValue()\n \t\t)\n \t\t+\"', \"; // poDate\n \tval=val+\"'\"+vndList[jTextField2.getSelectedIndex()-1]+\"', \"; // vndNo\n \tval=val+\"'\"+jTextField3.getText()+\"', \"; // qtnNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker2.getValue()\n \t\t)\n \t\t+\"', \"; // qtnDate\n \tval=val+\"'\"+poAmount+\"', \"; // poTotal\n \tval=val+\"'pending', \"; // poStatus\n \tval=val+\"'\"+jEditorPane1.getText()+\"' \"; // remark\n \t\n \ttry{\n \t\tdbInterface1.cmdInsert(\"poMaster\", val);\n \t\tinsertPoBomDesc();\n \t\tinsertPoDesc();\n\t \tupdateBOM();\n \t}\n \tcatch(java.sql.SQLException ex){\n \t\tSystem.out.println (ex);\n \t}\n \tresetPerform();\n }", "public void addInschrijving(){\n if(typeField.getText().equalsIgnoreCase(\"Toernooi\")){\n try {\n Connection con = Main.getConnection();\n PreparedStatement add = con.prepareStatement(\"INSERT INTO Inschrijvingen (speler, toernooi, heeft_betaald) VALUES (?,?,?);\");\n add.setInt(1, Integer.valueOf(spelerIDField.getText()));\n add.setInt(2, Integer.valueOf(codeField.getText()));\n add.setString(3, heeftBetaaldField.getText());\n add.executeUpdate();\n } catch (Exception e) {\n System.out.println(e);\n }}\n else if(typeField.getText().equalsIgnoreCase(\"Masterclass\")){\n try {\n Connection con = Main.getConnection();\n PreparedStatement add = con.prepareStatement(\"INSERT INTO Inschrijvingen (speler, masterclass, heeft_betaald) VALUES (?,?,?);\");\n add.setInt(1, Integer.valueOf(spelerIDField.getText()));\n add.setInt(2, Integer.valueOf(codeField.getText()));\n add.setString(3, heeftBetaaldField.getText());\n add.executeUpdate();\n } catch (Exception e) {\n System.out.println(e);}\n }\n }", "@Override\n\tpublic void insertArticle(BoardVO vo) {\n\t\tString sql = \"INSERT INTO board VALUES(board_id_seq.NEXTVAL,?,?,?)\";\n\t\ttemplate.update(sql,vo.getWriter(),vo.getTitle(),vo.getContent());\n\t}", "void insert(CTipoComprobante record) throws SQLException;", "public void addBestelling(Bestelling bestelling) {\n\r\n DatabaseConnection connection = new DatabaseConnection();\r\n if(connection.openConnection())\r\n {\r\n // If a connection was successfully setup, execute the INSERT statement\r\n\r\n connection.executeSQLInsertStatement(\"INSERT INTO bestelling (`bestelId`, `tafelId`) VALUES(\" + bestelling.getId() + \",\" + bestelling.getTafelId() + \");\");\r\n\r\n for(Drank d : bestelling.getDranken()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO drank_bestelling (`DrankID`, `BestelId`, `hoeveelheid`) VALUES (\" + d.getDrankId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n for(Gerecht g : bestelling.getGerechten()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO gerecht_bestelling (`GerechtID`, `BestelId`, `hoeveelheid`) VALUES (\" + g.getGerechtId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n\r\n //Close DB connection\r\n connection.closeConnection();\r\n }\r\n\r\n }", "public void insertMovesToDB(String gameType, Vector<Moves> allMovesForAGame) {\n int lastIndex = 0;\n try {\n\n DriverManager.registerDriver(new com.mysql.cj.jdbc.Driver());\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/xogames\", \"root\", \"Jrqr541&\");\n\n PreparedStatement pstmt = con.prepareStatement(\"INSERT INTO games(gameType) VALUE (?)\");\n pstmt.setString(1, gameType);\n int rowsAffected = pstmt.executeUpdate();\n pstmt.close();\n\n Statement stmt = con.createStatement();\n String queryString = new String(\"SELECT MAX(ID) FROM games\");\n ResultSet rs = stmt.executeQuery(queryString);\n\n while (rs.next()) {\n lastIndex = rs.getInt(1);\n }\n\n stmt.close();\n\n for (Moves move : allMovesForAGame) {\n\n PreparedStatement pstmt1 = con.prepareStatement(\"INSERT INTO steps(player,x,y,ID,step,finalState) VALUE (?,?,?,?,?,?)\");\n if (move.isPlayer()) {\n pstmt1.setInt(1, 1);\n } else {\n pstmt1.setInt(1, 0);\n }\n pstmt1.setInt(2, move.getX());\n pstmt1.setInt(3, move.getY());\n pstmt1.setInt(4, lastIndex);\n pstmt1.setInt(5, move.getStep());\n pstmt1.setInt(6, move.getFinalState());\n\n int rowsAffected1 = pstmt1.executeUpdate();\n pstmt1.close();\n\n }\n con.close();\n // System.out.println(\"elmafrood kda closed\");\n } catch (SQLException ex) {\n System.out.println(\"error in executing insert in toDB fn in SinglePlayerController 2 \" + ex);\n // ex.printStackTrace();\n }\n\n }", "public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }", "public void insert(Service servico){\n Database.servico.add(servico);\n }", "int insertp(Publisher p){\r\n String pu = \"INSERT INTO publisher(publisher_id,publisher_name) VALUES(?,?);\";\r\n int res=0;\r\n try {\r\n PreparedStatement statement = this.connection.prepareStatement(pu);\r\n statement.setInt(1, p.getPublisher_id());\r\n statement.setString(2, p.getPublisher_name());\r\n res = statement.executeUpdate();\r\n statement.close(); //close\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return res;\r\n }", "public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }", "int insert(PmPost record);", "int insert(Assist_table record);", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "public void insert() {\n String sqlquery = \"insert into SCORE (NICKNAME, LEVELS,HIGHSCORE, NUMBERKILL) values(?, ?, ?,?)\";\n try {\n ps = connect.prepareStatement(sqlquery);\n ps.setString(1, this.nickname);\n ps.setInt(2, this.level);\n ps.setInt(3, this.highscore);\n ps.setInt(4, this.numofKill);\n ps.executeUpdate();\n //JOptionPane.showMessageDialog(null, \"Saved\", \"Insert Successfully\", JOptionPane.INFORMATION_MESSAGE);\n System.out.println(\"Insert Successfully!\");\n ps.close();\n connect.close();\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "@Override\r\n\tpublic void inserir(Funcionario funcionario) throws SQLException {\n\t\topen();\r\n\t\t\r\n\t\tclose();\r\n\t\t\r\n\t}", "public void insertBillFood(Bill billFood) {\nString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n \ntry {\n\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t \n\t\n\t\tps.setInt(1, billFood.getIdF());\n\t\tps.setString(2,null);\n\t ps.setInt(3, billFood.getIdE());\n\t\tps.setDouble(4, billFood.getPrice());\n\t\tps.setString(5, billFood.getSerialNumber());\n\t\tps.setDouble(6, billFood.getTotal());\n\t\tps.execute();\n\t\t\n\t\n\t \n} catch (SQLException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\n\n\t\n\t\n}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "private void inserirQuests(){\n try {\n methods.InsereQuestsOnBD();\n //Toast.makeText(this,\"Inseridos dados com sucesso\",Toast.LENGTH_LONG).show();\n\n }\n catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Erro\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }", "int insert(Sequipment record);", "int insertSelective(Movimiento record);", "public void insertar() throws SQLException {\n String sentIn = \" INSERT INTO datosnodoactual(AmigoIP, AmigoPuerto, AmigoCertificado, AmigoNombre, AmigoSobreNombre, AmigoLogueoName, AmigoPassword) \"\r\n + \"VALUES (\" + AmigoIp + \",\" + AmigoPuerto + \",\" + AmigoCertificado + \",\" + AmigoNombre + \",\" + AmigoSobreNombre + \",\" + AmigoLogueoName + \",\" + AmigoPassword + \")\";\r\n System.out.println(sentIn);\r\n InsertApp command = new InsertApp();\r\n try (Connection conn = command.connect();\r\n PreparedStatement pstmt = conn.prepareStatement(sentIn)) {\r\n if (pstmt.executeUpdate() != 0) {\r\n System.out.println(\"guardado\");\r\n } else {\r\n System.out.println(\"error\");\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "@Override\n\tpublic void insertIPODetail(IPODetail ipo) throws SQLException {\n\t\t\n\t}", "int insert(Shipping record);", "@Override\n public void insert(J34SiscomexOrigemDi j34SiscomexOrigemDi) {\n super.doInsert(j34SiscomexOrigemDi);\n }", "int insert(Ltsprojectpo record);", "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 insert(OrderPreferential record) throws SQLException;", "public void insertarRubro2(RubrosObject rubro) throws SQLException \r\n { \r\n PreparedStatement prepStmt = null;\r\n\r\n String insertStatement = \"INSERT INTO RUBROS (IDRUBRO, NOMBRE, MONTO, IDPRESUPUESTO,SALDO,TIPO_PAGO) VALUES (?,?,?,?,?,?)\";\r\n \r\n prepStmt = con.prepareStatement(insertStatement);\r\n \r\n prepStmt.setInt(1, Integer.parseInt(rubro.getIdentificador()));\r\n prepStmt.setString(2, rubro.getNombre());\r\n prepStmt.setDouble(3, Double.parseDouble(rubro.getMonto()));\r\n prepStmt.setInt(4, Integer.parseInt(rubro.getIdpresupuesto()));\r\n prepStmt.setDouble(5, Double.parseDouble(rubro.getMonto()));//EL SALDO SE INICIA IGUAL AL MONTO\r\n prepStmt.setString(6, rubro.getTipo_pago().trim());\r\n \r\n prepStmt.executeUpdate();\r\n \r\n \r\n if (prepStmt != null) {\r\n prepStmt.close();\r\n }\r\n\r\n }", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "int insert(Tour record);", "WriteRequest insert(PiEntity entity);", "public int insert(Listing listing) throws SQLException;", "void insert(GfanCodeBanner record) throws SQLException;", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "void insert(CTipoPersona record) throws SQLException;", "@Transactional\r\n\r\n\t@Override\r\n\tpublic void insertar(Distrito distrito) {\n\t\tem.persist(distrito);\t\r\n\t}", "int insert(Forumpost record);", "int insert(Disease record);", "@Override\n\tpublic int insert(StuXK sxk) {\n\t\tString sql=\"insert into T_CourseSchedule(StudentID,TeachTaskID,ScoreOne,ScoreTwo,ScoreThree,TotalScore) values(?,?,?,?,?,?)\";\n\t\tObject[] parmas={sxk.getStudentID(),sxk.getTeachTaskID(),sxk.getScoreOne(),sxk.getScoreTwo(),sxk.getScoreThree(),sxk.getTotalScore()};\t\t\n\t\tBaseDAO dao=new BaseDAO();\t\t\n\t\treturn dao.insert(sql, parmas);\n\t}", "@Override\n\tpublic boolean insert(String sql) {\n\t\treturn false;\n\t}", "public void insert(Curso curso) throws SQLException {\n String query = \"\";\n Conexion db = new Conexion();\n\n query = \"INSERT INTO curso VALUES (NULL,?,?,?);\";\n \n PreparedStatement ps = db.conectar().prepareStatement(query);\n //Aquí se asignaran a los interrogantes(?) anteriores el valor oportuno en el orden adecuado\n ps.setString(1, curso.getNombre()); \n ps.setInt(2, curso.getFamilia());\n ps.setString(3, curso.getProfesor());\n \n\n if (ps.executeUpdate() > 0) {\n System.out.println(\"El registro se insertó exitosamente.\");\n } else {\n System.out.println(\"No se pudo insertar el registro.\");\n }\n\n ps.close();\n db.conexion.close();\n }", "int insertSelective(Tourst record);", "public void insert(taxi ta)throws ClassNotFoundException,SQLException\r\n {\n String taxino=ta.getTaxino();\r\n String drivername=ta.getDrivername();\r\n String driverno=ta.getDriverno();\r\n String taxitype=ta.getTaxitype();\r\n String state=ta.getState();\r\n String priority=ta.getPriority();\r\n connection= dbconnection.createConnection();\r\nString sqlString=\"INSERT INTO taxi (taxino,drivername,driverno,taxitype,state,priority) VALUES ('\"+taxino+\"','\"+drivername+\"','\"+driverno+\"','\"+taxitype+\"','\"+state+\"','\"+priority+\"')\";\r\n PreparedStatement preparedStmt = connection.prepareStatement(sqlString); \r\n preparedStmt.execute(); \r\n connection.close();\r\n \r\n }", "@Override\n public void insert(J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi) {\n super.doInsert(j34SiscomexMercadoriaAdi);\n }", "void insertSelective(CTipoComprobante record) throws SQLException;", "public void insertBooking(Booking booking) throws SQLException, Exception;", "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 }", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 등록을 하다.\");\n\t}", "private void insertData() {\n for (int i = 0; i < 3; i++) {\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n }", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "@Override\r\n public void inserirQuestaoDiscursiva(QuestaoDiscursiva questaoDiscursiva)\r\n throws Exception {\n rnQuestaoDiscursiva.inserir(questaoDiscursiva);\r\n\r\n }", "int insert(ParkCurrent record);", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "public void insert(VRpHrStp record) {\r\n getSqlMapClientTemplate().insert(\"V_RP_HR_STP.ibatorgenerated_insert\", record);\r\n }", "int insert(Cargo record);", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "int insert(Kaiwa record);", "public boolean insertar(vpoliza dts) {\r\n sSql = \"INSERT INTO poliza\\n\"\r\n + \"(monto_total,fecha_inicio, fecha_venc, cliente_vehiculo_chapaId) \\n\"\r\n + \"VALUES\\n\"\r\n + \"(?,?,?,?);\";\r\n try {\r\n PreparedStatement pst = cn.prepareStatement(sSql);\r\n /*Se crea un objeto pst del tipo PreparedStatement (prepara la consulta sql)\r\n para insertar los datos en la base de datos mediante insert into*/\r\n pst.setInt(1, dts.getMonto_total());\r\n pst.setDate(2, dts.getFecha_inicio());\r\n pst.setDate(3, dts.getFecha_venc());\r\n \r\n pst.setString(4, dts.getCliente_vehiculo_chapaId());\r\n \r\n int n = pst.executeUpdate();\r\n \r\n if (n != 0) {\r\n return true;\r\n }\r\n return false;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n JOptionPane.showMessageDialog(null, \"LO SENTIMOS HA OCURRIDO UN ERROR >> \" + ex + \" <<\");\r\n return false;\r\n }\r\n }", "@Override\n\tpublic void insert(Connection c, Genre v) throws SQLException {\n\n\t}", "public void insert(Student student) {\t\t\r\n\t\tdao.insertStudent(student); \r\n\t}" ]
[ "0.7068765", "0.6964535", "0.68319017", "0.6828228", "0.6753672", "0.6740214", "0.6734321", "0.67267114", "0.6715156", "0.67085385", "0.66968435", "0.6691689", "0.66777366", "0.66776496", "0.6677116", "0.66396", "0.6613564", "0.6611968", "0.6580825", "0.6562201", "0.6560848", "0.65543014", "0.65525925", "0.6547309", "0.6539882", "0.65319693", "0.65245736", "0.6516572", "0.6509775", "0.650495", "0.65048885", "0.6478491", "0.64759254", "0.6463762", "0.64625597", "0.6460492", "0.6446328", "0.64416546", "0.6422566", "0.64204687", "0.64201784", "0.64200634", "0.64181745", "0.64114267", "0.6409973", "0.6405135", "0.64005506", "0.63990146", "0.63923335", "0.63902116", "0.6386681", "0.6368079", "0.6365935", "0.6364549", "0.63604057", "0.6358253", "0.6358238", "0.6350542", "0.6347906", "0.6343366", "0.6337883", "0.63354427", "0.6330767", "0.63242245", "0.63143086", "0.63120335", "0.6310838", "0.63091254", "0.63057077", "0.63025683", "0.62969214", "0.62924874", "0.6269526", "0.62665296", "0.62650794", "0.62606", "0.62557185", "0.6254929", "0.6252946", "0.6249455", "0.62448364", "0.62414724", "0.6238718", "0.6231964", "0.6231461", "0.6230018", "0.6226959", "0.62203777", "0.62158555", "0.62154406", "0.6207614", "0.62059027", "0.6204127", "0.6200742", "0.6199325", "0.61972743", "0.61958957", "0.6193659", "0.61926407", "0.6192526", "0.6187337" ]
0.0
-1
insertErgebnis() / Random/Lotto Ergebnis in Database einpflegen
public void insertErgebnis() { Intent callerIntent = getIntent(); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); try { //Toast.makeText(this, "Insert_Ergebnis",Toast.LENGTH_LONG).show(); final String METHOD_NAME = "insertErgebnis"; final String SOAP_ACTION = NAMESPACE + METHOD_NAME; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapObject newErgebnis = new SoapObject(NAMESPACE, "inputErgebnis"); newErgebnis.addProperty("Ergebnis",this.ergebnisString); newErgebnis.addProperty("SpielID", (packageFromSpiel.getInt("MaxSpielID")+1)); request.addSoapObject(newErgebnis); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); MarshalFloat marshal = new MarshalFloat(); marshal.register(envelope); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); SoapPrimitive soapPrimitive = (SoapPrimitive) envelope.getResponse(); /* int ret = Integer.parseInt(soapPrimitive.toString()); if (ret <= 0) { Toast.makeText(this, "Insert Ergebnis fail", Toast.LENGTH_LONG).show(); } else { Toast.makeText(this, "Insert Ergebnis Successful",Toast.LENGTH_LONG).show(); } */ } catch (Exception ex) { Toast.makeText(this, "Insert Ergebnis Fehler Exception", Toast.LENGTH_LONG).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCertainRow(String username, String num, String ISBN)\n {\n String insertStr;\n int tempt= (int) (Math.random()*500);\n String random=Integer.toString(tempt);\n try{\n\n insertStr=\"INSERT IGNORE INTO borrowlist (username, num, random, ISBN) VALUES(\"\n +quotate(username)+\",\"\n +quotate(num)+\",\"\n +quotate(random)+\",\"\n +quotate(ISBN)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }", "public void insert() throws SQLException;", "private void insertTupel(Connection c) {\n try {\n String query = \"INSERT INTO \" + getEntityName() + \" VALUES (null,?,?,?,?,?);\";\n PreparedStatement ps = c.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, getAnlagedatum());\n ps.setString(2, getText());\n ps.setString(3, getBild());\n ps.setString(4, getPolizist());\n ps.setString(5, getFall());\n ps.executeUpdate();\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n setID(rs.getString(1));\n getPk().setValue(getID());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void insert() throws SQLException {\r\n\t\t//SQL-Statement\r\n\r\n\t\tString sql = \"INSERT INTO \" + table +\" VALUES (\" + seq_genreID +\".nextval, ?)\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\r\n\t\tint roswInserted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \" +roswInserted+ \"Zeilen hinzugefügt\");\r\n\r\n\t\tsql = \"SELECT \"+seq_genreID+\".currval FROM DUAL\";\r\n\t\tstmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\t\tif(rs.next())this.setGenreID(rs.getInt(1));\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t}", "public void addBestelling(Bestelling bestelling) {\n\r\n DatabaseConnection connection = new DatabaseConnection();\r\n if(connection.openConnection())\r\n {\r\n // If a connection was successfully setup, execute the INSERT statement\r\n\r\n connection.executeSQLInsertStatement(\"INSERT INTO bestelling (`bestelId`, `tafelId`) VALUES(\" + bestelling.getId() + \",\" + bestelling.getTafelId() + \");\");\r\n\r\n for(Drank d : bestelling.getDranken()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO drank_bestelling (`DrankID`, `BestelId`, `hoeveelheid`) VALUES (\" + d.getDrankId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n for(Gerecht g : bestelling.getGerechten()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO gerecht_bestelling (`GerechtID`, `BestelId`, `hoeveelheid`) VALUES (\" + g.getGerechtId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n\r\n //Close DB connection\r\n connection.closeConnection();\r\n }\r\n\r\n }", "public void insert()\n\t{\n\t}", "public long insert();", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "public void insertDummies() {\r\n\t\tinsertPersoner();\r\n\t\tinsertAnsatte();\r\n\t\tinsertEmner();\r\n\t\tinsertForfattere();\r\n\t\tinsertBoger();\r\n\t\tinsertBogEksemplare();\r\n\t\tinsertReservation();\r\n\t\tinsertLecture();\r\n\t\tinsertPlannedLectures();\r\n\t}", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 등록을 하다.\");\n\t}", "private static void testInsert() {\n\t\tSkemp skemp = new Skemp();\n\t\tskemp.setId(99);\n\t\tskemp.setName(\"王2\");\n\t\tskemp.setSex(\"男\");\n\t\tSkempDao skempDao = new SkempDaoImpl();\n\t\tskempDao.insertSkemp(skemp);\n\t}", "private void insertBoger() {\r\n\t\tEmne emne;\r\n\t\tBog bog;\r\n\t\tForfatter forfatter;\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,2);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-2\", emne, 2002,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(1);\r\n\t\tbog = new BogEksemplar(\"Titel-3\", emne, 2003,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-4\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(2);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t}", "public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public void processInsertar() {\n }", "public int insert(){ // Wrapper insert function, passes random values to insert integer data in the tree.\n Random rn = new Random();\n\n\n for (int i = 0; i < 10; ++i)\n {\n insert(3);\n insert(5);\n insert(9);\n insert(5);\n insert(8);\n insert(1);\n insert(7);\n insert(4);\n insert(3);\n }\n return 1;\n }", "int insert(Assist_table record);", "int insert(GirlInfo record);", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "int insert(TBBearPer record);", "@Override\n\tpublic void insert(Connection c, Genre v) throws SQLException {\n\n\t}", "int insertSelective(Prueba record);", "int insertSelective(Assist_table record);", "public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}", "int insertSelective(GirlInfo record);", "int insert(Tourst 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 }", "int insertSelective(Engine record);", "int insert(Prueba record);", "public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "@Override\n\tpublic void preInsert() {\n\n\t}", "int insert(Disease record);", "@Override\n\tpublic void insertArticle(BoardVO vo) {\n\t\tString sql = \"INSERT INTO board VALUES(board_id_seq.NEXTVAL,?,?,?)\";\n\t\ttemplate.update(sql,vo.getWriter(),vo.getTitle(),vo.getContent());\n\t}", "int insertSelective(Tourst record);", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "int insert(Engine record);", "public long insert(EvaluetingListDO evaluetingList) throws DataAccessException;", "int insert(Powers record);", "@Override\n\tpublic boolean insert(String sql) {\n\t\treturn false;\n\t}", "@Test\n public void testSubmitFood() throws Exception {\n \n //submits a food with the given parmeters and randomizes the \n //foods calories, then verifys the food was created by comparing\n //the random number with the expected random number\n System.out.println(\"Submit Food\");\n Connection conn = DriverManager.getConnection(\"jdbc:mysql://localhost/users\", \"root\", \"tech\");\n Statement stmt= (Statement) conn.createStatement();\n Random rn = new Random();\n int maximum = 300;\n int minimum = 1;\n int range = maximum - minimum + 1;\n int randomNum = rn.nextInt(range) + minimum;\n sql=\"insert into foodlog (id,userName,food,log,totalCalories) \"\n + \"VAlUES (NULL,'thuff','Apple','2016-03-09','\"+randomNum+\"')\";\n stmt.executeUpdate(sql);\n sql = \"SELECT * FROM foodlog WHERE totalCalories='\"+randomNum+\"'\";\n rs = stmt.executeQuery(sql);\n \n while(rs.next()){\n assertTrue(rs.getInt(\"totalCalories\")==(randomNum));\n assertFalse(rs.getInt(\"totalCalories\")==(0));\n }\n }", "@Override\n\tpublic void insert(Article article) throws Exception {\n\t\tSystem.out.println(\"Insert Start\");\n\t\tStringBuffer sql = new StringBuffer();\n\t\t\n\t\tsql.append(\"insert into article \");\n\t\tsql.append(\"(group_id,sequence_no,posting_date,read_count,writer_name, \");\n\t\tsql.append(\"password,title,content) \");\n\t\tsql.append(\"values(?,?,?,0,?,?,?,?)\");\n\t\t\n\t\tint groupId = article.getGroupId();\n\t\tif(groupId == 0 ){ //글이 리플이 아닌 경우에는 ID Generator를 생성 해주자.\n\t\t\tgroupId = IdGenerator.getInstance().generateNextId(\"article\",jdbcTemplate);\n\t\t\tarticle.setGroupId(groupId);\n\t\t\t//그리고 해당 글에 대한 레벨 역시 초기화를 필요로 한다.\n\t\t\tDecimalFormat decimalFormat = new DecimalFormat(\"0000000000\");\n\t\t\tarticle.setSequenceNumber(decimalFormat.format(groupId)+\"999999\");\n\t\t}\n\t\t\n\t\tarticle.setPostingDate(new Date());\n\t\t\n\t\t\n\t\tjdbcTemplate.update(sql.toString(),article.getGroupId(),article.getSequenceNumber()\n\t\t\t\t,new Timestamp(article.getPostingDate().getTime())\n\t\t\t\t,article.getWriterName()\n\t\t\t\t,article.getPassword()\n\t\t\t\t,article.getTitle()\n\t\t\t\t,article.getContent());\n\t\t\n\t\t\n\n\t}", "@Test\n public void testInsert() {\n int resultInt = disciplineDao.insert(disciplineTest);\n // Je pense à le suppr si l'insert à fonctionné\n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n disciplineDao.delete(disciplineTest);\n }\n assertTrue(resultInt > 0);\n }", "int insert(TCar record);", "int insert(Orderall record);", "void insert(BnesBrowsingHis record) throws SQLException;", "int insert(Dress record);", "int insert(Abum record);", "int insert(Article record);", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "int insert(Enfermedad record);", "public void testInsert02() {\r\n\t\tBTree<String, Integer> bt = new BTree<String, Integer>(10);\r\n\t\tList<String> words = TestUtils.randomWords(5000, 31);\r\n\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\tbt.set(words.get(i), i);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\tassertEquals(bt.get(words.get(i)), Integer.valueOf(i));\r\n\t\t}\r\n\t}", "int insert(Lbt72TesuryoSumDPkey record);", "int insert(Tipologia record);", "int insert(RepStuLearning record);", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "int insert(TblMotherSon record);", "int insertSelective(Enfermedad record);", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\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}\r\n\t}", "int insert(Forumpost record);", "private void insert() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"insert into OldStudent(id,name,grade) select s.id,s.name,s.grade from Student s\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows inserted in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\t}", "int insert(Dormitory record);", "public static void testInsertar(int n) {\n\t\tSystem.out.println(\"-----------------------------------------------------\");\r\n\t\tSystem.out.println(\"Test Insertar\");\r\n\t\tSystem.out.println(\"Crear un árbol binario completo de altura \" + n + \"...\");\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tArbolBin arbol = new ArbolBin();\r\n\t\ttestCargarArbolBinarioCompleto(arbol, n, true);\r\n\t\t\r\n\t\tSystem.out.println(arbol.toString());\r\n\t\t\r\n\t\tSystem.out.println(\"Intentar volver a cargar el arbol, cada inserción imprime false:\");\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\ttestCargarArbolBinarioCompleto(arbol, n, true);\r\n\t\t\r\n\t\tSystem.out.println(\"La estructura del arbol no cambia: \");\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tSystem.out.println(arbol.toString());\r\n\t}", "int insertSelective(Dress record);", "public void testInsert3() throws Exception {\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n // Integer key = (Integer) insert.getParameterValue(\"generated_key\");\n Integer key = new Integer(insert.getGeneratedKey());\n\n // Verify insert\n Command select = das.createCommand(\"Select ID, NAME from COMPANY where ID = ?\");\n select.setParameter(1, key);\n DataObject root = select.executeQuery();\n assertEquals(key, root.get(\"COMPANY[1]/ID\"));\n\n }", "int insertSelective(Admin record);", "int insertSelective(Admin record);", "int insertSelective(Movimiento record);", "@Override\n public int insert(Beheerder beheerder) {\n Connection connection = createConnection();\n int id = -1;\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO gebruiker (voornaam,achternaam,adres,postcode,\" +\n \"woonplaats,telefoon,email,wachtwoord,rechten_id, isactief) VALUES (?,?,?,?,?,?,?,?,?,?)\", Statement.RETURN_GENERATED_KEYS);\n preparedStatement.setString(1, beheerder.getVoornaam());\n preparedStatement.setString(2, beheerder.getAchternaam());\n preparedStatement.setString(3, beheerder.getAdres());\n preparedStatement.setString(4, beheerder.getPostcode());\n preparedStatement.setString(5, beheerder.getWoonplaats());\n preparedStatement.setString(6, beheerder.getTelefoon());\n preparedStatement.setString(7, beheerder.getEmail());\n preparedStatement.setString(8, beheerder.getWachtwoord());\n preparedStatement.setInt(9, beheerder.getRechten_id());\n preparedStatement.setBoolean(10, true);\n preparedStatement.executeUpdate();\n\n ResultSet rs = preparedStatement.getGeneratedKeys();\n rs.next();\n id = rs.getInt(1);\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return id;\n }", "int insertSelective(TCar record);", "public static long insert(Disease disease) throws Exception {\n if (OpenDentBusiness.DataConnection.DBtype == OpenDentBusiness.DatabaseType.Oracle)\n {\n disease.DiseaseNum = DbHelper.getNextOracleKey(\"disease\",\"DiseaseNum\");\n int loopcount = 0;\n while (loopcount < 100)\n {\n try\n {\n return Insert(disease, true);\n }\n catch (Oracle.DataAccess.Client.OracleException ex)\n {\n if (ex.Number == 1 && ex.Message.ToLower().Contains(\"unique constraint\") && ex.Message.ToLower().Contains(\"violated\"))\n {\n disease.DiseaseNum++;\n loopcount++;\n }\n else\n {\n throw ex;\n } \n }\n \n }\n throw new ApplicationException(\"Insert failed. Could not generate primary key.\");\n }\n else\n {\n return Insert(disease, false);\n } \n }", "private void inserirQuests(){\n try {\n methods.InsereQuestsOnBD();\n //Toast.makeText(this,\"Inseridos dados com sucesso\",Toast.LENGTH_LONG).show();\n\n }\n catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Erro\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }", "int insert(TLinkman record);", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "int insertSelective(Tipologia record);", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "int insertSelective(Forumpost record);", "int insert(TCpySpouse record);", "int insertSelective(QuestionOne record);", "public void testInsert() {\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n assertEquals(6, test1.length());\n }", "int insert(Nutrition record);", "int insertao(Author_of ao){\r\n int res=0;\r\n \r\n String a = \"INSERT INTO author_of VALUES(?,?);\";\r\n try {\r\n PreparedStatement statement = this.connection.prepareStatement(a);\r\n statement.setString(1, ao.getIsbn());\r\n statement.setInt(2, ao.getAuthor_id());\r\n res = statement.executeUpdate();\r\n statement.close(); //close\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return res;\r\n }", "@Override\n public int insert(KlantBedrijf kb) {\n Connection connection = createConnection();\n int id = -1;\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO klant_has_bedrijf (klant_id,bedrijf_id) VALUES (?,?)\", Statement.RETURN_GENERATED_KEYS);\n preparedStatement.setInt(1, kb.getKlantId());\n preparedStatement.setInt(2, kb.getBedrijfId());\n preparedStatement.executeUpdate();\n\n ResultSet rs = preparedStatement.getGeneratedKeys();\n rs.next();\n id = rs.getInt(1);\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return id;\n }", "private void insert(String sql, long rowId, int runId, int payloadColumns) {\n String nodeId = engine.getEngineName();\n\n Object[] values = new Object[payloadColumns + 3];\n values[0] = rowId;\n values[1] = nodeId;\n values[2] = runId;\n\n for (int c = 3; c < values.length; c++) {\n values[c] = RandomStringUtils.randomAlphanumeric(100);\n }\n\n engine.getSqlTemplate().update(sql, values);\n }", "int insertSelective(PmPost record);", "int insert(Question27 record);", "int insertSelective(ArticleDo record);", "public void insertMovesToDB(String gameType, Vector<Moves> allMovesForAGame) {\n int lastIndex = 0;\n try {\n\n DriverManager.registerDriver(new com.mysql.cj.jdbc.Driver());\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/xogames\", \"root\", \"Jrqr541&\");\n\n PreparedStatement pstmt = con.prepareStatement(\"INSERT INTO games(gameType) VALUE (?)\");\n pstmt.setString(1, gameType);\n int rowsAffected = pstmt.executeUpdate();\n pstmt.close();\n\n Statement stmt = con.createStatement();\n String queryString = new String(\"SELECT MAX(ID) FROM games\");\n ResultSet rs = stmt.executeQuery(queryString);\n\n while (rs.next()) {\n lastIndex = rs.getInt(1);\n }\n\n stmt.close();\n\n for (Moves move : allMovesForAGame) {\n\n PreparedStatement pstmt1 = con.prepareStatement(\"INSERT INTO steps(player,x,y,ID,step,finalState) VALUE (?,?,?,?,?,?)\");\n if (move.isPlayer()) {\n pstmt1.setInt(1, 1);\n } else {\n pstmt1.setInt(1, 0);\n }\n pstmt1.setInt(2, move.getX());\n pstmt1.setInt(3, move.getY());\n pstmt1.setInt(4, lastIndex);\n pstmt1.setInt(5, move.getStep());\n pstmt1.setInt(6, move.getFinalState());\n\n int rowsAffected1 = pstmt1.executeUpdate();\n pstmt1.close();\n\n }\n con.close();\n // System.out.println(\"elmafrood kda closed\");\n } catch (SQLException ex) {\n System.out.println(\"error in executing insert in toDB fn in SinglePlayerController 2 \" + ex);\n // ex.printStackTrace();\n }\n\n }", "int insertSelective(TestEntity record);", "public void insert(List<T> entity) throws NoSQLException;", "@Insert(onConflict = OnConflictStrategy.IGNORE)\n void insert(DataTugas dataTugas);", "int insert(NjProductTaticsRelation record);", "int insertSelective(Orderall record);", "int insertSelective(Kaiwa record);", "int insert(Movimiento record);", "int insert(CaseLinkman record);", "int insert(ArticleDo record);", "public boolean crearRegistro(int codigoCiclo, int codigoPlan, int codigoObjetivo, String descripcion, String justificacion, double valorMeta, double valorMinimo, double valorMaximo, String tipoMedicion, String estado, String fuenteDato, String aplicaEn, String unidadMedida, String tipoGrafica, String mes01, String mes02, String mes03, String mes04, String mes05, String mes06, String mes07, String mes08, String mes09, String mes10, String mes11, String mes12, Collection arrResponsables, Collection arrRecursos, String usuarioInsercion) {\n/* 664 */ int elSiguiente = siguienteRegistro(codigoCiclo, codigoPlan);\n/* 665 */ if (elSiguiente == 0) {\n/* 666 */ return false;\n/* */ }\n/* */ \n/* */ try {\n/* 670 */ String s = \"insert into cal_plan_metas (codigo_ciclo,codigo_plan,codigo_meta,codigo_objetivo,descripcion,justificacion,valor_meta,valor_minimo,valor_maximo,tipo_medicion,estado,fuente_dato,aplica_en,unidad_medida,tipo_grafica,mes01,mes02,mes03,mes04,mes05,mes06,mes07,mes08,mes09,mes10,mes11,mes12,fecha_insercion,usuario_insercion) values (\" + codigoCiclo + \",\" + \"\" + codigoPlan + \",\" + \"\" + elSiguiente + \",\" + \"\" + codigoObjetivo + \",\" + \"'\" + descripcion + \"',\" + \"'\" + justificacion + \"',\" + \"\" + valorMeta + \",\" + \"\" + valorMinimo + \",\" + \"\" + valorMaximo + \",\" + \"'\" + tipoMedicion + \"',\" + \"'\" + estado + \"',\" + \"'\" + fuenteDato + \"',\" + \"'\" + aplicaEn + \"',\" + \"'\" + unidadMedida + \"',\" + \"'\" + tipoGrafica + \"',\" + \"'\" + mes01 + \"',\" + \"'\" + mes02 + \"',\" + \"'\" + mes03 + \"',\" + \"'\" + mes04 + \"',\" + \"'\" + mes05 + \"',\" + \"'\" + mes06 + \"',\" + \"'\" + mes07 + \"',\" + \"'\" + mes08 + \"',\" + \"'\" + mes09 + \"',\" + \"'\" + mes10 + \"',\" + \"'\" + mes11 + \"',\" + \"'\" + mes12 + \"',\" + \"\" + Utilidades.getFechaBD() + \",\" + \"'\" + usuarioInsercion + \"'\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 731 */ boolean rta = this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* 734 */ if (rta) {\n/* */ \n/* 736 */ s = \"delete from cal_plan_recursos_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + elSiguiente;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 742 */ this.dat.executeUpdate(s);\n/* 743 */ Iterator iterator = arrRecursos.iterator();\n/* 744 */ while (iterator.hasNext()) {\n/* 745 */ Integer codigo = (Integer)iterator.next();\n/* 746 */ crearRecurso(codigoCiclo, codigoPlan, elSiguiente, codigo.intValue(), \"A\", usuarioInsercion);\n/* */ } \n/* 748 */ s = \"delete from cal_plan_responsables_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + elSiguiente + this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 756 */ Iterator iterator2 = arrResponsables.iterator();\n/* 757 */ while (iterator2.hasNext()) {\n/* 758 */ Integer codigo = (Integer)iterator2.next();\n/* 759 */ crearResponsable(codigoCiclo, codigoPlan, elSiguiente, codigo.intValue(), \"A\", usuarioInsercion);\n/* */ } \n/* */ } \n/* */ \n/* 763 */ return rta;\n/* */ }\n/* 765 */ catch (Exception e) {\n/* 766 */ e.printStackTrace();\n/* 767 */ Utilidades.writeError(\"%CalMetasDAO:crearRegistro \", e);\n/* */ \n/* 769 */ return false;\n/* */ } \n/* */ }", "int insert(Tour record);" ]
[ "0.6886203", "0.6816657", "0.68139523", "0.6704576", "0.66659826", "0.66318125", "0.66154593", "0.65952265", "0.6540003", "0.6539991", "0.6534718", "0.6527967", "0.6523382", "0.6489587", "0.6477579", "0.6476779", "0.6473668", "0.6461057", "0.64571226", "0.6436011", "0.6410801", "0.64013284", "0.6372005", "0.63686484", "0.6368419", "0.6351374", "0.6349098", "0.6343182", "0.63379973", "0.6335011", "0.6332634", "0.6329191", "0.6326877", "0.63163626", "0.6305366", "0.6300752", "0.6279508", "0.6279152", "0.62761563", "0.62721336", "0.6258903", "0.62586254", "0.62481946", "0.62416947", "0.622708", "0.62190795", "0.6214194", "0.6214175", "0.62092274", "0.6202893", "0.62014717", "0.61983335", "0.619816", "0.61956835", "0.61952335", "0.6184825", "0.6171812", "0.6166541", "0.6166093", "0.6164173", "0.616412", "0.6162332", "0.61509943", "0.6149283", "0.6143453", "0.6137143", "0.6129871", "0.6126085", "0.6126085", "0.61241573", "0.61222076", "0.61204326", "0.6115113", "0.61129105", "0.6104522", "0.60988456", "0.60956377", "0.60927576", "0.6090061", "0.6089255", "0.60858864", "0.60826534", "0.6081196", "0.6078333", "0.60754794", "0.607318", "0.6072087", "0.6071355", "0.6070995", "0.60707176", "0.6069941", "0.6067886", "0.60667896", "0.60645264", "0.60629874", "0.60587746", "0.605743", "0.60573095", "0.6054416", "0.60525763", "0.6052142" ]
0.0
-1
insertVorratErgebnis() / Abgebener Tipp wird in Database eingepflegt
public void insertVorratErgebnis() { Intent callerIntent = getIntent(); Bundle packageFromLogin = callerIntent.getBundleExtra("LogInformationen"); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); try { //Toast.makeText(this, "Insert_VorratErgebnis",Toast.LENGTH_LONG).show(); final String METHOD_NAME = "insertVorrateEgebnis"; final String SOAP_ACTION = NAMESPACE + METHOD_NAME; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapObject newErgebnis = new SoapObject(NAMESPACE, "inputvorratergebnis"); newErgebnis.addProperty("LoginID",packageFromLogin.getInt("ID_Login")); if (pruefenObSpielerSpielHerstellerIst()==true){ newErgebnis.addProperty("SpielID", (packageFromSpiel.getInt("MaxSpielID")+1));} else {newErgebnis.addProperty("SpielID", packageFromSpiel.getInt("ID_Spiel"));} newErgebnis.addProperty("VorratErgebnis",this.vorratErgebnisString); request.addSoapObject(newErgebnis); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); MarshalFloat marshal = new MarshalFloat(); marshal.register(envelope); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); SoapPrimitive soapPrimitive = (SoapPrimitive) envelope.getResponse(); /* int ret = Integer.parseInt(soapPrimitive.toString()); if (ret <= 0) { Toast.makeText(this, "Insert_VorratErgebnis fail", Toast.LENGTH_LONG).show(); } else { Toast.makeText(this, "Insert_VorratErgebnis Successful",Toast.LENGTH_LONG).show(); } */ } catch (Exception ex) { Toast.makeText(this, "Insert_VorratErgebnis Fehler Exception", Toast.LENGTH_LONG).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(Object objekt) throws SQLException {\r\n\t\t \r\n\t\tPomagaloVO ul = (PomagaloVO) objekt;\r\n\r\n\t\tif (ul == null)\r\n\t\t\tthrow new SQLException(\"Insert \" + tablica\r\n\t\t\t\t\t+ \", ulazna vrijednost je null!\");\r\n\t\t \r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\ttry {\r\n\t\t\tconn = conBroker.getConnection();\r\n\r\n\t\t\tps = conn.prepareStatement(insertUpit);\r\n\r\n\t\t\tps.setString(1, ul.getSifraArtikla());\r\n\t\t\tps.setString(2, ul.getNaziv());\r\n\t\t\tps.setInt(3, ul.getPoreznaSkupina().intValue());\r\n\r\n\t\t\tif (ul.getCijenaSPDVom() == null\r\n\t\t\t\t\t|| ul.getCijenaSPDVom().intValue() <= 0)\r\n\t\t\t\tps.setNull(4, Types.INTEGER);\r\n\t\t\telse\r\n\t\t\t\tps.setInt(4, ul.getCijenaSPDVom().intValue());\r\n\r\n\t\t\tString op = ul.getOptickoPomagalo() != null\r\n\t\t\t\t\t&& ul.getOptickoPomagalo().booleanValue() ? DA : NE;\r\n\r\n\t\t\tps.setString(5, op);\r\n\t\t\t\r\n\t\t\tps.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\r\n\t\t\tps.setInt(7, NEPOSTOJECA_SIFRA);\r\n\t\t\tps.setTimestamp(8, null);\r\n\t\t\tps.setNull(9, Types.INTEGER);\r\n\r\n\t\t\tint kom = ps.executeUpdate();\r\n\r\n\t\t\tif (kom == 1) {\r\n\t\t\t\tul.setSifra(Integer.valueOf(0)); // po tome i pozivac zna da je\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// insert uspio...\r\n\t\t\t}// if kom==1\r\n\t\t\telse {\r\n\t\t\t\t//Logger.fatal(\"neuspio insert zapisa u tablicu \" + tablica, null);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// nema catch-anja SQL exceptiona... neka se pozivatelj iznad jebe ...\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (ps != null)\r\n\t\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t}\r\n\t\t\tconBroker.freeConnection(conn);\r\n\t\t}// finally\r\n\r\n\t}", "private void insertTupel(Connection c) {\n try {\n String query = \"INSERT INTO \" + getEntityName() + \" VALUES (null,?,?,?,?,?);\";\n PreparedStatement ps = c.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, getAnlagedatum());\n ps.setString(2, getText());\n ps.setString(3, getBild());\n ps.setString(4, getPolizist());\n ps.setString(5, getFall());\n ps.executeUpdate();\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n setID(rs.getString(1));\n getPk().setValue(getID());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void processInsertar() {\n }", "public void insertVote(String name1, String name2, String name3, String name4, String name5, String name6, int ID, Date prepDate, int CanteenNo)\r\n {\r\n try \r\n {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO voteresult(NSBMID,PrepDate,CanteenNo,\"+name1+\",\"+name2+\",\"+name3+\",\"+name4+\",\"+name5+\",\"+name6+\") VALUES(\"+ID+\",'\"+prepDate+\"',\"+CanteenNo+\",1,1,1,1,1,1)\");\r\n\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n \r\n }", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 등록을 하다.\");\n\t}", "public void insert() throws SQLException;", "public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "private void insertPerform(){\n \tif(!verify()){\n \t\treturn;\n \t}\n \tString val=new String(\"\");\n \tval=val+\"'\"+jTextField1.getText()+\"', \"; // poNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker1.getValue()\n \t\t)\n \t\t+\"', \"; // poDate\n \tval=val+\"'\"+vndList[jTextField2.getSelectedIndex()-1]+\"', \"; // vndNo\n \tval=val+\"'\"+jTextField3.getText()+\"', \"; // qtnNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker2.getValue()\n \t\t)\n \t\t+\"', \"; // qtnDate\n \tval=val+\"'\"+poAmount+\"', \"; // poTotal\n \tval=val+\"'pending', \"; // poStatus\n \tval=val+\"'\"+jEditorPane1.getText()+\"' \"; // remark\n \t\n \ttry{\n \t\tdbInterface1.cmdInsert(\"poMaster\", val);\n \t\tinsertPoBomDesc();\n \t\tinsertPoDesc();\n\t \tupdateBOM();\n \t}\n \tcatch(java.sql.SQLException ex){\n \t\tSystem.out.println (ex);\n \t}\n \tresetPerform();\n }", "public void insertar() throws SQLException {\n String sentIn = \" INSERT INTO datosnodoactual(AmigoIP, AmigoPuerto, AmigoCertificado, AmigoNombre, AmigoSobreNombre, AmigoLogueoName, AmigoPassword) \"\r\n + \"VALUES (\" + AmigoIp + \",\" + AmigoPuerto + \",\" + AmigoCertificado + \",\" + AmigoNombre + \",\" + AmigoSobreNombre + \",\" + AmigoLogueoName + \",\" + AmigoPassword + \")\";\r\n System.out.println(sentIn);\r\n InsertApp command = new InsertApp();\r\n try (Connection conn = command.connect();\r\n PreparedStatement pstmt = conn.prepareStatement(sentIn)) {\r\n if (pstmt.executeUpdate() != 0) {\r\n System.out.println(\"guardado\");\r\n } else {\r\n System.out.println(\"error\");\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "private void insertarImpresora() throws SQLException {\n String vCodigoSerie = FarmaLoadCVL.getCVLCode(\"cmbSerie\", cmbSerie.getSelectedIndex());\n String vCodigoComprobante = FarmaLoadCVL.getCVLCode(\"cmbComprobante\", cmbComprobante.getSelectedIndex());\n String vCodigoModelo = cmbModelo.getSelectedItem().toString();\n String vSerieImpr = txtSerieImpr.getText();\n DBImpresoras.ingresaImpresora(FarmaVariables.vCodGrupoCia, FarmaVariables.vCodLocal, vCodigoSerie,\n vCodigoComprobante, txtDescImpresora.getText().trim(),\n txtNroComprobante.getText().trim(), txtColaImpresion.getText().trim(),\n vCodigoModelo,vSerieImpr);\n }", "void insert(CTipoComprobante record) throws SQLException;", "@Override\n\tpublic void insertArticle(BoardVO vo) {\n\t\tString sql = \"INSERT INTO board VALUES(board_id_seq.NEXTVAL,?,?,?)\";\n\t\ttemplate.update(sql,vo.getWriter(),vo.getTitle(),vo.getContent());\n\t}", "public void insertarRubro2(RubrosObject rubro) throws SQLException \r\n { \r\n PreparedStatement prepStmt = null;\r\n\r\n String insertStatement = \"INSERT INTO RUBROS (IDRUBRO, NOMBRE, MONTO, IDPRESUPUESTO,SALDO,TIPO_PAGO) VALUES (?,?,?,?,?,?)\";\r\n \r\n prepStmt = con.prepareStatement(insertStatement);\r\n \r\n prepStmt.setInt(1, Integer.parseInt(rubro.getIdentificador()));\r\n prepStmt.setString(2, rubro.getNombre());\r\n prepStmt.setDouble(3, Double.parseDouble(rubro.getMonto()));\r\n prepStmt.setInt(4, Integer.parseInt(rubro.getIdpresupuesto()));\r\n prepStmt.setDouble(5, Double.parseDouble(rubro.getMonto()));//EL SALDO SE INICIA IGUAL AL MONTO\r\n prepStmt.setString(6, rubro.getTipo_pago().trim());\r\n \r\n prepStmt.executeUpdate();\r\n \r\n \r\n if (prepStmt != null) {\r\n prepStmt.close();\r\n }\r\n\r\n }", "int insert(CmsVoteTitle record);", "public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\n }\n }", "public void insert() throws SQLException {\r\n\t\t//SQL-Statement\r\n\r\n\t\tString sql = \"INSERT INTO \" + table +\" VALUES (\" + seq_genreID +\".nextval, ?)\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\r\n\t\tint roswInserted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \" +roswInserted+ \"Zeilen hinzugefügt\");\r\n\r\n\t\tsql = \"SELECT \"+seq_genreID+\".currval FROM DUAL\";\r\n\t\tstmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\t\tif(rs.next())this.setGenreID(rs.getInt(1));\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t}", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\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}\r\n\t}", "@Override\n\tpublic void insert(Connection c, Genre v) throws SQLException {\n\n\t}", "@Override //inserisce un viaggio nel db // \r\n\tpublic boolean create(Viaggio viaggio) {\r\n\t\tboolean esito=false;\r\n\t\tif(viaggio==null) {\r\n\t\t\tSystem.out.println( \"insert(): failed to insert a null entry\");\r\n\t\t\t}\r\n\t\ttry {\r\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(MssqlViaggioDAO.insert);\r\n\t\t\tprep_stmt.clearParameters();\r\n\t\t\t//prep_stmt.setInt(1,viaggio.getIdViaggio());\r\n\t\t\tint i=1;\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getCreatore().getId());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getTitolo());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getDestinazione());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getDescrizione());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getLingua());\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getBudget());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getLuogopartenza());\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getStato().ordinal());\r\n\t\t\tprep_stmt.setDate(i++,viaggio.getDatainizio());\r\n\t\t\tprep_stmt.setDate(i++,viaggio.getDatafine());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getImmaginiProfilo());\t\t\r\n\t\t\tif(prep_stmt.executeUpdate()>0) esito= true;\r\n\t\t\telse esito= false;\r\n\t\t\tprep_stmt.close();\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"create(): failed to insert entry: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t\treturn esito;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "void insertSelective(CTipoComprobante record) throws SQLException;", "public void insert()\n\t{\n\t}", "public boolean insertar(vpoliza dts) {\r\n sSql = \"INSERT INTO poliza\\n\"\r\n + \"(monto_total,fecha_inicio, fecha_venc, cliente_vehiculo_chapaId) \\n\"\r\n + \"VALUES\\n\"\r\n + \"(?,?,?,?);\";\r\n try {\r\n PreparedStatement pst = cn.prepareStatement(sSql);\r\n /*Se crea un objeto pst del tipo PreparedStatement (prepara la consulta sql)\r\n para insertar los datos en la base de datos mediante insert into*/\r\n pst.setInt(1, dts.getMonto_total());\r\n pst.setDate(2, dts.getFecha_inicio());\r\n pst.setDate(3, dts.getFecha_venc());\r\n \r\n pst.setString(4, dts.getCliente_vehiculo_chapaId());\r\n \r\n int n = pst.executeUpdate();\r\n \r\n if (n != 0) {\r\n return true;\r\n }\r\n return false;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n JOptionPane.showMessageDialog(null, \"LO SENTIMOS HA OCURRIDO UN ERROR >> \" + ex + \" <<\");\r\n return false;\r\n }\r\n }", "@Override\n\t\tpublic void insert() {\n\t\t\tSystem.out.println(\"새로운 등록\");\n\t\t}", "int insert(Prueba record);", "int insert(Movimiento record);", "public boolean insert(Vacante vacante) {\n try {\n //Variable que lleva la sentencia SQL\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n String sql = \"INSERT INTO vacante VALUES(?,?,?,?,?)\";\n //Permite ejecutar una sentencia SQL\n PreparedStatement ps = conn.getConnection().prepareStatement(sql);\n ps.setInt(1, vacante.getId());\n ps.setString(2, format.format(vacante.getFechaPublicacion()));\n ps.setString(3, vacante.getNombre());\n ps.setString(5, vacante.getDetalle());\n ps.setString(4, vacante.getDescripcion());\n ps.executeUpdate();\n return true;\n\n } catch (Exception e) {\n System.out.println(\"Error VacanteDao.insert\" + e.getMessage());\n return false;\n }\n\n }", "public void afterInsert(VLabtestInstBean pObject) throws SQLException;", "int insertSelective(Prueba record);", "private void InsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_InsertActionPerformed\n try{\n if(isEmpty())\n throw new Exception(\"Introdu toate datele!\");\n\n // if phone is frequency dont insert\n if(isExitsPhone())\n throw new Exception(\"Eroare nr telefon!\");\n\n boolean ok = insert();\n if(ok){\n Vector data = getData(\"\");\n showData(data);\n } else\n throw new Exception(\"Eroare la inserare!\");\n\n }catch(Exception e){\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n }", "@Override\r\n\tpublic void insert(Object obj) throws DAOException {\n\t\tOfferta offerta;\r\n\t\ttry {\r\n\t\t\tofferta = (Offerta) obj;\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(insertQuery);\r\n\r\n\t\t\tSystem.out.println(\"Inserimento dell'offerta nel db.\");\r\n\t\t\tofferta.print();\r\n\r\n\t\t\tps.setInt(1, offerta.getIdOfferta());\r\n\t\t\tps.setInt(2, offerta.getIdTratta());\r\n\t\t\tps.setInt(3, offerta.getData().getGiorno());\r\n\t\t\tps.setInt(4, offerta.getData().getMese());\r\n\t\t\tps.setInt(5, offerta.getData().getAnno());\r\n\t\t\tps.setInt(6, offerta.getOraPartenza().getOra());\r\n\t\t\tps.setInt(7, offerta.getOraPartenza().getMinuti());\r\n\t\t\tps.setInt(8, offerta.getOraArrivo().getOra());\r\n\t\t\tps.setInt(9, offerta.getOraArrivo().getMinuti());\r\n\t\t\tps.setInt(10, offerta.getPosti());\r\n\t\t\tps.setInt(11, offerta.getDataInserimento().getGiorno());\r\n\t\t\tps.setInt(12, offerta.getDataInserimento().getMese());\r\n\t\t\tps.setInt(13, offerta.getDataInserimento().getAnno());\r\n\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert ClassCastException.\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert SQLException.\");\r\n\t\t}\r\n\r\n\t}", "private void inserirQuests(){\n try {\n methods.InsereQuestsOnBD();\n //Toast.makeText(this,\"Inseridos dados com sucesso\",Toast.LENGTH_LONG).show();\n\n }\n catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Erro\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }", "@Override\n\tpublic void insert(RaceZipTbVo vo) throws SQLException {\n\t\t\n\t}", "int insert(Tipologia record);", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "void insert(CTipoPersona record) throws SQLException;", "int insertSelective(Movimiento record);", "@Override\n\tpublic boolean insert(String sql) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void insert(Vehicle v) {\n\t\ttry {\n\t\t\tint modelID = VehicleModelDAOImpl.getInstance()\n\t\t\t\t\t.getAll()\n\t\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(m-> m.getDescription().equals(v.getModel()))\n\t\t\t\t\t.findFirst()\n\t\t\t\t\t.get()\n\t\t\t\t\t.getModelID();\n\n\t\t\tint categoryID = VehicleCategoryDAOImpl.getInstance()\n\t\t\t\t\t.getAll()\n\t\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(c->c.getDescription().equals(v.getType()))\n\t\t\t\t\t.findFirst()\n\t\t\t\t\t.get()\n\t\t\t\t\t.getCategoryID();\n\n\n\t\t\tPreparedStatement st = Database.getInstance().getDBConn().prepareStatement(\"INSERT INTO vehicle(vehicle_ID,plate_number,mv_number,engine_number,chassis_number,model_ID,category_ID,status,image) VALUES(?,?,?,?,?,?,?,?,?)\");\n\t\t\t\n\t\t\tst.setString(1, v.getPlateNumber());\n\t\t\tst.setString(2, v.getMvNumber());\n\t\t\tst.setString(3, v.getEngineNumber());\n\t\t\tst.setString(4, v.getChassisNumber());\n\t\t\tst.setInt(5, modelID);\n\t\t\tst.setInt(6, categoryID);\n\t\t\tst.setString(7, v.getStatus());\n//\t\t\tst.setBlob(8, v.getImage());\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst.close();\n\t\t} catch(Exception err) {\n\t\t\terr.printStackTrace();\n\t\t}\n\t}", "public void insertMovesToDB(String gameType, Vector<Moves> allMovesForAGame) {\n int lastIndex = 0;\n try {\n\n DriverManager.registerDriver(new com.mysql.cj.jdbc.Driver());\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/xogames\", \"root\", \"Jrqr541&\");\n\n PreparedStatement pstmt = con.prepareStatement(\"INSERT INTO games(gameType) VALUE (?)\");\n pstmt.setString(1, gameType);\n int rowsAffected = pstmt.executeUpdate();\n pstmt.close();\n\n Statement stmt = con.createStatement();\n String queryString = new String(\"SELECT MAX(ID) FROM games\");\n ResultSet rs = stmt.executeQuery(queryString);\n\n while (rs.next()) {\n lastIndex = rs.getInt(1);\n }\n\n stmt.close();\n\n for (Moves move : allMovesForAGame) {\n\n PreparedStatement pstmt1 = con.prepareStatement(\"INSERT INTO steps(player,x,y,ID,step,finalState) VALUE (?,?,?,?,?,?)\");\n if (move.isPlayer()) {\n pstmt1.setInt(1, 1);\n } else {\n pstmt1.setInt(1, 0);\n }\n pstmt1.setInt(2, move.getX());\n pstmt1.setInt(3, move.getY());\n pstmt1.setInt(4, lastIndex);\n pstmt1.setInt(5, move.getStep());\n pstmt1.setInt(6, move.getFinalState());\n\n int rowsAffected1 = pstmt1.executeUpdate();\n pstmt1.close();\n\n }\n con.close();\n // System.out.println(\"elmafrood kda closed\");\n } catch (SQLException ex) {\n System.out.println(\"error in executing insert in toDB fn in SinglePlayerController 2 \" + ex);\n // ex.printStackTrace();\n }\n\n }", "public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void insertBoard(NoticeBoardVO vo){\r\n\t\tString sql=\"insert into board_notice(userid,pass,title,content,writedate,fileurl) \"+\r\n\t\t\t\t\t\t\t\"values(?,?,?,?,?,?)\";\r\n\t\tConnection conn=null;\r\n\t\tPreparedStatement pstmt=null;\r\n\t\ttry{\r\n\t\t\tconn=DBManager.getConnection();\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, vo.getUserid());\t\t\t\r\n\t\t\tpstmt.setString(2, vo.getPass());\r\n\t\t\tpstmt.setString(3, vo.getTitle());\r\n\t\t\tpstmt.setString(4, vo.getContent());\r\n\t\t\tTimestamp time=new Timestamp(System.currentTimeMillis());\r\n\t\t\tpstmt.setTimestamp(5,time);\r\n\t\t\tpstmt.setString(6, vo.getFileurl());\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDBManager.close(conn, pstmt);\r\n\t\t}\r\n\t}", "public void insertPrisoners (String fname,String sname,String ag,String crime,String pisid){\r\n String q=\"INSERT INTO prisoners(Firstname,Secondname,Age,Crime,Prisonerid)VALUES (?,?,?,?,?)\";\r\n \r\n \r\n try{\r\n int k=0;\r\n PreparedStatement st=getConnection().prepareStatement(q);\r\n st.setString(1,fname);\r\n st.setString(2,sname);\r\n st.setString(3,ag);\r\n st.setString(4,crime);\r\n st.setString(5,pisid);\r\n \r\n if(st.executeUpdate()>k){\r\n JOptionPane.showMessageDialog(null,pisid+\"registered susccessfully\");\r\n }\r\n }\r\n \r\n catch(SQLException x){\r\n JOptionPane.showMessageDialog(null, x.getMessage());\r\n}\r\n }", "int insert(Tourst record);", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "@Override\n\tpublic void insertIPODetail(IPODetail ipo) throws SQLException {\n\t\t\n\t}", "int insert(VoteList record);", "@Insert(onConflict = OnConflictStrategy.IGNORE)\n void insert(DataTugas dataTugas);", "private void insertBoger() {\r\n\t\tEmne emne;\r\n\t\tBog bog;\r\n\t\tForfatter forfatter;\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,2);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-2\", emne, 2002,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(1);\r\n\t\tbog = new BogEksemplar(\"Titel-3\", emne, 2003,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-4\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(2);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t}", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "@Override\n\tpublic void ativar(EntidadeDominio entidade) throws SQLException {\n\t\t\t\tPreparedStatement pst=null;\n\t\t\t\tLivro livro = (Livro)entidade;\t\t\n\t\t\t\ttry {\n\t\t\t\t\topenConnection();\n\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\t\t\tsql.append(\"UPDATE livro SET livStatus=?\");\n\t\t\t\t\tsql.append(\"WHERE idlivro=?\");\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\tpst.setString(1, \"ATIVADO\");\n\t\t\t\t\tpst.setInt(2, livro.getId());\n\t\t\t\t\tpst.executeUpdate();\t\t\t\n\t\t\t\t\tconnection.commit();\t\n\t\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SEGUNDA PARTE\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\topenConnection();\n\t\t\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t//FALTA COLOCAR EDITORA\t\t\n\t\t\t\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\t\t\t\tSystem.out.println(livro.getId());\n\t\t\t\t\t\t\tSystem.out.println(livro.getJustificativa());\n\t\t\t\t\t\t\tSystem.out.println(livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tsql.append(\"INSERT INTO justificativaativar (id_livro , justificativa, id_Ativar) VALUES (?,?,?)\");\t\t\n\t\t\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\t\t\tpst.setInt(1, livro.getId());\n\t\t\t\t\t\t\tpst.setString(2,livro.getJustificativa());\n\t\t\t\t\t\t\tpst.setInt(3,livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tpst.executeUpdate();\n\t\t\t\t\t\t\tconnection.commit();\t\t\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t\t\t}finally{\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t}", "@Override\r\n public boolean insert(Anggota anggota) {\r\n// boolean flag = false;\r\n// try {\r\n//\r\n// CallableStatement cs = connection.prepareCall(\"{ CALL insAngs(?,?) }\");\r\n// cs.setString(1, angsuranPinjam.getKdAngsuran());\r\n// cs.setString(2, angsuranPinjam.getKdAnggotaP());\r\n// cs.executeUpdate();\r\n// flag = true;\r\n// } catch (SQLException ex) {\r\n// Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n//\r\n// }\r\n//\r\n// return flag;\r\n\r\n boolean flag = false;\r\n try {\r\n CallableStatement cs = connection.prepareCall(\"{ CALL getAutoKDAgt(?,?,?) }\");\r\n cs.setString(1, anggota.getNmAnggota());\r\n cs.setString(2, anggota.getTelepon());\r\n cs.setString(3, anggota.getAlamat());\r\n cs.executeUpdate();\r\n flag = true;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return flag;\r\n }", "public void storeValuesDump() throws SQLException{ //store DUMP values into the database\n \tString sqlDump = \"INSERT INTO dump VALUES ('\" + massSelection + \"', '\" + smokeSelection + \"', '\" + framesText.getText() + \"', '\" + dtDevcText.getText() + \"');\";\n \tConnectionClass connectionClass = new ConnectionClass();\n\t\tConnection connection = connectionClass.getConnection();\n\t\tStatement statement = connection.createStatement();\n\t\tstatement.executeUpdate(sqlDump);\n }", "public void createDespesaDetalhe(ArrayList<PagamentoDespesasDetalhe> listaDespesasInseridas, int idDespesa) throws Exception {\n\r\n for(int i=0; i < listaDespesasInseridas.size(); i++){\r\n \r\n open(); //abre conexão com o banco de dados\r\n\r\n //define comando para o banco de dados\r\n stmt = con.prepareStatement(\"INSERT INTO pagamentoDespesasDetalhe(valor, dataPagamento, status, idDespesas, idFormaPagamento) VALUES (?,?,?,?,?)\");\r\n\r\n //atribui os valores das marcações do comando acima \r\n stmt.setFloat(1, listaDespesasInseridas.get(i).getValor());\r\n stmt.setString(2, listaDespesasInseridas.get(i).getDataPagamento());\r\n stmt.setInt(3, listaDespesasInseridas.get(i).getStatus());\r\n stmt.setInt(4, idDespesa);\r\n stmt.setInt(5, listaDespesasInseridas.get(i).getIdFormaPagamento());\r\n\r\n stmt.execute();//executa insert no banco de dados\r\n\r\n close();//fecha conexão com o banco de dados\r\n \r\n } \r\n\r\n }", "int insert(AdminTab record);", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\n\tprotected String sql() throws OperationException {\n\t\treturn sql.insert(tbObj, fieldValue);\n\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}", "public void insert(Groupe g) throws SQLException {\n\t\t\t//chercher combien y'a de lignes dans la table Groupe pour construire l'id \n\t\t\tString req =\"Select count(*) from Groupe\";\n\t\t\tPreparedStatement ps=DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\trs.next();\n\t\t\t// incrementer l'id du groupe \n\t\t\tint id =rs.getInt(1) + 1;\t\n\t\t\t\n\t\t\t\n\t\t\tString req1 = \"INSERT INTO Groupe VALUES(?,?,?)\";\n\t\t\tPreparedStatement ps1 = DBConfig.getInstance().getConn().prepareStatement(req1);\n\t\t\tps1.setInt(1,id);\n\t\t\tps1.setString(2,g.getNomGroupe());\n\t\t\tps1.setString(3,g.getModerateurGroupe().getNomComptePers());\n\t\t\tps1.executeUpdate();\n\t\t}", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "int insertSelective(CmsVoteTitle record);", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n executeInsert();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "void insert(BnesBrowsingHis record) throws SQLException;", "@Override\n\tpublic void preInsert() {\n\n\t}", "void insertSelective(CTipoPersona record) throws SQLException;", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "public void insert(String champs,String valeur) throws SQLException {\n\t\t///Cette partie pour créer un string = \"?, ?; ?...\"\n\t\t///tel que le nombre des points d'interrogation égale au nombre des champs.\n\t\t///Pour l'utiliser dans la syntaxe \"INSERT\" du SQL. \n\t\t//Tableau de champs et valeur .\n String[] champsTab = champs.split(\", \");\n String[] valeurTab = valeur.split(\", \");\n\t\tArrayList<String> valueQST = new ArrayList<String>();\n\t\tfor(int i=0; i<(champs.split(\", \")).length; i++) {\n\t\t\tvalueQST.add(\"?\");\n\t\t}\n\t\t//valueQSTStr = \"?, ?, ?...\"\n\t\tString valueQSTStr = valueQST.toString().replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t/////////////////////////////////////////////////////////////////////\n String sql = \"INSERT INTO personnel(\"+champs+\") VALUES(\"+valueQSTStr+\")\"; \n Connection conn = connecter(); \n PreparedStatement pstmt = conn.prepareStatement(sql);\n int j=0;\n for(int i=0 ; i<champsTab.length;i++) {\n \tj=i+1;\n \tif(!champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv|salaire\")) {\n \tif(champsTab.length>valeurTab.length) {\n \t\tif(champsTab[i].matches(\"Date_Fin_Contract\")){\n \t\tpstmt.setString(j,\"\");\t\n \t\t}else pstmt.setString(j,valeurTab[i]);\n \t}else pstmt.setString(j,valeurTab[i]);\n \t}\n \tif(champsTab[i].matches(\"salaire\")) {\n \t\tpstmt.setFloat(j,Float.parseFloat(valeurTab[i]));\n \t}\n \tif(champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv\")) {\n \t\tpstmt.setInt(j,Integer.parseInt(valeurTab[i]));\n \t}\n }\n pstmt.executeUpdate();\n\t\tconn.close();\n }", "@Override\r\n public void insert(List<DetalleCotizacion> listdetc, long idco) {\n Connection c =null;\r\n PreparedStatement ps= null;\r\n ResultSet rs= null;\r\n \r\n try{\r\n\tc = Conexion.Connect();\r\n \r\n for (DetalleCotizacion detc : listdetc){\r\n ps = c.prepareStatement(\"SELECT * from sp_insertdetallecotizacion(?,?,?,?,?)\");\r\n ps.setLong(1,idco);\r\n ps.setLong(2, detc.getIdmaq());\r\n ps.setInt(3, detc.getCantidad());\r\n ps.setInt(4,detc.getDias());\r\n ps.setBigDecimal(5, new BigDecimal(detc.getValordia()));\r\n rs=ps.executeQuery();\r\n \r\n }\r\n \r\n \r\n \r\n// \r\n// while (rs.next()){\r\n// id= rs.getLong(\"vid\");\r\n// }\r\n//\t\r\n } catch(Exception e)\r\n {\r\n JOptionPane.showMessageDialog(null, e.getMessage());\r\n }finally{\r\n if (c != null){\r\n try {\r\n c.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAODetalleCotizacion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if(ps!= null){\r\n try {\r\n ps.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAODetalleCotizacion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if(rs != null){\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAODetalleCotizacion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n } \r\n }", "public void inserirLigas() throws SQLException {\n observableListLigas = FXCollections.observableArrayList(ligas);\n selecionarLiga.setItems(observableListLigas);\n \n }", "public void addBestelling(Bestelling bestelling) {\n\r\n DatabaseConnection connection = new DatabaseConnection();\r\n if(connection.openConnection())\r\n {\r\n // If a connection was successfully setup, execute the INSERT statement\r\n\r\n connection.executeSQLInsertStatement(\"INSERT INTO bestelling (`bestelId`, `tafelId`) VALUES(\" + bestelling.getId() + \",\" + bestelling.getTafelId() + \");\");\r\n\r\n for(Drank d : bestelling.getDranken()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO drank_bestelling (`DrankID`, `BestelId`, `hoeveelheid`) VALUES (\" + d.getDrankId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n for(Gerecht g : bestelling.getGerechten()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO gerecht_bestelling (`GerechtID`, `BestelId`, `hoeveelheid`) VALUES (\" + g.getGerechtId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n\r\n //Close DB connection\r\n connection.closeConnection();\r\n }\r\n\r\n }", "public void insert(Conge conge) ;", "public Ausschreibung insert(Ausschreibung as) {\r\n\r\n\t\t// DB-Verbindung herstellen\r\n\t\tConnection con = DBConnection.connection();\r\n\r\n\t\ttry {\r\n\t\t\t// Leeres SQL-Statement (JDBC) anlegen\r\n\t\t\tStatement stmt = con.createStatement();\r\n\r\n\t\t\t// Momentan hoechsten Primaerschluesselwert pruefen\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT MAX(id) AS maxid \" + \"FROM ausschreibung \");\r\n\r\n\t\t\t// Wenn wir etwas zurueckerhalten, kann dies nur einzeilig sein\r\n\t\t\tif (rs.next()) {\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * as erhaelt den bisher maximalen, nun um 1 inkrementierten\r\n\t\t\t\t * Primaerschluessel.\r\n\t\t\t\t */\r\n\r\n\t\t\t\tas.setId(rs.getInt(\"maxid\") + 1);\r\n\r\n\t\t\t\tstmt = con.createStatement();\r\n\r\n\t\t\t\t// Jetzt erst erfolgt die tatsaechliche Einfuegeoperation\r\n\t\t\t\tstmt.executeUpdate(\r\n\t\t\t\t\t\t\"INSERT INTO ausschreibung (ID, Bezeichnung, Ausschreibungstext, Bewerbungsfrist, Projekt_ID) \"\r\n\t\t\t\t\t\t\t\t+ \"VALUES ('\" + as.getId() + \"','\" + as.getBezeichnung() + \"','\"\r\n\t\t\t\t\t\t\t\t+ as.getAusschreibungstext() + \"','\"\r\n\t\t\t\t\t\t\t\t+ DBConnection.convertToSQLDateString(as.getBewerbungsfrist()) + \"','\"\r\n\t\t\t\t\t\t\t\t+ as.getProjektId() + \"')\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t// Rueckgabe, der evtl. korrigierten Ausschreibung.\r\n\t\treturn as;\r\n\t}", "public boolean inserisciDatiGiudice(Giudice giudice) {\n\t\tString query = \"INSERT INTO giudice(username,password,nome,cognome,codicefiscale,recapitotelefonico,numcivico,cap,via) \"\r\n\t\t\t\t+ \"VALUES(?,?,?,?,?,?,?,?,?)\"; \t\t\r\n\t\tPreparedStatement ps;\r\n\t\tconn=DBManager.startConnection();\r\n\t\ttry {\r\n\t\t\tps = conn.prepareStatement(query);\r\n\t\t\tps.setString(1, giudice.getUsername());\r\n\t\t\tps.setString(2, giudice.getPassword());\r\n\t\t\tps.setString(3, giudice.getNome());\r\n\t\t\tps.setString(4, giudice.getCognome());\r\n\t\t\tps.setString(5, giudice.getCodicefiscale());\r\n\t\t\tps.setString(6, giudice.getRecapitotelefonico());\r\n\t\t\tps.setString(7, giudice.getNumcivico());\r\n\t\t\tps.setString(8, giudice.getCap());\r\n\t\t\tps.setString(9, giudice.getVia());\r\n\t\t\tps.executeUpdate();\r\n\t\t\t//if(rs.next()) {\r\n\t\t\t//res.setUsername(rs.getString(\"username\") );\r\n\t\t\t//res.setId(rs.getString(\"id\"));\r\n\t\t\t//res.setCap(rs.getString(\"cap\"));\r\n\t\t\t//res.setVia(rs.getString(\"via\")); \r\n\t\t\t//res.setNome(rs.getString(\"nome\"));\r\n\t\t\t//res.setCognome(rs.getString(\"cognome\"));\r\n\t\t\t//res.setCodicefiscale(rs.getString(\"codicefiscale\"));\r\n\t\t\t//res.setNumcivico(rs.getString(\"numcivico\"));} \r\n\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 false;\r\n\t\t}\r\n\t\tDBManager.closeConnection();\r\n\t\treturn true;\r\n\t}", "private boolean insert()throws Exception{\n String query = \"INSERT INTO \" + tableName + \" VALUES(?, ?, ?)\";\n PreparedStatement pstm = this.con.prepareStatement(query);\n\n pstm.setObject(1, Name.getText().trim());\n pstm.setObject(2, City.getText().trim());\n pstm.setObject(3, Phone.getText().trim());\n\n int result = pstm.executeUpdate();\n\n return (result > 0);\n }", "void insert(GfanCodeBanner record) throws SQLException;", "void insertSelective(GfanCodeBanner record) throws SQLException;", "@Override\n\tpublic void insert(Unidade obj) {\n\n\t}", "int insert(WizardValuationHistoryEntity record);", "@Override\r\n\tpublic void insertPrestito(Prestito p) {\n\t\t\r\n\t}", "public StavkaFaktureInsert() {\n initComponents();\n CBFakture();\n CBProizvod();\n }", "int insert(Assist_table record);", "@Override\n\tpublic int admin_insert(BoardVO obj) {\n\t\treturn 0;\n\t}", "int insert(TCar record);", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "public void addInschrijving(){\n if(typeField.getText().equalsIgnoreCase(\"Toernooi\")){\n try {\n Connection con = Main.getConnection();\n PreparedStatement add = con.prepareStatement(\"INSERT INTO Inschrijvingen (speler, toernooi, heeft_betaald) VALUES (?,?,?);\");\n add.setInt(1, Integer.valueOf(spelerIDField.getText()));\n add.setInt(2, Integer.valueOf(codeField.getText()));\n add.setString(3, heeftBetaaldField.getText());\n add.executeUpdate();\n } catch (Exception e) {\n System.out.println(e);\n }}\n else if(typeField.getText().equalsIgnoreCase(\"Masterclass\")){\n try {\n Connection con = Main.getConnection();\n PreparedStatement add = con.prepareStatement(\"INSERT INTO Inschrijvingen (speler, masterclass, heeft_betaald) VALUES (?,?,?);\");\n add.setInt(1, Integer.valueOf(spelerIDField.getText()));\n add.setInt(2, Integer.valueOf(codeField.getText()));\n add.setString(3, heeftBetaaldField.getText());\n add.executeUpdate();\n } catch (Exception e) {\n System.out.println(e);}\n }\n }", "private int insert(Consulta p) {\n Connection con = null;\r\n PreparedStatement pstm = null;\r\n int retorno = -1;\r\n try {\r\n con = ConnectionFactory.getConnection();\r\n pstm = con.prepareStatement(INSERT, Statement.RETURN_GENERATED_KEYS);\r\n\r\n pstm.setDate(1, new java.sql.Date(p.getDataDaConsulta().getTime()));\r\n pstm.setString(2, p.getDescricao());\r\n pstm.setString(3, p.getTipoConsulta());\r\n pstm.setTime(4, p.getHorario());\r\n pstm.setInt(5, p.getPaciente().getCodigo());\r\n pstm.execute();\r\n try (ResultSet rs = pstm.getGeneratedKeys()) {\r\n if (rs.next()) {\r\n retorno = rs.getInt(1);\r\n }\r\n }\r\n } catch (SQLException e) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao inserir consulta: \" + e.getMessage());\r\n } finally {\r\n try {\r\n\r\n ConnectionFactory.closeConnection(con, pstm);\r\n\r\n } catch (SQLException e) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao finalizar conexão em inserir paciente: \" + e.getMessage());\r\n }\r\n }\r\n return retorno;\r\n }", "int insertSelective(Tourst record);", "public void insert(Exam_Result_vo resultvo) {\n\t\tSession session = null;\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tsession = MyUtility.getSession();\r\n\t\t\t\r\n\t\t\tTransaction tr = session.beginTransaction();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Inserting Record\");\r\n\t\t\tsession.save(resultvo);\r\n\t\t\ttr.commit();\r\n\t\t\tSystem.out.println(\"Done\");\r\n\t\t\tsession.flush();\r\n\t\t\tsession.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "@Override\n public void insert(J34SiscomexOrigemDi j34SiscomexOrigemDi) {\n super.doInsert(j34SiscomexOrigemDi);\n }", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "@Override\n\t\tpublic void insertar() {\n\t\t\tutilitario.getTablaisFocus().insertar();\n\n\t\t}", "public void saveToDB() throws java.sql.SQLException\n\t{\n\t\tStringBuffer sSQL=null;\n Vector vParams=new Vector();\n\t\t//-- Chequeamos a ver si es un objeto nuevo\n\t\tif(getID_BBDD()==-1) {\n\t\t\tsSQL = new StringBuffer(\"INSERT INTO INF_BBDD \");\n\t\t\tsSQL.append(\"(NOMBRE,DRIVER,URL,USUARIO,CLAVE,JNDI\");\n\t\t\tsSQL.append(\") VALUES (?,?,?,?,?,?)\");\n\n vParams = new Vector();\n vParams.add(getNOMBRE());\n vParams.add(getDRIVER());\n vParams.add(getURL());\n vParams.add(getUSUARIO());\n vParams.add(getCLAVE());\n vParams.add(getJNDI());\n\t\t}\n\t\telse {\n\t\t\tsSQL = new StringBuffer(\"UPDATE INF_BBDD SET \");\n sSQL.append(\" NOMBRE=?\");\n sSQL.append(\", DRIVER=?\");\n sSQL.append(\", URL=?\");\n sSQL.append(\", USUARIO=?\");\n sSQL.append(\", CLAVE=?\");\n\t\t\tsSQL.append(\", JNDI=?\");\n\t\t\tsSQL.append(\" WHERE ID_BBDD=?\");\n\n vParams = new Vector();\n vParams.add(getNOMBRE());\n vParams.add(getDRIVER());\n vParams.add(getURL());\n vParams.add(getUSUARIO());\n vParams.add(getCLAVE());\n vParams.add(getJNDI());\n vParams.add(new Integer(getID_BBDD()));\n\t\t}\n\n\t\tAbstractDBManager dbm = DBManager.getInstance();\n dbm.executeUpdate(sSQL.toString(),vParams);\n\n // Actualizamos la caché\n com.emesa.bbdd.cache.QueryCache.reloadQuery(\"base_datos\");\n\t}" ]
[ "0.72767514", "0.6926748", "0.68923396", "0.6886399", "0.6865576", "0.68541497", "0.68478084", "0.6817843", "0.67962664", "0.67863184", "0.6745195", "0.67298573", "0.6713582", "0.6693816", "0.66855097", "0.6683048", "0.66566014", "0.66452944", "0.6643773", "0.66407406", "0.6636757", "0.6630881", "0.662148", "0.6585742", "0.65721405", "0.65708846", "0.6569396", "0.6514452", "0.65117604", "0.6505182", "0.6497231", "0.64709145", "0.64682555", "0.64498633", "0.6441786", "0.6435198", "0.64318967", "0.6429473", "0.64243484", "0.64151543", "0.64091915", "0.6403434", "0.638959", "0.6387743", "0.63822156", "0.63778985", "0.6374074", "0.6368171", "0.6360033", "0.635336", "0.6343065", "0.6342165", "0.6340279", "0.6330149", "0.6329969", "0.6324626", "0.6324372", "0.63243544", "0.63175845", "0.6314535", "0.6313246", "0.63085693", "0.62982756", "0.6296818", "0.6286263", "0.6281113", "0.62791413", "0.6276772", "0.6267944", "0.6265438", "0.626431", "0.62612224", "0.6260355", "0.62583333", "0.62501055", "0.62446386", "0.62398607", "0.6236809", "0.62364244", "0.6220635", "0.62163943", "0.6214754", "0.62133276", "0.62079257", "0.62064546", "0.6203741", "0.6198176", "0.6195823", "0.61939454", "0.61892915", "0.61885613", "0.6188375", "0.61824214", "0.6182174", "0.6180783", "0.6180086", "0.61793554", "0.61716056", "0.61714643", "0.6168309" ]
0.6233937
79
updateLogin() / Login Informationen werden aktualisiert
public void updateLogin() { Intent callerIntent = getIntent(); Bundle packageFromLogin = callerIntent.getBundleExtra("LogInformationen"); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); try { final String METHOD_NAME="UpdateSpieler"; final String SOAP_ACTION=NAMESPACE+METHOD_NAME; SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME); SoapObject newSpieler=new SoapObject(NAMESPACE, "_login"); newSpieler.addProperty("LoginID",packageFromLogin.getInt("ID_Login")); newSpieler.addProperty("Username",packageFromLogin.getString("Username_Login")); newSpieler.addProperty("Passwords",packageFromLogin.getString("Passwords_Login")); newSpieler.addProperty("Email",packageFromLogin.getString("Email_Login")); newSpieler.addProperty("Bank",(packageFromLogin.getDouble("Bank_Login")-packageFromSpiel.getDouble("EinSatzGeld_DoubleWert"))); request.addSoapObject(newSpieler); SoapSerializationEnvelope envelope= new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); MarshalFloat marshal=new MarshalFloat(); marshal.register(envelope); //tạo đối tượng HttpTransportSE HttpTransportSE androidHttpTransport= new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); SoapPrimitive soapPrimitive= (SoapPrimitive) envelope.getResponse(); //Toast.makeText(this, soapPrimitive.toString(), Toast.LENGTH_LONG).show(); } catch(Exception e) { Toast.makeText(this, "Fehler Login Update", Toast.LENGTH_LONG).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateLastLogin()\n throws Exception;", "public void update() {\n user.setNewPassword(newPassword.getText().toString());\n user.setPassword(password.getText().toString());\n reauthenticate();\n }", "Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }", "public void launchUpdate() {\n\n\t\tif (checkRegister() == true && psw.getText() != newpsw.getText()) {\n\t\t\tDatabase.getInstance().updateUser(newpsw.getText(), username.getText());\n\t\t\tstatus.setText(\"Account updated\");\n\t\t} else {\n\t\t\tstatus.setText(\"Password already exist or this account doesn't exist\");\n\t\t}\n\n\t}", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "public void login() {\n\t\tloggedIn = true;\n\t}", "private void updateUserLogin() {\n\t\tSessionManager sessionManager = new SessionManager(\n\t\t\t\tMyApps.getAppContext());\n\n\t\tRequestParams params = new RequestParams();\n\t\tparams.add(\"user_id\", sessionManager.getUserDetail().getUserID());\n\n\t\tLog.d(\"EL\", \"userID: \" + sessionManager.getUserDetail().getUserID());\n\n\t\tKraveRestClient.post(WebServiceConstants.AV_UPDATE_USER_PROFILE_DATA_1,\n\t\t\t\tparams, new JsonHttpResponseHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tJSONObject response) {\n\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLog.d(\"EL\", \"response: \" + response.toString(2));\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, throwable,\n\t\t\t\t\t\t\t\terrorResponse);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "protected void login() {\n\t\t\r\n\t}", "private final static void onLoginAdmin(TextField username, PasswordField password)\n\t{\n\t\tif(ProfileManipulation.findUsername(username.getText()) && !ProfileManipulation.checkLoginStatus(username.getText())){\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\n\t\t\t\tProfileManipulation.changePassword(password.getText());\n\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "public void handleLogin() {\n\t\tString username = usernameInput.getText();\n\t\tString password = passwordInput.getText();\n\n\t\t// Saves username and password if remember me is ticked\n\t\t// otherwise it deletes the file.\n\t\tif (rememberMeCheckbox.isSelected()) {\n\t\t\twriteRememberMe(username, password);\n\t\t} else {\n\t\t\tclearRememberMe();\n\t\t}\n\n\n\t\ttryUsernamePassword(username, password);\n\t}", "private void doLogin() {\r\n\t\tloggedIn = true;\r\n\t\tdoctor.setOnline(1);\r\n\t\t// Set doctor as logged in\r\n\t\tdbAdapter.updateDoctor(doctor);\r\n\t\t// Get a list of currently logged in doctors\r\n\t\tdoctors = dbAdapter.getDoctors(this.doctor);\r\n\t\t// Add listeners to keep the list updated\r\n\t\ttry {\r\n\t\t\teb.addListener(new LogoutListener(this.doctor.getMac(),\r\n\t\t\t\t\tthis.location));\r\n\t\t\teb.addListener(new DeviceDetectedListener());\r\n\t\t\teb.addListener(new DevicedMovedListener());\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO: Handle\r\n\t\t}\r\n\t\tnotifyObservers();\r\n\t}", "@Override\n public void setExisting(String login, String pasword) {\n loginEdit.setText(login);\n passwordEdit.setText(pasword);\n }", "void updateButtonLogin() {\n\t\tthis.mButtonLogin.setEnabled(this.mAuthUsername.getText().length() > 0\n\t\t\t\t&& this.mAuthPassword.getText().length() > 0);\n\t}", "private void auto_log_in()\n {\n jtf_username.setText(Config.USERNAME);\n jpf_password.setText(Config.PASSWORD);\n jb_prijavi.doClick();\n\n }", "public void setLogin (String login) {\n this.login = login;\n }", "public void setLogin(String strLogin)\n {\n \tstringLogin = strLogin;\n }", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "private void logIn() {\n char[] password = jPasswordField1.getPassword();\n String userCode = jTextField1.getText();\n\n String txtpassword = \"\";\n for (char pw : password) {\n txtpassword += pw;\n }\n if (\"\".equals(txtpassword)) {\n JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString(\"enterPassword\"), \"No Password\", JOptionPane.WARNING_MESSAGE);\n } else if (txtpassword.equals(userData.get(0).toString())) {\n jPasswordField2.setEnabled(true);\n jPasswordField3.setEnabled(true);\n jPasswordField2.setEditable(true);\n jPasswordField3.setEditable(true);\n jPasswordField2.grabFocus();\n }\n }", "private void setLoginInformation()\n {\n // Set up the login form.\n mIPView_ = (EditText) findViewById( R.id.IP );\n mPortView_ = (EditText) findViewById( R.id.password );\n\n // Set the intial display\n if ( rememberLoginIsSet_ )\n {\n if ( properties_.containsKey( getString( R.string.saved_IP ) ) )\n {\n mIP_ =\n properties_\n .getProperty( getString( R.string.saved_IP ) );\n }\n\n if ( properties_.containsKey( getString( R.string.saved_Port ) ) )\n {\n mPort_ =\n properties_\n .getProperty( getString( R.string.saved_Port ) );\n }\n }\n\n // Set the values to whatever the load settings or default are\n mIPView_.setText( mIP_ );\n mPortView_.setText( mPort_ );\n\n mPortView_\n .setOnEditorActionListener( new TextView.OnEditorActionListener()\n {\n @Override\n public boolean onEditorAction( TextView textView, int id,\n KeyEvent keyEvent )\n {\n if ( id == R.id.login || id == EditorInfo.IME_NULL )\n {\n attemptLogin();\n return true;\n }\n return false;\n }\n } );\n\n mLoginFormView = findViewById( R.id.login_form );\n mLoginStatusView = findViewById( R.id.login_status );\n mLoginStatusMessageView =\n (TextView) findViewById( R.id.login_status_message );\n }", "private final static void onLogin(TextField username, PasswordField password)\n\t{\n\t\tif (ProfileManipulation.checkLogin(username.getText(), password.getText())) {\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "public void setLogin(String login) {\n Logger.getGlobal().log(Level.INFO, \"Account: \" +login +\" creating\");\r\n this.login = login;\r\n }", "@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}", "public void setLogin(String login) {\n this.login = login;\n }", "public void setLogin(String login) {\n this.login = login;\n }", "private void updateUserWithNewPassword() throws ClassNotFoundException, NoSuchAlgorithmException{\n\t\tint currentPositionInTableView = usersTable.getSelectionModel().getSelectedIndex(); // zapamiętaj bieżące podświetlenie w tabeli\n\t\tif ((isAllFieldsAreFull()) \n\t\t\t\t&& (isTheSamePassword())\n\t\t\t\t&& (isLoginUnique(usersTable.getSelectionModel().getSelectedItem().getId()))){\t\n\t\t\t\t\tcurrentPositionInTableView = usersTable.getSelectionModel().getSelectedIndex(); // zapamiętaj bieżące podświetlenie w tabeli\n\t\t\t\t\tMain.getMMUser().update(\t\t\t\t \n\t\t\t\t\t\t\tnew User(\n\t\t\t\t\t\t\t\t\tusersTable.getSelectionModel().getSelectedItem().getId(),\n\t\t\t\t\t\t\t\t\tuserLoginField.getText(), \n\t\t\t\t\t\t\t\t\tHelper.encryptPassword(userPasswordField.getText()), \n\t\t\t\t\t\t\t\t\tuserNameField.getText(), \n\t\t\t\t\t\t\t\t\tuserLastNameField.getText(), \n\t\t\t\t\t\t\t\t\tpermission,\n\t\t\t\t\t\t\t\t\teditingCheck.isSelected(),\n\t\t\t\t\t\t\t\t\treminderCheck.isSelected()));\n\t\t\t\t\t// pokaż aktualny stan bazy pracowników\n\t\t\t\t\treadUsers();\n\t\t\t\t\tshowUsers();\n\t\t\t\t\tusersTable.getSelectionModel().select(currentPositionInTableView); // ustaw podswietlenie na bieżący wiersz\n\t\t\t\t\tnew AlertDialog(\"Operacja zakończona\", \"Zaktualizowano dane\", AlertType.INFORMATION);\n\t\t\t\t\tchangePassword = false;\n\t\t}\n\t}", "void updateFailedLogin(String username, long timestamp);", "void setAllSeenByLogin(String login);", "public void setLogin(LoginModel param) {\n localLoginTracker = true;\n\n this.localLogin = param;\n }", "public void updateEntry(String userName, String password) {\n // create object of ContentValues\n ContentValues updatedValues = new ContentValues();\n // Assign values for each Column.\n updatedValues.put(\"USERNAME\", userName);\n updatedValues.put(\"PASSWORD\", password);\n\n String where = \"USERNAME = ?\";\n db.update(\"LOGIN\", updatedValues, where, new String[] { userName });\n }", "protected synchronized void login() {\n\t\tauthenticate();\n\t}", "@Override\r\n\tpublic void login() {\n\r\n\t}", "public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"[email protected]\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void updateLastLogin(Wx_BindCustomer wx_BindCustomer) {\n\t\tshopuserDao.updateLastLogin(wx_BindCustomer);\r\n\t}", "public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Select idUser,nom,prenom,userName,type,tel from t_user where userName=? and pass=? and status=?\");\r\n\t\t\t\tps.setString(1, this.getUserName());\r\n\t\t\t\tps.setString(2, this.getPassword());\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"idUser\", rs.getInt(\"idUser\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"nom\", rs.getString(\"nom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"prenom\", rs.getString(\"prenom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"userName\", rs.getString(\"userName\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"type\", rs.getString(\"type\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"tel\", rs.getString(\"tel\"));\r\n\t\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"view/welcome.xhtml\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tnew Message().error(\"echec de connexion\");\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tnew Message().warnig(\"Nom d'utilisateur ou mot de passe incorrecte\");\r\n\t\t}\r\n\t}", "public void updateUserState(String login, EOSState state) throws EOSForbiddenException, EOSUnauthorizedException,\n\t\t\tEOSNotFoundException;", "void loginDone();", "private void updateUserWithoutPassword() throws ClassNotFoundException, NoSuchAlgorithmException{\n\t\tint currentPositionInTableView = usersTable.getSelectionModel().getSelectedIndex(); // zapamiętaj bieżące podświetlenie w tabeli\n\t\tif ((isAllFieldsAreFull()) \n\t\t\t\t&& (isLoginUnique(usersTable.getSelectionModel().getSelectedItem().getId()))){\t\n\t\t\t\t\tMain.getMMUser().update(\t\t\t\t \n\t\t\t\t\t\t\tnew User(\n\t\t\t\t\t\t\t\t\tusersTable.getSelectionModel().getSelectedItem().getId(),\n\t\t\t\t\t\t\t\t\tuserLoginField.getText(), \n\t\t\t\t\t\t\t\t\tusersTable.getSelectionModel().getSelectedItem().getPassword(), \n\t\t\t\t\t\t\t\t\tuserNameField.getText(), \n\t\t\t\t\t\t\t\t\tuserLastNameField.getText(), \n\t\t\t\t\t\t\t\t\tpermission,\n\t\t\t\t\t\t\t\t\teditingCheck.isSelected(),\n\t\t\t\t\t\t\t\t\treminderCheck.isSelected()));\n\t\t\t\t\t// pokaż aktualny stan bazy pracowników\n\t\t\t\t\treadUsers();\n\t\t\t\t\tshowUsers();\n\t\t\t\t\tusersTable.getSelectionModel().select(currentPositionInTableView); // ustaw podswietlenie na bieżący wiersz\n\t\t\t\t\tnew AlertDialog(\"Operacja zakończona\", \"Zaktualizowano dane\", AlertType.INFORMATION);\n\t\t}\n\t}", "protected void handleLoginSucceeded(){\n super.handleLoginSucceeded();\n\n // Apply any ivar changes which might have occurred when we were waiting\n // for login.\n synchronized(this){\n\n // Workaround: the server won't send us the full seek list if we set seekinfo\n // on the login line.\n if (ivarStates.get(Ivar.SEEKINFO.getIndex())){\n sendCommand(\"$$iset seekinfo 1\");\n filterLine(\"seekinfo set.\");\n }\n\n\n for (int i = 0; i < requestedIvarStates.size(); i++){\n boolean state = requestedIvarStates.get(i);\n Ivar ivar = Ivar.getByIndex(i);\n if (state != ivarStates.get(i)){\n sendCommand(\"$$iset \"+ivar.getName()+\" \"+(state ? \"1\" : \"0\"));\n filterLine(ivar.getName()+\" \"+(state ? \"\" : \"un\")+\"set.\");\n }\n }\n\n sendCommand(\"$set style \"+style);\n filterLine(\"Style \"+style+\" set.\");\n\n sendCommand(\"$set interface \"+interfaceVar);\n\n sendCommand(\"$set ptime 0\");\n filterLine(\"Your prompt will now not show the time.\");\n }\n }", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "private void login()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Get the connection to the database\r\n\t\t\tDatabase db = new Database();\r\n\r\n\t\t\t//Get the data and format it correctly\r\n\t\t\tString username = txtUsername.getText().trim().toLowerCase();\r\n\t\t\tString password = new String(txtPassword.getPassword()).trim();\r\n\r\n\t\t\t//Verify that user information has been inserted into the username/password fields\r\n\t\t\tif (username.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your username.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtUsername.requestFocus();\r\n\t\t\t}//End of if\r\n\t\t\telse if (password.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your password.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t}//End of else if\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (!db.usernameExists(username))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t}//End of if\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tUser user = db.loadUser(username);\r\n\t\t\t\t\tbyte [] bPassword = PasswordEncryption.hashPassword(username, password);\r\n\r\n\t\t\t\t\tif (bPassword.length != user.getPassword().length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t}//End of if\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean same = true;\r\n\r\n\t\t\t\t\t\t//Check the passwords for equality\r\n\t\t\t\t\t\tfor (int x = 0; x < bPassword.length; x++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (bPassword[x] != user.getPassword()[x])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsame = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t}//End of for\r\n\r\n\t\t\t\t\t\tif (same)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (user.getAccountLevel() < 10)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\t\"You do not have sufficient rights to access this application.\",\r\n\t\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t//Login the user\r\n\t\t\t\t\t\t\t\tSession.login(user);\r\n\r\n\t\t\t\t\t\t\t\t//Open the dashbard\r\n\t\t\t\t\t\t\t\tSession.openWindow(new Dashboard());\r\n\r\n\t\t\t\t\t\t\t\t//Close this window\r\n\t\t\t\t\t\t\t\tthis.dispose();\r\n\t\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination your provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t}//End of else\r\n\t\t\t\t}//End of else\r\n\t\t\t}//End of else\r\n\t\t}//End of try\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//Inform the user that the application was unable to connect to the database.\r\n\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\tthis,\r\n\t\t\t\t\"An error occured connecting to the database.\\n\\nIf this problem continues, please contact your system administrator.\",\r\n\t\t\t\tApplication.NAME,\r\n\t\t\t\tJOptionPane.ERROR_MESSAGE\r\n\t\t\t);\r\n\t\t}//End of catch\r\n\t}", "private static void updateUser() {\n\t currentUser = Structure.User(currentUser);\n\t CRUDUsers.compareWithRemote(currentUser).subscribe(new SingleSubscriber<User>() {\n\t\t @Override\n\t\t public void onSuccess(User value) {\n\t\t\t\tConnection.logIn(value);\n\t\t }\n\t\t\n\t\t @Override\n\t\t public void onError(Throwable error) {\n\t\t\t logOff();\n\t\t\t App.showMessage(error.getMessage());\n\t\t }\n\t });\n }", "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "@Override\n\tpublic void loginUser() {\n\t\t\n\t}", "public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}", "@Override\n\tpublic void updateLoggedinUsers() throws Exception {\n\n\t}", "@Override\n\tpublic void LoginProc(Parent root) {\n\t\tTextField idTxt = (TextField) root.lookup(\"#txtid\");\n\t\tTextField pwTxt = (TextField) root.lookup(\"#txtpw\");\n\t\tSystem.out.println(\"ID : \"+idTxt.getText()+\",PW : \"+pwTxt.getText()+\"가 입력되었습니다.\");\n\t}", "public void setLogin(java.lang.String login) {\n this.login = login;\n }", "public void setLogin(java.lang.String login) {\n this.login = login;\n }", "@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}", "private static void loginForAdmin(String username, String password){\n\n ArrayList<Object> loginData = LogInAndLogOutService.login(username, password);\n boolean logged = (boolean) loginData.get(0);\n boolean freezed = (boolean) loginData.get(1);\n Employee employee = (Employee) loginData.get(2);\n\n if (logged){\n\n System.out.println(\"Sie sind richtig als Herr/Frau \"+ employee.getLastname() + \" \"+ employee.getFirstname() +\" eingelogt.\");\n }else {\n if (freezed){\n\n System.out.println(\"Ihr Konto wurde einfriert. Sie können sie sich nicht einloggen. :(\");\n }else {\n\n System.out.println(\"Falscher Benutzername oder Passwort eingegeben. Versuchen Sie erneut.\");\n }\n }\n }", "@Override\r\n\tpublic void loginSuccess(String userName, String psd) {\n\t\tet_username_logon.setText(\"\" + userName);\r\n\t\tet_password_logon.setText(\"\");\r\n\t\tmyLogon.setString(userName, psd);\r\n\t\tmyLogon.logon();\r\n\t}", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "public void update() {\n\t\tif (this.currentLoginState == LoginState.READY_TO_ACCEPT) {\n\t\t\tthis.tryAcceptPlayer();\n\t\t}\n\n\t\tif (this.connectionTimer++ == 600) {\n\t\t\tthis.closeConnection(\"Took too long to log in\");\n\t\t}\n\t}", "private void login(int selected) {\n ExtendedAccountData data = queriedaccounts.get(selected);\n loginfailed = AltManager.getInstance().setUser(data.user, data.pass);\n if (loginfailed == null) {\n Minecraft.getMinecraft().displayGuiScreen(null);\n ExtendedAccountData current = getCurrentAsEditable();\n current.premium = EnumBool.TRUE;\n current.useCount++;\n current.lastused = JavaTools.getJavaCompat().getDate();\n } else if (loginfailed instanceof AlreadyLoggedInException) {\n getCurrentAsEditable().lastused = JavaTools.getJavaCompat().getDate();\n } else if (HttpTools.ping(\"http://minecraft.net\")) {\n getCurrentAsEditable().premium = EnumBool.FALSE;\n }\n }", "@Override\n\tpublic void changePassword(LoginForm login) {\n\t\tuserRepository.changePassword(encoder.encode(login.getPassword()), login.getUsername());\n\n\t}", "private void login() {\r\n\r\n if (String.valueOf(login_usernameTextField.getText()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Username\");\r\n\r\n else if (String.valueOf(login_passwordField.getPassword()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Password\");\r\n\r\n else if (MainGUI.pimsSystem.staff_exists(login_usernameTextField.getText(), String.valueOf(login_passwordField.getPassword()))) {\r\n remove(loginPanel);\r\n add(tabbedPane);\r\n JOptionPane.showMessageDialog\r\n (null, \"Login Successful\");\r\n repaint();\r\n revalidate();\r\n\r\n // reset username and password fields\r\n login_usernameTextField.setText(\"\");\r\n login_passwordField.setText(\"\");\r\n\r\n } else\r\n JOptionPane.showMessageDialog\r\n (null, \"Invalid Password or Username\");\r\n }", "private void updateUiForLoginState() {\n if (ConnectionUtils.getSessionInstance().isLoggedIn()) {\n Toast.makeText(this, \"Logged\", Toast.LENGTH_SHORT).show();\n Note note = new Note();\n note.setTitle(\"My test note number two\");\n String content = \n NoteUtils.NOTE_PREFIX +\n \"<p>This note was uploaded from Android. It contains an image.</p>\" +\n NoteUtils.NOTE_SUFFIX;\n note.setContent(content);\n \n NoteAttributes attr = new NoteAttributes();\n //this makes it read only\n attr.setContentClass(\"halusky\");\n note.setAttributes(attr);\n \n Notebook notebook = new Notebook();\n notebook.setName(\"Halusky\" + System.currentTimeMillis());\n \n // Create the note on the server. The returned Note object\n // will contain server-generated attributes such as the note's\n // unique ID (GUID), the Resource's GUID, and the creation and update time.\n try {\n Notebook createNotebook = ConnectionUtils.getSessionInstance().createNoteStore().createNotebook(ConnectionUtils.getSessionInstance().getAuthToken(), notebook);\n note.setNotebookGuid(createNotebook.getGuid());\n Note createdNote = ConnectionUtils.getSessionInstance().createNoteStore().createNote(ConnectionUtils.getSessionInstance().getAuthToken(), note);\n } catch (TTransportException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (EDAMUserException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (EDAMSystemException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (EDAMNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (TException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n } else {\n Toast.makeText(this, \"=( not logged\", Toast.LENGTH_SHORT).show();\n }\n }", "private void logino(int selected) {\n ExtendedAccountData data = queriedaccounts.get(selected);\n AltManager.getInstance().setUserOffline(data.alias);\n loginfailed = null;\n Minecraft.getMinecraft().displayGuiScreen(null);\n ExtendedAccountData current = getCurrentAsEditable();\n current.useCount++;\n current.lastused = JavaTools.getJavaCompat().getDate();\n }", "public void setLogin(boolean isLoggedIn)\n {\n editor.putBoolean(KEY_IS_LOGGEDIN, isLoggedIn);\n // commit changes\n editor.commit();\n Log.d(TAG,\"user login modified in pref\");\n }", "public void LogIn() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void Login(DbInterface dbi) {\n\t\t\r\n\t}", "public static void forceLogin() {\n forcedLogin = true;\n }", "@Override\n\tpublic void edit(CustomerLogin customerLogin) {\n\t\tCustomerLogin dbcustomerLogin=findCustomerLoginById(customerLogin.getCrn());\n\t\tif(dbcustomerLogin!=null) {\n\t\t\tdbcustomerLogin.setPassword(customerLogin.getPassword());\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! Customer login Details not found.\");\n\t}", "@Override\n\tpublic boolean checkLogin(String username, String password, Map<String, User> map) {\n\t\tif(username == null || password == null || map == null) return false;\n\t\t\n\t\tUser p = map.get(username);\n\t\tif(p == null) return false;\n\t\tif(password.equals(p.getPassword()) && p.getTries() > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tp.setTries(p.getTries() - 1);\n\t\tif(userdata != null) {\n\t\t\tuserdata.open();\n\t\t\tuserdata.updateUser(p);\n\t\t\tuserdata.close();\n\t\t}\n\t\treturn false;\n\t}", "void setLoginId(long loginId);", "void setLoginId(long loginId);", "void setLoginId(long loginId);", "public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }", "public void setLogin(java.lang.String login) {\n\t\tthis.login = login;\n\t}", "public final void login() {\n Activity_ExtensionKt.hideSoftKeyboard(this);\n if (hasAllRequiredField()) {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n String obj = editText.getText().toString();\n if (obj != null) {\n this.username = StringsKt.trim((CharSequence) obj).toString();\n EditText editText2 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPassword\");\n String obj2 = editText2.getText().toString();\n if (obj2 != null) {\n this.password = StringsKt.trim((CharSequence) obj2).toString();\n LoginViewModel loginViewModel = this.viewModel;\n if (loginViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n EditText editText3 = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etUserName\");\n String obj3 = editText3.getText().toString();\n EditText editText4 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etPassword\");\n loginViewModel.login(obj3, editText4.getText().toString());\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n }", "public void login() {\n try {\n callApi(\"GET\", \"account/session\", null, null, true);\n } catch (RuntimeException re) {\n\n }\n\n Map<String, Object> payload = new HashMap<>();\n payload.put(\"name\", \"admin\");\n payload.put(\"password\", apiAdminPassword);\n payload.put(\"remember\", 1);\n\n callApi(\"POST\", \"account/signin\", null, payload, true);\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "@Override\n\tpublic int update(Usuario us) {\n\t\tString SQL =\"update user set nomuser = ?, passuser =?\";\n\t\treturn jdbc.update(SQL, us.getUsername(), us.getPassword());\n\t}", "private void login(){\n out.println(\"Enter player name: \");\n player = new Player(in.nextLine());\n game.addPlayerObject(player);\n out.println(\"Player name set to: \" + player.getName() + \"\\r\\n\");\n\n game.incrementPlayersConnected();\n\n login = true;\n }", "public void switchToLogin() {\r\n\t\tlayout.show(this, \"loginPane\");\r\n\t\tloginPane.resetPassFields();\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "@Override\r\n\t\t\tpublic void onLogin(String username, String password) {\n\r\n\t\t\t}", "public void login() throws IOException {\n\t\tApp.setRoot(\"LogIn\");\n\t}", "@Override\n\tpublic void onLoginSuccess() {\n\t\t\n\t}", "public update_profile(int loginid) {\n initComponents();\n this.getContentPane().setBackground(new Color(98,182,170));\n this.setSize(850, 500);\n this.setLocationRelativeTo(null);\n this.setResizable(false);\n t1.setText(\"\"+loginid);\n t1.setEditable(false);\n }", "public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}", "@FXML\n private void handleLoginAttempt() {\n\n if (isInputValid()) {\n String uname = userField.getText();\n if (Model.doesUsernameExist(uname)) {\n User user = Model.verifyLogin(uname, pwField.getText());\n\n if (user == null) {\n // uname exists but incorrect login\n user = UserInfoTable.getUserFromUserName(uname);\n _loginAuthenticated = false;\n user.setLockoutNum(user.getLockoutNum() + 1);\n Model.editUser(user);\n\n // increment incorrect login attempts, check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n } else {\n // uname exists and correct login\n // check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n user.setLockoutNum(0);\n Model.editUser(user);\n Model.setUser(user);\n _loginAuthenticated = true;\n app.showMainPage();\n return;\n }\n }\n // Show the error message if bad data\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Please Correct Invalid Fields \");\n alert.setHeaderText(\"Incorrect password and/or username\");\n\n alert.showAndWait();\n }\n }", "public void doLogin() {\n\t\tSystem.out.println(\"loginpage ----dologin\");\n\t\t\n\t}", "public void logIn(View v){\n mUsername = (EditText) findViewById(R.id.username);\n mPassword = (EditText) findViewById(R.id.password);\n\n // Reset errors.\n mUsername.setError(null);\n mPassword.setError(null);\n\n // Store the data\n username = mUsername.getText().toString();\n password = mPassword.getText().toString();\n\n //Check username\n if (TextUtils.isEmpty(username)) {\n mUsername.setError(fielderror);\n checklog = false;\n }\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPassword.setError(fielderror);\n checklog = false;\n }\n if(checklog == true) {\n loginUser();\n }\n\n\n }", "protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "public static void login() {\n\t\t\n\t\t\n\n\t\twhile(!userIsLogged) {\n\n\t\t\tSystem.out.println(\"--> LOGIN <--\");\n\n\t\t\tString username = \"\";\n\t\t\tString password = \"\";\n\n\t\t\tdo {\n\t\t\t\tSystem.out.print(\"Username: \");\n\t\t\t\tusername = Main.scanner.nextLine();\n\t\t\t\tSystem.out.print(\"Password: \");\n\t\t\t\tpassword = Main.scanner.nextLine();\n\n\t\t\t\tif(username.isEmpty() && password.isEmpty()) {\n\t\t\t\t\tSystem.out.println(\"\\n>> Username or Password not inserted\\n\");\n\t\t\t\t}\n\n\t\t\t} while (username.isEmpty() && password.isEmpty());\n\n\n\t\t\tfor (Person person : userList) {\n\t\t\t\tif (person.getUsername().equals(username) && person.getPassword().equals(password)) {\n\t\t\t\t\t// loging correct\n\t\t\t\t\tloggedUser = person;\n\t\t\t\t\tuserIsLogged = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!userIsLogged) {\n\t\t\t\tSystem.out.println(\"\\n>> Wrong username or password\\n\");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"Welcome \" + loggedUser.getName() + \" \" + loggedUser.getSurname());\n\t}", "@Override\n\tpublic boolean login(Map<String, Object> map) {\n\t\treturn false;\n\t}", "private void loginSuccess(String uname) {\n }", "@Test\r\n\tpublic void login() {\n\t\tUser loginExit = userMapper.login(\"wangxin\", \"123456\");\r\n\t\tif (loginExit == null) {\r\n\t\t\tSystem.out.println(\"用户不存在\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(loginExit);\r\n\t\t\tSystem.out.println(\"登录成功!\");\r\n\t\t}\r\n\t}", "void update(String userName, String password, String userFullname,\r\n\t\tString userSex, int userTel, String role);", "public void tryLoginAgain(){\n\t\tnameField.setText(\"\");\n\t\trollField.setText(\"\");\n\t\tseatField.setText(\"\");\n\t\tnameField.repaint();\n\t\tseatField.repaint();\n\t\trollField.repaint();\n\t\tclearErrors();\n\t\tmainDialog.dispose();\t\t\n\t}", "public void doLogin(String u, String p) {\n final String oldUser = mUser;\n mUser = u;\n LoginRequest request = new LoginRequest(u, p,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String username) {\n //update variables\n mLogin = true;\n //set user to preferences\n mPreferences.setUser(username);\n mSingleton.updateActivityTypes();\n\n //reset drawer to load new user\n restartActivity();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // Error handling\n //reset current user to previous state\n mUser = oldUser;\n System.out.println(\"Something went wrong!\");\n error.printStackTrace();\n }\n });\n mSingleton.add(request);\n }", "public void premutoLogin()\n\t{\n\t\tnew _FINITO_funzione_loginGUI();\n\t}", "@Override\r\n\tpublic void MemberLogin() {\n\r\n\t}", "private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}", "public void automaticLogin(String login, String password) {\n mConnectionRequestCommand.setLogin(login);\n mConnectionRequestCommand.setPassword(password);\n mConnectionRequestCommand.execute();\n }", "void successLogin();", "public static void saveLogin(Context context) {\n // we save login so that if data is cleared, checkLogin() will always return false regardless of FirebaseAuth current user nullity, therefore forcing a re-login on the next launch of MainActivity\n SharedPreferences sharedPreferences = context.getSharedPreferences(Utils.SHARED_PREFERENCES_FILE, Context.MODE_PRIVATE);\n if (FirebaseAuth.getInstance().getCurrentUser() != null) {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(LOGIN_SAVED_KEY, true);\n editor.apply();\n }\n }", "void updateLastLogin(@Param(\"key\") int key);", "@Override\r\n\t\t\t\t\tpublic void onSuccess(CellComAjaxResult arg0) {\n\t\t\t\t\t\tDismissProgressDialog();\r\n\t\t\t\t\t\tLoginComm modifyPwdComm = arg0.read(LoginComm.class,\r\n\t\t\t\t\t\t\t\tCellComAjaxResult.ParseType.GSON);\r\n\t\t\t\t\t\tString state = modifyPwdComm.getReturnCode();\r\n\t\t\t\t\t\tString msg = modifyPwdComm.getReturnMessage();\r\n\t\t\t\t\t\tif (!FlowConsts.STATUE_1.equals(state)) {\r\n\t\t\t\t\t\t\tShowMsg(msg);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tSharepreferenceUtil.write(ModifyPwdActivity.this,\r\n\t\t\t\t\t\t\t\t\tSharepreferenceUtil.fileName, \"pwd\",\r\n\t\t\t\t\t\t\t\t\tAESEncoding.Encrypt(newpwdettxt,\r\n\t\t\t\t\t\t\t\t\t\t\tFlowConsts.key));\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsetResult(RESULT_OK, intent);\r\n\t\t\t\t\t\tModifyPwdActivity.this.finish();\r\n\t\t\t\t\t\tShowMsg(\"密码修改成功\");\r\n//\t\t\t\t\t\tstartTask(oldpwdettxt, newpwdettxt, newpwdettxt);\r\n\t\t\t\t\t}" ]
[ "0.77287865", "0.7098448", "0.7057441", "0.70171297", "0.6931892", "0.6913683", "0.6884264", "0.685628", "0.6831704", "0.6813637", "0.6791808", "0.6789933", "0.677087", "0.67473793", "0.67007303", "0.6690026", "0.66894114", "0.6684129", "0.66734546", "0.6656583", "0.6654687", "0.66506153", "0.66428286", "0.66135466", "0.66135466", "0.66029644", "0.6590799", "0.6563028", "0.6561238", "0.65518546", "0.6545543", "0.6543075", "0.65383035", "0.65088993", "0.6499787", "0.64931995", "0.6472419", "0.64665043", "0.64456064", "0.6443676", "0.64430135", "0.641597", "0.64110047", "0.6405101", "0.640338", "0.63795626", "0.63783455", "0.6364656", "0.6364656", "0.63593", "0.6358096", "0.63571143", "0.6354553", "0.63374007", "0.6332271", "0.6327751", "0.6312642", "0.6312568", "0.6306096", "0.63031906", "0.6301256", "0.6258581", "0.6248688", "0.6238757", "0.6233569", "0.62160665", "0.62160665", "0.62160665", "0.6210111", "0.6195853", "0.61900365", "0.6177622", "0.61764127", "0.6167537", "0.6166743", "0.61640805", "0.6162126", "0.6158068", "0.61549544", "0.6142788", "0.6137258", "0.6137205", "0.61320126", "0.61282355", "0.61195946", "0.61104035", "0.61044466", "0.6100846", "0.60997516", "0.60926765", "0.6090085", "0.60832196", "0.6082254", "0.6080203", "0.607989", "0.60789627", "0.6075433", "0.60732836", "0.60704166", "0.60689044" ]
0.659548
26
updateSpiel() / Spiel Informationen werden aktualisiert
public void updateSpiel() { Intent callerIntent = getIntent(); Bundle packageFromSpiel = callerIntent.getBundleExtra("SpielInformationen"); try { final String METHOD_NAME="UpdateSpiel"; final String SOAP_ACTION=NAMESPACE+METHOD_NAME; SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME); SoapObject newSpiel=new SoapObject(NAMESPACE, "_spiel"); newSpiel.addProperty("SpielID",packageFromSpiel.getInt("ID_Spiel")); newSpiel.addProperty("Schwerrate",packageFromSpiel.getInt("SchwerRate")); newSpiel.addProperty("MaxSpieler",packageFromSpiel.getInt("MaxSpieler")); newSpiel.addProperty("ActuellSpieler",packageFromSpiel.getInt("ActuellSpieler")); newSpiel.addProperty("GeldPol",packageFromSpiel.getDouble("EinSatzGeld_DoubleWert")); newSpiel.addProperty("GeldSum",(packageFromSpiel.getDouble("EinSatzGeld_DoubleWert"))*packageFromSpiel.getInt("MaxSpieler")); request.addSoapObject(newSpiel); SoapSerializationEnvelope envelope= new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); MarshalFloat marshal=new MarshalFloat(); marshal.register(envelope); HttpTransportSE androidHttpTransport= new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); SoapPrimitive soapPrimitive= (SoapPrimitive) envelope.getResponse(); //Toast.makeText(this, soapPrimitive.toString(), Toast.LENGTH_LONG).show(); } catch(Exception e) { Toast.makeText(this, "Fehler Spiel Update", Toast.LENGTH_LONG).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update(){\n addNotificaciones(nombre + \" \" + this.sucursal.descuento());\n mostrarNotificaciones();\n notificaciones.clear();\n }", "@Override\n\tpublic void updatePais(Pais elemento) {\n\t\tgetSession().update(elemento);\n\t\t\n\t}", "Software update( Software s );", "void update(Reservierung reservierung, int id) throws ReservierungException;", "@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}", "private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }", "void updateInformation();", "@Override\n\tpublic void update(Object entidade) {\n\t\t\n\t}", "public void update(){}", "public void update(){}", "@Override\n\tpublic Item update() {\n\t\t\n\t\treadAll();\n\t\n\t\tLOGGER.info(\"State the shoe name you wish to update\");\n\t\tString name = util.getString().toLowerCase();;\n\t\tLOGGER.info(\"State the size you wish to update\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Change price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Change amount in stock\");\n\t\tlong stock = util.getLong();\n\t\tLOGGER.info(\"\\n\");\n\t\treturn itemDAO.update(new Item(name,size,price,stock));\n\t\t\n\t\t\n\t\t\n\t}", "public void update(Ejemplar ej);", "@Override\n public int update(J34SiscomexPaises j34SiscomexPaises) {\n return super.doUpdate(j34SiscomexPaises);\n }", "public void update(Pessoa p) {\n\t\tdb.save(p);\t\t\n\t}", "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}", "public void updateJoueurs();", "public void updateModeloPagoLaboratorio() throws Exception{\n ArrayList<Pago> pgAbono = PagoDB.listarPagosDePlanTratamientoLab(tratamientotoSelected.getIdPlanTratamiento());\n \n \n int m = this.columnasNombrePagoLab.length;\n ArrayList<Object []> objetos = new ArrayList<Object []>();\n String aux = this.costoAbono.getText();\n int total = Integer.parseInt(aux.substring(1, aux.length()));\n for(Pago pagAbn : pgAbono){\n\n String tipoPago = pagAbn.getTipoPago();\n String detalle = pagAbn.getDetalle();\n String fecha = girarFecha(pagAbn.getFecha());\n String valor = pagAbn.getAbono()+\"\";\n int numBoleta = pagAbn.getNumBoleta();\n total = total + pagAbn.getAbono();\n Object [] fila = new Object [] {new Item (tipoPago,pagAbn.getIdPago()), detalle, fecha, \"$\"+valor, numBoleta+\"\"};\n objetos.add(fila);\n \n }\n costoAbono.setText(\"$\"+total);\n int id = tratamientotoSelected.getIdPlanTratamiento();\n PlanTratamiento planTrat = PlanTratamientoDB.getPlanTratamiento(id);\n planTrat.setTotalAbonos(total);\n //calculando el porcentaje de abance\n int cosTotal=tratamientotoSelected.getCostoTotal();\n int avance= total*100/cosTotal;\n planTrat.setAvance(avance);\n \n PlanTratamientoDB.editarPlanTratamiento(planTrat);\n //System.out.println(\"total 1:\"+total+\"id:\"+id);\n \n this.filasPagoLab = new Object [objetos.size()][m];\n int i = 0;\n for(Object [] o : objetos){\n this.filasPagoLab[i] = o;\n i++;\n }\n \n this.modeloPagoLab = new DefaultTableModel(this.filasPagoLab, this.columnasNombrePagoLab) {\n Class[] types = new Class [] {\n String.class, Item.class, String.class, String.class, String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n };\n \n this.tablaPagoLaboratorio.setModel(modeloPagoLab);\n \n this.iniciarTablaPlanesTratamientos();\n //habilitarBoton();\n }", "public void updateEmpresa() {\n Empresa empresa = empresaDAO.load(config.getApplicationEmpresaId());\n this.textTitle.setText(MessageFormat.format(resource.getString(\"main.title\"), empresa.getNome()));\n }", "@Override\n\tpublic int update(Reservation objet) {\n\t\treturn 0;\n\t}", "public void ModificarPrestamo(PrestamoFila pf) {\n this.conexion.ConectarBD();\n String consulta = \"update prestamos set IdSocio = ?, IdLibro = ?, FechaInicio = ?, FechaFin = ? where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del update\n this.pstm.setInt(1, pf.getIdSocio());\n this.pstm.setInt(2, pf.getIdLibro());\n this.pstm.setDate(3, new java.sql.Date(pf.getFechaInicio().getTime()));\n this.pstm.setDate(4, new java.sql.Date(pf.getFechaFin().getTime()));\n this.pstm.setInt(5, pf.getIdPrestamo());\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al modificar un Prestamo.\\n\"+e.toString());\n \n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n \n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD(); \n }", "public Ausschreibung update(Ausschreibung as) {\r\n\r\n\t\t// DB-Verbindung herstellen\r\n\t\tConnection con = DBConnection.connection();\r\n\r\n\t\ttry {\r\n\t\t\t// Leeres SQL-Statement (JDBC) anlegen\r\n\t\t\tStatement stmt = con.createStatement();\r\n\r\n\r\n\t\t\tif (as.getPartnerprofilId() == 0) {\r\n\t\t\t\t// Jetzt erst erfolgt die tatsaechliche Einfuegeoperation\r\n\t\t\t\tstmt.executeUpdate(\"UPDATE ausschreibung \" + \"SET Bezeichnung=\\\"\" + as.getBezeichnung() + \"\\\", \"\r\n\t\t\t\t\t\t+ \"Ausschreibungstext=\\\"\" + as.getAusschreibungstext() + \"\\\", \" + \"Bewerbungsfrist=\\\"\"\r\n\t\t\t\t\t\t+ DBConnection.convertToSQLDateString(as.getBewerbungsfrist()) + \"\\\", \" + \"Projekt_ID=\"\r\n\t\t\t\t\t\t+ as.getProjektId() + \", Partnerprofil_ID=NULL \" + \"WHERE ID=\"\t+ as.getId());\r\n\t\t\t} else {\r\n\t\t\t\t// Jetzt erst erfolgt die tatsaechliche Einfuegeoperation\r\n\t\t\t\tstmt.executeUpdate(\"UPDATE ausschreibung \" + \"SET Bezeichnung=\\\"\" + as.getBezeichnung() + \"\\\", \"\r\n\t\t\t\t\t\t+ \"Ausschreibungstext=\\\"\" + as.getAusschreibungstext() + \"\\\", \" + \"Bewerbungsfrist=\\\"\"\r\n\t\t\t\t\t\t+ DBConnection.convertToSQLDateString(as.getBewerbungsfrist()) + \"\\\", \" + \"Projekt_ID=\"\r\n\t\t\t\t\t\t+ as.getProjektId() + \", \" + \"Partnerprofil_ID=\" + as.getPartnerprofilId() + \" \" + \"WHERE ID=\"\r\n\t\t\t\t\t\t+ as.getId());\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\t\tcatch (SQLException e2) {\r\n\t\t\te2.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// Um Analogie zu insert(Ausschreibung as) zu wahren, geben wir as\r\n\t\t// zurueck\r\n\t\treturn as;\r\n\t}", "public void save()throws Exception{\n if(!pname1.getText().isEmpty() && !qty1.getText().isEmpty() && !prc1.getText().isEmpty() && !rsp1.getText().isEmpty() ){\r\n s_notif1.setId(\"hide\");\r\n ArrayList<Product> ar = new ArrayList<>();\r\n com.mysql.jdbc.Connection conn = db.getConnection();\r\n Statement stm = conn.createStatement();\r\n int rs = stm.executeUpdate(\"UPDATE products SET \"\r\n + \"name='\"+pname1.getText()+\"', \"\r\n + \"qty='\"+qty1.getText()+\"', \"\r\n + \"price='\"+prc1.getText()+\"',\"\r\n + \"re_stock_point='\"+rsp1.getText()+\"' WHERE ID ='\"+S_ID+\"';\");\r\n if(rs > 0){\r\n s_notif1.setId(\"show\");\r\n }\r\n }\r\n loadData();\r\n }", "@Override\n protected void doPut(HttpServletRequest requete, HttpServletResponse reponse) throws ServletException, IOException {\n Integer idSousTournoiAValider = tentativeRecuperationIdSousTournoi(requete);\n if (idSousTournoiAValider == null){\n envoyerReponseMauvaisId(reponse);\n }\n else{\n SousTournoiSimplifieDto sousTournoiValide = sousTournoiService.validerSousTournoi(idSousTournoiAValider);\n if(sousTournoiValide != null){\n envoyerReponseRecuperationSousTournoiSimplifie(sousTournoiValide, reponse);\n }\n else{\n envoyerReponseSousTournoiIntrouvable(reponse);\n }\n }\n }", "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 void editarHospede() {\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 System.err.println(\"O que deseja editar:\\n Nome(1)\\n\"\n + \"Cpf(2)\\nE-MAIL(3)\");\n int a = verifica();\n switch (a) {\n case 1:\n System.err.println(\"Digite o novo nome do hospede:\\n\");\n String nome = ler.next();\n hospedesCadastrados.get(i).setNome(nome);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n case 2:\n System.err.println(\"Digite o novo CPF do hospede:\\n\");\n int cpf1 = verifica();\n hospedesCadastrados.get(i).setCpf(cpf1);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n case 3:\n System.err.println(\"Digite o novo E-MAIL do hospede:\\n\");\n String email = ler.next();\n hospedesCadastrados.get(i).setEmail(email);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n }\n\n } else if (hospedesCadastrados.size() == i) {\n System.err.println(\"Nao existem hospedes com esse cpf cadastrados!\\n\");\n }\n }\n }\n }", "public void updateData() {}", "void actualizar(Espacio espacio);", "public updateDetails(String repIdIs , String pk, String dateis, String customeris, String routeis, String amountis) {\n initComponents();\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.png\")));\n\n displayDate.setText(dateis);\n customer.setText(customeris);\n route.setText(routeis);\n amount.setText(amountis);\n\n date.setEnabled(false);\n route.setEditable(false);\n customer.setEditable(false);\n amount.setEditable(false);\n\n dateUpdate.setEnabled(false);\n routetUpdate.setEnabled(false);\n customerUpdate.setEnabled(false);\n amountUpdate.setEnabled(false);\n\n this.primarykeyofdata = pk;\n this.repid = repIdIs;\n }", "private void setupSpalteSaz() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteSaz.setCellValueFactory(new PropertyValueFactory<>(\"saz\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteSaz.setCellFactory(\r\n\t\t\t\tEditCell.<ArbeitspaketTableData, Integer>forTableColumn(new MyIntegerStringConverter()));\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteSaz.setOnEditCommit(event -> {\r\n\t\t\tfinal Integer value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setSaz(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}", "void updateData();", "@Override //编辑通知\n\tpublic void editPoInfo(PageData pd) throws Exception {\n\t\tdao.update(\"PoInfoMapper.editPoInfo\", pd);\n\t\t\n\t}", "private void updateUi(){\n competencia = (CompetitionMin) getArguments().getSerializable(\"competencia\");\n\n edtCiudad = vista.findViewById(R.id.edt_ciudad_edit_comp);\n\n spinGenero = vista.findViewById(R.id.spinner_genero_edit);\n spinEstado = vista.findViewById(R.id.spinner_estado_edit);\n\n generos = new ArrayList<>();\n estados = new ArrayList<>();\n\n btnUpdateCompetition = vista.findViewById(R.id.btn_update_edit_comp);\n }", "public String update() {\n\t\tif (getElement().getIdTipo() == null) {\n\t\t\tFacesContext.getCurrentInstance()\n\t\t\t\t\t.addMessage(\n\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\tnew FacesMessage(\"Tipo non valido\",\n\t\t\t\t\t\t\t\t\t\"Selezionare il tipo.\"));\n\t\t\treturn null;\n\t\t}\n\t\tModulo t = getSession().update(element);\n\t\t// refresh locale\n\t\telement = t;\n\t\trefreshModel();\n\t\t// vista di destinzione\n\t\toperazioniLogHandler.save(OperazioniLog.MODIFY, JSFUtils.getUserName(),\n\t\t\t\t\"modifica moduli: \" + this.element.getNome());\n\t\treturn viewPage();\n\t}", "public void updateInfo() {\n\t}", "protected abstract void updateInfos();", "@Override\n\tpublic void updateCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}", "public void actualizar();", "public void saveExisting() {\r\n Part modifiedPart = null;\r\n for (Part part : Inventory.getAllParts()) {\r\n if (Integer.parseInt(iDfield.getText()) == part.getId()) {\r\n modifiedPart = part;\r\n }\r\n }\r\n if (modifiedPart instanceof Outsourced && inHouseSelected) {\r\n replacePart(modifiedPart);\r\n\r\n } else if (modifiedPart instanceof InHouse && !inHouseSelected) {\r\n replacePart(modifiedPart);\r\n } else {\r\n modifiedPart.setName(nameField.getText());\r\n modifiedPart.setStock(Integer.parseInt(invField.getText()));\r\n modifiedPart.setPrice(Double.parseDouble(priceField.getText()));\r\n modifiedPart.setMax(Integer.parseInt(maxField.getText()));\r\n modifiedPart.setMin(Integer.parseInt(minField.getText()));\r\n if (inHouseSelected) {\r\n ((InHouse) modifiedPart).setMachineId(Integer.parseInt(machineOrCompanyField.getText()));\r\n } else {\r\n ((Outsourced) modifiedPart).setCompanyName(machineOrCompanyField.getText());\r\n }\r\n\r\n Inventory.updatePart(Inventory.getAllParts().indexOf(modifiedPart), modifiedPart);\r\n }\r\n\r\n }", "DetalleMedicamentoSucursal update(DetalleMedicamentoSucursal update);", "public void updateContent() {\n\t\t\n\t\tupdateResidencias();\n\t\tupdateUniversidades();\n\t\t\n\t}", "public void updateIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENT);\r\n\t\t\t\r\n\t\t\tArray sql = con.createArrayOf(\"boolean\", i.getDisponibilita());\r\n\t\t\t\r\n\t\t\tpstmt.setArray(1, sql);\r\n\t\t\tpstmt.setString(2, i.getGiocatore());\r\n\t\t\tpstmt.setInt(3, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic Fournisseur update(Fournisseur entity) {\n\t\treturn null;\n\t}", "private void actualizarFondo() {\n actualizaEstadoMapa();\n if (modificacionFondoBase == true && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE){\n moverFondo();\n } else if (modificacionFondoBase == false && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE ){\n texturaFondoBase= texturaFondo1_1;\n texturaFondoApoyo= texturaFondo1_2;\n moverFondo();\n }\n }", "void update(Information info);", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\r\n\t\t\r\n\t}", "public void sendeSpielfeld();", "@Override\n\tpublic boolean update(Produto t) {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void updateFournisseur(Fournisseur fournisseur) {\n\t\tthis.sessionFactory.getCurrentSession().update(fournisseur);\r\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "@Override\r\n\tpublic Partenariat updateSociety(Partenariat partenariat) {\n\t\treturn partenariatRepositroy.save(partenariat);\r\n\t}", "@Override\r\n\tpublic void pUpdate(String name, String depict, String type, double price, String img,String phone, int PS2_id,int P_id) {\n\t\tConnection connection = DBUtils.getConnection();\r\n\t\tPreparedStatement preparedStatement = null;\r\n\t\tString sql = \"update product set name=?,depict=?,type=?,price=?,img=?,phone=?,PS2_id=? where P_id=?\";\r\n\t try {\r\n\t \tconnection.setAutoCommit(false);\r\n\t \tpreparedStatement = connection.prepareStatement(sql);\r\n\t\t\tpreparedStatement.setString(1, name);\r\n\t\t\tpreparedStatement.setString(2, depict);\r\n\t\t\tpreparedStatement.setString(3, type);\r\n\t\t\tpreparedStatement.setDouble(4, price);\r\n\t\t\tpreparedStatement.setString(5, img);\r\n\t\t\tpreparedStatement.setString(6, phone);\r\n\t\t\tpreparedStatement.setInt(7, PS2_id);\r\n\t\t\tpreparedStatement.setInt(8,P_id);\r\n\t\t\tpreparedStatement.execute();\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.rollback();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDBUtils.release(null, preparedStatement, connection);\r\n\t\t}\r\n\t}", "Motivo update(Motivo update);", "public void update(){\r\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "private void setupSpalteSez() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteSez.setCellValueFactory(new PropertyValueFactory<>(\"sez\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteSez.setCellFactory(\r\n\t\t\t\tEditCell.<ArbeitspaketTableData, Integer>forTableColumn(new MyIntegerStringConverter()));\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteSez.setOnEditCommit(event -> {\r\n\t\t\tfinal Integer value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setSez(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}", "public void actualizarPodio() {\r\n\t\tordenarXPuntaje();\r\n\t\tint tam = datos.size();\r\n\t\traizPodio = datos.get(tam-1);\r\n\t\traizPodio.setIzq(datos.get(tam-2));\r\n\t\traizPodio.setDer(datos.get(tam-3));\r\n\t}", "public void update() {\n\t\t\n\t}", "public void doUpdate() {\n \tboolean actualizo = this.update(); \n \t\n if (actualizo) {\n // this.exit();\n \n // Ver aca si direcciono a la edición ... lo hace la clase que\n \tthis.redireccion();\n \n } else {\n //new MessageWindowPane(\"Se produjo un error en la actualización\");\n }\n \n \n }", "public static void updateequipo(Integer id ,String nombre,String ciudad,String pais) {\r\n\r\n\t\tConnection c = ConnectionDB.conectarMySQL();\r\n\t\ttry {\r\n\t\t\tPreparedStatement stmt = c\r\n\t\t\t\t\t.prepareStatement(\"UPDATE equipo SET nombre='\"+ nombre + \"', ciudad='\"+ciudad+\"', pais='\"+ pais+\"' WHERE id=\"+id);\r\n\t\t\tstmt.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void update(int dia) {\n\t\tSystem.out.println(\"Este es el alumno 1 y el día del examen es:\" + dia);\n\t}", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "public void update() {\n\t\tPreparedStatement stmt;\n\t\ttry {\n\t\t\tstmt = cn.prepareStatement(\n\t\t\t\t\t\"UPDATE Metal SET metalDissolvedBy = ?, molesOfAcidToDissolve = ? WHERE metalID = ?\");\n\t\t\tstmt.setInt(1, dissolvedBy);\n\t\t\tstmt.setDouble(2, molesOfAcidToDissolve);\n\t\t\tstmt.setInt(3, ID);\n\t\t\tstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tDatabaseException.detectError(e);\n\t\t}\n\t}", "private void edit() {\n\n\t}", "@Override\n\tpublic void update(Unidade obj) {\n\n\t}", "public void update() {}", "public void AktualizacjaPlanszy() {\n\t\tSystem.out.println(\"AktualizacjaPlanszy\");\n\t\tPlansza.setTowarNaPlanszy(new Towar(GeneratorRandom.RandomOd1(Plansza.getXplanszy()), GeneratorRandom.RandomOd1(Plansza.getYplanszy())));\n\t\tPlansza.setTowarNaPlanszy(new Towar(GeneratorRandom.RandomOd1(Plansza.getXplanszy()), GeneratorRandom.RandomOd1(Plansza.getYplanszy())));\n\t\t\n\t\tPlansza.setNiebezpieczenstwoNaPlanszy(new GenerujNiebezpieczenstwo(GeneratorRandom.RandomOd1(Plansza.getXplanszy()), GeneratorRandom.RandomOd1(Plansza.getYplanszy())));\n\t}", "public boolean updVeh() {\n\t\ttry\n\t\t{\n\t\t\n\t\t\tString filename=\"src/FilesTXT/vehicule.txt\";\n\t\t\tFileInputStream is = new FileInputStream(filename);\n\t\t InputStreamReader isr = new InputStreamReader(is);\n\t\t BufferedReader buffer = new BufferedReader(isr);\n\t\t \n\t\t String line = buffer.readLine();\n\t \tString[] split;\n\t \tString Contenu=\"\";\n\n\t\t while(line != null){\n\t\t \tsplit = line.split(\" \");\n\t\t\t if(this.getId_vehi()==Integer.parseInt(split[0])) {\n\t\t\t \tContenu+=this.getId_vehi()+\" \"+this.getDate_achat()+\" \"+this.getNb_places()+\" \"+this.getStatut()+\" \"+this.getPrix()+\" \"+this.getImage()+\" \"+this.getCouleur()+\" \"+this.getModele()+\" \"+this.getMarque()+\" \"+this.getDate_fabrication()+\"\\n\";\n\t\t\t \tSystem.out.println(this.getId_vehi()+\" \"+this.getId_vehi()+\" \"+this.getDate_fabrication());\n\t\t\t }else {\n\t\t\t \t Contenu+=line+\"\\n\";\n\t\t\t }\n\t\t \tline = buffer.readLine();\n\t\t }\n\t\t \n\t\t buffer.close();\n\t\t \n\t\t filename=\"src/FilesTXT/vehicule.txt\";\n\t\t\t FileWriter fw = new FileWriter(filename);\n\t\t\t fw.write(Contenu);\n\t\t\t fw.close();\n\t\t \n\t\t return true;\n\t\t}\n\t\tcatch(IOException ioe)\n\t\t{\n\t\t System.err.println(\"IOException: \"+ ioe.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "protected static void update() {\n\t\tstepsTable.update();\n\t\tactive.update();\n\t\tmeals.update();\n\t\t\n\t}", "@Override\r\n\tpublic void update(TrDetailPenjualan trDetailPenjualan) {\n\t\tString query = \"update TR_DETAIL_PENJUALAN set QTY=?, SUBTOTAL=?, DISKON=?, HARGA_SATUAN=?, KODE_BARANG=?, NO_NOTA=? where kode_detail=?\";\r\n\t\tConnection con = null;\r\n\t\tPreparedStatement ps = null;\r\n\t\ttry {\r\n\t\t\tcon = dataSource.getConnection();\r\n\t\t\tps = con.prepareStatement(query);\r\n\t\t\tps.setString(1, trDetailPenjualan.getKodeDetail());\r\n\t\t\tps.setInt(2, trDetailPenjualan.getQty());\r\n\t\t\tps.setInt(3, trDetailPenjualan.getSubtotal());\r\n\t\t\tps.setInt(4, trDetailPenjualan.getDiskon());\r\n\t\t\tps.setInt(5, trDetailPenjualan.getHargaSatuan());\r\n\t\t\tps.setString(6, trDetailPenjualan.getKodeBarang().getKodeBarang());\r\n\t\t\tps.setString(7, trDetailPenjualan.getNoNota().getNoNota());\r\n\r\n\t\t\tint out = ps.executeUpdate();\r\n\t\t\tif (out != 0) {\r\n\t\t\t\tSystem.out.println(\"update sukses\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"update gagal\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tps.close();\r\n\t\t\t\tcon.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void edit() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null)) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.update(Integer.parseInt(idField.getText().toString().trim()),nama_pasien2,nama_dokter2, tgl_pengobatanField.getText().toString().trim(),waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "@Override\n\tpublic void posModify() {\n\t\tgetEntityManager().refresh(instance);\n\t\tcambiarTipoCuenta(instance);\n\t\tgetEntityManager().flush();\n\t\tgetEntityManager().refresh(instance);\n\t\tresultList = null;\n\t\trootNode = null;\n\t}", "@Override\n public int update(J34SiscomexOrigemDi j34SiscomexOrigemDi) {\n return super.doUpdate(j34SiscomexOrigemDi);\n }", "@Override\n\tpublic void update(Empleado e) {\n\t\tSystem.out.println(\"Actualiza el empleado \" + e + \" en la BBDD.\");\n\t}", "public void salir() {\n if (bandera == 1) {\n altoTabla = \"310\";\n formulaProceso = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaProceso\");\n formulaProceso.setFilterStyle(\"display: none; visibility: hidden;\");\n\n formulaPeriodicidad = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaPeriodicidad\");\n formulaPeriodicidad.setFilterStyle(\"display: none; visibility: hidden;\");\n\n RequestContext.getCurrentInstance().update(\"form:datosFormulaProceso\");\n bandera = 0;\n filtrarListFormulasProcesos = null;\n tipoLista = 0;\n }\n listFormulasProcesosBorrar.clear();\n listFormulasProcesosCrear.clear();\n listFormulasProcesosModificar.clear();\n index = -1;\n secRegistro = null;\n k = 0;\n listFormulasProcesos = null;\n guardado = true;\n RequestContext.getCurrentInstance().update(\"form:ACEPTAR\");\n formulaActual = null;\n lovProcesos = null;\n }", "private void prosesUpdate() {\n final String name = tvName.getText().toString();\r\n\r\n //get dari tabel/collection user\r\n Constants.refAcademicCal.addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n //mengambil data email\r\n AcademicModel emails = dataSnapshot.getValue(AcademicModel.class);\r\n\r\n Constants.refAcademicCal.child(\"name\").setValue(name);\r\n if (isPicChange)\r\n Constants.refAcademicCal.child(\"imgUrl\").setValue(photoUrl.toString());\r\n\r\n Toast.makeText(AcademicCal.this, \"Update berhasil!\", Toast.LENGTH_SHORT).show();\r\n finish();\r\n\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError error) {\r\n // Failed to read value\r\n Log.w(\"\", \"Failed to read value.\", error.toException());\r\n //showProgress(false);\r\n }\r\n });\r\n }", "private void updateEISAndEAS(){\n eas.registerPayment(paymentDTO);\n eis.updateInventory(saleDTO);\n }", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\n public int update(J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi) {\n return super.doUpdate(j34SiscomexMercadoriaAdi);\n }", "public void update(Emp p){\n\t\n\t\tString sql=\"UPDATE emp99 set name=?, salary=?, designation=? WHERE id=\"+p.getId();\n\t\t\n\t\ttemplate.update(sql, p.getName(),p.getSalary(),p.getDesignation());\n\t\t\n\t\t/*return template.execute(sql, new PreparedStatementCallback<Boolean>() {\n\n\t\t\t@Override\n\t\t\tpublic Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {\n\t\t\t\t\n\t\t\t\tps.setString(1, p.getName());\n\t\t\t\tps.setFloat(2, p.getSalary());\n\t\t\t\tps.setString(3, p.getDesignation());\n\t\t\t\tps.setInt(4, p.getId());\n\t\t\t\t\n\t\t\t\treturn ps.execute();\n\t\t\t}\n\t\t});*/\n\t\t\n\t}", "public String update() throws Exception {\r\n\t\tlog.info(\"updateGeneral()\");\r\n\t\tlog.info(\" id cliente \" + objClienteSie.getIdcliente() + \" nombre \"\t+ objClienteSie.getNombrecliente());\r\n\r\n\t\tsetTipoDocumento(objClienteSie.getTbTipoDocumentoIdentidad().getIdtipodocumentoidentidad());\r\n\t\tlog.info(\"TIPO DE DOCUMENTO-DNI=1 -->\"+ objClienteSie.getTbTipoDocumentoIdentidad().getIdtipodocumentoidentidad());\r\n\r\n\t\t/*******DOMICILIO ES PARA EDITAR PARECE***********************/\r\n\t\tlog.info(\"buscar al momento que se hace editar -->\");\r\n\t\tobjDomicilio = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\" --Id-- \" + objDomicilio.getIddomiciliopersona()+ \" --IdCLIENTE-- \" + objDomicilio.getIdcliente()+ \" --Ubicacion-- \"+ objDomicilio.getUbicacion() );\r\n\t\t\r\n\t\t/**********NUEVO DOMICILIO********************************/\r\n\t\tlog.info(\"Antes de llegar al objDomicilioNew---> \");\r\n\t\tobjDomicilioNew = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\"despues de llegar al objDomicilioNew\"+ objDomicilioNew.getIdcliente());\r\n\t \r\n /*seteo domicilio*/\r\n\tif(objDomicilio!=null){\r\n\t\tif (objDomicilio.getTbUbigeo()!=null) {\r\n\t\tlog.info(\"Dentro del IF\");\t\r\n setIdDepartamento(objDomicilio.getTbUbigeo().getCoddepartamento());\r\n log.info(\"setIdDepartamento---> \"+ objDomicilio.getTbUbigeo().getCoddepartamento());\r\n comboManager.setIdDepartamento(idDepartamento);\r\n setIdProvincia(objDomicilio.getTbUbigeo().getCodprovincia());\r\n comboManager.setIdProvincia(idProvincia);\r\n setIdUbigeo1(objDomicilio.getTbUbigeo().getIdubigeo().toString());\r\n setIdDistrito(objDomicilio.getTbUbigeo().getCoddistrito());\t \r\n setTipo(objDomicilio.getTbTipoCasa().getIdtipocasa());\r\n log.info(\" tipo casa \"+objDomicilio.getTbTipoCasa().getIdtipocasa());\t \r\n objDomicilio.setTbEstadoGeneral(objDomicilio.getTbEstadoGeneral());\t \r\n\t\t}\r\n\telse{\r\n\t\tlog.info(\"Dentro del Else\");\r\n\t\t objDomicilio.setUbicacion(objDomicilio.getUbicacion());\r\n\t log.info(\"--UBICACION--\"+ objDomicilio.getUbicacion());\r\n\t setTipo(objDomicilio.getTbTipoCasa().getIdtipocasa());\r\n\t log.info(\" tipo casa \"+objDomicilio.getTbTipoCasa().getIdtipocasa());\t\t\t \t\t\t \r\n\t objDomicilio.setTbEstadoGeneral(objDomicilio.getTbEstadoGeneral());\r\n\t\t}\r\n \t} \r\n /*****************TELEFONO************************/\r\n \r\n\t\tTelefonoPersonaSie t = objTelefonoService.buscarTelefonoXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\" id \" + t.getIdtelefonopersona()+ \" numero Telefonico \" + t.getTelefono() );\r\n\t\t /***seteo teléfono***/\r\n TelefonoPersonaList = objTelefonoService.listarTelefonoEmpleadosXidcliente(objClienteSie.getIdcliente()); \r\n\tfor (int i = 0; i < TelefonoPersonaList.size(); i++) {\r\n \tTelefonoPersonaList.get(i).setItem(\"Agregado\");\r\n }\r\n\t\r\n\t\t/*******************NUEVO DOMICILIO***************************/\r\n\t\tDomicilioPersonaSie d = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\"ID-DOMICILIO--> \"+ d.getIddomiciliopersona()+ \" DOMICILIO---> \" + d.getDomicilio());\r\n\t\t/*****Lista Domicilio***/\r\n\t\tDomicilioPersonaList = objDomicilioService.listarDomicilioCliente(objClienteSie.getIdcliente());\r\n\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\tDomicilioPersonaList.get(i).setItem(\"Agregado\");\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsetNewRecord(false);\r\n\t\treturn getViewMant();\r\n\t\t}", "public void update() {\n\t\trl = DBManager.getReservationList();\n\t}", "public void update() ;", "public void update()\n\t{\n\t\tsuper.update();\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\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }", "@Override\n\tpublic void posSave() {\n\t\tfor(ItemRequisicionEta tmpItm : itemsAgregados) {\n\t\t\ttmpItm.setReqEtapa(instance);\n\t\t\tgetEntityManager().persist(tmpItm);\n\t\t}\n\t\tgetEntityManager().refresh(etapaRepCliHome.getInstance());\n\t}", "public void update(){\n\t\tif ( crm.addedNewStudent()){\n\t\t\tList<Student> students = crm.getStudents();\n\t\t\tStudent newest = students.get(students.size()-1);\n\t\t\tint ID = newest.ID();\n\t\t\tString name = newest.name();\n\t\t\tint GradYear = newest.GradYear();\n\t\t\tsv.addStudent(ID, name, GradYear);\n\t\t}\n\t}" ]
[ "0.6451087", "0.6321237", "0.6234529", "0.6218089", "0.616386", "0.61597854", "0.61573935", "0.6120263", "0.61121833", "0.61121833", "0.6095411", "0.60915774", "0.6070571", "0.60692155", "0.60587394", "0.6050888", "0.6014831", "0.5955789", "0.5900262", "0.58939517", "0.5888984", "0.5882258", "0.5854053", "0.5850057", "0.58255255", "0.5824683", "0.5822929", "0.5821352", "0.58213365", "0.5817469", "0.5809801", "0.58062655", "0.58012486", "0.57936925", "0.57929987", "0.57860273", "0.57858056", "0.57813746", "0.57800466", "0.57775474", "0.5772719", "0.5767512", "0.57642335", "0.5761504", "0.57516664", "0.57516664", "0.57516664", "0.57516664", "0.5740226", "0.5727335", "0.5727262", "0.57176536", "0.5714724", "0.5714724", "0.5714724", "0.5714102", "0.57138616", "0.5712074", "0.5711649", "0.57103145", "0.5707615", "0.5707615", "0.5704966", "0.56993616", "0.5698427", "0.56960875", "0.56949717", "0.5692007", "0.5691103", "0.56900036", "0.56868094", "0.5685118", "0.56720054", "0.56707084", "0.56677234", "0.5657786", "0.56532377", "0.5652476", "0.56498146", "0.5649779", "0.56459475", "0.5643999", "0.5641105", "0.5640754", "0.5639286", "0.5639286", "0.5639286", "0.5639286", "0.5639286", "0.56379324", "0.56321275", "0.56294364", "0.56249136", "0.56033504", "0.56003046", "0.5598378", "0.5595264", "0.5595024", "0.55938226", "0.55932826" ]
0.7083364
0
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }" ]
[ "0.78843355", "0.7548756", "0.7496465" ]
0.0
-1
impl.addContainer("dummy.dev", "dummyHR", ContainerType.DEVICE, ContainerFunction.None, 0);
@Test public void testGetDevContainer() { HashMap<String, Object> deviceSpec = new HashMap<String, Object>(); deviceSpec.put("smgdevicetype", SIDeviceType.Accelerometer); impl.addDevContainer(new DeviceContainer(new DeviceId("dev", "dummy"), "foo",deviceSpec)); DeviceContainer container = impl.getDeviceContainer(new DeviceId("dev", "dummy")); assertEquals(container.getContainerId(), "dummy.dev"); assertEquals(container.getContainerFunction(), ContainerFunction.NONE); assertEquals(container.isVirtualContainer(), false); assertEquals(container.getContainerType(), ContainerType.DEVICE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Container createContainer();", "private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }", "private DisplayDevice(){\t\t\r\n\t\t\r\n\t}", "@Override\r\n public void onDeviceDescription(GenericDevice dev, PDeviceHolder devh,\r\n String desc) {\n\r\n }", "public interface OsSystemCycle extends EcucContainer {\n}", "public interface IUHFService {\n\n public static final int REGION_CHINA_840_845 = 0;\n public static final int REGION_CHINA_920_925 = 1;\n public static final int REGION_CHINA_902_928 = 2;\n public static final int REGION_EURO_865_868 = 3;\n public static final int RESERVED_A = 0;\n public static final int EPC_A = 1;\n public static final int TID_A = 2;\n public static final int USER_A = 3;\n public static final int FAST_MODE = 0;\n public static final int SMART_MODE = 1;\n public static final int LOW_POWER_MODE = 2;\n public static final int USER_MODE = 3;\n public static final String SERIALPORT = \"/dev/ttyMT2\";\n public static final String POWERCTL = \"/sys/class/misc/mtgpio/pin\";\n\n\n //默认参数初始化模块\n public int OpenDev();\n\n //释放模块\n public void CloseDev();\n\n //开始盘点\n public void inventory_start();\n\n // Handler用于处理返回的盘点数据\n public void inventory_start(Handler hd);\n\n public void setListener(Listener listener);\n\n public interface Listener {\n void update(Tag_Data var1);\n }\n //新盘点方法,Listener回调\n public void newInventoryStart();\n\n public void newInventoryStop();\n\n\n //设置密码\n public int set_Password(int which, String cur_pass, String new_pass);\n //停止盘点\n public int inventory_stop();\n\n /**\n * 从标签 area 区的 addr 位置(以 word 计算)读取 count 个值(以 byte 计算)\n * passwd 是访问密码,如果区域没被锁就给 0 值。\n *\n * @param area\n * @param addr\n * @param count\n * @param passwd\n * @return\n */\n public byte[] read_area(int area, int addr, int count, String passwd);\n public String read_area(int area, String str_addr\n , String str_count, String str_passwd);\n\n\n //把 content 中的数据写到标签 area 区中 addr(以 word 计算)开始的位 置。\n public int write_area(int area, int addr, String passwd, byte[] content);\n public int write_area(int area, String addr, String pwd, String count, String content);\n\n\n //选中要进行操作的 epc 标签\n public int select_card(int bank,byte[] epc,boolean mFlag);\n public int select_card(int bank,String epc,boolean mFlag);\n\n\n //设置天线功率\n public int set_antenna_power(int power);\n\n //读取当前天线功率值\n public int get_antenna_power();\n\n //设置频率区域\n public int set_freq_region(int region);\n\n public int get_freq_region();\n\n //设置盘点的handler\n public void reg_handler(Handler hd);\n\n\n public INV_TIME get_inventory_time();\n public int set_inventory_time(int work_t, int rest_t);\n public int MakeSetValid();\n public int setlock(int type, int area, int passwd);\n public int get_inventory_mode();\n public int set_inventory_mode(int m);\n //拿到最近一次详细内部错误信息\n public String GetLastDetailError();\n\n public int SetInvMode(int invm, int addr, int length);\n public int GetInvMode(int type);\n}", "@Override\r\n\t\t\tpublic void componentAdded(ContainerEvent arg0){}", "Device createDevice();", "public void containerInitializer(Container container)\n\t{\n\t\tcontainer.addContainerProperty(\"Description\", String.class, null);\n\t\tcontainer.addContainerProperty(\"Start Date\", Date.class, null);\n\t\tcontainer.addContainerProperty(\"End Date\", Date.class, null); \n\t\tcontainer.addContainerProperty(\"Deadline\", Date.class, null);\n\t\tcontainer.addContainerProperty(\"Active\", Image.class, null);\n\t\tcontainer.addContainerProperty(\"Type\",String.class, null);\n\t\tcontainer.addContainerProperty(\"View\", \tButton.class, null);\n\t\tcontainer.addContainerProperty(\"Edit\",Button.class, null);\n\t\tcontainer.addContainerProperty(\"Delete\",Button.class, null);\n\t}", "@Test\n void emptyingTest(){\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n container.takeResource();\n assertTrue(container.isEmpty());\n }", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n\n }", "@Test\n void fillContainerTest() {\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n assertEquals(Resource.SHIELD,container.takeResource());\n }", "AudioDeviceInventory() {\n mDeviceBroker = null;\n }", "@SubscribeEvent\n public static void registerContainer(final RegistryEvent.Register<ContainerType<?>> event){\n walletBlockContainerType = IForgeContainerType.create(WalletBlockContainer::createForClientSide);\n walletBlockContainerType.setRegistryName(\"wallet_block_container\");\n event.getRegistry().register(walletBlockContainerType);\n }", "public Container newContainer();", "public void initDevice() {\r\n\t\t\r\n\t}", "private void initHardware(){\n }", "@Override\npublic void add(VirtualContainer parent, VirtualComponent comp, int pos) {\n\t\n}", "TestContainer createTestContainer();", "private Composite createDeviceControls(final Device device) {\n\t\tif (device == null || device.getDeviceType() == null) {\n\t\t\treturn top;\n\t\t}\n\n\t\ttop.setLayout(new GridLayout());\n\n\t\tComposite mainPartControl = new DevicePanelDecorator(device).getPanel(\n\t\t\t\ttop, SWT.NONE, device);\n\t\tif (mainPartControl == null) {\n\t\t\tmainPartControl = new Composite(top, SWT.NONE);\n\t\t\tViewUtils.createLabelPane(mainPartControl, \"No control defined\");\n\t\t} else {\n\t\t\tfinal GridData centering = new GridData(SWT.FILL, SWT.FILL, true,\n\t\t\t\t\ttrue);\n\t\t\tmainPartControl.setLayoutData(centering);\n\n\t\t\t((DeviceUI) mainPartControl).updateControls(device);\n\t\t\tmainPartControl.getShell().layout(false, true);\n\t\t\t((DeviceUI) mainPartControl).finishLayout();\n\t\t}\n\n\t\treturn mainPartControl;\n\t}", "public MPInjectionVolume(){\n\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "public void onModuleLoad() {\n RootPanel.get(\"mock-simple-container\").add(new RpcSampleView());\n }", "T createContainer();", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n }", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n }", "protected abstract CONTAINER_TYPE createScreenContainer();", "public void hidDeviceAttached(HidServicesEvent event);", "private void addContainer(String containerName, String baseImage){\n // Call python new_lab_script: new_lab_setup.py -b basename\n //String cmd = \"./addContainer.sh \"+labsPath+\" \"+labName+\" \"+containerName+\" \"+baseImage;\n String cmd = \"new_lab_setup.py -a \"+containerName+\" -b \"+baseImage;\n doLabCommand(cmd);\n }", "void addPC(PCDevice pc);", "@Override\npublic void setParentContainer(VirtualContainer c) {\n\t\n}", "public DevHUD() {\n \t// Set the HUD font.\n \tFreeTypeFontParameter parameter = new FreeTypeFontParameter();\n \tparameter.size = C.FONT_SIZE_XSMALL;\n \tfont = FontPack.getFontPack().getFont(FontType.MAIN_FONT, parameter);\n \tfont.setColor(Color.WHITE);\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n bt1 = new JButton(\"Hola\");\n }", "private HardwareDeviceRental(){\r\n\r\n this.initializeComponent();\r\n hardwares= new ArrayList<HardwareDevice>();\r\n\r\n }", "private void addDevice(DeviceDescription description) {\t\t\r\n\t\tif (description == null) return;\r\n\t\tSystemID systemID = description.getSystemID();\r\n\t\tDeviceFigure applicationDevice = (DeviceFigure)applicationElements.get(systemID);\r\n\t\tif (applicationDevice == null) {\r\n\t\t\tapplicationDevice = new DeviceFigure(description);\r\n\t\t\tapplicationElements.put(systemID, applicationDevice);\r\n\t\t\tapplicationGraph.addEntry(applicationDevice);\r\n\t\t} else {\r\n\t\t\tapplicationDevice.setAvailable(true);\r\n\t\t}\r\n\t\tDeviceFigure assemblerDevice = (DeviceFigure)assemblerElements.get(systemID);\r\n\t\tif (assemblerDevice == null) {\r\n\t\t\tassemblerDevice = new DeviceFigure(description);\r\n\t\t\tassemblerElements.put(systemID, assemblerDevice);\r\n\t\t\tassemblerGraph.addEntry(assemblerDevice);\r\n\t\t}\r\n\t\tzoom();\r\n\t}", "public RobotContainer()\n {\n SmartDashboard.putData(new InstantCommand(\n () -> flywheelSubsystem.hoodEncoder.setPosition(0)\n ));\n // Configure the button bindings\n configureButtonBindings();\n }", "@Override\n\tprotected String getServerAdapter() {\n\t\treturn \"Container Development Environment 3.2\";\n\t}", "public device() {\n\t\tsuper();\n\t}", "public RobotContainer() {\n\nleftJoystick = new Joystick(0);\nrightJoystick = new Joystick(1);\n\ndriveBase = new DriveBase();\ndriveWithJoystick = new DriveWithJoystick();\nCommandScheduler.getInstance().setDefaultCommand(driveBase, driveWithJoystick);\n\n\n // Configure the button bindings\n configureButtonBindings();\n }", "@Test\n void refillingContainerTest(){\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n container.takeResource();\n container.fillContainer(Resource.COIN);\n assertEquals(Resource.COIN,container.takeResource());\n }", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n configureDefaultCommands();\n }", "@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunchShowsInProcessContainer() throws Throwable {\n\t}", "@Override\r\n\tpublic void addStorageUnit() {\r\n\t}", "public Devices() {\n initComponents();\n }", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public RobotContainer() {\n m_pathChooser = new SendableChooser<String>();\n m_pathChooser.addOption(\"Drive 10\", \"drive_ten_\");\n // Setup the Shuffleboard Tab for testing\n m_ProfileTab = Shuffleboard.getTab(\"ProfileTest\");\n\n \n \n // Set the default commands for the subsystems\n m_drive_train.setDefaultCommand(new DefaultDriveTrainCommand(m_drive_train, m_driver_controller));\n\n // Configure the button bindings\n // NOTE -- This should not be called until all the subsystems have been instantiated and the \n // default commands for them have been set.\n configureButtonBindings();\n\n // Setup Shuffleboard layouts\n setupShuffleboardComponents();\n }", "public void showControl(Composite parent) {\r\n\t\t// create the parent's content\r\n\t\tsuper.showControl(parent);\r\n\t\t// add myself as listener to the application\r\n\t\tapplication.addApplicationListener(Event.EVENT_EVERYTHING, this);\r\n\t\tsynchronized (registry) {\r\n\t\t\tregistry.addDeviceListener(Event.EVENT_EVERYTHING, this);\r\n\t\t\tSystemID[] ids = registry.getDevices();\r\n\t\t\tfor (int i = 0; i < ids.length; i++) {\r\n\t\t\t\taddDevice(registry.getDeviceDescription(ids[i]));\r\n\t\t\t}\r\n\t\t}\r\n\t\tassemblerGraph.updateGraph();\r\n\t\tapplicationGraph.updateGraph();\r\n\t\tupdate();\r\n\t}", "public HwPeripheralFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "private void createContent(final Container container) {\n this.mainPanel = new MainPanel();\n this.mainPanel.setName(\"mainPanel\"); // Fest\n\n if (container != null) {\n // adds the main panel\n container.add(this.mainPanel, BorderLayout.CENTER);\n\n // Handle status bar\n container.add(StatusBar.getInstance(), BorderLayout.SOUTH);\n }\n }", "ViewContainer createViewContainer();", "private void setupPhisicalDevice() {\n try (MemoryStack memstack = MemoryStack.stackPush();) {\n IntBuffer buffer = buffer = memstack.mallocInt(1);\n\n\n long result = vkEnumeratePhysicalDevices(instance, buffer, null);\n int count = buffer.get();\n if (count == 0) {\n throw new RuntimeException(\"No physical support for vulcan available!\");\n }\n\n System.out.println(count);\n buffer = memstack.mallocInt(1);\n buffer.put(buffer.position(), 1);\n PointerBuffer deviceBuffer = memstack.mallocPointer(1);\n vkEnumeratePhysicalDevices(instance, buffer, deviceBuffer);\n //TODO: select the best one\n physicalDevice = new VkPhysicalDevice(deviceBuffer.get(), instance);\n }\n }", "static void init() {\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(ROCKET_CRATE_CONTAINER,\n\t\t\t\t(syncId, id, player, buf) -> new RocketCrateScreenHandler(syncId, buf.readInt(), player.inventory));\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(LAUNCH_PAD_CONTAINER,\n\t\t\t\t(syncId, id, player, buf) -> new LaunchPadScreenHandler(syncId, buf.readBlockPos(), player.inventory));\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(CONTRACT_MACHINE,\n\t\t\t\t(syncId, id, player, buf) -> new ContractMachineScreenHandler(syncId, buf.readBlockPos(), player.inventory));\n\t}", "public PortletContainer() {\n }", "private DeviceManager() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }", "public AzureStorageContainer() {\n }", "public void registerDisplayPanel(Displayable d);", "public interface ElectronicsDevice {\n}", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n setDefaultCommands();\n }", "ActorRef startHCD() {\n Component.HcdInfo testInfo = JComponent.hcdInfo(\n TromboneHCD.componentName,\n TromboneHCD.trombonePrefix,\n TromboneHCD.componentClassName,\n DoNotRegister, Collections.singleton(AkkaType), FiniteDuration.apply(1, TimeUnit.SECONDS)\n );\n\n return Supervisor.apply(testInfo);\n }", "@Override\r\n\tpublic void createPageControls(Composite pageContainer) {\n\t\tsuper.createPageControls(pageContainer);\r\n\t\tthis.getShell().setImage(IImageKey.getImage(IImageKey.KEY_WIZADSMALL));\r\n\t}", "public interface IToolbarsContainer {\n\t\n\t/**\n\t * Hide the tool bars of this item.\n\t */\n\tvoid hideToolbars();\n\n}", "public KodularChameleonAd(com.google.appinventor.components.runtime.ComponentContainer r8) {\n /*\n r7 = this;\n r0 = r7\n r1 = r8\n r2 = r0\n r3 = r1\n com.google.appinventor.components.runtime.Form r3 = r3.$form()\n r2.<init>(r3)\n r2 = r0\n r3 = r1\n com.google.appinventor.components.runtime.Form r3 = r3.$form()\n r2.form = r3\n r2 = r0\n r3 = r1\n android.app.Activity r3 = r3.$context()\n r2.activity = r3\n r2 = r0\n com.kodular.chameleon.ChameleonAds r3 = new com.kodular.chameleon.ChameleonAds\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n android.app.Activity r5 = r5.activity\n android.support.v7.app.AppCompatActivity r5 = (android.support.p003v7.app.AppCompatActivity) r5\n r4.<init>(r5)\n r2.chameleonAds = r3\n r2 = r0\n com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds\n com.google.appinventor.components.runtime.KodularChameleonAd$1 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$1\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n r4.<init>(r5)\n r2.setOnAdLoadedListener(r3)\n r2 = r0\n com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds\n com.google.appinventor.components.runtime.KodularChameleonAd$2 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$2\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n r4.<init>(r5)\n r2.setOnAdFailedToLoadListener(r3)\n r2 = r0\n com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds\n com.google.appinventor.components.runtime.KodularChameleonAd$3 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$3\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n r4.<init>(r5)\n r2.setOnAdFailedToShowListener(r3)\n r2 = r0\n com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds\n com.google.appinventor.components.runtime.KodularChameleonAd$4 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$4\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n r4.<init>(r5)\n r2.setOnAdClosed(r3)\n java.lang.String r2 = \"Kodular Chameleon Ad\"\n java.lang.String r3 = \"Kodular Chameleon Ad Created\"\n int r2 = android.util.Log.d(r2, r3)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.appinventor.components.runtime.KodularChameleonAd.<init>(com.google.appinventor.components.runtime.ComponentContainer):void\");\n }", "@Override\r\n\tpublic CardEventHandler createEventHandler() {\n\t return new ClientEventHandler(this,this.getUIControl());\r\n\t }", "void addSubDevice(PhysicalDevice subDevice, String id);", "public interface HidServicesListener extends EventListener {\n /**\n * A HID device was attached\n *\n * @param event The event\n */\n public void hidDeviceAttached(HidServicesEvent event);\n\n /**\n * A HID device was detached\n *\n * @param event The event\n */\n public void hidDeviceDetached(HidServicesEvent event);\n\n /**\n * A HID failure occurred during scanning\n *\n * @param event The event\n */\n public void hidFailure(HidServicesEvent event);\n\n}", "public void onRegistration(ObjectContainer container)\n {\n this.container = container; \n //com.gensym.g2export.denali.DenaliServiceImpl.getDenaliService(container.getApplicationEnvironment()).registerItem(this);\n onObjectRegistration(container);\n }", "@Override\n public String getDeviceName() {\n return null;\n }", "public Container getContainer();", "void onInsertHeldContainer(EntityPlayerMP player);", "@Override\r\n\tpublic void layoutContainer(Container arg0) {\n\t\t\r\n\t}", "public ScreenStatus(ComponentContainer container) {\n\t\tsuper(container);\n\t\t// TODO Auto-generated constructor stub\n\t\tform.registerForOnDestroy(this);\n\t\t \n\t\tmainUIThreadActivity = container.$context();\n\t\tLog.i(TAG, \"Before create probe\");\n\t\tgson = new GsonBuilder().registerTypeAdapterFactory(\n\t\t\t\tFunfManager.getProbeFactory(mainUIThreadActivity)).create();\n\t\tJsonObject config = new JsonObject();\n\n\t\tprobe = gson.fromJson(config, ScreenProbe.class);\n\n\t\tinterval = SCHEDULE_INTERVAL;\n\t\tduration = SCHEDULE_DURATION;\n\t\t\t\n\t}", "On_Device_Resource createOn_Device_Resource();", "@Override\npublic void remove(VirtualContainer parent, VirtualComponent component) {\n\t\n}", "public void preRegistration(InjectContainer injectContainer) {\n }", "@FXML\n public void addHospital() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingHospital(0, 0));\n }", "public RobotContainer() {\n drivetrain.setDefaultCommand(new DrivetrainDriveCommand(drivetrain, driver));\n\n // Configure the button bindings\n configureButtonBindings();\n }", "private void initcomponent() {\n\r\n\t}", "public void setContainer(RuntimeContainer container)\n {\n this.container = container;\n }", "public interface HeadTimerLayerPresenter extends BasePresenter {\n\n void loadHeadLayer();\n\n void removeHeadLayer();\n}", "@Override\npublic void removeFromParentUIContainer() {\n\t\n}", "@Override\n\tpublic void onStart(ITestContext arg0) {\n\t\t\n\t}" ]
[ "0.5683948", "0.55629635", "0.5537007", "0.55120045", "0.5487079", "0.544439", "0.5385322", "0.5372391", "0.5356961", "0.53323317", "0.5320148", "0.5296672", "0.5279149", "0.5249552", "0.524116", "0.52162594", "0.5208137", "0.5200983", "0.519967", "0.51912576", "0.5174126", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51688683", "0.51367724", "0.5135839", "0.51263005", "0.51263005", "0.51224893", "0.511757", "0.5112369", "0.5100656", "0.50963885", "0.5081173", "0.50726056", "0.506942", "0.5068729", "0.5052551", "0.50455785", "0.5041058", "0.5039482", "0.50381327", "0.503209", "0.5014172", "0.5007742", "0.4996916", "0.49948928", "0.49906972", "0.49830568", "0.49733752", "0.49730352", "0.49681112", "0.49623042", "0.4960848", "0.4956338", "0.49442872", "0.4943969", "0.49407053", "0.49358764", "0.4933196", "0.49293274", "0.49259055", "0.4919768", "0.4918165", "0.4913875", "0.49132085", "0.4907503", "0.49044064", "0.48973384", "0.489454", "0.4869429", "0.4866113", "0.48633954", "0.48615575", "0.48519686", "0.48508638", "0.48455986", "0.4844346", "0.48389316", "0.48372075", "0.48349574", "0.48339546", "0.48316336", "0.48236966", "0.4823342" ]
0.659571
0
Scans all classloaders for the current thread for loaded jars, and then scans each jar for the package name in question, listing all classes directly under the package name in question. Assumes directory structure in jar file and class package naming follow java conventions (i.e. com.example.test.MyTest would be in /com/example/test/MyTest.class)
public static Collection<Class> getClassesForPackage(String packageName) throws Exception { String packagePath = packageName.replace(".", "/"); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); Set<URL> jarUrls = new HashSet<URL>(); while (classLoader != null) { if (classLoader instanceof URLClassLoader) { for (URL url : ((URLClassLoader) classLoader).getURLs()) { if (url.getFile().endsWith(".jar")) // may want better way to detect jar files { jarUrls.add(url); } // if } // for } // if classLoader = classLoader.getParent(); } // while Set<Class> classes = new HashSet<Class>(); for (URL url : jarUrls) { JarInputStream stream = new JarInputStream(url.openStream()); // may want better way to open url connections JarEntry entry = stream.getNextJarEntry(); while (entry != null) { String name = entry.getName(); if (name.endsWith(".class") && name.substring(0, packagePath.length()).equals(packagePath)) { classes.add(Class.forName(name.substring(0, name.length() - 6).replace("/", "."))); } // if entry = stream.getNextJarEntry(); } // while stream.close(); } // for return classes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }", "private List<Class> getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "private void loadJarsFromClasspath() {\n\n loadedJarsMap.clear();\n\n ClassLoader classLoader = getClass().getClassLoader();\n URL[] urls = null;\n do {\n //check if the class loader is instance of URL and cast it\n if (classLoader instanceof URLClassLoader) {\n urls = ((URLClassLoader) classLoader).getURLs();\n } else {\n // if the ClassLoader is not instance of URLClassLoader we will break the cycle and log a message\n log.info(\"ClassLoader \" + classLoader\n + \" is not instance of URLClassLoader, so it will skip it.\");\n\n // if the ClassLoader is from JBoss, it is instance of BaseClassLoader,\n // we can take the ClassPath from a public method -> listResourceCache(), from JBoss-classloader.jar\n // this ClassLoader is empty, we will get the parent\n classLoader = classLoader.getParent();\n continue;\n }\n try {\n loadJarsFromManifestFile(classLoader);\n } catch (IOException ioe) {\n log.warn(\"MANIFEST.MF is loaded, so we will not search for duplicated jars!\");\n }\n\n // add all jars from ClassPath to the map\n for (int i = 0; i < urls.length; i++) {\n addJarToMap(urls[i].getFile());\n }\n\n // get the parent classLoader\n classLoader = classLoader.getParent();\n } while (classLoader != null);\n\n if (loadedJarsMap.isEmpty()) {\n // jars are not found, so probably no URL ClassLoaders are found\n throw new RuntimeException(\"Most probrably specific server is used without URLClassLoader instances!\");\n }\n }", "@Test\n @Disabled(\"Not work in Java >=9\")\n void printAllClassJars() {\n var sysClassLoader = org.apache.commons.io.FileUtils.class.getClassLoader();\n var urLs = ((URLClassLoader) sysClassLoader).getURLs();\n for (var url : urLs) {\n System.out.println(url.getFile());\n }\n }", "public static List<Class<?>> getClasses(String packageName) throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class<?>> classes = new ArrayList<Class<?>>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "private void scanClass(String scanPackage) {\n URL url = this.getClass().getClassLoader().getResource(\"/\" + scanPackage.replaceAll(\"\\\\.\", \"/\"));\n File dir = new File(url.getFile());\n for (File file : dir.listFiles()) {\n if (file.isDirectory()) {\n scanClass(scanPackage + \".\" + file.getName());\n } else {\n classNames.add(scanPackage + \".\" + file.getName().replaceAll(\".class\", \"\").trim());\n }\n }\n\n }", "private static Class[] getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes.toArray(new Class[classes.size()]);\n }", "public Stream<Class<?>> getClasses(@NotNull String packageName) {\n return CheckedFunction2.of(ClassLoader::getResources).unchecked()\n .reversed()\n .apply(packageName.replace('.', '/'))\n .andThen(Enumeration::asIterator)\n .andThen(urlIterator -> spliteratorUnknownSize(urlIterator, ORDERED))\n .andThen(urlSpliterator -> stream(urlSpliterator, false))\n .compose(Thread::getContextClassLoader)\n .apply(Thread.currentThread())\n .map(URL::getFile)\n .map(File::new)\n .flatMap(directory -> findClasses(directory, packageName));\n }", "@SuppressWarnings(\"unchecked\")\n public void loadClasses(String pckgname) throws ClassNotFoundException {\n File directory = null;\n try {\n ClassLoader cld = Thread.currentThread().getContextClassLoader();\n String path = \"/\" + pckgname.replace(\".\", \"/\");\n URL resource = cld.getResource(path);\n if (resource == null) {\n throw new ClassNotFoundException(\"sem classes no package \" + path);\n }\n directory = new File(resource.getFile());\n }\n catch (NullPointerException x) {\n throw new ClassNotFoundException(pckgname + \" (\" + directory + \") package invalido\");\n }\n if (directory.exists()) {\n String[] files = directory.list();\n for (int i = 0; i < files.length; i++) {\n if (files[i].endsWith(\".class\") && !files[i].contains(\"$\")) {\n Class cl = Class.forName(pckgname + '.' + files[i].substring(0, files[i].length() - 6));\n Method methods[] = cl.getDeclaredMethods();\n boolean ok = false;\n for (Method m : methods) {\n if ((m.getReturnType().equals(List.class) || m.getReturnType().isArray()) && m.getParameterTypes().length == 0) {\n ok = true;\n break;\n }\n }\n if (ok) {\n classes.add(cl);\n }\n }\n }\n }\n else {\n throw new ClassNotFoundException(pckgname + \" package invalido\");\n }\n }", "private static URL[] findJARs() {\n\tFilenameFilter filter = new FilenameFilter() {\n\t\tpublic boolean accept(File dir, String name) {\n\t\t\tString lcname = name.toLowerCase();\n//System.out.println(lcname+\" => \"+(lcname.endsWith(\".jar\") && !lcname.startsWith(\"multivalent\")));\n\t\t\treturn lcname.endsWith(\".jar\") && !lcname.startsWith(\"multivalent\")/*no snapshots*/ && new File(dir, name).canRead();\n\t\t}\n\t};\n\n\t// look for JARs in same directory (or, during development, in c:/temp)\n//\tFile dir;\n\tString jar = URIs.decode/*in case space in path*/(Multivalent.class.getResource(\"Multivalent.class\").toString());\n//System.out.println(\"Bootstrap res = \"+jar);\n\tString top;\n\tif (jar.startsWith(\"jar:\")) { // deployment: e.g., \"jar:file:/C:/temp/Multivalent20011127.jar!/multivalent/Multivalent.class\"\n\t\tjar = jar.substring(\"jar:file:\".length(), jar.indexOf('!'));\n\t\ttop = jar.substring(0, jar.lastIndexOf('/')+1);\n\t//} else if (new File(\"/c:/temp\").exists()) { // my development => CLASSPATH\n\t//\ttop = \"/c:/temp\";\n\t\t// CLASSPATH is selfsame JAR -- ignore as ClassLoader gets anyhow\n\n\t} else { // others' development: e.g., \"file:/D:/prj/Multivalent/www/jar/multivalent/Multivalent.class\"\n\t\tint inx = jar.lastIndexOf('/'); // chop \"Multivalent.class\"\n\t\tinx = jar.lastIndexOf('/', inx-1); // chop \"multivalent\"\n\n\t\tjar = jar.substring(\"file:\".length(), inx+1);\n//System.out.println(\"jar = \"+jar);\n\t\ttop = jar;\n\t}\n\n\n\tList urls = new ArrayList(20);\n\n\tif (standalone_) System.out.println(\"Searching for JARs in \"+top);\n\ttry {\n\t\tFile[] f = new File(top).listFiles(filter);\n\t\tfor (int i=0,imax=f.length; i<imax; i++) {\n\t\t\turls.add(f[i].toURI().toURL());\n\t\t\tif (standalone_) System.out.println(\"\\t\"+f[i]);\n\t\t}\n\t} catch (MalformedURLException canthappen) { System.err.println(canthappen/*f[i]*/); System.err.println(\"Move to different directory\"); }\n\n\treturn (URL[])urls.toArray(new URL[0]);\n }", "public static List<Class<?>> getClasses(String packageName) throws ClassNotFoundException, IOException {\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace('.', '/');\n\t\tEnumeration<URL> resources = classLoader.getResources(path);\n\n\t\tList<File> dirs = new ArrayList<File>();\n\t\twhile (resources.hasMoreElements()) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add(new File(resource.getFile()));\n\t\t}\n\t\tArrayList<Class<?>> classes = new ArrayList<Class<?>>();\n\t\tfor (File directory : dirs) {\n\t\t\tclasses.addAll(findClasses(directory, packageName));\n\t\t}\n\t\treturn classes;\n\t}", "private static Class[] getClasses(String packageName)\n\t\t\tthrows ClassNotFoundException, IOException {\n\t\tClassLoader classLoader = Thread.currentThread()\n\t\t\t\t.getContextClassLoader();\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace('.', '/');\n\t\tEnumeration<URL> resources = classLoader.getResources(path);\n\t\tList<File> dirs = new ArrayList<File>();\n\t\twhile (resources.hasMoreElements()) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add(new File(resource.getFile()));\n\t\t}\n\t\tArrayList<Class> classes = new ArrayList<Class>();\n\t\tfor (File directory : dirs) {\n\t\t\tclasses.addAll(findClasses(directory, packageName));\n\t\t}\n\t\treturn classes.toArray(new Class[classes.size()]);\n\t}", "private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class<?>> classes = new ArrayList<Class<?>>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "public void scanClasspath() {\n List<String> classNames = new ArrayList<>(Collections.list(dexFile.entries()));\n\n ClassLoader classLoader = org.upacreekrobotics.dashboard.ClasspathScanner.class.getClassLoader();\n\n for (String className : classNames) {\n if (filter.shouldProcessClass(className)) {\n try {\n Class klass = Class.forName(className, false, classLoader);\n\n filter.processClass(klass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoClassDefFoundError e) {\n e.printStackTrace();\n }\n }\n }\n }", "private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "private static List<Class> findClasses(File directory, String packageName)\n\t\t\tthrows ClassNotFoundException {\n\t\tList<Class> classes = new ArrayList<Class>();\n\t\tif (directory.exists()) {\n\t\t\tFile[] files = directory.listFiles();\n\t\t\tfor (File file : files) {\n\t\t\t\tif (file.isDirectory()) {\n\t\t\t\t\tassert !file.getName().contains(\".\");\n\t\t\t\t\tclasses.addAll(findClasses(file,\n\t\t\t\t\t\t\tpackageName + \".\" + file.getName()));\n\t\t\t\t} else if (file.getName().endsWith(\".class\") && !file.getName().endsWith(\"Test.class\")) {\n\t\t\t\t\tclasses.add(Class.forName(packageName\n\t\t\t\t\t\t\t+ '.'\n\t\t\t\t\t\t\t+ file.getName().substring(0,\n\t\t\t\t\t\t\t\t\tfile.getName().length() - 6)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn classes;\n\t}", "public abstract List<String> scanAllClassNames();", "public static void showJarsAndOwnClasses(ContainerNode root)\n {\n root.walkCompleteSubTree().forEach(n -> n.setListMode(n.getSimpleName().startsWith(\"jar:\")\n ? ListMode.COLLAPSED : ListMode.EXPANDED));\n }", "private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n\t\tList<Class<?>> classes = new ArrayList<Class<?>>();\n\t\tif (!directory.exists()) {\n\t\t\treturn classes;\n\t\t}\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File file : files) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tassert !file.getName().contains(\".\");\n\t\t\t\tclasses.addAll(findClasses(file, packageName + \".\" + file.getName()));\n\t\t\t} else if (file.getName().endsWith(\".class\")) {\n\t\t\t\tclasses.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "private List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "public static List<Class<?>> getClasses( String packageName, String regexFilter ) throws Exception {\n\t\tPattern regex = null;\n\t\tif( regexFilter != null ) {\n\t\t\tregex = Pattern.compile( regexFilter );\n\t\t}\n\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace( '.', '/' );\n\t\tEnumeration<URL> resources = classLoader.getResources( path );\n\n\t\tList<String> dirs = new ArrayList<String>();\n\t\twhile( resources.hasMoreElements() ) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add( resource.getFile() );\n\t\t}\n\n\t\tTreeSet<String> classes = new TreeSet<String>();\n\t\tfor( String directory : dirs ) {\n\t\t\tclasses.addAll( findClasses( directory, packageName, regex ) );\n\t\t}\n\n\t\tArrayList<Class<?>> classList = new ArrayList<Class<?>>();\n\t\tfor( String clazz : classes ) {\n\t\t\tclassList.add( Class.forName( clazz ) );\n\t\t}\n\n\t\treturn classList;\n\t}", "private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static List<Class> getSubClasses(final String packageName) {\r\n\t\tfinal List<Class> listClasses = new ArrayList<>();\r\n\t\tSystem.err.println(\"getSubClasses \" + packageName);\r\n\t\t\r\n\t\t// System.err.println(\"java.class.path : \" +\r\n\t\t// System.getProperty(\"java.class.path\"));\r\n\t\tfinal String javaClassPaths[] = System.getProperty(\"java.class.path\").split(\";\");\r\n\t\tfor (final String s : javaClassPaths) {\r\n\t\t\tif (s.endsWith(\".jar\")) {\r\n\t\t\t\t// processJarFile(s, clazz1);\r\n\t\t\t} else {\r\n\t\t\t\tfinal File dirClasses = new File(s);\r\n\t\t\t\tfinal File dirPackage = new File(dirClasses, packageToPath(packageName));\r\n\t\t\t\tif (dirPackage.exists()) {\r\n\t\t\t\t\tfinal String[] names = dirPackage.list();\r\n\t\t\t\t\tfor (final String name : names) {\r\n\r\n\t\t\t\t\t\tif ((name.indexOf(\"$\") < 0) && (name.indexOf(\".class\") > 0)) {\r\n\t\t\t\t\t\t\tfinal String sName = name.substring(0, name.indexOf(\".\"));\r\n\t\t\t\t\t\t\tfinal String className = packageName + \".\" + sName;\r\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tfinal Class clazz = UtilReflection.class.getClassLoader().loadClass(className);\r\n\t\t\t\t\t\t\t\tlistClasses.add(clazz);\r\n\t\t\t\t\t\t\t} catch (final ClassNotFoundException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"ClassNotFound :\" + e.getMessage());\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\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listClasses;\r\n\t}", "public static void main(String[] args) {\n\t\n\tList<Class<?>> test_classes = new ArrayList<Class<?>>(); //List of loaded classes\n\tList<String> class_names = new ArrayList<String>(); \n\tString[] jar_pathes = new String[args.length -1];\n\tSystem.arraycopy(args, 0, jar_pathes, 0, args.length-1);\n\t\n\tfor (String jar_path : jar_pathes) {\t\n\t\ttry {\n\t\t\tJarFile jarFile = new java.util.jar.JarFile(jar_path);\n\t\t\tEnumeration<JarEntry> jar_entries_enum = jarFile.entries();\n\t\t\t\n\t\t\tURL[] urls = { new URL(\"jar:file:\" + jar_pathes[0]+\"!/\") };\n\t\t\tURLClassLoader cl = URLClassLoader.newInstance(urls);\n\t\t\t\n\t\t\twhile (jar_entries_enum.hasMoreElements()) {\n\t\t JarEntry jar_entry = (JarEntry) jar_entries_enum.nextElement();\n\t\t if(jar_entry.isDirectory() || !jar_entry.getName().endsWith(\".class\")) {\n\t\t \tcontinue;\n\t\t }\n\n\t\t\t String className = jar_entry.getName().substring(0,jar_entry.getName().length()-6); //-6 == len(\".class\")\n\t\t\t className = className.replace('/', '.');\n\t\t\t \n\t\t\t Class<?> c = cl.loadClass(className);\n\t\t\t if (TestCase.class.isAssignableFrom(c) || has_annotations(c)){ \n\t\t\t \ttest_classes.add(c);\n\t\t\t \tclass_names.add(className);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tjarFile.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\t}\n\t\n\tif (test_classes.isEmpty())\n\t{\n\t\tSystem.err.println(\"There is nothing to test.\");\n\t\tSystem.exit(1);\n\t}\n\telse{\n\t\tSystem.out.println(Arrays.toString(class_names.toArray()));\n\t\t\n\tJUnitCore runner = new JUnitCore();\n\tCustomListener custom_listener = new CustomListener();\n\tcustom_listener.reporter = new Reporter(args[args.length-1]);\n\trunner.addListener(custom_listener);\n\trunner.run(test_classes.toArray(new Class[test_classes.size()]));\n\t\t}\n\t}", "@SneakyThrows\n private Stream<Class<?>> findClasses(File directory, String packageName) {\n\n val lookForClasses =\n Function2.of(ReflectionUtils::lookForClasses)\n .apply(packageName);\n\n return Optional.of(directory)\n .filter(File::exists)\n .map(File::listFiles)\n .stream()\n .flatMap(Arrays::stream)\n .flatMap(lookForClasses);\n }", "@Test\n public void testGetClassesInPackage() throws Exception\n {\n\n WarMachine machine = TestHelpers.createWarMachine(WarNames.SERVLET);\n\n Set<String> clist1 = machine.getClassesInPackage(\"com.example.servlet\", false);\n assertEquals(\"number of classes in WEB-INF, non-recursive\", 1, clist1.size());\n assertTrue(\"searching for file in WEB-INF, non-recursive\", clist1.contains(\"com.example.servlet.SomeServlet\"));\n\n Set<String> clist2 = machine.getClassesInPackage(\"net.sf.practicalxml.xpath\", false);\n assertEquals(\"number of classes in JAR, non-recursive\", 13, clist2.size());\n assertTrue(\"searching for classes in JAR, non-recursive\", clist2.contains(\"net.sf.practicalxml.xpath.XPathWrapper\"));\n\n Set<String> clist3 = machine.getClassesInPackage(\"net.sf.practicalxml.xpath\", true);\n assertEquals(\"number of classes in JAR, recursive\", 17, clist3.size());\n assertTrue(\"searching for classes in JAR, recursive\", clist3.contains(\"net.sf.practicalxml.xpath.XPathWrapper\"));\n assertTrue(\"searching for classes in JAR, recursive\", clist3.contains(\"net.sf.practicalxml.xpath.function.Constants\"));\n }", "public static void showJarsAndOwnPackages(ContainerNode root)\n {\n root.walkCompleteSubTree().forEach(n -> n.setListMode(n.getSimpleName().startsWith(\"jar:\")\n ? ListMode.COLLAPSED : ListMode.LEAFS_COLLAPSED));\n }", "@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName) throws ClassNotFoundException, IOException\n {\n return getClasses(packageName, null);\n }", "public static List<ClassLoader> findAllClassLoaders(final LogNode log) {\n // Need both a set and a list so we can keep them unique, but in an order that (hopefully) reflects\n // the order in which the JDK calls classloaders.\n //\n // See:\n // https://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n //\n final AdditionOrderedSet<ClassLoader> classLoadersSet = new AdditionOrderedSet<>();\n\n // Look for classloaders on the call stack\n // Find the first caller in the call stack to call a method in the FastClasspathScanner package\n ClassLoader callerLoader = null;\n if (CALLER_RESOLVER == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \" could not create \"\n + CallerResolver.class.getSimpleName() + \", current SecurityManager does not grant \"\n + \"RuntimePermission(\\\"createSecurityManager\\\")\");\n }\n } else {\n final Class<?>[] callStack = CALLER_RESOLVER.getClassContext();\n if (callStack == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \": \" + CallerResolver.class.getSimpleName()\n + \"#getClassContext() returned null\");\n }\n } else {\n final String fcsPkgPrefix = FastClasspathScanner.class.getPackage().getName() + \".\";\n int fcsIdx;\n for (fcsIdx = callStack.length - 1; fcsIdx >= 0; --fcsIdx) {\n if (callStack[fcsIdx].getName().startsWith(fcsPkgPrefix)) {\n break;\n }\n }\n if (fcsIdx < 0 || fcsIdx == callStack.length - 1) {\n // Should not happen\n throw new RuntimeException(\"Could not find caller of \" + fcsPkgPrefix + \"* in call stack\");\n }\n\n // Get the caller's current classloader\n callerLoader = callStack[fcsIdx + 1].getClassLoader();\n }\n }\n boolean useCallerLoader = callerLoader != null;\n\n // Get the context classloader\n final ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();\n boolean useContextLoader = contextLoader != null;\n\n // Get the system classloader\n final ClassLoader systemLoader = ClassLoader.getSystemClassLoader();\n boolean useSystemLoader = systemLoader != null;\n\n // Establish descendancy relationships, and ignore any classloader that is an ancestor of another.\n if (useCallerLoader && useContextLoader && isDescendantOf(callerLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useCallerLoader && isDescendantOf(contextLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useSystemLoader && useContextLoader && isDescendantOf(systemLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useSystemLoader && isDescendantOf(contextLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (useSystemLoader && useCallerLoader && isDescendantOf(systemLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useCallerLoader && useSystemLoader && isDescendantOf(callerLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (!useCallerLoader && !useContextLoader && !useSystemLoader) {\n // Should not happen\n throw new RuntimeException(\"Could not find a usable ClassLoader\");\n }\n // There will generally only be one class left after this. In rare cases, you may have a separate\n // callerLoader and contextLoader, but those cases are ill-defined -- see:\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n // We specifically add the classloaders in the following order however, so that in the case that there\n // are two of them left, they are resolved in this order. The relative ordering of callerLoader and\n // contextLoader is due to the recommendation at the above URL.\n if (useSystemLoader) {\n classLoadersSet.add(systemLoader);\n }\n if (useCallerLoader) {\n classLoadersSet.add(callerLoader);\n }\n if (useContextLoader) {\n classLoadersSet.add(contextLoader);\n }\n\n final List<ClassLoader> classLoaders = classLoadersSet.getList();\n if (log != null) {\n for (final ClassLoader classLoader : classLoaders) {\n log.log(\"Found ClassLoader \" + classLoader.toString());\n }\n log.addElapsedTime();\n }\n return classLoaders;\n }", "ClasspathFinder(final ScanSpec scanSpec, final NestedJarHandler nestedJarHandler, final LogNode log) {\n // Get all classloaders, in classpath resolution order\n final AdditionOrderedSet<ClassLoader> allClassLoaders = new AdditionOrderedSet<>();\n for (final ClassLoader classLoader : scanSpec.classLoaders) {\n final ArrayList<ClassLoader> parentClassLoaders = new ArrayList<>();\n for (ClassLoader cl = classLoader; cl != null; cl = cl.getParent()) {\n parentClassLoaders.add(cl);\n }\n // OpenJDK calls classloaders in a top-down order\n for (int i = parentClassLoaders.size() - 1; i >= 0; --i) {\n allClassLoaders.add(parentClassLoaders.get(i));\n }\n }\n final List<ClassLoader> classLoaderOrder = allClassLoaders.getList();\n\n this.nestedJarHandler = nestedJarHandler;\n if (scanSpec.overrideClasspath != null) {\n // Manual classpath override\n if (scanSpec.overrideClassLoaders) {\n if (log != null) {\n log.log(\"It is not possible to override both the classpath and the ClassLoaders -- \"\n + \"ignoring the ClassLoader override\");\n }\n }\n final LogNode overrideLog = log == null ? null : log.log(\"Overriding classpath\");\n addClasspathElements(scanSpec.overrideClasspath, classLoaderOrder, overrideLog);\n if (overrideLog != null) {\n log.log(\"WARNING: when the classpath is overridden, there is no guarantee that the classes \"\n + \"found by classpath scanning will be the same as the classes loaded by the context \"\n + \"classloader\");\n }\n } else {\n // If system jars are not blacklisted, need to manually add rt.jar at the beginning of the classpath,\n // because it is included implicitly by the JVM.\n if (!scanSpec.blacklistSystemJars()) {\n // There should only be zero or one of these.\n final String rtJarPath = JarUtils.getRtJarPath();\n if (rtJarPath != null) {\n // Insert rt.jar as the first entry in the classpath.\n addClasspathElement(rtJarPath, classLoaderOrder, log);\n }\n }\n // Get all manually-added ClassLoaderHandlers\n final List<ClassLoaderHandler> classLoaderHandlers = new ArrayList<>();\n for (final Class<? extends ClassLoaderHandler> classLoaderHandler : scanSpec.extraClassLoaderHandlers) {\n try {\n classLoaderHandlers.add(classLoaderHandler.newInstance());\n } catch (InstantiationException | IllegalAccessException e) {\n if (log != null) {\n log.log(\"Could not instantiate \" + classLoaderHandler.getName(), e);\n }\n }\n }\n // Add all default ClassLoaderHandlers after manually-added ClassLoaderHandlers\n for (final Class<? extends ClassLoaderHandler> classLoaderHandlerClass : //\n ClassLoaderHandlerRegistry.DEFAULT_CLASS_LOADER_HANDLERS) {\n try {\n classLoaderHandlers.add(classLoaderHandlerClass.newInstance());\n } catch (InstantiationException | IllegalAccessException e) {\n if (log != null) {\n log.log(\"Could not instantiate \" + classLoaderHandlerClass.getName(), e);\n }\n }\n }\n if (log != null) {\n final LogNode classLoaderHandlerLog = log.log(\"ClassLoaderHandlers loaded:\");\n for (final ClassLoaderHandler classLoaderHandler : classLoaderHandlers) {\n classLoaderHandlerLog.log(classLoaderHandler.getClass().getName());\n }\n }\n\n // Try finding a handler for each of the classloaders discovered above\n for (final ClassLoader classLoader : classLoaderOrder) {\n // Skip system classloaders for efficiency if system jars are not going to be scanned.\n // TODO: Update to include JDK9 system classloader names.\n if (!scanSpec.blacklistSystemJars()\n || !classLoader.getClass().getName().startsWith(\"sun.misc.Launcher$ExtClassLoader\")) {\n final LogNode classLoaderLog = log == null ? null\n : log.log(\"Finding classpath elements in ClassLoader \" + classLoader);\n // Iterate through registered ClassLoaderHandlers\n boolean classloaderFound = false;\n for (final ClassLoaderHandler handler : classLoaderHandlers) {\n try {\n if (handler.handle(classLoader, this, classLoaderLog)) {\n classloaderFound = true;\n break;\n }\n } catch (final Exception e) {\n if (classLoaderLog != null) {\n classLoaderLog.log(\"Exception in ClassLoaderHandler\", e);\n }\n }\n }\n if (!classloaderFound) {\n if (classLoaderLog != null) {\n classLoaderLog.log(\"Unknown ClassLoader type, cannot scan classes\");\n }\n }\n }\n }\n\n if (!scanSpec.overrideClassLoaders) {\n // Add entries found in java.class.path, in case those entries were missed above due to some\n // non-standard classloader that uses this property\n final LogNode sysPropLog = log == null ? null\n : log.log(\"Getting classpath entries from java.class.path\");\n addClasspathElements(System.getProperty(\"java.class.path\"), classLoaderOrder, sysPropLog);\n }\n }\n }", "private void parseSystemClasspath() {\n\t // Look for all unique classloaders.\n\t // Keep them in an order that (hopefully) reflects the order in which class resolution occurs.\n\t ArrayList<ClassLoader> classLoaders = new ArrayList<>();\n\t HashSet<ClassLoader> classLoadersSet = new HashSet<>();\n\t classLoadersSet.add(ClassLoader.getSystemClassLoader());\n\t classLoaders.add(ClassLoader.getSystemClassLoader());\n\t if (classLoadersSet.add(Thread.currentThread().getContextClassLoader())) {\n\t classLoaders.add(Thread.currentThread().getContextClassLoader());\n\t }\n\t // Dirty method for looking for any other classloaders on the call stack\n\t try {\n\t // Generate stacktrace\n\t throw new Exception();\n\t } catch (Exception e) {\n\t StackTraceElement[] stacktrace = e.getStackTrace();\n\t for (StackTraceElement elt : stacktrace) {\n\t try {\n\t ClassLoader cl = Class.forName(elt.getClassName()).getClassLoader();\n\t if (classLoadersSet.add(cl)) {\n\t classLoaders.add(cl);\n\t }\n\t } catch (ClassNotFoundException e1) {\n\t }\n\t }\n\t }\n\n\t // Get file paths for URLs of each classloader.\n\t clearClasspath();\n\t for (ClassLoader cl : classLoaders) {\n\t if (cl != null) {\n\t for (URL url : getURLs(cl)) {\n\t \t\n\t if (\"file\".equals(url.getProtocol())) {\n\t addClasspathElement(url.getFile());\n\t }\n\t }\n\t }\n\t }\n\t}", "private static List<Class<?>>\n getClassNameFromJar(JarFile jarFile, String packageName, boolean isRecursion, String postfix) throws ClassNotFoundException {\n LOG.info(\"get Class List from jar \" + jarFile.getName());\n\n List<Class<?>> lc = new ArrayList<>();\n\n lc = jarFile.stream()\n .filter(f -> !f.isDirectory())\n .map(f -> f.getName().replace(\"/\", \".\"))\n .filter(f -> f.startsWith(packageName) && f.endsWith(postfix) && !f.contains(\"$\"))\n .map(f -> f.replace(postfix, \"\"))\n .map(f -> {\n try {\n return Class.forName(f);\n } catch (ClassNotFoundException e) {\n LOG.error(\"cast classstr \" + f + \" to class failed\");\n throw new RuntimeException(e);\n }\n })\n .collect(Collectors.toList());\n\n return lc;\n }", "private void addJarClasses(final Path location) {\n try (final JarFile jarFile = new JarFile(location.toFile())) {\n final Enumeration<JarEntry> entries = jarFile.entries();\n while (entries.hasMoreElements()) {\n final String entryName = entries.nextElement().getName();\n if (entryName.endsWith(\".class\"))\n classes.add(convertToQualifiedName(entryName));\n }\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Could not read jar-file '\" + location + \"', reason: \" + e.getMessage());\n }\n }", "private static URL[] expandWildcardClasspath() {\n List<URL> ret = new ArrayList<URL>();\n int numBaseXJars = 0;\n String classpath = System.getProperty(\"java.class.path\");\n String[] classpathEntries = classpath.split(System.getProperty(\"path.separator\"));\n for( String currCP : classpathEntries ) {\n File classpathFile = new File(currCP);\n URI uri = classpathFile.toURI();\n URL currURL = null;\n try {\n currURL = uri.toURL();\n } catch (MalformedURLException e) {\n System.out.println(\"Ignoring classpath entry: \" + currCP);\n }\n if( currCP.endsWith( \"*\" ) ) {\n // This URL needs to be expanded\n try {\n File currFile = new File( URLDecoder.decode( currURL.getFile(), \"UTF-8\" ) );\n // Search the parent path for any files that end in .jar\n File[] expandedJars = currFile.getParentFile().listFiles(\n new FilenameFilter() {\n public boolean accept( File aDir, String aName ) {\n return aName.endsWith( \".jar\" );\n }\n } );\n // Add the additional jars to the new search path\n if( expandedJars != null ) {\n for( File currJar : expandedJars ) {\n ret.add( currJar.toURI().toURL() );\n if( currJar.getName().matches(BASEX_LIB_MATCH) ) {\n ++numBaseXJars;\n }\n }\n } else {\n // could not expand due to some error, we can try to\n // proceed with out these jars\n System.out.println( \"WARNING: could not expand classpath at: \"+currFile.toString() );\n }\n } catch( Exception e ) {\n // could not expand due to some error, we can try to\n // proceed with out these jars\n e.printStackTrace();\n }\n }\n else {\n // Just use this unmodified\n ret.add( currURL );\n if( currURL.getFile().matches(BASEX_LIB_MATCH) ) {\n ++numBaseXJars;\n }\n }\n }\n // we've had trouble finding multiple jars of the BaseX of different versions\n // so if we find more than we will accept the one that matches the \"prefered\" version\n // which is hard coded to the version used when this workspace was created\n if( numBaseXJars > 1 ) {\n for( Iterator<URL> it = ret.iterator(); it.hasNext(); ) {\n URL currURL = it.next();\n if( currURL.getFile().matches(BASEX_LIB_MATCH) && !currURL.getFile().matches(PREFERED_BASEX_VER) ) {\n it.remove();\n --numBaseXJars;\n }\n }\n }\n if( numBaseXJars == 0 ) {\n System.out.println( \"WARNING: did not recongnize any BaseX jars in classpath. This may indicate missing jars or duplicate version mismatch.\");\n }\n return ret.toArray( new URL[ 0 ] );\n }", "private static LinkedList<String> findPackages(String dirpath) {\n\t\tlogger.entry();\n\t\tLinkedList<String> packageListing = new LinkedList<String>();\n\t\tLinkedList<String> dirsToProcess = new LinkedList<String>();\n\t\t\n\t\ttry {\n\t\t\t// Add any found subdirs to a list to process\n\t\t\tFile targetDir = new File(dirpath);\n\t\t\tif (targetDir.isDirectory()) {\n\t\t\t\tdirsToProcess = addAllSubDirs(targetDir, dirsToProcess);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e);\n\t\t}\n\n\t\t// Process the list of 'found' directories looking for additional directories\n\t\t// with Java files in them, indicating packaged code.\n\t\tString fileSep = System.getProperty(\"file.separator\");\n\t\twhile (dirsToProcess.size() > 0) {\n\t\t\tString item = dirsToProcess.removeFirst();\n\t\t\titem = item.substring(item.indexOf(dirpath) + dirpath.length() +1);\n\t\t\tFile candidate = new File(dirpath + fileSep + item);\n\t\t\tif (containsJavaFiles(candidate)) {\n\t\t\t\titem = item.replaceAll(fileSep, \".\");\n\t\t\t\tpackageListing.add(item);\n\t\t\t\tlogger.trace(item + \" \");\n\t\t\t}\n\t\t}\t\n\n\t\t// Process the list of dirs for subdirs. Any dir with Java files in it is a package\n\t\t// (except the top level ones)\n\t\treturn logger.exit(packageListing);\n\t}", "@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName, Class<?> superClass) throws ClassNotFoundException, IOException\n {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements())\n {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n List<Class> classes = new ArrayList<Class>();\n for (File directory : dirs)\n {\n List<Class> foundClasses = findClasses(directory, packageName);\n for (Class foundClass : foundClasses)\n {\n if (superClass.isAssignableFrom(foundClass))\n {\n classes.add(foundClass);\n }\n }\n }\n\n return classes;\n }", "private void init() {\n\t\tMvcs.scanPackagePath = analyseScanPath();\n\t\tif(StringHandler.isEmpty(Mvcs.scanPackagePath))\n\t\t\tthrow new RuntimeException(\"No scan path has been set! you need to setup ScanPackage annotation\");\n\t\t\n\t\t//put all class into the list\n\t\tList<String> allClassNames = scanAllClassNames();\n\t\tif(StringHandler.isEmpty(allClassNames)) //some loader may have no return value \n\t\t\treturn ;\n\t\t\n\t\tfor(String pkgPath : allClassNames){\n\t\t\tlist.add(ClassUtil.getClass(pkgPath));\n\t\t}\n\t}", "private List<String> getClassesInPackage(String packageUniqueName) {\n List<String> result = new ArrayList<String>();\n if (theModel.packages.containsKey(packageUniqueName)){\n \tTreeSet<String> children = theModel.packages.get(packageUniqueName).children;\n \tif ((children != null)){\n \t\tfor (String uniqueName : children){\n \t\t\tFamixClass foundClass = theModel.classes.get(uniqueName);\n \t\t\tif (foundClass != null){\n \t\t\t\tresult.add(uniqueName);\n \t\t\t\tif (foundClass.hasInnerClasses){\n \t\t\t\t\tresult.addAll(foundClass.children);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }\n return result;\n }", "@NotNull\n List<? extends ClassInfo> getAllClasses();", "public List<Clazz> loadAndScanJar()\n\t\t\tthrows ClassNotFoundException, ZipException, IOException {\n\t\tsuper.addURL(new File(path).toURI().toURL());\n\t\tList<Clazz> representations=new ArrayList<Clazz>();\n\n\t\t// Count the classes loaded\n\t\t// Your jar file\n\t\tFile f = new File(path);\n\n\t\tJarFile jar = new JarFile(path);\n\t\t// Getting the files into the jar\n\t\tEnumeration<? extends JarEntry> enumeration = jar.entries();\n\n\t\t// Iterates into the files in the jar file\n\t\twhile (enumeration.hasMoreElements()) {\n\t\t\tZipEntry zipEntry = enumeration.nextElement();\n\t\t\t// Is this a class?\n\t\t\tif (zipEntry.getName().endsWith(\".class\")) {\n\t\t\t\t// Relative path of file into the jar.\n\t\t\t\tString className = zipEntry.getName();\n\t\t\t\t// Complete class name\n\t\t\t\tclassName = className.replace(\".class\", \"\").replace(\"/\", \".\");\n\t\t\t\t// Load class definition from JVM\n\t\t\t\tClass<?> clazz = this.loadClass(className);\n\t\t\t\ttry {\n\t\t\t\t\t\tClazz actual = new Clazz(clazz.getName());\n\t\t\t\t\t\tfor (java.lang.reflect.Method m : clazz.getMethods()) {\n\t\t\t\t\t\t\tactual.addMethod(m.getReturnType().getName(), m.getName(), getScope(m.getModifiers()),\n\t\t\t\t\t\t\t\t\tModifier.isAbstract(m.getModifiers()), Modifier.isStatic(m.getModifiers()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (java.lang.reflect.Field m : clazz.getFields()) {\n\t\t\t\t\t\t\tactual.addVariable(m.getType().getName(), m.getName(), getScope(m.getModifiers()),\n\t\t\t\t\t\t\t\t\tModifier.isStatic(m.getModifiers()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\trepresentations.add(actual);\n\n\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tjar.close();\n\t\treturn representations;\n\t}", "private void listAllClasses(List<Path> foundFiles, Path root) {\r\n if (root.toFile().isFile()) {\r\n foundFiles.add(root);\r\n } else {\r\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(root, filter)) {\r\n for (Path path : stream) {\r\n if (Files.isDirectory(path)) {\r\n listAllClasses(foundFiles, path);\r\n } else {\r\n foundFiles.add(path);\r\n }\r\n }\r\n } catch (AccessDeniedException e) {\r\n logger.error(\"Access denied to directory {}\", root, e);\r\n } catch (IOException e) {\r\n logger.error(\"Error while reading directory {}\", root, e);\r\n }\r\n }\r\n }", "public static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "public static List<String> getClassNamesFromPackage(String argPackageName,\r\n\t\t\tboolean argIterateInnerClasses) {\r\n\t\tList<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();\r\n\t\tclassLoadersList.add(ClasspathHelper.contextClassLoader());\r\n\t\tclassLoadersList.add(ClasspathHelper.staticClassLoader());\r\n\t\tConfigurationBuilder configurationBuilder = null;\r\n\t\tif (argIterateInnerClasses) {\r\n\t\t\tconfigurationBuilder = new ConfigurationBuilder().setScanners(\r\n\t\t\t\t\tnew SubTypesScanner(false), new ResourcesScanner())\r\n\t\t\t\t\t.setUrls(\r\n\t\t\t\t\t\t\tClasspathHelper.forClassLoader(classLoadersList\r\n\t\t\t\t\t\t\t\t\t.toArray(new ClassLoader[0])));\r\n\t\t} else {\r\n\t\t\tconfigurationBuilder = new ConfigurationBuilder().setScanners(\r\n\t\t\t\t\tnew SubTypesScanner(false), new ResourcesScanner())\r\n\t\t\t\t\t.setUrls(\r\n\t\t\t\t\t\t\tClasspathHelper.forPackage(argPackageName,\r\n\t\t\t\t\t\t\t\t\tnew ClassLoader[0]));\r\n\t\t}\r\n\t\tReflections reflections = new Reflections(configurationBuilder);\r\n\t\tSet<Class<? extends Object>> classes = reflections\r\n\t\t\t\t.getSubTypesOf(Object.class);\r\n\t\tif (Precondition.checkNotEmpty(classes)) {\r\n\t\t\tList<String> simpleClassNamesList = new ArrayList<String>();\r\n\t\t\tIterator<Class<? extends Object>> s = classes.iterator();\r\n\t\t\tlogger.info(\"Loading Class Names: \");\r\n\t\t\twhile (s.hasNext()) {\r\n\t\t\t\tClass<? extends Object> st = s.next();\r\n\t\t\t\tif (!st.isInterface()) {\r\n\t\t\t\t\tString simpleClassName = st.getName();\r\n\t\t\t\t\tsimpleClassNamesList.add(simpleClassName);\r\n\t\t\t\t\tlogger.info(\"Class Names: \" + simpleClassName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn simpleClassNamesList;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"rawtypes\")\n public static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException\n {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists())\n {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files)\n {\n if (file.isDirectory())\n {\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n }\n else if (file.getName().endsWith(\".class\"))\n {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "public static void printClassPath() {\n ClassLoader cl = ClassLoader.getSystemClassLoader();\n URL[] urls = ((URLClassLoader) cl).getURLs();\n System.out.println(\"classpath BEGIN\");\n for (URL url : urls) {\n System.out.println(url.getFile());\n }\n System.out.println(\"classpath END\");\n System.out.flush();\n }", "private void processJar(JarFile jf) throws Exception {\n\t\tfor (Enumeration<JarEntry> e = jf.entries(); e.hasMoreElements();) {\n\t\t\tJarEntry entry = e.nextElement();\n\t\t\tString s = entry.getName();\n\t\t\tif (s.endsWith(\".class\")) {\n\t\t\t\tfor (String pref : prefixes) {\n\t\t\t\t\tif (s.startsWith(pref)) {\n\t\t\t\t\t\ts = s.replaceAll(\".class\", \"\").replaceAll(\"/\", \".\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tp.process(s);\n\t\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t\tSystem.out.println(\"ERROR processing class \" + s\n\t\t\t\t\t\t\t\t\t+ \" in \" + jf.getName());\n\t\t\t\t\t\t\tSystem.out.println(entry);\n\t\t\t\t\t\t\tthrow ex;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "private void loadJarsFromManifestFile( ClassLoader classLoader ) throws IOException {\n\n Enumeration<URL> manifestUrls = ((URLClassLoader) classLoader).findResources(\"META-INF/MANIFEST.MF\");\n Manifest manifest = null;\n URL manifestElement = null;\n\n if (manifestUrls != null) {\n while (manifestUrls.hasMoreElements()) {\n manifestElement = manifestUrls.nextElement();\n try (InputStream is = manifestElement.openStream()) {\n manifest = new Manifest(is);\n\n // get the 'Class-Path' value from the MANIFEST.MF file\n String manifestClassPathValue = manifest.getMainAttributes().getValue(\"Class-Path\");\n if (manifestClassPathValue != null) {\n log.trace(\"Parsing MANIFEST file \\\"\" + manifestElement.getPath());\n String[] arr = manifestClassPathValue.split(\" \");\n for (int i = 0; i < arr.length; i++) {\n // add listed jars from MANIFEST file to the map\n String jarSimpleName = getJarSimpleName(arr[i]);\n String manifestFile = manifestElement.getFile();\n manifestFile = manifestFile.replace(\"\\\\\", \"/\");\n\n if (manifestFile.startsWith(\"file:/\")) {\n manifestFile = manifestFile.substring(\"file:/\".length());\n }\n\n manifestFile = manifestFile.substring(0,\n manifestFile.indexOf(\"!/META-INF/MANIFEST.MF\"));\n manifestFile = manifestFile.substring(0, manifestFile.lastIndexOf('/'));\n\n if (!StringUtils.isNullOrEmpty(jarSimpleName)) {\n String jarAbsolutePath = \"\";\n if (arr[i].startsWith(\"file\")) {\n jarAbsolutePath = arr[i].substring(6, arr[i].length());\n } else {\n jarAbsolutePath = manifestFile + \"/\" + arr[i];\n }\n if (new File(jarAbsolutePath).exists()) {\n addJarToMap(jarAbsolutePath);\n } else {\n log.trace(\"File \\\"\" + jarAbsolutePath\n + \"\\\" is defined in /META-INF/MANIFEST.MF \\\"\"\n + manifestElement.getPath() + \"\\\", but does not exist!\");\n }\n }\n }\n }\n } catch (IOException ioe) {\n log.error(\"Unable to read the MANIFEST.MF file\", ioe);\n }\n }\n }\n }", "public static String[] getResourceListing(Class<?> clazz, String path) throws\r\n URISyntaxException, IOException {\r\n URL dirURL = clazz.getClassLoader().getResource(path);\r\n\r\n if (dirURL != null && dirURL.getProtocol().equals(\"file\")) {\r\n /* A file path: easy enough */\r\n return new File(dirURL.toURI()).list();\r\n }\r\n\r\n if (dirURL == null) {\r\n /*\r\n * In case of a jar file, we can't actually find a directory. Have\r\n * to assume the same jar as clazz.\r\n */\r\n String me = clazz.getName().replace(\".\", \"/\") + \".class\";\r\n dirURL = clazz.getClassLoader().getResource(me);\r\n }\r\n\r\n if (dirURL != null && dirURL.getProtocol().equals(\"jar\")) {\r\n /* A JAR path */\r\n String jarPath = dirURL.getPath().substring(5, dirURL.getPath().indexOf(\"!\")); //strip out only the JAR file\r\n JarFile jar = new JarFile(URLDecoder.decode(jarPath, \"UTF-8\"));\r\n\r\n LOGGER.debug(\"Listing files in \" + jarPath);\r\n\r\n Enumeration<JarEntry> entries = jar.entries(); //gives ALL entries in jar\r\n Set<String> result = new HashSet<>(); //avoid duplicates in case it is a subdirectory\r\n while (entries.hasMoreElements()) {\r\n String name = entries.nextElement().getName();\r\n if (name.startsWith(path)) { //filter according to the path\r\n LOGGER.debug(\"Found in jar \" + name);\r\n String entry = name.replace(path + \"/\", \"\");\r\n LOGGER.debug(\"Keeping \" + entry);\r\n result.add(entry);\r\n }\r\n }\r\n jar.close();\r\n return result.toArray(new String[0]);\r\n\r\n } else {\r\n\r\n InputStream inputstream = clazz.getResourceAsStream(\"/\" + path);\r\n if (inputstream != null) {\r\n final InputStreamReader isr = new InputStreamReader(inputstream, StandardCharsets.UTF_8);\r\n final BufferedReader br = new BufferedReader(isr);\r\n\r\n Set<String> result = new HashSet<>(); //avoid duplicates in case it is a subdirectory\r\n String filename = null;\r\n while ((filename = br.readLine()) != null) {\r\n result.add(filename);\r\n }\r\n return result.toArray(new String[0]);\r\n }\r\n\r\n }\r\n\r\n throw new UnsupportedOperationException(\"Cannot list files for URL \" + dirURL);\r\n }", "public static TreeSet<String> findClasses( String path, String packageName, Pattern regex ) throws Exception {\n\t\tTreeSet<String> classes = new TreeSet<String>();\n\t\tif( path.startsWith( \"file:\" ) && path.contains( \"!\" ) ) {\n\t\t\tString[] split = path.split( \"!\" );\n\t\t\tURL jar = new URL( split[0] );\n\t\t\tZipInputStream zip = new ZipInputStream( jar.openStream() );\n\t\t\tZipEntry entry;\n\t\t\twhile( ( entry = zip.getNextEntry() ) != null ) {\n\t\t\t\tif( entry.getName().endsWith( \".class\" ) ) {\n\t\t\t\t\tString className = entry.getName().replaceAll( \"[$].*\", \"\" ).replaceAll( \"[.]class\", \"\" ).replace( '/', '.' );\n\t\t\t\t\tif( className.startsWith( packageName ) && ( regex == null || regex.matcher( className ).matches() ) ) {\n\t\t\t\t\t\tclasses.add( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tFile dir = new File( path );\n\t\tif( !dir.exists() ) {\n\t\t\treturn classes;\n\t\t}\n\t\tFile[] files = dir.listFiles();\n\t\tfor( File file : files ) {\n\t\t\tif( file.isDirectory() ) {\n\t\t\t\tassert !file.getName().contains( \".\" );\n\t\t\t\tclasses.addAll( findClasses( file.getAbsolutePath(), packageName + \".\" + file.getName(), regex ) );\n\t\t\t} else if( file.getName().endsWith( \".class\" ) ) {\n\t\t\t\tString className = packageName + '.' + file.getName().substring( 0, file.getName().length() - 6 );\n\t\t\t\tif( regex == null || regex.matcher( className ).matches() ) classes.add( className );\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }", "public static void checkClassloaders() {\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader()); //sun.misc.Launcher$AppClassLoader@36422510\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader().getParent()); //sun.misc.Launcher$ExtClassLoader@308f5944\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader().getParent().getParent()); //null\n\t}", "private List<ExtensionClassLoader> getClassLoaders() {\n final List<ExtensionClassLoader> classLoaders = new ArrayList<>();\n\n // start with the class loader that loaded ExtensionManager, should be WebAppClassLoader for API WAR\n final ExtensionClassLoader frameworkClassLoader = new ExtensionClassLoader(\"web-api\", new URL[0], this.getClass().getClassLoader());\n classLoaders.add(frameworkClassLoader);\n\n // we want to use the system class loader as the parent of the extension class loaders\n ClassLoader systemClassLoader = FlowPersistenceProvider.class.getClassLoader();\n\n // add a class loader for each extension dir\n final Set<String> extensionDirs = properties.getExtensionsDirs();\n for (final String dir : extensionDirs) {\n if (!StringUtils.isBlank(dir)) {\n final ExtensionClassLoader classLoader = createClassLoader(dir, systemClassLoader);\n if (classLoader != null) {\n classLoaders.add(classLoader);\n }\n }\n }\n\n return classLoaders;\n }", "private Class<DimensionInterface>[] getAllClasses (String pckgname) {\n\t\t\n\t\ttry {\n\t\t \n\t\t\t// Classes will store our results\n\t\t\tArrayList classes = new ArrayList ();\n\t\t\t\n\n\t\t\t// Get a File object for the package \n\t\t File directory; \n\t\t \n\t\t \n\t\t // Load the package \n\t\t try { \n\t\t \tdirectory = new File (\n\t\t \t\tThread.currentThread ()\n\t\t \t\t\t.getContextClassLoader()\n\t\t \t\t\t.getResource (pckgname.replace('.', '/'))\n\t\t \t\t\t.getFile()\n\t\t \t); \n\t\t \n\t\t } catch (NullPointerException x) { \n\t\t \tSystem.out.println (\"Nullpointer\");\n\t\t \tthrow new ClassNotFoundException (pckgname + \" does not appear to be a valid package\"); \n\t\t }\n\t\t \n\t\t \n\t\t // IF we have found our package, then\n\t\t // obtain the files withtin\n\t\t if ( ! directory.exists ()) {\n\t\t \tSystem.out.println (\"Directory does not exist\");\n\t\t \tthrow new ClassNotFoundException(pckgname + \" does not appear to be a valid package\"); \n\t\t } \t\t \t\n\t\t \t\n\t\t \n\t \t// Get the list of the files contained in the package \n\t \tString[] files = directory.list ();\n\t\t \t\n\t\t \t\n\t \t// Get the files\n\t \tfor (int i=0; i<files.length; i++) { \n\n\t \t\t// we are only interested in .class files \n\t \t\tif ( ! files[i].endsWith(\".class\")) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\t\n \t\t\t// removes the .class extension \n \t\t\tclasses.add(Class.forName (pckgname + '.' + files[i].substring (0, files[i].length() - 6)));\n\t \t\t\t\n\t \t}\n\t\t \n\t\t \n\t \t// Convert the result in an array\n\t\t Class[] classesA = new Class[classes.size()]; \n\t\t classes.toArray (classesA); \n\t\t \n\t\t \n\t\t // Return\n\t\t return classesA;\n\t\t \n\t\t// Generic error\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "static URL[] getClassPath() throws MalformedURLException {\n List<URL> classPaths = new ArrayList<>();\n\n classPaths.add(new File(\"target/test-classes\").toURI().toURL());\n\n // Add this test jar which has some frontend resources used in tests\n URL jar = getTestResource(\"jar-with-frontend-resources.jar\");\n classPaths.add(jar);\n\n // Add other paths already present in the system classpath\n ClassLoader classLoader = ClassLoader.getSystemClassLoader();\n URL[] urls = URLClassLoader.newInstance(new URL[] {}, classLoader)\n .getURLs();\n for (URL url : urls) {\n classPaths.add(url);\n }\n return classPaths.toArray(new URL[0]);\n }", "public static List<Class<?>>\n getClassListInPackage(String packageName, boolean isRecursion, String postfix) throws IOException, ClassNotFoundException {\n\n LOG.info(\"get Class in package \" + packageName);\n\n List<Class<?>> lct = new ArrayList<>();\n\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\n URL url = loader.getResource(packageName.replace(\".\", \"/\"));\n\n if (url != null) {\n String protocol = url.getProtocol();\n if (protocol.equals(\"file\")) {\n lct = getClassNameFromFile(url.getPath(), packageName, isRecursion, postfix);\n } else if (protocol.equals(\"jar\")) {\n JarFile jarFile = ((JarURLConnection) url.openConnection()).getJarFile();\n lct = getClassNameFromJar(jarFile, packageName, isRecursion, postfix);\n }\n }\n\n return lct;\n }", "public Set<Class<?>> getScanClasses();", "String[] getResourceListing(Class<?> clazz, String path) throws URISyntaxException, IOException{\n\t\tURL dirURL = clazz.getClassLoader().getResource(path);\n\t\tif(dirURL != null && dirURL.getProtocol().equals(\"file\")){\n\t\t\t/* A file path: easy enough */\n\t\t\treturn new File(dirURL.toURI()).list();\n\t\t}\n\t\tif(dirURL == null){\n\t\t\t// In case of a jar file, we can't actually find a directory. Have to assume the same jar as clazz.\n\t\t\tfinal String me = clazz.getName().replace(\".\", \"/\") + \".class\";\n\t\t\tdirURL = clazz.getClassLoader().getResource(me);\n\t\t}\n\t\tif(dirURL.getProtocol().equals(\"jar\")){\n\t\t\t// A JAR path\n\t\t\tfinal String jarPath = dirURL.getPath().substring(5, dirURL.getPath().indexOf(\"!\")); // strip out only the JAR file\n\t\t\tfinal JarFile jar = new JarFile(URLDecoder.decode(jarPath, \"UTF-8\"));\n\t\t\tfinal Enumeration<JarEntry> entries = jar.entries(); // gives ALL entries in jar\n\t\t\tfinal Set<String> result = new HashSet<>(); // avoid duplicates in case it is a subdirectory\n\t\t\twhile(entries.hasMoreElements()){\n\t\t\t\tfinal String name = entries.nextElement().getName();\n\t\t\t\tif(name.startsWith(path)){ // filter according to the path\n\t\t\t\t\tString entry = name.substring(path.length());\n\t\t\t\t\tint checkSubdir = entry.indexOf(\"/\");\n\t\t\t\t\tif(checkSubdir >= 0){\n\t\t\t\t\t\t// if it is a subdirectory, we just return the directory name\n\t\t\t\t\t\tentry = entry.substring(0, checkSubdir);\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result.toArray(new String[result.size()]);\n\t\t}\n\t\tthrow new UnsupportedOperationException(\"Cannot list files for URL \" + dirURL);\n\t}", "@Override\n public List<Class> getAllUssdClasses(String packageName) {\n\n List<Class> commands = new ArrayList<Class>();\n List<String> classNames = new ArrayList<String>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(\n null, null, null);\n\n StandardLocation location = StandardLocation.CLASS_PATH;\n\n Set<JavaFileObject.Kind> kinds = new HashSet<>();\n kinds.add(JavaFileObject.Kind.CLASS);\n boolean recurse = false;\n Iterable<JavaFileObject> list = new ArrayList<>();\n try {\n list = fileManager.list(location, packageName,\n kinds, recurse);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n for (JavaFileObject javaFileObject : list) {\n String path = javaFileObject.toUri().getPath();\n String className = path.substring(path.lastIndexOf(\"/\") + 1, path.indexOf(\".\"));\n classNames.add(className);\n }\n\n for (String className : classNames) {\n Class klass = null;\n try {\n klass = Class.forName(packageName + \".\" + className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n if (klass != null && klass.isAnnotationPresent(UssdService.class)) {\n commands.add(klass);\n }\n }\n return commands;\n }", "public static ArrayList<File> getJars(File dir) {\r\n\t\treturn getFiles(dir, \".jar\");\r\n\t}", "public List<Class<?>> getKnownClasses();", "public AnnotationScanner() {\n File rootDir = this.getClassRootDirectory();\n\n if (rootDir != null) {\n this.allClass = getDirClassList(rootDir, null);\n } else {\n this.initJar();\n }\n }", "protected void collectFrameworkJars(@Nonnull Collection<VirtualFile> jarFiles,\n @Nonnull FrameworkInstanceLibrarySourceFinder sourceFinder) {\n\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void refreshModules()\n\t{\n\t\t// Scan each directory in turn to find JAR files\n\t\t// Subdirectories are not scanned\n\t\tList<File> jarFiles = new ArrayList<>();\n\n\t\tfor (File dir : moduleDirectories) {\n\t\t\tfor (File jarFile : dir.listFiles(jarFileFilter)) {\n\t\t\t\tjarFiles.add(jarFile);\n\t\t\t}\n\t\t}\n\n\t\t// Create a new class loader to ensure there are no class name clashes.\n\t\tloader = new GPIGClassLoader(jarFiles);\n\t\tfor (String className : loader.moduleVersions.keySet()) {\n\t\t\ttry {\n\t\t\t\t// Update the record of each class\n\t\t\t\tClass<? extends Interface> clz = (Class<? extends Interface>) loader.loadClass(className);\n\t\t\t\tClassRecord rec = null;\n\t\t\t\tfor (ClassRecord searchRec : modules.values()) {\n\t\t\t\t\tif (searchRec.clz.getName().equals(className)) {\n\t\t\t\t\t\trec = searchRec;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (rec != null) {\n\t\t\t\t\t// This is not an upgrade, ignore it\n\t\t\t\t\tif (rec.summary.moduleVersion >= loader.moduleVersions.get(className)) continue;\n\n\t\t\t\t\t// Otherwise update the version number stored\n\t\t\t\t\trec.summary.moduleVersion = loader.moduleVersions.get(className);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trec = new ClassRecord();\n\t\t\t\t\trec.summary = new ModuleSummary(IDGenerator.getNextID(), loader.moduleVersions.get(className),\n\t\t\t\t\t\t\tclassName);\n\t\t\t\t\tmodules.put(rec.summary.moduleID, rec);\n\t\t\t\t}\n\t\t\t\trec.clz = clz;\n\n\t\t\t\t// Update references to existing objects\n\t\t\t\tfor (StrongReference<Interface> ref : instances.values()) {\n\t\t\t\t\tif (ref.get().getClass().getName().equals(className)) {\n\t\t\t\t\t\tConstructor<? extends Interface> ctor = clz.getConstructor(Object.class);\n\t\t\t\t\t\tref.object = ctor.newInstance(ref.get());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (NoSuchMethodException e) {\n\t\t\t\t// Thrown when trying to find a suitable constructor\n\t\t\t\tSystem.err.println(\"Discovered class which has no available upgrade constructor: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t\tcatch (InstantiationException | IllegalAccessException | IllegalArgumentException\n\t\t\t\t\t| InvocationTargetException e) {\n\t\t\t\t// All thrown by the instantiate call\n\t\t\t\tSystem.err.println(\"Unable to create new instance of class: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t\tcatch (ClassNotFoundException e) {\n\t\t\t\t// Should never occur but required to stop the compiler moaning\n\t\t\t\tSystem.err.println(\"Discovered class which has no available upgrade constructor: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t}", "public static Class<?>[] findTestClasses(File testDir) throws ClassNotFoundException {\n\t\tList<File> testClassFiles = findFilesEndingWith(testDir, new String[] { \"Test.class\" });\n\t\tList<Class<?>> classes = convertToClasses(testClassFiles, testDir);\n\t\treturn classes.toArray(new Class[classes.size()]);\n\t}", "protected Vector getTestSuiteClassPath(String jarPath) {\n Vector result = new Vector();\n if (useOurAgent) {\n result.add(new File(\"javatest-agent/j2meclasses\").getAbsolutePath());\n } else {\n result.add(tckPath + \"lib/agent.jar\");\n result.add(tckPath + \"lib/client.jar\");\n }\n result.add(getHttpClientPath());\n result.add(jarPath);\n return result;\n }", "public static void printJVMClassPath() {\n ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();\n //Get the URLs\n URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();\n for(int i=0; i< urls.length; i++)\n System.out.println(\" - \" + urls[i].getFile());\n }", "@Override\n public ElementMatcher<ClassLoader> classLoaderMatcher() {\n return hasClassesNamed(className);\n }", "@Test\n public void testGetClasses() throws Exception {\n for (Class clazz : TestClass.class.getClasses()) {\n System.out.println(clazz.getName());\n }\n }", "private void loadClassesFromJar(final String runnableID, final File jarfile) {\n \n mTaskCache.get(runnableID).taskClasses = new LinkedList<Class>();\n \n Log.i(TAG,\n \"XXX: Calling DexClassLoader with jarfile: \" + jarfile.getAbsolutePath());\n final File tmpDir = mContext.getDir(\"dex\", 0);\n \n mTaskCache.get(runnableID).classLoader = new DexClassLoader(\n jarfile.getAbsolutePath(),\n tmpDir.getAbsolutePath(),\n null,\n BackgroundService.class.getClassLoader());\n // mTaskCache.get(mCurrentRunnableID).classLoader = mTaskCache.get(runnableID).classLoader;\n // setRunnableID(runnableID); \n \n // load all available classes\n String path = jarfile.getPath();\n \n \n try {\n // load dexfile\n DexFile dx = DexFile.loadDex(\n path,\n File.createTempFile(\"opt\", \"dex\", mContext.getCacheDir()).getPath(),\n 0);\n \n // extract all available classes\n for (Enumeration<String> classNames = dx.entries(); classNames.hasMoreElements();) {\n String className = classNames.nextElement();\n Log.i(TAG, String.format(\"found class: %s\", className));\n try {\n // TODO: do only forName() here?\n // final Class<Object> loadedClass = (Class<Object>) mClassLoaderWrapper.get().loadClass(className);\n final Class<Object> loadedClass = (Class<Object>) mTaskCache.get(runnableID).classLoader.loadClass(className);\n Log.i(TAG, String.format(\"Loaded class: %s\", className));\n // add associated classes to task class list\n if (loadedClass == null) {\n Log.e(TAG, \"EEEEEE loadedClass is null\");\n }\n if (mTaskCache.get(runnableID) == null) {\n Log.e(TAG, \"EEEEEE no mapentry found\");\n }\n if (mTaskCache.get(runnableID).taskClasses == null) {\n Log.e(TAG, \"EEEEEE taskClasses empty\");\n }\n mTaskCache.get(runnableID).taskClasses.add(loadedClass);\n // add task class to task list\n if (DistributedRunnable.class.isAssignableFrom(loadedClass)) {\n mTaskCache.get(runnableID).taskClass = loadedClass;\n }\n }\n catch (ClassNotFoundException ex) {\n Log.getStackTraceString(ex);\n }\n }\n }\n catch (IOException e) {\n System.out.println(\"Error opening \" + path);\n }\n // notify listeners\n for (JobCenterHandler handler : mHandlerList) {\n handler.onBinaryReceived(runnableID);\n }\n }", "private ArrayList<Class<Critter>> getCritterClasses(Package pkg) {\n\t\tArrayList<Class<Critter>> classes = new ArrayList<Class<Critter>>();\n\t\tString packagename = pkg.getName();\n\t\tURL resource = ClassLoader.getSystemClassLoader().getResource(packagename);\n\t\tString path = resource.getFile(); //path to package\n\t\tFile directory;\n\t\ttry {\n\t\t\tdirectory = new File(resource.toURI());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\tif (directory.exists()) {\n\t\t\tString[] files = directory.list();\n\t\t\tfor (String file : files) {\n\t\t\t\tif (file.endsWith(\".class\")) {\n\t\t\t\t\t// removes the .class extension\n\t\t\t\t\tString className = packagename + '.' + file.substring(0, file.length() - 6);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass classObj = Class.forName(className);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject obj = classObj.newInstance();\n\t\t\t\t\t\t\tif (obj instanceof Critter) {\n\t\t\t\t\t\t\t\tclasses.add(classObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue; //Skip if class cannot be made into object\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "public static Class<?>[] findTestClasses(Class<?> clazz) throws ClassNotFoundException {\n\t\tFile testDir = findClassDir(clazz);\n\t\treturn findTestClasses(testDir);\n\t}", "Set<Class<?>> getClassSet(String packageName);", "public static void moduleClassScan(Consumer<? super Class> consumer, String packageName) {\n\n\n Set<Class<? extends Module>> allClasses = getModuleClasses(packageName);\n\n for (Class clazz : allClasses) {\n\n consumer.accept(clazz);\n }\n }", "java.util.List<java.lang.String>\n getClasspathList();", "private static Class<?>[] loadInClassloader(ClassLoader loader, Class<?>[] classes)\n throws ClassNotFoundException {\n List<Class<?>> trackingClasses = Lists.newArrayListWithExpectedSize(classes.length);\n for (Class<?> cls : classes) {\n trackingClasses.add(loadInClassloader(loader, cls));\n }\n return trackingClasses.toArray(new Class<?>[classes.length]);\n }", "public String[] getTestClassNames(String directoryName)\n\t{\n\t File directory = new File(directoryName);\n\t \n File[] fList = directory.listFiles();\n \n for (File file : fList){\n if (file.isFile()){\n if (file.getName().startsWith(\"Test\") && file.getName().endsWith(\".class\") && !file.getName().contains(\"$\"))\n {\n \t//Class Names\n \tfileNames = fileNames + \" , \" +file.getName();\n \t\n \t//create import statements from absolute paths\n \tabsolutePath = file.getAbsolutePath();\n importStatements += \"import \"+absolutePath.substring(absolutePath.indexOf(\"com\"),absolutePath.indexOf(\".class\")).replace(\"\\\\\", \".\")+\";\\n\"; \n \n }\n \n } else if (file.isDirectory()){\n \tgetTestClassNames(file.getAbsolutePath());\n }\n }\n \t\t\n testClasses[0]=fileNames;\n testClasses[1]=importStatements;\n\n return testClasses;\n\t}", "private void loadPluginsJar(String jarname){\r\n\t\tURL[] urlList = new URL[1];\r\n\t\ttry{\r\n\t\t\tURL jarUrl = new URL(\"file:\"+jarname+\".jar\");\r\n\t\t\turlList[0] = jarUrl;\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+jarname+\"' could not be loaded (invalid path)\");\r\n\t\t}\r\n\t\t\r\n\t\tURLClassLoader classLoader = new URLClassLoader(urlList);\r\n\t\ttry{\r\n\t\t\tJarFile jfile = new JarFile(jarname+\".jar\");\r\n\t\t\t\r\n\t\t\t// walk through all files of the jar\r\n\t\t\tEnumeration<JarEntry> entries = jfile.entries();\r\n\t\t\twhile(entries.hasMoreElements()){\r\n\t\t\t\tJarEntry entry = entries.nextElement();\r\n\t\t\t\tif(entry.isDirectory() || !entry.getName().endsWith(\".class\")){\r\n\t\t\t\t\tcontinue; // we only care for classes\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString className = entry.getName().substring(0,entry.getName().length()-6).replace('/', '.');\r\n\t\t\t\t\r\n\t\t\t\tClass<IKomorebiPlugin> pluginClass = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tClass<?> cl = classLoader.loadClass(className);\r\n\t\t\t\t\tif(!IKomorebiPlugin.class.isAssignableFrom(cl)){\r\n\t\t\t\t\t\tcontinue; // only care about PlugIn classes\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tpluginClass = (Class<IKomorebiPlugin>) cl;\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Error while registering PlugIns of '\"+jarname+\"': \"+\r\n\t\t\t\t className+\" could not be loaded\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttryRegisterPlugin(jarname, pluginClass);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tjfile.close();\r\n\t\t}catch(IOException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+jarname+\"' could not be loaded (does not exist)\");\r\n\t\t}finally{\r\n\t\t\tif(classLoader != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tclassLoader.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Potential resource leak: class loader could not be closed (reason: \"+e.getMessage()+\")\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void readClasses(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t for (Class javaClass : SB_ClassMap.getBaseJavaClasses()) {\r\n\t addJavaClass(book, javaClass.getSimpleName(), javaClass.getName());\r\n\t }\r\n\t \r\n\t List<String> importedClasses = _dataModel.getJavaScript().getImportedJavaClasses();\r\n\t\tfor( String javaClassName : importedClasses) {\r\n\t\t\tString classPackage = javaClassName;\r\n\t\t\tString className = javaClassName.substring(javaClassName.lastIndexOf('.') + 1);\r\n\t\t\taddJavaClass(book, className, classPackage);\r\n\t }\r\n\t\t\r\n\t\t//Now that all classes read in, convert class descriptions\r\n\t\ttry\r\n\t\t{\r\n\t\t book.getUserClassMap().convertClassDescriptions(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t}", "private URL[] getKnownJars(File libDir, String[] jars, boolean isForUserVM, int numBuildJars) \n throws MalformedURLException\n {\n boolean useClassesDir = commandLineProps.getProperty(\"useclassesdir\", \"false\").equals(\"true\");\n \n // by default, we require all our known jars to be present\n int startJar = 0;\n ArrayList<URL> urlList = new ArrayList<>();\n\n // a hack to let BlueJ run from within Eclipse.\n // If specified on command line, lets add a ../classes\n // directory to the classpath (where Eclipse stores the\n // .class files)\n if (numBuildJars != 0 && useClassesDir) {\n File classesDir = new File(libDir.getParentFile(), \"classes\");\n \n if (classesDir.isDirectory()) {\n urlList.add(classesDir.toURI().toURL());\n urlList.add(new File(libDir.getParentFile(), \"threadchecker/classes\").toURI().toURL());\n if (isGreenfoot) {\n String gfClassesDir = commandLineProps.getProperty(\"greenfootclassesdir\");\n if (gfClassesDir != null) {\n classesDir = new File(gfClassesDir);\n urlList.add(classesDir.toURI().toURL());\n }\n }\n \n // skip over requiring bluejcore.jar, bluejeditor.jar etc.\n startJar = numBuildJars;\n }\n }\n\n for (int i=startJar; i < jars.length; i++) {\n File toAdd = new File(libDir, jars[i]);\n \n // No need to throw exception at this point; we will get\n // a ClassNotFoundException or similar if there is really a\n // problem.\n //if (!toAdd.canRead())\n // throw new IllegalStateException(\"required jar is missing or unreadable: \" + toAdd);\n\n if (toAdd.canRead())\n urlList.add(toAdd.toURI().toURL());\n }\n \n if (isForUserVM)\n {\n // Only need to specially add JavaFX for the user VM, it will\n // already be on classpath for server VM:\n urlList.addAll(Arrays.asList(getJavaFXClassPath()));\n }\n return (URL[]) urlList.toArray(new URL[0]);\n }", "java.util.List<java.lang.String>\n getClasspathList();", "@Override\n\tpublic List<Classes> findAllClasses() {\n\t\tString sql = \"select * from classes\";\n\t\tJdbcQuery querys = JdbcUtils.createNativeQuery(sql, Classes.class);\n\t\tList<Classes> classesList = (List<Classes>) querys.getResultList();\n\t\treturn classesList;\n\t}", "public static void addAllJarFromClassPath(FlexoResourceCenterService rcService) throws IOException {\n\t\tfor (JarFile file : getClassPathJarFiles()) {\n\t\t\taddJarFile(file, rcService);\n\t\t}\n\t}", "List<Class<?>> getManagedClasses();", "private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }", "private ArrayList<String> getJARList() {\n String[] jars = getJARNames();\n return new ArrayList<>(Arrays.asList(jars));\n }", "public static void load() throws IOException {\n ClassPath classPath = ClassPath.from(ClassLoader.getSystemClassLoader());\n //System.out.println(\"Length:\"+classPath.getTopLevelClasses(\"util\").size());\n for (ClassPath.ClassInfo classInfo : classPath.getTopLevelClasses(\"util\")) {\n Scene.v().addBasicClass(classInfo.getName(), SootClass.BODIES);\n sootClasses.add(classInfo.getName());\n }\n }", "public List<? extends BaseClassInfo> getClasses(HasMetricsFilter filter) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n List<BaseClassInfo> result = newArrayList();\n for (BaseClassInfo classInfo : classLookup.values()) {\n if (filter.accept(classInfo)) {\n result.add(classInfo);\n }\n }\n return result;\n }", "@NotNull\n List<? extends ClassInfo> getClasses();", "static List<GlassFishLibrary.Maven> processClassPath(List<File> classpath) {\n List<GlassFishLibrary.Maven> mvnList = new LinkedList<>();\n for (File jar : classpath) {\n ZipFile zip = null;\n try {\n zip = new ZipFile(jar);\n Enumeration<? extends ZipEntry> entries = zip.entries();\n while (entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n Matcher matcher\n = MVN_PROPS_PATTERN.matcher(entry.getName());\n if (matcher.matches()) {\n GlassFishLibrary.Maven mvnInfo\n = getMvnInfoFromProperties(zip.getInputStream(\n entry));\n if (mvnInfo != null) {\n mvnList.add(mvnInfo);\n break;\n }\n }\n }\n } catch (ZipException ze) {\n Logger.log(Level.WARNING, \"Cannot open JAR file \"\n + jar.getAbsolutePath() + \":\", ze);\n } catch (IOException ioe) {\n Logger.log(Level.WARNING, \"Cannot process JAR file \"\n + jar.getAbsolutePath() + \":\", ioe);\n } catch (IllegalStateException ise) {\n Logger.log(Level.WARNING, \"Cannot process JAR file \"\n + jar.getAbsolutePath() + \":\", ise);\n } finally {\n if (zip != null) try {\n zip.close();\n } catch (IOException ioe) {\n Logger.log(Level.WARNING, \"Cannot close JAR file \"\n + jar.getAbsolutePath() + \":\", ioe);\n }\n }\n \n }\n return mvnList;\n }", "@Test\n public void testGetDecalredClasses() {\n for (Class clazz : TestClass.class.getDeclaredClasses()) {\n System.out.println(clazz.getName());\n }\n }", "private List<Class> getClasses(final String scanPackage) {\n ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false);\n provider.addIncludeFilter(new AnnotationTypeFilter(ElementEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(VertexEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EdgeEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EmbeddedEntity.class));\n Set<BeanDefinition> beanDefinitionSet = provider.findCandidateComponents(scanPackage);\n List<Class> entityClasses = new ArrayList<>();\n for (BeanDefinition beanDefinition : beanDefinitionSet) {\n String beanClassName = beanDefinition.getBeanClassName();\n try {\n entityClasses.add(Class.forName(beanClassName));\n } catch (ClassNotFoundException e) {\n LOG.error(\"Generate class: {}'s schema error: \", beanClassName, e);\n }\n }\n return entityClasses;\n }", "java.util.List<com.google.devtools.kythe.proto.Java.JarDetails.Jar> \n getJarList();", "public URL[] getJARs() throws MalformedURLException {\n return (urlsFromJARs(getJARNames()));\n }", "@Test\n public void multidex() throws IOException {\n Set<String> result = classPathScanner.getClassPathEntries(new AcceptAllFilter());\n assertThat(result)\n .containsAtLeast(\n \"androidx.test.multidex.app.MultiDexTestClassA\",\n \"androidx.test.multidex.app.MultiDexTestClassB\",\n \"androidx.test.multidex.app.MultiDexTestClassC\",\n \"androidx.test.multidex.app.MultiDexTestClassD\",\n \"androidx.test.multidex.app.MultiDexApplication\");\n\n // ensure classes from binary under test are not included\n // this relies on build adding \"androidx.test.testing.fixtures.CustomTestFilter\" to target app\n // only\n assertThat(result).doesNotContain(\"androidx.test.testing.fixtures.CustomTestFilter\");\n }", "static List getCommonClasspath(BaseManager mgr) throws IOException {\n\n InstanceEnvironment env = mgr.getInstanceEnvironment();\n String dir = env.getLibClassesPath();\n String jarDir = env.getLibPath();\n\n return ClassLoaderUtils.getUrlList(new File[] {new File(dir)}, \n new File[] {new File(jarDir)});\n }", "public List<String> findXmlFilesInJar(String jarPath) {\n\n\t\tfinal List<String> xmlFiles = new ArrayList<String>();\n\t\ttry (\n\t\t\tJarInputStream jstream = new JarInputStream(new FileInputStream(jarPath));\n\t\t) {\n\n\t\t\tJarEntry entry;\n\t\t\twhile ((entry = jstream.getNextJarEntry()) != null) {\n\t\t\t\tString fName = entry.getName();\n\t\t\t\t// For now, take all .xml files. We can ignore non-ruleset XMLs while parsing\n\t\t\t\tif (fName.endsWith(FileType.XML.suffix)) {\n\t\t\t\t\txmlFiles.add(fName);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tCliMessager.getInstance().addMessage(\"\", EventKey.INFO_JAR_AND_XML_PROCESSED, jarPath, xmlFiles.toString());\n\t\t} catch (Exception e) {\n\t\t\t//TODO: add logging and print stacktrace for debugging\n\t\t\tthrow new MessagePassableException(EventKey.ERROR_EXTERNAL_JAR_NOT_READABLE, e, jarPath);\n\t\t}\n\n\t\treturn xmlFiles;\n\t}", "@Nonnull\n public List<Class<? extends PluginInterface>> loadPlugins(@Nonnull String pluginDirName) {\n\n List<Class<? extends PluginInterface>> plugins=new ArrayList<>();\n\n //Директория для просмотра файлов\n File pluginDirectory=new File(pluginDirName);\n File[] files=pluginDirectory.listFiles((dir, name) -> name.endsWith(PLUGIN_EXT));\n\n //Загрузка плагинов\n if(files!=null && files.length>0) {\n getPluginsClasses(files).forEach(className->{\n try {\n //Получим свой загрузчик файлов и загрузим с помощью него плагины\n Class cls=getClassLoaderByFilesURL(files)\n .loadClass(className\n .replaceAll(\"/\",\".\")\n .replace(\".class\",\"\"));\n\n //Если класс расширяет PluginInterface, то добавим этот класс в массив\n Class[] interfaces=cls.getInterfaces();\n for(Class intface:interfaces) {\n if(intface.equals(PluginInterface.class)) {\n plugins.add(cls);\n }\n }\n }\n catch (Exception e){\n e.printStackTrace();\n }\n });\n }\n\n return plugins;\n }", "public String[] readClasses();", "public static void main(String[] args) throws ClassNotFoundException {\n Class<Test.TestD> testDClass = Test.TestD.class;\n Class<Test.TestA> testAClass = Test.TestA.class;\n getClassHierarchy(testDClass);\n getClassHierarchyRecurs(testDClass, true);\n\n getClassInformation(testDClass);\n System.out.println();\n getClassInformation(testAClass);\n }", "public static void loadLibsFromJarPath(String jarPath)\n throws URISyntaxException, IOException {\n\n // Do we have a valid path?\n URL libsURL =\n NativeLibLoader.class\n .getClassLoader()\n .getResource(djinniNativeLibsJarPath);\n if (libsURL == null) { return; }\n\n // Are we actually referencing a jar path?\n if (!libsURL.toURI().getScheme().equals(\"jar\")) { return; }\n\n log.log(Level.FINE, \"Loading libs from jar path \" + jarPath);\n\n // Walk the directory and load libs\n FileSystem fs =\n FileSystems.newFileSystem(libsURL.toURI(), Collections.<String, String>emptyMap());\n Path myPath = fs.getPath(jarPath);\n\n DirectoryStream<Path> directoryStream = Files.newDirectoryStream(myPath);\n try {\n for (Path p : directoryStream) {\n loadLibFromJarPath(p);\n }\n } finally {\n directoryStream.close();\n }\n\n fs.close();\n }" ]
[ "0.6670555", "0.6670494", "0.6634323", "0.6533117", "0.6453535", "0.63663733", "0.6323596", "0.6318052", "0.6268942", "0.6265214", "0.62626594", "0.61919343", "0.6144118", "0.6103414", "0.60760075", "0.6062088", "0.601519", "0.60074484", "0.5990965", "0.59882337", "0.59854585", "0.5979236", "0.5967645", "0.5961049", "0.59567475", "0.5926968", "0.59203815", "0.59193003", "0.5908236", "0.5906334", "0.5888227", "0.5872268", "0.5853484", "0.58490837", "0.5832264", "0.5772018", "0.57318825", "0.56882775", "0.5668734", "0.56368595", "0.5632894", "0.5631732", "0.561992", "0.5586502", "0.55837035", "0.55018914", "0.5472935", "0.54631615", "0.5414748", "0.5410513", "0.5404597", "0.54013765", "0.5318151", "0.5314887", "0.5306637", "0.5291798", "0.52849597", "0.52677613", "0.5219764", "0.52069575", "0.5200058", "0.5191684", "0.51754224", "0.51653975", "0.5160818", "0.51183873", "0.5115729", "0.5100672", "0.50857925", "0.50816184", "0.50755024", "0.5049491", "0.5041304", "0.503883", "0.50019515", "0.49904916", "0.49881288", "0.49843916", "0.49557626", "0.4953164", "0.49342507", "0.4932671", "0.4908024", "0.49035084", "0.48960102", "0.4876997", "0.48514292", "0.48417157", "0.48412555", "0.4823324", "0.48092967", "0.4794623", "0.4790908", "0.47806117", "0.47723374", "0.47716147", "0.47687137", "0.47661337", "0.4760695", "0.47533768" ]
0.7070831
0
Instantiates a new road, given the parameters are valid.
@Override public void execute(RoadMap r) { Logger log = Logger.getLogger(NewHighwayEvent.class.getName()); log.info("Attempting to execute NewHighwayEvent..."); r.addRoad(createHighway(r)); log.info("Event executed"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RailRoad() {}", "public RoadTest()\n {\n }", "private Road()\n\t{\n\t\t\n\t}", "public Road(int x, int y, int width, int height)\n {\n screenWidth = width;\n screenHeight = height;\n xTopLeft = x;\n yTopLeft = y;\n }", "@Test\n public void constructor(){\n /**Positive tests*/\n Road road = new Road(cityA, cityB, 4);\n assertEquals(road.getFrom(), cityA);\n assertEquals(road.getTo(), cityB);\n assertEquals(road.getLength(), 4);\n }", "public Road(Place A, Place B)\n\t{\n\t\tEmpire roadEmpire = Empire.getInstance();\n\t\t\n\t\tint intXA, intYA, intXB, intYB;\n\t\tdouble xA, yA, xB, yB;\n\t\t\n\t\tintXA = A.getXPosition();\n\t\tintYA = A.getYPosition();\n\t\tintXB = B.getXPosition();\n\t\tintYB = B.getYPosition();\n\t\t\n\t\txA = (double) intXA;\n\t\tyA = (double) intYA;\n\t\txB = (double) intXB;\n\t\tyB = (double) intYB;\n\t\t\n\t\taPoint = new Point((int) xA, (int) yA);\n\t\tbPoint = new Point((int) xB, (int) yB);\n\t\t\n\t\taName = A.getName();\n\t\tbName = B.getName();\n\t\t\n\t\tlength = Math.sqrt((((xA-xB)*(xA-xB) + (yA - yB)*(yA - yB))));\n\t\tkFactor = (yB - yA)/(xB-xA);\n\t\t\n\t\troad.add(new Point(intXA, intYA));\n\t\t\n\t\tString keyA = String.valueOf(intXA) + \"-\" + String.valueOf(intYA);\n\t\tif(!roadEmpire.POINTS.containsKey(keyA));\n\t\t{\n\t\t\tMapPoint m = new MapPoint(intXA,intYA);\n\t\t\troadEmpire.POINTS.put(keyA, m);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif((xA == xB) && (yA == yB))\n\t\t{\n\t\t\tdirection = Direction.NONE;\n\t\t}\n\t\telse if(xA == xB)\n\t\t{\n\t\t\tif(yB > yA)\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdirection = Direction.NORTH;\n\t\t\t}\t\t\n\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x = (int) xA;\n\t\t\t\tint y;\n\t\t\t\t\n\t\t\t\tif(yB > yA)\n\t\t\t\t{\n\t\t\t\t\ty = ((int)yA) + i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ty = ((int)yA) - i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point(x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if(yA == yB)\n\t\t{\n\t\t\tif(xB > xA)\n\t\t\t{\n\t\t\t\tdirection = Direction.EAST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdirection = Direction.WEST;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x;\n\t\t\t\tint y = (int)yA;\n\t\t\t\t\n\t\t\t\tif(xB > xA)\n\t\t\t\t{\n\t\t\t\t\tx = ((int)xA) + i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = ((int)xA) - i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point(x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tif((xB > xA) && (yB > yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH_EAST;\n\t\t\t}\n\t\t\telse if((xB > xA) && (yB < yA))\n\t\t\t{\t\n\t\t\t\tdirection = Direction.NORTH_EAST;\n\t\t\t}\n\t\t\telse if((xB < xA) && (yB > yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH_WEST;\n\t\t\t}\n\t\t\telse if((xB < xA) && (yB < yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.NORTH_WEST;\n\t\t\t}\n\t\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x;\n\t\t\t\tint y;\n\t\t\t\t\n\t\t\t\tdouble c = (double) i;\n\t\t\t\tdouble a = c/(Math.sqrt((kFactor*kFactor + 1.0))); \n\t\t\t\tdouble b = Math.abs(a*kFactor);\n\t\t\t\t\n\t\t\t\tif((xB > xA) && (yB > yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA + a);\n\t\t\t\t\ty = (int)(yA + b);\n\t\t\t\t}\n\t\t\t\telse if((xB > xA) && (yB < yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA + a);\n\t\t\t\t\ty = (int)(yA - b);\n\t\t\t\t}\n\t\t\t\telse if((xB < xA) && (yB > yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA - a);\n\t\t\t\t\ty = (int)(yA + b);\n\t\t\t\t}\n\t\t\t\telse if((xB < xA) && (yB < yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA - a);\n\t\t\t\t\ty = (int)(yA - b);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = 100;\n\t\t\t\t\ty = 100;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point (x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t\t\n\t\troad.add(new Point(intXB, intYB));\n\t\t\n\t\tString keyB = String.valueOf(intXB) + \"-\" + String.valueOf(intYB);\n\t\tif(!roadEmpire.POINTS.containsKey(keyB));\n\t\t{\n\t\t\tMapPoint m = new MapPoint(intXB,intYB);\n\t\t\troadEmpire.POINTS.put(keyB, m);\n\t\t}\n\t}", "public RoadAgent(String startNode, String endNode, Point startPosition, Point endPosition, String roadBelongingType)\r\n\t{\r\n\t\tthis.startNode = startNode;\r\n\t\tthis.endNode = endNode;\r\n\t\tthis.startPosition = startPosition;\r\n\t\tthis.endPosition = endPosition;\r\n\t\tthis.roadBelongingType = roadBelongingType;\r\n\t}", "public Road(String name) {\n this.name = name;\n this.points = new ArrayList<>();\n }", "private TbusRoadGraph() {}", "public Road(String name, Junction from, Junction to) {\n this.name = name;\n this.from = from;\n this.to = to;\n }", "public Road(Village start, Village end, int cost) {\n\t\tleave = start;\n\t\tarrive = end;\n\t\ttoll = cost;\n\t}", "public void makeRoads()\r\n\t{\r\n\t\tfor(int i=0; i<roads.length; i++)\r\n\t\t\troads[i] = new Road(i*SCREEN_HEIGHT/20,SCREEN_WIDTH,SCREEN_HEIGHT/20-10);\r\n\t}", "public Road(String name, MapPoint mapPoint) {\n this.name = name;\n this.points = new ArrayList<>();\n this.mapPoint = mapPoint;\n }", "@Override\r\n\tpublic void buildRoad() {\n\t\t\r\n\t}", "public Route(String id, Station station1, Station station2, int length, Level level, Color color) {\n Preconditions.checkArgument(!station1.equals(station2));\n Preconditions.checkArgument(length >= MIN_ROUTE_LENGTH && length <= MAX_ROUTE_LENGTH);\n\n this.id = Objects.requireNonNull(id);\n this.station1 = Objects.requireNonNull(station1);\n this.station2 = Objects.requireNonNull(station2);\n this.level = Objects.requireNonNull(level);\n this.length = length;\n this.color = color;\n }", "public Route() {\n }", "public Route(City city1, City city2, int distance, double price) {\n this.city1 = city1;\n this.city2 = city2;\n this.distance = distance;\n this.price = price;\n }", "void buildRoad(EdgeLocation edge, boolean free);", "public RailRoad(String tileID, int boardIndex) {\n this.tileID = tileID;\n this.boardIndex = boardIndex;\n this.owner = null;\n this.cost = 200;\n this.group_color = \"rr\";\n this.group_number = 4;\n this.mortgaged = false;\n }", "public Highway createHighway(RoadMap r) {\n\t\tHighway newHighway;\n\t\ttry {\n\t\t\tnewHighway = new Highway(roadID, length, maxVel, verifyJunction(r,\n\t\t\t\t\tini), verifyJunction(r, end), lanes);\n\n\t\t} catch (IllegalArgumentException | ObjectNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Error: Could not create Highway \" + roadID + \" at time \"\n\t\t\t\t\t\t\t+ getTime() + \".\\n\" + e.getMessage(), e);\n\t\t}\n\t\treturn newHighway;\n\t}", "boolean CanUseRoadBuilder(EdgeLocation spot1, EdgeLocation spot2);", "public Road(Town source, Town destination, String name) {\r\n\t\tthis.source = source;\r\n\t\tthis.destination = destination;\r\n\t\tthis.vertices = new HashSet<Town>();\r\n\t\tvertices.add(source);\r\n\t\tvertices.add(destination);\r\n\t\t\r\n\t\tthis.name = name;\r\n\t}", "public Street (SimpleMap roadMap) {\n if (roadMap != null) roadMap.addToMap(this);\n }", "public Train(Location village1, Location village2) {\n this.start = village1;\n this.destination = village2;\n // when train is created, it is at the start location\n this.current = start;\n this.occupied = false;\n }", "TradeRoute(String aStartPoint, String anEndPoint, int anId){\n startPoint = aStartPoint;\n endPoint = anEndPoint;\n id = anId;\n }", "public Logic(List<Village> villageLis, List<Road> roadList) {\n this.villageList = villageLis;\n this.roadList = roadList;\n }", "public Train(int engineNumber,String companyName, int numberOfRailCars, String destinationCity) {\r\n\t\tthis.engineNumber = engineNumber;\r\n\t\tthis.companyName = companyName;\r\n\t\tthis.numberOfRailCars = numberOfRailCars;\r\n\t\tthis.destinationCity = destinationCity;\r\n\t}", "public RoutingProcessor(Network netIn)\r\n {\r\n network_topology = netIn;\r\n routing_method = \"SHP\";\r\n }", "SurfaceEntity createRoadEntity(Tile tile) {\r\n\t\tSurfaceEntity result = new SurfaceEntity();\r\n\t\tresult.tile = tile;\r\n\t\tresult.tile.alpha = alpha;\r\n\t\tresult.type = SurfaceEntityType.ROAD;\r\n\t\treturn result;\r\n\t}", "public Vehicle(){}", "public Routing(char local_name, NeighbourList neig, int period, \n int min_interval, String areas, String multi_addr, int multi_port,\n Router win, DatagramSocket ds, JTable tableObj) {\n this.local_name= local_name;\n this.areas= \"0\"; // this.areas= areas;\n if ((areas == null) || (areas.length()<1)) {\n Log2(\"Invalid areas in routing constructor\");\n this.rprocesses= null;\n } else {\n this.rprocesses= new HashMap<>();\n \n // Incomplete - This version ignores the areas introduced in the GUI \n // Plase modify to support multiple areas, if you have time !\n \n Log(\"routing class only supports one area for now!\\n\\tUsing only area 0\\n\");\n this.rprocesses.put('0', \n new RoutingProcess(this, win, neig, '0', period, min_interval)); \n }\n \n this.neig= neig;\n this.local_TTL= period+TTL_ADD;\n this.win= win;\n this.ds= ds;\n this.tableObj= tableObj;\n // Initialize everything\n this.mdaemon= new MulticastDaemon(ds, multi_addr, multi_port, win, this);\n this.main_rtab= null;\n Log2(\"new Routing(local='\"+local_name+\"', period=\"+period+\n \", min_interval=\"+min_interval+\")\");\n }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "public Airplane (){\n \n }", "Road(boolean h, MP m){\n\t\t time = m.getLifeTime();\n\t\t horizontal = h; \n\t\t _MP = m;\n\t\t endPosition = _MP.createRandom(_MP.getRoadLengthMin(), _MP.getRoadLengthMax());\n\t }", "public Road(Town source, Town destination, int weight, String name) {\r\n\t\tthis.source = source;\r\n\t\tthis.destination = destination;\r\n\t\tthis.vertices = new HashSet<Town>();\r\n\t\tvertices.add(source);\r\n\t\tvertices.add(destination);\r\n\t\t\r\n\t\tthis.weight = weight;\r\n\t\tthis.name = name;\r\n\t\t\r\n\t}", "public Flight(String name, int number, String home, String away) \n {\n airlineName = name;\n flightNumber = number;\n origin = home;\n destination = away;\n \n }", "public static route createroute(routeparameter aRouteparameter) {\n Partitioner<Text> partitioner = aRouteparameter.getPartitioner();\n HashMap<Integer, Integer> hashBucketToPartition = aRouteparameter\n .getHashBucketToPartition();\n HashMap<Integer, Integer> rangeRouter = aRouteparameter.getRangeRouter();\n if (hashBucketToPartition == null) {\n if (rangeRouter == null) {\n return new HashRoute(partitioner);\n } else {\n return new RangeRoute(rangeRouter);\n }\n } else {\n return new BalancerHashRoute(partitioner, hashBucketToPartition);\n }\n }", "public RoadAgentBehaviour(Agent a)\r\n\t\t{\r\n\t\t\tsuper(a);\r\n\t\t}", "@Test\n\tpublic void addRoadTest(){\n\t\tDjikstrasMap m = new DjikstrasMap();\t//Creates new DjikstrasMap object\n\t\tLocation l1 = new Location(\"Guildford\");\n\t\tLocation l2 = new Location(\"Portsmouth\");\n\t\t\n\t\tm.addRoad(\"Guildford\", \"Portsmouth\", 20.5, \"M3\");\t//Adds a road from Guildford to portsmouth to the map\n m.addRoad(\"Portsmouth\", \"Guildford\", 20.5, \"M3\");\n \n assertEquals(l1.getName(), m.getNode(\"Guildford\").getName());\t//Tests that the method added the roads correctly to teh map\n assertEquals(l2.getName(), m.getNode(\"Portsmouth\").getName());\n\t}", "public RouteSegment(GeoPoint startPoint, GeoPoint endPoint,\r\n\t\t\tint maneuverType, int distance) {\r\n\t\tthis.startPoint = startPoint;\r\n\t\tthis.endPoint = endPoint;\r\n\t\tthis.maneuverType = maneuverType;\r\n\t\tthis.distance = distance;\r\n\t}", "public Railroad(int location, int[] coord) {\n super.setValue(200);\n super.setCoord(coord);\n super.setLocation(location);\n }", "public Address() {}", "public Route(Point starting) {\n route = new ArrayList<>();\n route.add(starting);\n }", "Adresse createAdresse();", "@Test\n void calculateRoute() {\n GPSObject n2 = new GPSObject(\"Centenary 2\");\n Location n1 = new Location(\"Centenary 2\",\"0\",n2);\n GPSObject n3 = new GPSObject(\"Thuto 1-5\");\n Location n4 = new Location(\"Thuto 1-5\",\"1\",n3);\n Locations loc = new Locations();\n assertNotNull(roo.calculateRoute(loc));\n }", "public Vehicle() {}", "public RouteObject(\n NsiTopology topology,\n SimpleStp srcStpId,\n SimpleStp dstStpId,\n DirectionalityType directionality,\n Optional<StpListType> ero) throws WebApplicationException {\n\n // Each segment of the a path is assigned a route object with an A and Z end.\n Route route = new Route();\n\n // Get the set of possible source STP identifiers (a range could be provided).\n StpTypeBundle srcBundle = new StpTypeBundle(topology, srcStpId, directionality);\n if (srcBundle.isEmpty()) {\n log.error(\"RouteObject: source STP does not exist in topology: \" + srcStpId.toString());\n throw Exceptions.stpResolutionError(srcStpId.toString());\n }\n\n route.setBundleA(srcBundle);\n\n // Now we process any ERO elements if present.\n if (ero.isPresent()) {\n // We need to process the ERO in order that it was specified.\n List<OrderedStpType> orderedSTP = ero.get().getOrderedSTP();\n Collections.sort(orderedSTP, new CustomComparator());\n\n // Our first processed segment starts with our source STP.\n SimpleStp lastStp = srcStpId;\n\n for (OrderedStpType stp : orderedSTP) {\n // Parse this STP and generate a bundle enumerating all the STP. The\n // specified STP must exist in topology for a bundle to be generated.\n SimpleStp nextStp = new SimpleStp(stp.getStp());\n StpTypeBundle nextBundle = new StpTypeBundle(topology, nextStp, directionality);\n\n // If we did not find an associated bundle the specified ERO STP may\n // be an internal STP used for a domain's internal path computation.\n if (nextBundle.isEmpty()) {\n // The one rule we have is that an internal STP must be bounded by\n // at least one externally visible STP from the same domain. This\n // check is to see if the previous STP was in the same domain.\n //if (!nextStp.getNetworkId().equalsIgnoreCase(lastStp.getNetworkId())) {\n //log.error(\"RouteObject: Internal STP not bounded by external STP: \" + stp.getStp());\n //throw Exceptions.invalidEroError(stp.getStp());\n //}\n\n // Save this internal STP.\n route.addInternalStp(stp.getStp());\n }\n else {\n // We have an inter-domain STP so save it and get the SDP\n // so we know the STP on far end. We may need to filter some\n // of these out if there is no corresponding SDP (mismatching\n // labels on each end of the link).\n nextBundle = nextBundle.getPeerReducedBundle();\n if (nextBundle.isEmpty()) {\n log.error(\"RouteObject: ERO STP not associated with SDP: \" + stp.getStp());\n throw Exceptions.invalidEroError(stp.getStp());\n }\n\n // We have completed this path segment by finding a external\n // interdomain STP.\n route.setBundleZ(nextBundle);\n routes.add(route);\n\n // Now create the bundle associated with the other end of SDP.\n route = new Route();\n\n StpTypeBundle lastBundle = new StpTypeBundle();\n\n for (StpType member : nextBundle.values()) {\n SdpType sdp = topology.getSdp(member.getSdp().getId());\n if (sdp == null) {\n log.error(\"RouteObject: ERO STP not associated with valid SDP in context of request: \" + stp.getStp());\n throw Exceptions.invalidEroMember(stp.getStp());\n }\n if (member.getId().equalsIgnoreCase(sdp.getDemarcationA().getStp().getId())) {\n lastBundle.addStpType(topology.getStp(sdp.getDemarcationZ().getStp().getId()));\n }\n else {\n lastBundle.addStpType(topology.getStp(sdp.getDemarcationA().getStp().getId()));\n }\n }\n\n if (lastBundle.isEmpty()) {\n log.error(\"RouteObject: ERO STP not associated with SDP: \" + stp.getStp());\n throw Exceptions.invalidEroError(stp.getStp());\n }\n\n route.setBundleA(lastBundle);\n lastStp = lastBundle.getSimpleStp();\n }\n }\n }\n\n // Add the original destination endpoint after any inserted ERO points.\n StpTypeBundle dstBundle = new StpTypeBundle(topology, dstStpId, directionality);\n if (dstBundle.isEmpty()) {\n log.error(\"RouteObject: destination STP does not exist in topology: \" + dstStpId.toString());\n throw Exceptions.stpResolutionError(dstStpId.toString());\n }\n\n route.setBundleZ(dstBundle);\n\n // Add this last route to our list of one or more routes.\n routes.add(route);\n\n // We have completed building the ERO but need to check for internal\n // consistency.\n routes.forEach(r -> {\n StpTypeBundle bundleA = r.getBundleA();\n StpTypeBundle bundleZ = r.getBundleZ();\n SimpleStp stpA = bundleA.getSimpleStp();\n SimpleStp stpZ = bundleZ.getSimpleStp();\n\n String network = stpA.getNetworkId();\n for (OrderedStpType internalStp : r.getInternalStp()) {\n SimpleStp istp = new SimpleStp(internalStp.getStp());\n if (!istp.getNetworkId().equalsIgnoreCase(network)) {\n network = stpZ.getNetworkId();\n if (!istp.getNetworkId().equalsIgnoreCase(network)) {\n log.error(\"RouteObject: internal STP {} not a member of networkA {} or networkZ {}\",\n istp.getStpId(), stpA.getNetworkId(), stpZ.getNetworkId());\n throw Exceptions.invalidEroError(istp.getStpId());\n }\n }\n }\n });\n }", "public DriveTrain(int lf, int lr, int rf, int rr){\n this.left = new side(lf, lr);\n this.right = new side(rf, rr);\n }", "public Route(Route r){\n\t\tvisits.addAll(r.visits);\n\t\tarrivalTimes.addAll(r.arrivalTimes);\n\t\tdepartureTimes.addAll(r.departureTimes);\n\t\tlocked.addAll(r.locked);\n\t\tspeed = r.speed;\n\t}", "public Address(int doorNo, String streetName, String city, String zip, String state, String country) {\r\n\t\tsuper();\r\n\t\tthis.doorNo = doorNo;\r\n\t\tthis.streetName = streetName;\r\n\t\tthis.city = city;\r\n\t\tthis.zip = zip;\r\n\t\tthis.state = state;\r\n\t\tthis.country = country;\r\n\t}", "Vehicle createVehicle();", "Vehicle createVehicle();", "public Spatial(Location bl, Location br, Location tl, Location tr)\r\n {\r\n this.bl = (Location.Location2D)bl;\r\n this.br = (Location.Location2D)br;\r\n this.tl = (Location.Location2D)tl;\r\n this.tr = (Location.Location2D)tr;\r\n }", "public Address(String street, String city, String zipCode, String country)\n {\n //reference the object classes constructors\n this.street = street;\n this.city = city;\n this.zipCode = zipCode;\n this.country = country;\n }", "public Train createTrain(String id, String name, TrainType trainType, int topSpeed, Route route, int time, TrainDiagram diagram, int defaultStop) {\r\n Train train = diagram.createTrain(id);\r\n train.setNumber(name);\r\n train.setType(trainType);\r\n train.setTopSpeed(topSpeed);\r\n\r\n List<Pair<RouteSegment, Integer>> data = this.createDataForRoute(route);\r\n this.adjustSpeedsAndStops(data, train, topSpeed, defaultStop);\r\n\r\n int i = 0;\r\n TimeInterval interval;\r\n Node lastNode = null;\r\n\r\n for (Pair<RouteSegment, Integer> pair : data) {\r\n if (pair.first instanceof Node) {\r\n // handle node\r\n Node node = (Node)pair.first;\r\n interval = node.createTimeInterval(\r\n IdGenerator.getInstance().getId(),\r\n train, time, pair.second);\r\n lastNode = node;\r\n } else {\r\n // handle line\r\n Line line = (Line)pair.first;\r\n TimeIntervalDirection direction =\r\n (line.getFrom() == lastNode) ?\r\n TimeIntervalDirection.FORWARD :\r\n TimeIntervalDirection.BACKWARD;\r\n interval = line.createTimeInterval(\r\n IdGenerator.getInstance().getId(),\r\n train, time,\r\n direction, pair.second,\r\n this.computeFromSpeed(pair, data, i),\r\n this.computeToSpeed(pair, data, i));\r\n }\r\n\r\n // add created interval to train and set current time\r\n time = interval.getEnd();\r\n train.addInterval(interval);\r\n\r\n i++;\r\n }\r\n\r\n return train;\r\n }", "public Address() {\n\t}", "public static com.services.model.BusRoute create(long brId) {\n\t\treturn getPersistence().create(brId);\n\t}", "@PostConstruct\n public void initRoad(){\n LinearReference();\n }", "public TrainAbstract() {\n\t\tthis.id = \"\";\n\t\tthis.departure = new Departure();\n\t\tthis.arrivalTerminus = new ArrivalTerminus();\n\t\tthis.location = new Location(\"\", \"\");\n\t\tthis.stopPoints = new ArrayList<ArrivalStopPoint>();\n\t}", "public StreetAddress() {}", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "VehicleClass() {}", "public Vehicle() {\n\n\t}", "public EvolutionaryVehicleRouter() {\n super();\n initializeShippingPoints();\n individual_count = 0;\n generation_count = 0;\n }", "public AirAndPollen() {\n\n\t}", "Drone createDrone();", "public RoutingC2A()\r\n\t{\r\n\t\tsuper();\r\n\t}", "public Corrida(){\n\n }", "public Address() {\n }", "public Address() {\n }", "public Vehicle2D() {\n }", "public RoutingCommandImpl() {\n }", "public Address() {\r\n\t\tsuper();\r\n\t}", "public Address() {\n \t\n }", "public Trip() {}", "org.landxml.schema.landXML11.RoadsideDocument.Roadside addNewRoadside();", "public BicycleStation() {\n super();\n }", "public AvaliacaoRisco() {\n }", "public static Flyable newAircraft(String type, String name, int longitude, int latitude, int height){\n Flyable flyable = null;\n\n Coordinates coordinates = new Coordinates(longitude, latitude, height);\n\n if (type.equals(\"Helicopter\")){\n flyable = new Helicopter(name, coordinates);\n } else if (type.equals(\"JetPlane\")){\n flyable = new JetPlane(name, coordinates);\n } else if (type.equals(\"Baloon\")){\n flyable = new Baloon(name, coordinates);\n }\n\n return flyable;\n }", "public Address() {\n\t\tsuper();\n\n\t}", "public TransitRouteLine createFromParcel(Parcel parcel) {\n return new TransitRouteLine(parcel);\n }", "FuelingStation createFuelingStation();", "public Train(){\n}", "public DSRRoutingHeader(DSRRoutingHeader header) \n {\n super(header);\n validRoute = header.validRoute;\n protocoll = header.protocoll;\n setTargetLocation(header.targetLocation);\n }", "@Test\r\n\tpublic void constructorTests() {\n\t\tLibraryNode ln = ml.createNewLibrary(\"http://example.com/resource\", \"RT\", pc.getDefaultProject());\r\n\t\tBusinessObjectNode bo = ml.addBusinessObjectToLibrary(ln, \"MyBo\");\r\n\t\tNode node = bo;\r\n\t\tTLResource mbr = new TLResource();\r\n\t\tmbr.setName(\"MyTlResource\");\r\n\t\tmbr.setBusinessObjectRef(bo.getTLModelObject());\r\n\r\n\t\t// When - used in LibraryNode.generateLibrary()\r\n\t\tTLResource tlr = new ResourceBuilder().buildTL(); // get a populated tl resource\r\n\t\ttlr.setBusinessObjectRef(bo.getTLModelObject());\r\n\t\tResourceNode rn1 = new ResourceNode(tlr, ln);\r\n\r\n\t\t// When - used in tests\r\n\t\tResourceNode rn2 = ml.addResource(bo);\r\n\r\n\t\t// When - used in NodeFactory\r\n\t\tResourceNode rn3 = new ResourceNode(mbr);\r\n\t\tln.addMember(rn3);\r\n\r\n\t\t// When - used in ResourceCommandHandler to launch wizard\r\n\t\tResourceNode rn4 = new ResourceNode(node.getLibrary(), bo);\r\n\t\t// When - builder used as in ResourceCommandHandler\r\n\t\tnew ResourceBuilder().build(rn4, bo);\r\n\r\n\t\t// Then - must be complete\r\n\t\tcheck(rn1);\r\n\t\tcheck(rn2);\r\n\t\tcheck(rn3);\r\n\t\tcheck(rn4);\r\n\t}", "public Refueling(int orderID, String ownerID, String carNumber, String gasStation, String address, String gasType,\r\n\t\t\tString rateForLiter, String qunatity, String price, String date, String pumpNumber, String service,\r\n\t\t\tString time, String saleID) {\r\n\t\tsuper();\r\n\t\tOrderID = orderID;\r\n\t\tthis.ownerID = ownerID;\r\n\t\tCarNumber = carNumber;\r\n\t\tGasStation = gasStation;\r\n\t\tthis.address = address;\r\n\t\tGasType = gasType;\r\n\t\tRateForLiter = rateForLiter;\r\n\t\tQunatity = qunatity;\r\n\t\tPrice = price;\r\n\t\tDate = date;\r\n\t\tthis.pumpNumber = pumpNumber;\r\n\t\tthis.service = service;\r\n\t\tthis.time = time;\r\n\t\tthis.saleID = saleID;\r\n\t}", "public Vehicle() {\n }", "private boolean addRoad(\n String fromName, String toName, double roadDistance, String roadName\n ) {\n Vertex<String> from = addLocation(fromName);\n Vertex<String> to = addLocation(toName);\n\n // Add the road to the network - We assume all roads are two-way and\n // ignore if we've already added the road as a reverse of another\n try {\n\n Edge<String> road = graph.insert(from, to, roadName);\n Edge<String> backwardsRoad = graph.insert(to, from, roadName);\n\n // Label each road with it's weight\n graph.label(road, roadDistance);\n graph.label(backwardsRoad, roadDistance);\n\n } catch (InsertionException ignored) {\n return false;\n }\n\n return true;\n }", "public void testCtor1_NullNewWayPoint() {\n try {\n new WayPointEvent(edge, null, offset);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public RoadSign() {\n super(0, 0, \"roadsign_speed_50.png\");\n }", "public TopologyLib() {\n }", "private Destination createDestination(String originCode, TopRoute route) {\n\t\tString countryCode = cityService.getCountry(originCode);\n\t\tFlight flight = flightService.cheapestFlightReader(countryCode, route.getFrom(), route.getTo());\n\t\tDestination destination = new Destination(route.getTo(), flight);\n\t\treturn destination;\n\t}", "public DriveTrain(side left, side right){\n this.left = left;\n this.right = right;\n this.gear = new twoSpeed();\n }", "public Location() {\n\t}", "public Train createTrain(int number, int capacity, int velocity){\n Train train = new Train();\n train.setNumber(number);\n train.setCapacity(capacity);\n train.setVelocity(velocity);\n return train;\n }", "Parking createParking();", "Address createAddress();", "public Checking(String n, String h, float min, float over, String route) {}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\r\n System.out.println(\"How many roads?\");\r\n int roadSpawns = scanner.nextInt();\r\n System.out.println(\"How many cars?\");\r\n int carSpawns = scanner.nextInt();\r\n // Store adjacent paths\r\n List<String> connectedRoad = new ArrayList<>();\r\n List<TrafficLight> lights = new ArrayList<>();\r\n\r\n //Create objects:\r\n System.out.println(\"Object Creation:\\n---------------------\");\r\n System.out.println(\"Roads:\");\r\n ArrayList<Road> roads = new ArrayList<>();\r\n for (int i = 0; i < roadSpawns; i++) {\r\n System.out.println(\"Please input parameters for road_\" + i + \"...\");\r\n System.out.print(\"Length:\");\r\n int lengthInput = scanner.nextInt();\r\n int speedLimitInput = (new Random()).nextInt(11);\r\n roads.add(new Road(Integer.toString(i), speedLimitInput, lengthInput, new int[]{0, 0}));\r\n System.out.println(\"Please input connected roads of road_\" + i + \"...(like:0,1,2...)\");\r\n String infos = scanner.next();\r\n connectedRoad.add(infos);\r\n }\r\n System.out.println(\"\\nRoads;\");\r\n for (Road road : roads) {\r\n road.printRoadInfo();\r\n }\r\n\r\n // Set up TrafficLight at road junctions\r\n for (int i = 0; i < connectedRoad.size(); i++) {\r\n TrafficLight trafficLight = null;\r\n if (roads.get(i).getLightsOnRoad().size() > 0) trafficLight = roads.get(i).getLightsOnRoad().get(0);\r\n else {\r\n long currentTime = new Date().getTime();\r\n trafficLight = new TrafficLight(String.valueOf(currentTime), roads.get(i));\r\n roads.get(i).addTrafficLight(trafficLight);\r\n lights.add(trafficLight);\r\n }\r\n for (String s : connectedRoad.get(i).split(\",\")) {\r\n roads.get(i).addConnectRoad(roads.get(Integer.parseInt(s)));\r\n if (roads.get(Integer.parseInt(s)).getLightsOnRoad().size() > 0) continue;\r\n else roads.get(Integer.parseInt(s)).addTrafficLight(trafficLight);\r\n }\r\n }\r\n\r\n System.out.println(\"\\nCars;\");\r\n ArrayList<Car> cars = new ArrayList<>();\r\n for (int i = 0; i < carSpawns; i++) {\r\n // random add bus or motorbke\r\n if ((new Random()).nextInt(10) <= 5) {\r\n cars.add(new Bus(Integer.toString(i), roads.get(0)));\r\n } else {\r\n cars.add(new Motorbike(Integer.toString(i), roads.get(0)));\r\n }\r\n cars.get(i).printCarStatus();\r\n }\r\n\r\n // Let car run\r\n int time = 0;\r\n System.out.print(\"\\nSet time scale in milliseconds:\");\r\n int maxtime = scanner.nextInt();\r\n while (true) {\r\n // change trafficlight state\r\n for (TrafficLight light : lights) {\r\n light.chageState();\r\n }\r\n for (Car car : cars) {\r\n car.move();\r\n car.printCarStatus();\r\n }\r\n time = time + 1;\r\n System.out.println(time + \" Seconds have passed.\\n\");\r\n if (time >= maxtime) {\r\n System.out.println(\"timeout\");\r\n break;\r\n }\r\n }\r\n }", "public void testCtor1() {\n assertNotNull(\"Failed to create a new WayPointEvent instance.\", new WayPointEvent(edge, wayPoint, offset));\n }" ]
[ "0.6993017", "0.69391114", "0.6935618", "0.6786998", "0.6721721", "0.6502", "0.63948846", "0.63908285", "0.61795944", "0.6148094", "0.59968984", "0.58973473", "0.5863069", "0.5858804", "0.5787007", "0.5768228", "0.5750305", "0.573471", "0.5618859", "0.56014866", "0.5598056", "0.5588849", "0.5580592", "0.5559922", "0.55000514", "0.5487159", "0.5486719", "0.54725367", "0.54583347", "0.5446009", "0.5399583", "0.5395541", "0.5388485", "0.53660476", "0.5350321", "0.5347956", "0.5337327", "0.5331582", "0.5319265", "0.53096825", "0.53040355", "0.52811337", "0.52798796", "0.5278498", "0.52729005", "0.5271955", "0.52579373", "0.5247369", "0.52364695", "0.5234556", "0.523422", "0.523422", "0.52260834", "0.5215174", "0.521221", "0.52121663", "0.5207832", "0.51973593", "0.51757485", "0.51641506", "0.51641095", "0.5152142", "0.51374424", "0.5136843", "0.51355386", "0.5133034", "0.51246023", "0.5116233", "0.5112783", "0.5112783", "0.51123905", "0.5091204", "0.5078998", "0.50777", "0.50775313", "0.5072583", "0.50723326", "0.50700784", "0.5068889", "0.5068462", "0.5066561", "0.50631815", "0.50558156", "0.50495267", "0.5043869", "0.50426793", "0.50408196", "0.50403446", "0.5033623", "0.50325507", "0.5021076", "0.50138277", "0.5004785", "0.50045776", "0.49961612", "0.49904343", "0.49684265", "0.4963945", "0.4963033", "0.49553487", "0.49531782" ]
0.0
-1
Creates a new Highway with the event parameters, if possible.
public Highway createHighway(RoadMap r) { Highway newHighway; try { newHighway = new Highway(roadID, length, maxVel, verifyJunction(r, ini), verifyJunction(r, end), lanes); } catch (IllegalArgumentException | ObjectNotFoundException e) { throw new IllegalArgumentException( "Error: Could not create Highway " + roadID + " at time " + getTime() + ".\n" + e.getMessage(), e); } return newHighway; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic NewHighwayEvent build(IniSection ini) {\n\t\t\tNewHighwayEvent event = null;\n\t\t\tint lanes;\n\n\t\t\tif (TAG.equals(ini.getTag()) && isCorrectType(ini, TYPE)) {\n\t\t\t\ttry {\n\t\t\t\t\tLogger log = Logger.getLogger(NewHighwayEvent.class\n\t\t\t\t\t\t\t.getName());\n\t\t\t\t\tlog.info(\"Attempting to parse NewHighwayEvent...\");\n\n\t\t\t\t\tNewRoadEvent ev = super.build(ini);\n\t\t\t\t\tlanes = parsePositiveInt(ini, \"lanes\");\n\t\t\t\t\tevent = new NewHighwayEvent(ev, lanes);\n\n\t\t\t\t\tlog.info(\"Event parsed\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\tEVENT_PARSE_ERROR_MSG + e.getMessage(), e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}", "public void testCtor1() {\n assertNotNull(\"Failed to create a new WayPointEvent instance.\", new WayPointEvent(edge, wayPoint, offset));\n }", "public void testCtor2() {\n assertNotNull(\"Failed to create a new WayPointEvent instance.\", new WayPointEvent(edge, 0, offset));\n }", "Hazard createHazard();", "WithCreate withDestination(EventChannelDestination destination);", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "FuelingStation createFuelingStation();", "Event createEvent();", "Event createEvent();", "EthHandler create(EthVersion version);", "public void createHallway(int len) {\n createRoom(len, 0, 0);\n }", "@Override\n\tpublic void execute(RoadMap r) {\n\t\tLogger log = Logger.getLogger(NewHighwayEvent.class.getName());\n\t\tlog.info(\"Attempting to execute NewHighwayEvent...\");\n\t\tr.addRoad(createHighway(r));\n\t\tlog.info(\"Event executed\");\n\t}", "Weather create(WeatherInformation weatherInformation);", "private Hallway hallWayCreatorFromHallway(Hallway hallway) {\n int width;\n int height;\n if (hallway.orientation.equals(\"up\") || hallway.orientation.equals(\"down\")) {\n width = 3;\n height = hallway.length;\n } else {\n width = hallway.length;\n height = 3;\n }\n\n int randside = r.nextInt(hallway.sides.size());\n String direction = hallway.sides.remove(randside);\n Hallway modifiedhallway = hallway;\n String before = hallway.previousobject;\n\n\n return hallWayCreator(modifiedhallway.bottomleft, width, height, direction, before, true);\n }", "private IEdge<S> createEdge(final S symbol_, final Integer state_)\n\t{\n\t\treturn new Edge<>(symbol_, state_);\n\t}", "EventChannel create();", "public void create(Rule event);", "private static Event makeEvent(GreenhouseControls gc,Map.Entry<String, Long> me) {\r\n\t\tString key = me.getKey();\r\n\t\tLong value = me.getValue();\r\n\t\tif(\"Bell\".equals(key))\r\n\t\t\treturn gc.new Bell(value);\r\n\t\tif(\"LightOn\".equals(key))\r\n\t\t\treturn gc.new LightOn(value);\r\n\t\tif(\"LightOff\".equals(key))\r\n\t\t\treturn gc.new LightOff(value);\r\n\t\tif(\"WaterOn\".equals(key))\r\n\t\t\treturn gc.new WaterOn(value);\r\n\t\tif(\"WaterOff\".equals(key))\r\n\t\t\treturn gc.new WaterOff(value);\r\n\t\tif(\"ThermostatDay\".equals(key))\r\n\t\t\treturn gc.new ThermostatDay(value);\r\n\t\tif(\"ThermostatNight\".equals(key))\r\n\t\t\treturn gc.new ThermostatNight(value);\r\n\t\treturn null;\r\n\t}", "interface WithCreate\n extends DefinitionStages.WithSource,\n DefinitionStages.WithDestination,\n DefinitionStages.WithExpirationTimeIfNotActivatedUtc,\n DefinitionStages.WithFilter,\n DefinitionStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n EventChannel create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n EventChannel create(Context context);\n }", "public\n CreateEvent()\n {}", "EventUse createEventUse();", "BoundaryEvent createBoundaryEvent();", "ShipmentGatewayDhl createShipmentGatewayDhl();", "@Override\n\tpublic EventDto createEvent(EventDto event) {\n\t\tEventEntity eventEntity=new EventEntity();\n\t\tBeanUtils.copyProperties(event, eventEntity);\n\t\t\n\t\tString eventid=utils.generateEventId(20);\n\t\teventEntity.setEventid(eventid);\n\t\t\n\t\tEventEntity storedEvent=eventRepository.save(eventEntity);\n\t\t\n\t\tEventDto returnvalue=new EventDto();\n\t\tBeanUtils.copyProperties(storedEvent, returnvalue);\n\t\t\n\t\treturn returnvalue;\n\t}", "void objectCreated (HyperEdge hedge);", "public interface NewObjectListener extends EventListener {\r\n //~ Methods ////////////////////////////////////////////////////////////////\r\n\r\n /**\r\n * Called when an new HyperEdge has just been created.\r\n * @param hedge the newly created HyperEdge.\r\n * hedge should be in a well-defined state with all required\r\n * fields and attributes set.\r\n *\r\n * <P>Note that since this callback may be invoked while in the\r\n * middle of making major object changes, care must be taken in\r\n * examining and modifying arbitrary HyperEdges while in this\r\n * callback. You should always check the state any objects (using\r\n * isState()) you wish to examine or modify before actually\r\n * examining or modifying them.\r\n */\r\n void objectCreated (HyperEdge hedge);\r\n}", "@Transactional\n public EventTO createEvent(EventTO eventTO) {\n LOGGER.info(\"start of createEvent\");\n LOGGER.trace(\" create new event entity\");\n Event event = new Event();\n LOGGER.trace(\" mapping simple data types\");\n //map simple data types\n event.setName(eventTO.getName());\n if (eventTO.hasDescription()) { event.setDescription(eventTO.getDescription());}\n event.setDatetime(eventTO.getDatetime());\n event.setRadius(eventTO.getRadius());\n event.setLongitude(eventTO.getLongitude());\n event.setLatitude(eventTO.getLatitude());\n //map business user\n LOGGER.trace(\" mapping Business User {}\", eventTO.getBusinessUserId());\n BusinessUser businessUser = businessUserService.getBusinessUser(eventTO.getBusinessUserId());\n event.setBusinessUserId(businessUser);\n //map preferences\n if (eventTO.hasPreferences()) {\n LOGGER.trace(\" mapping preferences\");\n LOGGER.trace(\" create prefrences from eventTO\");\n preferenceService.createPreferencesFromEvent(eventTO);\n for (Preference p : eventTO.getPreferences()) {\n Preference preference = preferenceService.getPrefernceByValue(p.getValue()).get();\n LOGGER.trace(\" mapping preference {}-{}\", preference.getId(), preference.getValue());\n event.addPreference(preference);\n }\n }\n event = eventRepository.save(event);\n LOGGER.info(\"new event with id {} successfully created\", event.getId());\n EventTO newEventTO = mapperService.convertToEventTO(event);\n eventProducer.sendNewEvent(newEventTO);\n return newEventTO;\n }", "public NodeEvent() {\n\t\tthis(new Note(), DEFAULT_LIKELIHOOD);\n\t}", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "public EventoWS() {\n }", "WithCreate withSource(EventChannelSource source);", "public void testCtor1_NullNewWayPoint() {\n try {\n new WayPointEvent(edge, null, offset);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public Event() {\r\n\r\n\t}", "ProgramEventEvent createProgramEventEvent();", "EventUses createEventUses();", "Elevage createElevage();", "public Event() {}", "public static Payout create(Map<String, Object> params) throws PayabbhiException {\n//\t\tSystem.out.println(toJSONString(params));\n\t\treturn request(Method.POST, urlFor(Payout.class), params, Payout.class);\n\t}", "public Event() {\n\t}", "public LogEvent newInstance()\n {\n return new LogEvent();\n }", "public QPEvent(Event event) {\n this.eventName = event.getEventName();\n this.eventTime = event.getEventTime();\n this.eventType = event.getEventType();\n this.parameters = event.getParameters();\n this.unitId = event.getUnitId();\n if (event.getParameters() != null) {\n for (String key : event.getParameters().keySet()) {\n this.setParameter(key, event.getParameters().get(key));\n }\n }\n }", "public Event() {\n\n }", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "Lehrkraft createLehrkraft();", "H create(Method method);", "private IEvent createEvent() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\treturn mch.createChild(IEvent.ELEMENT_TYPE, null, null);\n\t}", "public Edge createEdge(String description, int sourceId, int destId, int weight) throws SQLException {\n\t\tVertex source = findVertById(sourceId);\n\t\tVertex destination = findVertById(destId);\n\t\tEdge newEdge = new Edge(description, weight, destination, source);\n\t\treturn rDb.createEdge(newEdge);\n\t}", "@Override\n\tpublic void describe(Map<String, String> out) {\n\t\tsuper.describe(out);\n\t\tout.put(\"Type\", \"New Highway \" + roadID);\n\t}", "private void createEvents() {\n\t}", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "void addWay(Way w) {\n ways.put(w.id, w);\n }", "public ListenerModel(Hauptfenster hauptfenster) {\n this.hauptfenster = hauptfenster;\n }", "EventChannel create(Context context);", "public Event() {\n }", "public Event() {\n }", "@Override\n public SoapEvent create(SoapEvent event) {\n throw new UnsupportedOperationException();\n }", "BasicEvent createBasicEvent();", "WithCreate withFilter(EventChannelFilter filter);", "H3 createH3();", "protected Item createItem(Variable var, float w, float h, int event) {\n return new Plot(var, w, h, false/*defaultAnimation(event)*/);\n }", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "public Event(){\n \n }", "public static Event createEntity(EntityManager em) {\n Event event = new Event()\n .name(DEFAULT_NAME)\n .gpx(DEFAULT_GPX)\n .gpxContentType(DEFAULT_GPX_CONTENT_TYPE)\n .kmRoute(DEFAULT_KM_ROUTE)\n .timeRoute(DEFAULT_TIME_ROUTE)\n .date(DEFAULT_DATE)\n .descripction(DEFAULT_DESCRIPCTION)\n .observacionsPrev(DEFAULT_OBSERVACIONS_PREV);\n return event;\n }", "WithCreate withHyperVGeneration(HyperVGeneration hyperVGeneration);", "public void testCtor1_NullEdge() {\n try {\n new WayPointEvent(null, wayPoint, offset);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "EventBinding createEventBinding();", "public void create(T e);", "public static FailureLogEvent create(final long pStartTime)\n {\n return new FailureLogEvent(pStartTime); \n }", "EntryPoint createEntryPoint();", "Event generateEventWithName(String description) throws Exception {\n fordate++;\n return new Event(\n new Description(description),\n new StartTime(\"0800\"),\n new StartDate(Integer.toString(Integer.parseInt(\"100301\") + fordate)),\n new EndTime(\"1200\"),\n new EndDate(Integer.toString(Integer.parseInt(\"100301\") + fordate)),\n new Location(\"House of 1\"),\n new UniqueTagList(new Tag(\"tag\"))\n );\n }", "public Event(){\n\n }", "void addEdge(SimpleVertex vertexOne, SimpleVertex vertexTwo, int weight) {\n\n\t\tSimpleEdge edge = new SimpleEdge(vertexOne, vertexTwo);\n\t\tedge.weight = weight;\n\t\t// edgeList.add(edge);\n\t\t// System.out.println(edge);\n\t\tvertexOne.neighborhood.add(edge);\n\n\t}", "public ConditionEventSystem(Petrinet petrinet) {\n super(petrinet.name, petrinet.places, petrinet.transitions, petrinet.flow, petrinet.mue0,\n new Marking(petrinet.mue0.getDimension(), 1));\n }", "private static FlinkKinesisFirehoseProducer<String> createFirehoseSinkFromApplicationProperties() throws IOException {\n\n\t\tMap<String, Properties> applicationProperties = KinesisAnalyticsRuntime.getApplicationProperties();\n\t\tFlinkKinesisFirehoseProducer<String> sink = new FlinkKinesisFirehoseProducer<>(outputStreamName, new SimpleStringSchema(),\n\t\t\t\tapplicationProperties.get(\"ProducerConfigProperties\"));\n\t\treturn sink;\n\t}", "public static Hall newInstance(String param1, String param2) {\n Hall fragment = new Hall();\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 Shape createEdge() {\n\t\tEdge edge = (Edge)shapeFactory.getShape(ShapeFactory.EDGE);\n\t\tEdgeLabel edgeLabel = (EdgeLabel) shapeFactory.getShape(ShapeFactory.EDGE_LABEL);\n\t\tedgeLabel.setEdge(edge);\n\t\tedge.setEdgeLabel(edgeLabel);\n\t\tshapes.add(edgeLabel);\n\t\tadd(edgeLabel);\n\t\treturn edge;\n\t}", "void buildRoad(EdgeLocation edge, boolean free);", "Schule createSchule();", "public Edge(String[] details){\n\t\tthis.EDGE_ID = Integer.parseInt(details[0]);\n\t\tthis.edgeWeight = Integer.parseInt(details[1]);\n\t}", "@Transactional\n\tpublic Event createEvent(String name, String eventDate, String startTime, String endTime, String startLocation, String endLocation, String carType, String driveType, String makeOfCar, Integer meterPerStop, Integer availableSeats) {\n\t\tEvent event= new Event();\n\t\tjava.util.Date tmpDate = null;\n\t\ttry {\n\t\t\t//\"01 NOVEMBER 2018\"\n\t\t\ttmpDate = new SimpleDateFormat(\"dd MMM yyyy\").parse(eventDate);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//\"10:34:34\"\n\t\tjava.sql.Date sqlDate = new java.sql.Date(tmpDate.getTime());\n\t\tTime sqlStart = Time.valueOf(startTime);\n\t\tTime sqlEnd = Time.valueOf(endTime);\n\t\tevent.setName(name);\n\t\tevent.setEventDate(sqlDate);\n\t\tevent.setStartTime(sqlStart);\n\t\tevent.setEndTime(sqlEnd);\n\t\tevent.setStartLocation(startLocation);\n\t\tevent.setEndLocation(endLocation);\n\t\tevent.setCarType(carType);\n\t\tevent.setDriveType(driveType);\n\t\tevent.setMakeOfCar(makeOfCar);\n\t\tevent.setMeterPerStop(meterPerStop);\n\t\tevent.setSeats(availableSeats);\n\t\tentityManager.persist(event);\n\t\treturn event;\n\t}", "ChargingStation createChargingStation();", "public void createEvent(Event e) {\n\t\tLocalDate date = e.sDate;\n\t\tif(!map.containsKey(date)) {\n\t\t\tArrayList<Event> newList = new ArrayList<>();\n\t\t\tnewList.add(e);\n\t\t\tmap.put(date, newList);\n\t\t}\n\t\telse {\n\t\t\tmap.get(date).add(e);\n\n\t\t}\n\t}", "public void testCtor2_NullEdge() {\n try {\n new WayPointEvent(null, 0, offset);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Override\n\tprotected void initLateralWeightParams(final Space extendedSpace) throws CommandLineFormatException\n\t{\n\t\thppa = command.get(CNFTCommandLine.WA);\n\t\thpA = command.get(CNFTCommandLine.IA);\n\t\taddParameters(hppa,hpA);\n\t\taddParameters(command.get(CNFTCommandLine.LEARNING_RATE));\n\t}", "@Override\n\tpublic Trunk create(final List<NameValuePair> params) throws TwilioRestException {\n\t\tfinal TwilioRestResponse response = getClient().safeRequest(getResourceLocation(), \"POST\", params);\n\t\treturn makeNew(getClient(), response.toMap());\n\t}", "public Event createPublish(Address resource, String event, int expires);", "ANDGateway createANDGateway();", "Vertex createVertex();", "protected abstract void createHistoryEvents();", "Event generateEvent(int seed) throws Exception {\n return new Event(\n new Description(\"Event \" + seed),\n new StartTime(\"0900\"),\n new StartDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new EndTime(\"1100\"),\n new EndDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new Location(\"House of \" + seed),\n new UniqueTagList(new Tag(\"tag\" + Math.abs(seed)), new Tag(\"tag\" + Math.abs(seed + 1)))\n );\n }", "public DispatchRouteHistoricalEntryBuilder() {\r\n dispatchRouteHistoricalEntry = new DispatchRouteHistoricalEntry();\r\n }", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.WeatherParametersType addNewWeatherParameters()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.WeatherParametersType target = null;\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.WeatherParametersType)get_store().add_element_user(WEATHERPARAMETERS$8);\n return target;\n }\n }", "public CoasterCreateNodeEvent(Player who, TrackNode node) {\n super(who, node);\n }", "public static EventHistoryFragment newInstance(String param1, String param2) {\n\t\tEventHistoryFragment fragment = new EventHistoryFragment();\n\t\treturn fragment;\n\t}", "@Override\n\tpublic Trunk create(final Map<String, String> params) throws TwilioRestException {\n\t\tfinal TwilioRestResponse response = getClient().safeRequest(getResourceLocation(), \"POST\", params);\n\t\treturn makeNew(getClient(), response.toMap());\n\t}", "public interface HTTPIOFactory {\n HTTPIO createNew();\n}", "void onNewEvent(Event event);", "public final void onCreate(android.os.Bundle param0) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onCreate(param0)\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onCreate(param0);\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onCreate(param0)\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onCreate(param0);\n }\n }", "Anywhere createAnywhere();" ]
[ "0.5620142", "0.54069424", "0.53946036", "0.53168833", "0.5289115", "0.5284529", "0.5260383", "0.5253013", "0.5253013", "0.52275777", "0.5189571", "0.5157627", "0.5071005", "0.5054662", "0.50031567", "0.4997943", "0.4965337", "0.49394593", "0.49226588", "0.49147186", "0.49040604", "0.49012557", "0.48974162", "0.4875295", "0.48525593", "0.48421624", "0.48296446", "0.48196316", "0.48072693", "0.48044893", "0.47951454", "0.47839442", "0.47716954", "0.47522452", "0.47484154", "0.47326425", "0.47293186", "0.47238985", "0.47195405", "0.47054338", "0.4697892", "0.4692197", "0.46686843", "0.46674538", "0.46664205", "0.4662539", "0.46403185", "0.4639421", "0.46386385", "0.46351746", "0.46342197", "0.4617456", "0.46128124", "0.46105456", "0.46068302", "0.46068302", "0.45970166", "0.4596856", "0.45807427", "0.45799166", "0.45772365", "0.4574486", "0.45671833", "0.45636922", "0.45636457", "0.45574504", "0.4553863", "0.45475572", "0.454542", "0.45298985", "0.45273295", "0.45134902", "0.4504385", "0.45033535", "0.44960305", "0.44912085", "0.44894287", "0.4485072", "0.44836107", "0.4483204", "0.44694552", "0.44673878", "0.4466496", "0.4464488", "0.44509774", "0.44508782", "0.44504777", "0.44469497", "0.44449353", "0.44437084", "0.44410264", "0.44348836", "0.4430396", "0.44293725", "0.44273636", "0.44257826", "0.4413237", "0.4412323", "0.44121864", "0.44078735" ]
0.65592253
0
Return a description of the event.
@Override public void describe(Map<String, String> out) { super.describe(out); out.put("Type", "New Highway " + roadID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getEventDescription() {\n\t\treturn description;\n\t}", "private String getEventDescription(Event event) {\n String day = getDayDescription(event);\n String typeOfEvent = getEventType(event);\n String description = day + \" \" + typeOfEvent + event.getName();\n if (description.length() > 18) {\n return description.substring(0, 16) + \"...\";\n }\n return description;\n }", "public String getEventTypeDescription()\n {\n return eventTypeDescription;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn this.event;\r\n\t}", "private String makeEventDescription(String description) {\n return \"DESCRIPTION:\" + description + \"\\n\";\n }", "@ApiModelProperty(value = \"The event long description\")\n public String getDescription() {\n return description;\n }", "public String getEventInfo()\n {\n return \"Event ID: \" + this.hashCode() + \" | Recorded User\\n\" + String.format(\"\\tName %s \\n\\tDate of Birth %s \\n\\tEmail %s \\n\\tContact Number %s \\n\\tAge %d \\nDate %s \\nTime %s \\nParty Size %d \\nEstablishment \\n\\tName: %s \\n\\tAddress: %s\",\n user.getName(), user.getDateOfBirthAsString(), user.getEmail(), user.getPhoneNumber(), \n user.getAge(), getEventDateAsString(), getEventTimeAsString(), partyNumber, establishment.getName(), establishment.getAddress());\n }", "public String getEventInfo() {\n\t\treturn String.format(\"%s, which now has %s participant(s)\",\n\t\t\tthis.title, this.participants);\n\t}", "@Override\r\n\tpublic String getDescription() {\n\t\treturn description;\r\n\t}", "@Override\r\n\tpublic String getDescription() {\n\t\treturn this.description;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn this.getStringEventId();\n\t}", "@Override\n public String getDescription() {\n return this.description;\n }", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "@Override\n\tpublic String getDescription() {\n\t\treturn description;\n\t}", "public String getDescription(){\n return getString(KEY_DESCRIPTION);\n }", "public String getDescription() {\n return description; // returns the appointment's description\n }", "@Override\n public String getDescription()\n {\n return m_description;\n }", "public String getDescription() {\n return getString(KEY_DESCRIPTION);\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return description;\n }", "@Override\n\tpublic String toString() {\n\t\t\n\t\treturn \"[ \"+ event_code + \",\"+ insert_ts + \" ] = \" + short_description ;\n\t\t\n//\t\treturn \"[ \\\"event_code\\\" : \" + \"\\\"\" + event_code + \"\\\" , \\\"update_TS\\\" : \" + \"\\\"\" + insert_ts + \"\\\", \\\"short_Description\\\" : \\\" \"\n//\t\t\t\t+ \"\\\"\" + short_description + \"\\\"\" + \" ]\";\n\t}", "@Override\n public String getDescription() {\n return descriptionText;\n }", "public String getDescription() { return description; }", "@Override\n public String getDescription() {\n return description;\n }", "public String getEventTitle() {\n\t\treturn title;\n\t}", "public String description();", "public String getDescription()\r\n\t{\r\n\t\treturn description;\r\n\t}", "@Override\r\n public String toString() {\r\n return String.format(\"%s\",\r\n description);\r\n }", "@Override\r\n\tpublic String getDescription() {\n\t\treturn \"\";\r\n\t}", "@Override\n\tpublic String getDescription();", "public String getEventMessage() {\n return eventMessage;\n }", "public String getDescription() {\r\n return DESCRIPTION;\r\n }", "public String getEventNote() {\r\n\t\treturn eventNote;\r\n\t}", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription()\n {\n return description;\n }", "public String getEvent() {\n return this.event;\n }", "public String getExampleEvent() {\n return exampleEvent;\n }", "public String getDescription()\n\t{\n\t\treturn description;\n\t}", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public String getDescription()\r\n {\r\n return description;\r\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "public String getDescription() {\n return ACTION_DETAILS[id][DESC_DETAIL_INDEX];\n }", "public String getDescription()\n {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return DESCRIPTION;\n }", "public CharSequence getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "@Override\n public String getDescription() {\n return getClass().getName();\n }", "public String getDescription() {\r\n return _description;\r\n }", "public String getDescription () {\n return description;\n }" ]
[ "0.8500561", "0.78031105", "0.7512345", "0.7500311", "0.7422424", "0.7373523", "0.7188395", "0.7086694", "0.69594693", "0.6952421", "0.6915571", "0.69140935", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6912951", "0.6891705", "0.68791276", "0.687519", "0.6870052", "0.6867941", "0.68670535", "0.68670535", "0.68670535", "0.68670535", "0.68670535", "0.68670535", "0.68670535", "0.68670535", "0.68670535", "0.68241894", "0.68186677", "0.6799988", "0.6795239", "0.6791925", "0.67693555", "0.6763296", "0.6763153", "0.6762632", "0.67563754", "0.67538023", "0.67482334", "0.6741747", "0.6734363", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.6731162", "0.67218477", "0.6705184", "0.6684185", "0.66827834", "0.66751474", "0.6665411", "0.66604435", "0.66604435", "0.66604435", "0.66604435", "0.66604435", "0.66604435", "0.66604435", "0.66604435", "0.66604435", "0.6658659", "0.665519", "0.6650608", "0.6650417", "0.66490436", "0.6645947", "0.6644669", "0.6634215", "0.6631774", "0.66310954" ]
0.0
-1
Build the event from a given INI section, returns null if the section tag does not match the event tag.
@Override public NewHighwayEvent build(IniSection ini) { NewHighwayEvent event = null; int lanes; if (TAG.equals(ini.getTag()) && isCorrectType(ini, TYPE)) { try { Logger log = Logger.getLogger(NewHighwayEvent.class .getName()); log.info("Attempting to parse NewHighwayEvent..."); NewRoadEvent ev = super.build(ini); lanes = parsePositiveInt(ini, "lanes"); event = new NewHighwayEvent(ev, lanes); log.info("Event parsed"); } catch (Exception e) { throw new IllegalArgumentException( EVENT_PARSE_ERROR_MSG + e.getMessage(), e); } } return event; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Section(BufferedReader in) throws IOException, ReloadFault {\n String line = in.readLine();\n // find top of section and process it\n while (line != null) {\n if (line.startsWith(JTR_V2_SECTION)) {\n title = extractSlice(line, 0, \":\", null);\n break;\n } else\n // don't know what this line is, may be empty\n {\n line = in.readLine();\n }\n }\n\n if (title == null) {\n throw new ReloadFault(i18n, \"rslt.noSectionTitle\");\n }\n\n if (title.equals(MSG_SECTION_NAME)) {\n // use standard internal copy of string\n title = MSG_SECTION_NAME;\n }\n\n while ((line = in.readLine()).startsWith(JTR_V2_SECTSTREAM)) {\n OutputBuffer b = new FixedOutputBuffer(line, in);\n buffers = DynamicArray.append(buffers, b);\n }\n\n // if not in the message section, line should have the section result\n if (!Objects.equals(title, MSG_SECTION_NAME)) {\n if (line != null) {\n if (line.startsWith(JTR_V2_SECTRESULT)) {\n result = Status.parse(line.substring(JTR_V2_SECTRESULT.length()));\n } else {\n throw new ReloadFault(i18n, \"rslt.badLine\", line);\n }\n }\n if (result == null)\n // no test result\n {\n throw new ReloadFault(i18n, \"rslt.noSectionResult\");\n }\n }\n }", "@Override\n\tpublic Object visitSection(Section section) {\n\t\treturn null;\n\t}", "public void setSection(final String section) {\n this.section = section;\n }", "void create(Section section);", "Section createSection();", "void handleSection(Section nativeSection, Object appData)\n {\n // Create a section\n Section sec = nativeSection;\n\n synchronized (sectionMonitor)\n {\n try\n {\n \tint sectionNumber;\n \t\n if(!sec.section_syntax_indicator())\n { \n \t// If section_syntac_indicator is false\n \t// There is only one section\n \t// Private data bytes immediately follow the\n \t// private_section_length field\n // Allocate the table sections array \n \tsectionNumber = 0;\n \t\n if (tableSections == null)\n {\n tableSections = new Section[1];\n tableSections[0] = null;\n\n sectionCounter = 0;\n numSections = 1;\n if (log.isDebugEnabled())\n {\n log.debug(\"TableSectionFilter::handleSection tableVersion: \" + tableVersion\n + \" sectionCounter: \" + sectionCounter + \" numSections: \" + numSections);\n }\n } \t\n }\n else\n { \n\t sectionNumber = sec.section_number();\n\t\n if (log.isDebugEnabled())\n {\n log.debug(\"TableSectionFilter: handleSection sec.section_number(): \" + sectionNumber\n + \" sec.version_number(): \" + sec.version_number());\n }\n\t\n\t // Allocate the table sections array using the size found\n\t // in the section itself.\n\t if (tableSections == null)\n\t {\n\t tableSections = new Section[sec.last_section_number() + 1];\n\t for (int i = 0; i <= sec.last_section_number(); i++)\n\t tableSections[i] = null;\n\t\n\t // Save off the version number for comparison against\n\t // future sections we receive.\n\t tableVersion = sec.version_number();\n\t sectionCounter = 0;\n\t numSections = sec.last_section_number() + 1;\n if (log.isDebugEnabled())\n {\n log.debug(\"TableSectionFilter::handleSection tableVersion: \" + tableVersion\n + \" sectionCounter: \" + sectionCounter + \" numSections: \" + numSections);\n\t }\n\t }\n\t \n\t if(sectionNumber > numSections)\n\t {\n if (log.isErrorEnabled())\n {\n log.error(\"TableSectionFilter::handleSection - Error occured, section number (\" \n \t\t + sectionNumber \n \t\t + \")\" \n \t\t + \" may not be greater than the number of sections (\" \n \t\t + numSections \n \t\t + \")\" + \" - Ignoring section...\"); \n }\n\t return;\n\t }\n\t \n\t // Check if the table version has changed\n\t if (tableVersion != sec.version_number())\n\t {\n\t // If the version number has changed then generate a version\n\t // change event\n\t // discard this section and continue filtering\n\n if (log.isDebugEnabled())\n {\n log.debug(\"TableSectionFilter::handleSection posting a VersionChangeDetectedEvent...\"\n + \" tableVersion: \" + tableVersion + \" sec.version_number(): \" + sec.version_number());\n }\n\t // Send VersionChangeDetectedEvent only once\n\t if (!sentVersionChangeEvent)\n\t {\n\t notifySectionFilterListener(new VersionChangeDetectedEvent(this, appData, tableVersion,\n\t sec.version_number()));\n\t sentVersionChangeEvent = true;\n\t }\n\t return;\n\t } \t \n } \n\n // Store this section in our array\n // need to verify this here.\n if (sec != null && tableSections[sectionNumber] == null)\n {\n tableSections[sectionNumber] = sec;\n\n sectionCounter++;\n haveReceivedSections = true;\n\n // Signal the sectionMonitor in case someone is blocking on\n // the getSections method.\n\t\t\t\t\t// Added for findbugs issues fix - start\n m_completed = true;\n\t\t\t\t\t// Added for findbugs issues fix - end\n sectionMonitor.notifyAll();\n\n if (log.isDebugEnabled())\n {\n log.debug(\"TableSectionFilter::handleSection calling notifySectionFilterListener-SectionAvailableEvent for section \"\n + sectionNumber);\n }\n // If the table is not complete, just alert listeners that a\n // new\n // section is available\n notifySectionFilterListener(new SectionAvailableEvent(this, appData));\n }\n }\n catch (NoDataAvailableException e)\n {\n return;\n }\n\n }\n if (log.isDebugEnabled())\n {\n log.debug(\"TableSectionFilter::sectionCounter: \" + sectionCounter + \" numSections: \" + numSections);\n }\n\n // Check if Table is complete!\n\n if (sectionCounter >= numSections)\n {\n stopFiltering();\n if (log.isDebugEnabled())\n {\n log.debug(\"TableSectionFilter: posting a EndOfFilteringEvent...\");\n }\n notifySectionFilterListener(new EndOfFilteringEvent(this, appData));\n }\n }", "public void setSection(String section) {\n if(section==null){\n section=\"\";\n }\n this.section = section;\n }", "public static String parseEvent(String instruction) throws JarvisException, IOException {\n String taskDescription = \"\";\n int currIndex = 5;\n\n // Extracting the timestamp (format: dd/mm/yyyy hh:mm-hh:mm)\n while (currIndex < instruction.length() &&\n !instruction.substring(currIndex).startsWith(\" /\")) {\n taskDescription += instruction.substring(currIndex, currIndex + 1);\n currIndex++;\n }\n\n // If the extracted string is too short to contain all of the relevant details\n if (currIndex == 5 || currIndex == instruction.length() ||\n instruction.substring(currIndex).length() != 27) {\n throw new JarvisException(Ui.INCOMPLETE_EVENT_INFO);\n\n // If the date keyed in by the user is formatted wrongly\n } else if (instruction.charAt(currIndex + 7) != '/' &&\n instruction.charAt(currIndex + 10) != '/' &&\n instruction.charAt(currIndex + 15) != ' ') {\n throw new JarvisException(Ui.WRONGLY_FORMATTED_DATE);\n\n // If the timings keyed in by the user is formatted wrongly\n } else if (instruction.substring(currIndex).length() < 25){\n throw new JarvisException(Ui.WRONGLY_FORMATTED_EVENT_TIMINGS);\n\n // If the timestamp is formatted correctly overall\n } else {\n String by = instruction.substring(currIndex + 5);\n Task newEvent = new Event(taskDescription, by);\n\n // Add the task to the taskList array and update the task file in the user's hard disk\n return TaskList.addTaskAndUpdate(newEvent);\n }\n }", "@Override\n\tpublic IDataItem getSection(List<IRange> section)\n\t\t\tthrows InvalidRangeException {\n\t\treturn null;\n\t}", "public void buildStarted(BuildEvent event) {\n }", "protected void readSnapshotsSection(@SuppressWarnings(\"unused\") XmlNode section) {\n }", "public interface SectionBuilder {\r\n\r\n\t/**\r\n\t * Generate the section.\r\n\t * \r\n\t * Note: If the section is not level 3 then entries may be used for the generation of the text\r\n\t * @return\r\n\t */\r\n\tpublic Section generate(Entry... entries);\r\n\t\r\n}", "public static Event of(String input) throws DukeException {\n String[] eachWord = input.split(\"/at\");\n checkForEmptyDescription(eachWord);\n checkForEmptyDate(eachWord);\n String dateDescription = eachWord[1];\n String[] dateSplitBySpace = dateDescription.split(\" \");\n String[] dateArr = getDateArr(dateSplitBySpace);\n try {\n return getEvent(eachWord[0], dateSplitBySpace[2], dateArr);\n } catch (NumberFormatException e) {\n throw new DukeException(\"Enter the date for this event in DD/MM/YYYY HHMM format\\nEg.\"\n + Event.inputExample);\n } catch (DateTimeException e) {\n throw new DukeException(\"Invalid date inputed. Please check that the date is correct\\nEg.\"\n + Event.inputExample);\n }\n }", "Section getSection();", "private IEvent createEvent() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\treturn mch.createChild(IEvent.ELEMENT_TYPE, null, null);\n\t}", "protected Section generateActiveDatesSection(Section section) {\n FieldDescriptor fd = addField(section, PROPOSAL_PATH + \"/\" + PREV_START_TERM, generateMessageInfo(LUUIConstants.PROPOSAL_PREV_START_TERM));\n fd.getFieldWidget().setVisible(false);\n fd.hideLabel();\n\n addField(section, COURSE + \"/\" + START_TERM, generateMessageInfo(LUUIConstants.START_TERM_LABEL_KEY));\n\n addField(section, COURSE + \"/\" + PILOT_COURSE, generateMessageInfo(LUUIConstants.PILOT_COURSE_LABEL_KEY), new KSCheckBox(getLabel(LUUIConstants.PILOT_COURSE_TEXT_LABEL_KEY))).setIgnoreShowRequired(true);\n addField(section, COURSE + \"/\" + END_TERM, generateMessageInfo(LUUIConstants.END_TERM_LABEL_KEY)).setIgnoreShowRequired(true);\n\n return section;\n }", "public String buildMessage(Event event, Object[] params);", "UsageEvents.Event buildEvent(String packageName, String className) {\n UsageEvents.Event event = new UsageEvents.Event();\n event.mPackage = getCachedStringRef(packageName);\n if (className != null) {\n event.mClass = getCachedStringRef(className);\n }\n return event;\n }", "public String getSection() {\n return section;\n }", "public String getSection() {\n return section;\n }", "void createdSection(TestResult tr, Section section);", "public String createEvent(final boolean pastEvent, final String startDate,\n final String duration, final String mode, final boolean precoolOpted, String groupName)\n throws ParseException;", "public Invocation parseEvent(LogInfo eventLog) {\n\t\t\tCallTransaction.Function event = getBySignatureHash(eventLog.getTopics().get(0).getData());\n\t\t\tint indexedArg = 1;\n\t\t\tif (event == null)\n\t\t\t\treturn null;\n\t\t\tList<Object> indexedArgs = new ArrayList<>();\n\t\t\tList<Param> unindexed = new ArrayList<>();\n\t\t\tfor (Param input : event.m_inputs) {\n\t\t\t\tif (input.m_indexed) {\n\t\t\t\t\t//TODO\n\t\t\t\t\t//indexedArgs.add(input.m_type.decode(eventLog.getTopics().get(indexedArg++).getData()));\n\t\t\t\t\t//TODO\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tunindexed.add(input);\n\t\t\t}\n\n\t\t\tObject[] unindexedArgs = event.decode(eventLog.getData(), unindexed.toArray(new Param[unindexed.size()]));\n\t\t\tObject[] args = new Object[event.m_inputs.length];\n\t\t\tint unindexedIndex = 0;\n\t\t\tint indexedIndex = 0;\n\t\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\t\tif (event.m_inputs[i].m_indexed) {\n\t\t\t\t\targs[i] = indexedArgs.get(indexedIndex++);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\targs[i] = unindexedArgs[unindexedIndex++];\n\t\t\t}\n\t\t\treturn new Invocation(this, event, args);\n\t\t}", "public void addSection(ConfigSection section)\n {\n Vector v = (Vector)sections.get(section.getName().toUpperCase());\n if (v == null)\n {\n // commented out by Navneet Gupta on 12/28/2000\n // System.out.println(\"creating new section\");\n\n // create a new one if one doesn't already exist\n v = new Vector();\n }\n v.addElement(section);\n\n // commented out by Navneet Gupta on 12/28/2000\n // System.out.println(\"adding \" + section.getName());\n\n sections.put(section.getName().toUpperCase(), v);\n }", "public void setSectionID(Integer sectionID){\n this.sectionID = sectionID;\n }", "public T caseEventDefinition(EventDefinition object) {\r\n\t\treturn null;\r\n\t}", "private static PsiElement createForSetupSection(ASTNode node) {\n if (IssMarkerFactory.SetupSection.SECTION.equals(node.getElementType())) {\n return new IssSetupSectionElement(node);\n } else if (IssMarkerFactory.SetupSection.PROPERTY_APPNAME.equals(node.getElementType())) {\n return new IssPropertyDefaultElement(node, IssSetupProperty.AppName);\n } else if (IssMarkerFactory.SetupSection.PROPERTY_APPNAME_VALUE.equals(node.getElementType())) {\n return new IssPropertyDefaultValueElement(node);\n } else if (IssMarkerFactory.SetupSection.PROPERTY_APPVERSION.equals(node.getElementType())) {\n return new IssPropertyDefaultElement(node, IssSetupProperty.AppVersion);\n } else if (IssMarkerFactory.SetupSection.PROPERTY_APPVERSION_VALUE.equals(node.getElementType())) {\n return new IssPropertyDefaultValueElement(node);\n } else if (IssMarkerFactory.SetupSection.PROPERTY_APPID.equals(node.getElementType())) {\n return new IssPropertyAppIdElement(node);\n } else if (IssMarkerFactory.SetupSection.PROPERTY_APPID_VALUE.equals(node.getElementType())) {\n return new IssPropertyAppIdValueElement(node);\n } else if (IssMarkerFactory.SetupSection.PROPERTY_COMPRESSION.equals(node.getElementType())) {\n return new IssPropertyCompressionElement(node, IssSetupProperty.Compression);\n } else if (IssMarkerFactory.SetupSection.PROPERTY_COMPRESSION_VALUE.equals(node.getElementType())) {\n return new IssPropertyCompressionValueElement(node);\n }\n\n return null;\n }", "public FoursquarePathBuilder setSection(Section section) {\n String sections = section.getQueryName();\n addParameter(\"section\", sections);\n return this;\n }", "public AnalyticsEvent build() {\n AnalyticsEvent purchaseEvent = null;\n if(isValid() && doBaseValidation()) {\n purchaseEvent = eventClient.createEvent(PURCHASE_EVENT_NAME);\n\n purchaseEvent.addAttribute(PURCHASE_EVENT_PRODUCT_ID_ATTR, productId);\n purchaseEvent.addAttribute(PURCHASE_EVENT_STORE_ATTR, store);\n purchaseEvent.addMetric(PURCHASE_EVENT_QUANTITY_METRIC, quantity);\n\n if(formattedItemPrice != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_PRICE_FORMATTED_ATTR, formattedItemPrice);\n }\n\n if(itemPrice != null) {\n purchaseEvent.addMetric(PURCHASE_EVENT_ITEM_PRICE_METRIC, itemPrice);\n }\n\n if(transactionId != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_TRANSACTION_ID_ATTR, transactionId);\n }\n\n if(currency != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_CURRENCY_ATTR, currency);\n }\n }\n \n return purchaseEvent;\n }", "Event createEvent();", "Event createEvent();", "private HabitEvent createHabitEventFromBundle(Bundle bundle) {\n AddHabitEventDialogInformationGetter getter =\n new AddHabitEventDialogInformationGetter(bundle);\n String title = getter.getTitle();\n String comment = getter.getComment();\n Location location = getter.getLocation();\n Date date = getter.getDate();\n String eventImage = getter.getImage();\n byte[] decodedByteArray = Base64.decode(eventImage, Base64.URL_SAFE | Base64.NO_WRAP);\n Bitmap image = BitmapFactory.decodeByteArray(decodedByteArray, 0, decodedByteArray.length);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n image.compress(Bitmap.CompressFormat.JPEG, 50, byteArrayOutputStream);\n byte[] byteArray = byteArrayOutputStream.toByteArray();\n String encodedString = Base64.encodeToString(byteArray, Base64.URL_SAFE | Base64.NO_WRAP);\n return new HabitEvent(comment, encodedString, location, date, title, userAccount.getId().toString());\n }", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "public void setSectionNo(String sectionNo)\r\n\t{\r\n\t\tthis.sectionNo = sectionNo;\r\n\t}", "public void targetStarted(BuildEvent event) {\n }", "SyslogEvent build() {\n\n miruLogEvent = parse(rawMessage, address.toString());\n return this;\n }", "public void addSection(String sectionId) {\n\t\t\r\n\t}", "ConferenceScheduleBuilderService createEventsFromStartToLunch();", "public T caseEventDefinition(EventDefinition object) {\n\t\treturn null;\n\t}", "public static Map<String, String> readIniSectionMap(Section section) {\n\t\tMap<String,String> sectionMap = new HashMap<String, String>();\n\t\tfor(String key:section.keySet()) {\n\t\t\tif(!key.equals(\"NaN\")) {\n\t\t\t\tif(section.getAll(key).size()>1) { // TODO always == 1 ???\n\t\t\t\t\tlog.warn(\"multiple entries: \"+key+\" from \"+section.getName());\n\t\t\t\t}\n\t\t\t\tsectionMap.put(key, section.get(key));\n\t\t\t} else {\n\t\t\t\tlog.warn(\"NaN key\");\n\t\t\t}\n\t\t}\n\t\treturn sectionMap;\n\t}", "public T caseEventSpec(EventSpec object) {\r\n\t\treturn null;\r\n\t}", "public Map<String, Object> initiateEventCreation(final String programName,\n final String duration, final String eventMode, final boolean precoolOpted)\n throws ParseException;", "public Event setTag(String tag) {\n this.tag = tag;\n return this;\n }", "ProgramEventEvent createProgramEventEvent();", "private Mono<MatchEventInfo> buildMatchEventInfo(final MatchEvent event) {\n if (event.getPlayerId() == null) {\n // This is a START_MATCH event\n return Mono.just(new MatchEventInfo(event.getType(), null, event.getTimestamp()));\n }\n return this.playerInfoRepository.getPlayerInfo(event.getPlayerId())\n .map(playerInfo -> new MatchEventInfo(event.getType(), playerInfo, event.getTimestamp()));\n }", "public static Event startEvent(String accessToken, Integer eventId) {\n JsonObject jsonObject = new JsonObject();\n\n jsonObject.add(\"event\", new JsonObject());\n Log.i(Constants.TAG, \"jsonObject:\" + jsonObject.toString());\n\n try {\n JsonElement element = NetworkUtil.postWebService(jsonObject, NetworkUtil.EVENTS_URI + \"/\" + eventId + EVENTS_START_URI, accessToken);\n Log.i(Constants.TAG, \"result:\" + element.toString());\n if (element != null) {\n GsonBuilder jsonBuilder = new GsonBuilder();\n jsonBuilder.registerTypeAdapter(Event.class, new Event.EventDeserializer());\n Gson gson = jsonBuilder.create();\n\n Log.i(Constants.TAG, \"RETURNED : jsonObject:\" + element.getAsJsonObject().get(\"event\").toString());\n Event event = gson.fromJson(\n element.getAsJsonObject().get(\"event\"),\n Event.class\n );\n return event;\n } else {\n return null;\n }\n } catch (APICallException e) {\n Log.e(Constants.TAG, \"HTTP ERROR when starting event - STATUS:\" + e.getMessage(), e);\n return null;\n } catch (IOException e) {\n Log.e(Constants.TAG, \"IOException when starting event\", e);\n return null;\n } // end try-catch\n }", "protected ICEvent() {}", "void enterSection(String name) throws IOException;", "protected Event(Parcel in) {\n id = in.readInt();\n date = in.readInt();\n event = in.readString();\n location = in.readString();\n startTime = in.readString();\n endTime = in.readString();\n notes = in.readString();\n byte tmpAllDay = in.readByte();\n allDay = tmpAllDay == 0 ? null : tmpAllDay == 1;\n bigId = in.readInt();\n alarm = in.readInt();\n }", "public static void load() {\n\t\tFile f = new File(EVENTSTXT);\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(EVENTSTXT));\n\t\t\tString eventString = reader.readLine();\n\t\t\tcalendarToEvent.clear();\n\t\t\twhile (eventString != null) {\n\t\t\t\tString year = eventString.substring(1, 5);\n\t\t\t\tString month = eventString.substring(6, eventString.indexOf(\" \", eventString.indexOf(\" \") + 1));\n\t\t\t\tString restOfString = eventString.substring(eventString.indexOf(\" \", eventString.indexOf(\" \") + 1) + 1,\n\t\t\t\t\t\teventString.length() - 1);\n\t\t\t\tString date = restOfString.substring(0, restOfString.indexOf(\" \"));\n\t\t\t\tString lastString = restOfString.substring(restOfString.indexOf(\" \") + 1, restOfString.length() - 1);\n\t\t\t\tString startTime = restOfString.substring(restOfString.indexOf(\" \") + 1, restOfString.indexOf(\" \") + 6);\n\t\t\t\tString endTime = restOfString.substring(restOfString.indexOf(\" \") + 9, restOfString.indexOf(\" \") + 15);\n\t\t\t\tString title = restOfString.substring(restOfString.indexOf(\" \") + 15, restOfString.length());\n\t\t\t\teventString = reader.readLine();\n\t\t\t\tString numMonth = monthNameToNumber(month);\n\t\t\t\tif (date.length() == 1) {\n\t\t\t\t\tdate = \"0\" + date;\n\t\t\t\t}\n\n\t\t\t\tString wholeDate = numMonth + \"/\" + date + \"/\" + year;\n\t\t\t\tEvent toAddToMap = new Event(title, wholeDate, startTime, endTime);\n\t\t\t\tGregorianCalendar key = new GregorianCalendar(Integer.parseInt(year),\n\t\t\t\t\t\tInteger.parseInt(monthNameToNumber(month)), Integer.parseInt(date));\n\t\t\t\t// treeSET\n\t\t\t\tif (calendarToEvent.get(key) == null) { // there are no events under this date\n\t\t\t\t\tTreeSet<Event> treeSetForMap = new TreeSet<Event>();\n\t\t\t\t\ttreeSetForMap.add(toAddToMap);\n\t\t\t\t\tcalendarToEvent.put(key, treeSetForMap);\n\t\t\t\t} else { // there are already events, add event to the treeset\n\t\t\t\t\tcalendarToEvent.get(key).add(toAddToMap);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Events loaded successfully\");\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"error\");\n\t\t}\n\n\t}", "private static Event makeEvent(GreenhouseControls gc,Map.Entry<String, Long> me) {\r\n\t\tString key = me.getKey();\r\n\t\tLong value = me.getValue();\r\n\t\tif(\"Bell\".equals(key))\r\n\t\t\treturn gc.new Bell(value);\r\n\t\tif(\"LightOn\".equals(key))\r\n\t\t\treturn gc.new LightOn(value);\r\n\t\tif(\"LightOff\".equals(key))\r\n\t\t\treturn gc.new LightOff(value);\r\n\t\tif(\"WaterOn\".equals(key))\r\n\t\t\treturn gc.new WaterOn(value);\r\n\t\tif(\"WaterOff\".equals(key))\r\n\t\t\treturn gc.new WaterOff(value);\r\n\t\tif(\"ThermostatDay\".equals(key))\r\n\t\t\treturn gc.new ThermostatDay(value);\r\n\t\tif(\"ThermostatNight\".equals(key))\r\n\t\t\treturn gc.new ThermostatNight(value);\r\n\t\treturn null;\r\n\t}", "static public TableViewSectionProxy processSection(Object obj)\n\t{\n\t\tif (obj instanceof HashMap) {\n\t\t\tfinal TableViewSectionProxy section = new TableViewSectionProxy();\n\n\t\t\tsection.handleCreationDict(new KrollDict((HashMap) obj));\n\t\t\treturn section;\n\t\t} else if (obj instanceof TableViewSectionProxy) {\n\t\t\treturn (TableViewSectionProxy) obj;\n\t\t}\n\t\treturn null;\n\t}", "private static String getEventString(final JobLogEvent event)\n {\n if (event == null) {\n return \"NullJobEvent\";\n }\n final StringBuilder sb = new StringBuilder();\n if (event.getScheduler() != null) {\n sb.append(\" Scheduler=\").append(event.getScheduler()).append(\"\\n\");\n }\n // if (event.getRunner() != null) {\n // sb.append(\" Runner=\").append(event.getRunner()).append(\"\\n\");\n // }\n if (event.getJob() != null) {\n sb.append(\" Job=\").append(event.getJob()).append(\"\\n\");\n }\n if (event.getJobDefinition() != null) {\n sb.append(\" Definition=\").append(event.getJobDefinition()).append(\"\\n\");\n }\n if (event.getJobResult() != null) {\n sb.append(\" Result=\").append(event.getJobResult()).append(\"\\n\");\n }\n if (event.getJobStatus() != null) {\n sb.append(\" Status=\").append(event.getJobStatus()).append(\"\\n\");\n }\n return sb.toString();\n }", "static Event init(final String propertyName)\n {\n final LTProperties properties = Context.configuration().properties;\n final String defaultLogLevel = properties.getProperty(\"events.logging.default.level\", \"debug\");\n final String logLevel = properties.getProperty(\"events.logging.\" + propertyName + \".level\", defaultLogLevel).toLowerCase();\n\n final Event event;\n switch (logLevel) {\n case \"error\":\n event = new ERROR();\n break;\n\n case \"warn\":\n event = new WARN();\n break;\n\n case \"info\":\n event = new INFO();\n break;\n\n case \"debug\":\n event = new DEBUG();\n break;\n\n default:\n throw new IllegalArgumentException(\"Log level '\" + logLevel + \"' not supported.\");\n }\n\n return event;\n }", "ConferenceScheduleBuilderService createEventsFromNetworkToEnd();", "public static void beginSection(String sectionName) {\n checkWhetherSupport();\n if (sTraceBeginMethod != null && sTraceEndMethod != null) {\n try {\n sTraceBeginMethod.invoke(null, sViewTag, sectionName);\n } catch (IllegalAccessException e) {\n Log.d(TAG, \"<beginSection> IllegalAccessException\", e);\n } catch (InvocationTargetException e) {\n Log.d(TAG, \"<beginSection> InvocationTargetException\", e);\n }\n } else if (sSupportTrace) {\n Trace.beginSection(sectionName);\n }\n }", "BasicEvent createBasicEvent();", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "@Override\n\tpublic Object visitSubsection(Subsection subsection) {\n\t\treturn null;\n\t}", "public void taskStarted(BuildEvent event) {\n }", "private static String getTagElem(final String fullTag) {\r\n final int index = fullTag.indexOf(\",\");\r\n\r\n if (index == -1) {\r\n return null;\r\n }\r\n\r\n return fullTag.substring(index + 1);\r\n }", "public String makeEvent(String summary, String description, String location,\n LocalDateTime start, LocalDateTime end) {\n String prefix = \"BEGIN:VEVENT\\n\";\n String suffix = \"END:VEVENT\\n\";\n\n return prefix + makeEventSummary(summary) + makeEventDescription(description) +\n makeEventLocation(location) + makeEventStamp() + makeEventStart(start) +\n makeEventEnd(end) + suffix;\n }", "private Node getTagFromEntry(Node entryElem, String tagName) {\n\n\t\tString entryElemName = entryElem.getNodeName();\n\t\tif (ENTRY.equals(entryElemName)) {\n\t\t\tNode firstChild = entryElem.getFirstChild();\n\t\t\tif (LOCAL_VARIABLE_NAME.equals(firstChild.getNodeName())) {\n\t\t\t\tNodeList nodeList = ((Element) firstChild.getNextSibling()).getElementsByTagName(tagName);\n\t\t\t\tif (nodeList != null && nodeList.getLength() > 0) {\n\t\t\t\t\treturn nodeList.item(0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tNodeList nodeList = ((Element) firstChild).getElementsByTagName(tagName);\n\t\t\t\tif (nodeList != null && nodeList.getLength() > 0) {\n\t\t\t\t\treturn nodeList.item(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Event convertToEvent(String message) {\n\t\tJSONParser parser = new JSONParser();\n\t\tJSONObject jsonObject;\n\t\ttry {\n\t\t\tjsonObject = (JSONObject) parser.parse(message);\n\t\t} catch (ParseException e) {\n\t\t\tthrow new RuntimeException(\"ParseException caught trying to parse message text into JSON object\");\n\t\t}\n\t\tJSONArray events = (JSONArray) jsonObject.get(\"events\");\n\t\tList<EventAttribute> eventAttributes = new ArrayList<>();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tIterator<JSONObject> iterator = events.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tJSONObject jsonT = (JSONObject) iterator.next();\n\t\t\tJSONObject jsonEventAttribute = (JSONObject) jsonT.get(\"attributes\");\n\t\t\tString accountNum = (String) jsonEventAttribute.get(\"Account Number\");\n\t\t\tString txAmount = (String) jsonEventAttribute.get(\"Transaction Amount\");\n\t\t\tString cardMemberName = (String) jsonEventAttribute.get(\"Name\");\n\t\t\tString product = (String) jsonEventAttribute.get(\"Product\");\n\t\t\tEventAttribute eventAttribute = new EventAttribute(accountNum, txAmount, cardMemberName, product);\n\t\t\teventAttributes.add(eventAttribute);\n\t\t}\n\n\t\treturn new Event(eventAttributes);\n\t}", "Event(int start, int end, String eventName) {\r\n this.start = start;\r\n this.end = end;\r\n this.eventName = eventName;\r\n this.description = \"\";\r\n }", "@Override public Effect construct(ConfigurationSection section)\n {\n String type = section.getString(\"type\");\n if(type == null) return null; // If there is no type defined\n if(!TextUtil.toKey(type).equals(IDENTIFIER)) return null; // if the type is not the right type\n \n double max_distance = section.getDouble(\"max_distance\", DEFAULT_MAX_DISTANCE);\n double behind_distance = section.getDouble(\"behind_distance\", DEFAULT_BEHIND_DISTANCE);\n String teleport_sound = section.getString(\"teleport_sound\", DEFAULT_TELEPORT_SOUND);\n \n return new DanceEffect(max_distance, behind_distance, teleport_sound);\n }", "SectionType createSectionType();", "public static Node eventToNode(SushiEvent event) {\n\t\tSushiMapTree<String, Serializable> values = event.getValues();\n\t\tDocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();\n\t\tdomFactory.setNamespaceAware(true);\n\t\tDocumentBuilder builder = null;\n\t\ttry {\n\t\t\tbuilder = domFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// need document from XML for the XML parser\n\t\tDocument doc = builder.newDocument();\n\t\tElement root = doc.createElement(event.getEventType().getTypeName());\n\t\tdoc.appendChild(root);\n\t\tElement time = doc.createElement(\"Timestamp\");\n\t\ttime.setTextContent(getFormattedDate(event.getTimestamp()));\n\t\troot.appendChild(time);\n\t\t\n\t\tList<Integer> processInstanceIDs = new ArrayList<Integer>();\n\t\tfor (SushiProcessInstance processInstance : event.getProcessInstances()) {\n\t\t\tprocessInstanceIDs.add(processInstance.getID());\n\t\t}\n\t\tElement processInst = doc.createElement(\"ProcessInstances\");\n\t\tprocessInst.setTextContent(processInstanceIDs.toString());\n\t\troot.appendChild(processInst);\n\t\t\n\t\tfor (SushiMapElement<String, Serializable> element : values.getTreeRootElements()){\n\t\t\tNode importedNode = doc.importNode(element.getNodeWithChildnodes().getFirstChild(), true);\n\t\t\troot.appendChild(importedNode);\n\t\t}\n\t\treturn doc;\n\t}", "protected Event getEvent(String command, Activity activity) {\n List<Event> eventList = activity.getEvents();\n int index;\n\n try {\n index = Integer.parseInt(command) - 1;\n if (index < eventList.size()) {\n return eventList.get(index);\n } else {\n System.out.println(\"please choose a valid input\");\n return null;\n }\n } catch (NumberFormatException e) {\n if (command.equals(\"q\")) {\n return null;\n } else if (activity.getEvent(command) != null) {\n return activity.getEvent(command);\n } else {\n System.out.println(\"please choose a valid input\");\n return null;\n }\n }\n }", "@NonNull\n public Trigger build() {\n if (UAStringUtil.isEmpty(eventName)) {\n return new Trigger(type, goal, null);\n }\n\n JsonPredicate predicate = JsonPredicate.newBuilder()\n .setPredicateType(JsonPredicate.AND_PREDICATE_TYPE)\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(CustomEvent.EVENT_NAME)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(eventName)))\n .build())\n .build();\n return new Trigger(type, goal, predicate);\n }", "public final EObject entryRuleEventSpec() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleEventSpec = 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:1883:2: (iv_ruleEventSpec= ruleEventSpec EOF )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1884:2: iv_ruleEventSpec= ruleEventSpec EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getEventSpecRule()); \r\n }\r\n pushFollow(FOLLOW_ruleEventSpec_in_entryRuleEventSpec4107);\r\n iv_ruleEventSpec=ruleEventSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleEventSpec; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleEventSpec4117); 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 }", "public interface Event\n\t{\n\t\tpublic static final String EVENT_ID = \"aether.event.id\";\n\t\tpublic static final String TIME = \"aether.event.time\";\n\t\tpublic static final String EVENT_TYPE = \"aether.event.type\";\n\t}", "protected String checkCollectionKey(String section) throws ActionException {\n\t\tlog.debug(\"evaluating section val: \" + section);\n\t\tString key = StringUtil.checkVal(section).toUpperCase();\n\t\ttry {\n\t\t\tSection.valueOf(key);\n\t\t} catch (Exception e) {\n\t\t\tthrow new ActionException(\"Unknown section value: \" + section);\n\t\t}\n\t\treturn key;\n\t}", "@NotNull\n public static FieldEvent get(@NotNull final IEvent<?> argEvent) {\n final Object payLoad = argEvent.getPayload();\n return payLoad instanceof FieldEvent\n ? (FieldEvent) payLoad\n : EMPTY_EVENT ;\n }", "public Element createAgendaElement(Document serviceDoc) {\r\n\t\t// TODO: connect with the uAAL agenda service \r\n\t\t//Agenda appointments\r\n\t\tAgendaEvent[] agendaEvent = agenda.getAgendaEvents();\r\n\r\n\t\t// TODO DUMMY CODE, change it\r\n\t/*\tProperties config = new Properties();\r\n\t\ttry {\r\n\t\t\tconfig.load(this.getClass().getClassLoader().getResourceAsStream(\r\n\t\t\t\t\t\"config.properties\"));\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}*/\r\n\r\n\t\tXMLGregorianCalendar dateTime = TypeMapper.getCurrentDateTime();\r\n\r\n//\t\tif (agendaEvent[0] == null) {\r\n//\t\t\tagendaEvent[0] = new AgendaEvent();\r\n//\t\t\tString address1 = config.getProperty(\"agendaAddress1\");\r\n//\t\t\tif (address1 == null)\r\n//\t\t\t\tagendaEvent[0].address = \"Via Giovanni Treccani, 12\";\r\n//\t\t\telse\r\n//\t\t\t\tagendaEvent[0].address = address1;\r\n//\r\n//\t\t\tagendaEvent[0].beginTime = (XMLGregorianCalendar) dateTime.clone();\r\n//\t\t\tagendaEvent[0].beginTime.setHour(dateTime.getHour() - 1);\r\n//\t\t\tagendaEvent[0].beginTime.setMinute(30);\r\n//\r\n//\t\t\tagendaEvent[0].endTime = (XMLGregorianCalendar) agendaEvent[0].beginTime\r\n//\t\t\t\t\t.clone();\r\n//\t\t\tagendaEvent[0].endTime.setHour(dateTime.getHour() + 1);\r\n//\t\t\tagendaEvent[0].endTime.setMinute(45);\r\n//\r\n//\t\t}\r\n//\t\tif (agendaEvent[1] == null) {\r\n//\t\t\tagendaEvent[1] = new AgendaEvent();\r\n//\t\t\tString address2 = config.getProperty(\"agendaAddress2\");\r\n//\t\t\tif (address2 == null)\r\n//\t\t\t\tagendaEvent[1].address = \"Via Tibaldi, 234\";\r\n//\t\t\telse\r\n//\t\t\t\tagendaEvent[1].address = address2;\r\n//\r\n//\t\t\tagendaEvent[1].beginTime = (XMLGregorianCalendar) agendaEvent[0].endTime\r\n//\t\t\t\t\t.clone();\r\n//\t\t\tagendaEvent[1].beginTime\r\n//\t\t\t\t\t.setHour(agendaEvent[1].beginTime.getHour() + 1);\r\n//\t\t\tagendaEvent[1].beginTime.setMinute(25);\r\n//\r\n//\t\t\tagendaEvent[1].endTime = (XMLGregorianCalendar) agendaEvent[1].beginTime\r\n//\t\t\t\t\t.clone();\r\n//\t\t\tagendaEvent[1].endTime\r\n//\t\t\t\t\t.setHour(agendaEvent[1].beginTime.getHour() + 1);\r\n//\t\t\tagendaEvent[1].endTime.setMinute(45);\r\n//\r\n//\t\t}\r\n\r\n\t\tElement agendaElement = serviceDoc.createElement(\"Agenda\");\r\n\t\tString eventAddress, eventBeginTime, eventEndTime;\r\n\t\t// if null or both values are null\r\n\t\tif (agendaEvent == null || agendaEvent.length == 0 || (agendaEvent[0] == null && agendaEvent[1] == null))\r\n\t\t{\r\n\t\t\t// create a \"No events in agenda\" value\r\n\t\t\tint currentMinutes = dateTime.getMinute(); \r\n\t\t\tElement eventElement = serviceDoc.createElement(\"Event\");\r\n\t\t\teventElement.setAttribute(\"type\", \"Current\");\r\n\t\t\tXMLGregorianCalendar begin = (XMLGregorianCalendar) dateTime.clone();\r\n\t\t\t// no events in the past 10 minutes\r\n\t\t\tint minutes = currentMinutes - 10;\r\n\t\t\tif (minutes < 0)\r\n\t\t\t\tminutes = 0;\r\n\t\t\tbegin.setMinute(minutes);\r\n\t\t\tXMLGregorianCalendar end = (XMLGregorianCalendar) begin.clone();\r\n\t\t\t// for the next 10 minutes\r\n\t\t\tminutes = currentMinutes + 10;\r\n\t\t\tif (minutes >= 60)\r\n\t\t\t\tminutes = 59;\r\n\t\t\tend.setMinute(minutes);\r\n\t\t\teventElement.setAttribute(\"address\", \"No events in agenda\");\r\n\t\t\teventElement.setAttribute(\"beginTime\", begin.getHour() + \":\" + begin.getMinute());\r\n\t\t\teventElement.setAttribute(\"endTime\", begin.getHour() + \":\" + begin.getMinute());\r\n\t\t\tagendaElement.appendChild(eventElement);\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < agendaEvent.length; i++) {\r\n\t\t\t// the event can be null\r\n\t\t\tif (agendaEvent[i] != null) {\r\n\t\t\t\teventAddress = agendaEvent[i].address;\r\n\t\t\t\teventBeginTime = agendaEvent[i].beginTime.getHour() + \":\"\r\n\t\t\t\t\t\t+ agendaEvent[i].beginTime.getMinute();\r\n\t\t\t\teventEndTime = agendaEvent[i].endTime.getHour() + \":\"\r\n\t\t\t\t\t\t+ agendaEvent[i].endTime.getMinute();\r\n\t\t\t\tElement eventElement = serviceDoc.createElement(\"Event\");\r\n\r\n\t\t\t\t// The array contains the current element in position 0 and the\r\n\t\t\t\t// next\r\n\t\t\t\t// in position 1, so the current index is used to distinguish\r\n\t\t\t\t// them\r\n\t\t\t\teventElement\r\n\t\t\t\t\t\t.setAttribute(\"type\", (i == 0) ? \"Current\" : \"Next\");\r\n\t\t\t\teventElement.setAttribute(\"address\", eventAddress);\r\n\t\t\t\teventElement.setAttribute(\"beginTime\", eventBeginTime);\r\n\t\t\t\teventElement.setAttribute(\"endTime\", eventEndTime);\r\n\t\t\t\tagendaElement.appendChild(eventElement);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn agendaElement;\r\n\t}", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "protected void createSection() {\r\n\t\tsection = new GraphSection();\r\n\t}", "public interface TableSectionBuilder extends ElementBuilderBase<TableSectionBuilder> {\n\n String UNSUPPORTED_HTML =\n \"Table section elements do not support setting inner html or text. \"\n + \"Use startTR() instead to append a table row to the section.\";\n\n /**\n * Horizontal alignment of data in cells. See the align attribute for HTMLTheadElement for\n * details.\n */\n TableSectionBuilder align(String align);\n\n /**\n * Alignment character for cells in a column.\n *\n * @see <a href=\"http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#adef-char\">W3C\n * HTML Specification</a>\n */\n TableSectionBuilder ch(String ch);\n\n /**\n * Offset of alignment character.\n *\n * @see <a\n * href=\"http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#adef-charoff\">W3C\n * HTML Specification</a>\n */\n TableSectionBuilder chOff(String chOff);\n\n /**\n * Vertical alignment of data in cells. See the valign attribute for HTMLTheadElement for details.\n */\n TableSectionBuilder vAlign(String vAlign);\n}", "private Event createEditedEvent(Optional<EventName> name, Optional<Address> location, Optional<Set<Tag>> tags) {\n EventName eventName = name.orElse(currentEvent.getName());\n Address eventLocation = location.orElse(currentEvent.getLocation());\n Set<Tag> eventTags = tags.orElse(currentEvent.getTags());\n Event editedEvent = new Event(eventName, eventLocation, eventTags);\n\n if (currentEvent.getDate().isPresent()) {\n editedEvent.setDate(currentEvent.getDate().get());\n }\n if (currentEvent.getStartTime().isPresent() && currentEvent.getEndTime().isPresent()) {\n editedEvent.setTime(currentEvent.getStartTime().get(), currentEvent.getEndTime().get());\n }\n editedEvent.setOrganiser(currentEvent.getOrganiser());\n editedEvent.setPolls(currentEvent.getPolls());\n editedEvent.setParticipantList(currentEvent.getParticipantList());\n return editedEvent;\n }", "public final void entryRuleAstTag() throws RecognitionException {\n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:901:1: ( ruleAstTag EOF )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:902:1: ruleAstTag EOF\n {\n before(grammarAccess.getAstTagRule()); \n pushFollow(FOLLOW_ruleAstTag_in_entryRuleAstTag1861);\n ruleAstTag();\n\n state._fsp--;\n\n after(grammarAccess.getAstTagRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleAstTag1868); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "Event(int start, int end, String eventName, String description) {\r\n this.start = start;\r\n this.end = end;\r\n this.eventName = eventName;\r\n this.description = description;\r\n }", "@Override protected String getSection(final String param) {\n return getBrowser().getDrbdXML().getSection(param);\n }", "@Override\n\tpublic EventMessage initPlugEventMessage() {\n\t\treturn null;\n\t}", "public int register(Section section) {\r\n\t\treturn HibernateTemplate.addObject(section);\r\n\t}", "public FindMatchingRecipeEvent(World world, ItemStack[] in, ItemStack[] out, EType type) {\n input = in == null ? new ItemStack[0] : in;\n output = out == null ? new ItemStack[0] : out;\n this.world = world;\n this.type = type == null ? EType.OTHER : type;\n // Is this really wanted? or just throw an NPE early?\n }", "@Override\n\tpublic void visit(SectionsConstruct n) {\n\t\tcfgNode = n;\n\t}", "public static TrackRailsSectionsAtPosition single(final TrackRailsSingleNodeElement section) {\n return new TrackRailsSectionsAtPosition() {\n @Override\n public List<IntVector3> rails() {\n return Collections.singletonList(section.rail());\n }\n\n @Override\n public boolean isEmpty() {\n return false;\n }\n\n @Override\n public int size() {\n return 1;\n }\n\n @Override\n public List<TrackRailsSingleNodeElement> values() {\n return Collections.singletonList(section);\n }\n\n @Override\n public TrackRailsSectionsAtPosition tryAdd(TrackRailsSingleNodeElement sectionToAdd) {\n if (section == sectionToAdd) {\n return null;\n }\n\n // Upgrade to a List\n return new TrackRailsSectionsAtPositionList(section, sectionToAdd);\n }\n\n @Override\n public TrackRailsSectionsAtPosition tryRemove(TrackRailsSingleNodeElement sectionToRemove) {\n return (section == sectionToRemove) ? NONE : null;\n }\n };\n }", "String getSection() {\n\t\treturn this.mSection;\n\t}", "private synchronized void notifyCreatedSection(Section section) {\n Observer[] observers = observersTable.get(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.createdSection(this, section);\n }\n }\n }", "public String makeEvent(String summary, String description, String location,\n LocalDateTime start, LocalDateTime end, LocalDateTime lastDay) {\n String prefix = \"BEGIN:VEVENT\\n\";\n String suffix = \"END:VEVENT\\n\";\n\n return prefix + makeEventSummary(summary) + makeEventDescription(description) +\n makeEventLocation(location) + makeEventStamp() + makeEventStart(start) +\n makeEventEnd(end) + makeEventRecurrence(lastDay) + suffix;\n }", "public WasmSection getSection(WasmSection.WasmSectionId id) {\n\t\tfor (WasmSection section: sections) {\n\t\t\tif (section.getId() == id) {\n\t\t\t\treturn section;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "public final EObject entryRuleEventDefinition() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleEventDefinition = 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:774:2: (iv_ruleEventDefinition= ruleEventDefinition EOF )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:775:2: iv_ruleEventDefinition= ruleEventDefinition EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getEventDefinitionRule()); \r\n }\r\n pushFollow(FOLLOW_ruleEventDefinition_in_entryRuleEventDefinition1609);\r\n iv_ruleEventDefinition=ruleEventDefinition();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleEventDefinition; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleEventDefinition1619); 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 }", "public void buildBegin(MonitorEvent event)\n {\n }", "public String getSection(){\n return mSection;\n }", "EventUses createEventUses();", "private String getOutputEventName(String outputEvent) throws IOException {\n return outputEvent != null ? objectMapper.readValue(outputEvent, EventDefinition.class).getName() : null;\n }", "public final String section() throws RecognitionException {\r\n String section = null;\r\n\r\n\r\n Token STRING39=null;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:183:5: ( SECTION STRING )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:183:7: SECTION STRING\r\n {\r\n match(input,SECTION,FOLLOW_SECTION_in_section894); \r\n\r\n STRING39=(Token)match(input,STRING,FOLLOW_STRING_in_section896); \r\n\r\n section = (STRING39!=null?STRING39.getText():null);\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return section;\r\n }", "protected boolean processSectionData(SpreadsheetSection section) {\n\t\tList<SpreadsheetRow> rows = section.getSectionRows();\n\t\tcurrentSheetName = section.getSheetName();\n\t\t\n\t\tif (section.getSectionHeadingString().startsWith(PAGE_ITEMS_UPPER)) {\n\t\t\tcurrentPage = new ExtractItems(application, currentPage).processSectionData(section);\n\t\t\tif (currentPage == null) {\n\t\t\t\tlogger.debug(\"Warning: no current page returned for section. \" + section.toString());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tfor (Iterator<SpreadsheetRow> rowIter = rows.iterator(); rowIter.hasNext();) {\n\t\t\tSpreadsheetRow spreadsheetRow = (SpreadsheetRow) rowIter.next();\n\t\t\tif (spreadsheetRow.getRowItems().size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (section.getSectionHeadingString().startsWith(InformerSpreadsheetLoader.SHEET_END)) {\n\t\t\t\t// ignore the rest of the rows, although should never have got here\n\t\t\t\tlogger.debug(\"Did not expect to be processing a Sheet End section - ignoring!\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public Builder section_type(String section_type) {\n this.section_type = section_type;\n return this;\n }" ]
[ "0.47525185", "0.47376356", "0.4712401", "0.45720986", "0.45223066", "0.45171416", "0.45123422", "0.44436854", "0.44373104", "0.4416376", "0.4337754", "0.4286977", "0.42779896", "0.42746758", "0.4268519", "0.42636752", "0.42292538", "0.42163208", "0.41923434", "0.41923434", "0.41741624", "0.41735873", "0.4169794", "0.41552594", "0.4134988", "0.41243735", "0.41172248", "0.410949", "0.41093978", "0.4097574", "0.4097574", "0.4094838", "0.40941992", "0.40834892", "0.40802404", "0.40604147", "0.40563884", "0.40409118", "0.40384462", "0.40309986", "0.40302196", "0.40280128", "0.40252084", "0.4014269", "0.40026313", "0.40021876", "0.39954063", "0.39939502", "0.39896488", "0.3986527", "0.3985561", "0.39830348", "0.39774403", "0.39760235", "0.39701632", "0.39669088", "0.39633396", "0.39627594", "0.3955458", "0.394715", "0.3943472", "0.39422143", "0.39338446", "0.39300653", "0.39142412", "0.3910359", "0.39023376", "0.390231", "0.38870803", "0.38760972", "0.38667232", "0.38615865", "0.38592654", "0.3844961", "0.38443506", "0.3841444", "0.38366202", "0.38350326", "0.38280323", "0.38245824", "0.3823662", "0.38108727", "0.38078263", "0.38051742", "0.3796421", "0.37828568", "0.37787247", "0.37742215", "0.37681162", "0.37642017", "0.3763614", "0.37546948", "0.3752589", "0.37512287", "0.373038", "0.3729856", "0.3728748", "0.3726082", "0.3725143", "0.3720627" ]
0.6864123
0
private boolean verboseMode = true; Tests the listSensorDataTimestamp method to see if power source exists on this server.
@Before @Test public void testListSensorDataTimestampSource() throws Exception { command = "sensordata SIM_SEA timestamp 2009-11-01T00:00:00.0000"; commandProcessor = new CommandProcessor(); commandList = commandProcessor.parseCommand(command); cli = new CommandLineInterface(); commandProcessor.processCommand(cli, commandList); assertTrue(ASSERT_SOURCE_MESSAGE, cli.errorEncountered); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean verboseOn() {\n return (SolrUtil.DEBUG || Debug.verboseOn());\n }", "public boolean isPowerSource()\r\n {\r\n return true;\r\n }", "public static boolean verbose() {\n return verbose;\n }", "public boolean isVerbose() {\n\treturn verbose;\n }", "public boolean isVerbose();", "public boolean isVerbose() {\n return verbose;\n }", "public boolean isVerbose() {\n return verbose;\n }", "public boolean isVerbose() {\n \n // return it\n return showVerboseOutput;\n }", "public boolean isVerbose() {\n return mVerbose;\n }", "public boolean isVerbose ( ) {\n\t\treturn verbose;\n\t}", "public boolean isVerbose() {\r\n\t\treturn this.verbose;\r\n\t}", "public boolean isVerbose()\n\t{\n\t\treturn _options.isVerbose();\n\t}", "public boolean logVerbose()\r\n {\r\n return verboseLevelHandler.getBoolean();\r\n }", "public boolean isInfoLoggingOn() {\n return verbose || !quiet;\n }", "boolean hasTelemetry();", "@Test\n public void testListSensorDataTimestampCurrentYear() throws Exception {\n command = \"sensordata SIM_KAHE_1 timestamp 2009-11-01T00:00:00.0000\";\n if (verboseMode) {\n System.out.println(\"> \" + command);\n System.out.println(\"Checking if data about power source exists...\");\n }\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n result = (new SensordataTimestamp()).doCommand(cli, commandList);\n if (verboseMode) {\n System.out.println(result);\n }\n assertTrue(\"Checking if data about power source exists\", result.contains(\"Tool\")\n && result.contains(\"Source\") && result.contains(\"Properties\"));\n if (verboseMode) {\n System.out.println(OK_MESSAGE + CARRIAGE_RETURN);\n }\n }", "public boolean isVerbose() {\n return m_commandLine.hasOption(m_verboseOption);\n }", "public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}", "public boolean getEnableSnow()\n {\n return this.func_150559_j();\n }", "boolean isMonitoringEnabled();", "public void setVerbose(boolean value);", "@Override\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"samsongTV powerOn\");\n\n\t}", "public boolean isPowerOn() {\n Log.d(TAG, \"Is Fist Power On: \" + (SystemProperties.getBoolean(IS_POWER_ON_PROPERTY, false)));\n\n if (!SystemProperties.getBoolean(IS_POWER_ON_PROPERTY, false)) {\n SystemProperties.set(IS_POWER_ON_PROPERTY, \"true\");\n return true;\n } else {\n return false;\n }\n }", "public static boolean isVolteConfCallLogSupport() {\n return MTK_VOLTE_CONFERENCE_CALLLOG;\n }", "public abstract boolean isLiveMode();", "public void setVerbose(boolean isVerbose) {\r\n this.isVerbose = isVerbose;\r\n }", "private final boolean isDebugMode() {\r\n\tString debug = m_ctx.getInitParameter(\"gateway.debug\");\r\n\tif (debug == null)\r\n\t return false;\r\n\tif (debug.equalsIgnoreCase(\"true\"))\r\n\t return true;\r\n\telse\r\n\t return false;\r\n }", "public boolean getDataLogging () {\n return dataLogging;\n }", "@Override\r\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"ig tv power on\");\r\n\t}", "public static void verbose(String verbose) {\n if (IS_DEV) {\n Log.v(DEBUG_TAG, verbose);\n }\n }", "public static Boolean getShowlog()\n\t{\n\t\treturn showlog;\n\t}", "boolean isMonitoring();", "boolean isMonitoring();", "public static boolean debugOn()\r\n {\r\n on = true;\r\n System.out.println(\"Debug Mode On\");\r\n return on;\r\n }", "public boolean isSetTServerInfo() {\n return this.tServerInfo != null;\n }", "public void setVerbose(boolean verbose) {\n verboseChecked = true;\n this.verbose = verbose;\n }", "public boolean isStartSetupwizard() {\n\t\treturn sp.getBoolean(\"firstTimePowerOn\", true);\n\t}", "public static boolean enableVolumeMonitoring() {\r\n return enableVolumeMonitoring.getValue();\r\n }", "public boolean isUseHotStart() {\n return useHotStart;\n }", "@Test\n public void testListSensorDataTimestampPreviousYear() throws Exception {\n command = \"sensordata SIM_KAHE_1 timestamp 2008-11-01T00:00:00.0000\";\n if (verboseMode) {\n System.out.println(\"> \" + command);\n System.out.println(\"Checking if data about power source exists...\");\n }\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n result = (new SensordataTimestamp()).doCommand(cli, commandList);\n if (verboseMode) {\n System.out.println(result);\n }\n assertEquals(\"Checking if data about power source exists\",\n \"No data for SIM_KAHE_1 on 2008-11-01T00:00:00.0000.\", result);\n if (verboseMode) {\n System.out.println(OK_MESSAGE + CARRIAGE_RETURN);\n }\n }", "public static boolean debugging()\n {\n return info;\n }", "public boolean isShowLogging() {\n return showLogging;\n }", "public boolean isLog2Data();", "public void setVerbose ( boolean verbose ) {\n\t\tthis.verbose = verbose;\n\t}", "public boolean isLogTime() {\n return logTime;\n }", "private boolean m1178d() {\n return C3815z4.m2010d().mo55979a(C3815z4.C3816a.SDK_STOPPED, false);\n }", "public boolean isNoisyDryRunMode();", "public boolean containsVerboseLogs() throws ServiceFailureException;", "public boolean isQuickQueryTimestampEnabled() {\n return isQuickQueryTimestampEnabled;\n }", "public void setVerbose(boolean verbose) {\n\tthis.verbose = verbose;\n\tlog(\"Verbose mode is \" + verbose);\n }", "boolean hasStartingInfo();", "public boolean isDebugEnabled();", "boolean hasShotChangeDetectionConfig();", "public void checkIfShowerOn(){\n double currentSMA = mySMA.currentAverage();\n Log.d(LOGTAG,\"currentSMA: \"+currentSMA);\n Log.d(LOGTAG,\"isShowerOn: \"+ isShowerOn);\n if (currentSMA>SMA_THRESHOLD && !isShowerOn){\n //Initialize stuff to do once shower is on\n isShowerOn=true;\n startShower();\n } else if (currentSMA<SMA_THRESHOLD && isShowerOn){\n //Shutdown\n isShowerOn=false;\n endShower();\n }\n }", "public void setVerbose(Boolean v) {\r\n\t\tm_verbose = v;\r\n\t}", "@Override\n public boolean showTips() {\n return mesoCfgXML.getTipsOption();\n }", "@java.lang.Override public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }", "public boolean isInfoEnabled()\n/* */ {\n/* 274 */ return getLogger().isInfoEnabled();\n/* */ }", "public void setVerbose(boolean verbose) {\n\t\t_verbose = verbose;\n\t}", "void k2h_set_debug_level_silent();", "public static boolean isPowerOn() {\n try {\n return BlueCoveImpl.instance().getBluetoothStack().isLocalDevicePowerOn();\n } catch (BluetoothStateException e) {\n return false;\n }\n }", "public boolean isLivePlant() {\r\n return livePlant;\r\n }", "public boolean enabled()\n {\n return binLog != null;\n }", "boolean hasMainUtteranceDynamicGain();", "Object getVerbose();", "Object getVerbose();", "boolean isDebugEnabled();", "private void checkProductionMode() {\n if (getApplicationOrSystemProperty(SERVLET_PARAMETER_DEBUG, \"true\")\n .equals(\"false\")) {\n // \"Debug=true\" is the old way and should no longer be used\n productionMode = true;\n } else if (getApplicationOrSystemProperty(\n SERVLET_PARAMETER_PRODUCTION_MODE, \"false\").equals(\"true\")) {\n // \"productionMode=true\" is the real way to do it\n productionMode = true;\n }\n \n if (!productionMode) {\n /* Print an information/warning message about running in debug mode */\n // TODO Maybe we need a different message for portlets?\n logger.warning(NOT_PRODUCTION_MODE_INFO);\n }\n }", "public boolean hasPower() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public boolean isDebug();", "boolean hasUseTime();", "boolean hasUseTime();", "public boolean getPower(){\n return power;\n }", "private boolean isDemoMode() {\r\n\t\treturn Boolean.valueOf(getSettingAsText(CONFIG_DEMO_MODE, Boolean.FALSE.toString()));\r\n\t}", "protected String getVerboseParameter() {\n return verbose ? null : \"/quiet\";\n }", "protected boolean isTelemetryEnabled() {\n if(!this.telemetryEnabled){\n InternalLogging.warn(TAG, \"Could not track telemetry item, because telemetry \" +\n \"feature is disabled.\");\n }\n return this.telemetryEnabled;\n }", "public boolean getDebugMode() { return debugMode; }", "public boolean getInstallTracked() {\n }", "boolean hasTsUpdate();", "protected void setVerbose(boolean on)\n\t{\n\t\t_options.setVerbose(on);\n\t}", "boolean hasSaveSensor();", "@FXML\n\tpublic void logRemoteWakeup() {\n\t\tcheckFieldEditOrNot = true;\n\t\tif (enableRemoteWakeup.isSelected()) {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Enable.<br>\");\n\t\t} else {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Disable.<br>\");\n\t\t}\n\t}", "void setVerbose( boolean verbose );", "public void setVerbose(boolean b) {\n verbose = b;\n }", "public void toggleVerbose() {\n\t\tverbose = !verbose;\n\t}", "public boolean isDebugEnabled() {\n return getFormat().getConverterService().isDebugEnabled();\n }", "public boolean hasPower() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "boolean hasPower();", "boolean isInfoEnabled();", "private boolean m11885j() {\n IUser a = ((C3592a) C3596c.m13172a(C3592a.class)).user().mo22165a();\n if (!C9290a.f25466a && a != null && a.isEnableShowCommerceSale()) {\n if (this.f9687p == LiveMode.VIDEO) {\n return true;\n }\n LiveMode liveMode = this.f9687p;\n LiveMode liveMode2 = LiveMode.THIRD_PARTY;\n }\n return false;\n }", "public boolean mo43870j() {\n return ((String) this.f42902g.get(C13822a.Application)).equals(\"dns-sd\") && ((String) this.f42902g.get(C13822a.Instance)).equals(\"_services\");\n }", "public boolean isDebugEnabled()\n/* */ {\n/* 250 */ return getLogger().isDebugEnabled();\n/* */ }", "public static void verbose(boolean flag) {\n verbose = flag;\n }", "public boolean isDontTouchLogging() {\n return dontTouchLogging;\n }", "public static boolean isAuditEnabled() {\n\n return debugLogger.isInfoEnabled();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean readDeviceInfo() {\n\t\tboolean flag = oTest.readDeviceInfo();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public boolean isLowLightShow() {\n return false;\n }", "public void test() {\n\t\t\r\n\t\tSystem.out.println(\"-->\" + CommonMethod.createCmdOfflineVersion10(\"jxsmarthome\"));\r\n\t\t\r\n\t}" ]
[ "0.67993146", "0.65900856", "0.6549087", "0.6543461", "0.6525766", "0.64824474", "0.64824474", "0.64210546", "0.6271815", "0.621153", "0.6197037", "0.61851525", "0.61295193", "0.5938443", "0.5930152", "0.5779006", "0.5748711", "0.57239574", "0.57028365", "0.5653906", "0.56334716", "0.56235576", "0.5617271", "0.5583479", "0.5568833", "0.5555412", "0.55434114", "0.55239743", "0.55086625", "0.5489722", "0.5475602", "0.5472507", "0.5472507", "0.5446494", "0.5424094", "0.5423506", "0.54185086", "0.5400982", "0.5367057", "0.5359561", "0.5345828", "0.53393996", "0.53354716", "0.5330904", "0.5327275", "0.53236455", "0.5296625", "0.5276358", "0.5257969", "0.52531284", "0.5252105", "0.5242625", "0.5238253", "0.5235552", "0.5231871", "0.5226065", "0.5219517", "0.5216887", "0.52101827", "0.5203418", "0.5201785", "0.519156", "0.5181256", "0.5178545", "0.51646864", "0.5160879", "0.5160879", "0.51570344", "0.5141621", "0.5140661", "0.5139878", "0.5134655", "0.5134655", "0.51344293", "0.5133226", "0.5130892", "0.51300085", "0.5128291", "0.51270586", "0.5124334", "0.5122537", "0.5119523", "0.51172584", "0.5108266", "0.5102792", "0.50984424", "0.5095376", "0.5091378", "0.5090583", "0.50905436", "0.50888205", "0.50865585", "0.5080942", "0.5077918", "0.50764334", "0.5073647", "0.50626165", "0.50626165", "0.5057636", "0.5057128", "0.50533587" ]
0.0
-1
Tests the listSensorDataTimestamp method to see if timestamp string is valid.
@Test public void testListSensorDataTimestampTimestamp() throws Exception { command = "sensordata SIM_KAHE_1 timestamp 11-01-2009T00:00:00.0000"; if (verboseMode) { System.out.println("> " + command); System.out.println("Checking if timestamp is not a valid string..."); } commandList = commandProcessor.parseCommand(command); cli = new CommandLineInterface(); commandProcessor.processCommand(cli, commandList); assertTrue(ASSERT_TIMESTAMP_MESSAGE, cli.errorEncountered); if (verboseMode) { System.out.println(result); System.out.println(OK_MESSAGE + CARRIAGE_RETURN); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static boolean isTimeStampValid(String timestamp) {\n return parseTimeStamp(timestamp) != null;\n }", "public boolean verifyTimestamp(String timestamp) {\n\t\tlog.debug(\"Verifying string based timestamp\");\n\t\treturn (verifyTimestamp(Long.parseLong(timestamp)));\n\t}", "@Test\n public void timestampInvalidString() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.TIMESTAMP, new TextNode(\"1234567890\"));\n assertNull(retVal);\n }", "public static boolean verifyTimeStamp(String timeStr) {\n return true;\n }", "@Before\n @Test\n public void testListSensorDataTimestampSource() throws Exception {\n command = \"sensordata SIM_SEA timestamp 2009-11-01T00:00:00.0000\";\n commandProcessor = new CommandProcessor();\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n assertTrue(ASSERT_SOURCE_MESSAGE, cli.errorEncountered);\n }", "@Test\n public void testTimeStampParsingAndErrorMessages() throws ParseException {\n verify.rule(OsTxTimestampCriteria.class, \"date = '09/10/2014 11:00:12 AM'\");\n verify.rule(OsTxTimestampCriteria.class, \"date = \\\"09/10/2014 11:00:12 AM\\\"\");\n\n verify.rule(OsTxTimestampCriteria.class, \"date in ('09/10/2014 11:00:12 AM' .. '09/10/2014 12:00:12 AM')\");\n verify.rule(OsTxTimestampCriteria.class, \"date in (\\\"09/10/2014 11:00:12 AM\\\" .. \\\"09/10/2014 12:00:12 AM\\\")\");\n\n // String syntaxtError = \"Invalid timestamp format - format should be [MM/dd/yyyy hh:mm:ss a] or [\";\n // verify.checkRuleErrors(OsTxTimestampCriteria.class, \"date = '09/10/2014 AM'\", syntaxtError);\n\n // Use locale specific timestamp format - system should convert correctly\n // For example: MMM d, yyyy h:mm:ss a\n Date date = OrcsScriptUtil.parseDate(\"09/10/2014 11:00:12 AM\");\n String localeFormattedDate = DateFormat.getDateTimeInstance().format(date);\n verify.rule(OsTxTimestampCriteria.class, \"date = '\" + localeFormattedDate + \"'\");\n }", "@Test\n public void testListSensorDataTimestampCurrentYear() throws Exception {\n command = \"sensordata SIM_KAHE_1 timestamp 2009-11-01T00:00:00.0000\";\n if (verboseMode) {\n System.out.println(\"> \" + command);\n System.out.println(\"Checking if data about power source exists...\");\n }\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n result = (new SensordataTimestamp()).doCommand(cli, commandList);\n if (verboseMode) {\n System.out.println(result);\n }\n assertTrue(\"Checking if data about power source exists\", result.contains(\"Tool\")\n && result.contains(\"Source\") && result.contains(\"Properties\"));\n if (verboseMode) {\n System.out.println(OK_MESSAGE + CARRIAGE_RETURN);\n }\n }", "@Test\n public void testListSensorDataTimestampPreviousYear() throws Exception {\n command = \"sensordata SIM_KAHE_1 timestamp 2008-11-01T00:00:00.0000\";\n if (verboseMode) {\n System.out.println(\"> \" + command);\n System.out.println(\"Checking if data about power source exists...\");\n }\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n result = (new SensordataTimestamp()).doCommand(cli, commandList);\n if (verboseMode) {\n System.out.println(result);\n }\n assertEquals(\"Checking if data about power source exists\",\n \"No data for SIM_KAHE_1 on 2008-11-01T00:00:00.0000.\", result);\n if (verboseMode) {\n System.out.println(OK_MESSAGE + CARRIAGE_RETURN);\n }\n }", "public static void hasTimeStamp(String filePath) {\n\t\tString row = firstRow(filePath); // gets the first row of the log\n\t\tArrayList<String> splits = splits(row); // splits the row\n\t\t\n\t\tString timeStamp = splits.get(0); // 15 feb 2018 06:33:12\n\t\t\n\t\tif (timeStamp.matches(\"\\\\d\\\\d (...) \\\\d\\\\d\\\\d\\\\d \\\\d\\\\d:\\\\d\\\\d:\\\\d\\\\d\")) {\n\t\t\tMain.debug.LOG(\"omni-epsilon.log contains timestamp\");\n\t\t} else {\n\t\t\tMain.debug.LOGError(\"omni-epsilon.log does not contain timestamp\");\n\t\t}\n\t}", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@Test void testShortTimestampLiteral() {\n sql(\"select timestamp '1969-07-20'\")\n .ok(\"SELECT TIMESTAMP '1969-07-20 00:00:00'\");\n // PostgreSQL allows the following. We should too.\n sql(\"select ^timestamp '1969-07-20 1:2'^\")\n .fails(\"Illegal TIMESTAMP literal '1969-07-20 1:2': not in format \"\n + \"'yyyy-MM-dd HH:mm:ss'\"); // PostgreSQL gives 1969-07-20 01:02:00\n sql(\"select ^timestamp '1969-07-20:23:'^\")\n .fails(\"Illegal TIMESTAMP literal '1969-07-20:23:': not in format \"\n + \"'yyyy-MM-dd HH:mm:ss'\"); // PostgreSQL gives 1969-07-20 23:00:00\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean hasTimestamp() {\n return timestamp_ != null;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "protected long readTimestampFromString(String value) {\r\n\t\t return Long.parseLong(value);\r\n\t\t }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "private boolean logContainsTimestamp(long timestamp,String filename) {\n\t\tBufferedReader br = null;\n\t\tBathMoniterEvent ev= new BathMoniterEvent();\n\t\ttry {\n\t\t\tString sCurrentLine;\n\t\t\tbr = new BufferedReader(new FileReader(filename));\n\n\t\t\tbr.readLine();// read the formatting data at the top\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\ttry{\n\t\t\t\t\tev.setData(sCurrentLine);\n\t\t\t\t\tif(ev.getTimestamp() == timestamp)\n\t\t\t\t\t\treturn true;\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n \n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "void checkForValidDate(String dateTime) {\n\n int daysOfMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\n Timestamp now = new Timestamp(new java.util.Date().getTime());\n Timestamp date = Timestamp.valueOf(startDateTime);\n if (date.after(now)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Date / Time later than today's date : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (date.after(now))\n\n StringTokenizer t = new StringTokenizer(dateTime, \"- :.\");\n int year = Integer.parseInt(t.nextToken());\n int month = Integer.parseInt(t.nextToken());\n int day = Integer.parseInt(t.nextToken());\n int hour = Integer.parseInt(t.nextToken());\n int minute = Integer.parseInt(t.nextToken());\n boolean isLeapYear = ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0));\n if (isLeapYear) daysOfMonth[1] += 1;\n if (year < 1850) {\n outputError(lineCount + \" - Fatal - \" +\n \"Year before 1850 : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (year < 1850)\n\n if (month > 12) {\n outputError(lineCount + \" - Fatal - \" +\n \"Month invalid ( > 12) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (month > 12)\n\n if (day > daysOfMonth[month-1]) {\n outputError(lineCount + \" - Fatal - \" +\n \"Day invalid ( > no of days in month) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (day > (daysOfMonth[month-1])\n\n if (hour > 23) {\n outputError(lineCount + \" - Fatal - \" +\n \"Hour invalid ( > 23) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (hour > 23)\n\n if (minute > 59) {\n outputError(lineCount + \" - Fatal - \" +\n \"Minute invalid ( > 59) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (minute > 59)\n\n }", "private Timestamp getTimestamp(String timestampString) {\r\n Timestamp timestamp;\r\n try {\r\n timestamp = SpringContext.getBean(DateTimeService.class).convertToSqlTimestamp(timestampString);\r\n }\r\n catch (ParseException e) {\r\n assertNull(\"Timestamp String was not parseable\", e);\r\n return null;\r\n }\r\n return timestamp;\r\n }", "private static Date parseTimestampWithSeconds(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n if(!containsT && containsSpace){\r\n try {\r\n Date date = formatSecs.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else if(containsT && !containsSpace){\r\n try {\r\n Date date = formatSecsWT.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "public boolean hasTimestamp() {\n return result.hasTimestamp();\n }", "private static Date parseTimeStamp(String timestamp) {\n if (timestamp == null) {\n return null;\n }\n\n try {\n return SIMPLE_DATE_FORMAT.parse(timestamp);\n } catch (ParseException dateTimeParseException) {\n return null;\n }\n }", "public boolean hasTimestamp() {\n return timestampBuilder_ != null || timestamp_ != null;\n }", "public boolean verifyTimestamp(long lTimestamp) {\n\t\tDate now = new Date();\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(String.format(\"Check if input timestamp (%d, args) is much less than current timestamp (%d) that would suggest the message is too old\",\n\t\t\t\t\tlTimestamp, now.getTime()));\n\t\t\tlog.debug(String.format(\"Max age of a message is %d seconds\", maxMessageAgeSeconds));\n\t\t}\n\t\tif (((now.getTime() - lTimestamp) > maxMessageAgeSeconds*1000)\n\t\t\t\t&& (lTimestamp != 0)) {\n\t\t\tlog.debug(\"Message is too old\");\n\t\t\t// Message is too old\n\t\t\tmessageTooOld = true;\n\t\t} else {\n\t\t\t// Message has not yet expired\n\t\t\tlog.debug(\"Message is not too old\");\n\t\t\tmessageTooOld = false;\n\t\t}\n\t\treturn !messageTooOld;\n\t}", "public boolean hasTimestamp() {\n return fieldSetFlags()[6];\n }", "@Override\n\t\tpublic java.sql.Timestamp convert(String s) throws ParseException {\n\t\t\ts = supportHtml5DateTimePattern(s);\n\t\t\t\n\t\t\tif (timeStampWithoutSecPatternLen == s.length()) {\n\t\t\t\ts = s + \":00\";\n\t\t\t}\n\t\t\tif (s.length() > dateLen) {\n\t\t\t\treturn java.sql.Timestamp.valueOf(s);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new java.sql.Timestamp(getFormat(datePattern).parse(s).getTime());\n\t\t\t}\n\t\t}", "private static Timestamp parseString(String timestampString,\n String pattern,\n boolean withZoneUTC,\n boolean optionalFracSecond) {\n boolean optionalZoneOffset = false;\n if ((pattern == null ||\n pattern.equals(TimestampDef.DEFAULT_PATTERN)) &&\n withZoneUTC) {\n\n String tsStr = trimUTCZoneOffset(timestampString);\n /*\n * If no zone offset or UTC zone in timestamp string, then parse it\n * using parseWithDefaultPattern(). Otherwise, parse it with\n * DateTimeFormatter.\n */\n if (tsStr != null) {\n return parseWithDefaultPattern(tsStr);\n }\n optionalZoneOffset = true;\n }\n\n String fmt = (pattern == null) ? TimestampDef.DEFAULT_PATTERN : pattern;\n try {\n DateTimeFormatter dtf = getDateTimeFormatter(fmt, withZoneUTC,\n optionalFracSecond,\n optionalZoneOffset,\n 0);\n TemporalAccessor ta = dtf.parse(timestampString);\n if (!ta.isSupported(ChronoField.YEAR) ||\n !ta.isSupported(ChronoField.MONTH_OF_YEAR) ||\n !ta.isSupported(ChronoField.DAY_OF_MONTH)) {\n\n throw new IllegalArgumentException(\"The timestamp string \" +\n \"must contain year, month and day\");\n }\n\n Instant instant;\n boolean hasOffset = (ta.isSupported(ChronoField.OFFSET_SECONDS) &&\n ta.get(ChronoField.OFFSET_SECONDS) != 0);\n if (ta.isSupported(ChronoField.HOUR_OF_DAY)) {\n instant = hasOffset ? OffsetDateTime.from(ta).toInstant() :\n Instant.from(ta);\n } else {\n instant = LocalDate.from(ta).atStartOfDay\n ((hasOffset ? ZoneOffset.from(ta) : UTCZone)).toInstant();\n }\n return toTimestamp(instant);\n } catch (IllegalArgumentException iae) {\n throw new IllegalArgumentException(\"Failed to parse the date \" +\n \"string '\" + timestampString + \"' with the pattern: \" +\n fmt + \": \" + iae.getMessage(), iae);\n } catch (DateTimeParseException dtpe) {\n throw new IllegalArgumentException(\"Failed to parse the date \" +\n \"string '\" + timestampString + \"' with the pattern: \" +\n fmt + \": \" + dtpe.getMessage(), dtpe);\n } catch (DateTimeException dte) {\n throw new IllegalArgumentException(\"Failed to parse the date \" +\n \"string '\" + timestampString + \"' with the pattern: \" +\n fmt + \": \" + dte.getMessage(), dte);\n }\n }", "public boolean hasTimestamp() {\n return fieldSetFlags()[2];\n }", "public static Timestamp parseString(String timestampString) {\n return parseString(timestampString, null, true);\n }", "public void testInit_withInvalidTimestamp() {\n final BaseTweetView view = createView(context, TestFixtures.TEST_TWEET);\n // recycle so we're not relying on first time defaults, timestamp should clear\n view.setTweet(TestFixtures.INVALID_TIMESTAMP_TWEET);\n Assert.assertThat(view.getTweetId(), is(TestFixtures.INVALID_TIMESTAMP_TWEET.getId()));\n Assert.assertThat(view.timestampView.getText().toString(), is(TestFixtures.EMPTY_STRING));\n }", "public static void assertTimestampEquals(final String message, final String ts1, final String ts2) throws Exception {\r\n\r\n assertTrue(message, compareTimestamps(ts1, ts2) == 0);\r\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 setTimestamp(String timestamp){\n put(SlackParamsConstants.TIMESTAMP, timestamp);\n }", "@Test\n public void testHiveParquetTimestampAsInt96_compare() throws Exception {\n compareParquetReadersColumnar(\"convert_from(timestamp_field, 'TIMESTAMP_IMPALA')\", \"cp.`parquet/part1/hive_all_types.parquet`\");\n }", "public void setValidFrom (Timestamp ValidFrom);", "private static Date parseTimestampWithSecondsWithTimeZone(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n if(!containsT && containsSpace){\r\n try {\r\n Date date = formatSecsTZ.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else if(containsT && !containsSpace){\r\n try {\r\n Date date = formatSecsTZwT.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "static Timestamp parseString(String timestampString,\n String pattern,\n boolean withZoneUTC) {\n return parseString(timestampString, pattern, withZoneUTC,\n (pattern == null));\n }", "public static boolean isArray_infos_timestamp() {\n return false;\n }", "@Test\n public void testGetListingInvalidDateFormat() {\n ListingFileHelper instance = new ListingFileHelper();\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(getTestListingDateTimeStamp());\n sb.append(\"~\");\n sb.append(testTvShow);\n sb.append(\"~\");\n sb.append(testTitle);\n sb.append(\"~\");\n sb.append(testChannel.getChannelName());\n instance.getListing(sb.toString());\n fail(\"Expected an IllegalArgumentException to be thrown\");\n } catch (IllegalArgumentException iaEx) {\n String expectedErrorMessage = \"Unable to parse listing datetime: \" + getTestListingDateTimeStamp();\n assertEquals(expectedErrorMessage, iaEx.getMessage());\n }\n }", "public void setTimeStamp(String timeStamp) {\n this.timeStamp = timeStamp;\n }", "public boolean checkData(String data){\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t dateFormat.setLenient(false);\n\t try {\n\t\t\tdateFormat.parse(data.trim());\n\t\t} catch (java.text.ParseException e) {\n\t\t\treturn false;\n\t\t}\n\t return true;\n\t}", "public static boolean isValidTime(String test) {\n try {\n LocalTime.parse(test, TIME_FORMATTER);\n LocalTime.parse(test, TIME_FORMATTER_STRICT);\n return true;\n } catch (DateTimeParseException ex) {\n return false;\n }\n }", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_invalid_format_timestamp_K(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_format_timestamp_K);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"40004\"));\n Assert.assertTrue(content.contains(\"Invalid end time date format.\"));\n\n }", "public boolean hasTimestamp() {\n return fieldSetFlags()[0];\n }", "private static boolean dateValid(int[] time ) { \r\n\t\tfor ( int i = 0 ; i < time.length; i++) \r\n\t\t\tif (time[i] >2400 || time[i] < 0 ) \r\n\t\t\t\treturn false;\r\n\t\treturn true;\t\t\r\n\t}", "public static boolean isValidDatetime(String test) {\n String[] components = test.split(\" \");\n String date = components[0];\n String startTime = components[1];\n\n //If the format is dd/mm/yyyy hhmm k\n if (components.length == 3) {\n String duration = components[2];\n return isValidDate(date) && isValidTime(startTime) && isValidDuration(duration);\n //If the format is dd/mm/yyyy hhmm to hhmm\n } else if (components.length == 4) {\n String endtime = components[3];\n return isValidDate(date) && isValidTime(startTime) && isValidTime(endtime);\n } else {\n return false;\n }\n }", "@Test\n public void test_column_type_detection_datetimes_03() throws SQLException {\n testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"13:15:00\", XSDDatatype.XSDtime), true, Types.TIME, Time.class.getCanonicalName());\n }", "public final void testGetTimeStamp() {\n assertEquals(hello.timeStamp, n.getTimeStamp());\n }", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_invalid_format_timestamp_noT(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_format_timestamp_noT);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"40004\"));\n Assert.assertTrue(content.contains(\"Invalid end time date format.\"));\n\n }", "@Test\n public void test_column_type_detection_datetimes_04() throws SQLException {\n testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"13:15:00.123\", XSDDatatype.XSDtime), true, Types.TIME, Time.class.getCanonicalName());\n }", "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 }", "@Test\n public void testHiveParquetTimestampAsInt96_basic() throws Exception {\n BaseTestQuery.testBuilder().unOrdered().sqlQuery((\"SELECT convert_from(timestamp_field, 'TIMESTAMP_IMPALA') as timestamp_field \" + \"from cp.`parquet/part1/hive_all_types.parquet` \")).baselineColumns(\"timestamp_field\").baselineValues(TestBuilder.convertToLocalDateTime(\"2013-07-06 00:01:00\")).baselineValues(((Object) (null))).go();\n }", "@Test\n public void test_column_type_detection_datetimes_01() throws SQLException {\n Model m = ModelFactory.createDefaultModel();\n testColumnTypeDetection(\"x\", m.createTypedLiteral(Calendar.getInstance()).asNode(), true, Types.TIMESTAMP, Timestamp.class.getCanonicalName());\n }", "@Test\n public void testTimestampColumnOptional() {\n Schema schema = Schema.newBuilder()\n .setTimestampColumn(\"timestamp\").build();\n\n Map<String, Value> map = new HashMap<>();\n map.put(\"timestamp\", Values.asTimestamp(Values.ofString(\"2019-01-30T19:30:12Z\")));\n\n PCollection<FeatureRow> output = pipeline\n .apply(Create.of(Lists.newArrayList(map)).withCoder(VALUE_MAP_CODER))\n .apply(new ValueMapToFeatureRowTransform(\"entity\", schema));\n\n PAssert.that(output).satisfies(maps -> {\n FeatureRow row = maps.iterator().next();\n assertEquals(\"entity\", row.getEntityName());\n assertEquals(map.get(\"timestamp\").getTimestampVal(), row.getEventTimestamp());\n return null;\n });\n pipeline.run();\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 }", "public void setTimestamp(Timestamp timestamp) {\n\t\tthis.timestamp = timestamp;\n\t}", "@Test\n\tpublic void testTstamp001() throws VistaWebServiceFault {\n\n\t\tresponse = service.tstamp();\n\n\t\tassertNotNull(response);\n\t\tif (response.getCurrentTimeStamp() != null) {\n\t\t\tassertEquals(\"5464917241\", response.getCurrentTimeStamp());\n\t\t} else {\n\t\t\tfail(\"currentTimeStamp is NULL !!\");\n\t\t}\n\t}", "public static void transTimeStamp(String locator) {\n\t\tString month = d.toString().substring(4, 7);\n\t\tString date = d.toString().substring(8, 10);\n\t\tString year = d.toString().substring(24);\n\t\tString time = d.toString().substring(11, 16);\n\t\t\n\t\tString timeStamp_acual = driver.findElement(By.cssSelector(OR.getProperty(locator))).getText();\n\t\t//\"trans1_Time_CSS\"\n\t\tAssert.assertTrue(timeStamp_acual.contains(month));\n\t\tAssert.assertTrue(timeStamp_acual.contains(date));\n\t\tAssert.assertTrue(timeStamp_acual.contains(year));\n\t\tAssert.assertTrue(timeStamp_acual.contains(time));\n\t\t\n\t\tlog.debug(\"Time Stamp varified\");\n\t\ttest.log(LogStatus.INFO, \"Time Stamp validated\");\n\n\t}", "private static boolean isInOrderTimestamp(\n long timestamp,\n long prevTimestamp)\n {\n long timestampDiff = timestamp - prevTimestamp;\n\n // Assume that a diff this big must be due to reordering. Don't update\n // with reordered samples.\n return (timestampDiff < 0x80000000L);\n }", "@Test\n public void testImpalaParquetTimestampInt96AsTimeStamp() throws Exception {\n try {\n BaseTestQuery.alterSession(PARQUET_NEW_RECORD_READER, false);\n compareParquetInt96Converters(\"field_impala_ts\", \"cp.`parquet/int96_impala_1.parquet`\");\n BaseTestQuery.alterSession(PARQUET_NEW_RECORD_READER, true);\n compareParquetInt96Converters(\"field_impala_ts\", \"cp.`parquet/int96_impala_1.parquet`\");\n } finally {\n BaseTestQuery.resetSessionOption(PARQUET_NEW_RECORD_READER);\n }\n }", "private String doValidTimeCheck(String pDateTime) {\n String aDateTime = pDateTime;\n\n if (pDateTime.length() > 0) {\n String aTime = pDateTime.substring(8);\n if (aTime.matches(\"240000\")) {\n aDateTime = pDateTime.substring(0,8) + \"235900\";\n }\n }\n return aDateTime;\n }", "public void testFormatDateStringFromTimestamp_other() {\n calendar.set(\n /* year = */ 1991,\n /* month = */ Calendar.MONTH,\n /* day = */ 11);\n assertEquals(\"March 11\",\n ContactInteractionUtil.formatDateStringFromTimestamp(calendar.getTimeInMillis(),\n getContext()));\n }", "public Double[] checkMissingLonLatTime() {\n try {\n Double[] longitudes = getSampleLongitudes();\n for (int j = 0; j < numSamples; j++) {\n if ( longitudes[j] == null ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(longitudeIndex + 1);\n msg.setColName(userColNames[longitudeIndex]);\n String comment = \"missing longitude\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"no longitude column\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n try {\n Double[] latitudes = getSampleLatitudes();\n for (int j = 0; j < numSamples; j++) {\n if ( latitudes[j] == null ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(latitudeIndex + 1);\n msg.setColName(userColNames[latitudeIndex]);\n String comment = \"missing latitude\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"no latitude column\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n Double[] times = null;\n try {\n times = calcSampleTimes();\n for (int j = 0; j < numSamples; j++) {\n if ( times[j] == null ) {\n for (int k = 0; k < indicesForTime.length; k++) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(indicesForTime[k] + 1);\n msg.setColName(userColNames[indicesForTime[k]]);\n String comment = \"invalid sample date/time specification\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"missing columns for sample date/time specification\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n return times;\n }", "@Test\n public void testInvalidXmlDateTime() {\n assertNull(DateTimeHelper.parseXmlDateTime(null));\n\n // \"\" is not a date\n assertNull(DateTimeHelper.parseXmlDateTime(\"\"));\n\n // wrong format\n assertNull(DateTimeHelper.parseXmlDateTime(\"1111111111111111\"));\n\n // invalid year\n assertNull(DateTimeHelper.parseXmlDateTime(\"111-11-11T11:11:11.111Z\"));\n\n // invalid month\n assertNull(DateTimeHelper.parseXmlDateTime(\"1111-21-11T11:11:11.111Z\"));\n\n // invalid day\n assertNull(DateTimeHelper.parseXmlDateTime(\"1111-11-51T11:11:11.111Z\"));\n }", "public static java.sql.Timestamp convertToTimestamp(String timeStampInString) {\n\t\tif (timeStampInString == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n\t\t\tjava.util.Date uDate = null;\n\t\t\tjava.sql.Timestamp timeStamp = null;\n\t\t\ttry {\n\t\t\t\tuDate = dateFormat.parse(timeStampInString);\n\t\t\t\ttimeStamp = new Timestamp(uDate.getTime());\n\t\t\t} catch (ParseException e) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn timeStamp;\n\t\t}\n\t}", "public void setTimestamp(Long timestamp) {\n this.timestamp = timestamp;\n }", "public Timestamp getValidFrom();", "boolean hasContainerTimestamp();", "public void setTimestamp(Date timestamp) {\r\n this.timestamp = timestamp;\r\n }", "public void setTimestamp(@NonNull Date timestamp) {\n this.timestamp = timestamp;\n }", "private boolean splitDateTime(String dateTimeString) throws Exception {\n\t\tif (dateTimeString.indexOf('/') != -1)\n\t\t\tsplitDate(dateTimeString);\n\t\telse if (dateTimeString.indexOf(':') != -1)\n\t\t\tsplitTime(dateTimeString);\n\t\telse\n\t\t\tthrow new Exception(\"Not a valid date/time string\");\n\t\treturn true;\n }", "public void setTimestampFormatPattern(String timestampFormatPattern) {\r\n this.timestampFormatPattern = timestampFormatPattern;\r\n }", "public void setTimestamp(Date timestamp) {\n this.timestamp = timestamp;\n }", "public static Date parseTimestamp(String time) throws ParseException{\r\n /**\r\n * Checks whether timestring contains UTC time zone identifier\r\n */\r\n boolean containsZ = time.contains(\"Z\");\r\n if(containsZ){\r\n time = time.replace(\"Z\", \"+0000\");\r\n }\r\n /**\r\n * checks if the timestring ends with \"+hh\" or \"-hh\" time zone definition\r\n * modifies timestring with minutes to time zone\r\n */\r\n char suffixTZ = time.charAt(time.length()-3);\r\n if(suffixTZ == '+' || suffixTZ == '-'){\r\n time = time+\"00\";\r\n }\r\n int len = time.length();\r\n /**\r\n * checks patterns ending with seconds only\r\n */\r\n if(len == patternSecsLen){\r\n return parseTimestampWithSeconds(time);\r\n }\r\n /**\r\n * checks patterns ending with milliseconds\r\n */\r\n else if(len == patternMiliSecsLen){\r\n return parseTimestringWithMillis(time);\r\n }\r\n /**\r\n * checks patterns ending with seconds and time zone\r\n */\r\n else if(len == patternSecsTZLen){\r\n return parseTimestampWithSecondsWithTimeZone(time);\r\n }\r\n /**\r\n * checks patterns ending with milliseconds and time zone\r\n */\r\n else if(len == patternMiliSecsTZLen){\r\n return parseTimestringWithMillisWithTimeZone(time);\r\n }\r\n /**\r\n * checks patterns according to ISO pattern\r\n */\r\n else if(len == patternISOLen){\r\n return parseISOTimestring(time);\r\n }\r\n /**\r\n * checks patterns according to ISO pattern with milliseconds\r\n */\r\n else if(len == patternISOMilisLen){\r\n return parseISOTimestringWithMillis(time);\r\n }\r\n /**\r\n * checks patterns ending with microseconds\r\n */\r\n else if(len == patternMicroSecLen){\r\n return parseTimestringWithMicros(time);\r\n }\r\n /**\r\n * checks patterns ending with microseconds and time zone\r\n */\r\n else if(len == patternMicroSecTZLen){\r\n return parseTimestringWithMicrosWithTimeZone(time);\r\n }\r\n \r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "private static Timestamp parseWithDefaultPattern(String ts){\n\n final int[] comps = new int[7];\n\n /*\n * The component that is currently being parsed, starting with 0\n * for the year, and up to 6 for the fractional seconds\n */\n int comp = 0;\n\n int val = 0;\n int ndigits = 0;\n\n int len = ts.length();\n boolean isBC = (ts.charAt(0) == '-');\n\n for (int i = (isBC ? 1 : 0); i < len; ++i) {\n\n char ch = ts.charAt(i);\n\n if (comp < 6) {\n\n switch (ch) {\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n val = val * 10 + (ch - '0');\n ++ndigits;\n break;\n default:\n if (ch == compSeparators[comp]) {\n checkAndSetValue(comps, comp, val, ndigits, ts);\n ++comp;\n val = 0;\n ndigits = 0;\n\n } else {\n raiseParseError(\n ts, \"invalid character '\" + ch +\n \"' while parsing component \" + compNames[comp]);\n }\n }\n } else {\n assert(comp == 6);\n\n switch (ch) {\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n val = val * 10 + (ch - '0');\n ndigits++;\n break;\n default:\n raiseParseError(\n ts, \"invalid character '\" + ch +\n \"' while parsing component \" + compNames[comp]);\n }\n }\n }\n\n /* Set the last component */\n checkAndSetValue(comps, comp, val, ndigits, ts);\n\n if (comp < 2) {\n raiseParseError(\n ts, \"the timestamp string must have at least the 3 \" +\n \"date components\");\n }\n\n if (comp == 6 && comps[6] > 0) {\n\n if (ndigits > MAX_PRECISION) {\n raiseParseError(\n ts, \"the fractional-seconds part contains more than \" +\n MAX_PRECISION + \" digits\");\n } else if (ndigits < MAX_PRECISION) {\n /* Nanosecond *= 10 ^ (MAX_PRECISION - s.length()) */\n comps[6] *= (int)Math.pow(10, MAX_PRECISION - ndigits);\n }\n }\n\n if (isBC) {\n comps[0] = -comps[0];\n }\n\n return createTimestamp(comps);\n }", "@Test\n public void testTimeStamp() throws JMSException {\n long requestTimeStamp = requestMessage.getJMSTimestamp();\n long responseTimeStamp = responseMessage.getJMSTimestamp();\n\n assertTrue(\"The response message timestamp \" + responseTimeStamp +\n \" is older than the request message timestamp \" +\n requestTimeStamp,\n (responseTimeStamp >= requestTimeStamp));\n }", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_invalid_year_timestamp(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_year_timestamp);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"40004\"));\n Assert.assertTrue(content.contains(\"Invalid end time date format.\"));\n\n }", "private static Long parseTimeStrictly(String s) throws IllegalArgumentException\n {\n String nanos_s;\n\n long hour;\n long minute;\n long second;\n long a_nanos = 0;\n\n String formatError = \"Timestamp format must be hh:mm:ss[.fffffffff]\";\n String zeros = \"000000000\";\n\n if (s == null)\n throw new java.lang.IllegalArgumentException(formatError);\n s = s.trim();\n\n // Parse the time\n int firstColon = s.indexOf(':');\n int secondColon = s.indexOf(':', firstColon+1);\n\n // Convert the time; default missing nanos\n if (firstColon > 0 && secondColon > 0 && secondColon < s.length() - 1)\n {\n int period = s.indexOf('.', secondColon+1);\n hour = Integer.parseInt(s.substring(0, firstColon));\n if (hour < 0 || hour >= 24)\n throw new IllegalArgumentException(\"Hour out of bounds.\");\n\n minute = Integer.parseInt(s.substring(firstColon + 1, secondColon));\n if (minute < 0 || minute >= 60)\n throw new IllegalArgumentException(\"Minute out of bounds.\");\n\n if (period > 0 && period < s.length() - 1)\n {\n second = Integer.parseInt(s.substring(secondColon + 1, period));\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"Second out of bounds.\");\n\n nanos_s = s.substring(period + 1);\n if (nanos_s.length() > 9)\n throw new IllegalArgumentException(formatError);\n if (!Character.isDigit(nanos_s.charAt(0)))\n throw new IllegalArgumentException(formatError);\n nanos_s = nanos_s + zeros.substring(0, 9 - nanos_s.length());\n a_nanos = Integer.parseInt(nanos_s);\n }\n else if (period > 0)\n throw new IllegalArgumentException(formatError);\n else\n {\n second = Integer.parseInt(s.substring(secondColon + 1));\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"Second out of bounds.\");\n }\n }\n else\n throw new IllegalArgumentException(formatError);\n\n long rawTime = 0;\n rawTime += TimeUnit.HOURS.toNanos(hour);\n rawTime += TimeUnit.MINUTES.toNanos(minute);\n rawTime += TimeUnit.SECONDS.toNanos(second);\n rawTime += a_nanos;\n return rawTime;\n }", "private static boolean validate(String line){\n\t\tString[] lineArray = line.split(\" \");\n\t\t\n\t\tif(lineArray.length != 3) return false; //skip lines in incorrect format\n\t\t\n\t\t//http://stackoverflow.com/questions/25873636/regex-pattern-for-exactly-hhmmss-time-string\n\t\tif(!lineArray[0].matches(\"(?:[01]\\\\d|2[0123]):(?:[012345]\\\\d):(?:[012345]\\\\d)\")) return false;\n\n\t\tif(!lineArray[2].equals(\"Start\") && !lineArray[2].equals(\"End\")) return false;\n\t\t\n\t\treturn true;\n\t}", "public static boolean isSigned_infos_timestamp() {\n return false;\n }", "public void testImportTimeFailure() throws ParserConfigurationException, IOException {\n testInvalidXML(INVALID_TIME_TEST_GPX);\n }", "public void setTimestamp(Integer timestamp) {\n this.timestamp = timestamp;\n }", "private boolean checkValidTime(String inputTime) {\n int hour = Integer.parseInt(inputTime.substring(0,2));\n int minute = Integer.parseInt(inputTime.substring(2,4));\n \n if ((hour >= 0 && hour <= 23) && (minute >= 0 && minute <= 59)) {\n return true;\n } else {\n return false;\n }\n }", "public boolean checkMissingLonLatTime() {\n\t\ttry {\n _locationsChecked = true;\n\t\t\tDouble[] longitudes = getSampleLongitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( longitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(longitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[longitudeIndex]);\n\t\t\t\t\tString comment = \"missing longitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no longitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\ttry {\n\t\t\tDouble[] latitudes = getSampleLatitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( latitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(latitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[latitudeIndex]);\n\t\t\t\t\tString comment = \"missing latitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no latitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n//\t DashDataType<?> pressureColumn = findDataColumn(\"water_pressure\");\n//\t DashDataType<?> depthColumn = findDataColumn(\"sample_depth\");\n//\t if ( depthColumn != null ) {\n//\t\t\ttry {\n//\t\t\t\tDouble[] depths = getSampleDepths();\n//\t\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n//\t\t\t\t\tif ( depths[rowIdx] == null ) {\n//\t\t\t\t\t\tisOk = pressureColumn != null;\n//\t\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\t\tmsg.setSeverity(pressureColumn == null ? Severity.ERROR : Severity.WARNING);\n//\t\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\t\tmsg.setColIndex(sampleDepthIndex);\n//\t\t\t\t\t\tmsg.setColName(userColNames[sampleDepthIndex]);\n//\t\t\t\t\t\tString comment = \"missing sample depth\";\n//\t\t\t\t\t\tmsg.setGeneralComment(comment);\n//\t\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\t\tstdMsgList.add(msg);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t} catch ( Exception ex ) {\n//\t\t\t ex.printStackTrace();\n//\t\t\t}\n//\t\t} else if ( pressureColumn == null ) {\n//\t\t\tisOk = false;\n//\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\tString comment = \"no sample depth column\";\n//\t\t\tmsg.setGeneralComment(comment);\n//\t\t\tmsg.setDetailedComment(comment);\n//\t\t\tstdMsgList.add(msg);\n//\t\t}\n\n\t\tDouble[] times = null;\n\t\ttry {\n _timesChecked = true;\n\t\t\ttimes = getSampleTimes();\n\t\t\tfor (int rowIdx = 0; _timesOk && rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( times[rowIdx] == null ) {\n\t\t\t\t\t_timesOk = false;\n // XXX Messages are now added during the data standarization phase\n\t\t\t\t\t// in the StdUserDataArray constructor.\n//\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\tString comment = \"incomplete sample date/time specification\";\n//\t\t\t\t\tmsg.setGeneralComment(\"Bad date/time value\");\n//\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_timesOk = false;\n\t\t\tex.printStackTrace();\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"incomplete columns specifying sample date/time\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(ex.getMessage());\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\treturn _locationsOk && _timesOk;\n\t}", "public static Date parseTimestamp(String timestamp) {\n if (StringUtils.isNullOrWhitespace(timestamp) || timestamp.equals(\"null\")) {\n return null;\n }\n\n try {\n return sDateFormatCache.get(TIMESTAMP_FORMAT, new Callable<DateFormat>() {\n @Override\n public DateFormat call() throws Exception {\n return new SimpleDateFormat(TIMESTAMP_FORMAT);\n }\n }).parse(timestamp);\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n }" ]
[ "0.74530953", "0.72904944", "0.7119268", "0.6715605", "0.65825844", "0.656998", "0.64924043", "0.64526594", "0.64256805", "0.6410178", "0.6410178", "0.6410178", "0.6410178", "0.6410178", "0.6410178", "0.6410178", "0.58324164", "0.5831309", "0.5831309", "0.5822054", "0.58152664", "0.5813155", "0.5805066", "0.58020914", "0.58020914", "0.5796401", "0.5788185", "0.5783598", "0.5763522", "0.5742878", "0.5713448", "0.56796026", "0.56597966", "0.5654282", "0.5627275", "0.55708015", "0.5528827", "0.55195653", "0.5495338", "0.547827", "0.5467428", "0.5460242", "0.5457699", "0.5456934", "0.5444021", "0.53968835", "0.5334308", "0.53177434", "0.53166544", "0.5301918", "0.5293586", "0.5289974", "0.5272516", "0.52687734", "0.5259442", "0.5229539", "0.52286464", "0.5207941", "0.52067393", "0.5198646", "0.51854616", "0.51729167", "0.5147429", "0.5145687", "0.5144598", "0.5138813", "0.5135299", "0.51337856", "0.5133579", "0.50962394", "0.5092918", "0.5085239", "0.50822055", "0.50691706", "0.50522214", "0.5038597", "0.50284266", "0.502401", "0.5022905", "0.50109345", "0.501054", "0.50103647", "0.5003407", "0.5001668", "0.4992514", "0.49814194", "0.49777794", "0.4968973", "0.49689656", "0.4964072", "0.4960216", "0.49555027", "0.49494582", "0.49484184", "0.49446952", "0.49341556", "0.4933575", "0.49297044", "0.49191633", "0.4916881" ]
0.7547905
0
Tests the listSensorDataTimestamp method to see if data about a power source exists.
@Test public void testListSensorDataTimestampCurrentYear() throws Exception { command = "sensordata SIM_KAHE_1 timestamp 2009-11-01T00:00:00.0000"; if (verboseMode) { System.out.println("> " + command); System.out.println("Checking if data about power source exists..."); } commandList = commandProcessor.parseCommand(command); cli = new CommandLineInterface(); commandProcessor.processCommand(cli, commandList); result = (new SensordataTimestamp()).doCommand(cli, commandList); if (verboseMode) { System.out.println(result); } assertTrue("Checking if data about power source exists", result.contains("Tool") && result.contains("Source") && result.contains("Properties")); if (verboseMode) { System.out.println(OK_MESSAGE + CARRIAGE_RETURN); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testListSensorDataTimestampPreviousYear() throws Exception {\n command = \"sensordata SIM_KAHE_1 timestamp 2008-11-01T00:00:00.0000\";\n if (verboseMode) {\n System.out.println(\"> \" + command);\n System.out.println(\"Checking if data about power source exists...\");\n }\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n result = (new SensordataTimestamp()).doCommand(cli, commandList);\n if (verboseMode) {\n System.out.println(result);\n }\n assertEquals(\"Checking if data about power source exists\",\n \"No data for SIM_KAHE_1 on 2008-11-01T00:00:00.0000.\", result);\n if (verboseMode) {\n System.out.println(OK_MESSAGE + CARRIAGE_RETURN);\n }\n }", "@Before\n @Test\n public void testListSensorDataTimestampSource() throws Exception {\n command = \"sensordata SIM_SEA timestamp 2009-11-01T00:00:00.0000\";\n commandProcessor = new CommandProcessor();\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n assertTrue(ASSERT_SOURCE_MESSAGE, cli.errorEncountered);\n }", "public boolean isPowerSource()\r\n {\r\n return true;\r\n }", "boolean hasGetLatestSensorReadingForUser();", "@Test\n public void testListSensorDataTimestampTimestamp() throws Exception {\n command = \"sensordata SIM_KAHE_1 timestamp 11-01-2009T00:00:00.0000\";\n if (verboseMode) {\n System.out.println(\"> \" + command);\n System.out.println(\"Checking if timestamp is not a valid string...\");\n }\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n assertTrue(ASSERT_TIMESTAMP_MESSAGE, cli.errorEncountered);\n if (verboseMode) {\n System.out.println(result);\n System.out.println(OK_MESSAGE + CARRIAGE_RETURN);\n }\n }", "private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "public boolean hasTimestamp() {\n return timestamp_ != null;\n }", "boolean hasTelemetry();", "public boolean isMissingData() {\n return myModel.getRealtimeTimestamp() == 0;\n }", "private boolean checkForNewData ()\n\t{\t\t\n\t\tLOG.info(\"Checking trigger source '\" + config.getTriggerSource() + \".\" + \n\t\t\t\tconfig.getTriggerTable() + \".\" + config.getTriggerColumn() + \"'\");\n\t\t\n\t\t// get value from source\n\t\tObject newValue = null;\n\t\tint colType = -1;\n\t\ttry \n\t\t{\n\t\t\tSourceDatabase sourceDatabase = CopyToolConnectionManager.getInstance().getSourceDatabase(config.getTriggerSource());\n\t\t\t\n\t\t\tStatement selectStmt =\n\t\t\t\t\tCopyToolConnectionManager.getInstance().getSourceConnection(config.getTriggerSource()).createStatement();\n\t\t\t\n\t\t\tString triggerDate = sourceDatabase.getDatabaseType().getSelectTriggerColumnQuery(config.getTriggerTable(), config.getTriggerColumn());\n\t\t\tResultSet res = selectStmt.executeQuery(triggerDate);\n\t\t\t\n\t\t\t// no rows in table? then we cannot determine any indication\n\t\t\t// so we return indication of new data\n\t\t\tif (!res.next()) return true;\t\t\t\n\t\t\t\n\t\t\tResultSetMetaData info = res.getMetaData();\n\t\t\t\n\t\t\tcolType = info.getColumnType(1);\n\t\t\t\t\t\t\n\t\t\tif (colType == Types.BIGINT || colType == Types.INTEGER)\n\t\t\t{\n\t\t\t\tcolType = Types.BIGINT;\n\t\t\t\tnewValue = res.getLong(1);\n\t\t\t}\n\t\t\telse if (colType == Types.DATE)\n\t\t\t{\n\t\t\t\tnewValue = res.getDate(1);\n\t\t\t}\n\t\t\telse if (colType == Types.TIMESTAMP)\n\t\t\t{\n\t\t\t\tnewValue = res.getTimestamp(1);\n\t\t\t}\n\t\t\t\n\t\t\tres.close();\n\t\t\tselectStmt.close();\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tLOG.warn(\"SQLException when trying to access scheduling source\", e);\n\t\t\t\n\t\t\t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (newValue == null)\n\t\t{\n\t\t\t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// load existing value from disk\n\t\tFile jobFile = getLastRunFile();\n\t\t\n\t\tBufferedReader br = null;\n\t\tString oldValue = null;\n\t\tString oldColType = null;\n\t\tString oldConfigChecksum = null;\n\t\tif (jobFile.exists()) \n\t\t{\n\t\t\ttry {\n\t\t\t\tbr = new BufferedReader(new FileReader(jobFile));\n\t\t\t\toldValue = br.readLine();\n\t\t\t\toldColType = br.readLine();\n\t\t\t\toldConfigChecksum = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// ignore\n\t\t\t\tLOG.warn(\"Unable to read existing lastrun info\", e);\n\t\t\t} finally {\n\t\t try {\n\t\t \tif (br != null)\n\t\t \t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t }\n\t\t}\n\t\t\n\t\t// set last run properties\n\t\tthis.lastRunValue = newValue;\n\t\tthis.lastRunColType = colType;\n\t \n\t if (StringUtils.isEmpty(oldValue) || StringUtils.isEmpty(oldColType) || StringUtils.isEmpty(oldConfigChecksum))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t }\n\t \n\t // check if we are dealing with the same type of data\n\t if (!oldColType.equals(String.valueOf(colType)))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t \treturn true;\n\t }\n\t \n\t // check if we are dealing with the same config\n\t if (!oldConfigChecksum.equals(config.getConfigChecksum()))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t \treturn true;\n\t }\n\t \n\t LOG.info(\"Stored last run value: \" + oldValue);\n\t LOG.info(\"Current last run value: \" + newValue);\n\t \n\t // check if there is newer data\n\t if (colType == Types.BIGINT)\n\t {\n\t \tLong oldNum = Long.valueOf(oldValue);\n\t \tLong newNum = (Long) newValue;\n\t \t\n\t \t// is new ID / long bigger than current?\n\t \t// then we have new data\n\t \tif (newNum > oldNum)\n\t \t\treturn true;\n\t }\n\t else if (colType == Types.DATE)\n\t {\n\t \tDate oldDate = Date.valueOf(oldValue);\n\t \tDate newDate = (Date) newValue;\n\t \t\n\t \t// is newer date after older date?\n\t \t// then we have new data\n\t \tif (newDate.after(oldDate))\n\t \t\treturn true;\n\t }\n\t else if (colType == Types.TIMESTAMP)\n\t {\n\t \tTimestamp oldTS = Timestamp.valueOf(oldValue);\n\t \tTimestamp newTS = (Timestamp) newValue;\n\t \t\n\t \t// is newer timestamp after older timestamp?\n\t \t// then we have new data\n\t \tif (newTS.after(oldTS))\n\t \t\treturn true;\n\t }\n\t\t\n\t // no new data\n\t\treturn false;\n\t}", "public boolean hasTimestamp() {\n return result.hasTimestamp();\n }", "public boolean checkMissingLonLatTime() {\n\t\ttry {\n _locationsChecked = true;\n\t\t\tDouble[] longitudes = getSampleLongitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( longitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(longitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[longitudeIndex]);\n\t\t\t\t\tString comment = \"missing longitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no longitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\ttry {\n\t\t\tDouble[] latitudes = getSampleLatitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( latitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(latitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[latitudeIndex]);\n\t\t\t\t\tString comment = \"missing latitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no latitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n//\t DashDataType<?> pressureColumn = findDataColumn(\"water_pressure\");\n//\t DashDataType<?> depthColumn = findDataColumn(\"sample_depth\");\n//\t if ( depthColumn != null ) {\n//\t\t\ttry {\n//\t\t\t\tDouble[] depths = getSampleDepths();\n//\t\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n//\t\t\t\t\tif ( depths[rowIdx] == null ) {\n//\t\t\t\t\t\tisOk = pressureColumn != null;\n//\t\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\t\tmsg.setSeverity(pressureColumn == null ? Severity.ERROR : Severity.WARNING);\n//\t\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\t\tmsg.setColIndex(sampleDepthIndex);\n//\t\t\t\t\t\tmsg.setColName(userColNames[sampleDepthIndex]);\n//\t\t\t\t\t\tString comment = \"missing sample depth\";\n//\t\t\t\t\t\tmsg.setGeneralComment(comment);\n//\t\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\t\tstdMsgList.add(msg);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t} catch ( Exception ex ) {\n//\t\t\t ex.printStackTrace();\n//\t\t\t}\n//\t\t} else if ( pressureColumn == null ) {\n//\t\t\tisOk = false;\n//\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\tString comment = \"no sample depth column\";\n//\t\t\tmsg.setGeneralComment(comment);\n//\t\t\tmsg.setDetailedComment(comment);\n//\t\t\tstdMsgList.add(msg);\n//\t\t}\n\n\t\tDouble[] times = null;\n\t\ttry {\n _timesChecked = true;\n\t\t\ttimes = getSampleTimes();\n\t\t\tfor (int rowIdx = 0; _timesOk && rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( times[rowIdx] == null ) {\n\t\t\t\t\t_timesOk = false;\n // XXX Messages are now added during the data standarization phase\n\t\t\t\t\t// in the StdUserDataArray constructor.\n//\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\tString comment = \"incomplete sample date/time specification\";\n//\t\t\t\t\tmsg.setGeneralComment(\"Bad date/time value\");\n//\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_timesOk = false;\n\t\t\tex.printStackTrace();\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"incomplete columns specifying sample date/time\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(ex.getMessage());\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\treturn _locationsOk && _timesOk;\n\t}", "boolean hasTxpowerOffset();", "@Test\n public void getListSupplierByNotStartTime() {\n List<SupplierAnalysis> listSupplier = SupplierAnalysisDAO.supplierByTime(\"\", \"2021-12-01\", 1);\n\n Assert.assertTrue(listSupplier.size() > 0);\n }", "private boolean kernelWakelockStatsExist() {\n try {\n return doesFileExist(WAKE_LOCK_FILE) || doesFileExist(WAKE_SOURCES_FILE);\n } catch(Exception e) {\n return false;\n }\n }", "private boolean logContainsTimestamp(long timestamp,String filename) {\n\t\tBufferedReader br = null;\n\t\tBathMoniterEvent ev= new BathMoniterEvent();\n\t\ttry {\n\t\t\tString sCurrentLine;\n\t\t\tbr = new BufferedReader(new FileReader(filename));\n\n\t\t\tbr.readLine();// read the formatting data at the top\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\ttry{\n\t\t\t\t\tev.setData(sCurrentLine);\n\t\t\t\t\tif(ev.getTimestamp() == timestamp)\n\t\t\t\t\t\treturn true;\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n \n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasSource();", "boolean hasUseTime();", "boolean hasUseTime();", "boolean hasNextCollectTimestampMs();", "void hasNewData(CheckPoint checkPoint);", "public static boolean checkSensorState()\n\t{\n\t\tboolean state = false;\n\t\ttry\n\t\t{\t\n\t\t\t\tfor (SensorData sData : sCollect.getList())\n\t\t\t\t{\n\t\t\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(sData.getState().equals(Constants.SENSOR_STATE_STOCK))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}catch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t\treturn state;\n\t}", "public boolean hasTimestamp() {\n return timestampBuilder_ != null || timestamp_ != null;\n }", "@Override\n\tpublic boolean hasDataSource() {\n\t\treturn _dataSource.size() > 0;\n\t}", "@java.lang.Override public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }", "boolean hasEnoughSamples() {\n return newest != null && oldest != null && newest.timestamp - oldest.timestamp >= MIN_WINDOW_SIZE;\n }", "public Double[] checkMissingLonLatTime() {\n try {\n Double[] longitudes = getSampleLongitudes();\n for (int j = 0; j < numSamples; j++) {\n if ( longitudes[j] == null ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(longitudeIndex + 1);\n msg.setColName(userColNames[longitudeIndex]);\n String comment = \"missing longitude\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"no longitude column\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n try {\n Double[] latitudes = getSampleLatitudes();\n for (int j = 0; j < numSamples; j++) {\n if ( latitudes[j] == null ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(latitudeIndex + 1);\n msg.setColName(userColNames[latitudeIndex]);\n String comment = \"missing latitude\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"no latitude column\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n Double[] times = null;\n try {\n times = calcSampleTimes();\n for (int j = 0; j < numSamples; j++) {\n if ( times[j] == null ) {\n for (int k = 0; k < indicesForTime.length; k++) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(indicesForTime[k] + 1);\n msg.setColName(userColNames[indicesForTime[k]]);\n String comment = \"invalid sample date/time specification\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"missing columns for sample date/time specification\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n return times;\n }", "@java.lang.Override\n public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }", "public abstract boolean sensorFound();", "public boolean hasGetLatestSensorReadingForUser() {\n return getLatestSensorReadingForUser_ != null;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public boolean onTarget(long timestamp)\n {\n return compareToTimestamp(timestamp) == 0;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public void checkIfShowerOn(){\n double currentSMA = mySMA.currentAverage();\n Log.d(LOGTAG,\"currentSMA: \"+currentSMA);\n Log.d(LOGTAG,\"isShowerOn: \"+ isShowerOn);\n if (currentSMA>SMA_THRESHOLD && !isShowerOn){\n //Initialize stuff to do once shower is on\n isShowerOn=true;\n startShower();\n } else if (currentSMA<SMA_THRESHOLD && isShowerOn){\n //Shutdown\n isShowerOn=false;\n endShower();\n }\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean isSetValueSampledData();", "boolean hasTimeRecord();", "public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean containsTimeSeries() {\n\t\t\n\t\tif (experiments_.size() < 1)\n\t\t\tthrow new RuntimeException(\"There are no experiments in this batch\");\n\t\t\n\t\tfor (int i=0; i<experiments_.size(); i++)\n\t\t\tif (TimeSeriesExperiment.class.isInstance(experiments_.get(i)))\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "private boolean doAllDataSourcesHaveSamples(List<ILogicalOperator> leafInputs, IOptimizationContext context)\n throws AlgebricksException {\n for (ILogicalOperator li : leafInputs) {\n DataSourceScanOperator scanOp = (DataSourceScanOperator) findDataSourceScanOperator(li);\n if (scanOp == null)\n continue;\n Index index = joinEnum.getStatsHandle().findSampleIndex(scanOp, context);\n if (index == null) {\n return false;\n }\n }\n return true;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\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 }", "boolean hasGetLatestReading();", "boolean hasTemperatureScalingCalibration();", "public boolean hasTimestamp() {\n return fieldSetFlags()[6];\n }", "@Test\n public void getListSupplierByNotEndTime() {\n List<SupplierAnalysis> listSupplier = SupplierAnalysisDAO.supplierByTime(\"2020-10-10\", \"\", 1);\n\n Assert.assertTrue(listSupplier.size() > 0);\n }", "public static void hasTimeStamp(String filePath) {\n\t\tString row = firstRow(filePath); // gets the first row of the log\n\t\tArrayList<String> splits = splits(row); // splits the row\n\t\t\n\t\tString timeStamp = splits.get(0); // 15 feb 2018 06:33:12\n\t\t\n\t\tif (timeStamp.matches(\"\\\\d\\\\d (...) \\\\d\\\\d\\\\d\\\\d \\\\d\\\\d:\\\\d\\\\d:\\\\d\\\\d\")) {\n\t\t\tMain.debug.LOG(\"omni-epsilon.log contains timestamp\");\n\t\t} else {\n\t\t\tMain.debug.LOGError(\"omni-epsilon.log does not contain timestamp\");\n\t\t}\n\t}", "public boolean isSetSource()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(SOURCE$30) != null;\n }\n }", "private boolean isSensorTypeAlreadyMonitored(int type) {\n for (MonitoredSensor sensor : mSensors) {\n if (sensor.getType() == type) {\n return true;\n }\n }\n return false;\n }", "boolean hasData();", "boolean hasData();", "boolean hasData();", "boolean hasData();", "boolean hasData();", "boolean hasData();", "boolean hasData();", "public boolean hasUseTime() {\n return useTime_ != null;\n }", "public boolean hasUseTime() {\n return useTime_ != null;\n }", "public boolean hasSource() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasSource() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@Test\n\tpublic void testBooleanTrueSingleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "private boolean isGettingData(){\n int available;\n long startTime = System.nanoTime();\n int timeout = 100;\n InputStream inStream = null;\n flushStream();\n try {\n if(socket!=null)\n inStream = socket.getInputStream();\n Thread.sleep(100); //The Arduino keeps sending data for 100ms after it is told to stop\n }catch(IOException | InterruptedException e){}\n try {\n while (true) {\n available = inStream.available();\n if (available > 0) {\n return true;\n }\n Thread.sleep(1);\n long estimatedTime = System.nanoTime() - startTime;\n long estimatedMillis = TimeUnit.MILLISECONDS.convert(estimatedTime,\n TimeUnit.NANOSECONDS);\n if (estimatedMillis > timeout){\n return false; //timeout, no data coming\n }\n }\n }catch(IOException | InterruptedException | NullPointerException e){\n Log.d(\"Exception\", \"Exception\");\n }\n return false;\n }", "public java.util.List<org.landxml.schema.landXML11.SourceDataDocument.SourceData> getSourceDataList()\r\n {\r\n final class SourceDataList extends java.util.AbstractList<org.landxml.schema.landXML11.SourceDataDocument.SourceData>\r\n {\r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData get(int i)\r\n { return SurfaceImpl.this.getSourceDataArray(i); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData set(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.setSourceDataArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n { SurfaceImpl.this.insertNewSourceData(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData remove(int i)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.removeSourceData(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfSourceDataArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new SourceDataList();\r\n }\r\n }", "public boolean hasData();", "boolean hasTxpower();", "boolean hasTimeBoltDBoltH();", "public boolean isSetSource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(SOURCE$0) != 0;\r\n }\r\n }", "public boolean hasTimestamp() {\n return fieldSetFlags()[2];\n }", "@Test\n void getFilteredByTimeZone() {\n List<HourlyProductionData> list = hourlyProductionDataRepository\n .getHourlyProductionDataBySolarParkAndTransformToTimeZoneOfSolarParkAndInsideTimeRange(\n embeddedDB.japanSolarPark.getId(),\n embeddedDB.japanSolarPark.getTimeZone(),\n embeddedDB.march1,\n embeddedDB.march1_end);\n\n assertTrue(list != null && list.size() == 1);\n HourlyProductionData hourlyProductionData = list.get(0);\n assertEquals(hourlyProductionData.getElectricityProducedMW().doubleValue(), embeddedDB.march2_hour1_japan.getElectricityProducedMW().doubleValue());\n }", "boolean hasStartTime();", "private static boolean isHere(int portNummber,InetAddress address, String nameOfProduct){\n\n for(SensorData sensorData : actualSensorDatas){\n if((sensorData.getPortNummber() == portNummber)\n || (sensorData.getAddress() == address)\n || (sensorData.getProduct().getNameOfProduct() == nameOfProduct) ){\n return true;\n }\n }\n return false;\n }", "public boolean hasTimestamp() {\n return fieldSetFlags()[0];\n }", "Source createDatasourceZ3950Timestamp(Source ds, Provider prov) throws RepoxException;", "public boolean hasCaloriesData() {\n return calories.isPresent();\n }", "boolean hasSaveSensor();", "boolean hasTsUpdate();", "public boolean isLog2Data();", "boolean hasDeviceId();", "boolean hasDeviceId();", "String getSensorDataPoint();", "public boolean isSetSource() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SOURCE_ISSET_ID);\n }", "public boolean isTimestampUsed() {\n return trackLastUsed;\n }", "public boolean isSetSource() {\n return this.source != null;\n }", "public boolean isSetSource() {\n return this.source != null;\n }", "public boolean wasDatastreamChanged(String dsId);" ]
[ "0.63129973", "0.590029", "0.5825419", "0.5565811", "0.55485904", "0.54969984", "0.534165", "0.534165", "0.534165", "0.534165", "0.534165", "0.534165", "0.534165", "0.53285474", "0.53140825", "0.5291175", "0.52708703", "0.5218254", "0.5174602", "0.5164936", "0.51462066", "0.5140232", "0.51390916", "0.5100946", "0.5063458", "0.5063458", "0.5030693", "0.50268763", "0.50129473", "0.50123525", "0.4991733", "0.4971918", "0.49718136", "0.49568477", "0.4945984", "0.49408662", "0.49087137", "0.49004725", "0.48585436", "0.48491204", "0.4839068", "0.48326847", "0.48326847", "0.48317233", "0.4826036", "0.4826036", "0.4811789", "0.48106042", "0.48077783", "0.48077387", "0.48017472", "0.48013723", "0.4799073", "0.4790258", "0.47799286", "0.4772221", "0.47570777", "0.47540736", "0.47501087", "0.47375643", "0.47288486", "0.47208923", "0.47178528", "0.470984", "0.470919", "0.470919", "0.470919", "0.470919", "0.470919", "0.470919", "0.470919", "0.46923354", "0.46923354", "0.46888155", "0.46771532", "0.46750933", "0.46712813", "0.46605322", "0.46591532", "0.4648947", "0.46345153", "0.4628013", "0.462132", "0.46169147", "0.46146342", "0.45969713", "0.45962584", "0.45870593", "0.4583099", "0.45685712", "0.45591938", "0.45511305", "0.4540422", "0.4540422", "0.45361513", "0.45350876", "0.45337215", "0.45320284", "0.45320284", "0.45302632" ]
0.6519747
0
Tests the listSensorDataTimestamp method to see if data about a power source exists.
@Test public void testListSensorDataTimestampPreviousYear() throws Exception { command = "sensordata SIM_KAHE_1 timestamp 2008-11-01T00:00:00.0000"; if (verboseMode) { System.out.println("> " + command); System.out.println("Checking if data about power source exists..."); } commandList = commandProcessor.parseCommand(command); cli = new CommandLineInterface(); commandProcessor.processCommand(cli, commandList); result = (new SensordataTimestamp()).doCommand(cli, commandList); if (verboseMode) { System.out.println(result); } assertEquals("Checking if data about power source exists", "No data for SIM_KAHE_1 on 2008-11-01T00:00:00.0000.", result); if (verboseMode) { System.out.println(OK_MESSAGE + CARRIAGE_RETURN); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testListSensorDataTimestampCurrentYear() throws Exception {\n command = \"sensordata SIM_KAHE_1 timestamp 2009-11-01T00:00:00.0000\";\n if (verboseMode) {\n System.out.println(\"> \" + command);\n System.out.println(\"Checking if data about power source exists...\");\n }\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n result = (new SensordataTimestamp()).doCommand(cli, commandList);\n if (verboseMode) {\n System.out.println(result);\n }\n assertTrue(\"Checking if data about power source exists\", result.contains(\"Tool\")\n && result.contains(\"Source\") && result.contains(\"Properties\"));\n if (verboseMode) {\n System.out.println(OK_MESSAGE + CARRIAGE_RETURN);\n }\n }", "@Before\n @Test\n public void testListSensorDataTimestampSource() throws Exception {\n command = \"sensordata SIM_SEA timestamp 2009-11-01T00:00:00.0000\";\n commandProcessor = new CommandProcessor();\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n assertTrue(ASSERT_SOURCE_MESSAGE, cli.errorEncountered);\n }", "public boolean isPowerSource()\r\n {\r\n return true;\r\n }", "boolean hasGetLatestSensorReadingForUser();", "@Test\n public void testListSensorDataTimestampTimestamp() throws Exception {\n command = \"sensordata SIM_KAHE_1 timestamp 11-01-2009T00:00:00.0000\";\n if (verboseMode) {\n System.out.println(\"> \" + command);\n System.out.println(\"Checking if timestamp is not a valid string...\");\n }\n commandList = commandProcessor.parseCommand(command);\n cli = new CommandLineInterface();\n commandProcessor.processCommand(cli, commandList);\n assertTrue(ASSERT_TIMESTAMP_MESSAGE, cli.errorEncountered);\n if (verboseMode) {\n System.out.println(result);\n System.out.println(OK_MESSAGE + CARRIAGE_RETURN);\n }\n }", "private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "public boolean hasTimestamp() {\n return timestamp_ != null;\n }", "boolean hasTelemetry();", "public boolean isMissingData() {\n return myModel.getRealtimeTimestamp() == 0;\n }", "private boolean checkForNewData ()\n\t{\t\t\n\t\tLOG.info(\"Checking trigger source '\" + config.getTriggerSource() + \".\" + \n\t\t\t\tconfig.getTriggerTable() + \".\" + config.getTriggerColumn() + \"'\");\n\t\t\n\t\t// get value from source\n\t\tObject newValue = null;\n\t\tint colType = -1;\n\t\ttry \n\t\t{\n\t\t\tSourceDatabase sourceDatabase = CopyToolConnectionManager.getInstance().getSourceDatabase(config.getTriggerSource());\n\t\t\t\n\t\t\tStatement selectStmt =\n\t\t\t\t\tCopyToolConnectionManager.getInstance().getSourceConnection(config.getTriggerSource()).createStatement();\n\t\t\t\n\t\t\tString triggerDate = sourceDatabase.getDatabaseType().getSelectTriggerColumnQuery(config.getTriggerTable(), config.getTriggerColumn());\n\t\t\tResultSet res = selectStmt.executeQuery(triggerDate);\n\t\t\t\n\t\t\t// no rows in table? then we cannot determine any indication\n\t\t\t// so we return indication of new data\n\t\t\tif (!res.next()) return true;\t\t\t\n\t\t\t\n\t\t\tResultSetMetaData info = res.getMetaData();\n\t\t\t\n\t\t\tcolType = info.getColumnType(1);\n\t\t\t\t\t\t\n\t\t\tif (colType == Types.BIGINT || colType == Types.INTEGER)\n\t\t\t{\n\t\t\t\tcolType = Types.BIGINT;\n\t\t\t\tnewValue = res.getLong(1);\n\t\t\t}\n\t\t\telse if (colType == Types.DATE)\n\t\t\t{\n\t\t\t\tnewValue = res.getDate(1);\n\t\t\t}\n\t\t\telse if (colType == Types.TIMESTAMP)\n\t\t\t{\n\t\t\t\tnewValue = res.getTimestamp(1);\n\t\t\t}\n\t\t\t\n\t\t\tres.close();\n\t\t\tselectStmt.close();\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tLOG.warn(\"SQLException when trying to access scheduling source\", e);\n\t\t\t\n\t\t\t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (newValue == null)\n\t\t{\n\t\t\t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// load existing value from disk\n\t\tFile jobFile = getLastRunFile();\n\t\t\n\t\tBufferedReader br = null;\n\t\tString oldValue = null;\n\t\tString oldColType = null;\n\t\tString oldConfigChecksum = null;\n\t\tif (jobFile.exists()) \n\t\t{\n\t\t\ttry {\n\t\t\t\tbr = new BufferedReader(new FileReader(jobFile));\n\t\t\t\toldValue = br.readLine();\n\t\t\t\toldColType = br.readLine();\n\t\t\t\toldConfigChecksum = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// ignore\n\t\t\t\tLOG.warn(\"Unable to read existing lastrun info\", e);\n\t\t\t} finally {\n\t\t try {\n\t\t \tif (br != null)\n\t\t \t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t }\n\t\t}\n\t\t\n\t\t// set last run properties\n\t\tthis.lastRunValue = newValue;\n\t\tthis.lastRunColType = colType;\n\t \n\t if (StringUtils.isEmpty(oldValue) || StringUtils.isEmpty(oldColType) || StringUtils.isEmpty(oldConfigChecksum))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t }\n\t \n\t // check if we are dealing with the same type of data\n\t if (!oldColType.equals(String.valueOf(colType)))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t \treturn true;\n\t }\n\t \n\t // check if we are dealing with the same config\n\t if (!oldConfigChecksum.equals(config.getConfigChecksum()))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t \treturn true;\n\t }\n\t \n\t LOG.info(\"Stored last run value: \" + oldValue);\n\t LOG.info(\"Current last run value: \" + newValue);\n\t \n\t // check if there is newer data\n\t if (colType == Types.BIGINT)\n\t {\n\t \tLong oldNum = Long.valueOf(oldValue);\n\t \tLong newNum = (Long) newValue;\n\t \t\n\t \t// is new ID / long bigger than current?\n\t \t// then we have new data\n\t \tif (newNum > oldNum)\n\t \t\treturn true;\n\t }\n\t else if (colType == Types.DATE)\n\t {\n\t \tDate oldDate = Date.valueOf(oldValue);\n\t \tDate newDate = (Date) newValue;\n\t \t\n\t \t// is newer date after older date?\n\t \t// then we have new data\n\t \tif (newDate.after(oldDate))\n\t \t\treturn true;\n\t }\n\t else if (colType == Types.TIMESTAMP)\n\t {\n\t \tTimestamp oldTS = Timestamp.valueOf(oldValue);\n\t \tTimestamp newTS = (Timestamp) newValue;\n\t \t\n\t \t// is newer timestamp after older timestamp?\n\t \t// then we have new data\n\t \tif (newTS.after(oldTS))\n\t \t\treturn true;\n\t }\n\t\t\n\t // no new data\n\t\treturn false;\n\t}", "public boolean hasTimestamp() {\n return result.hasTimestamp();\n }", "public boolean checkMissingLonLatTime() {\n\t\ttry {\n _locationsChecked = true;\n\t\t\tDouble[] longitudes = getSampleLongitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( longitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(longitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[longitudeIndex]);\n\t\t\t\t\tString comment = \"missing longitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no longitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\ttry {\n\t\t\tDouble[] latitudes = getSampleLatitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( latitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(latitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[latitudeIndex]);\n\t\t\t\t\tString comment = \"missing latitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no latitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n//\t DashDataType<?> pressureColumn = findDataColumn(\"water_pressure\");\n//\t DashDataType<?> depthColumn = findDataColumn(\"sample_depth\");\n//\t if ( depthColumn != null ) {\n//\t\t\ttry {\n//\t\t\t\tDouble[] depths = getSampleDepths();\n//\t\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n//\t\t\t\t\tif ( depths[rowIdx] == null ) {\n//\t\t\t\t\t\tisOk = pressureColumn != null;\n//\t\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\t\tmsg.setSeverity(pressureColumn == null ? Severity.ERROR : Severity.WARNING);\n//\t\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\t\tmsg.setColIndex(sampleDepthIndex);\n//\t\t\t\t\t\tmsg.setColName(userColNames[sampleDepthIndex]);\n//\t\t\t\t\t\tString comment = \"missing sample depth\";\n//\t\t\t\t\t\tmsg.setGeneralComment(comment);\n//\t\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\t\tstdMsgList.add(msg);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t} catch ( Exception ex ) {\n//\t\t\t ex.printStackTrace();\n//\t\t\t}\n//\t\t} else if ( pressureColumn == null ) {\n//\t\t\tisOk = false;\n//\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\tString comment = \"no sample depth column\";\n//\t\t\tmsg.setGeneralComment(comment);\n//\t\t\tmsg.setDetailedComment(comment);\n//\t\t\tstdMsgList.add(msg);\n//\t\t}\n\n\t\tDouble[] times = null;\n\t\ttry {\n _timesChecked = true;\n\t\t\ttimes = getSampleTimes();\n\t\t\tfor (int rowIdx = 0; _timesOk && rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( times[rowIdx] == null ) {\n\t\t\t\t\t_timesOk = false;\n // XXX Messages are now added during the data standarization phase\n\t\t\t\t\t// in the StdUserDataArray constructor.\n//\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\tString comment = \"incomplete sample date/time specification\";\n//\t\t\t\t\tmsg.setGeneralComment(\"Bad date/time value\");\n//\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_timesOk = false;\n\t\t\tex.printStackTrace();\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"incomplete columns specifying sample date/time\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(ex.getMessage());\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\treturn _locationsOk && _timesOk;\n\t}", "boolean hasTxpowerOffset();", "@Test\n public void getListSupplierByNotStartTime() {\n List<SupplierAnalysis> listSupplier = SupplierAnalysisDAO.supplierByTime(\"\", \"2021-12-01\", 1);\n\n Assert.assertTrue(listSupplier.size() > 0);\n }", "private boolean kernelWakelockStatsExist() {\n try {\n return doesFileExist(WAKE_LOCK_FILE) || doesFileExist(WAKE_SOURCES_FILE);\n } catch(Exception e) {\n return false;\n }\n }", "private boolean logContainsTimestamp(long timestamp,String filename) {\n\t\tBufferedReader br = null;\n\t\tBathMoniterEvent ev= new BathMoniterEvent();\n\t\ttry {\n\t\t\tString sCurrentLine;\n\t\t\tbr = new BufferedReader(new FileReader(filename));\n\n\t\t\tbr.readLine();// read the formatting data at the top\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\ttry{\n\t\t\t\t\tev.setData(sCurrentLine);\n\t\t\t\t\tif(ev.getTimestamp() == timestamp)\n\t\t\t\t\t\treturn true;\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n \n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasSource();", "boolean hasUseTime();", "boolean hasUseTime();", "boolean hasNextCollectTimestampMs();", "void hasNewData(CheckPoint checkPoint);", "public static boolean checkSensorState()\n\t{\n\t\tboolean state = false;\n\t\ttry\n\t\t{\t\n\t\t\t\tfor (SensorData sData : sCollect.getList())\n\t\t\t\t{\n\t\t\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(sData.getState().equals(Constants.SENSOR_STATE_STOCK))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}catch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t\treturn state;\n\t}", "public boolean hasTimestamp() {\n return timestampBuilder_ != null || timestamp_ != null;\n }", "@Override\n\tpublic boolean hasDataSource() {\n\t\treturn _dataSource.size() > 0;\n\t}", "@java.lang.Override public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }", "boolean hasEnoughSamples() {\n return newest != null && oldest != null && newest.timestamp - oldest.timestamp >= MIN_WINDOW_SIZE;\n }", "public Double[] checkMissingLonLatTime() {\n try {\n Double[] longitudes = getSampleLongitudes();\n for (int j = 0; j < numSamples; j++) {\n if ( longitudes[j] == null ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(longitudeIndex + 1);\n msg.setColName(userColNames[longitudeIndex]);\n String comment = \"missing longitude\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"no longitude column\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n try {\n Double[] latitudes = getSampleLatitudes();\n for (int j = 0; j < numSamples; j++) {\n if ( latitudes[j] == null ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(latitudeIndex + 1);\n msg.setColName(userColNames[latitudeIndex]);\n String comment = \"missing latitude\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"no latitude column\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n Double[] times = null;\n try {\n times = calcSampleTimes();\n for (int j = 0; j < numSamples; j++) {\n if ( times[j] == null ) {\n for (int k = 0; k < indicesForTime.length; k++) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(indicesForTime[k] + 1);\n msg.setColName(userColNames[indicesForTime[k]]);\n String comment = \"invalid sample date/time specification\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"missing columns for sample date/time specification\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n return times;\n }", "@java.lang.Override\n public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }", "public abstract boolean sensorFound();", "public boolean hasGetLatestSensorReadingForUser() {\n return getLatestSensorReadingForUser_ != null;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public boolean onTarget(long timestamp)\n {\n return compareToTimestamp(timestamp) == 0;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public void checkIfShowerOn(){\n double currentSMA = mySMA.currentAverage();\n Log.d(LOGTAG,\"currentSMA: \"+currentSMA);\n Log.d(LOGTAG,\"isShowerOn: \"+ isShowerOn);\n if (currentSMA>SMA_THRESHOLD && !isShowerOn){\n //Initialize stuff to do once shower is on\n isShowerOn=true;\n startShower();\n } else if (currentSMA<SMA_THRESHOLD && isShowerOn){\n //Shutdown\n isShowerOn=false;\n endShower();\n }\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean isSetValueSampledData();", "boolean hasTimeRecord();", "public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean containsTimeSeries() {\n\t\t\n\t\tif (experiments_.size() < 1)\n\t\t\tthrow new RuntimeException(\"There are no experiments in this batch\");\n\t\t\n\t\tfor (int i=0; i<experiments_.size(); i++)\n\t\t\tif (TimeSeriesExperiment.class.isInstance(experiments_.get(i)))\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "private boolean doAllDataSourcesHaveSamples(List<ILogicalOperator> leafInputs, IOptimizationContext context)\n throws AlgebricksException {\n for (ILogicalOperator li : leafInputs) {\n DataSourceScanOperator scanOp = (DataSourceScanOperator) findDataSourceScanOperator(li);\n if (scanOp == null)\n continue;\n Index index = joinEnum.getStatsHandle().findSampleIndex(scanOp, context);\n if (index == null) {\n return false;\n }\n }\n return true;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\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 }", "boolean hasGetLatestReading();", "boolean hasTemperatureScalingCalibration();", "public boolean hasTimestamp() {\n return fieldSetFlags()[6];\n }", "@Test\n public void getListSupplierByNotEndTime() {\n List<SupplierAnalysis> listSupplier = SupplierAnalysisDAO.supplierByTime(\"2020-10-10\", \"\", 1);\n\n Assert.assertTrue(listSupplier.size() > 0);\n }", "public static void hasTimeStamp(String filePath) {\n\t\tString row = firstRow(filePath); // gets the first row of the log\n\t\tArrayList<String> splits = splits(row); // splits the row\n\t\t\n\t\tString timeStamp = splits.get(0); // 15 feb 2018 06:33:12\n\t\t\n\t\tif (timeStamp.matches(\"\\\\d\\\\d (...) \\\\d\\\\d\\\\d\\\\d \\\\d\\\\d:\\\\d\\\\d:\\\\d\\\\d\")) {\n\t\t\tMain.debug.LOG(\"omni-epsilon.log contains timestamp\");\n\t\t} else {\n\t\t\tMain.debug.LOGError(\"omni-epsilon.log does not contain timestamp\");\n\t\t}\n\t}", "public boolean isSetSource()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(SOURCE$30) != null;\n }\n }", "private boolean isSensorTypeAlreadyMonitored(int type) {\n for (MonitoredSensor sensor : mSensors) {\n if (sensor.getType() == type) {\n return true;\n }\n }\n return false;\n }", "boolean hasData();", "boolean hasData();", "boolean hasData();", "boolean hasData();", "boolean hasData();", "boolean hasData();", "boolean hasData();", "public boolean hasUseTime() {\n return useTime_ != null;\n }", "public boolean hasUseTime() {\n return useTime_ != null;\n }", "public boolean hasSource() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasSource() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@Test\n\tpublic void testBooleanTrueSingleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "private boolean isGettingData(){\n int available;\n long startTime = System.nanoTime();\n int timeout = 100;\n InputStream inStream = null;\n flushStream();\n try {\n if(socket!=null)\n inStream = socket.getInputStream();\n Thread.sleep(100); //The Arduino keeps sending data for 100ms after it is told to stop\n }catch(IOException | InterruptedException e){}\n try {\n while (true) {\n available = inStream.available();\n if (available > 0) {\n return true;\n }\n Thread.sleep(1);\n long estimatedTime = System.nanoTime() - startTime;\n long estimatedMillis = TimeUnit.MILLISECONDS.convert(estimatedTime,\n TimeUnit.NANOSECONDS);\n if (estimatedMillis > timeout){\n return false; //timeout, no data coming\n }\n }\n }catch(IOException | InterruptedException | NullPointerException e){\n Log.d(\"Exception\", \"Exception\");\n }\n return false;\n }", "public java.util.List<org.landxml.schema.landXML11.SourceDataDocument.SourceData> getSourceDataList()\r\n {\r\n final class SourceDataList extends java.util.AbstractList<org.landxml.schema.landXML11.SourceDataDocument.SourceData>\r\n {\r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData get(int i)\r\n { return SurfaceImpl.this.getSourceDataArray(i); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData set(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.setSourceDataArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n { SurfaceImpl.this.insertNewSourceData(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData remove(int i)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.removeSourceData(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfSourceDataArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new SourceDataList();\r\n }\r\n }", "public boolean hasData();", "boolean hasTxpower();", "boolean hasTimeBoltDBoltH();", "public boolean isSetSource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(SOURCE$0) != 0;\r\n }\r\n }", "public boolean hasTimestamp() {\n return fieldSetFlags()[2];\n }", "@Test\n void getFilteredByTimeZone() {\n List<HourlyProductionData> list = hourlyProductionDataRepository\n .getHourlyProductionDataBySolarParkAndTransformToTimeZoneOfSolarParkAndInsideTimeRange(\n embeddedDB.japanSolarPark.getId(),\n embeddedDB.japanSolarPark.getTimeZone(),\n embeddedDB.march1,\n embeddedDB.march1_end);\n\n assertTrue(list != null && list.size() == 1);\n HourlyProductionData hourlyProductionData = list.get(0);\n assertEquals(hourlyProductionData.getElectricityProducedMW().doubleValue(), embeddedDB.march2_hour1_japan.getElectricityProducedMW().doubleValue());\n }", "boolean hasStartTime();", "private static boolean isHere(int portNummber,InetAddress address, String nameOfProduct){\n\n for(SensorData sensorData : actualSensorDatas){\n if((sensorData.getPortNummber() == portNummber)\n || (sensorData.getAddress() == address)\n || (sensorData.getProduct().getNameOfProduct() == nameOfProduct) ){\n return true;\n }\n }\n return false;\n }", "public boolean hasTimestamp() {\n return fieldSetFlags()[0];\n }", "Source createDatasourceZ3950Timestamp(Source ds, Provider prov) throws RepoxException;", "public boolean hasCaloriesData() {\n return calories.isPresent();\n }", "boolean hasSaveSensor();", "boolean hasTsUpdate();", "public boolean isLog2Data();", "boolean hasDeviceId();", "boolean hasDeviceId();", "String getSensorDataPoint();", "public boolean isSetSource() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SOURCE_ISSET_ID);\n }", "public boolean isTimestampUsed() {\n return trackLastUsed;\n }", "public boolean isSetSource() {\n return this.source != null;\n }", "public boolean isSetSource() {\n return this.source != null;\n }", "public boolean wasDatastreamChanged(String dsId);" ]
[ "0.6519747", "0.590029", "0.5825419", "0.5565811", "0.55485904", "0.54969984", "0.534165", "0.534165", "0.534165", "0.534165", "0.534165", "0.534165", "0.534165", "0.53285474", "0.53140825", "0.5291175", "0.52708703", "0.5218254", "0.5174602", "0.5164936", "0.51462066", "0.5140232", "0.51390916", "0.5100946", "0.5063458", "0.5063458", "0.5030693", "0.50268763", "0.50129473", "0.50123525", "0.4991733", "0.4971918", "0.49718136", "0.49568477", "0.4945984", "0.49408662", "0.49087137", "0.49004725", "0.48585436", "0.48491204", "0.4839068", "0.48326847", "0.48326847", "0.48317233", "0.4826036", "0.4826036", "0.4811789", "0.48106042", "0.48077783", "0.48077387", "0.48017472", "0.48013723", "0.4799073", "0.4790258", "0.47799286", "0.4772221", "0.47570777", "0.47540736", "0.47501087", "0.47375643", "0.47288486", "0.47208923", "0.47178528", "0.470984", "0.470919", "0.470919", "0.470919", "0.470919", "0.470919", "0.470919", "0.470919", "0.46923354", "0.46923354", "0.46888155", "0.46771532", "0.46750933", "0.46712813", "0.46605322", "0.46591532", "0.4648947", "0.46345153", "0.4628013", "0.462132", "0.46169147", "0.46146342", "0.45969713", "0.45962584", "0.45870593", "0.4583099", "0.45685712", "0.45591938", "0.45511305", "0.4540422", "0.4540422", "0.45361513", "0.45350876", "0.45337215", "0.45320284", "0.45320284", "0.45302632" ]
0.63129973
1
constructs object and sets database
public ValuesDAO(Database db) { this.db = db; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"[email protected]\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }", "public DB() {\r\n\t\r\n\t}", "public Database(Context context) { \n\t\tsuper( context, database_MEF, null, 2); \n\t}", "Database createDatabase();", "public Database() {\n size = 0;\n tables = new HashMap();\n p = new Parse(this);\n }", "public Database() {\n //Assign instance variables.\n this.movies = new ArrayList<>();\n this.users = new ArrayList<>();\n }", "private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }", "public Persistence() {\n\t\tconn = dbConnection();\n\t}", "private Db() {\n super(Ke.getDatabase(), null);\n }", "public sqlDatabase() {\n }", "private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "public MoviesDatabase()\n {\n file = new FileOperation();\n menu = new Menu();\n validation = new Validation();\n }", "public Database(Context context)\n\t{\n\t\t/* Instanciation de l'openHelper */\n\t\tDBOpenHelper helper = new DBOpenHelper(context);\n\t\t\n\t\t/* Load de la database */\n\t\t//TODO passer en asynchrone pour les perfs\n\t\tmainDatabase = helper.getWritableDatabase();\n\t\t\n\t\t/* DEBUG PRINT */\n\t\tLog.i(\"info\", \"Database Loading Suceeded\");\n\t}", "protected abstract ODatabaseInternal<?> newDatabase();", "public Database() {\n\t\tconn = null;\n\t}", "public Database(){\n ItemBox.getLogger().info(\"[Database] protocol version \" + net.mckitsu.itembox.protocol.ItemBoxProtocol.getVersion());\n }", "DataBase createDataBase();", "private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }", "public void setDatabase(Connection _db);", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}", "public DatabaseAdaptor() {\n\t\ttry {\n\t\t\tdatabase = new MyDatabase(DB_NAME);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "public SetupDatabase() {\n }", "public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}", "private AttendantDatabase() {}", "public DBManager() {\n\t\t\n\t}", "Object getDB();", "public Database(Context context) {\n super(context, nome_db, null, versao_db);\n }", "public RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "private DatabaseHandler(){\n createConnection();\n }", "public DatabaseOperations(){\n\n }", "private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }", "public ContextDaoImpl() {\n Set<Commissioner> commissionerSet = new HashSet<>();\n List<String> logins = new ArrayList<>();\n commissionerSet.add(new Commissioner(\"victor.net\", \"25345Qw&&\", true));\n commissionerSet.add(new Commissioner(\"egor.net\", \"3456eR&21\", false));\n commissionerSet.add(new Commissioner(\"igor.net\", \"77??SDSw23\", false));\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n Database.setCandidateSet(new HashSet<>());\n Database.setVoterSet(new HashSet<>());\n Database.setLogins(logins);\n Database.setCommissionerSet(commissionerSet);\n }", "DatabaseController() {\n\n\t\tloadDriver();\n\t\tconnection = getConnection(connection);\n\t}", "private DatabaseManager() {}", "public Database(Context context) {\n super(context, DB_NAME, null, DB_VER);\n }", "private PurchaseDB() {}", "public Database initDB() {\n Database db = new Database(\"dataBase.db\");\n\n// db.insertData(\"1 Dragos Dinescu [email protected] 0744522600 Digi 10-12-2020\");\n// db.insertData(\"2 Adelina Mirea [email protected] 0733651320 Orange 14-10-2020\");\n// db.insertData(\"3 Radu Sorostinean [email protected] 0733723321 Digi 1-10-2020\");\n// db.insertData(\"4 Andrei Brasoveanu [email protected] 0732341390 Vodafone 12-11-2020\");\n return db;\n\n //db.deleteFromDB();\n //db.updateDB(\"1 alex radu [email protected] 022256926 orange 10/08/2010\");\n }", "public DatabaseHandler(Context context){\n super(context, \"tienda.db\", null, 1);\n }", "public KVDatabase() {\n //private constructor to prevent instantiation.\n }", "public GastoDAO(Context context){\n dbHelper = new MyDatabaseHelper(context);\n database = dbHelper.getWritableDatabase();\n }", "public Database(String url) {\n this.url = url;\n\n File f = new File(url);\n\n if (f.exists()) {\n try {\n f.mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //create table relationship\n LinkedList<String> relationship_attributes = new LinkedList<>();\n relationship_attributes.add(\"id_entity1\");\n relationship_attributes.add(\"id_entity2\");\n relationship_attributes.add(\"description\");\n this.create_table(\"relationship\", relationship_attributes);\n }", "public AdminDAO()\n {\n con = DataBase.getConnection();//crear una conexión al crear un objeto AdminDAO\n }", "public OnibusDAO() {}", "public DatabaseTable() { }", "private TexeraDb() {\n super(\"texera_db\", null);\n }", "public AbysswalkerGame(DataBase db) { this.db = db; }", "public DBHandler() {\n\n driverName = \"com.mysql.jdbc.Driver\";\n url = \"jdbc:mysql://us-cdbr-azure-southcentral-e.cloudapp.net/newsstand\";\n userId = (String) \"ba7e286a39ae9e\";\n password = (String) \"d89b6d9b\";\n \n }", "public DataManager() {\n\t\tthis(PUnit == null ? \"eElectionsDB\" : PUnit);\n\t}", "public FamilyPlaningSupplyItemDB(ConnectionInf db)\n {\n theConnectionInf=db;\n dbObj = new FamilyPlaningSupplyItem();\n initConfig();\n }", "private DBConnection() \n {\n initConnection();\n }", "public Database() {\r\n\t\ttry {\t\r\n\t\t\tSystem.out.println(\"Database: Connected\");\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Unable to connect to database\");\r\n\t\t}\r\n\t}", "public DBController() {\n System.out.println(\"[\" + this.getClass() + \" : consctructor]\");\n this.listeObservers = new ArrayList<>();\n this.url = \"/Users/nico/Desktop/testSquirell.db\";\n //this.listeMorceau=new ArrayList<Morceau>();\n //this.initDB();\n addTableMorceau();\n System.out.println(\"[end constructor \" + this.getClass() + \"]\");\n }", "public PostDatabase() {\r\n\ttry {\r\n\t Class.forName(DRIVER);\r\n\t db = DriverManager.getConnection(URI);\r\n\t Statement create = db.createStatement();\r\n\t create.execute(\"CREATE TABLE IF NOT EXISTS posts ( id INTEGER PRIMARY KEY, author TEXT, date INTEGER, isPublic INTEGER, content TEXT );\");\r\n\t} catch (ClassNotFoundException e) {\r\n\t System.err.println(\"Caught exception while attempting to use database driver: \" + e.getMessage());\r\n\t} catch (SQLException e) {\r\n\t System.err.println(\"Caught exception while doing something to the database: \" + e.getMessage());\r\n\t}\r\n }", "private OpenSimDB() {\n instance = this;\n }", "public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.println(\"Creating BLFacadeImplementation instance\");\r\n\t\tConfigXML c=ConfigXML.getInstance();\r\n\t\t\r\n\t\tif (c.getDataBaseOpenMode().equals(\"initialize\")) {\r\n\t\t\tDataAccess dbManager=new DataAccess(c.getDataBaseOpenMode().equals(\"initialize\"));\r\n\t\t\tdbManager.initializeDB();\r\n\t\t\tdbManager.close();\r\n\t\t\t}\r\n\t\t\r\n\t}", "public DatabaseManager() {\n try {\n con = DriverManager.getConnection(DB_URL, \"root\", \"marko\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public DBMonster() {\n\n }", "public DBManager(Context context){ \n\t\thelper = new DBHelper(context); \n\t\tdb = helper.getWritableDatabase(); \n\t}", "private void configureDB() {\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t}", "public ProduktRepositoryImpl() {\n this.conn = DatabaseConnectionManager.getDatabaseConnection();\n }", "private DatabaseManager() {\r\n }", "public DatabaseAccess(Context context) {\n this.openHelper = new OlpbhtbDatabase(context);\n }", "public DbUtil() {}", "public SoilMoistureDB() {\n\t\tsuper();\n\t\tLocalDateTime nowTime = LocalDateTime.now();\n\t\tthis.setReadTime(nowTime);\n\t}", "public Database(String dbName) {\n this.dbName = dbName;\n }", "private DbManager() {\n \t\tquestions = new ArrayList<Question>();\n \t\tanswers = new ArrayList<Answer>();\n \t\tcomments = new ArrayList<Comment>();\n \t\tusers = new ArrayList<User>();\n \t\ttags = new ArrayList<String>();\n \t\tthis.userCounterIdCounter = 0;\n \t\tthis.questionIdCounter = 0;\n \t\tthis.answerIdCounter = 0;\n \t\tthis.commentIdCounter = 0;\n \t\treputations = new ArrayList[3];\n \t\treputations[0] = new ArrayList<User>();\n \t\treputations[1] = new ArrayList<Date>();\n \t\treputations[2] = new ArrayList<Integer>();\n \t}", "public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }", "public Model() {\n this(Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME), new TextRepository());\n }", "private DatabaseContract() {}", "public ConnectDB(){\r\n\r\n\t}", "public PostalCodeDataBase()\n {\n codeToCityMap = new HashMap<String, Set<String>>();\n // additional instance variable(s) to be initialized in part (b)\n }", "private void getDatabase(){\n\n }", "public ConexionDB() {\n\n\t\tconn = null;\n\n\t}", "public DatabaseController()\n\t{\n\t\tconnectionString = \"jdbc:mysql://localhost/?user=root\";\n\t\tcheckDriver();\n\t\tsetupConnection();\n\t}", "public Database(Set<Variable> variables) {\n\t\tthis.variables = variables;\n\t\tthis.listInstance = new LinkedList<Map<Variable, Object>>();\n\t}", "private DatabaseManager() {\n // Default constructor\n }", "public AppModel() throws SQLException, ClassNotFoundException, IOException {\n modelLogger.debug(\"Mode logger\");\n dataBaseConnector = new DataBaseDownloader(\"jdbc:mysql://mysql.agh.edu.pl:3306/mtobiasz\",\"mtobiasz\", \"csjH6UN5BPS7VvYY\");\n String buyTableName = \"exchange_buy\";\n String sellTableName = \"exchange_sell\";\n buyMap = dataBaseConnector.getKeysAndVals(buyTableName);\n sellMap = dataBaseConnector.getKeysAndVals(sellTableName);\n }", "public DAO(String dbType){\n this.dbType = dbType;\n if(this.dbType.equals(\"MySQL\")){\n initialPool();\n\n // for q5 mysql use\n if(wholeUserIds == null){\n wholeUserIds = new TreeSet<Long>();\n }\n }\n else if(this.dbType.equals(\"Memory\")){\n // for q5 memory use\n if(wholeCountData == null){\n wholeCountData = new TreeMap<String, Integer>();\n }\n }\n\n }", "@Override\n\tpublic void construct() {\n\t\tSystem.out.println(\"Getting a MySQL Database Connection\");\n\n\t}", "public UserDAO() {\n\t\tthis.emf = Persistence.createEntityManagerFactory(\"feedr_v3\");\n\t\tthis.em = this.emf.createEntityManager();\n\t\tthis.et = this.em.getTransaction();\n\t}", "public DatabaseSeeder() {\n // initialSeed properties...\n super();\n\n // retrieve a database connection instance...\n this.connector = new DatabaseConnector();\n this.connection = this.connector.connect();\n }", "public CustomerDatabase(){\n\t\tlist = new ArrayList<Customer>();\n\t}", "private DBManager() throws Exception {\n file = new File(\"pdfLibraryDB.mv.db\");\n if (!file.exists()) {\n conn = connect();\n stmt = conn.createStatement();\n query = \"CREATE TABLE user(username VARCHAR(30) PRIMARY KEY, password VARCHAR(32));\" +\n \"CREATE TABLE category(id VARCHAR(30) PRIMARY KEY, name VARCHAR(30), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\"+\n \"CREATE TABLE favorite(id VARCHAR(30) PRIMARY KEY, path VARCHAR(500), keyword VARCHAR(200), searchType VARCHAR(10), category VARCHAR(30),username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(category) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE);\" +\n \"CREATE TABLE history(id VARCHAR(30) PRIMARY KEY, keyword VARCHAR(200), type VARCHAR(10), directory VARCHAR(500), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\";\n stmt.executeUpdate(query);\n stmt.close();\n conn.close();\n System.out.println(\"DB created!\");\n }\n }", "public void initDatabase(){\n CovidOpener cpHelper = new CovidOpener(this);\n cdb = cpHelper.getWritableDatabase();\n }", "public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }", "@PostConstruct\r\n public void init() {\n File database = new File(applicationProps.getGeodb());\r\n try {\r\n reader = new DatabaseReader.Builder(database).withCache(new CHMCache()).build();\r\n } catch (IOException e) {\r\n log.error(\"Error reading maxmind DB, \", e);\r\n }\r\n }", "public DatabaseBackend(Context context) {\n super(context, Db_name, null, Db_version);\n }", "public DBMS(Context context) {\n super(context, DBName, null, DBVersion);\n Log.e(\"DBMS=>\", \"yes Db bna d ha\");\n }", "public MovieDB()\n\t{\n\t\t//Create an empty list\n\t\tlist_of_movies = new ArrayList<Movie>();\n\t}", "public ArtistDb(Connection connection) {\r\n super(connection);\r\n }", "public AddressDaoImpl()\n {\n \t//Initialise the related Object stores\n \n }", "public DatabaseStorage(Context context)\n {\n this.database = new DatabaseStorageHelper(context);\n }", "public MovieDatabase() {\n\t\tthis.movieList = new ArrayList<>();\n\t\tthis.actorList = new ArrayList<>();\n\t}", "public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected abstract DBObject getNewObject();", "public DataControl() throws DatabaseException{\r\n\t\tplayerDataService=new PlayerDataServiceImp();\r\n//\t\tteamDataService=new TeamDataServiceImp();\r\n//\t\tmatchDataService=new MatchDataServiceImp();\r\n\t}" ]
[ "0.75545734", "0.74972504", "0.72223043", "0.7124183", "0.7112924", "0.7103709", "0.7029335", "0.70203936", "0.70088726", "0.69792676", "0.69753045", "0.69160676", "0.687247", "0.6827533", "0.6809343", "0.67993426", "0.67800474", "0.67241776", "0.67049664", "0.67043567", "0.6670587", "0.6657402", "0.6651818", "0.66423976", "0.6639566", "0.66354513", "0.6596158", "0.6590269", "0.6578193", "0.6565364", "0.65611887", "0.6535294", "0.6534346", "0.65154725", "0.65082395", "0.64910364", "0.6483057", "0.64791715", "0.647625", "0.64670134", "0.6417783", "0.64173555", "0.64152306", "0.64135224", "0.6404403", "0.63990784", "0.6394338", "0.6392511", "0.6390041", "0.6386875", "0.63766706", "0.6376298", "0.6374561", "0.63584524", "0.63454944", "0.6344042", "0.6340948", "0.63249624", "0.63153344", "0.6301737", "0.62914884", "0.629031", "0.62876695", "0.62767583", "0.6255781", "0.6247064", "0.6246767", "0.62450874", "0.62439024", "0.62413996", "0.62408185", "0.6240395", "0.6238546", "0.6234248", "0.62295485", "0.62261015", "0.6225234", "0.62224287", "0.6218618", "0.62168896", "0.6214568", "0.62030333", "0.61999494", "0.6197463", "0.61925185", "0.61828035", "0.6177573", "0.61692864", "0.6163191", "0.6161214", "0.61610806", "0.61583525", "0.61492354", "0.61453295", "0.61434394", "0.61401546", "0.6136008", "0.6129881", "0.61296386", "0.6127695" ]
0.6459764
40
Searches for the specified project then returns its values
public ArrayList<Value> getAll(Project project) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<ProjectInfo> findProject(ProjectInfo project) {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findProject\",project);\n\t}", "@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}", "@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public Set<String> get(JavaProject javaProject, ProgressMonitor progressMonitor);", "public static Project getProject() {\n if (ProjectList.size() == 0) {\n System.out.print(\"No Projects were found.\");\n return null;\n }\n\n System.out.print(\"\\nPlease enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n for (Project proj : ProjectList) {\n if (proj.projNum == projNum) {\n return proj;\n }\n }\n\n System.out.print(\"\\nProject was not found. Please try again.\");\n return getProject();\n }", "public Project getProject(Long projectId);", "@Override\n protected SearchedResRepList getProjectSearchResults(final URI projectId) {\n SearchedResRepList resRepList = new SearchedResRepList(getResourceType());\n _dbClient.queryByConstraint(\n ContainmentConstraint.Factory.getProjectBlockConsistencyGroupConstraint(projectId),\n resRepList);\n return resRepList;\n }", "Project findProjectById(String projectId);", "public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT * FROM TA_PROJECTS\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}", "public List<ProjectType> invokeQueryProjects() throws TsResponseException {\n checkSignedIn();\n\n final List<ProjectType> projects = new ArrayList<>();\n\n int currentPage = 1; // Tableau starts counting at 1\n BigInteger totalReturned = BigInteger.ZERO;\n BigInteger totalAvailable;\n\n // Loop over pages\n do {\n // Query the projects page\n final String url = getUriBuilder().path(QUERY_PROJECTS) //\n .queryParam(\"pageNumber\", currentPage) //\n .queryParam(\"pageSize\", PROJECTS_PAGE_SIZE) //\n .build(m_siteId).toString();\n final TsResponse response = get(url);\n\n // Get the projects from the response\n projects.addAll(response.getProjects().getProject());\n\n // Next page\n currentPage++;\n // NOTE: total available is the number of datasources available\n totalAvailable = response.getPagination().getTotalAvailable();\n totalReturned = totalReturned.add(response.getPagination().getPageSize());\n } while (totalReturned.compareTo(totalAvailable) < 0);\n\n return projects;\n }", "private static void search_by_name() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project Name: \");\r\n\t\t\tString project_name = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_name, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project name cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}", "public List<Project> findAllProject() {\n\treturn projectmapper.findProject(null);\n}", "public List<Project> getAllProjects();", "List<Project> findProjectsOfAccount(String username);", "public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}", "public static MapList getCurrentUserProjects(Context context, String[] args) throws MatrixException {\n MapList projectList = new MapList();\n try {\n // rp3 : This needs to be tested to make sure the result creates no issue and returns the same set\n projectList = (MapList) JPO.invoke(context, \"emxProjectSpace\", null, \"getAllProjects\", args, MapList.class);\n\n // rp3 : Replace this code with the JPO invoke from the program central API.\n /*\n * com.matrixone.apps.common.Person person = (com.matrixone.apps.common.Person) DomainObject.newInstance(context, DomainConstants.TYPE_PERSON); com.matrixone.apps.program.ProjectSpace\n * project = (com.matrixone.apps.program.ProjectSpace) DomainObject.newInstance(context, DomainConstants.TYPE_PROJECT_SPACE,DomainConstants.PROGRAM);\n * \n * String ctxPersonId = person.getPerson(context).getId(); person.setId(ctxPersonId);\n * \n * //System.out.println(\"the project id is \" + ctxPersonId);\n * \n * StringList busSelects = new StringList(11); busSelects.add(project.SELECT_ID); busSelects.add(project.SELECT_TYPE); busSelects.add(project.SELECT_NAME);\n * busSelects.add(project.SELECT_CURRENT);\n * \n * //projectList = project.getUserProjects(context,person,null,null,null,null); // expand to get project members Pattern typePattern = new Pattern(DomainConstants.TYPE_PROJECT_SPACE);\n * typePattern.addPattern(DomainConstants.TYPE_PROJECT_CONCEPT);\n * \n * projectList = (person.getRelatedObjects( context, // context DomainConstants.RELATIONSHIP_MEMBER, // relationship pattern typePattern.getPattern(), // type filter. busSelects, //\n * business selectables null, // relationship selectables true, // expand to direction false, // expand from direction (short) 1, // level null, // object where clause null)); //\n * relationship where clause\n */\n\n // System.out.println(\"the project list is \" + projectList);\n } catch (Exception ex) {\n throw (new MatrixException(\"emxMsoiPMCUtil:getCurrentUserProjects : \" + ex.toString()));\n }\n return projectList;\n }", "private void search() {\n if (dateFind.getValue() == null) {\n dateFind.setValue(LocalDate.now().minusDays(DEFAULT_PERIOD));\n }\n Long days = ChronoUnit.DAYS.between(dateFind.getValue(), LocalDate.now());\n final List<Project> findProject = ServiceFactory.getProjectService().getFindProject(days, comboProject.getValue());\n observableProjects.clear();\n observableProjects.addAll(findProject);\n table.setItems(observableProjects);\n }", "@Override\n\tpublic Projects findByProjectName(String name) {\n\t\tString sql = \"select * from projects where lower(proj_name)=lower('\"+name+\"')\";\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "@Override\n\tpublic Project findByName(String field, String Value) {\n\t\treturn null;\n\t}", "private static void search_by_id() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project id: \");\r\n\t\t\tString project_id_str = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_id_str, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project id cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t\r\n\t}", "private ModelInfo<Project> getProjectInfo(String projectName) {\n return name2Info.get(projectName);\n }", "public List<String[]> getAllProject() {\n String url = Host.getSonar() + \"api/projects/index\";\n String json = null;\n try {\n Object[] response = HttpUtils.sendGet(url, Authentication.getBasicAuth(\"sonar\"));\n if (Integer.parseInt(response[0].toString()) == 200) {\n json = response[1].toString();\n }\n } catch (Exception e) {\n logger.error(\"Get sonar project list: GET request error.\", e);\n }\n if (json == null) {\n logger.warn(\"Get sonar project list: response empty.\");\n return null;\n }\n List<Map<String, Object>> projects = JSONArray.fromObject(json);\n if (projects.size() == 0) {\n logger.warn(\"Get sonar project list: empty list.\");\n return null;\n }\n List<String[]> result = new ArrayList<>();\n for (Map<String, Object> oneProject : projects) {\n result.add(new String[]{oneProject.get(\"nm\").toString(), oneProject.get(\"k\").toString()});\n }\n return result;\n }", "@Override\n protected SearchedResRepList getNamedSearchResults(final String name, final URI projectId) {\n SearchedResRepList resRepList = new SearchedResRepList(getResourceType());\n if (projectId == null) {\n _dbClient.queryByConstraint(\n PrefixConstraint.Factory.getLabelPrefixConstraint(getResourceClass(), name),\n resRepList);\n } else {\n _dbClient.queryByConstraint(ContainmentPrefixConstraint.Factory\n .getConsistencyGroupUnderProjectConstraint(projectId, name), resRepList);\n }\n return resRepList;\n }", "public Project getProject(int projectId) throws EmployeeManagementException;", "public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> searchProjects(\n Map<String, String> filters, List<String> accessibleIds, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n\n List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> result = new ArrayList<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource>();\n EntityManager em = null;\n try {\n String query = \"SELECT DISTINCT p from Project p WHERE \";\n\n // FIXME There is a performance bottleneck for using IN clause. Try using temporary tables ?\n if(accessibleIds != null){\n query += \" p.projectId IN (\";\n for(String id : accessibleIds)\n query += (\"'\" + id + \"'\" + \",\");\n query = query.substring(0, query.length()-1) + \") AND \";\n }\n\n if (filters != null && filters.size() != 0) {\n for (String field : filters.keySet()) {\n String filterVal = filters.get(field);\n if (field.equals(ProjectConstants.USERNAME)) {\n query += \"p.\" + field + \"= '\" + filterVal + \"' AND \";\n } else if (field.equals(ProjectConstants.GATEWAY_ID)) {\n query += \"p.\" + field + \"= '\" + filterVal + \"' AND \";\n } else {\n if (filterVal.contains(\"*\")) {\n filterVal = filterVal.replaceAll(\"\\\\*\", \"\");\n }\n query += \"p.\" + field + \" LIKE '%\" + filterVal + \"%' AND \";\n }\n }\n }\n query = query.substring(0, query.length() - 5);\n\n //ordering\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n String order = (resultOrderType == ResultOrderType.ASC) ? \"ASC\" : \"DESC\";\n query += \" ORDER BY p.\" + ProjectConstants.CREATION_TIME + \" \" + order;\n }\n\n em = ExpCatResourceUtils.getEntityManager();\n em.getTransaction().begin();\n Query q;\n\n //pagination\n if (offset >= 0 && limit >= 0) {\n q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);\n } else {\n q = em.createQuery(query);\n }\n\n List resultList = q.getResultList();\n for (Object o : resultList) {\n Project project = (Project) o;\n org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource projectResource =\n (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);\n result.add(projectResource);\n }\n em.getTransaction().commit();\n em.close();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n throw new RegistryException(e);\n } finally {\n if (em != null && em.isOpen()) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n }\n }\n return result;\n }", "public void testRetrieveProjectsByNameAndVersion() throws RetrievalException {\r\n System.out.println(\"Demo 5: Retrieves the projects by name and version.\");\r\n\r\n // There might be more than one with this name and version (e.g., different catalog)\r\n ExternalProject[] projects = defaultDBProjectRetrieval.retrieveProject(\"Project A\", \"Version 1\");\r\n\r\n ExternalProject project = null;\r\n String[] technologies = null;\r\n for (int i = 0; i < projects.length; ++i) {\r\n // Outputs the info of each project.\r\n project = projects[i];\r\n System.out.println(project.getId());\r\n System.out.println(project.getName());\r\n System.out.println(project.getVersion());\r\n System.out.println(project.getCatalogId());\r\n System.out.println(project.getForumId());\r\n System.out.println(project.getShortDescription());\r\n System.out.println(project.getFunctionalDescription());\r\n technologies = project.getTechnologies(); // should not be null\r\n for (int t = 0; t < technologies.length; t++) {\r\n System.out.println(\"Uses technology: \" + technologies[t]);\r\n }\r\n }\r\n\r\n // Should only have a maximum of 2 entries but the order may vary.\r\n ExternalProject[] projects2 = defaultDBProjectRetrieval.retrieveProjects(\r\n new String[] {\"Project A\", \"Project C\"}, new String[] {\"Version 1\", \"Version 2\"});\r\n // Should get only one.\r\n System.out.println(projects2.length);\r\n System.out.println(projects2[0].getName());\r\n\r\n System.out.println();\r\n }", "Project getByPrjNumber(Integer num);", "private void compareProjects(DoapProject[] projects,\n\t\t\tDoapProject[] result) {\n\t\tassertEquals(projects.length, result.length);\n\t\tfor (int i = 0; i < projects.length; i++) {\n\t\t\tboolean found = false;\n\t\t\tfor (int j = 0; j < result.length; j++) {\n\t\t\t\tif (projects[i].getName() == null) {\n\t\t\t\t\tif (result[j].getName() == null) {\n\t\t\t\t\t\tif (projects[i].getHomePage() == null) {\n\t\t\t\t\t\t\tif (result[j].getHomePage() == null) {\n\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (projects[i].getHomePage().equals(result[j].getHomePage())) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (projects[i].getName().equals(result[j].getName())) {\n\t\t\t\t\tif (projects[i].getHomePage() == null) {\n\t\t\t\t\t\tif (result[j].getHomePage() == null) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (projects[i].getHomePage().equals(result[j].getHomePage())) {\n\t\t\t\t\t\tfound = true;\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\tif (!found) {\n\t\t\t\tfail(\"Project not found: \"+projects[i].getName());\n\t\t\t}\n\t\t}\n\t}", "public LearningResultHasActivity[] findWhereProjectCodeEquals(String projectCode) throws LearningResultHasActivityDaoException;", "@GetMapping(\"/byName\")\r\n\tpublic List<Project> getProject(Principal principal) {\r\n\t\treturn persistenceService.getProject(AppBuilderUtil.getLoggedInUserId());\r\n\t}", "public void testSearchRules() throws Exception {\n Project project = new Project();\r\n \r\n DateFormatSymbols symbols = new DateFormatSymbols(Locale.US);\r\n \r\n for (int i = 0; i < 12; i++) {\r\n \r\n String month = symbols.getMonths()[i];\r\n String shortMonth = symbols.getShortMonths()[i];\r\n \r\n // Basic project info\r\n project.setId(i);\r\n project.setCategoryId(1);\r\n project.setAllowGuests(true);\r\n project.setMembershipRequired(false);\r\n project.setApproved(true);\r\n project.setClosed(false);\r\n project.setPortal(false);\r\n \r\n // Unique Title\r\n project.setTitle(month + \" test project\");\r\n project.setShortDescription(month + \" description word\");\r\n project.setKeywords(shortMonth);\r\n \r\n // Unique Location\r\n project.setCity(\"Virginia Beach\");\r\n project.setState(\"VA\");\r\n project.setPostalCode(\"234\" + String.valueOf(50 + i));\r\n \r\n // Random Rating for now\r\n project.setRatingCount(i + 1);\r\n project.setRatingValue(project.getRatingCount() * StringUtils.rand(1, 5));\r\n project.setRatingAverage(project.getRatingValue() / project.getRatingCount());\r\n \r\n // Index it\r\n ProjectIndexer indexer = new ProjectIndexer();\r\n indexer.add(snowballWriter, project, true);\r\n }\r\n \r\n QueryParser parser = new QueryParser(\"contents\", snowballAnalyzer);\r\n \r\n {\r\n // Make sure a single matching term yields a single hit\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0]);\r\n search.setLocation(\"Virginia Beach\");\r\n assertNotNull(search.getQuery());\r\n assertNotNull(search.getLocation());\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january\"^20 OR january^15 OR january*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 1);\r\n }\r\n \r\n {\r\n // Make sure a single matching term stem yields a single hit\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0] + \"'s\");\r\n search.setLocation(\"Virginia Beach\");\r\n assertNotNull(search.getQuery());\r\n assertNotNull(search.getLocation());\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january's\"^20 OR january's^15 OR january's*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 1);\r\n }\r\n \r\n {\r\n // Make sure multiple matching words yield two hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0] + \" \" + symbols.getMonths()[1]);\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january february\"^20 OR january^15 OR february^14 OR january*^4 OR february*^3) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 2);\r\n }\r\n \r\n {\r\n // Make sure wilcards yield multiple hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(\"j\");\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n // Look for data with a \"j\" for comparison\r\n int jCount = 0;\r\n for (int i = 0; i < symbols.getMonths().length; i++) {\r\n if (symbols.getMonths()[i].toLowerCase().indexOf(\"j\") > -1 ||\r\n symbols.getShortMonths()[i].toLowerCase().indexOf(\"j\") > -1) {\r\n ++jCount;\r\n }\r\n }\r\n assertTrue(jCount > 0);\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"j\"^20 OR j^15 OR j*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == jCount);\r\n }\r\n \r\n {\r\n // Make sure alternate locations do not yield any hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0]);\r\n search.setLocation(\"Norfolk\");\r\n search.parseQuery();\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 0);\r\n }\r\n \r\n {\r\n // Make sure locations as query terms do not yield any hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(\"Virginia Beach\");\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 0);\r\n }\r\n }", "public void Found_project_from_DATABASE(int id){\n print_pro();\n// return project;\n }", "@Query(value = \"SELECT * FROM questions_aides_project WHERE token_project=?1 \", nativeQuery = true)\n List<QuestionAidesProjectModel> findByProject(String tokenProject);", "Project findProjectById(Long projectId);", "public String queryProjectListPaging(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.*\");\n SELECT(\"u.user_name as user_name\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition AS def WHERE def.project_id = p.id) AS def_count\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition def, t_escheduler_process_instance inst WHERE def.id = inst.process_definition_id AND def.project_id = p.id AND inst.state=1 ) as inst_running_count\");\n FROM(TABLE_NAME + \" p\");\n JOIN(\"t_escheduler_user u on u.id=p.user_id\");\n WHERE(\"p.id in \" +\n \"(select project_id from \"+ RELEATION_TABLE_NAME+\" where user_id=#{userId} \" +\n \"union select id as project_id from \"+ TABLE_NAME+\" where user_id=#{userId})\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\" p.flag = 1\");\n ORDER_BY(\"p.create_time desc limit #{offset},#{pageSize} \");\n }}.toString();\n }", "void getAllProjectList(int id);", "List <ProjectAssignment> findAssignmentsByProject (int projectId);", "public String[][] getCompletedProjects(String[][] projectArrayToSearchIn) throws ParseException\n\t{\n\t\tDate projectEndDate;\t\t\n\t\t\n\t\t//variable to find out the indexes based on comparison\n\t\tArrayList<Integer> arrayToStoreIndexOfReqProjects = new ArrayList<Integer>();\n\t\t\n\t\t//variable to store rows for desired indexes of the actual array\n\t\tString[][] projectDetailsForCompletedStatus = null;\t\n\t\t\n\t\tint projectsCountForCompletedStatus;\t\t\n\t\t\n\t\tdateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\t\t\n\t\tDate date = new Date();\t\t\n\t\tsystemDate = dateFormat.format(date);\t\t\n\t\tDate sysdateInDateFormat = dateFormat.parse(systemDate);\n\t\t\n\t\t//loop to get the index for matching value\n\t\tfor (int i = 0; i < projectArrayToSearchIn.length; i++) \n\t\t{\t\n\t\t\t//get project end date\n\t\t\tprojectEndDate = dateFormat.parse(projectArrayToSearchIn[i][5]);\n\t\t\t\n\t\t\t//compare project end date with system date and add its index to array list if project end date is less than system date\n\t\t\tif ((projectEndDate.compareTo(sysdateInDateFormat)< 0 ) &&(projectArrayToSearchIn[i][7]!=null)) \n\t\t\t{\n\t\t\t\tarrayToStoreIndexOfReqProjects.add(i);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t//get the size of array list\n\t\tprojectsCountForCompletedStatus = arrayToStoreIndexOfReqProjects.size();\n\t\t\n\t\tprojectDetailsForCompletedStatus = new String[projectsCountForCompletedStatus][8];\n\t\t\n\t\tint projectRowToGetDetailsFrom;\n\t\t\n\t\t//loop to insert values based on the indexes got from the above loop\n\t\tfor (int j = 0; j < projectDetailsForCompletedStatus.length; j++) \n\t\t{\n\t\t\tprojectRowToGetDetailsFrom = arrayToStoreIndexOfReqProjects.get(j);\n\t\t\t\n\t\t\tprojectDetailsForCompletedStatus[j][0] = projectArrayToSearchIn[projectRowToGetDetailsFrom][0];\n\t\t\tprojectDetailsForCompletedStatus[j][1] = projectArrayToSearchIn[projectRowToGetDetailsFrom][1];\n\t\t\tprojectDetailsForCompletedStatus[j][2] = projectArrayToSearchIn[projectRowToGetDetailsFrom][2];\n\t\t\tprojectDetailsForCompletedStatus[j][3] = projectArrayToSearchIn[projectRowToGetDetailsFrom][3];\n\t\t\tprojectDetailsForCompletedStatus[j][4] = projectArrayToSearchIn[projectRowToGetDetailsFrom][4];\n\t\t\tprojectDetailsForCompletedStatus[j][5] = projectArrayToSearchIn[projectRowToGetDetailsFrom][5];\n\t\t\tprojectDetailsForCompletedStatus[j][6] = projectArrayToSearchIn[projectRowToGetDetailsFrom][6];\n\t\t\tprojectDetailsForCompletedStatus[j][7] = projectArrayToSearchIn[projectRowToGetDetailsFrom][7];\n\t\t}\n\t\t\t\t\n\t\treturn projectDetailsForCompletedStatus;\n\t\t\n\t}", "@RequestMapping(value = \"/_search/hrProjectInfos/{query}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<HrProjectInfo> searchHrProjectInfos(@PathVariable String query) {\n log.debug(\"REST request to search HrProjectInfos for query {}\", query);\n return StreamSupport\n .stream(hrProjectInfoSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "public String retrieveProjectQuery(ArrayList<String> project,String pID) \r\n\t{\r\n\t\tString query = \"SELECT * FROM Project WHERE ProjectID=\\\"\"+project.get(17)+\"\\\"\";\r\n\t\tSystem.out.println(query);\r\n\t\treturn query;\r\n\t}", "public String retrieveProjectQuery(ArrayList<String> project,String pID) \r\n\t{\r\n\t\tString query = \"SELECT * FROM Project WHERE ProjectID=\\\"\"+project.get(17)+\"\\\"\";\r\n\t\tSystem.out.println(query);\r\n\t\treturn query;\r\n\t}", "public Project getProjectByName(String name);", "public String queryAllProjectListPaging(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.*\");\n SELECT(\"u.user_name as user_name\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition AS def WHERE def.project_id = p.id) AS def_count\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition def, t_escheduler_process_instance inst WHERE def.id = inst.process_definition_id AND def.project_id = p.id AND inst.state=1 ) as inst_running_count\");\n FROM(TABLE_NAME + \" p\");\n JOIN(\"t_escheduler_user u on p.user_id = u.id\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\" p.flag = 1\");\n ORDER_BY(\"p.create_time desc limit #{offset},#{pageSize} \");\n }}.toString();\n }", "@Test\n\tpublic void testFindAndProject() {\n\t\tTag a = new Tag(A);\n\t\ttagService.create(a);\n\t\tTag b = tagService.create(new Tag(B));\n\t\tTag c = tagService.create(new Tag(C));\n\t\tIterable<String> values = tagService.find().matching(\n\t\t\t\tnew QueryBuilder<TagInformer>() {\n\n\t\t\t\t\tpublic QueryExpression createMatchingExpression(\n\t\t\t\t\t\t\tTagInformer object) {\n\t\t\t\t\t\treturn object.getText().differentFrom(null);\n\t\t\t\t\t}\n\t\t\t\t}).projectOn(new ProjectionBuilder<String, Tag, TagInformer>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic String project(TagInformer informer, ValueFetcher fetcher) {\n\t\t\t\t\t\treturn fetcher.getValue(informer.getText());\n\t\t\t\t\t}\n\t\t\t\t}).getAll();\n\t\tassertThat(values, IsCollectionContaining.hasItems(A, B, C));\n\t}", "public Project findProjectById(String projectId) {\n\t\tProject project = null;\r\n\t\tString query = \"SELECT FROM TA_PROJECTS WHERE PROJECT_ID='\" + projectId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t}\r\n\t\treturn project;\r\n\t}", "public List<Project> findByPage(Map<String, Object> map) {\n\tString key=map.get(\"currpage\").toString()+map.get(\"rows\").toString()+\"prlist\";\n\tList<Object> olist=redistemplateutil.lGet(key, 0, -1);\n\tList<Project> list=new ArrayList<Project>();\n\tif(null!=olist &&olist.size()>0) {\n\t\tlist=(List<Project>) olist.get(0);\n\t\treturn list;\n\t}else{\n\t\n\tList<Project> ulist= projectmapper.findByPage(map);\n\tredistemplateutil.lSet(key, ulist,3);\n\treturn ulist;\n\t}\n}", "public Object getProjectResources(Integer projectId) {\n\t\treturn null;\n\t}", "@GetMapping(\"/byProjectName/{projectName}\")\r\n\tpublic Project getProjectDetails(@PathVariable String projectName) {\r\n\t\treturn persistenceService.getProjectDetails(projectName);\r\n\t}", "com.appscode.api.auth.v1beta1.Project getProject();", "List<Project> selectAll();", "private Set<String> projectFromTuples(List<Tuple> tuples, int projectPosition) {\n\t\tSet<String> values = new HashSet<String>();\n\t\tfor (Tuple tuple : tuples) {\n\t\t\tvalues.add(tuple.getStringValues().get(projectPosition));\n\t\t}\n\t\treturn values;\n\t}", "public Projects findByProjectID(int proj_id){\n\t\tString sql = \"select * from projects where proj_id = \"+proj_id;\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}", "public abstract List<ProjectBean> getProjectList();", "public Project getProjectWithEmployee(int projectId) throws EmployeeManagementException;", "@Override\r\n\tpublic List<Project> findProject(int provinceId) {\n\t\treturn iImportSalesRecordDao.findProject(provinceId);\r\n\t}", "public Collection<Task> getTasksProject(String projectName) {\n\t\tCollection<Task> tasks = new ArrayList<Task>();\n\t\tfor(Task item : m_Tasks){\n\t\t\tif(item.project.equals(projectName)) tasks.add(item);\n\t\t}\n\t\tif(tasks.size() == 0) return null;\n\t\treturn tasks;\n\t}", "public String countProjects(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"count(0)\");\n\n FROM(TABLE_NAME + \" p\");\n WHERE(\"p.id in \" +\n \"(select project_id from \"+ RELEATION_TABLE_NAME+\" where user_id=#{userId} \" +\n \"union select id as project_id from \"+ TABLE_NAME+\" where user_id=#{userId})\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\"p.flag = 1\");\n }}.toString();\n }", "public List<ProjectEntity> getProjectByName() {\n\t\treturn null;\n\t}", "private static void fetch_all_project_info(Statement stmt, String project_identifier, ResultSet project_rset)\r\n\t\t\tthrows SQLException {\r\n\t\tint get_project_id = 0;\r\n\t\ttry {\r\n\t\t\tint project_id = Integer.parseInt(project_identifier);\r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tif (project_rset.getInt(\"project_id\") == project_id) {\r\n\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\"ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\t\"\\nName: \" + project_rset.getString(\"project_name\") + \r\n\t\t\t\t\t\t\t\"\\nBuilding Type: \" + project_rset.getString(\"building_type\") + \r\n\t\t\t\t\t\t\t\"\\nPhysical Address: \" + project_rset.getString(\"physical_address\") + \r\n\t\t\t\t\t\t\t\"\\nErf Number: \" + project_rset.getInt(\"erf_num\") + \r\n\t\t\t\t\t\t\t\"\\nCharged: R\" + project_rset.getInt(\"charged\") + \r\n\t\t\t\t\t\t\t\"\\nDue on: \" + project_rset.getDate(\"deadline_date\") + \r\n\t\t\t\t\t\t\t\"\\nPaid: R\" + project_rset.getInt(\"paid\") + \r\n\t\t\t\t\t\t\t\"\\nComplete On: \" + project_rset.getDate(\"completion_date\") +\r\n\t\t\t\t\t\t\t\"\\nStatus: \" + project_rset.getString(\"status\"));\r\n\t\t\t\t\tget_project_id = project_rset.getInt(\"project_id\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcatch(Exception e) {\r\n\t\t\t System.out.println(\"No ID detected. Searching by name\");\r\n\t\t\t while (project_rset.next()) {\r\n\t\t\t\t\tif (project_rset.getString(\"project_name\").equals(project_identifier)) {\r\n\t\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\"ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\t\t\"\\nName: \" + project_rset.getString(\"project_name\") + \r\n\t\t\t\t\t\t\t\t\"\\nBuilding Type: \" + project_rset.getString(\"building_type\") + \r\n\t\t\t\t\t\t\t\t\"\\nPhysical Address: \" + project_rset.getString(\"physical_address\") + \r\n\t\t\t\t\t\t\t\t\"\\nErf Number: \" + project_rset.getInt(\"erf_num\") + \r\n\t\t\t\t\t\t\t\t\"\\nCharged: R\" + project_rset.getInt(\"charged\") + \r\n\t\t\t\t\t\t\t\t\"\\nDue on: \" + project_rset.getDate(\"deadline_date\") + \r\n\t\t\t\t\t\t\t\t\"\\nPaid: R\" + project_rset.getInt(\"paid\") + \r\n\t\t\t\t\t\t\t\t\"\\nComplete On: \" + project_rset.getDate(\"completion_date\") +\r\n\t\t\t\t\t\t\t\t\"\\nStatus: \" + project_rset.getString(\"status\"));\r\n\t\t\t\t\t\tget_project_id = project_rset.getInt(\"project_id\");\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\tString strSelectPeople = String.format(\"SELECT * FROM people WHERE projects = '%s';\", get_project_id);\r\n\t\tResultSet people_rset = stmt.executeQuery(strSelectPeople);\r\n\r\n\t\twhile (people_rset.next()) {\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Customer\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nCustomer:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Contractor\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nContractor:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Architect\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nArchitect:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Project Manager\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nProject Manager:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ArrayList<Project> getProjectName() {\n\t\tArrayList<Project> projectDaoList;\n\t\tprojectDaoList = new ArrayList<Project>();\n\t\tConnection con = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet res = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tcon = DBUtility.getConnection();\n\t\t\t\tString sql = \"select * from project_master\";\n\t\t\t\tst = con.prepareStatement(sql);\n\t\t\t\tres = st.executeQuery(sql);\n\t\t\t\twhile (res.next()) {\n\t\t\t\t\tProject pdao = new Project();\n\t\t\t\t\tpdao.setId(res.getString(\"project_id\"));\n\t\t\t\t\tpdao.setPro_name(res.getString(\"project_name\"));\n\t\t\t\t\tpdao.setSite_addr(res.getString(\"project_location\"));\n\t\t\t\t\tpdao.setC_name(res.getString(\"client_name\"));\n\t\t\t\t\tpdao.setMunicipality(res.getString(\"municipality\"));\n\t\t\t\t\tpdao.setWord_no(res.getString(\"word_no\"));\n\t\t\t\t\tpdao.setGar_name(res.getString(\"gar_name\"));\n\t\t\t\t\tpdao.setGar_rel(res.getString(\"gar_rel\"));\n\t\t\t\t\tprojectDaoList.add(pdao);\n\t\t\t\t}\n\t\t\t} catch (SQLException s) {\n\t\t\t\ts.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t\treturn null;\n\t\t\t} catch (NamingException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t}\n\t\t} finally {\n\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t}\n\t\treturn projectDaoList;\n\t}", "public static Set<CharSequence> getSearchBase(Project project, Folder folder) {\n Set<CharSequence> result = new HashSet<>();\n ConcurrentMap<Folder,List<CharSequence>> projectSearchBase = searchBase.get(project);\n if (projectSearchBase != null) {\n List<CharSequence> list = projectSearchBase.get(folder);\n if (list != null) {\n synchronized(list) {\n result.addAll(list);\n }\n }\n }\n return result;\n }", "@GET\n\t@Path(\"getParticularProject/{projectId}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getParticularProject(\n\t\t\t@PathParam(\"projectId\") Integer projectId) throws Exception {\n\n\t\tProjectTO projectTO = null;\n\n\t\ttry {\n\t\t\tHashMap<String, Object> queryMap = new HashMap<String, Object>();\n\t\t\tqueryMap.put(\"projectId\", projectId);\n\n\t\t\tProjectMaster project = (ProjectMaster) GenericDaoSingleton\n\t\t\t\t\t.getGenericDao().findUniqueByQuery(\n\t\t\t\t\t\t\tConstantQueries.GET_PARTICULAR_PROJECT_BY_ID,\n\t\t\t\t\t\t\tqueryMap);\n\n\t\t\tif (project == null) {\n\t\t\t\tSystem.out.println(\"Project not found\");\n\t\t\t\tprojectTO = null;\n\t\t\t\treturn Response.status(Response.Status.NOT_FOUND)\n\t\t\t\t\t\t.entity(projectTO).build();\n\t\t\t}\n\n\t\t\tprojectTO = new ProjectTO();\n\t\t\t// projectMaster = (Object[]) projectList.get(i);\n\t\t\tprojectTO.setProject_id(project.getProject_id());\n\t\t\tprojectTO.setProject_name(project.getProject_name());\n\t\t\tprojectTO.setProject_status(project.getProject_status());\n\t\t\tprojectTO.setProject_creation_date(project\n\t\t\t\t\t.getProject_creation_date());\n\t\t\tprojectTO.setAccount_id(project.getAccountMaster().getAccount_id());\n\n\t\t\treturn Response.status(Response.Status.OK).entity(projectTO)\n\t\t\t\t\t.build();\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t\tprojectTO = null;\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Error while getting Projects in Project Config service\");\n\t\t\treturn Response.status(Response.Status.INTERNAL_SERVER_ERROR)\n\t\t\t\t\t.entity(projectTO).build();\n\t\t}\n\n\t}", "public void testRetrieveProjectsById() throws RetrievalException {\r\n System.out.println(\"Demo 4: Retrieves the projects by id.\");\r\n\r\n // Retrieve a known project\r\n ExternalProject project = defaultDBProjectRetrieval.retrieveProject(2);\r\n System.out.println(project.getId());\r\n\r\n // Outputs its info.\r\n System.out.println(project.getComponentId());\r\n System.out.println(project.getForumId());\r\n System.out.println(project.getName());\r\n System.out.println(project.getVersion());\r\n System.out.println(project.getVersionId());\r\n System.out.println(project.getDescription());\r\n System.out.println(project.getComments());\r\n System.out.println(project.getShortDescription());\r\n System.out.println(project.getFunctionalDescription());\r\n String[] technologies = project.getTechnologies(); // should not be null\r\n for (int t = 0; t < technologies.length; t++) {\r\n System.out.println(\"Uses technology: \" + technologies[t]);\r\n }\r\n\r\n // Not found ĘC should be null which is acceptable\r\n ExternalProject shouldBeNull = defaultDBProjectRetrieval.retrieveProject(Long.MAX_VALUE);\r\n System.out.println(shouldBeNull);\r\n\r\n // Should only have a maximum of 1 entry.\r\n ExternalProject[] projects = defaultDBProjectRetrieval.retrieveProjects(new long[] {1, 100});\r\n System.out.println(projects.length);\r\n System.out.println(projects[0].getName());\r\n\r\n System.out.println();\r\n }", "private void setProjectSearchResults(List<Project> aces, List<Project> aws, List<Project> elsewhere, List<Project> rcnc){\n resultsMap.put(titles[0], aces);\n resultsMap.put(titles[1], aws);\n resultsMap.put(titles[2], elsewhere);\n resultsMap.put(titles[3], rcnc);\n\n mAdapterSearch = new ProjectsExpandableSearchAdapter(main, R.layout.project_list_item, titles, resultsMap);\n mProjectsListView.setAdapter(mAdapterSearch);\n mProjectsListView.expandGroup(0);\n mProjectsListView.expandGroup(1);\n mProjectsListView.expandGroup(2);\n mProjectsListView.expandGroup(3);\n\n }", "public Tbl_Projects getProjectInforFromPMS(String projectName) throws AncestryException\n\t{\n\t\tTbl_Projects project = new Tbl_Projects();\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"\";\n\t\ttry {\n\t\t\tsql = \"SELECT proj_serverip ,proj_schema , proj_dbname , proj_uid , proj_pwd FROM tbl_projects p WHERE proj_name='\"+projectName+\"'\";\n\t\t\tcon = db.getConPMSByHost(db.host);\n\t\t\trs = JdbcHelper.queryToResultset(con, sql);\n\t\t\tif(rs.next()) {\n\t\t\t\tproject.setProj_serverip(rs.getString(\"proj_serverip\"));\n\t\t\t\tproject.setProj_dbname(rs.getString(\"proj_dbname\"));\n\t\t\t\tproject.setProj_uid(rs.getString(\"proj_uid\"));\n\t\t\t\tproject.setProj_pwd(rs.getString(\"proj_pwd\"));\n\t\t\t\tproject.setProj_schema(rs.getString(\"proj_schema\"));\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new AncestryException(\"getProjectInforFromPMS : \" + e.toString() ,e);\n\t\t}\n\t\tfinally {\n\t\t\tJdbcHelper.closeRS(rs);\n\t\t\tJdbcHelper.close(con);\n\t\t}\n\t\treturn project;\n\t}", "@Override\n\tpublic ProjectInfoVO inquireProjectInfo(String projectName) {\n\t\tproInfo.setProjectName(projectName);\n\t\treturn proInfo.convertToVO();\n\t}", "private Project getProject(ModelInfo<Project> info) {\n return data.get(info);\n }", "private String[][] getActiveProjects(String[][] projectArray) throws ParseException\n\t{\n\t\tDate projectStartDate;\n\t\tDate projectEndDate;\n\t\t\n\t\t//variable to find out the indexes based on comparison\n\t\tArrayList<Integer> arrayToStoreIndexOfReqProjects = new ArrayList<Integer>();\n\t\t\n\t\t//variable to store rows for desired indexes of the actual array\n\t\tString[][] projectDetailsForReqFYAndQuarter = null;\t\t\n\t\t\t\t\n\t\tint projectsCountForReqFYandQuarter;\t\t\n\t\t\n\t\tdateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\t\t\n\t\tDate date = new Date();\t\t\n\t\tsystemDate = dateFormat.format(date);\t\t\n\t\tDate sysdateInDateFormat = dateFormat.parse(systemDate);\n\t\t\n\t\t//loop to get the index for matching value\n\t\tfor (int i = 0; i < projectArray.length; i++) \n\t\t{\t\n\t\t\tprojectStartDate = dateFormat.parse(projectArray[i][6]);\n\t\t\tprojectEndDate = dateFormat.parse(projectArray[i][5]);\n\n\t\t\tif ((projectEndDate.compareTo(sysdateInDateFormat) >= 0 && projectStartDate.compareTo(sysdateInDateFormat) <= 0)\n\t\t\t\t\t&& (projectArray[i][7]!=null)) \n\t\t\t{\n\t\t\t\tarrayToStoreIndexOfReqProjects.add(i);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\t\n\t\tprojectsCountForReqFYandQuarter = arrayToStoreIndexOfReqProjects.size();\n\t\t\n\t\tprojectDetailsForReqFYAndQuarter = new String[projectsCountForReqFYandQuarter][8];\n\t\t\n\t\tint projectRowToGetDetailsFrom;\n\t\t\n\t\t//loop to insert values based on the indexes got from the above loop\n\t\tfor (int j = 0; j < projectDetailsForReqFYAndQuarter.length; j++) \n\t\t{\n\t\t\tprojectRowToGetDetailsFrom = arrayToStoreIndexOfReqProjects.get(j);\n\t\t\t\n\t\t\tprojectDetailsForReqFYAndQuarter[j][0] = projectArray[projectRowToGetDetailsFrom][0];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][1] = projectArray[projectRowToGetDetailsFrom][1];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][2] = projectArray[projectRowToGetDetailsFrom][2];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][3] = projectArray[projectRowToGetDetailsFrom][3];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][4] = projectArray[projectRowToGetDetailsFrom][4];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][5] = projectArray[projectRowToGetDetailsFrom][5];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][6] = projectArray[projectRowToGetDetailsFrom][6];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][7] = projectArray[projectRowToGetDetailsFrom][7];\n\t\t}\n\t\t\t\t\n\t\treturn projectDetailsForReqFYAndQuarter;\n\t\t\n\t}", "java.lang.String getProjectId();", "@ApiMethod(\n name = \"getProjects\",\n path = \"getProjects\",\n httpMethod = HttpMethod.POST\n )\n public List<Project> getProjects(){\n \tQuery<Project> query = ofy().load().type(Project.class);\n \treturn query.list();\n }", "@GetMapping(value=\"/getProjectDetails/completed\")\n\tpublic List<Project> getAllProjectDetails()\n\t{\n\t\treturn integrationClient.getProjectDetiails();\n\t}", "public List<String> getWorkingProject(String id, String string) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tString query=null;\n\t\tjdbc JDBC=new jdbc();\n\t\t\n\t\tif(string.equals(\"projects\"))\n\t\t query=\"select P_id from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"startdate\"))\n\t\t query=\"select startDate from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"duedate\"))\n\t\t query=\"select DueDate from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"supervisor\"))\n\t\t query=\"select emp_id from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\ttry {\n\t\t\tSystem.out.println(query);\n\t\t\tResultSet rs=JDBC.stat.executeQuery(query);\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tlist.add(rs.getString(1));\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\t\n\t\treturn list;\n\t}", "@GetMapping(\"/showme/{name}\")\n\t@ResponseBody\n\tpublic Optional<Project> retrieveProjectsByName(@PathVariable(\"name\") String name){\n\t\tOptional<Project> t = projectrepository.findProjectByName(name);\n\t\treturn t;\n\t}", "@GetMapping(\"/my_projects\")\n public ResponseEntity<List<ProjectDto>> getMyProjects(){\n\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n User currentUser = userService.findByEmail(currentUserName).orElseThrow(\n () -> {throw new MyNotFoundException(\"User not found\");}\n );\n\n List<String> projects = Arrays.asList(currentUser.getProjects().split(\"#\"));\n\n List<ProjectDto> projectDtos = new ArrayList<>();\n for(String project : projects){\n if (projectService.findByName(project).isPresent()){\n Project temp = projectService.findByName(project).get();\n projectDtos.add(new ProjectDto(temp.getId(), temp.getName(), new CompanyDto(temp.getCompany()), temp.getStart_date(), temp.getStatus()));\n }\n }\n return ResponseEntity.ok(projectDtos);\n }", "@Override\n public List<String> getTissueIdsMatchingQuery(Query query, List<FimsProject> projectsToMatch) throws ConnectionException {\n\n\n if(query instanceof BasicSearchQuery) {\n String value = ((BasicSearchQuery)query).getSearchText();\n List<Query> queries = new ArrayList<Query>();\n for(DocumentField field : getSearchAttributes()) {\n queries.add(Query.Factory.createFieldQuery(field, Condition.APPROXIMATELY_EQUAL, value));\n }\n return getTissueIdsMatchingQuery(Query.Factory.createOrQuery(queries.toArray(new Query[queries.size()]), Collections.<String, Object>emptyMap()), null);\n }\n if(query instanceof CompoundSearchQuery && (((CompoundSearchQuery)query).getOperator() == CompoundSearchQuery.Operator.OR)) {\n Set<String> results = new LinkedHashSet<String>();\n for(Query q : ((CompoundSearchQuery)query).getChildren()) {\n results.addAll(getTissueIdsMatchingQuery(q, null));\n }\n return new ArrayList<String>(results);\n }\n final List<String> results = new ArrayList<String>();\n String querySQLString = getQuerySQLString(query);\n if(querySQLString == null) {\n return Collections.emptyList();\n }\n String sql = \"SELECT '\" + getTissueCol() + \"' FROM \"+tableId+\" WHERE \"+ querySQLString;\n System.out.println(sql);\n\n try {\n Sqlresponse sqlresponse = FusionTableUtils.queryTable(sql, requestTimeoutInSeconds);\n List<List<Object>> rows = sqlresponse.getRows();\n if(rows == null) {\n return Collections.emptyList();\n }\n for (List<Object> row : rows) {\n String decoded = getRowValue(row, 0);\n results.add(decoded);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ConnectionException(e.getMessage(), e);\n }\n\n return results;\n }", "public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}", "@SqlQuery(\"SELECT attrdetail.project_id, attrdetail.attribute_id,project_attribute.Name, attrdetail.sub_attribute_name, attrdetail.sub_attribute_value from project_attribute_details as attrdetail INNER JOIN project_attribute on attrdetail.attribute_id=project_attribute.id AND attrdetail.project_id= :Project_ID;\")\n\t@Mapper(ProjectMapper.class)\n\tList<ProjectDetails> getProjectDetails(@Bind(\"Project_ID\")long projectKey);", "void projectsFound( String key ) {\n developer.projects = new ArrayList<>();\n }", "@Query(\"select upm from UserProjectMapping upm join fetch upm.user where upm.project = ?1\")\n List<UserProjectMapping> findAllByProject(Project project);", "public abstract KenaiProject getKenaiProject(String url, String projectName) throws IOException;", "Project findProjectByIdAndConvert(String projectId);", "public IProject [] getProjects(){\n\t\treturn projects;\n\t}", "public RowSet find(Object object) throws DAOException {\r\n\t\t\r\n\t\tif (!(object instanceof ProjectInfo))\r\n\t\t\tthrow new DAOException (\"invalid.object.projdao\",\r\n\t\t\t\t\tnull, DAOException.ERROR, true);\r\n\t\t\t\r\n\t\t\r\n\t\tString sqlstmt = DAOConstants.PROJ_FIND_MAIN;\r\n\t\t//ProjectInfo project = (ProjectInfo) object;\r\n\t\tStatementGenerator stmGen = StatementGeneratorFactory.getGenerator().getStmtGenerator(StatementGenProject.class.getSimpleName());\r\n\t\t\r\n\t\tString sqlWhere=null; \r\n\t\ttry {\r\n\t\t\tsqlWhere = stmGen.transformStmt(object, DAOConstants.STMT_TYPE_WHERE ); \r\n\t\t\t\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\r\n\t\tConnection conn = null;\r\n\t\tCachedRowSet crset =null;\r\n\t\t\ttry{\r\n\t\t\t\tlog.debug(\"finding ProjectInfo entry by specified fields\");\r\n\t\t\t\tconn = dbAccess.getConnection();\r\n\t\t\t\t\r\n\t\t\t\tsqlstmt = sqlstmt.replaceFirst(\"@\", sqlWhere);\r\n\r\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(sqlstmt);\r\n\r\n\t\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tcrset = new CachedRowSetImpl();\r\n\t\t\t crset.populate(rs);\r\n\t\t\t\t\r\n\t\t\t stmt.close();\t\t\t\t\r\n\t\t\t\trs.close();\r\n\t\t\t\tlog.debug(\"found ProjectInfo entry by specified fields\");\r\n\t\t\t\treturn crset;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t} catch (DBAccessException e) {\r\n\t\t\t\tthrow new DAOException(e.getMessageKey(), e, DAOException.ERROR,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tSystem.err.println(\"error_sql: \" + e.getMessage());\r\n\t\t\t\tthrow new DAOException(\"sql.findmain.exception.projdao\",\r\n\t\t\t\t\t\te, DAOException.ERROR, true);\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdbAccess.closeConnection(conn);\r\n\t\t\t\t} catch (DBAccessException e1) {\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n \r\n\t}", "public Meeting[] getAllMeetingsForProject(int projectId)\n throws Exception\n {\n Connection connection = null;\n Vector meetings = new Vector();\n \n try\n {\n connection = ConnectionManager.getConnection();\n PreparedStatement pstmt = connection.prepareStatement(\"select id from meetings where project_id=?\", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n pstmt.setInt(1, projectId);\n \n ResultSet rs = pstmt.executeQuery();\n while(rs.next())\n {\n Meeting meeting = getMeeting(rs.getInt(1));//event, rs.getInt(1));\n if(meeting != null)\n meetings.add(meeting);\n }\n \n rs.close();\n pstmt.close();\n }\n catch(SQLException se)\n {\n se.printStackTrace();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n if(connection != null)\n {\n connection.close();\n }\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n return (Meeting[])meetings.toArray(new Meeting[meetings.size()]);\n }", "public static ProjectManager retrieveProjects(String userinfo) throws IOException {\r\n\t\t//ProjectManager to be returned after populating with project.\r\n\t\tProjectManager retrieved = new ProjectManager();\r\n\t\tString projectString = \"\";\r\n\t\tFileReader fr;\r\n\t\tBufferedReader br;\r\n\t\t\r\n\t\tFile file = new File(userinfo+\".txt\");\r\n\t\tfr = new FileReader(file);\r\n\t\tbr = new BufferedReader(fr);\r\n\t\t\r\n\t\t//Attributes of projects.\r\n\t\tString projectname;\r\n\t\tString projecttype;\r\n\t\tint projecthour;\r\n\t\tint projectcost;\r\n\t\tString[] tokens; //Array of project attributes.\r\n\t\t\r\n\t\t//Read file, create project accordingly and add to the project manager.\r\n\t\twhile((projectString = br.readLine()) != null) {\r\n\t\t\ttokens = projectString.split(\",\");\r\n\t\t\tprojectname = tokens[0];\r\n\t\t\tprojectcost = Integer.parseInt(tokens[1]);\r\n\t\t\tprojecthour = Integer.parseInt(tokens[2]);\r\n\t\t\tprojecttype = tokens[3];\r\n\t\t\t\r\n\t\t\t//Create the project with found attribute, add.\r\n\t\t\tProject project = new Project(projecttype, projectname, projectcost, projecthour);\r\n\t\t\tretrieved.addProject(project);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfr.close();\r\n\t\tbr.close();\r\n\t\treturn retrieved;\r\n\t}", "String checkIfProjectExists(String projectKey, String projectName);", "List<Project> getProjectsWithChanges(List<Project> projects);", "@Override\n\t\tprotected List<ProjectModel> doInBackground(Void... params) {\n\t\t\tLog.i(\"LOGGER\", \"Starting...doInBackground loadList\");\n\t\t\tList<ProjectModel> projectsList = searchController.searchIntoXML();\n\t\t\treturn projectsList;\n\t\t}", "public void getProject(){\n\t\n\t String getList[] = clientFacade.GetProjects().split(\"\\n\");\n\t DefaultComboBoxModel addPro = new DefaultComboBoxModel();\n\t\tfor(int i=1; i<getList.length; i+=2) \n\t\t\t addPro.addElement(getList[i]);\n\t\t\t \n\t\tcPro.setModel(addPro);\t\n\t}", "@GetMapping(\"/api/getLatest\")\n\tpublic List<Project> findlatestProject()\n\t{\n\t\treturn this.integrationClient.findlatestProject();\n\t}", "@GetMapping(\"/projects/{projectName:\" + Constants.ENTITY_ID_REGEX + \"}\")\n @Timed\n public ResponseEntity<ProjectDTO> getProject(@PathVariable String projectName)\n throws NotAuthorizedException {\n checkPermission(token, PROJECT_READ);\n log.debug(\"REST request to get Project : {}\", projectName);\n ProjectDTO projectDto = projectService.findOneByName(projectName);\n checkPermissionOnOrganizationAndProject(token, PROJECT_READ,\n projectDto.getOrganization().getName(), projectDto.getProjectName());\n return ResponseEntity.ok(projectDto);\n }", "@GetMapping(value = \"/projectslist\", produces = \"application/json\")\n public ResponseEntity<?> findAllProjectsWithProblemName()\n {\n List<ProblemListGroupedByProject> projectList = projectService.findAllProjectsWithProblemName();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }", "public List<AbstractProject> getProjectList() {\n\t\tList<AbstractProject> projectList = new ArrayList<AbstractProject>();\n\t\tConnection conn = getConnection();\n\t\tPreparedStatement stmtSelect = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tStringBuilder sbSelect = new StringBuilder(SELECT)\n\t\t\t\t.append(projectIdColumnName).append(COMMA)\n\t\t\t\t.append(projectNameColumnName)\n\t\t\t\t.append(FROM).append(projectTableName);\n\n\t\t\tstmtSelect = conn.prepareStatement(sbSelect.toString());\n\t\t\trs = stmtSelect.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) { \n\t\t\t\tAbstractProject project = (AbstractProject) ATElementFactory.createITreeComponent(projectType);\n\t\t\t\tproject.setId(rs.getInt(1));\n\t\t\t\tproject.setName(rs.getString(2));\n\t\t\t\tproject.setDescription(rs.getString(3));\n\t\t\t\tprojectList.add(project);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DAOException(e);\n\t\t\t\n\t\t} finally {\n\t\t\tDbUtils.closeQuietly(conn);\n\t\t\tDbUtils.closeQuietly(stmtSelect);\n\t\t\tDbUtils.closeQuietly(rs);\n\t\t}\n\t\t\n\t\treturn projectList;\n\t}", "@RequestMapping(value = \"/project\", method = RequestMethod.GET)\n\tpublic Response getProjects() {\n\t\tResponse response = new Response();\n\t\ttry {\n\t\t\tList<Project> projects = projectService.getAllProjects();\n\t\t\tif (!projects.isEmpty()) {\n\t\t\t\tresponse.setCode(CustomResponse.SUCCESS.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.SUCCESS.getMessage());\n\t\t\t\tresponse.setData(transformProjectToPojectDto(projects));\n\t\t\t} else {\n\t\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\tlogger.error(\"get all project Failed \", e);\n\t\t}\n\t\treturn response;\n\t}", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public abstract Collection<RepositoryUser> getProjectMembers(KenaiProject kp) throws IOException;", "@GetMapping(\"/api/CompletedByYear/{theYear}\")\n\tpublic List<Project> findprojectcompleted(@PathVariable Integer theYear)\n\t{\n\t\treturn this.integrationClient.findprojectcompleted(theYear);\n\t}", "@Override\n public List<ProjectDTO> findProjectListByUserName(String username) {\n\n List<ProjectEntity> projectEntityList = projectRepository.findByAssignedManager(userMapper.convertToUserEntity(userService.findByUserName(username)));\n\n projectEntityList.forEach(each->{\n each.setCompleteTaskCounts(taskService.totalCompletedTasks(each.getProjectCode()));\n each.setUnfinishedTaskCounts(taskService.totalNonCompleteTasks(each.getProjectCode()));\n });\n\n return projectEntityList.stream().map(projectMapper::convertToProjectDto).collect(Collectors.toList());\n }" ]
[ "0.7498508", "0.6955228", "0.68924046", "0.63574135", "0.6317282", "0.6261402", "0.622945", "0.62212723", "0.6205525", "0.6196978", "0.6192202", "0.616648", "0.6146912", "0.61142075", "0.60872597", "0.60727817", "0.6072163", "0.60690504", "0.60416025", "0.60294724", "0.60255307", "0.60162085", "0.600888", "0.59467554", "0.59141296", "0.59041333", "0.58892554", "0.585194", "0.5848142", "0.58469224", "0.5828716", "0.579605", "0.57902837", "0.5788146", "0.5778258", "0.57767695", "0.5769792", "0.57594573", "0.5750674", "0.57370543", "0.57210916", "0.57113874", "0.57113874", "0.57087415", "0.569149", "0.56735784", "0.5669491", "0.56638104", "0.56491435", "0.5626712", "0.56262255", "0.56129605", "0.55989856", "0.5596431", "0.5586929", "0.55836457", "0.55812454", "0.5575755", "0.55711275", "0.5569261", "0.55516666", "0.55497473", "0.55380046", "0.5535415", "0.5528558", "0.552347", "0.55221826", "0.5516658", "0.5509639", "0.5506125", "0.5491363", "0.5489088", "0.54799044", "0.54792887", "0.54724973", "0.54569614", "0.5451264", "0.5445585", "0.5438028", "0.5437255", "0.5433825", "0.54326326", "0.543241", "0.54249525", "0.5422719", "0.5403639", "0.54034626", "0.5394903", "0.5388053", "0.5382455", "0.53785646", "0.5366532", "0.5357155", "0.5357048", "0.535534", "0.53550845", "0.53519696", "0.5346321", "0.53446215", "0.53436375" ]
0.62805665
5
Searches for the specified field then returns its values
public ArrayList<Value> getAllByFieldID(int fieldID) throws DatabaseException { PreparedStatement stmt = null; ResultSet rs = null; ArrayList<Value> valueList = new ArrayList<Value>(); try { String sql = "SELECT * FROM \"values\" WHERE fieldID = " + Integer.toString(fieldID); stmt = db.getConnection().prepareStatement(sql); rs = stmt.executeQuery(); while(rs.next()) { Value value = new Value(); value.setValueID(rs.getInt(1)); value.setRecordID(rs.getInt(2)); value.setFieldID(rs.getInt(3)); value.setBatchID(rs.getInt(4)); value.setProjectID(rs.getInt(5)); value.setData(rs.getString(6)); valueList.add(value); } } catch(SQLException e) { throw new DatabaseException(); } return valueList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OpenERPRecord search(String fieldname, Object search) {\r\n\t\t// no finds if nothing is to be found\r\n\t\tif (fieldname == null)\r\n\t\t\treturn null;\r\n\r\n\t\t// do this with all records\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord r = i.next();\r\n\r\n\t\t\t// if there is a fieldname\r\n\t\t\tif (r.containsKey(fieldname)) {\r\n\r\n\t\t\t\tObject value = r.get(fieldname);\r\n\t\t\t\t// is there corresponding content\r\n\t\t\t\t// null value would not have .equals, so compare directly\r\n\t\t\t\tif (value == null) {\r\n\t\t\t\t\tif (search == null)\r\n\t\t\t\t\t\treturn r;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (value.equals(search))\r\n\t\t\t\t\t\treturn r;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// no corresponding value found?\r\n\t\treturn null;\r\n\t}", "public List<AddressEntry> searchBy(SearchBy field, String value) {\n \n switch (field) {\n case NAME:\n return searchByName(value);\n case POSTAL_ADDRESS:\n return searchByPostalAddress(value);\n case EMAIL:\n return searchByEmail(value);\n case NOTE:\n return searchByNote(value);\n case PHONE_NUMBER:\n return searchByPhoneNumber(value);\n default:\n return null;\n }\n }", "abstract public String getValue(String fieldname);", "java.lang.String getSearchValue();", "public List<String> getFieldVector (String field, KrillCollection collection) {\n collection.setIndex(this);\n \n List fieldValues = new ArrayList<String>();\n String fieldValue;\n\n // Do not return fieldValues for token fields\n if (field.equals(\"tokens\") || field.equals(\"base\")) {\n return fieldValues;\n };\n\n \n try {\n final Filter filter = collection.toFilter();\n\n // Get from filtered index\n if (filter != null) {\n \n // Iterate over all atomic readers and collect occurrences\n for (LeafReaderContext atomic : this.reader().leaves()) {\n\n LeafReader lreader = atomic.reader();\n\n DocIdSet docids = filter.getDocIdSet(atomic, null);\n \n DocIdSetIterator docs = (docids == null) ? null : docids.iterator();\n\n if (docs == null)\n continue;\n \n while (docs.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {\n fieldValue = lreader.document(docs.docID()).get(field);\n if (fieldValue != null && fieldValue != \"\")\n fieldValues.add(fieldValue);\n };\n \n }\n } else { // Get from unfiltered index\n\n // Iterate over all atomic readers and collect occurrences\n for (LeafReaderContext atomic : this.reader().leaves()) {\n\n LeafReader lreader = atomic.reader();\n Bits live = lreader.getLiveDocs();\n\n for (int i=0; i<lreader.maxDoc(); i++) {\n if (live != null && !live.get(i))\n continue;\n \n Document doc = lreader.document(i);\n fieldValue = doc.get(field);\n if (fieldValue != null && fieldValue != \"\")\n fieldValues.add(fieldValue);\n };\n };\n };\n }\n\n // Something went wrong\n catch (IOException e) {\n log.warn(e.getLocalizedMessage());\n\t\t}\n\n // E.g. reference corpus not found\n catch (QueryException e) {\n log.warn(e.getLocalizedMessage());\n };\n\n return fieldValues;\n }", "private static String[] getColumnValue(ServiceFieldTableRestRep table, ServiceFieldRestRep field) {\n List<String> values = Lists.newArrayList();\n Pattern pattern = Pattern.compile(table.getName() + \"\\\\[(\\\\d+)\\\\].\" + field.getName());\n for (String name : params.data.keySet()) {\n Matcher match = pattern.matcher(name);\n if (match.matches()) {\n int index = Integer.valueOf(match.group(1));\n for (int i = values.size(); i <= index; i++) {\n values.add(null);\n }\n values.set(index, params.get(name));\n }\n }\n return values.toArray(new String[values.size()]);\n }", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return kd_kelas;\n case 1: return hari_ke;\n case 2: return jam_mulai;\n case 3: return jam_selesai;\n case 4: return tgl_mulai_otomatis_buat_jadwal;\n case 5: return tgl_berakhir_otomatis_buat_jadwal;\n case 6: return aktif;\n case 7: return kd_mk;\n case 8: return nama_mk;\n case 9: return nama_kelas;\n case 10: return nama_hari;\n case 11: return ts_update;\n case 12: return kd_org;\n case 13: return thn;\n case 14: return term;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public List<Document> SearchField(String queryStr ,String fieldName)\r\n\t{\r\n\t\treturn null;\r\n\t}", "io.dstore.values.StringValue getSearchValue();", "public String getField(String field) throws RemoteException;", "public FieldInfBase getResultField()\n {\n return getEntity().getFields()\n .stream()\n .filter(f -> f.getName().equalsIgnoreCase(result))\n .findAny().orElse(null);\n }", "@And(\"^I searched for \\\"([^\\\"]*)\\\"$\")\t\t\t//Currently used by Order search & Passive Device Container \r\n\tpublic void i_searched_for_device(String field) throws Exception {\r\n\t\tSystem.out.println(field);\r\n\t\tenduser.fill_fields(field);\r\n\t\t//enduser.click_searchBtn();\t \r\n\t}", "public List<Document> SearchField(String queryStr ,List<String> fieldName)\r\n\t{\r\n\t\treturn null;\r\n\t}", "@Query(\"customField = ?\")\n List<PersonDocument> findByCustomField(String value);", "@Test\n public void testSearchField(){\n Field field = FieldSets.createFieldWithTranslations(contextServiceClient);\n\n List<Field> list = FieldSets.searchField(contextServiceClient, \"\");\n\n assertEquals(1, list.size());\n assertEquals( FIELD_ONE, list.get(0).getId());\n }", "public Vector<Object> getFieldContents(String fieldname, boolean ignoreNull) {\r\n\t\t// do nothing if nothing is requested\r\n\t\tif (fieldname == null)\r\n\t\t\treturn null;\r\n\r\n\t\tVector<Object> results = new Vector<Object>();\r\n\r\n\t\t// do this with all records\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord r = i.next();\r\n\r\n\t\t\t// if there is a fieldname\r\n\t\t\tif (r.containsKey(fieldname)) {\r\n\t\t\t\tObject value = r.get(fieldname);\r\n\t\t\t\tif ((value != null) || (!(ignoreNull)))\r\n\t\t\t\t\tresults.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}", "@Nullable\n\tObject getFieldValue(String field);", "@SuppressWarnings(\"unused\")\n\t\tprivate String querySingleValue(String query, String field){\n\t\t\treturn field;\n\n\t\t/*\tJdbcTemplate jdt = new JdbcTemplate(getDataSource());\n\t \tList queryList;\n\t \tString result = \"\";\n\n\t \t queryList = jdt.queryForList(query);\n\t \t Iterator i = queryList.iterator();\n\t \t i = queryList.iterator();\n\t \t if (i.hasNext()) {\n\t\t\t\t ListOrderedMap data = (ListOrderedMap) i.next();\n\t\t\t\t if (data.get(field) == null){\n\t\t\t\t } else {\n\t\t\t\t\t result = data.get(field).toString();\n\t\t\t\t }\n\t \t }\n\t \t return result;*/\n\t\t}", "public ArrayList<String[]> searchField(String phone)\n\t{\n\t\tArrayList<Customer> customers = CustomerContainer.getInstance().getCustomers();\t\n\t\tArrayList<String[]> data = new ArrayList<>();\n\t\tif (customers == null)\n\t\t{\n\t\t\treturn data;\n\t\t}\n\t\tfor (Customer customer : customers)\n\t\t{\n\t\t\tif (Integer.toString(customer.getPhone()).contains(phone))\n\t\t\t{\n\t\t\t\tdata.add(customer.tableFill());\n\t\t\t}\n\t\t}\n\t\treturn data;\n\t}", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return name;\n case 1: return lastName;\n case 2: return country;\n case 3: return state;\n case 4: return gender;\n case 5: return date;\n case 6: return height;\n case 7: return weight;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public List<String> get_field_from_table(String table, String field, String order);", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return author;\n case 1: return content;\n case 2: return timestamp;\n case 3: return location;\n case 4: return tags;\n case 5: return mentions;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "VarRef lookupField(String fieldUse);", "private List<String> getFieldValuesOfResource(String resourceId, String fieldName)\n\t\t\tthrows IOException, TemplateException {\n\t\tTemplateBuilder builder = template(\"thingsByResourceIdAndFieldName.sparql\").addParam(\"resourceId\", resourceId)\n\t\t\t\t.addParam(\"fieldName\", fieldName);\n\n\t\tFusekiResponse fr = getQueryEngine().fusekiResponse(builder.build());\n\n\t\tList<String> values = new ArrayList<>();\n\t\tfor (Statement statement : fr.results.bindings) {\n\t\t\tvalues.add(statement.getObject().getValue());\n\t\t}\n\t\treturn values;\n\t}", "public String getFieldText(String fieldName);", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return site;\n case 1: return service;\n case 2: return sector;\n case 3: return room;\n case 4: return alias;\n case 5: return serialPort;\n case 6: return driver;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public Vector<Object> getFieldContents(String fieldname) {\r\n\t\treturn getFieldContents(fieldname, false);\r\n\t}", "@Override\n\tpublic String find(Set<String> filterField) {\n\t\treturn null;\n\t}", "List<DataTerm> search(String searchTerm);", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return id;\n case 1: return username;\n case 2: return email_address;\n case 3: return phone_number;\n case 4: return first_name;\n case 5: return last_name;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return businessDocumentId;\n case 1: return containingParentId;\n case 2: return containingParentType;\n case 3: return containingParentLevel;\n case 4: return controlNumber;\n case 5: return controlNumberLevel1;\n case 6: return controlNumberLevel2;\n case 7: return contentKeys;\n case 8: return documentId;\n case 9: return documentStandard;\n case 10: return documentStandardVersion;\n case 11: return documentType;\n case 12: return envelopeVersion;\n case 13: return eventId;\n case 14: return eventTimestamp;\n case 15: return fileInfo;\n case 16: return introspectionSource;\n case 17: return introspectionType;\n case 18: return processId;\n case 19: return receiverAddress;\n case 20: return senderAddress;\n case 21: return sentDate;\n case 22: return sentTime;\n case 23: return taskId;\n case 24: return transactionId;\n case 25: return senderAddressEnvelopeLevel1;\n case 26: return receiverAddressEnvelopeLevel1;\n case 27: return functionalCodeEnvelopeLevel1;\n case 28: return senderAddressEnvelopeLevel2;\n case 29: return receiverAddressEnvelopeLevel2;\n case 30: return functionalCodeEnvelopeLevel2;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "@GetMapping(\"/search\")\n public ResponseEntity searchField(@RequestParam(\"type\") String type,@RequestParam(\"value\")String value){\n return new ResponseEntity<>(hr_service.findByField(type,value),HttpStatus.OK);\n }", "public List<?> queryBySingleCriteria(String field, String value)\n throws DataAccessLayerException {\n return queryBySingleCriteria(field, value, \"=\");\n }", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return uid;\n case 1: return originh;\n case 2: return originp;\n case 3: return resph;\n case 4: return respp;\n case 5: return proto;\n case 6: return port;\n case 7: return ts;\n case 8: return query;\n case 9: return qclass;\n case 10: return qclassname;\n case 11: return qtype;\n case 12: return qtypename;\n case 13: return rcode;\n case 14: return rcodename;\n case 15: return Z;\n case 16: return OR;\n case 17: return AA;\n case 18: return TC;\n case 19: return rejected;\n case 20: return Answers;\n case 21: return TLLs;\n default: throw new IndexOutOfBoundsException(\"Invalid index: \" + field$);\n }\n }", "Data<User> getUserSearch(String user, String fields);", "private static Object getFieldValue(ETApiObject row, String fieldName) {\n try {\n Method method = row.getClass().getMethod(createGetterName(fieldName));\n return method.invoke(row);\n } catch (Exception e) {\n LOG.error(String.format(\"Error while fetching %s.%s value\", row.getClass().getSimpleName(), fieldName), e);\n return null;\n }\n }", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return specificDiseaseTitle;\n case 1: return panelVersion;\n case 2: return ensemblVersion;\n case 3: return dataModelCatalogueVersion;\n case 4: return geneIds;\n case 5: return Transcripts;\n case 6: return relevantRegions;\n case 7: return clinicalRelevantVariants;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "io.dstore.values.StringValueOrBuilder getSearchValueOrBuilder();", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RESULT\n \treturn RESULT;\n case 2: // SELLER_LIST\n \treturn SELLER_LIST;\n case 3: // PAGINATION\n \treturn PAGINATION;\n default:\n \treturn null;\n }\n }", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return id;\n case 1: return name;\n case 2: return sampleId;\n case 3: return variantSetIds;\n case 4: return created;\n case 5: return updated;\n case 6: return info;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public String get_another_field(String table, String source_field, String source_value, String destination_field);", "String getField();", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return shipmentId;\n case 1: return address;\n case 2: return shippingServiceOption;\n case 3: return trackingDetails;\n case 4: return recipientName;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "java.lang.String getField1001();", "java.lang.String getField1012();", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return allowedByRobotsTXT;\n case 1: return Operation;\n case 2: return URL;\n case 3: return Exception;\n case 4: return ResponseType;\n case 5: return ResponseCode;\n case 6: return ResponseServer;\n case 7: return ResponseLink;\n case 8: return Content;\n case 9: return SPARQLDESCpreds;\n case 10: return voiDpreds;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public String get(String fieldName) {\n\t\tString xpQuery = getXPathQuery(fieldName);\n\t\treturn getFieldUsingXPath(xpQuery);\n\t}", "public int indexOf(String field) {\n return index.get(field);\n }", "public void getByPropertyemployee(String textToFind){\n\t\t// ejemplo buscar por propiedad direccion\n\t\tEmployeeResult employeeResult = getJerseyClient().resource(getBaseUrl() + \"/employee/search/\"+textToFind).get(EmployeeResult.class);\n\t\tfor (EmployeeDTO c : employeeResult.getEmployees()) {\n\t\t\tSystem.out.println(\"Nombre: \"+c.getName());\n\t\t\tSystem.out.println(\"Apellido: \"+c.getSurname());\n\t\t\tSystem.out.println(\"Direccion: \"+c.getAddress());\n\t\t\tSystem.out.println(\"RUC: \"+c.getRUC());\n\t\t\tSystem.out.println(\"Telefono: \"+c.getCellphone());\n\t\t}\n\t\t\n\t}", "public Object get(int field$) {\n switch (field$) {\n case 0: return type;\n case 1: return id;\n case 2: return flyer_id;\n case 3: return flyer_item_id;\n case 4: return description;\n case 5: return sale_story;\n case 6: return brand_display_name;\n case 7: return brand_logo_image_url;\n case 8: return item_image_url;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "Field getFields(int index);", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return patternId;\n case 1: return begDate;\n case 2: return endDate;\n case 3: return mondayTimeRanges;\n case 4: return tuesdayTimeRanges;\n case 5: return wednesdayTimeRanges;\n case 6: return thursdayTimeRanges;\n case 7: return fridayTimeRanges;\n case 8: return saturdayTimeRanges;\n case 9: return sundayTimeRanges;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "java.lang.String getField1019();", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return rideid;\n case 1: return userid;\n case 2: return driverid;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "java.lang.String getField1017();", "@Override\n public String getField(String fieldName) {\n // TODO Auto-generated method stub\n\n if (fieldName.equalsIgnoreCase(\"todate\"))\n return todate;\n if (fieldName.equalsIgnoreCase(\"fromdate\"))\n return fromdate;\n\n if (fieldName.equalsIgnoreCase(\"productType\")) {\n return productType;\n }\n\n else if (fieldName.equalsIgnoreCase(\"bno\")) {\n return bno.toString();\n } else if (fieldName.equalsIgnoreCase(\"bnodeg1\")) {\n return bnodeg1.toString();\n } else if (fieldName.equalsIgnoreCase(\"bnodeg2\")) {\n return bnodeg2.toString();\n } else if (fieldName.equalsIgnoreCase(\"bnodeg3\")) {\n return bnodeg3.toString();\n } else if (fieldName.equalsIgnoreCase(\"bnodeg4\")) {\n return bnodeg4.toString();\n } else if (fieldName.equalsIgnoreCase(\"wnodeg1\")) {\n return wnodeg1.toString();\n } else if (fieldName.equalsIgnoreCase(\"wnodeg2\")) {\n return wnodeg2.toString();\n } else if (fieldName.equalsIgnoreCase(\"wnodeg3\")) {\n return wnodeg3.toString();\n } else if (fieldName.equalsIgnoreCase(\"wnodeg4\")) {\n return wnodeg4.toString();\n }\n\n else if (fieldName.equalsIgnoreCase(\"wno\")) {\n return wno.toString();\n }\n\n else if (fieldName.equalsIgnoreCase(\"machine\")) {\n return machine;\n\n }\n\n else if (fieldName.equalsIgnoreCase(\"qualitydegree\")) {\n return qualitydegree;\n\n } else\n\n return null;\n }", "public String fetchSingleField(String query, String field)\n\t{\n\t\tCursor tempCursor;\n\t\tObject tempCrsr;\n\t\tint numRecs;\n\t\ttry {\n\t\ttempCrsr = dbh.exec(query);\n\t\ttempCursor = (Cursor) tempCrsr;\n\t\tnumRecs = tempCursor.getCount();\n\t\ttempCursor.moveToFirst();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tToast.makeText(this, \"SQL error\", Toast.LENGTH_SHORT).show();\n\t\t\treturn null;\n\t\t}\n\n\t\tif (numRecs > 0)\n\t\t{\n\t\t\tString fieldValue = dbh.getStr(field);\n\t\t\ttempCursor.close();\n\t\t\treturn fieldValue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttempCursor.close();\n\t\t\t// Return empty string instead of null for crash safety.\n\t\t\treturn \"\";\n\t\t}\n\t}", "private Query getFieldQueryImpl(String field, String queryText, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws ParseException\n {\n\n if (luceneFunction != LuceneFunction.FIELD)\n {\n throw new UnsupportedOperationException(\"Field queries are not supported on lucene functions (UPPER, LOWER, etc)\");\n }\n\n boolean requiresMLTokenDuplication = false;\n String testText = queryText;\n String localeString = null;\n if (field.startsWith(PROPERTY_FIELD_PREFIX))\n {\n if ((queryText.length() > 0) && (queryText.charAt(0) == '\\u0000'))\n {\n int position = queryText.indexOf(\"\\u0000\", 1);\n testText = queryText.substring(position + 1);\n requiresMLTokenDuplication = true;\n localeString = queryText.substring(1, position);\n }\n }\n\n TokenStream source = getAnalyzer().tokenStream(field, new StringReader(queryText), analysisMode);\n\n ArrayList<org.apache.lucene.analysis.Token> list = new ArrayList<org.apache.lucene.analysis.Token>();\n org.apache.lucene.analysis.Token reusableToken = new org.apache.lucene.analysis.Token();\n org.apache.lucene.analysis.Token nextToken;\n int positionCount = 0;\n boolean severalTokensAtSamePosition = false;\n\n while (true)\n {\n try\n {\n nextToken = source.next(reusableToken);\n }\n catch (IOException e)\n {\n nextToken = null;\n }\n if (nextToken == null)\n break;\n list.add((org.apache.lucene.analysis.Token) nextToken.clone());\n if (nextToken.getPositionIncrement() != 0)\n positionCount += nextToken.getPositionIncrement();\n else\n severalTokensAtSamePosition = true;\n }\n try\n {\n source.close();\n }\n catch (IOException e)\n {\n // ignore\n }\n\n // add any alpha numeric wildcards that have been missed\n // Fixes most stop word and wild card issues\n\n for (int index = 0; index < testText.length(); index++)\n {\n char current = testText.charAt(index);\n if ((current == '*') || (current == '?'))\n {\n StringBuilder pre = new StringBuilder(10);\n if (index > 0)\n {\n for (int i = index - 1; i >= 0; i--)\n {\n char c = testText.charAt(i);\n if (Character.isLetterOrDigit(c))\n {\n boolean found = false;\n for (int j = 0; j < list.size(); j++)\n {\n org.apache.lucene.analysis.Token test = list.get(j);\n if ((test.startOffset() <= i) && (i <= test.endOffset()))\n {\n found = true;\n break;\n }\n }\n if (found)\n {\n break;\n }\n else\n {\n pre.insert(0, c);\n }\n }\n }\n if (pre.length() > 0)\n {\n // Add new token followed by * not given by the tokeniser\n org.apache.lucene.analysis.Token newToken = new org.apache.lucene.analysis.Token(index - pre.length(), index);\n newToken.setTermBuffer(pre.toString());\n newToken.setType(\"ALPHANUM\");\n if (requiresMLTokenDuplication)\n {\n Locale locale = I18NUtil.parseLocale(localeString);\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters\n .getMlAnalaysisMode();\n MLTokenDuplicator duplicator = new MLTokenDuplicator(locale, mlAnalysisMode);\n Iterator<org.apache.lucene.analysis.Token> it = duplicator.buildIterator(newToken);\n if (it != null)\n {\n int count = 0;\n while (it.hasNext())\n {\n list.add(it.next());\n count++;\n if (count > 1)\n {\n severalTokensAtSamePosition = true;\n }\n }\n }\n }\n // content\n else\n {\n list.add(newToken);\n }\n }\n }\n\n StringBuilder post = new StringBuilder(10);\n if (index > 0)\n {\n for (int i = index + 1; i < testText.length(); i++)\n {\n char c = testText.charAt(i);\n if (Character.isLetterOrDigit(c))\n {\n boolean found = false;\n for (int j = 0; j < list.size(); j++)\n {\n org.apache.lucene.analysis.Token test = list.get(j);\n if ((test.startOffset() <= i) && (i <= test.endOffset()))\n {\n found = true;\n break;\n }\n }\n if (found)\n {\n break;\n }\n else\n {\n post.append(c);\n }\n }\n }\n if (post.length() > 0)\n {\n // Add new token followed by * not given by the tokeniser\n org.apache.lucene.analysis.Token newToken = new org.apache.lucene.analysis.Token(index + 1, index + 1 + post.length());\n newToken.setTermBuffer(post.toString());\n newToken.setType(\"ALPHANUM\");\n if (requiresMLTokenDuplication)\n {\n Locale locale = I18NUtil.parseLocale(localeString);\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters\n .getMlAnalaysisMode();\n MLTokenDuplicator duplicator = new MLTokenDuplicator(locale, mlAnalysisMode);\n Iterator<org.apache.lucene.analysis.Token> it = duplicator.buildIterator(newToken);\n if (it != null)\n {\n int count = 0;\n while (it.hasNext())\n {\n list.add(it.next());\n count++;\n if (count > 1)\n {\n severalTokensAtSamePosition = true;\n }\n }\n }\n }\n // content\n else\n {\n list.add(newToken);\n }\n }\n }\n\n }\n }\n\n Collections.sort(list, new Comparator<org.apache.lucene.analysis.Token>()\n {\n\n public int compare(Token o1, Token o2)\n {\n int dif = o1.startOffset() - o2.startOffset();\n if (dif != 0)\n {\n return dif;\n }\n else\n {\n return o2.getPositionIncrement() - o1.getPositionIncrement();\n }\n }\n });\n\n // Combined * and ? based strings - should redo the tokeniser\n\n // Assume we only string together tokens for the same position\n\n int max = 0;\n int current = 0;\n for (org.apache.lucene.analysis.Token c : list)\n {\n if (c.getPositionIncrement() == 0)\n {\n current++;\n }\n else\n {\n if (current > max)\n {\n max = current;\n }\n current = 0;\n }\n }\n if (current > max)\n {\n max = current;\n }\n\n ArrayList<org.apache.lucene.analysis.Token> fixed = new ArrayList<org.apache.lucene.analysis.Token>();\n for (int repeat = 0; repeat <= max; repeat++)\n {\n org.apache.lucene.analysis.Token replace = null;\n current = 0;\n for (org.apache.lucene.analysis.Token c : list)\n {\n if (c.getPositionIncrement() == 0)\n {\n current++;\n }\n else\n {\n current = 0;\n }\n\n if (current == repeat)\n {\n\n if (replace == null)\n {\n StringBuilder prefix = new StringBuilder();\n for (int i = c.startOffset() - 1; i >= 0; i--)\n {\n char test = testText.charAt(i);\n if ((test == '*') || (test == '?'))\n {\n prefix.insert(0, test);\n }\n else\n {\n break;\n }\n }\n String pre = prefix.toString();\n if (requiresMLTokenDuplication)\n {\n String termText = new String(c.termBuffer(), 0, c.termLength());\n int position = termText.indexOf(\"}\");\n String language = termText.substring(0, position + 1);\n String token = termText.substring(position + 1);\n replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset());\n replace.setTermBuffer(language + pre + token);\n replace.setType(c.type());\n replace.setPositionIncrement(c.getPositionIncrement());\n }\n else\n {\n String termText = new String(c.termBuffer(), 0, c.termLength());\n replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset());\n replace.setTermBuffer(pre + termText);\n replace.setType(c.type());\n replace.setPositionIncrement(c.getPositionIncrement());\n }\n }\n else\n {\n StringBuilder prefix = new StringBuilder();\n StringBuilder postfix = new StringBuilder();\n StringBuilder builder = prefix;\n for (int i = c.startOffset() - 1; i >= replace.endOffset(); i--)\n {\n char test = testText.charAt(i);\n if ((test == '*') || (test == '?'))\n {\n builder.insert(0, test);\n }\n else\n {\n builder = postfix;\n postfix.setLength(0);\n }\n }\n String pre = prefix.toString();\n String post = postfix.toString();\n\n // Does it bridge?\n if ((pre.length() > 0) && (replace.endOffset() + pre.length()) == c.startOffset())\n {\n String termText = new String(c.termBuffer(), 0, c.termLength());\n if (requiresMLTokenDuplication)\n {\n int position = termText.indexOf(\"}\");\n @SuppressWarnings(\"unused\")\n String language = termText.substring(0, position + 1);\n String token = termText.substring(position + 1);\n int oldPositionIncrement = replace.getPositionIncrement();\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n replace = new org.apache.lucene.analysis.Token(replace.startOffset(), c.endOffset());\n replace.setTermBuffer(replaceTermText + pre + token);\n replace.setType(replace.type());\n replace.setPositionIncrement(oldPositionIncrement);\n }\n else\n {\n int oldPositionIncrement = replace.getPositionIncrement();\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n replace = new org.apache.lucene.analysis.Token(replace.startOffset(), c.endOffset());\n replace.setTermBuffer(replaceTermText + pre + termText);\n replace.setType(replace.type());\n replace.setPositionIncrement(oldPositionIncrement);\n }\n }\n else\n {\n String termText = new String(c.termBuffer(), 0, c.termLength());\n if (requiresMLTokenDuplication)\n {\n int position = termText.indexOf(\"}\");\n String language = termText.substring(0, position + 1);\n String token = termText.substring(position + 1);\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n org.apache.lucene.analysis.Token last = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length());\n last.setTermBuffer(replaceTermText + post);\n last.setType(replace.type());\n last.setPositionIncrement(replace.getPositionIncrement());\n fixed.add(last);\n replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset());\n replace.setTermBuffer(language + pre + token);\n replace.setType(c.type());\n replace.setPositionIncrement(c.getPositionIncrement());\n }\n else\n {\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n org.apache.lucene.analysis.Token last = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length());\n last.setTermBuffer(replaceTermText + post);\n last.setType(replace.type());\n last.setPositionIncrement(replace.getPositionIncrement());\n fixed.add(last);\n replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset());\n replace.setTermBuffer(pre + termText);\n replace.setType(c.type());\n replace.setPositionIncrement(c.getPositionIncrement());\n }\n }\n }\n }\n }\n // finish last\n if (replace != null)\n {\n StringBuilder postfix = new StringBuilder();\n if ((replace.endOffset() >= 0) && (replace.endOffset() < testText.length()))\n {\n for (int i = replace.endOffset(); i < testText.length(); i++)\n {\n char test = testText.charAt(i);\n if ((test == '*') || (test == '?'))\n {\n postfix.append(test);\n }\n else\n {\n break;\n }\n }\n }\n String post = postfix.toString();\n int oldPositionIncrement = replace.getPositionIncrement();\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n replace = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length());\n replace.setTermBuffer(replaceTermText + post);\n replace.setType(replace.type());\n replace.setPositionIncrement(oldPositionIncrement);\n fixed.add(replace);\n\n }\n }\n\n // Add in any missing words containsing * and ?\n\n // reorder by start position and increment\n\n Collections.sort(fixed, new Comparator<org.apache.lucene.analysis.Token>()\n {\n\n public int compare(Token o1, Token o2)\n {\n int dif = o1.startOffset() - o2.startOffset();\n if (dif != 0)\n {\n return dif;\n }\n else\n {\n return o2.getPositionIncrement() - o1.getPositionIncrement();\n }\n }\n });\n\n list = fixed;\n\n if (list.size() == 0)\n return null;\n else if (list.size() == 1)\n {\n nextToken = (org.apache.lucene.analysis.Token) list.get(0);\n String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength());\n if (termText.contains(\"*\") || termText.contains(\"?\"))\n {\n return newWildcardQuery(new Term(field, termText));\n }\n else\n {\n return newTermQuery(new Term(field, termText));\n }\n }\n else\n {\n if (severalTokensAtSamePosition)\n {\n if (positionCount == 1)\n {\n // no phrase query:\n BooleanQuery q = newBooleanQuery(true);\n for (int i = 0; i < list.size(); i++)\n {\n Query currentQuery;\n nextToken = (org.apache.lucene.analysis.Token) list.get(i);\n String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength());\n if (termText.contains(\"*\") || termText.contains(\"?\"))\n {\n currentQuery = newWildcardQuery(new Term(field, termText));\n }\n else\n {\n currentQuery = newTermQuery(new Term(field, termText));\n }\n q.add(currentQuery, BooleanClause.Occur.SHOULD);\n }\n return q;\n }\n else\n {\n // phrase query:\n MultiPhraseQuery mpq = newMultiPhraseQuery();\n mpq.setSlop(internalSlop);\n ArrayList<Term> multiTerms = new ArrayList<Term>();\n int position = -1;\n for (int i = 0; i < list.size(); i++)\n {\n nextToken = (org.apache.lucene.analysis.Token) list.get(i);\n String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength());\n if (nextToken.getPositionIncrement() > 0 && multiTerms.size() > 0)\n {\n if (getEnablePositionIncrements())\n {\n mpq.add((Term[]) multiTerms.toArray(new Term[0]), position);\n }\n else\n {\n mpq.add((Term[]) multiTerms.toArray(new Term[0]));\n }\n multiTerms.clear();\n }\n position += nextToken.getPositionIncrement();\n\n Term term = new Term(field, termText);\n if ((termText != null) && (termText.contains(\"*\") || termText.contains(\"?\")))\n {\n addWildcardTerms(multiTerms, term);\n }\n else\n {\n multiTerms.add(term);\n }\n }\n if (getEnablePositionIncrements())\n {\n if (multiTerms.size() > 0)\n {\n mpq.add((Term[]) multiTerms.toArray(new Term[0]), position);\n }\n else\n {\n mpq.add(new Term[] { new Term(field, \"\\u0000\") }, position);\n }\n }\n else\n {\n if (multiTerms.size() > 0)\n {\n mpq.add((Term[]) multiTerms.toArray(new Term[0]));\n }\n else\n {\n mpq.add(new Term[] { new Term(field, \"\\u0000\") });\n }\n }\n return mpq;\n }\n }\n else\n {\n MultiPhraseQuery q = new MultiPhraseQuery();\n q.setSlop(internalSlop);\n int position = -1;\n for (int i = 0; i < list.size(); i++)\n {\n nextToken = (org.apache.lucene.analysis.Token) list.get(i);\n String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength());\n Term term = new Term(field, termText);\n if (getEnablePositionIncrements())\n {\n position += nextToken.getPositionIncrement();\n if ((termText != null) && (termText.contains(\"*\") || termText.contains(\"?\")))\n {\n q.add(getMatchingTerms(field, term), position);\n }\n else\n {\n q.add(new Term[] { term }, position);\n }\n }\n else\n {\n if ((termText != null) && (termText.contains(\"*\") || termText.contains(\"?\")))\n {\n q.add(getMatchingTerms(field, term));\n }\n else\n {\n q.add(term);\n }\n }\n }\n return q;\n }\n }\n }", "public List<RubricaFieldDTO> addressBookGetSearchField() throws ApiException {\n ApiResponse<List<RubricaFieldDTO>> resp = addressBookGetSearchFieldWithHttpInfo();\n return resp.getData();\n }", "private FieldIdItem parseAndResolveField(ClassPath.ClassDef classDef, String field) {\n String[] parts = field.split(\":\");\n if (parts.length != 2) {\n throw new RuntimeException(\"Invalid field descriptor \" + field);\n }\n \n String fieldName = parts[0];\n String fieldType = parts[1];\n \n StringIdItem fieldNameItem = StringIdItem.lookupStringIdItem(dexFile, fieldName);\n if (fieldNameItem == null) {\n return null;\n }\n \n TypeIdItem fieldTypeItem = TypeIdItem.lookupTypeIdItem(dexFile, fieldType);\n if (fieldTypeItem == null) {\n return null;\n }\n \n ClassPath.ClassDef fieldClass = classDef;\n \n do {\n TypeIdItem classTypeItem = TypeIdItem.lookupTypeIdItem(dexFile, fieldClass.getClassType());\n if (classTypeItem == null) {\n continue;\n }\n \n FieldIdItem fieldIdItem = FieldIdItem.lookupFieldIdItem(dexFile, classTypeItem, fieldTypeItem, fieldNameItem);\n if (fieldIdItem != null) {\n return fieldIdItem;\n }\n \n fieldClass = fieldClass.getSuperclass();\n } while (fieldClass != null);\n \n return null;\n }", "java.lang.String getField1337();", "private Object getValueByGetMethodCall(Entity entity, String fieldName, Class<?> fieldType) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException{\n\t\treturn getValueByGetMethodCall(entity, fieldName, fieldType, NO_PARAMS);\n\t}", "java.lang.String getField1013();", "@In String search();", "java.lang.String getField1333();", "public String getFieldText(String fieldName, int index);", "@Test\n public void testFullTextSearch_on_a_field() {\n ReadResponse resp = factual.fetch(TABLE,\n new Query().field(\"name\").search(\"Fried Chicken\"));\n\n for (String name : resp.mapStrings(\"name\")) {\n assertTrue(name.toLowerCase().contains(\"frie\")\n || name.toLowerCase().contains(\"fry\")\n || name.toLowerCase().contains(\"chicken\"));\n }\n }", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return id;\n case 1: return relatedIMEventOriginalID;\n case 2: return userID;\n case 3: return occurredMillis;\n case 4: return validFromMillis;\n case 5: return validToMillis;\n case 6: return role;\n case 7: return fullPriceTableRef;\n case 8: return relatedIMEventMsg;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public List<User> searchUser(String searchValue);", "public static JSONArray searchPlayground(String searchField)\n\t\t\tthrows SocketTimeoutException, JSONException {\n\n\t\t// Get JSON array from the server\n\t\tJSONArray getResult = null;\n\t\tgetResult = new JSONArray(Communicator.sendPost(\"?m=Index&a=search\",\n\t\t\t\t\"&searchName=\" + searchField));\n\t\treturn getResult;\n\t}", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return id;\n case 1: return localId;\n case 2: return serviceId;\n case 3: return args;\n case 4: return inputs;\n case 5: return outputs;\n case 6: return timestamp;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public Map<String, Object> getWgzdList(String field, String search) {\n return null;\n }", "java.lang.String getField1339();", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return defaultLong1;\n case 1: return defaultStringEmpty;\n case 2: return columnLong;\n case 3: return unionRecursive;\n case 4: return unionString;\n case 5: return unionLong;\n case 6: return unionDefNull;\n case 7: return family2;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "java.lang.String getField1291();", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return req_custid;\n case 1: return req_message;\n case 2: return req_json;\n case 3: return req_remote_addr;\n case 4: return req_uri;\n case 5: return req_headers;\n case 6: return req_method;\n case 7: return result_json;\n case 8: return result_post;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "java.lang.String getField1018();", "java.lang.String getField1111();", "java.lang.String getField1015();", "java.lang.String getField1099();", "java.lang.String getField1033();", "@Override\r\n\tpublic List<String> listSearchableFields() {\r\n\t\tList<String> listSearchableFields = new ArrayList<String>();\r\n\t\tlistSearchableFields.addAll(super.listSearchableFields());\r\n\r\n\t\tlistSearchableFields.add(\"employeeNumber\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.primaryPhone\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.secondaryPhone\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.streetAddress\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.city\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.zip\");\r\n\r\n\t\treturn listSearchableFields;\r\n\t}", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return kullaniciTur_id;\n case 1: return kullanici_adi;\n case 2: return kullanici_id;\n case 3: return kullanici_soyadi;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 2: // KEY\n return KEY;\n case 3: // VALUE\n return VALUE;\n default:\n return null;\n }\n }", "public String getTextFromField(String fieldLabel){\n reporter.info(\"Get text from field \"+fieldLabel);\n return getElementText(LOCATORS.getBy(COMPONENT_NAME,\"FIELD_INPUT_BY_NAME\",fieldLabel),SHORT_TIMEOUT);\n }", "java.lang.String getField1021();", "java.lang.String getField1091();", "java.lang.String getField1231();", "java.lang.String getField1233();", "List<String> getLookupValues();", "java.lang.String getField1261();", "java.lang.String getField1223();", "List<MockHolder> selectByField(Field field, List<MockHolder> mocks);", "java.lang.String getField1124();", "java.lang.String getField1133();", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // TITLE\n return TITLE;\n case 4: // SALARY_TOP\n return SALARY_TOP;\n case 5: // SALARY_BOTTOM\n return SALARY_BOTTOM;\n case 6: // PUBLISH_DATE\n return PUBLISH_DATE;\n case 7: // DEPARTMENT\n return DEPARTMENT;\n case 8: // VISITNUM\n return VISITNUM;\n case 9: // IN_HB\n return IN_HB;\n case 10: // COUNT\n return COUNT;\n case 11: // COMPANY_ABBR\n return COMPANY_ABBR;\n case 12: // COMPANY_LOGO\n return COMPANY_LOGO;\n case 13: // COMPANY_NAME\n return COMPANY_NAME;\n case 14: // IS_NEW\n return IS_NEW;\n case 15: // CITY\n return CITY;\n case 16: // PRIORITY\n return PRIORITY;\n case 17: // PUBLISHER\n return PUBLISHER;\n case 18: // ACCOUNTABILITIES\n return ACCOUNTABILITIES;\n case 19: // TOTAL_NUM\n return TOTAL_NUM;\n case 20: // CANDIDATE_SOURCE\n return CANDIDATE_SOURCE;\n case 21: // REQUIREMENT\n return REQUIREMENT;\n case 22: // CITY_ENAME\n return CITY_ENAME;\n case 23: // IS_REFERRAL\n return IS_REFERRAL;\n case 24: // EMPLOYMENT_TYPE\n return EMPLOYMENT_TYPE;\n case 25: // EMPLOYMENT_TYPE_NAME\n return EMPLOYMENT_TYPE_NAME;\n case 26: // PUBLISHER_NAME\n return PUBLISHER_NAME;\n case 27: // UPDATE_TIME\n return UPDATE_TIME;\n case 28: // DEGREE_ABOVE\n return DEGREE_ABOVE;\n case 29: // DEGREE\n return DEGREE;\n case 30: // EXPERIENCE_ABOVE\n return EXPERIENCE_ABOVE;\n case 31: // EXPERIENCE\n return EXPERIENCE;\n case 32: // TEAM_ID\n return TEAM_ID;\n case 33: // TOTAL_BONUS\n return TOTAL_BONUS;\n case 34: // HB_STATUS\n return HB_STATUS;\n default:\n return null;\n }\n }", "List<Pair<String, Value>> fields();", "public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "public static _Fields findByName(String name) {\r\n return byName.get(name);\r\n }", "public static _Fields findByName(String name) {\r\n return byName.get(name);\r\n }" ]
[ "0.642104", "0.63787335", "0.6367998", "0.621753", "0.61950487", "0.6152656", "0.60321623", "0.6027195", "0.6017325", "0.60106355", "0.6001216", "0.59577674", "0.5915875", "0.5887678", "0.58750826", "0.5871247", "0.58584267", "0.5850787", "0.581633", "0.58119655", "0.578869", "0.57810557", "0.5761595", "0.57393366", "0.57126755", "0.57100433", "0.5697382", "0.5686779", "0.5657326", "0.5655417", "0.5655279", "0.5646704", "0.56419224", "0.56304395", "0.5626672", "0.5553698", "0.5540315", "0.5540081", "0.5530922", "0.5512221", "0.55084133", "0.55004305", "0.5484784", "0.548226", "0.5473868", "0.5470378", "0.5449354", "0.54470575", "0.5441798", "0.54339415", "0.5429811", "0.54253477", "0.5416506", "0.54153854", "0.54147714", "0.5414493", "0.5403654", "0.54005885", "0.5388564", "0.5387285", "0.5379382", "0.5378749", "0.53596354", "0.5354742", "0.5351539", "0.53508836", "0.53384084", "0.53345984", "0.5313551", "0.5282874", "0.52785635", "0.5278037", "0.5274009", "0.5264971", "0.52460104", "0.5237258", "0.5236043", "0.5234256", "0.5232787", "0.5230273", "0.52282643", "0.52263594", "0.5224514", "0.52234113", "0.52228487", "0.5222374", "0.5221765", "0.52214664", "0.5220746", "0.52188027", "0.52171135", "0.5214713", "0.5214016", "0.5205366", "0.5203249", "0.5192603", "0.518955", "0.5189149", "0.5188067", "0.5186776", "0.5186776" ]
0.0
-1
Searches for the specified batch then returns its values
public ArrayList<Value> getAll(Batch batch) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<MutationBatch> lookupMutationBatches(ImmutableSortedSet<Integer> batchIds) {\n List<MutationBatch> result = new ArrayList<>();\n for (Integer batchId : batchIds) {\n MutationBatch batch = lookupMutationBatch(batchId);\n if (batch != null) {\n result.add(batch);\n }\n }\n\n return result;\n }", "@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\n\tpublic Batch findOneWithTraineesAndGrades(Integer batchId);", "private int indexOfBatchId(int batchId) {\n if (queue.isEmpty()) {\n // As an index this is past the end of the queue\n return 0;\n }\n\n // Examine the front of the queue to figure out the difference between the batchId and indexes\n // in the array. Note that since the queue is ordered by batchId, if the first batch has a\n // larger batchId then the requested batchId doesn't exist in the queue.\n MutationBatch firstBatch = queue.get(0);\n int firstBatchId = firstBatch.getBatchId();\n return batchId - firstBatchId;\n }", "public B getBatch();", "public List<BatchJob> findByExample(BatchJob batchJob) {\r\n\t\treturn dao.findByExample(batchJob);\r\n\t}", "private Map<Integer, Map<K, V>> classifyBatch(Map<K, V> batch) {\n Map<Integer, Map<K, V>> classifiedBatch = new HashMap<Integer, Map<K, V>>();\n for (Entry<K, V> entry : batch.entrySet()) {\n int keyRange = hash(entry.getKey());\n Map<K, V> subBatch = classifiedBatch.get(keyRange);\n if (subBatch == null) {\n subBatch = new HashMap<K, V>();\n classifiedBatch.put(keyRange, subBatch);\n }\n subBatch.put(entry.getKey(), entry.getValue());\n }\n return classifiedBatch;\n }", "@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\n\tpublic Batch findByBatchId(Integer batchId);", "@Test\n public void getBatchTest() {\n String token = null;\n // List<BatchReturn> response = api.getBatch(token);\n\n // TODO: test validations\n }", "private void processBatch(PrintWriter writer) {\n log.info(\"Processing batch ({} features input so far).\", this.geneCount);\n // Return a record for each input feature considered essential.\n var results = p3.query(Table.SP_GENE, \"patric_id,property\",\n Criterion.IN(\"patric_id\", this.batchMap.keySet()));\n log.info(\"{} results found in query for {} genes.\", results.size(),\n this.batchMap.size());\n // Form the genes found into a set.\n var essentials = results.stream()\n .filter(x -> StringUtils.equals(P3Connection.getString(x, \"property\"), \"Essential Gene\"))\n .map(x -> P3Connection.getString(x, \"patric_id\"))\n .collect(Collectors.toSet());\n // Output all the genes in the batch.\n for (Map.Entry<String, String> entry : this.batchMap.entrySet()) {\n String geneId = entry.getKey();\n String flag = \"\";\n if (essentials.contains(geneId)) {\n flag = \"Y\";\n this.essentialCount++;\n }\n writer.format(\"%s\\t%s\\t%s%n\", geneId, this.batchMap.get(geneId), flag);\n }\n // Clear the batch for the next run.\n this.batchMap.clear();\n }", "private Status batchGet(\n String table, String key, Set<String> fields,\n Map<String, ByteIterator> result) {\n try {\n List<Pair<byte[], byte[]>> batchKeys = new ArrayList<>();\n List<byte[]> values = new ArrayList<>();\n byte[] hashKey = key.getBytes();\n for (byte[] sortKey : sortKeys) {\n batchKeys.add(Pair.of(hashKey, sortKey));\n }\n client.batchGet(table, batchKeys, values);\n if (!values.isEmpty()) {\n for (byte[] value : values) {\n fromJson(value, fields, result);\n }\n }\n return Status.OK;\n } catch (Exception e) {\n logger.error(\"Error batch reading value from table[\" + table + \"] with key: \" + key, e);\n return Status.ERROR;\n }\n }", "public void runBatch(String batchName);", "private int indexOfExistingBatchId(int batchId, String action) {\n int index = indexOfBatchId(batchId);\n hardAssert(index >= 0 && index < queue.size(), \"Batches must exist to be %s\", action);\n return index;\n }", "private CompletableFuture<Iterator<T>> batch() {\n return batch.thenCompose(iterator -> {\n if (iterator != null && !iterator.hasNext()) {\n batch = fetch(iterator.position());\n return batch.thenApply(Function.identity());\n }\n return CompletableFuture.completedFuture(iterator);\n });\n }", "public void runBatch();", "public Batch findById(Long id) {\n return batchRepository.getOne(id);\n }", "SnIndexerBatchResponse getIndexerBatchResponse();", "UsageReport[] getUsageReportsBatch(int batchSize);", "@Override\n public SEVISBatchCreateUpdateStudent fetchBatchData(BatchParam batchParam) {\n List<Integer> participantIds = batchParam.getParticipant().stream().map(p -> p.getParticipantGoId()).collect(Collectors.toList());\n // @formatter:on\n\n List<Participant> participants = participantRepository.findByParticipantGoIdIn(participantIds);\n\n // @formatter:off\n // map each participants into Student\n List<Student> students = participants.stream().map(p -> createStudentForUpdate(\"N0000000000\", \"1\", batchParam.getUserId())).collect(Collectors.toList());\n // @formatter:on\n\n students.forEach(s -> s.setProgram(createProgramExtension(true, SevisUtils.convert(LocalDate.now()), \"Explanation\")));\n\n String batchId = SevisUtils.createBatchId();\n SEVISBatchCreateUpdateStudent updateBatch = createUpdateStudentBatch(batchParam.getUserId(), \"P-1-12345\", batchId);\n updateBatch.getUpdateStudent().getStudent().addAll(students);\n\n return updateBatch;\n }", "CmsCouponBatch selectByPrimaryKey(String batchNo);", "@Override\n public void onBatchScanResults(List<ScanResult> results) {\n for (ScanResult result : results) {\n processResult(result);\n }\n }", "@Override\n public List<ResourceTagJoinVO> searchByIds(Long... tagIds) {\n int DETAILS_BATCH_SIZE = 2000;\n String batchCfg = _configDao.getValue(\"detail.batch.query.size\");\n if (batchCfg != null) {\n DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);\n }\n // query details by batches\n List<ResourceTagJoinVO> uvList = new ArrayList<ResourceTagJoinVO>();\n // query details by batches\n int curr_index = 0;\n if (tagIds.length > DETAILS_BATCH_SIZE) {\n while ((curr_index + DETAILS_BATCH_SIZE) <= tagIds.length) {\n Long[] ids = new Long[DETAILS_BATCH_SIZE];\n for (int k = 0, j = curr_index; j < curr_index + DETAILS_BATCH_SIZE; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n curr_index += DETAILS_BATCH_SIZE;\n }\n }\n if (curr_index < tagIds.length) {\n int batch_size = (tagIds.length - curr_index);\n // set the ids value\n Long[] ids = new Long[batch_size];\n for (int k = 0, j = curr_index; j < curr_index + batch_size; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n }\n return uvList;\n }", "long findValues(List<Object> values, List<Column> columns);", "public Long createBatch(Batch batch) {\n\t\treturn batchService.createBatch(batch);\n\t}", "public List<String> batchRetrieve(CountMinSketchState state, List<TridentTuple> inputs) {\n List<String> ret = new ArrayList();\n ret.add(state.getTopKAsString());\n return ret;\n }", "public gpss.Batch getBatch() {\n if (batchBuilder_ == null) {\n return batch_ == null ? gpss.Batch.getDefaultInstance() : batch_;\n } else {\n return batchBuilder_.getMessage();\n }\n }", "com.google.ads.googleads.v6.resources.BatchJobOrBuilder getBatchJobOrBuilder();", "public void submit(Batch batch);", "public abstract int search(String[] words, String wordToFind) throws ItemNotFoundException;", "public List<PredictionWithConfidence> requestPredictionBatch(List<List<AttributeValuePair>> queriesAsAvps, String modelName) {\n String queriesString = queriesAsAvps.stream()\n .map(queryString -> queryString.stream()\n .map(AttributeValueNode::new)\n .map(AttributeValueNode::toString)\n .collect(Collectors.joining(\"-\")))\n .collect(Collectors.joining(\"\\n\"))\n .replaceAll(\"\\\\n+\", \"\\n\");\n // open the HTTP connection with a POST request\n HttpURLConnection con = null;\n try {\n // query the prediction API\n URL predictionUrl = new URL(PROTOCOL, host, port, ENDPOINT_BATCH + modelName);\n con = (HttpURLConnection) predictionUrl.openConnection();\n con.setRequestMethod(\"POST\");\n con.setRequestProperty(\"Content-Type\", \"text/plain; charset=utf-8\");\n con.setRequestProperty(\"Accept\", \"application/json\");\n con.setDoInput(true);\n con.setDoOutput(true);\n // write the queries\n try (OutputStream os = con.getOutputStream()) {\n byte[] input = queriesString.getBytes(StandardCharsets.UTF_8);\n os.write(input, 0, input.length);\n }\n // get the response\n int status = con.getResponseCode();\n if (status < 300) {\n try (BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream(), StandardCharsets.UTF_8))) {\n PredictionBatchResult batchResult = gson.fromJson(in, new TypeToken<PredictionBatchResult>() {\n }.getType());\n return batchResult.results;\n }\n } else {\n try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getErrorStream()))) {\n log.error(\"Error in batch prediction API response for query: {}\", queriesAsAvps);\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = in.readLine()) != null) {\n sb.append(line);\n sb.append(\"\\n\");\n }\n String errorMessage = sb.toString();\n log.error(\"ERROR \" + con.getResponseCode() + \": \" + errorMessage);\n throw new ResponseStatusException(HttpStatus.valueOf(con.getResponseCode()), errorMessage);\n }\n }\n } catch (IOException e) {\n log.error(\"Error while batch-querying the prediction API with: \" + queriesString, e);\n return new ArrayList<>();\n } finally {\n if (con != null) con.disconnect();\n }\n }", "@Override\n\tpublic BatchItems getData(int t) \n\t{\n\t\tlogger.info(\"getData called| TwitterManger.getData(\" + t + \")\");\n\t\tBatchItems bi = new BatchItems();\n\t\t//Create a new instance of BatchItems that is populated by the BatchDataService.findby(t) method.\n\t\tbi = BDI.findby(t);\n\t\tlogger.info(\"TwitterManager.getData(\" + t + \") Complete\");\n\t\t//Returns the single entry.\n\t\treturn bi;\n\t}", "public int getObject(int targetId)\n\t{\n for(String skey: searchBufs.keySet()){\n String[] keys = skey.split(\"\\\\s+\"); //separted by any white space\n\t\t\t// check the key and assign different method\n ByteBuffer buf = searchBufs.get(skey);\n int bound = buf.position();\n ByteBuffer readBuf = buf.asReadOnlyBuffer();\n readBuf.position(0);\n int oid = 0;\n long longnum = 0;\n \n while(readBuf.position() < bound) {\n oid = readBuf.getInt();\n //System.out.print(\"current cursor: Rowid \"+oid+\" key \"+skey);\n if(oid > targetId)\n break; // already found all of the target row , assume monotonous increase\n if(oid == targetId)\n System.out.print(\"Row \"+oid);\n \n for(int i=0; i<keys.length; i++){\n String type = types.get(keys[i]);\n if(type.equals(\"STRING\")){\n }\n else if(type.equals(\"LONG\")){\n longnum = readBuf.getLong();\n if(oid == targetId){\n System.out.print(longnum + \" \");\n }\n }\n else if(type.equals(\"DOUBLE\")){\n }\n else if(type.equals(\"BOOL\")){\n }\n }\n if(oid == targetId)\n System.out.println(\"\");\n } //end while\n } // end for\n return 0;\n }", "public String getBatch()\n {\n return batch;\n }", "com.google.ads.googleads.v6.resources.BatchJob getBatchJob();", "private int find_bestSplit(KnowledgeBase kb, int attIndex, ArrayList<ArrayList<ArrayList<Integer>>> multiple_counters) {\r\n\t\tif(multiple_counters.size() >0){\r\n\t\t\tfloat best_Gini = calculImpurity2D(kb.getSamples().size(),multiple_counters.get(0));; // it's a minimum!!\r\n\t\t\tint index_Best_Gini =0;\r\n\t\t\tfloat tmp_gini;\r\n\t\t\tfor(int i=1;i<multiple_counters.size();i++){\r\n\t\t\t\ttmp_gini = calculImpurity2D(kb.getSamples().size(),multiple_counters.get(i));\r\n\t\t\t\tif(tmp_gini<best_Gini){\r\n\t\t\t\t\tbest_Gini = tmp_gini;\r\n\t\t\t\t\tindex_Best_Gini = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn index_Best_Gini;\r\n\t\t}\r\n\t\treturn 0;\r\n\t\t\r\n\t\t\r\n\t}", "private static void batchProcessing(File batchFolder) throws Exception {\n\t\tTAPAALGUI.init();\n\t\tTAPAALGUI.getAppGui().setVisible(false);\n\n\t\tSystem.out.println(\"=============================================================\");\n\t\tSystem.out.println(\"Batch Processing\");\n\t\tSystem.out.println(\"=============================================================\");\n\n\t\tSystem.out.println(\"Running in batch mode for \" + batchFolder.getAbsolutePath());\n\n\t\tBatchProcessingResultsTableModel results = new BatchProcessingResultsTableModel();\n\n\t\tfor (File f : batchFolder.listFiles()) {\n\t\t\tif (f.getName().toLowerCase().endsWith(\".tapn\") || f.getName().toLowerCase().endsWith(\".xml\")) {\n\t\t\t\tSystem.out.println(\"Processing File: \" + f);\n\n\t\t\t\tPetriNetTab tab = PetriNetTab.createNewTabFromInputStream(new FileInputStream(f), f.getName());\n\t\t\t\tTimedArcPetriNetNetwork network = tab.network();\n\t\t\t\tList<TAPNQuery> queries = StreamSupport\n\t\t\t\t\t\t.stream(tab.queries().spliterator(), false)\n\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\tfor (TAPNQuery query : queries) {\n\n\t\t\t\t\tSystem.out.println(\" | Running query: \" + query.getName());\n\n\t\t\t\t\tif(query.getReductionOption() == ReductionOption.VerifyTAPN || query.getReductionOption() == ReductionOption.VerifyDTAPN || query.getReductionOption() == ReductionOption.VerifyPN) {\n\t\t\t\t\t\tVerifier.runVerifyTAPNVerification(network, query, new VerificationCallback() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run(VerificationResult<TAPNNetworkTrace> result) {\n\n\t\t\t\t\t\t\t\tString resultString = result.getQueryResult().isQuerySatisfied() ? \"Satisfied\" : \"Not Satisfied\";\n\t\t\t\t\t\t\t\tSystem.out.println(\" | Result: \" + resultString);\n\n\t\t\t\t\t\t\t\tresults.addResult(new BatchProcessingVerificationResult(f.toString(), query,resultString, result.verificationTime(), MemoryMonitor.getPeakMemory(), result.getRawOutput(), result.stats()));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}, tab.getGuiModels(),false, null);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\" | Skipped\");\n\t\t\t\t\t\t//Verifier.runUppaalVerification(network, query);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"===========================================\");\n\t\tSystem.out.println(\"===========================================\");\n\n\t\tBatchProcessingResultsExporter exporter = new BatchProcessingResultsExporter();\n\t\texporter.exportToCSV(results.getResults(), System.out);\n\t\tSystem.out.println(\"Done\" + results.getRowCount());\n\t}", "public String getBatchName(G group, Batch<K, T> batch) {\n return \"batch(\" + batch.size() + \")\";\n }", "@In String search();", "public List<RangeChecksum> calculateBatchChecksums(BatchChecksumRequest request);", "public void submit(Batch batch, BatchOperation opFilter);", "@Request(id = 15, retryable = false, response = ResponseMessageConst.CACHE_KEY_ITERATOR_RESULT)\n Object iterate(String name, int partitionId, int tableIndex, int batch);", "List<PilotContainer> Search(String cas, String word);", "BPBatchBean selectByPrimaryKey(Long bId);", "public BatchStatus getStatus(String batchId) throws IOException {\n BatchStatusResponse response = getRequest(\"/batch_statuses?id=\" + batchId, BatchStatusResponse.class);\n return response.getData().stream()\n .filter(bs -> bs.getId().equals(batchId))\n .findAny().orElseThrow(() -> new RuntimeException(\"No status for the batch supplied\"));\n }", "public void setBatch(java.lang.String batch) {\n this.batch = batch;\n }", "public void putBatch(String key, Collection<Long> batch) {\n Collection<Long> oldBatch = index.get(key);\n if (oldBatch==null) {\n oldBatch = new HashSet<Long>(batch);\n index.put(key, oldBatch);\n }\n oldBatch.addAll(batch);\n }", "private void searchHashMap(String[] searchKey, String callNumber,int startYear, int endYear) {\n\t\t/* Temporarily stores next 'values' for a title keyword */\n\t\tArrayList<Integer> tempStore = new ArrayList<Integer>();\n\t\t/* Stores only the intersection 'values' of title keywords */\n\t\tCollection<Integer> intersection = new ArrayList<Integer>();\n\t\t/* Counts number of keywords found */\n\t\tint foundKeys = 0;\n\n\t\t/* Loop to iterate through title keywords and get key-value pair intersection */\n\t\tfor (String key : searchKey) {\n\t\t\tif (titleHashMap.containsKey(key)) {\n\t\t\t\tfoundKeys = foundKeys + 1;\n\t\t\t\ttempStore.addAll((titleHashMap.get(key))); /* Stores all found values */\n\t\t\t\tif (intersection.size() == 0) {\n\t\t\t\t\tintersection.addAll(titleHashMap.get(key));\n\t\t\t\t}\n\t\t\t\tintersection.retainAll(tempStore); /* Stores only common 'values' */\n\t\t\t\ttempStore.clear(); /* Clears temporary array*/\n\t\t\t}\n\t\t}\n\n\t\t/* Checks if all keywords were found */\n\t\tif(searchKey.length == foundKeys){\n\t\t/* Performs search of other fields via the reduced list of 'values' for matched record */\n\t\tfor (Integer i : intersection) {\n\t\t\tif ((callNumber.equals(\"\") || items.get(i.intValue()).getCallNumber().equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (items.get(i.intValue()).getYear() >= startYear && items.get(i.intValue()).getYear() <= endYear)) {\n\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\tSystem.out.println(items.get(i.intValue())); /* Prints found records from master list 'Reference' */\n\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t}\n\t\t}\n\t\t}\n\t}", "@DISPID(85)\r\n\t// = 0x55. The runtime will prefer the VTID if present\r\n\t@VTID(83)\r\n\tint batchID();", "public long getBatch()\n {\n return m_lBatch;\n }", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "List<Object[]> findValuebyAlignInfoAndRuleName(Long algmntId,Long bussUnitId,Long salesTeamId,String BussRuleName);", "static Item search(long sum) {\n int i = hash(sum);\n while (st[i] != null) {\n if (st[i].sum == sum) return st[i];\n i++;\n if (i >= st.length) i -= st.length;\n }\n return null;\n }", "Itr(int batch) {\n this.batch = batch;\n }", "public interface WorkoutBatch extends UnObfuscable, Parcelable{\n\n\t/**\n\t * attribute given record to this batch\n\t * @param record which is to be attributed to this batch\n\t */\n\tvoid addRecord(DistRecord record, boolean persistPoints);\n\n\t/**\n\t * @return distance covered in this batch\n\t */\n\tfloat getDistance();\n\n\t/**\n\t * adds distance in this batch\n\t */\n\tvoid addDistance(float distanceToAdd);\n\n\t/**\n\t * sets the start point for this batch\n\t * @param location\n\t */\n\tvoid setStartPoint(Location location, boolean persistPoints);\n\n\t/**\n\t * @return the epoch (in millis) at which this batch began\n\t */\n\tlong getStartTimeStamp();\n\n\t/**\n\t * @return the epoch (in millis) at which this batch ended, or 0 if the batch has not ended yet\n\t */\n\tlong getEndTimeStamp();\n\n\t/**\n\t * @return Name of the file (internal storage) in which this batche's location data is stored\n\t */\n\tString getLocationDataFileName();\n\n\t/**\n\t * @return the epoch (in millis) at which the last point of this batch was recorded\n\t */\n\tlong getLastRecordedTimeStamp();\n\n\t/**\n\t * @return elapsed time, till the batch is running, since the beginning of this batch in secs;\n\t * once the batch completes it returns the total time for which the batch was running\n\t */\n\tfloat getElapsedTime();\n\n\t/**\n\t * @return time interval in secs for which distance has been recorded\n\t */\n\tfloat getRecordedTime();\n\n\t/**\n\t * @return true if user was caught inside a vehicle for this batch, false otherwise\n\t */\n\tboolean wasInVehicle();\n\n\t/**\n\t * @return list of all points of this batch\n\t */\n\tList<WorkoutPoint> getPoints();\n\n\t/**\n\t *completes this batch and returns this after whatever post processing is required\n\t */\n\tWorkoutBatch end(boolean wasInVehicle);\n\n\t/**\n\t * Creates a Deep copy of this batch\n\t */\n\tWorkoutBatch copy();\n}", "void write(Batch batch) throws InfluxDbApiNotFoundException, InfluxDbApiBadrequestException, InfluxDbTransportException;", "int getRequestedValues(int index);", "@Override\n\tpublic RefResult getRefDatasByBatchId(RefBaseQuery refBaseQuery)\n\t\t\tthrows Exception {\n\t\tRefResult result = new RefResult();\n\t\ttry {\n\t\t\tif (refMetaDataService != null && refBaseQuery != null) {\n\t\t\t\tcheckrefMetaData(refMetaDataService);\n\t\t\t\tRefMetaDataViewBean refMetaDataViewBean = getRefMetaDataViewBean(\n\t\t\t\t\t\trefMetaDataService, refBaseQuery);\n\t\t\t\tif (refMetaDataViewBean != null) {\n\t\t\t\t\tresult.setRefMetaDataBean(refMetaDataViewBean);\n\t\t\t\t}\n\t\t\t\tList<String> batchIds = refBaseQuery.getBatchIds();\n\t\t\t\tif (batchIds != null && batchIds.size() > 0) {\n\t\t\t\t\tStringBuffer ids = new StringBuffer();\n\t\t\t\t\tfor (int i = 0; i < refBaseQuery.getBatchIds().size(); i++) {\n\t\t\t\t\t\tids.append(\"'\");\n\t\t\t\t\t\tids.append(refBaseQuery.getBatchIds().get(i));\n\t\t\t\t\t\tids.append(\"'\");\n\t\t\t\t\t\tif (i != refBaseQuery.getBatchIds().size() - 1) {\n\t\t\t\t\t\t\tids.append(\",\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSmallOrgBankAccQuery xmallOrgBankAccQuery = new SmallOrgBankAccQuery();\n\t\t\t\t\txmallOrgBankAccQuery.setOrgBankAccIds(ids.toString());\n\t\t\t\t\tList<SmallOrgBankAcc> smallOrgBankAccLists = bossOrgBankAccRpcClient\n\t\t\t\t\t\t\t.getBossOrgBankAccByIds(xmallOrgBankAccQuery);\n\t\t\t\t\tresult.setDatas(getObjectListData(smallOrgBankAccLists));\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.setSuccess(true);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tresult.setSuccess(false);\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\n\t\treturn result;\n\t}", "public List<CorpusSearchHit> searchNext() {\n List<CorpusSearchHit> hits;\n Path file = fileIterator.next();\n\n hits = new ArrayList<>();\n try {\n MDCDocumentReader reader = new MDCDocumentReader();\n MDCDocument mdcDocument = reader.loadFile(file.toFile());\n List<MDCPosition> positions = query.doSearch(mdcDocument.getHieroglyphicTextModel().getModel());\n // see information about MDCPosition for more details.\n for (MDCPosition pos : positions) {\n hits.add(new CorpusSearchHit(file, pos.getIndex()));\n }\n result.addAll(hits);\n } catch (MDCSyntaxError | IOException e) {\n System.err.println(\"Error in file \" + file.toString());\n }\n\n return hits;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\n\tpublic List<Batch> findAllCurrent();", "public void search(IndexShort < O > index, short range, short k)\n throws Exception {\n // assertEquals(index.aDB.count(), index.bDB.count());\n // assertEquals(index.aDB.count(), index.bDB.count());\n // index.stats();\n index.resetStats();\n // it is time to Search\n int querySize = 1000; // amount of elements to read from the query\n String re = null;\n logger.info(\"Matching begins...\");\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n BufferedReader r = new BufferedReader(new FileReader(query));\n List < OBPriorityQueueShort < O >> result = new LinkedList < OBPriorityQueueShort < O >>();\n re = r.readLine();\n int i = 0;\n long realIndex = index.databaseSize();\n\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n OBPriorityQueueShort < O > x = new OBPriorityQueueShort < O >(\n k);\n if (i % 100 == 0) {\n logger.info(\"Matching \" + i);\n }\n\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n if(i == 279){\n System.out.println(\"hey\");\n }\n index.searchOB(s, range, x);\n result.add(x);\n i++;\n }\n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n \n logger.info(index.getStats().toString());\n \n int maxQuery = i;\n // logger.info(\"Matching ends... Stats follow:\");\n // index.stats();\n\n // now we compare the results we got with the sequential search\n Iterator < OBPriorityQueueShort < O >> it = result.iterator();\n r.close();\n r = new BufferedReader(new FileReader(query));\n re = r.readLine();\n i = 0;\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n if (i % 300 == 0) {\n logger.info(\"Matching \" + i + \" of \" + maxQuery);\n }\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n OBPriorityQueueShort < O > x2 = new OBPriorityQueueShort < O >(\n k);\n searchSequential(realIndex, s, x2, index, range);\n OBPriorityQueueShort < O > x1 = it.next();\n //assertEquals(\"Error in query line: \" + i + \" slice: \"\n // + line, x2, x1); \n \n assertEquals(\"Error in query line: \" + i + \" \" + index.debug(s) + \"\\n slice: \"\n + line + \" \" + debug(x2,index ) + \"\\n\" + debug(x1,index), x2, x1);\n\n i++;\n }\n \n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n r.close();\n logger.info(\"Finished matching validation.\");\n assertFalse(it.hasNext());\n }", "private GeobatchRunInfo searchUnique(String runUid) {\n GeobatchRunInfo result = null;\n SearchFilter filter = new AndFilter(new FieldFilter(BaseField.NAME, runUid,\n SearchOperator.EQUAL_TO), new CategoryFilter(CATEGORY_NAME,\n SearchOperator.EQUAL_TO));\n ResourceList list = geostoreClient.searchResources(filter, 0,\n Integer.MAX_VALUE, true, false);\n if (list.getList() != null && !list.getList().isEmpty()) {\n result = getRunStatus(list.getList().get(0));\n }\n return result;\n }", "public List<Batch> getAll() {\n return batchRepository.findAll();\n }", "public Builder mergeBatch(gpss.Batch value) {\n if (batchBuilder_ == null) {\n if (batch_ != null) {\n batch_ =\n gpss.Batch.newBuilder(batch_).mergeFrom(value).buildPartial();\n } else {\n batch_ = value;\n }\n onChanged();\n } else {\n batchBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "private int JobSearch(int JobID, ArrayList<Jobs> SearchThrough) {\n \t\tint size = SearchThrough.size();\n \t\tint scan = 0;\n \n \t\tif (JobID < 0) {\n \t\t\treturn -1;\n \t\t}\n \n \t\twhile (scan < size) {\n \t\t\tJobs looking = SearchThrough.get(scan);\n \t\t\t// See if the job id matches the search parameter\n \t\t\tif (looking.GetJobID() == JobID) {\n \t\t\t\treturn scan;\n \t\t\t}\n \t\t\tscan++;\n \t\t}\n \t\treturn -1;\n \t}", "void processMultiValue(int numDocs, int[][] outGroupIds);", "@Override\n public int[] executeBatch() {\n if (this.batchPos == 0) {\n return new int[0];\n }\n try {\n int[] arrn = this.db.executeBatch(this.pointer, this.batchPos / this.paramCount, this.batch);\n return arrn;\n }\n finally {\n this.clearBatch();\n }\n }", "public JSONObject downloadBatchPrediction(final JSONObject batchPrediction,\n final String filename) {\n String resourceId = (String) batchPrediction.get(\"resource\");\n return downloadBatchPrediction(resourceId, filename);\n }", "public CommandResult execute() {\n int i = 0;\n int found = 0;\n for (Task task : Duke.taskList) {\n i++;\n if (task.description.contains(keyword)) {\n System.out.println(i + \".[\" + task.getTaskID() + \"]\" +\n \"[\" + task.getStatusIcon() +\n \"] \" + task.description + \" \" + task.getDate());\n found++;\n }\n }\n if (found == 0) {\n return new CommandResult(\"No results found :(\");\n } else {\n return new CommandResult(System.lineSeparator() + found + \" results found!\");\n }\n }", "void processSingleValue(int numDocs, int[] outGroupIds);", "public java.lang.String getBatch() {\n return batch;\n }", "public static Batch populateBatch(BatchBean batchBean) {\n\n\t\tSystem.out.println(\"Batch Bean\" + batchBean);\n\t\tif (isNotNull(batchBean)) {\n\t\t\tBatch batch = new Batch();\n\t\t\tbatch.setBatchId(batchBean.getBatchId());\n\t\t\tbatch.setAssignFaculty(batchBean.getAssignFaculty());\n\t\t\tbatch.setBatchNumber(\"B-\" + batchBean.getBatchNumber());\n\t\t\tbatch.setBatchTiming(batchBean.getBatchTiming());\n\t\t\tbatch.setClassName(batchBean.getClassName());\n\t\t\tbatch.setNumberOfStudents(batchBean.getNumberOfStudents());\n\t\t\tSystem.out.println(\"Batches :\" + batch);\n\t\t\treturn batch;\n\t\t}\n\n\t\treturn null;\n\t}", "public interface Batch {\n /**\n * Process one iteration of this batch.\n *\n * @param maxBlocks The maximum number of blocks the batch should process\n * @return The number of blocks processed.\n */\n int process(int maxBlocks);\n\n /**\n * Whether or not this batch is finished\n *\n * @return true if finished\n */\n boolean isFinished();\n\n /**\n * Immediately finish this batch.\n *\n * <p>This may cancel any remaining operations, but should\n * clean up, add to undo queues, etc, whatever has been\n * done so far.\n */\n void finish();\n\n /**\n * Finish this batch and force-cancel any outstanding effects.\n */\n void cancel();\n\n /**\n * The size of this batch. May be in blocks, or some\n * other abstract unit.\n *\n * <p>Can be used in conjunction with remaining() for a progress indicator.\n *\n * @return The size of this batch.\n */\n int size();\n\n /**\n * The remaining size of this batch. May be in blocks, or some\n * other abstract unit.\n *\n * <p>Can be used in conjunction with size() for a progress indicator.\n *\n * @return The remaining size of this batch.\n */\n int remaining();\n\n /**\n * Return a friendly name to identify this batch.\n * @return A readable name\n */\n String getName();\n}", "private void dbFirstGetNextChunk(SortBy sort) throws ServiceException {\n DbSearchConstraints.Leaf sc = getTopLeafConstraint();\n sc.hasIndexId = Boolean.TRUE;\n\n do {\n // (1) Get the next chunk of results from the DB\n List<DbSearch.Result> dbResults = new ArrayList<DbSearch.Result>();\n dbSearch(dbResults, sort, dbOffset, MAX_HITS_PER_CHUNK);\n\n if (dbResults.size() < MAX_HITS_PER_CHUNK) {\n endOfHits = true;\n }\n\n if (dbResults.size() > 0) {\n dbOffset += dbResults.size();\n\n // (2) for each of the results returned in (1), do a lucene search\n // for \"ORIGINAL-LUCENE-PART AND id:(RESULTS-FROM-1-ABOVE)\"\n try {\n // For each search result, do two things:\n // -- remember the indexId in a hash, so we can find the SearchResult later\n // -- add that indexId to our new booleanquery\n Map<Integer, List<DbSearch.Result>> mailItemToResultsMap = new HashMap<Integer, List<DbSearch.Result>>();\n\n for (DbSearch.Result sr : dbResults) {\n List<DbSearch.Result> results = mailItemToResultsMap.get(sr.getIndexId());\n if (results == null) {\n results = new LinkedList<DbSearch.Result>();\n mailItemToResultsMap.put(sr.getIndexId(), results);\n }\n results.add(sr);\n // add the new query to the mLuceneOp's query\n luceneOp.addFilterClause(new Term(LuceneFields.L_MAILBOX_BLOB_ID,\n String.valueOf(sr.getIndexId())));\n }\n\n boolean hasMore = true;\n\n // we have to get ALL of the lucene hits for these ids. There can very likely be more\n // hits from Lucene then there are DB id's, so we just ask for a large number.\n while (hasMore) {\n luceneChunk = luceneOp.getNextResultsChunk(MAX_HITS_PER_CHUNK);\n Set<Integer> indexIds = luceneChunk.getIndexIds();\n if (indexIds.size() < MAX_HITS_PER_CHUNK) {\n hasMore = false;\n }\n for (int indexId : indexIds) {\n List<DbSearch.Result> results = mailItemToResultsMap.get(indexId);\n if (results != null) {\n for (DbSearch.Result sr : results) {\n dbHits.add(sr);\n }\n } else {\n ZmailLog.search.warn(\"Lucene returned item ID %d but wasn't in resultMap\", indexId);\n throw ServiceException.FAILURE(\n \"Inconsistent DB/Index query results: Text Index returned item ID \" +\n indexId + \" but wasn't in resultMap\", null);\n }\n }\n }\n } finally {\n luceneOp.clearFilterClause();\n }\n }\n\n } while (dbHits.size() ==0 && !endOfHits);\n }", "public static void main(String[] args) {\n\r\n\t\tint nums[] = { 4,5,6,7,0,1,2 }, target = 0; // 4,5,6,7,0,1,2\r\n\t\tSystem.out.println(search(nums, target));\r\n\t}", "public GeobatchRunInfo searchUnique(String runUid, String description) {\n SearchFilter filter = new AndFilter(new FieldFilter(BaseField.DESCRIPTION,\n description, SearchOperator.EQUAL_TO), new FieldFilter(\n BaseField.METADATA, runUid, SearchOperator.EQUAL_TO),\n new CategoryFilter(CATEGORY_NAME, SearchOperator.EQUAL_TO));\n ResourceList list = geostoreClient.searchResources(filter, 0,\n Integer.MAX_VALUE, true, false);\n \n List<GeobatchRunInfo> resources = new LinkedList<GeobatchRunInfo>();\n if (list.getList() != null && !list.getList().isEmpty()) {\n for (Resource resource : list.getList()) {\n resources.add(getRunStatus(resource));\n }\n }\n \n // sort by last execution\n Collections.sort(resources, new GeoBatchRunInfoComparator());\n \n return resources != null && !resources.isEmpty() ? resources.get(0) : null;\n }", "public gpss.BatchOrBuilder getBatchOrBuilder() {\n if (batchBuilder_ != null) {\n return batchBuilder_.getMessageOrBuilder();\n } else {\n return batch_ == null ?\n gpss.Batch.getDefaultInstance() : batch_;\n }\n }", "<H extends ResponseHandler<Result[]>> H nextBatch(H handler);", "public Grid2DBit almost(String value) {\n Grid2DByte weatherGrid = getWeatherGrid();\n Point gridSize = new Point(weatherGrid.getXdim(), weatherGrid.getYdim());\n Grid2DBit bits = new Grid2DBit(gridSize.x, gridSize.y);\n\n // Check for each value\n // Get the list of subkey permutations from the value given\n String siteId = getGridInfo().getGridLoc().getSiteId();\n List<WeatherSubKey> searchKeys = WeatherKey.descriptionSubKeys(siteId,\n value);\n\n // Get the byte values that correspond to the specified textStrings\n List<Byte> byteValues = new ArrayList<Byte>();\n\n // Check each weather key against the permutations of the\n // description given\n int k = 0;\n for (WeatherKey key : keys) {\n // Check each subkey\n for (WeatherSubKey subKey : key.getSubKeys()) {\n for (WeatherSubKey searchKey : searchKeys) {\n if (subKey.equals(searchKey)) {\n byteValues.add((byte) k);\n break;\n }\n }\n }\n k++;\n }\n\n if (byteValues.size() == 0) {\n return bits;\n }\n\n // it was found so set all bits with a value of subKeyIndex\n for (int i = 0; i < gridSize.x; i++) {\n for (int j = 0; j < gridSize.y; j++) {\n if (byteValues.contains(weatherGrid.get(i, j))) {\n bits.set(i, j);\n }\n }\n }\n\n return bits;\n }", "@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\n\tpublic Batch findOneWithDroppedTrainees(Integer batchId);", "@java.lang.Override\n public gpss.Batch getBatch() {\n return batch_ == null ? gpss.Batch.getDefaultInstance() : batch_;\n }", "public static void searchJobs(String searchTerm) {\n\n for (int i = 0; i > PostJob.allJobs.size(); i++) {\n\n\n if (PostJob.allJobs.contains(searchTerm)) {\n int itemIndx = PostJob.allJobs.indexOf(searchTerm);\n String output = PostJob.allJobs.get(itemIndx);\n System.out.print(\"Available jobs within your search terms\" + output);\n\n }\n }\n }", "private int JobSearch(String ClientID, ArrayList<Jobs> SearchThrough) {\n \t\tint size = SearchThrough.size();\n \t\tint scan = 0;\n \n \t\twhile (scan < size) {\n \t\t\tJobs looking = SearchThrough.get(scan);\n \t\t\t// See if the client name matches the search parameter\n \t\t\tif (looking.GetIussed() == ClientID) {\n \t\t\t\treturn scan;\n \t\t\t}\n \t\t\tscan++;\n \t\t}\n \t\treturn -1;\n \t}", "int batchSize();", "protected boolean batch() {\n return batch;\n }", "List<ProductInfoOutput> findList(List<String> productIdList);", "public static void search(){\n\t\tfor (Page p:heap){\n\t\t\tfor(Building b:p.buildings){\n\t\t\t\t\n\t\t\t\t//System.out.println(b.buildingName);\n\t\t\t\tif(b.getBuildingName()!=null) {\n\t\t\t\t\tif(b.getBuildingName().contains(searchQuery)){\n\t\t\t\t\t\tSystem.out.println(\"======================================================\");\n\t\t\t\t\t\tSystem.out.println(\"Building Name: \" + b.getBuildingName());\n\t\t\t\t\t\tSystem.out.println(\"Property ID: \" + b.getPropID());\n\t\t\t\t\t\tSystem.out.println(\"Census year: \" + b.getCensusYear());\n\t\t\t\t\t\tSystem.out.println(\"======================================================\");\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tbuildingsFound++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tpagesSearched++;\n\t\t}\n\t}", "private SkinMetadata _findSkinMetadata(ExternalContext context, SkinMetadata search)\n {\n SkinMetadata matchingSkinMetadata = null;\n String skinId = search.getId();\n\n Collection<SkinMetadata> skinMetadata = getSkinMetadata(context);\n\n if (skinMetadata == null || skinMetadata.isEmpty())\n return null;\n\n // search is with either id or (family, renderkit, version)\n // we have ensure that either id or family is passed in the search\n if (skinId != null)\n {\n // Id is available then search using ID\n for (SkinMetadata m : skinMetadata)\n if (skinId.equals(m.getId()))\n {\n matchingSkinMetadata = m;\n }\n\n if (matchingSkinMetadata == null)\n {\n if (_LOG.isFine())\n {\n _LOG.fine(\"SP_CANNOT_FIND_MATCHING_SKIN_ID\", new Object[]{skinId});\n }\n }\n }\n else\n {\n // search using family, renderkit, version\n String family = search.getFamily();\n\n // we need at least the family to go on with the search\n if (family == null)\n return null;\n\n // renderkit id cannot be null, we initialize it to APACHE_TRINIDAD_DESKTOP\n String renderKit = search.getRenderKitId();\n\n // version cannot be null as we initialize it to SkinVersion.EMPTY_SKIN_VERSION\n SkinVersion version = search.getVersion();\n\n List<SkinMetadata> familyRenderKitMatches = new ArrayList<SkinMetadata>(2);\n\n // search using family and renderkit id\n for (SkinMetadata m : skinMetadata)\n if (family.equalsIgnoreCase(m.getFamily()) &&\n renderKit.equalsIgnoreCase(m.getRenderKitId()))\n familyRenderKitMatches.add(m);\n\n if (familyRenderKitMatches.isEmpty())\n {\n // if we get here, that means we couldn't find an exact\n // family/renderKitId match, so return the simple skin\n // that matches the renderKitId.\n if (_LOG.isFine())\n {\n _LOG.fine(\"SP_CANNOT_FIND_MATCHING_SKIN\", new Object[]{family, renderKit});\n }\n\n return null;\n }\n\n // at this point we know we have something in the familyRenderKitMatches\n // which is a list of matching family and renderKitId skins. Now match the version\n // to find the best matched skin.\n String versionName = version.getName();\n boolean versionIsDefault = version.isDefault();\n boolean foundMatchingSkin = false;\n\n // if the user didn't ask for the 'default' version, then look for the exact match\n if (!versionIsDefault)\n {\n matchingSkinMetadata = _findSkinMetadataForVersionName(familyRenderKitMatches, version);\n }\n\n // matchingSkinMetadata will be null if an exact version match (family+renderKitId+version)\n // was not found;\n // or if user was asking for a default version\n // we can have an exact version match if the user asks for null version,\n // and we find a skin with no\n // version set.\n if (matchingSkinMetadata == null || versionIsDefault)\n {\n // at this point either user is looking for default skin\n // or did not find the exact version match specified\n // so we find the default skin\n matchingSkinMetadata = _findSkinMetadataWithDefaultVersion(familyRenderKitMatches);\n\n if (matchingSkinMetadata == null)\n {\n // if we fail to find a default skin then\n // get the latest skin in the matchingSkinList if there is no skin marked default.\n if (_LOG.isFine())\n _LOG.fine(this + \" did not find default / version skinMetadata. so getting leaf skin\");\n\n matchingSkinMetadata = _findLeafSkinMetadata(familyRenderKitMatches);\n }\n else if ((matchingSkinMetadata != null) && versionIsDefault)\n {\n // found the default skin the user wanted\n if (_LOG.isFine())\n _LOG.fine(this + \" found default skinMetadata\");\n\n foundMatchingSkin = true;\n }\n }\n\n // log messages\n if (foundMatchingSkin)\n {\n if (_LOG.isFine())\n _LOG.fine(\"GET_SKIN_FOUND_SKIN_VERSION\",\n new Object[]{family, version, matchingSkinMetadata.getId()});\n }\n else if (matchingSkinMetadata != null)\n {\n if (_LOG.isFine())\n {\n if (\"\".equals(versionName))\n {\n _LOG.fine(\"GET_SKIN_CANNOT_FIND_NO_VERSION\",\n new Object[]{family, matchingSkinMetadata.getId()});\n }\n else\n {\n _LOG.fine(\"GET_SKIN_CANNOT_FIND_SKIN_VERSION\",\n new Object[]{family, version, matchingSkinMetadata.getId()});\n }\n }\n }\n\n if (matchingSkinMetadata == null)\n {\n matchingSkinMetadata = familyRenderKitMatches.get(familyRenderKitMatches.size() - 1);\n }\n }\n\n\n if (matchingSkinMetadata != null)\n if (_LOG.isFine())\n _LOG.fine(this + \" found matching metadata: \" + matchingSkinMetadata);\n\n return matchingSkinMetadata;\n }", "public static void main(String[] args) {\n\t\tint [][] input = {\r\n\t\t\t\t{1,2,3},\r\n\t\t\t\t{4,5,6},\r\n\t\t\t\t{7,8,9}\t\t\t\t\r\n\t\t};\r\n\t\tSystem.out.println(Find(input,13));\r\n\r\n\t}", "void findMatchings(boolean isProtein) {\n\n GraphDatabaseFactory dbFactory = new GraphDatabaseFactory();\n HashSet<String > searchSpaceList = new HashSet<>();\n GraphDatabaseService databaseService = dbFactory.newEmbeddedDatabase(graphFile);\n for (int id: queryGraphNodes.keySet()) {\n if(isProtein)\n searchSpaceList.add(queryGraphNodes.get(id).label);\n else\n searchSpaceList.add(String.valueOf(queryGraphNodes.get(id).labels.get(0)));\n }\n for(String x: searchSpaceList) {\n ResourceIterator<Node> xNodes;\n try(Transaction tx = databaseService.beginTx()) {\n xNodes = databaseService.findNodes(Label.label(x));\n tx.success();\n }\n\n while (xNodes.hasNext()) {\n Node node = xNodes.next();\n if (searchSpaceProtein.containsKey(x))\n searchSpaceProtein.get(x).add(node.getId());\n else {\n HashSet<Long> set = new HashSet<>();\n set.add(node.getId());\n searchSpaceProtein.put(x, set);\n }\n }\n\n }\n\n if(isProtein)\n search(0, databaseService, true);\n else\n search(0, databaseService, false);\n databaseService.shutdown();\n }", "public void addToBatch(DecalBatch batch) {\n\t\tbatch.add(car);\n\t}", "private void fetch(int i){\n // if Search completes succesfully\n if(searchOK(i)){// proceed to fetch\n int docs = Integer.parseInt(counts.get(i));\n int start = 0;\n // while end of results not reached\n // i.e. stops when the last document of the last batch (start + step) is grater than the total count of docs\n while(start < docs){\n //get next part of results\n fetchPart(i,start,step);\n start += step;\n }\n } else { // print a message for wrong search of specific query\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Fetch > No succesful search for query : \" + this.queries.get(i));\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic JSONArray findMatches(String query){\n\t\t\n\t\t// Increment the search tasks counter\n\t\t++numOfSearchTasks;\n\t\t\n\t\t// Start the timer for this task\n\t\tTimer.start();\n\t\t\n\t\t// Number of needed matches\n\t\tresultsToBeFound = 10;\n\t\t\n\t\t// Clear the matches list\n\t\tsetForTypeahead.clear();\n\t\t\n\t\t// The returned JSON array\n\t\tJSONArray arrayObj = new JSONArray();\n\t\t\n\t\t// Search in all predicates\n\t\tfor(int i = 0; i < predicatesList.size(); ++i){\n\t\t\tif(predicatesList.get(i).toLowerCase().contains(query.toLowerCase())){\n\t\t\t\tarrayObj.add(predicatesList.get(i));\n\t\t\t}\n\t\t\tArrayList<String> semanticRelations = semanticRelationsMap.get(query.toLowerCase());\n\t\t\tif(semanticRelations != null) {\n\t\t\t\tfor(String s : semanticRelations) {\n\t\t\t\t\tif(predicatesList.get(i).toLowerCase().contains(s.toLowerCase())){\n\t\t\t\t\t\tarrayObj.add(predicatesList.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Start the timer for this task\n\t\tTimer.start();\n\t\t\n\t\t// Search in index first\n\t\tCollection<Integer> list = in.search(query.toLowerCase());\n\t\tHashSet<Integer> output = null;\n\t\tif(list.size() > 0) {\n\t\t\toutput = (HashSet<Integer>) list;\n\t\t}\n\t\telse {\n\t\t\toutput = new HashSet<Integer>();\n\t\t}\n\n\t\t// If found a match, that's a hit\n\t\tif(output.size() > 0) {\n\t\t\t++numOfIndexHits;\n\t\t}\n\t\t\n\t\tfor(Integer index : output) {\n\t\t\tarrayObj.add(frequentLiteralsList.get(index));\n \t\t--resultsToBeFound;\n \t}\n\t\tdouble tempStopTime;\n\t\t// If all results were found in suffix tree\n\t\tif(resultsToBeFound < 0) {\n\t\t\tTimer.stop();\n\t\t\tsuffixTreeTime += Timer.getTimeInSeconds();\n\t\t\ttotalTime += Timer.getTimeInSeconds();\n\t\t\twriteStatsToFile();\n\t\t\treturn arrayObj;\n\t\t}\n\t\t\n\t\tTimer.stop();\n\t\tsuffixTreeTime += Timer.getTimeInSeconds();\n\t\ttempStopTime = Timer.getTimeInSeconds();\n\t\tTimer.start();\n\t\t// In length bins\n\t\t// Search in bins with a minimum length of the query\n\t\t// and a maximum of the query length + 10\n\t\tint minLength = query.length()-1;\n\t\tint maxLength = query.length() + 9;\n\t\t\n\t\tint minIndex = Integer.MAX_VALUE;\n\t\tint maxIndex = -1;\n\t\t\n\t\t// Determine which indices of the literals array\n\t\t// to search within\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\tpruningPercentage += 1 - (1.0 * (maxIndex - minIndex) / literalsList.size());\n\t\ttry{\n\t\tSystem.out.println(\"Searching for \" + query + \" between indeces: \" + minIndex + \n\t\t\t\t\" corresponding to length \" + (literalsList.get(minIndex).length()-5) +\n\t\t\t\t\" and \" + maxIndex + \" corresponding to length \" + \n\t\t\t\t(literalsList.get(maxIndex).length()-5));\n\t\t}\n\t\tcatch(IndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"query = \" + query);\n\t\t\tSystem.out.println(\"minIndex = \" + minIndex);\n\t\t\tSystem.out.println(\"maxIndex = \" + maxIndex);\n\t\t}\n\t\t\n\t\t// Assign threads to search tasks\n\t\tint indexesPerThread = (maxIndex - minIndex) / (numOfCores);\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 SearchTask(i, i + indexesPerThread, query)));\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// Stop timer\n\t\tTimer.stop();\n\t\ttotalTime += tempStopTime + Timer.getTimeInSeconds();\n\t\t\n\t\t// Sort by length\n\t\tArrayList<String> tempList = new ArrayList<String>();\n\t\tfor(String string : setForTypeahead) {\n\t\t\tif(!arrayObj.contains(string))\n\t\t\t\ttempList.add(string);\n\t\t}\n\t\tjava.util.Collections.sort(tempList, new LengthComparator());\n\t\t\n\t\t// Fill the array\n\t\tfor(int i = 0; i < tempList.size() && resultsToBeFound > 0; ++i, --resultsToBeFound) {\n\t\t\tarrayObj.add(tempList.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Update the stats file with number of tasks and hits\n\t\twriteStatsToFile();\n\t\t\n\t\treturn arrayObj;\n\t}", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "List<Label> findAllByKey(String key);", "public ContentEntry find(String[] keys, Object[] values);", "public Collection search(Collection instances, Slot slot, String operation, Object obj) {\n ArrayList resultInstances = new ArrayList();\n Iterator i = instances.iterator();\n String value = (String) obj;\n while (i.hasNext()) {\n Instance instance = (Instance) i.next();\n if (testSymbol(getTestIndex(operation), instance, slot, value))\n resultInstances.add(instance);\n }\n return resultInstances;\n }", "@Test(groups = { \"unittest\", \"postiontests\" })\n public void testMatchOnlineAndBatch() throws Exception {\n BatchPositionCache batchCache = loadTestBatchFile();\n\n assertTrue(batchCache.size() > 0, \"Failed to read batch records\");\n \n // check that we have the records we need\n BatchPosition bp1 = batchCache.getCacheItem(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(96)));\n assertNotNull(bp1, \"Failed to find TUU8 for NDayBreak position 96\");\n assertComparable(bp1.getFullCurrentNetPosition(), new BigDecimal(7200000), \"Current position is wrong\");\n \n BatchPosition bp2 = batchCache.getCacheItem(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(-96)));\n assertNotNull(bp2, \"Failed to find TUU8 for NDayBreak position -96\");\n assertComparable(bp2.getFullCurrentNetPosition(), new BigDecimal(7200000), \"Current position is wrong\");\n \n // Build the online cache\n OnlinePositionAggregateCache onlineCache = loadTestOnlineFile(); \n \n assertTrue(onlineCache.size() > 0, \"Failed to read in online records\");\n \n // check that we have the records we need\n RtfOnlinePosition op1 = onlineCache.getOnlinePosition(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(96)));\n assertNotNull(op1, \"Failed to find TUU8 for NDayBreak position 96\");\n assertEquals(op1.getPrimeBroker(), \"NO PB\", \"Wrong record found\");\n assertEquals(op1.getCurrentPosition(), BigDecimal.ZERO, \"Current position is wrong\");\n \n RtfOnlinePosition op2 = onlineCache.getOnlinePosition(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(-96)));\n assertNotNull(op2, \"Failed to find TUU8 for NDayBreak position -96\");\n assertEquals(op2.getPrimeBroker(), \"GSFUT\", \"Wrong record found\");\n assertEquals(op2.getCurrentPosition(), BigDecimal.ZERO, \"Current position is wrong\");\n }", "Iterable<Entry<K, V>> find(LegacyFindByCondition find);", "SearchResult getBestResult(List<SearchResult> results, SearchQuery query);", "private void searchFunction() {\n\t\t\r\n\t}", "String getBatchFinderName();" ]
[ "0.5750046", "0.52001506", "0.5119503", "0.51178616", "0.50988835", "0.5031193", "0.50202245", "0.50042266", "0.4986327", "0.4965662", "0.4945816", "0.49442852", "0.49276394", "0.48901907", "0.48643216", "0.4818649", "0.48174566", "0.47864068", "0.4780132", "0.47115493", "0.47039026", "0.46974534", "0.46669912", "0.46362102", "0.4626477", "0.46108836", "0.46082368", "0.45994094", "0.459389", "0.45896003", "0.45797205", "0.45711437", "0.45635822", "0.45604837", "0.45559925", "0.455497", "0.45533952", "0.4521415", "0.45203263", "0.45155483", "0.45095587", "0.44892064", "0.44851115", "0.44769898", "0.44717795", "0.44705668", "0.44693115", "0.44675386", "0.44637218", "0.44609812", "0.44528913", "0.44524422", "0.443702", "0.44250375", "0.44180837", "0.44030192", "0.440051", "0.43993112", "0.43983635", "0.4397136", "0.43944758", "0.43910438", "0.43893185", "0.43840164", "0.43566558", "0.43565628", "0.4355302", "0.43517336", "0.43513235", "0.43495825", "0.43479392", "0.4343722", "0.4336944", "0.43339747", "0.43289712", "0.43263796", "0.4324862", "0.4324432", "0.43188143", "0.43135053", "0.43102896", "0.4304046", "0.43026733", "0.4295179", "0.42945284", "0.42885977", "0.42774644", "0.42761582", "0.42753297", "0.42741027", "0.42635152", "0.4262396", "0.4250937", "0.42500177", "0.42496198", "0.4249056", "0.42463106", "0.42411804", "0.4240538", "0.42392683" ]
0.5902463
0
Searches for the specified record then returns its values
public ArrayList<Value> getAll(Record record) throws DatabaseException { PreparedStatement stmt = null; ResultSet rs = null; ArrayList<Value> valueList = new ArrayList<Value>(); try { String sql = "SELECT * FROM \"values\" WHERE recordID = " + Integer.toString(record.getRecordID()); stmt = db.getConnection().prepareStatement(sql); rs = stmt.executeQuery(); while(rs.next()) { Value value = new Value(); value.setValueID(rs.getInt(1)); value.setRecordID(rs.getInt(2)); value.setFieldID(rs.getInt(3)); value.setBatchID(rs.getInt(4)); value.setProjectID(rs.getInt(5)); value.setData(rs.getString(6)); valueList.add(value); } } catch(SQLException e) { throw new DatabaseException(); } return valueList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] findRecord(String county){\n String[] found = null;\n\n for (String[] record : records ) {\n\n if (record[0].equalsIgnoreCase(county)){\n found = record;\n break;\n }\n }\n\n return found;\n }", "public Set<RecordPair> match(Record record) throws ApplicationException;", "public OpenERPRecord search(String fieldname, Object search) {\r\n\t\t// no finds if nothing is to be found\r\n\t\tif (fieldname == null)\r\n\t\t\treturn null;\r\n\r\n\t\t// do this with all records\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord r = i.next();\r\n\r\n\t\t\t// if there is a fieldname\r\n\t\t\tif (r.containsKey(fieldname)) {\r\n\r\n\t\t\t\tObject value = r.get(fieldname);\r\n\t\t\t\t// is there corresponding content\r\n\t\t\t\t// null value would not have .equals, so compare directly\r\n\t\t\t\tif (value == null) {\r\n\t\t\t\t\tif (search == null)\r\n\t\t\t\t\t\treturn r;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (value.equals(search))\r\n\t\t\t\t\t\treturn r;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// no corresponding value found?\r\n\t\treturn null;\r\n\t}", "public Object findRecord(Object key) \n\t{\n\t check(\"find\", key);\n \n\t Object record = htRecords.get(key);\n\t if ( record != null )\n\t {\n\t\t //--- Return a copy of the record\n\t return copy ( record );\n\t }\n\t else\n\t {\n\t return null ;\n\t }\n\t}", "void getValues(long id, Map<String,Object> record);", "public R onFindForObject(final R record) {\n return record;\n // can be overridden.\n }", "public List<Record> findRecordByExample(final RecordExample example);", "public String[] findRecord(int happiness){\n\n String[] result = null;\n\n for (String[] record:records) {\n\n if (Integer.parseInt(record[1]) == happiness){\n result = record;\n break;\n }\n }\n\n return result;\n }", "public @NonNull R getFoundRecord() {\n if (!foundItems.isEmpty()) {\n return foundItems.get(recordIndex);\n// assert foundRecord != null;\n// return Objects.requireNonNull(foundRecord);\n }\n R emptyRecord = createNewEmptyRecord();\n foundItems.add(emptyRecord);\n fireModelListChanged(); // Is it dangerous to fire the listener before returning the record?\n return emptyRecord;\n }", "public NsSearchResult<RecT> search() {\n Object searchRecord = toNativeQuery();\n NsSearchResult<RecT> result = clientService.search(searchRecord);\n if (!result.isSuccess()) {\n NetSuiteClientService.checkError(result.getStatus());\n }\n return result;\n }", "@Override\n\tpublic void searchByID() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's ID\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public Patient[] findID(String sv)\r\n\t{\r\n\t\tPatient[] foundPatients = new Patient[999];//Creates a blank array\r\n\t\tint count = 0;\r\n\r\n\t\tfor(int i=0; arrayPatients[i]!=null ;i++)//loops through the array\r\n\t\t{\r\n\t\t\tif(arrayPatients[i].forename.contains(sv)||arrayPatients[i].surname.contains(sv))//sees if either surname or firstname contain the search term allowing for partieal searching\r\n\t\t\t{\r\n\t\t\t\tfoundPatients[count] = arrayPatients[i];//if found it adds the patient to an array\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn foundPatients;//that array is then returned\r\n\t}", "public void search(String LastName)\n {\n //delare variables to hold file types\n BufferedReader fIn = null;\n \n //try to open the file for reading\n try\n {\n fIn = new BufferedReader(new FileReader(filename)); \n \n }\n catch(IOException ioe)\n {\n System.out.println(\"search: Exception opening the file\");\n }\n \n //try to read each record\n //if the value of the Last_name field equals the value\n /*\n create a counter to count the number of\n matching records\n */\n int counter = 0;\n \n try\n {\n //read the first record\n String line = fIn.readLine();\n \n //while the record is not null\n //split the record into fields\n //test if the field equals the LastName parameter\n //display the record and increment the counter\n //read the next record\n while(line != null)\n {\n String[] info = line.split(\",\");\n String last = info[0];\n if(last.equals(LastName))\n {\n System.out.print(line);\n counter += 1;\n }\n else\n {\n line = fIn.readLine();\n System.out.print(line);\n counter += 1;\n }\n line = fIn.readLine();\n }\n System.out.println(\"\\nTotal matching records found: \" + counter + \"\\n\");\n \n \n }\n catch(IOException ioe)\n {\n System.out.println(\"search: Exception reading the file\");\n }\n\n // try to close the file\n try\n {\n fIn.close(); \n \n }\n catch(IOException ioe)\n {\n System.out.println(\"search: Exception closing the file\");\n }\n \n //dislay a count of the records found\n \n \n }", "private Collection<Record> getResults(SimpleSurnameAndPostcodeQuery query) {\n\t\treturn search(query);\n\t}", "static SearchResult<AccountHolder> getHolders(String no) throws RecordSearchException {\n String condition = \"AccountNo = '\" + no + \"'\";\n\n LinkedList<Record> records = AccountHolderTable.getInstance().read(condition);\n\n if (records == null || records.size() == 0) {\n throw new RecordSearchException();\n }\n\n try {\n SearchResult<AccountHolder> holders = new SearchResult<>();\n\n for (LinkedHashMap<String, Object> record : records) {\n holders.add(new AccountHolder(record));\n }\n\n return holders;\n } catch (SchemaCreationException e) {\n Logger.error(e);\n\n throw new RecordSearchException(\"Error reading records from the Database\");\n }\n }", "io.dstore.values.StringValue getSearchValue();", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic Collection<Tags> read(Records record) {\n\t\tSystem.out.println(\"TagsDAO: read by record: retrieving tags based on record id's...\");\n\t\tString query = \"select Tags from Records, Tags where Record=\"+record.getId();\n\t\tCollection<Tags> tags = (Collection<Tags>)entityMgr.createQuery(query).getResultList();\n\t\treturn tags;\n\t}", "public Record readRecord(int recordId) {\n return records[recordId];\n }", "public List findRecords(String informationType, String queryString) throws DatabaseException;", "public OpenERPRecord get(String key, Object value) {\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord n = i.next();\r\n\t\t\tif (!n.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\t\t\tif ((n.get(key) == null) && (value == null))\r\n\t\t\t\treturn n;\r\n\t\t\tif (n.get(key).equals(value))\r\n\t\t\t\treturn n;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "SyncRecord findObject(String name, int type) throws NotFoundException\r\n\t{\r\n\t\tfor (int i=0; i<syncTable.size(); i++)\r\n\t\t{\r\n\t\t\tSyncRecord myrec = (SyncRecord)syncTable.elementAt(i);\r\n\t\t\tif ((myrec.name).equals(name) && (myrec.type)==type)\r\n\t\t\t\treturn myrec;\r\n\t\t}\r\n\t\tthrow new NotFoundException();\r\n\t}", "Iterable<Entry<K, V>> find(LegacyFindByCondition find);", "public native Record find(Map properties) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordJS = self.find(@com.smartgwt.client.util.JSOHelper::convertMapToJavascriptObject(Ljava/util/Map;)(properties));\r\n return recordJS == null || recordJS === undefined ? null : @com.smartgwt.client.data.Record::getOrCreateRef(Lcom/google/gwt/core/client/JavaScriptObject;)(recordJS);\r\n }-*/;", "public Page searchOneRecord(String sql) {\n return mysqlDao.searchOneRecord(sql);\n }", "public Record find(String key) {\n\t\tint hash = toHashKey(key);\n\t\tint baseValue = (baseHash(hash,length))% length;\n\t\tif (Table[baseValue].hash == -1){ //If slot is empty\n\t\t\treturn null;\n\t\t}\n\t\telse if (Table[baseValue].key.equals(key)){ //if the slot is the key we are looking for\n\t\t\treturn Table[baseValue];\n\t\t}\n\t\telse {\n\t\t\tint step = (stepHash(hash,length)); //checks first slot after base\n\t\t\tint current = (baseValue + step)% length; //checks first slot after base\n\t\t\twhile (current != baseValue){ //cycle through table until reaching first value again\n\t\t\t\tif (Table[current].hash == -1){//If slot is empty\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\telse if (Table[current].key.equals(key)){ //if the slot is the key we are looking for\n\t\t\t\t\treturn Table[current];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent = (current + step) % length; //Cycle through table without going over the newlength\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "RecordResult retrieveRecord(String recordID) throws RepoxException;", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "private ClientModel getRecords(final String searchText) {\n\t\tthis.model = new ClientModel();\n\t\tlong[] recNoArray = null;\n\n\t\tif (this.applicationMode == ApplicationMode.STANDALONE_CLIENT) {\n\t\t\tif (searchText == null || searchText.equals(\"\")) {\n\t\t\t\trecNoArray = this.database.findByCriteria(null);\n\t\t\t} else {\n\t\t\t\tfinal String[] search = new String[this.model.getColumnCount()];\n\t\t\t\tsearch[this.model.findColumn(\"Name\")] = searchText;\n\t\t\t\tsearch[this.model.findColumn(\"Location\")] = searchText;\n\t\t\t\trecNoArray = this.database.findByCriteria(search);\n\t\t\t}\n\n\t\t\tfor (final long recNo : recNoArray) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.model\n\t\t\t\t\t\t\t.addRecord(this.database.readRecord(recNo), recNo);\n\t\t\t\t} catch (final RecordNotFoundException rnfe) {\n\t\t\t\t\tthis.log.log(Level.WARNING, rnfe.getMessage(), rnfe);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Cannot retrieve record: \" + rnfe.getMessage(),\n\t\t\t\t\t\t\t\"Warning\", Level.WARNING);\n\n\t\t\t\t\tSystem.err.println(\"Cannot retrieve record: \"\n\t\t\t\t\t\t\t+ rnfe.getMessage());\n\t\t\t\t\trnfe.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.applicationMode == ApplicationMode.NETWORKED_CLIENT) {\n\t\t\tif (searchText == null || searchText.equals(\"\")) {\n\t\t\t\ttry {\n\t\t\t\t\trecNoArray = this.remoteDatabase.findByCriteria(null);\n\t\t\t\t} catch (final RemoteException re) {\n\t\t\t\t\tthis.log.log(Level.SEVERE, re.getMessage(), re);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage(), \"Error\", Level.SEVERE);\n\n\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t.println(\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage());\n\t\t\t\t\tre.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfinal String[] search = new String[this.model.getColumnCount()];\n\t\t\t\tsearch[this.model.findColumn(\"Name\")] = searchText;\n\t\t\t\tsearch[this.model.findColumn(\"Location\")] = searchText;\n\t\t\t\ttry {\n\t\t\t\t\trecNoArray = this.remoteDatabase.findByCriteria(search);\n\t\t\t\t} catch (final RemoteException re) {\n\t\t\t\t\tthis.log.log(Level.SEVERE, re.getMessage(), re);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage(), \"Error\", Level.SEVERE);\n\n\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t.println(\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage());\n\t\t\t\t\tre.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (final long recNo : recNoArray) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.model.addRecord(this.remoteDatabase.readRecord(recNo),\n\t\t\t\t\t\t\trecNo);\n\t\t\t\t} catch (final RemoteException re) {\n\t\t\t\t\tthis.log.log(Level.SEVERE, re.getMessage(), re);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage(), \"Error\", Level.SEVERE);\n\n\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t.println(\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage());\n\t\t\t\t\tre.printStackTrace();\n\t\t\t\t} catch (final RecordNotFoundException rnfe) {\n\t\t\t\t\tthis.log.log(Level.WARNING, rnfe.getMessage(), rnfe);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Cannot retrieve record: \" + rnfe.getMessage(),\n\t\t\t\t\t\t\t\"Warning\", Level.WARNING);\n\n\t\t\t\t\tSystem.err.println(\"Cannot retrieve record: \"\n\t\t\t\t\t\t\t+ rnfe.getMessage());\n\t\t\t\t\trnfe.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.log.severe(\"Client controller started with incorrect Application Mode. Exiting application\");\n\t\t\tthis.clientUI\n\t\t\t\t\t.showError(\n\t\t\t\t\t\t\t\"Client controller started with incorrect Application Mode. Exiting application\",\n\t\t\t\t\t\t\t\"Error\", Level.SEVERE);\n\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\treturn this.model;\n\t}", "@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's name\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t}", "public EmployeeInfo searchFromTable(int employeeNum){\r\n \r\n int targetBucket = calcBucket(employeeNum);\r\n \r\n\t\tfor(int i = 0 ; i < buckets[targetBucket].size(); i++) {\r\n\t\t\tif (buckets[targetBucket].get(i).getEmpNum() == employeeNum) {\r\n EmployeeInfo locatedEmployee = buckets[targetBucket].get(i);\r\n return locatedEmployee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n \r\n }", "java.lang.String getSearchValue();", "public int searchEmployeeById(int id, ArrayList<Employee> records)\n { \n for (int index = 0; index < records.size(); index++) \n {\n if (records.get(index).getEmployeeId() == id)\n return index;\n }\n return -1;\n }", "@Override\r\n public ArrayList<Object> getRecords(String criteria) throws SQLException {\r\n\r\n ArrayList<Object> rows = new ArrayList<>();\r\n\r\n String sql = \"select * from patient\";\r\n\r\n //append any search criteria\r\n if (criteria != null) {\r\n sql += criteria;\r\n }\r\n \r\n logger.info(\"Search patient: \" + sql);\r\n \r\n try (PreparedStatement pStatement = connection.prepareStatement(sql);\r\n ResultSet resultSet = pStatement.executeQuery();) {\r\n while (resultSet.next()) {\r\n PatientBean pb = new PatientBean();\r\n pb.setPatientID(resultSet.getLong(\"PatientID\"));\r\n pb.setLastName(resultSet.getString(\"LastName\"));\r\n pb.setFirstName(resultSet.getString(\"FirstName\"));\r\n pb.setDiagnosis(resultSet.getString(\"Diagnosis\"));\r\n pb.setAdmissionDate(resultSet.getTimestamp(\"AdmissionDate\"));\r\n pb.setReleaseDate(resultSet.getTimestamp(\"ReleaseDate\"));\r\n\r\n ArrayList<Object> ib = inpatientDAOImpl.getRecords(\" where patientID = \" + pb.getPatientID());\r\n if (ib != null && ib.size() > 0) {\r\n pb.setIb(ib);\r\n }\r\n\r\n ArrayList<Object> sb = surgicalDAOImpl.getRecords(\" where patientID = \" + pb.getPatientID());\r\n if (sb != null && sb.size() > 0) {\r\n pb.setSb(sb);\r\n }\r\n\r\n ArrayList<Object> mb = medicationDAOImpl.getRecords(\" where patientID = \" + pb.getPatientID());\r\n if (mb != null && mb.size() > 0) {\r\n pb.setMb(mb);\r\n }\r\n\r\n rows.add(pb);\r\n }\r\n }\r\n\r\n logger.info(\"patient records have been saved to ArrayList, size: \" + rows.size());\r\n\r\n return rows;\r\n\r\n }", "private void searchHashMap(String[] searchKey, String callNumber,int startYear, int endYear) {\n\t\t/* Temporarily stores next 'values' for a title keyword */\n\t\tArrayList<Integer> tempStore = new ArrayList<Integer>();\n\t\t/* Stores only the intersection 'values' of title keywords */\n\t\tCollection<Integer> intersection = new ArrayList<Integer>();\n\t\t/* Counts number of keywords found */\n\t\tint foundKeys = 0;\n\n\t\t/* Loop to iterate through title keywords and get key-value pair intersection */\n\t\tfor (String key : searchKey) {\n\t\t\tif (titleHashMap.containsKey(key)) {\n\t\t\t\tfoundKeys = foundKeys + 1;\n\t\t\t\ttempStore.addAll((titleHashMap.get(key))); /* Stores all found values */\n\t\t\t\tif (intersection.size() == 0) {\n\t\t\t\t\tintersection.addAll(titleHashMap.get(key));\n\t\t\t\t}\n\t\t\t\tintersection.retainAll(tempStore); /* Stores only common 'values' */\n\t\t\t\ttempStore.clear(); /* Clears temporary array*/\n\t\t\t}\n\t\t}\n\n\t\t/* Checks if all keywords were found */\n\t\tif(searchKey.length == foundKeys){\n\t\t/* Performs search of other fields via the reduced list of 'values' for matched record */\n\t\tfor (Integer i : intersection) {\n\t\t\tif ((callNumber.equals(\"\") || items.get(i.intValue()).getCallNumber().equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (items.get(i.intValue()).getYear() >= startYear && items.get(i.intValue()).getYear() <= endYear)) {\n\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\tSystem.out.println(items.get(i.intValue())); /* Prints found records from master list 'Reference' */\n\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t}\n\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Mobile\").toString().equals(search)) {\n\t\t\t\tpMob = jsnobj.get(\"Mobile\").toString();\n\t\t\t\tpName = jsnobj.get(\"Patient's name\").toString();\n\t\t\t\tpId = jsnobj.get(\"Patient's ID\").toString();\n\t\t\t\tSystem.out.print(++count + \" Name:\" + pName + \" ID:\" + pId + \" Mobile:\" + pMob + \" Age:\"\n\t\t\t\t\t\t+ jsnobj.get(\"Age\") + \"\\n\\n\");\n\t\t\t}\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "protected abstract boolean handleRecord(T mainRecord, T lookupRecord);", "public static Map<String, Long> searchFirstName(){\n boolean keepLooping = true;\n Map<String, Long> outputMap;\n do{\n outputMap = new HashMap<>();\n myScanner.nextLine();\n System.out.println(\"\\nEnter your search string: \\n\");\n String searchTerm = myScanner.next();\n myScanner.nextLine();\n\n for(Contact result : contactObjList){\n String firstName = result.getFirstName();\n if(firstName.toLowerCase().contains(searchTerm.toLowerCase())){\n outputMap.put(result.toContactString(), result.getId());\n }\n }\n if(outputMap.size() == 0){\n System.out.println(\"\\nNo results found.\\n\");\n } else {\n System.out.println(\"\\nHere are your search results:\\n\");\n }\n for(Map.Entry<String, Long> entry : outputMap.entrySet()){\n System.out.println(entry.getKey());\n }\n System.out.println(\"\\n\");\n int userSelect = selectFromList(repeatAction);\n if (userSelect==1){\n keepLooping=false;\n }\n } while(keepLooping);\n return outputMap;\n }", "public void searchPerson() {\r\n\r\n\t/*get values from text filed*/\r\n\tname = tfName.getText();\r\n\r\n\t/*clear contents of arraylist if there are any from previous search*/\r\n\tpersonsList.clear();\r\n\r\n // intialize recordNumber to zero\r\n\trecordNumber = 0;\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to search.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*get an array list of searched persons using PersonDAO*/\r\n\t\tpersonsList = pDAO.searchPerson(name);\r\n\r\n\t\tif(personsList.size() == 0)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No record found.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/*downcast the object from array list to PersonInfo*/\r\n\t\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\t\ttfName.setText(person.getName());\r\n\t\t\ttfAddress.setText(person.getAddress());\r\n\t\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\t\ttfEmail.setText(person.getEmail());\r\n\t\t}\r\n\t}\r\n\r\n }", "public DocumentDetails searchDoc(int biblio_id, int record_no, String library_id, String sub_library_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n\n DocumentDetails obj=null;\n\n try {\n session.beginTransaction();\n Criteria criteria = session.createCriteria(DocumentDetails.class).add(Restrictions.conjunction().add(Restrictions.eq(\"id.libraryId\", library_id)).add(Restrictions.eq(\"id.sublibraryId\", sub_library_id)).add(Restrictions.eq(\"biblioId\", biblio_id)).add(Restrictions.eq(\"recordNo\", record_no)));\n obj= (DocumentDetails) criteria.uniqueResult();\n session.getTransaction().commit();\n } catch(Exception e){\n e.printStackTrace();\n }\n finally {\n session.close();\n }\n return obj;\n }", "List<DataTerm> search(String searchTerm);", "void findRec () {\r\n\r\n\t\tboolean found = false;\r\n\t\tfor (int x = 0; x < total; x++) {\r\n\t\t\tif (records[x][0].equals (txtNo.getText())) {\r\n\t\t\t\tfound = true;\r\n\t\t\t\tJOptionPane.showMessageDialog (this, \"Account No. \" + txtNo.getText () + \" is Already Exist.\",\r\n\t\t\t\t\t\t\t\"BankSystem - WrongNo\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\ttxtClear ();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (found == false) {\r\n\t\t\tsaveArray ();\r\n\t\t}\r\n\r\n\t}", "public List findRecordsFrom(String informationType, Date date) throws DatabaseException;", "@In String search();", "private WordRecord lookUp(String word)\n {\n int contains = 0;\n boolean check = false;\n //loops through concordance\n for(int i = 0; i < this.concordance.size();i++)\n {\n //checks to see if the words are equal\n if(word.equalsIgnoreCase(this.concordance.get(i).getWord()))\n {\n //gets location of what position the word is true\n contains = i;\n check = true;\n }\n \n }\n //checks to see if it was found in concordance\n if(check)\n return this.concordance.get(contains);\n \n return null;\n }", "private SortedMap searchByPID(Person person, IcsTrace trace) {\n\t\tProfile.begin(\"PersonIdServiceBean.searchByPID\");\n\n\t\tTreeMap ret = new TreeMap();\n\t\tDatabaseServices dbServices = DatabaseServicesFactory.getInstance();\n\n\t\ttry {\n\t\t\tList matches = null;\n\n\t\t\tIterator ids = person.getPersonIdentifiers().iterator();\n\n\t\t\tQueryParamList params = new QueryParamList(QueryParamList.OR_LIST);\n\t\t\twhile (ids.hasNext()) {\n\t\t\t\tQueryParamList inner = new QueryParamList(\n\t\t\t\t\t\tQueryParamList.AND_LIST);\n\t\t\t\tPersonIdentifier pid = (PersonIdentifier) ids.next();\n\t\t\t\tinner.add(AttributeType.PERSON_IDENTIFIER, pid.getId());\n\t\t\t\tinner.add(AttributeType.AA_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningAuthority().getNameSpaceID());\n\t\t\t\tinner.add(AttributeType.AF_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningFacility().getNameSpaceID());\n\t\t\t\tparams.add(inner);\n\t\t\t}\n\t\t\tmatches = dbServices.query(params);\n\n\t\t\tif (trace.isEnabled()) {\n\t\t\t\ttrace.add(\"Persons that match PIDS:\");\n\t\t\t\tIterator i = matches.iterator();\n\t\t\t\twhile (i.hasNext())\n\t\t\t\t\ttrace.add((Person) i.next());\n\t\t\t}\n\n\t\t\tIterator i = matches.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tPerson match = (Person) i.next();\n\t\t\t\tret.put(new Double(1.0), match);\n\t\t\t}\n\t\t} catch (DatabaseException dbEx) {\n\t\t\tlog.error(dbEx, dbEx);\n\t\t} finally {\n\t\t\tProfile.end(\"PersonIdServiceBean.searchByPID\");\n\t\t}\n\n\t\treturn ret;\n\t}", "public List<R> onFindForList(final List<R> records) {\n for (final R record : records) {\n onFindForObject(record);\n }\n // can be overridden.\n return records;\n }", "public native int indexOf(Record record) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n return self.indexOf([email protected]::getJsObj()());\r\n }-*/;", "abstract public void search();", "void search();", "void search();", "private void findEntry() {\n String desiredId = idField.getText();\n Student student = studentHashMap.get(desiredId);\n\n try {\n if (student == null) {\n throw new NoMatchFoundException();\n } else if (this.checkInput(student) == false) {\n throw new InputMismatchException();\n } else if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"EMPLID: \" + desiredId + \"\\n\" + student.toString(),\n \"Find\",\n JOptionPane.INFORMATION_MESSAGE\n );\n } else {\n throw new NoMatchFoundException();\n }\n } catch(NoMatchFoundException ex) {\n this.displayStatusPanel(\n \"Error: Entry not found.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } catch(InputMismatchException e) {\n this.displayStatusPanel(\n \"Error: Information does not match data on file.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n }\n }", "public Student getStudent(String match);", "List<Card> search(String searchString, long userId) throws PersistenceCoreException;", "List<Card> search(String searchString) throws PersistenceCoreException;", "public ArrayList<MedicalRecord> getPatientRecords(String patient) {\n if (database.containsKey(patient)) {\n return database.get(patient);\n } else {\n System.out.println(\"No such patient found\");\n return null;\n }\n }", "default E find(String key, Object value) {\n\t\tSearchCritera searchCritera = new SearchCritera(key, value);\n\t\treturn find(() -> searchCritera);\n\t}", "public Reference search (String val) {\n Node nextPtr = ptrs[this.findPtrIndex(val)];\n return nextPtr.search(val);\n }", "private Collection<Record> handleRequest(SearchRequest request) {\n\t\tCollection<Record> resultSet = getResults(request.getQuery());\n\t\treturn resultSet;\n\t}", "public Set<RecordReturn> loadRecordReturns();", "public Data getDataContaining(Address addr);", "private final List<Object> searchForResults(@Nullable String query)\n {\n ArrayList<Object> results = new ArrayList<>();\n try {\n results.addAll(crDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the cr dao for results.\", e);\n }\n\n try {\n results.addAll(customMonsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the custom monster dao for results.\", e);\n }\n\n try {\n results.addAll(monsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the standard monster dao for results.\", e);\n }\n\n return results;\n }", "RecordLike selectByPrimaryKey(String id);", "public ArrayList<String[]> searchField(String phone)\n\t{\n\t\tArrayList<Customer> customers = CustomerContainer.getInstance().getCustomers();\t\n\t\tArrayList<String[]> data = new ArrayList<>();\n\t\tif (customers == null)\n\t\t{\n\t\t\treturn data;\n\t\t}\n\t\tfor (Customer customer : customers)\n\t\t{\n\t\t\tif (Integer.toString(customer.getPhone()).contains(phone))\n\t\t\t{\n\t\t\t\tdata.add(customer.tableFill());\n\t\t\t}\n\t\t}\n\t\treturn data;\n\t}", "List<TransactionRec> loadRecordsByAccount(BankAccount account);", "public String[] search(String tableName, String[] keyValue) {\r\n List<String> retVal = new ArrayList<String>();\r\n Connection con = null;\r\n Statement stmt = null;\r\n try {\r\n con = ConnectionManager.getInstance().getConnection(databaseName);\r\n stmt = con.createStatement();\r\n TableObject table = _create(tableName);\r\n if (table != null) {\r\n StringBuffer whereClause = new StringBuffer();\r\n for (int i = 0; i < keyValue.length; i++) {\r\n String[] kV = keyValue[i].split(\"=\");\r\n if (whereClause.length() < 1) {\r\n whereClause.append(\" AND \");\r\n }\r\n int multi = kV[1].indexOf(\",\");\r\n boolean isChar = false;\r\n TableField field = table.fields.get(kV[0]);\r\n isChar = field.fieldType.startsWith(\"VARCHAR\");\r\n if(multi < 0){\r\n if(isChar){\r\n whereClause.append( kV[0] + \" LIKE '%\" + kV[1] + \"%' \");\r\n }else{\r\n field.setValue(kV[1]);\r\n whereClause.append(kV[0] + \" = \" + convertValue(field));\r\n }\r\n }else{\r\n whereClause.append(kV[0] + \" in (\" + kV[0] + \") \");\r\n }\r\n }\r\n String searchQry = \"SELECT \" + table.key + \" FROM \" + tableName + \" WHERE \" + whereClause.toString();\r\n ResultSet rs = stmt.executeQuery(searchQry);\r\n while (rs.next()) {\r\n String keyVal = rs.getString(1);\r\n retVal.add(retrieve(tableName, keyVal));\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n } finally {\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n }\r\n if (con != null) {\r\n try {\r\n //con.close();\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n }\r\n }\r\n return (String[])retVal.toArray();\r\n }", "Integer find(Object[] o){\n\t try {\n\t\t\n\t ResultSet rs = SQLBot.bot.query(\"SELECT ID FROM Contracts WHERE Start_Date='\"+o[sd]+\n\t\t\t\t\t \"' AND abs(\"+sqlCol+\"-\"+o[tc]+\") <= 0.001\");\n\t //System.out.println(\"SELECT Customer_ID FROM Contracts WHERE Start_Date='\"+o[sd]+\n\t //\t\t \"' AND abs(\"+sqlCol+\"-\"+o[tc]+\") <= 0.001\");\n\t //check if it matches name\n\t ArrayList<Integer> acc = new ArrayList<Integer>();\n\t while(rs.next()){\n\t\tacc.add(rs.getInt(1));}\n\n\t for (int val: acc) if (nameMatch(val, (String)o[fn], (String)o[ln])) return val;\n\n\t } catch (Exception e){e.printStackTrace();}\n\t return null;\n\t}", "@Override\n\tpublic Object[] findArrValue(String hql, List<Object> params, Integer page,\n\t\t\tInteger pageSize) {\n\t\treturn logDao.findArrValue(hql, params, page, pageSize);\n\t}", "private void selectFieldRows(Connection con,\n IdentifiedRecordTemplate template, GenericDataRecord record)\n throws SQLException, FormException, CryptoException {\n PreparedStatement select = null;\n ResultSet rs = null;\n \n try {\n select = con.prepareStatement(SELECT_FIELDS);\n select.setInt(1, record.getInternalId());\n rs = select.executeQuery();\n Map<String, String> rows = new HashMap<String, String>();\n while (rs.next()) {\n String fieldName = rs.getString(\"fieldName\");\n String fieldValue = rs.getString(\"fieldValue\");\n \n rows.put(fieldName, fieldValue);\n }\n \n if (template.isEncrypted()) {\n rows = getEncryptionService().decryptContent(rows);\n }\n \n for(String fieldName : rows.keySet()) {\n Field field = record.getField(fieldName);\n String fieldValue = rows.get(fieldName);\n if (field != null) {// We have found a field corresponding to the fieldName\n SilverTrace.debug(\"form\", \"GenericRecordSetManager.selectFieldRows\",\n \"root.MSG_GEN_PARAM_VALUE\", \"fieldName=\" + fieldName + \", fieldValue=\" + fieldValue);\n field.setStringValue(fieldValue);\n }\n }\n } finally {\n DBUtil.close(rs, select);\n }\n }", "long findValues(List<Object> values, List<Column> columns);", "public Vector searchFile(String str){\r\n Vector search = new Vector();\r\n\r\n /* Search corresponding to title */\r\n Vector titleLoc = (Vector) titleHashTable.get(str);\r\n if (titleLoc != null) { // title matches\r\n for(int i=0 ;i < titleLoc.size(); i++){\r\n if(((FileLocation)titleLoc.elementAt(i)).record.isConnected)\r\n search.addElement(titleLoc.elementAt(i));\r\n }\r\n }\r\n\r\n Vector artistLoc = (Vector) artistHashTable.get(str);\r\n if (artistLoc != null) {\r\n for(int i=0 ;i < artistLoc.size();i++){\r\n if(((FileLocation)artistLoc.elementAt(i)).record.isConnected)\r\n search.addElement(artistLoc.elementAt(i));\r\n }\r\n }\r\n\r\n Vector albumLoc = (Vector) albumHashTable.get(str);\r\n if (albumLoc != null) {\r\n for(int i=0 ;i<albumLoc.size();i++){\r\n if(((FileLocation)albumLoc.elementAt(i)).record.isConnected)\r\n search.addElement(albumLoc.elementAt(i));\r\n }\r\n }\r\n\r\n\t\treturn search;\r\n\t}", "public static void showResultPerson( Result<Record> result){\n \t for (Record r : result) {\n// Integer id = r.getValue(PERSON.PERSO_ID);\n String firstName = r.getValue(PERSON.PERSO_FIRSTNAME);\n String lastName = r.getValue(PERSON.PERSO_LASTNAME);\n\n System.out.println(\"Name : \" + firstName + \" \" + lastName);\n }\n }", "public ContentEntry find(String[] keys, Object[] values);", "public Record readRecord(Long id);", "private List<String> readRecord(JsonObject workItem) throws AutomicException {\n List<String> record = new ArrayList<String>(resultFields.size());\n for (String field : resultFields) {\n JsonElement jeObj = workItem.get(field);\n String value = null;\n if (jeObj != null && jeObj.isJsonPrimitive()) {\n value = jeObj.getAsString();\n } else if (jeObj != null && jeObj.isJsonObject()) {\n JsonObject jObj = (JsonObject) jeObj;\n if (jObj.has(\"_refObjectName\")) {\n value = jObj.get(\"_refObjectName\").getAsString();\n }\n }\n record.add(value);\n }\n return record;\n }", "String searchBoxUserRecord();", "@SelectProvider(type=WeixinCallbackRecordsGenerateSqlProvider.class, method=\"search\")\n @ResultType(WeixinCallbackRecordsBean.class)\n List<WeixinCallbackRecordsBean> search(Map<String, Object> params);", "@SuppressWarnings(\"all\")\n private Record findTarget() {\n final ConcurrentMap<String, Record> address = ORIGIN.getRegistryData();\n final String target = this.getValue(\"to\");\n final String name = this.getValue(\"name\");\n // 1. Find service names\n final List<Record> records = this.findRecords();\n final Record record = records.stream().filter(item ->\n target.equals(item.getMetadata().getString(\"path\")))\n .findAny().orElse(null);\n // Service Name\n Fn.outWeb(null == record, this.logger,\n _501RpcImplementException.class, this.getClass(),\n name, target, this.event);\n // Address Wrong\n Fn.outWeb(null == record.getMetadata() ||\n !target.equals(record.getMetadata().getString(\"path\")), this.logger,\n _501RpcAddressWrongException.class, this.getClass(),\n target, name);\n this.logger.info(Info.RECORD_FOUND, record.toJson());\n return record;\n }", "public long retrieve(long record) {\n return (record & MASK) >>> OFFSET;\n }", "public SearchHandle searchElementValue(String element, String value) {\n\t\tKeyValueQueryDefinition query = queryMgr.newKeyValueDefinition();\n\t\tquery.put(queryMgr.newElementLocator(new QName(element)),value);\n\n\t\t// create a handle for the search results\n\t\tSearchHandle resultsHandle = new SearchHandle();\n\n\t\t// run the search\n\t\tqueryMgr.search(query, resultsHandle);\n\n\t\t// release the client\n\t\tclient.release();\n\t\t\n\t\treturn resultsHandle;\n\t}", "Storage selectByPrimaryKey(Integer recordId);", "public List getRecordListByKeyandValue(String keyName, Object keyValue) {\r\n DomainObject returnValue = null;\r\n Session session = getSession();\r\n List<DomainObject> lst = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.eq(keyName, keyValue));\r\n lst = query.list();\r\n if (lst != null && lst.size() > 0) {\r\n return lst;\r\n }\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getRecordByKeyandValue Method:\" + e, e);\r\n } finally {\r\n if (session != null && session.isOpen()) {\r\n session.close();\r\n }\r\n }\r\n return lst;\r\n }", "public abstract T getTuple(Record record);", "public native Record[] findAll(String propertyName, Long value) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.findAll(propertyName, value);\r\n return recordsJS == null || recordsJS === undefined ? null : @com.smartgwt.client.data.Record::convertToRecordArray(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "public List<AbsRecord> getRecordBy(String whereClause)\n\t{\n\t\treturn getRecordBy(whereClause, new GAZRecordRowMapper());\n\t}", "public List<Record> listAllRecords();", "public EntryRow getData(String TableName, String idKey, Object idValue) throws SQLException, NullPointerException {\n if(!valueExists(TableName, idKey, idValue.toString())) return null;\n\n ResultSet rs = mysql.query(\"SELECT * FROM `\" + TableName + \"` WHERE `\" + idKey + \"` LIKE '\" + idValue + \"'\");\n\n if(rs.next()) {\n Value[] values = new Value[rs.getMetaData().getColumnCount()];\n\n for(int columnIndex = 1; columnIndex <= rs.getMetaData().getColumnCount(); columnIndex++){\n int javaIndex = columnIndex-1;\n String key = rs.getMetaData().getColumnName(columnIndex);\n Object value = rs.getObject(columnIndex);\n\n values[javaIndex] = new Value(key, value);\n } // END OF FOR LOOP\n\n return new EntryRow(TableName, rs.getRow(), idKey, idValue, values);\n } // END OF rs.next IF\n\n return null;\n }", "public Record getRecord(String fieldname, Table table) \n\t\t\tthrows IOException, SoapResponseException {\n\t\tString fieldvalue = getField(fieldname);\n\t\tif (fieldvalue == null) return null;\n\t\tKey sysid = new Key(fieldvalue);\n\t\tRecord result = table.get(sysid);\n\t\treturn result;\n\t}", "protected ResultSet search(String tableName, String colName,\n String value, Connection myConn) {\n String sql = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" LIKE '%\" + value + \"%';\";\n try {\n Statement newCommand = myConn.createStatement();\n ResultSet result = newCommand.executeQuery(sql);\n\n // will closed when ResultSet is closed\n newCommand.closeOnCompletion();\n return result;\n\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }", "public MedicalRecord getMedicalRecord(String patient, String index){\n int i = Integer.parseInt(index);\n if(database.containsKey(patient)){\n if(database.get(patient).size() > i){\n return database.get(patient).get(i);\n } else{\n System.out.println(\"No such Medical Records found for \" + patient);\n }\n } else {\n System.out.println(patient + \" Not found in database\");\n }\n return null;\n }", "public V search(K key);", "public List<User> searchUser(String searchValue);", "public static String getTheMatchResult(String searchType) throws IOException {\n String matchResult = null;\n CouchBaseUtility bucketExtractor = new CouchBaseUtility();\n CouchBaseUtility.openBucket();\n String query = null;\n String array1[] = Serenity.getCurrentSession().get(\"SearchCategory\").toString().split(\":\");\n if (searchType.equals(\"case\")) {\n if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"CaseId\")) {\n query = \"Select * from CaseManagement where documentType='Case' and caseId = '\" + Serenity.getCurrentSession()\n .get(\"CaseId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"PaymentId\")) {\n query = \"Select * from CaseManagement where paymentTransaction.txnPaymentId = '\" + Serenity\n .getCurrentSession().get(\"OutgoingPaymentID\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"OrderId\")) {\n query = \"Select * from CaseManagement where paymentTransaction.txnOrderId = '\" + Serenity\n .getCurrentSession().get(\"OrderId\").toString() + \"'and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"CustomerId\")) {\n query = \"Select * from CaseManagement where customer.customerId = '\" + Serenity\n .getCurrentSession().get(\"customerId\").toString() + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"ConfirmationNumber\")) {\n query = \"Select * from CaseManagement where paymentTransaction.confirmationNumber = '\"\n + Serenity.getCurrentSession().get(\"ConfirmationNumber\").toString()\n + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Region & Country\")) {\n query = \"Select * from CaseManagement where regionInfo.regionCode='\" + Serenity\n .getCurrentSession().get(\"RegionCode\").toString() + \"' and regionInfo.countryCode='\"\n + Serenity.getCurrentSession().get(\"CountryCode\").toString()\n + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Assigned - Saved/Pended\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '4' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Assigned - Working\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '1' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Assigned - Not Picked Up\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '2' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Completed - Pass/Fail\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '9' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Escalated - In Queue\")) {\n query = \"Select * from CaseManagement where caseStatusId = '48' and classification='\"\n + array1[2] + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().contains(\"New\")) {\n query = \"Select * from CaseManagement where caseStatusId = '41' and classification='\"\n + array1[2] + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Release to Queue - Skipped\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '5' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n }\n } else if ((searchType.equals(\"payment\")) && (Serenity.getCurrentSession()\n .get(\"goodBadPaymentFlag\").equals(false))) {\n if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"PaymentId\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cc.paymentTransaction.txnPaymentId ='\"\n + Serenity.getCurrentSession().get(\"OutgoingPaymentID\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"OrderId\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cc.paymentTransaction.txnOrderId ='\"\n + Serenity.getCurrentSession().get(\"OrderId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"CustomerId\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cp.payment.customerID ='\"\n + Serenity.getCurrentSession().get(\"customerId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"ConfirmationNumber\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cp.payment.customerID ='\"\n + Serenity.getCurrentSession().get(\"customerId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"Region & Country\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cp.payment.customerID ='\"\n + Serenity.getCurrentSession().get(\"customerId\").toString() + \"'\";\n }\n\n } else if (searchType.equals(\"payment\") && (Serenity.getCurrentSession()\n .get(\"goodBadPaymentFlag\").equals(true))) {\n if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"PaymentId\")) {\n query =\n \"select CaseManagement.payment.platform,CaseManagement.payment.orderID,CaseManagement.payment.sourcePaymentID,CaseManagement.payment.customerID,CaseManagement.payment.parties[0].name.name,CaseManagement.payment.parties[0].address.countryCode,CaseManagement.payment.creationDate,\"\n + \"CaseManagement.payment.expectedValueDate,CaseManagement.payment.currency,CaseManagement.payment.amount,CaseManagement.payment.regionInfo.countryName,CaseManagement.payment.regionInfo.regionName \"\n + \"from CaseManagement where documentType='Payment' and CaseManagement.payment.sourcePaymentID='\"\n + Serenity.getCurrentSession().get(\"OutgoingPaymentID\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"OrderId\")) {\n query =\n \"select CaseManagement.payment.platform,CaseManagement.payment.orderID,CaseManagement.payment.sourcePaymentID,CaseManagement.payment.customerID,CaseManagement.payment.parties[0].name.name,CaseManagement.payment.parties[0].address.countryCode,CaseManagement.payment.creationDate,\"\n + \"CaseManagement.payment.expectedValueDate,CaseManagement.payment.currency,CaseManagement.payment.amount,CaseManagement.payment.regionInfo.countryName,CaseManagement.payment.regionInfo.regionName \"\n + \"from CaseManagement where documentType='Payment' and CaseManagement.payment.orderID='\"\n + Serenity.getCurrentSession().get(\"OrderId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"CustomerId\")) {\n query =\n \"select CaseManagement.payment.platform,CaseManagement.payment.orderID,CaseManagement.payment.sourcePaymentID,CaseManagement.payment.customerID,CaseManagement.payment.parties[0].name.name,CaseManagement.payment.parties[0].address.countryCode,CaseManagement.payment.creationDate,\"\n + \"CaseManagement.payment.expectedValueDate,CaseManagement.payment.currency,CaseManagement.payment.amount,CaseManagement.payment.regionInfo.countryName,CaseManagement.payment.regionInfo.regionName \"\n + \"from CaseManagement where documentType='Payment' and CaseManagement.payment.customerID='\"\n + Serenity.getCurrentSession().get(\"customerId\").toString() + \"'\";\n }\n }\n // bucketExtractor.fetchAndSaveDocuments();\n\n bucketExtractor.queryAndSaveDocumentIDsInSession(query, searchType);\n Response res = (Response) Serenity.getCurrentSession().get(\"apiResponse\");\n //return res.then().extract().statusCode();\n String searchCaseAPIResponse = res.then().extract().response().getBody().asString();\n //JSONObject obj=(JSONObject)JSONValue.parse(searchCaseAPIResponse);\n //JSONArray arr=(JSONArray)obj.get(\"cases\");\n JSONArray array;\n if (searchType.equals(\"payment\")) {\n array = JsonPath.read(searchCaseAPIResponse, \"payments[*]\");\n } else {\n array = JsonPath.read(searchCaseAPIResponse, \"cases[*]\");\n }\n\n System.out.println(\"response body : \" + searchCaseAPIResponse);\n try {\n if (compare(Serenity.getCurrentSession().get(\"caseDetailsFromQuery\").toString(),\n searchCaseAPIResponse, searchType, array.size())) {\n matchResult = \"Pass\";\n\n } else {\n matchResult = \"Fail\";\n\n }\n } catch (Exception e) {\n\n }\n\n String testData = Serenity.getCurrentSession().get(\"stringBuffResult\").toString();\n Allure.addAttachment(\"Json Comparison Details\", testData);\n //Serenity.recordReportData().withTitle(\"Json Comparison Details\").andContents(testData);\n return matchResult;\n }", "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}", "public OpenERPRecord get(int id) {\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord n = i.next();\r\n\t\t\tInteger rID = (Integer) n.get(\"id\"); // no class cast exception\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// expected here...\r\n\t\t\tif (rID == id)\r\n\t\t\t\treturn n;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "String search(int key);", "public Record getRecordWithId(final String recordId) {\n ArrayList<Record> allRecords = getAllSavedRecords();\n for (final Record eachRecord : allRecords) {\n if (eachRecord.recordId.equals(recordId)) {\n return eachRecord;\n }\n }\n return null;\n }", "public String searchByMaterial(String string, ArrayList<String> materiallist, int count, Set<String> keys, Collection<String> values, Map<String, String> dataTable1) {\nfor(String s:materiallist) {\r\n\t\t\t\r\n\t\t\tif (string.equals(s)) {\r\n\t\t\t//\tSystem.out.print(s);\r\n\t\t\t\tcount--;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\nSystem.out.println(\"A List of Home that matches the Material \"+string+\":\");\r\n\r\nfor(String k: keys) {\r\n\t\r\n\tarraytoprintkey=k.split(\"_\");\r\n\r\n\r\n\t\r\n\t\tif(arraytoprintkey[1].equals(string)) {\r\n\t\t\t\r\n\t\t\t\tSystem.out.print(k);\r\n\t\t\t\tSystem.out.println(\" \"+dataTable1.get(k));\r\n\t\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n}\r\nSystem.out.println();\r\n\t\tif(count==0) {\r\n\t\t\treturn string;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn null;\r\n\t}", "public List<TermSpanRecord> getResults()\n {\n String whereClause = \"owner = ?\";\n List<TermSpanRecord> results = TermSpanRecord.find(TermSpanRecord.class, whereClause, new String[]{String.valueOf(getId())});\n return results;\n }", "public List<AbsRecord> getRecordBy(String whereClause)\n\t{\n\t\treturn getRecordBy(whereClause, new HBRecordRowMapper());\n\t}" ]
[ "0.6591762", "0.64984214", "0.64265305", "0.63836795", "0.63202846", "0.6265871", "0.6099409", "0.6090999", "0.5807655", "0.5719749", "0.57132417", "0.5669349", "0.5663736", "0.56360143", "0.56140876", "0.55970615", "0.55945635", "0.55750126", "0.5570654", "0.5532846", "0.55110013", "0.550279", "0.54666567", "0.54534376", "0.54510325", "0.54473037", "0.5435032", "0.543079", "0.54203206", "0.54103464", "0.5390892", "0.5360478", "0.5326842", "0.53243756", "0.5321584", "0.5317396", "0.53093225", "0.5307768", "0.530595", "0.52992207", "0.5288112", "0.5284669", "0.5278384", "0.52751607", "0.527392", "0.52490675", "0.52474624", "0.52448356", "0.5238507", "0.523369", "0.523369", "0.52107376", "0.52103895", "0.5209852", "0.52041507", "0.51979464", "0.51937723", "0.5190689", "0.5179323", "0.5176499", "0.5173026", "0.51665", "0.51656115", "0.5158714", "0.51566964", "0.515595", "0.51423323", "0.5136781", "0.51366556", "0.5135745", "0.51353997", "0.51300746", "0.51287705", "0.5127072", "0.5122213", "0.51145005", "0.510968", "0.50943", "0.5088397", "0.50738215", "0.5073211", "0.5072231", "0.5067807", "0.50614303", "0.50559646", "0.5053868", "0.5045543", "0.50404316", "0.50338006", "0.5033106", "0.5030254", "0.5029163", "0.5027242", "0.5021148", "0.5019496", "0.50192964", "0.5015013", "0.50129247", "0.5008514", "0.50071436" ]
0.556414
19
returns all values in the database
public ArrayList<Value> getAll() throws DatabaseException { PreparedStatement stmt = null; ResultSet rs = null; ArrayList<Value> valueList = new ArrayList<Value>(); try { String sql = "SELECT * FROM \"values\""; stmt = db.getConnection().prepareStatement(sql); rs = stmt.executeQuery(); while(rs.next()) { Value value = new Value(); value.setValueID(rs.getInt(1)); value.setRecordID(rs.getInt(2)); value.setFieldID(rs.getInt(3)); value.setBatchID(rs.getInt(4)); value.setProjectID(rs.getInt(5)); value.setData(rs.getString(6)); valueList.add(value); } } catch(SQLException e) { throw new DatabaseException(); } return valueList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List selectAll() {\n\t\tList values = new ArrayList();\n\t\topen();\n\t\tCursor c = queryDB();\n\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t//\tvalues.add(hydrateNewObject(c));\n\t\t\t} while (c.moveToNext());\n\t\t}\n\t\t\n\t\tc.close();\n\t\tclose();\n\t\t\n\t\treturn values;\n\t}", "@Override\r\n\tpublic List<FicheColisageValue> getAll(){\n\t\t\r\n\t\treturn ficheColisagePersistance.getAll();\r\n\t}", "List getValues();", "public ArrayList<T> all() throws SQLException {\n\t\tPreparedStatement stmt = DatabaseConnection.get().prepareStatement(\"select * from \"+table_name() + order_string());\n\t\treturn where(stmt);\n\t}", "@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }", "Values values();", "List<List<Object>> getTableValues();", "public ArrayList<ContentValues> getAll() {\n ArrayList<ContentValues> values = new ArrayList<>();\n // Select all rows in the database\n String select = \"SELECT * FROM \"+MyDBContract.FirstTable.TABLE_NAME+\";\";\n Cursor cursor = getReadableDatabase().rawQuery(select, null);\n\n boolean isEOF = cursor.moveToFirst();\n while (isEOF) {\n String title = cursor.getString(cursor.getColumnIndexOrThrow(MyDBContract.FirstTable.COLUMN_NAME_TEXT));\n int id = cursor.getInt(cursor.getColumnIndexOrThrow(MyDBContract.FirstTable.COLUMN_NAME_ID));\n int quantity = cursor.getInt(cursor.getColumnIndexOrThrow(MyDBContract.FirstTable.COLUMN_NAME_QUANTITY));\n\n ContentValues contentValues = new ContentValues();\n contentValues.put(MyDBContract.FirstTable.COLUMN_NAME_TEXT, title);\n contentValues.put(MyDBContract.FirstTable.COLUMN_NAME_QUANTITY, quantity);\n contentValues.put(MyDBContract.FirstTable.COLUMN_NAME_ID, id);\n values.add(contentValues);\n\n isEOF = cursor.moveToNext();\n }\n cursor.close();\n return values;\n }", "public static List<SqlRow> findAll() {\n\n try{\n List<SqlRow> queryFindAll = Ebean.createSqlQuery(\"SELECT * FROM pub_infoapi;\")\n .findList();\n return queryFindAll;\n }catch(Exception e){\n e.printStackTrace();\n return null;\n }\n }", "private List<String> queryForAll() {\n // query for all of the data objects in the database\n List<Contact> list = dao.queryForAll();\n List<String> creadentials = new ArrayList<String>();\n for (Contact contact : list) {\n creadentials.add(contact.email);\n creadentials.add(contact.password);\n }\n return creadentials;\n }", "public Cursor getAll()\r\n {\r\n \treturn mDb.query(DB_TABLE_NAME, new String[] {\"_id\",\"fundId\", \"moneyPaid\", \"currentValue\", \"units\", \"simpleReturn\"}, null, null, null, null, null);\r\n }", "@Override\n public Collection<V> values() {\n Collection<V> values = new HashSet<V>(size());\n for (LinkedList<Entry<K,V>> list : table) {\n for (Entry<K,V> entry : list) {\n if (entry != null) {\n values.add(entry.getValue());\n }\n }\n }\n return values;\n }", "HCollection values();", "public ArrayList<Value> getAll(Record record) throws DatabaseException\n\t{\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tArrayList<Value> valueList = new ArrayList<Value>();\n\t\ttry\n\t\t{\n\t\t\tString sql = \"SELECT * FROM \\\"values\\\" WHERE recordID = \" + Integer.toString(record.getRecordID());\n\t\t\tstmt = db.getConnection().prepareStatement(sql);\n\t\t\trs = stmt.executeQuery();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tValue value = new Value();\n\t\t\t\tvalue.setValueID(rs.getInt(1));\n\t\t\t\tvalue.setRecordID(rs.getInt(2));\n\t\t\t\tvalue.setFieldID(rs.getInt(3));\n\t\t\t\tvalue.setBatchID(rs.getInt(4));\n\t\t\t\tvalue.setProjectID(rs.getInt(5));\n\t\t\t\tvalue.setData(rs.getString(6));\n\t\t\t\tvalueList.add(value);\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\tthrow new DatabaseException();\n\t\t}\n\t\treturn valueList;\n\t}", "@Override\n List<Value> values();", "public Cursor fetchAll() {\n\t\treturn db.query(tableName, fields, null, null, null, null, null);\n\t}", "@Override\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.withProcedureName(\"PA_MAT_PRODUNIDADMED_LIS\")\t\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\", OracleTypes\n\t\t\t\t.CURSOR, new ColumnMapRowMapper()));\n\t\treturn simpleJdbcCall.execute();\n\t}", "public List<T> selectAll() {\n Logger logger = getLogger();\n List<T> objectList = new ArrayList<>();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectAll())) {\n\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n T object = setObjectParams(rs);\n setObjectId(rs, object);\n objectList.add(object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select all: success\");\n return objectList;\n }", "List<Bill> all() throws SQLException;", "public ResultSet readAll() throws SQLException {\r\n String statement = \"SELECT * FROM appointments\";\r\n return conn.prepareStatement(statement).executeQuery();\r\n }", "public List<Object> getValues();", "@Override\n\tpublic List<Setting> queryall() {\n\t\treturn SettingMapper.queryall();\n\t}", "@Override\r\n public List<Anggota> getAll() {\r\n List<Anggota> datas = new ArrayList<>();\r\n String query = \"SELECT *From Anggota\";\r\n try {\r\n\r\n PreparedStatement preparedStatement = connection.prepareStatement(query);\r\n ResultSet rs = preparedStatement.executeQuery();\r\n\r\n while (rs.next()) {\r\n Anggota anggota = new Anggota();\r\n anggota.setKdAnggota(rs.getString(1));\r\n anggota.setNmAnggota(rs.getString(2));\r\n anggota.setTelepon(rs.getString(3));\r\n anggota.setAlamat(rs.getString(4));\r\n datas.add(anggota);\r\n }\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return datas;\r\n\r\n }", "public List<Person> getAllPerson() {\n \t\n //Collection<Person> c = personMap.values();\n List<Person> list = new ArrayList<Person>();\n //list.addAll(c);*/\n list = queryExecutor.selectAll();\n return list;\n }", "@Override\r\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate).withCatalogName(\"PKG_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .withProcedureName(\"PR_LIS_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .declareParameters(new SqlOutParameter(\"CUR_ESTADO_CIVIL\", OracleTypes.CURSOR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t new ColumnMapRowMapper()));\r\n\t\treturn simpleJdbcCall.execute();\r\n\t}", "public Cursor getAllRowData() {\n String where = null;\n Cursor c = \tdb.query(true, DATA_TABLE, null,\n where, null, null, null, null, null);\n if (c != null) {\n c.moveToFirst();\n }\n return c;\n }", "int[] retrieveAllData();", "public Collection<Object> values()\n {\n return data.values();\n }", "public Cursor fetchAll() {\n\t\tCursor cursor = db.query(CertificationConstants.DB_TABLE, CertificationConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}", "@Override\n\tpublic Collection<V> values() {\n\t\tArrayList<V> valores = new ArrayList<V>();\n\t\tIterator it = tabla.iterator();\n\t\tint i = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tIterator it2 = tabla.get(i).valueSet().iterator();\n\t\t\tit.next();\n\t\t\tint j = 0;\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tit2.next();\n\t\t\t\tvalores.add(tabla.get(i).valueSet().get(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn new HashSet<V>(valores);\n\t}", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Override\n public List<T> findAll() {\n String getAllQuery = \"SELECT * FROM \" + getTableName();\n return getJdbcTemplate().query(getAllQuery,\n BeanPropertyRowMapper.newInstance(getEntityClass()));\n }", "public PreferenceBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM preference\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public List getPreparedValues() {\n return preparedValues;\n }", "public Cursor fetchAll() {\n\t\tCursor cursor = db.query(UserConstants.DB_TABLE, UserConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}", "@Override\n\tpublic List<Record> getAllRecord() {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tlist = dao.findAll();\n\t\t\ttx.commit();\n\t\t} catch (RuntimeException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\n\t\treturn list;\n\t}", "public ResultSet ServerData() {\n\t\tResultSet rs = null; //new resultset of default value null\r\n\t\ttry {\r\n\r\n\r\n\t\t\tString query = \"SELECT * FROM TBLSERVERS\"; //get all data in the TBLSERVERS table\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(query); //prepare a new statement\r\n\t\t\trs = pst.executeQuery(); //execute statement and store result in a resultset \r\n\t\t} catch (SQLException ex) { //catches SQL exception to prevent an application crash in this case\r\n\t\t\tLogger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\r\n\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "public List<T> findAll() throws NoSQLException;", "private Object [] getFilterVals()\n throws java.sql.SQLException\n {\n Object [] ret = new Object[m_cols.length];\n\n for (int i = 0; i < m_cols.length; i++)\n {\n ret[i] = m_rs.getString((String)m_cols[i]);\n }\n return ret;\n }", "@NonNull\n Collection<TObj> getAll() {\n Collection<TObj> result = new LinkedList<>();\n for (int countR = mData.size(), i = 0; i < countR; i++) {\n int rowKey = mData.keyAt(i);\n SparseArrayCompat<TObj> columns = mData.get(rowKey);\n for (int countC = columns.size(), j = 0; j < countC; j++) {\n int key = columns.keyAt(j);\n result.add(columns.get(key));\n }\n }\n return result;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic List<Census> retrieveAll()\n\t{\n\t\t\n\t\topen();\n\t\tList<Census> list=new LinkedList<Census>();\n\t\ttry\n\t\t{\n\t\t\tQuery query=DB.query();\n\t\t\tquery.constrain(Census.class);\n\t\t\t\n\t\t\tObjectSet result =query.execute();\n\t\t\t\n\t\t\twhile(result.hasNext())\n\t\t\t{\n\t\t\t\tlist.add((Census)result.next());\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\t\n\t\treturn list;\n\t}", "public static void selectAll() {\n\n String sql = \"SELECT id, level, score, hearts, sound ,speed, path FROM dateGame\";\n\n try (Connection conn = connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // loop through the result set\n while (rs.next()) {\n level = rs.getInt(\"level\");\n score = rs.getInt(\"score\");\n hearts = rs.getInt(\"hearts\");\n sound = rs.getInt(\"sound\");\n speed = rs.getInt(\"speed\");\n path = rs.getString(\"path\");\n\n System.out.println(rs.getInt(\"id\") + \"\\t\" +\n rs.getInt(\"level\") + \"\\t\" +\n rs.getInt(\"score\") + \"\\t\" +\n rs.getInt(\"hearts\") + \"\\t\" +\n rs.getInt(\"sound\") + \"\\t\" +\n rs.getInt(\"speed\") + \"\\t\" +\n rs.getString(\"path\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n public List<Seq> getAll() {\n Connection conn = null;\n Statement stmt = null;\n List<Seq> listSeqs = new ArrayList<>();\n\n try {\n String url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n conn = DriverManager.getConnection(url);\n stmt = conn.createStatement();\n ProcessesDAO pdao = new ProcessesDAO();\n String sql = \"select * from seq;\";\n ResultSet rs = stmt.executeQuery(sql);\n\n while (rs.next()) {\n\n Seq seq = new Seq(rs.getInt(\"id\"), pdao.getbyidentifier(rs.getString(\"identifier\")), rs.getInt(\"seq_number\"));\n listSeqs.add(seq);\n }\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n return listSeqs;\n }", "List<Dormitory> selectAll();", "public Cursor fetchAllEntries() {\n /*\n return database.query(\n DATABASE_TABLE, \n new String[] { ROWID, MAC_ADDRESS, LATITUDE, LONGITUDE, FREQUENCY, SIGNAL}, \n null,\n null, \n null,\n null, \n null);\n */\n \n // sql must NOT be ';' terminated\n String sql = \"SELECT \"+ ROWID + \", \" + MAC_ADDRESS + \", \" + LATITUDE + \", \" + LONGITUDE + \", \" \n + NETWORK_NAME + \", \" + CAPABILITIES + \", \" + FREQUENCY + \", \" + SIGNAL\n + \" FROM \" + DATABASE_TABLE;\n return database.rawQuery(sql, null);\n }", "public Collection<T> values(){\n\t\treturn null;\r\n\t\t//TODO\r\n\t}", "public Object[] get_Values(){return new Object[]{ Id, CategoryId, StartTime, BreakTime, EndTime };}", "public List<T> values();", "@Override\n\tpublic List<SocialInsuranceRecord> selectAll() {\n\t\treturn dao.selectAll();\n\t}", "public Set<DynamicEntity> getAllValuesOfvehicle() {\n return rawStreamAllValuesOfvehicle(emptyArray()).collect(Collectors.toSet());\n }", "public ArrayList<TEntity> getAll(){\n ArrayList<TEntity> list = new ArrayList<TEntity>();\n\n Cursor cursor = db.query(tableName, columns, null, null, null, null, null);\n\n cursor.moveToFirst();\n\n while (!cursor.isAfterLast()) {\n list.add(fromCursor(cursor));\n cursor.moveToNext();\n }\n\n return list;\n }", "@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}", "public List<DatabaseStore> getAllVarValue(String variable) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tString query = \"Select * FROM \" + TABLE_QUES + \" WHERE \" + QUES_KEY_VAR\n\t\t\t\t+ \"='\" + variable + \"'; \";\n\t\tCursor cursor = db.rawQuery(query, null);\n\t\treturn handleCursor(cursor);\n\t}", "public List findAll() {\n\t\treturn dao.findAll();\r\n\t}", "E[] getAll();", "public List<String> getAllData(){\n\t}", "List<Userinfo> selectAll();", "Serializable retrieveAllData();", "public List<Object[]> select() {\n return selectColumns(metadata.getColumns());\n }", "public SampletypeBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM sampletype\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public List<Company> readFromDatabase() {\n\t\treturn this.jdbcTemplate.query(\"SELECT * FROM \" + table + \";\", (rs, i) -> new Company(rs.getString(\"Date\"), rs.getString(\"Security\"), rs.getDouble(\"Weighting\")));\n\t}", "List<ClinicalData> selectAll();", "public InstitutionBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM institution\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "private List<Map<String, String>> getValues(Rule rule, String tableName,\n\t String uri) throws MediatorException {\n\t// execute each query and accumulate the values\n\t// we could have more than one query if we have a relationship table\n\t// t(var1, var2)\n\t// where D2R generates var1 tableName var2 (tableName is the property)\n\t// OR var2 tableName var1\n\tString select = getSelect(rule);\n\tList<String> where = getWhere(rule);\n\tList<Map<String, String>> rowValues = new ArrayList<Map<String, String>>();\n\tfor (int q = 0; q < where.size(); q++) {\n\t rowValues.addAll(getValues(select, where.get(q), tableName, uri));\n\t}\n\treturn rowValues;\n }", "public static Object[][] getData() {\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}", "public Cursor fetchAllPreg() {\n\n return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_TIME,\n KEY_BODY}, null, null, null, null, null);\n }", "public List<Item> getAll() {\r\n List<Item> list = new ArrayList<Item>();\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 list = session.createQuery(\"from Item\").list();\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.flush();\r\n session.close();\r\n }\r\n return list;\r\n }", "@Override\r\n\tpublic Collection selectALLData(Connection con) {\n\t\treturn select(con);\r\n\t}", "@Override\n\tpublic List<T> getAll() {\n\t\treturn getDao().findAll();\n\t}", "public Object[] getValues();", "public List<NeonValue> getValues();", "@Override\n\tpublic List<Product> getAll() throws SQLException {\n\t\treturn null;\n\t}", "@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}", "Object[] getValues();", "Object[] getValues();", "public List<Aflevering> readAll() {\n List<Aflevering> lijst = new ArrayList<>();\n try {\n ResultSet rs = sqlConnection.executeSql(\"SELECT * FROM AFLEVERING\");\n while(rs.next()) {\n lijst.add(new Aflevering(rs.getString(\"ID\"),\n rs.getString(\"Serie\"),\n rs.getString(\"Seizoen\"),\n rs.getString(\"Titel\"),\n rs.getString(\"Tijdsduur\")));\n }\n }\n catch(Exception e) {\n System.out.println(e);\n }\n return lijst;\n }", "@Override\n\tpublic List<Map<String, Object>> readAll() {\n\t\treturn rolDao.readAll();\n\t}", "@Override\r\n\tpublic ArrayList<Board1> getAll() {\n\t\treturn dao.selectAll();\r\n\t}", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "@Override\n\tpublic List<TblMulitData> getAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Customer[] readAll() {\n\n\t\tString selectQuery = String.format(\"SELECT * FROM %s ;\", TABLE_NAME);\n\t\tCustomer[] result = null;\n\n\t\ttry (Statement s = dbCon.createStatement()) {\n\t\t\tResultSet rS = s.executeQuery(selectQuery);\n\n\t\t\tArrayList<Customer> resultTmp = new ArrayList<Customer>();\n\n\t\t\twhile (rS.next()) {\n\t\t\t\tresultTmp.add(\tresultTmp.size(),\n\t\t\t\t\t\t\t\tnew Customer(rS.getInt(COLUMN_NAME_ID),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_FIRST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_LAST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_EMAIL),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_KNICKNAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getDate(COLUMN_NAME_BIRTHDATE).toLocalDate(),\n\t\t\t\t\t\t\t\t\t\t\trS.getDouble(COLUMN_NAME_CREDITS))\n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\trS.close();\n\n\t\t\tresult = new Customer[resultTmp.size()];\n\t\t\tresultTmp.toArray(result);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"An SQL error occured during retrieving all data from of customer table : \" + e.getMessage());\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "List<Usertype> selectAll();", "public String[] fetchAllKeys();", "@SqlQuery(\"select * from account\")\r\n public List<accountDB> get();", "@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "@Override\n public Collection<Curso> getAll() {\n Collection<Curso> retValue = new ArrayList();\n\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor,p.apellido as apellido, c.nombrecurso, c.claveprofesor,\\n\" +\n\" c.clavealumno from curso c, persona p\\n\" +\n\"where c.idprofesor = p.id\");\n \n\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n String nombre=\"\\\"\"+rs.getString(\"nombreprofesor\")+\" \"+rs.getString(\"apellido\")+\"\\\"\";\n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"), rs.getInt(\"idprofesor\"), nombre,rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n\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 }", "public List<JianliBean> selectAll() {\n\t\treturn jianliDao.selectAll();\r\n\t}", "public Cursor getAllData() {\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor res = db.rawQuery(\"Select * from \" + TABLE_NAME, null);\n return res;\n }", "Collection<V> values();", "Collection<V> values();", "protected List<Map<String, Object>> show() {\n List<Map<String, Object>> output = new ArrayList<>();\n try {\n ResultSet rs;\n try (PreparedStatement stmt = DBConnect.getConnection()\n .prepareStatement(String.format(\"SELECT * FROM %s WHERE userID = ?\", table))) {\n stmt.setLong(1, userId);\n rs = stmt.executeQuery();\n }\n output = DBConnect.resultsList(rs);\n rs.close();\n DBConnect.close();\n } catch (SQLException e) {\n Logger.getLogger(DBConnect.class.getName()).log(Level.SEVERE, \"Failed select\", e);\n }\n return output;\n }", "@Override\n\tpublic List<MyFoodDTO> selectAll() {\n\t\tString sql = \" SELECT * FROM view_식품정보 \";\n\t\tPreparedStatement pStr = null;\n\t\ttry {\n\t\t\tpStr = dbConn.prepareStatement(sql);\n\t\t\tList<MyFoodDTO> brList = this.select(pStr);\n\t\t\tpStr.close();\n\t\t\treturn brList;\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}", "@Override\r\n\tpublic List<AsxDataVO> findAll() {\n\t\treturn mongoTemplate.find(new Query(), AsxDataVO.class);\r\n\t}", "public List<ParamIntervento> getAll()\n {\n\t System.out.println(\"chiamo getAll: \");\n System.out.flush();\n CriteriaQuery<ParamIntervento> criteria = this.entityManager.getCriteriaBuilder().createQuery(ParamIntervento.class);\n return this.entityManager.createQuery(criteria.select(criteria.from(ParamIntervento.class))).getResultList();\n }", "@Override\r\n\tpublic List<String> queryAll() {\n\t\tList<String> list = homePageDao.queryAll();\r\n\t\treturn list;\r\n\t}", "@Override\n public List<Beheerder> select() {\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }", "public static HashMap<Integer, String> getAll() {\n RocksIterator iter = db.newIterator();\n HashMap<Integer, String> result = new HashMap<>();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n result.put(ByteIntUtilities.convertByteArrayToInt(iter.key()), new String(iter.value()));\n }\n\n iter.close();\n return result;\n }" ]
[ "0.7500142", "0.7053272", "0.68289346", "0.67032236", "0.6654161", "0.66462994", "0.663588", "0.66299886", "0.65725815", "0.6565868", "0.65342927", "0.651062", "0.64915085", "0.64351004", "0.6406949", "0.64027786", "0.6373877", "0.6364906", "0.63451415", "0.6335462", "0.63244396", "0.6312946", "0.6305572", "0.630502", "0.62968254", "0.628518", "0.6280379", "0.62800425", "0.62545663", "0.6246305", "0.62456524", "0.6235892", "0.62240005", "0.6215297", "0.6214778", "0.6206545", "0.6204746", "0.6200287", "0.61948717", "0.6183112", "0.6180814", "0.61741287", "0.617326", "0.6164549", "0.6160057", "0.6158938", "0.61463594", "0.6138476", "0.61232185", "0.61218333", "0.6112245", "0.6109501", "0.610888", "0.61049724", "0.6104338", "0.61032265", "0.60950154", "0.60886997", "0.60827804", "0.60683584", "0.6068193", "0.60670537", "0.60607994", "0.6060654", "0.6049157", "0.60393953", "0.60351455", "0.60344094", "0.60325843", "0.6029156", "0.60277295", "0.60226494", "0.6019722", "0.6004619", "0.6004619", "0.59938574", "0.59914213", "0.5983484", "0.5982114", "0.59753764", "0.5972839", "0.5970578", "0.5969088", "0.59680694", "0.59666085", "0.59615576", "0.5949636", "0.5949434", "0.5948843", "0.59487635", "0.59475785", "0.5947124", "0.5947124", "0.594272", "0.593807", "0.592442", "0.5921218", "0.59198743", "0.5918233", "0.5917539" ]
0.72798777
1
Searches the database for a value that matches the desired ID
public Value get(int valueID) throws DatabaseException { PreparedStatement stmt = null; ResultSet rs = null; Value value = new Value(); try { String sql = "SELECT * FROM \"values\" WHERE valueID = " + Integer.toString(valueID); stmt = db.getConnection().prepareStatement(sql); rs = stmt.executeQuery(); while(rs.next()) { value.setValueID(rs.getInt(1)); value.setRecordID(rs.getInt(2)); value.setFieldID(rs.getInt(3)); value.setBatchID(rs.getInt(4)); value.setProjectID(rs.getInt(5)); value.setData(rs.getString(6)); } } catch(SQLException e) { throw new DatabaseException(); } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int findItem(int value) {\n return find(value, root);\n }", "public Item searchID(String ID) {\n Item foundItem = null;\n for (Item item : this) {\n if (item.getItemId().equals(ID)) {\n foundItem = item;\n break;\n }\n }\n return foundItem;\n }", "@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}", "private void findEntry() {\n String desiredId = idField.getText();\n Student student = studentHashMap.get(desiredId);\n\n try {\n if (student == null) {\n throw new NoMatchFoundException();\n } else if (this.checkInput(student) == false) {\n throw new InputMismatchException();\n } else if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"EMPLID: \" + desiredId + \"\\n\" + student.toString(),\n \"Find\",\n JOptionPane.INFORMATION_MESSAGE\n );\n } else {\n throw new NoMatchFoundException();\n }\n } catch(NoMatchFoundException ex) {\n this.displayStatusPanel(\n \"Error: Entry not found.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } catch(InputMismatchException e) {\n this.displayStatusPanel(\n \"Error: Information does not match data on file.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n }\n }", "String getValueId();", "private static void search_by_id() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project id: \");\r\n\t\t\tString project_id_str = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_id_str, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project id cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t\r\n\t}", "public Object findByPrimaryKey(long value) {\n\t\tTypedQuery<Pump> tq = em.createNamedQuery(Pump.FIND_PUMP_BY_PK, Pump.class);\n\t\ttq.setParameter(\"valueId\", value);\n\t\treturn tq.getSingleResult();\n\t}", "@Override\n public boolean containsId(int Id) {\n try {\n Entity retValue = null; \n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT * FROM curso where idcurso = ?\");\n\n pstmt.setInt(1, Id);\n\n rs = pstmt.executeQuery();\n\n if (rs.next()) {\n return true; \n } \n \n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "public LiveStock searchID(int liveStockID){\r\n\t\tString query = \"Select * from livestock where id = ?\";\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(query);\r\n\t\t\tps.setInt(1, liveStockID);\r\n\t\t\t\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tString name = rs.getString(\"name\");\r\n\t\t\t\tString eyeColor = rs.getString(\"eyecolor\");\r\n\t\t\t\tString sex = rs.getString(\"sex\");\r\n\t\t\t\tString type = rs.getString(\"type\");\r\n\t\t\t\tString breed = rs.getString(\"breed\");\r\n\t\t\t\tString height = rs.getString(\"height\");\r\n\t\t\t\tString weight = rs.getString(\"weight\");\r\n\t\t\t\tint age = rs.getInt(\"age\");\r\n\t\t\t\tString furColor = rs.getString(\"furColor\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tliveStock = new LiveStock( name, eyeColor, sex, type, breed, height, weight,\r\n\t\t\t\t\t\tage, furColor);\r\n\t\t\t\t\r\n\t\t\t\treturn liveStock;\r\n\t\t\t\t\t\t\r\n\t\t\t}\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}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn liveStock;\r\n\t}", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "private int searchId(String id){\n\t\tint index = -1; // -1(존재안함)\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++){\n\t\t\tif(id.equals(list.get(i).getId())){\n\t\t\t\t//stu = list.get(i);\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\t\t\t\t\n\t\treturn index;\n\t}", "public SearchHandle searchElementValue(String element, String value) {\n\t\tKeyValueQueryDefinition query = queryMgr.newKeyValueDefinition();\n\t\tquery.put(queryMgr.newElementLocator(new QName(element)),value);\n\n\t\t// create a handle for the search results\n\t\tSearchHandle resultsHandle = new SearchHandle();\n\n\t\t// run the search\n\t\tqueryMgr.search(query, resultsHandle);\n\n\t\t// release the client\n\t\tclient.release();\n\t\t\n\t\treturn resultsHandle;\n\t}", "@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }", "@Override\n\tpublic void searchByID() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's ID\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public boolean find(int value) {\n return set.contains(value);\n }", "public EntryRow getData(String TableName, String idKey, Object idValue) throws SQLException, NullPointerException {\n if(!valueExists(TableName, idKey, idValue.toString())) return null;\n\n ResultSet rs = mysql.query(\"SELECT * FROM `\" + TableName + \"` WHERE `\" + idKey + \"` LIKE '\" + idValue + \"'\");\n\n if(rs.next()) {\n Value[] values = new Value[rs.getMetaData().getColumnCount()];\n\n for(int columnIndex = 1; columnIndex <= rs.getMetaData().getColumnCount(); columnIndex++){\n int javaIndex = columnIndex-1;\n String key = rs.getMetaData().getColumnName(columnIndex);\n Object value = rs.getObject(columnIndex);\n\n values[javaIndex] = new Value(key, value);\n } // END OF FOR LOOP\n\n return new EntryRow(TableName, rs.getRow(), idKey, idValue, values);\n } // END OF rs.next IF\n\n return null;\n }", "@Override\n public Item find(Context context, UUID id) throws SQLException\n {\n Item item = itemDAO.findByID(context, Item.class, id);\n if (item == null)\n {\n if (log.isDebugEnabled())\n {\n log.debug(LogManager.getHeader(context, \"find_item\",\n \"not_found,item_id=\" + id));\n }\n return null;\n }\n\n // not null, return item\n if (log.isDebugEnabled())\n {\n log.debug(LogManager.getHeader(context, \"find_item\", \"item_id=\"\n + id));\n }\n\n return item;\n }", "SysCode selectByPrimaryKey(String id);", "ExtraQuery id(Object value);", "public void findById() {\n String answer = view.input(message_get_id);\n if (answer != null){\n try{\n long id = Long.parseLong(answer);\n Customer c = model.findById(id);\n if(c!=null)\n view.showCustomerForm(c);\n else\n view.showMessage(not_found_error);\n }catch(NumberFormatException nfe){\n view.showMessage(\"ID must be number\");\n }\n }\n }", "public SavedSearch getSingleSavedSearch(Integer id) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from SavedSearch as savedSearch where savedSearch.savedSearchId = ?\",\n new Object[]{id},\n new Type[]{Hibernate.INTEGER});\n\n\n //System.out.println(\"resultssssssssss\" + results.toString());\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (SavedSearch) results.get(0);\n }\n\n }", "public int find(int p) {\r\n return id[p];\r\n }", "void checkNotFound(Integer id);", "public static ResultSet searchByID(int id) {\r\n\t\ttry{\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Patient WHERE ID =?;\");\r\n\t\t\tstmt.setString(1, String.valueOf(id));\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "Abum selectByPrimaryKey(String id);", "public Integer ejbFindByPrimaryKey(final Integer id)\n throws FinderException\n {\n PreparedStatement ps = null;\n try \n {\n ps = getConnection().prepareStatement(\"SELECT ID FROM CCBMPACCOUNT WHERE ID = ?\");\n ps.setInt(1, id.intValue());\n ResultSet rs = ps.executeQuery();\n if (!rs.next()) \n {\n throw new ObjectNotFoundException(\"No such account: \" + id);\n } // end of if ()\n rs.close();\n\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception in findByPK\", e);\n throw new EJBException(\"Problem in findByPrimaryKey: \" + e);\n } // end of try-catch\n finally\n {\n try \n {\n if (ps != null) {ps.close();}\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception closing ps: \" + e);\n } // end of try-catch\n } // end of finally\n return id;\n }", "public models.garaDB.tables.pojos.Ride fetchOneById(Integer value) {\n return fetchOne(Ride.RIDE.ID, value);\n }", "public void findbyid() throws Exception {\n try {\n IPi_per_intDAO pi_per_intDAO = getPi_per_intDAO();\n List<Pi_per_intT> listTemp = pi_per_intDAO.getByPK(pi_per_intT);\n\n pi_per_intT = listTemp.size() > 0 ? listTemp.get(0) : new Pi_per_intT();\n\n } catch (Exception e) {\n easyLogger.error(e.getMessage(), e);\n setMsg(ERROR, \"Falha ao realizar consulta!\");\n } finally {\n close();\n }\n }", "public Integer getIdByValue(String value) throws AuthNException {\n Attribute attr = super.queryByParam(\"value\", value);\n if (attr != null ) {\n return attr.getId();\n } else {\n throw new AuthNException (\"No attribute with value \"+ value);\n }\n }", "AppStandard selectById(String id);", "public Data findById(Object id);", "public void SelectValueByName(String Id, String Value) {\n\t\t\r\n\t}", "public void dbLookupById(EdaContext xContext) throws IcofException{\n\n\t\t// Create the SQL query in the PreparedStatement.\n\t\tsetLookupIdStatement(xContext);\n\n\t\ttry {\n\t\t\tgetStatement().setLong(1, getId());\n\t\t}\n\t\tcatch(SQLException trap) {\n\t\t\tIcofException ie = new IcofException(this.getClass() .getName(),\n\t\t\t \"dbLookupById()\",\n\t\t\t IcofException.SEVERE,\n\t\t\t \"Unable to prepare SQL statement.\",\n\t\t\t IcofException.printStackTraceAsString(trap) + \n\t\t\t \"\\n\" + getQuery());\n\t\t\txContext.getSessionLog().log(ie);\n\t\t\tthrow ie;\n\t\t}\n\n\t\t// Run the query.\n\t\tif (! selectSingleRow(xContext)) {\n\t\t\tIcofException ie = new IcofException(this.getClass() .getName(),\n\t\t\t \"dbLookupById()\",\n\t\t\t IcofException.SEVERE,\n\t\t\t \"Unable to find row for query.\\n\",\n\t\t\t \"QUERY: \" + getQuery());\n\t\t\txContext.getSessionLog().log(ie);\n\t\t\tthrow ie;\n\n\t\t}\n\n\t\t// Close the PreparedStatement.\n\t\tcloseStatement(xContext);\n\n\t}", "@Override\n public T findById(ID id) throws SQLException {\n\n return this.dao.queryForId(id);\n\n }", "public ModelGame findGameById () {\n Scanner input = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Enter the ID of the game you wish to return:\");\n int id = input.nextInt(); // Read user input of id\n for (ModelGame game : this.allGames) {\n if (game.getGameId() == id) {\n return game;\n }\n }\n return null;\n }", "@Override\n\tpublic Eleve findById(int id) {\n\t\treturn map.get(id);\n\t}", "@Override\n\tpublic int find(int pValueToFind) {\n\t\tfor (int n = 0; n < pointer; ++n) {\n\t\t\tif (values[n] == pValueToFind) {\n\t\t\t\t// this returns the index position\n\t\t\t\treturn n;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "AbsractCategory searchByID(int identificaitonNumber) throws PersistenceException;", "public HexModel searchByID(String id) {\n\t\tfor (int y = 0; y < grid[0].length; y++) {\r\n\t\t\tfor (int x = 0; x < grid[y].length; x++) {\r\n\t\t\t\tif (grid[y][x] != null && grid[y][x].getId().equals(id))\r\n\t\t\t\t\treturn grid[y][x];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "Caiwu selectByPrimaryKey(Integer id);", "public org.jooq.examples.h2.matchers.tables.pojos.XTestCase_64_69 fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.examples.h2.matchers.tables.XTestCase_64_69.ID, value);\n\t}", "V get(K id);", "PrhFree selectByPrimaryKey(Integer id);", "Procdef selectByPrimaryKey(String id);", "public int findId(@NotNull T object) {\n Logger logger = getLogger();\n int id = -1;\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getFind())) {\n\n setStatement(preparedStatement, object);\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n id = rs.getInt(\"id\");\n }\n } catch (SQLException | NotEnoughDataException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select by id: success\");\n return id;\n }", "T queryForId(ID id) throws SQLException, DaoException;", "public Object lookup(String id) {\n return null;\n }", "@Override\r\n\tpublic User searchUser(Integer id) {\n\t\treturn userReposotory.getById(id);\r\n\t}", "public org.jooq.test.jdbc.generatedclasses.tables.pojos.T_2698 fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.test.jdbc.generatedclasses.tables.T_2698.ID, value);\n\t}", "@Override\n\tpublic Item findItemById(Long id) {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Item> q = cb.createQuery(Item.class);\n\t\t Root<Item> c = q.from(Item.class);\n\t\t ParameterExpression<Long> p = cb.parameter(Long.class);\n\t\t q.select(c).where(cb.equal(c.get(\"id\"), p));\n\t\t TypedQuery<Item> query = entityManager.createQuery(q);\n\t\t query.setParameter(p, id);\n\t\t Item i = query.getSingleResult();\n\t\treturn i;\n\t}", "static void searchProductDB() {\n\n int productID = Validate.readInt(ASK_PRODUCTID); // store product ID of user entry\n\n\n productDB.findProduct(productID); // use user entry as parameter for the findProduct method and if found will print details of product\n\n }", "public int find(int value) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tif (data[i]==value) return i;\n \t\t}\n \t\t\t\n \t\treturn -1;\n \t}", "@SneakyThrows\n @Override\n public DeveloperSkill findByID(Long id) {\n return null; //parse.get(Math.toIntExact(id));\n }", "private Node searchNode(int id) {\n\t\tNode node = searchRec(root,id);\n\t\treturn node;\n\t}", "@Override\n public StorageCapacity find(String key, String value) {\n Session session = Hibernate.createSession();\n\n if (session != null) {\n try {\n session.beginTransaction();\n\n CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();\n CriteriaQuery<StorageCapacity> criteriaQuery = criteriaBuilder.createQuery(StorageCapacity.class);\n Root<StorageCapacity> root = criteriaQuery.from(StorageCapacity.class);\n\n criteriaQuery.select(root).where(criteriaBuilder.equal(root.get(key), value));\n\n Query<StorageCapacity> query = session.createQuery(criteriaQuery);\n StorageCapacity result = query.getSingleResult();\n\n session.getTransaction().commit();\n\n return result;\n }\n catch (Exception exception) {\n session.getTransaction().rollback();\n\n System.out.println(\"Unable to find storage capacity.\");\n exception.printStackTrace();\n }\n }\n\n return null;\n }", "public Song searchById(String id) {\n Song selectedSong = null;\n\n for (int index = 0; index < this.songs.size(); index++) {\n if (this.songs.get(index).getId().equals(id)) {\n this.currentSongIndex = index;\n selectedSong = this.songs.get(index);\n }\n }\n\n return selectedSong;\n }", "@Override\n\tpublic Artist findByKey(Integer id) {\n\t\treturn null;\n\t}", "public String FindById(int id) throws SQLException{\n\t\t\tString req =\"Select NomGroupe from Groupe where ID_Groupe= ? \";\n\t\t\tPreparedStatement ps=DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tps.setInt(1,id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\trs.next();\n\t\t\treturn rs.getString(1);\t\n\t\t\t\n\t\t}", "SysId selectByPrimaryKey(String id);", "private User findById(String id) {\n User result = new NullUserOfDB();\n for (User user : this.users) {\n if (user.getId().equals(id)) {\n result = user;\n break;\n }\n }\n return result;\n }", "String search(int key);", "private static String searchStudent ( int studentId){\n for (Student s : studentDB) {\n if (s.getID() == studentId) {\n return s.getName();\n }\n }\n return \"\";\n }", "T findById(ID id) ;", "public ResultSet getDataRaw(String TableName, String idKey, Object idValue) throws SQLException{\n return mysql.query(\"SELECT * FROM `\" + TableName + \"` WHERE `\" + idKey + \"` LIKE '\" + idValue +\"'\");\n }", "public long searchID(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select _id, username from \" + TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n long id = -1;\n String uname;\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(1);\n if (uname.equals(username)) {\n id = cursor.getLong(cursor.getColumnIndex(ROW_ID));\n }\n } while (cursor.moveToNext());\n }\n return id;\n }", "private static void idValueSearch(ObjectReference or, ArrayList<Integer> haveyouseen) throws InterruptedException,\n\t\t\tClassNotLoadedException {\n\t\tList<Field> fields = or.referenceType().allFields();\n\t\tfor (int i = 0; i < fields.size(); i++) {\n\t\t\tValue fieldValue = or.getValue(fields.get(i));\n\n\t\t\tif (fieldValue instanceof ObjectReference) {\n\t\t\t\tint key = (int) ((ObjectReference) fieldValue).uniqueID();\n\t\t\t\tif (haveyouseen.contains(key) == false) {\n\t\t\t\t\thaveyouseen.add(key);\n\t\t\t\t\tmaxValue = Math.max(maxValue, key);\n\t\t\t\t\tidValueSearch((ObjectReference) fieldValue, haveyouseen);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract T findOne(int id);", "private int getUserById(int id)\n\t{\n\t\tint index = -1;\n\t\t// Search the user in the list\n\t\tfor(int i = 0; i < this.usersList.size(); i++)\n\t\t{\n\t\t\tif(this.usersList.get(i).getId() == id)\n\t\t\t{\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Return the index \n\t\treturn index;\n\t}", "String get(String id);", "public org.jooq.test.h2.generatedclasses.tables.pojos.VBook fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.ID, value);\n\t}", "public static boolean containsID(int segID) {\n String sql = \"SELECT id FROM corpus1 where id= ?\";\n\n Connection conn = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n conn = DatabaseOperations.connect();\n pstmt = conn.prepareStatement(sql);\n\n pstmt.setInt(1, segID);\n rs = pstmt.executeQuery();\n // loop through the result set\n while (rs.next()) {\n if (segID == rs.getInt(\"id\")) {\n return true;\n }\n }\n } catch (SQLException e) {\n System.out.println(\"containsID: \" + e.getMessage());\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException e) {\n System.out.println(\"containsID: \" + e.getMessage());\n }\n }\n return false;\n\n }", "Alert selectByPrimaryKey(Long id);", "public int searchByValue(T value) {\n Node<T> currNode = head;\n int index = 0;\n if (null != currNode) {\n while ((null != currNode.next) || (null != currNode.data)) {\n if (currNode.data == value) {\n break;\n }\n currNode = currNode.next;\n if (null == currNode) {\n return -1;\n }\n index++;\n }\n }\n return index;\n }", "private int indexValue(String value) {\n int loc = openHashCode(value);\n //if the searchVal exist\n if (this.openHashSetArray[loc] == null||!this.openHashSetArray[loc].myList.contains(value))\n return -1;\n else\n return loc;\n\n }", "IceApp selectByPrimaryKey(Long id);", "HpItemParamItem selectByPrimaryKey(Long id);", "public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}", "public Node<T> search(int id) {\n Node<T> res = root;\n res = search(res, id);\n if (res.getId() == id) return res;\n else return null;\n }", "RecordLike selectByPrimaryKey(String id);", "ReferenceData findById(ReferenceDataId id) throws DataException;", "private Node searchID(Node root, int ID) {\n\t\tif(root == null || root.isNull) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tif(root.ID > ID) {\n\t\t\t\treturn searchID(root.left, ID);\n\t\t\t} else if(root.ID < ID)\n\t\t\t\treturn searchID(root.right, ID);\n\t\t\telse\n\t\t\t\treturn root;\n\t\t}\n\t}", "public abstract T findByID(ID id) ;", "public static Category findValue(String id) {\n\n if (id == null || id.isEmpty())\n return null;\n\n for (Category cat : values()) {\n if (cat.id == id.charAt(0))\n return cat;\n }\n\n return null;\n }", "public Product findProduct(int id)\n {\n for(Product product : stock)\n {\n if(id == product.getID())\n {\n return product;\n }\n }\n System.out.println(\"Error: Could not find ID: \" + id);\n return null;\n }", "PaasCustomAutomationRecord selectByPrimaryKey(Integer id);", "public Future<io.remicro.saga.entities.tables.pojos.Person> findOneByUserId(String value) {\n return findOneByCondition(Person.PERSON.USER_ID.eq(value));\n }", "public boolean findType(int typeId){ //Checks if the typeId is registered - true if it's found\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);\n ResultSet rs = ps.executeQuery()){\n \n if(rs.isBeforeFirst()){ //If the resultset has data\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n } \n return false;\n }", "public Student searchForStudent(int ID)\r\n {\r\n boolean found = false;\r\n Student student = null;\r\n Node currentNode = first_node;\r\n\r\n while(!found && currentNode != null)\r\n {\r\n if(currentNode.getData().getStudent_ID() == ID)\r\n {\r\n found = true;\r\n student = currentNode.getData();\r\n }\r\n else\r\n {\r\n currentNode = currentNode.getNextNode();\r\n }\r\n }\r\n return student;\r\n }", "private void searchFor(int colIndex, String value) \n {\n if(colIndex == 2)\n {\n try\n {\n Integer.valueOf(value);\n } \n catch(NumberFormatException e)\n {\n JOptionPane.showMessageDialog(null,\"Expected integer\");\n return;\n }\n }\n ArrayList<String[]> jtData = getTableRowData();\n sortBubble(jtData, colIndex);\n int valueIndex = searchBinary(jtData, colIndex, value);\n if (valueIndex == -1)\n {\n JOptionPane.showMessageDialog(null, \"Not found\");\n }\n else \n {\n displayPaintInfo(jtData.get(valueIndex));\n }\n }", "public void findbyid() throws Exception {\n try {\n Ume_unidade_medidaDAO ume_unidade_medidaDAO = getUme_unidade_medidaDAO();\n List<Ume_unidade_medidaT> listTemp = ume_unidade_medidaDAO.getByPK( ume_unidade_medidaT);\t \n\n ume_unidade_medidaT= listTemp.size()>0?listTemp.get(0):new Ume_unidade_medidaT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "public boolean search(int val) {\r\n \r\n // call the private search method with root and value to be searched for\r\n return search(root, val);\r\n }", "private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }", "Prueba selectByPrimaryKey(Integer id);", "public int find(int p) {\n\t\tvalidate(p);\n\t\twhile (p != id[p])\n\t\t\tp = id[p];\n\t\treturn p;\n\t}", "Yqbd selectByPrimaryKey(Integer id);", "public void searchNode(int value) {\n int i = 1;\n boolean flag = false;\n Node current = head;\n if (head == null) {\n System.out.println(\"List is empty\");\n return;\n }\n while (current != null) {\n if (current.data == value) {\n flag = true;\n break;\n }\n current = current.next;\n i++;\n }\n if (flag)\n System.out.println(\"Node is present in the list at the position::\" + i);\n else\n System.out.println(\"Node is note present in the list\");\n }", "public boolean search(int val)\n {\n return search(root, val);\n }", "public boolean search(int val)\n {\n return search(root, val);\n }", "Optional<T> find(long id);", "io.dstore.values.StringValue getSearchValue();", "public boolean valueExists(String tableName, String key, Object value) throws SQLException, NullPointerException {\n ResultSet rs = mysql.query(\"SELECT * FROM `\"+ tableName +\"` WHERE `\" + key + \"` LIKE '\" + value.toString() + \"'\");\n\n // Gets the next line from the table\n if(rs.next()){\n // return true if the String is available\n return rs.getString(key) != null;\n }\n\n // Value and Key are not identified\n return false;\n }" ]
[ "0.6199092", "0.6154839", "0.60798925", "0.606481", "0.6059546", "0.60491616", "0.59615856", "0.59420884", "0.5909344", "0.5853228", "0.5843088", "0.58179754", "0.5813879", "0.58107466", "0.58051676", "0.57991815", "0.57950795", "0.57873446", "0.5782633", "0.5770956", "0.57656056", "0.57478964", "0.57310796", "0.57217085", "0.5712507", "0.5705339", "0.5699965", "0.56857276", "0.5674923", "0.5664305", "0.56556886", "0.56525385", "0.56346536", "0.563125", "0.5629486", "0.5622742", "0.56194013", "0.5614386", "0.56087774", "0.5598943", "0.5595863", "0.5595746", "0.55943173", "0.55930287", "0.55883837", "0.5588335", "0.5578892", "0.5568931", "0.5567636", "0.55542195", "0.5542148", "0.5542129", "0.5538626", "0.5538256", "0.5537539", "0.5532086", "0.5529841", "0.5528695", "0.55190825", "0.5510895", "0.5510381", "0.55077183", "0.5504973", "0.5499153", "0.54972714", "0.5495108", "0.5489645", "0.54892075", "0.5484771", "0.54815495", "0.54814696", "0.5479371", "0.5479003", "0.5475835", "0.5468925", "0.54654896", "0.5464955", "0.54633653", "0.5463313", "0.5458944", "0.5452943", "0.54519534", "0.54412484", "0.5439873", "0.5439797", "0.54378283", "0.54307353", "0.54300594", "0.5427072", "0.54264635", "0.5422057", "0.5421775", "0.54181534", "0.5417294", "0.5415504", "0.5413623", "0.539554", "0.539554", "0.5392554", "0.5389262", "0.5385367" ]
0.0
-1
Adds value to the database
public int add(Value value) throws DatabaseException { PreparedStatement stmt = null; Statement keyStmt = null; ResultSet keyRS = null; int valueID; try { String sql = "INSERT INTO \"values\" (recordID, fieldID, batchID, projectID, data) VALUES (?, ?, ?, ?, ?)"; stmt = db.getConnection().prepareStatement(sql); stmt.setInt(1, value.getRecordID()); stmt.setInt(2, value.getFieldID()); stmt.setInt(3, value.getBatchID()); stmt.setInt(4, value.getProjectID()); stmt.setString(5, value.getData()); if (stmt.executeUpdate() == 1) { keyStmt = db.getConnection().createStatement(); keyRS = keyStmt.executeQuery("select last_insert_rowid()"); keyRS.next(); valueID = keyRS.getInt(1); } else { throw new DatabaseException(); } } catch(SQLException e) { throw new DatabaseException(); } finally { if(stmt != null) { try { stmt.close(); keyStmt.close(); keyRS.close(); } catch(SQLException e) { throw new DatabaseException(); } } } return valueID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addValue() {\n addValue(1);\n }", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void add(Object value) {\n\n\t}", "private void insertValue(String field, String value) {\n switch (mapFieldsTypes.get(field)) {\n case DBCreator.STRING_TYPE:\n insertStringValue(field, value);\n break;\n case DBCreator.INTEGER_TYPE:\n insertIntegerValue(field, Integer.valueOf(value));\n break;\n }\n }", "@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}", "public void addValue(Row value)\n\t{\n\t\tallValues.add(value);\n\t}", "public void insertValue(String tablename, Value value, String idkey, String idvalue) throws SQLException {\n mysql.update(\"INSERT INTO `\" + tablename + \"` ('\"+ value.getKey() +\"') VALUES ('\" + value.getValue() + \"')\");\n }", "public void addValue(String variable, String str_value) {\n\t\tDate date = new Date();\n\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\tgc.setTime(date);\n\t\tgc.add(Calendar.HOUR_OF_DAY, -6);\n\t\tdate = gc.getTime();\n\t\tDatabaseStore ds = DatabaseStore.DatabaseTextStore(variable,\n\t\t\t\tstr_value.toString(), date);\n\t\taddQuestion(ds);\n\t}", "public boolean add( String key, T value )\r\n {\r\n HashMap<String,T> top = tables.peekFirst();\r\n T result = top.get( key );\r\n top.put( key, value );\r\n return result==null;\r\n }", "public void add(String value);", "@Override\r\n\tpublic void add() {\n\t\tif(alreadyAdded()) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Member is already added\");\r\n\t\t}else {\r\n\t\t\t\r\n\t\t\t\ttry(Connection connection= db.getConnection();) {\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString addString=\"INSERT INTO members VALUES(?,?,?,?)\";\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(addString);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t\t\tpreparedStatement.setString(2, super.getNameString());\r\n\t\t\t\tpreparedStatement.setString(3, super.getSurnameString());\r\n\t\t\t\tpreparedStatement.setString(4, super.getEmailString());\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "public void addRecord();", "private void addMovieToDb() {\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(MovieColumns.ADULT,mMovie.getAdult());\n contentValues.put(MovieColumns.BACKDROP_PATH,mMovie.getBackdropPath());\n contentValues.put(MovieColumns.GENRE,Utils.arrayToString(mMovie.getGenreIds()));\n contentValues.put(MovieColumns.MOV_ID,mMovie.getMovieId());\n contentValues.put(MovieColumns.ORIGINAL_LANGUAGE,mMovie.getOrigLanguage());\n contentValues.put(MovieColumns.ORIGINAL_TITLE,mMovie.getOrigTitle());\n contentValues.put(MovieColumns.OVERVIEW,mMovie.getOverview());\n contentValues.put(MovieColumns.RELEASE_DATE,mMovie.getReleaseDate());\n contentValues.put(MovieColumns.POSTER_PATH,mMovie.getPosterPath());\n contentValues.put(MovieColumns.POPULARITY,mMovie.getPopularity());\n contentValues.put(MovieColumns.TITLE,mMovie.getTitle());\n contentValues.put(MovieColumns.VIDEO, mMovie.getVideo());\n contentValues.put(MovieColumns.VOTE_AVERAGE, mMovie.getVoteAverage());\n contentValues.put(MovieColumns.VOTE_COUNT, mMovie.getVoteCount());\n\n try {\n getActivity().getContentResolver().insert(MoviesProvider.Movies.MOVIES_URI, contentValues);\n Toast.makeText(getContext(),getString(R.string.movie_added_as_favorite),Toast.LENGTH_SHORT).show();\n }catch (Exception ex){\n if(ex instanceof SQLiteConstraintException){\n Toast.makeText(getContext(), getString(R.string.movie_already_added_as_favorite), Toast.LENGTH_SHORT).show();\n }else {\n Toast.makeText(getContext(), getString(R.string.movie_added_as_favorite_problem), Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void add(K key, V value) {\r\n if(this.table.containsKey(key)){\r\n BloomFilterUtil bf = (BloomFilterUtil)table.get(key).getHash();\r\n bf.put(value);\r\n Node<V> node = (Node<V>) table.get(key);\r\n node.getValues().add(value);\r\n }else {\r\n BloomFilterUtil bf = BloomFilterUtil.create(funnel,\r\n expectedInsertions,\r\n fpp,\r\n (BloomFilterUtil.Strategy) hashStrategy);\r\n bf.put(value);\r\n Node<V> node = new Node<V>(value, bf);\r\n table.put(key, node);\r\n }\r\n }", "public boolean add() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tboolean ret = false;\n\n\t\t\t// Check to make sure that the user has entered in all of the\n\t\t\t// required fields\n\t\t\tif (validateObjectForDB()) {\n\t\t\t\tsqlString = \"INSERT INTO country (countryname) VALUES (\" + \"'\" + m_db.plSqlSafeString(m_country_name) + \"')\";\n\t\t\t\tm_db.runSQL(sqlString, stmt);\n\n\t\t\t\t// Get the inserted index\n\t\t\t\tm_country_id = Integer.parseInt(m_db.getInsertedIndexValue(stmt, \"countryid_seq\"));\n\t\t\t\tret = true;\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\treturn (ret);\n\t\t} catch (Exception e) {\n\t\t\tm_error_string = \"Unable to add the country. The data may be invalid.\";\n\t\t\treturn (false);\n\t\t}\n\t}", "private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }", "public boolean Add() {\n String query = \"INSERT INTO Proveedores(nombre, idContacto, activo) \"\r\n + \"VALUES('\" + nombre + \"',\" + idContacto + \",\" + activo + \");\";\r\n return dataAccess.Execute(query) >= 1;\r\n }", "public void addValue(String variable, Integer int_value) {\n\t\tDate date = new Date();\n\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\tgc.setTime(date);\n\t\tgc.add(Calendar.HOUR_OF_DAY, -6);\n\t\tdate = gc.getTime();\n\t\tDatabaseStore ds = DatabaseStore.DatabaseIntegerStore(variable,\n\t\t\t\tint_value.toString(), date);\n\t\taddQuestion(ds);\n\t}", "void add(String value);", "private void increaseDBValue(String target, int value){\n database.getReference(gameCodeRef).child(target).setValue(value+1);\n }", "public boolean addToDB() {\n boolean success = false;\n // try to add the leaf to the database\n type = API.getTypes().get(\"geneleaf\");\n try {\n db.connect();\n\n db.insert(\"LSDB for \" + gene.getHGNC() + \":\" + value + \" of type \" + node.getName(), \"INSERT INTO wave#build#_leaf (name, value, refnodeid, timestamp)\"\n + \"VALUES ('\" + name + \"','\" + value + \"','\" + node.getId() + \"', NOW())\");\n\n db.insert(\"Gene Leaf for LSDB \" + value, \"INSERT INTO wave#build#_association (a, b, reftypeid) VALUES(\" + gene.getId() + \",(SELECT @@identity), \" + type.getId() + \")\");\n\n success = true;\n } catch (Exception e) {\n System.out.println(\"[LSDB][DB] LSDB adding failed\\n\\t\" + e.toString());\n success = false;\n } finally {\n // System.out.println(\"[LSDB][DB] Added LSDB with value \" + value);\n db.close();\n return success;\n }\n }", "@Override\r\n public void save(BuyTicketModel value) {\n String sql = \"insert into buyticket values(?,?,?,?,?,?,?,?,?,?,?,?) \";\r\n \r\n try {\r\n PreparedStatement pstm = database.getCon().prepareStatement(sql);\r\n pstm.setString(1, value.getSlno());\r\n pstm.setString(2, value.getCustomername());\r\n pstm.setString(10,value.getContact());\r\n pstm.setString(3, value.getDestination());\r\n pstm.setString(4, value.getTime());\r\n pstm.setString(5, value.getFare());\r\n pstm.setString(6, value.getComment());\r\n pstm.setString(7, value.getDate());\r\n pstm.setString(8, value.getPayment());\r\n pstm.setString(9, value.getSeat());\r\n pstm.setString(11, value.getType());\r\n pstm.setString(12, value.getBusname());\r\n \r\n \r\n pstm.executeUpdate();\r\n pstm.close();\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(BuyTicketImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n }", "public boolean put() {\n return db.insert (TABLE, createColumns(), createValues());\n }", "public void addNewHoard(String hoardName, float hoardValue, boolean hoardAccessible) {\n ContentValues newValues = new ContentValues();\n \n // Assign values for each row.\n newValues.put(KEY_GOLD_HOARD_NAME_COLUMN, hoardName);\n newValues.put(KEY_GOLD_HOARDED_COLUMN, hoardValue);\n newValues.put(KEY_GOLD_HOARD_ACCESSIBLE_COLUMN, hoardAccessible);\n // [ ... Repeat for each column / value pair ... ]\n \n // Insert the row into your table\n SQLiteDatabase db = hoardDBOpenHelper.getWritableDatabase();\n db.insert(HoardDBOpenHelper.DATABASE_TABLE, null, newValues); \n }", "public void AddDataRecordtoDB(View view) {\n\n //get the running distance from textview\n TextView TV_distance = (TextView)findViewById(R.id.data_length);\n Double runningDistance = Double.parseDouble(TV_distance.getText().toString());\n System.out.println(\"distance is :\"+runningDistance);\n\n //get the calories from textview\n TextView TV_calories = (TextView)findViewById(R.id.data_calories);\n Double runningCalories = Double.parseDouble(TV_calories.getText().toString());\n System.out.println(\"calorie is :\"+runningCalories);\n\n // new an running \"entity\"\n Runningdata NewRunningdata = new Runningdata();\n NewRunningdata.setDistance(runningDistance);\n NewRunningdata.setCalorie(runningCalories);\n NewRunningdata.setStarttime(startTime);\n\n // using \"dao\" to manipulate database\n runningdao.insert(NewRunningdata);\n System.out.println(\"I did insertion\");\n }", "public void addNewVariable() {\r\n \t ArrayList<Object> tempVar = new ArrayList<Object>();\r\n \t tempVar.add(\"Integer\");\r\n \t tempVar.add(\"NewVariable\");\r\n \t tempVar.add(Boolean.FALSE);\r\n \t tempVar.add(new Integer(1));\r\n \t this.variableData.add(tempVar);\r\n \t this.fireTableDataChanged();\r\n }", "public long addMulti(Integer qid, String value) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(MULTI_KEY_QUES_ID, qid);\n\t\tvalues.put(MULTI_KEY_VALUE, value);\n\n\t\tlong pid = db.insert(TABLE_MULTI, null, values);\n\t\tdb.close();\n\t\treturn pid;\n\t}", "public void add(int value){\n \n // Case 1: The tree is empty - allocate the root\n if(root==null){\n root = new BSTNode(value);\n }\n \n // Case 2: The tree is not empty \n // find the right location to insert value\n else{\n addTo(root, value);\n } \n count++; // update the number of nodes\n }", "public Boolean add(String addThis) {\n try {\n Statement statement = con.createStatement();\n return statement.executeUpdate(addThis) == 0 ? false : true;\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }", "@Override\r\n\tpublic boolean add(Board1 b) {\n\t\treturn dao.insert(b);\r\n\t}", "void addData();", "public boolean AddToDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t \n\t //add info to database\n\t\t\tString query = \"INSERT INTO Housing(name, address, phone_number, year_built, price, housing_uid, \"\n\t\t\t\t\t+ \"max_residents, catagory) \"\n\t\t\t\t\t+ \"VALUES('\"+name+\"', '\"+address+\"', '\"+phoneNumber+\"', '\"+yearBuilt+\"', '\"+price+\"', \"\n\t\t\t\t\t+ \"'\"+uid+\"', '\"+maxResidents+\"', '\"+catagory+\"')\"; \n\t\t\t\n\t\t\tint insertResult = con.stmt.executeUpdate(query);\n\t\t\tif(insertResult > 0)\n\t\t\t{\n\t\t\t\tSystem.out.println (\"Housing added to database.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println (\"Housing NOT added to database.\");\n\t\t\t}\n\t\t\t\n\t\t\t//get housing id\n\t\t\tquery = \"SELECT h_id FROM Housing WHERE name ='\"+name+\"' AND address ='\"+address+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query); \n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\thid = rs.getInt(\"h_id\"); \n\t\t\t}\n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t\t\n\t\t\t//set up keywords\n\t\t\tif (keywords.size() > 0)\n\t\t\t{\n\t\t\t\tAddKeywords(); \n\t\t\t}\n\t\t\t\n\t\t\tif(openDates.size() > 0)\n\t\t\t{\n\t\t\t\tAddAvailableDates(); \n\t\t\t}\n\t\t\t\n\t\t\treturn true; \n\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public void setValue(Object value) {\n\t\tEntityManager em = Config.getEntityManager();\n\n\t\t// check for unnecessary update\n\t\tif (value == null && this.value == null) return;\n\t\tif (value != null && this.value != null) {\n\t\t\t// check if values are the same\n\t\t\tif (value.equals(this.value)) return;\n\t\t}\n\t\tthis.value = value;\n\t\tEntityTransaction t = em.getTransaction();\n\t\tboolean localTransaction = false;\n\t\ttry {\n\t\t\tif (!t.isActive()) {\n\t\t\t\tlocalTransaction = true;\n\t\t\t\tt.begin();\n\t\t\t}\n\n\t\t\t// update existing row\n\t\t\tif (row != null) {\n\t\t\t\tString updateSql = update1 + fieldName + update2 + fieldName\n\t\t\t\t\t\t+ valueExtension + update3;\n\t\t\t\tQuery updateQuery = em.createNativeQuery(updateSql);\n\t\t\t\tupdateQuery.setParameter(1, value);\n\t\t\t\tupdateQuery.setParameter(2, entityId);\n\t\t\t\tint result = updateQuery.executeUpdate();\n\t\t\t\tif (result != 1) {\n\t\t\t\t\t// no update?\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// create new row\n\t\t\t// check for existing FieldDataConfig\n\t\t\tFieldConfigInstance configInstance = FieldConfigInstance\n\t\t\t\t\t.findByNameBundle(fieldName, bundle);\n\t\t\tif (configInstance == null) {\n\t\t\t\t// must create new config instance\n\t\t\t\tFieldConfig config = FieldConfig.findByName(fieldName);\n\t\t\t\tif (config == null) {\n\t\t\t\t\t// TODO create new config\n\t\t\t\t\tconfig = new FieldConfig(fieldName, type);\n\t\t\t\t\t// can't do it\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconfigInstance = new FieldConfigInstance(config, bundle);\n\t\t\t\tem.persist(configInstance);\n\t\t\t\tem.flush();\n\t\t\t}\n\t\t\t// insert row\n\t\t\tString insertSql = insert1 + fieldName + insert2 + fieldName\n\t\t\t\t\t+ valueExtension + insert3;\n\t\t\tQuery insertQuery = em.createNativeQuery(insertSql);\n\t\t\tinsertQuery.setParameter(1, Config.BUNDLE_PREFIX + bundle);// bundle\n\t\t\tinsertQuery.setParameter(2, entityId);// entity_id\n\t\t\tinsertQuery.setParameter(3, 0);// delta\n\t\t\tinsertQuery.setParameter(4, value);// value\n\t\t\tint result = insertQuery.executeUpdate();\n\t\t\tif (result != 1) {\n\t\t\t\t// no insert?\n\t\t\t}\n\n\t\t\tif (localTransaction) t.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (localTransaction) t.rollback();\n\t\t}\n\t}", "public void addAnzeige(Anzeige anzeigeToAdd) throws StoreException {\n \r\n \t try {\r\n PreparedStatement preparedStatement = connection\r\n .prepareStatement(\"insert into Dbp71.Anzeige (titel, text, preis, ersteller, status) values (?,?,?,?,?)\");\r\n \t\t\r\n //preparedStatement.setInt(1, anzeigeToAdd.getId_Anzeige());\r\n preparedStatement.setString(1, anzeigeToAdd.getTitel());\r\n preparedStatement.setString(2, anzeigeToAdd.getText());\r\n preparedStatement.setBigDecimal(3, BigDecimal.valueOf(anzeigeToAdd.getPreis()));\r\n // preparedStatement.setString(5, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(4, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(5, anzeigeToAdd.getStatus());\r\n System.out.println(anzeigeToAdd.getTitel()+ anzeigeToAdd.getText()+ BigDecimal.valueOf(anzeigeToAdd.getPreis())\r\n + anzeigeToAdd.getErsteller()+ anzeigeToAdd.getErsteller()+ anzeigeToAdd.getStatus());\r\n preparedStatement.executeUpdate();\r\n \r\n \r\n }\r\n catch (SQLException e) {\r\n throw new StoreException(e);\r\n }\r\n }", "@Override\n\tpublic void add(Object value) {\n\t\tinsert(value, size);\n\t}", "@Override\n public void addValue(T value) {\n Vertex<T> vertex = new Vertex<>(value);\n vertices.put(value,vertex);\n }", "public void AddInDB(Word newWord) throws SQLException {\n String insertQuery = \"INSERT INTO tbltest(word,pronunciation,define) VALUES(?,?,?)\";\r\n ps = con.prepareStatement(insertQuery);\r\n ps.setString(1, newWord.getWord());\r\n ps.setString(2, newWord.getPronunciation());\r\n ps.setString(3, newWord.getDefine());\r\n\r\n ps.executeUpdate();\r\n }", "void add(User user) throws SQLException;", "public void push(Object value) {\n this.collection.add(value);\n }", "public void addValue(String value) {\n synchronized (values) {\n values.add(value);\n }\n }", "public void save(){\n DatabaseReference dbRef = DatabaseHelper.getDb().getReference().child(DatabaseVars.VouchersTable.VOUCHER_TABLE).child(getVoucherID());\n\n dbRef.setValue(this);\n }", "@Override\n public boolean add(E value) {\n final AVLTreeNode<E> insert = insert(value);\n if(insert != null && insert != tree.getHead()){\n tree.setHead(insert);\n }\n return insert != null;\n }", "public void addRate(Rate rate){\n //create ContentValue containning values to be inserted/updated in database in this case only on column\n ContentValues values = new ContentValues();\n\n values.put(COL_CARNUM, rate.getCarnum());\n values.put(COL_DATE, rate.getDate());\n values.put(COL_RATE, rate.getRate());\n values.put(COL_PARKINPNUM, rate.getParkingnum());\n values.put(COL_FLOORNUM, rate.getFloornum());\n\n //create SQLiteDatabase object to enable writing/reading in database\n SQLiteDatabase db = getWritableDatabase();\n long id = db.insert(TABLE_RATE, null, values);\n rate.setId(id);//update the user ID according to the auto incremented id in the DB\n\n //logging for debugging purposes\n Log.d(\"ID \", \"Category id: \"+id+\" added to DB\");\n\n //close connection to database\n db.close();\n }", "public void add(Object value) {\n verifyModifiable();\n\n elements.add(value);\n }", "public void insert(Key key, Value value) {\r\n root.insert(key,value);\r\n size++;\r\n }", "private void addOrUpdate() {\n try {\n Stokdigudang s = new Stokdigudang();\n if (!tableStok.getSelectionModel().isSelectionEmpty()) {\n s.setIDBarang(listStok.get(row).getIDBarang());\n }\n s.setNamaBarang(tfNama.getText());\n s.setHarga(new Integer(tfHarga.getText()));\n s.setStok((int) spJumlah.getValue());\n s.setBrand(tfBrand.getText());\n s.setIDKategori((Kategorimotor) cbKategori.getSelectedItem());\n s.setIDSupplier((Supplier) cbSupplier.getSelectedItem());\n s.setTanggalDidapat(dateChooser.getDate());\n\n daoStok.addOrUpdateStok(s);\n JOptionPane.showMessageDialog(this, \"Data berhasil disimpan!\");\n showAllDataStok();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Data gagal disimpan!\");\n }\n }", "@SuppressWarnings(\"null\")\r\n\tpublic void addColumnValue(Column column, Object value)\r\n\t{\r\n\t\tint type = ZConstant.UNKNOWN;\r\n\t\tif(value == null)\r\n\t\t\ttype = ZConstant.NULL;\r\n\t\telse if(value instanceof Number)\r\n\t\t\ttype = ZConstant.NUMBER;\r\n\t\telse if(value instanceof String)\r\n\t\t\ttype = ZConstant.STRING;\r\n\t\tZConstant right = new ZConstant(value.toString(), type);\r\n\t\t\r\n\t\tcolumnValues.put(column.getName(), right);\r\n\t}", "void add(String name, int value);", "public void add(ProbeObject obj) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_DATA, obj.getData());\n values.put(KEY_CONFIG, obj.getConfig());\n values.put(KEY_TIMESTAMP, obj.getTimestamp());\n values.put(KEY_DEVICE, obj.getBuild());\n\n // Inserting Row\n db.insert(TABLE_MOBILE_SENSOR, null, values);\n db.close(); // Closing database connection\n }", "@Override\n\tpublic void add(Object object) {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction ts = session.beginTransaction();\n\t\tsession.save(object);\n\t\tts.commit();\n\t\tsession.close();\n\t}", "private void startDBValue(String target){\n database.getReference(gameCodeRef).child(target).setValue(1);\n }", "@Override\n public void setValueInDb(String target, String value) {\n DatabaseReference currentRef = database.getReference(target);\n currentRef.setValue(value);\n }", "public void dbAddRow(EdaContext xContext)\n\tthrows IcofException{\n\n\t\t// Get the next id for this new row.\n\t\tsetNextIdStatement(xContext);\n\t\tlong id = getNextBigIntId(xContext);\n\t\tcloseStatement(xContext);\n\n\t\t// Create the SQL query in the PreparedStatement.\n\t\tsetAddRowStatement(xContext);\n\t\ttry {\n\t\t\tgetStatement().setLong(1, id);\n\t\t\tgetStatement().setLong(2, getFromChangeReq().getId());\n\t\t\tgetStatement().setLong(3, getToChangeReq().getId());\n\t\t\tgetStatement().setString(4, getRelationshipb());\n\t\t}\n\t\tcatch(SQLException trap) {\n\t\t\tIcofException ie = new IcofException(this.getClass() .getName(),\n\t\t\t \"dbAddRow()\",\n\t\t\t IcofException.SEVERE,\n\t\t\t \"Unable to prepare SQL statement.\",\n\t\t\t IcofException.printStackTraceAsString(trap) + \n\t\t\t \"\\n\" + getQuery());\n\t\t\txContext.getSessionLog().log(ie);\n\t\t\tthrow ie;\n\t\t}\n\n\t\t// Run the query.\n\t\tif (! insertRow(xContext)) {\n\t\t\tIcofException ie = new IcofException(this.getClass() .getName(),\n\t\t\t \"dbAddRow()\",\n\t\t\t IcofException.SEVERE,\n\t\t\t \"Unable to insert new row.\\n\",\n\t\t\t \"QUERY: \" + getQuery());\n\t\t\txContext.getSessionLog().log(ie);\n\t\t\tthrow ie;\n\t\t}\n\n\t\t// Close the PreparedStatement.\n\t\tcloseStatement(xContext);\n\n\t\t// Load the data for the new row.\n\t\tsetId(id);\n\t\tdbLookupById(xContext); \n\n\t}", "private void addOrderDB(){\n OrganiseOrder organiser = new OrganiseOrder();\n Order finalisedOrder = organiser.Organise(order);\n // Generate the order id\n String id = UUID.randomUUID().toString();\n // Set the name of the order to the generated id\n finalisedOrder.setName(id);\n\n // Get the firebase reference\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child(\"Orders\").child(id);\n\n // Update the order\n ref.setValue(finalisedOrder);\n }", "public void add (int value) {\r\n\t\ttotal = total + value;\r\n\t\thistory = history + \" + \" + value;\r\n\t}", "public void saveValue() {\n String[] idCol = assignedDataObject.getIdentifyTemplate().getIdentifyColumnNames();\n if (!(idCol.length == 1 && name.equals(idCol[0]))) { // method \"copy\" must not change unique key name! For any other methods it is not needed to save from frame.\n if (this.getText().equals(\"\")) {\n assignedDataObject.setInt(name, 0);\n } else {\n assignedDataObject.setInt(name, this.getIntValue());\n }\n }\n }", "private long insert(SQLiteDatabase db, Object o) {\n\t\tContentValues values = createContentValues(o);\n\t\tif (values != null) {\n\t\t\treturn db.insert(getTableName(o.getClass()), null, values);\n\t\t}\n\t\treturn -1L;\n\t}", "private void _add(final String value) {\n appended();\n\n buffer.encode(value);\n }", "public void add(String key, Object value) {\n Object oldValue = null;\n if (value instanceof String) {\n editor.putString(key, (String) value);\n oldValue = get(key, \"\");\n } else if (value instanceof Boolean) {\n editor.putBoolean(key, (Boolean) value);\n oldValue = get(key, false);\n } else if (value instanceof Integer) {\n editor.putInt(key, (Integer) value);\n oldValue = get(key, -1);\n } else if (value instanceof Long) {\n editor.putLong(key, (Long) value);\n oldValue = get(key, -1l);\n } else {\n if (value != null)\n Log.e(TAG, \"Value not inserted, Type \" + value.getClass() + \" not supported\");\n else\n Log.e(TAG, \"Cannot insert null values in sharedprefs\");\n }\n editor.apply();\n\n //notifying the observers\n notifyObservers(key, oldValue, value);\n }", "public void add(int value) {\n m_value += value;\n }", "private void addMember(String firstName, String lastName, String emailId) {\n Log.e(\"AddMember\", \"Fn \" + firstName + \", Ln \" + lastName + \"eid \" + emailId);\n\n\n// myRef.setValue(\"Hello, World!\");\n String key = myRef.push().getKey();\n Log.e(\"AddMember\", \"key \" + key);\n\n CoreMember member = new CoreMember(firstName, lastName, emailId);\n myRef.child(key).setValue(member, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError != null) {\n System.out.println(\"Data could not be saved \" + databaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\" + databaseReference.toString());\n memberKey = databaseReference.getKey();\n hideInputForm(true);\n\n }\n }\n });\n }", "public static void AddBooking(Booking booking){\n \n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM booking\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateInt(\"BookingNumber\", booking.getBookingNumber());\n resultSet.updateString(\"FlightNumber\", booking.getFlightNumber());\n resultSet.updateDouble(\"Price\", booking.getPrice());\n resultSet.updateString(\"CabinClass\", booking.getCabinClass());\n resultSet.updateInt(\"Quantity\", booking.getQuantity());\n resultSet.updateInt(\"Insurance\", booking.getInsurance());\n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n \n }", "public void add (int value) {\n\t\ttotal = total + value;\n\n\t\thistory = history + \" + \" + value;\n\t\t\n\t}", "public void message_add(message message){\n \tSQLiteDatabase db = this.getWritableDatabase();\n\n \t// 2. create ContentValues to add key \"column\"/value\n \tContentValues values = new ContentValues();\n \tvalues.put(KEY_MESSAGES_ID, message.id_get());\n \tvalues.put(KEY_MESSAGES_FROM, message.from_get());\n \tvalues.put(KEY_MESSAGES_TIME, message.time_get());\n \tvalues.put(KEY_MESSAGES_TEXT, message.text_get());\n \tvalues.put(KEY_MESSAGES_URI, message.uri_get_string());\n\n \t// 3. insert\n \tdb.insert(TABLE_MESSAGES, // table\n \t\t\tnull, //nullColumnHack\n \t\t\tvalues); // key/value -> keys = column names/ values = column values\n\n \t// 4. close\n \tdb.close();\n }", "private void addExpired(){\n final DatabaseReference expiredRef = mDB.getReference(\"ExpiredDate\");\n //productName, productExpiredDate, productPrice\n Bundle bundleNote = new Bundle();\n bundleNote.putString(\"productName\", expiredName.getText().toString());\n bundleNote.putString(\"productExpiredDate\", expiredDate.getText().toString());\n //Ini belum ada price soalnya belum bisa foto\n bundleNote.putString(\"productPrice\", \"0\");\n\n Product product = new Product(bundleNote);\n String currExpiredKey;\n currExpiredKey = expiredRef.push().getKey();\n expiredRef.child(LoginActivity.currGroupID).child(LoginActivity.currUserID).child(currExpiredKey).setValue(product);\n }", "@Override\r\n\tpublic void add(Code code) {\n\t\tthis.getHibernateTemplate().save(code);\r\n\t}", "private void addNote(){\n DatabaseReference noteRef = mDB.getReference(\"Notes\");\n\n Long time = System.currentTimeMillis();\n\n Bundle bundleNote = new Bundle();\n bundleNote.putString(\"notesDetail\", notes.getText().toString());\n bundleNote.putString(\"notesTime\", time.toString());\n\n Note note = new Note(bundleNote);\n String currNoteKey;\n currNoteKey = noteRef.push().getKey();\n noteRef.child(LoginActivity.currUserID).child(currNoteKey).setValue(note);\n\n }", "public void addFine() {\n dbRef = FirebaseDatabase.getInstance().getReference().child(\"Fines\");\n// fineObj = new FinesDetails();\n\n fineObj.setDl(this.dlNo);\n fineObj.setName(this.oName);\n fineObj.setEmail((this.oEmail).trim());\n fineObj.setContact((this.oContact).trim());\n fineObj.setAddress((this.oAddress).trim());\n fineObj.setLocation((this.oLocation).trim());\n fineObj.setOfficerId((this.userName).trim());\n fineObj.setTotal(this.fineTotal);\n fineObj.setStatus((this.status).trim());\n fineObj.setRule((this.ruleArray_list));\n fineObj.setDateTime(this.dateTime);\n\n fineId = this.currentTimeMil + this.dlNo;\n\n dbRef.child(fineId).setValue(fineObj);\n\n Toast.makeText(getApplicationContext(), \" saved\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\r\n public void add(T value) {\r\n Vertex<T> vertex = new Vertex<>(value);\r\n vertices.put(value, vertex);\r\n }", "public void add(String value) {\n root.add(value, true);\n }", "public String addBilling(Tour t,Event e){\n \n \n String result = \"0\";\n Connection con = null;\n //build the sql\n String SQLCommand = \"INSERT INTO billing(id,lineup_order,event_id,artist_id,tour_id)\" +\n \" values (seq_billing_id.NEXTVAL,?,?,?,?)\";\n \n try{\n //obtain the database connection by calling getConn() \n con = getConn();\n Billing b = t.getBills().get(0);\n \n \n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql , parameters are represented by ? in the sql\n PreparedStatement ps = con.prepareStatement(SQLCommand); \n \n //setting the parameters values\n ps.setInt(1,b.getLineupOrder());\n ps.setLong(2,e.getId());\n ps.setLong(3, b.getArtist().getId());\n ps.setLong(4, t.getId());\n \n //exceuting the insert or update operation \n ps.executeUpdate(); \n }\n catch (SQLException ex){\n ex.printStackTrace();\n result = ex.getMessage();\n }\n return result;\n }", "public void doDataAddToDb() {\n String endScore = Integer.toString(pointsScore);\r\n String mLongestWordScore = Integer.toString(longestWordScore);\r\n String date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.US).format(new Date());\r\n Log.e(TAG, \"date\" + date);\r\n\r\n // creating a new user for the database\r\n User newUser = new User(userNameString, endScore, date, longestWord, mLongestWordScore); // creating a new user object to hold that data\r\n\r\n // add new node in database\r\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\r\n mDatabase.child(\"users\").child(userNameString).setValue(newUser);\r\n\r\n Log.e(TAG, \"pointsScore\" + pointsScore);\r\n Log.e(TAG, \"highestScore\" + highestScore);\r\n\r\n\r\n // if high score is achieved, send notification\r\n if (highestScore > pointsScore) {\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n sendMessageToNews();\r\n }\r\n }).start();\r\n }\r\n }", "public void insert(int value){\n linkedList.insertLast(value);\n }", "public void addCustomer(int Id, String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward, Boolean reg) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.CUSTOMER \" + \"VALUES ('\" \n + Id + \"','\" + name + \"', '\" + dob + \"', '\" \n + gender + \"', '\" + number + \"', '\" \n + email + \"', '\" + address + \"', '\" \n + password + \"', '\" + promo + \"', '\"+ reward + \"', '\"+ reg \n + \"')\");\n\n }", "public static void addRecord(TableName tableName, String rowKey,\n String family, String qualifier, String value) throws IOException {\n Connection cn = ConnectionFactory.createConnection(conf);\n try {\n Table table = cn.getTable(tableName);\n Put put = new Put(Bytes.toBytes(rowKey));\n put.addColumn(Bytes.toBytes(family), Bytes.toBytes(qualifier), Bytes\n .toBytes(value));\n table.put(put);\n System.out.println(\"insert recorded \" + rowKey + \" to table \"\n + tableName + \" ok.\");\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (cn != null)\n cn.close();\n }\n }", "@Override\n public void onClick(View view) {\n Log.d(\"CALL_TEST\", \"SAVE!\");\n DbManager db = DbManager.getInstance(getApplicationContext());\n\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"NAME\", \"홍길동\");\n contentValues.put(\"PHONE\", \"1234\");\n\n db.insert(contentValues);\n }", "private void addEntity(String name, int value)\n\t{\n\t\tmap.add(name, value);\n\t}", "int insert(WizardValuationHistoryEntity record);", "public boolean insert(Integer key, String value) {\n\t\treturn root.insert(key, value);\n\t}", "@Override\n public int insert(E value) {\n //noinspection DuplicateStringLiteralInspection\n log.trace(\"Adding '\" + value + \"' to pool '\" + poolName + \"'\");\n int insertPos = Collections.binarySearch(this, value, this);\n if (insertPos >= 0) {\n log.trace(\"Value '\" + value + \"' already exists in pool '\" + poolName + \"'\");\n return -1 * insertPos - 1;\n }\n insertPos = -1 * (insertPos + 1);\n add(insertPos, value); // Positive position\n return insertPos;\n }", "public boolean add(String value){\n int index=findIndexBinary(value);\n super.add(index,value);\n return true;\n }", "@Override\r\n public void addModel(String name, Object value) {\n if (value == null) return;\r\n super.addModel(name, value);\r\n }", "@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\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 }", "protected void addData(Object value) {\n\t\tproxy.addData(value);\n\t}", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "public void addData() {\n boolean isInserted = my_db.insertData(\"LIC\");\n if (isInserted) {\n Toast.makeText(MainActivity.this, \"LIC inserted\", Toast.LENGTH_SHORT).show();\n\n }\n isInserted = my_db.insertData(\"Mutual Fund\");\n if (isInserted) {\n Toast.makeText(MainActivity.this, \"Mutual Fund inserted\", Toast.LENGTH_SHORT).show();\n\n }\n isInserted = my_db.insertData(\"Mediclaim\");\n if (isInserted) {\n Toast.makeText(MainActivity.this, \"Mediclaim inserted\", Toast.LENGTH_SHORT).show();\n\n }\n }", "private void addSeatToDatabase(Seat seat) throws SQLException {\n\n\t\tseatdb.storeToDatabase(seat);\n\t}", "public int insert(int value)\n {\n amount = amount + value;\n return amount;\n }", "org.hl7.fhir.Quantity addNewValueQuantity();", "public void addValue(Object value)\n\t{\n\t\tif (!values.contains(value))\n\t\t{\n\t\t\tvalues.add(value + \"\");\n\t\t}\n\t}", "public void storeValues() throws SQLException { //store values into the database\n \tstoreValuesDump();\n \tstoreValuesMatl();\n }", "public void addVariableToTable(String name, VoogaData value) {\n\t\tthis.getItems().add(new Property(name, value));\n\t\tproperties.put(name, value);\n\t}", "public boolean add(Object value)\r\n {\r\n if (contains(value))\r\n return false;\r\n root = add(root, value);\r\n return true;\r\n }", "public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\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}\r\n\t}", "@Override\n\tpublic void add(Brand brand) {\n\t\tsql=\"insert into brands (Name) values (?)\";\n \ttry {\n\t\t\tquery=connection.prepareStatement(sql);\n\t\t\tquery.setString(1, brand.getName());\n\t\t\tquery.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tnew Exception(e);\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic int addMovie(Movie movie) {\n\t\tfinal String sql=\"Insert into movie(MOVIE_ID,MOVIE_NAME,LANGUAGE,GENERE,TYPE,DURATION) values(\"+movie.getMovieId()+\",'\"+movie.getMovieName()+\"','\"+movie.getLanguage()+\"','\"+movie.getGenere()+\"','\"+movie.getType()+\"',\"+movie.getDuration()+\")\";\n\t\t\n\t\tJdbcTemplate jdbcTemplate=JdbcTemplateFactory.getJdbcTemplate();\n\t\tKeyHolder keyHolder= new GeneratedKeyHolder();\n\t\t\n\t\tjdbcTemplate.update(new PreparedStatementCreator(){\n\n\t\t\t@Override\n\t\t\tpublic PreparedStatement createPreparedStatement(Connection connection)\n\t\t\t\t\tthrows SQLException {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n\t\t\t}\n\t\t\t\n\t\t},keyHolder);\n\t\treturn keyHolder.getKey().intValue();\n\t}", "@Override\r\n\tpublic int addEmployee(Employee employee) {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}", "public void addTicket(phonecallTicket ticket){\n try {\n \n System.out.println(\"Number of tickets? \" + (total()+1));\n String insert =\"INSERT INTO JEREMY.TICKET \"\n + \"(ID,NAME,PHONE,TAG,DATE,PROBLEM,NOTES,STATUS) \"\n + \"VALUES \"\n \n + \"(\" + (total() +1) +\",'\"\n +ticket.who+\"','\"\n +ticket.phone+\"','\"\n +ticket.tag+\"',' \"\n +ticket.date+\"',' \"\n +ticket.problem+\"',' \"\n +ticket.notes+\"','\"\n +\"NEW\"+\"')\";\n \n System.out.println(insert);\n \n stmt.executeUpdate(insert);\n \n rs = stmt.executeQuery(\"SELECT * FROM JEREMY.TICKET\");\n total();\n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n }\n tickets.add(ticket);\n }", "public long insert(EvaluetingListDO evaluetingList) throws DataAccessException;" ]
[ "0.63667953", "0.61841446", "0.61201507", "0.6119938", "0.6119788", "0.60980767", "0.6068531", "0.6064101", "0.6037052", "0.6027706", "0.6015041", "0.59528106", "0.59198046", "0.5914859", "0.59136385", "0.59127086", "0.5863815", "0.5863578", "0.58490765", "0.58251745", "0.5806096", "0.57967705", "0.57929546", "0.57852006", "0.5774466", "0.5763705", "0.57635134", "0.57617027", "0.5756692", "0.5751259", "0.57294565", "0.5728267", "0.5727706", "0.57188964", "0.5709138", "0.5707296", "0.5701015", "0.5698516", "0.5697031", "0.5695145", "0.56927073", "0.56912535", "0.5688077", "0.5687853", "0.56864667", "0.56829685", "0.56820226", "0.5678929", "0.5678722", "0.56709355", "0.5669723", "0.5665139", "0.5660516", "0.5655782", "0.56526655", "0.565111", "0.5650321", "0.5649276", "0.56415915", "0.56393313", "0.56235206", "0.561622", "0.56118244", "0.56027913", "0.56025684", "0.5599327", "0.55844736", "0.5578865", "0.5574376", "0.55684155", "0.5561759", "0.5558043", "0.5557953", "0.5555399", "0.55497456", "0.55484486", "0.55461496", "0.55439353", "0.5541884", "0.55407935", "0.55401886", "0.5539411", "0.5535717", "0.5534428", "0.5527543", "0.5527036", "0.5519213", "0.55176115", "0.551126", "0.5510793", "0.55084646", "0.5506543", "0.55062824", "0.5502696", "0.5500983", "0.54992324", "0.54986346", "0.5498474", "0.54951465", "0.5490188" ]
0.63534474
1
finds the value in the database, and replaces it's previous data with the current data
public void update(Value value) throws DatabaseException { PreparedStatement stmt = null; try { String sql = "UPDATE \"values\"" + "set recordID = ?, fieldID = ?, batchID = ?, projectID = ?, data = ? " + "WHERE valueID = ?"; stmt = db.getConnection().prepareStatement(sql); stmt.setInt(1, value.getRecordID()); stmt.setInt(2, value.getFieldID()); stmt.setInt(3, value.getBatchID()); stmt.setInt(4, value.getProjectID()); stmt.setString(5, value.getData()); stmt.setInt(6, value.getValueID()); if (stmt.executeUpdate() == 1) { //works } else { throw new DatabaseException(); } } catch(SQLException e) { throw new DatabaseException(); } finally { if(stmt != null) { try { stmt.close(); } catch(SQLException e) { throw new DatabaseException(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String svalue = dataSnapshot.getValue(String.class);\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference upd = database.getReference(\"Info\").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).child(\"oldsubject\");\n upd.setValue(svalue);\n\n }", "private void startDBValue(String target){\n database.getReference(gameCodeRef).child(target).setValue(1);\n }", "public void saveValue() {\n String[] idCol = assignedDataObject.getIdentifyTemplate().getIdentifyColumnNames();\n if (!(idCol.length == 1 && name.equals(idCol[0]))) { // method \"copy\" must not change unique key name! For any other methods it is not needed to save from frame.\n if (this.getText().equals(\"\")) {\n assignedDataObject.setInt(name, 0);\n } else {\n assignedDataObject.setInt(name, this.getIntValue());\n }\n }\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String dvalue = dataSnapshot.getValue(String.class);\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference upd = database.getReference(\"Info\").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).child(\"olddate\");\n upd.setValue(dvalue);\n\n }", "private void updateDB() {\n }", "private void refreshDBDangerZone(){\n FirebaseDatabase.getInstance().getReference().child(\"Danger Zone Markers\")\n .addListenerForSingleValueEvent(new ValueEventListener() {\n Date currentDate = new Date();\n String currentDateString = currentDate.toString();\n String getCurrentDateSubString = currentDateString.substring(0,10);\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n int numberOfMarkers = 0;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n numberOfMarkers++;\n String markerDate = snapshot.child(\"time\").getValue().toString();\n System.out.println(\"MARKER DATE: \" + markerDate);\n System.out.println(\"CURRENT DATE: \" + getCurrentDateSubString);\n if(numberOfMarkers>1){\n if(!(markerDate.contains(getCurrentDateSubString))) {\n snapshot.getRef().removeValue();\n }\n }\n\n\n }\n\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "public void updateValue(UpdateValue value) throws SQLException{\n mysql.update(\"UPDATE `\" + value.getTable() + \"` SET `\"+value.getKey()+\"`='\"+value.getValue()+\"' WHERE `\" + value.getIDKey() + \"` LIKE '\" + value.getIDValue() + \"'\");\n }", "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }", "void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n temp = (dataSnapshot.getValue(ValueCounter.class));\n temp.increment();\n mRef.setValue(temp);\n }", "@Override\n public void setValueInDb(String target, String value) {\n DatabaseReference currentRef = database.getReference(target);\n currentRef.setValue(value);\n }", "public Value putIfExists(Key key, Value value) {\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tValue ret = data.get().getValue();\r\n\t\t\t\t\tdata.get().setValue(value);\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}", "public void updateData(DB db, boolean fillData) throws SQLException{\r\n if(getId() <= 0){\r\n throw new SQLException(\"This object not exists in DB!\");\r\n }\r\n \r\n db.query(\"SELECT \"+getUpdateFunctionName()+\"(\"+getUpdateParameters()+\") as result\");\r\n \r\n db.next();\r\n \r\n if(fillData){\r\n loadData(db);\r\n }\r\n }", "@Override\n public void afterTextChanged(Editable editable) {\n getCurrentSavedDatabaseValues();\n try {\n int currentCounterValue = Integer.parseInt(editable.toString().trim());\n float currentPriceValue = Float.parseFloat(price.getText().toString().trim());\n //float PriceValue = 0;\n /*int CounterValue = 0;\n String CategoryName = \"\";\n\n Cursor cursor = sqLiteDatabase.rawQuery(sqlQuery, null);\n while (cursor.moveToNext()) {\n PriceValue = cursor.getFloat(cursor.getColumnIndex(sqLiteHelper.KEY_Price));\n CounterValue = cursor.getInt(cursor.getColumnIndex(sqLiteHelper.KEY_Counter));\n CategoryName = cursor.getString(cursor.getColumnIndex(sqLiteHelper.Category_Name));\n }*/\n\n if (currentPriceValue != CurrentSavedPriceValue || currentCounterValue != CurrentSavedCounterValue\n || !CategorySelected.equals(CurrentSavedCategoryName)) {\n\n UpdateData.setEnabled(true);\n\n } else {\n UpdateData.setEnabled(false);\n }\n } catch (NumberFormatException e) {\n e.printStackTrace();\n }\n\n catch (NullPointerException e)\n {\n e.printStackTrace();\n }\n\n }", "int updateByPrimaryKey(WizardValuationHistoryEntity record);", "public void updateValue(String variable, String str_value) {\n\t\tDate date = new Date();\n\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\tgc.setTime(date);\n\t\tgc.add(Calendar.HOUR_OF_DAY, -6);\n\t\tdate = gc.getTime();\n\t\tDatabaseStore ds = DatabaseStore.DatabaseTextStore(variable,\n\t\t\t\tstr_value.toString(), date);\n\t\t\n\t\tupdateQuestion(ds);\n\t}", "public MarkerData updateDBMarker(MarkerData newObj) {\n\t\tSQLiteDatabase database = getWritableDatabase();\n\n MarkerData oldObj = getMarker(newObj.getMarkerId());\n\n\t\tContentValues markerVals = new ContentValues();\n\n // Fill the markerVals with only updated entities\n if (oldObj.getName().equals(newObj.getName())) {\n markerVals.put(\"marker_name\", newObj.getName());\n }\n if (oldObj.getDescription().equals(newObj.getDescription())) {\n markerVals.put(\"marker_description\", newObj.getDescription());\n }\n if (oldObj.getLat() != newObj.getLat()) {\n markerVals.put(\"marker_lat\", newObj.getLat());\n }\n if (oldObj.getLong() != newObj.getLong()) {\n markerVals.put(\"marker_long\", newObj.getLong());\n }\n if (oldObj.getMarkerType() != newObj.getMarkerType()) {\n markerVals.put(\"marker_type\", newObj.getMarkerType().getValue());\n }\n if (oldObj.getMapId() != newObj.getMapId()) {\n markerVals.put(\"map_id\", newObj.getMapId());\n }\n if (oldObj.getColor() != newObj.getColor()) {\n markerVals.put(\"marker_color\", newObj.getColor());\n }\n\n String[] args = { \"\"+newObj.getMarkerId() };\n\t\tint rowsAffected = database.update(\"marker\", markerVals, \"marker_id=?\", args);\n\n\t\tCursor c = database\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"SELECT marker_id, marker_name, marker_description, marker_lat, marker_long, marker_type, marker_color, map_id\"\n\t\t\t\t\t\t\t\t+ \" FROM marker\" + \" WHERE marker_id=?\", args);\n\t\tc.moveToFirst();\n\n if (rowsAffected > 1) {\n Log.e(\"AlterEgo::Database::MarkerUpdate\", \"There are many rows with the same marker id. This is a critical error; The database is BONED.\");\n }\n\n return new MarkerData(\n c.getInt(c.getColumnIndex(\"map_id\")),\n c.getInt(c.getColumnIndex(\"marker_id\")),\n c.getString(c.getColumnIndex(\"marker_name\")),\n c.getString(c.getColumnIndex(\"marker_description\")),\n MARKERTYPE.values()[c.getInt(c.getColumnIndex(\"marker_type\"))],\n c.getDouble(c.getColumnIndex(\"marker_lat\")),\n c.getDouble(c.getColumnIndex(\"marker_long\")),\n c.getFloat(c.getColumnIndex(\"marker_color\"))\n );\n }", "int updateByPrimaryKeySelective(WizardValuationHistoryEntity record);", "abstract protected DataValue updateValue(String key);", "public void saveExisting() {\r\n Part modifiedPart = null;\r\n for (Part part : Inventory.getAllParts()) {\r\n if (Integer.parseInt(iDfield.getText()) == part.getId()) {\r\n modifiedPart = part;\r\n }\r\n }\r\n if (modifiedPart instanceof Outsourced && inHouseSelected) {\r\n replacePart(modifiedPart);\r\n\r\n } else if (modifiedPart instanceof InHouse && !inHouseSelected) {\r\n replacePart(modifiedPart);\r\n } else {\r\n modifiedPart.setName(nameField.getText());\r\n modifiedPart.setStock(Integer.parseInt(invField.getText()));\r\n modifiedPart.setPrice(Double.parseDouble(priceField.getText()));\r\n modifiedPart.setMax(Integer.parseInt(maxField.getText()));\r\n modifiedPart.setMin(Integer.parseInt(minField.getText()));\r\n if (inHouseSelected) {\r\n ((InHouse) modifiedPart).setMachineId(Integer.parseInt(machineOrCompanyField.getText()));\r\n } else {\r\n ((Outsourced) modifiedPart).setCompanyName(machineOrCompanyField.getText());\r\n }\r\n\r\n Inventory.updatePart(Inventory.getAllParts().indexOf(modifiedPart), modifiedPart);\r\n }\r\n\r\n }", "@Override\n public void afterTextChanged(Editable editable) {\n getCurrentSavedDatabaseValues();\n try {\n int currentCounterValue = Integer.parseInt(Counter.getText().toString().trim());\n float currentPriceValue = Float.parseFloat(editable.toString().trim());\n /* float PriceValue = 0;\n int CounterValue = 0;\n String CategoryName = \"\";\n\n Cursor cursor = sqLiteDatabase.rawQuery(sqlQuery, null);\n while (cursor.moveToNext()) {\n PriceValue = cursor.getFloat(cursor.getColumnIndex(sqLiteHelper.KEY_Price));\n CounterValue = cursor.getInt(cursor.getColumnIndex(sqLiteHelper.KEY_Counter));\n CategoryName = cursor.getString(cursor.getColumnIndex(sqLiteHelper.Category_Name));\n }*/\n /*try\n {*/\n if (currentPriceValue != CurrentSavedPriceValue || currentCounterValue != CurrentSavedCounterValue\n || !CategorySelected.equals(CurrentSavedCategoryName)) {\n\n UpdateData.setEnabled(true);\n\n } else {\n UpdateData.setEnabled(false);\n }\n }\n catch (NumberFormatException e)\n {\n e.printStackTrace();\n }\n catch (NullPointerException e)\n {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void update(StockDataRecord bo) throws SQLException {\n\t\t\n\t}", "@Override\n public void update(Person p) throws SQLException, ClassNotFoundException\n {\n\n BasicDBObject query = new BasicDBObject();\n query.put(\"Id\", p.getId()); // old data, find key Id\n\n BasicDBObject newDocument = new BasicDBObject();\n\n// newDocument.put(\"Id\", p.getId()); // new data\n newDocument.put(\"FName\", p.getFName()); // new data\n newDocument.put(\"LName\", p.getLName()); // new data\n newDocument.put(\"Age\", p.getAge()); // new data\n System.out.println(newDocument);\n\n BasicDBObject updateObj = new BasicDBObject();\n updateObj.put(\"$set\", newDocument);\n System.out.println(updateObj);\n\n table.update(query, updateObj);\n }", "public void replaceCurrentData(Cursor cursor) {\n\t\tMySimpleCursorAdapter adapt = (MySimpleCursorAdapter)this.getListAdapter();\n\t\t// because data collection is handled in a separate thread, the adapter\n\t\t// may be null if the data is replaced prior to the thread execution\n\t\tif (cursor != null && adapt != null) {\n\t\t\tadapt.changeCursor(cursor);\n\t\t\tadapt.notifyDataSetChanged();\n\t\t} else\n\t\t\tLog.e(TAG, \"Adapter or cursor is null! adapter = \" + adapt + \", cursor = \" + cursor);\n\t}", "int updateByPrimaryKeySelective(Dress record);", "private void updateDatabase() {\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\tArrayList<String> updatedRecords = serializer.serialize(records);\n\t\tDatabaseHandler.writeToDatabase(DATABASE_NAME, updatedRecords);\n\t}", "@Override\n public int update(DataDict stu)\n {\n int rtn = 0;\n try\n {\n String sql = \"update data_dict set \" + \" dict_parent_id =\" + stu.getSuperId() + \", \" + \" dict_index = \"\n + stu.getIndex() + \", \" + \" dict_name = '\" + stu.getName() + \"', \" + \" dict_value = '\"\n + stu.getValue() + \"' \";\n\n sql += \" where dict_id = \" + stu.getId();\n DBUtil db = new DBUtil();\n db.openConnection();\n rtn = db.execCommand(sql);\n db.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n return rtn;\n }", "private void increaseDBValue(String target, int value){\n database.getReference(gameCodeRef).child(target).setValue(value+1);\n }", "public ContentObject setCurrent(\n ContentObject value\n )\n {\n ContentObject replacedObject = objects.set(index,value);\n refresh();\n\n return replacedObject;\n }", "public void editAt(final String cardname) {\n\n\n productimages = model.getProductimages();\n\n mDatabaseReference.child(\"Products\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n for (final DataSnapshot snapshot: dataSnapshot.getChildren()){\n String parent = snapshot.getKey();\n\n mDatabaseReference.child(\"Products\").child(card).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (final DataSnapshot datasnapshot: dataSnapshot.getChildren()){\n String UID = datasnapshot.getKey();\n String card_name = datasnapshot.child(\"cardname\").getValue(String.class);\n System.out.println(\"The card_name is \" + card_name);\n if(card_name.toLowerCase().contains(cardname.toLowerCase())) {\n System.out.println(\"UID here is\" + UID);\n System.out.println(\"bulkdescription \" + bulkdescription.getText().toString());\n\n\n mDatabaseReference.child(\"Products\").child(card).child(UID).removeValue();\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"cardname\").setValue(cardName.getText().toString());\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"carddiscription\").setValue(carddesc.getText().toString());\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"bulkdescription\").setValue(bulkdescription.getText().toString());\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"cardimage\").setValue(cardimage.getText().toString());\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"cardprice\").setValue(cardprice.getText().toString());\n// if (changeflag)\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"productimages\").setValue(firebaseImgAddresses);\n//\n\n\n }\n\n\n\n\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }\n\n myNewCard(cardName.getText().toString().trim(), cardimage.getText().toString(), carddesc.getText().toString(), Float.parseFloat(cardprice.getText().toString()), model.getCardid(),bulkdescription.getText().toString());\n\n\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n\n\n }", "public String updateSkill (String studentid,String skill,Double pknow){\n System.out.println(\"updating skill \"+skill+ \" student \"+studentid + \" pknow \"+pknow);\n String tnp = new String(\"\");\n Document query = new Document();\n query = new Document(\"_id\", new ObjectId(\n studentid)).append(\"skills.name\",skill);\n MongoCursor<Document> cursor = studentSkills.find(query).iterator();\n try {\n // SKill already exists\n if (cursor.hasNext()){\n Document c = cursor.next();\n c.put(\"skills.name\",skill);\n studentSkills.updateOne(c,new Document(\"$set\",new Document(\"skills.$.pknown\",pknow)));\n }\n // SKill is new for student\n else{\n System.out.println(\"Warning Skill does not exists, please add before !\");\n }\n } finally {\n cursor.close();\n }\n\n System.out.println(\"updating know of student\");\n return tnp;\n}", "public void update(){\r\n\t\tthis.loadRecords();\r\n\t}", "private void findPrev() {\n \tthis.find(false);\n }", "public void updateData() {}", "private void updateDatabase(FastLap laptime) throws SQLiteException {\n // if no track name then wait until it is available.\n if (laptime.getTrack().equals(\"\") || laptime.getLaptime(0) < 1)\n return;\n\n // new value\n ContentValues values = new ContentValues();\n values.put(DBTable.COLUMN_LAPTIME, laptime.getLaptime(0));\n values.put(DBTable.COLUMN_SECTOR1, laptime.getLaptime(1));\n values.put(DBTable.COLUMN_SECTOR2, laptime.getLaptime(2));\n values.put(DBTable.COLUMN_SECTOR3, laptime.getLaptime(3));\n // query\n String selection = DBTable.COLUMN_TRACK + \" LIKE ? AND \" +\n DBTable.COLUMN_CAR + \" LIKE ? \";\n String[] args = {laptime.getTrack(), laptime.getCar()};\n int result = database.update(DBTable.TABLE_NAME, values, selection, args);\n // if there was no record for this car/track insert new row\n if (result == 0) {\n values.put(DBTable.COLUMN_TRACK, laptime.getTrack());\n values.put(DBTable.COLUMN_CAR, laptime.getCar());\n values.put(DBTable.COLUMN_CLASS, laptime.getClassGroup());\n database.insert(DBTable.TABLE_NAME, null, values);\n Log.d(TAG, \"DB: \" + laptime.getTrack() + \"/\" + laptime.getCar() + \"/ \" +\n laptime.getClassGroup() + \" inserted: \" + FastLap.format(laptime.getLaptime(0)));\n } else {\n Log.d(TAG, \"DB: \" + laptime.getTrack() + \"/\" + laptime.getCar() + \" \" + \"/ \" +\n laptime.getClassGroup() + FastLap.format(laptime.getLaptime(0)) + \" updated\");\n }\n }", "public void queryDataFromDatabase() {\n AppDatabase database = Room.databaseBuilder(this, AppDatabase.class, DB_NAME).allowMainThreadQueries().build();\n runningdao = database.getRunningdataDAO();\n List<Runningdata> runningdata_list = runningdao.getAllRuningdata();\n for (int i = 0; i < runningdata_list.size(); i++) {\n int oldId = runningdata_list.get(i).getId();\n String oldStarttime = runningdata_list.get(i).getStarttime();\n double oldDistance = runningdata_list.get(i).getDistance();\n double oldCalorie = runningdata_list.get(i).getCalorie();\n System.out.println(\"Database shows here: \"+\"i:\"+i+\"oldId:\"+oldId +\"oldStarttime\"+oldStarttime+\"oldDistance\"+oldDistance+\"oldCalorie\"+oldCalorie);\n }\n // delete data from database by ID\n //runningdao.deleteById(10);\n }", "public void updatebalforedittedPay(int i, String cooom) {\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cooom+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur-i;\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cooom+\"'\", null);\n\t\t\n\t\n\t}", "public String getNewBankId() {\n\t\tString newBankId=null;\n\t\tString bank_id=null;\n\t\t//BasicDBObject searchQuery = new BasicDBObject();\n\t\tDBCursor curr=coll4.find().sort(new BasicDBObject(\"ba_id\", -1)).limit(1);\n\t\tBankInfo bank = new BankInfo();\t\n\t\t\n\t while(curr.hasNext()) {\n\t\t System.out.println(\"inside cursor\");\n\t\t\n\t\t\tDBObject obj = curr.next();\n\t\t\t\n\t\t\tbank_id = obj.get(\"ba_id\").toString();\n\t\t\tbank.setBa_id(bank_id);\n\t\t\tSystem.out.println(\"NEXT Bank ID=\"+bank.getBa_id());\n\t\t }\n\t \n\t newBankId= bank_id;\n\t long tempLong= Long.parseLong(newBankId);\n\t tempLong=tempLong+1;\n\t \n\t newBankId= Long.toString(tempLong);\n\t System.out.println(\"New ID generated\"+newBankId);\n\t return newBankId;\t\t\n\t\t\n\t}", "public void retreat() {\n if( mMatches.hasPrevious() ) {\n setCurrent( mMatches.previous() );\n }\n }", "public void reloadData() {\n log.debug(\"Getting value from method {}\", method.getName());\n T fetchedValue = (T) executeMethod(instance, method, null);\n setData(fetchedValue);\n }", "public XQValue bornAgain() {\n try {\n rset.beforeFirst();\n }\n catch (SQLException e) { }\t// just try\n return new RawResult(rset); \n }", "private void restoreSavedValues() {\n // Find previous times and put them into the layout\n populateTimes();\n fromExisting = preferences.getBoolean(\"fromExisting\", false);\n // If there is a saved comment, put it into the EditText box\n selectedTimeSetId = preferences.getInt(\"SelectedTimeSet\", -1);\n if (selectedTimeSetId != -1) {\n commentBox.setText(DBQueries.getCommentFromTimeset(selectedTimeSetId, database));\n }\n }", "int updateByPrimaryKeySelective(Disease record);", "public void updateDatabaseRefBackwards() {\n // we want to do this twice, since we go from children attribute to folder\n // and then folder to actual parent dir\n myRef = myRef.getParent().getParent();\n }", "private void refreshDataCache(){\n this.stageplaatsen = dbFacade.getAllStageplaatsen();\n this.bedrijven = dbFacade.getAllBedrijven();\n }", "private void enterDiffValuesIntoDB() {\n Location senderLocation = new Location(\"\");\n senderLocation.setLatitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE)));\n senderLocation.setLongitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE)));\n\n Location receiverLocation = new Location(\"\");\n receiverLocation.setLatitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_LATITUDE)));\n receiverLocation.setLongitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_LONGITUDE)));\n String distance = Float.toString(senderLocation.distanceTo(receiverLocation));\n databaseHandler.setValueInExpInfo(distance, \"actual_distance\", experimentNumber);\n\n float altDiff = Float.parseFloat(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_ALTITUDE))\n - Float.parseFloat(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_ALTITUDE));\n String altitudeDifference = Float.toString(altDiff);\n databaseHandler.setValueInExpInfo(altitudeDifference, \"altitude_difference\", experimentNumber);\n\n getWeatherData();\n }", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "void updateData();", "@FXML\r\n private void bRem() throws SQLException {\n int index = tableView.getSelectionModel().getSelectedIndex();\r\n if(index>=0)\r\n {\r\n calc calc = data.get(index);\r\n String tmp = calc.getComment();\r\n try{\r\n UpdateDb(tmp.substring(0,tmp.lastIndexOf(\"\\n\")), calc.getDate());\r\n }catch (StringIndexOutOfBoundsException e)\r\n {\r\n UpdateDb(\"\", calc.getDate());\r\n }\r\n refresh();\r\n }else\r\n {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"ERROR\");\r\n alert.setContentText(\"Nothing Selected!!!\");\r\n alert.showAndWait();\r\n }\r\n }", "private void refreshSubData() {\n\t SfJdRecordFileModel model = (SfJdRecordFileModel) listCursor.getCurrentObject(); \r\n\t }", "private void saveExpositionInDB(String badgeID, int expoSiteId, int expoMonth, int expoYear,\n Date expoDateBegin, Date expoDateEnd, String expoValue)\n throws SQLException {\n\n // do not process exposition is its value is 'M'.\n if(expoValue.equalsIgnoreCase(\"M\")){\n Logger.log(\"Skipped exposition because value is 'M'. (\"+badgeID+\",\"+expoMonth+\",\"+expoValue+\")\",Logger.ERROR_LEVEL_INFO);\n }\n else{\n try{\n // check if value is an integer, otherwise, skip\n Integer.parseInt(expoValue);\n\n // find badgePersonId exposed to this exposition\n psGetPersonIds.setString(1,badgeID);\n psGetPersonIds.setInt(2,expoSiteId);\n psGetPersonIds.setString(3,expoYear+\"\");\n psGetPersonIds.setString(4,expoYear+\"\");\n psGetPersonIds.setTimestamp(5,new Timestamp(expoDateBegin.getTime()));\n psGetPersonIds.setTimestamp(6,new Timestamp(expoDateEnd.getTime()));\n psGetPersonIds.setTimestamp(7,new Timestamp(expoDateBegin.getTime()));\n psGetPersonIds.setTimestamp(8,new Timestamp(expoDateEnd.getTime()));\n ResultSet rs = psGetPersonIds.executeQuery();\n\n // convert to site-id to site-name\n String expoSite = \"\";\n if(expoSiteId==1) expoSite = \"DOEL\";\n else if(expoSiteId==2) expoSite = \"TIHANGE\";\n else if(expoSiteId==3) expoSite = \"IRE\";\n else if(expoSiteId==4) expoSite = \"OTHER\";\n\n // at least one badge found, so add the expoValue to table Items.\n int personCount = 0, personid;\n while(rs.next()){\n // get personid belonging to the found badge\n personid = rs.getInt(\"BadgePersonId\");\n\n // create 3 items to be stored\n itemVOs = new Vector();\n\n // expoValue\n itemType = PREFIX+\"ITEM_TYPE_DOSIMETRY_\"+expoSite+\"_GLOBAL_MONTH\"+expoMonth;\n itemVO = new ItemVO(new Integer(IdentifierFactory.getInstance().getTemporaryNewIdentifier()),itemType,expoValue,new Date(),null);\n itemVOs.add(itemVO);\n\n // badgeID\n itemType = PREFIX+\"ITEM_TYPE_DOSIMETRY_BADGEID_\"+expoSite;\n itemVO = new ItemVO(new Integer(IdentifierFactory.getInstance().getTemporaryNewIdentifier()),itemType,badgeID,new Date(),null);\n itemVOs.add(itemVO);\n\n // expoYear\n itemType = PREFIX+\"ITEM_TYPE_DOSIMETRY_REGISTRATIONYEAR\";\n itemVO = new ItemVO(new Integer(IdentifierFactory.getInstance().getTemporaryNewIdentifier()),itemType,expoYear+\"\",new Date(),null);\n itemVOs.add(itemVO);\n\n storeTransaction(personid,itemVOs,expoSite,expoYear);\n personCount++;\n }\n\n rs.close();\n psGetPersonIds.close();\n // rs empty, no badge found\n if(personCount == 0){\n Logger.log(\"No Badges with BadgeId (\"+badgeID+\") for site (\"+expoSite+\",\"+expoSiteId+\") found in year (\"+expoYear+\").\",Logger.ERROR_LEVEL_INFO);\n }\n }\n // expoValue is no integer\n catch(NumberFormatException e){\n Logger.log(\"Exposition value is no Integer. (\"+badgeID+\",\"+expoMonth+\",\"+expoValue+\")\",Logger.ERROR_LEVEL_ERROR);\n if(Debug.enabled) Debug.println(\"ERROR : Exposition value is no Integer. (\"+badgeID+\",\"+expoMonth+\",\"+expoValue+\")\");\n }\n }\n }", "private void refreshJio() {\n DatabaseReference databaseJiosRef = firebaseDatabase.getReference(\"Jios\");\n databaseJiosRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n JiosItem selected = snapshot.getValue(JiosItem.class);\n if (occaID.equals(selected.getJioID())) {\n titleView.setText(selected.getTitle());\n dateView.setText(DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.UK)\n .format(selected.getDateInfo()));\n updatedDate = selected.getDateInfo();\n timeView.setText(selected.getTimeInfo());\n locationView.setText(selected.getLocationInfo());\n descView.setText(selected.getDescription());\n break;\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public void newAvailableMeal(int position) {\n SQLiteDatabase dBase = getWritableDatabase();\n int new_pos = position + 1;\n Cursor c = dBase.rawQuery(\"SELECT RECIPE_NAME from recipenew WHERE ID = \" + new_pos, null);\n\n if (c != null && c.moveToFirst()) {\n\n String temp = c.getString(0);\n updateMealsArray(temp);\n c.close();\n\n }\n\n dBase.close();\n }", "public void update(){\n\t\tif ( crm.addedNewStudent()){\n\t\t\tList<Student> students = crm.getStudents();\n\t\t\tStudent newest = students.get(students.size()-1);\n\t\t\tint ID = newest.ID();\n\t\t\tString name = newest.name();\n\t\t\tint GradYear = newest.GradYear();\n\t\t\tsv.addStudent(ID, name, GradYear);\n\t\t}\n\t}", "public void saveData(DB db, boolean fillData) throws SQLException{\r\n if(getId() > 0){\r\n throw new SQLException(\"This object exists already in DB!\");\r\n }\r\n \r\n db.query(\"SELECT \"+getSaveFunctionName()+\"(\"+getSaveParameters()+\") as result\");\r\n \r\n db.next();\r\n \r\n setId(db.getLong(\"result\"));\r\n \r\n if(fillData){\r\n loadData(db);\r\n }\r\n \r\n }", "private static void updateTeamRecord(Team t) {\n ArrayList<Object> records = new ArrayList<>();\n //Get existing team data\n ResultSet teamSet = SqlUtil.getTeamRecord(c, TABLE_NAME, t.getIntValue(Team.NUMBER_KEY));\n try {\n ArrayList<String> matches;\n if (teamSet != null) {\n matches = new ArrayList<>(Arrays.asList(SqlUtil.getArrayFromString(teamSet.getString(\"match_nums\"))));\n } else {\n Main.sendError(\"Cannoy read team data: \" + t.getValue(Team.NUMBER_KEY),false);\n return;\n }\n for (String m: matches) {\n //If the match number already exists\n System.out.println(m);\n if (t.getStringValue(Team.MATCH_KEY).equalsIgnoreCase(m.trim())) {\n return;\n }\n }\n records.add(t.getIntValue(Team.NUMBER_KEY));\n records.add(t.getValue(Team.COLOR_KEY));\n records.add(1+teamSet.getInt(\"num_matches\"));\n matches.add(t.getStringValue(Team.MATCH_KEY));\n records.add(matches.toArray(new String[matches.size()]));\n for(Element e: Main.getElements()){\n switch (e.getType()){\n\n case SEGMENTED_CONTROL:\n for (int i = 0; i<e.getArguments().length;i++){\n if (t.getStringValue(e.getKeys()[0]).equalsIgnoreCase(e.getArguments()[i])){\n records.add(1+teamSet.getInt(e.getColumnValues()[i]));\n } else {\n records.add(teamSet.getInt(e.getColumnValues()[i]));\n }\n }\n break;\n case TEXTFIELD:\n if (e.getArguments()[0].equalsIgnoreCase(\"number\")) {\n records.add(t.getIntValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n\n } else if (e.getArguments()[0].equalsIgnoreCase(\"decimal\")){\n records.add(t.getDoubleValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n }\n break;\n case STEPPER:\n records.add(t.getIntValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n break;\n case LABEL:\n break;\n case SWITCH:\n for (int i = 0; i<e.getKeys().length;i++){\n if (t.getStringValue(e.getKeys()[i]).equalsIgnoreCase(\"yes\")){\n records.add(1 + teamSet.getInt(e.getColumnValues()[i*2]));\n records.add(teamSet.getInt(e.getColumnValues()[i*2+1]));\n } else {\n records.add(teamSet.getInt(e.getColumnValues()[i*2]));\n records.add(1 + teamSet.getInt(e.getColumnValues()[i*2+1]));\n }\n }\n break;\n case SPACE:\n break;\n case SLIDER:\n records.add(t.getDoubleValue(e.getKeys()[0]) + teamSet.getDouble(e.getColumnValues()[0]));\n break;\n }\n }\n double total = 0.0;\n\n for (Equation e: Main.getEquations()){\n double value = e.evaluate(t) + teamSet.getDouble(e.getColumnValue());\n records.add(value);\n total +=value;\n }\n\n records.add(total);\n\n SqlUtil.updateTeamRecord(c,TABLE_NAME, records.toArray(new Object[records.size()]),t.getStringValue(Team.NUMBER_KEY));\n\n } catch (SQLException e) {\n Main.sendError(\"Problem updating team records\", false, e);\n } catch (NullPointerException e){\n Main.sendError(\"Cannot read team data for team \" + t.getValue(Team.NUMBER_KEY),false,e);\n }\n }", "private void refreshData() {\n\r\n\t SfJdRecordFileModel model = (SfJdRecordFileModel) listCursor.getCurrentObject();\r\n\r\n\t if (model != null && !\"\".equals(ZcUtil.safeString(model.getModelId()))) {//列表页面双击进入\r\n\r\n\t this.pageStatus = ZcSettingConstants.PAGE_STATUS_BROWSE;\r\n\r\n\t model = getModel(model.getModelId());\r\n\t listCursor.setCurrentObject(model);\r\n\t this.setEditingObject(model);\r\n\t } else {//新增按钮进入\r\n\r\n\t this.pageStatus = ZcSettingConstants.PAGE_STATUS_NEW;\r\n\r\n\t model = new SfJdRecordFileModel();\r\n\t \r\n\t setDefaultValue(model);\r\n\r\n\t listCursor.getDataList().add(model);\r\n\r\n\t listCursor.setCurrentObject(model);\r\n\r\n\t this.setEditingObject(model);\r\n\r\n\t }\r\n\r\n\t refreshSubData();\r\n\t \r\n\t setOldObject();\r\n\r\n\t setButtonStatus();\r\n\r\n\t updateFieldEditorsEditable();\r\n\r\n\t }", "private void updateValue( DatabaseReference db, String parent, String child) {\r\n db.child(parent).addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot snapshot) {\r\n if (snapshot.hasChild(child)) {\r\n db.child(parent).child(child).setValue((Long)(snapshot.child(child).getValue())+1);\r\n }\r\n else\r\n db.child(parent).child(child).setValue(1);\r\n }\r\n\r\n @Override\r\n public void onCancelled(@NonNull DatabaseError error) {\r\n\r\n }\r\n });\r\n }", "public Item setBack (Item item) {\n if(isEmpty()) throw new NoSuchElementException(\"Failed to setBack, because DList is empty!\") ;\n // update the value of the last actual node (the last node itself is a sentinel node)\n Item oldValue = last.prev.data; \n last.prev.data = item;\n return oldValue;\n }", "public void save(GameBoard gameBoard) {\n String sql = \"REPLACE INTO dat (k, content) values ('gameboard', ?)\";\n\n try (PreparedStatement stmt = connection.prepareStatement(sql)) {\n Gson gson = new Gson();\n String str = gson.toJson(gameBoard);\n stmt.setString(1, str);\n stmt.execute();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@FXML\n private void selectedBtnEdit(ActionEvent event){\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"'\";\n rset = connection.prepareStatement(query).executeQuery();\n isNewRecord = !rset.next(); //set a flag to the record retrieved as existing record and used to determine if an SQL for insert or update should be done\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n TextFieldEditableProperty(true,1.00);\n }", "private ListGridRecord getEditedRecord(DSRequest request)\n {\n JavaScriptObject oldValues = request.getAttributeAsJavaScriptObject(\"oldValues\");\n // Creating new record for combining old values with changes\n ListGridRecord newRecord = new ListGridRecord();\n // Copying properties from old record\n JSOHelper.apply(oldValues, newRecord.getJsObj());\n // Retrieving changed values\n JavaScriptObject data = request.getData();\n // Apply changes\n JSOHelper.apply(data, newRecord.getJsObj());\n return newRecord;\n }", "@Override\n public void onClick(View v) {\n dbRefUsers.child(cleanEmail).child(\"businesses\").push().setValue(b);\n\n // Add business to savedBusinesses\n Singleton.get(getApplicationContext()).addSavedBusiness(b);\n // Send Toast\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.message_save_search),\n Toast.LENGTH_SHORT).show();\n\n }", "private ListGridRecord getEditedRecord(DSRequest request) {\n\t\tJavaScriptObject oldValues = request\n\t\t\t\t.getAttributeAsJavaScriptObject(\"oldValues\");\n\t\t// Creating new record for combining old values with changes\n\t\tListGridRecord newRecord = new ListGridRecord();\n\t\t// Copying properties from old record\n\t\tJSOHelper.apply(oldValues, newRecord.getJsObj());\n\t\t// Retrieving changed values\n\t\tJavaScriptObject data = request.getData();\n\t\t// Apply changes\n\t\tJSOHelper.apply(data, newRecord.getJsObj());\n\t\treturn newRecord;\n\t}", "int updateByPrimaryKeySelective(Tourst record);", "private void findNewNextInStack() {\n if (stack.empty()) {\n next = Chunk.NONE;\n return;\n }\n next = stack.pop();\n long valueReference = INVALID_VALUE_REFERENCE;\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n while (next != Chunk.NONE && valueReference == INVALID_VALUE_REFERENCE) {\n if (!stack.empty()) {\n next = stack.pop();\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n } else {\n next = Chunk.NONE;\n return;\n }\n }\n }", "private void updateDB() {\r\n //if(!m_state.isEndingGame()) return;\r\n if(m_connectionName == null || m_connectionName.length() == 0 || !m_botAction.SQLisOperational()) {\r\n m_botAction.sendChatMessage(\"Database not connected. Not updating scores.\");\r\n return;\r\n }\r\n\r\n for(KimPlayer kp : m_allPlayers.values()) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"INSERT INTO tblJavelim (fcName,fnGames,fnKills,fnDeaths) \"\r\n + \"VALUES ('\" + Tools.addSlashes(kp.m_name) + \"',1,\" + kp.m_kills + \",\" + kp.m_deaths + \") \"\r\n + \"ON DUPLICATE KEY UPDATE fnGames = fnGames + 1, fnKills = fnKills + VALUES(fnKills), fnDeaths = fnDeaths + VALUES(fnDeaths)\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n\r\n if(m_mvp != null) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"UPDATE tblJavelim SET fnMVPs = fnMVPs + 1 WHERE fcName='\" + Tools.addSlashes(m_mvp.m_name) + \"'\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n\r\n if(m_winner != null && m_winner.size() != 0) {\r\n for(KimPlayer kp : m_winner) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"UPDATE tblJavelim SET fnWins= fnWins + 1 WHERE fcName='\" + Tools.addSlashes(kp.m_name) + \"'\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n }\r\n }", "private void updateNrPlayerValues(String target) {\n database.getReference(gameCodeRef).child(target).addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String value = String.valueOf(snapshot.getValue());\n if (value.isEmpty() || value == null || value.equals(null) || value.contains(\"null\")){\n startDBValue(target);\n value = \"1\";\n }\n else {\n increaseDBValue(target, Integer.parseInt(value));\n }\n switch (target){\n case \"NumberOfPlayers\":\n break;\n case \"PlayersDoneBrainstorming\":\n checkPlayersDoneBrainstorming(Integer.parseInt(value)+1);\n break;\n case \"PlayersDoneEliminating\":\n checkPlayersDoneEliminating(Integer.parseInt(value)+1);\n break;\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG,\"loadGamecode:onCancelled\", error.toException());\n }\n\n });\n }", "@Override\n public void rollbackValues() {\n \n }", "private void subirDispositivo(){\n DatabaseReference subir_data = db_reference.child(\"Dispositivo\");\n Map<String, String> dataDispositivo = new HashMap<String, String>();\n dataDispositivo.put(\"Evento\", etNombreCurso.getText().toString());\n dataDispositivo.put(\"Latitud1\", disp_Lat1);\n dataDispositivo.put(\"Longitud1\", disp_Long1);\n dataDispositivo.put(\"Latitud2\", disp_Lat2);\n dataDispositivo.put(\"Longitud2\", disp_Long2);\n subir_data.push().setValue(dataDispositivo);\n }", "public long updateData(String settingName, String value){\n Setting setting = getSettingByTitle(settingName, true);\n\n long rowId = 0;\n\n if(setting!=null){\n ContentValues contentValues = new ContentValues();\n contentValues.put(COL_Value, value);\n rowId = sqLiteDatabase.update(TABLE_NAME, contentValues, \"Id=\"+setting.getId(), null);\n }\n\n return rowId;\n }", "private static void idReplace() {\n\t\tList<String> list = FileUtil.FileToList(\"C:/Users/强胜/Desktop/dataCrawler/申请方/翻译后的/去掉过时的/过时的program取代表1013.txt\");\n\t\tMap<String,Integer> map = new HashMap<String,Integer>();\n\t\tfor(String xx : list)\n\t\t\tmap.put(xx.split(\"\\t\")[0], Integer.parseInt(xx.split(\"\\t\")[1]));\n\t\t\n\t\tString url = \"123.57.250.189\";\n\t\tint port = 27017;\n\t\tString dbName = \"dulishuo\";\n\t\tDB db = MongoUtil.getConnection(url, port, dbName);\n\t\t\n\t\tDBCollection offer = db.getCollection(\"offer\"); \n\t DBCursor find = offer.find();\n\t \n\t while(find.hasNext()){\n\t \tSystem.out.println(\"process_____\"+count++);\n\t \tDBObject obj = find.next();\n\t \tif(obj.containsField(\"program_id\")){\n\t \t\tString id = obj.get(\"program_id\").toString();\n\t\t \tif(map.containsKey(id)){\n\t\t \t\ttry{\n\t\t\t \t\t\n\t\t\t \t\tBasicDBObject newDocument = new BasicDBObject(); \n\t\t\t\t\t\tnewDocument.append(\"$set\", new BasicDBObject().append(\"program_id\", map.get(id))); \n\t\t\t\t\t\toffer.update(obj, newDocument);\n\t\t\t \t\t\n\t\t\t \t}catch(Exception e){\n\t\t\t \t\t\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t }\n\t System.out.println(\"______________---End---------------\");\n\t}", "private void refreshTableForUpdate()\n {\n //Was updating the values but don't believe this is necessary, as like budget items\n //a loss amount will stay the same unless changed by the user (later on it might be the\n //case that it can increase/decrease by a percentage but not now...)\n /*\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n for (MoneyLoss loss : bbd.getLosses())\n {\n TextView valueView = valueViews.get(loss.expenseDescription());\n valueView.setText(BadBudgetApplication.roundedDoubleBB(loss.lossAmount()));\n }\n */\n }", "int updateByPrimaryKey(SecondSlideshow record);", "void loadWeather() {\n\n // existing station's weather records are never updated.\n // why not?????\n\n// if (!\"\".equals(stationId) && !stationIgnore) {\n if (!stationExists && !weather.isNullRecord()) {\n\n if (!weatherIsLoaded) {\n\n // is there a weather record?\n// int count = weather.getRecCnt(\n// MrnWeather.STATION_ID + \"=\" + stationId);\n\n// if (count == 0) {\n\n // insert weather record\n weather.setStationId(stationId);\n if (dbg3) System.out.println(\"<br>loadWeather: put weather = \" + weather);\n try {\n weather.put();\n } catch(Exception e) {\n System.err.println(\"loadWeather: put weather = \" + weather);\n System.err.println(\"loadWeather: put sql = \" + weather.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n weatherCount++;\n\n// } else {\n//\n// // update weather record\n// MrnWeather whereWeather = new MrnWeather(stationId);\n// whereWeather.upd(weather);\n//\n// } // if (weatherRecordCount == 0)\n//\n weatherIsLoaded = true;\n } // if (!weather.isNullRecord())\n\n } // if (!stationExists && !weather.isNullRecord())\n// } // if (!\"\".equals(stationId) && !stationIgnore)\n\n weather = new MrnWeather();\n\n }", "private void updateDatabase() {\n\n Database db = new Database();\n \n ArrayList<Order> orderArr = new ArrayList<>();\n orderArr = db.getPaidOrders(1);\n \n for (int i = 0; i < orderArr.size(); i++) {\n DefaultTableModel model = (DefaultTableModel) tblInvoices.getModel();\n \n boolean available = true;\n if (orderArr.get(i).getQuantity() == 0){\n available = false;\n }\n \n Object[] row = {orderArr.get(i).getOrderid(),\n orderArr.get(i).getBusinessname(), \n orderArr.get(i).getAmount(), \n orderArr.get(i).getDate()};\n model.addRow(row);\n } \n }", "private static CompletionStage<Void> update(ReactiveMongoCollection collection, Object entity) {\n BsonDocument document = getBsonDocument(collection, entity);\n\n //then we get its id field and create a new Document with only this one that will be our replace query\n BsonValue id = document.get(ID);\n BsonDocument query = new BsonDocument().append(ID, id);\n return collection.replaceOne(query, entity).thenApply(u -> null);\n }", "E update(E entiry);", "@Test\n void updateSuccess() {\n String newDescription = \"December X-Large T-Shirt\";\n Order orderToUpdate = dao.getById(3);\n orderToUpdate.setDescription(newDescription);\n dao.saveOrUpdate(orderToUpdate);\n Order retrievedOrder = dao.getById(3);\n assertEquals(newDescription, retrievedOrder.getDescription());\n\n String resetDescription = \"February Small Long-Sleeve\";\n Order orderToReset = dao.getById(3);\n orderToUpdate.setDescription(resetDescription);\n dao.saveOrUpdate(orderToReset);\n }", "public void updatebalforwadPay(int i, String cooom) {\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cooom+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur-i;\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cooom+\"'\", null);\n\t\t\n\t}", "int updateByPrimaryKey(Tourst record);", "@Override\r\n\tprotected void setValue(Object element, Object value) {\r\n\t\t// update the whole table\r\n\t\tgetViewer().refresh();\r\n\t}", "@Override\n public ContentValues db_save(ContentValues values) {\n return null;\n }", "private void updateBalanceInDatabase(DatabaseReference ref, final String newValue){\n ref.child(\"currentBalance\").setValue(newValue).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Log.d(\"Firebase\", \"Added New Value \"+ newValue + \" \");\n startActivity(new Intent(NewTransactionActivity.this, HomePageActivity.class));\n finish();\n }\n }\n });\n }", "int updateByPrimaryKeySelective(Prueba record);", "public void updateDataComp() {\n\t\tdataEntryDao.updateDataComp();\n\t}", "protected Object atInsert(Object value) {\n return null;\n }", "public XQValue bornAgain() {\n try {\n rset.beforeFirst();\n }\n catch (SQLException e) { }\t// just try\n return new Result(rset); \n }", "protected void updateLocalData(Building[] data){\n new DBHandler(cx).updateBuildings(data);\n }", "@Override\n\tpublic boolean update(String sql) {\n\t\treturn false;\n\t}", "public void getCurrentSearchData(String newText) {\n newText = newText.toLowerCase();\n Iterator it = people.entrySet().iterator();\n String personName;\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n ArrayList<String> personInfo = ((ArrayList<String>) pair.getValue());\n if (personInfo.get(1).toLowerCase().contains(newText)) { // first name\n personName = loginModel.getName(pair.getKey().toString());\n addIfNotInArrayList(personName);\n } else if (personInfo.get(2).toLowerCase().contains(newText)) { // last name\n personName = loginModel.getName(pair.getKey().toString());\n addIfNotInArrayList(personName);\n }\n }\n\n // countries\n // cities\n // descriptions\n // years\n // ----- // insert event id\n Iterator it2 = events.entrySet().iterator();\n while (it2.hasNext()) {\n Map.Entry pair = (Map.Entry) it2.next();\n ArrayList<String> eventInfo = ((ArrayList<String>) pair.getValue());\n String eventDescription;\n if (eventInfo.get(3).toLowerCase().contains(newText)) { // Country\n eventDescription = loginModel.getEventDescription(\n pair.getKey().toString());\n addIfNotInArrayList(eventDescription);\n } else if (eventInfo.get(4).toLowerCase().contains(newText)) { // city\n eventDescription = loginModel.getEventDescription(\n pair.getKey().toString());\n addIfNotInArrayList(eventDescription);\n } else if (eventInfo.get(5).toLowerCase().contains(newText)) { // description\n eventDescription = loginModel.getEventDescription(\n pair.getKey().toString());\n addIfNotInArrayList(eventDescription);\n } else if (eventInfo.get(6).toLowerCase().contains(newText)) { // year\n eventDescription = loginModel.getEventDescription(\n pair.getKey().toString());\n addIfNotInArrayList(eventDescription);\n }\n\n }\n System.out.println(\"\");\n }", "protected void removeOldData() {\n if (!storage.isEmpty()) {\n long timeLowerbound = storage.lastKey() - maxStorageTime;\n while (!storage.isEmpty() && storage.firstKey() < timeLowerbound) {\n storage.pollFirstEntry();\n } \n }\n }", "private void changeCurrentValue()\n {\n String theText = textBox.toString();\n\n // find the first newline\n int index = theText.indexOf(\"\\n\");\n assert index != -1;\n\n // insert new stuff\n StringBuilder newText = new StringBuilder();\n newText.append(currentTag);\n newText.append(\": \");\n newText.append(currentValue);\n newText.append(\"\\n\");\n\n textBox.replaceTextRange(0, index, newText.toString());\n }", "int updateByPrimaryKey(ParkCurrent record);", "@Override\n public void put(String key, String value) {\n database.put(key, value);\n\n String cachedData = cache.get(key);\n if (cachedData != null && !cachedData.equals(value)) {\n this.cache.remove(key);\n }\n }", "private void updateCurrentBalance(final String earnedOrSpent, String clientId, final String amountGiven) {\n final DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Clients/\" + clientId);\n\n try{\n final String[] currentValue = new String[1];\n ref.child(\"currentBalance\").get().addOnCompleteListener(new OnCompleteListener<DataSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DataSnapshot> task) {\n if(task.isSuccessful()){\n currentValue[0] = String.valueOf(task.getResult().getValue());\n Double newValue = 0.0;\n if(earnedOrSpent.equalsIgnoreCase(\"spent\")){\n newValue = Double.parseDouble(currentValue[0]) - Double.parseDouble(amountGiven);\n }else{\n newValue = Double.parseDouble(currentValue[0]) + Double.parseDouble(amountGiven);\n }\n\n updateBalanceInDatabase(ref, String.valueOf(newValue));\n Log.d(\"Firebase\", currentValue[0]);\n }\n }\n });\n }catch(Exception e){\n Log.d(\"NewTransactionActivity\", e.toString());\n }\n\n }", "void updateFavor(HouseFavor houseFavor);", "private void updrec() {\n\t\tsavedata();\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00011 Product found on Contract_Detail and NOT ERROR(CONDET)\n\t\tif (! nmfkpinds.pgmInd36() && ! nmfkpinds.pgmInd66()) {\n\t\t\trestoredata();\n\t\t\tcontractDetail.update();\n\t\t\tnmfkpinds.setPgmInd99(isLastError());\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"Y2U0007\", \"\", msgObjIdx, messages);\n\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t}", "int updateByPrimaryKey(EvaluationRecent record);", "void update ( priorizedListObject v ) throws DAOException;", "public void redbal(String cname, String amt) {\n\t\t\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cname+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur-Integer.parseInt(amt);\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cname+\"'\", null);\n\t\t\n\t\n\t}" ]
[ "0.55916864", "0.5587262", "0.5419201", "0.52334356", "0.5152313", "0.5133671", "0.51143205", "0.5093129", "0.5057701", "0.5041014", "0.5038783", "0.5030371", "0.50123864", "0.49986804", "0.49531627", "0.49433225", "0.49424377", "0.4932676", "0.49305713", "0.49230406", "0.4918134", "0.49133745", "0.49118018", "0.4905198", "0.49038896", "0.4901969", "0.48843703", "0.4883718", "0.48787054", "0.4863457", "0.48514464", "0.48473912", "0.4839993", "0.48329735", "0.482876", "0.4824846", "0.48245862", "0.48133713", "0.47992116", "0.4795016", "0.47932133", "0.47931194", "0.47895607", "0.47828364", "0.47799924", "0.47786364", "0.47769883", "0.47634572", "0.47500527", "0.4745113", "0.47437721", "0.47386688", "0.47370046", "0.473111", "0.4729256", "0.47239175", "0.47233286", "0.47067717", "0.4705658", "0.4700998", "0.4698936", "0.46985242", "0.4698296", "0.46973184", "0.469686", "0.46912754", "0.46863994", "0.4685953", "0.46801955", "0.46795747", "0.46791667", "0.46782085", "0.4678133", "0.4677243", "0.46770632", "0.46767965", "0.46760577", "0.4672743", "0.467255", "0.46645114", "0.4660406", "0.4658168", "0.46556106", "0.46552828", "0.46485072", "0.46471024", "0.46407175", "0.46371222", "0.4634381", "0.4631691", "0.46310735", "0.46281603", "0.46267852", "0.462606", "0.46258017", "0.4624736", "0.4622939", "0.46216697", "0.4620618", "0.46169862", "0.46124077" ]
0.0
-1
removes a value from the database
public void delete(Value value) throws DatabaseException { PreparedStatement stmt = null; try { String sql = "DELETE FROM \"values\" WHERE valueID = " + Integer.toString(value.getValueID()); stmt = db.getConnection().prepareStatement(sql); if (stmt.executeUpdate() == 1) { //It worked! } else { throw new DatabaseException(); } } catch(SQLException e) { throw new DatabaseException(); } finally { if(stmt != null) { try { stmt.close(); } catch(SQLException e) { throw new DatabaseException(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void removeFromDb() {\n }", "private DeleteByValue() {}", "private DeleteByValue() {}", "private void deleteOne(String value){\n\t\tnumCache.put(value, numCache.get(value) - 1);\n\t\tif (numCache.get(value) == 0){\n\t\t\tnumCache.remove(value);\n\t\t}\n\t}", "boolean delete(int value);", "public void deleteRecord(LVValue value) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\tmyData.record=createRecord(myData.spec,null);\n\t\ttry\n\t\t{\n\t\t\tmyData.record.setID(value.getStringValue());\n\t\t\tmyData.record.delete(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Override\n\tpublic void removeValue(String arg0) {\n\t}", "public int deleteByRegbyid(Integer value) throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"DELETE FROM preference WHERE regbyid=?\");\n Manager.setInteger(ps, 1, value);\n return ps.executeUpdate();\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "private void noticedelete(String postid){\n reference2 = FirebaseDatabase.getInstance().getReference(\"Notice\").child(postid);\n reference2.removeValue();\n }", "public void eliminar(){\n SQLiteDatabase db = conn.getWritableDatabase();\n String[] parametros = {cajaId.getText().toString()};\n db.delete(\"personal\", \"id = ?\", parametros);\n Toast.makeText(getApplicationContext(), \"Se eliminó el personal\", Toast.LENGTH_SHORT).show();\n db.close();\n }", "@Override\n public Pacote remove(Object key) {\n Pacote pt = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Pacote SET visivel=FALSE WHERE nomePacote=?;\");\n \n stm.setString(1, (String)key); //parse da key para a querie\n stm.executeUpdate();\n \n } catch (SQLException | ClassNotFoundException e) {\n throw new NullPointerException(e.getMessage());\n } finally {\n Connect.close(conn);\n }\n return pt;\n }", "@Test\n\tpublic void removeFromBackend()\n\t{\n\t\tData d=new Data();\n\t\td.set(24,-1);\n\t\tassertEquals(d.boardData[24].intValue(),-1);\n\n\t}", "void removeValue(String key);", "public int deleteLocalKeyVal(String key){\n\t\tint result = 0;\n\t\tString whereClause = DBHelper.KEY_FIELD+\"=?\";\n\t\tString selection = key;\n \tString []whereArgs = new String[]{selection};\n \tif(selection.equals(\"@\")){\n \t\twhereClause = \"1\";\n \t\twhereArgs = null;\n \t}\n \tresult = dbHelper.delete(whereClause, whereArgs);\n\t\treturn result;\n\t}", "public void onClick(DialogInterface dialog, int which) {\n indivReservee.getRef().removeValue();\n\n //Remove reservation from user\n for(DataSnapshot indivSpace : snapshot.child(Keys.KEY_RESERVATIONS.name()).getChildren()) {\n if(spaceID.equals(indivSpace.child(\"id\").getValue().toString().trim())) {\n String key = indivSpace.getKey();\n bmDatabaseRef.child(Keys.KEY_RESERVATIONS.name()).child(key).removeValue();\n }\n }\n Toast.makeText(SpaceViewActivity.this, \"Unreserved a \" + type, Toast.LENGTH_SHORT).show();\n finish();\n //btnReserve.setText(\"Reserve\");\n }", "@Override\n\tpublic MahasiswaModel delete(String nik) throws SQLException {\n\t\tdeleteStatement.setString(1, nik);\n\t\tdeleteStatement.executeUpdate();\n\t\treturn null;\n\t}", "void unsetValue();", "void unsetValue();", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "@Override\r\n\tpublic void remove(int no) {\n\t\tsession.delete(\"enter.delete\", no);\r\n\t}", "public void remove() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(this);\n\t\tsession.getTransaction().commit();\n\t}", "@Override\n\tpublic int dbRemove(MovementPK primarykey)\tthrows DAOSysException\t{\n\t\treturn dbRemove(primarykey, MovementDAO.DELETE_STM);\n\t}", "@Override\r\n\tpublic boolean remove(int num) {\n\t\treturn dao.delete(num);\r\n\t}", "public static void deleteRam(String value){\r\n try {\r\n \r\n if(singleton.ram == 0){\r\n resetTableRam();\r\n }\r\n\r\n ResultSet rs = null;\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n for( int i=0; i<home_RegisterUser.panelRam.getComponentCount();i++) {\r\n if( home_RegisterUser.panelRam.getComponent(i) instanceof JCheckBox){\r\n JCheckBox checkBox = (JCheckBox)home_RegisterUser.panelRam.getComponent(i);\r\n if(checkBox.getToolTipText().equals(value)) {\r\n if(checkBox.getActionCommand().contains(\"ramType\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND tipo = '\"+value+\"'\");\r\n }else if(checkBox.getActionCommand().contains(\"ramCap\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND capacidad = \"+Integer.parseInt(value)+\"\");\r\n }else if(checkBox.getActionCommand().contains(\"ramVel\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND velocidad = \"+Integer.parseInt(value)+\"\");\r\n }\r\n }\r\n }\r\n }\r\n if(rs!=null){\r\n while(rs.next()){\r\n for(int i=0; i<singleton.dtm.getRowCount();i++){\r\n if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs.getInt(\"codigo\")){\r\n singleton.dtm.removeRow(i);\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(singleton.dtm.getRowCount() == 0){\r\n singleton.ram = 0;\r\n resetTableRam();\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t Database.RemoveItem(Integer.toString(Database.IDs[table.getSelectedRow()]));\t\n\t\t\t\t Login.Refresh();\n\t\t\t }", "private void removePerson(){\r\n\t\t// can't remove a value if there's nothing there\r\n\t\tif (dataTable.getSelectedRow()== -1)\r\n\t\t\treturn;\r\n\t\tpeople.remove(dataTable.getSelectedRow());\r\n\t\tpersonTableModel.fireTableRowsDeleted(dataTable.getSelectedRow(),dataTable.getSelectedRow());\r\n\t}", "public void removeBtn(){\r\n\t\t\r\n\t\tWorkflowEntry entryToBeRemoved = (WorkflowEntry) tableView.getSelectionModel().getSelectedItem();\r\n\t\t\r\n\t\tdata.remove(entryToBeRemoved);\r\n\t\t\r\n\t}", "public void remove(int objectId) throws SQLException;", "public void removeSelected(String tableName, String header, int value)\r\n {\r\n try {\r\n stmt = con.createStatement();\r\n stmt.execute(\"DELETE FROM \"+tableName+\" WHERE \"+header+\" = \"+value);\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n }", "@Override\n\tpublic boolean eliminaRisposta(Long id) {\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\trisposte.remove(id);\n\t\tdb.commit();\n\t\t\n\t\tif(!risposte.containsKey(id))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "int deleteByPrimaryKey(String fucno);", "public void deleteSelectedAccount(String name){\n DatabaseReference dR = FirebaseDatabase.getInstance().getReference(\"user_information\").child(name);\n dR.getParent().child(name).removeValue();\n }", "int deleteByPrimaryKey(String number);", "public void eliminar(String sentencia){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(sentencia);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "@Override\n public void onSuccess(Void aVoid) {\n Query fquery = FirebaseDatabase.getInstance().getReference(\"Posts\").orderByChild(\"pId\").equalTo(postId);\n fquery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot ds: dataSnapshot.getChildren()){\n\n ds.getRef().removeValue(); // remove value from firebase where pId matched\n\n }\n Toast.makeText(PostDetailActivity.this, \"Post Deleted !\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n\n\n }", "public T remove(T value){\n\t return value;\n\t}", "@Override\n public Administrador remove(Object key) {\n Administrador a = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Administrador SET visivel=FALSE WHERE username=?;\");\n \n stm.setString(1, (String)key); //parse da key para a querie\n stm.executeUpdate();\n \n } catch (SQLException | ClassNotFoundException e) {\n throw new NullPointerException(e.getMessage());\n } finally {\n Connect.close(conn);\n }\n return a;\n }", "public void removeDataItem(E value) {\n\t\tdata.remove(value);\n\t}", "@Override\n public void removeValue(String key) {\n SharedPreferences.Editor editor = preferences.edit();\n editor.remove(key);\n editor.apply();\n }", "public boolean RemoveSport(Sport sport){\n\n boolean noError = true;\n\n\n\n try {\n ConnectDB();\n\n\n preparedStatement=connection.prepareStatement(\"SELECT t_clubs.FK_Sport FROM t_clubs WHERE t_clubs.FK_Sport=?\");\n preparedStatement.setInt(1, sport.getPk_sport());\n result = preparedStatement.executeQuery();\n\n if(result.next()) {\n JOptionPane pane = new JOptionPane(\"le sport est affilié a un club impossible de le supprimer\", JOptionPane.ERROR_MESSAGE);\n JDialog dialog = pane.createDialog(null,\"error\");\n dialog.setAlwaysOnTop(true);\n dialog.setVisible(true);\n dialog.dispose();\n\n }else{\n\n preparedStatement = connection.prepareStatement(\"Delete FROM `t_sports` WHERE `PK_Sport`= ? \");\n preparedStatement.setInt(1, sport.getPk_sport());\n preparedStatement.executeUpdate();}\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n noError = false;\n } finally {\n CloseDB();\n }\n\n\n\n\n\n\n return noError;\n }", "@Override\n public void delete(Integer key) throws SQLException {\n //Ei toteutettu\n }", "public void remove(Value v)\n\t{\n\t\tif (this.cache.containsKey(v.getKey()))\n\t\t{\n\t\t\tthis.cache.remove(v.getKey());\n\t\t}\n\t\telse\n\t\t{\n//\t\t\tthis.lock.writeLock().lock();\n\t\t\tthis.db.remove(v.getKey());\n//\t\t\tthis.lock.writeLock().unlock();\n\t\t}\n//\t\tthis.lock.writeLock().lock();\n\t\tthis.keys.remove(v.getKey());\n//\t\tthis.lock.writeLock().unlock();\n\t}", "int deleteByPrimaryKey(String num);", "int deleteByPrimaryKey(String num);", "@Override\r\n public void onClick(View view) {\n productsRef.child(selectedProduct.getProductId()).removeValue().addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n alertDialog.dismiss();\r\n }\r\n });\r\n }", "public void eliminar(Long id) throws AppException;", "void eliminar(PK id);", "private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }", "public boolean eliminarLoteria(int codigo) {\n\n String instruccion = \"delete from loteria where codigo =\" + codigo;\n boolean val = false;\n PreparedStatement pre;\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n pre = con.prepareStatement(instruccion);\n pre.execute();\n val = true;\n } catch (SQLException ex) {\n ex.printStackTrace();\n\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return val;\n }\n\n }", "@Override\n public void onClick(View v) {\n mFriendListDatabase.child(mCurrentUser.getUid()).child(selected_userid).removeValue();\n /*delete current user in friend list of selected user*/\n mFriendListDatabase.child(selected_userid).child(mCurrentUser.getUid()).removeValue();\n }", "@Override\n public void remove() throws IOException {\n int i = listEnterprisePanel.getTableListE().getSelectedRow(); // chọn hàng để xóa\n if (i >= 0) {\n String strID = listEnterprisePanel.getTableListE().getValueAt(i, 1).toString().trim(); // lấy ID\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(strID); // Tìm kiếm Enterprise theo ID\n content.set(Collections.singleton(enterprise), null);\n enterpriseBN.deleteEnterprise(enterprise);\n model.removeRow(i);\n loadData();\n }\n\n }", "public int deleteByPreferencetypeid(Integer value) throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"DELETE FROM preference WHERE preferencetypeid=?\");\n Manager.setInteger(ps, 1, value);\n return ps.executeUpdate();\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "@Override\n\tpublic void clearDBRisposte() {\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\trisposte.clear();\n\t\tdb.commit();\n\t}", "public void removeValue(Object value)\n\t{\n\t\tif (values.contains(value))\n\t\t{\n\t\t\tvalues.remove(value + \"\");\n\t\t}\n\t}", "int deleteByPrimaryKey(String maht);", "void remove(Price Price);", "public void unsetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(VALUE$12);\n }\n }", "private void deleteRecord(){\n if (mCurrentSymptomUri != null) {\n // pull out the string value we are trying to delete\n mEditSymptomText = findViewById(R.id.edit_symptoms);\n String deleteTry = mEditSymptomText.getText().toString();\n\n // set up the ContentProvider query\n String[] projection = {_IDST, SymTraxContract.SymTraxTableSchema.C_SYMPTOM};\n String selectionClause = SymTraxContract.SymTraxTableSchema.C_SYMPTOM + \" = ? \";\n String[] selectionArgs = {deleteTry};\n\n Cursor c = getContentResolver().query(\n SYM_TRAX_URI,\n projection,\n selectionClause,\n selectionArgs,\n null );\n\n // if there are no instances of the deleteTry string in the Machines DB\n // Go ahead and try to delete. If deleteTry value is in CMachineType column do not delete (no cascade delete)\n if (!c.moveToFirst()){\n int rowsDeleted = getContentResolver().delete(mCurrentSymptomUri, null, null);\n if (rowsDeleted == 0) {\n Toast.makeText(this, getString(R.string.delete_record_failure),\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, getString(R.string.delete_record_success),\n Toast.LENGTH_SHORT).show();\n }\n c.close();\n finish(); // after deleting field value\n } else {\n c.close();\n showNoCascadeDeleteDialog();\n }\n }\n }", "@Override\n\tpublic Integer delete() {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean delete() {\n\t\tString sql=\"DELETE FROM tc_student where id=\"+id;\n\t\t//`\n\t\t\n\t\tSystem.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t}", "public Integer deleteHotAnime(){\n SQLiteDatabase db = this.getWritableDatabase();\n Integer inte = db.delete(\"hotanime\", null, null);\n\n db.close();\n return inte;\n }", "public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }", "public static void deleteReminder()\n {\n System.out.print(\"Select event number reminder to delete: \");\n String evNum = CheckInput.getString();\n try\n {\n PreparedStatement pstmt = null;\n String str = \"delete from reminder where eventnumber = ?\";\n pstmt = conn.prepareStatement(str);\n pstmt.setString(1,evNum);\n pstmt.executeUpdate();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }", "public void onClick(DialogInterface dialog, int id) {\n getRef(position).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n if (dataSnapshot.hasChild(\"Sensor\")) {\n try {\n\n\n String Sensor = dataSnapshot.child(\"Sensor\").getValue().toString();\n getRef(position).getParent().getParent().child(\"Sensors\").child(Sensor).removeValue();\n }catch (Exception e){\n\n }\n }\n }\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n //delete item\n getRef(position).removeValue();\n //refresh page\n Intent refresh = new Intent(MainActivity.this, MainActivity.class);\n startActivity(refresh);\n MainActivity.this.finish();\n\n }", "public static String delete(int id){\n String query=\"UPDATE empleado SET activo=0 WHERE idEmpleado=\"+id;\n return query;\n}", "public Integer deleteData(String name) {\n SQLiteDatabase db = this.getWritableDatabase();\n int i = db.delete(TABLE_NAME, col1 + \" =?\", new String[]{name});\n return i;\n }", "@Override\n public Componente remove(Object key) {\n Componente cp = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Componente SET visivel=FALSE WHERE nome=?;\");\n \n stm.setString(1, (String)key); //parse da key para a querie\n stm.executeUpdate();\n \n } catch (SQLException | ClassNotFoundException e) {\n throw new NullPointerException(e.getMessage());\n } finally {\n Connect.close(conn);\n }\n return cp;\n }", "public void RemoveCardFromHuman(int value){\n handHuman.remove(value);\n }", "@Override\n public void onClickButtonCancel(Object roomToCancel) {\n // durante il caricamento della stanza il giocatore annulla il tentativo di creazione stanza\n String room =(String) roomToCancel;\n\n DatabaseReference roomToDelete = firebaseDatabase.getReference(ROOMS_NODE).child(room);\n\n roomToDelete.removeValue( new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError error, @NonNull DatabaseReference ref) {\n loadingDialog.dismissDialog();\n dialogCodeRoom.dismiss();\n }\n });\n\n }", "public void removedetails(){\n SharedPreferences.Editor editor = userDetails.edit();\n editor.clear();\n editor.commit();\n\n }", "public void deleteStudentHandler(View v) {\n database = new DatabaseSQLiteHelper(this).getWritableDatabase();\n\n String value = studentIdTv.getText().toString();\n\n int numberDeleted = database.delete(Database.Student.TABLE_NAME, Database.Student._ID +\"=?\" ,new String[]{value});\n Toast.makeText(this, Integer.toString(numberDeleted) + \" Deleted\", Toast.LENGTH_SHORT).show();\n\n Student.this.recreate();\n }", "@FXML\r\n public void deleteTreatmentButton(){\r\n int sIndex = treatmentTabletv.getSelectionModel().getSelectedIndex();\r\n String sID = treatmentData.get(sIndex).getIdProperty();\r\n\r\n String deleteTreatment = \"delete from treatment where treatmentID = ?\";\r\n try{\r\n ps = mysql.prepareStatement(deleteTreatment);\r\n ps.setString(1,sID);\r\n ps.executeUpdate();\r\n ps.close();\r\n ps = null;\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n //maybe more in this exception\r\n }\r\n\r\n treatmentData.remove(sIndex);\r\n }", "public void remove(String filename) {\n\tremove(new BasicDBObject(\"filename\", filename));\n }", "@Override\n\tpublic void remove(Integer bno) throws Exception {\n\t\tdao.delete(bno);\n\t}", "@FXML\r\n private void handleSubmitButton() {\r\n Database_Statements.removeUser(employeeNumberField.getText().trim());\r\n }", "void unsetValueQuantity();", "public boolean delete (int val) throws DifferentOrderTrees {\r\n \tboolean supprime = false;\r\n \tMonceau monceauTemp = new Monceau();\r\n \t\r\n \t//recherche de la valeur a supprimer\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tif (arbres.get(i).findValue(val) == null)\r\n \t\t\tcontinue;\r\n \t\telse {\r\n \t\t\tmonceauTemp.arbres = arbres.get(i).findValue(val).delete();\r\n \t\t\tarbres.remove(arbres.get(i)); //supprime noeud\r\n \t\t\tthis.fusion(monceauTemp); //fusionne les 2 monceaux\r\n \t\t\ti = (0-1); //on recommence (-1 car on fait i++ apres (boucle for))\r\n \t\t\tsupprime = true;\r\n \t\t}\r\n \t}\r\n \t\r\n return supprime;\r\n }", "@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}", "public int del(int key) {\n int retval = 0;\n\n String sql = \"DELETE FROM data_map WHERE data_key = ?\";\n\n try (Connection con = this.connect();\n PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, key);\n retval = pstmt.executeUpdate();\n }\n catch (SQLException e) {\n retval = -1;\n }\n\n return retval;\n }", "public void RemoveCardFromDeck(int value){\n deck.remove(value);\n }", "public boolean removeInformation(String type,String removeKey){\n System.out.println(\"start remove\");\n if(type == null || removeKey == null)\n return false;\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n userId = removeKey;\n String[][] res = queryUser();\n if(res == null)\n return false;\n String sql = \"delete from \" + type + \"information where \" + type +\"Id = ?;\";\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,removeKey);\n //System.out.println(\"delete from \" + type + \"information where \" + type + \"Id = \" + removeKey);\n int ok = preSQL.executeUpdate();\n GetDBConnection.closeCon(con);\n if(ok == 1)\n return true;\n return false;\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return false;\n }\n }", "public int remove(int value)\n {\n amount=amount-value;\n return amount;\n }", "@Override\r\n\tpublic int deleteOne(int idx) throws SQLException {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic boolean eliminarPorId(Integer llave) {\n\t\treturn false;\n\t}", "private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed\n if(tblOrders.getSelectedRow() == -1)\n {\n lblMessage.setText(\"Select Product First\");\n }\n else\n {\n DefaultTableModel model = (DefaultTableModel)tblOrders.getModel();\n int productId = \n Integer.parseInt(String.valueOf(model.getValueAt(tblOrders.getSelectedRow(), 0)));\n \n loggedInCustomer.findLatestOrder().removeOrderLine(productId);\n \n model.removeRow(tblOrders.getSelectedRow());\n \n lblMessage.setText(\"Product Has Been Removed\");\n lblTotalCost.setText(\"£\" + String.format(\"%.02f\",loggedInCustomer.findLatestOrder().getOrderTotal()));\n }\n }", "public static void RecipeTipsFirebaseDeleteSingle() {\n\n databaseReference = FirebaseDatabase.getInstance().getReference(TABLE_RECIPE_TIPS);\n\n firebaseQuery = databaseReference.orderByChild(FIELD_RECIPE_TIPS_RECIPE).equalTo(sCurrentRecipeNumber);\n\n firebaseQuery.addValueEventListener(new ValueEventListener() {\n\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.exists()) {\n\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n\n String number = snapshot.child(FIELD_RECIPE_TIPS_NUMBER).getValue(String.class);\n\n assert number != null;\n if (number.equals(sCurrentRecipeTipNumber)) {\n\n snapshot.getRef().removeValue();\n\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n new SupportHandlingDatabaseError(this.getClass().getSimpleName(), databaseError);\n\n }\n });\n }", "public void eliminarPaciente(String codigo)\n {\n try\n {\n int rows_update=0;\n PreparedStatement pstm=con.conexion.prepareStatement(\"DELETE paciente.* FROM paciente WHERE IdPaciente='\"+codigo+\"'\");\n rows_update=pstm.executeUpdate();\n \n if (rows_update==1)\n {\n JOptionPane.showMessageDialog(null,\"Registro eliminado exitosamente\");\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"No se pudo eliminar el registro, verifique datos\");\n con.desconectar();\n }\n }\n catch (SQLException e)\n {\n JOptionPane.showMessageDialog(null,\"Error \"+e.getMessage()); \n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString RemoveOrder=\"Delete from UserFace1 where (ID=?)\";\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst=con.prepareStatement(RemoveOrder);\r\n\t\t\t\t\tst.setInt(1,Integer.parseInt(idField.getText()));\r\n\t\t\t\t\tint i = st.executeUpdate();\r\n //Executing MySQL Update Query\t\t\t\t\t\t+++++++++++++++++++++++\r\n if(i==1){\r\n JOptionPane.showMessageDialog(panel,\"Successfully Removed\");\r\n }\r\n \r\n refreshTable();\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public int deleteByCompanyid(Integer value) throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"DELETE FROM sampletype WHERE companyid=?\");\n Manager.setInteger(ps, 1, value);\n return ps.executeUpdate();\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "int deleteByPrimaryKey(String taxregcode);", "private void delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query = \"select * from items where IT_ID=?\";\n\t\t\t\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\tpst.setString(1, txticode.getText());\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 1)\n\t\t\t{\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete selected item data?\", \"ALERT\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tquery=\"delete from items where IT_ID=?\";\n\t\t\t\t\tpst = con.prepareStatement(query);\n\t\t\t\t\t\n\t\t\t\t\tpst.setString(1, txticode.getText());\n\t\t\t\t\t\n\t\t\t\t\tpst.execute();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Deleted Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadData();\n\t\t\t\t\n\t\t\t\trs.close();\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Record Not Found!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t\tcon.close();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t}", "@Override\n\t\tprotected void _delete() {\n\t\t\toldValue = 0;\n\t\t\tnewValue = 0;\n\t\t}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void actionPerformed(ActionEvent e) {\n model.deleteRow();\n }" ]
[ "0.6971067", "0.64858395", "0.64858395", "0.63836807", "0.63267195", "0.63097525", "0.63042563", "0.6276978", "0.62201196", "0.6216828", "0.6216652", "0.62147385", "0.6209013", "0.61996984", "0.6198557", "0.6179152", "0.6162512", "0.6162512", "0.61559534", "0.6140193", "0.6111308", "0.61082613", "0.6106232", "0.61021113", "0.60879815", "0.6087886", "0.60806674", "0.60745347", "0.6062913", "0.6057726", "0.60542417", "0.6052917", "0.6052673", "0.6042313", "0.6037272", "0.6029535", "0.6027694", "0.60219973", "0.6018377", "0.5999805", "0.59976923", "0.5993738", "0.5992973", "0.599255", "0.599255", "0.5989414", "0.5986463", "0.5985908", "0.5983939", "0.59825176", "0.5982349", "0.59728175", "0.5969134", "0.5967665", "0.5961391", "0.59583944", "0.59578615", "0.59578425", "0.59550315", "0.5949886", "0.5942582", "0.59378284", "0.5937146", "0.5936032", "0.5918048", "0.59106827", "0.5906071", "0.5903568", "0.5900868", "0.5899539", "0.5897163", "0.58927596", "0.5891732", "0.5880308", "0.58736694", "0.5873162", "0.5868402", "0.58673763", "0.5864099", "0.5854105", "0.58531165", "0.5846735", "0.58462113", "0.58450323", "0.5839848", "0.5828829", "0.5828455", "0.58270705", "0.58222425", "0.58156", "0.5814795", "0.58009803", "0.5800647", "0.57957006", "0.57939583", "0.57939583", "0.57939583", "0.57939583", "0.57939583", "0.57937384" ]
0.64797866
3
Verify jwt tokens addressed to IAP protected resources on App Engine. The project number for your Google Cloud project available via 'gcloud projects describe $PROJECT_ID' or in the Project Info card in Cloud Console. projectId is The project ID for your Google Cloud Project.
Jwt verifyJWTTokenForAppEngine(HttpRequest request, long projectNumber, String projectId) throws Exception { // Check for iap jwt header in incoming request String jwtToken = request.getHeaders().getFirstHeaderStringValue("x-goog-iap-jwt-assertion"); if (jwtToken == null) { return null; } return verifyJWTToken(jwtToken, String.format("/projects/%s/apps/%s", Long.toUnsignedString(projectNumber), projectId)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Jwt verifyJWTTokenForComputeEngine(HttpRequest request, long projectNumber, long backendServiceId) throws Exception {\n String jwtToken =\n request.getHeaders().getFirstHeaderStringValue(\"x-goog-iap-jwt-assertion\");\n if (jwtToken == null) {\n return null;\n }\n return verifyJWTToken(jwtToken, String.format(\"/projects/%s/global/backendServices/%s\",\n Long.toUnsignedString(projectNumber),\n Long.toUnsignedString(backendServiceId)));\n }", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "public Boolean Verify(String token, String tenantID, List<JsonWebKey> jsonWebKeys) throws MalformedClaimException {\n Boolean isValid = false;\n JwksVerificationKeyResolver keyResolver = new JwksVerificationKeyResolver(jsonWebKeys);\n JwtConsumer jwtConsumer = GetJwtConsumerBuilder()\n .setVerificationKeyResolver(keyResolver)\n .setAllowedClockSkewInSeconds(30)\n .setExpectedIssuer(\"https://sts.windows.net/\" + tenantID + \"/\")\n .setExpectedAudience(CommonConstraint.EXPECTED_AUDIENCE)\n .setJwsAlgorithmConstraints(\n AlgorithmConstraints.ConstraintType.PERMIT, AlgorithmIdentifiers.RSA_USING_SHA256)\n .build();\n try {\n // Validate the JWT and process it to the Claims\n jwtClaims = jwtConsumer.processToClaims(token);\n isValid = true;\n System.out.println(\"JWT validation succeeded! \" + jwtClaims);\n } catch (InvalidJwtException e) {\n // InvalidJwtException will be thrown, if the JWT failed processing or validation in anyway.\n // Hopefully with meaningful explanations(s) about what went wrong.\n System.out.println(\"Invalid JWT! \" + e);\n\n // Programmatic access to (some) specific reasons for JWT invalidity is also possible\n // should you want different error handling behavior for certain conditions.\n if (e.hasExpired()) {\n System.out.println(\"JWT expired at \" + e.getJwtContext().getJwtClaims().getExpirationTime());\n }\n // Or maybe the audience was invalid\n if (e.hasErrorCode(ErrorCodes.AUDIENCE_INVALID)) {\n System.out.println(\"JWT had wrong audience: \" + e.getJwtContext().getJwtClaims().getAudience());\n }\n }\n return isValid;\n }", "public BaseMsg verifyProjectInfo(long projectId);", "Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder();", "@Test\n public void getGoogleAuthTokensTest() throws ApiException {\n String code = null;\n InlineResponse2003 response = api.getGoogleAuthTokens(code);\n\n // TODO: test validations\n }", "@Override\r\n\tpublic Map<String, Claim> verifyJWT(String token) {\n\t\treturn null;\r\n\t}", "@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}", "@Test\n public void testValidToken() {\n try {\n int coachId = authBO.getUserIdAndValidateToken(\"thisisaworkingtoken\");\n Assert.assertTrue(coachId == 1);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "@Test\n @Ignore\n public void testJWTGeneration() throws Exception {\n JWTGenerator jwtGen = new JWTGenerator() {\n @Override\n public Map<String, String> convertClaimMap(Map<ClaimMapping, String> userAttributes, String username) {\n return new HashMap<>();\n }\n };\n APIKeyValidationInfoDTO dto=new APIKeyValidationInfoDTO();\n dto.setSubscriber(\"sastry\");\n dto.setApplicationName(\"hubapp\");\n dto.setApplicationId(\"1\");\n dto.setApplicationTier(\"UNLIMITED\");\n dto.setEndUserName(\"denis\");\n dto.setSubscriberTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);\n dto.setUserType(APIConstants.ACCESS_TOKEN_USER_TYPE_APPLICATION);\n TokenValidationContext validationContext = new TokenValidationContext();\n validationContext.setValidationInfoDTO(dto);\n validationContext.setContext(\"cricScore\");\n validationContext.setVersion(\"1.9.0\");\n String token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n String header = token.split(\"\\\\.\")[0];\n String decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n String body = token.split(\"\\\\.\")[1];\n String decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n // With end user name not included\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n dto.setUserType(APIConstants.SUBSCRIPTION_USER_TYPE);\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n //we can not do assert eaquals because body includes expiration time.\n\n /*String expectedHeader = \"{\\\"typ\\\":\\\"JWT\\\"}\";\n String expectedBody = \"{\\\"iss\\\":\\\"wso2.org/products/am\\\", \\\"exp\\\":1349270811075, \" +\n \"\\\"http://wso2.org/claims/subscriber\\\":\\\"sastry\\\", \" +\n \"\\\"http://wso2.org/claims/applicationname\\\":\\\"hubapp\\\", \" +\n \"\\\"http://wso2.org/claims/apicontext\\\":\\\"cricScore\\\", \" +\n \"\\\"http://wso2.org/claims/version\\\":\\\"1.9.0\\\", \" +\n \"\\\"http://wso2.org/claims/tier\\\":\\\"Bronze\\\", \" +\n \"\\\"http://wso2.org/claims/enduser\\\":\\\"denis\\\"}\";\n\n Assert.assertEquals(expectedHeader, decodedHeader);\n Assert.assertEquals(expectedBody, decodedBody);*/\n //String decodedToken = new String(Base64Utils.decode(token));\n //log.info(decodedToken);\n //assertNotNull(decodedToken);\n\n\n }", "@Test\n void test() throws JoseException, InvalidJwtException, MalformedClaimException {\n JwtClaims claims = new JwtClaims();\n claims.setSubject(\"jokerr\");\n\n Key key = new HmacKey(Arrays.copyOf(\"secret\".getBytes(),32));\n\n JsonWebSignature jws = new JsonWebSignature();\n jws.setAlgorithmHeaderValue(AlgorithmIdentifiers.HMAC_SHA256);\n// jws.setHeader(\"typ\",\"JWT\");\n jws.setPayload(claims.toJson());\n jws.setKey(key);\n String token = jws.getCompactSerialization();\n\n System.out.println(\"atlatian/jose4j: \" + token);\n\n /*\n verify the token\n */\n JwtConsumer jwtConsumer = new JwtConsumerBuilder()\n .setVerificationKey(key)\n .build();\n\n JwtClaims jwtClaims = jwtConsumer.processToClaims(token);\n\n /*\n assert\n */\n assertEquals(\"jokerr\", jwtClaims.getSubject());\n }", "@Test\r\n\tpublic void TestvalidateTokenWithuserId() {\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, udetails);\r\n\t\tassertEquals(true, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\r\n\t}", "boolean isValid(String jwt);", "Jwt verifyJWTToken(String jwtToken, String expectedAudience) throws Exception {\n Jwt jwt =\n Jwts.parser()\n .setSigningKeyResolver(resolver)\n .requireAudience(expectedAudience)\n .requireIssuer(IAP_ISSUER_URL)\n .parse(jwtToken);\n DefaultClaims claims = (DefaultClaims) jwt.getBody();\n if (claims.getSubject() == null) {\n throw new Exception(\"Subject expected, not found.\");\n }\n if (claims.get(\"email\") == null) {\n throw new Exception(\"Email expected, not found.\");\n }\n return jwt;\n }", "public boolean isValidToken(String jwt, String userId) {\n try {\n Claims claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(\"TerryLam\"))\n .parseClaimsJws(jwt).getBody();\n\n String jwtUserId = claims.get(\"userId\").toString();\n if (!jwtUserId.equals(userId)) {\n return false;\n } else {\n return true;\n }\n } catch (JwtException ex) {\n log.info(\"Error validating token. Exception Message \" + ex.getMessage());\n return false;\n }\n }", "@GetMapping(\"/validate\")\n\tpublic ResponseEntity<?> getValidity(@RequestHeader(\"Authorization\") String jwtToken) {\n\t\treturn new ResponseEntity<AuthResponse>(this.service.validate(jwtToken) , HttpStatus.OK);\n\t}", "private void parseJWT(String jwt, String apiKey) {\n\n //This line will throw an exception if it is not a signed JWS (as expected)\n Jws<Claims> claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(apiKey))\n .parseClaimsJws(jwt);\n // Claims claims = Jwts.parser()\n // .setSigningKey(DatatypeConverter.parseBase64Binary(apiKey))\n // .parseClaimsJws(jwt).getBody();\n\n System.out.println(claims);\n System.out.println(\"ID: \" + claims.getBody().getId());\n System.out.println(\"Subject: \" + claims.getBody().getSubject());\n System.out.println(\"Issuer: \" + claims.getBody().getIssuer());\n System.out.println(\"Expiration: \" + claims.getBody().getExpiration());\n }", "private static GoogleIdToken verifyGoogleIdToken(String token) {\n\n GoogleIdToken idToken = null;\n\n if(token == null)\n return null;\n\n GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new JacksonFactory())\n .setAudience(Arrays.asList(SecurityConstants.CLIENT_ID))\n .setIssuer(SecurityConstants.ISSUER)\n .build();\n\n try {\n idToken = verifier.verify(token);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return idToken;\n }", "@Test\r\n\tpublic void TestgenerateToken() {\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\tassertNotNull(generateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}", "public String LoginServiceJwt(String jwt){\n return jwt =\n given().log().all().accept(\"text/plain, */*\")\n .headers(\n \"App-Code\", APPCODE,\n \"X-IBM-Client-Id\", IBMCLIENTID\n )\n .and().given().contentType(\"application/x-www-form-urlencoded\")\n .and().given().body(\"grant_type=password&scope=security&username=\"+MXUSER+\"&password=\"+PWD+\"&client_id=\"+IBMCLIENTID)\n .when().post(AZUREURL+\"/v2/secm/oam/oauth2/token\")\n .then().log().ifError().assertThat().statusCode(200)\n .extract().path(\"jwt\").toString();\n }", "@Test\n public void testJwtIsUsedInTokenKeyEndPoint() throws Exception {\n ResultActions result = this.mockMvc\n .perform(MockMvcRequestBuilders.get(\"/oauth/token_key\")\n .principal(new UsernamePasswordAuthenticationToken(testClientId, \"\",\n Arrays.asList(new SimpleGrantedAuthority(\"ROLE_USER\")))))\n // we expect a 200 success\n .andExpect(MockMvcResultMatchers.status().is(200));\n Map<?, ?> tokenKey = new ObjectMapper().readValue(result.andReturn().getResponse().getContentAsString(),\n Map.class);\n System.out.println(\"Got response: \" + result.andReturn().getResponse().getContentAsString());\n Assert.assertEquals(tokenKey.get(\"value\"), TestJWTConfig.SignKey);\n }", "public static String authenticate(String userId, String accessToken, String gcmRegId, Date expirationDate, String email) {\n final ArrayList<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(PARAM_FACEBOOK_UID, userId));\n params.add(new BasicNameValuePair(PARAM_ACCESS_TOKEN, accessToken));\n params.add(new BasicNameValuePair(PARAM_GCM_REG_ID, gcmRegId));\n params.add(new BasicNameValuePair(PARAM_ACCESS_TOKEN_EXPIRES, String.valueOf(expirationDate.getTime())));\n params.add(new BasicNameValuePair(PARAM_EMAIL, email));\n\n try {\n String result = postWebService(params, AUTH_URI, null);\n\n final JSONObject obj = new JSONObject(result);\n String APIToken = obj.getString(PARAM_ACCESS_TOKEN);\n if (APIToken != null && APIToken.length() > 0) {\n Log.i(Constants.TAG, \"API KEY: \" + APIToken);\n return APIToken;\n } else {\n Log.e(Constants.TAG,\n \"Error authenticating\" + obj.getString(PARAM_INFO));\n return null;\n } // end if-else\n } catch (APICallException e) {\n Log.e(Constants.TAG, \"HTTP ERROR when getting API token - STATUS:\" + e.getMessage(), e);\n return null;\n } catch (IOException e) {\n Log.e(Constants.TAG, \"IOException when getting API token\", e);\n return null;\n } catch (JSONException e) {\n Log.e(Constants.TAG, \"JSONException when getting API token\", e);\n return null;\n } // end try-catch\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 }", "public static void main(String[] args) {\n String token= JWTTokenUtil.generateToken(\"Token1\", secret_key);\n System.out.println(\"------------------------TOKEN----------------------------------------------------\");\n System.out.println(token);\n System.out.println();\n System.out.println(\"------------------------CLAIMS----------------------------------------------------\");\n\n //code to test parsed token : Claims\n\n Claims claims= Jwts.parser()\n .setSigningKey(Base64.getEncoder().encode(secret_key.getBytes()))\n .parseClaimsJws(token)\n .getBody();\n\n System.out.println(\"Token ID: \"+claims.getId());\n System.out.println(\"Token Subject: \"+claims.getSubject());\n System.out.println(\"Token Issuer: \"+claims.getIssuer());\n System.out.println(\"Token Issue Date: \"+claims.getIssuedAt());\n System.out.println(\"Token Expiration Date: \"+claims.getExpiration());\n System.out.println(\"Token Audience: \"+claims.getAudience());\n }", "private boolean validateAccessToken(String clientId, String clientSecret) {\n log.info(\"Client Id:{} Client Secret:{}\", clientId, clientSecret);\n\n // Enable the Below code when the Introspection URL is ready to test\n /**\n * String auth = clientId + clientSecret; RestTemplate restTemplate = new RestTemplate();\n * HttpHeaders headers = new HttpHeaders(); headers.add(\"Content-Type\",\n * MediaType.APPLICATION_JSON_VALUE); headers.add(\"Authorization\", \"Basic \" +\n * Base64.getEncoder().encodeToString(auth.getBytes())); HttpEntity<String> request = new\n * HttpEntity<String>(headers);\n *\n * <p>log.info(\"Sending Token Intropsection request to Endpoint::::: {}\",\n * tokenIntrospectionURL); ResponseEntity<String> response =\n * restTemplate.exchange(tokenIntrospectionURL, HttpMethod.POST, request, String.class); *\n */\n return true;\n }", "String getAuthorizerRefreshToken(String appId);", "public static String getTeacherToken() {\n\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"[email protected]\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n return response.jsonPath().get(\"accessToken\");\n\n }", "@RequestMapping(value=\"/googleLogin\", method=RequestMethod.POST, consumes=MediaType.APPLICATION_FORM_URLENCODED_VALUE)\n\tpublic @ResponseBody Object verifyGoogleToken(@RequestParam String googleToken) {\n\t\ttry {\n\t\t\tString email = userService.verifyGoogleToken(googleToken);\n\t\t\tSystem.out.println(\"Response from google: email - \" + email);\n\t\t\tif(email.length() > 0) {\n\t\t\t\t long now = new Date().getTime();\n\t\t\t\t long expires = now + 86400000;\n\t\t\t\t try {\n\t\t\t\t\t UserProfile up = userService.getUserByEmail(email);\n\t\t\t\t\t System.out.println(\"USER FOUND: \" + up.toString());\n\t\t\t\t\t String s = Jwts.builder().setSubject(up.getUserName()).setIssuer(\"UxP-Gll\").setExpiration(new Date(expires)).setHeaderParam(\"user\", up).signWith(SignatureAlgorithm.HS512, key).compact();\n\t\t\t\t\t return userService.getUserByUserName(up.getUserName(), s);\n\t\t\t\t } catch (Exception e) {\n\t\t\t\t\t return Collections.singletonMap(\"error\", \"no account found for email: \" + email); \n\t\t\t\t }\n\t\t\t\t \n\t\t\t} else {\n\t\t\t\treturn Collections.singletonMap(\"error\", \"bad response from google\");\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t\treturn Collections.singletonMap(\"error\", \"token could not be validated\");\n\t\t}\n\t}", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n return token_;\n }", "@Test\n public void when_token_has_no_prefix_then_user_does_not_get_authentication() throws ServletException, IOException {\n test(\"eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.hZnl5amPk_I3tb4O-Otci_5XZdVWhPlFyVRvcqSwnDo_srcysDvhhKOD01DigPK1lJvTSTolyUgKGtpLqMfRDXQlekRsF4XhAjYZTmcynf-C-6wO5EI4wYewLNKFGGJzHAknMgotJFjDi_NCVSjHsW3a10nTao1lB82FRS305T226Q0VqNVJVWhE4G0JQvi2TssRtCxYTqzXVt22iDKkXeZJARZ1paXHGV5Kd1CljcZtkNZYIGcwnj65gvuCwohbkIxAnhZMJXCLaVvHqv9l-AAUV7esZvkQR1IpwBAiDQJh4qxPjFGylyXrHMqh5NlT_pWL2ZoULWTg_TJjMO9TuQ\",\n null);\n }", "@Service\npublic interface JwtTokenService {\n\n /**\n * Returns a Json Web Token generated out of the provided userDetails\n * @param uerDetails\n * @return a JWT string\n */\n String convertToJwt (SsoUserDetails uerDetails);\n\n /**\n * Checks whether the provided Json Web Token is a valid Token and if it is not expired\n * @param jwt\n * @return true if JWT is a valid Json Web Token and the expiration time is not reached yet\n */\n boolean isValid(String jwt);\n}", "private JwtClaims getVerifiedJwtClaims(String pluginId, String jwt, boolean isSoftwareStatement,\n JwksHandler keyHandler, String softwareStatementRevokedJwksUri) throws ClientRegistrationException\n {\n JwtClaims jwtClaims = null;\n JwtContext jwtContext;\n\n try\n {\n // Validate the JWT\n VerificationKeyResolver resolver = keyHandler.createVerificationKeyResolver(jwt, softwareStatementRevokedJwksUri,\n enableRevokedJwksValidation);\n if (resolver == null || StringUtils.isBlank(issuer))\n {\n String description = \"[\" + pluginId + \"] policy plugin is not configured correctly. Please revisit the configuration.\";\n LOG.error(description);\n throw new ClientRegistrationException(Response.Status.INTERNAL_SERVER_ERROR, ClientRegistrationException.ErrorCode.internal_error, \"Invalid configuration\");\n }\n\n JwtConsumer jwtConsumer;\n if(isSoftwareStatement)\n {\n LOG.debug(\"Validating software_statement.\");\n jwtConsumer = validateSoftwareStatement(resolver);\n }\n else\n {\n LOG.debug(\"Validating input JWT.\");\n jwtConsumer = validateRequestJwt(resolver);\n }\n\n jwtContext = jwtConsumer.process(jwt);\n LOG.debug(\"Validating successful.\");\n\n //Process claims in the client metadata request\n jwtClaims = jwtContext.getJwtClaims();\n }\n catch (InvalidJwtException e)\n {\n keyHandler.handleInvalidJwtException(e);\n }\n\n return jwtClaims;\n }", "private static void verify(String code) throws IOException {\n URL obj = new URL(TOKEN_URL);\n HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();\n\n String urlParameters = \"grant_type=authorization_code&code=\" + code;\n\n //add request header\n con.setRequestMethod(\"POST\");\n con.setRequestProperty(\"Authorization\", \"Basic \" + new String(Base64.getEncoder().encode((CLIENT_KEY + \":\" + CLIENT_SECRET).getBytes())));\n con.setRequestProperty(\"Content-Length\", String.valueOf(urlParameters.length()));\n con.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n con.setDoOutput(true);\n con.setDoInput(true);\n\n DataOutputStream output = new DataOutputStream(con.getOutputStream());\n output.writeBytes(urlParameters);\n output.close();\n DataInputStream input = new DataInputStream(con.getInputStream());\n\n generateAuthObject(input);\n }", "public void assertUserHasAccessToProject(String projectId) {\n if (userContextService.isSuperAdmin()) {\n /* a super admin has always access */\n return;\n }\n String userId = userContextService.getUserId();\n\n ProjectAccessCompositeKey key = new ProjectAccessCompositeKey(userId, projectId);\n Optional<ScanAccess> project = accessRepository.findById(key);\n if (!project.isPresent()) {\n securityLogService.log(SecurityLogType.POTENTIAL_INTRUSION, \"Denied user access in domain 'scan'. userId={},projectId={}\", userId,\n logSanitizer.sanitize(projectId, 30));\n // we say \"... or you have no access - just to obfuscate... so it's not clear to\n // bad guys they got a target...\n throw new NotFoundException(\"Project \" + projectId + \" does not exist, or you have no access.\");\n }\n }", "public String verify(String token) {\n return Jwts.parserBuilder()\n .setSigningKey(jwtKey)\n .requireIssuer(jwtIssuer)\n .build()\n .parseClaimsJws(token)\n .getBody()\n .getSubject();\n }", "@Test\r\n\tpublic void TestvalidateTokenWithUserIdFalse() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tUserDetails user1 = new User(\"admin1\", \"admin1\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tBoolean validateToken = jwtutil.validateToken(generateToken, user1);\r\n\t\tassertEquals(false, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}", "@Test\n public void jsonTest(){\n String token = \"eyJEZXZlbG9wZWQgQnkiOiJlLUhlYWx0aCBSZXNlYXJjaCBDZW50ZXIsIElJSVQgQmFuZ2Fsb3JlIiwiSG9zdCI6Ikthcm5hdGFrYSBNZW50YWwgSGVhbHRoIE1hbmFnZW1lbnQgU3lzdGVtIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJwcm9mZXNzaW9uIjoiTUhNU1BzeWNoaWF0cmlzdCIsInN1YiI6Ik1ITVMgU2VjdXJpdHkgVG9rZW4iLCJsYXN0TG9naW5PcmdJZCI6ImU2NDE3NGI0LWI3NzctNGRlYS04NmUyLTNmMGQ1NDgwYTI2MiIsInNlc3Npb25FbmRUaW1lIjoxNTg1MzQxMzYxLCJpc3MiOiJLTUhNUyIsInNlc3Npb25TdGFydFRpbWUiOjE1ODUyOTgxNjEsInNlc3Npb25JZCI6ImZlMmE5NzY2LTQ1MmYtNDdlYy1iMjUwLTI2YzQ5NjNiNjFkZSIsInVzZXJOYW1lIjoidGVzdDAxIiwibGFzdExvZ2luU3RhcnQiOiIxNTg1Mjk0ODg2NTY4Iiwib3JnVVVJRCI6ImU2NDE3NGI0LWI3NzctNGRlYS04NmUyLTNmMGQ1NDgwYTI2MiIsIm5iZiI6MTU4NTI5ODE2MSwib3JnUm9sZSI6Ik1IRUFkbWluIiwic2Vzc2lvblRva2VuIjoiU2Vzc2lvbklkOjE3Mi4zMS4xLjIyNCN0ZXN0MDE6ZTY0MTc0YjQtYjc3Ny00ZGVhLTg2ZTItM2YwZDU0ODBhMjYyOk1ITVM6TUhFQWRtaW4jMTU4NTI5ODE2MDczMyMtNzIzOTM2MzUzIzEwMCIsInBlcnNvbklkIjoiNjI3NzMwODEtZGE4OS00NjYzLThiNmYtOWMwMGU5NDMyOTYwIiwidXNlclVVSUQiOiI1YzI0ZjU5Ni0wZjM0LTQxYTYtYWFmNS1lMzAwMmVhMmM0Y2UiLCJleHAiOjE1ODUzMzQxNjEsImlhdCI6MTU4NTI5ODE2MX0.TFWVdCZYuUysbZ2gmQc5H2Eig4jwXcuiC_FTbDTUNis\";\n try {\n DecodedJWT jwt = JWT.decode(token);\n System.out.println(\"jwt token \"+jwt.getPayload());\n\n } catch (JWTDecodeException exception){\n //Invalid token\n exception.printStackTrace();\n }\n\n\n /* try {\n mhp.getJson(\"\");\n }catch (Exception e){\n e.printStackTrace();\n }*/\n }", "public Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder() {\n return token_;\n }", "public boolean isTokenValid() throws RSAEncryptedRSASignedJWTException{\n if(decryptedSignedJWT == null)\n throw new RSAEncryptedRSASignedJWTException(\"JWT token has not been decrypted\");\n else\n return this.verifyToken();\n }", "private String createSignedRSAToken(String jwtToken, String clientId, String clientKeyPairs, String keyPair) throws ParseException, JOSEException {\n log.info(\"Entering createSignedRSAToken\");\n log.info(\"clientKeyPairs: {}\", clientKeyPairs);\n\n Object signingKey;\n\n // To not affect current functionality, if no clientId parameter is passed,\n // sign with the default playground's \"testing_key\"\n JSONObject parseKeyPairs = JSONObjectUtils.parse(clientKeyPairs);\n log.info(\"Parsed clientKeyPairs\");\n\n if (clientId.equals(\"none\")) {\n signingKey = parseKeyPairs.get(\"default\");\n } else {\n signingKey = parseKeyPairs.get(clientId);\n if (signingKey == null) {\n throw new OauthException(\"Client ID to private key mapping not found\", HttpStatus.BAD_REQUEST);\n }\n }\n log.info(\"signingKey: {}\", signingKey);\n\n String[] splitString = jwtToken.split(\"\\\\.\");\n\n log.info(\"Size of splitString: {}\", splitString.length);\n\n log.info(\"~~~~~~~~~ JWT Header ~~~~~~~\");\n String base64EncodedHeader = splitString[0];\n JWSHeader head = JWSHeader.parse(new Base64URL(base64EncodedHeader));\n\n\n log.info(\"~~~~~~~~~ JWT Body ~~~~~~~\");\n String base64EncodedBody = splitString[1];\n Payload payload = new Payload(new Base64URL(base64EncodedBody));\n\n // RSA signatures require a public and private RSA key pair,\n // the public key must be made known to the JWS recipient to\n // allow the signatures to be verified\n\n log.info(\"keyPair: {}\", keyPair);\n\n net.minidev.json.JSONObject parsedRsa = JSONObjectUtils.parse(keyPair);\n\n Object getSigningKey = parsedRsa.get(signingKey);\n String signingKeyToString = String.valueOf(getSigningKey);\n\n RSAKey rsaJWK = RSAKey.parse(signingKeyToString);\n RSAPrivateKey prK = (RSAPrivateKey) rsaJWK.toPrivateKey();\n RSAPublicKey puK = (RSAPublicKey) rsaJWK.toPublicKey();\n\n byte[] privateKeyEnc = prK.getEncoded();\n byte[] privateKeyPem = java.util.Base64.getEncoder().encode(privateKeyEnc);\n String privateKeyPemStr = new String(privateKeyPem);\n\n // Create RSA-signer with the private key\n JWSSigner signer = new RSASSASigner(rsaJWK);\n\n // Prepare JWS object with simple string as payload\n JWSObject jwsObject = new JWSObject(head, payload);\n\n // Compute the RSA signature\n jwsObject.sign(signer);\n\n // To serialize to compact form, produces something like\n String s = jwsObject.serialize();\n log.info(\"Signed RSA Token:\");\n log.info(s);\n\n // To parse the JWS and verify it, e.g. on client-side\n jwsObject = JWSObject.parse(s);\n\n JWSVerifier verifier = new RSASSAVerifier(puK);\n\n log.info(\"Verify: {}\", jwsObject.verify(verifier));\n\n log.info(\"In RSA we trust! --> {}\", jwsObject.getPayload().toString());\n return s;\n }", "public static String generateToken(JWTAccessTokenIssuerDTO jwtAccessTokenIssuerDTO, Application application)\n throws OAuthSystemException {\n\n String accessToken;\n String clientId = jwtAccessTokenIssuerDTO.getClientId();\n try {\n OAuthAppDO oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId);\n String[] audience = oAuthAppDO.getAudiences();\n List<String> audienceList = Arrays.asList(audience);\n StringBuilder scopeString = new StringBuilder();\n String[] scopeList = jwtAccessTokenIssuerDTO.getScopeList();\n for (String scope : scopeList) {\n scopeString.append(scope).append(\" \");\n }\n String quotaType = APIUtil.getQuotaTypeForApplicationPolicy(application.getTier(),\n APIUtil.getTenantId(application.getOwner()));\n \n ApplicationDTO applicationDTO = new ApplicationDTO();\n applicationDTO.setId(application.getId());\n applicationDTO.setName(application.getName());\n applicationDTO.setTier(application.getTier());\n applicationDTO.setOwner(application.getOwner());\n applicationDTO.setTierQuotaType(quotaType);\n\n AuthenticatedUser endUser = jwtAccessTokenIssuerDTO.getUser();\n JwtTokenInfoDTO jwtTokenInfoDTO = APIUtil.getJwtTokenInfoDTO(application,\n endUser.toFullQualifiedUsername(),\n endUser.getTenantDomain());\n jwtTokenInfoDTO.setScopes(scopeString.toString().trim());\n jwtTokenInfoDTO.setAudience(audienceList);\n jwtTokenInfoDTO.setExpirationTime(jwtAccessTokenIssuerDTO.getValidityPeriod());\n jwtTokenInfoDTO.setApplication(applicationDTO);\n jwtTokenInfoDTO.setKeyType(application.getKeyType());\n jwtTokenInfoDTO.setConsumerKey(clientId);\n jwtTokenInfoDTO.setTokenReqMessageContext(jwtAccessTokenIssuerDTO.getTokReqMsgCtx());\n jwtTokenInfoDTO.setOauthAuthzMsgCtx(jwtAccessTokenIssuerDTO.getOauthAuthzMsgCtx());\n APIMJWTGenerator apimjwtGenerator = new APIMJWTGenerator();\n accessToken = apimjwtGenerator.generateJWT(jwtTokenInfoDTO);\n\n } catch (InvalidOAuthClientException | IdentityOAuth2Exception | APIManagementException e) {\n log.error(\"Error occurred while getting JWT Token client ID : \" + clientId + \" when getting oAuth App \" +\n \"information\", e);\n throw new OAuthSystemException(\"Error occurred while getting JWT Token client ID : \" + clientId, e);\n }\n return accessToken;\n }", "CloudCredentialStatus verify(@Nonnull AuthenticatedContext authenticatedContext);", "public interface JwtTokenService {\n /**\n * Create token for user\n *\n * @param user user, that needs a token\n * @return token\n */\n String createToken(User user);\n\n /**\n * Get token life duration\n *\n * @return token duration\n */\n Duration getTokenExpiredIn();\n\n /**\n * Parse token\n *\n * @param token received token\n * @return authenticated token\n */\n Authentication parseToken(String token);\n}", "@GET\n @Path(\"/check/{token}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response checkToken(@PathParam(\"token\")String token) {\n\n final AuthServiceResult result = AuthServiceResult.OK;\n final String tokenInfo = authService.checkToken(token);\n\n return Response\n .status(result.getStatus())\n .entity(tokenInfo)\n .build();\n }", "private static boolean validateCloudProject(@NotNull Project project, @NotNull String cloudProjectId) {\n Buckets buckets = null;\n String message = null;\n try {\n Storage.Buckets.List listBuckets = CloudAuthenticator.getStorage().buckets().list(cloudProjectId);\n buckets = listBuckets.execute();\n } catch (Exception e) {\n message = e.getMessage();\n // ignore\n } finally {\n if (buckets == null) {\n CloudTestingUtils\n .showErrorMessage(project, \"Cloud test configuration is invalid\",\n \"Failed to authorize to Google Cloud project! Please select a project you are authorized to use.\\n\"\n + \"Exception while performing a pre-trigger sanity check\\n\\n\" + message);\n return false;\n }\n }\n return true;\n }", "public static GoogleIdToken.Payload checkToken(String tokenString)\n\t\t\tthrows UnauthorizedException {\n\n\t\t// TODO: validate auth token, client id, etc.\n\t\tAuthChecker checker = new AuthChecker(\n\t\t\t\tUniversalConstants.APP_CLIENT_IDS, Constants.WEB_CLIENT_ID);\n\n\t\ttry {\n\t\t\tGoogleIdToken.Payload payload = checker.check(tokenString);\n\n\t\t\tif (checker.isValid() || AppConfig.isTest()) {\n\n\t\t\t\treturn payload;\n\t\t\t} else {\n\n\t\t\t\tthrow new UnauthorizedException(\"Invalid Auth With Problem: \"\n\t\t\t\t\t\t+ checker.problem());\n\t\t\t}\n\t\t} catch (GeneralSecurityException e) {\n\t\t\t// TODO: flag the security error\n\t\t\tthrow new UnauthorizedException(\"Security Error: \"\n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\n\t}", "private static void jwsSecureJWT() {\n\t\tRSAKey rsaJWK;\n\t\ttry {\n\t\t\trsaJWK = new RSAKeyGenerator(2048).keyID(\"123\").generate();\n\t\t\tRSAKey rsaPublicJWK = rsaJWK.toPublicJWK();\n\n\t\t\tRSAPublicKey rsaPublicJWK2 = rsaJWK.toRSAPublicKey();\n\n\t\t\tif (rsaPublicJWK.equals(rsaPublicJWK2)) {\n\t\t\t\tSystem.out.println(\"trung nhau\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Khong trung nhau\");\n\t\t\t}\n\n\t\t\t// Create RSA-signer with the private key\n\t\t\tJWSSigner signer = new RSASSASigner(rsaJWK);\n\n\t\t\t// Prepare JWT with claims set\n\t\t\tJWTClaimsSet claimsSet = new JWTClaimsSet.Builder().subject(\"alice\").issuer(\"https://c2id.com\")\n\t\t\t\t\t.expirationTime(new Date(new Date().getTime() + 60 * 1000)).build();\n\n\t\t\tSignedJWT signedJWT = new SignedJWT(\n\t\t\t\t\tnew JWSHeader.Builder(JWSAlgorithm.RS256).keyID(rsaJWK.getKeyID()).build(), claimsSet);\n\n\t\t\t// Compute the RSA signature\n\t\t\tsignedJWT.sign(signer);\n\n\t\t\t// To serialize to compact form, produces something like\n\t\t\t// eyJhbGciOiJSUzI1NiJ9.SW4gUlNBIHdlIHRydXN0IQ.IRMQENi4nJyp4er2L\n\t\t\t// mZq3ivwoAjqa1uUkSBKFIX7ATndFF5ivnt-m8uApHO4kfIFOrW7w2Ezmlg3Qd\n\t\t\t// maXlS9DhN0nUk_hGI3amEjkKd0BWYCB8vfUbUv0XGjQip78AI4z1PrFRNidm7\n\t\t\t// -jPDm5Iq0SZnjKjCNS5Q15fokXZc8u0A\n\t\t\tString s = signedJWT.serialize();\n\n\t\t\t// On the consumer side, parse the JWS and verify its RSA signature\n\t\t\tsignedJWT = SignedJWT.parse(s);\n\n\t\t\tJWSVerifier verifier = new RSASSAVerifier(rsaPublicJWK);\n\t\t\t// assertTrue(signedJWT.verify(verifier));\n\n\t\t\tif (signedJWT.verify(verifier)) {\n\t\t\t\tSystem.out.println(\"signedJWT.verify(verifier) == TRUE\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"signedJWT.verify(verifier) == FALSE\");\n\t\t\t}\n\t\t} catch (JOSEException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Token getTokenByEmail(String email)throws Exception;", "@Test\n public void testVerifyNimbleUser() {\n String autorization=\"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ6cFp2LVlNTlJfRURaeEJDN0tRTmw0VEVqektpcUJnNzJhY0JHZjlCbVFVIn0.eyJqdGkiOiJkMDliNTFlYS1hOTI0LTRmMzctOWZiYi00ZDAxNjc0MjQ1ZWYiLCJleHAiOjE1NTAyMzMxNzIsIm5iZiI6MCwiaWF0IjoxNTUwMjI5NTcyLCJpc3MiOiJodHRwOi8va2V5Y2xvYWs6ODA4MC9hdXRoL3JlYWxtcy9tYXN0ZXIiLCJhdWQiOiJuaW1ibGVfY2xpZW50Iiwic3ViIjoiOGI0NDBhNGUtNTZhOC00MmU3LTk3ZDMtYTJkNWNmNjk0MzIzIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibmltYmxlX2NsaWVudCIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6ImY1NmI0YjY5LTIyOGItNDM2OC1hNWI1LTBiMjM5YTQ3ODYxNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsibmltYmxlX3VzZXIiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sIm5hbWUiOiJhbmRyZWEgcGVyc29uYSBtdXN1bWVjaSIsInByZWZlcnJlZF91c2VybmFtZSI6Im11c3VtZWNpLmhvbG9uaXgrMUBnbWFpbC5jb20iLCJnaXZlbl9uYW1lIjoiYW5kcmVhIHBlcnNvbmEiLCJmYW1pbHlfbmFtZSI6Im11c3VtZWNpIiwiZW1haWwiOiJtdXN1bWVjaS5ob2xvbml4KzFAZ21haWwuY29tIn0.gBnPrfbtVmgwSDIZcOZpOlNglesktHwtTf3dw1oGjnVOCWivIX-phWcU6pbr3fBrMql3AgPEFGHRDhDXXW0Ag1sY09ht6nyZQWtQE9abjARPwO6By69kbZ0WC8R5nK3TkaAJOnFn4Fiutm7x2nn2bQDxjaKZf7QzHRic7V129eSo1IgfsqNAlF2UGLtuVbB-H65uRamZl5xFXi8bgQ6uzohcs4LWd9eaQobiOH2J21toHJ35QqUy8lfQyEiMEIf2ZiW_gCxn2ZPr9n4mWR71P_Ihh6cKA6SLZPLyi0TJK3pj0V0ujHhrdLjssJ2pmrO3qZFPz7bPhvDY_uxZ4raItA\";\n //String autorization=\"errrr\";\n NimbleUser user = null;\n \n IdentityServiceVerifier isv = new IdentityServiceVerifier();\n user = isv.verifyNimbleUser(autorization);\n //assertNotNull(user);\n //assertNotEquals(new Boolean(user.isValidUser()),Boolean.FALSE);\n \n }", "boolean isAuthorizerAccessTokenExpired(String appId);", "boolean isJsapiTicketExpired(String appId);", "GetToken.Req getGetTokenReq();", "public boolean validateJTI(SignedJWT signedJWT, String jti, long currentTimeInMillis,\n long timeStampSkewMillis, long expTime, long issuedTime) throws IdentityOAuth2Exception {\n //check whether the token is already used\n //check JWT ID in cache\n if (jti == null) {\n return true;\n }\n if (enableJTICache) {\n JWTCacheEntry entry = jwtCache.getValueFromCache(jti);\n if (!validateJTIInCache(jti, signedJWT, entry, currentTimeInMillis, timeStampSkewMillis, this.jwtCache)) {\n return false;\n }\n }\n // check JWT ID in DB\n if (!validateJwtInDataBase(jti, currentTimeInMillis, timeStampSkewMillis)) {\n return false;\n }\n persistJWTID(jti, expTime, issuedTime);\n return true;\n }", "@Test\n\tpublic void getTokenTest() {\n\t}", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n if (tokenBuilder_ == null) {\n return token_;\n } else {\n return tokenBuilder_.getMessage();\n }\n }", "private JwtHeaderAssertion createJwtHeaderAssertion(String jwtKeyId) {\n log.info(\"Entering createJwtHeaderAssertion\");\n JwtHeaderAssertion jwtHeaderAssertion = new JwtHeaderAssertion();\n jwtHeaderAssertion.setAlg(\"RS256\");\n jwtHeaderAssertion.setTyp(\"jwt\");\n jwtHeaderAssertion.setKid(jwtKeyId);\n\n return jwtHeaderAssertion;\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 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 }", "public boolean isExpiredToken(String jwt) {\n try {\n Claims claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(\"TerryLam\"))\n .parseClaimsJws(jwt).getBody();\n Date expiration = claims.getExpiration();\n //If the expiration Date is a time BEFORE the current time, it is expired\n if (expiration.before(new Date())) {\n return true;\n } else {\n return false;\n }\n } catch (JwtException ex) {\n log.info(\"Error validating token. Exception Message \" + ex.getMessage());\n return true;\n }\n }", "public void setIDToken(JWT token) {\n this.idToken = token;\n }", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "public void verifyOTP() {\n HashMap<String, String> commonParams = new CommonParams.Builder()\n .add(AppConstant.KEY_COUNTRY_CODE, mCountryCode)\n .add(AppConstant.KEY_PHONE, mPhoneno)\n .add(AppConstant.KEY_OTP, mOTP).build().getMap();\n ApiInterface apiInterface = RestClient.getApiInterface();\n apiInterface.userVerifyOTP(\"bearer\" + \" \" + CommonData.getAccessToken(), commonParams)\n .enqueue(new ResponseResolver<CommonResponse>(OtpActivity.this, true, true) {\n @Override\n public void success(final CommonResponse commonResponse) {\n Log.d(\"debug\", commonResponse.getMessage());\n\n }\n\n @Override\n public void failure(final APIError error) {\n Log.d(\"debug\", error.getMessage());\n\n }\n });\n }", "public boolean checkJTIValidityPeriod(String jti, long jwtExpiryTimeMillis, long currentTimeInMillis,\n long timeStampSkewMillis) throws IdentityOAuth2Exception {\n if (currentTimeInMillis + timeStampSkewMillis > jwtExpiryTimeMillis) {\n return logAndReturnTrue(\"JWT Token with jti: \" + jti + \"has been reused after the allowed expiry time:\"\n + jwtExpiryTimeMillis);\n } else {\n return logAndReturnFalse(\"JWT Token with jti: \" + jti + \" Has been replayed before the allowed expiry time:\"\n + jwtExpiryTimeMillis);\n }\n }", "private Map<String, Object> generateJWTToken(Customer user) {\n long timestamp = System.currentTimeMillis();\n String token = Jwts.builder().signWith(SignatureAlgorithm.HS256, Constant.API_SECRET_KEY)\n .setIssuedAt(new Date(timestamp))\n .setExpiration(new Date(timestamp + Constant.TOKEN_VALIDITY))\n .claim(\"userId\", user.getId())\n// .claim(\"email\", user.getEmail())\n// .claim(\"password\", user.getPassword())\n .compact();\n Map<String, Object> map = new HashMap();\n map.put(\"token\", token);\n map.put(\"customer\", user);\n return map;\n\t}", "@Test\n @DisplayName(\"valid access token is accepted\")\n public void validOAuthJwtShouldReturnUsername() throws Exception {\n String tokenEndpoint = keycloakContainer.getAuthServerUrl() + \"/realms/calamitaid/protocol/openid-connect/token\";\n var restTemplate = new RestTemplate();\n var headers = new HttpHeaders();\n headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);\n headers.setBasicAuth(\"pvt-access\", \"6cf9e105-f5cb-477d-9b65-45b40d1df8f8\");\n var map = new LinkedMultiValueMap<>();\n map.add(\"grant_type\", \"password\");\n map.add(\"username\", \"calmuser\");\n map.add(\"password\", \"calm123\");\n var token = restTemplate.postForObject(tokenEndpoint, new HttpEntity<>(map, headers), KeycloakToken.class);\n assertThat(token).isNotNull();\n\n String accessToken = token.getAccessToken();\n\n mvc.perform(MockMvcRequestBuilders.get(\"/protected\")\n .header(\"Authorization\", \"Bearer \" + accessToken))\n .andExpect(status().isOk());\n }", "public long getClientForProject(long projectId) throws ContestManagementException {\r\n return 0;\r\n }", "@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 }", "public void authenticate() throws Exception {\n try {\n\n // Build the form body\n final FormBody.Builder formBodyBuilder = new FormBody.Builder().add(\"scope\", \"api-tenant\");\n\n // Has username/password\n if (appProps.getFodGrantType().equals(VulnerabilityReportConstants.GRANT_TYPE_PASSWORD)) {\n formBodyBuilder.add(\"grant_type\", VulnerabilityReportConstants.GRANT_TYPE_PASSWORD)\n .add(\"username\", appProps.getFodTenantId() + \"\\\\\" + appProps.getFodUsername())\n .add(\"password\", appProps.getFodPassword());\n } else // Has api key/secret\n {\n formBodyBuilder.add(\"grant_type\", VulnerabilityReportConstants.GRANT_TYPE_CLIENT_CREDENTIALS)\n .add(\"client_id\", appProps.getFodClientId())\n .add(\"client_secret\", appProps.getFodClientSecret());\n\n }\n final RequestBody formBody = formBodyBuilder.build();\n\n final Request request = new Request.Builder()\n .url(appProps.getFodAPIBaseURL() + \"/oauth/token\")\n .post(formBody)\n .build();\n final Response response = client.newCall(request).execute();\n \n if (!response.isSuccessful()) {\n \tlogger.debug(\"response::\" + response.message() + \", \" + response.code() + \", \" + response.toString());\n throw new FoDConnectionException(\"Unexpected code \" + response);\n }\n\n logger.info(\"Successful connection to Fortify On Demand!\");\n \n final String content = IOUtils.toString(response.body().byteStream(), \"utf-8\");\n response.body().close();\n\n // Parse the Response\n final JsonParser parser = new JsonParser();\n final JsonObject obj = parser.parse(content).getAsJsonObject();\n this.token = obj.get(\"access_token\").getAsString();\n\n } catch (final FoDConnectionException fce) {\n if (fce.getMessage().contains(VulnerabilityReportConstants.FOD_UNAUTORIZED)) {\n logger.error(\"FoD CONNECTION FAILED. Please check the FoD URL, username, tenant, and password and try again.\");\n logger.info(\"FoD URL=\" + appProps.getFodAPIBaseURL());\n logger.info(\"FoD GrantType=\" + appProps.getFodGrantType());\n logger.info(\"FoD client Id=\" + appProps.getFodClientId());\n logger.info(\"FoD username=\" + appProps.getFodUsername());\n logger.info(\"FoD tennant=\" + appProps.getFodTenantId());\n } else {\n logger.error(\"FoD Response was not successful with message: \" + fce.getMessage());\n }\n throw fce;\n }\n\n catch (final UnknownHostException uhe) {\n logger.error(\"Unknown Host Error. Are you connected to the internet?\");\n uhe.printStackTrace();\n throw uhe;\n }\n\n catch (final Exception e) {\n logger.error(\"Authentication to FoD failed. Connection seems OK.\");\n e.printStackTrace();\n throw e;\n }\n }", "public JWT getIDToken() {\n return idToken;\n }", "public boolean verifySignature(OpenIDToken idToken, String jwksResponse) {\n boolean verificationStatus = false;\n try {\n JWKSet jwkSet = JWKSet.parse(jwksResponse);\n JWSHeader jwsHeader = idToken.getSignedJWT().getHeader();\n if (jwkSet != null) {\n List<JWK> matchingJWKs = new JWKSelector(new JWKMatcher.Builder()\n .keyID(jwsHeader.getKeyID())\n .algorithm(jwsHeader.getAlgorithm())\n .build())\n .select(jwkSet);\n OMLog.trace(TAG, \"Found \" + matchingJWKs.size() + \" matching JWKs\");\n\n JWSVerifierFactory jwsVerifierFactory = new DefaultJWSVerifierFactory();\n for (JWK jwk : matchingJWKs) {\n try {\n Key key = null;\n if (jwk instanceof RSAKey) {\n key = ((RSAKey) jwk).toRSAPublicKey();\n } else if (jwk instanceof ECKey) {\n key = ((ECKey) jwk).toECPublicKey();\n }\n if (key != null) {\n JWSVerifier jwsVerifier = jwsVerifierFactory.createJWSVerifier(jwsHeader, key);\n verificationStatus = idToken.getSignedJWT().verify(jwsVerifier);\n if (verificationStatus) {\n idToken.setVerified(true);\n break;\n }\n }\n } catch (JOSEException e) {\n OMLog.error(TAG, e.getMessage(), e);\n }\n }\n }\n } catch (ParseException e) {\n Log.e(TAG, e.getMessage(), e);\n }\n return verificationStatus;\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 }", "@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 }", "String checkIfProjectExists(String projectKey, String projectName);", "public boolean isIdExist(int projectId) throws EmployeeManagementException;", "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 int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecret).getBytes());\n\t\t\t\n\t\t\t//Request headers\n\t\t\tMap<String, String> headers = new HashMap<>();\n\t\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\theaders.put(\"Authorization\", authString);\n\t\t\t\n\t\t\t//Request data\n\t\t\tString data = ContentBuilder.postForm(\"grant_type\", \"client_credentials\");\n\t\t\t\n\t\t\t//Call\n\t\t\tlong tic = System.currentTimeMillis();\n\t\t\tthis.lastRefreshTry = tic;\n\t\t\tJSONObject res = Connectors.httpPOST(spotifyAuthUrl, data, headers);\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi getTokenViaClientCredentials\");\n\t\t\tStatistics.addExternalApiTime(\"SpotifyApi getTokenViaClientCredentials\", tic);\n\t\t\t//System.out.println(res.toJSONString()); \t\t//DEBUG\n\t\t\tif (!Connectors.httpSuccess(res)){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tString token = JSON.getString(res, \"access_token\");\n\t\t\tString tokenType = JSON.getString(res, \"token_type\");\n\t\t\tlong expiresIn = JSON.getLongOrDefault(res, \"expires_in\", 0);\n\t\t\tif (Is.nullOrEmpty(token)){\n\t\t\t\treturn 4;\n\t\t\t}else{\n\t\t\t\tthis.token = token;\n\t\t\t\tthis.tokenType = tokenType;\n\t\t\t\tthis.tokenValidUntil = System.currentTimeMillis() + (expiresIn * 1000);\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t\n\t\t}catch (Exception e){\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi-error getTokenViaClientCredentials\");\n\t\t\treturn 3;\n\t\t}\n\t}", "static void verifyAccount(@NonNull Context context,\n @NonNull Credentials credentials,\n @Nullable String fcmToken,\n @NonNull String code,\n @Nullable String pin,\n @Nullable String basicStorageCredentials,\n @Nullable TokenResponse kbsTokenResponse,\n @NonNull VerifyCallback callback)\n {\n new AsyncTask<Void, Void, Result>() {\n\n private volatile LockedException lockedException;\n private volatile TokenResponse kbsToken;\n\n @Override\n protected Result doInBackground(Void... voids) {\n final boolean pinSupplied = pin != null;\n final boolean tryKbs = kbsTokenResponse != null;\n\n try {\n kbsToken = kbsTokenResponse;\n verifyAccount(context, credentials, code, pin, kbsTokenResponse, basicStorageCredentials, fcmToken);\n return Result.SUCCESS;\n } catch (KeyBackupSystemNoDataException e) {\n Log.w(TAG, \"No data found on KBS\");\n return Result.KBS_ACCOUNT_LOCKED;\n } catch (KeyBackupSystemWrongPinException e) {\n kbsToken = e.getTokenResponse();\n return Result.KBS_WRONG_PIN;\n } catch (LockedException e) {\n if (pinSupplied && tryKbs) {\n throw new AssertionError(\"KBS Pin appeared to matched but reg lock still failed!\");\n }\n\n Log.w(TAG, e);\n lockedException = e;\n if (e.getBasicStorageCredentials() != null) {\n try {\n kbsToken = getToken(e.getBasicStorageCredentials());\n if (kbsToken == null || kbsToken.getTries() == 0) {\n return Result.KBS_ACCOUNT_LOCKED;\n }\n } catch (IOException ex) {\n Log.w(TAG, e);\n return Result.ERROR;\n }\n }\n return Result.PIN_LOCKED;\n } catch (RateLimitException e) {\n Log.w(TAG, e);\n return Result.RATE_LIMITED;\n } catch (IOException e) {\n Log.w(TAG, e);\n return Result.ERROR;\n }\n }\n\n @Override\n protected void onPostExecute(Result result) {\n switch (result) {\n case SUCCESS:\n handleSuccessfulRegistration(context);\n callback.onSuccessfulRegistration();\n break;\n case PIN_LOCKED:\n if (kbsToken != null) {\n if (lockedException.getBasicStorageCredentials() == null) {\n throw new AssertionError(\"KBS Token set, but no storage credentials supplied.\");\n }\n Log.w(TAG, \"Reg Locked: V2 pin needed for registration\");\n callback.onKbsRegistrationLockPinRequired(lockedException.getTimeRemaining(), kbsToken, lockedException.getBasicStorageCredentials());\n } else {\n Log.w(TAG, \"Reg Locked: V1 pin needed for registration\");\n callback.onV1RegistrationLockPinRequiredOrIncorrect(lockedException.getTimeRemaining());\n }\n break;\n case RATE_LIMITED:\n callback.onRateLimited();\n break;\n case ERROR:\n callback.onError();\n break;\n case KBS_WRONG_PIN:\n Log.w(TAG, \"KBS Pin was wrong\");\n callback.onIncorrectKbsRegistrationLockPin(kbsToken);\n break;\n case KBS_ACCOUNT_LOCKED:\n Log.w(TAG, \"KBS Account is locked\");\n callback.onKbsAccountLocked(lockedException != null ? lockedException.getTimeRemaining() : null);\n break;\n }\n }\n }.executeOnExecutor(SignalExecutors.UNBOUNDED);\n }", "public Jwt getJwt() {\n if (jwt == null || Instant.now().plus(EXPIRATION_OFFSET).isAfter(jwt.getExpireAt())) {\n jwt = jwtCreator.generateJwt(serviceAccountKey);\n }\n\n return jwt;\n }", "@Override\r\n\tpublic ResponseEntity<String> deleteProject(String authToken , int projectId) throws ManualException{\r\n\t\tSession session=sessionFactory.openSession();\r\n\t\t\r\n\t\tResponseEntity<String> responseEntity=new ResponseEntity<String>(HttpStatus.BAD_REQUEST);\r\n\t\t\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\t\tUser adminUser=session.get(User.class, authtable.getUser().getEmpId());\r\n\t\t\tif(adminUser.getUsertype().equals(\"Admin\")){\t\r\n\t\t\t\t\r\n\t\t\t\t\t/* get The Project */\r\n\t\t\t\t\tString hql = \"FROM project where projectId= \"+projectId ;\r\n\t\t\t\t\tQuery query = session.createQuery(hql);\r\n\t\t\t\t\tProject returnedProject=(Project)query.list().get(0);\r\n\t\t\t\t\r\n\t\t\t\t\t/* get user of that Project */\r\n\t\t\t\t\thql = \"FROM user where projectId=\"+returnedProject.getProjectId() ;\r\n\t\t\t\t\tquery = session.createQuery(hql);\r\n\t\t\t\t\tList<User> users=(List<User>)query.list();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Deleting project from users */\r\n\t\t\t\t\tfor(User user:users){\r\n\t\t\t\t\t\tuser.setProject(null);\r\n\t\t\t\t\t\tsession.persist(user);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t/* delete from project table */\r\n\t\t\t\t\tif(returnedProject!=null){\r\n\t\t\t\t\t\tsession.delete(returnedProject);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/* entry in operation table */\r\n\t\t\t\t\tOperationImpl operationImpl= new OperationImpl();\r\n\t\t\t\t\toperationImpl.addOperation(session, adminUser, \"Deleted Project \"+ returnedProject.getProjectName());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.OK);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.NOT_FOUND);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.UNAUTHORIZED);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tresponseEntity=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn responseEntity;\r\n\t\t}\r\n\t}", "public boolean validateJwtInDataBase(String jti, long currentTimeInMillis,\n long timeStampSkewMillis) throws IdentityOAuth2Exception {\n JWTEntry jwtEntry = null;\n try {\n jwtEntry = jwtStorageManager.getJwtFromDB(jti);\n } catch (IdentityOAuth2Exception e) {\n return handleException(\"Error while loading jwt with jti: \" + jti + \" from database\", e);\n }\n if (jwtEntry == null) {\n return logAndReturnTrue(\"JWT id: \" + jti + \" not found in the Storage the JWT has been validated \" +\n \"successfully.\");\n } else if (preventTokenReuse) {\n return logAndReturnFalse(\"JWT Token with jti: \" + jti + \" has been replayed\");\n } else {\n if (!checkJTIValidityPeriod(jti, jwtEntry.getExp(), currentTimeInMillis, timeStampSkewMillis)) {\n return false;\n }\n }\n return true;\n }", "String getAuthorizerAccessToken(String appId);", "public long getUserIdFromJWT(String jwtToken) {\n LOG.info(\"Checking JWT token\");\n Claims claims;\n try {\n claims = appUtils.decodeJWT(jwtToken);\n } catch (Exception e) {\n LOG.info(\"Invalid JWT token: {}\", e.getMessage());\n throw new ServiceException(\"Invalid JWT token\", e);\n }\n\n try {\n return Long.parseLong(claims.getId());\n } catch (NumberFormatException e) {\n LOG.error(\"JWT token contains id with invalid format for long values: {}\", e.getMessage());\n throw new ServiceException(\"Invalid JWT token\", e);\n }\n }", "public static Task<String> getUserToken(String userId) {\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .get()\n .continueWith(new Continuation<DocumentSnapshot, String>() {\n @Override\n public String then(@NonNull Task<DocumentSnapshot> task) {\n DocumentSnapshot result = task.getResult();\n if (result != null && result.contains(Const.USER_TOKEN_KEY)) {\n return (String) result.get(Const.USER_TOKEN_KEY);\n }\n return \"\";\n }\n });\n }", "public void verify() throws InternalSkiException {\n if (SERVER_KEY_VALUE==null || \"\".equals(SERVER_KEY_VALUE.trim())) {\n throw new InternalSkiException(\"Cannot validate server key!\");\n }\n\n byte[] tokenKey = getTokenKey();\n byte[] systemKey = getSystemKey();\n\n if (tokenKey==null || systemKey==null) {\n throw new InternalSkiException(\"Cannot validate token or system keys!\");\n }\n }", "public boolean refreshTokenKey() {\n\t\tOptional<String> apiGetTokenKeyURLOptional = ConfigPropertiesFileUtils.getValue(\"mail.api.url.getTokenKey\");\n\t\tif (!apiGetTokenKeyURLOptional.isPresent()) {\n\t\t\tLOGGER.error(\"mail.api.url.getTokenKey not exist\");\n\t\t\treturn false;\n\t\t}\n\t\tHttpClient httpClient = HttpClientBuilder.create().build();\n\t\tHttpPost request = new HttpPost(apiGetTokenKeyURLOptional.get().trim());\n\t\trequest.addHeader(\"Content-Type\", \"application/json\");\n\t\ttry {\n\t\t\tHttpResponse httpResponse = httpClient.execute(request);\n\t\t\tif (httpResponse.getStatusLine().getStatusCode() != 200) {\n\t\t\t\tLOGGER.error(\"Fail to get Token Key: \"\n\t\t\t\t\t\t+ IOUtils.toString(httpResponse.getEntity().getContent(), Charset.forName(\"UTF-8\")));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString contentJsonString = IOUtils.toString(httpResponse.getEntity().getContent(),\n\t\t\t\t\tCharset.forName(\"UTF-8\"));\n\t\t\tJSONArray contentJsonArray = new JSONArray(contentJsonString);\n\t\t\tLOGGER.debug(\"TOKEN KEY : \" + contentJsonArray.getString(0));\n\t\t\tif (contentJsonArray.getString(0).equals(\"null\")) {\n\t\t\t\tLOGGER.error(\"The response is null, check the mail.api.url.getTokenKey\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.tokenKey = contentJsonArray.getString(0);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Send request to ask a new token\", e);\n\t\t\treturn false;\n\t\t}\n\t\tLOGGER.debug(\"Get token key successfully\");\n\t\treturn true;\n\t}", "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 }", "boolean isCardApiTicketExpired(String appId);", "OAuth2Token getToken();", "@Test\n public void createNewUserByExternalTokenAndCheckIt() throws Exception {\n UserLogin userLogin = new UserLogin();\n userLogin.setUserToken(UUID.randomUUID().toString());\n boolean isThrow = false;\n try {\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n } catch (ApplicationException e) {\n isThrow = true;\n }\n assertThat(isThrow);\n\n //Add login and expect new user successful registration\n userLogin.setUserLogin(\"[email protected]\");\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n assertThat(userResponse.getUserMail().equals(userLogin.getUserLogin()));\n assertThat(userResponse.getUserPoints()).size().isEqualTo(5);\n }", "public void setProjectId(String projectId) {\n this.projectId = projectId;\n }", "@Delegate\n @Path(\"/projects/{project}/global\")\n HttpHealthCheckApi getHttpHealthCheckApi(@PathParam(\"project\") String projectName);", "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 }", "@Test\n public void getDeviceTokenTest() throws ApiException {\n String deviceId = null;\n // DeviceTokenEnvelope response = api.getDeviceToken(deviceId);\n\n // TODO: test validations\n }", "private String getSignedAssertion(String clientId, String tokenEndpoint, String mccmnc, String code, String clientKeyPairs, String keyPair) throws Exception {\n log.info(\"Entering getSignedAssertion: tokenEndpoint: {}\", tokenEndpoint);\n\n AssertionBody assertionBody = new AssertionBody();\n\n assertionBody.setAud(tokenEndpoint);\n assertionBody.setIss(clientId);\n assertionBody.setSub(clientId);\n // Create a version 4 UUID\n assertionBody.setJti(UUID.randomUUID().toString());\n // Casting to int truncates fractional portion of long if it exists\n int iat = (int)(new Date().getTime() / 1000);\n assertionBody.setIat(iat);\n int exp = iat + 30 * 60;\n assertionBody.setExp(exp);\n\n ObjectMapper mapper = new ObjectMapper();\n\n JSONObject parseKeyPairs = null;\n try {\n parseKeyPairs = JSONObjectUtils.parse(clientKeyPairs);\n } catch (ParseException ex) {\n String returnedMessage = String.format(\"JSONProcessingException: Error converting AssertionBody to JSON string: %s\", ex.getMessage());\n log.error(returnedMessage);\n throw new Exception(returnedMessage);\n }\n Object signingKey = parseKeyPairs.get(clientId);\n log.info(\"===> signingKey: \" + signingKey);\n\n String jwtKeyId = signingKey == null ? \"\" : signingKey.toString();\n\n JwtHeaderAssertion jwtHeaderAssertion = createJwtHeaderAssertion(jwtKeyId);\n\n String jwtHeaderAssertionJsonStrng = null;\n String assertionBodyJsonString = null;\n // Convert Java POJO JwtHeaderAssertion object to JSON string\n // Convert Java POJO AssertionBody object to JSON string\n try {\n jwtHeaderAssertionJsonStrng = mapper.writeValueAsString(jwtHeaderAssertion);\n assertionBodyJsonString = mapper.writeValueAsString(assertionBody);\n } catch (JsonProcessingException ex) {\n String returnedMessage = String.format(\"JSONProcessingException: Error converting AssertionBody to JSON string: %s\", ex.getMessage());\n log.error(returnedMessage);\n throw new Exception(returnedMessage);\n }\n log.info(\"JwtHeaderAssertion JSON string: {}\", jwtHeaderAssertionJsonStrng);\n log.info(\"AssertionBody JSON string: {}\", assertionBodyJsonString);\n\n String unsignedAssertion = createUnsignedJwt(jwtHeaderAssertionJsonStrng, assertionBodyJsonString);\n log.info(\"unsignedAssertion: {}\", unsignedAssertion);\n\n String signedAssertion = \"\";\n\n try {\n signedAssertion = createSignedRSAToken(unsignedAssertion, clientId, clientKeyPairs, keyPair);\n } catch (ParseException ex) {\n String returnedMessage = String.format(\"ParseException: Error signing unsigned assertion: %s\", ex.getMessage());\n log.error(returnedMessage);\n throw new Exception(returnedMessage);\n } catch (JOSEException ex) {\n String returnedMessage = String.format(\"JOSEException: Error signing unsigned assertion: %s\", ex.getMessage());\n log.error(returnedMessage);\n throw new Exception(returnedMessage);\n }\n log.info(\"Leaving getSignedAssertion\");\n\n return signedAssertion;\n }", "public interface Constant {\n\n String JWT_SECRET = \"jwtsecret\";\n\n long EXP_TIME_LENGTH = 86400000;\n}", "public Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder() {\n if (tokenBuilder_ != null) {\n return tokenBuilder_.getMessageOrBuilder();\n } else {\n return token_;\n }\n }", "@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }", "interface PodAuthService {\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n Observable<Auth> authenticate(\n @Field(\"grant_type\") String grantType,\n @Field(\"username\") String username,\n @Field(\"password\") String password,\n @Field(\"client_id\") String clientId,\n @Field(\"client_secret\") String clientSecret\n );\n\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n Observable<Auth> refreshToken(\n @Field(\"grant_type\") String grantType,\n @Field(\"client_id\") String clientId,\n @Field(\"client_secret\") String clientSecret,\n @Field(\"refresh_token\") String refreshToken\n );\n}", "@Test\n public void testFailureNotParByParRequiredCilent() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n\n oauth.clientId(clientId);\n oauth.openLoginForm();\n assertEquals(OAuthErrorException.INVALID_REQUEST, oauth.getCurrentQuery().get(OAuth2Constants.ERROR));\n assertEquals(\"Pushed Authorization Request is only allowed.\", oauth.getCurrentQuery().get(OAuth2Constants.ERROR_DESCRIPTION));\n\n updateClientDynamically(clientId, (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.FALSE);\n });\n\n OAuthClient.AuthorizationEndpointResponse loginResponse = oauth.doLogin(TEST_USER_NAME, TEST_USER_PASSWORD);\n String code = loginResponse.getCode();\n\n // Token Request\n OAuthClient.AccessTokenResponse res = oauth.doAccessTokenRequest(code, clientSecret);\n assertEquals(200, res.getStatusCode());\n }", "@RequestMapping(value = \"/openId\", method = RequestMethod.GET)\n public @ResponseBody void openId( HttpServletRequest request, HttpServletResponse response) {\n try {\n String code = request.getParameter(\"code\");\n String state = request.getParameter(\"state\");\n\n log.info(\"code: \" + code + \" state = \" + state);\n\n // verify input parameters\n if (state != null && code != null) {\n\n // verify incoming call\n String stateSession = request.getSession().getAttribute(\"state\").toString();\n if (stateSession == null || stateSession.equals(state) == false) {\n throw new Exception(\"Invalid state found.\");\n }\n\n // Send request to Google oauth to verify login\n CloseableHttpClient client = HttpClientBuilder.create().build();\n HttpPost post = new HttpPost(GOOGLE_OAUTH);\n post.setHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n List<NameValuePair> urlParameters = new ArrayList<>();\n urlParameters.add(new BasicNameValuePair(\"code\", code));\n urlParameters.add(new BasicNameValuePair(\"client_id\", \"105248247635-270o2p37be66bbmhd7dt7nhshqu6ug2l.apps.googleusercontent.com\"));\n urlParameters.add(new BasicNameValuePair(\"client_secret\", \"FmYfHYybJ7YP6fQLNny6XKjp\"));\n urlParameters.add(new BasicNameValuePair(\"grant_type\", \"authorization_code\"));\n urlParameters.add(new BasicNameValuePair(\"redirect_uri\", \"https://openid-testgoogleopenid.wedeploy.io/openId\"));\n post.setEntity(new UrlEncodedFormEntity(urlParameters));\n CloseableHttpResponse res = client.execute(post);\n log.info(\"Response Code from Google oauth: \" + res.getStatusLine());\n HttpEntity entity = res.getEntity();\n String responseString = EntityUtils.toString(entity);\n log.info(\"Response body from Google oauth: \" + responseString);\n\n // read user email address in the response\n JSONObject json = new JSONObject(responseString);\n String idToken = json.getString(\"id_token\");\n log.info(\"id_token: \" + idToken);\n DecodedJWT jwt = JWT.decode(idToken);\n String email = jwt.getClaim(\"email\").asString();\n response.getWriter().println(\"Logged!!! your email address is: \" + email);\n request.getSession().setAttribute(\"email\", email);\n }\n } catch (Exception x) {\n log.log(Level.SEVERE, \"Error: \", x);\n }\n }" ]
[ "0.6305842", "0.6120249", "0.5892373", "0.5777072", "0.57048666", "0.55686474", "0.5350217", "0.5340865", "0.52894485", "0.5287112", "0.523509", "0.5189906", "0.51614547", "0.51289344", "0.510595", "0.5083046", "0.5073648", "0.5014892", "0.50093836", "0.4988297", "0.4934709", "0.49268553", "0.49227008", "0.48746458", "0.48448268", "0.48214933", "0.48145792", "0.48092273", "0.478722", "0.47358173", "0.47055963", "0.46876884", "0.4685959", "0.46712747", "0.465779", "0.4630987", "0.46248105", "0.46215314", "0.4615762", "0.4607562", "0.46005532", "0.45771554", "0.45719954", "0.45680976", "0.4567356", "0.45572245", "0.45495683", "0.45495468", "0.45387086", "0.45364258", "0.45242923", "0.45206556", "0.4506688", "0.4503042", "0.4495892", "0.44911587", "0.44907254", "0.44745812", "0.4471238", "0.44628495", "0.4452391", "0.44452652", "0.4438689", "0.44381848", "0.44280857", "0.441133", "0.44086766", "0.4391764", "0.4374259", "0.4372759", "0.43709236", "0.4369563", "0.4369013", "0.43678874", "0.4366391", "0.43634316", "0.43577275", "0.43574777", "0.43557772", "0.4352119", "0.4344827", "0.43438587", "0.43436724", "0.43377596", "0.43320814", "0.43279827", "0.43267316", "0.43221164", "0.43139005", "0.4298567", "0.42948186", "0.42942542", "0.42907846", "0.4272612", "0.42686296", "0.42674035", "0.42637163", "0.42603654", "0.42578027", "0.4249336" ]
0.77691734
0
Check for iap jwt header in incoming request
Jwt verifyJWTTokenForComputeEngine(HttpRequest request, long projectNumber, long backendServiceId) throws Exception { String jwtToken = request.getHeaders().getFirstHeaderStringValue("x-goog-iap-jwt-assertion"); if (jwtToken == null) { return null; } return verifyJWTToken(jwtToken, String.format("/projects/%s/global/backendServices/%s", Long.toUnsignedString(projectNumber), Long.toUnsignedString(backendServiceId))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getJwtFromRequest(HttpServletRequest request) {\n String authHeader = request.getHeader(jwtConfig.getAuthorizationHeader());\n System.out.println(\"auth header is :\" + authHeader);\n System.out.println(\"jwt token is being prepared\");\n if (authHeader != null && authHeader.startsWith(\"Bearer \")) {\n System.out.println(\"jwt token is valid\");\n return authHeader.replace(\"Bearer \", \"\");\n }else{\n System.out.println(\"jwt token is not valid and is null\");\n return null;\n }\n }", "@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}", "private String getJwt(HttpServletRequest request) {\n String authHeader = request.getHeader(\"Authorization\");\n if (authHeader != null && authHeader.startsWith(\"Bearer \")) {\n return authHeader.replace(\"Bearer \", \"\");\n }\n return null;\n }", "@Override\n protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {\n\n String header = httpServletRequest.getHeader(jwtConfig.getHeader());\n\n\n //if(header == null || !header.startsWith(jwtConfig.getPrefix())) {\n // filterChain.doFilter(httpServletRequest, httpServletResponse); \t\t// If not valid, go to the next filter.\n // return;\n // }\n\n\n try{\n String token = header.replace(jwtConfig.getPrefix(), \"\");\n String username = jwtUtils.extractUsername(token);\n\n System.out.println(username);\n\n if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {\n if (jwtUtils.validateToken(token)) {\n\n UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(username, null, null);\n usernamePasswordAuthenticationToken.setDetails(token);\n SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);\n System.out.println(username);\n }\n }\n\n }catch(Exception e){\n SecurityContextHolder.clearContext();\n }\n\n filterChain.doFilter(httpServletRequest, httpServletResponse);\n }", "private void doVerify(HttpServletRequest request, Object handler) throws AuthenticationException {\n\t\tString authorizationHeader = request.getHeader(HttpHeaders.AUTHORIZATION);\r\n\t\tlog.debug(\"#### authorizationHeader : \" + authorizationHeader);\r\n\r\n\t\t// Check if the HTTP Authorization header is present and formatted correctly\r\n\t\tif (authorizationHeader == null || authorizationHeader.isEmpty()) {\r\n\t\t\tlog.error(\"#### invalid authorizationHeader : \" + authorizationHeader);\r\n\t\t\tthrow new AuthenticationException(\"Authorization header must be provided\");\r\n\t\t}\r\n\r\n\t\t// Extract the token from the HTTP Authorization header\r\n\t\tString token = authorizationHeader.trim();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// Validate the token\r\n\t\t\tKey key = keyGenerator.generateKey();\r\n\t\t\tClaims claims = Jwts.parser().setSigningKey(key).parseClaimsJws(token).getBody();\r\n\t\t\tlog.debug(\"ID: \" + claims.getId());\r\n\t\t log.debug(\"Subject: \" + claims.getSubject());\r\n\t\t log.debug(\"Issuer: \" + claims.getIssuer());\r\n\t\t log.debug(\"Expiration: \" + claims.getExpiration());\r\n\t\t\tlog.debug(\"#### valid token : \" + token);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(\"#### invalid token : \" + token);\r\n\t\t\tthrow new AuthenticationException(\"Unauthorized\");\r\n\t\t}\r\n\r\n\t}", "public void filter(ContainerRequestContext request) throws IOException {\n\t\tString authorization = request.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n\t\t// We start by looking if we got an valid authorization header.\n\t\tif(authorization == null || !authorization.startsWith(\"Bearer \")) {\n\t\t\tthrow new NotAuthorizedException(\"Invalid JWT authorization header.\");\n\t\t}\n\n\t\t// If valid header, then we extract the token from the `Bearer`.\n\t\tauthorization = authorization.substring(\"Bearer \".length()).trim();\n\n\t\ttry {\n\t\t\t// We check if the key is parsing the signing.\n\t\t\tJwtGuard guard = (JwtGuard) this.guardProvider.get();\n\t\t\tguard.setToken(authorization);\n\n\t\t\trequest.setSecurityContext(guard);\n\n\t\t} catch (JWTException|InvalidCredentials e) {\n\t\t\t// If the signature is invalid, then we respond with an unauthorized.\n\t\t\tthrow new NotAuthorizedException(\"Invalid JWT token.\");\n\t\t}\n\n\t}", "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n String usuario = null, jwt = null;\n usuario = ((HttpServletRequest) request).getHeader(\"usuario\");\n jwt = ((HttpServletRequest) request).getHeader(\"jwt\");\n SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;\n Key signingKey = new SecretKeySpec(\"_DKt2FRF3Woq1Eub-cmRO24iHzxoWw7t2ZFuAG10zzX5K77Py82IZn6VNu_ZXbgi\".getBytes(), signatureAlgorithm.getJcaName());\n\n try {\n if(usuario != null && jwt != null){\n Jwts.parser().setSigningKey(signingKey).parseClaimsJws(jwt);\n }else{\n throw new SignatureException(\"No autenticado\");\n }\n //OK, we can trust this JWT\n } catch (SignatureException e) {\n ((HttpServletResponse)response).setStatus(403);\n try(ServletOutputStream out = response.getOutputStream()){\n out.println(\"{\\\"mensaje\\\":\\\"El usuario no está autenticado\\\"}\");\n }\n return;\n }\n chain.doFilter(request, response);\n }", "protected boolean filterJwt(final ContainerRequestContext requestContext, final String authHeader, final String authParam) {\n final JwtAuthentication jwtAuthentication = new JwtAuthentication();\n jwtAuthentication.setEncodedJwt(authParam);\n return filterAnyAuth(requestContext, authHeader, jwtAuthentication);\n }", "boolean isValid(String jwt);", "private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\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 interface OJwtHeader {\n\n public String getAlgorithm();\n\n public void setAlgorithm(String alg);\n\n public String getType();\n\n public void setType(String typ);\n\n public String getKeyId();\n\n public void setKeyId(String kid);\n\n}", "@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n String authorizationHeader = requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Check if the HTTP Authorization header is present and formatted correctly\n if (authorizationHeader == null || !authorizationHeader.startsWith(\"Bearer \")) {\n throw new NotAuthorizedException(\"Authorization header must be provided\");\n }\n\n // Extract the token from the HTTP Authorization header\n String token = authorizationHeader.substring(\"Bearer\".length()).trim();\n\n // Validate the token\n if (!userService.validateToken(token)) {\n requestContext.abortWith(Response.status(Response.Status.UNAUTHORIZED).build());\n }\n }", "private void parseJWT(String jwt, String apiKey) {\n\n //This line will throw an exception if it is not a signed JWS (as expected)\n Jws<Claims> claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(apiKey))\n .parseClaimsJws(jwt);\n // Claims claims = Jwts.parser()\n // .setSigningKey(DatatypeConverter.parseBase64Binary(apiKey))\n // .parseClaimsJws(jwt).getBody();\n\n System.out.println(claims);\n System.out.println(\"ID: \" + claims.getBody().getId());\n System.out.println(\"Subject: \" + claims.getBody().getSubject());\n System.out.println(\"Issuer: \" + claims.getBody().getIssuer());\n System.out.println(\"Expiration: \" + claims.getBody().getExpiration());\n }", "private boolean isTokenBasedAuthentication(String authorizationHeader) {\n return authorizationHeader != null && authorizationHeader.toLowerCase()\n .startsWith(AUTHENTICATION_SCHEME.toLowerCase());\n }", "private boolean isTokenBasedAuthentication(String authorizationHeader) {\n return authorizationHeader != null && authorizationHeader.toLowerCase()\n .startsWith(AUTHENTICATION_SCHEME.toLowerCase() + \" \");\n }", "private boolean isTokenBasedAuthentication(String authorizationHeader) {\n return authorizationHeader != null && authorizationHeader.toLowerCase()\n .startsWith(AUTHENTICATION_SCHEME.toLowerCase() + \" \");\n }", "private boolean isTokenBasedAuthentication(String authorizationHeader) {\n return authorizationHeader != null && authorizationHeader.toLowerCase()\n .startsWith(AUTHENTICATION_SCHEME.toLowerCase() + \" \");\n }", "@Override\n public boolean shouldApply(HttpServletRequest httpServletRequest) {\n boolean shouldApply = false;\n\n if (jwtProperties != null) {\n String serializedJWT = getJWTFromCookie(httpServletRequest);\n shouldApply = (serializedJWT != null && isAuthenticationRequired(serializedJWT));\n }\n\n return shouldApply;\n }", "@Override\r\n\tpublic Map<String, Claim> verifyJWT(String token) {\n\t\treturn null;\r\n\t}", "private String getToken(HttpServletRequest request){\n String header = request.getHeader(\"Authorization\");\n if(header != null && header.startsWith(\"Bearer\"))\n \t// Sacamos al bearer del token\n return header.replace(\"Bearer \", \"\");\n return null;\n }", "private boolean isValidToken(String authHeader) {\n AuthorisedTokenData token = authorisedTokensServices.getAuthorisedTokenByToken(authHeader);\n\n return token != null && token.getToken().equals(authHeader);\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 }", "@Test\n public void testGetJsonHeader() {\n System.out.println(\"getJsonHeader\");\n String expResult = \"{\\n\"\n + \" \\\"alg\\\": \\\"HS256\\\",\\n\"\n + \" \\\"typ\\\": \\\"JWT\\\"\\n\"\n + \"}\";\n String result = instance.getJsonHeader();\n assertEquals(expResult, result);\n }", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n // Get the Authorization header from the request\n String authorizationHeader =\n requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Validate the Authorization header\n if (!isTokenBasedAuthentication(authorizationHeader)) {\n abortWithUnauthorized(requestContext);\n return;\n }\n\n // Extract the token from the Authorization header\n String token = authorizationHeader\n .substring(AUTHENTICATION_SCHEME.length()).trim();\n\n try {\n\n // Validate the token\n Jws<Claims> claims = validateToken(token);\n ArrayList userGroups = getUserGroups(claims);\n Permissions[] perms = getPermissionsNeeded(requestContext);\n\n authorize(userGroups, perms);\n\n } catch (Exception e) {\n abortWithUnauthorized(requestContext);\n }\n }", "@Override\n public boolean filterAuthenticated(final ContainerRequestContext requestContext, final String authHeader) {\n if (authHeader.length() <= MAX_SIZE_AUTH_HEADER && goodAuths.getIfPresent(authHeader) != null) {\n // fast track - we have successfully authenticated this one before\n return false; // OK\n }\n\n // must have valid authentication - first, check allowed size (depending on method)\n final int firstSpace = authHeader.indexOf(' ');\n if (firstSpace <= 0) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n final String typeOfAuth = authHeader.substring(0, firstSpace + 1); // add 1 because the constant includes the space\n final String authParam = authHeader.substring(firstSpace + 1);\n final int authLength = authParam.length();\n\n try {\n switch (typeOfAuth) {\n case T9tConstants.HTTP_AUTH_PREFIX_JWT:\n if (!allowAuthJwt()) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n if (authLength < 10 || authLength > 4096) { // || !BASE64_PATTERN.matcher(authParam).matches()) {\n LOGGER.debug(\"Invalid JWT - length {}\", authLength);\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterJwt(requestContext, authHeader, authParam);\n case T9tConstants.HTTP_AUTH_PREFIX_API_KEY:\n if (!allowAuthApiKey() || authLength != 36 || !UUID_PATTERN.matcher(authParam).matches()) {\n LOGGER.debug(\"Invalid UUID - length {}\", authLength);\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterApiKey(requestContext, authHeader, authParam);\n case T9tConstants.HTTP_AUTH_PREFIX_USER_PW:\n if (!allowAuthBasic() || authLength < 8 || authLength > 80 || !BASE64_PATTERN.matcher(authParam).matches()) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterBasic(requestContext, authHeader, authParam);\n }\n } catch (final Throwable e) {\n LOGGER.warn(\"Caller caused exception: {}\", ExceptionUtil.causeChain(e));\n }\n throwForbidden(requestContext);\n return true; // filtered\n }", "@Test\n public void testNonexistentCredentialsHeader() {\n BigInteger id = IdUtil.next();\n\n String header = authHeaderBearer(id);\n\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "@Test\n void test() throws JoseException, InvalidJwtException, MalformedClaimException {\n JwtClaims claims = new JwtClaims();\n claims.setSubject(\"jokerr\");\n\n Key key = new HmacKey(Arrays.copyOf(\"secret\".getBytes(),32));\n\n JsonWebSignature jws = new JsonWebSignature();\n jws.setAlgorithmHeaderValue(AlgorithmIdentifiers.HMAC_SHA256);\n// jws.setHeader(\"typ\",\"JWT\");\n jws.setPayload(claims.toJson());\n jws.setKey(key);\n String token = jws.getCompactSerialization();\n\n System.out.println(\"atlatian/jose4j: \" + token);\n\n /*\n verify the token\n */\n JwtConsumer jwtConsumer = new JwtConsumerBuilder()\n .setVerificationKey(key)\n .build();\n\n JwtClaims jwtClaims = jwtConsumer.processToClaims(token);\n\n /*\n assert\n */\n assertEquals(\"jokerr\", jwtClaims.getSubject());\n }", "@Test\n public void testValidRequestHeaderPublic() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, false)\n .bearerToken()\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/public\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.OK.getStatusCode(), r.getStatus());\n }", "@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}", "@Test\n public void testValidRequestHeaderPublicNotPermitted() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.Implicit, false)\n .bearerToken()\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "private boolean isValidAuthentication(String authHeader) {\n return !StringUtils.isEmpty(authHeader);\n }", "@Test\n public void testValidRequestHeaderPrivate() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .bearerToken()\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.OK.getStatusCode(), r.getStatus());\n }", "private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}", "@Override\n\tprotected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,\n\t\t\tFilterChain filterChain) throws ServletException, IOException {\n\t\tfinal String header = httpServletRequest.getHeader(\"authorization\");\n\t\tif (\"OPTIONS\".equals(httpServletRequest.getMethod())) {\n\t\t\thttpServletResponse.setStatus(HttpServletResponse.SC_OK);\n\t\t} else {\n\t\t\tif (header == null || !header.startsWith(\"Bearer\")) {\n\t\t\t\tthrow new ServletException(\"Missing or Invalid authorization header\");\n\t\t\t}\n\t\t\tfinal String token = header.substring(7);\n\t\t\tfinal Claims claims = Jwts.parser().setSigningKey(\"secret\").parseClaimsJws(token).getBody();\n\t\t\thttpServletRequest.setAttribute(\"claims\", claims);\n\t\t}\n\t\tfilterChain.doFilter(httpServletRequest, httpServletResponse);\n\n\t}", "@Given(\"^API Headers are set$\")\n public void apiHeadersAreSet(){\n\n myRequest.contentType(ContentType.JSON)\n .baseUri(\"http://10.4.10.105/api/v1/\")\n .header(\"Auth-token\",\"ec6effac-7b12-4021-ba80-c682169cff60\");\n\n }", "Jwt verifyJWTTokenForAppEngine(HttpRequest request, long projectNumber, String projectId) throws Exception {\n // Check for iap jwt header in incoming request\n String jwtToken =\n request.getHeaders().getFirstHeaderStringValue(\"x-goog-iap-jwt-assertion\");\n if (jwtToken == null) {\n return null;\n }\n return verifyJWTToken(jwtToken, String.format(\"/projects/%s/apps/%s\",\n Long.toUnsignedString(projectNumber),\n projectId));\n }", "public boolean canHandle(HttpServletRequest request) {\n if (log.isDebugEnabled()) {\n log.debug(\"Inside Token2Authenticator canHandle method\");\n }\n return StringUtils.isNotEmpty(request.getParameter(Token2Constants.CODE));\n }", "@Test\n public void testValidRequestHeaderPrivateNotPermitted() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .bearerToken()\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/public\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "@Test\n public void testMalformedCredentialsHeader() {\n String header =\n authHeaderBearer(\"malformed_token\");\n\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "protected boolean filterApiKey(final ContainerRequestContext requestContext, final String authHeader, final String authParam) {\n final ApiKeyAuthentication apiKeyAuthentication = new ApiKeyAuthentication();\n apiKeyAuthentication.setApiKey(UUID.fromString(authParam));\n return filterAnyAuth(requestContext, authHeader, apiKeyAuthentication);\n }", "public boolean isValidToken(String jwt, String userId) {\n try {\n Claims claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(\"TerryLam\"))\n .parseClaimsJws(jwt).getBody();\n\n String jwtUserId = claims.get(\"userId\").toString();\n if (!jwtUserId.equals(userId)) {\n return false;\n } else {\n return true;\n }\n } catch (JwtException ex) {\n log.info(\"Error validating token. Exception Message \" + ex.getMessage());\n return false;\n }\n }", "@Test\n public void testInvalidBearerHeader() {\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, \"Bearer some_secluded_rendezvous\")\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\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\r\n\tpublic void filter(ContainerRequestContext requestContext) throws IOException {\n\t String authorizationHeader = \r\n\t requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\r\n\t \r\n\t // Check if the HTTP Authorization header is present and formatted correctly\r\n\t if (authorizationHeader != null && authorizationHeader.startsWith(\"Bearer \")) {\r\n\t \t\r\n\t \t//abgelaufene Tokens werden gelöscht\r\n\t \tsservice.deleteInvalidTokens();\r\n\t \t\r\n\t \t// Extract the token from the HTTP Authorization header\r\n\t \tString token = authorizationHeader.substring(\"Bearer\".length()).trim();\r\n\t \tif (validateToken(token) == true){\r\n\t \t\t\r\n\t \t\t//Get the user by this token\r\n\t \t User user = authService.getUserByToken(token);\r\n\t \t System.out.println(\"Nutzer: \" + user.toString());\r\n\t \t requestContext.setSecurityContext(new MySecurityContext(user));\r\n\t \t return;\r\n\t \t}\r\n\t }\r\n\t \r\n\t throw new UnauthorizedException(\"Client has to be logged in to access the ressource\");\r\n\t \r\n\t\t\r\n\t}", "@Override\n\tprotected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)\n\t\t\tthrows ServletException, IOException {\n\t\tfinal String authorizationHeader = request.getHeader(\"Authorization\"); // getting the header from the header name\n\t\t\n\t\tString username = null;\n\t\tString jwt = null;\n\t\t\n\t\ttry {\n\t\t\tif (authorizationHeader != null && authorizationHeader.startsWith(\"Bearer \")) {\n\t\t\t\tjwt = authorizationHeader.substring(7);\n\t\t\t\tusername = jwtUtil.extractUsername(jwt);\n\t\t\t}\n\t\t\t\n\t\t\t// if username is null and there is no already existing context in security context holder\n\t\t\tif (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {\n\t\t\t\tUserDetails userDetails = this.userDetailsService.loadUserByUsername(username);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"<----------------------------\"+userDetails.getAuthorities());\n\t\t\t\t\n\t\t\t\tif (jwtUtil.validateToken(jwt)) { // checking if the token still exist or has not expired\n\t\t\t\t\tUsernamePasswordAuthenticationToken upaToken = new UsernamePasswordAuthenticationToken(\n\t\t\t\t\t\t\tuserDetails, null, userDetails.getAuthorities());\n\t\t\t\t\tupaToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));\n\t\t\t\t\t\n\t\t\t\t\tSecurityContextHolder.getContext().setAuthentication(upaToken);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Can NOT set user authentication -> Message: {}\", e);\n\t\t}\n\t\t\n\t\tfilterChain.doFilter(request, response);\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}", "private boolean validarEInyectarAutorizacion(final HttpServletRequest request) {\n\t\tboolean autorizado = false;\n\t\tString header = request.getHeader(AUTH_HEADER);\n\t\tfor (Peticion peticion : SIN_AUTH) {\n\t\t\tif (peticion.match(request)) {\n\t\t\t\tautorizado = true;\n\t\t\t\tlog.info(\"Método: \"+peticion.metodo+\" url: \"+peticion.url);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!autorizado) {\n\t\t\t// Todos los demas servicios requieren que se envie la cadena Bearer\n\t\t\t// <token>\n//\t\t\tif (StringUtils.isNotBlank(header)) {\n\t\t\t\tif (verificarCredenciales(request)){\n\t\t\t\t\tautorizado = true;\n\t\t\t\t}\n//\t\t\t\tString[] tmpTokens = header.split(AUTH_BEARER);\n//\t\t\t\tif (tmpTokens.length == 2) {\n//\t\t\t\t\tString token = tmpTokens[1];\n//\t\t\t\t\tOptional<Identificacion> ident = validarToken(StringUtils.trimToEmpty(token));\n//\t\t\t\t\tif (ident.isPresent()) {\n//\t\t\t\t\t\trequestScope.setIdentificacion(ident.get());\n//\t\t\t\t\t\trequest.setAttribute(AUTH_KEY, ident.get());\n//\t\t\t\t\t}\n//\t\t\t\t\tautorizado = ident.isPresent();\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n\t\trequestScope.setIp(request.getRemoteAddr());\n\t\treturn autorizado;\n\t}", "@Test\n public void testPublicClientHeader() {\n ApplicationContext context =\n TEST_DATA_RESOURCE.getSecondaryApplication().getBuilder()\n .client(ClientType.AuthorizationGrant, false)\n .build();\n Client c = context.getClient();\n\n String header = authHeaderBearer(c.getId());\n\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "boolean hasRequestId();", "protected void doFilterInternal(HttpServletRequest request,HttpServletResponse response,FilterChain chain)throws ServletException,IOException {\n\t\tString header=request.getHeader(jwtConfig.getHeader());\n\t\t\n\t\t//2.validate the header and check the prefix\n\t\tif(header==null || !header.startsWith(jwtConfig.getPrefix())) {\n\t\t\tchain.doFilter(request, response); //if not valid go to the next filter\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//if there is no token provided and hence the user wont be authenticated\n\t\t//Its ok.May be user accessing a public path or asking for token.\n\t\t\n\t\t//All secured paths that needs a token are already defined and secured in config class\n\t\t//And if user tried to access without access token ,then he wont be authenticated and an exception will be thrown.\n\t\t\n\t\t//3.Get the token\n\t\tString token=header.replace(jwtConfig.getPrefix(),\"\");\n\t\t\n\t\t\n\t\ttry { // exceptions might be thrown in creating the claims if for example the token is expired\n\t\t\t\n\t\t\t//4.validate the token\n\t\t\t\n\t\t\tClaims claims=Jwts.parser().setSigningKey(jwtConfig.getSecret().getBytes()).parseClaimsJws(token).getBody();\n\t\t\t\n\t\t\tString userName=claims.getSubject();\n\t\t\tif(userName !=null) {\n\t\t\t\t\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<String> authorities=(List<String>)claims.get(\"authorities\");\n\t\t\t\t\n\t\t\t\t//5.Create auth object\n\t\t\t\t//UsernamePasswordAuthenticationToken : A build in object, used by spring to represent the current authenticated/being authenticated user.\n\t\t\t\t//It needs list of authorities,which has type of GrantedAuthority interface,where SimpleGrantedAuthority is an implementation of that interface.\n\t\t\t\tUsernamePasswordAuthenticationToken auth=new UsernamePasswordAuthenticationToken(userName,null,authorities.stream().map(SimpleGrantedAuthority:: new).collect(Collectors.toList()));\n\t\t\t\t\n\t\t\t\t//6.Authenticate the user\n\t\t\t\t//Now, user is authenticated\n\t\t\t\tSecurityContextHolder.getContext().setAuthentication(auth);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\t// In case of failure ,Make sure it is clear;so guarantee user wont be authenticated\n\t\t\tSecurityContextHolder.clearContext();\n\t\t}\n\t\t\n\t\t//go to the next filter in filter chain\n\t\tchain.doFilter(request, response);\n\t\t\n\t\t\n\t}", "public boolean hasReqHeaders() {\n return fieldSetFlags()[5];\n }", "boolean isSetHeader();", "AuthenticationTokenInfo authenticationTokenInfo(String headerToken);", "@Override\n\tpublic void validateHeader(RequestEntity<? extends LoginRequest> request) throws ApiException {\n\t\t\n\t}", "public boolean isHeaderParsed();", "boolean hasAuthKey();", "public boolean isExpiredToken(String jwt) {\n try {\n Claims claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(\"TerryLam\"))\n .parseClaimsJws(jwt).getBody();\n Date expiration = claims.getExpiration();\n //If the expiration Date is a time BEFORE the current time, it is expired\n if (expiration.before(new Date())) {\n return true;\n } else {\n return false;\n }\n } catch (JwtException ex) {\n log.info(\"Error validating token. Exception Message \" + ex.getMessage());\n return true;\n }\n }", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "default boolean hasHeader() {\n return true;\n }", "@Test\n public void testGetHeaders_whenServletRequestNoContainsHeaders() {\n\n MockHttpServletRequest request = new MockHttpServletRequest();\n Map<String, List<String>> expResult = new HashMap<>();\n\n HeadersService instance = new HeadersService();\n Map<String, List<String>> result = instance.getHeaders(request);\n assertEquals(expResult, result);\n }", "@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n String authorizationHeader =\n requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Validate the Authorization header\n if (!isTokenBasedAuthentication(authorizationHeader)) {\n abortWithUnauthorized(requestContext);\n return;\n }\n\n // Extract the token from the Authorization header\n String token = authorizationHeader\n .substring(AUTHENTICATION_SCHEME.length()).trim();\n\n try {\n // Check if the token is valid\n validateToken(token);\n\n //extract the data you need\n String username = Jwts.parser().setSigningKey(keyGenerator.getKey()).parseClaimsJws(token).getBody().getIssuer();\n if (username!=null) {\n final SecurityContext securityContext = requestContext.getSecurityContext();\n requestContext.setSecurityContext(new SecurityContext() {\n @Override\n public Principal getUserPrincipal() {\n return new Principal() {\n @Override\n public String getName() {\n return username;\n }\n };\n }\n @Override\n public boolean isUserInRole(String permission) {\n\n List<RoleEntity> roleEntities = userDao.getUserByUsername(username).getRoleEntityList();\n List<PermissionEntity> permissionEntities = new ArrayList<>();\n\n //creating the list containg all the permissionsAllowed\n for (RoleEntity r : roleEntities) {\n for (PermissionEntity p : r.getPermissionEntityList()) {\n if (!permissionEntities.contains(p)) {\n permissionEntities.add(p);\n }\n }\n\n }\n\n List<String> permissionStrings = new ArrayList<>();\n\n //getting all the types (description and id are not important)\n for (PermissionEntity p : permissionEntities) {\n permissionStrings.add(p.getType());\n }\n\n //returns true if the list contains the permission given as parameter\n for (String p : permissionStrings) {\n if (p.equals(permission)) {\n return true;\n }\n }\n return false;\n }\n @Override\n public boolean isSecure() {\n return true;\n }\n @Override\n public String getAuthenticationScheme() {\n return AUTHENTICATION_SCHEME;\n }\n });\n }\n //getting value from annotation\n Method resourceMethod = resourceInfo.getResourceMethod();\n Secured secured = resourceMethod.getAnnotation(Secured.class);\n if (secured != null){\n List<String> permissionStrings = new ArrayList<>();\n for (SecurityPermission s : secured.permissionsAllowed()) {\n permissionStrings.add(s.getText());\n }\n\n //performing authorization\n if (permissionStrings.size() > 0 && !isAuthenticated(requestContext)) {\n refuseRequest();\n }\n\n for (String role : permissionStrings) {\n if (requestContext.getSecurityContext().isUserInRole(role)) {\n return;\n }\n else {\n throw new AuthentificationException(ExceptionMessageCatalog.NOT_ALLOWED);\n }\n }\n\n refuseRequest();\n }\n } catch (AuthentificationException e) {\n abortWithUnauthorized(requestContext);\n }\n }", "@Test\n public void when_token_has_no_prefix_then_user_does_not_get_authentication() throws ServletException, IOException {\n test(\"eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.hZnl5amPk_I3tb4O-Otci_5XZdVWhPlFyVRvcqSwnDo_srcysDvhhKOD01DigPK1lJvTSTolyUgKGtpLqMfRDXQlekRsF4XhAjYZTmcynf-C-6wO5EI4wYewLNKFGGJzHAknMgotJFjDi_NCVSjHsW3a10nTao1lB82FRS305T226Q0VqNVJVWhE4G0JQvi2TssRtCxYTqzXVt22iDKkXeZJARZ1paXHGV5Kd1CljcZtkNZYIGcwnj65gvuCwohbkIxAnhZMJXCLaVvHqv9l-AAUV7esZvkQR1IpwBAiDQJh4qxPjFGylyXrHMqh5NlT_pWL2ZoULWTg_TJjMO9TuQ\",\n null);\n }", "private void checkHmac() {\n if (RequestUtils.requestAuthedWithHmac()) {\n throw new RuntimeException(\"HMAC auth not supported for POST requests\");\n }\n }", "@Test\n public void testInvalidAuthorizationHeader() {\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, \"Not A Valid header\")\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder();", "private JwtHeaderAssertion createJwtHeaderAssertion(String jwtKeyId) {\n log.info(\"Entering createJwtHeaderAssertion\");\n JwtHeaderAssertion jwtHeaderAssertion = new JwtHeaderAssertion();\n jwtHeaderAssertion.setAlg(\"RS256\");\n jwtHeaderAssertion.setTyp(\"jwt\");\n jwtHeaderAssertion.setKid(jwtKeyId);\n\n return jwtHeaderAssertion;\n }", "private HttpHeaders getHeaders(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 HttpHeaders httpHeaders = new HttpHeaders();\r\n httpHeaders.set(\"Authorization\", jwtUtils.generateToken(userDetails));\r\n return httpHeaders;\r\n }", "public static boolean isRequestHeader(SIPHeader sipHeader) {\n return sipHeader instanceof AlertInfo ||\n sipHeader instanceof InReplyTo ||\n sipHeader instanceof Authorization ||\n sipHeader instanceof MaxForwards ||\n \tsipHeader instanceof UserAgent ||\n sipHeader instanceof Priority ||\n sipHeader instanceof ProxyAuthorization ||\n sipHeader instanceof ProxyRequire ||\n sipHeader instanceof ProxyRequireList ||\n sipHeader instanceof Route ||\n sipHeader instanceof RouteList ||\n sipHeader instanceof Subject ;\n \n }", "protected Optional<RSAPublicKey> extractKeyFromRequest(Request request) throws Http4xx {\n Optional<RSAPublicKey> keyFromAccept = this.extractKeyFromAcceptHeader(request);\n if (keyFromAccept.isPresent()) {\n return keyFromAccept;\n }\n Optional<RSAPublicKey> keyFromAuth = this.extractKeyFromAuthorizationHeader(request);\n if (keyFromAuth.isPresent()) {\n return keyFromAuth;\n }\n return Optional.empty();\n }", "Jwt verifyJWTToken(String jwtToken, String expectedAudience) throws Exception {\n Jwt jwt =\n Jwts.parser()\n .setSigningKeyResolver(resolver)\n .requireAudience(expectedAudience)\n .requireIssuer(IAP_ISSUER_URL)\n .parse(jwtToken);\n DefaultClaims claims = (DefaultClaims) jwt.getBody();\n if (claims.getSubject() == null) {\n throw new Exception(\"Subject expected, not found.\");\n }\n if (claims.get(\"email\") == null) {\n throw new Exception(\"Email expected, not found.\");\n }\n return jwt;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"petalier_session_token\", PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\"));\n//\n// if (!PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\").isEmpty()){\n// headers.put(\"Session-Token\", PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\"));\n// }\n\n return headers;\n }", "private UsernamePasswordAuthenticationToken getAuthtication(HttpServletRequest request){\n // Get token from request header.\n String token = request.getHeader(\"Authorization\");\n if (token != null){\n //Get the username from the jwt token\n String username = JwtUtil.getUsernameByToken(token);\n //Check the existence of the username.\n Optional<User> userTry = userRepository.findByUsername(username);\n Collection<GrantedAuthority> authorities = new ArrayList<>();\n if (userTry.isPresent()){\n User user = userTry.get();\n authorities.add(new SimpleGrantedAuthority(user.getRole().getName()));\n return new UsernamePasswordAuthenticationToken(user,token,authorities);\n }\n }\n return null;\n }", "private JwtConsumer validateRequestJwt(VerificationKeyResolver resolver)\n {\n return new JwtConsumerBuilder()\n .setRequireExpirationTime() //requires expiration time\n .setRequireIssuedAt()\n .setRequireJwtId()\n .setExpectedAudience(requestJwtAudience != null && StringUtils.isNotEmpty(requestJwtAudience), requestJwtAudience)\n .setVerificationKeyResolver(resolver) // Verify the signature\n .setJwsAlgorithmConstraints(signatureConstraint)// Restrict the list of allowed signing algorithms\n .build();\n }", "void verifyCSRFToken(HttpServletRequest request) throws IntrusionException;", "@java.lang.Override\n public boolean hasToken() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "@Override\n protected void doFilterInternal(HttpServletRequest httpRequest, HttpServletResponse httpResponse, FilterChain chain) throws ServletException, IOException {\n String requestURI = httpRequest.getRequestURI();\n if (isPubicRequest(requestURI)) {\n chain.doFilter(httpRequest, httpResponse);\n return;\n }\n String token = httpRequest.getHeader(HttpHeaders.AUTHORIZATION);\n try {\n if (StringUtils.isEmpty(token)) {\n throw new TokenInvalidException(\"E04\", \"token is empty!\");\n }\n verifyService.verifyLoginToken(token);\n } catch (Exception e) {\n resolver.resolveException(httpRequest, httpResponse, null, e);\n return;\n }\n\n chain.doFilter(httpRequest, httpResponse);\n }", "@GetMapping(\"/validate\")\n\tpublic ResponseEntity<?> getValidity(@RequestHeader(\"Authorization\") String jwtToken) {\n\t\treturn new ResponseEntity<AuthResponse>(this.service.validate(jwtToken) , HttpStatus.OK);\n\t}", "@Override\n protected void doFilterInternal(HttpServletRequest httpServletRequest,\n HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {\n try {\n String jwt = getJwt(httpServletRequest);\n String phone = jwtProvider.getUserNameFormJwtToken(jwt);\n if (jwt != null && jwtProvider.validateJwtToken(jwt)) {\n MyUser user = (MyUser) customUserDetailService.loadUserByUsername(phone);\n UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(\n user, null, user.getAuthorities());\n usernamePasswordAuthenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(httpServletRequest));\n SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);\n }\n\n } catch (Exception e) {\n logger.error(\"can not set authentication error ->\", e.getMessage());\n }\n filterChain.doFilter(httpServletRequest, httpServletResponse);\n }", "@Override\n public boolean containsHeader(String arg0) {\n return false;\n }", "@Override\n\t\tpublic void intercept(RequestInterceptor.RequestFacade request) {\n\t\t\trequest.addQueryParam(\"key\", mKey);\n\n\t\t\t// We need to use token for auth, since user might change password, then token is invalidated and user needs to log in again\n\t\t\t// For creating user, the endpoint can ignore Authorization\n\t\t\t//Assert.assertFalse(TextUtils.isEmpty(mToken));\n\t\t\trequest.addHeader(\"Username\", mAccountUtils.getUsername());\n\t\t\trequest.addHeader(\"Authorization\", mAccountUtils.getToken());\n\t\t\trequest.addHeader(\"User-Agent\", \"gzip\");\n\t\t\trequest.addHeader(\"Accept-Encoding\", \"gzip\");\n\t\t}", "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}", "boolean hasHeader();", "@Override\n public String getHeader(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return getAuthorizationHeader();\n } else {\n return super.getHeader(name);\n }\n }", "@Test\n public void testBadPasswordHeader() {\n ApplicationContext context =\n TEST_DATA_RESOURCE.getSecondaryApplication().getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .build();\n Client c = context.getClient();\n\n String header = authHeaderBearer(c.getId());\n\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "@Override\n public void filter(final ContainerRequestContext requestContext) throws IOException {\n final String authToken = requestContext.getHeaders().getFirst(\"authToken\");\n\n if (StringUtils.isBlank(authToken)) {\n throw unauthorizedWebException();\n }\n\n try {\n // authenticate using token to get principle\n final Optional<P> principal = authenticator.authenticate(authToken);\n\n // set security context on request\n if (principal.isPresent()) {\n setSecurityContextOnRequest(requestContext, principal);\n return;\n }\n } catch (AuthenticationException e) {\n LOGGER.warn(\"Error authenticating credentials\", e);\n throw unauthorizedWebException();\n }\n\n throw unauthorizedWebException();\n }", "@Service\npublic interface JwtTokenService {\n\n /**\n * Returns a Json Web Token generated out of the provided userDetails\n * @param uerDetails\n * @return a JWT string\n */\n String convertToJwt (SsoUserDetails uerDetails);\n\n /**\n * Checks whether the provided Json Web Token is a valid Token and if it is not expired\n * @param jwt\n * @return true if JWT is a valid Json Web Token and the expiration time is not reached yet\n */\n boolean isValid(String jwt);\n}", "public static boolean validateRequest(HttpHeaders headers) {\n\t\t\n\t\tif (headers == null) return false;\n\t\t\n\t\t// Get detail from request headers\n\t\tList<String> keyList = headers.getRequestHeader(\"Authorization\");\n\t\tString authKey = \"\";\n\t\tif(keyList != null){\n\t\t\tauthKey = keyList.get(0).toString();\n\t\t}\n\n\t\tString validAuthKey = getAuthorizationKey();\n\n\t\tif (authKey.equals(validAuthKey)){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private boolean inspectHeader() throws UrlCacheException {\n\n\t\tif(header.contains(\"HTTP/1.1 2\")){\n\t\t\treturn true;\n\t\t}\n\t\telse if(header.contains(\"HTTP/1.1 304\"))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tthrow new UrlCacheException();\n\t\t\n\t}", "@Override\n\tpublic boolean checkAuthorization(HttpServletRequest request) {\n\t\treturn true;\n\t}", "boolean hasJsonReqMsg();", "public boolean updatePolicyHeader(HttpServletRequest request, PolicyHeader policyHeader) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"updatePolicyHeader\", new Object[]{policyHeader});\r\n }\r\n\r\n boolean hasRisk = true;\r\n\r\n try {\r\n //Try to load risk header\r\n String riskId = request.getParameter(RequestIds.RISK_ID);\r\n // If the riskId is not specified, the first riskId is loaded.\r\n policyHeader = getRiskManager().loadRiskHeader(policyHeader, riskId);\r\n }\r\n catch (AppException ae) {\r\n hasRisk = false;\r\n }\r\n\r\n if (policyHeader.hasRiskHeader()) {\r\n //Load the coverage header if coverageId is existing in the request.\r\n String coverageId = request.getParameter(RequestIds.COVERAGE_ID);\r\n if (coverageId != null && Long.parseLong(coverageId) > 0) {\r\n policyHeader = getCoverageManager().loadCoverageHeader(policyHeader, coverageId);\r\n }\r\n }\r\n\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"updatePolicyHeader\", hasRisk);\r\n }\r\n return hasRisk;\r\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(Keys.Authorization,\"Bearer \"+TripManagement.readValueFromPreferences(getActivity(),\"accesstoken\",\"\"));\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Authorization\", loggedInUser.getToken_type()+\" \"+loggedInUser.getAccess_token());\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"Accept\", \"application/json\");\n return headers;\n }", "private HttpHeaders getHeaders(String token) {\r\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtil.extractEmail(token));\r\n userDetails.setClientType(ClientType.valueOf((String) jwtUtil.extractAllClaims(token).get(\"clientType\")));\r\n HttpHeaders httpHeaders = new HttpHeaders();\r\n httpHeaders.set(\"Authorization\", jwtUtil.generateToken(userDetails));\r\n return httpHeaders;\r\n }", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "@Given(\"^Header values for the api$\")\n\tpublic void header_values_for_the_api() throws Throwable {\n\t\tRestAssured.useRelaxedHTTPSValidation();\n\t\trequest.given()\n .contentType(ContentType.JSON)\n .baseUri(\"https://jsonplaceholder.typicode.com\");\n\t // throw new PendingException();\n\t}", "@Test\n public void testJwtIsUsedInTokenKeyEndPoint() throws Exception {\n ResultActions result = this.mockMvc\n .perform(MockMvcRequestBuilders.get(\"/oauth/token_key\")\n .principal(new UsernamePasswordAuthenticationToken(testClientId, \"\",\n Arrays.asList(new SimpleGrantedAuthority(\"ROLE_USER\")))))\n // we expect a 200 success\n .andExpect(MockMvcResultMatchers.status().is(200));\n Map<?, ?> tokenKey = new ObjectMapper().readValue(result.andReturn().getResponse().getContentAsString(),\n Map.class);\n System.out.println(\"Got response: \" + result.andReturn().getResponse().getContentAsString());\n Assert.assertEquals(tokenKey.get(\"value\"), TestJWTConfig.SignKey);\n }", "@Override\n public boolean containsHeader(String name) {\n return this._getHttpServletResponse().containsHeader(name);\n }" ]
[ "0.6939411", "0.6480974", "0.64763653", "0.6356311", "0.6317664", "0.61978275", "0.6175107", "0.611039", "0.6107036", "0.60605025", "0.60205334", "0.60117245", "0.60112536", "0.5963452", "0.59574306", "0.5921702", "0.5921702", "0.5921702", "0.5862524", "0.5828808", "0.5819661", "0.58090127", "0.580164", "0.5795902", "0.57795864", "0.5766034", "0.5759819", "0.5754565", "0.5730671", "0.57081586", "0.5669984", "0.5667479", "0.5657086", "0.5642258", "0.563508", "0.5597234", "0.5592832", "0.55870754", "0.5585294", "0.55742186", "0.55664265", "0.5556841", "0.5538544", "0.5520323", "0.5504715", "0.5480556", "0.54671854", "0.5439651", "0.54357207", "0.5423703", "0.54232067", "0.5410049", "0.53975075", "0.53964186", "0.5393154", "0.53927475", "0.5386871", "0.53855896", "0.53477377", "0.5338565", "0.53148246", "0.5310567", "0.52954906", "0.5294794", "0.5291677", "0.52878505", "0.5283161", "0.52643454", "0.52596897", "0.52431554", "0.5234288", "0.5234087", "0.5231715", "0.52284944", "0.5228202", "0.5227721", "0.5226315", "0.52064025", "0.519711", "0.5193463", "0.5190911", "0.5183982", "0.5180823", "0.5179674", "0.5174046", "0.5173253", "0.51660126", "0.51643795", "0.5158724", "0.51517504", "0.51409775", "0.5133529", "0.51231015", "0.5122308", "0.5121251", "0.51164293", "0.5109466", "0.51049966", "0.5101767", "0.510032", "0.5097155" ]
0.0
-1
Time constraints are automatically checked, use setAllowedClockSkewSeconds to specify a leeway window The token was issued in a past date "iat" TODAY
Jwt verifyJWTToken(String jwtToken, String expectedAudience) throws Exception { Jwt jwt = Jwts.parser() .setSigningKeyResolver(resolver) .requireAudience(expectedAudience) .requireIssuer(IAP_ISSUER_URL) .parse(jwtToken); DefaultClaims claims = (DefaultClaims) jwt.getBody(); if (claims.getSubject() == null) { throw new Exception("Subject expected, not found."); } if (claims.get("email") == null) { throw new Exception("Email expected, not found."); } return jwt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Duration getTokenExpiredIn();", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "public boolean validateAgeOfTheToken(Date issuedAtTime, long currentTimeInMillis, long timeStampSkewMillis) throws\n IdentityOAuth2Exception {\n if (issuedAtTime == null) {\n return true;\n }\n if (notAcceptBeforeTimeInMins > 0) {\n long issuedAtTimeMillis = issuedAtTime.getTime();\n long rejectBeforeMillis = 1000L * 60 * notAcceptBeforeTimeInMins;\n if (currentTimeInMillis + timeStampSkewMillis - issuedAtTimeMillis >\n rejectBeforeMillis) {\n String logMsg = getTokenTooOldMessage(currentTimeInMillis, timeStampSkewMillis, issuedAtTimeMillis, rejectBeforeMillis);\n return logAndReturnFalse(logMsg);\n }\n }\n return true;\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 }", "Optional<Instant> getTokenInvalidationTimestamp();", "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 setTokenValidityInSeconds(long tokenValidityInSeconds) {\n this.tokenValidityInSeconds = tokenValidityInSeconds;\n }", "@Override\n public void handleTokenExpiration(){\n JWTToken.removeTokenSharedPref(this);\n }", "@Test\n public void testExpiredToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .token(OAuthTokenType.Bearer, true, null, null, null)\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "private String getTokenTooOldMessage(long currentTimeInMillis, long timeStampSkewMillis, long issuedAtTimeMillis, long rejectBeforeMillis) {\n StringBuilder tmp = new StringBuilder();\n tmp.append(\"JSON Web Token is issued before the allowed time.\");\n tmp.append(\" Issued At Time(ms) : \");\n tmp.append(issuedAtTimeMillis);\n tmp.append(\", Reject before limit(ms) : \");\n tmp.append(rejectBeforeMillis);\n tmp.append(\", TimeStamp Skew : \");\n tmp.append(timeStampSkewMillis);\n tmp.append(\", Current Time : \");\n tmp.append(currentTimeInMillis);\n tmp.append(\". JWT Rejected and validation terminated\");\n return tmp.toString();\n }", "private boolean hasCoolOffPeriodExpired(Jwt jwt) {\n\n Date issuedAtTime = jwt.getClaimsSet().getIssuedAtTime();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.set(Calendar.MILLISECOND, 0);\n calendar.add(Calendar.MINUTE, -1);\n\n return calendar.getTime().compareTo(issuedAtTime) > 0;\n }", "public Integer getAccessTokenValiditySeconds() {\n return accessTokenValiditySeconds;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "public boolean checkJTIValidityPeriod(String jti, long jwtExpiryTimeMillis, long currentTimeInMillis,\n long timeStampSkewMillis) throws IdentityOAuth2Exception {\n if (currentTimeInMillis + timeStampSkewMillis > jwtExpiryTimeMillis) {\n return logAndReturnTrue(\"JWT Token with jti: \" + jti + \"has been reused after the allowed expiry time:\"\n + jwtExpiryTimeMillis);\n } else {\n return logAndReturnFalse(\"JWT Token with jti: \" + jti + \" Has been replayed before the allowed expiry time:\"\n + jwtExpiryTimeMillis);\n }\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }", "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 }", "long getExpiration();", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "public static long getAccessTokenLifeTimeInSeconds(OAuthAppDO oAuthAppDO) {\n\n long lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime();\n if (lifetimeInSeconds == 0) {\n lifetimeInSeconds = OAuthServerConfiguration.getInstance()\n .getUserAccessTokenValidityPeriodInSeconds();\n if (log.isDebugEnabled()) {\n log.debug(\"User access token time was 0ms. Setting default user access token lifetime : \"\n + lifetimeInSeconds + \" sec.\");\n }\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"JWT Self Signed Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n return lifetimeInSeconds;\n }", "public boolean checkNotBeforeTime(Date notBeforeTime, long currentTimeInMillis, long timeStampSkewMillis) throws\n IdentityOAuth2Exception {\n if (notBeforeTime == null) {\n return true;\n }\n long notBeforeTimeMillis = notBeforeTime.getTime();\n return currentTimeInMillis + timeStampSkewMillis >= notBeforeTimeMillis ||\n logAndReturnFalse(\"NotBeforeTime check is failed. Token is used before the intended time.\");\n }", "public static long getAccessTokenLifeTimeInSeconds(OAuthTokenReqMessageContext tokenReqMessageContext,\n OAuthAppDO oAuthAppDO) throws IdentityOAuth2Exception {\n\n long lifetimeInSeconds;\n boolean isUserAccessTokenType =\n isUserAccessTokenType(tokenReqMessageContext.getOauth2AccessTokenReqDTO().getGrantType());\n\n if (isUserAccessTokenType) {\n lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime();\n if (log.isDebugEnabled()) {\n log.debug(\"User Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n } else {\n if (tokenReqMessageContext.getValidityPeriod() == -1) { // the token request does not specify the validity period explicitly\n lifetimeInSeconds = oAuthAppDO.getApplicationAccessTokenExpiryTime();\n } else { // set the expiry time sent in the request\n lifetimeInSeconds = getSecondsTillExpiry(tokenReqMessageContext.getValidityPeriod());\n }\n if (log.isDebugEnabled()) {\n log.debug(\"Application Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n }\n\n if (lifetimeInSeconds == 0) {\n if (isUserAccessTokenType) {\n lifetimeInSeconds =\n OAuthServerConfiguration.getInstance().getUserAccessTokenValidityPeriodInSeconds();\n if (log.isDebugEnabled()) {\n log.debug(\"User access token time was 0ms. Setting default user access token lifetime : \"\n + lifetimeInSeconds + \" sec.\");\n }\n } else {\n lifetimeInSeconds =\n OAuthServerConfiguration.getInstance().getApplicationAccessTokenValidityPeriodInSeconds();\n if (log.isDebugEnabled()) {\n log.debug(\"Application access token time was 0ms. Setting default Application access token \" +\n \"lifetime : \" + lifetimeInSeconds + \" sec.\");\n }\n }\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"JWT Self Signed Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n return lifetimeInSeconds;\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 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 }", "public Token() {\n mTokenReceivedDate = new Date();\n }", "@Test\n @Ignore\n public void testJWTGeneration() throws Exception {\n JWTGenerator jwtGen = new JWTGenerator() {\n @Override\n public Map<String, String> convertClaimMap(Map<ClaimMapping, String> userAttributes, String username) {\n return new HashMap<>();\n }\n };\n APIKeyValidationInfoDTO dto=new APIKeyValidationInfoDTO();\n dto.setSubscriber(\"sastry\");\n dto.setApplicationName(\"hubapp\");\n dto.setApplicationId(\"1\");\n dto.setApplicationTier(\"UNLIMITED\");\n dto.setEndUserName(\"denis\");\n dto.setSubscriberTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);\n dto.setUserType(APIConstants.ACCESS_TOKEN_USER_TYPE_APPLICATION);\n TokenValidationContext validationContext = new TokenValidationContext();\n validationContext.setValidationInfoDTO(dto);\n validationContext.setContext(\"cricScore\");\n validationContext.setVersion(\"1.9.0\");\n String token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n String header = token.split(\"\\\\.\")[0];\n String decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n String body = token.split(\"\\\\.\")[1];\n String decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n // With end user name not included\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n dto.setUserType(APIConstants.SUBSCRIPTION_USER_TYPE);\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n //we can not do assert eaquals because body includes expiration time.\n\n /*String expectedHeader = \"{\\\"typ\\\":\\\"JWT\\\"}\";\n String expectedBody = \"{\\\"iss\\\":\\\"wso2.org/products/am\\\", \\\"exp\\\":1349270811075, \" +\n \"\\\"http://wso2.org/claims/subscriber\\\":\\\"sastry\\\", \" +\n \"\\\"http://wso2.org/claims/applicationname\\\":\\\"hubapp\\\", \" +\n \"\\\"http://wso2.org/claims/apicontext\\\":\\\"cricScore\\\", \" +\n \"\\\"http://wso2.org/claims/version\\\":\\\"1.9.0\\\", \" +\n \"\\\"http://wso2.org/claims/tier\\\":\\\"Bronze\\\", \" +\n \"\\\"http://wso2.org/claims/enduser\\\":\\\"denis\\\"}\";\n\n Assert.assertEquals(expectedHeader, decodedHeader);\n Assert.assertEquals(expectedBody, decodedBody);*/\n //String decodedToken = new String(Base64Utils.decode(token));\n //log.info(decodedToken);\n //assertNotNull(decodedToken);\n\n\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 }", "public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }", "@ParameterizedTest\n @EnumSource(KeyType.class)\n void testDateExpiration(KeyType keyType) throws NoSuchAlgorithmException {\n final KeyPair keyPair = APIAuthHelpers.generateKeyPair(keyType);\n\n final Map<String, Object> claims = new HashMap<>();\n claims.put(\"exp\", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(Instant.now().atOffset(ZoneOffset.UTC)));\n\n final String id = UUID.randomUUID().toString();\n final String jwt = Jwts.builder()\n .setHeaderParam(\"kid\", UUID.randomUUID())\n .setAudience(String.format(\"%sToken/auth\", \"here\"))\n .setIssuer(id)\n .setSubject(id)\n .setId(id)\n .addClaims(claims)\n .signWith(keyPair.getPrivate(), APIAuthHelpers.getSigningAlgorithm(keyType))\n .compact();\n\n // Submit the JWT\n Response response = RESOURCE.target(\"/v1/Token/validate\")\n .request()\n .accept(MediaType.APPLICATION_JSON)\n .post(Entity.entity(jwt, MediaType.TEXT_PLAIN));\n\n assertEquals(400, response.getStatus(), \"Should not be valid\");\n assertTrue(response.readEntity(String.class).contains(\"Expiration time must be seconds since unix epoch\"), \"Should have correct exception\");\n }", "protected void setTokenExpirationTime(MendeleyOAuthToken token,\r\n\t\t\tSortedSet<String> responseParameters) {\r\n\t\tif (responseParameters != null && !responseParameters.isEmpty()) {\r\n\t\t\tCalendar calendar = Calendar.getInstance();\r\n\t\t\tint secondsToLive = Integer.valueOf(responseParameters.first());\r\n\t\t\tcalendar.add(Calendar.SECOND, secondsToLive);\r\n\t\t\ttoken.setExpirationTime(calendar.getTime());\r\n\t\t}\r\n\t}", "LocalDateTime getExpiration(K key);", "public void setTokenValidityInSecondsForRememberMe(long tokenValidityInSecondsForRememberMe) {\n this.tokenValidityInSecondsForRememberMe = tokenValidityInSecondsForRememberMe;\n }", "public void clearExpiredTokens();", "@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 }", "@ParameterizedTest\n @EnumSource(KeyType.class)\n void testOverlongJWT(KeyType keyType) throws NoSuchAlgorithmException {\n final KeyPair keyPair = APIAuthHelpers.generateKeyPair(keyType);\n\n final String id = UUID.randomUUID().toString();\n final String jwt = Jwts.builder()\n .setHeaderParam(\"kid\", UUID.randomUUID())\n .setAudience(String.format(\"%sToken/auth\", \"here\"))\n .setIssuer(id)\n .setSubject(id)\n .setId(id)\n .setExpiration(Date.from(Instant.now().plus(12, ChronoUnit.MINUTES)))\n .signWith(keyPair.getPrivate(), APIAuthHelpers.getSigningAlgorithm(keyType))\n .compact();\n\n // Submit the JWT\n Response response = RESOURCE.target(\"/v1/Token/validate\")\n .request()\n .accept(MediaType.APPLICATION_JSON)\n .post(Entity.entity(jwt, MediaType.TEXT_PLAIN));\n\n assertEquals(400, response.getStatus(), \"Should not be valid\");\n assertTrue(response.readEntity(String.class).contains(\"Token expiration cannot be more than 5 minutes in the future\"), \"Should have correct exception\");\n }", "private Map<String, Object> generateJWTToken(Customer user) {\n long timestamp = System.currentTimeMillis();\n String token = Jwts.builder().signWith(SignatureAlgorithm.HS256, Constant.API_SECRET_KEY)\n .setIssuedAt(new Date(timestamp))\n .setExpiration(new Date(timestamp + Constant.TOKEN_VALIDITY))\n .claim(\"userId\", user.getId())\n// .claim(\"email\", user.getEmail())\n// .claim(\"password\", user.getPassword())\n .compact();\n Map<String, Object> map = new HashMap();\n map.put(\"token\", token);\n map.put(\"customer\", user);\n return map;\n\t}", "private Boolean ignoreTokenExpiration(String token) {\n return false;\r\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 }", "protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\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 }", "boolean isAuthorizerAccessTokenExpired(String appId);", "public boolean validateExpirationTime(Date expirationTime, long currentTimeInMillis,\n long timeStampSkewMillis) throws IdentityOAuth2Exception {\n long expirationTimeInMillis = expirationTime.getTime();\n if ((currentTimeInMillis + timeStampSkewMillis) > expirationTimeInMillis) {\n return logAndReturnFalse(\"JSON Web Token is expired. Expiration Time(ms) : \" + expirationTimeInMillis + \". JWT Rejected and validation terminated\");\n }\n return logAndReturnTrue(\"Expiration Time(exp) of JWT was validated successfully.\");\n }", "public interface TokenInvalidator {\n C0117M invalidateAccessToken();\n}", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "@Override\n public void onTokenRefresh() {\n }", "public int getContainerTokenExpiryInterval() {\n return containerTokenExpiryInterval;\n }", "WithCreate withSecurityToken(SourceControlSecurityTokenProperties securityToken);", "private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }", "public void setAccessTokenValiditySeconds(int accessTokenValiditySeconds) {\n this.accessTokenValiditySeconds = accessTokenValiditySeconds;\n }", "Observable<Session> getByValidMFAToken(String token, Date now);", "public void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds) {\n this.accessTokenValiditySeconds = accessTokenValiditySeconds;\n }", "long getExpirationDate();", "public long getTokenExpirationInMillis() {\n return tokenExpirationInMillis;\n }", "private \n void setTimerForTokenRenewal(DelegationTokenToRenew token, \n boolean firstTime) throws IOException {\n \n // calculate timer time\n long now = System.currentTimeMillis();\n long renewIn;\n if(firstTime) {\n renewIn = now;\n } else {\n long expiresIn = (token.expirationDate - now); \n renewIn = now + expiresIn - expiresIn/10; // little bit before the expiration\n }\n \n // need to create new task every time\n TimerTask tTask = new RenewalTimerTask(token);\n token.setTimerTask(tTask); // keep reference to the timer\n\n renewalTimer.schedule(token.timerTask, new Date(renewIn));\n }", "@Test\n public void should_recognize_if_adversary_obtained_authenticator_from_untrusted_device_and_tried_to_change_expiry_date() throws SignatureException {\n final IUserProvider up = getInstance(IUserProvider.class);\n up.setUsername(UNIT_TEST_USER, getInstance(IUser.class));\n final User currUser = getInstance(IUserProvider.class).getUser();\n\n // first session is from trusted device\n constants.setNow(dateTime(\"2015-04-23 11:00:00\"));\n coSession.newSession(currUser, true, null);\n\n // second session from untrusted device, and this is the device where the authenticator gets stolen from\n constants.setNow(dateTime(\"2015-04-23 13:00:00\"));\n final UserSession newSession = coSession.newSession(currUser, false, null);\n\n // let's fabricate a fraudulent authenticator\n final String fraudulentAuthenticator = newSession.getAuthenticator().get().username + Authenticator.AUTHENTICATOR_SEPARATOR +\n newSession.getAuthenticator().get().seriesId + Authenticator.AUTHENTICATOR_SEPARATOR +\n // tries to move expiration time into the future\n (constants.now().plusMinutes(15).getMillis()) + Authenticator.AUTHENTICATOR_SEPARATOR +\n newSession.getAuthenticator().get().hash;\n\n\n // now let's move the clock 7 minutes forward to emulate a time change and request a current session with fraudulent authenticator\n // that as far as the adversary is concerned should still be valid due to the performed time manipulation\n constants.setNow(dateTime(\"2015-04-23 13:07:00\"));\n final Optional<UserSession> session = coSession.currentSession(currUser, fraudulentAuthenticator, false);\n assertFalse(session.isPresent());\n\n // additionally, let's also check that all sessions for a compromised user have been removed, but not the sessions for other users\n final EntityResultQueryModel<UserSession> currUserSessions = select(UserSession.class).where().prop(\"user\").eq().val(currUser).model();\n final EntityResultQueryModel<UserSession> otherSessions = select(UserSession.class).where().prop(\"user\").ne().val(currUser).model();\n\n assertEquals(0, coSession.count(currUserSessions));\n assertEquals(2, coSession.count(otherSessions));\n }", "String generateUnitRenewalToken(Unit unit, Instant expiration);", "int getSignOnTime();", "protected boolean generateIdTokenOnRefreshRequest() {\n\t\treturn true;\n\t}", "public String generateRefreshToken(ApplicationUser user) {\n Date expiryDate = java.sql.Date.valueOf(LocalDate.now().plusDays(jwtConfig.getRefreshExpirationDateInMs()));\n return Jwts.builder()\n .setSubject(user.getUser().getUsername())\n .claim(\"authorities\", user.getAuthorities())\n .setIssuedAt(new Date(System.currentTimeMillis()))\n .setExpiration(expiryDate)\n .signWith(jwtSecretKey.secretKey())\n .compact();\n }", "private static void setTimerForTokenRenewal(\n DelegationTokenToRenew token, boolean firstTime) {\n \n // calculate timer time\n long now = System.currentTimeMillis();\n long renewIn;\n if(firstTime) {\n renewIn = now;\n } else {\n long expiresIn = (token.expirationDate - now); \n renewIn = now + expiresIn - expiresIn/10; // little before expiration\n }\n \n try {\n // need to create new timer every time\n TimerTask tTask = new RenewalTimerTask(token);\n token.setTimerTask(tTask); // keep reference to the timer\n\n renewalTimer.schedule(token.timerTask, new Date(renewIn));\n } catch (Exception e) {\n LOG.warn(\"failed to schedule a task, token will not renew more\", e);\n }\n }", "Observable<Session> getByValidSessionToken(String token, Date now, boolean checkValidRefreshToken);", "public boolean isSecurityTokenExpired() {\n return System.currentTimeMillis() > securityTokenExpiryTime || isExpired();\n }", "interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }", "@Test\n public void jsonTest(){\n String token = \"eyJEZXZlbG9wZWQgQnkiOiJlLUhlYWx0aCBSZXNlYXJjaCBDZW50ZXIsIElJSVQgQmFuZ2Fsb3JlIiwiSG9zdCI6Ikthcm5hdGFrYSBNZW50YWwgSGVhbHRoIE1hbmFnZW1lbnQgU3lzdGVtIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJwcm9mZXNzaW9uIjoiTUhNU1BzeWNoaWF0cmlzdCIsInN1YiI6Ik1ITVMgU2VjdXJpdHkgVG9rZW4iLCJsYXN0TG9naW5PcmdJZCI6ImU2NDE3NGI0LWI3NzctNGRlYS04NmUyLTNmMGQ1NDgwYTI2MiIsInNlc3Npb25FbmRUaW1lIjoxNTg1MzQxMzYxLCJpc3MiOiJLTUhNUyIsInNlc3Npb25TdGFydFRpbWUiOjE1ODUyOTgxNjEsInNlc3Npb25JZCI6ImZlMmE5NzY2LTQ1MmYtNDdlYy1iMjUwLTI2YzQ5NjNiNjFkZSIsInVzZXJOYW1lIjoidGVzdDAxIiwibGFzdExvZ2luU3RhcnQiOiIxNTg1Mjk0ODg2NTY4Iiwib3JnVVVJRCI6ImU2NDE3NGI0LWI3NzctNGRlYS04NmUyLTNmMGQ1NDgwYTI2MiIsIm5iZiI6MTU4NTI5ODE2MSwib3JnUm9sZSI6Ik1IRUFkbWluIiwic2Vzc2lvblRva2VuIjoiU2Vzc2lvbklkOjE3Mi4zMS4xLjIyNCN0ZXN0MDE6ZTY0MTc0YjQtYjc3Ny00ZGVhLTg2ZTItM2YwZDU0ODBhMjYyOk1ITVM6TUhFQWRtaW4jMTU4NTI5ODE2MDczMyMtNzIzOTM2MzUzIzEwMCIsInBlcnNvbklkIjoiNjI3NzMwODEtZGE4OS00NjYzLThiNmYtOWMwMGU5NDMyOTYwIiwidXNlclVVSUQiOiI1YzI0ZjU5Ni0wZjM0LTQxYTYtYWFmNS1lMzAwMmVhMmM0Y2UiLCJleHAiOjE1ODUzMzQxNjEsImlhdCI6MTU4NTI5ODE2MX0.TFWVdCZYuUysbZ2gmQc5H2Eig4jwXcuiC_FTbDTUNis\";\n try {\n DecodedJWT jwt = JWT.decode(token);\n System.out.println(\"jwt token \"+jwt.getPayload());\n\n } catch (JWTDecodeException exception){\n //Invalid token\n exception.printStackTrace();\n }\n\n\n /* try {\n mhp.getJson(\"\");\n }catch (Exception e){\n e.printStackTrace();\n }*/\n }", "@Test\n public void testRefreshToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .bearerToken()\n .refreshToken()\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "public Integer getRefreshTokenValiditySeconds() {\n return refreshTokenValiditySeconds;\n }", "public int getSessionExpireRate();", "public interface TokenService {\n\n /**\n * Generate a user-based renewal token\n *\n * @param username The username for which the token will be valid\n * @return A renewal JWT for the user\n */\n String generateUserRenewalToken(String username);\n\n /**\n * Generate a unit-based renewal token\n *\n * @param unit The unit for which the token will be valid\n * @param expiration The optional expiration timestamp for the token (defaults to duration specified in application config)\n * @return A renewal JWT for the unit\n */\n String generateUnitRenewalToken(Unit unit, Instant expiration);\n\n /**\n * Generate a user-based request token\n *\n * @param username The username for which the token will be valid\n * @param authorities The list of authorities associated with the user\n * @return A request JWT for the user\n */\n String generateUserRequestToken(String username, Collection<String> authorities);\n\n /**\n * Generate a unit-based request token\n *\n * @param units The list of units for which the token will be valid\n * @return A request JWT for the units\n */\n String generateUnitRequestToken(Collection<String> units);\n}", "void expireComponentAccessToken();", "boolean isCardApiTicketExpired(String appId);", "Observable<Session> getByValidToken(String token, Date now);", "@Scheduled(fixedRate = 60000)\n\tpublic void evictExpiredTokens() {\n\t\tlogger.info(\"Evicting expired tokens.\");\n\t\ttokenCache.evictExpiredElements();\n\t\ttokenCache.flush();\n\t}", "boolean isComponentAccessTokenExpired();", "public boolean isAbleToClaim() {\n if (!isActive()) {\n return false;\n }\n\n ZonedDateTime now = ZonedDateTime.now();\n return now.toEpochSecond() >= claimFromDate.toEpochSecond();\n }", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "public Date getExperiyDate(String token) {\n\t\treturn getClaims(token).getExpiration();\n\n\t}", "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 }", "boolean isJsapiTicketExpired(String appId);", "@ParameterizedTest\n @EnumSource(KeyType.class)\n void testExpiredJWT(KeyType keyType) throws NoSuchAlgorithmException {\n final KeyPair keyPair = APIAuthHelpers.generateKeyPair(keyType);\n\n final String id = UUID.randomUUID().toString();\n final String jwt = Jwts.builder()\n .setHeaderParam(\"kid\", UUID.randomUUID())\n .setAudience(String.format(\"%sToken/auth\", \"here\"))\n .setIssuer(id)\n .setSubject(id)\n .setId(id)\n .setExpiration(Date.from(Instant.now().minus(5, ChronoUnit.MINUTES)))\n .signWith(keyPair.getPrivate(), APIAuthHelpers.getSigningAlgorithm(keyType))\n .compact();\n\n // Submit the JWT\n Response response = RESOURCE.target(\"/v1/Token/validate\")\n .request()\n .accept(MediaType.APPLICATION_JSON)\n .post(Entity.entity(jwt, MediaType.TEXT_PLAIN));\n\n assertEquals(400, response.getStatus(), \"Should not be valid\");\n assertTrue(response.readEntity(String.class).contains(\"JWT is expired\"), \"Should have correct exception\");\n }", "@Test\n void test() throws JoseException, InvalidJwtException, MalformedClaimException {\n JwtClaims claims = new JwtClaims();\n claims.setSubject(\"jokerr\");\n\n Key key = new HmacKey(Arrays.copyOf(\"secret\".getBytes(),32));\n\n JsonWebSignature jws = new JsonWebSignature();\n jws.setAlgorithmHeaderValue(AlgorithmIdentifiers.HMAC_SHA256);\n// jws.setHeader(\"typ\",\"JWT\");\n jws.setPayload(claims.toJson());\n jws.setKey(key);\n String token = jws.getCompactSerialization();\n\n System.out.println(\"atlatian/jose4j: \" + token);\n\n /*\n verify the token\n */\n JwtConsumer jwtConsumer = new JwtConsumerBuilder()\n .setVerificationKey(key)\n .build();\n\n JwtClaims jwtClaims = jwtConsumer.processToClaims(token);\n\n /*\n assert\n */\n assertEquals(\"jokerr\", jwtClaims.getSubject());\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 }", "public void use(int currentTime) throws GeneralSecurityException {\n \t\n \tutils.authenticate(authenticationKey);\n \t\t// Dummy ticket use that validates only the HMAC. You need to implement the rest. \t\t\n \t\n \t// TODO: Create methods to read from card and store to the card\n \t// need to update the new remaining uses of the card.\n \t\n \t// Retrieve the expiry time from card at page 7\n \tbyte[] expiryTimeByte = new byte[4];\n \tutils.readPages(7, 1, expiryTimeByte, 0);\n \texpiryTime = ByteBuffer.wrap(expiryTimeByte).getInt();\n \t\n \t// Retrieve the remaining uses from the card at page 8\n \tbyte[] remainingUsesByte = new byte[4];\n \tutils.readPages(8, 1, remainingUsesByte, 0);\n \tremainingUses = ByteBuffer.wrap(remainingUsesByte).getInt();\n \t\t\t\n //TODO: Implement proper ticketing.\n \tisValid = true;\n if (expiryTime < currentTime) {\n \tinfoToShow = \"Ticket Expired!\";\n \tisValid = false;\n }else if (remainingUses == 0) {\n \tinfoToShow = \"No more rides available\";\n \tisValid = false;\n }else if (isValid()){\n\t \t// This string will be shown after ticket is used in test mode. Make\n\t // your own info string.\n\t infoToShow = \"Ticket Valid\";\n\t isValid = true;\n\t //expiryTime = 0;\n\t remainingUses--;\n\t \n\t // Write the remaining uses to page 8\n\t \n\t utils.writePages(ByteBuffer.allocate(4).putInt(remainingUses).array(), 0, 8, 1);\n\n\t byte[] dataOnCard = new byte [5 * 4];\n \t\tbyte[] macOnCard = new byte [2 * 4];\n \t\tutils.readPages(0, 5, dataOnCard, 0);\n \t\tutils.readPages(5, usedMacLength, macOnCard, 0);\n \t\t\n \t\t// ignore locks and OTP bits\n \t\tfor (int ig = 0; ig < 6; ig ++){\n \t\t\tdataOnCard[10+ig] = 0;\n \t\t}\n \t\tbyte[] mac = macAlgorithm.generateMac(dataOnCard);\n \t\t// We only use 8 bytes (64 bits) of the MAC.\n \t\tfor (int i = 0; i < usedMacLength*4; i++){\n \t\t\tif (macOnCard[i] != mac[i]) {\n \t\t\t\tinfoToShow = \"Invalid Ticket\";\n\t \t\t\tisValid = false;\n\t \t\t}\n \t\t}\n }\n \n if (!isValid)\n \t\tSystem.err.print(infoToShow); \n }", "public Boolean ValidateJWTExpirationTime(Long expirationTime, int extraValidityDay) {\n // long expirationTimeSeconds = Long.parseLong(expirationTime);\n Date time = new Date((long) expirationTime * 1000);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(time);\n calendar.add(Calendar.DATE, extraValidityDay);\n time = calendar.getTime();\n\n if (time.compareTo(new Date()) > 0) {\n\n return true;\n }\n return false;\n }", "@Override\n public Date getExpiration()\n {\n return null;\n }", "@ApiModelProperty(example = \"2017-11-29T22:40:11.000+0000\", value = \"Date and time the token expires (in ISO 8601 format). If not specified, it will default to the maximum lifetime for this token type.\")\n public OffsetDateTime getTerminalDate() {\n return terminalDate;\n }", "private boolean isIllegalTokenCollectionForRuleOne(int elapsedTimeInSeconds) {\n int interval = elapsedTimeInSeconds / 10;\n int intervalModTwo = interval % 2;\n return intervalModTwo == 0;\n }", "protected void updateNextLifeSign() {\n nextLifeSignToSend = System.currentTimeMillis() + NotEOFConstants.LIFE_TIME_INTERVAL_CLIENT;\n }", "public boolean accessTokenExpired() {\n Date currentTime = new Date();\n if ((currentTime.getTime() - lastAccessTime.getTime()) > TIMEOUT_PERIOD) {\n return true;\n } else {\n return false;\n }\n }", "public static void refreshToken(ApiClient client, String applicationKey, String secret) {\n byte[] secretKey = secret.getBytes(Charset.forName(\"utf-8\"));\n String jwt = Jwts.builder()\n .setSubject(applicationKey)\n .setExpiration(new Date(System.currentTimeMillis() + 30_000))\n .setIssuedAt(new Date())\n .setHeaderParam(Header.TYPE, \"API\")\n .signWith(\n SignatureAlgorithm.HS512,\n secretKey)\n .compact();\n\n ApiKeyAuth authorization = (ApiKeyAuth) client.getAuthentication(\"Authorization\");\n authorization.setApiKey(jwt);\n authorization.setApiKeyPrefix(AUTHORIZATION_HEADER_BEARER_PREFIX);\n }", "private TimeAuth(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder();", "private void configureAccessTokens() {\n // read JOSSO gateway configuration\n int accessTokensExpiration = DEFAULT_ACCESS_TOKENS_EXPIRATION;\n InputStream jossoGatewayConfigurationStream = null;\n try {\n jossoGatewayConfigurationStream = new FileInputStream(JOSSO_GATEWAY_CONFIGURATION);\n Document jossoGatewayConfiguration = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(jossoGatewayConfigurationStream);\n XPathExpression maxInactiveIntervalXPath = XPathFactory.newInstance().newXPath().compile(\"/beans/session-manager/@maxInactiveInterval\");\n String maxInactiveInterval = (String)maxInactiveIntervalXPath.evaluate(jossoGatewayConfiguration, XPathConstants.STRING);\n if ((maxInactiveInterval != null) && (maxInactiveInterval.length() > 0)) {\n accessTokensExpiration = Integer.parseInt(maxInactiveInterval)*60;\n }\n } catch (Exception e) {\n log.error(\"Cannot read or parse configuration file \"+JOSSO_GATEWAY_CONFIGURATION+\": \"+e);\n } finally {\n if (jossoGatewayConfigurationStream != null) {\n try {\n jossoGatewayConfigurationStream.close();\n } catch (IOException ioe ) {\n }\n }\n }\n // create or reconfigure access tokens map with expiration\n if (accessTokens == null) {\n accessTokens = new ExpiringMap<String,AuthAccessInfo>(accessTokensExpiration, ACCESS_TOKENS_EXPIRATION_INTERVAL);\n } else {\n accessTokens.setTimeToLive(accessTokensExpiration);\n }\n }", "public boolean isExpiredToken(String jwt) {\n try {\n Claims claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(\"TerryLam\"))\n .parseClaimsJws(jwt).getBody();\n Date expiration = claims.getExpiration();\n //If the expiration Date is a time BEFORE the current time, it is expired\n if (expiration.before(new Date())) {\n return true;\n } else {\n return false;\n }\n } catch (JwtException ex) {\n log.info(\"Error validating token. Exception Message \" + ex.getMessage());\n return true;\n }\n }", "public void generateRequestToken(OAuthAccessor accessor)\n throws OAuthException {\n\n // generate oauth_token and oauth_secret\n String consumer_key = accessor.consumer.consumerKey;\n // generate token and secret based on consumer_key\n\n // for now use md5 of name + current time as token\n String token_data = consumer_key + System.nanoTime();\n \n String token = StringPool.BLANK;\n try {\n token = Digester.MD5(token_data);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(OAuthManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n // for now use md5 of name + current time + token as secret\n String secret_data = consumer_key + System.nanoTime() + token;\n String secret = StringPool.BLANK;\n try {\n secret = Digester.MD5(secret_data);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(OAuthManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n accessor.requestToken = token;\n accessor.tokenSecret = secret;\n accessor.accessToken = null;\n\n // add to the local cache\n addAccessor(accessor);\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n /*Log.d(\"Refreshed token\", \"Refreshed token: \" + refreshedToken);\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n final CollectionReference clients = FirebaseFirestore.getInstance().collection(\"Tokens\");\n Map<String, Object> data1 = new HashMap<>();\n data1.put(\"token\", refreshedToken);\n clients.document(\"Iamhere\").set(data1, SetOptions.merge());*/\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n }", "public void requestToken(View pView){\n mAttestation.fetchApproovToken();\n }", "public static String generateToken(JWTAccessTokenIssuerDTO jwtAccessTokenIssuerDTO, Application application)\n throws OAuthSystemException {\n\n String accessToken;\n String clientId = jwtAccessTokenIssuerDTO.getClientId();\n try {\n OAuthAppDO oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId);\n String[] audience = oAuthAppDO.getAudiences();\n List<String> audienceList = Arrays.asList(audience);\n StringBuilder scopeString = new StringBuilder();\n String[] scopeList = jwtAccessTokenIssuerDTO.getScopeList();\n for (String scope : scopeList) {\n scopeString.append(scope).append(\" \");\n }\n String quotaType = APIUtil.getQuotaTypeForApplicationPolicy(application.getTier(),\n APIUtil.getTenantId(application.getOwner()));\n \n ApplicationDTO applicationDTO = new ApplicationDTO();\n applicationDTO.setId(application.getId());\n applicationDTO.setName(application.getName());\n applicationDTO.setTier(application.getTier());\n applicationDTO.setOwner(application.getOwner());\n applicationDTO.setTierQuotaType(quotaType);\n\n AuthenticatedUser endUser = jwtAccessTokenIssuerDTO.getUser();\n JwtTokenInfoDTO jwtTokenInfoDTO = APIUtil.getJwtTokenInfoDTO(application,\n endUser.toFullQualifiedUsername(),\n endUser.getTenantDomain());\n jwtTokenInfoDTO.setScopes(scopeString.toString().trim());\n jwtTokenInfoDTO.setAudience(audienceList);\n jwtTokenInfoDTO.setExpirationTime(jwtAccessTokenIssuerDTO.getValidityPeriod());\n jwtTokenInfoDTO.setApplication(applicationDTO);\n jwtTokenInfoDTO.setKeyType(application.getKeyType());\n jwtTokenInfoDTO.setConsumerKey(clientId);\n jwtTokenInfoDTO.setTokenReqMessageContext(jwtAccessTokenIssuerDTO.getTokReqMsgCtx());\n jwtTokenInfoDTO.setOauthAuthzMsgCtx(jwtAccessTokenIssuerDTO.getOauthAuthzMsgCtx());\n APIMJWTGenerator apimjwtGenerator = new APIMJWTGenerator();\n accessToken = apimjwtGenerator.generateJWT(jwtTokenInfoDTO);\n\n } catch (InvalidOAuthClientException | IdentityOAuth2Exception | APIManagementException e) {\n log.error(\"Error occurred while getting JWT Token client ID : \" + clientId + \" when getting oAuth App \" +\n \"information\", e);\n throw new OAuthSystemException(\"Error occurred while getting JWT Token client ID : \" + clientId, e);\n }\n return accessToken;\n }", "protected int getAccessTokenValiditySeconds(OAuth2Request clientAuth) {\n if (clientDetailsService != null) {\n ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());\n Integer validity = client.getAccessTokenValiditySeconds();\n if (validity != null) {\n return validity;\n }\n }\n return accessTokenValiditySeconds;\n }", "protected JwtClaims produceIdTokenClaims(final HttpServletRequest request,\n final AccessToken accessTokenId,\n final long timeout,\n final OidcRegisteredService service,\n final UserProfile profile,\n final J2EContext context,\n final OAuth20ResponseTypes responseType) {\n final Authentication authentication = accessTokenId.getAuthentication();\n final Principal principal = authentication.getPrincipal();\n\n final JwtClaims claims = new JwtClaims();\n claims.setJwtId(UUID.randomUUID().toString());\n claims.setIssuer(this.issuer);\n claims.setAudience(service.getClientId());\n\n final NumericDate expirationDate = NumericDate.now();\n expirationDate.addSeconds(timeout);\n claims.setExpirationTime(expirationDate);\n claims.setIssuedAtToNow();\n claims.setNotBeforeMinutesInThePast(this.skew);\n claims.setSubject(principal.getId());\n\n if (authentication.getAttributes().containsKey(casProperties.getAuthn().getMfa().getAuthenticationContextAttribute())) {\n final Collection<Object> val = CollectionUtils.toCollection(\n authentication.getAttributes().get(casProperties.getAuthn().getMfa().getAuthenticationContextAttribute()));\n claims.setStringClaim(OidcConstants.ACR, val.iterator().next().toString());\n }\n if (authentication.getAttributes().containsKey(AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS)) {\n final Collection<Object> val = CollectionUtils.toCollection(\n authentication.getAttributes().get(AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS));\n claims.setStringListClaim(OidcConstants.AMR, val.toArray(new String[]{}));\n }\n\n claims.setClaim(OAuth20Constants.STATE, authentication.getAttributes().get(OAuth20Constants.STATE));\n claims.setClaim(OAuth20Constants.NONCE, authentication.getAttributes().get(OAuth20Constants.NONCE));\n claims.setClaim(OidcConstants.CLAIM_AT_HASH, generateAccessTokenHash(accessTokenId, service));\n\n principal.getAttributes().entrySet().stream()\n .filter(entry -> casProperties.getAuthn().getOidc().getClaims().contains(entry.getKey()))\n .forEach(entry -> claims.setClaim(entry.getKey(), entry.getValue()));\n\n if (!claims.hasClaim(OidcConstants.CLAIM_PREFERRED_USERNAME)) {\n claims.setClaim(OidcConstants.CLAIM_PREFERRED_USERNAME, profile.getId());\n }\n\n return claims;\n }" ]
[ "0.6719646", "0.6209752", "0.62070507", "0.61680496", "0.6015401", "0.59708256", "0.5955966", "0.5893687", "0.57685596", "0.571028", "0.5708504", "0.5693846", "0.56735307", "0.560953", "0.5602672", "0.5535518", "0.5502842", "0.54957944", "0.5464962", "0.54553646", "0.5435837", "0.5403906", "0.53851277", "0.5377767", "0.5327761", "0.5299697", "0.52714455", "0.5254005", "0.5231573", "0.52249694", "0.52154654", "0.5204955", "0.5193736", "0.5170437", "0.5163887", "0.513707", "0.5134397", "0.51311576", "0.51185167", "0.511627", "0.51010287", "0.5097579", "0.50845283", "0.50779146", "0.50710124", "0.5068128", "0.50650936", "0.50553894", "0.5049477", "0.5036198", "0.5034193", "0.5032803", "0.50313395", "0.50206023", "0.5011474", "0.50100815", "0.4989462", "0.49800047", "0.49728623", "0.49687284", "0.49678668", "0.49621928", "0.49392128", "0.49324524", "0.4925387", "0.49241498", "0.49046636", "0.4898964", "0.48893178", "0.4885902", "0.48659265", "0.48646727", "0.4862587", "0.4859833", "0.48575866", "0.48526722", "0.48521328", "0.48477533", "0.48437768", "0.4835591", "0.483463", "0.48308197", "0.48290247", "0.48288158", "0.48269925", "0.48214898", "0.48176455", "0.48165736", "0.4814242", "0.4809739", "0.48067915", "0.48055038", "0.47843492", "0.4778448", "0.47695214", "0.4764874", "0.4761507", "0.47600198", "0.47597468", "0.47578797", "0.4757041" ]
0.0
-1
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView textview=(TextView)findViewById(R.id.name); // textview.setText(ExampleUsage.makeRequest()); // ExampleUsage.makeRequest(); RequestParams params=new RequestParams(); params.put("city", "苏州"); // AsyncHttpResponseHandler client = new AsyncHttpResponseHandler(); TwitterRestClient.get("getArea", params, new AsyncHttpResponseHandler(){ public void onSuccess(String response) { Log.e("onSuccess", "onSuccess"); System.out.println(response); String temp01 = response.substring(76); String temp02 = temp01.substring(0,temp01.length()-9); try { List<AreaImp> list = JSONUtils.fromJson(temp02, new TypeToken<List<AreaImp>>(){}); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void onStart(){ Log.e("onStart", "onStart"); } public void onFailure(Throwable e, String response) { Log.e("onFailure", response); } public void onFinish() { Log.e("onFinish", "onFinish"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "protected void onCreate() {\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "public void onCreate() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "public void onCreate();", "public void onCreate();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }" ]
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879", "0.74805456", "0.7475343", "0.7469598", "0.7469598", "0.7455178", "0.743656", "0.74256307", "0.7422192", "0.73934627", "0.7370002", "0.73569906", "0.73569906", "0.7353011", "0.7347353", "0.7347353", "0.7333878", "0.7311508", "0.72663945", "0.72612154", "0.7252271", "0.72419256", "0.72131634", "0.71865886", "0.718271", "0.71728176", "0.7168954", "0.7166841", "0.71481615", "0.7141478", "0.7132933", "0.71174103", "0.7097966", "0.70979583", "0.7093163", "0.7093163", "0.7085773", "0.7075851", "0.7073558", "0.70698684", "0.7049258", "0.704046", "0.70370424", "0.7013127", "0.7005552", "0.7004414", "0.7004136", "0.69996923", "0.6995201", "0.69904065", "0.6988358", "0.69834954", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69783133", "0.6977392", "0.69668365", "0.69660246", "0.69651115", "0.6962911", "0.696241", "0.6961096", "0.69608897", "0.6947069", "0.6940148", "0.69358927", "0.6933102", "0.6927288", "0.69265485", "0.69247025" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { String string = new String("阿是跨境电商的.txt,asda.java,新建.docx"); System.out.println("字符串:"+string); String[] s=string.split(","); findJava(s); wjm(s); }
{ "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
Function that implements Dijkstra's single source shortest path algorithm for a graph represented using adjacency matrix representation
public double dijkstra(NodoArista[][] adjacencyMatrix, int startVertex, int nodoBuscado, ListaEnlazada lista) { int nVertices = adjacencyMatrix[0].length; // shortestDistances[i] will hold the shortest distance from src to i double[] shortestDistances = new double[nVertices]; double[] precios = new double[nVertices]; // added[i] will true if vertex i is included / in shortest path tree or shortest distance from src to i is finalized boolean[] added = new boolean[nVertices]; // Initialize all distances as INFINITE and added[] as false for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) { shortestDistances[vertexIndex] = Integer.MAX_VALUE; precios[vertexIndex] = Integer.MAX_VALUE; added[vertexIndex] = false; } // Distance of source vertex from itself is always 0 shortestDistances[startVertex] = 0; precios[startVertex] = 0; // Parent array to store shortest path tree int[] parents = new int[nVertices]; // The starting vertex does not have a parent parents[startVertex] = NO_PARENT; // Find shortest path for all vertices for (int i = 1; i < nVertices; i++) { // Pick the minimum distance vertex from the set of vertices not yet processed. nearestVertex is always equal to startNode in first iteration. int nearestVertex = -1; double shortestDistance = Integer.MAX_VALUE; double precio = Integer.MAX_VALUE; for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) { if (!added[vertexIndex] && shortestDistances[vertexIndex] < shortestDistance) { nearestVertex = vertexIndex; shortestDistance = shortestDistances[vertexIndex]; precio = precios[vertexIndex]; } } // Mark the picked vertex as processed added[nearestVertex] = true; // Update dist value of the adjacent vertices of the picked vertex. for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) { double edgeDistance = adjacencyMatrix[nearestVertex][vertexIndex].getPeso(); double precioActual = adjacencyMatrix[nearestVertex][vertexIndex].getPrecio(); double edgePrice = adjacencyMatrix[nearestVertex][vertexIndex].getPrecio(); if (edgeDistance > 0 && ((shortestDistance + edgeDistance) < shortestDistances[vertexIndex])) { parents[vertexIndex] = nearestVertex; shortestDistances[vertexIndex] = shortestDistance + edgeDistance; precios[vertexIndex] = precio + precioActual; } if (edgePrice > 0 && ((shortestDistance + edgeDistance) < shortestDistances[vertexIndex])) { parents[vertexIndex] = nearestVertex; shortestDistances[vertexIndex] = shortestDistance + edgeDistance; precios[vertexIndex] = precio + precioActual; } } } printSolution(startVertex, shortestDistances, parents); printSolutionPara(startVertex, shortestDistances, parents, nodoBuscado, lista); return precios[nodoBuscado]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void dijkstra(int graph[][], int src) {\n int dist[] = new int[V]; // The output array. dist[i] will hold\n // the shortest distance from src to i\n\n // sptSet[i] will true if vertex i is included in shortest\n Boolean sptSet[] = new Boolean[V];\n\n for (int i = 0; i < V; i++) {\n dist[i] = Integer.MAX_VALUE;\n sptSet[i] = false;\n }\n\n dist[src] = 0;\n\n // Find shortest path for all vertices\n for (int count = 0; count < V-1; count++) {\n\n int u = minDistance(dist, sptSet);\n\n // Mark the picked vertex as processed\n sptSet[u] = true;\n\n // Update dist value of the adjacent vertices of the\n // picked vertex.\n for (int v = 0; v < V; v++)\n\n\n if (!sptSet[v] && graph[u][v]!=0 &&\n dist[u] != Integer.MAX_VALUE &&\n dist[u]+graph[u][v] < dist[v])\n dist[v] = dist[u] + graph[u][v];\n }\n\n printSolution(dist, V);\n }", "public void dijkstra(int graphWeight[][], int source){\r\n\t\t\r\n\t\tint queue[] = new int[vertices]; //The array which will hold the shortest distance from source to node i\r\n\t\tboolean set[] = new boolean[vertices]; //It will store true for node i if the shortest path to that vertex or node is found\r\n\t\t\r\n\t\t//Initialize distances to infinity and set[] array to false \r\n\t\tfor(int i=0;i<vertices;i++){\r\n\t\t\tqueue[i] = Integer.MAX_VALUE; \r\n\t\t\tset[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Distance of source vertex from itself is always 0\r\n\t\tqueue[source] = 0;\r\n\r\n\t\t//Find shortest path of all the vertices\r\n\t\tfor(int count=0;count<vertices-1;count++){\r\n\t\t\t\r\n\t\t\t//Pick the minimum distance vertex from the from the set of vertices \r\n\t\t\t//not processed. u is equal to source in first iteration\r\n\t\t\tint u = extractMinDistance(queue, set);\r\n\t\t\t\r\n\t\t\t//Mark the picked vertex processed\r\n\t\t\tset[u] = true;\r\n\t\t\t//Update queue value of the adjacent vertices of the picked vertex\r\n\t\t\tfor(int v=0;v<vertices;v++)\r\n\t\t\t{\r\n\t\t\t\t//Update queue[v] only if\r\n\t\t\t\t// 1. It is not in set true in the Set Array\r\n\t\t\t\t// 2. There is an edge from u to v\r\n\t\t\t\t// 3. Total weight of path from source to v through u is smaller than current value of queue[v]\r\n\t\t\t\tif((graphWeight[u][v] > 0) && set[v] == false){\r\n\t\t\t\t\t\tif(queue[u] + graphWeight[u][v] < queue[v]){\r\n\t\t\t\t\t\t\tqueue[v] = queue[u] + graphWeight[u][v];\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//printSolution(queue, vertices);\r\n\t\t}\r\n\t\t//Print the constructed distance array\r\n\t\tprintSolution(queue, vertices);\r\n\t}", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tint[] prev = new int[dwg.nodeSize()];\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\tprev[src%dwg.nodeSize()] = -1;\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t\tprev[u.getKey()%dwg.nodeSize()] = v.getKey();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tList<node_data> ans = new ArrayList<node_data>();\n\t\tint run = dest;\n\t\twhile(run != src) {\n\t\t\tans.add(0,dwg.getNode(run));\n\t\t\trun = prev[run%dwg.nodeSize()];\n\t\t}\n\t\tans.add(0, dwg.getNode(src));\n\n\t\treturn ans;\n\t}", "public ShortestPathMatrix<V,E> allPairsShortestPaths();", "public List<node_info> shortestPath(int src, int dest);", "void shortestPath( final VertexType fromNode, Integer node );", "void dijkstra(int[][] graph){\r\n int dist[] = new int[rideCount];\r\n Boolean sptSet[] = new Boolean[rideCount];\r\n\r\n for(int i = 0; i< rideCount; i++){\r\n dist[i] = Integer.MAX_VALUE;\r\n sptSet[i] = false;\r\n }\r\n\r\n dist[0] = 0;\r\n\r\n for(int count = 0; count< rideCount -1; count++){\r\n int u = minWeight(dist, sptSet);\r\n sptSet[u] = true;\r\n for(int v = 0; v< rideCount; v++){\r\n if (!sptSet[v] && graph[u][v] != 0 && dist[u] + graph[u][v] < dist[v]){\r\n dist[v] = dist[u] + graph[u][v];\r\n }\r\n }\r\n }\r\n printSolution(dist);\r\n }", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tList<node_data> ans = new ArrayList<>();\n\t\tthis.shortestPathDist(src, dest);\n\t\tif(this.GA.getNode(src).getWeight() == Integer.MAX_VALUE || this.GA.getNode(dest).getWeight() == Integer.MAX_VALUE){\n\t\t\tSystem.out.print(\"There is not a path between the nodes.\");\n\t\t\treturn null;\n\t\t}\n\t\tgraph copied = this.copy();\n\t\ttransPose(copied);\n\t\tnode_data first = copied.getNode(dest);\n\t\tans.add(first);\n\t\twhile (first.getKey() != src) {\n\t\t\tCollection<edge_data> temp = copied.getE(first.getKey());\n\t\t\tdouble check= first.getWeight();\n\t\t\tif(temp!=null) {\n\t\t\t\tfor (edge_data edge : temp) {\n\t\t\t\t\tif (copied.getNode(edge.getDest()).getWeight() + edge.getWeight() == check) {\n\t\t\t\t\t\tfirst = copied.getNode(edge.getDest());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tans.add(first);\n\t\t}\n\t\tList<node_data> ans2 = new ArrayList<>();\n\t\tfor (int i = ans.size()-1;i>=0;i--){\n\t\t\tans2.add(ans.get(i));\n\t\t}\n\t\treturn ans2;\n\t}", "private int[] runDijkstra(int graph[][], int source) {\r\n\r\n // Stores the best estimate of the shortest distance from\r\n // the source to each node \r\n int d[] = new int[graph.length];\r\n \r\n // Initialized with infinite value.\r\n // Value of -1 means the node has been settled \r\n int dC[] = new int[graph.length];\r\n \r\n // Stores the predecessor of each node on the shortest path \r\n // from the source\r\n int p[] = new int[graph.length];\r\n\r\n // Initialize\r\n for (int i = 0; i < graph.length; i++ ) {\r\n d[i] = this.INFINITE;\r\n dC[i] = this.INFINITE;\r\n p[i] = -1;\r\n }\r\n \r\n // We start knowning the distance of the source from itself (zero)\r\n d[source] = 0;\r\n dC[source] = 0;\r\n\r\n int i = 0;\r\n int min = this.INFINITE;\r\n int pos = 0;\r\n\r\n while (i < graph.length) {\r\n //extract minimum distance\r\n for (int j = 0; j < dC.length; j++ ){\r\n if( min > d[j] && dC[j] != -1 ){\r\n min = d[j];\r\n pos = j;\r\n }\r\n }\r\n // This node is settled\r\n dC[pos] = -1;\r\n\r\n // relax its neighbours\r\n for (int j = 0; j < graph.length; j++ ) {\r\n if ( (graph[pos][j] != -1) && (d[j] > graph[pos][j] + d[pos]) ) {\r\n d[j] = graph[pos][j] + d[pos];\r\n p[j] = pos;\r\n }\r\n }\r\n i++;\r\n min = this.INFINITE;\r\n }\r\n\r\n return p;\r\n }", "public static Set<List<Index>> allShortestPath(int[][] twoDArray, Index sourceIndex, Index destIndex)\n throws IllegalArgumentException, IndexOutOfBoundsException{\n // Function to check if the input of the array is valid\n if(twoDArray.length > 50){\n throw new IllegalArgumentException(\"Incorrect input, size of array over 50!\");\n }\n // Auxiliary functions to check validation of indices\n isValidIndex(twoDArray, sourceIndex);\n isValidIndex(twoDArray, destIndex);\n Matrix matrix = new Matrix(twoDArray);\n Queue<List<Index>> queue = new LinkedList<>();\n Set<List<Index>> shortestPath = new HashSet<>();\n Index currentIndex;\n List<Index> visited = new ArrayList<>();\n List<Index> pathToNode = new ArrayList<>();\n // first check if the indices are in the same connected component\n // Using auxiliary function: inTheSameComponent.\n if(inTheSameComponent(twoDArray, sourceIndex, destIndex)){\n visited.add(sourceIndex);\n pathToNode.add(sourceIndex);\n queue.add(pathToNode);\n }\n while(!queue.isEmpty()) {\n pathToNode = queue.poll();\n // remove all irrelevant lists that can't be one of the shortest path\n if (!shortestPath.isEmpty()) {\n while (!pathToNode.isEmpty() &&\n (pathToNode.size() > shortestPath.stream().mapToInt(List::size).min().getAsInt())) {\n if (!queue.isEmpty())\n pathToNode = queue.poll();\n else\n return shortestPath;\n }\n }\n currentIndex = pathToNode.get(pathToNode.size() - 1);\n\n // found path to destination index\n if (currentIndex.equals(destIndex)) {\n // in case that the path is the first one or in the same size - add the new path to the current list\n if (shortestPath.isEmpty() ||\n shortestPath.stream().mapToInt(List::size).min().getAsInt() == pathToNode.size()) {\n shortestPath.add(pathToNode);\n }\n // in case that the path is shortest - clear all the list and add the new path to empty list\n else if (shortestPath.stream().mapToInt(List::size).min().getAsInt() > pathToNode.size()) {\n shortestPath.clear();\n shortestPath.add(pathToNode);\n }\n }\n for (Index index : matrix.getReachables(currentIndex)) {\n // notRelevant - all visited indices minus the last visited\n // notRelevant = visited.subList(0 , visited.size() - queue.size() );\n if (!visited.subList(0 , visited.size() - queue.size()).contains(index) ||\n index.equals(destIndex)) {\n visited.add(index);\n List<Index> pathToNextNode = new ArrayList<>(pathToNode);\n pathToNextNode.add(index);\n queue.add(pathToNextNode);\n }\n }\n }\n return shortestPath;\n }", "@Override\n public List<node_data> shortestPath(int src, int dest) {\n reset();\n for (node_data node : G.getV()) {\n node.setWeight(Double.POSITIVE_INFINITY);\n }\n\n DWGraph_DS.Node currentNode = (DWGraph_DS.Node) G.getNode(src);\n currentNode.setWeight(0);\n PriorityQueue<node_data> unvisitedNodes = new PriorityQueue(G.nodeSize(), weightComperator);\n unvisitedNodes.addAll(G.getV());\n HashMap<Integer, node_data> parent = new HashMap<>();\n parent.put(src, null);\n\n while (currentNode.getWeight() != Double.POSITIVE_INFINITY) {\n if (G.getNode(dest).getTag() == 1) {\n break;\n }\n for (edge_data edge : G.getE(currentNode.getKey())) {\n DWGraph_DS.Node neighbor = (DWGraph_DS.Node) G.getNode(edge.getDest());\n double tmpWeight = currentNode.getWeight() + edge.getWeight();\n if (tmpWeight < neighbor.getWeight()) {\n neighbor.setWeight(tmpWeight);\n unvisitedNodes.remove(neighbor);\n unvisitedNodes.add(neighbor);\n parent.put(neighbor.getKey(), currentNode);\n }\n }\n currentNode.setTag(1);\n if(currentNode.getKey()==dest) break;\n unvisitedNodes.remove(currentNode);\n currentNode = (DWGraph_DS.Node) unvisitedNodes.poll();\n }\n /*\n Rebuild the path list\n */\n if (!parent.keySet().contains(dest)) return null;\n List<node_data> pathList = new ArrayList<>();\n currentNode = (DWGraph_DS.Node) G.getNode(dest);\n while (parent.get(currentNode.getKey()) != null) {\n pathList.add(currentNode);\n currentNode = (DWGraph_DS.Node) parent.get(currentNode.getKey());\n }\n Collections.reverse(pathList);\n return pathList;\n }", "private double dijkstraSingleTarget(Map<Integer, List<Node>> graph, int vertices, int source, int target) {\n Queue<Node> minHeap = new PriorityQueue<>(\n Comparator.comparingDouble(a -> a.weight)\n );\n\n double[] dist = new double[vertices + 1]; //shortest distance for each vertex\n Arrays.fill(dist, 0.0);\n\n boolean visited[] = new boolean[vertices + 1];\n\n // Distance for starting node is 0\n dist[source] = -1;\n minHeap.add((new Node(-1,source)));\n\n while (!minHeap.isEmpty()) {\n Node topPair = minHeap.remove();\n int currNode = topPair.vertex;\n double currDistance = topPair.weight;\n\n if (!graph.containsKey(currNode)) {\n continue;\n }\n\n if (visited[currNode]) continue;\n visited[currNode] = true;\n\n\n for (Node edge : graph.get(currNode)) {\n double weight = edge.weight;\n int neighborNode = edge.vertex;\n double nextDist = currDistance * weight;\n\n if (!visited[neighborNode] && nextDist < dist[neighborNode]) {\n dist[neighborNode] = nextDist;\n minHeap.add((new Node(nextDist, neighborNode)));\n\n }\n\n }\n\n\n }\n\n return -dist[target];\n }", "public int doDijkstras(String startVertex, String endVertex, ArrayList<String> shortestPath)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSet<String> visited = new HashSet<String>();\r\n\t\t\r\n\t\tPriorityQueue<Vertex> minDist = new PriorityQueue<Vertex>();\r\n\t\t\r\n\t\tVertex firstV = new Vertex(startVertex,startVertex,0);\r\n\t\tminDist.add(firstV);\r\n\t\t\r\n\t\tfor(String V : this.adjacencyMap.get(startVertex).keySet())\r\n\t\t{\r\n\t\t\tminDist.add(new Vertex(V,startVertex,this.getCost(startVertex, V)));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//map of vertexName --> VertexObject\r\n\t\tHashMap<String, Vertex> mapV = new HashMap<String,Vertex>();\r\n\t\tmapV.put(startVertex, firstV);\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Init keys-->costs\r\n\t\t */\r\n\t\tfor(String key : this.getVertices())\r\n\t\t{\r\n\t\t\tif(key.equals(startVertex))\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,0));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,Integer.MAX_VALUE));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t/*\r\n\t\t * Init List for shortest path\r\n\t\t */\r\n\t\tLinkedList<String> list = new LinkedList<String>();\r\n\t\tlist.add(startVertex);\r\n\r\n\t\tHashMap<String,List<String>> path = new HashMap<String,List<String>>();\r\n\t\tpath.put(startVertex, list);\r\n\t\t\r\n\t\twhile(!minDist.isEmpty())\r\n\t\t{\r\n\t\t\tVertex node = minDist.poll();\r\n\t\t\tString V = node.current;\r\n\t\t\tint minimum = node.cost;\r\n\t\t\tSystem.out.println(minDist.toString());\r\n\t\t\t\r\n\t\t\t\tvisited.add(V);\r\n\t\t\t\t\r\n\t\t\t\tTreeSet<String> adj = new TreeSet<String>(this.adjacencyMap.get(V).keySet());\r\n\t\t\t\t\r\n\t\t\t\tfor(String successor : adj)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!visited.contains(successor) && !V.equals(successor))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint newCost = this.getCost(V, successor)+minimum;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(newCost < mapV.get(successor).cost)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tminDist.remove(mapV.get(successor));\r\n\t\t\t\t\t\t\t\tminDist.add(new Vertex(successor,V,newCost));\r\n\t\t\t\t\t\t\t\tmapV.put(successor, new Vertex(successor,V,newCost));\r\n\r\n\t\t\t\t\t\t\t\tLinkedList<String> newList = new LinkedList<String>(path.get(V));\r\n\t\t\t\t\t\t\t\tnewList.add(successor);\r\n\t\t\t\t\t\t\t\tpath.put(successor, newList);\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\t\r\n\t\t}\r\n\t\t\r\n\t\tint smallestPath = mapV.get(endVertex).cost == Integer.MAX_VALUE ? -1 : mapV.get(endVertex).cost;\r\n\t\t\r\n\t\tif(smallestPath == -1)\r\n\t\t{\r\n\t\t\tshortestPath.add(\"None\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(String node : path.get(endVertex))\r\n\t\t\t{\r\n\t\t\t\tshortestPath.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn smallestPath;\r\n\t}", "private static void shortestPath(Map<Integer, DistanceInfo> distanceTable,\n int source, int destination)\n {\n // Backtrack using a stack, using the destination node\n Stack<Integer> stack = new Stack<>();\n stack.push(destination);\n\n // Backtrack by getting the previous node of every node and putting it on the stack.\n // Start at the destination.\n int previousVertex = distanceTable.get(destination).getLastVertex();\n while (previousVertex != -1 && previousVertex != source)\n {\n stack.push(previousVertex);\n previousVertex = distanceTable.get(previousVertex).getLastVertex();\n }\n\n if (previousVertex ==-1)\n {\n System.err.println(\"No path\");\n }\n else\n {\n System.err.println(\"Shortest path: \");\n while (! stack.isEmpty())\n {\n System.err.println(stack.pop());\n }\n }\n }", "public int shortestPathBinaryMatrix(int[][] grid) {\n if (grid[0][0] != 0) { return -1; }\n\n int n = grid.length;\n boolean[][] visited = new boolean[n][n];\n visited[0][0] = true;\n Queue<int[]> queue = new LinkedList<>();\n queue.offer(new int[2]);\n for (int res = 1; !queue.isEmpty(); res++) {\n for (int i = queue.size(); i > 0; i--) {\n int[] cur = queue.poll();\n int x = cur[0];\n int y = cur[1];\n if (x == n - 1 && y == n - 1) { return res; }\n\n for (int[] move : MOVES) {\n int nx = x + move[0];\n int ny = y + move[1];\n if (nx >= 0 && nx < n && ny >= 0 && ny < n && !visited[nx][ny]\n && grid[nx][ny] == 0) {\n visited[nx][ny] = true;\n queue.offer(new int[] {nx, ny});\n }\n }\n }\n }\n return -1;\n }", "public void Djkstra(int source) {\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\tdist[i] = Integer.MAX_VALUE; // added infinity to all ,\n\t\t}\n\t\t\n\t\tdist[source] = 0;\n\n\t\t// add source vertex to priority queue\n\t\tq.add(new Node(source, 0));\n\n\n\t\t// while my all vertices are not selected as a min among smallest one time\n\t\t// refracted in visited\n\t\twhile (visited.size() != vertices) {\n\n\t\t\t// pick from priority queue the smallest/min distance\n\t\t\tint i = q.remove().node;\n\n\t\t\t// once node is removed from queue add to set\n\t\t\tvisited.add(i);\n\n\t\t\t// relax adjacent vertex of this node;\n\t\t\t// And add the new node to queue bcoz distance has got updated so add new node as i dont have any method to update \n\t\t\t// already present node and its distance\n\t\t\t\n\n\t\t\tfor (Node v : graph[i]) {\n\t\t\t\tif (!visited.contains(v.node)) {\n\t\t\t\t\tif (dist[i] + v.cost < dist[v.node]) {\n\t\t\t\t\t\tdist[v.node] = dist[i] + v.cost;\n\t\t\t\t\t\tq.add(new Node(v.node, dist[v.node]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "private static void simpleDijikstra(final DirectedGraph directedGraph,\n final Map<String, Integer> currentShortestPaths,\n final String start, final Set<String> visitedSet, final String destination) {\n // Terminate when we have visited all the nodes or if our start value isn't in our dijikstra table\n if (containsAndNotNull(currentShortestPaths, start) && visitedSet.size() != currentShortestPaths.keySet().size()) {\n compareDistanceAndReplace(directedGraph, currentShortestPaths, start);\n visitedSet.add(start);\n // Calculate the next current smallest node that hasn't been visited and not infinity\n final Optional<Map.Entry<String, Integer>> optionalSmallest =\n currentShortestPaths.entrySet().stream()\n .filter(node -> !visitedSet.contains(node.getKey()) && node.getValue() != null)\n .min(Comparator.comparingInt(Map.Entry::getValue));\n // Continue to next node if there is one available\n optionalSmallest.ifPresent(smallest -> {\n // No need to continue if the next smallest node is our destination\n if (!smallest.getKey().equals(destination)) {\n simpleDijikstra(directedGraph, currentShortestPaths, smallest.getKey(), visitedSet, destination);\n }\n });\n }\n }", "@Override\n public List<node_info> shortestPath(int src, int dest) {\n int counter=0;//counter for index of listPath\n List<node_info> listPath=new ArrayList<node_info>();//The reverse list that is returned\n List<node_info> listResult=new ArrayList<node_info>();//the returned list\n if(!DijkstraHelp(src,dest)) return null;//if there is no path from src to dest\n if(src==dest) {\n listPath.add(this.ga.getNode(src));\n return listPath;\n }\n //the other case:\n node_info d=this.ga.getNode(dest);\n listPath.add(counter,d);//insert the dest in order to go from destination to source\n //counter++;\n weighted_graph gCopy=copy();\n Iterator<node_info> it=gCopy.getV().iterator();//run on the whole graph\n while(it.hasNext()){\n if(listPath.get(counter).getKey()==src) break;//if we finished\n if(gCopy.getV(listPath.get(counter).getKey()).contains(it.next())) {//remove the nodes that we were already checked if\n //they need to be insert to listPath\n continue;\n }\n Iterator<node_info> currentIt=gCopy.getV(listPath.get(counter).getKey()).iterator();//iterator on the ni-list of the\n //last node were insert to the listPath\n if(currentIt!=null) {\n node_info min=null;\n while (currentIt.hasNext()){\n node_info currentLoop=currentIt.next();\n if(currentLoop.getTag()+gCopy.getEdge(listPath.get(counter).getKey(),currentLoop.getKey())==\n listPath.get(counter).getTag()){//check if this is the node that appropriate to the shortest path\n min=currentLoop;\n }\n }\n listPath.add(min);//insert to listPath\n counter++;\n }\n }\n for(int i=listPath.size()-1;i>=0;i--){\n listResult.add(listPath.size()-i-1,listPath.get(i));//reverse the list\n }\n return listResult;\n }", "public static void djikstra(int[][] graph, int src) {\n\t\t/* output array */\n\t\tint[] dist = new int[graph.length];\n\t\tboolean[] visited = new boolean[graph.length];\n\n\t\tfor (int i = 0; i < graph.length; i++) {\n\t\t\tdist[i] = Integer.MAX_VALUE;\n\t\t\tvisited[i] = false;\n\t\t}\n\n\t\tdist[src] = 0;\n\n\t\tfor (int i = 0; i < graph.length - 1; i++) {\n\n\t\t\t// Pick the minimum distance vertex from the set of vertices not\n\t\t\t// yet processed. u is always equal to src in first iteration.\n\t\t\tint u = findMinDistanceVertex(dist, visited);\n\t\t\t// Mark the picked vertex as processed\n\t\t\tvisited[u] = true;\n\t\t\t\n\t\t\tfor(int j = 0; j < graph.length; j++) {\n\t\t\t\t\n\t\t\t\t// Update dist[v] only if is not in sptSet, there is an edge from \n\t\t // u to v, and total weight of path from src to v through u is \n\t\t // smaller than current value of dist[v]\n\t\t\t\tif(!visited[j] && graph[u][j] != 0\n\t\t\t\t\t\t&& dist[u] != Integer.MAX_VALUE\n\t\t\t\t\t\t&& dist[u] + graph[u][j] < dist[j]) {\n\t\t\t\t\tdist[j] = dist[u] + graph[u][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tprintSolution(dist, graph.length);\n\t}", "public int shortestPathBinaryMatrix(int[][] grid) {\n if (grid[0][0] == 1) {\n return -1;\n }\n int row = grid.length;\n int col = grid[0].length;\n int[][] directions = new int[][]{{-1, 0}, {1, 0}, {0, 1}, {0, -1},\n {-1, -1}, {-1, 1}, {1, -1}, {1, 1}};\n int[][] distance = new int[row][col];\n distance[0][0] = 1;\n Queue<int[]> queue = new LinkedList<>();\n queue.add(new int[]{0, 0});\n while (!queue.isEmpty()) {\n int[] cell = queue.remove();\n int x = cell[0];\n int y = cell[1];\n for (int i = 0; i < directions.length; i++) {\n int a = directions[i][0] + x;\n int b = directions[i][1] + y;\n if (a >= 0 && a < grid.length && b >= 0 && b < grid[0].length && grid[a][b] == 0) {\n // Mark it as -1 to avoid revisiting.\n grid[a][b] = -1;\n distance[a][b] = distance[x][y] + 1;\n queue.add(new int[]{a, b});\n }\n }\n }\n return distance[row - 1][col - 1] == 0 ? -1 :\n distance[row - 1][col - 1];\n }", "private static void disjkstraAlgorithm(Node sourceNode, GraphBuilder graph){\n PriorityQueue<Node> smallestDisQueue = new PriorityQueue<>(graph.nodeArr.size(), new Comparator<Node>() {\n @Override\n public int compare(Node first, Node sec) {\n if(first.distance == Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return 0;\n }\n else if(first.distance == Integer.MAX_VALUE && sec.distance != Integer.MAX_VALUE){\n return 1;\n } else if(first.distance != Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return -1;\n }\n else\n return (int) (first.distance - sec.distance);\n }\n });\n\n smallestDisQueue.add(sourceNode); //add the node to the queue\n\n // until all vertices are know get the vertex with smallest distance\n\n while(!smallestDisQueue.isEmpty()) {\n\n Node currNode = smallestDisQueue.poll();\n// System.out.println(\"Curr: \");\n// System.out.println(currNode);\n if(currNode.known)\n continue; //do nothing if the currNode is known\n\n currNode.known = true; // otherwise, set it to be known\n\n for(Edge connectedEdge : currNode.connectingEdges){\n Node nextNode = connectedEdge.head;\n if(!nextNode.known){ // Visit all neighbors that are unknown\n\n long weight = connectedEdge.weight;\n if(currNode.distance == Integer.MAX_VALUE){\n continue;\n }\n else if(nextNode.distance == Integer.MAX_VALUE && currNode.distance == Integer.MAX_VALUE) {\n continue;\n }\n\n else if(nextNode.distance> weight + currNode.distance){//Update their distance and path variable\n smallestDisQueue.remove(nextNode); //remove it from the queue\n nextNode.distance = weight + currNode.distance;\n\n smallestDisQueue.add(nextNode); //add it again to the queue\n nextNode.pathFromSouce = currNode;\n\n// System.out.println(\"Next: \");\n// System.out.println(nextNode);\n }\n }\n }\n// System.out.println(\"/////////////\");\n }\n }", "public List<Node> computeDijkstraShortestPath(Node source, Node destination) {\n\n source.minDistance = 0.;\n PriorityQueue<Node> nodeQueue = new PriorityQueue<Node>();\n nodeQueue.add(source);\n\n int destinationGroup = destination._groupID;\n\n while (!nodeQueue.isEmpty()) {\n Node v = nodeQueue.poll();\n\n Log.i(\"bbb\", \"In dijsk node name \"+ v._waypointName);\n //Stop searching when reach the destination node\n\n\n if(destinationGroup!=0){\n\n if(v._groupID==destinationGroup){\n destination = navigationGraph.get(navigationGraph.size()-1).nodesInSubgraph.get(v._waypointID);\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n break;\n }\n\n }\n\n if (v._waypointID.equals(destination._waypointID))\n break;\n\n\n // Visit each edge that is adjacent to v\n for (Edge e : v._edges) {\n Node a = e.target;\n Log.i(\"bbb\", \"node a \"+a._waypointName);\n double weight = e.weight;\n double distanceThroughU = v.minDistance + weight;\n if (distanceThroughU < a.minDistance) {\n nodeQueue.remove(a);\n a.minDistance = distanceThroughU;\n a.previous = v;\n Log.i(\"bbb\", \"set previous\");\n nodeQueue.add(a);\n }\n }\n }\n\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n return getShortestPathToDestination(destination);\n }", "void shortestPaths( Set<Integer> nodes );", "private void dijkstra(final NavigableSet<Node> queue) {\n Node firstNode, neighbor;\n while (!queue.isEmpty()) {\n // vertex with shortest distance (first iteration will return source)\n firstNode = queue.pollFirst();\n assert firstNode != null;\n if (!explored.contains(firstNode.coordinate)) {\n explored.add(firstNode.coordinate);\n }\n if (firstNode.dist == Integer.MAX_VALUE)\n // we can ignore u (and any other remaining vertices) since they are unreachable\n break;\n //look at distances to each neighbour\n for (Map.Entry<Node, Integer> temp : firstNode.neighbours.entrySet()) {\n neighbor = temp.getKey(); //the neighbour in this iteration\n if (!explored.contains(neighbor.coordinate)) {\n explored.add(neighbor.coordinate);\n }\n final int alternateDist = firstNode.dist + temp.getValue();\n if (alternateDist < neighbor.dist) { // shorter path to neighbour found\n queue.remove(neighbor);\n neighbor.dist = alternateDist;\n neighbor.previous = firstNode;\n queue.add(neighbor);\n }\n }\n }\n }", "private void calculateShortestDistances (GraphStructure graph,int startVertex,int destinationVertex) {\r\n\t\t//traverseRecursively(graph, startVertex);\r\n\t\tif(pathList.contains(destinationVertex)) {\r\n\t\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\t\tdistanceArray[startVertex]=0;\r\n\t\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\t\tList<Edge> list;\r\n\t\t\tlist = graph.getAdjacencyList()[startVertex];\r\n\t\t\tif(startVertex==destinationVertex) {\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\tif(! isVisited[value.getVertex()]) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[startVertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\r\n\t\t\t\t\t\t\tshortestPathList.add(value.getVertex());\r\n\t\t\t\t\t\t\tcalculateShortestDistances(graph,value.getVertex(), distanceValueOfDestinationVertex);\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\r\n\t\t\t/*for(Integer value : spanningTreeSet) {\r\n\t\t\t\tSystem.out.print(value+\" \");\r\n\t\t\t}*/\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No route is present between given vertices !\");\r\n\t\t}\r\n\t}", "public static Graph dijkstra(Graph graph, Node source) {\n source.distance = 0;\n Set<Node> settledNodes = new HashSet<>();\n Set<Node> unsettledNodes = new HashSet<>();\n unsettledNodes.add(source);\n \n while (unsettledNodes.size() != 0) {\n Node currentNode = Graph.getLowestDistanceNode(unsettledNodes);\n unsettledNodes.remove(currentNode);\n for (Map.Entry<Node, Integer> adjacencyPair: \n currentNode.adjacentNodes.entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Integer edgeWeight = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n Graph.calculateMinimumDistance(adjacentNode, edgeWeight, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return graph;\n }", "public void dijkstra(List<List<Node> > adj, int src){ \n this.adj = adj; \n \n for (int i = 0; i < V; i++) \n dist[i] = Integer.MAX_VALUE; \n \n // Add source node to the priority queue \n pq.add(new Node(src, 0)); \n \n // Distance to the source is 0 \n dist[src] = 0; \n while (settled.size() != V) { \n \n // remove the minimum distance node from the priority queue \n int u = pq.remove().node; \n \n // adding the node whose distance is finalized \n settled.add(u); \n \n e_Neighbours(u); \n } \n }", "private int[] shrtst_Path_Dijkstra_Algo(int[][] matrx, int sNode, int[] forward_tab_dist, int[] list_Prevoius_Nodes) \n\t{\n\t\tArrayList<Integer> visitedNodes_M = new ArrayList<>(); //3. set of visited vertices is initially empty\n\t\tArrayList<Integer> unvisitedNodes_Q = new ArrayList<>(); //4. the queue initially contains all vertices\n\t\t\n\t\t//1. Distance to source vertex = 0\n\t\tforward_tab_dist[sNode] = 0;\n\n\t\t//2. Initialize: Set all other distances to infinity\n\t\tint k=0;\n\t\twhile(k < matrx.length)\n\t\t{\n\t\t\tunvisitedNodes_Q.add(k);\n\t\t\tif(k != sNode)\n\t\t\t{\n\t\t\t\tforward_tab_dist[k] = INFINITE_DIST;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t\t\n\t\t//list of previous nodes, to traverse back\n\t\tlist_Prevoius_Nodes[sNode] = sNode;\n\t\t\n\t\t//5. While queue is not empty\n\t\twhile(!unvisitedNodes_Q.isEmpty())\n\t\t{\n\t\t\tint minDist = INFINITE_DIST;\n\t\t\tint u_minDistNode = -1;\n\t\t\t\n\t\t\t//6. select the element of Q with min distance\n\t\t\tint l = 0;\n\t\t\twhile(l < unvisitedNodes_Q.size())\n\t\t\t{\n\t\t\t\tint n = unvisitedNodes_Q.get(l);\n\t\t\t\tif(!(forward_tab_dist[n] <= minDist))\n\t\t\t\t{\n\t\t\t\t\tl++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tu_minDistNode = n;\n\t\t\t\t\tminDist = forward_tab_dist[n];\n\t\t\t\t}\n\t\t\t\tl++;\n\t\t\t}\n\t\t\t//No minimum distance node found then return\n\t\t\tif(u_minDistNode == -1)\n\t\t\t{\tbreak;\t}\n\t\t\t\n\t\t\t//7. add u to list of visited vertices\n\t\t\tvisitedNodes_M.add(u_minDistNode);\n\t\t\t\n\t\t\tint index = unvisitedNodes_Q.indexOf(u_minDistNode);\t//remove this node from unvisited nodes\n\t\t\tunvisitedNodes_Q.remove(index);\n\t\t\t\n\t\t\t//8.0 algo - consider neighbor as direct distance nodes except source\n\t\t\tfor(int v=0; v<matrx.length; v++)\n\t\t\t{\n\t\t\t\t//matrix[minDistNode_u][v] > 0 ensures it is not source node\n\t\t\t\t//unvisitedNodes_Q.contains(v) only check for unvisited nodes\n\t\t\t\t\n\t\t\t\tif(unvisitedNodes_Q.contains(v) && matrx[u_minDistNode][v] > 0)\n\t\t\t\t{\n\t\t\t\t\tint val = forward_tab_dist[u_minDistNode] + matrx[u_minDistNode][v];\n\t\t\t\t\tif(val < forward_tab_dist[v])\n\t\t\t\t\t{\n\t\t\t\t\t\t//stores shortest distance\n\t\t\t\t\t\tforward_tab_dist[v] = val;\n\t\t\t\t\t\t//stores last node for back traversal to find path\n\t\t\t\t\t\tlist_Prevoius_Nodes[v] = u_minDistNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn forward_tab_dist;\n\t}", "static int shortestCellPath(int[][] grid, int sr, int sc, int tr, int tc) {\n\n\n Queue<Pair> queue = new LinkedList<>();\n\n\n boolean visited[][] = new boolean[grid.length][grid[0].length];\n\n\n int dirs[][] = new int[][]{{1,0},{0,1},{-1,0},{0,-1}};\n\n queue.offer(new Pair(sr,sc,0));\n visited[sr][sc] = true;\n\n while(!queue.isEmpty()){\n\n Pair currentNode = queue.poll();\n\n if(currentNode.row == tr && currentNode.col == tc) {\n return currentNode.d;\n }\n\n\n\n\n for(int[] dir : dirs) {\n\n\n int row = currentNode.row + dir[0];\n int col = currentNode.col + dir[1];\n\n if(row >= 0 && row < grid.length && col >= 0 && col < grid[0].length && !visited[row][col] && grid[row][col] == 1) {\n queue.offer(new Pair(row,col,currentNode.d+1));\n visited[row][col] = true;\n }\n }\n\n\n\n }\n\n return -1;\n }", "private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is this doing here???\n if (neighbors.isEmpty()){\n \n }\n \n // looping through to find distances from start to neighbors\n for (T neighbor : neighbors){ \n int neighborIndex = vertexIndex(neighbor); \n int d = distances[currentIndex] + getEdgeWeight(current, neighbor);\n \n if (d < distances[neighborIndex]){ // if this distance is less than previous distance\n distances[neighborIndex] = d;\n closestPredecessor[neighborIndex] = current; // now closest predecessor is current\n }\n }\n \n if (current.equals(end)){\n atEnd = true;\n }\n else{\n // finding unvisited node that is closest to start node\n T min = getMinUnvisited();\n if (min != null){\n unvisited.remove(min); // remove minimum neighbor from unvisited\n visited.add(min); // add minimum neighbor to visited\n current = min;\n }\n }\n }\n computePath();\n totalDistance = distances[vertexIndex(end)];\n }", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "public void shortestRouteDijkstra(){\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n\n shortestRouteDij(lm1, lm2);\n }", "@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}", "public int dijkstra(int adj[][], int source,int des) {\n\t\tint temp2=0;\n\t\tint distance[]=new int[vertexs];\n\t\tBoolean span_tree[]=new Boolean[vertexs];\n\t\t\n\t\tfor(int i=0;i<vertexs;i++) {\n\t\t\tdistance[i]=Integer.MAX_VALUE;\n\t\t\tspan_tree[i]=false;\n\t\t}\n\t\tdistance[source]=0;\n\t\tfor(int i=0;i<vertexs-1;i++) {\n\t\t\tint u=minDistance(distance,span_tree);\n\t\t\tspan_tree[u]=true;\n\t\t\tfor(int v=0;v<vertexs;v++) {\n\t\t\t\tif(!span_tree[v] && adj[u][v]!=0 && distance[u]!=Integer.MAX_VALUE && distance[u]\n\t\t\t\t\t\t+ adj[u][v]<distance[v]) {\n\t\t\t\t\tdistance[v]=distance[u]+adj[u][v];\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemp2=distance[des];\n\t\t}\n\t\tprintGraph(distance,vertexs);\n\t\treturn temp2;\n\t}", "public ArrayList<Vertex> dijkstraPath(int sourceIndex, int sinkIndex) {\r\n \tArrayList<Vertex> locationcopy;\r\n \tlocationcopy=new ArrayList<Vertex>(location);\r\n \tArrayList<Vertex> dijpath;\r\n \tdijpath= new ArrayList<Vertex>(0);\r\n \t//dijpath.add(locationcopy.get(sourceIndex));\r\n \tint i,j,maxdist=locationcopy.size()+1;\r\n \tint[] DistArray=new int[locationcopy.size()], PreArray=new int[locationcopy.size()]; \r\n \tint[][] AdjArray=new int[locationcopy.size()][locationcopy.size()];\r\n \t\r\n \r\n \t\r\n \tfor(i=0;i<locationcopy.size();i++)\r\n \t\tfor(j=i;j<locationcopy.size();j++)\r\n \t\t\tif(locationcopy.get(i).distance(locationcopy.get(j))<=transmissionRange)\r\n \t\t\t{\r\n \t\t\t\tAdjArray[i][j]=1;\r\n \t\t\t\tAdjArray[j][i]=1;\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tAdjArray[i][j]=maxdist;\r\n \t\t\t\tAdjArray[j][i]=maxdist;\r\n \t\t\t}\r\n \t\r\n \tfor(i=0;i<locationcopy.size();i++)\r\n \t\tAdjArray[i][i]=0;\r\n \t\t\r\n\t\t\r\n \tint mdistindex,mindist;\r\n\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t { \r\n \t\t DistArray[i]=AdjArray[sourceIndex][i];\r\n \t if(DistArray[i]<maxdist) PreArray[i]=sourceIndex;\r\n \t else PreArray[i]=-1;\r\n \t }\r\n \t PreArray[sourceIndex]=-1; AdjArray[sourceIndex][sourceIndex]=1;\r\n \t for(j=0;j<(locationcopy.size()-1);j++)\r\n \t { \r\n \t\t mindist=maxdist; \r\n \t\t mdistindex=-1;\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t if((AdjArray[i][i]==0)&&(DistArray[i]<mindist))\r\n \t { \r\n \t \t mdistindex=i;\r\n \t \t mindist=DistArray[i];\r\n \t }\r\n \t if(mdistindex==-1) return new ArrayList<Vertex>(0);\r\n \t else\r\n \t { \r\n \t \t AdjArray[mdistindex][mdistindex]=1;\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t {\r\n \t if(AdjArray[i][i]==0)\r\n \t {\r\n \t if(DistArray[mdistindex]+AdjArray[mdistindex][i]<DistArray[i])\r\n \t { \r\n \t \t DistArray[i]=DistArray[mdistindex]+AdjArray[mdistindex][i];\r\n \t PreArray[i]=mdistindex;\r\n \t }\r\n \t }\r\n \t }\r\n \t }\r\n \t if(AdjArray[sinkIndex][sinkIndex]==1) break;\r\n \t }\r\n \t Stack<Integer> s=new Stack<Integer>();\r\n \t i=sinkIndex;\r\n \t s.push(i);\r\n \t while(PreArray[i]!=-1)\r\n \t {\r\n \t\t s.push(PreArray[i]);\r\n \t\t i=PreArray[i];\r\n \t }\r\n \t while(!s.isEmpty())\r\n \t {\r\n \t\t dijpath.add(locationcopy.get(s.pop()));\r\n \t }\r\n \treturn dijpath;\r\n }", "public void shortestPaths(int source) {\n\n\t\tlong start = 0;\n\t\tlong stop;\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tedgeList[v] = new Edge(vertexList[v].id, rand, 5000);\n\t\t}\n\t\t// creating object of fibonacci\n\t\tFHeap pq = new FHeap();\n\t\t// creating a map for checking\n\t\tMap<Integer, FHeap.Node> check = new HashMap<Integer, FHeap.Node>();\n\t\t// storing the mst costs\n\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tcheck.put(vertexList[v].id,\n\t\t\t\t\tpq.enqueue(vertexList[v].id, Double.POSITIVE_INFINITY));\n\t\t}\n\t\tstart = System.currentTimeMillis();\n\t\t// allot cost 0 to initial node\n\t\tpq.decreaseKey(check.get(vertexList[source].id), 0.0);\n\n\t\twhile (!pq.isEmpty()) {\n\t\t\t// take the current node and get its minimum cost\n\t\t\tFHeap.Node current = pq.dequeueMin();\n\n\t\t\t// store the values in the table\n\t\t\tresult.put(current.getValue(), current.getCost());\n\n\t\t\t// update the costs\n\t\t\tfor (Neighbor nbr = vertexList[current.getValue()].adjList; nbr != null; nbr = nbr.next) {\n\n\t\t\t\t// edge is not added if shortest cost is known\n\t\t\t\tif (result.containsKey(vertexList[nbr.vertexNumber].id))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// update cost to shortest\n\t\t\t\tFHeap.Node finalCost = check\n\t\t\t\t\t\t.get(vertexList[nbr.vertexNumber].id);\n\t\t\t\tif (nbr.weight < finalCost.getCost())\n\t\t\t\t\tpq.decreaseKey(finalCost, nbr.weight);\n\t\t\t}\n\t\t}\n\t\tstop = System.currentTimeMillis();\n\t\t// computing the time\n\t\ttime = stop - start;\n\n\t\t// calculate the MST cost\n\t\tfor (int i = 0; i < vertexList.length; i++) {\n\t\t\tsumHeapCost = (int) (sumHeapCost + result.get(i));\n\t\t}\n\t\t// for printing in case of input from file in fibonacci mode\n\t\n\t\t// System.out.println(sumHeapCost);\n\t}", "public int shortestPathBinaryMatrix(int[][] grid) {\n final int n = grid.length; \n if (grid[0][0] != 0 || grid[n - 1][n - 1] != 0) return -1;\n final Queue<Integer> wfsQueue = new LinkedList<>();\n wfsQueue.add(encode(0, 0, n));\n grid[0][0] = -1;\n final int[] coordinate = new int[2];\n final int[] coordinate2Move = new int[2];\n while (!wfsQueue.isEmpty()) {\n final int idx = wfsQueue.poll();\n decode(idx, n, coordinate);\n final int dis = grid[coordinate[0]][coordinate[1]];\n\n for (int[] movement : movements) {\n if (!canMove(coordinate, movement, n, grid, coordinate2Move)) continue;\n\n wfsQueue.add(encode(coordinate2Move[0], coordinate2Move[1], n));\n grid[coordinate2Move[0]][coordinate2Move[1]] = dis - 1;\n }\n }\n return grid[n - 1][n - 1] < 0 ? -grid[n - 1][n - 1] : -1 ;\n }", "public static List<GraphEdge<String, String>> shortestPath(Graph<String, String> graph, String src, String dest) {\n // ... implement BFS as described in HW6 ...\n\t Queue<GraphNode<String>> q = new LinkedList<GraphNode<String>>();\n\t \n\t // Each key in m is a visited node\n\t // Each value is a list containing the shortest path from start\n\t Map<GraphNode<String>, List<GraphEdge<String, String>>> m = new HashMap<GraphNode<String>, List<GraphEdge<String, String>>>();\n\t \n\t q.add(graph.getNode(src));\n\t m.put(graph.getNode(src), new ArrayList<GraphEdge<String, String>>());\n\t \n\t //{{Inv: m has a key for every node added to q so far\n\t //\t\t (even those that have since been removed)\n\t //\t The value associated with each key is the shortest path to that node}}\n\t while (!q.isEmpty()) {\n\t\t GraphNode<String> temp = q.remove();\n\t\t if (temp.getData().equals(dest)) {\n\t\t\t return m.get(temp);\n\t\t }\n\t\t \n\t\t Set<GraphEdge<String, String>> set = new TreeSet<GraphEdge<String, String>>();\n\t\t set.addAll(graph.getChildren(temp));\n\t\t \n\t\t for (GraphEdge<String, String> edge : set) {\n\t\t\t if (!m.containsKey(edge.getDestination())) {\n\t\t\t\t List<GraphEdge<String, String>> list = new ArrayList<GraphEdge<String, String>>(m.get(temp));\n\t\t\t\t list.add(edge);\n\t\t\t\t m.put(edge.getDestination(), list);\n\t\t\t\t q.add(edge.getDestination());\n\t\t\t }\n\t\t }\n\t }\n\t \n\t return null;\n }", "public void doDfsGraphMatrix(char[][] grid) {\n boolean[] myVisited = new boolean[8];\n // row number represents node, so row number will be pushed to stack\n Stack<Integer> stack = new Stack<>();\n stack.push(0);\n myVisited[0] = true;\n // should be same idea, when adj list, loop the row\n while (!stack.isEmpty()) {\n int r = stack.pop();\n System.out.print(\"[\" + r + \"] \");\n for (int c = 0; c < grid[r].length; c++) {\n // when there is a path\n if (grid[r][c] == '1' && !visited[c]) {\n stack.push(c);\n visited[c] = true;\n }\n }\n }\n\n\n }", "private static void computePaths(Vertex source) {\n source.minDistance = 0;\n // retrieves with log(n) time\n PriorityQueue<Vertex> vertexPriorityQueue = new PriorityQueue<>();\n\n //BFS traversal\n vertexPriorityQueue.add(source);\n\n // O((v + e) * log(v))\n while (!vertexPriorityQueue.isEmpty()) {\n // this poll always returns the shortest distance vertex at log(v) time\n Vertex vertex = vertexPriorityQueue.poll();\n\n //visit each edge exiting vertex (adjacencies)\n for (Edge edgeInVertex : vertex.adjacencies) {\n // calculate new distance between edgeInVertex and target\n Vertex targetVertex = edgeInVertex.target;\n double edgeWeightForThisVertex = edgeInVertex.weight;\n double distanceThruVertex = vertex.minDistance + edgeWeightForThisVertex;\n if (distanceThruVertex < targetVertex.minDistance) {\n // modify the targetVertex with new calculated minDistance and previous vertex\n // by removing the old vertex and add new vertex with updates\n vertexPriorityQueue.remove(targetVertex);\n targetVertex.minDistance = distanceThruVertex;\n // update previous with the shortest distance vertex\n targetVertex.previous = vertex;\n vertexPriorityQueue.add(targetVertex);// adding takes log(v) time because needs to heapify\n }\n }\n }\n }", "public static void computePaths(Vertex source){\n\t\tsource.minDistance=0;\n\t\t//visit each vertex u, always visiting vertex with smallest minDistance first\n\t\tPriorityQueue<Vertex> vertexQueue=new PriorityQueue<Vertex>();\n\t\tvertexQueue.add(source);\n\t\twhile(!vertexQueue.isEmpty()){\n\t\t\tVertex u = vertexQueue.poll();\n\t\t\tSystem.out.println(\"For: \"+u);\n\t\t\tfor (Edge e: u.adjacencies){\n\t\t\t\tVertex v = e.target;\n\t\t\t\tSystem.out.println(\"Checking: \"+u+\" -> \"+v);\n\t\t\t\tdouble weight=e.weight;\n\t\t\t\t//relax the edge (u,v)\n\t\t\t\tdouble distanceThroughU=u.minDistance+weight;\n\t\t\t\tif(distanceThroughU<v.minDistance){\n\t\t\t\t\tSystem.out.println(\"Updating minDistance to \"+distanceThroughU);\n\t\t\t\t\tv.minDistance=distanceThroughU;\n\t\t\t\t\tv.previous=u;\n\t\t\t\t\t//move the vertex v to the top of the queue\n\t\t\t\t\tvertexQueue.remove(v);\n\t\t\t\t\tvertexQueue.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static ArrayList<Connection> pathFindDijkstra(Graph graph, int start, int goal) {\n\t\tNodeRecord startRecord = new NodeRecord();\r\n\t\tstartRecord.setNode(start);\r\n\t\tstartRecord.setConnection(null);\r\n\t\tstartRecord.setCostSoFar(0);\r\n\t\tstartRecord.setCategory(OPEN);\r\n\t\t\r\n\t\tArrayList<NodeRecord> open = new ArrayList<NodeRecord>();\r\n\t\tArrayList<NodeRecord> close = new ArrayList<NodeRecord>();\r\n\t\topen.add(startRecord);\r\n\t\tNodeRecord current = null;\r\n\t\tdouble endNodeCost = 0;\r\n\t\twhile(open.size() > 0){\r\n\t\t\tcurrent = getSmallestCSFElementFromList(open);\r\n\t\t\tif(current.getNode() == goal){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tGraphNode node = graph.getNodeById(current.getNode());\r\n\t\t\tArrayList<Connection> connections = node.getConnection();\r\n\t\t\tfor( Connection connection :connections){\r\n\t\t\t\t// get the cost estimate for end node\r\n\t\t\t\tint endNode = connection.getToNode();\r\n\t\t\t\tendNodeCost = current.getCostSoFar() + connection.getCost();\r\n\t\t\t\tNodeRecord endNodeRecord = new NodeRecord();\r\n\t\t\t\t// if node is closed skip it\r\n\t\t\t\tif(listContains(close, endNode))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t// or if the node is in open list\r\n\t\t\t\telse if (listContains(open,endNode)){\r\n\t\t\t\t\tendNodeRecord = findInList(open, endNode);\r\n\t\t\t\t\t// print\r\n\t\t\t\t\t// if we didn't get shorter route then skip\r\n\t\t\t\t\tif(endNodeRecord.getCostSoFar() <= endNodeCost) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// else node is not visited yet\r\n\t\t\t\telse {\r\n\t\t\t\t\tendNodeRecord = new NodeRecord();\r\n\t\t\t\t\tendNodeRecord.setNode(endNode);\r\n\t\t\t\t}\r\n\t\t\t\t//update the node\r\n\t\t\t\tendNodeRecord.setCostSoFar(endNodeCost);\r\n\t\t\t\tendNodeRecord.setConnection(connection);\r\n\t\t\t\t// add it to open list\r\n\t\t\t\tif(!listContains(open, endNode)){\r\n\t\t\t\t\topen.add(endNodeRecord);\r\n\t\t\t\t}\r\n\t\t\t}// end of for loop for connection\r\n\t\t\topen.remove(current);\r\n\t\t\tclose.add(current);\r\n\t\t}// end of while loop for open list\r\n\t\tif(current.getNode() != goal)\r\n\t\t\treturn null;\r\n\t\telse { //get the path\r\n\t\t\tArrayList<Connection> path = new ArrayList<>();\r\n\t\t\twhile(current.getNode() != start){\r\n\t\t\t\tpath.add(current.getConnection());\r\n\t\t\t\tint newNode = current.getConnection().getFromNode();\r\n\t\t\t\tcurrent = findInList(close, newNode);\r\n\t\t\t}\r\n\t\t\tCollections.reverse(path);\r\n\t\t\treturn path;\r\n\t\t}\r\n\t}", "public static void connectNetwork(int src, int dest, boolean printPath)\r\n\t{\r\n\t\tint v = routers;\r\n\t\t\r\n\t\tint parent[] = new int[v];//parent node array\r\n\t\tint dist[] = new int[v];// distance array\r\n\t\tboolean visited[] = new boolean[v];// visited will be either true or false\r\n\t\t\r\n\t\t// initialize parent, distance arrays\r\n\t\tfor (int i = 0; i < v; i++ ) { \r\n\t\t\tvisited[i] = false;\r\n\t\t\tparent[i] = -1;\r\n\t\t\tdist[i] = Integer.MAX_VALUE;\r\n\t\t}\r\n\t\t\r\n\t\t// initialize the source distance as zero\r\n\t\tdist[src] = 0;\r\n\t\t\r\n\t\t// get minimum edge from the unvisited nodes\r\n\t\tfor (int count = 0; count < v-1; count++) { // loop for all v nodes\r\n\t\t\t\r\n\t\t\tint start = -1;\r\n\t\t\tint min = Integer.MAX_VALUE;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\tif (visited[i] == false && dist[i] < min) {\r\n\t\t\t\t\tmin = dist[i];\r\n\t\t\t\t\tstart = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// minimum distance is computed for all connected edges\r\n\t\t\tif (start == -1) \r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t// update the current node as visited\r\n\t\t\tvisited[start] = true;\r\n\t\t\t\r\n\t\t\t// update all adjacent nodes' distance array\r\n\t\t\tfor (int end = 0; end < v; end++) {\r\n\t\t\t\tif ((visited[end] != true) && (graph[start][end] != -1) &&\r\n\t\t\t\t\t\t(dist[start] != Integer.MAX_VALUE) &&\r\n\t\t\t\t\t\t(dist[start] + graph[start][end] < dist[end])) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdist[end] = dist[start] + graph[start][end];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// start node is the parent node in BFS tree\r\n\t\t\t\t\tparent[end] = start;\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();\r\n\t\t\r\n\t\tif (dest != -1) {\r\n\t\t\t\r\n\t\t\t// Case#4: shortest path between source and destination nodes \r\n\t\t\tif (parent[dest] == -1) {\r\n\t\t\t\tSystem.out.println(\"There is no path from \" + (src+1) + \" to \" + (dest+1) + \" exists.\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Shortest distance from \" + (src+1) + \" to \" + (dest+1) + \" is: \" + dist[dest]);\r\n\t\t\t\tSystem.out.print(\"Corresponding Shortest Path is: \");\r\n\t\t\t\tprintNodes(parent, parent[dest], src);\r\n\t\t\t\tSystem.out.println(dest+1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n System.out.println(\"The Shortest Distance from node you entered, \"+ (src+1) + \" are\\n\");\r\n //Printing shortest path length\r\n\t\t\tSystem.out.println(\"Destination\\tDistance\\n========================\");\r\n for (int i = 0; i < v; i++) {\r\n System.out.println(\"\\t\"+ (i+1) + \"\\t \"+ dist[i]); // Printing the node number and distance\r\n }\r\n \r\n\t\t\tif (printPath == true) {\r\n\t\t\t\t\r\n\t\t\t\t// case#2: Print all shortest paths from source node\r\n\t\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\t\tif (i == src)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse if (parent[i] == -1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Shortest path from \" + (src+1) + \" to \" + (i+1) + \" doesn't exist.\");\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.print(\"Shortest Path from \" + (src+1) + \" to \" + (i+1) + \" is: \");\r\n\t\t\t\t\tprintNodes(parent, parent[i], src);\r\n\t\t\t\t\tSystem.out.println(i+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}", "void dijkstra(Coordinate startName) {\n if (!graph.containsKey(startName)) {\n //test use print statement\n //System.out.printf(\"Graph doesn't contain start vertex \\\"%s\\\"\\n\", startName);\n return;\n }\n final Node source = graph.get(startName);\n NavigableSet<Node> queue = new TreeSet<>();\n\n // set-up vertices\n for (Node node : graph.values()) {\n node.previous = node == source ? source : null;\n node.dist = node == source ? 0 : Integer.MAX_VALUE;\n queue.add(node);\n }\n dijkstra(queue);\n }", "private void computeShortestPathsFromSource(V source) {\n\t\tBFSDistanceLabeler<V, E> labeler = new BFSDistanceLabeler<V, E>();\n\t\tlabeler.labelDistances(mGraph, source);\n\t\tdistances = labeler.getDistanceDecorator();\n\t\tMap<V, Number> currentSourceSPMap = new HashMap<V, Number>();\n\t\tMap<V, E> currentSourceEdgeMap = new HashMap<V, E>();\n\n\t\tfor (V vertex : mGraph.getVertices()) {\n\n\t\t\tNumber distanceVal = distances.get(vertex);\n\t\t\t// BFSDistanceLabeler uses -1 to indicate unreachable vertices;\n\t\t\t// don't bother to store unreachable vertices\n\t\t\tif (distanceVal != null && distanceVal.intValue() >= 0) {\n\t\t\t\tcurrentSourceSPMap.put(vertex, distanceVal);\n\t\t\t\tint minDistance = distanceVal.intValue();\n\t\t\t\tfor (E incomingEdge : mGraph.getInEdges(vertex)) {\n\t\t\t\t\tfor (V neighbor : mGraph\n\t\t\t\t\t\t\t.getIncidentVertices(incomingEdge)) {\n\t\t\t\t\t\tif (neighbor.equals(vertex))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t// V neighbor = mGraph.getOpposite(vertex,\n\t\t\t\t\t\t// incomingEdge);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tNumber predDistanceVal = distances.get(neighbor);\n\n\t\t\t\t\t\tint pred_distance = predDistanceVal.intValue();\n\t\t\t\t\t\tif (pred_distance < minDistance && pred_distance >= 0) {\n\t\t\t\t\t\t\tminDistance = predDistanceVal.intValue();\n\t\t\t\t\t\t\tcurrentSourceEdgeMap.put(vertex, incomingEdge);\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\tmDistanceMap.put(source, currentSourceSPMap);\n\t\tmIncomingEdgeMap.put(source, currentSourceEdgeMap);\n\t}", "private void calculateShortestRoute(String strSourceTerminal){\n\t\tshortestTravelTime = new HashMap<>();\n\n //stores parent of every terminal in shortest travel time\n parent = new HashMap<>();\n \n //heap + map data structure\n MinimumHeap<BaggageTerminal> minHeap = new MinimumHeap<>();\n\n //initialize all terminal with infinite distance from source terminal\n for(BaggageTerminal baggageTerminal : graph.getTerminals()){\n minHeap.add(Integer.MAX_VALUE, baggageTerminal);\n }\n \n BaggageTerminal sourceTerminal = graph.getTerminal(strSourceTerminal);\n \n //set distance of source terminal to itself 0\n minHeap.decrease(sourceTerminal, 0);\n\n //put it in map\n shortestTravelTime.put(sourceTerminal, 0);\n\n //source terminal parent is null\n parent.put(sourceTerminal, null);\n\n //iterate till heap is not empty\n while(!minHeap.empty()){\n //get the min value from heap node which has vertex and distance of that vertex from source vertex.\n MinimumHeap<BaggageTerminal>.Node heapNode = minHeap.extractMinNode();\n BaggageTerminal currentTerminal = heapNode.key;\n\n //update shortest distance of current vertex from source vertex\n shortestTravelTime.put(currentTerminal, heapNode.weight);\n\n //iterate through all connections of current terminal\n for(Connection connection : currentTerminal.getConnections()){\n\n //get the adjacent terminal\n BaggageTerminal adjacent = getConnectingTerminal(currentTerminal, connection);\n\n //if heap does not contain adjacent vertex means adjacent vertex already has shortest distance from source vertex\n if(!minHeap.containsData(adjacent)){\n continue;\n }\n\n //add distance of current vertex to edge weight to get distance of adjacent vertex from source vertex\n //when it goes through current vertex\n int newDistance = shortestTravelTime.get(currentTerminal) + connection.getWeight();\n\n //see if this above calculated distance is less than current distance stored for adjacent vertex from source vertex\n if(minHeap.getWeight(adjacent) > newDistance) {\n minHeap.decrease(adjacent, newDistance);\n parent.put(adjacent, currentTerminal);\n }\n }\n }\n return;\n }", "public static <V> Dictionary<V, DijkstraResult<V>> getShortestPathDijkstra(Graph<V> graph, V value) {\n V[] vertices = graph.getValuesAsArray();\n double[][] matriz = graph.getGraphStructureAsMatrix();\n\n double[] distancias = new double[vertices.length];\n V[] camino = (V[]) new Object[vertices.length];\n int pos = buscarPosicion(value, vertices);\n\n for (int x = 0; x < vertices.length; x++) { // Se llenan los arreglos con la informacion de sus adyacentes.\n if (pos == x) {\n distancias[x] = 0;\n camino[x] = null;\n } else {\n if (matriz[pos][x] == -1) {\n distancias[x] = Integer.MAX_VALUE - 1;\n camino[x] = vertices[pos];\n } else {\n distancias[x] = matriz[pos][x];\n camino[x] = vertices[pos];\n }\n }\n }\n\n Set<V> revisados = new LinkedListSet<>();\n revisados.put(value);\n while (revisados.size() < vertices.length) {\n double menor = Integer.MAX_VALUE;\n V actual = null;\n for (int x = 0; x < vertices.length; x++) {\n if (distancias[x] < menor) {\n if (!revisados.isMember(vertices[x])) {\n menor = distancias[x];\n actual = vertices[x];\n }\n }\n }\n\n pos = buscarPosicion(actual, vertices);\n for (int x = 0; x < vertices.length; x++) { // Se recorre la matriz para buscar adyacencias.\n if (matriz[pos][x] != -1) { // Si existe arist\n if (menor + matriz[pos][x] < distancias[x]) {\n distancias[x] = menor + matriz[pos][x];\n camino[x] = actual;\n }\n }\n }\n revisados.put(actual);\n }\n Dictionary<V, DijkstraResult<V>> diccionario = new Hashtable<>();\n for (int x = 0; x < vertices.length; x++) {\n DijkstraResult<V> aux = new DijkstraResult<>(vertices[x], camino[x], distancias[x]);\n diccionario.put(vertices[x], aux);\n }\n return diccionario;\n }", "public int[] shortestReach(int startId) {\n System.out.println(\"Graph with startId: \"+startId);\n for(int i=0 ; i<size ; i++){\n for(int j=0 ; j<size ; j++){\n System.out.print(graph[i][j]);\n }\n System.out.println(\"\");\n }\n\n int[] dist = new int[size];\n boolean[] srg = new boolean[size];\n\n //intialize dist and srg\n for(int i=0 ; i<size ; i++){\n dist[i] = Integer.MAX_VALUE;\n srg[i] = false;\n }\n\n //Start node\n dist[startId] = 0;\n\n for(int i=0 ; i<size ; i++){\n int u = minDist(dist, srg);\n\n srg[u] = true;\n\n for( int v=0; v<size ; v++){\n if(!srg[v] && graph[u][v]!=0 && dist[u]!=Integer.MAX_VALUE && dist[u] + graph[u][v] < dist[v]){\n dist[v] = dist[u] + graph[u][v];\n }\n }\n }\n\n int[] result = new int[size-1];\n int indx = 0;\n for(int i=0 ; i<size ; i++){\n if(i != startId){\n if(dist[i] == Integer.MAX_VALUE)\n result[indx] = -1;\n else{\n result[indx] = dist[i];\n }\n indx++;\n }\n\n }\n\n return result;\n }", "@Override\r\n\tpublic void Dijkstra(E src) {\r\n\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getDistance() > (long)s.getDistance() + (long)ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(ale.getDst());\r\n\t\t\t\t\t\td.setDistance(s.getDistance() + ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\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}", "ShortestPath(UndirectedWeightedGraph graph, String startNodeId, String endNodeId) throws NotFoundNodeException {\r\n\t\t\r\n\t\tif (!graph.containsNode(startNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, startNodeId);\r\n\t\t}\t\t\r\n\t\tif (!graph.containsNode(endNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, endNodeId);\r\n\t\t}\t\r\n\r\n\t\tsrc = startNodeId;\r\n\t\tdst = endNodeId;\r\n\t\t\r\n\t\tif (endNodeId.equals(startNodeId)) {\r\n\t\t\tlength = 0;\r\n\t\t\tnumOfPath = 1;\r\n\t\t\tArrayList<String> path = new ArrayList<String>();\r\n\t\t\tpath.add(startNodeId);\r\n\t\t\tpathList.add(path);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// create a HashMap of updated distance from the starting node to every node\r\n\t\t\t// initially it is 0, inf, inf, inf, ...\r\n\t\t\tHashMap<String, Double> distance = new HashMap<String, Double>();\t\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif (nodeId.equals(startNodeId)) {\r\n\t\t\t\t\t// the starting node will always have 0 distance from itself\r\n\t\t\t\t\tdistance.put(nodeId, 0.0);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// the others have initial distance is infinity\r\n\t\t\t\t\tdistance.put(nodeId, Double.MAX_VALUE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// a HashMap of preceding node of each node\r\n\t\t\tHashMap<String, HashSet<String>> precedence = new HashMap<String, HashSet<String>>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif ( nodeId.equals(startNodeId) ) {\r\n\t\t\t\t\tprecedence.put(nodeId, null);\t// the start node will have no preceding node\r\n\t\t\t\t}\r\n\t\t\t\telse { \r\n\t\t\t\t\tprecedence.put(nodeId, new HashSet<String>());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\tSet<String> unvisitedNode = new HashSet<String>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tunvisitedNode.add(nodeId);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble minUnvisitedLength;\r\n\t\t\tString minUnvisitedNode;\r\n\t\t\t// run loop while not all node is visited\r\n\t\t\twhile ( unvisitedNode.size() != 0 ) {\r\n\t\t\t\t// find the unvisited node with minimum current distance in distance list\r\n\t\t\t\tminUnvisitedLength = Double.MAX_VALUE;\r\n\t\t\t\tminUnvisitedNode = \"\";\r\n\t\t\t\tfor (String nodeId : unvisitedNode) {\r\n\t\t\t\t\tif (distance.get(nodeId) < minUnvisitedLength) {\r\n\t\t\t\t\t\tminUnvisitedNode = nodeId;\r\n\t\t\t\t\t\tminUnvisitedLength = distance.get(nodeId); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// if there are no node that can be visited from the unvisitedNode, break the loop \r\n\t\t\t\tif (minUnvisitedLength == Double.MAX_VALUE) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// remove the node from unvisitedNode\r\n\t\t\t\tunvisitedNode.remove(minUnvisitedNode);\r\n\t\t\t\t\r\n\t\t\t\t// update the distance of its neighbors\r\n\t\t\t\tfor (Node neighborNode : graph.getNodeList().get(minUnvisitedNode).getNeighbors().keySet()) {\r\n\t\t\t\t\tdouble distanceFromTheMinNode = distance.get(minUnvisitedNode) + graph.getNodeList().get(minUnvisitedNode).getNeighbors().get(neighborNode).getWeight();\r\n\t\t\t\t\t// if the distance of the neighbor can be shorter from the current node, change \r\n\t\t\t\t\t// its details in distance and precedence\r\n\t\t\t\t\tif ( distanceFromTheMinNode < distance.get(neighborNode.getId()) ) {\r\n\t\t\t\t\t\tdistance.replace(neighborNode.getId(), distanceFromTheMinNode);\r\n\t\t\t\t\t\t// renew the precedence of the neighbor node\r\n\t\t\t\t\t\tprecedence.put(neighborNode.getId(), new HashSet<String>());\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (distanceFromTheMinNode == distance.get(neighborNode.getId())) {\r\n\t\t\t\t\t\t// unlike dijkstra's algorithm, multiple path should be update into the precedence\r\n\t\t\t\t\t\t// if from another node the distance is the same, add it to the precedence\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// if the current node in the process is the end node, we can stop the while loop here\r\n\t\t\t\tif (minUnvisitedNode == endNodeId) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (distance.get(endNodeId) == Double.MAX_VALUE) {\r\n\t\t\t\t// in case there is no shortest path between the 2 nodes\r\n\t\t\t\tlength = 0;\r\n\t\t\t\tnumOfPath = 0;\r\n\t\t\t\tpathList = null;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// other wise we have these information\r\n\t\t\t\tlength = distance.get(endNodeId);\r\n\t\t\t\t//numOfPath = this.getNumPath(precedence, startNodeId, endNodeId);\r\n\t\t\t\tpathList = this.findPathList(precedence, startNodeId, endNodeId);\r\n\t\t\t\tnumOfPath = pathList.size();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\t// END ELSE\t\t\r\n\t}", "public InTree<V,E> weightedShortestPaths(V source)\n\t\tthrows NegativeWeightEdgeException, DisconnectedGraphException;", "public double shortestPathDist(int src, int dest);", "public static void shortestPathWithEdges(Graph graph, Integer source, Integer destination)\n {\n Map<Integer, DistanceInfo> distanceTable = DistanceTable.build(graph, source, true);\n shortestPath(distanceTable, source, destination);\n }", "@Override\r\n\tpublic List<Integer> getShortestPath(int source, int destination, GraphStructure graph) {\r\n\t\tshortestPathList = new ArrayList<Integer>();\r\n\t\tisVisited = new boolean[graph.getNumberOfVertices()];\r\n\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\tdistanceArray[source]=0;\r\n\t\tcalculateShortestDistances(graph, source, destination);\r\n\t\tfor(Integer value : shortestPathList) {\r\n\t\t\tSystem.out.println(value+\" \");\r\n\t\t}\r\n\t\treturn shortestPathList;\r\n\t}", "@Override\r\n public List<node_info> shortestPath(int src, int dest) {\r\n double i = shortestPathDist(src, dest);\r\n double j, k, s, mark = 1;\r\n ArrayList<node_info> Rlist = new ArrayList<>();\r\n ArrayList<node_info> Llist = new ArrayList<>();\r\n Rlist.clear();\r\n Llist.clear();\r\n j = i;\r\n for (node_info curr : this.Graph.getV()) {\r\n curr.setInfo(\"clear\");\r\n }\r\n this.Graph.getNode(src).setInfo(\"tmp\");\r\n Rlist.add(this.Graph.getNode(dest));\r\n node_info nd = this.Graph.getNode(dest);\r\n node_info temp = this.Graph.getNode(dest);\r\n while (j != 0 && j > 0) {\r\n for (node_info curr0 : this.Graph.getV(nd.getKey())) {\r\n if (curr0.getInfo() != null) {\r\n temp = curr0;\r\n k = this.Graph.getEdge(nd.getKey(), curr0.getKey());\r\n s = j - k;\r\n if ((s - curr0.getTag() < 0.001 && s - curr0.getTag() > -0.001) && nd.getInfo() != null) {\r\n Rlist.add(curr0);\r\n j = curr0.getTag();\r\n curr0.setInfo(\"tmp\");\r\n mark = 1;\r\n nd = curr0;\r\n }\r\n }\r\n }\r\n if (mark == 0) {\r\n i = j;\r\n temp.setInfo(null);\r\n Rlist.clear();\r\n Rlist.add(this.Graph.getNode(dest));\r\n mark = 1;\r\n }\r\n mark = 0;\r\n }\r\n for (int t = (Rlist.size() - 1); t >= 0; t--) {\r\n Llist.add(Rlist.get(t));\r\n }\r\n return Llist;\r\n }", "@Override\n public Double calculateShortestPathFromSource(String from, String to) {\n Node source = graph.getNodeByName(from);\n Node destination = graph.getNodeByName(to);\n source.setDistance(0d);\n Set<Node> settledNodes = new HashSet<>();\n PriorityQueue<Node> unsettledNodes = new PriorityQueue<>(Comparator.comparing(Node::getDistance));\n unsettledNodes.add(source);\n while (unsettledNodes.size() != 0) {\n Node currentNode = unsettledNodes.poll();\n for (Map.Entry<Node, Double> adjacencyPair : currentNode.getAdjacentNodes().entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Double distance = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n calculateMinimumDistance(adjacentNode, distance, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return destination.getDistance() == Double.MAX_VALUE ? -9999d : destination.getDistance();\n }", "@Override\r\n\tpublic void FloydWarshall() {\r\n\t\tgraphForWarshall = new AdjacencyMatrixGraph<>(getOrder(), isDirected);\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tgraphForWarshall.insertVertex(t);\r\n\t\t});\r\n\t\tadjacencyLists.forEach((E t, ArrayList<Edge<E>> u) -> {\r\n\t\t\tfor(Edge<E> ale : u) {\r\n\t\t\t\tgraphForWarshall.link(ale.getSrc(), ale.getDst(), ale.getWeight());\r\n\t\t\t}\r\n\t\t});\r\n\t\tgraphForWarshall.FloydWarshall();\r\n\t}", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "@Override\n\tpublic double shortestPathDist(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn Double.parseDouble(dwg.getNode(dest).getInfo());\n\t}", "private static Map<String, Integer> createDijikstraTable(final DirectedGraph directedGraph) {\n final Map<String, Integer> currentShortestPaths = new HashMap<>();\n directedGraph.getGraphAttributes().keySet().forEach(key -> currentShortestPaths.put(key, null));\n return currentShortestPaths;\n }", "@Test\n void shortestPath() {\n directed_weighted_graph g0 = new DW_GraphDS();\n dw_graph_algorithms ag0 = new DWGraph_Algo();\n node_data n0 = new NodeData(0);\n node_data n1 = new NodeData(1);\n node_data n2 = new NodeData(2);\n node_data n3 = new NodeData(3);\n g0.addNode(n1);\n g0.addNode(n2);\n g0.addNode(n3);\n g0.connect(1, 2, 5);\n g0.connect(2, 3, 3);\n g0.connect(1, 3, 15);\n g0.connect(3, 2, 1);\n ag0.init(g0);\n\n List<node_data> list0 = ag0.shortestPath(1, 1); //should go from 1 -> 1\n int[] list0Test = {1, 1};\n int i = 0;\n for (node_data n : list0) {\n\n assertEquals(n.getKey(), list0Test[i]);\n i++;\n }\n\n List<node_data> list1 = ag0.shortestPath(1, 2); //should go 1 -> 2\n int[] list1Test = {1, 2};\n i = 0;\n for (node_data n : list1) {\n\n assertEquals(n.getKey(), list1Test[i]);\n i++;\n }\n g0.connect(1, 3, 2);\n List<node_data> list2 = ag0.shortestPath(1, 2); //should go 1 -> 3 -> 2\n int[] list2Test = {1, 3, 2};\n i = 0;\n for (node_data n : list2) {\n\n assertEquals(n.getKey(), list2Test[i]);\n i++;\n }\n\n g0.connect(1, 3, 10);\n List<node_data> list3 = ag0.shortestPath(1,3);\n int[] list3Test = {1, 2, 3};\n i = 0;\n for(node_data n: list3) {\n\n assertEquals(n.getKey(), list3Test[i]);\n i++;\n }\n/*\n\n List<node_data> list4 = ag0.shortestPath(1,4);\n int[] list4Test = {1, 4};\n i = 0;\n for(node_data n: list4) {\n\n assertEquals(n.getKey(), list4Test[i]);\n i++;\n }\n\n List<node_data> list5 = ag0.shortestPath(4,1);\n int[] list5Test = {4, 1};\n i = 0;\n for(node_data n: list5) {\n\n assertEquals(n.getKey(), list5Test[i]);\n i++;\n }\n*/\n }", "@Test public void testPublic14() {\n Graph<String> graph= TestGraphs.testGraph2();\n List<String> shortestPath= new ArrayList<String>();\n\n assertEquals(1, graph.Dijkstra(\"apple\", \"banana\", shortestPath));\n assertEquals(\"apple banana\", TestGraphs.listToString(shortestPath));\n\n assertEquals(2, graph.Dijkstra(\"apple\", \"cherry\", shortestPath));\n assertEquals(\"apple banana cherry\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(3, graph.Dijkstra(\"apple\", \"date\", shortestPath));\n assertEquals(\"apple banana cherry date\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(4, graph.Dijkstra(\"apple\", \"elderberry\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(5, graph.Dijkstra(\"apple\", \"fig\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry fig\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(6, graph.Dijkstra(\"apple\", \"guava\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry fig guava\",\n TestGraphs.listToString(shortestPath));\n }", "public boolean DijkstraHelp(int src, int dest) {\n PriorityQueue<Entry>queue=new PriorityQueue();//queue storages the nodes that we will visit by the minimum tag\n //WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n initializeTag();\n initializeInfo();\n node_info first=this.ga.getNode(src);\n first.setTag(0);//distance from itself=0\n queue.add(new Entry(first,first.getTag()));\n while(!queue.isEmpty()) {\n Entry pair=queue.poll();\n node_info current= pair.node;\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n Collection<node_info> listNeighbors = this.ga.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for(node_info n:Neighbors) {\n\n if(n.getTag()>ga.getEdge(n.getKey(),current.getKey())+current.getTag())\n {\n n.setTag(current.getTag() + ga.getEdge(n.getKey(), current.getKey()));//compute the new tag\n }\n queue.add(new Entry(n,n.getTag()));\n }\n }\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext()){\n if(it.next().getInfo()==null) return false;\n }\n return true;\n }", "public static <V> void printAllShortestPaths(Graph<V> graph) {\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] pesos = new double[matrizPesos.length][matrizPesos.length];\n V[] vertices = graph.getValuesAsArray();\n V[][] caminos = (V[][]) new Object[matrizPesos.length][matrizPesos.length];\n for (int x = 0; x < matrizPesos.length; x++) {\n for (int y = 0; y < matrizPesos.length; y++) {\n if (x == y) {\n pesos[x][y] = -1;\n } else {\n if (matrizPesos[x][y] == -1) {\n pesos[x][y] = Integer.MAX_VALUE; //Si no existe arista se pone infinito\n } else {\n pesos[x][y] = matrizPesos[x][y];\n }\n }\n caminos[x][y] = vertices[y];\n }\n }\n for (int x = 0; x < vertices.length; x++) { // Para cada uno de los vertices del grafo\n for (int y = 0; y < vertices.length; y++) { // Recorre la fila correspondiente al vertice\n for (int z = 0; z < vertices.length; z++) { //Recorre la columna correspondiente al vertice\n if (y != x && z != x) {\n double tam2 = pesos[y][x];\n double tam1 = pesos[x][z];\n if (pesos[x][z] != -1 && pesos[y][x] != -1) {\n double suma = pesos[x][z] + pesos[y][x];\n if (suma < pesos[y][z]) {\n pesos[y][z] = suma;\n caminos[y][z] = vertices[x];\n }\n }\n }\n }\n }\n }\n\n //Cuando se termina el algoritmo, se imprimen los caminos\n for (int x = 0; x < vertices.length; x++) {\n for (int y = 0; y < vertices.length; y++) {\n boolean seguir = true;\n int it1 = y;\n String hilera = \"\";\n while (seguir) {\n if (it1 != y) {\n hilera = vertices[it1] + \"-\" + hilera;\n } else {\n hilera += vertices[it1];\n }\n if (caminos[x][it1] != vertices[it1]) {\n int m = 0;\n boolean continuar = true;\n while (continuar) {\n if (vertices[m].equals(caminos[x][it1])) {\n it1 = m;\n continuar = false;\n } else {\n m++;\n }\n }\n } else {\n if (x == y) {\n System.out.println(\"El camino entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera);\n } else {\n hilera = vertices[x] + \"-\" + hilera;\n if (pesos[x][y] == Integer.MAX_VALUE) {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera + \" con distancia de: \" + (pesos[x][y]));\n }\n }\n seguir = false;\n }\n }\n }\n System.out.println();\n }\n }", "public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for (int goalNode = 0; goalNode < wordGraph.V(); goalNode++) {\n Iterable<Integer> shortestPath = bfs.pathTo(goalNode);\n int pathLength = -1;\n if (shortestPath != null) {\n for (int edge : shortestPath) {\n pathLength++;\n }\n }\n if (pathLength != -1) {\n }\n System.out.println(pathLength);\n }\n }\n }", "int[] bfs(int[][] graph,int source){\n int len=graph.length;\n int shortest_path[]=new int[len];\n int parent[]=new int[len];\n Arrays.fill(shortest_path, Integer.MAX_VALUE/2);\n shortest_path[source]=0;\n Queue<Integer> q=new LinkedList<>();\n q.add(source);\n while (!q.isEmpty()) { \n int u=q.poll();\n for(int v:graph[u]){\n if(shortest_path[v]==Integer.MAX_VALUE/2){\n q.add(v);\n shortest_path[v]=shortest_path[u]+1;\n parent[v]=u;\n }\n }\n }\n return shortest_path;\n }", "private void generatePath(List<Coordinate> source, List<Coordinate> path) {\n for (int i = 0; i < source.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = source.get(i);\n Coordinate end = source.get(i + 1);\n graph.dijkstra(start);\n graph.printPath(end);\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n }\n }", "@Override\n public List dijkstrasShortestPath(T start, T end) {\n Vertex<T> origin = new Vertex<>(start);\n Vertex<T> destination = new Vertex<>(end);\n List<Vertex<T>> path;\n\n settledNodes = new HashSet<>();\n unSettledNodes = new HashSet<>();\n distancesBetweenNodes = new HashMap<>();\n predecessors = new HashMap<>();\n\n distancesBetweenNodes.put(origin,0);\n unSettledNodes.add(origin);\n\n while(unSettledNodes.size() > 0){\n Vertex<T> minimumWeightedVertex = getMinimum(unSettledNodes);\n settledNodes.add(minimumWeightedVertex);\n unSettledNodes.remove(minimumWeightedVertex);\n findMinimumDistance(minimumWeightedVertex);\n }\n path = getPath(destination);\n return path;\n\n }", "private static void findShortestPath(ArrayList<WeightedEdge> edges, int start, int dest, int nNodes) {\n int costs[] = new int[nNodes];\n int parents[] = new int[nNodes];\n boolean doneWithNode[] = new boolean[nNodes];\n\n // cost[i] has the cost of getting to node number i or is UNKNOWN if no cost figure out yet.\n // parent[i] contains the parent (or the way) we got to node i.\n // done[i] is true if we've already worked on all the children of node i.\n\n // Initialize the arrays.\n for (int i = 0; i<nNodes; i++) {\n costs[i] = UNKNOWN;\n parents[i] = UNKNOWN;\n doneWithNode[i] = false;\n }\n\n int node = start; // This is the node we are working on. Let's start with start node.\n costs[node] = 0; // The cost of getting to the start node is 0!\n\n // While not done processing all the nodes...\n\n // Loop through all the edges (edges array list).\n // Skip those edges whose source is doesn't match the node we're working on.\n\n // For edge (that has source of current node) figure out potential to\n // get it. (How much does it cost to get to node we're on? Add to\n // that the cost of the edge. That's the new price to set to dest of edge.\n\n // Is that a new low cost for that dest edge node?\n // Or is the dest edge node cost currently UNKNOWN? That means we have no cost.\n // If so, store the cost. Store the parent.\n\n // Once done with all the edges, mark the current node as\n // done being processed.\n doneWithNode[node] = true;\n\n // Get next node to work on.\n node = getLowestCostUnprocessedNode(costs, doneWithNode);\n\n // Done with while loop\n\n for (int i=0; i<parents.length; i++) {\n System.out.println(\"Node: \" + i + \" Cost: \" + costs[i] + \" Backtrace Parent: \" + parents[i]);\n }\n\n backtrace(dest, parents);\n }", "private void expandNode() {\r\n\t\t\t// Dijkstra's algorithm to handle separately\r\n\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\tCell u;\r\n\t\t\t\t// 11: while Q is not empty:\r\n\t\t\t\tif (graph.isEmpty()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// 12: u := vertex in Q (graph) with smallest distance in dist[]\r\n\t\t\t\t// ;\r\n\t\t\t\t// 13: remove u from Q (graph);\r\n\t\t\t\tu = graph.remove(0);\r\n\t\t\t\t// Add vertex u in closed set\r\n\t\t\t\tclosedSet.add(u);\r\n\t\t\t\t// If target has been found ...\r\n\t\t\t\tif (u.row == targetPos.row && u.col == targetPos.col) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Counts nodes that have expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[u.row][u.col] = CLOSED;\r\n\t\t\t\t// 14: if dist[u] = infinity:\r\n\t\t\t\tif (u.dist == INFINITY) {\r\n\t\t\t\t\t// ... then there is no solution.\r\n\t\t\t\t\t// 15: break;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t// 16: end if\r\n\t\t\t\t}\r\n\t\t\t\t// Create the neighbors of u\r\n\t\t\t\tArrayList<Cell> neighbors = createSuccesors(u, false);\r\n\t\t\t\t// 18: for each neighbor v of u:\r\n\t\t\t\tfor (Cell v : neighbors) {\r\n\t\t\t\t\t// 20: alt := dist[u] + dist_between(u, v) ;\r\n\t\t\t\t\tint alt = u.dist + distBetween(u, v);\r\n\t\t\t\t\t// 21: if alt < dist[v]:\r\n\t\t\t\t\tif (alt < v.dist) {\r\n\t\t\t\t\t\t// 22: dist[v] := alt ;\r\n\t\t\t\t\t\tv.dist = alt;\r\n\t\t\t\t\t\t// 23: previous[v] := u ;\r\n\t\t\t\t\t\tv.prev = u;\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[v.row][v.col] = FRONTIER;\r\n\t\t\t\t\t\t// 24: decrease-key v in Q;\r\n\t\t\t\t\t\t// (sort list of nodes with respect to dist)\r\n\t\t\t\t\t\tCollections.sort(graph, new CellComparatorByDist());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// The handling of the other four algorithms\r\n\t\t\t} else {\r\n\t\t\t\tCell current;\r\n\t\t\t\tif (dfs.isSelected() || bfs.isSelected()) {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms DFS and BFS\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET ...\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms A* and Greedy\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET,\r\n\t\t\t\t\t// for which f(Si) ≤ f(Sj) for all other\r\n\t\t\t\t\t// open states Sj ...\r\n\t\t\t\t\t// (sort first OPEN SET list with respect to 'f')\r\n\t\t\t\t\tCollections.sort(openSet, new CellComparatorByF());\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t}\r\n\t\t\t\t// ... and add it to CLOSED SET.\r\n\t\t\t\tclosedSet.add(0, current);\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[current.row][current.col] = CLOSED;\r\n\t\t\t\t// If the selected node is the target ...\r\n\t\t\t\tif (current.row == targetPos.row && current.col == targetPos.col) {\r\n\t\t\t\t\t// ... then terminate etc\r\n\t\t\t\t\tCell last = targetPos;\r\n\t\t\t\t\tlast.prev = current.prev;\r\n\t\t\t\t\tclosedSet.add(last);\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Count nodes that have been expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Here is the 4rd step of the algorithms\r\n\t\t\t\t// 4. Create the successors of Si, based on actions\r\n\t\t\t\t// that can be implemented on Si.\r\n\t\t\t\t// Each successor has a pointer to the Si, as its predecessor.\r\n\t\t\t\t// In the case of DFS and BFS algorithms, successors should not\r\n\t\t\t\t// belong neither to the OPEN SET nor the CLOSED SET.\r\n\t\t\t\tArrayList<Cell> succesors;\r\n\t\t\t\tsuccesors = createSuccesors(current, false);\r\n\t\t\t\t// Here is the 5th step of the algorithms\r\n\t\t\t\t// 5. For each successor of Si, ...\r\n\t\t\t\tfor (Cell cell : succesors) {\r\n\t\t\t\t\t// ... if we are running DFS ...\r\n\t\t\t\t\tif (dfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the beginning of the list\r\n\t\t\t\t\t\t// OPEN SET\r\n\t\t\t\t\t\topenSet.add(0, cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are runnig BFS ...\r\n\t\t\t\t\t} else if (bfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the end of the list OPEN SET\r\n\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are running A* or Greedy algorithms (step 5\r\n\t\t\t\t\t\t// of A* algorithm) ...\r\n\t\t\t\t\t} else if (aStar.isSelected() || guloso.isSelected()) {\r\n\t\t\t\t\t\t// ... calculate the value f(Sj) ...\r\n\t\t\t\t\t\tint dxg = current.col - cell.col;\r\n\t\t\t\t\t\tint dyg = current.row - cell.row;\r\n\t\t\t\t\t\tint dxh = targetPos.col - cell.col;\r\n\t\t\t\t\t\tint dyh = targetPos.row - cell.row;\r\n\t\t\t\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t\t\t\t// with diagonal movements\r\n\t\t\t\t\t\t\t// calculate 1000 times the Euclidean distance\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + (int) ((double) 1000 * Math.sqrt(dxg * dxg + dyg * dyg));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = (int) ((double) 1000 * Math.sqrt(dxh * dxh + dyh * dyh));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// without diagonal movements\r\n\t\t\t\t\t\t\t// calculate Manhattan distances\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + Math.abs(dxg) + Math.abs(dyg);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = Math.abs(dxh) + Math.abs(dyh);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcell.f = cell.g + cell.h;\r\n\t\t\t\t\t\t// ... If Sj is neither in the OPEN SET nor in the\r\n\t\t\t\t\t\t// CLOSED SET states ...\r\n\t\t\t\t\t\tint openIndex = isInList(openSet, cell);\r\n\t\t\t\t\t\tint closedIndex = isInList(closedSet, cell);\r\n\t\t\t\t\t\tif (openIndex == -1 && closedIndex == -1) {\r\n\t\t\t\t\t\t\t// ... then add Sj in the OPEN SET ...\r\n\t\t\t\t\t\t\t// ... evaluated as f(Sj)\r\n\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// ... if already belongs to the OPEN SET, then ...\r\n\t\t\t\t\t\t\tif (openIndex > -1) {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (openSet.get(openIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\topenSet.remove(openIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// ... if already belongs to the CLOSED SET,\r\n\t\t\t\t\t\t\t\t// then ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (closedSet.get(closedIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\tclosedSet.remove(closedIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\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}", "public Square[] buildPath(GameBoard board, Player player) {\n\n // flag to check if we hit a goal location\n boolean goalVertex = false;\n\n // Queue of vertices to be checked\n Queue<Vertex> q = new LinkedList<Vertex>();\n\n // set each vertex to have a distance of -1\n for ( int i = 0; i < graph.length; i++ )\n graph[i] = new Vertex(i,-1);\n\n // get the start location, i.e. the player's location\n Vertex start = \n squareToVertex(board.getPlayerLoc(player.getPlayerNo()));\n start.dist = 0;\n q.add(start);\n\n // while there are still vertices to check\n while ( !goalVertex ) {\n\n // get the vertex and remove it;\n // we don't want to look at it again\n Vertex v = q.remove();\n\n // check if this vertex is at a goal row\n switch ( player.getPlayerNo() ) {\n case 0: if ( v.graphLoc >= 72 ) \n goalVertex = true; break;\n case 1: if ( v.graphLoc <= 8 ) \n goalVertex = true; break;\n case 2: if ( (v.graphLoc+1) % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n case 3: if ( v.graphLoc % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n }\n\n // if we're at a goal vertex, we don't need to calculate\n // its neighboors\n if ( !goalVertex ) {\n\n // retrieve all reachable ajacencies\n Square[] adjacencies = reachableAdjacentSquares\n (board, vertexToSquare(v, board), player.getPlayerNo());\n\n // for each adjacency...\n for ( Square s : adjacencies ) {\n\n // convert to graph location\n Vertex adjacent = squareToVertex(s); \n\n // modify the vertex if it hasn't been modified\n if ( adjacent.dist < 0 ) {\n adjacent.dist = v.dist+1;\n adjacent.path = v;\n q.add(adjacent);\n }\n }\n\n }\n else\n return returnPath(v,board);\n \n }\n // should never get here\n return null;\n }", "@Nullable\n private NodeWithCost<V, A> findShortestPath(@Nonnull DirectedGraph<V, A> graph,\n V start, V goal, @Nonnull ToDoubleFunction<A> costf) {\n PriorityQueue< NodeWithCost<V, A>> frontier = new PriorityQueue<>(61);\n Map<V, NodeWithCost<V, A>> frontierMap = new HashMap<>(61);\n // Size of explored is the expected number of nextArrows that we need to explore.\n Set<V> explored = new HashSet<>(61);\n return doFindShortestPath(start, frontier, frontierMap, goal, explored, graph, costf);\n }", "public Dijkstra(Graph graph, int firstVertexPortNum)\n {\n this.graph = graph;\n Set<String> vertexKeys = this.graph.vertexKeys();\n \n this.initialVertexPortNum = firstVertexPortNum;\n this.predecessors = new HashMap<String, String>();\n this.distances = new HashMap<String, Integer>();\n this.availableVertices = new PriorityQueue<Vertex>(vertexKeys.size(), new Comparator<Vertex>()\n {\n // compare weights of these two vertices.\n public int compare(Vertex v1, Vertex v2)\n {\n \t// errors are here.\n int weightOne = Dijkstra.this.distances.get(v1.convertToString(v1.getVertexPortNum())); // distances stored by portnum in string form.\n int weightTwo = Dijkstra.this.distances.get(v2.convertToString(v2.getVertexPortNum())); // distances stored by portnum in string form.\n return weightOne - weightTwo; // return the modified weight of the two vertices.\n }\n });\n \n this.visitedVertices = new HashSet<Vertex>();\n \n // for each Vertex in the graph\n for(String key: vertexKeys)\n {\n this.predecessors.put(key, null);\n this.distances.put(key, Integer.MAX_VALUE); // assuming that the distance of this is infinity.\n }\n \n \n //the distance from the initial vertex to itself is 0\n this.distances.put(convertToString(initialVertexPortNum), 0); \n \n //and seed initialVertex's neighbors\n Vertex initialVertex = this.graph.getVertex(convertToString(initialVertexPortNum)); // converted portnum to String to make this work.\n ArrayList<Edge> initialVertexNeighbors = initialVertex.getSquad();\n for(Edge e : initialVertexNeighbors)\n {\n Vertex other = e.getNeighbor(initialVertex);\n this.predecessors.put(convertToString(other.getVertexPortNum()), convertToString(initialVertexPortNum));\n this.distances.put(convertToString(other.getVertexPortNum()), e.getWeight()); // converted portnum to String to make this work.\n this.availableVertices.add(other); // add to available vertices.\n }\n \n this.visitedVertices.add(initialVertex); // add to list of visited vertices.\n \n // apply Dijkstra's algorithm to the overlay.\n processOverlay();\n \n }", "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 shortestPathLength(int[][] graph) {\n Queue<MyPath> q = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n\n for (int i = 0; i < graph.length; i++) {\n MyPath path = new MyPath(i, (1 << i));\n visited.add(path.convertToString());\n q.offer(path);\n }\n\n int length = 0;\n while (!q.isEmpty()) {\n int size = q.size();\n while (size-- > 0) {\n MyPath next = q.poll();\n int curr = next.curr;\n int currPath = next.nodes;\n // Assume we have two nodes -> n = 2\n // 1 << 2 -> 100\n // 100 - 1 -> 011 which means both nodes are visited\n if (currPath == (1 << graph.length) - 1) {\n return length;\n }\n for (int neighbors : graph[curr]) {\n MyPath newPath = new MyPath(neighbors, currPath | (1 << neighbors));\n String pathString = newPath.convertToString();\n if (visited.add(pathString)) {\n q.offer(newPath);\n }\n }\n }\n length++;\n }\n\n return -1;\n }", "static int BFS(int mat[][], Point src,\n\t\t\t\t\t\t\tPoint dest)\n{\n\t// check source and destination cell\n\t// of the matrix have value 1\n\tif (mat[src.x][src.y] != 1 ||\n\t\tmat[dest.x][dest.y] != 1)\n\t\treturn -1;\n\n\tboolean [][]visited = new boolean[ROW][COL];\n\t\n\t// Mark the source cell as visited\n\tvisited[src.x][src.y] = true;\n\n\t// Create a queue for BFS\n\tQueue<queueNode> q = new LinkedList<>();\n\t\n\t// Distance of source cell is 0\n\tqueueNode s = new queueNode(src, 0);\n\tq.add(s); // Enqueue source cell\n\n\t// Do a BFS starting from source cell\n\twhile (!q.isEmpty())\n\t{\n\t\tqueueNode curr = q.peek();\n\t\tPoint pt = curr.pt;\n\n\t\t// If we have reached the destination cell,\n\t\t// we are done\n\t\tif (pt.x == dest.x && pt.y == dest.y)\n\t\t\treturn curr.dist;\n\n\t\t// Otherwise dequeue the front cell\n\t\t// in the queue and enqueue\n\t\t// its adjacent cells\n\t\tq.remove();\n\n\t\tfor (int i = 0; i < 4; i++)\n\t\t{\n\t\t\tint row = pt.x + rowNum[i];\n\t\t\tint col = pt.y + colNum[i];\n\t\t\t\n\t\t\t// if adjacent cell is valid, has path\n\t\t\t// and not visited yet, enqueue it.\n\t\t\tif (isValid(row, col) &&\n\t\t\t\t\tmat[row][col] == 1 &&\n\t\t\t\t\t!visited[row][col])\n\t\t\t{\n\t\t\t\t// mark cell as visited and enqueue it\n\t\t\t\tvisited[row][col] = true;\n\t\t\t\tqueueNode Adjcell = new queueNode\n\t\t\t\t\t\t\t(new Point(row, col),\n\t\t\t\t\t\t\t\tcurr.dist + 1 );\n\t\t\t\tq.add(Adjcell);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return -1 if destination cannot be reached\n\treturn -1;\n}", "public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }", "private void findPath1(List<Coordinate> path) {\n\n // records the start coordinate in a specific sequence.\n ArrayList<Coordinate> starts = new ArrayList<>();\n // records the end coordinate in a specific sequence.\n ArrayList<Coordinate> ends = new ArrayList<>();\n // records the total cost of the path in a specific sequence.\n ArrayList<Integer> cost = new ArrayList<>();\n\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(o1);\n graph.printPath(d1);\n starts.add(o1);\n ends.add(d1);\n cost.add(graph.getPathCost(d1));\n }\n }\n int index = getMinIndex(cost);\n\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(starts.get(index));\n graph.printPath(ends.get(index));\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n setSuccess(path);\n }", "public int[] djekstra(Router root, Router destination){\n //if router and destination same\n if (root.getID() == destination.getID()){\n int[] result = new int[2];\n result[0] = root.getID();\n result[1] = 0;\n hops.add(0);\n return result;\n }\n\n //Storing shortest path currently known\n int[] shortestPath = new int[size];\n //Storing the weights of the current router's connection to neighbors\n int[] currentNeighborConnectionWeight = new int[size];\n\n //First set all of the positions to 9999 (pseudo infinity)\n for (int i = 0; i < shortestPath.length;i++){\n shortestPath[i] = 9999;\n }\n\n // Set the distance to itself as 0, mark as visited\n shortestPath[root.getID()-1] = 0;\n root.visit();\n\n //For each connection the root has, set the shortestPath available to the weight to the neighbor\n for (Connection c : root.getConnections()){\n shortestPath[c.getDestination().getID()-1] = c.getWeight();\n }\n\n //Find the smallest router to start the algorithm\n //ID of smallest router, start the value with the first available option\n int smallestRouterID = 0;\n int smallestRouterWeight = 9999;\n //Router used for iterating\n Router current = null;\n //Storing path length\n int totalPathLength = 0;\n\n\n //Find the shortest available path link to start with\n for (int k = 0; k < shortestPath.length; k++){\n if ((shortestPath[k] < smallestRouterWeight) && (shortestPath[k] != 0)){\n // Check to see if dead end\n if (routers.get(k).getConnections().size() > 1){\n // id is pos+1\n smallestRouterID = k + 1;\n smallestRouterWeight = shortestPath[k];\n } else if (routers.get(k).getID() == destination.getID()){ //edge case\n // id is pos+1\n smallestRouterID = k + 1;\n smallestRouterWeight = shortestPath[k];\n }\n }\n }\n // add its weight\n totalPathLength += smallestRouterWeight;\n\n //This is where we start our first step\n current = getRouter(smallestRouterID);\n hops.add(current.getID());\n current.visit();\n //System.out.println(\"First step--> Router:\" + smallestRouterID + \" Weight to router from root:\" + smallestRouterWeight);\n //Now we loop\n Router firstRouter = current;\n boolean done = false;\n while (done == false){\n //Break case 1, we found the router\n if (current.getID() == destination.getID()){\n // check if root has available connections\n\n // set current to root and store totalPathLength to new variable && store hops in new array ArrayList\n // compare totals and store the one that's lower ++ hops list too\n // could we recursively call djekstra?\n done = true;\n // System.out.println(\"Router found\");\n break;\n }\n\n //Break case 2, all of the connections have been visited already\n boolean destinationAvailable = hasAvailableConnections(current);\n if (destinationAvailable == false){\n if(hasAvailableConnections(root)){\n current = root;\n hops.clear();\n totalPathLength= 0;\n } else {\n done = true;\n // System.out.println(\"v-- No more routers available\");\n break;\n }\n }\n\n //set all to 9999 to assume we cant see\n for (int a = 0; a < currentNeighborConnectionWeight.length; a++){\n currentNeighborConnectionWeight[a] = 9999;\n }\n\n //Recalculate for new path lengths\n for (Connection c : current.getConnections()){\n //Only calculate path for routers that havent been visited\n if (c.getDestination().getVisit() == false){\n currentNeighborConnectionWeight[c.getDestination().getID()-1] = c.getWeight();\n }\n }\n\n //Find the next step to take\n //Find the shortest available path link to start with\n smallestRouterID = 0;\n smallestRouterWeight = 9999;\n for (int b = 0; b < currentNeighborConnectionWeight.length; b++){\n if ((currentNeighborConnectionWeight[b] < smallestRouterWeight)){\n // id is pos+1\n smallestRouterID = b + 1;\n smallestRouterWeight = currentNeighborConnectionWeight[b];\n }\n }\n\n // add its weight\n totalPathLength += smallestRouterWeight;\n current = getRouter(smallestRouterID);\n hops.add(current.getID());\n current.visit();\n // System.out.println(\"Next shortest path--> Router: \" + current.getID() + \" Length from root:\" + totalPathLength);\n\n\n } // <--------------------------------------------------------------------------------End of while loop\n\n // returns <lasthop, pathcost>\n int[] result = new int[2];\n //Check and see if the path length is smaller then the original\n if (totalPathLength <= shortestPath[destination.getID()-1]){\n //System.out.println(\"Case new \" + firstRouter.getID());\n shortestPath[destination.getID()-1] = totalPathLength;\n result[0] = firstRouter.getID();\n result[1] = shortestPath[destination.getID()-1];\n } else {\n //root was shorter\n //System.out.println(\"Case old \" + root.getID());\n result[0] = root.getID();\n result[1] = shortestPath[destination.getID()-1];\n }\n // System.out.println(\"Next hop:\" + current.getID() + \" Total Distance:\" + shortestPath[destination.getID()-1]);\n\n //reset the visited list\n for (Router r: routers){\n r.unvisit();\n }\n return result;\n }", "public Vertex[] createGraph(){\n\t\t /* constructing a graph using matrices\n\t\t * If there is a connection between two adjacent LETTERS, the \n\t * cell will contain a num > 1, otherwise a 0. A value of -1 in the\n\t * cell denotes that the cities are not neighbors.\n\t * \n\t * GRAPH (with weights b/w nodes):\n\t * E+---12-------+B--------18-----+F----2---+C\n\t * +\t\t\t\t+\t\t\t\t +\t\t +\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\t 10\n\t * 24\t\t\t\t8\t\t\t 8\t |\n\t * |\t\t\t\t|\t\t\t |\t\t +\n\t * |\t\t\t\t|\t\t\t | H <+---11---I\n\t * |\t\t\t\t|\t\t\t /\n\t * +\t\t\t\t+\t\t\t +\n\t * G+---12----+A(start)+---10--+D\n\t * \n\t * NOTE: I is the only unidirectional node\n\t */\n\t\t\n\t\tint cols = 9;\n\t\tint rows = 9;\n\t\t//adjacency matrix\n\t\t\t\t //A B C D E F G H I\n\t int graph[][] = { {0,8,0,10,0,0,12,0,0}, //A\n\t {8,0,0,0,12,18,0,0,0}, //B\n\t {0,0,0,0,0,2,0,10,0}, //C\n\t {10,0,0,0,0,8,0,0,0}, //D\n\t {0,12,0,0,0,0,24,0,0}, //E\n\t {0,18,2,8,0,0,0,0,0}, //F\n\t {12,0,0,0,0,0,24,0,0}, //G\n\t {0,0,10,0,0,0,0,0,11}, //H\n\t {0,0,0,0,0,0,0,11,0}}; //I\n\t \n\t //initialize stores vertices\n\t Vertex[] vertices = new Vertex[rows]; \n\n\t //Go through each row and collect all [i,col] >= 1 (neighbors)\n\t int weight = 0; //weight of the neighbor\n\t for (int i = 0; i < rows; i++) {\n\t \tVector<Integer> vec = new Vector<Integer>(rows);\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tif (graph[i][j] >= 1) {\n\t\t\t\t\tvec.add(j);\n\t\t\t\t\tweight = j;\n\t\t\t\t}//is a neighbor\n\t\t\t}\n\t\t\tvertices[i] = new Vertex(Vertex.getVertexName(i), vec);\n\t\t\tvertices[i].state = weight;\n\t\t\tvec = null; // Allow garbage collection\n\t\t}\n\t return vertices;\n\t}", "public static void main(String[] args) {\n\t\tint[] vertex= {0,1,2,3,4};\r\n\t\tint[][] graph= {{100,3,100,100,5},{100,100,8,5,3},{100,100,100,100,100},{100,100,2,100,100},{100,100,100,4,100}};\r\n\t\tint[] dist= {0,100,100,100,100};\r\n\t\tint i=0;\r\n\t\tint tvc=1;\r\n\t\twhile(tvc<5) {\r\n\t\t\tfor(int j=0;j<vertex.length;j++) {\r\n\t\t\t\tif(dist[j]>graph[i][j]+dist[i]) {\r\n\t\t\t\t\tdist[j]=graph[i][j]+dist[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttvc++;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Shortest path (distance from source):\");\r\n\t\tSystem.out.println(\"a: \"+dist[0]);\r\n\t\tSystem.out.println(\"b: \"+dist[1]);\r\n\t\tSystem.out.println(\"c: \"+dist[2]);\r\n\t\tSystem.out.println(\"d: \"+dist[3]);\r\n\t\tSystem.out.println(\"e: \"+dist[4]);\r\n\t}", "@Test\n public void sourceEqualsTarget() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(0, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n assertPath(calcPath(0, 0, 0, 1), 0.3, 3, 300, nodes(0, 1, 2, 0));\n assertPath(calcPath(0, 0, 1, 0), 0.3, 3, 300, nodes(0, 2, 1, 0));\n // without restrictions the weight should be zero\n assertPath(calcPath(0, 0, ANY_EDGE, ANY_EDGE), 0, 0, 0, nodes(0));\n // in some cases no path is possible\n assertNotFound(calcPath(0, 0, 1, 1));\n assertNotFound(calcPath(0, 0, 5, 1));\n }", "@Test\n void testShortestPath(){\n weighted_graph g = new WGraph_DS();\n for(int i = 1; i <= 7; i++){\n g.addNode(i);\n }\n g.connect(1,2,20);\n g.connect(1,5,15);\n g.connect(2,3,20);\n g.connect(5,6,15);\n g.connect(3,4,20);\n g.connect(6,4,15);\n g.connect(1,7,2);\n g.connect(7,4,1);\n weighted_graph_algorithms ga = new WGraph_Algo();\n ga.init(g);\n LinkedList<node_info> expectedPath = new LinkedList<>(Arrays.asList(g.getNode(1),g.getNode(7),g.getNode(4)));\n assertNull(ga.shortestPath(1,10));\n assertEquals(expectedPath,ga.shortestPath(1,4));\n assertEquals(1,ga.shortestPath(1,1).size());\n }", "public Dijkstra(EdgeWeightedDigraph G, int s) {\r\n int V = G.V();\r\n distTo = new double[V];\r\n edgeTo = new DirectedEdge[V];\r\n distTo[0] = 0.0;\r\n for (int i = 1; i < V; i++) {\r\n distTo[i] = Double.POSITIVE_INFINITY;\r\n }\r\n pq.insert(s, 0.0);\r\n while (!pq.isEmpty()) {\r\n int v = pq.deleteMin();\r\n for (DirectedEdge e : G.adj(v)) {\r\n relax(e);\r\n }\r\n }\r\n }", "public static int shortestDistance(int[][] maze, int[] start, int[] dest) {\n\t int[][] distance = new int[maze.length][maze[0].length];\r\n\t int[][] newmaze = new int[maze.length][maze[0].length];\r\n\t \r\n\t //add values to distance array, each elemet is Java Max_Value\r\n\t for (int[] row: distance)\r\n\t Arrays.fill(row, Integer.MAX_VALUE);\r\n\t \r\n\t //distance of starting point is 0\r\n\t distance[start[0]][start[1]] = 0;\r\n\t \r\n\t //backtracking dfs \r\n\t dfs(maze, start, distance, newmaze);\r\n\t \r\n\t for(int[] arr: distance) {\r\n\t \t\t System.out.println(Arrays.toString(arr));\r\n\t \t }\r\n\t return distance[dest[0]][dest[1]] == Integer.MAX_VALUE ? -1 : distance[dest[0]][dest[1]];\r\n\t \r\n\t \r\n\t }", "public DijkstraAlg(){\n \n }", "private static void shortestPath(Graph graph, Character startNode, int algorithm) {\n Node currentNode = graph.getNode(startNode);\n\n // keep track of the nodes visited\n List<Character> nodesVisited = new ArrayList<>();\n\n // add the current node\n nodesVisited.add(currentNode.getName());\n\n // breadth first search to help keep track of the nodes we have already visited\n // helps with backtracking\n Stack<Node> visitingNodes = new Stack<>();\n\n // loop through the graph\n while (currentNode != graph.getNode('Z')) {\n // we have visited a node\n // add it to the stack\n // set true to since its been visited and it will be in the shortest path\n visitingNodes.add(currentNode);\n currentNode.setNodeVisited(true);\n currentNode.setInShortestPath(true);\n\n // get all the edges that are connected to the current node we are on\n List<Edge> adjacentNodes = currentNode.getNeighbors();\n\n // temp for next node\n Node nextNode = null;\n int weightDistanceTotal = Integer.MAX_VALUE;\n\n for (Edge i: adjacentNodes) {\n // testing\n // System.out.println(i.destination.getName());\n // System.out.println(i.destination.getDistanceToZ());\n\n // 1. always check to see if we have visited the node\n if (i.destination.isNodeVisited()) {\n // System.out.println(i.destination.getName() + \" is already in the path\");\n continue;\n }\n\n // 2. assign the next node to the destination\n if (nextNode == null) {\n nextNode = i.destination;\n }\n\n // compare distances\n if (algorithm == 1) {\n nextNode = updateNextNodeAlgo1(nextNode, i.destination);\n } else {\n NodeWithWeightDistanceTotal nodeWithWeightDistanceTotal = updateNextNodeAlgo2(nextNode, i, weightDistanceTotal);\n nextNode = nodeWithWeightDistanceTotal.node;\n weightDistanceTotal = nodeWithWeightDistanceTotal.weightDistanceTotal;\n }\n //if (nextNode.getDistanceToZ() > i.destination.getDistanceToZ()) {\n // nextNode = i.destination;\n //}\n }\n\n // next has no other edges\n if (nextNode == null) {\n // System.out.println(\"There no place to go from \" + currentNode.getName());\n // pop off the node we just visited\n nextNode = visitingNodes.pop();\n // its not in the shortest path to Z\n nextNode.setInShortestPath(false);\n // set the next node to the previous node\n nextNode = visitingNodes.pop();\n }\n\n // add the nodes we visit to keep track of the path\n nodesVisited.add(nextNode.getName());\n\n // System.out.println(Arrays.toString(nodesVisited.toArray()));\n // testing purposes to see if the node is on the shortest path\n\n// for (Character node: nodesVisited) {\n// Node boolVisit = graph.getNode(node);\n// System.out.println(boolVisit.isInShortestPath());\n// }\n\n // progress to the next node\n currentNode = nextNode;\n // when visiting the last node mark z in the shortest path\n if (currentNode.getName() == 'Z') {\n currentNode.setInShortestPath(true);\n }\n // testing\n // System.out.println(\"next node = \" + currentNode.getName());\n }\n\n // keep track of the path visited and the total addition of weights\n int pathCounter = 0;\n\n // construct the shortest path\n List<Node> shortestPath = new ArrayList<>();\n\n for (Character nodeVisitor: nodesVisited) {\n // get the node\n Node node = graph.getNode(nodeVisitor);\n\n // add to the shortest path\n if (node.isInShortestPath() && !shortestPath.contains(node)) {\n shortestPath.add(node);\n }\n }\n\n // print the shortest path\n for (int i = 0; i < shortestPath.size() - 1; i++) {\n currentNode = shortestPath.get(i);\n Node nextNode = shortestPath.get(i + 1);\n\n // find the weight of that node\n int weight = currentNode.findWeight(nextNode);\n pathCounter += weight;\n\n // System.out.println(\"weight \" + weight);\n // System.out.println(\"path total \" + pathCounter);\n }\n\n // final output\n String fullPathSequence = \"\";\n String shortestPathSequence = \"\";\n\n for (int i = 0; i < nodesVisited.size(); i++) {\n if (i != nodesVisited.size() - 1) {\n fullPathSequence += nodesVisited.get(i) + \" -> \";\n }\n }\n\n fullPathSequence += nodesVisited.get(nodesVisited.size() - 1);\n\n for (int i = 0; i < shortestPath.size(); i++) {\n if (i != shortestPath.size() - 1) {\n shortestPathSequence += shortestPath.get(i).getName() + \" -> \";\n }\n }\n\n if (currentNode.getName() == 'Z') {\n shortestPathSequence += \"Z\";\n } else {\n shortestPathSequence += shortestPath.get(shortestPath.size() - 1).getName();\n }\n\n System.out.println(\"Algorithm \" + algorithm + \" : \");\n System.out.println(\"Sequence of all nodes \" + fullPathSequence);\n System.out.println(\"Shortest path: \" + shortestPathSequence);\n System.out.println(\"Shortest path length: \" + pathCounter);\n System.out.println(\"\\n\");\n\n // reset the graph\n graph.graphReset();\n\n }", "List<V> getShortestPath(V vertex);", "public ShortestPath(IWeightedGraph<N,E> graph, int startNode) {\n\t\tthis.graph = graph;\n\t\tthis.startNode = startNode;\n\t\tthis.shortestPaths = new double[graph.numberOfNodes()];\n\t\tthis.previousNode = new int[graph.numberOfNodes()];\n\t\tbellmanFord(this.graph, this.startNode);\n\t}", "private void computePaths(Vertex source, Vertex target, ArrayList<Vertex> vs)\n {\n \tfor (Vertex v : vs)\n \t{\n \t\tv.minDistance = Double.POSITIVE_INFINITY;\n \t\tv.previous = null;\n \t}\n source.minDistance = 0.;\t\t// distance to self is zero\n IndexMinPQ<Vertex> vertexQueue = new IndexMinPQ<Vertex>(vs.size());\n \n for (Vertex v : vs) vertexQueue.insert(Integer.parseInt(v.id), v);\n\n\t\twhile (!vertexQueue.isEmpty()) \n\t\t{\n\t \t// retrieve vertex with shortest distance to source\n\t \tVertex u = vertexQueue.minKey();\n\t \tvertexQueue.delMin();\n\t\t\tif (u == target)\n\t\t\t{\n\t\t\t\t// trace back\n\t\t\t\twhile (u.previous != null)\n\t\t\t\t{;\n\t\t\t\t\tu = u.previous;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n \t// Visit each edge exiting u\n \tfor (Edge e : u.adjacencies)\n \t\t{\n \t\tVertex v = e.target;\n\t\t\t\tdouble weight = e.weight;\n \tdouble distanceThroughU = u.minDistance + weight;\n\t\t\t\tif (distanceThroughU < v.minDistance) \n\t\t\t\t{\n\t\t\t\t\tint vid = Integer.parseInt(v.id);\n\t\t \t\tvertexQueue.delete(vid);\n\t\t \t\tv.minDistance = distanceThroughU;\n\t\t \t\tv.previous = u;\n\t\t \t\tvertexQueue.insert(vid,v);\n\t\t\t\t}\n\t\t\t}\n }\n }", "private double dijkstrasAlgo(String source, String dest) {\r\n\r\n\t\tclearAll(); // running time: |V|\r\n\t\tint count = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) // running time: |V|\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tcount++;\r\n\r\n\t\tVertex[] queue = new Vertex[count]; // running time: Constant\r\n\t\tVertex start = vertexMap.get(source); // running time: Constant\r\n\t\tstart.dist = 0; // running time: Constant\r\n\t\tstart.prev = null; // running time: Constant\r\n\r\n\t\tint index = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) { // running time: |V|\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tqueue[index] = v;\r\n\t\t\t\tv.setHandle(index);\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbuildMinHeap(queue, count); // running time: |V|\r\n\r\n\t\twhile (count != 0) { // running time: |V|\r\n\t\t\tVertex min = extractMin(queue, count); // running time: log |V|\r\n\t\t\tcount--; // running time: Constant\r\n\r\n\t\t\tfor (Iterator i = min.adjacent.iterator(); i.hasNext();) { // running time: |E|\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus()) {\r\n\t\t\t\t\tVertex adjVertex = vertexMap.get(edge.getDestination());\r\n\t\t\t\t\tif (adjVertex.dist > (min.dist + edge.getCost()) && adjVertex.isStatus()) {\r\n\t\t\t\t\t\tadjVertex.dist = (min.dist + edge.getCost());\r\n\t\t\t\t\t\tadjVertex.prev = min;\r\n\t\t\t\t\t\tint pos = adjVertex.getHandle();\r\n\t\t\t\t\t\tHeapdecreaseKey(queue, pos, adjVertex); // running time: log |V|\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 vertexMap.get(dest).dist; // running time: Constant\r\n\t}", "@Test\n public void directedRouting() {\n EdgeIteratorState rightNorth, rightSouth, leftSouth, leftNorth;\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(3, 4).setDistance(3).set(speedEnc, 10, 10);\n rightNorth = graph.edge(4, 10).setDistance(1).set(speedEnc, 10, 10);\n rightSouth = graph.edge(10, 5).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(5, 6).setDistance(2).set(speedEnc, 10, 10);\n graph.edge(6, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 7).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(7, 8).setDistance(9).set(speedEnc, 10, 10);\n leftSouth = graph.edge(8, 9).setDistance(1).set(speedEnc, 10, 10);\n leftNorth = graph.edge(9, 0).setDistance(1).set(speedEnc, 10, 10);\n\n // make paths fully deterministic by applying some turn costs at junction node 2\n setTurnCost(7, 2, 3, 1);\n setTurnCost(7, 2, 6, 3);\n setTurnCost(1, 2, 3, 5);\n setTurnCost(1, 2, 6, 7);\n setTurnCost(1, 2, 7, 9);\n\n final double unitEdgeWeight = 0.1;\n assertPath(calcPath(9, 9, leftNorth.getEdge(), leftSouth.getEdge()),\n 23 * unitEdgeWeight + 5, 23, (long) ((23 * unitEdgeWeight + 5) * 1000),\n nodes(9, 0, 1, 2, 3, 4, 10, 5, 6, 2, 7, 8, 9));\n assertPath(calcPath(9, 9, leftSouth.getEdge(), leftNorth.getEdge()),\n 14 * unitEdgeWeight, 14, (long) ((14 * unitEdgeWeight) * 1000),\n nodes(9, 8, 7, 2, 1, 0, 9));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightSouth.getEdge()),\n 15 * unitEdgeWeight + 3, 15, (long) ((15 * unitEdgeWeight + 3) * 1000),\n nodes(9, 8, 7, 2, 6, 5, 10));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightNorth.getEdge()),\n 16 * unitEdgeWeight + 1, 16, (long) ((16 * unitEdgeWeight + 1) * 1000),\n nodes(9, 8, 7, 2, 3, 4, 10));\n }", "private static List<Vertex> doDijkstra(List<Vertex> vertexes) {\n\n\t\t// Zok, we have a graph constructed. Traverse.\n\t\tPriorityQueue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\n\t\tvertexQueue.add(me);\n\t\tme.setMinDistance(0);\n\n\t\twhile (!vertexQueue.isEmpty()) {\n\t\t\tVertex v = vertexQueue.poll();\n\t\t\tdouble distance = v.getMinDistance() + 1;\n\n\t\t\tfor (Vertex neighbor : v.getAdjacencies()) {\n\t\t\t\tif (distance < neighbor.getMinDistance()) {\n\t\t\t\t\tneighbor.setMinDistance(distance);\n\t\t\t\t\tneighbor.setPrevious(v);\n\t\t\t\t\tvertexQueue.remove(neighbor);\n\t\t\t\t\tvertexQueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn vertexes;\n\t}", "public int shortestBridge(int[][] A) {\n for(int i = 0; i < A.length && !found; i++) {\n for(int j = 0; j < A[0].length && !found; j++) {\n if(A[i][j] == 1) {\n helper(A, i, j);\n found = true;\n }\n }\n }\n // Put all '2' into queue as candidate initial start points\n Queue<int[]> q = new LinkedList<int[]>();\n for(int i = 0; i < A.length; i++) {\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 2) {\n q.offer(new int[] {i, j});\n }\n }\n }\n int distance = 0;\n while(!q.isEmpty()) {\n int size = q.size();\n for(int i = 0; i < size; i++) {\n int[] cur = q.poll();\n for(int j = 0; j < 4; j++) {\n int new_x = cur[0] + dx[j];\n int new_y = cur[1] + dy[j];\n if(new_x >= 0 && new_x < A.length && new_y >= 0 && new_y < A[0].length) {\n if(A[new_x][new_y] == 1) {\n return distance;\n } else if(A[new_x][new_y] == 0) {\n // Update from 0 to 2 which means expand first island boundary\n // which also avoid using visited to check\n A[new_x][new_y] = 2;\n q.offer(new int[] {new_x, new_y});\n }\n }\n }\n }\n distance++;\n }\n return distance;\n }", "public static void findShortestPath(char[][] maze) {\n\t\tboolean visited[][] = new boolean[maze.length][maze[0].length]; \n\t\tint srcX = 0, srcY = 0;\n\t\t// find the source\n\t\tfor(int i=0; i<maze.length; i++) {\n\t\t\tfor(int j=0; j<maze[0].length; j++) {\n\t\t\t\tif(maze[i][j] == 's') {\n\t\t\t\t\tsrcX = i; srcY=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tboolean pe = doGridBFS(maze,visited,srcX,srcY);\n\t\tSystem.out.println(pe);\n\t\t\n\t}", "Dijk(final EdgeWeighted graph, final int one) {\n distace = new int[graph.vertices()];\n edge = new Edge[graph.vertices()];\n min = new IndexMinPQ<Integer>(graph.vertices());\n for (int i = 0; i < graph.vertices(); i++) {\n distace[i] = NUMBER;\n }\n distace[one] = 0;\n min.insert(one, distace[one]);\n while (!min.isEmpty()) {\n int two = min.delMin();\n for (Edge each : graph.adjacentEdges(two)) {\n relax(each, two);\n }\n }\n }", "public void printAdjacencyMatrix();", "public int shortestBridge(int[][] A) {\n for(int i = 0; i < A.length; i++) {\n if(found) {\n break;\n }\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 1) {\n helper(A, i, j);\n found = true;\n break;\n }\n }\n }\n // Put all '2' into queue as candidate initial start points\n Queue<int[]> q = new LinkedList<int[]>();\n for(int i = 0; i < A.length; i++) {\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 2) {\n q.offer(new int[] {i, j});\n }\n }\n }\n int distance = 0;\n while(!q.isEmpty()) {\n int size = q.size();\n for(int i = 0; i < size; i++) {\n int[] cur = q.poll();\n for(int j = 0; j < 4; j++) {\n int new_x = cur[0] + dx[j];\n int new_y = cur[1] + dy[j];\n if(new_x >= 0 && new_x < A.length && new_y >= 0 && new_y < A[0].length) {\n if(A[new_x][new_y] == 1) {\n return distance;\n } else if(A[new_x][new_y] == 0) {\n // Update from 0 to 2 which means expand first island boundary\n // which also avoid using visited to check\n A[new_x][new_y] = 2;\n q.offer(new int[] {new_x, new_y});\n }\n }\n }\n }\n distance++;\n }\n return distance;\n }", "public Map<Node<T>, Cost> dijkstra(T start) throws NodeNotFoundException {\n Node<T> origin = findNode(start);\n Map<Node<T>, Cost> costs = new HashMap<>();\n List<Node<T>> alreadyVisited = new ArrayList<>();\n\n // Step 1 : Initialization\n // Set every cost to infinity, except for the starting summit which is set to 0\n for(Node<T> node : getNodes()) {\n if(origin.equals(node)) { costs.put(node, new Cost(0.0)); }\n else { costs.put(node, new Cost()); }\n }\n\n while(ArrayMethods.similarity(getNodes(), alreadyVisited) != order()) {\n // Step 2 : Taking the node with the smallest cost\n Node<T> reference = Cost.findMin(costs, alreadyVisited);\n\n // Step 3 : Updating the table with the costs from that node\n for(WeightedLink link : findLinks(reference.getData())) {\n Node<T> other = (Node<T>) link.getOther(reference);\n Cost oldCost = costs.get(other);\n double old = oldCost.getCost();\n double cost = link.getWeight() + costs.get(reference).getCost();\n\n costs.put(other, (cost < old) ? new Cost(cost, reference) : oldCost);\n }\n\n // Step 4 : Repeat with the smallest costing summit that wasn't visited already\n alreadyVisited.add(reference);\n }\n\n return costs;\n }" ]
[ "0.7223919", "0.69724286", "0.6786906", "0.67368263", "0.6715819", "0.670795", "0.67066795", "0.6694121", "0.6676676", "0.66564524", "0.65891284", "0.65862244", "0.658494", "0.6583498", "0.6578354", "0.65631354", "0.65296614", "0.65106004", "0.650969", "0.65042126", "0.64907867", "0.64395124", "0.6425447", "0.63926965", "0.6381715", "0.63677907", "0.63663745", "0.635944", "0.63483953", "0.62824845", "0.62434137", "0.6240172", "0.62350214", "0.61811024", "0.6179363", "0.61533344", "0.6125636", "0.61238146", "0.6113631", "0.61120933", "0.6104958", "0.6096906", "0.6079012", "0.6076146", "0.6065285", "0.6036102", "0.6027635", "0.60268986", "0.60262537", "0.6017331", "0.60072863", "0.6002499", "0.5983757", "0.5980692", "0.5979471", "0.59746677", "0.59703887", "0.5965283", "0.59610766", "0.5943807", "0.59352803", "0.5914199", "0.5905943", "0.5902471", "0.58963037", "0.58926964", "0.5884707", "0.58836764", "0.5873569", "0.58720833", "0.585898", "0.58566874", "0.5852912", "0.58508664", "0.58399457", "0.58125085", "0.5809456", "0.58075505", "0.5796601", "0.57871133", "0.57804316", "0.57622236", "0.5761867", "0.5754885", "0.57485163", "0.57471263", "0.5741412", "0.57400376", "0.57337016", "0.573078", "0.57240015", "0.57235044", "0.5719664", "0.5702595", "0.5702209", "0.56990254", "0.5694095", "0.56918794", "0.56895393", "0.5682642" ]
0.6823916
2
A utility function to print the constructed distances array and shortest paths
private void printSolution(int startVertex, double[] distances, int[] parents) { int nVertices = distances.length; System.out.print("Vertex\t Distance\tPath"); for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) { if (vertexIndex != startVertex) { System.out.print("\n" + startVertex + " -> "); System.out.print(vertexIndex + " \t\t "); System.out.print(distances[vertexIndex] + "\t\t"); printPath(vertexIndex, parents); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void print_path(int[]parent,int[]dist,int s)\n {\n System.out.println(); \n \n //path from s to all other vertices\n \n for(int i=0;i<parent.length;i++)\n {\n System.out.println(\"From \"+s+\" to \"+i);\n System.out.print(\"path: \");\n print_node(parent,i);\n System.out.print(\"END\");\n if(dist[i]==INF)\n System.out.println(\" cost=INF\"); \n else\n System.out.println(\" cost=\"+dist[i]);\n\n }\n \n \n System.out.println();\n \n\n \n }", "@Override\n public String toString() {\n String out = \"Distance =\" + distance + \" Path : \" + getPoints().get(0);\n for (int i = 1; i < getPoints().size(); i++) {\n out += \" -> \" + getPoints().get(way[i]);\n }\n return out;\n }", "void printSolution(int dist[], int n) {\n for (int i = 0; i < V; i++) {\n String node = \"Start\";\n switch (i) {\n case 1:\n node = \"A\";\n break;\n case 2:\n node = \"B\";\n break;\n case 3:\n node = \"C\";\n break;\n case 4:\n node = \"D\";\n break;\n case 5:\n node = \"E\";\n break;\n case 6:\n node = \"F\";\n break;\n case 7:\n node = \"G\";\n break;\n case 8:\n node = \"H\";\n break;\n case 9:\n node = \"I\";\n }\n System.out.println(\"Source -> Node: \" + node + \": \" + dist[i]);\n }\n }", "protected static void printPath(int[] thePath) {\r\n\t\t\r\n\t\tint[] orderedPath = new int[thePath.length];\r\n\t\r\n\t\tfor (int i = 0; i < thePath.length; i++)\r\n\t\t\torderedPath[i] = -1;\r\n\t\r\n\t\torderedPath[0] = myEndPole;\r\n\t\tint i = myEndPole;\r\n\t\tint j = 1;\r\n\t \r\n\t\twhile (true && j < orderedPath.length) {\t\r\n\t\t\tif (thePath[i] == -1 && i == START_POLE)\r\n\t\t\t\tbreak;\r\n\t\t\torderedPath[j] = thePath[i];\t\r\n\t\t\ti = thePath[i];\r\n\t\t\tj++;\r\n\t\t}\r\n\t\r\n\t\tSystem.out.print(\"The Shortest Path is \");\r\n\t\r\n\t\tfor (i = orderedPath.length - 1; i >= 0; i--) {\r\n\t\t\tif (orderedPath[i] == -1)\r\n\t\t\t\tcontinue;\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tSystem.out.print((orderedPath[i] + 1));\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSystem.out.print((orderedPath[i] + 1) + \" -> \");\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t}", "private void printSolution(int[] dist){\r\n System.out.println(\"Ride Distance from Entrance/Exit\");\r\n System.out.println(\"\\nMedieval Zone: \");\r\n for(int i =1; i < rideCount; i ++){\r\n if(rides.get(i).getTheme().equals(\"Medieval\")){\r\n System.out.println(String.format(\"%-30s %-5d\", rides.get(i).getName(), dist[i]));\r\n }\r\n }\r\n\r\n System.out.println(\"\\nFuturistic Zone: \");\r\n for (int i=1; i< rideCount; i++){\r\n if(rides.get(i).getTheme().equals(\"Futuristic\")){\r\n System.out.println(String.format(\"%-30s %-5d\", rides.get(i).getName(), dist[i]));\r\n }\r\n }\r\n\r\n System.out.println(\"\\nJurassic Zone: \");\r\n for (int i=1; i< rideCount; i++){\r\n if(rides.get(i).getTheme().equals(\"Jurassic\")){\r\n System.out.println(String.format(\"%-30s %-5d\", rides.get(i).getName(), dist[i]));\r\n }\r\n }\r\n\r\n System.out.println(\"\\nIndustrial Zone: \");\r\n for (int i=1; i< rideCount; i++){\r\n if(rides.get(i).getTheme().equals(\"Industrial\")){\r\n System.out.println(String.format(\"%-30s %-5d\", rides.get(i).getName(), dist[i]));\r\n }\r\n }\r\n }", "public void printMST() {\n\t\t\n\t\tString mstPath = \"\";\n\t\t\n\t\t/**Stores the parent child hierarchy*/\n\t\tint distance[] = new int[this.vertices];\n\t\t\n\t\t/**Stores all the vertices with their distances from source vertex*/\n\t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\tmap.put(0, 0);\n\t\t\n\t\tfor(int i = 1; i < vertices; i++){\n\t\t\tmap.put(i, Integer.MAX_VALUE);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < vertices; i++){\n\t\t\t\n\t\t\tInteger minVertex = extractMin(map), minValue = map.get(minVertex);\n\t\t\tdistance[minVertex] = minValue;\n\t\t\t\n\t\t\tmstPath += minVertex + \" --> \";\n\t\t\t\n\t\t\t/**Removing min vertex from map*/\n\t\t\tmap.remove(minVertex);\n\t\t\t\n\t\t\t/**Exploring edges of min vertex*/\n\t\t\tArrayList<GraphEdge> edges = this.adjList[minVertex];\n\t\t\tfor(GraphEdge edge : edges){\n\t\t\t\tif(map.containsKey(edge.destination)){\n\t\t\t\t\tif(map.get(edge.destination) > distance[edge.source] + edge.weight){\n\t\t\t\t\t\tmap.put(edge.destination, distance[edge.source] + edge.weight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(mstPath);\n\t}", "public void displayPaths() {\r\n\t\tlog.debug(\"startPaths\");\r\n\t\tfor ( Map.Entry<Integer, Vector<Edge>> entry: startPaths.entrySet()) {\r\n\t\t\tfor ( Edge edge: entry.getValue()) {\r\n\t\t\t\tlog.debug( entry.getKey() + \": \" + edge.StartRoom + \"->\" + edge.door + \"->\" + edge.DestinationRoom );\r\n\t\t\t}\r\n\t\t}\r\n\t\tlog.debug(\"destinationPaths\");\r\n\t\tfor ( Map.Entry<Integer, Vector<Edge>> entry: destinationPaths.entrySet()) {\r\n\t\t\tfor ( Edge edge: entry.getValue()) {\r\n\t\t\t\tlog.debug( entry.getKey() + \": \" + edge.StartRoom + \"->\" + edge.door + \"->\" + edge.DestinationRoom );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void printDistance()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar, new DistanceCompare());//sort by distance\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tRobot r=it.next();\n\t\t\tSystem.out.println(i+\". \"+r.getName()+\" distance \"+r.getDistance());\n\t\t\ti++;\n\t\t}\n\t}", "public void dijkstraAllPairs(boolean print) {\r\n int numSuccesses = 0;\r\n long totalTimeSuccesses = 0;\r\n if (print) System.out.println(\"Paths between all pairs of vertices using Dijkstra's algorithm:\");\r\n for (int i = 0; i < location.size(); i++) {\r\n for (int j = i+1; j < location.size(); j++) {\r\n long startTime = System.nanoTime();\r\n ArrayList<Vertex> pathIJ = dijkstraPath(i, j);\r\n long endTime = System.nanoTime();\r\n if (!pathIJ.isEmpty()) {\r\n numSuccesses++;\r\n totalTimeSuccesses += (endTime - startTime);\r\n }\r\n if (print) System.out.println(\"I = \" + i + \" J = \" + j + \" : \" + pathIJ.toString());\r\n }\r\n }\r\n System.out.println(\"Dijkstra's algorithm is successfull \" + numSuccesses + \"/\" + location.size()*(location.size()-1)/2 + \" times.\");\r\n if (numSuccesses != 0) {\r\n System.out.println(\"The average time taken by Dijkstra's algorithm on successful runs is \" + totalTimeSuccesses/numSuccesses + \" nanoseconds.\");\r\n } else {\r\n System.out.println(\"The average time taken by Dijkstra's algorithm on successful runs is N/A nanoseconds.\");\r\n }\r\n System.out.println(\"\");\r\n }", "private void printPath(List<Edge<String>> path,\n double totalDistance) {\n if (path == null) {\n System.out.println(\"No path found\");\n return;\n }\n\n System.out.println(\"Total Distance: \" + totalDistance);\n for (int i = path.size() - 1; i >= 0; i--) {\n System.out.println(path.get(i).get() + \" \"\n + graph.label(path.get(i)));\n }\n }", "public void printShortestPath() {\n Cell[][] grid = maze.getGrid();\n\n for (int i = 0; i <= r; i++) {\n // Rows: This loop needs to iterate r times since there are r rows\n for (int j = 0; j < r; j++) {\n Cell currentCell;\n if (i == r) { // If it is on the last row, print the bottom row of the cells\n currentCell = grid[i - 1][j];\n System.out.print(currentCell.bottomRow());\n } else { // If it's not on the last row, print the top row of the cells\n currentCell = grid[i][j];\n System.out.print(currentCell.topRow());\n }\n }\n System.out.print(\"+\");\n System.out.println();\n\n // This loop only needs to iterate r-1 times since there is only r-1 \"|\" rows\n if (i != r) {\n for (int k = 0; k < r; k++) {\n Cell currentCell = grid[i][k];\n if ((i == 0 && k == 0))\n System.out.print(currentCell.zeroDistanceColumn2());\n else if (parents.contains(currentCell))\n System.out.print(currentCell.zeroDistanceColumn2());\n else\n System.out.print(currentCell.distanceColumn2());\n }\n System.out.print(\"|\");\n System.out.println();\n }\n }\n }", "private void printPath() {\n // generate and print the shortest path.\n if (this == this.previous) {\n graphPathRef.add(this);\n } else if (this.previous == null) {\n System.out.print(\"\");\n } else {\n graphPathRef.add(this);\n this.previous.printPath();\n }\n }", "public static void main(String[] args) {\n\t\tint[] vertex= {0,1,2,3,4};\r\n\t\tint[][] graph= {{100,3,100,100,5},{100,100,8,5,3},{100,100,100,100,100},{100,100,2,100,100},{100,100,100,4,100}};\r\n\t\tint[] dist= {0,100,100,100,100};\r\n\t\tint i=0;\r\n\t\tint tvc=1;\r\n\t\twhile(tvc<5) {\r\n\t\t\tfor(int j=0;j<vertex.length;j++) {\r\n\t\t\t\tif(dist[j]>graph[i][j]+dist[i]) {\r\n\t\t\t\t\tdist[j]=graph[i][j]+dist[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttvc++;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Shortest path (distance from source):\");\r\n\t\tSystem.out.println(\"a: \"+dist[0]);\r\n\t\tSystem.out.println(\"b: \"+dist[1]);\r\n\t\tSystem.out.println(\"c: \"+dist[2]);\r\n\t\tSystem.out.println(\"d: \"+dist[3]);\r\n\t\tSystem.out.println(\"e: \"+dist[4]);\r\n\t}", "private void printNeighbourTable()\n {\n\n myGUI.println(\"Neighbour Distance Table\");\n String str = F.format(\"dst |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += (F.format(i, 15));\n }\n myGUI.println(str);\n for (int i = 0; i < str.length(); i++) {\n myGUI.print(\"-\");\n }\n myGUI.println();\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str = F.format(\"nbr \" + i + \" |\", 15);\n for (int j = 0; j < RouterSimulator.NUM_NODES; j++) {\n str += (F.format(myNeighboursDistTable[i][j], 15));\n }\n if (i != myID && neighbours[i])\n myGUI.println(str);\n }\n myGUI.println();\n }", "public String toString() {\r\n\t\tString s = String.format(\"%6.1f :\", this.distance);\r\n\t\tfor (int i = 0; i < this.length(); i++) {\r\n\t\t\ts += String.format(\"%3d\", index[i]);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public static void main(String[] args) {\n\n int[] input = generateArray(4,5);//new int[]{4, 5, 0, 1};\n ArrayList<ArrayList<ArrayList<Integer>>> results = getPaths(input);\n// Output results:\n results.forEach((n) -> System.out.println(n));\n }", "public void print()\n\t{\n\t\tDNode tem=first;\n\t\tSystem.out.print(tem.distance+\" \");\n\t\twhile(tem.nextDNode!=null)\n\t\t{\n\t\t\ttem=tem.nextDNode;\n\t\t\tSystem.out.print(tem.distance+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printGraph(int distance[], int n) {\n\t\tint k=0;\n\t\tfor(int i=0;i<vertexs;i++) {\n\t\t\tif(i>142) {\n\t\t\t\ttemp_des[k]=i;\n\t\t\t\ttemp_des_value[k]=distance[i];\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint min=temp_des_value[0];\n\t\tint min_value=0;\n\t\tfor(int i=0;i<temp_des_value.length;i++) {\n\t\t\tif(temp_des_value[i]<min) {\n min = temp_des_value[i];\n min_value=i;\n\t\t\t}\n\t\t}\n\t\tArrays.sort(temp_des_value);\n\t}", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "public void printDistance(int runNum, String dir){\n\n List<String[]> destinations = parseFileByName(dir+\"/destinations.\"+readExtention);\n List<Point2D> destination = new ArrayList<>();\n List<List<Double>> distances = new ArrayList<>();\n for(String[] strings : destinations)\n destination.add(new Point2D(Double.parseDouble(strings[0]),Double.parseDouble(strings[1])));\n\n for(int i = 0; i < runNum; i++) {\n List<String[]> receiverContent = parseFileByName(dir+\"/receivers_placement_\"+i+\".\"+readExtention);\n List<Point2D> receiverValues = new ArrayList<>();\n for(String[] strings : receiverContent)\n receiverValues.add(new Point2D(Double.parseDouble(strings[1]),Double.parseDouble(strings[2])));\n List<Double> distanceFromDestination = new ArrayList<>();\n for(Point2D receiverPosition : receiverValues)\n distanceFromDestination.add(receiverPosition.distance(destination.get(i)));\n distances.add(distanceFromDestination);\n }\n\n try {\n PrintWriter resWriter = new PrintWriter(dir+\"/A_results/distances\"+\".\"+writeExtention, \"UTF-8\");\n for(int i = 0;i < distances.get(0).size(); i++){\n String s = \"\";\n for(List<Double> distanceFromDestination : distances)\n s = s + distanceFromDestination.get(i) + \",\";\n int n = i+1;\n\n int nLastChar = numberOfTests%26;\n\n char lastChar = 'A';\n\n lastChar+=nLastChar-1;\n int nFirstChar = 0;\n if(numberOfTests>26){\n nFirstChar= numberOfTests/26;\n }\n\n String avg;\n String var;\n\n if(nFirstChar==0){\n avg = \"=AVERAGE(A\"+n+(\":\"+lastChar)+n+\"),\";\n var = \"=VAR(A\"+n+(\":\"+lastChar)+n+\")\";\n }\n else {\n char firstChar = 'A';\n firstChar += nFirstChar;\n avg = \"=AVERAGE(A\"+n+(\":\"+firstChar+\"\"+lastChar)+n+\"),\";\n var = \"=VAR(A\"+n+(\":A\"+firstChar+\"\"+lastChar)+n+\")\";\n }\n\n s += avg + var;\n resWriter.println(s);\n resWriter.flush();\n\n }\n\n resWriter.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }", "public void displayDistanceMatrix() {\n System.out.println(g.stores.get(g.storeSize - 1)); // storeSize-1 denotes the index of Warehouse or Data centre row.\n System.out.println(\"Some Values are: \");\n for (int j = 0; j < g.storeSize; j++) {\n System.out.print(g.DCStoreMatrix[g.storeSize - 1][j] + \" \");\n }\n System.out.println(\"\");\n }", "public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for (int goalNode = 0; goalNode < wordGraph.V(); goalNode++) {\n Iterable<Integer> shortestPath = bfs.pathTo(goalNode);\n int pathLength = -1;\n if (shortestPath != null) {\n for (int edge : shortestPath) {\n pathLength++;\n }\n }\n if (pathLength != -1) {\n }\n System.out.println(pathLength);\n }\n }\n }", "public static void main(String[] args) {\n\t\tVertex A = new Vertex(\"A\");\n\t\tVertex B = new Vertex(\"B\");\n\t\tVertex C = new Vertex(\"C\");\n\t\tVertex D = new Vertex(\"D\");\n\t\tVertex E = new Vertex(\"E\");\n\n\t\tA.adjacencies = new Edge[]{ new Edge(B, 10),\tnew Edge(C, 3) };\n\t\tB.adjacencies = new Edge[]{\tnew Edge(C, 1), \tnew Edge(D, 2)};\n\t\tC.adjacencies = new Edge[]{ new Edge(B, 4), \tnew Edge(D, 8),\tnew Edge(E, 2)};\n\t\tD.adjacencies = new Edge[]{ new Edge(E, 7)};\n\t\tE.adjacencies = new Edge[]{ new Edge(D, 9)};\n\t\tVertex[] vertices = { A,B,C,D,E };\n\t\t\n\t\tcomputePaths(A);\n\t\t\n\t\tfor (Vertex v : vertices)\n\t\t{\n\t\t System.out.println(\"Distance to \" + v + \": \" + v.minDistance);\n\t\t List<Vertex> path = getShortestPathTo(v);\n\t\t System.out.println(\"Path: \" + path);\n\t\t}\n\t}", "public void printGraph() {\n System.out.println( );\n // the cell number corresponding to a location on a GameBoard\n String cell = \"\"; \n // the distance a cell is from the starting location\n String dist = \"\"; \n\n // for every cell in the graph\n for ( int i = 0; i < graph.length; i++ ) {\n\n // format graph by prefixing a 0 if the number is less\n // than 10. this will ensure output is uniform\n if ( graph[i].graphLoc < 10 )\n cell = \"0\" + graph[i].graphLoc;\n else\n cell = graph[i].graphLoc + \"\";\n\n // format distance by prefixing a space if the number\n // is between 0 and 9 inclusive\n if ( graph[i].dist < 10 && graph[i].dist >= 0 )\n dist = graph[i].dist + \" \";\n // give red color if the cell was never checked\n else if ( graph[i].dist == -1 )\n dist = ANSI_RED + graph[i].dist + \"\" + ANSI_RESET;\n else\n dist = graph[i].dist + \"\";\n\n // print the cell and distance\n // an example output is [13: 5]\n System.out.print(\"[\"+cell+\":\"+dist+\"]\");\n\n // create a new line for the next row\n if ( (i+1) % GameBoard.COLUMNS == 0 )\n System.out.println(\"\\n\");\n }\n }", "public static void printShortestPath(List<Town> sp) {\n\t\tint size = sp.size();\n\t\tif ( size>1 ) {\n\t\t\tfor( int i = 1; i <= size; i++) {\n\t\t\t\tif( i != size ) {\n\t\t\t\t\tSystem.out.print( sp.get(size-i).getName()+\"-\" );\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print( sp.get(size-i).getName());\n\t\t\t\t} \n\t\t\t}\t\t\t\n\t\t}else {\n\t\t\tSystem.out.println(\"There is no possible route\");\n\t\t}\n\t}", "public String toString() {\n \treturn (\"From: \" + vertex1.minToString() + \" To: \"\n \t\t\t+ vertex2.minToString()\n \t\t\t+ \" Distance: \" + distance());\n }", "private void printMyRoutingTable()\n {\n\tString str;\n\tmyGUI.println(\"My Distance table and routes\");\n str = F.format(\"dst |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += (F.format(i, 15));\n }\n myGUI.println(str);\n for (int i = 0; i < str.length(); i++) {\n myGUI.print(\"-\");\n }\n str = F.format(\"cost |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(myDistTable[i], 15);\n }\n myGUI.println();\n myGUI.println(str);\n str = F.format(\"route |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(route[i], 15);\n }\n myGUI.println(str);\n myGUI.println();\n myGUI.println(\"--------------------------------------------\");\n myGUI.println();\n\n }", "public static void print(double[][] path)\n\t{\n\t\tSystem.out.println(\"X: \\t Y:\");\n\n\t\tfor(double[] u: path)\n\t\t\tSystem.out.println(u[0]+ \"\\t\" +u[1]);\n\t}", "public static void main(String[] args) {\n\t\tint[][] grid = {{1,0,2,0,1},{0,0,0,0,0},{0,0,1,0,0}};\n\t\tSystem.out.println(shortestDistance(grid));\n\t}", "public String print(){\n\t\treturn this.sonsPaths_.toString();\n\t}", "public static <V> void printAllShortestPaths(Graph<V> graph) {\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] pesos = new double[matrizPesos.length][matrizPesos.length];\n V[] vertices = graph.getValuesAsArray();\n V[][] caminos = (V[][]) new Object[matrizPesos.length][matrizPesos.length];\n for (int x = 0; x < matrizPesos.length; x++) {\n for (int y = 0; y < matrizPesos.length; y++) {\n if (x == y) {\n pesos[x][y] = -1;\n } else {\n if (matrizPesos[x][y] == -1) {\n pesos[x][y] = Integer.MAX_VALUE; //Si no existe arista se pone infinito\n } else {\n pesos[x][y] = matrizPesos[x][y];\n }\n }\n caminos[x][y] = vertices[y];\n }\n }\n for (int x = 0; x < vertices.length; x++) { // Para cada uno de los vertices del grafo\n for (int y = 0; y < vertices.length; y++) { // Recorre la fila correspondiente al vertice\n for (int z = 0; z < vertices.length; z++) { //Recorre la columna correspondiente al vertice\n if (y != x && z != x) {\n double tam2 = pesos[y][x];\n double tam1 = pesos[x][z];\n if (pesos[x][z] != -1 && pesos[y][x] != -1) {\n double suma = pesos[x][z] + pesos[y][x];\n if (suma < pesos[y][z]) {\n pesos[y][z] = suma;\n caminos[y][z] = vertices[x];\n }\n }\n }\n }\n }\n }\n\n //Cuando se termina el algoritmo, se imprimen los caminos\n for (int x = 0; x < vertices.length; x++) {\n for (int y = 0; y < vertices.length; y++) {\n boolean seguir = true;\n int it1 = y;\n String hilera = \"\";\n while (seguir) {\n if (it1 != y) {\n hilera = vertices[it1] + \"-\" + hilera;\n } else {\n hilera += vertices[it1];\n }\n if (caminos[x][it1] != vertices[it1]) {\n int m = 0;\n boolean continuar = true;\n while (continuar) {\n if (vertices[m].equals(caminos[x][it1])) {\n it1 = m;\n continuar = false;\n } else {\n m++;\n }\n }\n } else {\n if (x == y) {\n System.out.println(\"El camino entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera);\n } else {\n hilera = vertices[x] + \"-\" + hilera;\n if (pesos[x][y] == Integer.MAX_VALUE) {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera + \" con distancia de: \" + (pesos[x][y]));\n }\n }\n seguir = false;\n }\n }\n }\n System.out.println();\n }\n }", "public static void main(String[] args) {\n int vertices = Integer.parseInt(StdIn.readLine());\n //Storing vertex weights\n double[] vertW = new double[vertices];\n for(int i=0;i<vertices;i++)\n vertW[i] = Double.parseDouble(StdIn.readLine());\n //Reading in new graph, G**\n String[] Gstarstar = StdIn.readAllLines();\n //Making graph\n EdgeWeightedDigraph G = new EdgeWeightedDigraph(Gstarstar);\n //Dijkstra All Pairs\n DijkstraAllPairsSP DAP = new DijkstraAllPairsSP(G);\n //Printing output of paths\n for(int i=0; i<G.V(); i++){\n for(int j=0; j<G.V(); j++){\n if(!DAP.hasPath(i,j))\n StdOut.print(i+\" to \"+j+\"\\t\\tno path\");\n else{\n double newEW;\n double EW;\n Iterable<DirectedEdge> path = DAP.path(i,j);\n double totalWeight = 0;\n String sp = \"\"; //String that's going to form the path\n for(DirectedEdge x : path){\n newEW = x.weight();\n EW = newEW + vertW[x.to()] - vertW[x.from()]; //reverse calibrate\n totalWeight += EW;\n sp += \"\\t\"+x.from()+\"->\"+x.to()+\" \"+String.format(\"%.2f\",EW); //adding to path\n }\n StdOut.print(i+\" to \"+j+\"\\t(\"+String.format(\"%.2f\",totalWeight)+\") \");\n StdOut.print(sp);\n }\n StdOut.println();\n }\n StdOut.println();\n }\n }", "@Override\n\tpublic String toString() {\n\t\tString path = \"\";\n\tfor (int i = 0; i < paths.size(); i ++) {\n\t\tfor (int j = 0; j < paths.get(i).size(); j++)\n\t\t\tpath += paths.get(i).get(j) + \", \";\n\t\tpath += \"\\n\";\n\t}\n\treturn path;\n\t\t\n\t}", "static void printPaths(Node node)\n\t{\n\t\tint path[] = new int[1000];\n\t\tprintPathsRecursive(node, path, 0);\n\t}", "public void printRoute() {\n\t\tString route = new String(\"[ROUTE INFO] - Cost: \");\n\t\tif(cost == 0) {\n\t\t\troute += \" Not Yet Calculated, \";\n\t\t}\n\t\telse {\n\t\t\troute += (\"\" + this.cost + \", \");\n\t\t}\n\t\troute += (\"Route Length: \" + solutionLength + \", Route: \");\n\t\troute += \"(\" + solutionRepresentation.get(0).getX() + \",\" + solutionRepresentation.get(0).getY() + \")\";\n\t\tfor(int i = 1; i < solutionLength; i++) {\n\t\t\troute+= \" -> (\" + solutionRepresentation.get(i).getX() + \",\" + solutionRepresentation.get(i).getY() + \")\";\n\t\t}\n\t\tSystem.out.println(route);\n\t}", "void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }", "public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}", "public void printSolution(int queue[], int n){\r\n\t\tSystem.out.print(\"Vertex Distance from Source \\n\");\r\n\t\tfor(int i=0;i<vertices;i++)\r\n\t\t\tSystem.out.println(i + \" \" + queue[i]);\r\n\t}", "public void printPath() {\n System.out.print(\"Path: \");\n for (int i = 0; i < parents.size(); i++) {\n Cell cell = parents.get(i);\n System.out.print(\" (\" + cell.x + \",\" + cell.y + \") \");\n }\n System.out.println(\"\\nVisited cells: \" + visitedCells);\n System.out.println(\"Length of Path: \" + parents.size());\n }", "void debug() {\n\t\tfor( int i = 0; i < N; i++ ) {\t\n\t\t\tSystem.out.print(i+\" \");\n\t\t\tfor( int j = 0; j < N; j++ )\n\t\t\t\tSystem.out.print(j+\":\"+(defined[i][j]?\"T\":\"F\")+\" \"+\n\t\t\t\t\t\tc[i][j]+\" p=\"+path[i][j]+\" f=\"+f[i][j]+\"; \");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void printAdjacencyMatrix();", "public void printSteps() {\n\t\tfor (int y = 0; y < idNode.length; y++) {\r\n\t\t\tint x=y;\r\n\t\t\tString steps = \"\" + x;\r\n\t\t\twhile (idNode[x] != x) {\r\n\t\t\t\tx = idNode[x];\r\n\t\t\t\tsteps += \"->\" + x;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(steps);\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tdouble t = Math.pow(2, 64);\r\n\t\tSystem.out.println(t-Math.pow(2, 64));\r\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tout = new PrintWriter(System.out);\r\n\t\tsc = new StringTokenizer(\"\");\r\n\t\tint test = nxtInt();\r\n\t\twhile(test > 0){\r\n\t\t\tnxtInt();\r\n\t\t\tnxtInt();\r\n\t\t\tstart_x = nxtInt()-1;\r\n\t\t\tstart_y = nxtInt()-1;\r\n\t\t\tn = nxtInt();\r\n\t\t\tx = new int[n+1];\r\n\t\t\ty = new int[n+1];\r\n\t\t\tint i = 0;\r\n\t\t\twhile(i < n){\r\n\t\t\t\tx[i] = nxtInt()-1;\r\n\t\t\t\ty[i] = nxtInt()-1;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tx[n] = start_x;\r\n\t\t\ty[n]= start_y;\r\n\t\t\tdp = new long[n+1][(1<<n)];\r\n\t\t\tfor(long[]ar:dp)\r\n\t\t\t\tArrays.fill(ar, -1);\r\n\t\t\tout.println(\"The shortest path has length \"+minPath(n, 0));\r\n\t\t\ttest--;\r\n\t\t}\r\n\t\tout.close();\r\n\r\n\t}", "public String toString(){\n String s = \"\";\n s += \"\\t\";\n \n for (int i = 0; i < n; i++){\n // adding vertices for columns\n s += vertices[i] + \"\\t\";\n }\n \n s += \"\\n\";\n \n for (int i = 0; i < n; i++){\n s += vertices[i] + \"\\t\"; // vertex for row\n for (int j = 0; j < n; j++){\n s += edges[j][i] + \"\\t\"; // adding edges across row\n }\n s += \"\\n\";\n }\n \n return s;\n }", "public static void main(String[] args) {\n\n String filename = \"src/main/resources/dijkstraData.txt\";\n UndirectedWeightedGraph G = new UndirectedWeightedGraph(filename, 200, true);\n Dijkstra dijkstra = new Dijkstra(G, 0);\n dijkstra.buildShortestPath();\n\n List<Integer> nodes = new ArrayList<>(Arrays.asList(7,37,59,82,99,115,133,165,188,197));\n for (int v: nodes) {\n System.out.print (dijkstra.getDist(v - 1) + \" \");\n }\n System.out.println();\n }", "@Override\n public String toString() {\n StringBuilder s = new StringBuilder();\n int N = size();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", tileAt(i,j)));\n }\n s.append(\"\\n\");\n }\n /*\n s.append(manhattan());\n s.append(\"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", _goal[i][j]));\n }\n s.append(\"\\n\");\n }*/\n s.append(\"\\n\");\n return s.toString();\n }", "public void printAdjacents(ArrayList<Position> nodes){\r\n\t\tSystem.out.print(\"For node (\"+this.y+\",\"+this.x+\"):\");\r\n\t\tfor(Position node:nodes){\r\n\t\t\tSystem.out.print(\"(\"+node.getY()+\",\"+node.getX()+\")\");\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\r\n\t}", "public ShortestPathMatrix<V,E> allPairsShortestPaths();", "public static void main(String[] args) {\n\t\tchar[][] grid = {\r\n\t {'S', 'O', 'O', 'S', 'S'},\r\n\t {'D', 'O', 'D', 'O', 'D'},\r\n\t {'O', 'O', 'O', 'O', 'X'},\r\n\t {'X', 'D', 'D', 'O', 'O'},\r\n\t {'X', 'D', 'D', 'D', 'O'}};\r\n \tSystem.out.println(getDistance(grid));\r\n\t}", "public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }", "public int[][] print() {\r\n\t\tif(n_row!=-1) {\r\n\t\t\t\r\n\t\tint[][] res=new int[n_row][n_col];\r\n\t\t\r\n\t\tfor(Node n:allNodes.values()) {\r\n\t\t\t\r\n\t\t\tres[n.rowIndex][n.colIndex]=n.path;\r\n\t\t}\r\n\t\t\r\n\t\treturn res;\r\n\t}\r\n\t\telse {\r\n\t\t\tint[][] res=new int[length][length];\r\n\t\t\tSystem.out.println(paths.size());\r\n\t\t\tfor(Integer pi:paths.keySet()) {\r\n\t\t\t\t\r\n\t\t\t\tStack<Node> p=paths.get(pi);\r\n\t\t\t\tSystem.out.println(p.toString());\r\n\t\t\t\tNode n1=p.pop();\r\n\t\t\t\twhile(!p.isEmpty()) {\r\n\t\t\t\t\tNode n2=p.pop();\r\n\t\t\t\t\tres[n1.index][n2.index]=pi;\r\n\t\t\t\t\tres[n2.index][n1.index]=pi;\r\n\t\t\t\t\tn1=n2;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}", "private void printPath(LinkedList<String> visited) {\r\n\r\n if (flag == false) {\r\n System.out.println(\"Yes there exists a path between \" + START + \" and \" + END);\r\n }\r\n for (String node : visited) { //creating for loop to print the nodes stored in visited array \r\n System.out.print(node);\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n }", "public static void main(String[] args) {\n\t\tint vertices = Integer.parseInt(args[0]);\n\t\tint edges = Integer.parseInt(args[1]);\n\t\tint seed = Integer.parseInt(args[2]);\n\t\tRandom random = new Random(seed);\n\n\t\tAdjMatrixEdgeWeightedDirectedGraph g = new AdjMatrixEdgeWeightedDirectedGraph(vertices);\n\t\tfor (int i = 0; i < edges; i++) {\n\t\t\tint v = random.nextInt(vertices);\n\t\t\tint w = random.nextInt(vertices);\n\t\t\tdouble weight = Math.round(100 * (random.nextDouble() - 0.15)) / 100.0;\n\t\t\tif (v == w) g.addEdge(new Edge(v, w, Math.abs(weight)));\n\t\t\telse g.addEdge(new Edge(v, w, weight));\n\t\t}\n\n\t\t// run Floyd-Warshall algorithm\n\t\tFloydWarshall spt = new FloydWarshall(g);\n\n\t\t// print all-pairs shortest path distances\n\t\tSystem.out.print(\" \");\n\t\tfor (int v = 0; v < g.V(); v++) {\n\t\t\tSystem.out.printf(\"%6d \", v);\n\t\t}\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < g.V(); v++) {\n\t\t\tSystem.out.printf(\"%3d: \", v);\n\t\t\tfor (int w = 0; w < g.V(); w++) {\n\t\t\t\tif (spt.hasPath(v, w)) System.out.printf(\"%6.2f \", spt.dist(v, w));\n\t\t\t\telse System.out.printf(\" Inf \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// print negative cycle\n\t\tif (spt.hasNegativeCycle()) {\n\t\t\tSystem.out.println(\"Negative cost cycle:\");\n\t\t\tfor (int v : spt.negativeCycle()) System.out.println(v);\n\t\t\tSystem.out.println();\n\t\t// print all-pairs shortest paths\n\t\t} else {\n\t\t\tfor (int v = 0; v < g.V(); v++) {\n\t\t\t\tfor (int w = 0; w < g.V(); w++) {\n\t\t\t\t\tif (spt.hasPath(v, w)) {\n\t\t\t\t\t\tSystem.out.printf(\"%d to %d (%5.2f) \", v, w, spt.dist(v, w));\n\t\t\t\t\t\tfor (Edge e : spt.path(v, w)) System.out.print(e + \" \");\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.printf(\"%d to %d no path\\n\", v, w);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void printAllPaths() {\n\n if (root == null) System.out.println(\"No paths for you!\");\n else {\n printPaths(root.left, root.element.toString());\n printPaths(root.right, root.element.toString());\n }\n }", "public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}", "public void print(){\n for(int i=0; i<maze.length;i+=1) {\n for (int j = 0; j < maze[0].length; j += 1){\n if(i == start.getRowIndex() && j == start.getColumnIndex())\n System.out.print('S');\n else if(i == goal.getRowIndex() && j == goal.getColumnIndex())\n System.out.print('E');\n else if(maze[i][j]==1)\n System.out.print(\"█\");\n else if(maze[i][j]==0)\n System.out.print(\" \");\n\n\n }\n System.out.println();\n }\n }", "protected static void show(Comparable[] a) {\n\t\t\r\n\t\tString retStr = \"\";\r\n\t\tfor(int i=0 ; i< a.length; i++)\r\n\t\t\tretStr+=\" \"+a[i];\r\n\t\t\r\n\t\tSystem.out.println(retStr);\r\n\t\t\r\n\t}", "public void printAllPaths(int s, int d)\n {\n boolean[] isVisited = new boolean[v];\n ArrayList<Integer> pathList = new ArrayList<>();\n\n //add source to path[]\n pathList.add(s);\n\n //Call recursive utility\n printAllPathsUtil(s, d, isVisited, pathList);\n }", "public String toString() {\n\t\tString pathString = \"\";\n\t\tfor(Point point : path) {\n\t\t\tpathString = pathString + \"[ \" + point.getX() + \", \" + point.getY() + \" ]\";\n\t\t}\n\t\treturn pathString;\n\t}", "public String toString() \n {\n String NEWLINE = System.getProperty(\"line.separator\");\n StringBuilder s = new StringBuilder();\n for (int v = 0; v < V; v++) \n {\n s.append(v + \": \");\n for (DirectedEdge e : adj[v]) \n {\n \tif(e.online)\n \t{\n \t\ts.append(e + \" \");\n \t}\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }", "protected String printablePath(IVertex<String> target){\n\n String lineout = \"\";\n\n LinkedList<IVertex<String>> path = this.getPath(target);\n\n IVertex<String> previous = null;\n\n IVertex<String> next = null;\n\n if(path!=null) {\n Iterator<IVertex<String>> it = path.iterator();\n\n while (it.hasNext()) {\n\n previous = next;\n\n next = it.next();\n\n IWeightedEdge<String> prevedge = null;\n\n if(previous!=null && next!=null){\n prevedge = this.weightedGraph.getEdge(previous,next);\n }\n\n if(prevedge!=null)\n lineout+= \" \" +prevedge.getWeight() + \" \";\n\n lineout += \" \" + next.getValue() + \" \";\n }\n }\n return lineout;\n }", "public void PrintKNeighbours() {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tSystem.out.print(ptr.dim_weight+\" \");\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}", "private static void printPlan(String[][] salle) {\n for (int i = salle.length - 1; i >= 0; i--) {\n System.out.printf(\"R \" + i + \"| \");\n for (int j = 0; j < salle[i].length; j++) {\n System.out.print(salle[i][j]);\n }\n System.out.println();\n }\n System.out.println(\" __________________________________________ \");\n System.out.println(\" | ECRAN | \");\n System.out.println(\" ------------------------------------------ \");\n }", "private void printMST(List<Ride> sTRides, List<Integer> visitedRides, int graph[][], int parent[]){\r\n /* This method prints the solution to the primMST method\r\n It does so by splitting the rides in to their sections of the theme park\r\n and printing the ride name alongside the distance from the previous ride in the route of the theme park and the waiting time at each ride\r\n */\r\n System.out.println(\"Ride Theme Distance From Previous Ride Waiting Time at Ride\\n\");\r\n for(int i =1; i < rideCount; i ++){\r\n System.out.println(String.format(\"%-30s %-35s %-35d %-40d\", sTRides.get(i).getName(), sTRides.get(i).getTheme(), graph[parent[visitedRides.get(i)]][visitedRides.get(i)], sTRides.get(i).getWaitingTime()));\r\n }\r\n totalWaitingTime();\r\n }", "public static void main(String[] args) {\n\t\tint cost[][] = { {1, 2, 3},\n {4, 8, 2},\n {1, 5, 3} };\n\t\tint len=3;\n\t\tdp=new int[len+1][len+1];\n\t\tfor(int i=0;i<len;++i)\n\t\t\tArrays.fill(dp[i], Integer.MAX_VALUE);\n\t\n\tSystem.out.println(getMinCost(cost, 2, 2, len));\n\tprintPath(cost, 2, 2);\n\t}", "public static void main(String[] args) {\n\t\tDirectedWeightedGraph graph = new DirectedWeightedGraph(3);\n\t\tgraph.addEdge(0, 1, 2);\n\t\tgraph.addEdge(0, 2, 3);\n\t\tgraph.addEdge(2, 1, -2);\n\t\tSystem.out.println(graph);\n\t\tint start = 0;\n\t\tint end = 1;\n\t\tDijkstra d = new Dijkstra(graph, start);\n\t\td.showShortestPathBetweenFromAndTo(graph, start, end);\n\t\td.showAllShortestPathInGraph(graph, start);\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n int startIndex = 0;\n while (startIndex < total - laneSize - 1) {\n startIndex = printOddLane(sb, startIndex);\n startIndex = printEvenLane(sb, startIndex + laneSize);\n }\n\n return sb.toString();\n }", "public static void printDP(){\r\n for (int i = 0; i < sequence.length(); i++) {\r\n for (int j = 0; j < sequence.length(); j++) {\r\n System.out.print(DPMatrix[i][j] + \" \");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }", "public static <V> void printShortestPath(V value, Dictionary<V, DijkstraResult<V>> paths) {\n Enumeration<DijkstraResult<V>> elementos = paths.elements();\n while (elementos.hasMoreElements()) {\n DijkstraResult<V> aux = elementos.nextElement();\n if (!aux.getVertex().equals(value)) {\n String hilera = \"\";\n DijkstraResult<V> temp = aux;\n while (!temp.getVertex().equals(value)) {\n hilera = \"-\" + temp.getVertex() + hilera;\n temp = paths.get(temp.getPrecursor());\n }\n hilera = value + hilera;\n if (aux.getDistance() == Integer.MAX_VALUE - 1) {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + aux.getVertex() + \" es \" + hilera + \" con una distancia de infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + aux.getVertex() + \" es \" + hilera + \" con una distancia de: \" + aux.getDistance());\n }\n } else {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + value + \" es \" + value + \" con una distancia de: \" + aux.getDistance());\n }\n }\n }", "private String printRoute() {\n String r = String.valueOf(this.route.get(0));\n int index = 1;\n while (index < this.route.size()) {\n r = r + \" - \" + this.route.get(index);\n index++;\n }\n return r;\n }", "public void printDetails() \r\n\t{\r\n\t\t// Print cells in path\r\n\t\tSystem.out.print(\"Path:\");\r\n\t\tfor(Cell c: path)\r\n\t\t\tSystem.out.print(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\t// Print path length\r\n\t\tSystem.out.println(\"\\nLength of path: \" + path.size());\r\n\t\t\r\n\t\t// Print visited cell amount\r\n\t\tint lastCell = path.size() - 1;\r\n\t\tint visitedCells = path.get(lastCell).getDiscoveryTime() + 1;\r\n\t\tSystem.out.println(\"Visited cells: \" + visitedCells + '\\n');\r\n\t}", "private static void printArrayTraversal() {\n for (int i = 0; i < traversalLength; i++)\n System.out.print(arrayTraversal[i] + \" \");\n }", "public void printPath( String destName )\n {\n \t DecimalFormat df = new DecimalFormat(\"###.##\");\n Vertex w = vertexMap.get( destName );\n if( w == null )\n throw new NoSuchElementException( \"Destination vertex not found\" );\n else if( w.dist == INFINITY )\n System.out.println( destName + \" is unreachable\" );\n else\n {\n //System.out.print( \"(Distance is: \" + w.dist + \") \" );\n printPath( w );\n System.out.println(df.format(w.dist) );\n }\n }", "public void printPath(){\n\t\tListIterator<Path> listIterator =temp.listIterator();\n\t\twhile(listIterator.hasNext()){\n\t\t\tSystem.out.print(listIterator.next().getPos()+\" \");\n\t\t}\n\t}", "private static void printCircuit() {\n\tfor (Gate i: gates) {\n\t System.out.println( i.toString() );\n\t}\n\tfor (Wire r: wires) {\n\t System.out.println( r.toString() );\n\t}\n }", "public void print() {\n\t\tSystem.out.println(word0 + \" \" + word1 + \" \" + similarity);\n\t}", "public static void printPath(Tile[] path) {\n\t\tSystem.out.print(\"Path tiles: {\");\n\t\tfor (Tile tile : path) {\n\t\t\tSystem.out.print(tile + \",\");\n\t\t}\n\t\tSystem.out.println(\"}\");\n\t}", "public void display(){\n for(int i=0;i<N;i++){\n for(int j=0;j<N;j++)\n System.out.print(adj_matrix[i][j]+\" \");\n System.out.println();\n }\n }", "public String toString(){\n String string = \"\" + nrVertices;\n for(DEdge edge : edges){\n string += \"\\n\" + (edge.getVertex1()) + \" \" + (edge.getVertex2());\n }\n return string;\n }", "@Override\n public String toString() {\n if (map == null || map.size() == 0)\n return \"\";\n StringBuilder sb = new StringBuilder();\n\n Set<String> visited = new HashSet<>();\n\n for (Map.Entry<String, Vertex> m : map.entrySet()) {\n dfs(sb, m.getKey(), m.getValue(), visited);\n }\n\n return sb.toString();\n }", "public void printPath()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(path.contains(c))\r\n\t\t\t\t\tSystem.out.print(\"#\");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}", "static void printSolution(int sol[][]) {\n for (int x = 0; x < N; x++) {\n for (int y = 0; y < N; y++)\n System.out.print(sol[x][y] + \" \");\n System.out.println();\n }\n }", "public String toString()\n {\n\n String elem;\n StringBuilder s = new StringBuilder();\n for(int i = 0 ; i < n ; i++)\n {\n elem = Integer.toString(array1[i]);\n s.append(elem);\n if(i < (n-1))\n s.append(',');\n }\n s.append('|');\n for(int i = 0 ; i < n ; i++)\n {\n elem = Integer.toString(array2[i]);\n s.append(elem);\n if(i < (n-1))\n s.append(',');\n }\n return s.toString();\n }", "public static void connectNetwork(int src, int dest, boolean printPath)\r\n\t{\r\n\t\tint v = routers;\r\n\t\t\r\n\t\tint parent[] = new int[v];//parent node array\r\n\t\tint dist[] = new int[v];// distance array\r\n\t\tboolean visited[] = new boolean[v];// visited will be either true or false\r\n\t\t\r\n\t\t// initialize parent, distance arrays\r\n\t\tfor (int i = 0; i < v; i++ ) { \r\n\t\t\tvisited[i] = false;\r\n\t\t\tparent[i] = -1;\r\n\t\t\tdist[i] = Integer.MAX_VALUE;\r\n\t\t}\r\n\t\t\r\n\t\t// initialize the source distance as zero\r\n\t\tdist[src] = 0;\r\n\t\t\r\n\t\t// get minimum edge from the unvisited nodes\r\n\t\tfor (int count = 0; count < v-1; count++) { // loop for all v nodes\r\n\t\t\t\r\n\t\t\tint start = -1;\r\n\t\t\tint min = Integer.MAX_VALUE;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\tif (visited[i] == false && dist[i] < min) {\r\n\t\t\t\t\tmin = dist[i];\r\n\t\t\t\t\tstart = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// minimum distance is computed for all connected edges\r\n\t\t\tif (start == -1) \r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t// update the current node as visited\r\n\t\t\tvisited[start] = true;\r\n\t\t\t\r\n\t\t\t// update all adjacent nodes' distance array\r\n\t\t\tfor (int end = 0; end < v; end++) {\r\n\t\t\t\tif ((visited[end] != true) && (graph[start][end] != -1) &&\r\n\t\t\t\t\t\t(dist[start] != Integer.MAX_VALUE) &&\r\n\t\t\t\t\t\t(dist[start] + graph[start][end] < dist[end])) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdist[end] = dist[start] + graph[start][end];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// start node is the parent node in BFS tree\r\n\t\t\t\t\tparent[end] = start;\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();\r\n\t\t\r\n\t\tif (dest != -1) {\r\n\t\t\t\r\n\t\t\t// Case#4: shortest path between source and destination nodes \r\n\t\t\tif (parent[dest] == -1) {\r\n\t\t\t\tSystem.out.println(\"There is no path from \" + (src+1) + \" to \" + (dest+1) + \" exists.\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Shortest distance from \" + (src+1) + \" to \" + (dest+1) + \" is: \" + dist[dest]);\r\n\t\t\t\tSystem.out.print(\"Corresponding Shortest Path is: \");\r\n\t\t\t\tprintNodes(parent, parent[dest], src);\r\n\t\t\t\tSystem.out.println(dest+1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n System.out.println(\"The Shortest Distance from node you entered, \"+ (src+1) + \" are\\n\");\r\n //Printing shortest path length\r\n\t\t\tSystem.out.println(\"Destination\\tDistance\\n========================\");\r\n for (int i = 0; i < v; i++) {\r\n System.out.println(\"\\t\"+ (i+1) + \"\\t \"+ dist[i]); // Printing the node number and distance\r\n }\r\n \r\n\t\t\tif (printPath == true) {\r\n\t\t\t\t\r\n\t\t\t\t// case#2: Print all shortest paths from source node\r\n\t\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\t\tif (i == src)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse if (parent[i] == -1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Shortest path from \" + (src+1) + \" to \" + (i+1) + \" doesn't exist.\");\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.print(\"Shortest Path from \" + (src+1) + \" to \" + (i+1) + \" is: \");\r\n\t\t\t\t\tprintNodes(parent, parent[i], src);\r\n\t\t\t\t\tSystem.out.println(i+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static void show(int[] kd){\n final int NUM_OF_LINES = 5;\n\n Line[] lines = new Line[NUM_OF_LINES];\n\n //gives each array element the necessary memory\n for(int i = 0; i < NUM_OF_LINES; i++){\n lines[i] = new Line();\n }\n\n //in order to print\n lines[0].setLine(4,0,0);\n lines[1].setLine(3,1,2);\n lines[2].setLine(2,3,5);\n lines[3].setLine(1,6,9);\n lines[4].setLine(0,10,14);\n\n for(int i = 0; i < NUM_OF_LINES; i++){\n String tab = \"\";\n\n //creates the 'tab' effect based on position\n for(int j = 0; j < lines[i].getT(); j++){\n tab += \" \";\n }\n System.out.print(tab);\n\n for(int j = lines[i].getA(); j < lines[i].getB() + 1; j++){\n if(kd[j] == 0){\n System.out.print(\". \");\n }\n else{\n System.out.print(\"x \");\n }\n }\n System.out.println();\n }\n\n }", "public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}", "void calculate_distance()\n {\n \t\n \tfor(int i = 0; i<V ; i++)\n \t{\n \t\tfor(int j = 0; j<E ; j++)\n \t\t{\n \t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n \t\t}\n \t\tsp[i] = dist[i];\n \t\tx[i] = dist[i];\n \t}\n \tSystem.out.println();\n }", "@Test public void testPublic17() {\n Graph<Integer> graph= TestGraphs.testGraph5();\n List<Integer> shortestPath= new ArrayList<Integer>();\n\n assertEquals(8, graph.Dijkstra(131, 141, shortestPath));\n assertEquals(\"131 330 132 141\", TestGraphs.listToString(shortestPath));\n }", "public String toString( )\n{ \n String s=\"\\nThe Mines\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n s = s + theMines[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n }\n s += \"\\nMined neighbor counts\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n if( theCounts[ r ][ c ] == 9 )\n s = s + \"X\" + \" \";\n else\n s = s + theCounts[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n } \n return( s );\n}", "@Test public void testPublic14() {\n Graph<String> graph= TestGraphs.testGraph2();\n List<String> shortestPath= new ArrayList<String>();\n\n assertEquals(1, graph.Dijkstra(\"apple\", \"banana\", shortestPath));\n assertEquals(\"apple banana\", TestGraphs.listToString(shortestPath));\n\n assertEquals(2, graph.Dijkstra(\"apple\", \"cherry\", shortestPath));\n assertEquals(\"apple banana cherry\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(3, graph.Dijkstra(\"apple\", \"date\", shortestPath));\n assertEquals(\"apple banana cherry date\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(4, graph.Dijkstra(\"apple\", \"elderberry\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(5, graph.Dijkstra(\"apple\", \"fig\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry fig\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(6, graph.Dijkstra(\"apple\", \"guava\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry fig guava\",\n TestGraphs.listToString(shortestPath));\n }", "public List<node_info> shortestPath(int src, int dest);", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cities = Integer.parseInt(sc.nextLine());\n\t\tint roads = Integer.parseInt(sc.nextLine());\n\n EdgeWeightedGraph graphObj = new EdgeWeightedGraph(cities);\n for (int i = 0; i < roads; i++) {\n String way = sc.nextLine();\n String[] tokens = way.split(\" \");\n graphObj.addEdge(new Edge(Integer.parseInt(tokens[0]),\n Integer.parseInt(tokens[1]), Double.parseDouble(tokens[2])));\n }\n\n\t\tString caseToGo = sc.nextLine();\n\t\tswitch (caseToGo) {\n\t\tcase \"Graph\":\n\t\t\t//Print the Graph Object.\n\t\t System.out.println(graphObj);\n\t\t\tbreak;\n\n\t\tcase \"DirectedPaths\":\n\t\t\t// Handle the case of DirectedPaths, where two integers are given.\n\t\t\t// First is the source and second is the path[1].\n\t\t\t// If the path exists print the distance between them.\n\t\t\t// Other wise print \"No Path Found.\"\n\t\t String[] path = sc.nextLine().split(\" \");\n\t\t int source = Integer.parseInt(path[0]);\n\t\t int destiny = Integer.parseInt(path[1]);\n\t\t\tDijkstraUndirectedSP pathObj = new DijkstraUndirectedSP(graphObj, source);\n\t\t\tif(pathObj.hasPathTo(destiny)) {\n\t\t\t\tSystem.out.println(pathObj.distTo(destiny));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No Path Found.\");\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase \"ViaPaths\":\n\t\t\t// Handle the case of ViaPaths, where three integers are given.\n\t\t\t// First is the source and second is the via is the one where path should pass throuh.\n\t\t\t// third is the path[1].\n\t\t\t// If the path exists print the distance between them.\n\t\t\t// Other wise print \"No Path Found.\"\n\t\t String[] path1 = sc.nextLine().split(\" \");\n\t\t int source1 = Integer.parseInt(path1[0]);\n\t\t int via = Integer.parseInt(path1[1]);\n\t\t int destiny1 = Integer.parseInt(path1[2]);\n\n\t\t\tDijkstraUndirectedSP path1Obj = new DijkstraUndirectedSP(graphObj, source1);\n\t\t\tif(path1Obj.hasPathTo(via)) {\n\n\t\t\t\tDijkstraUndirectedSP viaObj = new DijkstraUndirectedSP(graphObj, via);\n\t\t\t\tif(viaObj.hasPathTo(destiny1)) {\n\t\t\t\t\tdouble dist = path1Obj.distTo(via);\n\t\t\t\t\tdist += viaObj.distTo(destiny1);\n\t\t\t\t\tSystem.out.println(dist);\n\n\t\t\t\tList<Integer> arraylist = new List<Integer>();\n\t\t\t\t\tString srcvia = path1Obj.pathTo(via)+\"\"+viaObj.pathTo(destiny1);\n\t\t\t\t\t//System.out.println(srcvia);\n\t\t\t\t \tString[] temp = srcvia.split(\" \");\n\t\t\t\t \tString[] temp1 = temp[0].split(\"-\");\n\t\t\t\t \tString[] temp2 = temp[2].split(\"-\");\n\t\t\t\t \tString[] temp3 = temp[4].split(\"-\");\n\t\t\t\t \tString[] temp4 = temp[6].split(\"-\");\n\t\t\t\t \tString[] temp5 = temp[8].split(\"-\");\n\n\t\t\t\t// \tString[] val = temp[1].split(\" \");\n\t\t\t\t \tarraylist.add(Integer.parseInt(temp1[1]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp1[0]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp3[1]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp3[0]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp5[1]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp5[0]));\n\n\n\n\n\n\n\t\t\t\tSystem.out.println(arraylist);\n\n\n\n\t\t\t\t\t//System.out.println(path1Obj.pathTo(via)+\"\"+viaObj.pathTo(destiny1));\n\t\t\t}\n\n\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No Path Found.\");\n\t\t\t}\n\t\t}\n\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "@Override\n public String toString() {\n return \"(\" + label + \", \" + dist + \")\";\n }", "public void printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cities = sc.nextInt();\n\t\tint roadlines = sc.nextInt();\n\t\tsc.nextLine(); // for reading string in nextline\n\t\tEdgeWeightedGraph edge = new EdgeWeightedGraph(cities);\n\t\t// The Time Complexity is O(E)\n\t\t// The road lines is the number of edges\n\t\tfor (int i = 0; i < roadlines; i++) {\n\t\t\tString[] tokens = sc.nextLine().split(\" \");\n\t\t\tedge.addEdge(new Edge(Integer.parseInt(tokens[0]), Integer.parseInt(tokens[1]),\n\t\t\t\tDouble.parseDouble(tokens[2])));\n\t\t}\n\t\tString caseToGo = sc.nextLine();\n\t\tswitch (caseToGo) {\n\t\tcase \"Graph\":\n\t\t\t//Print the Graph Object.\n\t\t\tSystem.out.println(edge);\n\t\t\tbreak;\n\n\t\tcase \"DirectedPaths\":\n\t\t\t// Handle the case of DirectedPaths, where two integers are given.\n\t\t\t// First is the source and second is the destination.\n\t\t\t// If the path exists print the distance between them.\n\t\t\t// Other wise print \"No Path Found.\"\n\t\t\tString[] input = sc.nextLine().split(\" \");\n\t\t\tDijkstraSP shortest = new DijkstraSP(\n edge, Integer.parseInt(input[0]));\n double distance = shortest.distTo(Integer.parseInt(input[1]));\n // The time complexity is O(1)\n if (!shortest.hasPathTo(Integer.parseInt(input[1]))) {\n \tSystem.out.println(\"No Path Found.\");\n } else {\n \tSystem.out.println(distance);\n }\n\t\t\tbreak;\n\n\t\tcase \"ViaPaths\":\n\t\t\t// Handle the case of ViaPaths, where three integers are given.\n\t\t\t// First is the source and second is the via is the one where path should pass throuh.\n\t\t\t// third is the destination.\n\t\t\t// If the path exists print the distance between them.\n\t\t\t// Other wise print \"No Path Found.\"\n\t\t\tString[] str1 = sc.nextLine().split(\" \");\n\t\t\tboolean flag1 = false;\n\t\t\tboolean flag2 = false;\n\t\t\tdouble distance1 = 0.0;\n\t\t\tdouble distance2 = 0.0;\n\t\t\tDijkstraSP shortest1 = new DijkstraSP(edge, Integer.parseInt(str1[0]));\n\t\t\t// Time Complexity: O(1)\n\t\t\tif (shortest1.hasPathTo(Integer.parseInt(str1[1]))) {\n\t\t\t\tflag1 = true;\n\t\t\t\tdistance1 = shortest1.distance(Integer.parseInt(str1[1]));\n\t\t\t}\n\t\t\tDijkstraSP shortest2 = new DijkstraSP(edge, Integer.parseInt(str1[1]));\n\t\t\t// Time Complexity: O(1)\n\t\t\tif (shortest2.hasPathTo(Integer.parseInt(str1[2]))) {\n\t\t\t\tflag2 = true;\n\t\t\t\tdistance2 = shortest2.distance(Integer.parseInt(str1[2]));\n\t\t\t}\n\t\t\tdouble Distance = distance1 + distance2;\n\t\t\t// Time Complexity: O(1)\n\t\t\tif (flag1 && flag2) {\n\t\t\t// Displays output upto 1 decimal point\n\t\t\tSystem.out.format(\"%.1f\", Distance);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"No Path Found.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n ArrayList<Integer> path = new ArrayList<>();\n for (Edge eachlink : shortest1.pathTo(Integer.parseInt(str1[1]))) {\n int either = eachlink.either();\n int other = eachlink.other(eachlink.either());\n if (!path.contains(other)) {\n path.add(other);\n }\n if (!path.contains(either)) {\n path.add(either);\n }\n }\n for (Edge eachlink1 : shortest2.pathTo(Integer.parseInt(str1[2]))) {\n int either1 = eachlink1.either();\n int other1 = eachlink1.other(eachlink1.either());\n if (!path.contains(other1)) {\n path.add(other1);\n }\n if (!path.contains(either1)) {\n path.add(either1);\n }\n }\n for (int everyval : path) {\n System.out.print(everyval + \" \");\n }\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "private void showFinalPath() // run after end dest has been set\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(cities.get(i));\n }", "public static void printMatrix()\n {\n for(int i = 0; i < n; i++)\n {\n System.out.println();\n for(int j = 0; j < n; j++)\n {\n System.out.print(connectMatrix[i][j] + \" \");\n }\n }\n }", "public void showAnts() {\n\t\tfor (int i = 0; i < this.getNumberOfAnts(); i++) {\n\t\t\tSystem.out.println(this.getAnt(i));\n\t\t}\n\t}", "public void PrintDistances(boolean bellmanford, String filename){\n\t\tPrintWriter pw;\n\t\t\n\t\t//if statement writes to a different file depending on which algorithm just ran\n\t\tif (bellmanford) { //Bellman-Ford output file\n\t\t\ttry {\n\t\t\t\tpw = new PrintWriter(new FileOutputStream(filename + \".bout\"));\n\t\t\t\t\n\t\t\t\tfor (Vertex v : adjlist.values()){\n\t\t\t\t\t//accounts for \"Infinity\" strings in answer key output files (so they match)\n\t\t\t\t\tif (v.dist == Integer.MAX_VALUE) {\n\t\t\t\t\t\tpw.println(v.name + \" Infinity\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpw.println(v.name + \" \" + (float) v.dist);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpw.flush();\n\t\t\t\tpw.close();\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\ttry { //Dijkstra's output file\n\t\t\t\tpw = new PrintWriter(new FileOutputStream(filename + \".dout\"));\n\n\t\t\t\tfor (Vertex v : adjlist.values()){\n\t\t\t\t\tif (v.dist == Integer.MAX_VALUE) {\n\t\t\t\t\t\tpw.println(v.name + \" Infinity\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpw.println(v.name + \" \" + (float) v.dist);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpw.flush();\n\t\t\t\tpw.close();\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6754311", "0.6541191", "0.64110124", "0.63461643", "0.6260942", "0.6172635", "0.6171264", "0.61428165", "0.6121084", "0.60880244", "0.6081924", "0.60682714", "0.59764016", "0.59582055", "0.5940192", "0.5921468", "0.59160405", "0.5906768", "0.5855767", "0.58544403", "0.57996166", "0.5774897", "0.57678825", "0.5765876", "0.57597154", "0.57493246", "0.5743789", "0.57109207", "0.5674788", "0.5646802", "0.5636373", "0.5626983", "0.56202817", "0.5608307", "0.56073433", "0.55945283", "0.5592008", "0.5587", "0.5582331", "0.5579483", "0.5573624", "0.55641115", "0.55547726", "0.55499804", "0.55466217", "0.55372196", "0.5536991", "0.5526045", "0.54966944", "0.5491849", "0.5484679", "0.5471632", "0.54697883", "0.5467498", "0.54544115", "0.5448843", "0.54487306", "0.5441092", "0.54403865", "0.54382277", "0.54364514", "0.54330623", "0.54313624", "0.5428505", "0.54218763", "0.5406228", "0.54002744", "0.540006", "0.5390072", "0.5388107", "0.5386084", "0.53844386", "0.5380751", "0.53803533", "0.5379418", "0.5370965", "0.5367335", "0.5363902", "0.53577614", "0.5355341", "0.5347431", "0.5333567", "0.53180015", "0.5313918", "0.5312342", "0.5310631", "0.53044975", "0.5300937", "0.5292317", "0.52917624", "0.52887285", "0.5283832", "0.52830714", "0.52810633", "0.5279068", "0.5278755", "0.52781546", "0.5277387", "0.52759093", "0.52699584" ]
0.7328411
0
Function to print shortest path from source to currentVertex using parents array
private void printPath(int currentVertex, int[] parents) { // Base case : Source node has been processed if (currentVertex == NO_PARENT) { return; } printPath(parents[currentVertex], parents); System.out.print(currentVertex + " "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printPath(ArrayList<Integer> parent, int index, Graph graph){\n if (parent.get(index)==-1)\r\n return;\r\n\r\n //recurse till we get src\r\n printPath(parent, parent.get(index), graph);\r\n shortestVerticesToPlot.add(graph.vertices.get(index).point);\r\n\r\n System.out.print(index + \"\\t\\t\");\r\n }", "private void printSolution(int startVertex, double[] distances, int[] parents) {\n int nVertices = distances.length;\n System.out.print(\"Vertex\\t Distance\\tPath\");\n\n for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) {\n if (vertexIndex != startVertex) {\n System.out.print(\"\\n\" + startVertex + \" -> \");\n System.out.print(vertexIndex + \" \\t\\t \");\n System.out.print(distances[vertexIndex] + \"\\t\\t\");\n printPath(vertexIndex, parents);\n }\n }\n }", "void print_path(int[]parent,int[]dist,int s)\n {\n System.out.println(); \n \n //path from s to all other vertices\n \n for(int i=0;i<parent.length;i++)\n {\n System.out.println(\"From \"+s+\" to \"+i);\n System.out.print(\"path: \");\n print_node(parent,i);\n System.out.print(\"END\");\n if(dist[i]==INF)\n System.out.println(\" cost=INF\"); \n else\n System.out.println(\" cost=\"+dist[i]);\n\n }\n \n \n System.out.println();\n \n\n \n }", "private void printPath() {\n // generate and print the shortest path.\n if (this == this.previous) {\n graphPathRef.add(this);\n } else if (this.previous == null) {\n System.out.print(\"\");\n } else {\n graphPathRef.add(this);\n this.previous.printPath();\n }\n }", "public void printMST() {\n\t\t\n\t\tString mstPath = \"\";\n\t\t\n\t\t/**Stores the parent child hierarchy*/\n\t\tint distance[] = new int[this.vertices];\n\t\t\n\t\t/**Stores all the vertices with their distances from source vertex*/\n\t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\tmap.put(0, 0);\n\t\t\n\t\tfor(int i = 1; i < vertices; i++){\n\t\t\tmap.put(i, Integer.MAX_VALUE);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < vertices; i++){\n\t\t\t\n\t\t\tInteger minVertex = extractMin(map), minValue = map.get(minVertex);\n\t\t\tdistance[minVertex] = minValue;\n\t\t\t\n\t\t\tmstPath += minVertex + \" --> \";\n\t\t\t\n\t\t\t/**Removing min vertex from map*/\n\t\t\tmap.remove(minVertex);\n\t\t\t\n\t\t\t/**Exploring edges of min vertex*/\n\t\t\tArrayList<GraphEdge> edges = this.adjList[minVertex];\n\t\t\tfor(GraphEdge edge : edges){\n\t\t\t\tif(map.containsKey(edge.destination)){\n\t\t\t\t\tif(map.get(edge.destination) > distance[edge.source] + edge.weight){\n\t\t\t\t\t\tmap.put(edge.destination, distance[edge.source] + edge.weight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(mstPath);\n\t}", "private void printPathPara(int currentVertex, int[] parents, ListaEnlazada lista) {\n if (currentVertex == NO_PARENT) {\n return;\n }\n \n printPathPara(parents[currentVertex], parents, lista);\n NodoTemp temp = new NodoTemp(currentVertex);\n lista.add(temp);\n\n System.out.print(currentVertex + \" \");\n }", "public static void computePaths(Vertex source){\n\t\tsource.minDistance=0;\n\t\t//visit each vertex u, always visiting vertex with smallest minDistance first\n\t\tPriorityQueue<Vertex> vertexQueue=new PriorityQueue<Vertex>();\n\t\tvertexQueue.add(source);\n\t\twhile(!vertexQueue.isEmpty()){\n\t\t\tVertex u = vertexQueue.poll();\n\t\t\tSystem.out.println(\"For: \"+u);\n\t\t\tfor (Edge e: u.adjacencies){\n\t\t\t\tVertex v = e.target;\n\t\t\t\tSystem.out.println(\"Checking: \"+u+\" -> \"+v);\n\t\t\t\tdouble weight=e.weight;\n\t\t\t\t//relax the edge (u,v)\n\t\t\t\tdouble distanceThroughU=u.minDistance+weight;\n\t\t\t\tif(distanceThroughU<v.minDistance){\n\t\t\t\t\tSystem.out.println(\"Updating minDistance to \"+distanceThroughU);\n\t\t\t\t\tv.minDistance=distanceThroughU;\n\t\t\t\t\tv.previous=u;\n\t\t\t\t\t//move the vertex v to the top of the queue\n\t\t\t\t\tvertexQueue.remove(v);\n\t\t\t\t\tvertexQueue.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void printPath( Vertex dest )\n {\n if( dest.prev != null )\n {\n printPath( dest.prev );\n // System.out.print( \" to \" );\n }\n System.out.print( dest.name +\" \" );\n }", "public List<node_info> shortestPath(int src, int dest);", "private void computePaths(Vertex source, Vertex target, ArrayList<Vertex> vs)\n {\n \tfor (Vertex v : vs)\n \t{\n \t\tv.minDistance = Double.POSITIVE_INFINITY;\n \t\tv.previous = null;\n \t}\n source.minDistance = 0.;\t\t// distance to self is zero\n IndexMinPQ<Vertex> vertexQueue = new IndexMinPQ<Vertex>(vs.size());\n \n for (Vertex v : vs) vertexQueue.insert(Integer.parseInt(v.id), v);\n\n\t\twhile (!vertexQueue.isEmpty()) \n\t\t{\n\t \t// retrieve vertex with shortest distance to source\n\t \tVertex u = vertexQueue.minKey();\n\t \tvertexQueue.delMin();\n\t\t\tif (u == target)\n\t\t\t{\n\t\t\t\t// trace back\n\t\t\t\twhile (u.previous != null)\n\t\t\t\t{;\n\t\t\t\t\tu = u.previous;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n \t// Visit each edge exiting u\n \tfor (Edge e : u.adjacencies)\n \t\t{\n \t\tVertex v = e.target;\n\t\t\t\tdouble weight = e.weight;\n \tdouble distanceThroughU = u.minDistance + weight;\n\t\t\t\tif (distanceThroughU < v.minDistance) \n\t\t\t\t{\n\t\t\t\t\tint vid = Integer.parseInt(v.id);\n\t\t \t\tvertexQueue.delete(vid);\n\t\t \t\tv.minDistance = distanceThroughU;\n\t\t \t\tv.previous = u;\n\t\t \t\tvertexQueue.insert(vid,v);\n\t\t\t\t}\n\t\t\t}\n }\n }", "public void shortestPathList() {\n Cell cell = maze.getGrid()[r - 1][r - 1];\n\n parents.add(cell);\n\n while (cell.getParent() != null) {\n parents.add(cell.getParent());\n cell = cell.getParent();\n }\n\n Collections.reverse(parents);\n }", "public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for (int goalNode = 0; goalNode < wordGraph.V(); goalNode++) {\n Iterable<Integer> shortestPath = bfs.pathTo(goalNode);\n int pathLength = -1;\n if (shortestPath != null) {\n for (int edge : shortestPath) {\n pathLength++;\n }\n }\n if (pathLength != -1) {\n }\n System.out.println(pathLength);\n }\n }\n }", "public void printShortestPath() {\n Cell[][] grid = maze.getGrid();\n\n for (int i = 0; i <= r; i++) {\n // Rows: This loop needs to iterate r times since there are r rows\n for (int j = 0; j < r; j++) {\n Cell currentCell;\n if (i == r) { // If it is on the last row, print the bottom row of the cells\n currentCell = grid[i - 1][j];\n System.out.print(currentCell.bottomRow());\n } else { // If it's not on the last row, print the top row of the cells\n currentCell = grid[i][j];\n System.out.print(currentCell.topRow());\n }\n }\n System.out.print(\"+\");\n System.out.println();\n\n // This loop only needs to iterate r-1 times since there is only r-1 \"|\" rows\n if (i != r) {\n for (int k = 0; k < r; k++) {\n Cell currentCell = grid[i][k];\n if ((i == 0 && k == 0))\n System.out.print(currentCell.zeroDistanceColumn2());\n else if (parents.contains(currentCell))\n System.out.print(currentCell.zeroDistanceColumn2());\n else\n System.out.print(currentCell.distanceColumn2());\n }\n System.out.print(\"|\");\n System.out.println();\n }\n }\n }", "List<V> getShortestPath(V vertex);", "protected String printablePath(IVertex<String> target){\n\n String lineout = \"\";\n\n LinkedList<IVertex<String>> path = this.getPath(target);\n\n IVertex<String> previous = null;\n\n IVertex<String> next = null;\n\n if(path!=null) {\n Iterator<IVertex<String>> it = path.iterator();\n\n while (it.hasNext()) {\n\n previous = next;\n\n next = it.next();\n\n IWeightedEdge<String> prevedge = null;\n\n if(previous!=null && next!=null){\n prevedge = this.weightedGraph.getEdge(previous,next);\n }\n\n if(prevedge!=null)\n lineout+= \" \" +prevedge.getWeight() + \" \";\n\n lineout += \" \" + next.getValue() + \" \";\n }\n }\n return lineout;\n }", "void shortestPath( final VertexType fromNode, Integer node );", "@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}", "static void FindPath(vertex s, vertex[] array){\r\n\t\tvertex v; \r\n\t\tint min = Integer.MAX_VALUE;\r\n\t\t//node wN; vertex wV; //wN= adjacent node in LinkedList; wV= find the values in the vertices for wL\r\n\t\tint j =0;\r\n\t\ts.known = true;\r\n\t\ts.dist = 0;\r\n\t\tShortestPath(s, array);\r\n\t\r\n\t\twhile(j<array.length-1 ){ //&& array[j].known== false){\r\n\t\t\tint count = 0; \r\n\t\t\tmin = Integer.MAX_VALUE;\r\n\t\t\tfor(int i = 0; i<array.length; i++){\r\n\t\t\t\tif(array[i].known== false && array[i].dist < min){\r\n\t\t\t\t\tmin = array[i].dist;\r\n\t\t\t\t\tcount = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tv = array[count];\r\n //System.out.println(\"count: \" + count + \"Next v: \" + v.name);\r\n\t\t\tShortestPath(v, array);\r\n\t\t\tj++; \t\t\r\n }\r\n\t}", "private static void computePaths(Vertex source) {\n source.minDistance = 0;\n // retrieves with log(n) time\n PriorityQueue<Vertex> vertexPriorityQueue = new PriorityQueue<>();\n\n //BFS traversal\n vertexPriorityQueue.add(source);\n\n // O((v + e) * log(v))\n while (!vertexPriorityQueue.isEmpty()) {\n // this poll always returns the shortest distance vertex at log(v) time\n Vertex vertex = vertexPriorityQueue.poll();\n\n //visit each edge exiting vertex (adjacencies)\n for (Edge edgeInVertex : vertex.adjacencies) {\n // calculate new distance between edgeInVertex and target\n Vertex targetVertex = edgeInVertex.target;\n double edgeWeightForThisVertex = edgeInVertex.weight;\n double distanceThruVertex = vertex.minDistance + edgeWeightForThisVertex;\n if (distanceThruVertex < targetVertex.minDistance) {\n // modify the targetVertex with new calculated minDistance and previous vertex\n // by removing the old vertex and add new vertex with updates\n vertexPriorityQueue.remove(targetVertex);\n targetVertex.minDistance = distanceThruVertex;\n // update previous with the shortest distance vertex\n targetVertex.previous = vertex;\n vertexPriorityQueue.add(targetVertex);// adding takes log(v) time because needs to heapify\n }\n }\n }\n }", "private static void backtrace(int dest, int[] parents) {\n int node = dest;\n\n // Hmmm.... need some code.\n System.out.println(\"Path\" );\n\n }", "void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }", "public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }", "@Override\n public List<node_data> shortestPath(int src, int dest) {\n reset();\n for (node_data node : G.getV()) {\n node.setWeight(Double.POSITIVE_INFINITY);\n }\n\n DWGraph_DS.Node currentNode = (DWGraph_DS.Node) G.getNode(src);\n currentNode.setWeight(0);\n PriorityQueue<node_data> unvisitedNodes = new PriorityQueue(G.nodeSize(), weightComperator);\n unvisitedNodes.addAll(G.getV());\n HashMap<Integer, node_data> parent = new HashMap<>();\n parent.put(src, null);\n\n while (currentNode.getWeight() != Double.POSITIVE_INFINITY) {\n if (G.getNode(dest).getTag() == 1) {\n break;\n }\n for (edge_data edge : G.getE(currentNode.getKey())) {\n DWGraph_DS.Node neighbor = (DWGraph_DS.Node) G.getNode(edge.getDest());\n double tmpWeight = currentNode.getWeight() + edge.getWeight();\n if (tmpWeight < neighbor.getWeight()) {\n neighbor.setWeight(tmpWeight);\n unvisitedNodes.remove(neighbor);\n unvisitedNodes.add(neighbor);\n parent.put(neighbor.getKey(), currentNode);\n }\n }\n currentNode.setTag(1);\n if(currentNode.getKey()==dest) break;\n unvisitedNodes.remove(currentNode);\n currentNode = (DWGraph_DS.Node) unvisitedNodes.poll();\n }\n /*\n Rebuild the path list\n */\n if (!parent.keySet().contains(dest)) return null;\n List<node_data> pathList = new ArrayList<>();\n currentNode = (DWGraph_DS.Node) G.getNode(dest);\n while (parent.get(currentNode.getKey()) != null) {\n pathList.add(currentNode);\n currentNode = (DWGraph_DS.Node) parent.get(currentNode.getKey());\n }\n Collections.reverse(pathList);\n return pathList;\n }", "public static <V> void printAllShortestPaths(Graph<V> graph) {\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] pesos = new double[matrizPesos.length][matrizPesos.length];\n V[] vertices = graph.getValuesAsArray();\n V[][] caminos = (V[][]) new Object[matrizPesos.length][matrizPesos.length];\n for (int x = 0; x < matrizPesos.length; x++) {\n for (int y = 0; y < matrizPesos.length; y++) {\n if (x == y) {\n pesos[x][y] = -1;\n } else {\n if (matrizPesos[x][y] == -1) {\n pesos[x][y] = Integer.MAX_VALUE; //Si no existe arista se pone infinito\n } else {\n pesos[x][y] = matrizPesos[x][y];\n }\n }\n caminos[x][y] = vertices[y];\n }\n }\n for (int x = 0; x < vertices.length; x++) { // Para cada uno de los vertices del grafo\n for (int y = 0; y < vertices.length; y++) { // Recorre la fila correspondiente al vertice\n for (int z = 0; z < vertices.length; z++) { //Recorre la columna correspondiente al vertice\n if (y != x && z != x) {\n double tam2 = pesos[y][x];\n double tam1 = pesos[x][z];\n if (pesos[x][z] != -1 && pesos[y][x] != -1) {\n double suma = pesos[x][z] + pesos[y][x];\n if (suma < pesos[y][z]) {\n pesos[y][z] = suma;\n caminos[y][z] = vertices[x];\n }\n }\n }\n }\n }\n }\n\n //Cuando se termina el algoritmo, se imprimen los caminos\n for (int x = 0; x < vertices.length; x++) {\n for (int y = 0; y < vertices.length; y++) {\n boolean seguir = true;\n int it1 = y;\n String hilera = \"\";\n while (seguir) {\n if (it1 != y) {\n hilera = vertices[it1] + \"-\" + hilera;\n } else {\n hilera += vertices[it1];\n }\n if (caminos[x][it1] != vertices[it1]) {\n int m = 0;\n boolean continuar = true;\n while (continuar) {\n if (vertices[m].equals(caminos[x][it1])) {\n it1 = m;\n continuar = false;\n } else {\n m++;\n }\n }\n } else {\n if (x == y) {\n System.out.println(\"El camino entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera);\n } else {\n hilera = vertices[x] + \"-\" + hilera;\n if (pesos[x][y] == Integer.MAX_VALUE) {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera + \" con distancia de: \" + (pesos[x][y]));\n }\n }\n seguir = false;\n }\n }\n }\n System.out.println();\n }\n }", "public void printPath() {\n System.out.print(\"Path: \");\n for (int i = 0; i < parents.size(); i++) {\n Cell cell = parents.get(i);\n System.out.print(\" (\" + cell.x + \",\" + cell.y + \") \");\n }\n System.out.println(\"\\nVisited cells: \" + visitedCells);\n System.out.println(\"Length of Path: \" + parents.size());\n }", "private void dfs(String source) {\n visited.add(source);\n\n System.out.println(source);\n\n for (Object vertex : graph.get(source)) {\n if (!visited.contains(vertex))\n dfs((String) vertex);\n }\n }", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "public List<Vertex> getShortestPathTo(Vertex target)\n {\n List<Vertex> path = new ArrayList<Vertex>();\n for (Vertex vertex = target; vertex != null; vertex = vertex.previous)\n path.add(vertex);\n Collections.reverse(path);\n return path;\n }", "public void printPath(Vertex v) {\n if ( v.dist == 0 )\n return;\n printPath(v.path);\n System.out.print(\"-> \" + v.graphLoc+\" \");\n }", "public static void connectNetwork(int src, int dest, boolean printPath)\r\n\t{\r\n\t\tint v = routers;\r\n\t\t\r\n\t\tint parent[] = new int[v];//parent node array\r\n\t\tint dist[] = new int[v];// distance array\r\n\t\tboolean visited[] = new boolean[v];// visited will be either true or false\r\n\t\t\r\n\t\t// initialize parent, distance arrays\r\n\t\tfor (int i = 0; i < v; i++ ) { \r\n\t\t\tvisited[i] = false;\r\n\t\t\tparent[i] = -1;\r\n\t\t\tdist[i] = Integer.MAX_VALUE;\r\n\t\t}\r\n\t\t\r\n\t\t// initialize the source distance as zero\r\n\t\tdist[src] = 0;\r\n\t\t\r\n\t\t// get minimum edge from the unvisited nodes\r\n\t\tfor (int count = 0; count < v-1; count++) { // loop for all v nodes\r\n\t\t\t\r\n\t\t\tint start = -1;\r\n\t\t\tint min = Integer.MAX_VALUE;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\tif (visited[i] == false && dist[i] < min) {\r\n\t\t\t\t\tmin = dist[i];\r\n\t\t\t\t\tstart = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// minimum distance is computed for all connected edges\r\n\t\t\tif (start == -1) \r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t// update the current node as visited\r\n\t\t\tvisited[start] = true;\r\n\t\t\t\r\n\t\t\t// update all adjacent nodes' distance array\r\n\t\t\tfor (int end = 0; end < v; end++) {\r\n\t\t\t\tif ((visited[end] != true) && (graph[start][end] != -1) &&\r\n\t\t\t\t\t\t(dist[start] != Integer.MAX_VALUE) &&\r\n\t\t\t\t\t\t(dist[start] + graph[start][end] < dist[end])) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdist[end] = dist[start] + graph[start][end];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// start node is the parent node in BFS tree\r\n\t\t\t\t\tparent[end] = start;\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();\r\n\t\t\r\n\t\tif (dest != -1) {\r\n\t\t\t\r\n\t\t\t// Case#4: shortest path between source and destination nodes \r\n\t\t\tif (parent[dest] == -1) {\r\n\t\t\t\tSystem.out.println(\"There is no path from \" + (src+1) + \" to \" + (dest+1) + \" exists.\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Shortest distance from \" + (src+1) + \" to \" + (dest+1) + \" is: \" + dist[dest]);\r\n\t\t\t\tSystem.out.print(\"Corresponding Shortest Path is: \");\r\n\t\t\t\tprintNodes(parent, parent[dest], src);\r\n\t\t\t\tSystem.out.println(dest+1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n System.out.println(\"The Shortest Distance from node you entered, \"+ (src+1) + \" are\\n\");\r\n //Printing shortest path length\r\n\t\t\tSystem.out.println(\"Destination\\tDistance\\n========================\");\r\n for (int i = 0; i < v; i++) {\r\n System.out.println(\"\\t\"+ (i+1) + \"\\t \"+ dist[i]); // Printing the node number and distance\r\n }\r\n \r\n\t\t\tif (printPath == true) {\r\n\t\t\t\t\r\n\t\t\t\t// case#2: Print all shortest paths from source node\r\n\t\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\t\tif (i == src)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse if (parent[i] == -1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Shortest path from \" + (src+1) + \" to \" + (i+1) + \" doesn't exist.\");\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.print(\"Shortest Path from \" + (src+1) + \" to \" + (i+1) + \" is: \");\r\n\t\t\t\t\tprintNodes(parent, parent[i], src);\r\n\t\t\t\t\tSystem.out.println(i+1);\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 shortestPath(Map<Integer, DistanceInfo> distanceTable,\n int source, int destination)\n {\n // Backtrack using a stack, using the destination node\n Stack<Integer> stack = new Stack<>();\n stack.push(destination);\n\n // Backtrack by getting the previous node of every node and putting it on the stack.\n // Start at the destination.\n int previousVertex = distanceTable.get(destination).getLastVertex();\n while (previousVertex != -1 && previousVertex != source)\n {\n stack.push(previousVertex);\n previousVertex = distanceTable.get(previousVertex).getLastVertex();\n }\n\n if (previousVertex ==-1)\n {\n System.err.println(\"No path\");\n }\n else\n {\n System.err.println(\"Shortest path: \");\n while (! stack.isEmpty())\n {\n System.err.println(stack.pop());\n }\n }\n }", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tint[] prev = new int[dwg.nodeSize()];\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\tprev[src%dwg.nodeSize()] = -1;\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t\tprev[u.getKey()%dwg.nodeSize()] = v.getKey();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tList<node_data> ans = new ArrayList<node_data>();\n\t\tint run = dest;\n\t\twhile(run != src) {\n\t\t\tans.add(0,dwg.getNode(run));\n\t\t\trun = prev[run%dwg.nodeSize()];\n\t\t}\n\t\tans.add(0, dwg.getNode(src));\n\n\t\treturn ans;\n\t}", "private void generatePath(List<Coordinate> source, List<Coordinate> path) {\n for (int i = 0; i < source.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = source.get(i);\n Coordinate end = source.get(i + 1);\n graph.dijkstra(start);\n graph.printPath(end);\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n }\n }", "protected static void printPath(int[] thePath) {\r\n\t\t\r\n\t\tint[] orderedPath = new int[thePath.length];\r\n\t\r\n\t\tfor (int i = 0; i < thePath.length; i++)\r\n\t\t\torderedPath[i] = -1;\r\n\t\r\n\t\torderedPath[0] = myEndPole;\r\n\t\tint i = myEndPole;\r\n\t\tint j = 1;\r\n\t \r\n\t\twhile (true && j < orderedPath.length) {\t\r\n\t\t\tif (thePath[i] == -1 && i == START_POLE)\r\n\t\t\t\tbreak;\r\n\t\t\torderedPath[j] = thePath[i];\t\r\n\t\t\ti = thePath[i];\r\n\t\t\tj++;\r\n\t\t}\r\n\t\r\n\t\tSystem.out.print(\"The Shortest Path is \");\r\n\t\r\n\t\tfor (i = orderedPath.length - 1; i >= 0; i--) {\r\n\t\t\tif (orderedPath[i] == -1)\r\n\t\t\t\tcontinue;\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tSystem.out.print((orderedPath[i] + 1));\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSystem.out.print((orderedPath[i] + 1) + \" -> \");\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t}", "public void findStrongestPathsFromFile(String filename){\n\n try {\n\n finputStream = new FileInputStream(filename);\n\n fileScanner = new Scanner(finputStream);\n\n String sourceVertex = fileScanner.nextLine();\n\n IVertex<String> source = this.weightedGraph.getVertex(sourceVertex);\n\n if(source == null){\n throw new Exception(\"Invalid Source Vertex found\");\n }\n\n this.findAllPahtsInGraphWithSource(source);\n\n fileScanner.nextLine(); // Empty line read out.. and ignore\n\n foutStream = new FileOutputStream(this.outputFileName); // open the file for writing\n\n while(fileScanner.hasNextLine()){\n\n try {\n\n String nodeNext = fileScanner.nextLine();\n\n IVertex<String> targetNode = this.weightedGraph.getVertex(nodeNext);\n\n if(targetNode!=null && distance.get(targetNode)!=null) {\n\n String lineout = sourceVertex + \"\\t\" + nodeNext + \" \\t \" + Double.toString(\n distance.get(targetNode)) + \" : \";\n\n lineout += printablePath(targetNode);\n\n lineout += \"\\r\\n\";\n\n foutStream.write(lineout.getBytes());\n }\n\n }catch(Exception ex){\n ex.printStackTrace();\n }\n }\n\n foutStream.close();\n\n finputStream.close();\n\n }catch(Exception ex){\n ex.printStackTrace();\n }\n }", "private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is this doing here???\n if (neighbors.isEmpty()){\n \n }\n \n // looping through to find distances from start to neighbors\n for (T neighbor : neighbors){ \n int neighborIndex = vertexIndex(neighbor); \n int d = distances[currentIndex] + getEdgeWeight(current, neighbor);\n \n if (d < distances[neighborIndex]){ // if this distance is less than previous distance\n distances[neighborIndex] = d;\n closestPredecessor[neighborIndex] = current; // now closest predecessor is current\n }\n }\n \n if (current.equals(end)){\n atEnd = true;\n }\n else{\n // finding unvisited node that is closest to start node\n T min = getMinUnvisited();\n if (min != null){\n unvisited.remove(min); // remove minimum neighbor from unvisited\n visited.add(min); // add minimum neighbor to visited\n current = min;\n }\n }\n }\n computePath();\n totalDistance = distances[vertexIndex(end)];\n }", "public static void main(String[] args) {\n\t\tint[] vertex= {0,1,2,3,4};\r\n\t\tint[][] graph= {{100,3,100,100,5},{100,100,8,5,3},{100,100,100,100,100},{100,100,2,100,100},{100,100,100,4,100}};\r\n\t\tint[] dist= {0,100,100,100,100};\r\n\t\tint i=0;\r\n\t\tint tvc=1;\r\n\t\twhile(tvc<5) {\r\n\t\t\tfor(int j=0;j<vertex.length;j++) {\r\n\t\t\t\tif(dist[j]>graph[i][j]+dist[i]) {\r\n\t\t\t\t\tdist[j]=graph[i][j]+dist[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttvc++;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Shortest path (distance from source):\");\r\n\t\tSystem.out.println(\"a: \"+dist[0]);\r\n\t\tSystem.out.println(\"b: \"+dist[1]);\r\n\t\tSystem.out.println(\"c: \"+dist[2]);\r\n\t\tSystem.out.println(\"d: \"+dist[3]);\r\n\t\tSystem.out.println(\"e: \"+dist[4]);\r\n\t}", "private void calculateShortestDistances (GraphStructure graph,int startVertex,int destinationVertex) {\r\n\t\t//traverseRecursively(graph, startVertex);\r\n\t\tif(pathList.contains(destinationVertex)) {\r\n\t\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\t\tdistanceArray[startVertex]=0;\r\n\t\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\t\tList<Edge> list;\r\n\t\t\tlist = graph.getAdjacencyList()[startVertex];\r\n\t\t\tif(startVertex==destinationVertex) {\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\tif(! isVisited[value.getVertex()]) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[startVertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\r\n\t\t\t\t\t\t\tshortestPathList.add(value.getVertex());\r\n\t\t\t\t\t\t\tcalculateShortestDistances(graph,value.getVertex(), distanceValueOfDestinationVertex);\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\r\n\t\t\t/*for(Integer value : spanningTreeSet) {\r\n\t\t\t\tSystem.out.print(value+\" \");\r\n\t\t\t}*/\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No route is present between given vertices !\");\r\n\t\t}\r\n\t}", "void shortestPaths( Set<Integer> nodes );", "private void calculateShortestRoute(String strSourceTerminal){\n\t\tshortestTravelTime = new HashMap<>();\n\n //stores parent of every terminal in shortest travel time\n parent = new HashMap<>();\n \n //heap + map data structure\n MinimumHeap<BaggageTerminal> minHeap = new MinimumHeap<>();\n\n //initialize all terminal with infinite distance from source terminal\n for(BaggageTerminal baggageTerminal : graph.getTerminals()){\n minHeap.add(Integer.MAX_VALUE, baggageTerminal);\n }\n \n BaggageTerminal sourceTerminal = graph.getTerminal(strSourceTerminal);\n \n //set distance of source terminal to itself 0\n minHeap.decrease(sourceTerminal, 0);\n\n //put it in map\n shortestTravelTime.put(sourceTerminal, 0);\n\n //source terminal parent is null\n parent.put(sourceTerminal, null);\n\n //iterate till heap is not empty\n while(!minHeap.empty()){\n //get the min value from heap node which has vertex and distance of that vertex from source vertex.\n MinimumHeap<BaggageTerminal>.Node heapNode = minHeap.extractMinNode();\n BaggageTerminal currentTerminal = heapNode.key;\n\n //update shortest distance of current vertex from source vertex\n shortestTravelTime.put(currentTerminal, heapNode.weight);\n\n //iterate through all connections of current terminal\n for(Connection connection : currentTerminal.getConnections()){\n\n //get the adjacent terminal\n BaggageTerminal adjacent = getConnectingTerminal(currentTerminal, connection);\n\n //if heap does not contain adjacent vertex means adjacent vertex already has shortest distance from source vertex\n if(!minHeap.containsData(adjacent)){\n continue;\n }\n\n //add distance of current vertex to edge weight to get distance of adjacent vertex from source vertex\n //when it goes through current vertex\n int newDistance = shortestTravelTime.get(currentTerminal) + connection.getWeight();\n\n //see if this above calculated distance is less than current distance stored for adjacent vertex from source vertex\n if(minHeap.getWeight(adjacent) > newDistance) {\n minHeap.decrease(adjacent, newDistance);\n parent.put(adjacent, currentTerminal);\n }\n }\n }\n return;\n }", "private static void findShortestPath(ArrayList<WeightedEdge> edges, int start, int dest, int nNodes) {\n int costs[] = new int[nNodes];\n int parents[] = new int[nNodes];\n boolean doneWithNode[] = new boolean[nNodes];\n\n // cost[i] has the cost of getting to node number i or is UNKNOWN if no cost figure out yet.\n // parent[i] contains the parent (or the way) we got to node i.\n // done[i] is true if we've already worked on all the children of node i.\n\n // Initialize the arrays.\n for (int i = 0; i<nNodes; i++) {\n costs[i] = UNKNOWN;\n parents[i] = UNKNOWN;\n doneWithNode[i] = false;\n }\n\n int node = start; // This is the node we are working on. Let's start with start node.\n costs[node] = 0; // The cost of getting to the start node is 0!\n\n // While not done processing all the nodes...\n\n // Loop through all the edges (edges array list).\n // Skip those edges whose source is doesn't match the node we're working on.\n\n // For edge (that has source of current node) figure out potential to\n // get it. (How much does it cost to get to node we're on? Add to\n // that the cost of the edge. That's the new price to set to dest of edge.\n\n // Is that a new low cost for that dest edge node?\n // Or is the dest edge node cost currently UNKNOWN? That means we have no cost.\n // If so, store the cost. Store the parent.\n\n // Once done with all the edges, mark the current node as\n // done being processed.\n doneWithNode[node] = true;\n\n // Get next node to work on.\n node = getLowestCostUnprocessedNode(costs, doneWithNode);\n\n // Done with while loop\n\n for (int i=0; i<parents.length; i++) {\n System.out.println(\"Node: \" + i + \" Cost: \" + costs[i] + \" Backtrace Parent: \" + parents[i]);\n }\n\n backtrace(dest, parents);\n }", "private void computeShortestPathsFromSource(V source) {\n\t\tBFSDistanceLabeler<V, E> labeler = new BFSDistanceLabeler<V, E>();\n\t\tlabeler.labelDistances(mGraph, source);\n\t\tdistances = labeler.getDistanceDecorator();\n\t\tMap<V, Number> currentSourceSPMap = new HashMap<V, Number>();\n\t\tMap<V, E> currentSourceEdgeMap = new HashMap<V, E>();\n\n\t\tfor (V vertex : mGraph.getVertices()) {\n\n\t\t\tNumber distanceVal = distances.get(vertex);\n\t\t\t// BFSDistanceLabeler uses -1 to indicate unreachable vertices;\n\t\t\t// don't bother to store unreachable vertices\n\t\t\tif (distanceVal != null && distanceVal.intValue() >= 0) {\n\t\t\t\tcurrentSourceSPMap.put(vertex, distanceVal);\n\t\t\t\tint minDistance = distanceVal.intValue();\n\t\t\t\tfor (E incomingEdge : mGraph.getInEdges(vertex)) {\n\t\t\t\t\tfor (V neighbor : mGraph\n\t\t\t\t\t\t\t.getIncidentVertices(incomingEdge)) {\n\t\t\t\t\t\tif (neighbor.equals(vertex))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t// V neighbor = mGraph.getOpposite(vertex,\n\t\t\t\t\t\t// incomingEdge);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tNumber predDistanceVal = distances.get(neighbor);\n\n\t\t\t\t\t\tint pred_distance = predDistanceVal.intValue();\n\t\t\t\t\t\tif (pred_distance < minDistance && pred_distance >= 0) {\n\t\t\t\t\t\t\tminDistance = predDistanceVal.intValue();\n\t\t\t\t\t\t\tcurrentSourceEdgeMap.put(vertex, incomingEdge);\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\tmDistanceMap.put(source, currentSourceSPMap);\n\t\tmIncomingEdgeMap.put(source, currentSourceEdgeMap);\n\t}", "void dijkstra(int graph[][], int src) {\n int dist[] = new int[V]; // The output array. dist[i] will hold\n // the shortest distance from src to i\n\n // sptSet[i] will true if vertex i is included in shortest\n Boolean sptSet[] = new Boolean[V];\n\n for (int i = 0; i < V; i++) {\n dist[i] = Integer.MAX_VALUE;\n sptSet[i] = false;\n }\n\n dist[src] = 0;\n\n // Find shortest path for all vertices\n for (int count = 0; count < V-1; count++) {\n\n int u = minDistance(dist, sptSet);\n\n // Mark the picked vertex as processed\n sptSet[u] = true;\n\n // Update dist value of the adjacent vertices of the\n // picked vertex.\n for (int v = 0; v < V; v++)\n\n\n if (!sptSet[v] && graph[u][v]!=0 &&\n dist[u] != Integer.MAX_VALUE &&\n dist[u]+graph[u][v] < dist[v])\n dist[v] = dist[u] + graph[u][v];\n }\n\n printSolution(dist, V);\n }", "protected void startBuilding(IVertex<String> source){\n\n for(int i =0 ; i < Constants.MAX_THREADS; i++){\n shortestThread[i] = new ShortestPathFinderThread(this.weightedGraph, source,\n this.settledNodes, this.unSettledNodes,\n this.predecessors, this.distance);\n shortestThread[i].start();\n }\n }", "public InTree<V,E> generalShortestPathFromSource(V source);", "public static void getShortestPath()\r\n\t{\r\n\t\tScanner scan = new Scanner(System.in); //instance for input declared\r\n\t\tSystem.out.print(\"\\nPlease enter the Source node for shortest path: \");\r\n\t\tint src = scan.nextInt() - 1;\r\n\t\twhile(src < 0 || src > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered source node is out of range, please enter again: \"); // Printing error\r\n\t\t\tsrc = scan.nextInt() - 1;\t//re-input source\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.print(\"Please enter the destination node for shortest path: \");\r\n\t\tint dest = scan.nextInt() - 1;\r\n\t\twhile(dest < 0 || dest > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered destination node is out of range, please enter again: \"); // Printing error\r\n\t\t\tdest = scan.nextInt() - 1;\t//re-input destination\r\n\t\t}\r\n\t\t\r\n\t\tconnectNetwork(src, dest, true);\r\n\t}", "@Override\n public List<node_info> shortestPath(int src, int dest) {\n int counter=0;//counter for index of listPath\n List<node_info> listPath=new ArrayList<node_info>();//The reverse list that is returned\n List<node_info> listResult=new ArrayList<node_info>();//the returned list\n if(!DijkstraHelp(src,dest)) return null;//if there is no path from src to dest\n if(src==dest) {\n listPath.add(this.ga.getNode(src));\n return listPath;\n }\n //the other case:\n node_info d=this.ga.getNode(dest);\n listPath.add(counter,d);//insert the dest in order to go from destination to source\n //counter++;\n weighted_graph gCopy=copy();\n Iterator<node_info> it=gCopy.getV().iterator();//run on the whole graph\n while(it.hasNext()){\n if(listPath.get(counter).getKey()==src) break;//if we finished\n if(gCopy.getV(listPath.get(counter).getKey()).contains(it.next())) {//remove the nodes that we were already checked if\n //they need to be insert to listPath\n continue;\n }\n Iterator<node_info> currentIt=gCopy.getV(listPath.get(counter).getKey()).iterator();//iterator on the ni-list of the\n //last node were insert to the listPath\n if(currentIt!=null) {\n node_info min=null;\n while (currentIt.hasNext()){\n node_info currentLoop=currentIt.next();\n if(currentLoop.getTag()+gCopy.getEdge(listPath.get(counter).getKey(),currentLoop.getKey())==\n listPath.get(counter).getTag()){//check if this is the node that appropriate to the shortest path\n min=currentLoop;\n }\n }\n listPath.add(min);//insert to listPath\n counter++;\n }\n }\n for(int i=listPath.size()-1;i>=0;i--){\n listResult.add(listPath.size()-i-1,listPath.get(i));//reverse the list\n }\n return listResult;\n }", "@Override\r\n\tpublic List<Integer> getShortestPath(int source, int destination, GraphStructure graph) {\r\n\t\tshortestPathList = new ArrayList<Integer>();\r\n\t\tisVisited = new boolean[graph.getNumberOfVertices()];\r\n\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\tdistanceArray[source]=0;\r\n\t\tcalculateShortestDistances(graph, source, destination);\r\n\t\tfor(Integer value : shortestPathList) {\r\n\t\t\tSystem.out.println(value+\" \");\r\n\t\t}\r\n\t\treturn shortestPathList;\r\n\t}", "private List<Edge> getPath(Vertex source) {\n\t\tint [] predecessors = new ShortestPath().findShortestPath(this.residualNetwork, source);\n\t\tList<Edge> path = retrieveEdgesFromPredecessorArray(predecessors);\n\t\treturn path;\n\t}", "void BFS(int s, int d) \r\n { \r\n int source = s;\r\n int destination = d;\r\n boolean visited[] = new boolean[V];\r\n int parent[] = new int[V];\r\n \r\n // Create a queue for BFS \r\n LinkedList<Integer> queue = new LinkedList<Integer>(); \r\n \r\n // Mark the current node as visited and enqueue it \r\n \r\n visited[s]=true; \r\n queue.add(s); \r\n System.out.println(\"Search Nodes: \");\r\n while (queue.size() != 0) \r\n { \r\n int index = 0;\r\n \r\n // Dequeue a vertex from queue and print it \r\n \r\n s = queue.poll();\r\n \r\n System.out.print(convert2(s)); \r\n \r\n if(s == destination)\r\n {\r\n break;\r\n }\r\n \r\n System.out.print(\" -> \");\r\n while(index < adj[s].size()) \r\n { \r\n \r\n \r\n int n = adj[s].get(index); \r\n if (!visited[n]) \r\n { \r\n visited[n] = true;\r\n parent[n] = s;\r\n queue.add(n); \r\n }\r\n index = index+ 2;\r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n int check = destination;\r\n int cost = 0, first, second = 0;\r\n String string = \"\" + convert2(check);\r\n while(check!=source)\r\n {\r\n \r\n first = parent[check];\r\n string = convert2(first) + \" -> \" + string;\r\n while(adj[first].get(second) != check)\r\n {\r\n second++;\r\n }\r\n cost = cost + adj[first].get(second +1);\r\n check = first;\r\n second = 0;\r\n \r\n }\r\n \r\n System.out.println(\"\\n\\nPathway: \");\r\n \r\n System.out.println(string);\r\n \r\n \r\n System.out.println(\"\\nTotal cost: \" + cost);\r\n }", "public List<String> computeBestPath(String source, String dest)\r\n {\r\n Vertex v;\r\n List<String>shortestPath = new LinkedList<String>();\r\n \r\n // First, relax all nodes\r\n computeAllPaths(source);\r\n \r\n // Then go through each one and return the path as a list of strings\r\n for (v= network_topology.get(dest); v != null; v = v.previous)\r\n { \r\n shortestPath.add(v.name);\r\n }\r\n \r\n Collections.reverse(shortestPath);\r\n \r\n // Clear the relaxed values so that they can be recalculated with each term\r\n clearPathData();\r\n \r\n return shortestPath;\r\n }", "@Override\r\n\tpublic void getMinimumSpanningTree(GraphStructure graph) {\r\n\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\tdistanceArray[0]=0;\r\n\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\tList<Edge> list;\r\n\t\twhile(spanningTreeSet.size()!=numberOfVertices) {\r\n\t\t\tfor (int vertex=0; vertex<numberOfVertices;vertex++) {\r\n\t\t\t\tif(! spanningTreeSet.contains(vertex)) {\r\n\t\t\t\t\tspanningTreeSet.add(vertex);\r\n\t\t\t\t\tlist = adjacencyList[vertex];\r\n\t\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[vertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\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\tSystem.out.println(\"\\nvertex\\tdistance from source\");\r\n\t\tfor (int i=0;i<numberOfVertices;i++) {\r\n\t\t\tSystem.out.println(i+\"\\t\"+distanceArray[i]);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n int vertices = Integer.parseInt(StdIn.readLine());\n //Storing vertex weights\n double[] vertW = new double[vertices];\n for(int i=0;i<vertices;i++)\n vertW[i] = Double.parseDouble(StdIn.readLine());\n //Reading in new graph, G**\n String[] Gstarstar = StdIn.readAllLines();\n //Making graph\n EdgeWeightedDigraph G = new EdgeWeightedDigraph(Gstarstar);\n //Dijkstra All Pairs\n DijkstraAllPairsSP DAP = new DijkstraAllPairsSP(G);\n //Printing output of paths\n for(int i=0; i<G.V(); i++){\n for(int j=0; j<G.V(); j++){\n if(!DAP.hasPath(i,j))\n StdOut.print(i+\" to \"+j+\"\\t\\tno path\");\n else{\n double newEW;\n double EW;\n Iterable<DirectedEdge> path = DAP.path(i,j);\n double totalWeight = 0;\n String sp = \"\"; //String that's going to form the path\n for(DirectedEdge x : path){\n newEW = x.weight();\n EW = newEW + vertW[x.to()] - vertW[x.from()]; //reverse calibrate\n totalWeight += EW;\n sp += \"\\t\"+x.from()+\"->\"+x.to()+\" \"+String.format(\"%.2f\",EW); //adding to path\n }\n StdOut.print(i+\" to \"+j+\"\\t(\"+String.format(\"%.2f\",totalWeight)+\") \");\n StdOut.print(sp);\n }\n StdOut.println();\n }\n StdOut.println();\n }\n }", "public String depthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n ConstantTimeStack<Vertex<AnyType>> stack = new ConstantTimeStack<Vertex<AnyType>>();\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 0;\n //loop through to set each vertex to not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if find the start vertex then set index position to counter\n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n }\n //if doesn't exist then through exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //if it does exist then push start node onto stack, set visited \n else if(exists){\n stack.push(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n Vertex <AnyType> e = vertex_adjacency_list.get(counter);\n counter = 2;\n int n = e.numberOfAdjacentVertices();\n try{\n \n while(true){\n //loop through e's adjacent vertices \n for (n = e.numberOfAdjacentVertices()-1; n >=0 ; n--){\n //if the adacent vertex has not been visited\n if(e.getAdjacentVertex(n).hasBeenVisited()==false){\n //change e to adjacent vertex and push onto stack\n e = e.getAdjacentVertex(n);\n stack.push(e);\n //set e as visited at counter\n e.setVisited(counter);\n counter++;\n //reset n to e's num of vertices\n n = e.numberOfAdjacentVertices();\n }\n //if it has been visited and it's the first node in list\n //then pop it off the stack and then set e to new top\n //set n to new num of vertices\n else if(e.getAdjacentVertex(n).hasBeenVisited() && n == 0){\n stack.pop();\n e = stack.peek();\n n = e.numberOfAdjacentVertices();\n }\n }\n }\n }catch(EmptyStackException m){\n }\n }\n //loop through the list and print each with when it was visited\n for(int k = 0; k< vertex_adjacency_list.size(); k++){\n buffer.append(vertex_adjacency_list.get(k) + \":\" + vertex_adjacency_list.get(k).getVisited()+ \"\\n\");\n }\n \n return buffer.toString();\n \n }", "int[] bfs(int[][] graph,int source){\n int len=graph.length;\n int shortest_path[]=new int[len];\n int parent[]=new int[len];\n Arrays.fill(shortest_path, Integer.MAX_VALUE/2);\n shortest_path[source]=0;\n Queue<Integer> q=new LinkedList<>();\n q.add(source);\n while (!q.isEmpty()) { \n int u=q.poll();\n for(int v:graph[u]){\n if(shortest_path[v]==Integer.MAX_VALUE/2){\n q.add(v);\n shortest_path[v]=shortest_path[u]+1;\n parent[v]=u;\n }\n }\n }\n return shortest_path;\n }", "public void getAllPaths(Graph<Integer> graph) {\n\t\tTopologicalSort obj = new TopologicalSort();\r\n\t\tStack<Vertex<Integer>> result = obj.sort(graph);\r\n\t\t\r\n\t\t// source (one or multiple) must lie at the top\r\n\t\twhile(!result.isEmpty()) {\r\n\t\t\tVertex<Integer> currentVertex = result.pop();\r\n\t\t\t\r\n\t\t\tif(visited.contains(currentVertex.getId())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstack = new Stack<Vertex<Integer>>();\r\n\t\t\tSystem.out.println(\"Paths: \");\r\n\t\t\tvisited = new ArrayList<Long>();\r\n\t\t\tdfs(currentVertex);\r\n\t\t\t//System.out.println(stack);\r\n\t\t\t//GraphUtil.print(stack);\t\t\t\r\n\t\t}\r\n\r\n\t}", "public static void printShortestPath(List<Town> sp) {\n\t\tint size = sp.size();\n\t\tif ( size>1 ) {\n\t\t\tfor( int i = 1; i <= size; i++) {\n\t\t\t\tif( i != size ) {\n\t\t\t\t\tSystem.out.print( sp.get(size-i).getName()+\"-\" );\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print( sp.get(size-i).getName());\n\t\t\t\t} \n\t\t\t}\t\t\t\n\t\t}else {\n\t\t\tSystem.out.println(\"There is no possible route\");\n\t\t}\n\t}", "public Stack<Point> shortestPath() {\n\t\tresetVisited();\n\t\tStack <Point> shortestPath = new Stack<Point>();\n\t\tprev = new HashMap<Point,Point>();\n\t\tCompass[] direction = Compass.values();\n\t\tQueue <Point> path = new LinkedList<Point>();\n\t\tpath.add(playerStart);\n\t\twhile(!path.isEmpty()) {\n\t\t\tPoint current = path.poll();\n\t\t\tfor (Compass pointing: direction) {\n\t\t\t\tif (current.equals(goal)) {\n\t\t\t\t\tshortestPath.push(current);\n\t\t\t\t\twhile (prev.containsKey(shortestPath.peek()) && !shortestPath.peek().equals(playerStart)){\n\t\t\t\t\t\tshortestPath.push(prev.get(shortestPath.peek()));\n\t\t\t\t\t}\n\t\t\t\t\treturn shortestPath;\n\t\t\t\t}\n\t\t\t\tint nextW = (int)current.getX() + pointing.mapX;\n\t\t\t\tint nextH = (int)current.getY() + pointing.mapY;\n\t\t\t\tPoint nextPoint = new Point(nextW, nextH);\n\t\t\t\tif (arrayBounds(nextW, width) && arrayBounds (nextH, height) && maze[nextW][nextH] == 0 && !visited.contains(nextPoint)) {\n\t\t\t\t\tpath.add(nextPoint);\n\t\t\t\t\tvisited.add(nextPoint);\n\t\t\t\t\tprev.put(nextPoint, current);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn shortestPath;\t\t\n\t}", "public void dijkstra(int graphWeight[][], int source){\r\n\t\t\r\n\t\tint queue[] = new int[vertices]; //The array which will hold the shortest distance from source to node i\r\n\t\tboolean set[] = new boolean[vertices]; //It will store true for node i if the shortest path to that vertex or node is found\r\n\t\t\r\n\t\t//Initialize distances to infinity and set[] array to false \r\n\t\tfor(int i=0;i<vertices;i++){\r\n\t\t\tqueue[i] = Integer.MAX_VALUE; \r\n\t\t\tset[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Distance of source vertex from itself is always 0\r\n\t\tqueue[source] = 0;\r\n\r\n\t\t//Find shortest path of all the vertices\r\n\t\tfor(int count=0;count<vertices-1;count++){\r\n\t\t\t\r\n\t\t\t//Pick the minimum distance vertex from the from the set of vertices \r\n\t\t\t//not processed. u is equal to source in first iteration\r\n\t\t\tint u = extractMinDistance(queue, set);\r\n\t\t\t\r\n\t\t\t//Mark the picked vertex processed\r\n\t\t\tset[u] = true;\r\n\t\t\t//Update queue value of the adjacent vertices of the picked vertex\r\n\t\t\tfor(int v=0;v<vertices;v++)\r\n\t\t\t{\r\n\t\t\t\t//Update queue[v] only if\r\n\t\t\t\t// 1. It is not in set true in the Set Array\r\n\t\t\t\t// 2. There is an edge from u to v\r\n\t\t\t\t// 3. Total weight of path from source to v through u is smaller than current value of queue[v]\r\n\t\t\t\tif((graphWeight[u][v] > 0) && set[v] == false){\r\n\t\t\t\t\t\tif(queue[u] + graphWeight[u][v] < queue[v]){\r\n\t\t\t\t\t\t\tqueue[v] = queue[u] + graphWeight[u][v];\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//printSolution(queue, vertices);\r\n\t\t}\r\n\t\t//Print the constructed distance array\r\n\t\tprintSolution(queue, vertices);\r\n\t}", "@Override\r\n public List<node_info> shortestPath(int src, int dest) {\r\n double i = shortestPathDist(src, dest);\r\n double j, k, s, mark = 1;\r\n ArrayList<node_info> Rlist = new ArrayList<>();\r\n ArrayList<node_info> Llist = new ArrayList<>();\r\n Rlist.clear();\r\n Llist.clear();\r\n j = i;\r\n for (node_info curr : this.Graph.getV()) {\r\n curr.setInfo(\"clear\");\r\n }\r\n this.Graph.getNode(src).setInfo(\"tmp\");\r\n Rlist.add(this.Graph.getNode(dest));\r\n node_info nd = this.Graph.getNode(dest);\r\n node_info temp = this.Graph.getNode(dest);\r\n while (j != 0 && j > 0) {\r\n for (node_info curr0 : this.Graph.getV(nd.getKey())) {\r\n if (curr0.getInfo() != null) {\r\n temp = curr0;\r\n k = this.Graph.getEdge(nd.getKey(), curr0.getKey());\r\n s = j - k;\r\n if ((s - curr0.getTag() < 0.001 && s - curr0.getTag() > -0.001) && nd.getInfo() != null) {\r\n Rlist.add(curr0);\r\n j = curr0.getTag();\r\n curr0.setInfo(\"tmp\");\r\n mark = 1;\r\n nd = curr0;\r\n }\r\n }\r\n }\r\n if (mark == 0) {\r\n i = j;\r\n temp.setInfo(null);\r\n Rlist.clear();\r\n Rlist.add(this.Graph.getNode(dest));\r\n mark = 1;\r\n }\r\n mark = 0;\r\n }\r\n for (int t = (Rlist.size() - 1); t >= 0; t--) {\r\n Llist.add(Rlist.get(t));\r\n }\r\n return Llist;\r\n }", "public void shortestPaths(int source) {\n\n\t\tlong start = 0;\n\t\tlong stop;\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tedgeList[v] = new Edge(vertexList[v].id, rand, 5000);\n\t\t}\n\t\t// creating object of fibonacci\n\t\tFHeap pq = new FHeap();\n\t\t// creating a map for checking\n\t\tMap<Integer, FHeap.Node> check = new HashMap<Integer, FHeap.Node>();\n\t\t// storing the mst costs\n\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tcheck.put(vertexList[v].id,\n\t\t\t\t\tpq.enqueue(vertexList[v].id, Double.POSITIVE_INFINITY));\n\t\t}\n\t\tstart = System.currentTimeMillis();\n\t\t// allot cost 0 to initial node\n\t\tpq.decreaseKey(check.get(vertexList[source].id), 0.0);\n\n\t\twhile (!pq.isEmpty()) {\n\t\t\t// take the current node and get its minimum cost\n\t\t\tFHeap.Node current = pq.dequeueMin();\n\n\t\t\t// store the values in the table\n\t\t\tresult.put(current.getValue(), current.getCost());\n\n\t\t\t// update the costs\n\t\t\tfor (Neighbor nbr = vertexList[current.getValue()].adjList; nbr != null; nbr = nbr.next) {\n\n\t\t\t\t// edge is not added if shortest cost is known\n\t\t\t\tif (result.containsKey(vertexList[nbr.vertexNumber].id))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// update cost to shortest\n\t\t\t\tFHeap.Node finalCost = check\n\t\t\t\t\t\t.get(vertexList[nbr.vertexNumber].id);\n\t\t\t\tif (nbr.weight < finalCost.getCost())\n\t\t\t\t\tpq.decreaseKey(finalCost, nbr.weight);\n\t\t\t}\n\t\t}\n\t\tstop = System.currentTimeMillis();\n\t\t// computing the time\n\t\ttime = stop - start;\n\n\t\t// calculate the MST cost\n\t\tfor (int i = 0; i < vertexList.length; i++) {\n\t\t\tsumHeapCost = (int) (sumHeapCost + result.get(i));\n\t\t}\n\t\t// for printing in case of input from file in fibonacci mode\n\t\n\t\t// System.out.println(sumHeapCost);\n\t}", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tList<node_data> ans = new ArrayList<>();\n\t\tthis.shortestPathDist(src, dest);\n\t\tif(this.GA.getNode(src).getWeight() == Integer.MAX_VALUE || this.GA.getNode(dest).getWeight() == Integer.MAX_VALUE){\n\t\t\tSystem.out.print(\"There is not a path between the nodes.\");\n\t\t\treturn null;\n\t\t}\n\t\tgraph copied = this.copy();\n\t\ttransPose(copied);\n\t\tnode_data first = copied.getNode(dest);\n\t\tans.add(first);\n\t\twhile (first.getKey() != src) {\n\t\t\tCollection<edge_data> temp = copied.getE(first.getKey());\n\t\t\tdouble check= first.getWeight();\n\t\t\tif(temp!=null) {\n\t\t\t\tfor (edge_data edge : temp) {\n\t\t\t\t\tif (copied.getNode(edge.getDest()).getWeight() + edge.getWeight() == check) {\n\t\t\t\t\t\tfirst = copied.getNode(edge.getDest());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tans.add(first);\n\t\t}\n\t\tList<node_data> ans2 = new ArrayList<>();\n\t\tfor (int i = ans.size()-1;i>=0;i--){\n\t\t\tans2.add(ans.get(i));\n\t\t}\n\t\treturn ans2;\n\t}", "private int[] runDijkstra(int graph[][], int source) {\r\n\r\n // Stores the best estimate of the shortest distance from\r\n // the source to each node \r\n int d[] = new int[graph.length];\r\n \r\n // Initialized with infinite value.\r\n // Value of -1 means the node has been settled \r\n int dC[] = new int[graph.length];\r\n \r\n // Stores the predecessor of each node on the shortest path \r\n // from the source\r\n int p[] = new int[graph.length];\r\n\r\n // Initialize\r\n for (int i = 0; i < graph.length; i++ ) {\r\n d[i] = this.INFINITE;\r\n dC[i] = this.INFINITE;\r\n p[i] = -1;\r\n }\r\n \r\n // We start knowning the distance of the source from itself (zero)\r\n d[source] = 0;\r\n dC[source] = 0;\r\n\r\n int i = 0;\r\n int min = this.INFINITE;\r\n int pos = 0;\r\n\r\n while (i < graph.length) {\r\n //extract minimum distance\r\n for (int j = 0; j < dC.length; j++ ){\r\n if( min > d[j] && dC[j] != -1 ){\r\n min = d[j];\r\n pos = j;\r\n }\r\n }\r\n // This node is settled\r\n dC[pos] = -1;\r\n\r\n // relax its neighbours\r\n for (int j = 0; j < graph.length; j++ ) {\r\n if ( (graph[pos][j] != -1) && (d[j] > graph[pos][j] + d[pos]) ) {\r\n d[j] = graph[pos][j] + d[pos];\r\n p[j] = pos;\r\n }\r\n }\r\n i++;\r\n min = this.INFINITE;\r\n }\r\n\r\n return p;\r\n }", "public void findPath(Vertex v, Graph g)\n {\n \tQueue<Vertex> q = new LinkedList<Vertex>();\n \tSet<String> visited= new HashSet<String>();\n \tSet<String> edges= new TreeSet<String>();\n \t\n \t \tq.add(v);\n \t \tvisited.add(v.name);\n \t \t\n \t \twhile(!q.isEmpty()){\n \t \t\tVertex vertex = q.poll();\n \t \t\t \n \t for(Edge adjEdge: vertex.adjEdge.values()){\n \t\t if(!visited.contains(adjEdge.adjVertex.name) && !adjEdge.adjVertex.isDown && !adjEdge.isDown){\n \t\t\t q.offer(adjEdge.adjVertex);\n \t\t\t visited.add(adjEdge.adjVertex.name);\n \t\t\t \n \t\t\t edges.add(adjEdge.adjVertex.name);\n \t\t\t \n \t\t }\n \t }\n \t \n \t }\n \t \tfor(String str: edges){\n \t\t System.out.print('\\t');\n \t\t System.out.println(str);\n \t }\n \t \t\n }", "public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}", "public InTree<V,E> weightedShortestPaths(V source)\n\t\tthrows NegativeWeightEdgeException, DisconnectedGraphException;", "public Path shortestPath(Vertex a, Vertex b) {\n // If a or b aren't present in the set of vertices throw an exception\n if (!myGraph.containsKey(b) || !myGraph.containsKey(a)) {\n throw new IllegalArgumentException(\"One of the vertices isn't valid\");\n }\n /* Create a map of Vertices to VertexInfos. Fill it with VertexInfos for all\n vertices that each have no previous vertex and and a cost of INFINITY */\n Map<Vertex, VertexInfo> vertInfos = new HashMap<Vertex, VertexInfo>();\n for (Vertex v : vertices()) {\n vertInfos.put(v, new VertexInfo(v, null, INFINITY));\n }\n /* Create a PriorityQueue for VertexInfos */\n PriorityQueue<VertexInfo> viQueue = new PriorityQueue<VertexInfo>();\n /* Create a VertexInfo for the start Vertex 'a' with a cost of 0. This uses a copy of Vertex a&b for immutability */\n Vertex copyA = new Vertex(a.getLabel());\n Vertex copyB = new Vertex(b.getLabel());\n\n VertexInfo vi_a = new VertexInfo(copyA, null, 0);\n /* Add VerxtexInfo for a to PQ and map it to it's VertexInfo */\n viQueue.add(vi_a);\n vertInfos.put(a, vi_a);\n while(!viQueue.isEmpty()) {\n /* Remove the VertexInfo with lowest cost */\n Vertex curr = viQueue.poll().getVertex();\n /* Check all adjacent Vertices of curr Vertex */\n for (Vertex v : adjacentVertices(curr)) {\n /* Calculate cost to get to v through curr */\n int cost = vertInfos.get(curr).getCost() + edgeCost(curr, v);\n /* If cost through curr is lower than previous */\n if (cost < vertInfos.get(v).getCost()) {\n /* Remove v's VertexInfo from PQ */\n viQueue.remove(vertInfos.get(v));\n /* Overwrite previous value of v in map\n Add updated VerexInfo to PQ */\n VertexInfo vi = new VertexInfo(v, curr, cost);\n vertInfos.put(v,vi);\n viQueue.add(vi);\n }\n }\n }\n /* Create ArrayList for path */\n List<Vertex> path = new ArrayList<Vertex>();\n \n /* Add each vertex and it's previous vertex to path until a null vertex is reached */\n for (Vertex vert = copyB; vert != null; vert = vertInfos.get(vert).getPrev()) {\n path.add(vert);\n }\n\n /* Reverse order of path */ \n Collections.reverse(path);\n /* Create new Path object with corresponding parameters */\n if(path.contains(copyA)){\n Path pathToB = new Path(path, vertInfos.get(copyB).getCost());\n return pathToB;\n } else {\n return null;\n }\n }", "void printSolution(int dist[], int n) {\n for (int i = 0; i < V; i++) {\n String node = \"Start\";\n switch (i) {\n case 1:\n node = \"A\";\n break;\n case 2:\n node = \"B\";\n break;\n case 3:\n node = \"C\";\n break;\n case 4:\n node = \"D\";\n break;\n case 5:\n node = \"E\";\n break;\n case 6:\n node = \"F\";\n break;\n case 7:\n node = \"G\";\n break;\n case 8:\n node = \"H\";\n break;\n case 9:\n node = \"I\";\n }\n System.out.println(\"Source -> Node: \" + node + \": \" + dist[i]);\n }\n }", "public V getParent(V vertex);", "public ArrayList<Vertex> gpsrPath(int sourceIndex, int sinkIndex) {\r\n ArrayList<Vertex> locationcopy;\r\n \tlocationcopy=new ArrayList<Vertex>(location);\r\n \tint currentIndex, nearestIndex;\r\n \tdouble bestdist,dist;\r\n \tArrayList<Vertex> GPSRpath;\r\n \tGPSRpath= new ArrayList<Vertex>(0);\r\n \tcurrentIndex=sourceIndex;\r\n \tVertex sourcenode, sinknode, currentnode, nearestnode;\r\n \tsourcenode=locationcopy.get(sourceIndex);\r\n \tsinknode=locationcopy.get(sinkIndex);\r\n \tdist=bestdist=sourcenode.distance(sinknode);\r\n \tGPSRpath.add(sourcenode);\r\n \tint i;\r\n\t\t\r\n \twhile(true)\r\n \t{\r\n \t\tcurrentnode=locationcopy.get(currentIndex);\r\n \t\tnearestIndex=currentIndex;\r\n \tfor(i=0;i<locationcopy.size();i++)\r\n \t{\r\n \t\tif(locationcopy.get(i).distance(currentnode)<=transmissionRange)\r\n \t\t{\r\n \t\t\tif(bestdist>(dist=locationcopy.get(i).distance(sinknode))) \r\n \t\t\t\t{\r\n \t\t\t\tbestdist=dist;\r\n \t\t\t\tnearestIndex=i;\r\n \t\t\t\t}\t\r\n \t\t\tif(dist==0) break;\r\n \t\t}\t\t\r\n \t}\r\n \tif(nearestIndex!=currentIndex)\r\n \t{\r\n \t\tnearestnode=locationcopy.get(nearestIndex);\r\n \t\tGPSRpath.add(nearestnode);\r\n \t\tif(dist==0) return GPSRpath;\r\n \t\tlocationcopy.remove(currentIndex);\r\n \t\tif(sinkIndex>currentIndex) sinkIndex-=1;\r\n \t\tif(nearestIndex>currentIndex) currentIndex=nearestIndex-1; else currentIndex=nearestIndex;\r\n \t\t//currentIndex=locationcopy.indexOf(nearestnode);\r\n \t\t//sinkIndex=locationcopy.indexOf(sinknode);\r\n \t}\r\n \telse return new ArrayList<Vertex>(0);\r\n \t}\r\n }", "public void findShortestPath(String startName, String endName) {\n checkValidEndpoint(startName);\n checkValidEndpoint(endName);\n\n Vertex<String> start = vertices.get(startName);\n Vertex<String> end = vertices.get(endName);\n\n double totalDist; // totalDist must be update below\n\n Map<Vertex<String>, Double> distance = new HashMap<>();\n Map<Vertex<String>, Vertex<String>> previous = new HashMap<>();\n Set<Vertex<String>> explored = new HashSet<>();\n PriorityQueue<VertexDistancePair> pq = new PriorityQueue<>();\n\n\n\n addPQ(distance, start, pq, previous);\n\n\n\n dijkstraHelper(pq, end, explored, distance, previous);\n\n\n\n\n\n\n totalDist = distance.get(end);\n List<Edge<String>> path = getPath(end, start);\n printPath(path, totalDist);\n }", "public static void printMST(GraphAdjacencyMatrix graph, int parent[]) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < graph.getV(); i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph.getMatrix()[i][parent[i]]);\n }", "public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}", "public List<Node> getShortestPathToDestination(Node destination) {\n List<Node> path = new ArrayList<Node>();\n\n\n\n for (Node node = destination; node != null; node = node.previous){\n Log.i(\"bbb\", \"get path \"+node._waypointName);\n path.add(node);\n }\n\n // reverse path to get correct order\n Collections.reverse(path);\n return path;\n }", "public int shortestPath(Village startVillage, Village targetVillage) {\n// setting the initial point 's minimum distance to zera\n startVillage.setMinDistance(0);\n// accourting to bellman ford if there are n number of dots then n-1 iterations to be done to find the minimum distances of every dot from one initial dot\n int length = this.villageList.size();\n// looping n-1 times\n for (int i = 0; i < length - 1; i++) {\n// looping through all the roads and mark the minimum distances of all the possible points\n for (Road road : roadList) {\n\n\n// if the road is a main road then skip the path\n if (road.getWeight() == 900)\n continue; //why 900 ? : just a random hightest number as a minimum distance and same 900 is used as a mix number\n Village v = road.getStartVertex();\n Village u = road.getTargetVertex();\n// if the newly went path is less than the path it used to be the update the min distance of the reached vertex\n int newLengtha = v.getMinDistance() + road.getWeight();\n if (newLengtha < u.getMinDistance()) {\n u.setMinDistance(newLengtha);\n u.setPreviousVertex(v);\n }\n int newLengthb = u.getMinDistance() + road.getWeight();\n if (newLengthb < v.getMinDistance()) {\n v.setMinDistance(newLengthb);\n v.setPreviousVertex(v);\n }\n }\n }\n// finally return the minimum distance\n return targetVillage.getMinDistance();\n }", "public List<Node> getShortestPath(final Node source, final Node target) {\n if (D[source.id][target.id] == Integer.MAX_VALUE) {\n return new ArrayList<Node>(); // no path\n }\n final List<Node> path = getIntermediatePath(source, target);\n path.add(0, source);\n path.add(target);\n return path;\n }", "public List<List<Integer>> allPathsSourceTarget(int[][] graph) {\n \n boolean[] visited = new boolean[graph.length];\n \n List<Integer> paths = new ArrayList();\n paths.add(0);\n \n List<List<Integer>> allPaths = new ArrayList();\n \n dfs(0,graph.length-1, paths,allPaths,visited,graph);\n \n return allPaths;\n }", "public static void main(String[] args) {\n\t\tVertex A = new Vertex(\"A\");\n\t\tVertex B = new Vertex(\"B\");\n\t\tVertex C = new Vertex(\"C\");\n\t\tVertex D = new Vertex(\"D\");\n\t\tVertex E = new Vertex(\"E\");\n\n\t\tA.adjacencies = new Edge[]{ new Edge(B, 10),\tnew Edge(C, 3) };\n\t\tB.adjacencies = new Edge[]{\tnew Edge(C, 1), \tnew Edge(D, 2)};\n\t\tC.adjacencies = new Edge[]{ new Edge(B, 4), \tnew Edge(D, 8),\tnew Edge(E, 2)};\n\t\tD.adjacencies = new Edge[]{ new Edge(E, 7)};\n\t\tE.adjacencies = new Edge[]{ new Edge(D, 9)};\n\t\tVertex[] vertices = { A,B,C,D,E };\n\t\t\n\t\tcomputePaths(A);\n\t\t\n\t\tfor (Vertex v : vertices)\n\t\t{\n\t\t System.out.println(\"Distance to \" + v + \": \" + v.minDistance);\n\t\t List<Vertex> path = getShortestPathTo(v);\n\t\t System.out.println(\"Path: \" + path);\n\t\t}\n\t}", "public ArrayList<Vertex> getPath(Vertex target) {\n\t\tArrayList<Vertex> path = new ArrayList<Vertex>();\n\t\tVertex step = target;\n\t\t// check if a path exists\n\t\tif (predecessors.get(step) == null) {\n\t\t\treturn null;\n\t\t}\n\t\tpath.add(step);\n\t\twhile (predecessors.get(step) != null) {\n\t\t\tstep = predecessors.get(step);\n\t\t\tpath.add(step);\n\t\t}\n\t\t// Put it into the correct order\n\t\tCollections.reverse(path);\n\n\n\t\tVertex current=null;\n\t\tVertex next=null;\n\t\tint length = path.size();\n\t\tfor(int i=0;i<length-1;i++){\n current = path.get(i);\n\t\t\t next = path.get(i+1);\n\t\t\tif(!rapid && (nodeColor_map.get(current.getName()).equalsIgnoreCase(\"dB\")||\n\t\t\t\t\tnodeColor_map.get(next.getName()).equalsIgnoreCase(\"dB\")))\n\t\t\t\trapid = true;\n\t\t\troute_length+= edge_length_map.get(new Pair(current,next));\n\t\t}\n\n\t\treturn path;\n\t}", "public static void computePaths(Point source) {\n\n\t\tsource.setMinimumDistance(0.0);\n\t\tPriorityQueue<Point> pointQueue = new PriorityQueue<Point>();\n\t\tpointQueue.add(source);\n\t\twhile (!pointQueue.isEmpty()) {\n\t\t\tPoint u = pointQueue.poll();\n\t\t\tif (u.getAdjacencies() != null) {\n\t\t\t\tfor (Edge e : u.getAdjacencies()) {\n\n\t\t\t\t\tPoint target = e.getTarget();\n\t\t\t\t\tdouble weight = e.getWeight();\n\t\t\t\t\tdouble distanceThroughP = weight + u.getMinimumDistance();\n\n\t\t\t\t\tif (distanceThroughP < target.getMinimumDistance()) {\n\t\t\t\t\t\tpointQueue.remove(target);\n\n\t\t\t\t\t\ttarget.setMinimumDistance(distanceThroughP);\n\t\t\t\t\t\ttarget.setPrevious(u);\n\t\t\t\t\t\tpointQueue.add(target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Vertex> dijkstraPath(int sourceIndex, int sinkIndex) {\r\n \tArrayList<Vertex> locationcopy;\r\n \tlocationcopy=new ArrayList<Vertex>(location);\r\n \tArrayList<Vertex> dijpath;\r\n \tdijpath= new ArrayList<Vertex>(0);\r\n \t//dijpath.add(locationcopy.get(sourceIndex));\r\n \tint i,j,maxdist=locationcopy.size()+1;\r\n \tint[] DistArray=new int[locationcopy.size()], PreArray=new int[locationcopy.size()]; \r\n \tint[][] AdjArray=new int[locationcopy.size()][locationcopy.size()];\r\n \t\r\n \r\n \t\r\n \tfor(i=0;i<locationcopy.size();i++)\r\n \t\tfor(j=i;j<locationcopy.size();j++)\r\n \t\t\tif(locationcopy.get(i).distance(locationcopy.get(j))<=transmissionRange)\r\n \t\t\t{\r\n \t\t\t\tAdjArray[i][j]=1;\r\n \t\t\t\tAdjArray[j][i]=1;\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tAdjArray[i][j]=maxdist;\r\n \t\t\t\tAdjArray[j][i]=maxdist;\r\n \t\t\t}\r\n \t\r\n \tfor(i=0;i<locationcopy.size();i++)\r\n \t\tAdjArray[i][i]=0;\r\n \t\t\r\n\t\t\r\n \tint mdistindex,mindist;\r\n\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t { \r\n \t\t DistArray[i]=AdjArray[sourceIndex][i];\r\n \t if(DistArray[i]<maxdist) PreArray[i]=sourceIndex;\r\n \t else PreArray[i]=-1;\r\n \t }\r\n \t PreArray[sourceIndex]=-1; AdjArray[sourceIndex][sourceIndex]=1;\r\n \t for(j=0;j<(locationcopy.size()-1);j++)\r\n \t { \r\n \t\t mindist=maxdist; \r\n \t\t mdistindex=-1;\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t if((AdjArray[i][i]==0)&&(DistArray[i]<mindist))\r\n \t { \r\n \t \t mdistindex=i;\r\n \t \t mindist=DistArray[i];\r\n \t }\r\n \t if(mdistindex==-1) return new ArrayList<Vertex>(0);\r\n \t else\r\n \t { \r\n \t \t AdjArray[mdistindex][mdistindex]=1;\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t {\r\n \t if(AdjArray[i][i]==0)\r\n \t {\r\n \t if(DistArray[mdistindex]+AdjArray[mdistindex][i]<DistArray[i])\r\n \t { \r\n \t \t DistArray[i]=DistArray[mdistindex]+AdjArray[mdistindex][i];\r\n \t PreArray[i]=mdistindex;\r\n \t }\r\n \t }\r\n \t }\r\n \t }\r\n \t if(AdjArray[sinkIndex][sinkIndex]==1) break;\r\n \t }\r\n \t Stack<Integer> s=new Stack<Integer>();\r\n \t i=sinkIndex;\r\n \t s.push(i);\r\n \t while(PreArray[i]!=-1)\r\n \t {\r\n \t\t s.push(PreArray[i]);\r\n \t\t i=PreArray[i];\r\n \t }\r\n \t while(!s.isEmpty())\r\n \t {\r\n \t\t dijpath.add(locationcopy.get(s.pop()));\r\n \t }\r\n \treturn dijpath;\r\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }", "public int doDijkstras(String startVertex, String endVertex, ArrayList<String> shortestPath)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSet<String> visited = new HashSet<String>();\r\n\t\t\r\n\t\tPriorityQueue<Vertex> minDist = new PriorityQueue<Vertex>();\r\n\t\t\r\n\t\tVertex firstV = new Vertex(startVertex,startVertex,0);\r\n\t\tminDist.add(firstV);\r\n\t\t\r\n\t\tfor(String V : this.adjacencyMap.get(startVertex).keySet())\r\n\t\t{\r\n\t\t\tminDist.add(new Vertex(V,startVertex,this.getCost(startVertex, V)));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//map of vertexName --> VertexObject\r\n\t\tHashMap<String, Vertex> mapV = new HashMap<String,Vertex>();\r\n\t\tmapV.put(startVertex, firstV);\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Init keys-->costs\r\n\t\t */\r\n\t\tfor(String key : this.getVertices())\r\n\t\t{\r\n\t\t\tif(key.equals(startVertex))\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,0));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,Integer.MAX_VALUE));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t/*\r\n\t\t * Init List for shortest path\r\n\t\t */\r\n\t\tLinkedList<String> list = new LinkedList<String>();\r\n\t\tlist.add(startVertex);\r\n\r\n\t\tHashMap<String,List<String>> path = new HashMap<String,List<String>>();\r\n\t\tpath.put(startVertex, list);\r\n\t\t\r\n\t\twhile(!minDist.isEmpty())\r\n\t\t{\r\n\t\t\tVertex node = minDist.poll();\r\n\t\t\tString V = node.current;\r\n\t\t\tint minimum = node.cost;\r\n\t\t\tSystem.out.println(minDist.toString());\r\n\t\t\t\r\n\t\t\t\tvisited.add(V);\r\n\t\t\t\t\r\n\t\t\t\tTreeSet<String> adj = new TreeSet<String>(this.adjacencyMap.get(V).keySet());\r\n\t\t\t\t\r\n\t\t\t\tfor(String successor : adj)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!visited.contains(successor) && !V.equals(successor))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint newCost = this.getCost(V, successor)+minimum;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(newCost < mapV.get(successor).cost)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tminDist.remove(mapV.get(successor));\r\n\t\t\t\t\t\t\t\tminDist.add(new Vertex(successor,V,newCost));\r\n\t\t\t\t\t\t\t\tmapV.put(successor, new Vertex(successor,V,newCost));\r\n\r\n\t\t\t\t\t\t\t\tLinkedList<String> newList = new LinkedList<String>(path.get(V));\r\n\t\t\t\t\t\t\t\tnewList.add(successor);\r\n\t\t\t\t\t\t\t\tpath.put(successor, newList);\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\t\r\n\t\t}\r\n\t\t\r\n\t\tint smallestPath = mapV.get(endVertex).cost == Integer.MAX_VALUE ? -1 : mapV.get(endVertex).cost;\r\n\t\t\r\n\t\tif(smallestPath == -1)\r\n\t\t{\r\n\t\t\tshortestPath.add(\"None\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(String node : path.get(endVertex))\r\n\t\t\t{\r\n\t\t\t\tshortestPath.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn smallestPath;\r\n\t}", "protected LinkedList<IVertex<String>> getPath(IVertex<String> target) {\n\n LinkedList<IVertex<String>> path = new LinkedList<IVertex<String>>();\n\n IVertex<String> step = target;\n\n // check if a path exists\n if (predecessors.get(step) == null) {\n return null;\n }\n path.add(step);\n while (predecessors.get(step) != null) {\n step = predecessors.get(step);\n path.add(step);\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }", "public static <V> void printShortestPath(V value, Dictionary<V, DijkstraResult<V>> paths) {\n Enumeration<DijkstraResult<V>> elementos = paths.elements();\n while (elementos.hasMoreElements()) {\n DijkstraResult<V> aux = elementos.nextElement();\n if (!aux.getVertex().equals(value)) {\n String hilera = \"\";\n DijkstraResult<V> temp = aux;\n while (!temp.getVertex().equals(value)) {\n hilera = \"-\" + temp.getVertex() + hilera;\n temp = paths.get(temp.getPrecursor());\n }\n hilera = value + hilera;\n if (aux.getDistance() == Integer.MAX_VALUE - 1) {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + aux.getVertex() + \" es \" + hilera + \" con una distancia de infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + aux.getVertex() + \" es \" + hilera + \" con una distancia de: \" + aux.getDistance());\n }\n } else {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + value + \" es \" + value + \" con una distancia de: \" + aux.getDistance());\n }\n }\n }", "private void dfs(int vertex, int parent, int currentE) {\n System.out.println(\"Going from \" + parent + \" to \" + vertex);\n currentE++;\n assert g.isDirected();\n if (!lowLink.containsKey(vertex)) {\n lowLink.put(vertex, currentE);\n } else {\n if (parent >= 0) {\n if (lowLink.get(vertex) < lowLink.get(parent)) { //We've been there\n lowLink.put(parent, lowLink.get(vertex));\n }\n }\n return;\n }\n\n //Remove backward edge\n g.removeEdge(vertex, parent);\n\n for (var head : g.getHeads(vertex)) {\n dfs(head, vertex, currentE);\n if (lowLink.get(head) < lowLink.get(vertex)) {\n lowLink.put(vertex, lowLink.get(head));\n }\n // Apply bridge criteria:\n // lowlink(head) > e(tail)\n if (lowLink.get(head) > currentE) {\n bridges.add(new Graph.Edge(vertex, head));\n }\n }\n }", "public ShortestPathMatrix<V,E> allPairsShortestPaths();", "public void printPath(Vertice c) {\r\n Vertice actual = c;\r\n if (actual.previous != null) {\r\n printPath(actual.previous);\r\n System.out.print(\" --> \");\r\n System.out.print(actual.name);\r\n }\r\n if (actual.previous == null) {\r\n System.out.print(actual.name);\r\n }\r\n }", "private void source_to_dest_path(int source, int dest, int[] forward_dist_tab, int[] list_Prevoius_Node, ArrayList<Integer> del_router)\n\t{\n\t\tif(del_router != null && del_router.contains(dest))\n\t\t\tSystem.out.println(\"Router \"+ (dest+1) +\" is deleted\");\n\t\telse if(del_router != null && del_router.contains(source))\n\t\t\tSystem.out.println(\"Router \"+ (source+1) +\" is deleted\");\n\t\telse\n\t\t{\n\t\t\tint[] prevNodes_List = list_Prevoius_Node;\n\t\t\tint k = dest;\n\t\t\tString path = \"\" + (dest+1);\n\t\t\t\n\t\t\t//Check if node is reachable that if it is connected in the graph then only proceed further\n\t\t\tif(forward_dist_tab[dest] != INFINITE_DIST)\n\t\t\t{\n\t\t\t\twhile(prevNodes_List[k] != source)\n\t\t\t\t{\n\t\t\t\t\tpath += \" >- \" + (prevNodes_List[k] + 1);\n\t\t\t\t\tk = prevNodes_List[k];\n\t\t\t\t}\n\t\t\t\t//for source node\n\t\t\t\tpath += \" >- \" + (source+1);\n\t\t\t\t\n\t\t\t\t//Back traversal is done using the previous node list\n\t\t\t\tString disp_path= new StringBuilder(path).reverse().toString();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nShortest distance from \"+ (source+1) +\" to \"+ (dest+1) +\":\");\n\t\t\t\tSystem.out.println(\"PATH: \"+ disp_path);\n\t\t\t\tSystem.out.println(\"COST: \" + forward_dist_tab[dest]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\nRouter \"+ (dest+1) +\" is dead or unreachable.\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }", "private LinkedList<Integer> _findShortestPath(int source, int destination)\n{\n LinkedList<Integer> output = new LinkedList<Integer>();\n if (this.bellmanParent[destination] == source) {\n output.addFirst(destination);\n output.addFirst(source);\n return output;\n }\n /*\n * Our source is only part of the subtree, and we requested a node beyond\n * its reach. Lets flag it so that the calling function knows to ignore this\n * result.\n */\n if (this.bellmanParent[destination] == destination) {\n output.addFirst(-1);\n return output;\n }\n output = this._findShortestPath(source, this.bellmanParent[destination]);\n output.addLast(destination);\n return output;\n}", "public Path getShortestPath() {\n\t\tNodeRecord startRecord = new NodeRecord(start, null, 0.0f, (float) heuristic.estimate(start), Category.OPEN);\n\n\t\t// Initialize the open list\n\t\tPathFindingList open = new PathFindingList();\n\t\topen.addRecordByEstimatedTotalCost(startRecord);\n\t\trecords.set(Integer.parseInt(startRecord.node.id), startRecord);\n\t\tNodeRecord current = null;\n\t\t\n\t\t// Iterate through processing each node\n\t\twhile (!open.isEmpty()) {\n\t\t\t// Find smallest element in the open list using estimatedTotalCost\n\t\t\tcurrent = open.getSmallestNodeRecordByEstimatedTotalCost();\n\n\t\t\t// If its the goal node, terminate\n\t\t\tif (current.node.equals(end)) break;\n\n\t\t\t// Otherwise get its outgoing connections\n\t\t\tArrayList<DefaultWeightedEdge> connections = g.getConnections(current.node);\n\t\t\t\n\t\t\t// Loop through each connection\n\t\t\tfor (DefaultWeightedEdge connection : connections) {\n\t\t\t\t// Get the cost and other information for end node\n\t\t\t Vertex endNode = g.graph.getEdgeTarget(connection);\n\t\t\t int endNodeRecordIndex = Integer.parseInt(endNode.id);\n NodeRecord endNodeRecord = records.get(endNodeRecordIndex); // this is potentially null but we handle it\n\t\t\t\tdouble newEndNodeCost = current.costSoFar + g.graph.getEdgeWeight(connection);\n\t\t\t\tdouble endNodeHeuristic = 0;\n\t\t\t\t\n\t\t\t\t// if node is closed we may have to skip, or remove it from closed list\t\n\t\t\t\tif( endNodeRecord != null && endNodeRecord.category == Category.CLOSED ){ \n\t\t\t\t\t// Find the record corresponding to the endNode\n\t\t\t\t\tendNodeRecord = records.get(endNodeRecordIndex);\n\n\t\t\t\t\t// If we didn't find a shorter route, skip\n\t\t\t\t\tif (endNodeRecord.costSoFar <= newEndNodeCost) continue;\n\n\t\t\t\t\t// Otherwise remove it from closed list\n\t\t\t\t\trecords.get(endNodeRecordIndex).category = Category.OPEN;\n\n\t\t\t\t\t// Use node's old cost values to calculate its heuristic to save computation\n\t\t\t\t\tendNodeHeuristic = endNodeRecord.estimatedTotalCost - endNodeRecord.costSoFar;\n\n\t\t\t\t// Skip if node is open and we've not found a better route\n\t\t\t\t} else if( endNodeRecord != null && endNodeRecord.category == Category.OPEN ){ \n\t\t\t\t\t// Here we find the record in the open list corresponding to the endNode\n\t\t\t\t\tendNodeRecord = records.get(endNodeRecordIndex);\n\n\t\t\t\t\t// If our route isn't better, skip\n\t\t\t\t\tif (endNodeRecord.costSoFar <= newEndNodeCost) continue;\n\n\t\t\t\t\t// Use the node's old cost values to calculate its heuristic to save computation\n\t\t\t\t\tendNodeHeuristic = endNodeRecord.estimatedTotalCost - endNodeRecord.costSoFar;\n\n\t\t\t\t// Otherwise we know we've got an unvisited node, so make a new record\n\t\t\t\t} else { // if endNodeRecord.category == Category.UNVISITED\n\t\t\t\t endNodeRecord = new NodeRecord();\n\t\t\t\t\tendNodeRecord.node = endNode;\n\t\t\t\t\trecords.set(endNodeRecordIndex, endNodeRecord);\n\n\t\t\t\t\t// Need to calculate heuristic since this is new\n\t\t\t\t\tendNodeHeuristic = heuristic.estimate(endNode);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t// We're here if we need to update the node\n\t\t\t\t// update the cost, estimate, and connection\n\t\t\t\tendNodeRecord.costSoFar = newEndNodeCost;\n\t\t\t\tendNodeRecord.edge = connection;\n\t\t\t\tendNodeRecord.estimatedTotalCost = newEndNodeCost + endNodeHeuristic;\n\n\t\t\t\t// Add it to the open list\n\t\t\t\tif ( endNodeRecord.category != Category.OPEN ) {\n\t\t\t\t\topen.addRecordByEstimatedTotalCost(endNodeRecord);\n\t\t\t\t\tendNodeRecord.category = Category.OPEN;\n\t\t\t\t\trecords.set(endNodeRecordIndex, endNodeRecord);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t// We’ve finished looking at the connections for\n\t\t\t// the current node, so add it to the closed list\n\t\t\t// and remove it from the open list\n\t\t\topen.removeRecord(current);\n\t\t\tcurrent.category = Category.CLOSED;\n\t\t\trecords.set(Integer.parseInt(current.node.id), current);\n\t\t}\n\t\t\n\t\t// We’re here if we’ve either found the goal, or\n\t\t// if we’ve no more nodes to search, find which.\n\t\tif (!current.node.equals(end)) {\n\t\t\t// Ran out of nodes without finding the goal, no solution\n\t\t\treturn null;\n\t\t} else {\n\t\t // Compile the list of connections in the path\n\t\t\tArrayList<DefaultWeightedEdge> path = new ArrayList<>();\n\n\t\t\twhile (!current.node.equals(start)) {\n\t\t\t\tpath.add(current.edge);\n\t\t\t\t// Set current (NodeRecord) to is source.\n\t\t\t\tcurrent = records.get( Integer.parseInt(g.graph.getEdgeSource(current.edge).id) );\n\t\t\t}\n\n\t\t\t// Reverse the path, and return it\n\t\t\tCollections.reverse(path);\n\t\t\treturn new Path(g, path);\n\t\t}\n\n\t}", "public static <G extends BaseWeightedGraph<V,E,W>,V,E extends WeightedEdge<V,W>, W extends Number & Comparable<W>> List<E> findShortestPathInt(G graph, V source, V sink){\r\n\t\t// check graph contains source and sink\r\n\t\tSet<V> vertecies = graph.getVertices();\r\n\t\tif( !(vertecies.contains(source) && vertecies.contains(sink)) ){\r\n\t\t\tthrow new IllegalArgumentException(\"BaseGraph must contain both source and sink\");\r\n\t\t}\r\n\t\t\r\n\t\tPriorityQueue<WeightedPathChain<V,E,W,Integer>> pq = new PriorityQueue<WeightedPathChain<V,E,W,Integer>>(); \r\n\t\tHashSet<V> checked = new HashSet<V>();\r\n\t\tHashMap<V,WeightedPathChain<V,E,W,Integer>> map = new HashMap<V,WeightedPathChain<V,E,W,Integer>>();\r\n\t\taddOrUpdate(map,pq,source,Integer.valueOf(0));\r\n\t\twhile(!pq.isEmpty()&&!sink.equals(pq.peek().vertex)){\r\n\t\t\tWeightedPathChain<V,E,W,Integer> current = pq.poll(); // poll lowest level vertex\r\n\t\t\tchecked.add(current.vertex); // add vertex to checked set\r\n\t\t\tfor (E edge :graph.getOutgoingEdges(current.vertex)){\t// for each outgoing edge \r\n\t\t\t\tif(!checked.contains(edge.getOpposingVertex(current.vertex))){\t\t// if opposing vertex has not been checked \r\n\t\t\t\t\taddOrUpdate(map,\r\n\t\t\t\t\t\t\t\tpq,\r\n\t\t\t\t\t\t\t\tedge.getOpposingVertex(current.vertex),\r\n\t\t\t\t\t\t\t\tInteger.valueOf(map.get(current.vertex).val+edge.getWeight().intValue() ) ,\r\n\t\t\t\t\t\t\t\tedge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tArrayList<V> path = new ArrayList<V>(); // vertex path \r\n\t\tArrayList<E> edgePath = new ArrayList<E>(); // edge path\r\n\t\tboolean run = true; \r\n\t\tif(!pq.isEmpty()&&pq.peek().vertex.equals(sink)) { // \r\n\t\t\tWeightedPathChain<V,E,W,Integer> vv = pq.poll();\r\n\t\t\tpath.add(vv.vertex);\r\n\t\t\tedgePath.add(vv.edge);\r\n\t\t\twhile(run) {\r\n\t\t\t\tvv = map.get(vv.edge.getOpposingVertex(vv.vertex));\r\n\t\t\t\tif(vv.vertex.equals(source)) {\r\n\t\t\t\t\trun=false;\r\n\t\t\t\t\tpath.add(vv.vertex);\r\n\t\t\t\t}\r\n\t\t\t\telse {\t\r\n\t\t\t\t\tedgePath.add(vv.edge);\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return path;\r\n\t\t\r\n\t\tCollections.reverse(edgePath);\r\n\t\treturn edgePath;\r\n\t}", "public String findShortestRoute(char start, char finish) {\r\n PriorityQueue<Vertex> Q = new PriorityQueue<>(new Comparator<Vertex>() {\r\n @Override\r\n public int compare(Vertex v1, Vertex v2) {\r\n return Integer.compare(v1.getDistanceFromStart(), v2.getDistanceFromStart());\r\n }\r\n });\r\n\r\n Vertex startVert = null;\r\n for(Vertex v : listOfVertices) {\r\n if(v.getName() == start) {\r\n v.setDistanceFromStart(0);\r\n v.setPrevious(v);\r\n startVert = v;\r\n }\r\n else {\r\n v.setDistanceFromStart(Integer.MAX_VALUE);\r\n v.setPrevious(null);\r\n }\r\n Q.add(v);\r\n }\r\n if(startVert == null) {\r\n throw new IllegalArgumentException(\"start vertex is not in graph\");\r\n }\r\n\r\n Vertex finishVert = null;\r\n while(!Q.isEmpty()) {\r\n Vertex v = Q.remove(); // remove first vertex in queue, the shortest path has been found to this vertex\r\n if(v.getName() == finish) {\r\n finishVert = v;\r\n break; // finish quicker\r\n }\r\n for(Edge incidentEdge : v.getIncidentEdges()) {\r\n Vertex adjacentVertex = incidentEdge.getOppositeVertex(v);\r\n int alt = v.getDistanceFromStart() + incidentEdge.getDistance();\r\n if(alt < adjacentVertex.getDistanceFromStart()) { // if going through this edge shortens the route to adjacentVertex\r\n adjacentVertex.setDistanceFromStart(alt);\r\n adjacentVertex.setPrevious(v);\r\n Q.remove(adjacentVertex); // increase the priority of adjacent vertices if this vertex shortens their route\r\n Q.add(adjacentVertex);\r\n }\r\n }\r\n }\r\n \r\n // throw exception if finish vertex not found\r\n if(finishVert == null) {\r\n throw new IllegalArgumentException(\"finish vertex is not in graph\");\r\n }\r\n \r\n // build the return value by adding vertex names from finish to start,\r\n // reversing the string, then concatenating the distance\r\n StringBuilder sb = new StringBuilder();\r\n for(Vertex v = finishVert; v != startVert; v = v.getPrevious()) {\r\n sb.append(v.getName());\r\n }\r\n return sb.append(start).reverse().append(finishVert.getDistanceFromStart()).toString();\r\n }", "private void backTrack(String start, AdjVertex end, Vertex parent){\r\n\t\tif(parent.name.compareToIgnoreCase(start) == 0){ \r\n\t\t\t//if we have found our way back to the start, then we print the result\r\n\t\t\tif(pathStack.isEmpty()){\r\n\t\t\t\tSystem.out.println(start + \" -- \" + end.name);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.print(start + \" -- \" + end.name);\r\n\t\t\t\twhile(!pathStack.isEmpty()){\r\n\t\t\t\t\tSystem.out.print(\" -- \" + pathStack.pop());\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we still have to find our way back to the first person,\r\n\t\t//we push the end name into the stack, \r\n\t\telse{ \r\n\t\t\tpathStack.push(end.name);\r\n\t\t\tconnector(start, parent.name);\r\n\t\t}\r\n\t}", "private void solutionPath(Node n){\n ArrayList<String> num = new ArrayList<>();\n num.add(n.getDigit().getDigitString());\n Node node = n.getParent();\n\n while(true){\n\n if(node == startNode){\n num.add(node.getDigit().getDigitString());\n break;\n }else{\n num.add(node.getDigit().getDigitString());\n }\n\n node = node.getParent();\n }\n\n int size = num.size();\n int index = size-1;\n\n for(int i=0; i<size; i++){\n if(index == 0){\n System.out.println(num.get(index));\n break;\n }\n System.out.print(num.get(index)+\",\");\n index--;\n }\n }", "public List<Vertex> getPathTo(int targetVertexPortnum){\n LinkedList<Vertex> path = new LinkedList<Vertex>();\n path.add(graph.getVertex(convertToString(targetVertexPortnum))); // use string version of the port num.\n \n while(targetVertexPortnum != this.initialVertexPortNum)\n {\n Vertex predecessor = graph.getVertex(this.predecessors.get(convertToString(targetVertexPortnum))); // use string version of the portnum.\n targetVertexPortnum = predecessor.getVertexPortNum(); // get the int representation of the vertex portnum.\n path.add(0, predecessor); // add the vertex to our shortest path.\n }\n \n return path; // return the shortest path to the target vertex.\n }", "public ArrayList<String> shortestPath(String u, String v)\n {\n ArrayList<String> path = new ArrayList<>();\n HashMap<String, Boolean> flag = new HashMap<>();\n HashMap<String, String> prev = new HashMap<>();\n\n Queue<GraphVertex> queue = new LinkedList<>();\n HashMap<String, Boolean> visited = new HashMap<>();\n\n GraphVertex src = graphVertexHashMap.get(u);\n flag.put(src.getVertexName(), true);\n queue.add(src);\n visited.put(src.getVertexName(), true);\n\n while(!queue.isEmpty()){\n GraphVertex node = queue.poll();\n\n HashMap<String, GraphVertex> edges = node.getOutDegrees();\n Iterator it = edges.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry pair = (Map.Entry)it.next();\n if(flag.get(pair.getKey()) == null || flag.get(pair.getKey()) == false){\n String vertex = (String)pair.getKey();\n flag.put(vertex, true);\n prev.put(vertex, node.getVertexName());\n queue.add(edges.get(pair.getKey()));\n }\n }\n\n }\n path = backTrackPath(prev, u, v);\n return path;\n }", "public String toString() {\n \tString printStatements = \"\";\n \t\n \tfor (Vertex vertex : this) {\n \t\tprintStatements += vertex + \" \";\n \t}\n \treturn printStatements;\n }", "@Override\r\n\tpublic ArrayList<Edge<E>> primMinimumSpanningTree(E src) {\r\n\t\tArrayList<Edge<E>> prim = new ArrayList<Edge<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getColor() == Color.WHITE && d.getDistance() > ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(d);\r\n\t\t\t\t\t\tVertex<E> pred = d.getPredecessor();\r\n\t\t\t\t\t\tif(pred != null) { //remove the edge that has ale.dst as dst vertex\r\n\t\t\t\t\t\t\tEdge<E> edgeToRemove = new Edge<>(pred.getElement(), ale.getDst(), 1);\r\n\t\t\t\t\t\t\tprim.remove(edgeToRemove);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\td.setDistance(ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t\tprim.add(ale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prim;\r\n\t}" ]
[ "0.74038744", "0.7302658", "0.6992993", "0.66858464", "0.66673267", "0.66458654", "0.66422546", "0.66402453", "0.66233814", "0.65663445", "0.6521198", "0.64964914", "0.64928645", "0.6482712", "0.6375751", "0.63555235", "0.63362354", "0.63173145", "0.628402", "0.62313056", "0.6225888", "0.6186707", "0.61791044", "0.61778826", "0.6160391", "0.6145018", "0.61055577", "0.6094867", "0.60777473", "0.6053122", "0.60474706", "0.6041864", "0.6033875", "0.6028067", "0.60152453", "0.60130143", "0.60107267", "0.5982611", "0.5971491", "0.5969627", "0.5964301", "0.5947", "0.5909925", "0.5907529", "0.5907067", "0.58874166", "0.5861789", "0.58544874", "0.584939", "0.58339995", "0.5831177", "0.5813992", "0.58071244", "0.5800087", "0.5796968", "0.57925826", "0.57924885", "0.5786123", "0.57631505", "0.57543117", "0.57322586", "0.5725547", "0.5721354", "0.5699324", "0.56908864", "0.568464", "0.5673303", "0.5650742", "0.5646828", "0.5638076", "0.5636314", "0.5622821", "0.56203896", "0.56028825", "0.56017655", "0.5598355", "0.55938417", "0.5588381", "0.55851865", "0.5582787", "0.55728704", "0.5566921", "0.5550549", "0.5548992", "0.55481243", "0.5540586", "0.55323935", "0.5530194", "0.55258054", "0.5524535", "0.552041", "0.5520067", "0.5519314", "0.55071646", "0.54863334", "0.5483764", "0.5479721", "0.54749745", "0.54705447", "0.54676855" ]
0.80847293
0
Base case : Source node has been processed
private void printPathPara(int currentVertex, int[] parents, ListaEnlazada lista) { if (currentVertex == NO_PARENT) { return; } printPathPara(parents[currentVertex], parents, lista); NodoTemp temp = new NodoTemp(currentVertex); lista.add(temp); System.out.print(currentVertex + " "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Node getSourceNode();", "@Override\n\t\tpublic CompilationUnitTree process(CompilationUnitTree source) throws Exception {\n\t\t\treturn null;\n\t\t}", "public void setSourceNode(String sourceNode) {\n this.sourceNode = sourceNode;\n }", "public Node source() {\n return source;\n }", "public Node source() {\n\t\treturn _source;\n\t}", "public void updateSource() {\n\t\t// Set the mode to recording\n\t\tmode = RECORD;\n\t\t// Traverse the source and record the architectures structure\n\t\tinspect();\n\t\t// Set the mode to code generation\n\t\tmode = GENERATE;\n\t\t// Traverse the source and calls back when key source elements are\n\t\t// missing\n\t\tinspect();\n\t\t// System.out.println(tree);\n\t\t// Add the source files that are missing\n\t\tArrayList<TagNode> tags = tree.getUnvisited();\n\t\tcreateSourceFiles(tags);\n\t}", "@Override\r\n\tprotected void processTarget() {\n\r\n\t}", "@Override\r\n\tprotected void processTarget() {\n\r\n\t}", "protected boolean isSourceElement() {\n\t\treturn false;\n\t}", "default FileCollectionStructureVisitor.VisitType prepareForVisit(FileCollectionInternal.Source source) {\n return FileCollectionStructureVisitor.VisitType.Visit;\n }", "public Node getSource() {\n return this.source;\n }", "public String getSourceNode() {\n return sourceNode;\n }", "State getSource();", "protected void sequence_Source(ISerializationContext context, Source semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getSource_StrId()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getSource_StrId()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getSourceAccess().getStrIdSource1IdNewParserRuleCall_0_1(), semanticObject.eGet(SiddhiPackage.eINSTANCE.getSource_StrId(), false));\n\t\tfeeder.finish();\n\t}", "boolean hasSource();", "public abstract Source getSource();", "void startVisitingObject(Object node);", "public abstract Object getSource();", "@Override\r\n\tpublic void visit() {\n\r\n\t}", "@Override\n\tpublic void renderSource() {\n\t\t\n\t}", "public Results(Node source) {\n\t\tinorder(source);\n\t}", "public void validateSource() {\n\t\t// Set the mode to recording\n\t\tmode = RECORD;\n\t\t// Traverse the source and record the architectures structure\n\t\tinspect();\n\t\t// Set the mode to validation\n\t\tmode = VALIDATE;\n\t\t// Traverses the\n\t\tinspect();\n\t\t// System.out.println(tree);\n\t\t// Report the source files that are missing\n\t\tArrayList<TagNode> tags = tree.getAllUnvisited();\n\t\treportMissing(tags);\n\t}", "public void startParsing(InputSource source) {\r\n\t\ttry {\r\n\t\t\t_parser.parse(source, this);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tLoggerUtilsServlet.logErrors(e);\r\n\t\t}\r\n\t}", "@Override\n public boolean hasNext()\n {\n return source.hasNext();\n }", "private void passOne() {\r\n\t\t// clearDoc(docListing);\r\n\r\n\t\tint lineNumber;\r\n\t\tString sourceLine;\r\n\t\t// LineParser lineParser = new LineParser();\r\n\t\tSourceLineAnalyzer lineAnalyzer = new SourceLineAnalyzer();\r\n\t\tSourceLineParts sourceLineParts;\r\n\t\tScanner scannerPassOne = new Scanner(tpSource.getText());\r\n\t\twhile (scannerPassOne.hasNextLine()) {\r\n\t\t\tsourceLine = scannerPassOne.nextLine();\r\n\t\t\tif (sourceLine.equals(EMPTY_STRING)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} // if skip textbox's empty lines\r\n\r\n\t\t\tsourceLineParts = lineAnalyzer.analyze(sourceLine);\r\n\r\n\t\t\tif (!sourceLineParts.isLineActive()) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} // if skip textbox's empty lines\r\n\r\n\t\t\tlineNumber = sourceLineParts.getLineNumber();\r\n\t\t\tallLineParts.add(sourceLineParts);\r\n\r\n\t\t\tif (sourceLineParts.hasLabel()) {\r\n\t\t\t\tprocessLabel(sourceLineParts, lineNumber);\r\n\t\t\t} // if - has label\r\n\r\n\t\t\tif (sourceLineParts.hasInstruction()) {\r\n\t\t\t\tinstructionCounter.incrementCurrentLocation(sourceLineParts.getOpCodeSize());\r\n\t\t\t} // if instruction\r\n\r\n\t\t\tif (sourceLineParts.hasDirective()) {\r\n\t\t\t\tprocessDirectiveForLineCounter(sourceLineParts, lineNumber);\r\n\t\t\t} // if directives\r\n\r\n\t\t\tif (sourceLineParts.hasName()) {\r\n\t\t\t\tprocessSymbol(sourceLineParts, lineNumber);\r\n\t\t\t} // if has symbol\r\n\r\n\t\t\t// displayStuff(lineParser);\r\n\t\t} // while\r\n\t\tSymbolTable.passOneDone();\r\n\t\tscannerPassOne.close();\r\n\t}", "public abstract void buildStartSource(OutputStream out, SourceObjectDeclared o) throws IOException;", "@Override\n\tpublic void sampleNode() {\n\n\t}", "@Override\r\n\tpublic Node visitSequence(SequenceContext ctx) {\n\t\treturn super.visitSequence(ctx);\r\n\t}", "public void updateNodeDataChanges(Object src) {\n\t}", "public boolean isSource() {\r\n \t\treturn source;\r\n \t}", "public Object getSource() {return source;}", "protected abstract Vector4d startSourceDrag(Node source,\n Vector3d pos, Vector4d copy);", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void processingInstruction() {\n\t\t\n\t}", "public boolean isSource();", "public void start(Node n) {}", "private void processStartObject() {\n\t\tif (currentFieldName != null) {\r\n\t\t\t// go down the tree following the field name\r\n\t\t\tFieldFilterTree tmpIncludes = curNode.getChild(currentFieldName);\r\n\t\t\tparentNode = curNode;\r\n\t\t\tcurNode = tmpIncludes;\r\n\t\t}\r\n\t}", "public abstract T getSource();", "@Override\n\tpublic void processing() {\n\n\t}", "@Override\n public void perform (final Object[] nodes) {\n requestProcessor.post(new Runnable() {\n @Override\n public void run() {\n goToSource((TruffleStackFrame) nodes [0]);\n }\n });\n }", "private synchronized void nodeProcessed(PackProcessingNode node) {\n if (processedCount.addAndGet(1) == processingNodes.size) {\n finishProcessing();\n }\n }", "public State getsourcestate(){\n\t\treturn this.sourcestate;\n\t}", "boolean isSource();", "@Override\r\n\tpublic Node visitBlock(BlockContext ctx) {\n\t\treturn super.visitBlock(ctx);\r\n\t}", "@Override\r\n public void nodeActivity() {\n }", "@Override\n\tprotected void start () {\n\t\tsuper.start();\t\t\n\t\tncName = mNode.getAttribute( AT_LINK_NAME );\n\n\t}", "@Override\r\n\tprotected void processTarget() throws SGSException {\n\r\n\t}", "@Override\n public Vertex getSource() {\n return sourceVertex;\n }", "@Override\r\n public void execute() {\r\n if (newSource != null) {\r\n edge.setSource(newSource);\r\n } else if (newTarget != null) {\r\n edge.setTarget(newTarget);\r\n }\r\n }", "protected boolean traverseThisNode(iNamedObject node)\n\t{\n\t\treturn true;\n\t}", "public void startContent() throws XPathException {\n if (activeDepth > 0) {\n super.startContent();\n } else if (matched) {\n activeDepth = 1;\n super.startContent();\n }\n }", "@Override\n\tpublic void startProcessing() {\n\n\t}", "@Override\n public String getSource()\n {\n return null;\n }", "@Override // ohos.com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase\r\n public boolean nextNode() {\r\n IncrementalSAXSource incrementalSAXSource = this.m_incrementalSAXSource;\r\n if (incrementalSAXSource == null) {\r\n return false;\r\n }\r\n if (this.m_endDocumentOccured) {\r\n clearCoRoutine();\r\n return false;\r\n }\r\n Object deliverMoreNodes = incrementalSAXSource.deliverMoreNodes(true);\r\n if (deliverMoreNodes instanceof Boolean) {\r\n if (deliverMoreNodes != Boolean.TRUE) {\r\n clearCoRoutine();\r\n }\r\n return true;\r\n } else if (deliverMoreNodes instanceof RuntimeException) {\r\n throw ((RuntimeException) deliverMoreNodes);\r\n } else if (!(deliverMoreNodes instanceof Exception)) {\r\n clearCoRoutine();\r\n return false;\r\n } else {\r\n throw new WrappedRuntimeException((Exception) deliverMoreNodes);\r\n }\r\n }", "public void visit()\n\t{\n\t\t// Visit data element.\n\t\tcargo.visit();\n\t}", "void Parse(Source source);", "protected Source getSource() {\r\n return source;\r\n }", "public void visit() {\n\t\tvisited = true;\n\t}", "protected void visitCurrentNode() {\n\t\ttraverseVector.add(tree.getCurrentNode());\n\t}", "public abstract String getSource();", "public void visit() {\n visited = true;\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void onFinish(String source) {\n\t\t\t\t\t\t\t}", "public boolean isSourceEmpty() {\n\t\treturn getResult.isSourceEmpty();\n\t}", "@Override\n public abstract SourcePoint getSourcePoint();", "public boolean isSource()\n\t{\n\t\treturn isSource;\n\t}", "default boolean visitContent() {\n\t\treturn true;\n\t}", "public FileNode getLink(){return super.getVirtualSource();}", "@Override\n\tpublic Object visit(ASTIn node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, 0);\n\t\tSystem.out.print(\" in \");\n\t\tnode.jjtGetChild(1).jjtAccept(this, 0);\n\t\treturn null;\n\t}", "@Override\n\tpublic VType getSource() {\n\t\t// TODO: Add your code here\n\t\treturn super.from;\n\t}", "ElementCircuit getSource();", "protected LR1_Grammar() {\n\t\tSet follow = new Set(1);\n\t\tfollow.append(END_OF_SOURCE);\n\t\tthis.start.follow = follow;\n\t}", "@Override\n\tpublic void doWork() {\n\t\tmSource.doWork();\n\t}", "public void inorder(Node source) {\n inorderRec(source);\n }", "public int sourceStart()\n\t{\n\t\treturn sourceStart;\n\t}", "@Override\n\tpublic String getSource() {\n\t\treturn source;\n\t}", "public abstract void visit();", "protected void beginTraversal(SoNode node)\n\t //\n\t {\n\t traverse(node);\n\t }", "protected abstract Vector4d doSourceDrag(Node source,\n Vector3d pos, Vector4d copy);", "@Override\n public void visit(NodeVisitor v){\n v.visit(this);\n }", "public abstract void buildHeadSource(OutputStream out, SourceObjectDeclared o) throws IOException;", "@Override\n\tpublic void visitEnd() {\n\t\tresultReady = true;\n\t}", "@Override\n\tpublic void done() {\n\n\t\tswitch (state) {\n\t\tcase WAITING_FOR_TEXT_NODE:\n\t\t\t// Not seen a <text> node ? Just forward everything delayed.\n\t\t\tpassAllDelayed();\n\t\t\tbreak;\n\n\t\tcase WAITING_FOR_ROOT_NODE:\n\t\t\t// Not seen a root node ? Just forward everything delayed.\n\t\t\tpass(startOfText);\n\t\t\tpassAllDelayed();\n\t\t\tbreak;\n\n\t\tcase PASS_THROUGH:\n\t\tdefault:\n\t\t}\n\n\t\tsuper.done();\n\t}", "@Override\r\n public String getSource()\r\n {\n return null;\r\n }", "public boolean isSource() {\n\t\treturn direction.isSource();\n\t}", "@Override\n\tpublic Object visit(ASTStart node, Object data) {\n\t\tnode.childrenAccept(this, data);\n\t\tSystem.out.println();\n\t\treturn null;\n\t}", "@Override\n\tpublic void postProcess(NodeCT node) {\n\t}", "@Override\n\t\t\t\t\tpublic void onNext(Object p1) {\n\t\t\t\t\t}", "default void endVisitCollection(FileCollectionInternal.Source source) {\n }", "void nodeStarted();", "@Test\n\tpublic void sourcesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_0.addVertices(vertices);\n\t\tgraph.addEdge(edge_0);\n\t\tassertTrue(graph.sources(B).keySet().contains(A));\n\t\tassertTrue(graph.sources(B).get(A) == 1);\n\t}", "default boolean visitEnd() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic Node visitStages(StagesContext ctx) {\n\t\treturn super.visitStages(ctx);\r\n\t}", "@Override\n public void visit(P_Link pathNode) {\n Iterator<Node> nodes = engine.doOne(node, pathNode.getNode()) ;\n fill(nodes) ;\n }", "@Override\n\tpublic void visitXblock(Xblock p) {\n\n\t}", "@Override\r\n\tpublic String getSource() {\n\t\treturn null;\r\n\t}", "@Override\n \tpublic String getSource() {\n \t\tif (super.source != refSource) {\n \t\t\tif (refSource == null) {\n \t\t\t\trefSource = super.source;\n \t\t\t} else {\n \t\t\t\tsuper.source = refSource;\n \t\t\t}\n \t\t}\n \t\treturn refSource;\n \t}", "public void testExistingSeqWithChangedSrc() throws Exception\n {\n Integer C30 = this.cellLineLookup.lookup(\"C30\");\n String sql = \"select * from prb_source where _source_key \" +\n \"= -40 and _cellLine_key = \" + C30.toString();\n ResultsNavigator nav = sqlMgr.executeQuery(sql);\n assertTrue(!nav.next()); // assure no records found\n String accid = \"T00313\";\n MSRawAttributes raw = new MSRawAttributes();\n raw.setOrganism(\"mouse, laboratory\");\n raw.setCellLine(\"C30\");\n Integer seqKey = new Integer(-200);\n msProcessor.processExistingSeqSrc(accid, seqKey, null, raw);\n nav = sqlMgr.executeQuery(sql);\n assertTrue(nav.next()); // assure a record was found\n }", "public abstract void buildEndSource(OutputStream out, SourceObjectDeclared o) throws IOException;", "public void run()\r\n {\r\n for (Source oSource : this)\r\n oSource.run();\r\n }", "protected void sequence_MainSource(ISerializationContext context, MainSource semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getMainSource_Src()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getMainSource_Src()));\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getMainSource_BasicSSh()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getMainSource_BasicSSh()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getMainSourceAccess().getSrcSourceParserRuleCall_0_0(), semanticObject.getSrc());\n\t\tfeeder.accept(grammarAccess.getMainSourceAccess().getBasicSShBasicSourceStreamHandlers1ParserRuleCall_1_0(), semanticObject.getBasicSSh());\n\t\tfeeder.finish();\n\t}", "WfExecutionObject source (SharkTransaction t) throws BaseException, SourceNotAvailable;" ]
[ "0.6659934", "0.64673746", "0.62706673", "0.6201497", "0.61939824", "0.6132681", "0.60393274", "0.60393274", "0.59848946", "0.59350055", "0.59316796", "0.5911759", "0.5888243", "0.5838739", "0.583246", "0.58233863", "0.58198416", "0.58197397", "0.58060855", "0.5794045", "0.5778144", "0.57638663", "0.5757905", "0.57253325", "0.57185787", "0.5713806", "0.5700177", "0.56934917", "0.5686184", "0.56817937", "0.566817", "0.56492764", "0.56401014", "0.56400603", "0.5635692", "0.5612766", "0.5600086", "0.5596379", "0.559242", "0.5584765", "0.557923", "0.55732787", "0.5562208", "0.55484784", "0.5541868", "0.5532304", "0.552368", "0.5520789", "0.55067754", "0.5500026", "0.54987395", "0.5497334", "0.549252", "0.5488415", "0.5485584", "0.5484971", "0.5476866", "0.5464415", "0.5458022", "0.5455043", "0.5445535", "0.5444202", "0.54326093", "0.5427018", "0.54249316", "0.53917265", "0.53887904", "0.5374844", "0.5374789", "0.5367325", "0.53630966", "0.5358735", "0.5357392", "0.5354872", "0.5353989", "0.5348476", "0.5340171", "0.53345704", "0.5324605", "0.53164583", "0.5314125", "0.5308532", "0.5306577", "0.5306122", "0.5301278", "0.52995104", "0.5285785", "0.52823436", "0.5279833", "0.5279766", "0.52771777", "0.52716845", "0.52714443", "0.5270603", "0.52652097", "0.5264379", "0.5263339", "0.5261506", "0.5255413", "0.5234558", "0.5230191" ]
0.0
-1
Inflate the layout for this fragment
@Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.content_welcome_dua, container, false); Button btnCategory = view.findViewById(R.id.btn_next); btnCategory.setOnClickListener(this); ImageView iv1 = view.findViewById(R.id.iv_gbr1); ImageView iv2 = view.findViewById(R.id.iv_gbr2); DrawableImageViewTarget imageViewTarget = new DrawableImageViewTarget(iv1); Glide.with(this).load(R.raw.superman).into(imageViewTarget); imageViewTarget = new DrawableImageViewTarget(iv2); Glide.with(this).load(R.raw.angel_and_devil_jadi).into(imageViewTarget); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
interface holding methods to be implemented
public interface AppDao { boolean slotTaken(Timestamp date) throws Exception; List<Appointment> listAllApps() throws Exception; Appointment getAppointment(Integer id) throws Exception; List<Appointment> listAppsByUser(String requester) throws Exception; Appointment newAppointment(String requester, Room room, Timestamp date) throws Exception; Appointment modifyApp(Integer id, Room room, Timestamp date) throws Exception; Appointment removeApp(Integer id) throws Exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Implementor {\n // 实现抽象部分需要的某些具体功能\n void operationImpl();\n}", "public interface Calculator {\n //add method\n double add(double x, double y);\n\n //subtract method\n double subtract(double x, double y);\n\n //mulpiply method\n double multiply(double x, double y);\n\n //Divide method\n double divide(double x, double y) throws IllegalArgumentException;\n}", "public interface Calculator {\n\n int add(int i, int j);\n\n\n int subtract(int i, int j);\n}", "public interface AnInterface {\n void f();\n\n void g();\n\n void h();\n}", "public interface Customizable {\n\n /**\n * This method adds based on the parameter passed and the class it is implemented in.\n * @param obj object\n * @return true is added successfully, otherwise false\n */\n boolean add(Object obj);\n\n /**\n * This method removes based on the parameter passed and the class it is implemented in.\n * @param obj object\n * @return true is removed successfully, otherwise false\n */\n boolean remove(Object obj);\n}", "public interface Customizable {\n //Add method to be implemented\n boolean add(Object obj);\n\n //Remove method to be implemented\n boolean remove(Object obj);\n}", "public abstract void abstractMethodToImplement();", "public interface MyInterface {\n public void m1();\n public void m2();\n public void m3();\n public void m4();\n\n}", "public interface IService {\n void methodA();\n void methodB();\n void methodC();\n}", "public interface Service {\n void method1();\n void method2();\n}", "public interface i {\n int a();\n\n boolean b();\n\n void c();\n}", "interface Hi {\n // MUST BE IMPLEMENTED IN IMPLEMENTING CLASS!!\n void Okay(String q);\n}", "public interface HappyMethods {\n\n boolean isHappy(Ticket ticket);\n\n}", "public interface FlyBehevour {\n void fly();\n}", "public interface Tweetable {\n /*\n Typically in an interface you put lists of methods with no code in them. They don't\n usually have constructors. How they work: like saying \"I promise to have these methods\". If\n I want to implement this interface I must have these methods. Like a checklist that\n classes need to check off. How to use: like a super class. Instead of 'extends' we use\n 'implements'\n */\n public String getText();\n public Date getDate();\n\n}", "public interface se {\n void a(List<POI> list);\n\n boolean a();\n\n void b();\n\n boolean c();\n\n List<POI> d();\n\n POI e();\n\n POI f();\n}", "public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n}", "public interface ICalculation {\n int add(int a,int b);\n int sub(int a,int b);\n int mul(int a,int b);\n int div(int a,int b);\n}", "public interface a {\n void a();\n }", "public interface a {\n void a();\n }", "public interface Handler extends Action, Syntax {\n\n}", "public interface AbstractC3386kV0 {\n boolean b();\n\n void d();\n\n void dismiss();\n\n ListView f();\n}", "public interface SampleA {\n void operation1();\n void operation2();\n}", "public interface Interface {\n void doSomething();\n void somethingElse(String arg);\n}", "public interface A {\n void a();\n void b();\n void c();\n void d();\n void e();\n void f();\n void g();\n}", "public interface ICalculator {\n\n int calculate(String exp);\n\n}", "public interface C22486a {\n void bGQ();\n\n void cMy();\n }", "public interface Strategy {\n\n\n\tpublic void operation();\n\n}", "@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}", "public interface a\n{\n\n public abstract void addEventListener(String s, VPAIDEventListener vpaideventlistener);\n\n public abstract void dispatchEvent(VPAIDEvent vpaidevent);\n\n public abstract boolean hasEventListener(String s, VPAIDEventListener vpaideventlistener);\n\n public abstract void removeEventListener(String s, VPAIDEventListener vpaideventlistener);\n}", "public interface PayCalculator {\n\n /**\n * Calculate the payment for the specified hours and\n * rate.\n */\n public double calculatePayment (int hours);\n}", "public interface MovementSensor {\r\n\tpublic void driving();\r\n\tpublic void walking();\r\n}", "public interface SourceAble {\n public void method1();\n\n public void method2();\n}", "interface U {\n public void A() ;\n public void B() ;\n public void C() ;\n}", "public interface Animal {\n\n public void eat();\n public void travel();\n}", "public static interface _cls9\n{\n\n public abstract void userCancelledSignIn();\n\n public abstract void userSuccessfullySignedIn();\n}", "public interface PythonWolfInterface {\n public void initialize(WolfPlayer myself);\n public Move move();\n public void isEating();\n public void isAttacked(); \n}", "public interface IPresenterHienThiSanPhamTheoDanhMuc {\n void LayDanhSachSP_theoMaLoai(int masp,boolean kiemtra);\n}", "abstract protected Set<Method> createMethods();", "public interface Actions extends EObject\n{\n}", "public interface IFlyAminal {\n void fly();\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public interface i {\n void D(String str);\n\n void H();\n\n void L(String str);\n\n void b0(Response response);\n\n void c(List<DomainExpired> list);\n\n void h(Map<String, List<ExtendedMail>> map);\n\n void p(ApiError apiError);\n}", "public interface IAlgorithm {\n void go();\n}", "public static interface _cls9\n{\n\n public abstract void onEbayError(List list);\n\n public abstract void onRemindersError();\n\n public abstract void updateMsgRemindersCounts(UserActivitySummary useractivitysummary);\n}", "public interface IInteractorOperations {\n\n String concatenarNombre(String nombres, String apellidos);\n int calcularEdad(String fechaNacimiento);\n}", "public interface ICalculator {\n String add(String num1, String num2);\n}", "interface A {\n void a();\n}", "interface a {\n int aadd();\n int sub();\n}", "public interface RemotInterfaceOperations \n{\n String createDRecord (String managerId, String firstName, String lastName, String address, String phone, String specialization, String location);\n String createNRecord (String managerId, String firstName, String lastName, String designation, String status, String statusDate);\n String getRecordCount (String managerId, int recordType);\n String editRecord (String managerId, String recordID, String fieldName, String newValue);\n String transferRecord (String managerID, String recordID, String remoteClinicServerName);\n}", "public interface MethodInteraction {\n\n void onMethodEdit(Method method, String newBody);\n\n void onMethodDrag(RecyclerView.ViewHolder holder);\n}", "public interface MethodFactory extends ModuleSupportable\n{\n\t/**\n\tUsed to identify this interface when finding it with the Monitor.\n\t**/\n\tpublic static final String MODULE = \n\t \"com.splicemachine.db.iapi.store.access.conglomerate.MethodFactory\";\n\n\t/**\n\tReturn the default properties for this access method.\n\t**/\n\tProperties defaultProperties();\n\n\t/**\n\tReturn whether this access method implements the implementation\n\ttype given in the argument string.\n\t**/\n\tboolean supportsImplementation(String implementationId);\n\n\t/**\n\tReturn the primary implementation type for this access method.\n\tAlthough an access method may implement more than one implementation\n\ttype, this is the expected one. The access manager will put the\n\tprimary implementation type in a hash table for fast access.\n\t**/\n\tString primaryImplementationType();\n\n\t/**\n\tReturn whether this access method supports the format supplied in\n\tthe argument.\n\t**/\n\tboolean supportsFormat(UUID formatid);\n\n\t/**\n\tReturn the primary format that this access method supports.\n\tAlthough an access method may support more than one format, this\n\tis the usual one. the access manager will put the primary format\n\tin a hash table for fast access to the appropriate method.\n\t**/\n\tUUID primaryFormat();\n}", "public interface AInterface {\n\n public void say();\n\n}", "public interface ab {\n void beA();\n\n void beB();\n\n boolean beC();\n\n void bey();\n\n void bez();\n\n void dispose();\n\n void fK(boolean z);\n}", "public interface Flyable {\n\t\n\t/**\n\t * A method to be used to launch \n\t */\n\tvoid launch();\n\t\n\tvoid land();\n}", "public interface ch\n{\n\n public abstract void a(bv bv, p p, h h, long l, int i, int j, \n IMediaItem imediaitem);\n}", "public interface ViewBinhLuan {\n void DangBinhLuanThanhCong();\n void DangBinhLuanThatBai();\n}", "public interface Component {\n\n public void operation();\n}", "public interface PedidoOperations \r\n{\r\n boolean guardarPedido (int id_pedido, String fecha, String cantidad_producto, String precio_unitario);\r\n boolean actualizarPedido (int id_pedido, String fecha, String cantidad_producto, String precio_unitario);\r\n boolean eliminarPedido (int id_pedido);\r\n String consultarPedido (int id_pedido);\r\n void shoutdown ();\r\n}", "public interface Operation {\n}", "public interface METHODS {\n public static int TIME = 0;\n public static int DISTANCE= 1;\n public static int STEPS = 2;\n public static int ACHIEVEMENTS = 3;\n }", "abstract void method();", "public interface Zrada\n{\n void accuse();\n}", "public interface aqi {\n void a(int i, int i2, PhoneFavoriteSquareTileView phoneFavoriteSquareTileView);\n\n void b(int i, int i2, PhoneFavoriteSquareTileView phoneFavoriteSquareTileView);\n\n void q();\n\n void r();\n}", "public interface a {\n void a();\n\n void a(al alVar);\n\n void b(al alVar);\n\n void c(al alVar);\n }", "private static interface Base {\n\n public void foo();\n }", "public interface test {\n void test();\n}", "public interface C11922a {\n void bvR();\n }", "public interface Fly {\n void fly();\n}", "public interface zze\n extends IInterface\n{\n\n public abstract void zza(zzd zzd, GoogleSignInConfig googlesigninconfig);\n\n public abstract void zza(zzd zzd, SignInConfiguration signinconfiguration);\n\n public abstract void zzb(zzd zzd, GoogleSignInConfig googlesigninconfig);\n\n public abstract void zzb(zzd zzd, SignInConfiguration signinconfiguration);\n\n public abstract void zzc(zzd zzd, GoogleSignInConfig googlesigninconfig);\n}", "public interface U {\n void f1();\n void f2();\n void f3();\n}", "public interface A {\n void f();\n}", "public interface Command {\n\t/**\n *it is used to be defined and to call engine methods\n */\n public void execute();\n \n}", "public interface ServiceIface {\n void service();\n}", "public interface IInvocation {\n void invoke();\n}", "public interface ServiceandLocListner {\n public void failedtoConnect();\n public void GetServiceListFailed(String msg);\n\n public void GetServiceList(List<Services> servicesList);\n\n public void GetLocationList(List<PlaceLoc> placeLocList);\n\n public void GetLocationListFailed(String msg);\n\n public void AddLocationSuccess();\n\n public void AddLocationFailed(String msg);\n public void DeleteLocationSuccess();\n\n public void DeleteLocationFailed(String msg);\n public void AddServiceSuccess();\n\n public void AddServiceFailed(String msg);\n\n public void DeleteServiceSuccess();\n\n public void DeleteServiceFailed(String msg);\n\n\n\n}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "public interface IFaci {\n}", "public interface Strategy {\n\n void info();\n\n}", "public interface Interactable {\n\n\tpublic void interact();\n\t\n}", "public interface IHttpRequestHandler extends INamedObject\r\n{\t\r\n public HandlerResponse handleRequest( HttpRequestData httpRequest ) throws IOException;\r\n}", "public interface Operation {\n String description();\n void command();\n}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public interface OnConnectionOptionSelected {\r\n public void onDownloadSelected();\r\n public void onUploadSelected();\r\n}", "public interface DisplayInterface {\n\t\n\t// Abstract Method\n\t\n\t// Runnable \n\t\n\tpublic void display ();\n\n\n}", "public interface o {\n void onSupportActionModeFinished(b bVar);\n\n void onSupportActionModeStarted(b bVar);\n\n b onWindowStartingSupportActionMode(a aVar);\n}", "public interface IPresenterTinTuc {\n void layDanhSachTinTuc(String duongDan);\n TrangTinTuc layDanhSachTinTucLoadMore(String duongDan);\n}", "interface IFly {\n void fly();\n}", "public interface C11859a {\n void bvs();\n }", "public interface IBaseInterface {\n public void onRefresh();\n public void onLoadMore();\n\n}", "public interface ICalculator\n{\n\tvoid setAction(IAction act);\n\n\tString calc(String[] args);\n}", "public interface AbstractC2930hp1 {\n void a(String str, boolean z);\n\n void b(String str, long j);\n\n void c(String str, int i, int i2, int i3, int i4);\n\n void d(String str, int i);\n\n void e(String str, int i, int i2, int i3, int i4);\n}", "public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public interface Employee{\n\n void takeCall();\n void endCall();\n}", "public interface HelloOperations \n{\n String EqOfMotion (String v0, String t, String a);\n void shutdown ();\n}", "public interface CoverCreationMethod {\n\n}", "public interface IOperateGame{\r\n void initDataFinished();\r\n void downloadingQuestion(Map<String,String> data);\r\n void startMemory();\r\n void startRememory();\r\n void pauseGame();\r\n\r\n void reStartGame();\r\n void finishGame();\r\n}", "public interface Targetable {\n public void methodA();\n public void methodB();\n}", "public interface ICamera {\r\n void takePhoto(); // abstract method\r\n void changeAperture();\r\n\r\n default void takeHdrPhoto() {\r\n System.out.println(\"take 3 photos with different exposures and combine them together\");\r\n }\r\n\r\n default void shootVideo() {\r\n System.out.println(\"shooting a video\");\r\n }\r\n}", "public interface zzo\n extends IInterface\n{\n\n public abstract void zze(AdRequestParcel adrequestparcel);\n}" ]
[ "0.6839975", "0.67230886", "0.6669167", "0.6618539", "0.6613824", "0.6595836", "0.6595812", "0.6568812", "0.65443325", "0.65314645", "0.6512077", "0.6483929", "0.64785314", "0.6459135", "0.6458634", "0.64542925", "0.64533085", "0.64461195", "0.6443164", "0.6443164", "0.64360666", "0.6435259", "0.64341336", "0.6414265", "0.63999283", "0.63968825", "0.63916373", "0.6391337", "0.6373116", "0.637122", "0.636876", "0.635365", "0.6348641", "0.6347815", "0.6344123", "0.634194", "0.63023263", "0.6290822", "0.62831116", "0.6282512", "0.6251501", "0.6249708", "0.6244176", "0.62388957", "0.6236152", "0.6229419", "0.6229285", "0.62268704", "0.6221883", "0.622173", "0.62146443", "0.61841017", "0.6180622", "0.61740196", "0.6172534", "0.6167611", "0.616446", "0.61581177", "0.61569285", "0.61530095", "0.61423403", "0.6141697", "0.6137714", "0.6136364", "0.6129133", "0.6124104", "0.6115471", "0.61130244", "0.6112833", "0.6111019", "0.6109214", "0.61068183", "0.61059135", "0.610517", "0.6104269", "0.6103499", "0.6103476", "0.61026824", "0.6101324", "0.61003524", "0.6098219", "0.609383", "0.60909474", "0.6089822", "0.60882926", "0.6084751", "0.60736156", "0.6072721", "0.60691094", "0.6067056", "0.6064434", "0.6064304", "0.6063498", "0.60631967", "0.6058028", "0.60565877", "0.6053512", "0.6053041", "0.60505795", "0.60474324", "0.60464996" ]
0.0
-1
Constructor from superclass, indicate to Hibernate.
public LanguageDao() { super(Language.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AbstractHibernateDAOSupport() {\n super();\n }", "public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }", "protected CompanyJPA() {\n\t}", "@Inject\n\tpublic AbsenceDaoImpl() throws SQLException {\n\t\tsuper(Absence.class);\n\t}", "public AbstractEntity() {\r\n\t}", "public SessionDao() {\n super(Session.SESSION, com.scratch.database.mysql.jv.tables.pojos.Session.class);\n }", "public DerivedPartOfPerspectivesFKDAOJDBC() {\n \t\n }", "protected AbstractJoSQLFilter ()\n {\n\n }", "public DAOBaseImpl() {\n\t\tsuper();\n\t}", "@SuppressWarnings(\"unchecked\")\n protected AbstractDao() {\n this.persistentClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[1];\n }", "public BaseDaoImpl() {\n\t\tsuper();\n\t}", "public ArticleDao() {\n super(Article.ARTICLE, cn.edu.kmust.flst.domain.flst.tables.pojos.Article.class);\n }", "public ClassModelDao() {\n super(ClassModel.CLASS_MODEL, com.platform.chorus.db.tables.pojos.ClassModel.class);\n }", "public BlogDaoHibernateFactoryImpl() {\n\t\tsuper();\n\t}", "protected void entityInit() {}", "@SuppressWarnings(\"unchecked\")\n\tpublic DaoBase() {\n\t\tentityClass = (Class<T>) ((ParameterizedType) getClass()\n\t\t\t\t.getGenericSuperclass()).getActualTypeArguments()[0];\n\t}", "public ProfesorDAOImpl() {\n super();\n }", "@SuppressWarnings(\"unchecked\")\n\t public AbstractHibernateRepository() {\n\t entityClass = (Class<Entity>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n\t }", "public TransactionLogDAOImpl() {\n\t\tsuper();\n\t}", "public DocumentDao() {\n super(Document.DOCUMENT, cn.edu.nju.teamwiki.jooq.tables.pojos.Document.class);\n }", "protected AbstractDao()\n {\n\n }", "public ReconTrDaoImpl() {\n\t\tsuper(ReconTr.class);\n\t}", "protected void init() throws SQLException {\n }", "public JdbcObjectStudentDAO() {\n\t\tsuper();\n\t}", "private HibernateUtil() {\r\n }", "public DatabaseTable() { }", "public SchoolCourseStudentDAOImpl() {\r\n\t\tsuper();\r\n\t}", "public PimsSysReqFieldDaoHibernate() {\n super(PimsSysReqField.class);\n }", "public CreditChainDao() {\n super(CreditChain.CREDIT_CHAIN, com.generator.tables.pojos.CreditChain.class);\n }", "private HibernateUtil() {\n\t}", "public ExpertiseEntity() {\n }", "protected DaoRWImpl() {\r\n super();\r\n }", "public ScOrgSeqDAOImpl() {\n super();\n }", "protected JpaModule() {\n }", "@Override\n\tpublic void initEntity() {\n\n\t}", "public T_2698Dao() {\n\t\tsuper(org.jooq.test.jdbc.generatedclasses.tables.T_2698.T_2698, org.jooq.test.jdbc.generatedclasses.tables.pojos.T_2698.class);\n\t}", "protected HibernateSynonymGroupDAO() {\n super(SynonymGroup.class);\n }", "public EntityFactoryImpl() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void init() throws SlickException {\n\t\t\n\t}", "public CiviliteDao() {\r\n\t\tsuper();\r\n\t}", "public HProvinceFbDAOImpl() {\r\n super();\r\n }", "public DatasetParameterPK() {\n }", "private Db() {\n super(Ke.getDatabase(), null);\n }", "public VRpDyHlrforbeDAOImpl() {\r\n super();\r\n }", "public StateDAOImpl() {\n super();\n }", "abstract void initPersistance();", "public BemPessoaDAOImpl() {\n\t\tsuper(\"PESQUISAR_BEM_PESSOA\");\n\t}", "public MapEntity() {\n\t}", "public OnibusDAO() {}", "public UserEntity() {\n\t\tsuper();\n\t}", "public McqOfficialSession(){\n\t\tsuper(); \n\t}", "public DocumentBase() {\n \n }", "public ActHiAttachmentDao() {\n super(ActHiAttachment.ACT_HI_ATTACHMENT, cn.com.ho.workflow.infrastructure.db.tables.pojos.ActHiAttachment.class);\n }", "public TWorkTrustDetailDAOImpl() {\n\t\tsuper();\n\t}", "public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }", "public MultaDAO() {\r\n super(MultaDAO.class);\r\n }", "private AttendantDatabase() {}", "public VBookDao() {\n\t\tsuper(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK, org.jooq.test.h2.generatedclasses.tables.pojos.VBook.class);\n\t}", "public DaoException() {\r\n\t\tsuper();\r\n\t}", "public ElemFeatureDAOImpl() {\r\n\t\tsuper();\r\n\t}", "public VAuthorDao() {\n\t\tsuper(org.jooq.test.h2.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.h2.generatedclasses.tables.pojos.VAuthor.class);\n\t}", "public WkBscCoreDAOImpl() {\r\n super();\r\n }", "public PurchaseCaseDAO() {\n\t\tsuper(PurchaseCaseVO.class, \"purchaseCaseId\");\n\t}", "public INGridBase()\n {\n }", "@SuppressWarnings(\"unchecked\")\r\n public GenericDAOImpl() {\r\n this.persistentClass = (Class<DomainObject>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];\r\n }", "public void initializeOnInstantiation() \n\t\t\t\tthrows PersistenceException{\n\n\t}", "private AdminEntity() {\n \tsuper();\n\n this.emf = Persistence.createEntityManagerFactory(\"entityManager\");\n\tthis.em = this.emf.createEntityManager();\n\tthis.tx = this.em.getTransaction();\n }", "public TbAdminMenuDAOImpl() {\n super();\n }", "public TOfferGoodsDao() {\n super(TOfferGoods.T_OFFER_GOODS, cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TOfferGoods.class);\n }", "public ZyCorporationDAOImpl() {\r\n super();\r\n }", "public TbLotteryNumDAOImpl() {\n super();\n }", "public IncomeDao() {\n super(Income.INCOME, moneytree.persist.db.generated.tables.pojos.Income.class);\n }", "public DataSourceEntityExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public DbUser() {\r\n\t}", "public Contact() {\n\t\tsuper(org.jooq.examples.sqlserver.adventureworks.person.tables.Contact.Contact);\n\t}", "public User() {\n\tsuper();\n}", "public XTestCase_64_69Dao() {\n\t\tsuper(org.jooq.examples.h2.matchers.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.examples.h2.matchers.tables.pojos.XTestCase_64_69.class);\n\t}", "public DaoConnection() {\n\t\t\n\t}", "public ProfileWorkexpDao() {\n super(ProfileWorkexp.PROFILE_WORKEXP, com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp.class);\n }", "public EstadosSql() {\r\n }", "public DB() {\r\n\t\r\n\t}", "public ReleaseplanDAOImpl() {\r\n\t\tsuper();\r\n\t}", "public QueryBO() {\r\n }", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "public ScaleDefDAOImpl() {\r\n super();\r\n }", "public SearchKeywordDao() {\r\n super(SearchKeyword.class);\r\n }", "public NationalityDAO() {\n //sessionFactory = HibernateUtil.getSessionFactory();\n session=HibernateUtil.openSession();\n }", "private DbQuery() {}", "public TGeneralprocessModeloneDAO() {\n super();\n }", "public ExamDao() {\n\t\tsuper(Exam.EXAM, ro.ghasachi.bt.persistence.tables.pojos.Exam.class);\n\t}", "public RAlarmLogDAOImpl() {\r\n super();\r\n }", "public SubordinationDAOImpl(Connection connection) {\n\t\tsuper(connection);\n\t}", "public ProductosPuntoVentaDaoImpl() {\r\n }", "public VendorLocationsDAOImpl() {\n\t\tsuper();\n\t}", "public BandaProtectionDao() {\n\t\tsuper(BandaProtection.BANDA_PROTECTION, com.psygate.minecraft.spigot.sovereignty.banda.db.model.tables.pojos.BandaProtection.class);\n\t}", "public abstract void initialize(ISession session);", "public LogEmailSendrecordDao() {\n super(LogEmailSendrecord.LOG_EMAIL_SENDRECORD, com.moseeker.baseorm.db.logdb.tables.pojos.LogEmailSendrecord.class);\n }", "public CrudUserDao() {\r\n super();\r\n }", "public EpAssetsDAOImpl() {\n super();\n }", "public HibernateEntity(ImplementationModel implementationModel) {\n\t\tsuper(implementationModel);\n\t}", "public BaseSLBean(Class<T> entityClass){\n this.entityClass = entityClass;\n }" ]
[ "0.7176589", "0.7088926", "0.68161565", "0.6693701", "0.65135276", "0.6489287", "0.6469013", "0.63985896", "0.63975537", "0.638022", "0.63521963", "0.63263404", "0.6320854", "0.6311995", "0.629558", "0.62889165", "0.6287598", "0.62827563", "0.62608063", "0.62376666", "0.6232514", "0.62301487", "0.623007", "0.622379", "0.62184477", "0.6213796", "0.62115246", "0.6208526", "0.62073433", "0.6178699", "0.6167848", "0.6160441", "0.6130393", "0.6121211", "0.6111601", "0.61107284", "0.61106014", "0.60806173", "0.60803175", "0.6079467", "0.6065611", "0.6058453", "0.60576594", "0.6050754", "0.6038313", "0.6035516", "0.60348713", "0.60347956", "0.60339904", "0.60332465", "0.60223645", "0.60223126", "0.60192686", "0.6005796", "0.5997726", "0.59960544", "0.59941185", "0.5984345", "0.59702176", "0.5966356", "0.5966343", "0.5965841", "0.59623116", "0.5960553", "0.5950154", "0.5946272", "0.593674", "0.593209", "0.5925173", "0.59242266", "0.5920603", "0.59141797", "0.59136784", "0.5912457", "0.58939683", "0.5884223", "0.58803636", "0.5877571", "0.58764654", "0.5872238", "0.5857587", "0.5856101", "0.5851481", "0.5851312", "0.5847749", "0.58445406", "0.58444554", "0.5842482", "0.58387583", "0.58375823", "0.58215815", "0.5819314", "0.5818424", "0.5811203", "0.58111745", "0.5807497", "0.5801386", "0.5799901", "0.5798972", "0.5798545", "0.5792219" ]
0.0
-1